mobility-toolbox-js 3.0.0-beta.20 → 3.0.0-beta.22

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.
package/mbt.js CHANGED
@@ -402,139 +402,6 @@
402
402
  }
403
403
  });
404
404
 
405
- // node_modules/lodash.debounce/index.js
406
- var require_lodash = __commonJS({
407
- "node_modules/lodash.debounce/index.js"(exports, module) {
408
- var FUNC_ERROR_TEXT = "Expected a function";
409
- var NAN = 0 / 0;
410
- var symbolTag = "[object Symbol]";
411
- var reTrim = /^\s+|\s+$/g;
412
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
413
- var reIsBinary = /^0b[01]+$/i;
414
- var reIsOctal = /^0o[0-7]+$/i;
415
- var freeParseInt = parseInt;
416
- var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
417
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
418
- var root = freeGlobal || freeSelf || Function("return this")();
419
- var objectProto = Object.prototype;
420
- var objectToString = objectProto.toString;
421
- var nativeMax = Math.max;
422
- var nativeMin = Math.min;
423
- var now = function() {
424
- return root.Date.now();
425
- };
426
- function debounce5(func, wait, options) {
427
- var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
428
- if (typeof func != "function") {
429
- throw new TypeError(FUNC_ERROR_TEXT);
430
- }
431
- wait = toNumber(wait) || 0;
432
- if (isObject2(options)) {
433
- leading = !!options.leading;
434
- maxing = "maxWait" in options;
435
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
436
- trailing = "trailing" in options ? !!options.trailing : trailing;
437
- }
438
- function invokeFunc(time) {
439
- var args = lastArgs, thisArg = lastThis;
440
- lastArgs = lastThis = void 0;
441
- lastInvokeTime = time;
442
- result = func.apply(thisArg, args);
443
- return result;
444
- }
445
- function leadingEdge(time) {
446
- lastInvokeTime = time;
447
- timerId = setTimeout(timerExpired, wait);
448
- return leading ? invokeFunc(time) : result;
449
- }
450
- function remainingWait(time) {
451
- var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, result2 = wait - timeSinceLastCall;
452
- return maxing ? nativeMin(result2, maxWait - timeSinceLastInvoke) : result2;
453
- }
454
- function shouldInvoke(time) {
455
- var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
456
- return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
457
- }
458
- function timerExpired() {
459
- var time = now();
460
- if (shouldInvoke(time)) {
461
- return trailingEdge(time);
462
- }
463
- timerId = setTimeout(timerExpired, remainingWait(time));
464
- }
465
- function trailingEdge(time) {
466
- timerId = void 0;
467
- if (trailing && lastArgs) {
468
- return invokeFunc(time);
469
- }
470
- lastArgs = lastThis = void 0;
471
- return result;
472
- }
473
- function cancel() {
474
- if (timerId !== void 0) {
475
- clearTimeout(timerId);
476
- }
477
- lastInvokeTime = 0;
478
- lastArgs = lastCallTime = lastThis = timerId = void 0;
479
- }
480
- function flush() {
481
- return timerId === void 0 ? result : trailingEdge(now());
482
- }
483
- function debounced() {
484
- var time = now(), isInvoking = shouldInvoke(time);
485
- lastArgs = arguments;
486
- lastThis = this;
487
- lastCallTime = time;
488
- if (isInvoking) {
489
- if (timerId === void 0) {
490
- return leadingEdge(lastCallTime);
491
- }
492
- if (maxing) {
493
- timerId = setTimeout(timerExpired, wait);
494
- return invokeFunc(lastCallTime);
495
- }
496
- }
497
- if (timerId === void 0) {
498
- timerId = setTimeout(timerExpired, wait);
499
- }
500
- return result;
501
- }
502
- debounced.cancel = cancel;
503
- debounced.flush = flush;
504
- return debounced;
505
- }
506
- function isObject2(value) {
507
- var type = typeof value;
508
- return !!value && (type == "object" || type == "function");
509
- }
510
- function isObjectLike(value) {
511
- return !!value && typeof value == "object";
512
- }
513
- function isSymbol(value) {
514
- return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
515
- }
516
- function toNumber(value) {
517
- if (typeof value == "number") {
518
- return value;
519
- }
520
- if (isSymbol(value)) {
521
- return NAN;
522
- }
523
- if (isObject2(value)) {
524
- var other = typeof value.valueOf == "function" ? value.valueOf() : value;
525
- value = isObject2(other) ? other + "" : other;
526
- }
527
- if (typeof value != "string") {
528
- return value === 0 ? value : +value;
529
- }
530
- value = value.replace(reTrim, "");
531
- var isBinary = reIsBinary.test(value);
532
- return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
533
- }
534
- module.exports = debounce5;
535
- }
536
- });
537
-
538
405
  // node_modules/maplibre-gl/dist/maplibre-gl.js
539
406
  var require_maplibre_gl = __commonJS({
540
407
  "node_modules/maplibre-gl/dist/maplibre-gl.js"(exports, module) {
@@ -17929,6 +17796,139 @@ uniform ${i3} ${a3} u_${s3};
17929
17796
  }
17930
17797
  });
17931
17798
 
17799
+ // node_modules/lodash.debounce/index.js
17800
+ var require_lodash = __commonJS({
17801
+ "node_modules/lodash.debounce/index.js"(exports, module) {
17802
+ var FUNC_ERROR_TEXT = "Expected a function";
17803
+ var NAN = 0 / 0;
17804
+ var symbolTag = "[object Symbol]";
17805
+ var reTrim = /^\s+|\s+$/g;
17806
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
17807
+ var reIsBinary = /^0b[01]+$/i;
17808
+ var reIsOctal = /^0o[0-7]+$/i;
17809
+ var freeParseInt = parseInt;
17810
+ var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
17811
+ var freeSelf = typeof self == "object" && self && self.Object === Object && self;
17812
+ var root = freeGlobal || freeSelf || Function("return this")();
17813
+ var objectProto = Object.prototype;
17814
+ var objectToString = objectProto.toString;
17815
+ var nativeMax = Math.max;
17816
+ var nativeMin = Math.min;
17817
+ var now = function() {
17818
+ return root.Date.now();
17819
+ };
17820
+ function debounce7(func, wait, options) {
17821
+ var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
17822
+ if (typeof func != "function") {
17823
+ throw new TypeError(FUNC_ERROR_TEXT);
17824
+ }
17825
+ wait = toNumber(wait) || 0;
17826
+ if (isObject2(options)) {
17827
+ leading = !!options.leading;
17828
+ maxing = "maxWait" in options;
17829
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
17830
+ trailing = "trailing" in options ? !!options.trailing : trailing;
17831
+ }
17832
+ function invokeFunc(time) {
17833
+ var args = lastArgs, thisArg = lastThis;
17834
+ lastArgs = lastThis = void 0;
17835
+ lastInvokeTime = time;
17836
+ result = func.apply(thisArg, args);
17837
+ return result;
17838
+ }
17839
+ function leadingEdge(time) {
17840
+ lastInvokeTime = time;
17841
+ timerId = setTimeout(timerExpired, wait);
17842
+ return leading ? invokeFunc(time) : result;
17843
+ }
17844
+ function remainingWait(time) {
17845
+ var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, result2 = wait - timeSinceLastCall;
17846
+ return maxing ? nativeMin(result2, maxWait - timeSinceLastInvoke) : result2;
17847
+ }
17848
+ function shouldInvoke(time) {
17849
+ var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
17850
+ return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
17851
+ }
17852
+ function timerExpired() {
17853
+ var time = now();
17854
+ if (shouldInvoke(time)) {
17855
+ return trailingEdge(time);
17856
+ }
17857
+ timerId = setTimeout(timerExpired, remainingWait(time));
17858
+ }
17859
+ function trailingEdge(time) {
17860
+ timerId = void 0;
17861
+ if (trailing && lastArgs) {
17862
+ return invokeFunc(time);
17863
+ }
17864
+ lastArgs = lastThis = void 0;
17865
+ return result;
17866
+ }
17867
+ function cancel() {
17868
+ if (timerId !== void 0) {
17869
+ clearTimeout(timerId);
17870
+ }
17871
+ lastInvokeTime = 0;
17872
+ lastArgs = lastCallTime = lastThis = timerId = void 0;
17873
+ }
17874
+ function flush() {
17875
+ return timerId === void 0 ? result : trailingEdge(now());
17876
+ }
17877
+ function debounced() {
17878
+ var time = now(), isInvoking = shouldInvoke(time);
17879
+ lastArgs = arguments;
17880
+ lastThis = this;
17881
+ lastCallTime = time;
17882
+ if (isInvoking) {
17883
+ if (timerId === void 0) {
17884
+ return leadingEdge(lastCallTime);
17885
+ }
17886
+ if (maxing) {
17887
+ timerId = setTimeout(timerExpired, wait);
17888
+ return invokeFunc(lastCallTime);
17889
+ }
17890
+ }
17891
+ if (timerId === void 0) {
17892
+ timerId = setTimeout(timerExpired, wait);
17893
+ }
17894
+ return result;
17895
+ }
17896
+ debounced.cancel = cancel;
17897
+ debounced.flush = flush;
17898
+ return debounced;
17899
+ }
17900
+ function isObject2(value) {
17901
+ var type = typeof value;
17902
+ return !!value && (type == "object" || type == "function");
17903
+ }
17904
+ function isObjectLike(value) {
17905
+ return !!value && typeof value == "object";
17906
+ }
17907
+ function isSymbol(value) {
17908
+ return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
17909
+ }
17910
+ function toNumber(value) {
17911
+ if (typeof value == "number") {
17912
+ return value;
17913
+ }
17914
+ if (isSymbol(value)) {
17915
+ return NAN;
17916
+ }
17917
+ if (isObject2(value)) {
17918
+ var other = typeof value.valueOf == "function" ? value.valueOf() : value;
17919
+ value = isObject2(other) ? other + "" : other;
17920
+ }
17921
+ if (typeof value != "string") {
17922
+ return value === 0 ? value : +value;
17923
+ }
17924
+ value = value.replace(reTrim, "");
17925
+ var isBinary = reIsBinary.test(value);
17926
+ return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
17927
+ }
17928
+ module.exports = debounce7;
17929
+ }
17930
+ });
17931
+
17932
17932
  // node_modules/lodash.throttle/index.js
17933
17933
  var require_lodash2 = __commonJS({
17934
17934
  "node_modules/lodash.throttle/index.js"(exports, module) {
@@ -17950,7 +17950,7 @@ uniform ${i3} ${a3} u_${s3};
17950
17950
  var now = function() {
17951
17951
  return root.Date.now();
17952
17952
  };
17953
- function debounce5(func, wait, options) {
17953
+ function debounce7(func, wait, options) {
17954
17954
  var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
17955
17955
  if (typeof func != "function") {
17956
17956
  throw new TypeError(FUNC_ERROR_TEXT);
@@ -18039,7 +18039,7 @@ uniform ${i3} ${a3} u_${s3};
18039
18039
  leading = "leading" in options ? !!options.leading : leading;
18040
18040
  trailing = "trailing" in options ? !!options.trailing : trailing;
18041
18041
  }
18042
- return debounce5(func, wait, {
18042
+ return debounce7(func, wait, {
18043
18043
  "leading": leading,
18044
18044
  "maxWait": wait,
18045
18045
  "trailing": trailing
@@ -26271,12 +26271,9 @@ uniform ${i3} ${a3} u_${s3};
26271
26271
  * Unsubscribe from current departures channel.
26272
26272
  * @param {number} stationId UIC of the station.
26273
26273
  * @param {function(data: { content: RealtimeDeparture[] })} onMessage Callback function to unsubscribe. If null all subscriptions for the channel will be unsubscribed.
26274
- * @deprecated Use unsubscribeTimetabe instead.
26274
+ * @deprecated Use RealtimeAPI.unsubscribeTimetabe instead.
26275
26275
  */
26276
26276
  unsubscribeDepartures(stationId, onMessage) {
26277
- console.log(
26278
- "RealtimeAPI.unsubscribeDepartures is deprecated. Use RealtimeAPI.unsubscribeTimetabe instead."
26279
- );
26280
26277
  this.unsubscribeTimetabe(stationId, onMessage);
26281
26278
  }
26282
26279
  /**
@@ -26513,7 +26510,7 @@ uniform ${i3} ${a3} u_${s3};
26513
26510
  * @public
26514
26511
  */
26515
26512
  constructor(options = {}) {
26516
- super({ url: "https://api.geops.io/stops/v1/", ...options });
26513
+ super({ ...options, url: options.url || "https://api.geops.io/stops/v1/" });
26517
26514
  }
26518
26515
  /**
26519
26516
  * Search for stops.
@@ -51977,9 +51974,6 @@ uniform ${i3} ${a3} u_${s3};
51977
51974
  };
51978
51975
  var StopFinderControl_default = StopFinderControl;
51979
51976
 
51980
- // src/ol/layers/MaplibreLayer.ts
51981
- var import_lodash2 = __toESM(require_lodash());
51982
-
51983
51977
  // node_modules/@geoblocks/ol-maplibre-layer/lib/MapLibreLayer.js
51984
51978
  var import_maplibre_gl = __toESM(require_maplibre_gl(), 1);
51985
51979
 
@@ -52185,11 +52179,18 @@ uniform ${i3} ${a3} u_${s3};
52185
52179
  }
52186
52180
  };
52187
52181
 
52182
+ // src/ol/layers/MaplibreLayer.ts
52183
+ var import_lodash2 = __toESM(require_lodash());
52184
+
52188
52185
  // src/ol/mixins/PropertiesLayerMixin.ts
52189
52186
  var import_lodash = __toESM(require_lodash());
52190
- var deprecated = (0, import_lodash.default)((message) => {
52191
- console.warn(message);
52192
- }, 1e3);
52187
+ var deprecated = () => {
52188
+ };
52189
+ if (typeof window !== "undefined" && new URLSearchParams(window.location.search).get("deprecated")) {
52190
+ deprecated = (0, import_lodash.default)((message) => {
52191
+ console.warn(message);
52192
+ }, 1e3);
52193
+ }
52193
52194
  function PropertiesLayerMixin(Base) {
52194
52195
  return class PropertiesLayer extends Base {
52195
52196
  constructor(...args) {
@@ -52349,6 +52350,10 @@ uniform ${i3} ${a3} u_${s3};
52349
52350
  );
52350
52351
  }
52351
52352
  /** @deprecated */
52353
+ // get olListenersKeys(): EventsKey[] {
52354
+ // return this.olEventsKeys;
52355
+ // }
52356
+ /** @deprecated */
52352
52357
  get parent() {
52353
52358
  deprecated(
52354
52359
  "Layer.parent is deprecated. Use the Layer.get('parent') method instead."
@@ -52396,37 +52401,14 @@ uniform ${i3} ${a3} u_${s3};
52396
52401
  [apiKeyName]: apiKey
52397
52402
  }).toString();
52398
52403
  };
52404
+ var deprecated2 = () => {
52405
+ };
52406
+ if (typeof window !== "undefined" && new URLSearchParams(window.location.search).get("deprecated")) {
52407
+ deprecated2 = (0, import_lodash2.default)((message) => {
52408
+ console.warn(message);
52409
+ }, 1e3);
52410
+ }
52399
52411
  var MaplibreLayer = class _MaplibreLayer extends MobilityLayerMixin_default(MapLibreLayer) {
52400
- get mbMap() {
52401
- console.warn("MaplibreLayer.mbMap is deprecated. Use layer.maplibreMap.");
52402
- return this.maplibreMap;
52403
- }
52404
- get maplibreMap() {
52405
- console.warn(
52406
- "MaplibreLayer.maplibreMap is deprecated. Use layer.mapLibreMap."
52407
- );
52408
- return this.mapLibreMap;
52409
- }
52410
- // get queryRenderedFeaturesOptions(): maplibregl.QueryRenderedFeaturesOptions {
52411
- // return this.get('queryRenderedFeaturesOptions');
52412
- // }
52413
- // set queryRenderedFeaturesOptions(
52414
- // newValue: maplibregl.QueryRenderedFeaturesOptions,
52415
- // ) {
52416
- // this.set('queryRenderedFeaturesOptions', newValue);
52417
- // }
52418
- get style() {
52419
- return this.get("style");
52420
- }
52421
- set style(newValue) {
52422
- this.set("style", newValue);
52423
- }
52424
- get url() {
52425
- return this.get("url");
52426
- }
52427
- set url(newValue) {
52428
- this.set("url", newValue);
52429
- }
52430
52412
  /**
52431
52413
  * Constructor.
52432
52414
  *
@@ -52467,6 +52449,7 @@ uniform ${i3} ${a3} u_${s3};
52467
52449
  this.updateMaplibreMap.bind(this),
52468
52450
  150
52469
52451
  );
52452
+ updateMaplibreMapDebounced();
52470
52453
  this.olEventsKeys.push(
52471
52454
  this.on("propertychange", (evt) => {
52472
52455
  if (/(url|style)/.test(evt.key)) {
@@ -52475,6 +52458,25 @@ uniform ${i3} ${a3} u_${s3};
52475
52458
  })
52476
52459
  );
52477
52460
  }
52461
+ // get queryRenderedFeaturesOptions(): maplibregl.QueryRenderedFeaturesOptions {
52462
+ // return this.get('queryRenderedFeaturesOptions');
52463
+ // }
52464
+ // set queryRenderedFeaturesOptions(
52465
+ // newValue: maplibregl.QueryRenderedFeaturesOptions,
52466
+ // ) {
52467
+ // this.set('queryRenderedFeaturesOptions', newValue);
52468
+ // }
52469
+ /**
52470
+ * Create a copy of the MaplibreLayer.
52471
+ * @param {MaplibreLayerOptions} newOptions Options to override
52472
+ * @return {MaplibreLayer} A MaplibreLayer layer
52473
+ */
52474
+ clone(newOptions) {
52475
+ return new _MaplibreLayer({
52476
+ ...this.options || {},
52477
+ ...newOptions || {}
52478
+ });
52479
+ }
52478
52480
  getStyle() {
52479
52481
  if (this.style && typeof this.style === "object" && this.style.name && this.style.version) {
52480
52482
  return this.style;
@@ -52496,20 +52498,34 @@ uniform ${i3} ${a3} u_${s3};
52496
52498
  console.error("Error while updating MaplibreMap", e);
52497
52499
  }
52498
52500
  }
52499
- /**
52500
- * Create a copy of the MaplibreLayer.
52501
- * @param {MaplibreLayerOptions} newOptions Options to override
52502
- * @return {MaplibreLayer} A MaplibreLayer layer
52503
- */
52504
- clone(newOptions) {
52505
- return new _MaplibreLayer({
52506
- ...this.options || {},
52507
- ...newOptions || {}
52508
- });
52501
+ get maplibreMap() {
52502
+ deprecated2(
52503
+ "MaplibreLayer.maplibreMap is deprecated. Use layer.mapLibreMap."
52504
+ );
52505
+ return this.mapLibreMap;
52506
+ }
52507
+ get mbMap() {
52508
+ deprecated2("MaplibreLayer.mbMap is deprecated. Use layer.maplibreMap.");
52509
+ return this.maplibreMap;
52510
+ }
52511
+ get style() {
52512
+ return this.get("style");
52513
+ }
52514
+ set style(newValue) {
52515
+ this.set("style", newValue);
52516
+ }
52517
+ get url() {
52518
+ return this.get("url");
52519
+ }
52520
+ set url(newValue) {
52521
+ this.set("url", newValue);
52509
52522
  }
52510
52523
  };
52511
52524
  var MaplibreLayer_default = MaplibreLayer;
52512
52525
 
52526
+ // src/ol/layers/MaplibreStyleLayer.ts
52527
+ var import_lodash3 = __toESM(require_lodash());
52528
+
52513
52529
  // src/ol/renderers/MaplibreStyleLayerRenderer.ts
52514
52530
  var formats2 = {
52515
52531
  "EPSG:3857": new GeoJSON_default({
@@ -52591,6 +52607,13 @@ uniform ${i3} ${a3} u_${s3};
52591
52607
  };
52592
52608
 
52593
52609
  // src/ol/layers/MaplibreStyleLayer.ts
52610
+ var deprecated3 = () => {
52611
+ };
52612
+ if (typeof window !== "undefined" && new URLSearchParams(window.location.search).get("deprecated")) {
52613
+ deprecated3 = (0, import_lodash3.default)((...messages) => {
52614
+ console.warn(...messages);
52615
+ }, 1e3);
52616
+ }
52594
52617
  var MaplibreStyleLayer = class _MaplibreStyleLayer extends MobilityLayerMixin_default(Layer_default) {
52595
52618
  /**
52596
52619
  * Constructor.
@@ -52606,7 +52629,7 @@ uniform ${i3} ${a3} u_${s3};
52606
52629
  mapLibreOptions: { style: { layers: [], sources: {}, version: 8 } }
52607
52630
  }) {
52608
52631
  if (options.mapboxLayer) {
52609
- console.warn(
52632
+ deprecated3(
52610
52633
  "options.mapboxLayer is deprecated. Use options.maplibreLayer instead."
52611
52634
  );
52612
52635
  options.maplibreLayer = options.mapboxLayer;
@@ -52751,7 +52774,7 @@ uniform ${i3} ${a3} u_${s3};
52751
52774
  * @return {Promise<FeatureInfo>} Promise with features, layer and coordinate.
52752
52775
  */
52753
52776
  getFeatureInfoAtCoordinate(coordinate) {
52754
- console.warn(
52777
+ deprecated3(
52755
52778
  `Deprecated. getFeatureInfoAtCoordinate([layer], coordinate) from ol package instead.`
52756
52779
  );
52757
52780
  if (!this.maplibreLayer?.mapLibreMap) {
@@ -52780,7 +52803,7 @@ uniform ${i3} ${a3} u_${s3};
52780
52803
  * @private
52781
52804
  */
52782
52805
  highlight(features = []) {
52783
- console.warn(
52806
+ deprecated3(
52784
52807
  `Deprecated. Use layer.setFeatureState(features, {highlighted: true}) instead.`
52785
52808
  );
52786
52809
  const filtered = this.highlightedFeatures?.filter(
@@ -52843,7 +52866,7 @@ uniform ${i3} ${a3} u_${s3};
52843
52866
  * @private
52844
52867
  */
52845
52868
  select(features = []) {
52846
- console.warn(
52869
+ deprecated3(
52847
52870
  `Deprecated. Use layer.setFeatureState(features, {selected: true}) instead.`
52848
52871
  );
52849
52872
  this.setHoverState(this.selectedFeatures || [], false);
@@ -52865,9 +52888,8 @@ uniform ${i3} ${a3} u_${s3};
52865
52888
  const { source, sourceLayer } = feature2.get(VECTOR_TILE_FEATURE_PROPERTY) || {};
52866
52889
  if (!source && !sourceLayer || !feature2.getId()) {
52867
52890
  if (!feature2.getId()) {
52868
- console.warn(
52891
+ deprecated3(
52869
52892
  "No feature's id found. To use the feature state functionnality, tiles must be generated with --generate-ids. See https://github.com/Maplibre/tippecanoe#adding-calculated-attributes.",
52870
- feature2.getId(),
52871
52893
  feature2.getProperties()
52872
52894
  );
52873
52895
  }
@@ -52890,7 +52912,7 @@ uniform ${i3} ${a3} u_${s3};
52890
52912
  * @private
52891
52913
  */
52892
52914
  setHoverState(features, state) {
52893
- console.warn(
52915
+ deprecated3(
52894
52916
  `Deprecated. Use layer.setFeatureState(features, {hover: ${state}}) instead.`
52895
52917
  );
52896
52918
  this.setFeatureState(features, { hover: state });
@@ -52914,7 +52936,7 @@ uniform ${i3} ${a3} u_${s3};
52914
52936
  this.set("layersFilter", newValue);
52915
52937
  }
52916
52938
  get mapboxLayer() {
52917
- console.warn("Deprecated. Use maplibreLayer instead.");
52939
+ deprecated3("Deprecated. Use maplibreLayer instead.");
52918
52940
  return this.get("maplibreLayer");
52919
52941
  }
52920
52942
  get maplibreLayer() {
@@ -52955,7 +52977,7 @@ uniform ${i3} ${a3} u_${s3};
52955
52977
  * @deprecated
52956
52978
  */
52957
52979
  get styleLayer() {
52958
- console.warn(
52980
+ deprecated3(
52959
52981
  "MaplibreStyleLayer.styleLayer is deprecated. Use MaplibreStyleLayer.layer instead."
52960
52982
  );
52961
52983
  return this.layers[0];
@@ -52964,7 +52986,7 @@ uniform ${i3} ${a3} u_${s3};
52964
52986
  * @deprecated
52965
52987
  */
52966
52988
  set styleLayer(newValue) {
52967
- console.warn(
52989
+ deprecated3(
52968
52990
  "MaplibreStyleLayer.styleLayer is deprecated. Use MaplibreStyleLayer.layer instead."
52969
52991
  );
52970
52992
  this.layers = [newValue];
@@ -52976,7 +52998,7 @@ uniform ${i3} ${a3} u_${s3};
52976
52998
  * @deprecated
52977
52999
  */
52978
53000
  get styleLayers() {
52979
- console.warn(
53001
+ deprecated3(
52980
53002
  "MaplibreStyleLayer.styleLayers is deprecated. Use MaplibreStyleLayer.layers instead."
52981
53003
  );
52982
53004
  return this.layers;
@@ -52985,7 +53007,7 @@ uniform ${i3} ${a3} u_${s3};
52985
53007
  * @deprecated
52986
53008
  */
52987
53009
  set styleLayers(newValue) {
52988
- console.warn(
53010
+ deprecated3(
52989
53011
  "MaplibreStyleLayer.styleLayers is deprecated. Use MaplibreStyleLayer.layers instead."
52990
53012
  );
52991
53013
  this.layers = newValue;
@@ -52994,11 +53016,11 @@ uniform ${i3} ${a3} u_${s3};
52994
53016
  var MaplibreStyleLayer_default = MaplibreStyleLayer;
52995
53017
 
52996
53018
  // src/ol/layers/RealtimeLayer.ts
52997
- var import_lodash5 = __toESM(require_lodash());
53019
+ var import_lodash6 = __toESM(require_lodash());
52998
53020
 
52999
53021
  // src/common/mixins/RealtimeLayerMixin.ts
53000
- var import_lodash3 = __toESM(require_lodash());
53001
- var import_lodash4 = __toESM(require_lodash2());
53022
+ var import_lodash4 = __toESM(require_lodash());
53023
+ var import_lodash5 = __toESM(require_lodash2());
53002
53024
  function RealtimeLayerMixin(Base) {
53003
53025
  return class Mixin extends Base {
53004
53026
  constructor(options) {
@@ -53077,12 +53099,12 @@ uniform ${i3} ${a3} u_${s3};
53077
53099
  return this.renderTimeIntervalByZoom[zoom];
53078
53100
  };
53079
53101
  this.isUpdateBboxOnMoveEnd = options.isUpdateBboxOnMoveEnd !== false;
53080
- this.throttleRenderTrajectories = (0, import_lodash4.default)(
53102
+ this.throttleRenderTrajectories = (0, import_lodash5.default)(
53081
53103
  this.renderTrajectoriesInternal,
53082
53104
  50,
53083
53105
  { leading: false, trailing: true }
53084
53106
  );
53085
- this.debounceRenderTrajectories = (0, import_lodash3.default)(
53107
+ this.debounceRenderTrajectories = (0, import_lodash4.default)(
53086
53108
  this.renderTrajectoriesInternal,
53087
53109
  50,
53088
53110
  { leading: true, maxWait: 5e3, trailing: true }
@@ -53367,13 +53389,13 @@ uniform ${i3} ${a3} u_${s3};
53367
53389
  const nextTick = Math.max(25, timeStep / (this.speed || 1));
53368
53390
  const nextThrottleTick = Math.min(nextTick, 500);
53369
53391
  if (this.useThrottle) {
53370
- this.throttleRenderTrajectories = (0, import_lodash4.default)(
53392
+ this.throttleRenderTrajectories = (0, import_lodash5.default)(
53371
53393
  this.renderTrajectoriesInternal,
53372
53394
  nextThrottleTick,
53373
53395
  { leading: true, trailing: true }
53374
53396
  );
53375
53397
  } else if (this.useDebounce) {
53376
- this.debounceRenderTrajectories = (0, import_lodash3.default)(
53398
+ this.debounceRenderTrajectories = (0, import_lodash4.default)(
53377
53399
  this.renderTrajectoriesInternal,
53378
53400
  nextThrottleTick,
53379
53401
  { leading: true, maxWait: 5e3, trailing: true }
@@ -54068,8 +54090,8 @@ uniform ${i3} ${a3} u_${s3};
54068
54090
  rotation: 0,
54069
54091
  zoom: void 0
54070
54092
  };
54071
- this.onZoomEndDebounced = (0, import_lodash5.default)(this.onZoomEnd, 100);
54072
- this.onMoveEndDebounced = (0, import_lodash5.default)(this.onMoveEnd, 100);
54093
+ this.onZoomEndDebounced = (0, import_lodash6.default)(this.onZoomEnd, 100);
54094
+ this.onMoveEndDebounced = (0, import_lodash6.default)(this.onMoveEnd, 100);
54073
54095
  }
54074
54096
  /** @private */
54075
54097
  attachToMap(map) {
@@ -54322,10 +54344,18 @@ uniform ${i3} ${a3} u_${s3};
54322
54344
  var RealtimeLayer_default = RealtimeLayer;
54323
54345
 
54324
54346
  // src/ol/layers/Layer.ts
54347
+ var import_lodash7 = __toESM(require_lodash());
54348
+ var deprecated4 = () => {
54349
+ };
54350
+ if (typeof window !== "undefined" && new URLSearchParams(window.location.search).get("deprecated")) {
54351
+ deprecated4 = (0, import_lodash7.default)((message) => {
54352
+ console.warn(message);
54353
+ }, 1e3);
54354
+ }
54325
54355
  var Layer2 = class _Layer extends MobilityLayerMixin_default(Layer_default) {
54326
54356
  constructor(options) {
54327
54357
  super(options);
54328
- console.warn("Layer is deprecated. Use an OpenLayers Layer instead.");
54358
+ deprecated4("Layer is deprecated. Use an OpenLayers Layer instead.");
54329
54359
  }
54330
54360
  clone(newOptions) {
54331
54361
  return new _Layer({
@@ -54338,6 +54368,12 @@ uniform ${i3} ${a3} u_${s3};
54338
54368
 
54339
54369
  // src/ol/layers/VectorLayer.ts
54340
54370
  var VectorLayer2 = class _VectorLayer extends Layer_default4 {
54371
+ /**
54372
+ * @deprecated
54373
+ */
54374
+ clone(newOptions) {
54375
+ return new _VectorLayer({ ...this.options, ...newOptions });
54376
+ }
54341
54377
  /**
54342
54378
  * @deprecated
54343
54379
  */
@@ -54346,22 +54382,16 @@ uniform ${i3} ${a3} u_${s3};
54346
54382
  if (this.map) {
54347
54383
  const pixel = this.map.getPixelFromCoordinate(coordinate);
54348
54384
  features = this.map.getFeaturesAtPixel(pixel, {
54349
- layerFilter: (l) => l === this.olLayer,
54350
- hitTolerance: this.hitTolerance || 5
54351
- });
54385
+ hitTolerance: this.hitTolerance || 5,
54386
+ layerFilter: (l) => l === this.olLayer
54387
+ }) || [];
54352
54388
  }
54353
54389
  return Promise.resolve({
54390
+ coordinate,
54354
54391
  features,
54355
- layer: this,
54356
- coordinate
54392
+ layer: this
54357
54393
  });
54358
54394
  }
54359
- /**
54360
- * @deprecated
54361
- */
54362
- clone(newOptions) {
54363
- return new _VectorLayer({ ...this.options, ...newOptions });
54364
- }
54365
54395
  };
54366
54396
  var VectorLayer_default2 = VectorLayer2;
54367
54397