From 0cfab43872bca8cfb0d519f2ee5f76e079432d2f Mon Sep 17 00:00:00 2001 From: Andrew Calcutt Date: Mon, 22 Apr 2024 01:01:31 -0400 Subject: [PATCH] chore: update inspect to maplibre version 1.6.3 Signed-off-by: Andrew Calcutt --- public/resources/maplibre-gl-inspect.css | 78 +- public/resources/maplibre-gl-inspect.js | 2857 +++++++++++++++++++ public/resources/maplibre-gl-inspect.js.map | 1 + public/resources/maplibre-gl-inspect.min.js | 1 - public/templates/data.tmpl | 2 +- public/templates/viewer.tmpl | 2 +- 6 files changed, 2899 insertions(+), 42 deletions(-) create mode 100644 public/resources/maplibre-gl-inspect.js create mode 100644 public/resources/maplibre-gl-inspect.js.map delete mode 100644 public/resources/maplibre-gl-inspect.min.js diff --git a/public/resources/maplibre-gl-inspect.css b/public/resources/maplibre-gl-inspect.css index 547c4e4..12ed4cb 100644 --- a/public/resources/maplibre-gl-inspect.css +++ b/public/resources/maplibre-gl-inspect.css @@ -1,40 +1,40 @@ .maplibregl-inspect_popup { - color: #333; - display: table; -} - -.maplibregl-inspect_feature:not(:last-child) { - border-bottom: 1px solid #ccc; -} - -.maplibregl-inspect_layer:before { - content: '#'; -} - -.maplibregl-inspect_layer { - display: block; - font-weight: bold; -} - -.maplibregl-inspect_property { - display: table-row; -} - -.maplibregl-inspect_property-value { - display: table-cell; - word-break: break-all; -} - -.maplibregl-inspect_property-name { - display: table-cell; - padding-right: 10px; - word-break: break-all; -} - -.maplibregl-ctrl-inspect { - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23333333' preserveAspectRatio='xMidYMid meet' viewBox='-10 -10 60 60'%3E%3Cg%3E%3Cpath d='m15 21.6q0-2 1.5-3.5t3.5-1.5 3.5 1.5 1.5 3.5-1.5 3.6-3.5 1.4-3.5-1.4-1.5-3.6z m18.4 11.1l-6.4-6.5q1.4-2.1 1.4-4.6 0-3.4-2.5-5.8t-5.9-2.4-5.9 2.4-2.5 5.8 2.5 5.9 5.9 2.5q2.4 0 4.6-1.4l7.4 7.4q-0.9 0.6-2 0.6h-20q-1.3 0-2.3-0.9t-1.1-2.3l0.1-26.8q0-1.3 1-2.3t2.3-0.9h13.4l10 10v19.3z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E"); -} - -.maplibregl-ctrl-map { - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23333333' viewBox='-10 -10 60 60' preserveAspectRatio='xMidYMid meet'%3E%3Cg%3E%3Cpath d='m25 31.640000000000004v-19.766666666666673l-10-3.511666666666663v19.766666666666666z m9.140000000000008-26.640000000000004q0.8599999999999923 0 0.8599999999999923 0.8600000000000003v25.156666666666666q0 0.625-0.625 0.783333333333335l-9.375 3.1999999999999993-10-3.5133333333333354-8.906666666666668 3.4383333333333326-0.2333333333333334 0.07833333333333314q-0.8616666666666664 0-0.8616666666666664-0.8599999999999994v-25.156666666666663q0-0.625 0.6233333333333331-0.7833333333333332l9.378333333333334-3.198333333333334 10 3.5133333333333336 8.905000000000001-3.4383333333333344z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E"); -} + color: #333; + display: table; + } + + .maplibregl-inspect_feature:not(:last-child) { + border-bottom: 1px solid #ccc; + } + + .maplibregl-inspect_layer:before { + content: '#'; + } + + .maplibregl-inspect_layer { + display: block; + font-weight: bold; + } + + .maplibregl-inspect_property { + display: table-row; + } + + .maplibregl-inspect_property-value { + display: table-cell; + word-break: break-all; + } + + .maplibregl-inspect_property-name { + display: table-cell; + padding-right: 10px; + word-break: break-all; + } + + .maplibregl-ctrl-inspect { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23333333' preserveAspectRatio='xMidYMid meet' viewBox='-10 -10 60 60'%3E%3Cg%3E%3Cpath d='m15 21.6q0-2 1.5-3.5t3.5-1.5 3.5 1.5 1.5 3.5-1.5 3.6-3.5 1.4-3.5-1.4-1.5-3.6z m18.4 11.1l-6.4-6.5q1.4-2.1 1.4-4.6 0-3.4-2.5-5.8t-5.9-2.4-5.9 2.4-2.5 5.8 2.5 5.9 5.9 2.5q2.4 0 4.6-1.4l7.4 7.4q-0.9 0.6-2 0.6h-20q-1.3 0-2.3-0.9t-1.1-2.3l0.1-26.8q0-1.3 1-2.3t2.3-0.9h13.4l10 10v19.3z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E"); + } + + .maplibregl-ctrl-map { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23333333' viewBox='-10 -10 60 60' preserveAspectRatio='xMidYMid meet'%3E%3Cg%3E%3Cpath d='m25 31.640000000000004v-19.766666666666673l-10-3.511666666666663v19.766666666666666z m9.140000000000008-26.640000000000004q0.8599999999999923 0 0.8599999999999923 0.8600000000000003v25.156666666666666q0 0.625-0.625 0.783333333333335l-9.375 3.1999999999999993-10-3.5133333333333354-8.906666666666668 3.4383333333333326-0.2333333333333334 0.07833333333333314q-0.8616666666666664 0-0.8616666666666664-0.8599999999999994v-25.156666666666663q0-0.625 0.6233333333333331-0.7833333333333332l9.378333333333334-3.198333333333334 10 3.5133333333333336 8.905000000000001-3.4383333333333344z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E"); + } \ No newline at end of file diff --git a/public/resources/maplibre-gl-inspect.js b/public/resources/maplibre-gl-inspect.js new file mode 100644 index 0000000..3f4b208 --- /dev/null +++ b/public/resources/maplibre-gl-inspect.js @@ -0,0 +1,2857 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.MaplibreInspect = factory()); +})(this, (function () { 'use strict'; + + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function getDefaultExportFromCjs (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; + } + + var lodash_isequal = {exports: {}}; + + /** + * Lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright JS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + lodash_isequal.exports; + + (function (module, exports) { + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]'; + + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = + typedArrayTags[errorTag] = typedArrayTags[funcTag] = + typedArrayTags[mapTag] = typedArrayTags[numberTag] = + typedArrayTags[objectTag] = typedArrayTags[regexpTag] = + typedArrayTags[setTag] = typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = false; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }()); + + /* Node.js helper references. */ + var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = root['__core-js_shared__']; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? root.Buffer : undefined, + Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeKeys = overArg(Object.keys, Object); + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(root, 'DataView'), + Map = getNative(root, 'Map'), + Promise = getNative(root, 'Promise'), + Set = getNative(root, 'Set'), + WeakMap = getNative(root, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); + } + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; + } + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } + } + + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + function setCacheHas(value) { + return this.__data__.has(value); + } + + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache; + this.size = 0; + } + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; + } + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; + } + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; + } + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); + } + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse; + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + + /** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ + function stubArray() { + return []; + } + + /** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ + function stubFalse() { + return false; + } + + module.exports = isEqual; + } (lodash_isequal, lodash_isequal.exports)); + + var lodash_isequalExports = lodash_isequal.exports; + var isEqual = /*@__PURE__*/getDefaultExportFromCjs(lodash_isequalExports); + + function circleLayer(color, source, vectorLayer) { + const layer = { + id: [source, vectorLayer, 'circle'].join('_'), + source, + type: 'circle', + paint: { + 'circle-color': color, + 'circle-radius': 2 + }, + filter: ['==', '$type', 'Point'] + }; + if (vectorLayer) { + layer['source-layer'] = vectorLayer; + } + return layer; + } + function polygonLayer(color, _outlineColor, source, vectorLayer) { + const layer = { + id: [source, vectorLayer, 'polygon'].join('_'), + source, + type: 'fill', + paint: { + 'fill-color': color, + 'fill-antialias': true, + 'fill-outline-color': color + }, + filter: ['==', '$type', 'Polygon'] + }; + if (vectorLayer) { + layer['source-layer'] = vectorLayer; + } + return layer; + } + function lineLayer(color, source, vectorLayer) { + const layer = { + id: [source, vectorLayer, 'line'].join('_'), + source, + layout: { + 'line-join': 'round', + 'line-cap': 'round' + }, + type: 'line', + paint: { + 'line-color': color + }, + filter: ['==', '$type', 'LineString'] + }; + if (vectorLayer) { + layer['source-layer'] = vectorLayer; + } + return layer; + } + /** + * Generate colored layer styles for the given sources + * @param sources dictionary containing the vector layer IDs + * @param Function to generate a color for a layer + * @return Array of Maplibre GL layers + */ + function generateColoredLayers(sources, assignLayerColor) { + const polyLayers = []; + const circleLayers = []; + const lineLayers = []; + function alphaColors(layerId) { + const obj = { + circle: assignLayerColor(layerId, 0.8), + line: assignLayerColor(layerId, 0.6), + polygon: assignLayerColor(layerId, 0.3), + polygonOutline: assignLayerColor(layerId, 0.6), + default: assignLayerColor(layerId, 1) + }; + return obj; + } + Object.keys(sources).forEach((sourceId) => { + const layers = sources[sourceId]; + if (!layers || layers.length === 0) { + const colors = alphaColors(sourceId); + circleLayers.push(circleLayer(colors.circle, sourceId)); + lineLayers.push(lineLayer(colors.line, sourceId)); + polyLayers.push(polygonLayer(colors.polygon, colors.polygonOutline, sourceId)); + } + else { + layers.forEach((layerId) => { + const colors = alphaColors(layerId); + circleLayers.push(circleLayer(colors.circle, sourceId, layerId)); + lineLayers.push(lineLayer(colors.line, sourceId, layerId)); + polyLayers.push(polygonLayer(colors.polygon, colors.polygonOutline, sourceId, layerId)); + }); + } + }); + return polyLayers.concat(lineLayers).concat(circleLayers); + } + /** + * Create inspection style out of the original style and the new colored layers + * @param originalMapStyle - map style + * @param coloredLayers - array of colored Maplibre GL layers + * @param opts - options + * @return {Object} Colored inspect style + */ + function generateInspectStyle(originalMapStyle, coloredLayers, opts) { + opts = Object.assign({ + backgroundColor: '#fff' + }, opts); + const backgroundLayer = { + 'id': 'background', + 'type': 'background', + 'paint': { + 'background-color': opts.backgroundColor + } + }; + const sources = {}; + Object.keys(originalMapStyle.sources).forEach((sourceId) => { + const source = originalMapStyle.sources[sourceId]; + if (source.type === 'vector' || source.type === 'geojson') { + sources[sourceId] = source; + } + }); + return Object.assign(originalMapStyle, { + layers: [backgroundLayer].concat(coloredLayers), + sources + }); + } + var stylegen = { + polygonLayer, + lineLayer, + circleLayer, + generateInspectStyle, + generateColoredLayers + }; + + /** + * A button to toggle the inspect mode + */ + class InspectButton { + constructor(options) { + options = Object.assign({ + show: true, + onToggle() { } + }, options); + this._btn = this.createButton(); + this._btn.onclick = options.onToggle; + this.elem = this.createContainer(this._btn, options.show); + } + createButton() { + const btn = document.createElement('button'); + btn.className = 'maplibregl-ctrl-icon maplibregl-ctrl-inspect'; + btn.type = 'button'; + btn.setAttribute('aria-label', 'Inspect'); + return btn; + } + createContainer(child, show) { + const container = document.createElement('div'); + container.className = 'maplibregl-ctrl maplibregl-ctrl-group'; + container.appendChild(child); + if (!show) { + container.style.display = 'none'; + } + return container; + } + setInspectIcon() { + this._btn.className = 'maplibregl-ctrl-icon maplibregl-ctrl-inspect'; + } + setMapIcon() { + this._btn.className = 'maplibregl-ctrl-icon maplibregl-ctrl-map'; + } + } + + function displayValue(value) { + if (typeof value === 'undefined' || value === null) + return value; + if (value instanceof Date) + return value.toLocaleString(); + if (typeof value === 'object' || + typeof value === 'number' || + typeof value === 'string') + return value.toString(); + return value; + } + function renderProperty(propertyName, property) { + return `${'
' + + '
'}${propertyName}
` + + `
${displayValue(property)}
` + + '
'; + } + function renderLayer(layerId) { + return `
${layerId}
`; + } + function renderProperties(feature) { + const sourceProperty = renderLayer(feature.layer['source-layer'] || feature.layer.source); + const typeProperty = renderProperty('$type', feature.geometry.type); + const properties = Object.keys(feature.properties).map(propertyName => renderProperty(propertyName, feature.properties[propertyName])); + return [sourceProperty, typeProperty].concat(properties).join(''); + } + function renderFeatures(features) { + return features.map(ft => `
${renderProperties(ft)}
`).join(''); + } + function renderPopup(features) { + return `
${renderFeatures(features)}
`; + } + + var randomColor$1 = {exports: {}}; + + (function (module, exports) { + (function(root, factory) { + + // Support CommonJS + { + var randomColor = factory(); + + // Support NodeJS & Component, which allow module.exports to be a function + if (module && module.exports) { + exports = module.exports = randomColor; + } + + // Support CommonJS 1.1.1 spec + exports.randomColor = randomColor; + + // Support AMD + } + + }(commonjsGlobal, function() { + + // Seed to get repeatable colors + var seed = null; + + // Shared color dictionary + var colorDictionary = {}; + + // Populate the color dictionary + loadColorBounds(); + + // check if a range is taken + var colorRanges = []; + + var randomColor = function (options) { + + options = options || {}; + + // Check if there is a seed and ensure it's an + // integer. Otherwise, reset the seed value. + if (options.seed !== undefined && options.seed !== null && options.seed === parseInt(options.seed, 10)) { + seed = options.seed; + + // A string was passed as a seed + } else if (typeof options.seed === 'string') { + seed = stringToInteger(options.seed); + + // Something was passed as a seed but it wasn't an integer or string + } else if (options.seed !== undefined && options.seed !== null) { + throw new TypeError('The seed value must be an integer or string'); + + // No seed, reset the value outside. + } else { + seed = null; + } + + var H,S,B; + + // Check if we need to generate multiple colors + if (options.count !== null && options.count !== undefined) { + + var totalColors = options.count, + colors = []; + // Value false at index i means the range i is not taken yet. + for (var i = 0; i < options.count; i++) { + colorRanges.push(false); + } + options.count = null; + + while (totalColors > colors.length) { + + var color = randomColor(options); + + if (seed !== null) { + options.seed = seed; + } + + colors.push(color); + } + + options.count = totalColors; + + return colors; + } + + // First we pick a hue (H) + H = pickHue(options); + + // Then use H to determine saturation (S) + S = pickSaturation(H, options); + + // Then use S and H to determine brightness (B). + B = pickBrightness(H, S, options); + + // Then we return the HSB color in the desired format + return setFormat([H,S,B], options); + }; + + function pickHue(options) { + if (colorRanges.length > 0) { + var hueRange = getRealHueRange(options.hue); + + var hue = randomWithin(hueRange); + + //Each of colorRanges.length ranges has a length equal approximatelly one step + var step = (hueRange[1] - hueRange[0]) / colorRanges.length; + + var j = parseInt((hue - hueRange[0]) / step); + + //Check if the range j is taken + if (colorRanges[j] === true) { + j = (j + 2) % colorRanges.length; + } + else { + colorRanges[j] = true; + } + + var min = (hueRange[0] + j * step) % 359, + max = (hueRange[0] + (j + 1) * step) % 359; + + hueRange = [min, max]; + + hue = randomWithin(hueRange); + + if (hue < 0) {hue = 360 + hue;} + return hue + } + else { + var hueRange = getHueRange(options.hue); + + hue = randomWithin(hueRange); + // Instead of storing red as two seperate ranges, + // we group them, using negative numbers + if (hue < 0) { + hue = 360 + hue; + } + + return hue; + } + } + + function pickSaturation (hue, options) { + + if (options.hue === 'monochrome') { + return 0; + } + + if (options.luminosity === 'random') { + return randomWithin([0,100]); + } + + var saturationRange = getSaturationRange(hue); + + var sMin = saturationRange[0], + sMax = saturationRange[1]; + + switch (options.luminosity) { + + case 'bright': + sMin = 55; + break; + + case 'dark': + sMin = sMax - 10; + break; + + case 'light': + sMax = 55; + break; + } + + return randomWithin([sMin, sMax]); + + } + + function pickBrightness (H, S, options) { + + var bMin = getMinimumBrightness(H, S), + bMax = 100; + + switch (options.luminosity) { + + case 'dark': + bMax = bMin + 20; + break; + + case 'light': + bMin = (bMax + bMin)/2; + break; + + case 'random': + bMin = 0; + bMax = 100; + break; + } + + return randomWithin([bMin, bMax]); + } + + function setFormat (hsv, options) { + + switch (options.format) { + + case 'hsvArray': + return hsv; + + case 'hslArray': + return HSVtoHSL(hsv); + + case 'hsl': + var hsl = HSVtoHSL(hsv); + return 'hsl('+hsl[0]+', '+hsl[1]+'%, '+hsl[2]+'%)'; + + case 'hsla': + var hslColor = HSVtoHSL(hsv); + var alpha = options.alpha || Math.random(); + return 'hsla('+hslColor[0]+', '+hslColor[1]+'%, '+hslColor[2]+'%, ' + alpha + ')'; + + case 'rgbArray': + return HSVtoRGB(hsv); + + case 'rgb': + var rgb = HSVtoRGB(hsv); + return 'rgb(' + rgb.join(', ') + ')'; + + case 'rgba': + var rgbColor = HSVtoRGB(hsv); + var alpha = options.alpha || Math.random(); + return 'rgba(' + rgbColor.join(', ') + ', ' + alpha + ')'; + + default: + return HSVtoHex(hsv); + } + + } + + function getMinimumBrightness(H, S) { + + var lowerBounds = getColorInfo(H).lowerBounds; + + for (var i = 0; i < lowerBounds.length - 1; i++) { + + var s1 = lowerBounds[i][0], + v1 = lowerBounds[i][1]; + + var s2 = lowerBounds[i+1][0], + v2 = lowerBounds[i+1][1]; + + if (S >= s1 && S <= s2) { + + var m = (v2 - v1)/(s2 - s1), + b = v1 - m*s1; + + return m*S + b; + } + + } + + return 0; + } + + function getHueRange (colorInput) { + + if (typeof parseInt(colorInput) === 'number') { + + var number = parseInt(colorInput); + + if (number < 360 && number > 0) { + return [number, number]; + } + + } + + if (typeof colorInput === 'string') { + + if (colorDictionary[colorInput]) { + var color = colorDictionary[colorInput]; + if (color.hueRange) {return color.hueRange;} + } else if (colorInput.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)) { + var hue = HexToHSB(colorInput)[0]; + return [ hue, hue ]; + } + } + + return [0,360]; + + } + + function getSaturationRange (hue) { + return getColorInfo(hue).saturationRange; + } + + function getColorInfo (hue) { + + // Maps red colors to make picking hue easier + if (hue >= 334 && hue <= 360) { + hue-= 360; + } + + for (var colorName in colorDictionary) { + var color = colorDictionary[colorName]; + if (color.hueRange && + hue >= color.hueRange[0] && + hue <= color.hueRange[1]) { + return colorDictionary[colorName]; + } + } return 'Color not found'; + } + + function randomWithin (range) { + if (seed === null) { + //generate random evenly destinct number from : https://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/ + var golden_ratio = 0.618033988749895; + var r=Math.random(); + r += golden_ratio; + r %= 1; + return Math.floor(range[0] + r*(range[1] + 1 - range[0])); + } else { + //Seeded random algorithm from http://indiegamr.com/generate-repeatable-random-numbers-in-js/ + var max = range[1] || 1; + var min = range[0] || 0; + seed = (seed * 9301 + 49297) % 233280; + var rnd = seed / 233280.0; + return Math.floor(min + rnd * (max - min)); + } + } + + function HSVtoHex (hsv){ + + var rgb = HSVtoRGB(hsv); + + function componentToHex(c) { + var hex = c.toString(16); + return hex.length == 1 ? '0' + hex : hex; + } + + var hex = '#' + componentToHex(rgb[0]) + componentToHex(rgb[1]) + componentToHex(rgb[2]); + + return hex; + + } + + function defineColor (name, hueRange, lowerBounds) { + + var sMin = lowerBounds[0][0], + sMax = lowerBounds[lowerBounds.length - 1][0], + + bMin = lowerBounds[lowerBounds.length - 1][1], + bMax = lowerBounds[0][1]; + + colorDictionary[name] = { + hueRange: hueRange, + lowerBounds: lowerBounds, + saturationRange: [sMin, sMax], + brightnessRange: [bMin, bMax] + }; + + } + + function loadColorBounds () { + + defineColor( + 'monochrome', + null, + [[0,0],[100,0]] + ); + + defineColor( + 'red', + [-26,18], + [[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]] + ); + + defineColor( + 'orange', + [18,46], + [[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]] + ); + + defineColor( + 'yellow', + [46,62], + [[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]] + ); + + defineColor( + 'green', + [62,178], + [[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]] + ); + + defineColor( + 'blue', + [178, 257], + [[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]] + ); + + defineColor( + 'purple', + [257, 282], + [[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]] + ); + + defineColor( + 'pink', + [282, 334], + [[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]] + ); + + } + + function HSVtoRGB (hsv) { + + // this doesn't work for the values of 0 and 360 + // here's the hacky fix + var h = hsv[0]; + if (h === 0) {h = 1;} + if (h === 360) {h = 359;} + + // Rebase the h,s,v values + h = h/360; + var s = hsv[1]/100, + v = hsv[2]/100; + + var h_i = Math.floor(h*6), + f = h * 6 - h_i, + p = v * (1 - s), + q = v * (1 - f*s), + t = v * (1 - (1 - f)*s), + r = 256, + g = 256, + b = 256; + + switch(h_i) { + case 0: r = v; g = t; b = p; break; + case 1: r = q; g = v; b = p; break; + case 2: r = p; g = v; b = t; break; + case 3: r = p; g = q; b = v; break; + case 4: r = t; g = p; b = v; break; + case 5: r = v; g = p; b = q; break; + } + + var result = [Math.floor(r*255), Math.floor(g*255), Math.floor(b*255)]; + return result; + } + + function HexToHSB (hex) { + hex = hex.replace(/^#/, ''); + hex = hex.length === 3 ? hex.replace(/(.)/g, '$1$1') : hex; + + var red = parseInt(hex.substr(0, 2), 16) / 255, + green = parseInt(hex.substr(2, 2), 16) / 255, + blue = parseInt(hex.substr(4, 2), 16) / 255; + + var cMax = Math.max(red, green, blue), + delta = cMax - Math.min(red, green, blue), + saturation = cMax ? (delta / cMax) : 0; + + switch (cMax) { + case red: return [ 60 * (((green - blue) / delta) % 6) || 0, saturation, cMax ]; + case green: return [ 60 * (((blue - red) / delta) + 2) || 0, saturation, cMax ]; + case blue: return [ 60 * (((red - green) / delta) + 4) || 0, saturation, cMax ]; + } + } + + function HSVtoHSL (hsv) { + var h = hsv[0], + s = hsv[1]/100, + v = hsv[2]/100, + k = (2-s)*v; + + return [ + h, + Math.round(s*v / (k<1 ? k : 2-k) * 10000) / 100, + k/2 * 100 + ]; + } + + function stringToInteger (string) { + var total = 0; + for (var i = 0; i !== string.length; i++) { + if (total >= Number.MAX_SAFE_INTEGER) break; + total += string.charCodeAt(i); + } + return total + } + + // get The range of given hue when options.count!=0 + function getRealHueRange(colorHue) + { if (!isNaN(colorHue)) { + var number = parseInt(colorHue); + + if (number < 360 && number > 0) { + return getColorInfo(colorHue).hueRange + } + } + else if (typeof colorHue === 'string') { + + if (colorDictionary[colorHue]) { + var color = colorDictionary[colorHue]; + + if (color.hueRange) { + return color.hueRange + } + } else if (colorHue.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)) { + var hue = HexToHSB(colorHue)[0]; + return getColorInfo(hue).hueRange + } + } + + return [0,360] + } + return randomColor; + })); + } (randomColor$1, randomColor$1.exports)); + + var randomColorExports = randomColor$1.exports; + var randomColor = /*@__PURE__*/getDefaultExportFromCjs(randomColorExports); + + /** + * Assign a color to a unique layer ID and also considering + * common layer names such as water or wood. + * @param layerId - a layer ID + * @param alpha - alpha value for the color, default is 1 + * @return a color in rgba string format + */ + function brightColor(layerId, alpha) { + let luminosity = 'bright'; + let hue = undefined; + if (/water|ocean|lake|sea|river/.test(layerId)) { + hue = 'blue'; + } + if (/state|country|place/.test(layerId)) { + hue = 'pink'; + } + if (/road|highway|transport|streets/.test(layerId)) { + hue = 'orange'; + } + if (/contour|building|earth/.test(layerId)) { + hue = 'monochrome'; + } + if (/building/.test(layerId)) { + luminosity = 'dark'; + } + if (/earth/.test(layerId)) { + luminosity = 'light'; + } + if (/contour|landuse/.test(layerId)) { + hue = 'yellow'; + } + if (/wood|forest|park|landcover|land|natural/.test(layerId)) { + hue = 'green'; + } + const rgb = randomColor({ + luminosity, + hue, + seed: layerId, + format: 'rgbArray' + }); + return `rgba(${rgb.join(', ')}, ${alpha || "1"})`; + } + var colors = { brightColor }; + + function isInspectStyle(style) { + return style.metadata && style.metadata['maplibregl-inspect:inspect']; + } + function markInspectStyle(style) { + return Object.assign(style, { + metadata: Object.assign({}, style.metadata, { + 'maplibregl-inspect:inspect': true + }) + }); + } + /** + * Maplibre Inspect Control + */ + class MaplibreInspect { + constructor(options) { + this._onSourceChange = (e) => { + if (e.sourceDataType === 'visibility' || !e.isSourceLoaded) { + return; + } + const previousSources = Object.assign({}, this.sources); + this._setSourcesFromMap(); + if (!isEqual(previousSources, this.sources) && Object.keys(this.sources).length > 0) { + // If the sources have changed, we need to re-render the inspect style but not too fast + setTimeout(() => this.render(), 1000); + } + }; + this._onStyleChange = () => { + const style = this._map.getStyle(); + if (!isInspectStyle(style)) { + this._originalStyle = style; + } + }; + this._onRightClick = () => { + if (!this.options.showMapPopupOnHover && !this.options.showInspectMapPopupOnHover && !this.options.blockHoverPopupOnClick) { + if (this._popup) + this._popup.remove(); + } + }; + this._onMousemove = (e) => { + if (this._showInspectMap) { + if (!this.options.showInspectMapPopup) + return; + if (e.type === 'mousemove' && !this.options.showInspectMapPopupOnHover) + return; + if (e.type === 'click' && this.options.showInspectMapPopupOnHover && this.options.blockHoverPopupOnClick) { + this._popupBlocked = !this._popupBlocked; + } + } + else { + if (!this.options.showMapPopup) + return; + if (e.type === 'mousemove' && !this.options.showMapPopupOnHover) + return; + if (e.type === 'click' && this.options.showMapPopupOnHover && this.options.blockHoverPopupOnClick) { + this._popupBlocked = !this._popupBlocked; + } + } + if (!this._popupBlocked && this._popup) { + let queryBox; + if (this.options.selectThreshold === 0) { + queryBox = e.point; + } + else { + // set a bbox around the pointer + queryBox = [ + [ + e.point.x - this.options.selectThreshold, + e.point.y + this.options.selectThreshold + ], // bottom left (SW) + [ + e.point.x + this.options.selectThreshold, + e.point.y - this.options.selectThreshold + ] // top right (NE) + ]; + } + const features = this._map.queryRenderedFeatures(queryBox, this.options.queryParameters) || []; + this._map.getCanvas().style.cursor = (features.length) ? 'pointer' : ''; + if (!features.length) { + this._popup.remove(); + } + else { + this._popup.setLngLat(e.lngLat); + const renderedPopup = this.options.renderPopup(features); + if (typeof renderedPopup === 'string') { + this._popup.setHTML(renderedPopup); + } + else { + this._popup.setDOMContent(renderedPopup); + } + this._popup.addTo(this._map); + } + } + }; + if (!(this instanceof MaplibreInspect)) { + throw new Error('MaplibreInspect needs to be called with the new keyword'); + } + let popup = null; + if (window.maplibregl) { + popup = new window.maplibregl.Popup({ + closeButton: false, + closeOnClick: false + }); + } + else if (!options.popup) { + console.error('Maplibre GL JS can not be found. Make sure to include it or pass an initialized MaplibreGL Popup to MaplibreInspect if you are using moduleis.'); + } + this.options = Object.assign({ + showInspectMap: false, + showInspectButton: true, + showInspectMapPopup: true, + showMapPopup: false, + showMapPopupOnHover: true, + showInspectMapPopupOnHover: true, + blockHoverPopupOnClick: false, + backgroundColor: '#fff', + assignLayerColor: colors.brightColor, + buildInspectStyle: stylegen.generateInspectStyle, + renderPopup, + popup, + selectThreshold: 5, + useInspectStyle: true, + queryParameters: {}, + sources: {}, + toggleCallback() { }, + manageStyleOutside: false + }, options); + this.sources = this.options.sources; + this.assignLayerColor = this.options.assignLayerColor; + this._popup = this.options.popup; + this._popupBlocked = false; + this._showInspectMap = this.options.showInspectMap; + this._toggle = new InspectButton({ + show: this.options.showInspectButton, + onToggle: () => this.toggleInspector() + }); + } + toggleInspector() { + this._showInspectMap = !this._showInspectMap; + this._popupBlocked = false; + this.options.toggleCallback(this._showInspectMap); + this.render(); + } + _inspectStyle() { + const coloredLayers = stylegen.generateColoredLayers(this.sources, this.assignLayerColor); + return this.options.buildInspectStyle(this._map.getStyle(), coloredLayers, { + backgroundColor: this.options.backgroundColor + }); + } + render() { + if (this._showInspectMap) { + if (this.options.useInspectStyle) { + this._map.setStyle(markInspectStyle(this._inspectStyle())); + } + this._toggle.setMapIcon(); + } + else if (this._originalStyle) { + if (this._popup) + this._popup.remove(); + if (this.options.useInspectStyle) { + this._map.setStyle(this._originalStyle); + } + this._toggle.setInspectIcon(); + } + } + _setSourcesFromMap() { + //NOTE: This heavily depends on the internal API of Maplibre GL + //so this breaks between Maplibre GL JS releases + const mapStyleSourcesNames = Object.keys(this._map.getStyle().sources); + Object.keys(this._map.style.sourceCaches).forEach((sourceId) => { + const sourceCache = this._map.style.sourceCaches[sourceId] || { _source: {} }; + const layerIds = sourceCache._source.vectorLayerIds; + if (layerIds) { + this.sources[sourceId] = layerIds; + } + else if (sourceCache._source.type === 'geojson') { + this.sources[sourceId] = []; + } + }); + Object.keys(this.sources).forEach((sourceId) => { + if (mapStyleSourcesNames.indexOf(sourceId) === -1) { + delete this.sources[sourceId]; + } + }); + } + /** + * This will set the original style of the map + * It will also update the sources assuming the map has already been loaded + * @param style - The original style + */ + setOriginalStyle(style) { + this._originalStyle = style; + this._setSourcesFromMap(); + } + onAdd(map) { + this._map = map; + // if sources have already been passed as options + // we do not need to figure out the sources ourselves + if (Object.keys(this.sources).length === 0) { + map.on('tiledata', this._onSourceChange); + map.on('sourcedata', this._onSourceChange); + } + map.on('styledata', this._onStyleChange); + map.on('load', this._onStyleChange); + map.on('mousemove', this._onMousemove); + map.on('click', this._onMousemove); + map.on('contextmenu', this._onRightClick); + return this._toggle.elem; + } + onRemove() { + this._map.off('styledata', this._onStyleChange); + this._map.off('load', this._onStyleChange); + this._map.off('tiledata', this._onSourceChange); + this._map.off('sourcedata', this._onSourceChange); + this._map.off('mousemove', this._onMousemove); + this._map.off('click', this._onMousemove); + this._map.off('contextmenu', this._onRightClick); + const elem = this._toggle.elem; + elem.parentNode.removeChild(elem); + this._map = undefined; + } + } + + return MaplibreInspect; + +})); +//# sourceMappingURL=maplibre-gl-inspect.js.map diff --git a/public/resources/maplibre-gl-inspect.js.map b/public/resources/maplibre-gl-inspect.js.map new file mode 100644 index 0000000..7333cc4 --- /dev/null +++ b/public/resources/maplibre-gl-inspect.js.map @@ -0,0 +1 @@ +{"version":3,"file":"maplibre-gl-inspect.js","sources":["../node_modules/lodash.isequal/index.js","../lib/stylegen.ts","../lib/InspectButton.ts","../lib/renderPopup.ts","../node_modules/randomcolor/randomColor.js","../lib/colors.ts","../lib/MaplibreInspect.ts"],"sourcesContent":["/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright JS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = isEqual;\n","import type { LayerSpecification, StyleSpecification } from \"maplibre-gl\";\n\nfunction circleLayer(color: string, source: string, vectorLayer?: string) {\n const layer: LayerSpecification = {\n id: [source, vectorLayer, 'circle'].join('_'),\n source,\n type: 'circle',\n paint: {\n 'circle-color': color,\n 'circle-radius': 2\n },\n filter: ['==', '$type', 'Point']\n };\n if (vectorLayer) {\n layer['source-layer'] = vectorLayer;\n }\n return layer;\n}\n\nfunction polygonLayer(color: string, _outlineColor: string, source: string, vectorLayer?: string) {\n const layer: LayerSpecification = {\n id: [source, vectorLayer, 'polygon'].join('_'),\n source,\n type: 'fill',\n paint: {\n 'fill-color': color,\n 'fill-antialias': true,\n 'fill-outline-color': color\n },\n filter: ['==', '$type', 'Polygon']\n };\n if (vectorLayer) {\n layer['source-layer'] = vectorLayer;\n }\n return layer;\n}\n\nfunction lineLayer(color: string, source: string, vectorLayer?: string) {\n const layer: LayerSpecification = {\n id: [source, vectorLayer, 'line'].join('_'),\n source,\n layout: {\n 'line-join': 'round',\n 'line-cap': 'round'\n },\n type: 'line',\n paint: {\n 'line-color': color\n },\n filter: ['==', '$type', 'LineString']\n };\n if (vectorLayer) {\n layer['source-layer'] = vectorLayer;\n }\n return layer;\n}\n\n/**\n * Generate colored layer styles for the given sources\n * @param sources dictionary containing the vector layer IDs\n * @param Function to generate a color for a layer\n * @return Array of Maplibre GL layers\n */\nfunction generateColoredLayers(sources: {[key: string]: string[]}, assignLayerColor: (layerId: string, alpha: number) => string): LayerSpecification[] {\n const polyLayers: LayerSpecification[] = [];\n const circleLayers: LayerSpecification[] = [];\n const lineLayers: LayerSpecification[] = [];\n\n function alphaColors(layerId: string) {\n const obj = {\n circle: assignLayerColor(layerId, 0.8),\n line: assignLayerColor(layerId, 0.6),\n polygon: assignLayerColor(layerId, 0.3),\n polygonOutline: assignLayerColor(layerId, 0.6),\n default: assignLayerColor(layerId, 1)\n };\n return obj;\n }\n\n Object.keys(sources).forEach((sourceId) => {\n const layers = sources[sourceId];\n\n if (!layers || layers.length === 0) {\n const colors = alphaColors(sourceId);\n circleLayers.push(circleLayer(colors.circle, sourceId));\n lineLayers.push(lineLayer(colors.line, sourceId));\n polyLayers.push(polygonLayer(colors.polygon, colors.polygonOutline, sourceId));\n } else {\n layers.forEach((layerId: string) => {\n const colors = alphaColors(layerId);\n\n circleLayers.push(circleLayer(colors.circle, sourceId, layerId));\n lineLayers.push(lineLayer(colors.line, sourceId, layerId));\n polyLayers.push(polygonLayer(colors.polygon, colors.polygonOutline, sourceId, layerId));\n });\n }\n });\n\n return polyLayers.concat(lineLayers).concat(circleLayers);\n}\n\n/**\n * Create inspection style out of the original style and the new colored layers\n * @param originalMapStyle - map style\n * @param coloredLayers - array of colored Maplibre GL layers\n * @param opts - options\n * @return {Object} Colored inspect style\n */\nfunction generateInspectStyle(originalMapStyle: StyleSpecification, coloredLayers: LayerSpecification[], opts: {backgroundColor?: string}): StyleSpecification {\n opts = Object.assign({\n backgroundColor: '#fff'\n }, opts);\n\n const backgroundLayer: LayerSpecification = {\n 'id': 'background',\n 'type': 'background',\n 'paint': {\n 'background-color': opts.backgroundColor\n }\n };\n\n const sources: StyleSpecification[\"sources\"] = {};\n Object.keys(originalMapStyle.sources).forEach((sourceId) => {\n const source = originalMapStyle.sources[sourceId];\n if (source.type === 'vector' || source.type === 'geojson') {\n sources[sourceId] = source;\n }\n });\n\n return Object.assign(originalMapStyle, {\n layers: ([backgroundLayer] as LayerSpecification[]).concat(coloredLayers),\n sources\n });\n}\n\nexport default {\n polygonLayer,\n lineLayer,\n circleLayer,\n generateInspectStyle,\n generateColoredLayers\n}\n","/**\n * The options for the InspectButton\n */\ntype InspectButtonOptions = {\n show: boolean;\n onToggle: () => void;\n};\n\n/**\n * A button to toggle the inspect mode\n */\nclass InspectButton {\n _btn: HTMLButtonElement;\n elem: HTMLDivElement;\n\n constructor(options: InspectButtonOptions) {\n options = Object.assign({\n show: true,\n onToggle() {}\n }, options);\n\n this._btn = this.createButton();\n this._btn.onclick = options.onToggle;\n this.elem = this.createContainer(this._btn, options.show);\n }\n\n private createButton() {\n const btn = document.createElement('button');\n btn.className = 'maplibregl-ctrl-icon maplibregl-ctrl-inspect';\n btn.type = 'button';\n btn.setAttribute('aria-label', 'Inspect');\n return btn;\n }\n\n private createContainer(child: HTMLElement, show: boolean): HTMLDivElement {\n const container = document.createElement('div');\n container.className = 'maplibregl-ctrl maplibregl-ctrl-group';\n container.appendChild(child);\n if (!show) {\n container.style.display = 'none';\n }\n return container;\n }\n\n public setInspectIcon() {\n this._btn.className = 'maplibregl-ctrl-icon maplibregl-ctrl-inspect';\n }\n\n public setMapIcon() {\n this._btn.className = 'maplibregl-ctrl-icon maplibregl-ctrl-map';\n }\n}\nexport default InspectButton;\n","import type { MapGeoJSONFeature } from \"maplibre-gl\";\n\n/**\n * A GeoJSON feature with a source layer\n */\nexport type GeoJSONFeatureWithSourceLayer = MapGeoJSONFeature & { layer: {'source-layer'?: string} };\n\nfunction displayValue(value: unknown) {\n if (typeof value === 'undefined' || value === null) return value;\n if (value instanceof Date) return value.toLocaleString();\n if (typeof value === 'object' ||\n typeof value === 'number' ||\n typeof value === 'string') return value.toString();\n return value;\n}\n\nfunction renderProperty(propertyName: string, property: unknown) {\n return `${'
' +\n '
'}${propertyName}
` +\n `
${displayValue(property)}
` +\n '
';\n}\n\nfunction renderLayer(layerId: string) {\n return `
${layerId}
`;\n}\n\nfunction renderProperties(feature: GeoJSONFeatureWithSourceLayer) {\n const sourceProperty = renderLayer(feature.layer['source-layer'] || feature.layer.source);\n const typeProperty = renderProperty('$type', feature.geometry.type);\n const properties = Object.keys(feature.properties).map(propertyName => renderProperty(propertyName, feature.properties[propertyName]));\n return [sourceProperty, typeProperty].concat(properties).join('');\n}\n\nfunction renderFeatures(features: GeoJSONFeatureWithSourceLayer[]) {\n return features.map(ft => `
${renderProperties(ft)}
`).join('');\n}\n\nfunction renderPopup(features: GeoJSONFeatureWithSourceLayer[]) {\n return `
${renderFeatures(features)}
`;\n}\n\nexport default renderPopup;\n","// randomColor by David Merfield under the CC0 license\n// https://github.com/davidmerfield/randomColor/\n\n;(function(root, factory) {\n\n // Support CommonJS\n if (typeof exports === 'object') {\n var randomColor = factory();\n\n // Support NodeJS & Component, which allow module.exports to be a function\n if (typeof module === 'object' && module && module.exports) {\n exports = module.exports = randomColor;\n }\n\n // Support CommonJS 1.1.1 spec\n exports.randomColor = randomColor;\n\n // Support AMD\n } else if (typeof define === 'function' && define.amd) {\n define([], factory);\n\n // Support vanilla script loading\n } else {\n root.randomColor = factory();\n }\n\n}(this, function() {\n\n // Seed to get repeatable colors\n var seed = null;\n\n // Shared color dictionary\n var colorDictionary = {};\n\n // Populate the color dictionary\n loadColorBounds();\n\n // check if a range is taken\n var colorRanges = [];\n\n var randomColor = function (options) {\n\n options = options || {};\n\n // Check if there is a seed and ensure it's an\n // integer. Otherwise, reset the seed value.\n if (options.seed !== undefined && options.seed !== null && options.seed === parseInt(options.seed, 10)) {\n seed = options.seed;\n\n // A string was passed as a seed\n } else if (typeof options.seed === 'string') {\n seed = stringToInteger(options.seed);\n\n // Something was passed as a seed but it wasn't an integer or string\n } else if (options.seed !== undefined && options.seed !== null) {\n throw new TypeError('The seed value must be an integer or string');\n\n // No seed, reset the value outside.\n } else {\n seed = null;\n }\n\n var H,S,B;\n\n // Check if we need to generate multiple colors\n if (options.count !== null && options.count !== undefined) {\n\n var totalColors = options.count,\n colors = [];\n // Value false at index i means the range i is not taken yet.\n for (var i = 0; i < options.count; i++) {\n colorRanges.push(false)\n }\n options.count = null;\n\n while (totalColors > colors.length) {\n\n var color = randomColor(options);\n\n if (seed !== null) {\n options.seed = seed;\n }\n\n colors.push(color);\n }\n\n options.count = totalColors;\n\n return colors;\n }\n\n // First we pick a hue (H)\n H = pickHue(options);\n\n // Then use H to determine saturation (S)\n S = pickSaturation(H, options);\n\n // Then use S and H to determine brightness (B).\n B = pickBrightness(H, S, options);\n\n // Then we return the HSB color in the desired format\n return setFormat([H,S,B], options);\n };\n\n function pickHue(options) {\n if (colorRanges.length > 0) {\n var hueRange = getRealHueRange(options.hue)\n\n var hue = randomWithin(hueRange)\n\n //Each of colorRanges.length ranges has a length equal approximatelly one step\n var step = (hueRange[1] - hueRange[0]) / colorRanges.length\n\n var j = parseInt((hue - hueRange[0]) / step)\n\n //Check if the range j is taken\n if (colorRanges[j] === true) {\n j = (j + 2) % colorRanges.length\n }\n else {\n colorRanges[j] = true\n }\n\n var min = (hueRange[0] + j * step) % 359,\n max = (hueRange[0] + (j + 1) * step) % 359;\n\n hueRange = [min, max]\n\n hue = randomWithin(hueRange)\n\n if (hue < 0) {hue = 360 + hue;}\n return hue\n }\n else {\n var hueRange = getHueRange(options.hue)\n\n hue = randomWithin(hueRange);\n // Instead of storing red as two seperate ranges,\n // we group them, using negative numbers\n if (hue < 0) {\n hue = 360 + hue;\n }\n\n return hue;\n }\n }\n\n function pickSaturation (hue, options) {\n\n if (options.hue === 'monochrome') {\n return 0;\n }\n\n if (options.luminosity === 'random') {\n return randomWithin([0,100]);\n }\n\n var saturationRange = getSaturationRange(hue);\n\n var sMin = saturationRange[0],\n sMax = saturationRange[1];\n\n switch (options.luminosity) {\n\n case 'bright':\n sMin = 55;\n break;\n\n case 'dark':\n sMin = sMax - 10;\n break;\n\n case 'light':\n sMax = 55;\n break;\n }\n\n return randomWithin([sMin, sMax]);\n\n }\n\n function pickBrightness (H, S, options) {\n\n var bMin = getMinimumBrightness(H, S),\n bMax = 100;\n\n switch (options.luminosity) {\n\n case 'dark':\n bMax = bMin + 20;\n break;\n\n case 'light':\n bMin = (bMax + bMin)/2;\n break;\n\n case 'random':\n bMin = 0;\n bMax = 100;\n break;\n }\n\n return randomWithin([bMin, bMax]);\n }\n\n function setFormat (hsv, options) {\n\n switch (options.format) {\n\n case 'hsvArray':\n return hsv;\n\n case 'hslArray':\n return HSVtoHSL(hsv);\n\n case 'hsl':\n var hsl = HSVtoHSL(hsv);\n return 'hsl('+hsl[0]+', '+hsl[1]+'%, '+hsl[2]+'%)';\n\n case 'hsla':\n var hslColor = HSVtoHSL(hsv);\n var alpha = options.alpha || Math.random();\n return 'hsla('+hslColor[0]+', '+hslColor[1]+'%, '+hslColor[2]+'%, ' + alpha + ')';\n\n case 'rgbArray':\n return HSVtoRGB(hsv);\n\n case 'rgb':\n var rgb = HSVtoRGB(hsv);\n return 'rgb(' + rgb.join(', ') + ')';\n\n case 'rgba':\n var rgbColor = HSVtoRGB(hsv);\n var alpha = options.alpha || Math.random();\n return 'rgba(' + rgbColor.join(', ') + ', ' + alpha + ')';\n\n default:\n return HSVtoHex(hsv);\n }\n\n }\n\n function getMinimumBrightness(H, S) {\n\n var lowerBounds = getColorInfo(H).lowerBounds;\n\n for (var i = 0; i < lowerBounds.length - 1; i++) {\n\n var s1 = lowerBounds[i][0],\n v1 = lowerBounds[i][1];\n\n var s2 = lowerBounds[i+1][0],\n v2 = lowerBounds[i+1][1];\n\n if (S >= s1 && S <= s2) {\n\n var m = (v2 - v1)/(s2 - s1),\n b = v1 - m*s1;\n\n return m*S + b;\n }\n\n }\n\n return 0;\n }\n\n function getHueRange (colorInput) {\n\n if (typeof parseInt(colorInput) === 'number') {\n\n var number = parseInt(colorInput);\n\n if (number < 360 && number > 0) {\n return [number, number];\n }\n\n }\n\n if (typeof colorInput === 'string') {\n\n if (colorDictionary[colorInput]) {\n var color = colorDictionary[colorInput];\n if (color.hueRange) {return color.hueRange;}\n } else if (colorInput.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)) {\n var hue = HexToHSB(colorInput)[0];\n return [ hue, hue ];\n }\n }\n\n return [0,360];\n\n }\n\n function getSaturationRange (hue) {\n return getColorInfo(hue).saturationRange;\n }\n\n function getColorInfo (hue) {\n\n // Maps red colors to make picking hue easier\n if (hue >= 334 && hue <= 360) {\n hue-= 360;\n }\n\n for (var colorName in colorDictionary) {\n var color = colorDictionary[colorName];\n if (color.hueRange &&\n hue >= color.hueRange[0] &&\n hue <= color.hueRange[1]) {\n return colorDictionary[colorName];\n }\n } return 'Color not found';\n }\n\n function randomWithin (range) {\n if (seed === null) {\n //generate random evenly destinct number from : https://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/\n var golden_ratio = 0.618033988749895\n var r=Math.random()\n r += golden_ratio\n r %= 1\n return Math.floor(range[0] + r*(range[1] + 1 - range[0]));\n } else {\n //Seeded random algorithm from http://indiegamr.com/generate-repeatable-random-numbers-in-js/\n var max = range[1] || 1;\n var min = range[0] || 0;\n seed = (seed * 9301 + 49297) % 233280;\n var rnd = seed / 233280.0;\n return Math.floor(min + rnd * (max - min));\n}\n }\n\n function HSVtoHex (hsv){\n\n var rgb = HSVtoRGB(hsv);\n\n function componentToHex(c) {\n var hex = c.toString(16);\n return hex.length == 1 ? '0' + hex : hex;\n }\n\n var hex = '#' + componentToHex(rgb[0]) + componentToHex(rgb[1]) + componentToHex(rgb[2]);\n\n return hex;\n\n }\n\n function defineColor (name, hueRange, lowerBounds) {\n\n var sMin = lowerBounds[0][0],\n sMax = lowerBounds[lowerBounds.length - 1][0],\n\n bMin = lowerBounds[lowerBounds.length - 1][1],\n bMax = lowerBounds[0][1];\n\n colorDictionary[name] = {\n hueRange: hueRange,\n lowerBounds: lowerBounds,\n saturationRange: [sMin, sMax],\n brightnessRange: [bMin, bMax]\n };\n\n }\n\n function loadColorBounds () {\n\n defineColor(\n 'monochrome',\n null,\n [[0,0],[100,0]]\n );\n\n defineColor(\n 'red',\n [-26,18],\n [[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]\n );\n\n defineColor(\n 'orange',\n [18,46],\n [[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]\n );\n\n defineColor(\n 'yellow',\n [46,62],\n [[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]\n );\n\n defineColor(\n 'green',\n [62,178],\n [[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]\n );\n\n defineColor(\n 'blue',\n [178, 257],\n [[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]\n );\n\n defineColor(\n 'purple',\n [257, 282],\n [[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]\n );\n\n defineColor(\n 'pink',\n [282, 334],\n [[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]\n );\n\n }\n\n function HSVtoRGB (hsv) {\n\n // this doesn't work for the values of 0 and 360\n // here's the hacky fix\n var h = hsv[0];\n if (h === 0) {h = 1;}\n if (h === 360) {h = 359;}\n\n // Rebase the h,s,v values\n h = h/360;\n var s = hsv[1]/100,\n v = hsv[2]/100;\n\n var h_i = Math.floor(h*6),\n f = h * 6 - h_i,\n p = v * (1 - s),\n q = v * (1 - f*s),\n t = v * (1 - (1 - f)*s),\n r = 256,\n g = 256,\n b = 256;\n\n switch(h_i) {\n case 0: r = v; g = t; b = p; break;\n case 1: r = q; g = v; b = p; break;\n case 2: r = p; g = v; b = t; break;\n case 3: r = p; g = q; b = v; break;\n case 4: r = t; g = p; b = v; break;\n case 5: r = v; g = p; b = q; break;\n }\n\n var result = [Math.floor(r*255), Math.floor(g*255), Math.floor(b*255)];\n return result;\n }\n\n function HexToHSB (hex) {\n hex = hex.replace(/^#/, '');\n hex = hex.length === 3 ? hex.replace(/(.)/g, '$1$1') : hex;\n\n var red = parseInt(hex.substr(0, 2), 16) / 255,\n green = parseInt(hex.substr(2, 2), 16) / 255,\n blue = parseInt(hex.substr(4, 2), 16) / 255;\n\n var cMax = Math.max(red, green, blue),\n delta = cMax - Math.min(red, green, blue),\n saturation = cMax ? (delta / cMax) : 0;\n\n switch (cMax) {\n case red: return [ 60 * (((green - blue) / delta) % 6) || 0, saturation, cMax ];\n case green: return [ 60 * (((blue - red) / delta) + 2) || 0, saturation, cMax ];\n case blue: return [ 60 * (((red - green) / delta) + 4) || 0, saturation, cMax ];\n }\n }\n\n function HSVtoHSL (hsv) {\n var h = hsv[0],\n s = hsv[1]/100,\n v = hsv[2]/100,\n k = (2-s)*v;\n\n return [\n h,\n Math.round(s*v / (k<1 ? k : 2-k) * 10000) / 100,\n k/2 * 100\n ];\n }\n\n function stringToInteger (string) {\n var total = 0\n for (var i = 0; i !== string.length; i++) {\n if (total >= Number.MAX_SAFE_INTEGER) break;\n total += string.charCodeAt(i)\n }\n return total\n }\n\n // get The range of given hue when options.count!=0\n function getRealHueRange(colorHue)\n { if (!isNaN(colorHue)) {\n var number = parseInt(colorHue);\n\n if (number < 360 && number > 0) {\n return getColorInfo(colorHue).hueRange\n }\n }\n else if (typeof colorHue === 'string') {\n\n if (colorDictionary[colorHue]) {\n var color = colorDictionary[colorHue];\n\n if (color.hueRange) {\n return color.hueRange\n }\n } else if (colorHue.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)) {\n var hue = HexToHSB(colorHue)[0]\n return getColorInfo(hue).hueRange\n }\n }\n\n return [0,360]\n}\n return randomColor;\n}));\n","import randomColor from 'randomcolor';\n\n/**\n * Assign a color to a unique layer ID and also considering\n * common layer names such as water or wood.\n * @param layerId - a layer ID\n * @param alpha - alpha value for the color, default is 1\n * @return a color in rgba string format\n */\nfunction brightColor(layerId: string, alpha?: number) {\n let luminosity: NonNullable[0]>[\"luminosity\"] = 'bright';\n let hue: NonNullable[0]>[\"hue\"] = undefined;\n\n if (/water|ocean|lake|sea|river/.test(layerId)) {\n hue = 'blue';\n }\n\n if (/state|country|place/.test(layerId)) {\n hue = 'pink';\n }\n\n if (/road|highway|transport|streets/.test(layerId)) {\n hue = 'orange';\n }\n\n if (/contour|building|earth/.test(layerId)) {\n hue = 'monochrome';\n }\n\n if (/building/.test(layerId)) {\n luminosity = 'dark';\n }\n\n if (/earth/.test(layerId)) {\n luminosity = 'light';\n }\n\n if (/contour|landuse/.test(layerId)) {\n hue = 'yellow';\n }\n\n if (/wood|forest|park|landcover|land|natural/.test(layerId)) {\n hue = 'green';\n }\n\n const rgb = randomColor({\n luminosity,\n hue,\n seed: layerId,\n format: 'rgbArray'\n }) as unknown as string[];\n\n return `rgba(${rgb.join(', ')}, ${alpha || \"1\"})`;\n}\n\nexport default { brightColor };\n","import isEqual from 'lodash.isequal';\nimport stylegen from './stylegen';\nimport InspectButton from './InspectButton';\nimport renderPopup, { GeoJSONFeatureWithSourceLayer } from './renderPopup';\nimport colors from './colors';\nimport type { IControl, LayerSpecification, Map, MapMouseEvent, MapSourceDataEvent, PointLike, Popup, QueryRenderedFeaturesOptions, StyleSpecification } from 'maplibre-gl';\n\ntype InspectStyleSpecification = StyleSpecification & { metadata: { 'maplibregl-inspect:inspect': boolean } };\n\nfunction isInspectStyle(style: InspectStyleSpecification) {\n return style.metadata && style.metadata['maplibregl-inspect:inspect'];\n}\n\nfunction markInspectStyle(style: StyleSpecification) {\n return Object.assign(style, {\n metadata: Object.assign({}, style.metadata, {\n 'maplibregl-inspect:inspect': true\n })\n });\n}\n\n/** \n * This is the main type for the available options for MapLibre Inspect\n */\nexport type MaplibreInspectOptions = {\n /**\n * Show the inspect map\n * @default false\n */\n showInspectMap?: boolean;\n /**\n * Show the inspect button\n * @default true\n */\n showInspectButton?: boolean;\n /**\n * Show the map popup\n * @default false\n */\n showMapPopup?: boolean;\n /**\n * Show the map popup on hover\n * @default true\n */\n showMapPopupOnHover?: boolean;\n /**\n * Show the inspect map popup\n * @default true\n */\n showInspectMapPopup?: boolean;\n /**\n * Show the inspect map popup on hover\n * @default true\n */\n showInspectMapPopupOnHover?: boolean;\n /**\n * Block hover popup on click\n * @default false\n */\n blockHoverPopupOnClick?: boolean;\n /**\n * Background color for the inspect map\n * @default '#fff'\n */\n backgroundColor?: string;\n assignLayerColor?: (layerId: string, alpha: number) => string;\n buildInspectStyle?: (originalMapStyle: StyleSpecification, coloredLayers: LayerSpecification[], opts: {backgroundColor?: string}) => StyleSpecification;\n renderPopup?: (features: GeoJSONFeatureWithSourceLayer[]) => string | HTMLElement;\n /**\n * Maplibre GL Popup\n */\n popup?: Popup;\n /**\n * Select threshold\n * @default 5\n */\n selectThreshold?: number;\n /**\n * Use inspect style\n * @default true\n */\n useInspectStyle?: boolean;\n /**\n * Query parameters for querying rendered features\n */\n queryParameters?: QueryRenderedFeaturesOptions;\n /**\n * Sources to be used for inspecting, setting this will disable the automatic source detection.\n * This is a dictionary containing the source IDs and their vector layer IDs\n */\n sources?: {[key: string]: string[]};\n /**\n * Callback for toggling the inspect map\n */\n toggleCallback?: (showInspectMap: boolean) => void;\n};\n\n/**\n * Maplibre Inspect Control\n */\nclass MaplibreInspect implements IControl {\n options: Required;\n sources: {[key: string]: string[]};\n assignLayerColor: (layerId: string, alpha: number) => string;\n /**\n * @hidden\n */\n _popup: Popup;\n /**\n * @hidden\n */\n _popupBlocked: boolean;\n /**\n * @hidden\n */\n _showInspectMap: boolean;\n /**\n * @hidden\n */\n _originalStyle: StyleSpecification | undefined;\n /**\n * @hidden\n */\n _toggle: InspectButton;\n /**\n * @hidden\n */\n _map: Map | undefined;\n\n constructor(options: MaplibreInspectOptions) {\n if (!(this instanceof MaplibreInspect)) {\n throw new Error('MaplibreInspect needs to be called with the new keyword');\n }\n\n let popup = null;\n if (window.maplibregl) {\n popup = new window.maplibregl.Popup({\n closeButton: false,\n closeOnClick: false\n });\n } else if (!options.popup) {\n console.error('Maplibre GL JS can not be found. Make sure to include it or pass an initialized MaplibreGL Popup to MaplibreInspect if you are using moduleis.');\n }\n\n this.options = Object.assign({\n showInspectMap: false,\n showInspectButton: true,\n showInspectMapPopup: true,\n showMapPopup: false,\n showMapPopupOnHover: true,\n showInspectMapPopupOnHover: true,\n blockHoverPopupOnClick: false,\n backgroundColor: '#fff',\n assignLayerColor: colors.brightColor,\n buildInspectStyle: stylegen.generateInspectStyle,\n renderPopup,\n popup,\n selectThreshold: 5,\n useInspectStyle: true,\n queryParameters: {},\n sources: {},\n toggleCallback() {},\n manageStyleOutside: false\n }, options);\n\n this.sources = this.options.sources;\n this.assignLayerColor = this.options.assignLayerColor;\n this._popup = this.options.popup;\n this._popupBlocked = false;\n this._showInspectMap = this.options.showInspectMap;\n\n this._toggle = new InspectButton({\n show: this.options.showInspectButton,\n onToggle: () => this.toggleInspector()\n });\n }\n\n public toggleInspector() {\n this._showInspectMap = !this._showInspectMap;\n this._popupBlocked = false;\n this.options.toggleCallback(this._showInspectMap);\n this.render();\n }\n\n public _inspectStyle() {\n const coloredLayers = stylegen.generateColoredLayers(this.sources, this.assignLayerColor);\n return this.options.buildInspectStyle(this._map!.getStyle(), coloredLayers, {\n backgroundColor: this.options.backgroundColor\n });\n }\n\n public render() {\n if (this._showInspectMap) {\n if (this.options.useInspectStyle) {\n this._map!.setStyle(markInspectStyle(this._inspectStyle()));\n }\n this._toggle.setMapIcon();\n } else if (this._originalStyle) {\n if (this._popup) this._popup.remove();\n if (this.options.useInspectStyle) {\n this._map!.setStyle(this._originalStyle);\n }\n this._toggle.setInspectIcon();\n }\n }\n\n private _setSourcesFromMap() {\n //NOTE: This heavily depends on the internal API of Maplibre GL\n //so this breaks between Maplibre GL JS releases\n const mapStyleSourcesNames = Object.keys(this._map!.getStyle().sources);\n Object.keys(this._map!.style.sourceCaches).forEach((sourceId) => {\n const sourceCache = this._map!.style.sourceCaches[sourceId] || {_source: {}};\n const layerIds = sourceCache._source.vectorLayerIds;\n if (layerIds) {\n this.sources[sourceId] = layerIds;\n } else if (sourceCache._source.type === 'geojson') {\n this.sources[sourceId] = [];\n }\n });\n\n Object.keys(this.sources).forEach((sourceId) => {\n if (mapStyleSourcesNames.indexOf(sourceId) === -1) {\n delete this.sources[sourceId];\n }\n });\n }\n\n public _onSourceChange = (e: MapSourceDataEvent) => {\n if (e.sourceDataType === 'visibility' || !e.isSourceLoaded) {\n return;\n }\n const previousSources = Object.assign({}, this.sources); \n this._setSourcesFromMap();\n\n if (!isEqual(previousSources, this.sources) && Object.keys(this.sources).length > 0) {\n // If the sources have changed, we need to re-render the inspect style but not too fast\n setTimeout(() => this.render(), 1000);\n }\n };\n\n /**\n * This will set the original style of the map\n * It will also update the sources assuming the map has already been loaded\n * @param style - The original style\n */\n public setOriginalStyle(style: StyleSpecification) {\n this._originalStyle = style;\n this._setSourcesFromMap();\n }\n\n public _onStyleChange = () => {\n const style = this._map!.getStyle();\n if (!isInspectStyle(style as InspectStyleSpecification)) {\n this._originalStyle = style;\n }\n };\n\n public _onRightClick = () => {\n if (!this.options.showMapPopupOnHover && !this.options.showInspectMapPopupOnHover && !this.options.blockHoverPopupOnClick) {\n if (this._popup) this._popup.remove();\n }\n };\n\n public _onMousemove = (e: MapMouseEvent) => {\n if (this._showInspectMap) {\n if (!this.options.showInspectMapPopup) return;\n if (e.type === 'mousemove' && !this.options.showInspectMapPopupOnHover) return;\n if (e.type === 'click' && this.options.showInspectMapPopupOnHover && this.options.blockHoverPopupOnClick) {\n this._popupBlocked = !this._popupBlocked;\n }\n } else {\n if (!this.options.showMapPopup) return;\n if (e.type === 'mousemove' && !this.options.showMapPopupOnHover) return;\n if (e.type === 'click' && this.options.showMapPopupOnHover && this.options.blockHoverPopupOnClick) {\n this._popupBlocked = !this._popupBlocked;\n }\n }\n\n if (!this._popupBlocked && this._popup) {\n let queryBox: PointLike | [PointLike, PointLike];\n if (this.options.selectThreshold === 0) {\n queryBox = e.point;\n } else {\n // set a bbox around the pointer\n queryBox = [\n [\n e.point.x - this.options.selectThreshold,\n e.point.y + this.options.selectThreshold\n ], // bottom left (SW)\n [\n e.point.x + this.options.selectThreshold,\n e.point.y - this.options.selectThreshold\n ] // top right (NE)\n ];\n }\n\n const features = this._map!.queryRenderedFeatures(queryBox, this.options.queryParameters) || [];\n this._map!.getCanvas().style.cursor = (features.length) ? 'pointer' : '';\n if (!features.length) {\n this._popup.remove();\n } else {\n this._popup.setLngLat(e.lngLat);\n\n const renderedPopup = this.options.renderPopup(features);\n\n if (typeof renderedPopup === 'string') {\n this._popup.setHTML(renderedPopup);\n } else {\n this._popup.setDOMContent(renderedPopup);\n }\n\n this._popup.addTo(this._map!);\n }\n }\n };\n\n public onAdd(map: Map) {\n this._map = map;\n\n // if sources have already been passed as options\n // we do not need to figure out the sources ourselves\n if (Object.keys(this.sources).length === 0) {\n map.on('tiledata', this._onSourceChange);\n map.on('sourcedata', this._onSourceChange);\n }\n\n map.on('styledata', this._onStyleChange);\n map.on('load', this._onStyleChange);\n map.on('mousemove', this._onMousemove);\n map.on('click', this._onMousemove);\n map.on('contextmenu', this._onRightClick);\n return this._toggle.elem;\n }\n\n public onRemove() {\n this._map!.off('styledata', this._onStyleChange);\n this._map!.off('load', this._onStyleChange);\n this._map!.off('tiledata', this._onSourceChange);\n this._map!.off('sourcedata', this._onSourceChange);\n this._map!.off('mousemove', this._onMousemove);\n this._map!.off('click', this._onMousemove);\n this._map!.off('contextmenu', this._onRightClick);\n\n const elem = this._toggle.elem;\n elem.parentNode!.removeChild(elem);\n this._map = undefined;\n }\n}\nexport default MaplibreInspect;\n"],"names":["global","this"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;CASA;EACA,IAAI,gBAAgB,GAAG,GAAG,CAAC;AAC3B;CACA;EACA,IAAI,cAAc,GAAG,2BAA2B,CAAC;AACjD;CACA;EACA,IAAI,oBAAoB,GAAG,CAAC;MACxB,sBAAsB,GAAG,CAAC,CAAC;AAC/B;CACA;EACA,IAAI,gBAAgB,GAAG,gBAAgB,CAAC;AACxC;CACA;EACA,IAAI,OAAO,GAAG,oBAAoB;MAC9B,QAAQ,GAAG,gBAAgB;MAC3B,QAAQ,GAAG,wBAAwB;MACnC,OAAO,GAAG,kBAAkB;MAC5B,OAAO,GAAG,eAAe;MACzB,QAAQ,GAAG,gBAAgB;MAC3B,OAAO,GAAG,mBAAmB;MAC7B,MAAM,GAAG,4BAA4B;MACrC,MAAM,GAAG,cAAc;MACvB,SAAS,GAAG,iBAAiB;MAC7B,OAAO,GAAG,eAAe;MACzB,SAAS,GAAG,iBAAiB;MAC7B,UAAU,GAAG,kBAAkB;MAC/B,QAAQ,GAAG,gBAAgB;MAC3B,SAAS,GAAG,iBAAiB;MAC7B,MAAM,GAAG,cAAc;MACvB,SAAS,GAAG,iBAAiB;MAC7B,SAAS,GAAG,iBAAiB;MAC7B,YAAY,GAAG,oBAAoB;MACnC,UAAU,GAAG,kBAAkB,CAAC;AACpC;EACA,IAAI,cAAc,GAAG,sBAAsB;MACvC,WAAW,GAAG,mBAAmB;MACjC,UAAU,GAAG,uBAAuB;MACpC,UAAU,GAAG,uBAAuB;MACpC,OAAO,GAAG,oBAAoB;MAC9B,QAAQ,GAAG,qBAAqB;MAChC,QAAQ,GAAG,qBAAqB;MAChC,QAAQ,GAAG,qBAAqB;MAChC,eAAe,GAAG,4BAA4B;MAC9C,SAAS,GAAG,sBAAsB;MAClC,SAAS,GAAG,sBAAsB,CAAC;AACvC;CACA;CACA;CACA;CACA;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,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC;MAChE,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;CAChD,EAAC,CAAC;AACF;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,CAAA,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;AAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACA,SAAS,WAAW,CAAC,KAAK,EAAE;CAC5B,GAAE,OAAO,KAAK,IAAI,IAAI,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;GACtE;AACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,CAAA,IAAI,QAAQ,GAAG,cAAc,IAAI,SAAS,CAAC;AAC3C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,CAAA,SAAS,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE;CAC/B,GAAE,OAAO,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;GAClC;AACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACA,SAAS,UAAU,CAAC,KAAK,EAAE;CAC3B,GAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;MACpB,OAAO,KAAK,CAAC;KACd;CACH;CACA;CACA,GAAE,IAAI,GAAG,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;CAC9B,GAAE,OAAO,GAAG,IAAI,OAAO,IAAI,GAAG,IAAI,MAAM,IAAI,GAAG,IAAI,QAAQ,IAAI,GAAG,IAAI,QAAQ,CAAC;GAC9E;AACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACA,SAAS,QAAQ,CAAC,KAAK,EAAE;CACzB,GAAE,OAAO,OAAO,KAAK,IAAI,QAAQ;CACjC,KAAI,KAAK,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,gBAAgB,CAAC;GAC7D;AACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACA,SAAS,QAAQ,CAAC,KAAK,EAAE;CACzB,GAAE,IAAI,IAAI,GAAG,OAAO,KAAK,CAAC;CAC1B,GAAE,OAAO,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,QAAQ,IAAI,IAAI,IAAI,UAAU,CAAC,CAAC;GAClE;AACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACA,SAAS,YAAY,CAAC,KAAK,EAAE;IAC3B,OAAO,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,IAAI,QAAQ,CAAC;GAClD;AACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACA,IAAI,YAAY,GAAG,gBAAgB,GAAG,SAAS,CAAC,gBAAgB,CAAC,GAAG,gBAAgB,CAAC;AACrF;CACA;CACA;CACA;CACA;CACA;CACA;CACA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;SACjD,IAAI,CAAC,IAAK,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;SAC5C,IAAI,CAAC,IAAK,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;SACjD,IAAI,CAAC,IAAK,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;SACnD,IAAI,CAAC,IAAK,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;SAC/C,IAAI,CAAC,IAAK,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;SAC3C,IAAI,CAAC,IAAK,CAAC,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;CAElD,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;CAC/B,QAAA,IAAI,CAAC,UAAW,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;CACnC,QAAA,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;MACvB;CACF;;;;;;;;","x_google_ignoreList":[0,4]} \ No newline at end of file diff --git a/public/resources/maplibre-gl-inspect.min.js b/public/resources/maplibre-gl-inspect.min.js deleted file mode 100644 index e5435ca..0000000 --- a/public/resources/maplibre-gl-inspect.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).MaplibreInspect=t()}(function(){return function r(o,i,s){function a(e,t){if(!i[e]){if(!o[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(c)return c(e,!0);throw(t=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",t}n=i[e]={exports:{}},o[e][0].call(n.exports,function(t){return a(o[e][1][t]||t)},n,n.exports,r,o,i,s)}return i[e].exports}for(var c="function"==typeof require&&require,t=0;t{var e=o.style.sourceCaches[t]||{_source:{}},n=e._source.vectorLayerIds;n?r[t]=n:"geojson"===e._source.type&&(r[t]=[])}),Object.keys(r).forEach(t=>{-1===n.indexOf(t)&&delete r[t]}),!i(e,r))&&0
${t}
`+`
${t=e,null==t?t:t instanceof Date?t.toLocaleString():"object"==typeof t||"number"==typeof t||"string"==typeof t?t.toString():t}
`+""}function r(t){return t.map(t=>{return`
${e=t,t=`
${e.layer["source-layer"]||e.layer.source}
`,n=o("$type",e.geometry.type),r=Object.keys(e.properties).map(t=>o(t,e.properties[t])),[t,n].concat(r).join("")}
`;var e,n,r}).join("")}e.exports=function(t){return`
${r(t)}
`}},{}],6:[function(t,e,n){function a(t,e,n){e={id:[e,n,"circle"].join("_"),source:e,type:"circle",paint:{"circle-color":t,"circle-radius":2},filter:["==","$type","Point"]};return n&&(e["source-layer"]=n),e}function c(t,e,n,r){n={id:[n,r,"polygon"].join("_"),source:n,type:"fill",paint:{"fill-color":t,"fill-antialias":!0,"fill-outline-color":t},filter:["==","$type","Polygon"]};return r&&(n["source-layer"]=r),n}function u(t,e,n){e={id:[e,n,"line"].join("_"),source:e,layout:{"line-join":"round","line-cap":"round"},type:"line",paint:{"line-color":t},filter:["==","$type","LineString"]};return n&&(e["source-layer"]=n),e}n.polygonLayer=c,n.lineLayer=u,n.circleLayer=a,n.generateInspectStyle=function(n,t,e){e={id:"background",type:"background",paint:{"background-color":(e=Object.assign({backgroundColor:"#fff"},e)).backgroundColor}};const r={};return Object.keys(n.sources).forEach(t=>{var e=n.sources[t];"vector"!==e.type&&"geojson"!==e.type||(r[t]=e)}),Object.assign(n,{layers:[e].concat(t),sources:r})},n.generateColoredLayers=function(e,n){const r=[],o=[],i=[];function s(t){t=n.bind(null,t);return{circle:t(.8),line:t(.6),polygon:t(.3),polygonOutline:t(.6),default:t(1)}}return Object.keys(e).forEach(n=>{var t=e[n];t&&0!==t.length?t.forEach(t=>{var e=s(t);o.push(a(e.circle,n,t)),i.push(u(e.line,n,t)),r.push(c(e.polygon,e.polygonOutline,n,t))}):(t=s(n),o.push(a(t.circle,n)),i.push(u(t.line,n)),r.push(c(t.polygon,t.polygonOutline,n)))}),r.concat(i).concat(o)}},{}],7:[function(t,Bt,Ft){!function($t){!function(){var r="__lodash_hash_undefined__",T=1,J=2,O=9007199254740991,$="[object Arguments]",B="[object Array]",M="[object AsyncFunction]",X="[object Boolean]",K="[object Date]",Q="[object Error]",I="[object Function]",C="[object GeneratorFunction]",F="[object Map]",Y="[object Number]",S="[object Null]",H="[object Object]",A="[object Promise]",P="[object Proxy]",Z="[object RegExp]",N="[object Set]",tt="[object String]",et="[object Symbol]",z="[object Undefined]",n="[object WeakMap]",nt="[object ArrayBuffer]",q="[object DataView]",L=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,e={},t=(e["[object Float32Array]"]=e["[object Float64Array]"]=e["[object Int8Array]"]=e["[object Int16Array]"]=e["[object Int32Array]"]=e["[object Uint8Array]"]=e["[object Uint8ClampedArray]"]=e["[object Uint16Array]"]=e["[object Uint32Array]"]=!0,e[$]=e[B]=e[nt]=e[X]=e[q]=e[K]=e[Q]=e[I]=e[F]=e[Y]=e[H]=e[Z]=e[N]=e[tt]=e[n]=!1,"object"==typeof $t&&$t&&$t.Object===Object&&$t),o="object"==typeof self&&self&&self.Object===Object&&self,o=t||o||Function("return this")(),i="object"==typeof Ft&&Ft&&!Ft.nodeType&&Ft,s=i&&"object"==typeof Bt&&Bt&&!Bt.nodeType&&Bt,s=s&&s.exports===i,a=s&&t.process,i=function(){try{return a&&a.binding&&a.binding("util")}catch(t){}}(),t=i&&i.isTypedArray;function rt(t){var n=-1,r=Array(t.size);return t.forEach(function(t,e){r[++n]=[e,t]}),r}function ot(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}var R,E,i=Array.prototype,c=Function.prototype,u=Object.prototype,l=o["__core-js_shared__"],it=c.toString,D=u.hasOwnProperty,st=(c=/[^.]+$/.exec(l&&l.keys&&l.keys.IE_PROTO||""))?"Symbol(src)_1."+c:"",at=u.toString,ct=RegExp("^"+it.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),l=s?o.Buffer:void 0,c=o.Symbol,ut=o.Uint8Array,lt=u.propertyIsEnumerable,pt=i.splice,p=c?c.toStringTag:void 0,ht=Object.getOwnPropertySymbols,s=l?l.isBuffer:void 0,ft=(R=Object.keys,E=Object,function(t){return R(E(t))}),i=j(o,"DataView"),h=j(o,"Map"),l=j(o,"Promise"),f=j(o,"Set"),o=j(o,"WeakMap"),d=j(Object,"create"),dt=k(i),gt=k(h),yt=k(l),_t=k(f),bt=k(o),c=c?c.prototype:void 0,vt=c?c.valueOf:void 0;function g(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=Number.MAX_SAFE_INTEGER);n++)e+=t.charCodeAt(n);return e}(t.seed);else{if(void 0!==t.seed&&null!==t.seed)throw new TypeError("The seed value must be an integer or string");f=null}var e,n;if(null!==t.count&&void 0!==t.count){for(var r=t.count,o=[],i=0;i=n.hueRange[0]&&t<=n.hueRange[1])return d[e]}return"Color not found"}function _(t){var e,n;return null===f?(e=(Math.random()+.618033988749895)%1,Math.floor(t[0]+e*(t[1]+1-t[0]))):(e=t[1]||1,t=t[0]||0,n=(f=(9301*f+49297)%233280)/233280,Math.floor(t+n*(e-t)))}function t(t,e,n){var r=n[0][0],o=n[n.length-1][0],i=n[n.length-1][1],s=n[0][1];d[t]={hueRange:e,lowerBounds:n,saturationRange:[r,o],brightnessRange:[i,s]}}function b(t){var e=t[0],n=(360===(e=0===e?1:e)&&(e=359),e/=360,t[1]/100),r=t[2]/100,t=Math.floor(6*e),e=6*e-t,o=r*(1-n),i=r*(1-e*n),s=r*(1-(1-e)*n),a=256,c=256,u=256;switch(t){case 0:a=r,c=s,u=o;break;case 1:a=i,c=r,u=o;break;case 2:a=o,c=r,u=s;break;case 3:a=o,c=i,u=r;break;case 4:a=s,c=o,u=r;break;case 5:a=r,c=o,u=i}return[Math.floor(255*a),Math.floor(255*c),Math.floor(255*u)]}function v(t){t=3===(t=t.replace(/^#/,"")).length?t.replace(/(.)/g,"$1$1"):t;var e=parseInt(t.substr(0,2),16)/255,n=parseInt(t.substr(2,2),16)/255,r=parseInt(t.substr(4,2),16)/255,o=Math.max(e,n,r),i=o-Math.min(e,n,r),s=o?i/o:0;switch(o){case e:return[(n-r)/i%6*60||0,s,o];case n:return[60*((r-e)/i+2)||0,s,o];case r:return[60*((e-n)/i+4)||0,s,o]}}function m(t){var e=t[0],n=t[1]/100,t=t[2]/100,r=(2-n)*t;return[e,Math.round(n*t/(r<1?r:2-r)*1e4)/100,r/2*100]}return h},"object"==typeof n?(i=o(),(n="object"==typeof e&&e&&e.exports?e.exports=i:n).randomColor=i):r.randomColor=o()},{}]},{},[1])(1)}); \ No newline at end of file diff --git a/public/templates/data.tmpl b/public/templates/data.tmpl index 06d4938..e2b27de 100644 --- a/public/templates/data.tmpl +++ b/public/templates/data.tmpl @@ -8,7 +8,7 @@ - +