tileserver-gl 5.7.0-pre.0 → 5.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +12 -1
  2. package/docs/config.rst +43 -2
  3. package/docs/usage.rst +2 -1
  4. package/package.json +33 -28
  5. package/public/resources/elevation-control.js +8 -4
  6. package/public/resources/maplibre-gl-inspect.mjs +2286 -0
  7. package/public/resources/maplibre-gl-inspect.mjs.map +1 -0
  8. package/public/resources/maplibre-gl-shared.mjs +6 -0
  9. package/public/resources/maplibre-gl-shared.mjs.map +1 -0
  10. package/public/resources/maplibre-gl-worker.mjs +10 -0
  11. package/public/resources/maplibre-gl-worker.mjs.map +1 -0
  12. package/public/resources/maplibre-gl.css +1 -1
  13. package/public/resources/maplibre-gl.mjs +819 -0
  14. package/public/resources/maplibre-gl.mjs.map +1 -0
  15. package/public/templates/data.tmpl +12 -6
  16. package/public/templates/viewer.tmpl +12 -8
  17. package/src/main.js +53 -7
  18. package/src/render_mode.js +38 -0
  19. package/src/serve_data.js +29 -11
  20. package/src/serve_rendered.js +317 -249
  21. package/src/server.js +10 -10
  22. package/src/utils.js +51 -0
  23. package/test/data_decorator.js +156 -0
  24. package/test/fixtures/data-decorator-async.js +17 -0
  25. package/test/fixtures/data-decorator.js +29 -0
  26. package/test/fixtures/visual/static-512px-path-alignment-2x.png +0 -0
  27. package/test/fixtures/visual/static-marker-low-zoom-large-viewport.png +0 -0
  28. package/test/render_mode.js +48 -0
  29. package/test/sparse.js +411 -0
  30. package/test/static.js +20 -0
  31. package/test/static_images.js +10 -0
  32. package/test/tiles_data_compression.js +145 -0
  33. package/public/resources/maplibre-gl-inspect.js +0 -2934
  34. package/public/resources/maplibre-gl-inspect.js.map +0 -1
  35. package/public/resources/maplibre-gl.js +0 -59
  36. package/public/resources/maplibre-gl.js.map +0 -1
@@ -0,0 +1,2286 @@
1
+ import { Popup } from "maplibre-gl";
2
+ //#region \0rolldown/runtime.js
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
12
+ key = keys[i];
13
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
21
+ value: mod,
22
+ enumerable: true
23
+ }) : target, mod));
24
+ //#endregion
25
+ //#region lib/stylegen.ts
26
+ var import_lodash_isequal = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
27
+ /** Used to stand-in for `undefined` hash values. */
28
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
29
+ /** Used to compose bitmasks for value comparisons. */
30
+ var COMPARE_PARTIAL_FLAG = 1;
31
+ var COMPARE_UNORDERED_FLAG = 2;
32
+ /** Used as references for various `Number` constants. */
33
+ var MAX_SAFE_INTEGER = 9007199254740991;
34
+ /** `Object#toString` result references. */
35
+ var argsTag = "[object Arguments]";
36
+ var arrayTag = "[object Array]";
37
+ var asyncTag = "[object AsyncFunction]";
38
+ var boolTag = "[object Boolean]";
39
+ var dateTag = "[object Date]";
40
+ var errorTag = "[object Error]";
41
+ var funcTag = "[object Function]";
42
+ var genTag = "[object GeneratorFunction]";
43
+ var mapTag = "[object Map]";
44
+ var numberTag = "[object Number]";
45
+ var nullTag = "[object Null]";
46
+ var objectTag = "[object Object]";
47
+ var promiseTag = "[object Promise]";
48
+ var proxyTag = "[object Proxy]";
49
+ var regexpTag = "[object RegExp]";
50
+ var setTag = "[object Set]";
51
+ var stringTag = "[object String]";
52
+ var symbolTag = "[object Symbol]";
53
+ var undefinedTag = "[object Undefined]";
54
+ var weakMapTag = "[object WeakMap]";
55
+ var arrayBufferTag = "[object ArrayBuffer]";
56
+ var dataViewTag = "[object DataView]";
57
+ var float32Tag = "[object Float32Array]";
58
+ var float64Tag = "[object Float64Array]";
59
+ var int8Tag = "[object Int8Array]";
60
+ var int16Tag = "[object Int16Array]";
61
+ var int32Tag = "[object Int32Array]";
62
+ var uint8Tag = "[object Uint8Array]";
63
+ var uint8ClampedTag = "[object Uint8ClampedArray]";
64
+ var uint16Tag = "[object Uint16Array]";
65
+ var uint32Tag = "[object Uint32Array]";
66
+ /**
67
+ * Used to match `RegExp`
68
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
69
+ */
70
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
71
+ /** Used to detect host constructors (Safari). */
72
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
73
+ /** Used to detect unsigned integer values. */
74
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
75
+ /** Used to identify `toStringTag` values of typed arrays. */
76
+ var typedArrayTags = {};
77
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
78
+ 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;
79
+ /** Detect free variable `global` from Node.js. */
80
+ var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
81
+ /** Detect free variable `self`. */
82
+ var freeSelf = typeof self == "object" && self && self.Object === Object && self;
83
+ /** Used as a reference to the global object. */
84
+ var root = freeGlobal || freeSelf || Function("return this")();
85
+ /** Detect free variable `exports`. */
86
+ var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
87
+ /** Detect free variable `module`. */
88
+ var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
89
+ /** Detect the popular CommonJS extension `module.exports`. */
90
+ var moduleExports = freeModule && freeModule.exports === freeExports;
91
+ /** Detect free variable `process` from Node.js. */
92
+ var freeProcess = moduleExports && freeGlobal.process;
93
+ /** Used to access faster Node.js helpers. */
94
+ var nodeUtil = function() {
95
+ try {
96
+ return freeProcess && freeProcess.binding && freeProcess.binding("util");
97
+ } catch (e) {}
98
+ }();
99
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
100
+ /**
101
+ * A specialized version of `_.filter` for arrays without support for
102
+ * iteratee shorthands.
103
+ *
104
+ * @private
105
+ * @param {Array} [array] The array to iterate over.
106
+ * @param {Function} predicate The function invoked per iteration.
107
+ * @returns {Array} Returns the new filtered array.
108
+ */
109
+ function arrayFilter(array, predicate) {
110
+ var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
111
+ while (++index < length) {
112
+ var value = array[index];
113
+ if (predicate(value, index, array)) result[resIndex++] = value;
114
+ }
115
+ return result;
116
+ }
117
+ /**
118
+ * Appends the elements of `values` to `array`.
119
+ *
120
+ * @private
121
+ * @param {Array} array The array to modify.
122
+ * @param {Array} values The values to append.
123
+ * @returns {Array} Returns `array`.
124
+ */
125
+ function arrayPush(array, values) {
126
+ var index = -1, length = values.length, offset = array.length;
127
+ while (++index < length) array[offset + index] = values[index];
128
+ return array;
129
+ }
130
+ /**
131
+ * A specialized version of `_.some` for arrays without support for iteratee
132
+ * shorthands.
133
+ *
134
+ * @private
135
+ * @param {Array} [array] The array to iterate over.
136
+ * @param {Function} predicate The function invoked per iteration.
137
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
138
+ * else `false`.
139
+ */
140
+ function arraySome(array, predicate) {
141
+ var index = -1, length = array == null ? 0 : array.length;
142
+ while (++index < length) if (predicate(array[index], index, array)) return true;
143
+ return false;
144
+ }
145
+ /**
146
+ * The base implementation of `_.times` without support for iteratee shorthands
147
+ * or max array length checks.
148
+ *
149
+ * @private
150
+ * @param {number} n The number of times to invoke `iteratee`.
151
+ * @param {Function} iteratee The function invoked per iteration.
152
+ * @returns {Array} Returns the array of results.
153
+ */
154
+ function baseTimes(n, iteratee) {
155
+ var index = -1, result = Array(n);
156
+ while (++index < n) result[index] = iteratee(index);
157
+ return result;
158
+ }
159
+ /**
160
+ * The base implementation of `_.unary` without support for storing metadata.
161
+ *
162
+ * @private
163
+ * @param {Function} func The function to cap arguments for.
164
+ * @returns {Function} Returns the new capped function.
165
+ */
166
+ function baseUnary(func) {
167
+ return function(value) {
168
+ return func(value);
169
+ };
170
+ }
171
+ /**
172
+ * Checks if a `cache` value for `key` exists.
173
+ *
174
+ * @private
175
+ * @param {Object} cache The cache to query.
176
+ * @param {string} key The key of the entry to check.
177
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
178
+ */
179
+ function cacheHas(cache, key) {
180
+ return cache.has(key);
181
+ }
182
+ /**
183
+ * Gets the value at `key` of `object`.
184
+ *
185
+ * @private
186
+ * @param {Object} [object] The object to query.
187
+ * @param {string} key The key of the property to get.
188
+ * @returns {*} Returns the property value.
189
+ */
190
+ function getValue(object, key) {
191
+ return object == null ? void 0 : object[key];
192
+ }
193
+ /**
194
+ * Converts `map` to its key-value pairs.
195
+ *
196
+ * @private
197
+ * @param {Object} map The map to convert.
198
+ * @returns {Array} Returns the key-value pairs.
199
+ */
200
+ function mapToArray(map) {
201
+ var index = -1, result = Array(map.size);
202
+ map.forEach(function(value, key) {
203
+ result[++index] = [key, value];
204
+ });
205
+ return result;
206
+ }
207
+ /**
208
+ * Creates a unary function that invokes `func` with its argument transformed.
209
+ *
210
+ * @private
211
+ * @param {Function} func The function to wrap.
212
+ * @param {Function} transform The argument transform.
213
+ * @returns {Function} Returns the new function.
214
+ */
215
+ function overArg(func, transform) {
216
+ return function(arg) {
217
+ return func(transform(arg));
218
+ };
219
+ }
220
+ /**
221
+ * Converts `set` to an array of its values.
222
+ *
223
+ * @private
224
+ * @param {Object} set The set to convert.
225
+ * @returns {Array} Returns the values.
226
+ */
227
+ function setToArray(set) {
228
+ var index = -1, result = Array(set.size);
229
+ set.forEach(function(value) {
230
+ result[++index] = value;
231
+ });
232
+ return result;
233
+ }
234
+ /** Used for built-in method references. */
235
+ var arrayProto = Array.prototype;
236
+ var funcProto = Function.prototype;
237
+ var objectProto = Object.prototype;
238
+ /** Used to detect overreaching core-js shims. */
239
+ var coreJsData = root["__core-js_shared__"];
240
+ /** Used to resolve the decompiled source of functions. */
241
+ var funcToString = funcProto.toString;
242
+ /** Used to check objects for own properties. */
243
+ var hasOwnProperty = objectProto.hasOwnProperty;
244
+ /** Used to detect methods masquerading as native. */
245
+ var maskSrcKey = function() {
246
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
247
+ return uid ? "Symbol(src)_1." + uid : "";
248
+ }();
249
+ /**
250
+ * Used to resolve the
251
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
252
+ * of values.
253
+ */
254
+ var nativeObjectToString = objectProto.toString;
255
+ /** Used to detect if a method is native. */
256
+ var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
257
+ /** Built-in value references. */
258
+ var Buffer = moduleExports ? root.Buffer : void 0;
259
+ var Symbol = root.Symbol;
260
+ var Uint8Array = root.Uint8Array;
261
+ var propertyIsEnumerable = objectProto.propertyIsEnumerable;
262
+ var splice = arrayProto.splice;
263
+ var symToStringTag = Symbol ? Symbol.toStringTag : void 0;
264
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
265
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0;
266
+ var nativeKeys = overArg(Object.keys, Object);
267
+ var DataView = getNative(root, "DataView");
268
+ var Map = getNative(root, "Map");
269
+ var Promise = getNative(root, "Promise");
270
+ var Set = getNative(root, "Set");
271
+ var WeakMap = getNative(root, "WeakMap");
272
+ var nativeCreate = getNative(Object, "create");
273
+ /** Used to detect maps, sets, and weakmaps. */
274
+ var dataViewCtorString = toSource(DataView);
275
+ var mapCtorString = toSource(Map);
276
+ var promiseCtorString = toSource(Promise);
277
+ var setCtorString = toSource(Set);
278
+ var weakMapCtorString = toSource(WeakMap);
279
+ /** Used to convert symbols to primitives and strings. */
280
+ var symbolProto = Symbol ? Symbol.prototype : void 0;
281
+ var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
282
+ /**
283
+ * Creates a hash object.
284
+ *
285
+ * @private
286
+ * @constructor
287
+ * @param {Array} [entries] The key-value pairs to cache.
288
+ */
289
+ function Hash(entries) {
290
+ var index = -1, length = entries == null ? 0 : entries.length;
291
+ this.clear();
292
+ while (++index < length) {
293
+ var entry = entries[index];
294
+ this.set(entry[0], entry[1]);
295
+ }
296
+ }
297
+ /**
298
+ * Removes all key-value entries from the hash.
299
+ *
300
+ * @private
301
+ * @name clear
302
+ * @memberOf Hash
303
+ */
304
+ function hashClear() {
305
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
306
+ this.size = 0;
307
+ }
308
+ /**
309
+ * Removes `key` and its value from the hash.
310
+ *
311
+ * @private
312
+ * @name delete
313
+ * @memberOf Hash
314
+ * @param {Object} hash The hash to modify.
315
+ * @param {string} key The key of the value to remove.
316
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
317
+ */
318
+ function hashDelete(key) {
319
+ var result = this.has(key) && delete this.__data__[key];
320
+ this.size -= result ? 1 : 0;
321
+ return result;
322
+ }
323
+ /**
324
+ * Gets the hash value for `key`.
325
+ *
326
+ * @private
327
+ * @name get
328
+ * @memberOf Hash
329
+ * @param {string} key The key of the value to get.
330
+ * @returns {*} Returns the entry value.
331
+ */
332
+ function hashGet(key) {
333
+ var data = this.__data__;
334
+ if (nativeCreate) {
335
+ var result = data[key];
336
+ return result === HASH_UNDEFINED ? void 0 : result;
337
+ }
338
+ return hasOwnProperty.call(data, key) ? data[key] : void 0;
339
+ }
340
+ /**
341
+ * Checks if a hash value for `key` exists.
342
+ *
343
+ * @private
344
+ * @name has
345
+ * @memberOf Hash
346
+ * @param {string} key The key of the entry to check.
347
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
348
+ */
349
+ function hashHas(key) {
350
+ var data = this.__data__;
351
+ return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
352
+ }
353
+ /**
354
+ * Sets the hash `key` to `value`.
355
+ *
356
+ * @private
357
+ * @name set
358
+ * @memberOf Hash
359
+ * @param {string} key The key of the value to set.
360
+ * @param {*} value The value to set.
361
+ * @returns {Object} Returns the hash instance.
362
+ */
363
+ function hashSet(key, value) {
364
+ var data = this.__data__;
365
+ this.size += this.has(key) ? 0 : 1;
366
+ data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
367
+ return this;
368
+ }
369
+ Hash.prototype.clear = hashClear;
370
+ Hash.prototype["delete"] = hashDelete;
371
+ Hash.prototype.get = hashGet;
372
+ Hash.prototype.has = hashHas;
373
+ Hash.prototype.set = hashSet;
374
+ /**
375
+ * Creates an list cache object.
376
+ *
377
+ * @private
378
+ * @constructor
379
+ * @param {Array} [entries] The key-value pairs to cache.
380
+ */
381
+ function ListCache(entries) {
382
+ var index = -1, length = entries == null ? 0 : entries.length;
383
+ this.clear();
384
+ while (++index < length) {
385
+ var entry = entries[index];
386
+ this.set(entry[0], entry[1]);
387
+ }
388
+ }
389
+ /**
390
+ * Removes all key-value entries from the list cache.
391
+ *
392
+ * @private
393
+ * @name clear
394
+ * @memberOf ListCache
395
+ */
396
+ function listCacheClear() {
397
+ this.__data__ = [];
398
+ this.size = 0;
399
+ }
400
+ /**
401
+ * Removes `key` and its value from the list cache.
402
+ *
403
+ * @private
404
+ * @name delete
405
+ * @memberOf ListCache
406
+ * @param {string} key The key of the value to remove.
407
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
408
+ */
409
+ function listCacheDelete(key) {
410
+ var data = this.__data__, index = assocIndexOf(data, key);
411
+ if (index < 0) return false;
412
+ if (index == data.length - 1) data.pop();
413
+ else splice.call(data, index, 1);
414
+ --this.size;
415
+ return true;
416
+ }
417
+ /**
418
+ * Gets the list cache value for `key`.
419
+ *
420
+ * @private
421
+ * @name get
422
+ * @memberOf ListCache
423
+ * @param {string} key The key of the value to get.
424
+ * @returns {*} Returns the entry value.
425
+ */
426
+ function listCacheGet(key) {
427
+ var data = this.__data__, index = assocIndexOf(data, key);
428
+ return index < 0 ? void 0 : data[index][1];
429
+ }
430
+ /**
431
+ * Checks if a list cache value for `key` exists.
432
+ *
433
+ * @private
434
+ * @name has
435
+ * @memberOf ListCache
436
+ * @param {string} key The key of the entry to check.
437
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
438
+ */
439
+ function listCacheHas(key) {
440
+ return assocIndexOf(this.__data__, key) > -1;
441
+ }
442
+ /**
443
+ * Sets the list cache `key` to `value`.
444
+ *
445
+ * @private
446
+ * @name set
447
+ * @memberOf ListCache
448
+ * @param {string} key The key of the value to set.
449
+ * @param {*} value The value to set.
450
+ * @returns {Object} Returns the list cache instance.
451
+ */
452
+ function listCacheSet(key, value) {
453
+ var data = this.__data__, index = assocIndexOf(data, key);
454
+ if (index < 0) {
455
+ ++this.size;
456
+ data.push([key, value]);
457
+ } else data[index][1] = value;
458
+ return this;
459
+ }
460
+ ListCache.prototype.clear = listCacheClear;
461
+ ListCache.prototype["delete"] = listCacheDelete;
462
+ ListCache.prototype.get = listCacheGet;
463
+ ListCache.prototype.has = listCacheHas;
464
+ ListCache.prototype.set = listCacheSet;
465
+ /**
466
+ * Creates a map cache object to store key-value pairs.
467
+ *
468
+ * @private
469
+ * @constructor
470
+ * @param {Array} [entries] The key-value pairs to cache.
471
+ */
472
+ function MapCache(entries) {
473
+ var index = -1, length = entries == null ? 0 : entries.length;
474
+ this.clear();
475
+ while (++index < length) {
476
+ var entry = entries[index];
477
+ this.set(entry[0], entry[1]);
478
+ }
479
+ }
480
+ /**
481
+ * Removes all key-value entries from the map.
482
+ *
483
+ * @private
484
+ * @name clear
485
+ * @memberOf MapCache
486
+ */
487
+ function mapCacheClear() {
488
+ this.size = 0;
489
+ this.__data__ = {
490
+ "hash": new Hash(),
491
+ "map": new (Map || ListCache)(),
492
+ "string": new Hash()
493
+ };
494
+ }
495
+ /**
496
+ * Removes `key` and its value from the map.
497
+ *
498
+ * @private
499
+ * @name delete
500
+ * @memberOf MapCache
501
+ * @param {string} key The key of the value to remove.
502
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
503
+ */
504
+ function mapCacheDelete(key) {
505
+ var result = getMapData(this, key)["delete"](key);
506
+ this.size -= result ? 1 : 0;
507
+ return result;
508
+ }
509
+ /**
510
+ * Gets the map value for `key`.
511
+ *
512
+ * @private
513
+ * @name get
514
+ * @memberOf MapCache
515
+ * @param {string} key The key of the value to get.
516
+ * @returns {*} Returns the entry value.
517
+ */
518
+ function mapCacheGet(key) {
519
+ return getMapData(this, key).get(key);
520
+ }
521
+ /**
522
+ * Checks if a map value for `key` exists.
523
+ *
524
+ * @private
525
+ * @name has
526
+ * @memberOf MapCache
527
+ * @param {string} key The key of the entry to check.
528
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
529
+ */
530
+ function mapCacheHas(key) {
531
+ return getMapData(this, key).has(key);
532
+ }
533
+ /**
534
+ * Sets the map `key` to `value`.
535
+ *
536
+ * @private
537
+ * @name set
538
+ * @memberOf MapCache
539
+ * @param {string} key The key of the value to set.
540
+ * @param {*} value The value to set.
541
+ * @returns {Object} Returns the map cache instance.
542
+ */
543
+ function mapCacheSet(key, value) {
544
+ var data = getMapData(this, key), size = data.size;
545
+ data.set(key, value);
546
+ this.size += data.size == size ? 0 : 1;
547
+ return this;
548
+ }
549
+ MapCache.prototype.clear = mapCacheClear;
550
+ MapCache.prototype["delete"] = mapCacheDelete;
551
+ MapCache.prototype.get = mapCacheGet;
552
+ MapCache.prototype.has = mapCacheHas;
553
+ MapCache.prototype.set = mapCacheSet;
554
+ /**
555
+ *
556
+ * Creates an array cache object to store unique values.
557
+ *
558
+ * @private
559
+ * @constructor
560
+ * @param {Array} [values] The values to cache.
561
+ */
562
+ function SetCache(values) {
563
+ var index = -1, length = values == null ? 0 : values.length;
564
+ this.__data__ = new MapCache();
565
+ while (++index < length) this.add(values[index]);
566
+ }
567
+ /**
568
+ * Adds `value` to the array cache.
569
+ *
570
+ * @private
571
+ * @name add
572
+ * @memberOf SetCache
573
+ * @alias push
574
+ * @param {*} value The value to cache.
575
+ * @returns {Object} Returns the cache instance.
576
+ */
577
+ function setCacheAdd(value) {
578
+ this.__data__.set(value, HASH_UNDEFINED);
579
+ return this;
580
+ }
581
+ /**
582
+ * Checks if `value` is in the array cache.
583
+ *
584
+ * @private
585
+ * @name has
586
+ * @memberOf SetCache
587
+ * @param {*} value The value to search for.
588
+ * @returns {number} Returns `true` if `value` is found, else `false`.
589
+ */
590
+ function setCacheHas(value) {
591
+ return this.__data__.has(value);
592
+ }
593
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
594
+ SetCache.prototype.has = setCacheHas;
595
+ /**
596
+ * Creates a stack cache object to store key-value pairs.
597
+ *
598
+ * @private
599
+ * @constructor
600
+ * @param {Array} [entries] The key-value pairs to cache.
601
+ */
602
+ function Stack(entries) {
603
+ var data = this.__data__ = new ListCache(entries);
604
+ this.size = data.size;
605
+ }
606
+ /**
607
+ * Removes all key-value entries from the stack.
608
+ *
609
+ * @private
610
+ * @name clear
611
+ * @memberOf Stack
612
+ */
613
+ function stackClear() {
614
+ this.__data__ = new ListCache();
615
+ this.size = 0;
616
+ }
617
+ /**
618
+ * Removes `key` and its value from the stack.
619
+ *
620
+ * @private
621
+ * @name delete
622
+ * @memberOf Stack
623
+ * @param {string} key The key of the value to remove.
624
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
625
+ */
626
+ function stackDelete(key) {
627
+ var data = this.__data__, result = data["delete"](key);
628
+ this.size = data.size;
629
+ return result;
630
+ }
631
+ /**
632
+ * Gets the stack value for `key`.
633
+ *
634
+ * @private
635
+ * @name get
636
+ * @memberOf Stack
637
+ * @param {string} key The key of the value to get.
638
+ * @returns {*} Returns the entry value.
639
+ */
640
+ function stackGet(key) {
641
+ return this.__data__.get(key);
642
+ }
643
+ /**
644
+ * Checks if a stack value for `key` exists.
645
+ *
646
+ * @private
647
+ * @name has
648
+ * @memberOf Stack
649
+ * @param {string} key The key of the entry to check.
650
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
651
+ */
652
+ function stackHas(key) {
653
+ return this.__data__.has(key);
654
+ }
655
+ /**
656
+ * Sets the stack `key` to `value`.
657
+ *
658
+ * @private
659
+ * @name set
660
+ * @memberOf Stack
661
+ * @param {string} key The key of the value to set.
662
+ * @param {*} value The value to set.
663
+ * @returns {Object} Returns the stack cache instance.
664
+ */
665
+ function stackSet(key, value) {
666
+ var data = this.__data__;
667
+ if (data instanceof ListCache) {
668
+ var pairs = data.__data__;
669
+ if (!Map || pairs.length < 199) {
670
+ pairs.push([key, value]);
671
+ this.size = ++data.size;
672
+ return this;
673
+ }
674
+ data = this.__data__ = new MapCache(pairs);
675
+ }
676
+ data.set(key, value);
677
+ this.size = data.size;
678
+ return this;
679
+ }
680
+ Stack.prototype.clear = stackClear;
681
+ Stack.prototype["delete"] = stackDelete;
682
+ Stack.prototype.get = stackGet;
683
+ Stack.prototype.has = stackHas;
684
+ Stack.prototype.set = stackSet;
685
+ /**
686
+ * Creates an array of the enumerable property names of the array-like `value`.
687
+ *
688
+ * @private
689
+ * @param {*} value The value to query.
690
+ * @param {boolean} inherited Specify returning inherited property names.
691
+ * @returns {Array} Returns the array of property names.
692
+ */
693
+ function arrayLikeKeys(value, inherited) {
694
+ 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;
695
+ for (var key in value) if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) result.push(key);
696
+ return result;
697
+ }
698
+ /**
699
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
700
+ *
701
+ * @private
702
+ * @param {Array} array The array to inspect.
703
+ * @param {*} key The key to search for.
704
+ * @returns {number} Returns the index of the matched value, else `-1`.
705
+ */
706
+ function assocIndexOf(array, key) {
707
+ var length = array.length;
708
+ while (length--) if (eq(array[length][0], key)) return length;
709
+ return -1;
710
+ }
711
+ /**
712
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
713
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
714
+ * symbols of `object`.
715
+ *
716
+ * @private
717
+ * @param {Object} object The object to query.
718
+ * @param {Function} keysFunc The function to get the keys of `object`.
719
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
720
+ * @returns {Array} Returns the array of property names and symbols.
721
+ */
722
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
723
+ var result = keysFunc(object);
724
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
725
+ }
726
+ /**
727
+ * The base implementation of `getTag` without fallbacks for buggy environments.
728
+ *
729
+ * @private
730
+ * @param {*} value The value to query.
731
+ * @returns {string} Returns the `toStringTag`.
732
+ */
733
+ function baseGetTag(value) {
734
+ if (value == null) return value === void 0 ? undefinedTag : nullTag;
735
+ return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
736
+ }
737
+ /**
738
+ * The base implementation of `_.isArguments`.
739
+ *
740
+ * @private
741
+ * @param {*} value The value to check.
742
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
743
+ */
744
+ function baseIsArguments(value) {
745
+ return isObjectLike(value) && baseGetTag(value) == argsTag;
746
+ }
747
+ /**
748
+ * The base implementation of `_.isEqual` which supports partial comparisons
749
+ * and tracks traversed objects.
750
+ *
751
+ * @private
752
+ * @param {*} value The value to compare.
753
+ * @param {*} other The other value to compare.
754
+ * @param {boolean} bitmask The bitmask flags.
755
+ * 1 - Unordered comparison
756
+ * 2 - Partial comparison
757
+ * @param {Function} [customizer] The function to customize comparisons.
758
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
759
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
760
+ */
761
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
762
+ if (value === other) return true;
763
+ if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) return value !== value && other !== other;
764
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
765
+ }
766
+ /**
767
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
768
+ * deep comparisons and tracks traversed objects enabling objects with circular
769
+ * references to be compared.
770
+ *
771
+ * @private
772
+ * @param {Object} object The object to compare.
773
+ * @param {Object} other The other object to compare.
774
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
775
+ * @param {Function} customizer The function to customize comparisons.
776
+ * @param {Function} equalFunc The function to determine equivalents of values.
777
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
778
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
779
+ */
780
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
781
+ var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
782
+ objTag = objTag == argsTag ? objectTag : objTag;
783
+ othTag = othTag == argsTag ? objectTag : othTag;
784
+ var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
785
+ if (isSameTag && isBuffer(object)) {
786
+ if (!isBuffer(other)) return false;
787
+ objIsArr = true;
788
+ objIsObj = false;
789
+ }
790
+ if (isSameTag && !objIsObj) {
791
+ stack || (stack = new Stack());
792
+ return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
793
+ }
794
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
795
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
796
+ if (objIsWrapped || othIsWrapped) {
797
+ var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
798
+ stack || (stack = new Stack());
799
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
800
+ }
801
+ }
802
+ if (!isSameTag) return false;
803
+ stack || (stack = new Stack());
804
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
805
+ }
806
+ /**
807
+ * The base implementation of `_.isNative` without bad shim checks.
808
+ *
809
+ * @private
810
+ * @param {*} value The value to check.
811
+ * @returns {boolean} Returns `true` if `value` is a native function,
812
+ * else `false`.
813
+ */
814
+ function baseIsNative(value) {
815
+ if (!isObject(value) || isMasked(value)) return false;
816
+ return (isFunction(value) ? reIsNative : reIsHostCtor).test(toSource(value));
817
+ }
818
+ /**
819
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
820
+ *
821
+ * @private
822
+ * @param {*} value The value to check.
823
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
824
+ */
825
+ function baseIsTypedArray(value) {
826
+ return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
827
+ }
828
+ /**
829
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
830
+ *
831
+ * @private
832
+ * @param {Object} object The object to query.
833
+ * @returns {Array} Returns the array of property names.
834
+ */
835
+ function baseKeys(object) {
836
+ if (!isPrototype(object)) return nativeKeys(object);
837
+ var result = [];
838
+ for (var key in Object(object)) if (hasOwnProperty.call(object, key) && key != "constructor") result.push(key);
839
+ return result;
840
+ }
841
+ /**
842
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
843
+ * partial deep comparisons.
844
+ *
845
+ * @private
846
+ * @param {Array} array The array to compare.
847
+ * @param {Array} other The other array to compare.
848
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
849
+ * @param {Function} customizer The function to customize comparisons.
850
+ * @param {Function} equalFunc The function to determine equivalents of values.
851
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
852
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
853
+ */
854
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
855
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
856
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) return false;
857
+ var stacked = stack.get(array);
858
+ if (stacked && stack.get(other)) return stacked == other;
859
+ var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : void 0;
860
+ stack.set(array, other);
861
+ stack.set(other, array);
862
+ while (++index < arrLength) {
863
+ var arrValue = array[index], othValue = other[index];
864
+ if (customizer) var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
865
+ if (compared !== void 0) {
866
+ if (compared) continue;
867
+ result = false;
868
+ break;
869
+ }
870
+ if (seen) {
871
+ if (!arraySome(other, function(othValue, othIndex) {
872
+ if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) return seen.push(othIndex);
873
+ })) {
874
+ result = false;
875
+ break;
876
+ }
877
+ } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
878
+ result = false;
879
+ break;
880
+ }
881
+ }
882
+ stack["delete"](array);
883
+ stack["delete"](other);
884
+ return result;
885
+ }
886
+ /**
887
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
888
+ * the same `toStringTag`.
889
+ *
890
+ * **Note:** This function only supports comparing values with tags of
891
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
892
+ *
893
+ * @private
894
+ * @param {Object} object The object to compare.
895
+ * @param {Object} other The other object to compare.
896
+ * @param {string} tag The `toStringTag` of the objects to compare.
897
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
898
+ * @param {Function} customizer The function to customize comparisons.
899
+ * @param {Function} equalFunc The function to determine equivalents of values.
900
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
901
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
902
+ */
903
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
904
+ switch (tag) {
905
+ case dataViewTag:
906
+ if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) return false;
907
+ object = object.buffer;
908
+ other = other.buffer;
909
+ case arrayBufferTag:
910
+ if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) return false;
911
+ return true;
912
+ case boolTag:
913
+ case dateTag:
914
+ case numberTag: return eq(+object, +other);
915
+ case errorTag: return object.name == other.name && object.message == other.message;
916
+ case regexpTag:
917
+ case stringTag: return object == other + "";
918
+ case mapTag: var convert = mapToArray;
919
+ case setTag:
920
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
921
+ convert || (convert = setToArray);
922
+ if (object.size != other.size && !isPartial) return false;
923
+ var stacked = stack.get(object);
924
+ if (stacked) return stacked == other;
925
+ bitmask |= COMPARE_UNORDERED_FLAG;
926
+ stack.set(object, other);
927
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
928
+ stack["delete"](object);
929
+ return result;
930
+ case symbolTag: if (symbolValueOf) return symbolValueOf.call(object) == symbolValueOf.call(other);
931
+ }
932
+ return false;
933
+ }
934
+ /**
935
+ * A specialized version of `baseIsEqualDeep` for objects with support for
936
+ * partial deep comparisons.
937
+ *
938
+ * @private
939
+ * @param {Object} object The object to compare.
940
+ * @param {Object} other The other object to compare.
941
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
942
+ * @param {Function} customizer The function to customize comparisons.
943
+ * @param {Function} equalFunc The function to determine equivalents of values.
944
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
945
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
946
+ */
947
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
948
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length;
949
+ if (objLength != getAllKeys(other).length && !isPartial) return false;
950
+ var index = objLength;
951
+ while (index--) {
952
+ var key = objProps[index];
953
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) return false;
954
+ }
955
+ var stacked = stack.get(object);
956
+ if (stacked && stack.get(other)) return stacked == other;
957
+ var result = true;
958
+ stack.set(object, other);
959
+ stack.set(other, object);
960
+ var skipCtor = isPartial;
961
+ while (++index < objLength) {
962
+ key = objProps[index];
963
+ var objValue = object[key], othValue = other[key];
964
+ if (customizer) var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
965
+ if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
966
+ result = false;
967
+ break;
968
+ }
969
+ skipCtor || (skipCtor = key == "constructor");
970
+ }
971
+ if (result && !skipCtor) {
972
+ var objCtor = object.constructor, othCtor = other.constructor;
973
+ if (objCtor != othCtor && "constructor" in object && "constructor" in other && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) result = false;
974
+ }
975
+ stack["delete"](object);
976
+ stack["delete"](other);
977
+ return result;
978
+ }
979
+ /**
980
+ * Creates an array of own enumerable property names and symbols of `object`.
981
+ *
982
+ * @private
983
+ * @param {Object} object The object to query.
984
+ * @returns {Array} Returns the array of property names and symbols.
985
+ */
986
+ function getAllKeys(object) {
987
+ return baseGetAllKeys(object, keys, getSymbols);
988
+ }
989
+ /**
990
+ * Gets the data for `map`.
991
+ *
992
+ * @private
993
+ * @param {Object} map The map to query.
994
+ * @param {string} key The reference key.
995
+ * @returns {*} Returns the map data.
996
+ */
997
+ function getMapData(map, key) {
998
+ var data = map.__data__;
999
+ return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
1000
+ }
1001
+ /**
1002
+ * Gets the native function at `key` of `object`.
1003
+ *
1004
+ * @private
1005
+ * @param {Object} object The object to query.
1006
+ * @param {string} key The key of the method to get.
1007
+ * @returns {*} Returns the function if it's native, else `undefined`.
1008
+ */
1009
+ function getNative(object, key) {
1010
+ var value = getValue(object, key);
1011
+ return baseIsNative(value) ? value : void 0;
1012
+ }
1013
+ /**
1014
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
1015
+ *
1016
+ * @private
1017
+ * @param {*} value The value to query.
1018
+ * @returns {string} Returns the raw `toStringTag`.
1019
+ */
1020
+ function getRawTag(value) {
1021
+ var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
1022
+ try {
1023
+ value[symToStringTag] = void 0;
1024
+ var unmasked = true;
1025
+ } catch (e) {}
1026
+ var result = nativeObjectToString.call(value);
1027
+ if (unmasked) {
1028
+ if (isOwn) value[symToStringTag] = tag;
1029
+ else delete value[symToStringTag];
1030
+ }
1031
+ return result;
1032
+ }
1033
+ /**
1034
+ * Creates an array of the own enumerable symbols of `object`.
1035
+ *
1036
+ * @private
1037
+ * @param {Object} object The object to query.
1038
+ * @returns {Array} Returns the array of symbols.
1039
+ */
1040
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
1041
+ if (object == null) return [];
1042
+ object = Object(object);
1043
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
1044
+ return propertyIsEnumerable.call(object, symbol);
1045
+ });
1046
+ };
1047
+ /**
1048
+ * Gets the `toStringTag` of `value`.
1049
+ *
1050
+ * @private
1051
+ * @param {*} value The value to query.
1052
+ * @returns {string} Returns the `toStringTag`.
1053
+ */
1054
+ var getTag = baseGetTag;
1055
+ if (DataView && getTag(new DataView(/* @__PURE__ */ 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) {
1056
+ var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
1057
+ if (ctorString) switch (ctorString) {
1058
+ case dataViewCtorString: return dataViewTag;
1059
+ case mapCtorString: return mapTag;
1060
+ case promiseCtorString: return promiseTag;
1061
+ case setCtorString: return setTag;
1062
+ case weakMapCtorString: return weakMapTag;
1063
+ }
1064
+ return result;
1065
+ };
1066
+ /**
1067
+ * Checks if `value` is a valid array-like index.
1068
+ *
1069
+ * @private
1070
+ * @param {*} value The value to check.
1071
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
1072
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
1073
+ */
1074
+ function isIndex(value, length) {
1075
+ length = length == null ? MAX_SAFE_INTEGER : length;
1076
+ return !!length && (typeof value == "number" || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
1077
+ }
1078
+ /**
1079
+ * Checks if `value` is suitable for use as unique object key.
1080
+ *
1081
+ * @private
1082
+ * @param {*} value The value to check.
1083
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
1084
+ */
1085
+ function isKeyable(value) {
1086
+ var type = typeof value;
1087
+ return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
1088
+ }
1089
+ /**
1090
+ * Checks if `func` has its source masked.
1091
+ *
1092
+ * @private
1093
+ * @param {Function} func The function to check.
1094
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
1095
+ */
1096
+ function isMasked(func) {
1097
+ return !!maskSrcKey && maskSrcKey in func;
1098
+ }
1099
+ /**
1100
+ * Checks if `value` is likely a prototype object.
1101
+ *
1102
+ * @private
1103
+ * @param {*} value The value to check.
1104
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
1105
+ */
1106
+ function isPrototype(value) {
1107
+ var Ctor = value && value.constructor;
1108
+ return value === (typeof Ctor == "function" && Ctor.prototype || objectProto);
1109
+ }
1110
+ /**
1111
+ * Converts `value` to a string using `Object.prototype.toString`.
1112
+ *
1113
+ * @private
1114
+ * @param {*} value The value to convert.
1115
+ * @returns {string} Returns the converted string.
1116
+ */
1117
+ function objectToString(value) {
1118
+ return nativeObjectToString.call(value);
1119
+ }
1120
+ /**
1121
+ * Converts `func` to its source code.
1122
+ *
1123
+ * @private
1124
+ * @param {Function} func The function to convert.
1125
+ * @returns {string} Returns the source code.
1126
+ */
1127
+ function toSource(func) {
1128
+ if (func != null) {
1129
+ try {
1130
+ return funcToString.call(func);
1131
+ } catch (e) {}
1132
+ try {
1133
+ return func + "";
1134
+ } catch (e) {}
1135
+ }
1136
+ return "";
1137
+ }
1138
+ /**
1139
+ * Performs a
1140
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1141
+ * comparison between two values to determine if they are equivalent.
1142
+ *
1143
+ * @static
1144
+ * @memberOf _
1145
+ * @since 4.0.0
1146
+ * @category Lang
1147
+ * @param {*} value The value to compare.
1148
+ * @param {*} other The other value to compare.
1149
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1150
+ * @example
1151
+ *
1152
+ * var object = { 'a': 1 };
1153
+ * var other = { 'a': 1 };
1154
+ *
1155
+ * _.eq(object, object);
1156
+ * // => true
1157
+ *
1158
+ * _.eq(object, other);
1159
+ * // => false
1160
+ *
1161
+ * _.eq('a', 'a');
1162
+ * // => true
1163
+ *
1164
+ * _.eq('a', Object('a'));
1165
+ * // => false
1166
+ *
1167
+ * _.eq(NaN, NaN);
1168
+ * // => true
1169
+ */
1170
+ function eq(value, other) {
1171
+ return value === other || value !== value && other !== other;
1172
+ }
1173
+ /**
1174
+ * Checks if `value` is likely an `arguments` object.
1175
+ *
1176
+ * @static
1177
+ * @memberOf _
1178
+ * @since 0.1.0
1179
+ * @category Lang
1180
+ * @param {*} value The value to check.
1181
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1182
+ * else `false`.
1183
+ * @example
1184
+ *
1185
+ * _.isArguments(function() { return arguments; }());
1186
+ * // => true
1187
+ *
1188
+ * _.isArguments([1, 2, 3]);
1189
+ * // => false
1190
+ */
1191
+ var isArguments = baseIsArguments(function() {
1192
+ return arguments;
1193
+ }()) ? baseIsArguments : function(value) {
1194
+ return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
1195
+ };
1196
+ /**
1197
+ * Checks if `value` is classified as an `Array` object.
1198
+ *
1199
+ * @static
1200
+ * @memberOf _
1201
+ * @since 0.1.0
1202
+ * @category Lang
1203
+ * @param {*} value The value to check.
1204
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
1205
+ * @example
1206
+ *
1207
+ * _.isArray([1, 2, 3]);
1208
+ * // => true
1209
+ *
1210
+ * _.isArray(document.body.children);
1211
+ * // => false
1212
+ *
1213
+ * _.isArray('abc');
1214
+ * // => false
1215
+ *
1216
+ * _.isArray(_.noop);
1217
+ * // => false
1218
+ */
1219
+ var isArray = Array.isArray;
1220
+ /**
1221
+ * Checks if `value` is array-like. A value is considered array-like if it's
1222
+ * not a function and has a `value.length` that's an integer greater than or
1223
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
1224
+ *
1225
+ * @static
1226
+ * @memberOf _
1227
+ * @since 4.0.0
1228
+ * @category Lang
1229
+ * @param {*} value The value to check.
1230
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
1231
+ * @example
1232
+ *
1233
+ * _.isArrayLike([1, 2, 3]);
1234
+ * // => true
1235
+ *
1236
+ * _.isArrayLike(document.body.children);
1237
+ * // => true
1238
+ *
1239
+ * _.isArrayLike('abc');
1240
+ * // => true
1241
+ *
1242
+ * _.isArrayLike(_.noop);
1243
+ * // => false
1244
+ */
1245
+ function isArrayLike(value) {
1246
+ return value != null && isLength(value.length) && !isFunction(value);
1247
+ }
1248
+ /**
1249
+ * Checks if `value` is a buffer.
1250
+ *
1251
+ * @static
1252
+ * @memberOf _
1253
+ * @since 4.3.0
1254
+ * @category Lang
1255
+ * @param {*} value The value to check.
1256
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
1257
+ * @example
1258
+ *
1259
+ * _.isBuffer(new Buffer(2));
1260
+ * // => true
1261
+ *
1262
+ * _.isBuffer(new Uint8Array(2));
1263
+ * // => false
1264
+ */
1265
+ var isBuffer = nativeIsBuffer || stubFalse;
1266
+ /**
1267
+ * Performs a deep comparison between two values to determine if they are
1268
+ * equivalent.
1269
+ *
1270
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
1271
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
1272
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
1273
+ * by their own, not inherited, enumerable properties. Functions and DOM
1274
+ * nodes are compared by strict equality, i.e. `===`.
1275
+ *
1276
+ * @static
1277
+ * @memberOf _
1278
+ * @since 0.1.0
1279
+ * @category Lang
1280
+ * @param {*} value The value to compare.
1281
+ * @param {*} other The other value to compare.
1282
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1283
+ * @example
1284
+ *
1285
+ * var object = { 'a': 1 };
1286
+ * var other = { 'a': 1 };
1287
+ *
1288
+ * _.isEqual(object, other);
1289
+ * // => true
1290
+ *
1291
+ * object === other;
1292
+ * // => false
1293
+ */
1294
+ function isEqual(value, other) {
1295
+ return baseIsEqual(value, other);
1296
+ }
1297
+ /**
1298
+ * Checks if `value` is classified as a `Function` object.
1299
+ *
1300
+ * @static
1301
+ * @memberOf _
1302
+ * @since 0.1.0
1303
+ * @category Lang
1304
+ * @param {*} value The value to check.
1305
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
1306
+ * @example
1307
+ *
1308
+ * _.isFunction(_);
1309
+ * // => true
1310
+ *
1311
+ * _.isFunction(/abc/);
1312
+ * // => false
1313
+ */
1314
+ function isFunction(value) {
1315
+ if (!isObject(value)) return false;
1316
+ var tag = baseGetTag(value);
1317
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
1318
+ }
1319
+ /**
1320
+ * Checks if `value` is a valid array-like length.
1321
+ *
1322
+ * **Note:** This method is loosely based on
1323
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
1324
+ *
1325
+ * @static
1326
+ * @memberOf _
1327
+ * @since 4.0.0
1328
+ * @category Lang
1329
+ * @param {*} value The value to check.
1330
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
1331
+ * @example
1332
+ *
1333
+ * _.isLength(3);
1334
+ * // => true
1335
+ *
1336
+ * _.isLength(Number.MIN_VALUE);
1337
+ * // => false
1338
+ *
1339
+ * _.isLength(Infinity);
1340
+ * // => false
1341
+ *
1342
+ * _.isLength('3');
1343
+ * // => false
1344
+ */
1345
+ function isLength(value) {
1346
+ return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
1347
+ }
1348
+ /**
1349
+ * Checks if `value` is the
1350
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
1351
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
1352
+ *
1353
+ * @static
1354
+ * @memberOf _
1355
+ * @since 0.1.0
1356
+ * @category Lang
1357
+ * @param {*} value The value to check.
1358
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
1359
+ * @example
1360
+ *
1361
+ * _.isObject({});
1362
+ * // => true
1363
+ *
1364
+ * _.isObject([1, 2, 3]);
1365
+ * // => true
1366
+ *
1367
+ * _.isObject(_.noop);
1368
+ * // => true
1369
+ *
1370
+ * _.isObject(null);
1371
+ * // => false
1372
+ */
1373
+ function isObject(value) {
1374
+ var type = typeof value;
1375
+ return value != null && (type == "object" || type == "function");
1376
+ }
1377
+ /**
1378
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
1379
+ * and has a `typeof` result of "object".
1380
+ *
1381
+ * @static
1382
+ * @memberOf _
1383
+ * @since 4.0.0
1384
+ * @category Lang
1385
+ * @param {*} value The value to check.
1386
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
1387
+ * @example
1388
+ *
1389
+ * _.isObjectLike({});
1390
+ * // => true
1391
+ *
1392
+ * _.isObjectLike([1, 2, 3]);
1393
+ * // => true
1394
+ *
1395
+ * _.isObjectLike(_.noop);
1396
+ * // => false
1397
+ *
1398
+ * _.isObjectLike(null);
1399
+ * // => false
1400
+ */
1401
+ function isObjectLike(value) {
1402
+ return value != null && typeof value == "object";
1403
+ }
1404
+ /**
1405
+ * Checks if `value` is classified as a typed array.
1406
+ *
1407
+ * @static
1408
+ * @memberOf _
1409
+ * @since 3.0.0
1410
+ * @category Lang
1411
+ * @param {*} value The value to check.
1412
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1413
+ * @example
1414
+ *
1415
+ * _.isTypedArray(new Uint8Array);
1416
+ * // => true
1417
+ *
1418
+ * _.isTypedArray([]);
1419
+ * // => false
1420
+ */
1421
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
1422
+ /**
1423
+ * Creates an array of the own enumerable property names of `object`.
1424
+ *
1425
+ * **Note:** Non-object values are coerced to objects. See the
1426
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1427
+ * for more details.
1428
+ *
1429
+ * @static
1430
+ * @since 0.1.0
1431
+ * @memberOf _
1432
+ * @category Object
1433
+ * @param {Object} object The object to query.
1434
+ * @returns {Array} Returns the array of property names.
1435
+ * @example
1436
+ *
1437
+ * function Foo() {
1438
+ * this.a = 1;
1439
+ * this.b = 2;
1440
+ * }
1441
+ *
1442
+ * Foo.prototype.c = 3;
1443
+ *
1444
+ * _.keys(new Foo);
1445
+ * // => ['a', 'b'] (iteration order is not guaranteed)
1446
+ *
1447
+ * _.keys('hi');
1448
+ * // => ['0', '1']
1449
+ */
1450
+ function keys(object) {
1451
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
1452
+ }
1453
+ /**
1454
+ * This method returns a new empty array.
1455
+ *
1456
+ * @static
1457
+ * @memberOf _
1458
+ * @since 4.13.0
1459
+ * @category Util
1460
+ * @returns {Array} Returns the new empty array.
1461
+ * @example
1462
+ *
1463
+ * var arrays = _.times(2, _.stubArray);
1464
+ *
1465
+ * console.log(arrays);
1466
+ * // => [[], []]
1467
+ *
1468
+ * console.log(arrays[0] === arrays[1]);
1469
+ * // => false
1470
+ */
1471
+ function stubArray() {
1472
+ return [];
1473
+ }
1474
+ /**
1475
+ * This method returns `false`.
1476
+ *
1477
+ * @static
1478
+ * @memberOf _
1479
+ * @since 4.13.0
1480
+ * @category Util
1481
+ * @returns {boolean} Returns `false`.
1482
+ * @example
1483
+ *
1484
+ * _.times(2, _.stubFalse);
1485
+ * // => [false, false]
1486
+ */
1487
+ function stubFalse() {
1488
+ return false;
1489
+ }
1490
+ module.exports = isEqual;
1491
+ })))(), 1);
1492
+ function circleLayer(color, source, vectorLayer) {
1493
+ const layer = {
1494
+ id: [
1495
+ source,
1496
+ vectorLayer,
1497
+ "circle"
1498
+ ].join("_"),
1499
+ source,
1500
+ type: "circle",
1501
+ paint: {
1502
+ "circle-color": color,
1503
+ "circle-radius": 2
1504
+ },
1505
+ filter: [
1506
+ "==",
1507
+ "$type",
1508
+ "Point"
1509
+ ]
1510
+ };
1511
+ if (vectorLayer) layer["source-layer"] = vectorLayer;
1512
+ return layer;
1513
+ }
1514
+ function polygonLayer(color, _outlineColor, source, vectorLayer) {
1515
+ const layer = {
1516
+ id: [
1517
+ source,
1518
+ vectorLayer,
1519
+ "polygon"
1520
+ ].join("_"),
1521
+ source,
1522
+ type: "fill",
1523
+ paint: {
1524
+ "fill-color": color,
1525
+ "fill-antialias": true,
1526
+ "fill-outline-color": color
1527
+ },
1528
+ filter: [
1529
+ "==",
1530
+ "$type",
1531
+ "Polygon"
1532
+ ]
1533
+ };
1534
+ if (vectorLayer) layer["source-layer"] = vectorLayer;
1535
+ return layer;
1536
+ }
1537
+ function lineLayer(color, source, vectorLayer) {
1538
+ const layer = {
1539
+ id: [
1540
+ source,
1541
+ vectorLayer,
1542
+ "line"
1543
+ ].join("_"),
1544
+ source,
1545
+ layout: {
1546
+ "line-join": "round",
1547
+ "line-cap": "round"
1548
+ },
1549
+ type: "line",
1550
+ paint: { "line-color": color },
1551
+ filter: [
1552
+ "==",
1553
+ "$type",
1554
+ "LineString"
1555
+ ]
1556
+ };
1557
+ if (vectorLayer) layer["source-layer"] = vectorLayer;
1558
+ return layer;
1559
+ }
1560
+ function alphaColors(layerId, assignLayerColor) {
1561
+ return {
1562
+ circle: assignLayerColor(layerId, .8),
1563
+ line: assignLayerColor(layerId, .6),
1564
+ polygon: assignLayerColor(layerId, .3),
1565
+ polygonOutline: assignLayerColor(layerId, .6),
1566
+ default: assignLayerColor(layerId, 1)
1567
+ };
1568
+ }
1569
+ /**
1570
+ * Generate colored layer styles for the given sources
1571
+ * @param sources dictionary containing the vector layer IDs
1572
+ * @param assignLayerColor to generate a color for a layer
1573
+ * @return Array of Maplibre GL layers
1574
+ */
1575
+ function generateColoredLayers(sources, assignLayerColor) {
1576
+ const polyLayers = [];
1577
+ const circleLayers = [];
1578
+ const lineLayers = [];
1579
+ for (const sourceId of Object.keys(sources)) {
1580
+ const layers = sources[sourceId];
1581
+ if (!layers || layers.length === 0) {
1582
+ const colors = alphaColors(sourceId, assignLayerColor);
1583
+ circleLayers.push(circleLayer(colors.circle, sourceId));
1584
+ lineLayers.push(lineLayer(colors.line, sourceId));
1585
+ polyLayers.push(polygonLayer(colors.polygon, colors.polygonOutline, sourceId));
1586
+ } else for (const layerId of layers) {
1587
+ const colors = alphaColors(layerId, assignLayerColor);
1588
+ circleLayers.push(circleLayer(colors.circle, sourceId, layerId));
1589
+ lineLayers.push(lineLayer(colors.line, sourceId, layerId));
1590
+ polyLayers.push(polygonLayer(colors.polygon, colors.polygonOutline, sourceId, layerId));
1591
+ }
1592
+ }
1593
+ return polyLayers.concat(lineLayers).concat(circleLayers);
1594
+ }
1595
+ /**
1596
+ * Create inspection style out of the original style and the new colored layers
1597
+ * @param originalMapStyle - map style
1598
+ * @param coloredLayers - array of colored Maplibre GL layers
1599
+ * @param opts - options
1600
+ * @return {Object} Colored inspect style
1601
+ */
1602
+ function generateInspectStyle(originalMapStyle, coloredLayers, opts) {
1603
+ opts = Object.assign({ backgroundColor: "#fff" }, opts);
1604
+ const backgroundLayer = {
1605
+ "id": "background",
1606
+ "type": "background",
1607
+ "paint": { "background-color": opts.backgroundColor }
1608
+ };
1609
+ const sources = {};
1610
+ for (const sourceId of Object.keys(originalMapStyle.sources)) {
1611
+ const source = originalMapStyle.sources[sourceId];
1612
+ if (source.type === "vector" || source.type === "geojson") sources[sourceId] = source;
1613
+ }
1614
+ return Object.assign(originalMapStyle, {
1615
+ layers: [backgroundLayer].concat(coloredLayers),
1616
+ sources
1617
+ });
1618
+ }
1619
+ var stylegen_default = {
1620
+ polygonLayer,
1621
+ lineLayer,
1622
+ circleLayer,
1623
+ generateInspectStyle,
1624
+ generateColoredLayers
1625
+ };
1626
+ //#endregion
1627
+ //#region lib/InspectButton.ts
1628
+ /**
1629
+ * A button to toggle the inspect mode
1630
+ */
1631
+ var InspectButton = class {
1632
+ constructor(options) {
1633
+ options = Object.assign({
1634
+ show: true,
1635
+ onToggle() {}
1636
+ }, options);
1637
+ this._btn = this.createButton();
1638
+ this._btn.onclick = options.onToggle;
1639
+ this.elem = this.createContainer(this._btn, options.show);
1640
+ }
1641
+ createButton() {
1642
+ const btn = document.createElement("button");
1643
+ btn.className = "maplibregl-ctrl-icon maplibregl-ctrl-inspect";
1644
+ btn.type = "button";
1645
+ btn.title = "Toggle Inspect";
1646
+ btn.setAttribute("aria-label", "Toggle Inspect");
1647
+ return btn;
1648
+ }
1649
+ createContainer(child, show) {
1650
+ const container = document.createElement("div");
1651
+ container.className = "maplibregl-ctrl maplibregl-ctrl-group";
1652
+ container.appendChild(child);
1653
+ if (!show) container.style.display = "none";
1654
+ return container;
1655
+ }
1656
+ setInspectIcon() {
1657
+ this._btn.className = "maplibregl-ctrl-icon maplibregl-ctrl-inspect";
1658
+ }
1659
+ setMapIcon() {
1660
+ this._btn.className = "maplibregl-ctrl-icon maplibregl-ctrl-map";
1661
+ }
1662
+ };
1663
+ //#endregion
1664
+ //#region lib/renderPopup.ts
1665
+ function displayValue(value) {
1666
+ if (typeof value === "undefined" || value === null) return value;
1667
+ if (value instanceof Date) return value.toLocaleString();
1668
+ if (typeof value === "object") return JSON.stringify(value);
1669
+ if (typeof value === "number" || typeof value === "string") return value.toString();
1670
+ return value;
1671
+ }
1672
+ function renderProperty(propertyName, property) {
1673
+ return `<div class="maplibregl-inspect_property"><div class="maplibregl-inspect_property-name">${propertyName}</div><div class="maplibregl-inspect_property-value">${displayValue(property)}</div></div>`;
1674
+ }
1675
+ function renderLayer(layerId) {
1676
+ return `<div class="maplibregl-inspect_layer">${layerId}</div>`;
1677
+ }
1678
+ function renderProperties(feature) {
1679
+ const sourceProperty = renderLayer(feature.layer["source-layer"] || feature.layer.source);
1680
+ const idProperty = renderProperty("$id", feature.id);
1681
+ const typeProperty = renderProperty("$type", feature.geometry.type);
1682
+ const properties = Object.keys(feature.properties).map((propertyName) => renderProperty(propertyName, feature.properties[propertyName]));
1683
+ return [
1684
+ sourceProperty,
1685
+ idProperty,
1686
+ typeProperty
1687
+ ].concat(properties).join("");
1688
+ }
1689
+ function renderFeatures(features) {
1690
+ return features.map((ft) => `<div class="maplibregl-inspect_feature">${renderProperties(ft)}</div>`).join("");
1691
+ }
1692
+ function renderPopup(features) {
1693
+ return `<div class="maplibregl-inspect_popup">${renderFeatures(features)}</div>`;
1694
+ }
1695
+ //#endregion
1696
+ //#region lib/colors.ts
1697
+ var import_randomColor = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
1698
+ (function(root, factory) {
1699
+ if (typeof exports === "object") {
1700
+ var randomColor = factory();
1701
+ if (typeof module === "object" && module && module.exports) exports = module.exports = randomColor;
1702
+ exports.randomColor = randomColor;
1703
+ } else if (typeof define === "function" && define.amd) define([], factory);
1704
+ else root.randomColor = factory();
1705
+ })(exports, function() {
1706
+ var seed = null;
1707
+ var colorDictionary = {};
1708
+ loadColorBounds();
1709
+ var colorRanges = [];
1710
+ var randomColor = function(options) {
1711
+ options = options || {};
1712
+ if (options.seed !== void 0 && options.seed !== null && options.seed === parseInt(options.seed, 10)) seed = options.seed;
1713
+ else if (typeof options.seed === "string") seed = stringToInteger(options.seed);
1714
+ else if (options.seed !== void 0 && options.seed !== null) throw new TypeError("The seed value must be an integer or string");
1715
+ else seed = null;
1716
+ var H, S, B;
1717
+ if (options.count !== null && options.count !== void 0) {
1718
+ var totalColors = options.count, colors = [];
1719
+ for (var i = 0; i < options.count; i++) colorRanges.push(false);
1720
+ options.count = null;
1721
+ while (totalColors > colors.length) {
1722
+ var color = randomColor(options);
1723
+ if (seed !== null) options.seed = seed;
1724
+ colors.push(color);
1725
+ }
1726
+ options.count = totalColors;
1727
+ return colors;
1728
+ }
1729
+ H = pickHue(options);
1730
+ S = pickSaturation(H, options);
1731
+ B = pickBrightness(H, S, options);
1732
+ return setFormat([
1733
+ H,
1734
+ S,
1735
+ B
1736
+ ], options);
1737
+ };
1738
+ function pickHue(options) {
1739
+ if (colorRanges.length > 0) {
1740
+ var hueRange = getRealHueRange(options.hue);
1741
+ var hue = randomWithin(hueRange);
1742
+ var step = (hueRange[1] - hueRange[0]) / colorRanges.length;
1743
+ var j = parseInt((hue - hueRange[0]) / step);
1744
+ if (colorRanges[j] === true) j = (j + 2) % colorRanges.length;
1745
+ else colorRanges[j] = true;
1746
+ hueRange = [(hueRange[0] + j * step) % 359, (hueRange[0] + (j + 1) * step) % 359];
1747
+ hue = randomWithin(hueRange);
1748
+ if (hue < 0) hue = 360 + hue;
1749
+ return hue;
1750
+ } else {
1751
+ var hueRange = getHueRange(options.hue);
1752
+ hue = randomWithin(hueRange);
1753
+ if (hue < 0) hue = 360 + hue;
1754
+ return hue;
1755
+ }
1756
+ }
1757
+ function pickSaturation(hue, options) {
1758
+ if (options.hue === "monochrome") return 0;
1759
+ if (options.luminosity === "random") return randomWithin([0, 100]);
1760
+ var saturationRange = getSaturationRange(hue);
1761
+ var sMin = saturationRange[0], sMax = saturationRange[1];
1762
+ switch (options.luminosity) {
1763
+ case "bright":
1764
+ sMin = 55;
1765
+ break;
1766
+ case "dark":
1767
+ sMin = sMax - 10;
1768
+ break;
1769
+ case "light": sMax = 55;
1770
+ }
1771
+ return randomWithin([sMin, sMax]);
1772
+ }
1773
+ function pickBrightness(H, S, options) {
1774
+ var bMin = getMinimumBrightness(H, S), bMax = 100;
1775
+ switch (options.luminosity) {
1776
+ case "dark":
1777
+ bMax = bMin + 20;
1778
+ break;
1779
+ case "light":
1780
+ bMin = (bMax + bMin) / 2;
1781
+ break;
1782
+ case "random":
1783
+ bMin = 0;
1784
+ bMax = 100;
1785
+ }
1786
+ return randomWithin([bMin, bMax]);
1787
+ }
1788
+ function setFormat(hsv, options) {
1789
+ switch (options.format) {
1790
+ case "hsvArray": return hsv;
1791
+ case "hslArray": return HSVtoHSL(hsv);
1792
+ case "hsl":
1793
+ var hsl = HSVtoHSL(hsv);
1794
+ return "hsl(" + hsl[0] + ", " + hsl[1] + "%, " + hsl[2] + "%)";
1795
+ case "hsla":
1796
+ var hslColor = HSVtoHSL(hsv);
1797
+ var alpha = options.alpha || Math.random();
1798
+ return "hsla(" + hslColor[0] + ", " + hslColor[1] + "%, " + hslColor[2] + "%, " + alpha + ")";
1799
+ case "rgbArray": return HSVtoRGB(hsv);
1800
+ case "rgb": return "rgb(" + HSVtoRGB(hsv).join(", ") + ")";
1801
+ case "rgba":
1802
+ var rgbColor = HSVtoRGB(hsv);
1803
+ var alpha = options.alpha || Math.random();
1804
+ return "rgba(" + rgbColor.join(", ") + ", " + alpha + ")";
1805
+ default: return HSVtoHex(hsv);
1806
+ }
1807
+ }
1808
+ function getMinimumBrightness(H, S) {
1809
+ var lowerBounds = getColorInfo(H).lowerBounds;
1810
+ for (var i = 0; i < lowerBounds.length - 1; i++) {
1811
+ var s1 = lowerBounds[i][0], v1 = lowerBounds[i][1];
1812
+ var s2 = lowerBounds[i + 1][0], v2 = lowerBounds[i + 1][1];
1813
+ if (S >= s1 && S <= s2) {
1814
+ var m = (v2 - v1) / (s2 - s1), b = v1 - m * s1;
1815
+ return m * S + b;
1816
+ }
1817
+ }
1818
+ return 0;
1819
+ }
1820
+ function getHueRange(colorInput) {
1821
+ if (typeof parseInt(colorInput) === "number") {
1822
+ var number = parseInt(colorInput);
1823
+ if (number < 360 && number > 0) return [number, number];
1824
+ }
1825
+ if (typeof colorInput === "string") {
1826
+ if (colorDictionary[colorInput]) {
1827
+ var color = colorDictionary[colorInput];
1828
+ if (color.hueRange) return color.hueRange;
1829
+ } else if (colorInput.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)) {
1830
+ var hue = HexToHSB(colorInput)[0];
1831
+ return [hue, hue];
1832
+ }
1833
+ }
1834
+ return [0, 360];
1835
+ }
1836
+ function getSaturationRange(hue) {
1837
+ return getColorInfo(hue).saturationRange;
1838
+ }
1839
+ function getColorInfo(hue) {
1840
+ if (hue >= 334 && hue <= 360) hue -= 360;
1841
+ for (var colorName in colorDictionary) {
1842
+ var color = colorDictionary[colorName];
1843
+ if (color.hueRange && hue >= color.hueRange[0] && hue <= color.hueRange[1]) return colorDictionary[colorName];
1844
+ }
1845
+ return "Color not found";
1846
+ }
1847
+ function randomWithin(range) {
1848
+ if (seed === null) {
1849
+ var golden_ratio = .618033988749895;
1850
+ var r = Math.random();
1851
+ r += golden_ratio;
1852
+ r %= 1;
1853
+ return Math.floor(range[0] + r * (range[1] + 1 - range[0]));
1854
+ } else {
1855
+ var max = range[1] || 1;
1856
+ var min = range[0] || 0;
1857
+ seed = (seed * 9301 + 49297) % 233280;
1858
+ var rnd = seed / 233280;
1859
+ return Math.floor(min + rnd * (max - min));
1860
+ }
1861
+ }
1862
+ function HSVtoHex(hsv) {
1863
+ var rgb = HSVtoRGB(hsv);
1864
+ function componentToHex(c) {
1865
+ var hex = c.toString(16);
1866
+ return hex.length == 1 ? "0" + hex : hex;
1867
+ }
1868
+ return "#" + componentToHex(rgb[0]) + componentToHex(rgb[1]) + componentToHex(rgb[2]);
1869
+ }
1870
+ function defineColor(name, hueRange, lowerBounds) {
1871
+ var sMin = lowerBounds[0][0], sMax = lowerBounds[lowerBounds.length - 1][0], bMin = lowerBounds[lowerBounds.length - 1][1], bMax = lowerBounds[0][1];
1872
+ colorDictionary[name] = {
1873
+ hueRange,
1874
+ lowerBounds,
1875
+ saturationRange: [sMin, sMax],
1876
+ brightnessRange: [bMin, bMax]
1877
+ };
1878
+ }
1879
+ function loadColorBounds() {
1880
+ defineColor("monochrome", null, [[0, 0], [100, 0]]);
1881
+ defineColor("red", [-26, 18], [
1882
+ [20, 100],
1883
+ [30, 92],
1884
+ [40, 89],
1885
+ [50, 85],
1886
+ [60, 78],
1887
+ [70, 70],
1888
+ [80, 60],
1889
+ [90, 55],
1890
+ [100, 50]
1891
+ ]);
1892
+ defineColor("orange", [18, 46], [
1893
+ [20, 100],
1894
+ [30, 93],
1895
+ [40, 88],
1896
+ [50, 86],
1897
+ [60, 85],
1898
+ [70, 70],
1899
+ [100, 70]
1900
+ ]);
1901
+ defineColor("yellow", [46, 62], [
1902
+ [25, 100],
1903
+ [40, 94],
1904
+ [50, 89],
1905
+ [60, 86],
1906
+ [70, 84],
1907
+ [80, 82],
1908
+ [90, 80],
1909
+ [100, 75]
1910
+ ]);
1911
+ defineColor("green", [62, 178], [
1912
+ [30, 100],
1913
+ [40, 90],
1914
+ [50, 85],
1915
+ [60, 81],
1916
+ [70, 74],
1917
+ [80, 64],
1918
+ [90, 50],
1919
+ [100, 40]
1920
+ ]);
1921
+ defineColor("blue", [178, 257], [
1922
+ [20, 100],
1923
+ [30, 86],
1924
+ [40, 80],
1925
+ [50, 74],
1926
+ [60, 60],
1927
+ [70, 52],
1928
+ [80, 44],
1929
+ [90, 39],
1930
+ [100, 35]
1931
+ ]);
1932
+ defineColor("purple", [257, 282], [
1933
+ [20, 100],
1934
+ [30, 87],
1935
+ [40, 79],
1936
+ [50, 70],
1937
+ [60, 65],
1938
+ [70, 59],
1939
+ [80, 52],
1940
+ [90, 45],
1941
+ [100, 42]
1942
+ ]);
1943
+ defineColor("pink", [282, 334], [
1944
+ [20, 100],
1945
+ [30, 90],
1946
+ [40, 86],
1947
+ [60, 84],
1948
+ [80, 80],
1949
+ [90, 75],
1950
+ [100, 73]
1951
+ ]);
1952
+ }
1953
+ function HSVtoRGB(hsv) {
1954
+ var h = hsv[0];
1955
+ if (h === 0) h = 1;
1956
+ if (h === 360) h = 359;
1957
+ h = h / 360;
1958
+ var s = hsv[1] / 100, v = hsv[2] / 100;
1959
+ 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;
1960
+ switch (h_i) {
1961
+ case 0:
1962
+ r = v;
1963
+ g = t;
1964
+ b = p;
1965
+ break;
1966
+ case 1:
1967
+ r = q;
1968
+ g = v;
1969
+ b = p;
1970
+ break;
1971
+ case 2:
1972
+ r = p;
1973
+ g = v;
1974
+ b = t;
1975
+ break;
1976
+ case 3:
1977
+ r = p;
1978
+ g = q;
1979
+ b = v;
1980
+ break;
1981
+ case 4:
1982
+ r = t;
1983
+ g = p;
1984
+ b = v;
1985
+ break;
1986
+ case 5:
1987
+ r = v;
1988
+ g = p;
1989
+ b = q;
1990
+ }
1991
+ return [
1992
+ Math.floor(r * 255),
1993
+ Math.floor(g * 255),
1994
+ Math.floor(b * 255)
1995
+ ];
1996
+ }
1997
+ function HexToHSB(hex) {
1998
+ hex = hex.replace(/^#/, "");
1999
+ hex = hex.length === 3 ? hex.replace(/(.)/g, "$1$1") : hex;
2000
+ 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;
2001
+ var cMax = Math.max(red, green, blue), delta = cMax - Math.min(red, green, blue), saturation = cMax ? delta / cMax : 0;
2002
+ switch (cMax) {
2003
+ case red: return [
2004
+ 60 * ((green - blue) / delta % 6) || 0,
2005
+ saturation,
2006
+ cMax
2007
+ ];
2008
+ case green: return [
2009
+ 60 * ((blue - red) / delta + 2) || 0,
2010
+ saturation,
2011
+ cMax
2012
+ ];
2013
+ case blue: return [
2014
+ 60 * ((red - green) / delta + 4) || 0,
2015
+ saturation,
2016
+ cMax
2017
+ ];
2018
+ }
2019
+ }
2020
+ function HSVtoHSL(hsv) {
2021
+ var h = hsv[0], s = hsv[1] / 100, v = hsv[2] / 100, k = (2 - s) * v;
2022
+ return [
2023
+ h,
2024
+ Math.round(s * v / (k < 1 ? k : 2 - k) * 1e4) / 100,
2025
+ k / 2 * 100
2026
+ ];
2027
+ }
2028
+ function stringToInteger(string) {
2029
+ var total = 0;
2030
+ for (var i = 0; i !== string.length; i++) {
2031
+ if (total >= Number.MAX_SAFE_INTEGER) break;
2032
+ total += string.charCodeAt(i);
2033
+ }
2034
+ return total;
2035
+ }
2036
+ function getRealHueRange(colorHue) {
2037
+ if (!isNaN(colorHue)) {
2038
+ var number = parseInt(colorHue);
2039
+ if (number < 360 && number > 0) return getColorInfo(colorHue).hueRange;
2040
+ } else if (typeof colorHue === "string") {
2041
+ if (colorDictionary[colorHue]) {
2042
+ var color = colorDictionary[colorHue];
2043
+ if (color.hueRange) return color.hueRange;
2044
+ } else if (colorHue.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)) {
2045
+ var hue = HexToHSB(colorHue)[0];
2046
+ return getColorInfo(hue).hueRange;
2047
+ }
2048
+ }
2049
+ return [0, 360];
2050
+ }
2051
+ return randomColor;
2052
+ });
2053
+ })))(), 1);
2054
+ /**
2055
+ * Assign a color to a unique layer ID and also considering
2056
+ * common layer names such as water or wood.
2057
+ * @param layerId - a layer ID
2058
+ * @param alpha - alpha value for the color, default is 1
2059
+ * @return a color in rgba string format
2060
+ */
2061
+ function brightColor(layerId, alpha) {
2062
+ let luminosity = "bright";
2063
+ let hue = void 0;
2064
+ if (/water|ocean|lake|sea|river/.test(layerId)) hue = "blue";
2065
+ if (/state|country|place/.test(layerId)) hue = "pink";
2066
+ if (/road|highway|transport|streets/.test(layerId)) hue = "orange";
2067
+ if (/contour|building|earth/.test(layerId)) hue = "monochrome";
2068
+ if (/building/.test(layerId)) luminosity = "dark";
2069
+ if (/earth/.test(layerId)) luminosity = "light";
2070
+ if (/contour|landuse/.test(layerId)) hue = "yellow";
2071
+ if (/wood|forest|park|landcover|land|natural/.test(layerId)) hue = "green";
2072
+ return `rgba(${(0, import_randomColor.default)({
2073
+ luminosity,
2074
+ hue,
2075
+ seed: layerId,
2076
+ format: "rgbArray"
2077
+ }).join(", ")}, ${alpha || "1"})`;
2078
+ }
2079
+ var colors_default = { brightColor };
2080
+ //#endregion
2081
+ //#region \0@oxc-project+runtime@0.144.0/helpers/esm/asyncToGenerator.js
2082
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
2083
+ try {
2084
+ var i = n[a](c), u = i.value;
2085
+ } catch (n) {
2086
+ e(n);
2087
+ return;
2088
+ }
2089
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
2090
+ }
2091
+ function _asyncToGenerator(n) {
2092
+ return function() {
2093
+ var t = this, e = arguments;
2094
+ return new Promise(function(r, o) {
2095
+ var a = n.apply(t, e);
2096
+ function _next(n) {
2097
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
2098
+ }
2099
+ function _throw(n) {
2100
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
2101
+ }
2102
+ _next(void 0);
2103
+ });
2104
+ };
2105
+ }
2106
+ //#endregion
2107
+ //#region lib/MaplibreInspect.ts
2108
+ function isInspectStyle(style) {
2109
+ return style.metadata && style.metadata["maplibregl-inspect:inspect"];
2110
+ }
2111
+ function markInspectStyle(style) {
2112
+ return Object.assign(style, { metadata: Object.assign({}, style.metadata, { "maplibregl-inspect:inspect": true }) });
2113
+ }
2114
+ /**
2115
+ * Maplibre Inspect Control
2116
+ */
2117
+ var MaplibreInspect = class {
2118
+ constructor(options = {}) {
2119
+ var _this = this;
2120
+ var _options$popup;
2121
+ this._onSourceChange = function() {
2122
+ var _ref = _asyncToGenerator(function* (e) {
2123
+ if (e.sourceDataType === "visibility" || !e.isSourceLoaded) return;
2124
+ const previousSources = Object.assign({}, _this.sources);
2125
+ yield _this._setSourcesFromMap();
2126
+ if (!(0, import_lodash_isequal.default)(previousSources, _this.sources) && Object.keys(_this.sources).length > 0) setTimeout(() => _this.render(), 1e3);
2127
+ });
2128
+ return function(_x) {
2129
+ return _ref.apply(this, arguments);
2130
+ };
2131
+ }();
2132
+ this._onStyleChange = () => {
2133
+ const style = this._map.getStyle();
2134
+ if (!isInspectStyle(style)) this._originalStyle = style;
2135
+ };
2136
+ this._onRightClick = () => {
2137
+ if (!this.options.showMapPopupOnHover && !this.options.showInspectMapPopupOnHover && !this.options.blockHoverPopupOnClick) {
2138
+ if (this._popup) this._popup.remove();
2139
+ }
2140
+ };
2141
+ this._onMousemove = (e) => {
2142
+ if (this._showInspectMap) {
2143
+ if (!this.options.showInspectMapPopup) return;
2144
+ if (e.type === "mousemove" && !this.options.showInspectMapPopupOnHover) return;
2145
+ if (e.type === "click" && this.options.showInspectMapPopupOnHover && this.options.blockHoverPopupOnClick) this._popupBlocked = !this._popupBlocked;
2146
+ } else {
2147
+ if (!this.options.showMapPopup) return;
2148
+ if (e.type === "mousemove" && !this.options.showMapPopupOnHover) return;
2149
+ if (e.type === "click" && this.options.showMapPopupOnHover && this.options.blockHoverPopupOnClick) this._popupBlocked = !this._popupBlocked;
2150
+ }
2151
+ if (!this._popupBlocked && this._popup) {
2152
+ let queryBox;
2153
+ if (this.options.selectThreshold === 0) queryBox = e.point;
2154
+ else queryBox = [[e.point.x - this.options.selectThreshold, e.point.y + this.options.selectThreshold], [e.point.x + this.options.selectThreshold, e.point.y - this.options.selectThreshold]];
2155
+ const features = this._map.queryRenderedFeatures(queryBox, this.options.queryParameters) || [];
2156
+ this._map.getCanvas().style.cursor = features.length ? "pointer" : "";
2157
+ if (!features.length) this._popup.remove();
2158
+ else {
2159
+ this._popup.setLngLat(e.lngLat);
2160
+ const renderedPopup = this.options.renderPopup(features);
2161
+ if (typeof renderedPopup === "string") this._popup.setHTML(renderedPopup);
2162
+ else this._popup.setDOMContent(renderedPopup);
2163
+ this._popup.addTo(this._map);
2164
+ }
2165
+ }
2166
+ };
2167
+ const popup = (_options$popup = options.popup) !== null && _options$popup !== void 0 ? _options$popup : new Popup({
2168
+ closeButton: false,
2169
+ closeOnClick: false
2170
+ });
2171
+ this.options = Object.assign({
2172
+ showInspectMap: false,
2173
+ showInspectButton: true,
2174
+ showInspectMapPopup: true,
2175
+ showMapPopup: false,
2176
+ showMapPopupOnHover: true,
2177
+ showInspectMapPopupOnHover: true,
2178
+ blockHoverPopupOnClick: false,
2179
+ backgroundColor: "#fff",
2180
+ assignLayerColor: colors_default.brightColor,
2181
+ buildInspectStyle: stylegen_default.generateInspectStyle,
2182
+ renderPopup,
2183
+ popup,
2184
+ selectThreshold: 5,
2185
+ useInspectStyle: true,
2186
+ queryParameters: {},
2187
+ sources: {},
2188
+ toggleCallback() {},
2189
+ manageStyleOutside: false
2190
+ }, options);
2191
+ this.sources = this.options.sources;
2192
+ this.assignLayerColor = this.options.assignLayerColor;
2193
+ this._popup = this.options.popup;
2194
+ this._popupBlocked = false;
2195
+ this._showInspectMap = this.options.showInspectMap;
2196
+ this._toggle = new InspectButton({
2197
+ show: this.options.showInspectButton,
2198
+ onToggle: () => this.toggleInspector()
2199
+ });
2200
+ }
2201
+ toggleInspector() {
2202
+ this._showInspectMap = !this._showInspectMap;
2203
+ this._popupBlocked = false;
2204
+ this.options.toggleCallback(this._showInspectMap);
2205
+ this.render();
2206
+ }
2207
+ _inspectStyle() {
2208
+ const coloredLayers = stylegen_default.generateColoredLayers(this.sources, this.assignLayerColor);
2209
+ return this.options.buildInspectStyle(this._map.getStyle(), coloredLayers, { backgroundColor: this.options.backgroundColor });
2210
+ }
2211
+ render() {
2212
+ if (this._showInspectMap) {
2213
+ if (this.options.useInspectStyle) this._map.setStyle(markInspectStyle(this._inspectStyle()));
2214
+ this._toggle.setMapIcon();
2215
+ } else if (this._originalStyle) {
2216
+ if (this._popup) this._popup.remove();
2217
+ if (this.options.useInspectStyle) this._map.setStyle(this._originalStyle);
2218
+ this._toggle.setInspectIcon();
2219
+ }
2220
+ }
2221
+ _setSourcesFromMap() {
2222
+ var _this2 = this;
2223
+ return _asyncToGenerator(function* () {
2224
+ const style = _this2._map.getStyle();
2225
+ const mapStyleSourcesNames = Object.keys(style.sources);
2226
+ for (const sourceId of mapStyleSourcesNames) if (style.sources[sourceId].type === "geojson") _this2.sources[sourceId] = [];
2227
+ else if (style.sources[sourceId].type === "vector" && style.sources[sourceId].url) try {
2228
+ var _tileJSON$vector_laye;
2229
+ const tileJSON = yield (yield fetch(style.sources[sourceId].url)).json();
2230
+ const vectorLayerIds = tileJSON === null || tileJSON === void 0 || (_tileJSON$vector_laye = tileJSON.vector_layers) === null || _tileJSON$vector_laye === void 0 ? void 0 : _tileJSON$vector_laye.map((layer) => {
2231
+ return layer.id;
2232
+ });
2233
+ if (vectorLayerIds) _this2.sources[sourceId] = vectorLayerIds;
2234
+ else throw new Error("Missing vector_layers in source: " + sourceId);
2235
+ } catch (_unused) {
2236
+ console.warn("Unable to retrieve tileJSON from " + style.sources[sourceId].url + " using style's layers");
2237
+ for (const layer of style.layers) if ("source-layer" in layer && layer["source-layer"]) {
2238
+ const layerId = layer["source-layer"];
2239
+ if (!_this2.sources[sourceId]) _this2.sources[sourceId] = [];
2240
+ _this2.sources[sourceId].push(layerId);
2241
+ }
2242
+ }
2243
+ for (const sourceId of Object.keys(_this2.sources)) if (mapStyleSourcesNames.indexOf(sourceId) === -1) delete _this2.sources[sourceId];
2244
+ else _this2.sources[sourceId] = [...new Set(_this2.sources[sourceId])];
2245
+ })();
2246
+ }
2247
+ /**
2248
+ * This will set the original style of the map
2249
+ * It will also update the sources assuming the map has already been loaded
2250
+ * @param style - The original style
2251
+ */
2252
+ setOriginalStyle(style) {
2253
+ this._originalStyle = style;
2254
+ this._setSourcesFromMap();
2255
+ }
2256
+ /** @inheritdoc */
2257
+ onAdd(map) {
2258
+ this._map = map;
2259
+ if (Object.keys(this.sources).length === 0) map.on("sourcedata", this._onSourceChange);
2260
+ map.on("styledata", this._onStyleChange);
2261
+ map.on("load", this._onStyleChange);
2262
+ map.on("mousemove", this._onMousemove);
2263
+ map.on("click", this._onMousemove);
2264
+ map.on("contextmenu", this._onRightClick);
2265
+ return this._toggle.elem;
2266
+ }
2267
+ /** @inheritdoc */
2268
+ onRemove() {
2269
+ this._map.off("styledata", this._onStyleChange);
2270
+ this._map.off("load", this._onStyleChange);
2271
+ this._map.off("sourcedata", this._onSourceChange);
2272
+ this._map.off("mousemove", this._onMousemove);
2273
+ this._map.off("click", this._onMousemove);
2274
+ this._map.off("contextmenu", this._onRightClick);
2275
+ const elem = this._toggle.elem;
2276
+ elem.parentNode.removeChild(elem);
2277
+ this._map = void 0;
2278
+ }
2279
+ };
2280
+ //#endregion
2281
+ //#region index.ts
2282
+ var maplibre_gl_inspect_default = MaplibreInspect;
2283
+ //#endregion
2284
+ export { maplibre_gl_inspect_default as default };
2285
+
2286
+ //# sourceMappingURL=maplibre-gl-inspect.mjs.map