@mapvx/web-js 2.0.2 → 3.0.0-dev.1

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 (66) hide show
  1. package/dist/cjs/controllers/routeController.js +26 -4
  2. package/dist/cjs/controllers/routeController.js.map +1 -1
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/infrastructure/cache/CacheManager.js.map +1 -1
  5. package/dist/cjs/logger/logger.js +2 -3
  6. package/dist/cjs/logger/logger.js.map +1 -1
  7. package/dist/cjs/logger/sentry.js +1 -1
  8. package/dist/cjs/map/map.js +123 -49
  9. package/dist/cjs/map/map.js.map +1 -1
  10. package/dist/cjs/map/scene3DController.js +93 -8
  11. package/dist/cjs/map/scene3DController.js.map +1 -1
  12. package/dist/cjs/repository/repository.js +21 -21
  13. package/dist/cjs/repository/repository.js.map +1 -1
  14. package/dist/cjs/sdk.js +21 -21
  15. package/dist/cjs/sdk.js.map +1 -1
  16. package/dist/cjs/utils/3d.js +34 -0
  17. package/dist/cjs/utils/3d.js.map +1 -1
  18. package/dist/cjs/utils/opening-hours-helper.js +22 -19
  19. package/dist/cjs/utils/opening-hours-helper.js.map +1 -1
  20. package/dist/cjs/utils/semaphore.js.map +1 -1
  21. package/dist/es/controllers/routeController.d.ts +8 -0
  22. package/dist/es/controllers/routeController.d.ts.map +1 -1
  23. package/dist/es/controllers/routeController.js +26 -4
  24. package/dist/es/controllers/routeController.js.map +1 -1
  25. package/dist/es/domain/models/route.d.ts +1 -1
  26. package/dist/es/domain/models/route.d.ts.map +1 -1
  27. package/dist/es/domain/models/scene3D.d.ts +34 -0
  28. package/dist/es/domain/models/scene3D.d.ts.map +1 -1
  29. package/dist/es/index.d.ts +1 -1
  30. package/dist/es/index.d.ts.map +1 -1
  31. package/dist/es/index.js.map +1 -1
  32. package/dist/es/infrastructure/cache/CacheManager.d.ts.map +1 -1
  33. package/dist/es/infrastructure/cache/CacheManager.js.map +1 -1
  34. package/dist/es/logger/logger.d.ts.map +1 -1
  35. package/dist/es/logger/logger.js +2 -3
  36. package/dist/es/logger/logger.js.map +1 -1
  37. package/dist/es/logger/sentry.js +1 -1
  38. package/dist/es/map/map.d.ts +24 -5
  39. package/dist/es/map/map.d.ts.map +1 -1
  40. package/dist/es/map/map.js +123 -49
  41. package/dist/es/map/map.js.map +1 -1
  42. package/dist/es/map/scene3DController.d.ts +31 -4
  43. package/dist/es/map/scene3DController.d.ts.map +1 -1
  44. package/dist/es/map/scene3DController.js +94 -9
  45. package/dist/es/map/scene3DController.js.map +1 -1
  46. package/dist/es/repository/repository.js +21 -21
  47. package/dist/es/repository/repository.js.map +1 -1
  48. package/dist/es/sdk.d.ts +26 -1
  49. package/dist/es/sdk.d.ts.map +1 -1
  50. package/dist/es/sdk.js +21 -21
  51. package/dist/es/sdk.js.map +1 -1
  52. package/dist/es/utils/3d.d.ts +32 -1
  53. package/dist/es/utils/3d.d.ts.map +1 -1
  54. package/dist/es/utils/3d.js +31 -0
  55. package/dist/es/utils/3d.js.map +1 -1
  56. package/dist/es/utils/opening-hours-helper.d.ts.map +1 -1
  57. package/dist/es/utils/opening-hours-helper.js +22 -19
  58. package/dist/es/utils/opening-hours-helper.js.map +1 -1
  59. package/dist/es/utils/semaphore.d.ts +1 -1
  60. package/dist/es/utils/semaphore.d.ts.map +1 -1
  61. package/dist/es/utils/semaphore.js.map +1 -1
  62. package/dist/umd/index.js +598 -199
  63. package/dist/umd/index.js.map +1 -1
  64. package/dist/umd/styles.css +0 -12
  65. package/dist/umd/styles.css.map +1 -1
  66. package/package.json +1 -1
package/dist/umd/index.js CHANGED
@@ -11242,7 +11242,7 @@ const extractSafariExtensionDetails = (func, filename) => {
11242
11242
  // replaced with the package version by scripts/inject-build-defines.js. The DSN
11243
11243
  // falls back to the public MapVX Sentry project DSN when none is injected at
11244
11244
  // build time — a DSN's public key is safe to ship in the client bundle.
11245
- var sentry_SDK_VERSION = true ? "2.0.2" : 0;
11245
+ var sentry_SDK_VERSION = true ? "3.0.0-dev.1" : 0;
11246
11246
  var DSN = false ? 0 : "https://872f598f020e3cd73a0933b562d24c81@sentry.mapvx.app/5";
11247
11247
 
11248
11248
  /**
@@ -11400,9 +11400,8 @@ var Logger = /*#__PURE__*/function () {
11400
11400
  }], [{
11401
11401
  key: "getInstance",
11402
11402
  value: function getInstance() {
11403
- if (Logger.instance == null) {
11404
- Logger.instance = new Logger();
11405
- }
11403
+ var _Logger$instance;
11404
+ (_Logger$instance = Logger.instance) !== null && _Logger$instance !== void 0 ? _Logger$instance : Logger.instance = new Logger();
11406
11405
  return Logger.instance;
11407
11406
  }
11408
11407
  }]);
@@ -12764,6 +12763,60 @@ var RouteController = /*#__PURE__*/function () {
12764
12763
  } finally {
12765
12764
  _iterator.f();
12766
12765
  }
12766
+ this.syncRouteCollision();
12767
+ }
12768
+
12769
+ /**
12770
+ * Recompute the GLB route-transparency collision path from all active routes and push it to the
12771
+ * map. Every polyline point of every step is tagged with the floor its segment is drawn on (same
12772
+ * derivation as the route line's `floor_key`), so a 3D building only fades when a route is visibly
12773
+ * crossing it on the displayed floor. The map ignores this unless the 3D scene is active, so it is
12774
+ * safe to call unconditionally.
12775
+ */
12776
+ }, {
12777
+ key: "syncRouteCollision",
12778
+ value: function syncRouteCollision() {
12779
+ var points = [];
12780
+ var _iterator2 = routeController_createForOfIteratorHelper(this.routes.values()),
12781
+ _step2;
12782
+ try {
12783
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
12784
+ var instance = _step2.value;
12785
+ var _iterator3 = routeController_createForOfIteratorHelper(instance.route.steps),
12786
+ _step3;
12787
+ try {
12788
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
12789
+ var step = _step3.value;
12790
+ var floorKey = this.getFloorKeyForStep(step);
12791
+ var _iterator4 = routeController_createForOfIteratorHelper(step.coordinates),
12792
+ _step4;
12793
+ try {
12794
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
12795
+ var coord = _step4.value;
12796
+ points.push({
12797
+ lng: coord.lng,
12798
+ lat: coord.lat,
12799
+ floorKey: floorKey
12800
+ });
12801
+ }
12802
+ } catch (err) {
12803
+ _iterator4.e(err);
12804
+ } finally {
12805
+ _iterator4.f();
12806
+ }
12807
+ }
12808
+ } catch (err) {
12809
+ _iterator3.e(err);
12810
+ } finally {
12811
+ _iterator3.f();
12812
+ }
12813
+ }
12814
+ } catch (err) {
12815
+ _iterator2.e(err);
12816
+ } finally {
12817
+ _iterator2.f();
12818
+ }
12819
+ this.mapvxMap.setRouteCollisionPath(points);
12767
12820
  }
12768
12821
 
12769
12822
  /**
@@ -12781,6 +12834,7 @@ var RouteController = /*#__PURE__*/function () {
12781
12834
  this.setSourceData(instance, instance.aheadId, route.steps);
12782
12835
  this.setLayerPaint(instance.aheadId, drawConfig);
12783
12836
  this.updateLayerFilter(instance.aheadId);
12837
+ this.syncRouteCollision();
12784
12838
  }
12785
12839
 
12786
12840
  /**
@@ -12989,10 +13043,7 @@ var RouteController = /*#__PURE__*/function () {
12989
13043
  var _drawConfig$routeStyl = drawConfig.routeStyle,
12990
13044
  colors = _drawConfig$routeStyl.colors,
12991
13045
  positions = _drawConfig$routeStyl.positions;
12992
- var positionsToUse = positions;
12993
- if (positionsToUse == null) {
12994
- positionsToUse = createPositionsForStops(colors.length);
12995
- }
13046
+ var positionsToUse = positions !== null && positions !== void 0 ? positions : createPositionsForStops(colors.length);
12996
13047
  if (positionsToUse.length !== colors.length) {
12997
13048
  throw new Error("Error: position array has different length than colors array");
12998
13049
  }
@@ -13091,19 +13142,19 @@ var RouteController = /*#__PURE__*/function () {
13091
13142
  }, {
13092
13143
  key: "updateRouteLayers",
13093
13144
  value: function updateRouteLayers(floorId) {
13094
- var _iterator2 = routeController_createForOfIteratorHelper(this.routes.values()),
13095
- _step2;
13145
+ var _iterator5 = routeController_createForOfIteratorHelper(this.routes.values()),
13146
+ _step5;
13096
13147
  try {
13097
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
13098
- var instance = _step2.value;
13148
+ for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
13149
+ var instance = _step5.value;
13099
13150
  this.updateLayerFilter(instance.aheadId, floorId);
13100
13151
  this.updateLayerFilter(instance.behindId, floorId);
13101
13152
  this.updateLayerFilter(instance.currentId, floorId);
13102
13153
  }
13103
13154
  } catch (err) {
13104
- _iterator2.e(err);
13155
+ _iterator5.e(err);
13105
13156
  } finally {
13106
- _iterator2.f();
13157
+ _iterator5.f();
13107
13158
  }
13108
13159
  }
13109
13160
 
@@ -13114,18 +13165,18 @@ var RouteController = /*#__PURE__*/function () {
13114
13165
  }, {
13115
13166
  key: "updateRouteMarkerVisibility",
13116
13167
  value: function updateRouteMarkerVisibility(floorId) {
13117
- var _iterator3 = routeController_createForOfIteratorHelper(this.routes.values()),
13118
- _step3;
13168
+ var _iterator6 = routeController_createForOfIteratorHelper(this.routes.values()),
13169
+ _step6;
13119
13170
  try {
13120
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
13171
+ for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
13121
13172
  var _instance$routeMarker, _instance$routeMarker2, _instance$routeMarker3;
13122
- var instance = _step3.value;
13173
+ var instance = _step6.value;
13123
13174
  ((_instance$routeMarker = instance.routeMarker) === null || _instance$routeMarker === void 0 ? void 0 : _instance$routeMarker.floorId) === floorId ? (_instance$routeMarker2 = instance.routeMarker) === null || _instance$routeMarker2 === void 0 ? void 0 : _instance$routeMarker2.show(this.map) : (_instance$routeMarker3 = instance.routeMarker) === null || _instance$routeMarker3 === void 0 ? void 0 : _instance$routeMarker3.hide();
13124
13175
  }
13125
13176
  } catch (err) {
13126
- _iterator3.e(err);
13177
+ _iterator6.e(err);
13127
13178
  } finally {
13128
- _iterator3.f();
13179
+ _iterator6.f();
13129
13180
  }
13130
13181
  }
13131
13182
  }, {
@@ -13209,6 +13260,7 @@ var RouteController = /*#__PURE__*/function () {
13209
13260
  return _this2.prepareForNextStep(time, instance);
13210
13261
  }
13211
13262
  };
13263
+ this.syncRouteCollision();
13212
13264
  }
13213
13265
  }, {
13214
13266
  key: "clearRouteInstance",
@@ -13247,6 +13299,7 @@ var RouteController = /*#__PURE__*/function () {
13247
13299
  var remaining = _toConsumableArray(this.routes.keys());
13248
13300
  this.lastAddedRouteId = remaining.length > 0 ? remaining[remaining.length - 1] : undefined;
13249
13301
  }
13302
+ this.syncRouteCollision();
13250
13303
  }
13251
13304
 
13252
13305
  /**
@@ -13255,21 +13308,22 @@ var RouteController = /*#__PURE__*/function () {
13255
13308
  }, {
13256
13309
  key: "removeAllRoutes",
13257
13310
  value: function removeAllRoutes() {
13258
- var _iterator4 = routeController_createForOfIteratorHelper(this.routes.values()),
13259
- _step4;
13311
+ var _iterator7 = routeController_createForOfIteratorHelper(this.routes.values()),
13312
+ _step7;
13260
13313
  try {
13261
- for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
13262
- var instance = _step4.value;
13314
+ for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
13315
+ var instance = _step7.value;
13263
13316
  this.clearRouteInstance(instance);
13264
13317
  this.removeSourcesAndLayersForRoute(instance);
13265
13318
  }
13266
13319
  } catch (err) {
13267
- _iterator4.e(err);
13320
+ _iterator7.e(err);
13268
13321
  } finally {
13269
- _iterator4.f();
13322
+ _iterator7.f();
13270
13323
  }
13271
13324
  this.routes.clear();
13272
13325
  this.lastAddedRouteId = undefined;
13326
+ this.syncRouteCollision();
13273
13327
  }
13274
13328
 
13275
13329
  /**
@@ -13518,6 +13572,7 @@ var RouteController = /*#__PURE__*/function () {
13518
13572
  instance.stepAnimationStatus = "WAITING";
13519
13573
  }
13520
13574
  };
13575
+ this.syncRouteCollision();
13521
13576
  }
13522
13577
 
13523
13578
  /**
@@ -16468,7 +16523,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
16468
16523
  this.logError(_t, {
16469
16524
  functionName: "fetchAndParseMapStyle"
16470
16525
  });
16471
- throw new Error("Failed to fetch and parse map style");
16526
+ throw new Error("Failed to fetch and parse map style", {
16527
+ cause: _t
16528
+ });
16472
16529
  case 7:
16473
16530
  return _context.a(2);
16474
16531
  }
@@ -16515,7 +16572,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
16515
16572
  this.logError(_t2, {
16516
16573
  functionName: "fetchAndParseAnyMapStyle"
16517
16574
  });
16518
- throw new Error("Failed to fetch and parse map style with bearer token");
16575
+ throw new Error("Failed to fetch and parse map style with bearer token", {
16576
+ cause: _t2
16577
+ });
16519
16578
  case 6:
16520
16579
  return _context2.a(2);
16521
16580
  }
@@ -16587,7 +16646,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
16587
16646
  this.logError(_t3, {
16588
16647
  functionName: "fetchAndParseInstitutionsV2"
16589
16648
  });
16590
- throw new Error("Failed to fetch and parse institution");
16649
+ throw new Error("Failed to fetch and parse institution", {
16650
+ cause: _t3
16651
+ });
16591
16652
  case 8:
16592
16653
  return _context3.a(2);
16593
16654
  }
@@ -16646,7 +16707,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
16646
16707
  case 6:
16647
16708
  _context4.p = 6;
16648
16709
  _t4 = _context4.v;
16649
- throw new Error("Failed to fetch and parse place detail");
16710
+ throw new Error("Failed to fetch and parse place detail", {
16711
+ cause: _t4
16712
+ });
16650
16713
  case 7:
16651
16714
  return _context4.a(2);
16652
16715
  }
@@ -16705,7 +16768,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
16705
16768
  case 6:
16706
16769
  _context5.p = 6;
16707
16770
  _t5 = _context5.v;
16708
- throw new Error("Failed to fetch and parse place detail with bearer token");
16771
+ throw new Error("Failed to fetch and parse place detail with bearer token", {
16772
+ cause: _t5
16773
+ });
16709
16774
  case 7:
16710
16775
  return _context5.a(2);
16711
16776
  }
@@ -16801,7 +16866,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
16801
16866
  case 6:
16802
16867
  _context6.p = 6;
16803
16868
  _t6 = _context6.v;
16804
- throw new Error("Failed to fetch and parse subplaces");
16869
+ throw new Error("Failed to fetch and parse subplaces", {
16870
+ cause: _t6
16871
+ });
16805
16872
  case 7:
16806
16873
  return _context6.a(2);
16807
16874
  }
@@ -16856,7 +16923,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
16856
16923
  case 5:
16857
16924
  _context7.p = 5;
16858
16925
  _t7 = _context7.v;
16859
- throw new Error("Failed to fetch and parse any subplaces");
16926
+ throw new Error("Failed to fetch and parse any subplaces", {
16927
+ cause: _t7
16928
+ });
16860
16929
  case 6:
16861
16930
  return _context7.a(2);
16862
16931
  }
@@ -16914,7 +16983,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
16914
16983
  this.logError(_t8, {
16915
16984
  functionName: "fetchAndParseAvailablePlaces"
16916
16985
  });
16917
- throw new Error("Failed to fetch and parse parent places");
16986
+ throw new Error("Failed to fetch and parse parent places", {
16987
+ cause: _t8
16988
+ });
16918
16989
  case 6:
16919
16990
  return _context8.a(2);
16920
16991
  }
@@ -16972,7 +17043,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
16972
17043
  this.logError(_t9, {
16973
17044
  functionName: "fetchAndParsePlacesFromInstitution"
16974
17045
  });
16975
- throw new Error("Failed to fetch and parse parent places from institution");
17046
+ throw new Error("Failed to fetch and parse parent places from institution", {
17047
+ cause: _t9
17048
+ });
16976
17049
  case 6:
16977
17050
  return _context9.a(2);
16978
17051
  }
@@ -17057,7 +17130,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
17057
17130
  case 6:
17058
17131
  _context0.p = 6;
17059
17132
  _t0 = _context0.v;
17060
- throw new Error("Failed to fetch and parse route");
17133
+ throw new Error("Failed to fetch and parse route", {
17134
+ cause: _t0
17135
+ });
17061
17136
  case 7:
17062
17137
  return _context0.a(2);
17063
17138
  }
@@ -17117,7 +17192,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
17117
17192
  case 6:
17118
17193
  _context1.p = 6;
17119
17194
  _t1 = _context1.v;
17120
- throw new Error("Failed to fetch and parse route");
17195
+ throw new Error("Failed to fetch and parse route", {
17196
+ cause: _t1
17197
+ });
17121
17198
  case 7:
17122
17199
  return _context1.a(2);
17123
17200
  }
@@ -17162,7 +17239,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
17162
17239
  case 5:
17163
17240
  _context10.p = 5;
17164
17241
  _t10 = _context10.v;
17165
- throw new Error("Failed to fetch and parse route");
17242
+ throw new Error("Failed to fetch and parse route", {
17243
+ cause: _t10
17244
+ });
17166
17245
  case 6:
17167
17246
  return _context10.a(2);
17168
17247
  }
@@ -17257,7 +17336,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
17257
17336
  });
17258
17337
  return _context11.a(2, _transport);
17259
17338
  case 9:
17260
- throw new Error("Failed to fetch and parse transport");
17339
+ throw new Error("Failed to fetch and parse transport", {
17340
+ cause: _t11
17341
+ });
17261
17342
  case 10:
17262
17343
  return _context11.a(2);
17263
17344
  }
@@ -17325,7 +17406,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
17325
17406
  case 6:
17326
17407
  _context12.p = 6;
17327
17408
  _t12 = _context12.v;
17328
- throw new Error("Failed to fetch and parse stops");
17409
+ throw new Error("Failed to fetch and parse stops", {
17410
+ cause: _t12
17411
+ });
17329
17412
  case 7:
17330
17413
  return _context12.a(2);
17331
17414
  }
@@ -17370,7 +17453,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
17370
17453
  case 5:
17371
17454
  _context13.p = 5;
17372
17455
  _t13 = _context13.v;
17373
- throw new Error("Failed to fetch and parse search results");
17456
+ throw new Error("Failed to fetch and parse search results", {
17457
+ cause: _t13
17458
+ });
17374
17459
  case 6:
17375
17460
  return _context13.a(2);
17376
17461
  }
@@ -17425,7 +17510,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
17425
17510
  case 5:
17426
17511
  _context14.p = 5;
17427
17512
  _t14 = _context14.v;
17428
- throw new Error("Failed to fetch and parse search places by tags");
17513
+ throw new Error("Failed to fetch and parse search places by tags", {
17514
+ cause: _t14
17515
+ });
17429
17516
  case 6:
17430
17517
  return _context14.a(2);
17431
17518
  }
@@ -17492,7 +17579,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
17492
17579
  case 5:
17493
17580
  _context15.p = 5;
17494
17581
  _t15 = _context15.v;
17495
- throw new Error("Failed to fetch and parse routes from origin results");
17582
+ throw new Error("Failed to fetch and parse routes from origin results", {
17583
+ cause: _t15
17584
+ });
17496
17585
  case 6:
17497
17586
  return _context15.a(2);
17498
17587
  }
@@ -17535,7 +17624,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
17535
17624
  case 5:
17536
17625
  _context16.p = 5;
17537
17626
  _t16 = _context16.v;
17538
- throw new Error("Failed to fetch and parse cache timestamp");
17627
+ throw new Error("Failed to fetch and parse cache timestamp", {
17628
+ cause: _t16
17629
+ });
17539
17630
  case 6:
17540
17631
  return _context16.a(2);
17541
17632
  }
@@ -17605,7 +17696,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
17605
17696
  this.logError(_t17, {
17606
17697
  functionName: "fetchAndParseConfiguration"
17607
17698
  });
17608
- throw new Error("Failed to fetch and parse configuration");
17699
+ throw new Error("Failed to fetch and parse configuration", {
17700
+ cause: _t17
17701
+ });
17609
17702
  case 7:
17610
17703
  return _context17.a(2);
17611
17704
  }
@@ -17666,7 +17759,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
17666
17759
  case 6:
17667
17760
  _context18.p = 6;
17668
17761
  _t18 = _context18.v;
17669
- throw new Error("Failed to fetch and parse categories");
17762
+ throw new Error("Failed to fetch and parse categories", {
17763
+ cause: _t18
17764
+ });
17670
17765
  case 7:
17671
17766
  return _context18.a(2);
17672
17767
  }
@@ -17708,7 +17803,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
17708
17803
  case 5:
17709
17804
  _context19.p = 5;
17710
17805
  _t19 = _context19.v;
17711
- throw new Error("Failed to fetch and parse css customization");
17806
+ throw new Error("Failed to fetch and parse css customization", {
17807
+ cause: _t19
17808
+ });
17712
17809
  case 6:
17713
17810
  return _context19.a(2);
17714
17811
  }
@@ -17944,6 +18041,44 @@ function opacityForZoom(cfg, zoom) {
17944
18041
  return zoom >= cfg.zoom ? cfg.opacity : 1;
17945
18042
  }
17946
18043
 
18044
+ /**
18045
+ * Resolves the effective route-based transparency for a placement, applying precedence:
18046
+ * placement > asset > global. Returns `undefined` when none is configured, which disables
18047
+ * route transparency for that model (a route crossing it leaves its opacity unchanged).
18048
+ */
18049
+ function resolveRouteTransparency(models, asset, placement) {
18050
+ var _ref2, _placement$routeTrans;
18051
+ return (_ref2 = (_placement$routeTrans = placement.routeTransparency) !== null && _placement$routeTrans !== void 0 ? _placement$routeTrans : asset === null || asset === void 0 ? void 0 : asset.routeTransparency) !== null && _ref2 !== void 0 ? _ref2 : models.routeTransparency;
18052
+ }
18053
+
18054
+ /**
18055
+ * Axis-aligned footprint of a model in its own local x/z plane (metres), used for cheap
18056
+ * point-in-building collision tests. Height (y) is ignored: a route point on the floor should
18057
+ * match regardless of the model's vertical extent.
18058
+ * @internal
18059
+ */
18060
+
18061
+ /**
18062
+ * Whether a point already expressed in the model's local space falls within its x/z footprint.
18063
+ * @internal
18064
+ */
18065
+ function pointInFootprint(footprint, localX, localZ) {
18066
+ return localX >= footprint.minX && localX <= footprint.maxX && localZ >= footprint.minZ && localZ <= footprint.maxZ;
18067
+ }
18068
+
18069
+ /**
18070
+ * Effective opacity for a placed model: the more transparent of its zoom-based value and, when a
18071
+ * route currently crosses it, its route-based value. Route transparency only participates when a
18072
+ * {@link RouteTransparencyConfig} is configured (`routeCfg` present) and the model is currently
18073
+ * crossed by a route (`routeAffected`).
18074
+ * @internal
18075
+ */
18076
+ function effectiveModelOpacity(zoomCfg, routeCfg, zoom, routeAffected) {
18077
+ var zoomOpacity = opacityForZoom(zoomCfg, zoom);
18078
+ var routeOpacity = routeAffected && routeCfg ? routeCfg.opacity : 1;
18079
+ return Math.min(zoomOpacity, routeOpacity);
18080
+ }
18081
+
17947
18082
  /**
17948
18083
  * Whether a GLB placement should be visible for the given floor key.
17949
18084
  */
@@ -18415,6 +18550,13 @@ var Scene3DController = /*#__PURE__*/function () {
18415
18550
  scene3DController_defineProperty(this, "scene3DGlbLightCount", 0);
18416
18551
  /** Container group holding all placed GLB pivots; rebuilt on each floor change. */
18417
18552
  scene3DController_defineProperty(this, "scene3DModelsGroup", undefined);
18553
+ /**
18554
+ * Route points currently used for GLB route-transparency collision, tagged with the floor on
18555
+ * which each point's route segment is visible. Stored as coordinates (not pivot references) so
18556
+ * they survive `placeScene3DModels` rebuilds on floor change. Only points matching the current
18557
+ * floor participate, so a model only fades when a route is visibly crossing it on that floor.
18558
+ */
18559
+ scene3DController_defineProperty(this, "scene3DRouteCollisionPoints", []);
18418
18560
  scene3DController_defineProperty(this, "spriteIconMapping", {});
18419
18561
  scene3DController_defineProperty(this, "spriteAtlasImage", new Image());
18420
18562
  this.map = map;
@@ -18497,7 +18639,21 @@ var Scene3DController = /*#__PURE__*/function () {
18497
18639
  }, {
18498
18640
  key: "onZoom",
18499
18641
  value: function onZoom() {
18500
- this.applyModelZoomOpacity();
18642
+ this.applyModelOpacity();
18643
+ }
18644
+
18645
+ /**
18646
+ * Sets the route path used for GLB route-transparency collision and re-evaluates which models a
18647
+ * route currently crosses. Points are tagged with the floor on which their route segment is
18648
+ * visible; only points on the current floor participate, so a model never fades unless a route is
18649
+ * visibly crossing it on the displayed floor. Pass an empty array to clear.
18650
+ */
18651
+ }, {
18652
+ key: "setRouteCollisionPath",
18653
+ value: function setRouteCollisionPath(points) {
18654
+ this.scene3DRouteCollisionPoints = points;
18655
+ this.recomputeRouteAffectedModels();
18656
+ this.applyModelOpacity();
18501
18657
  }
18502
18658
 
18503
18659
  /** Rebuilds the deck overlay and GLB placements for the given floor. */
@@ -18788,6 +18944,22 @@ var Scene3DController = /*#__PURE__*/function () {
18788
18944
 
18789
18945
  // Stash the resolved zoom-transparency config so it can be re-applied on every zoom change.
18790
18946
  pivot.userData.zoomTransparency = resolveZoomTransparency(models, asset, placement);
18947
+
18948
+ // Stash route-transparency config (may be undefined => feature off for this model) so a
18949
+ // route crossing this model can fade it independently of zoom.
18950
+ pivot.userData.routeTransparency = resolveRouteTransparency(models, asset, placement);
18951
+
18952
+ // Precompute the model footprint in the pivot's local x/z frame while `model` has no parent
18953
+ // (its world matrix equals its local matrix), for cheap point-in-building collision tests.
18954
+ // After `pivot.add(model)` the world matrix would fold in the pivot transform, giving a loose
18955
+ // world-axis box instead; `pivot.worldToLocal` at test time undoes the pivot transform.
18956
+ var localBox = new three.Box3().setFromObject(model);
18957
+ pivot.userData.footprint = {
18958
+ minX: localBox.min.x,
18959
+ maxX: localBox.max.x,
18960
+ minZ: localBox.min.z,
18961
+ maxZ: localBox.max.z
18962
+ };
18791
18963
  pivot.add(model);
18792
18964
  modelsGroup.add(pivot);
18793
18965
  },
@@ -18803,42 +18975,114 @@ var Scene3DController = /*#__PURE__*/function () {
18803
18975
  }
18804
18976
  this.scene3DModelsGroup = modelsGroup;
18805
18977
  this.scene3DGlbScene.add(modelsGroup);
18806
- this.applyModelZoomOpacity();
18978
+ // Recompute route collision against the freshly rebuilt pivots (footprints/floor changed),
18979
+ // then apply the combined opacity.
18980
+ this.recomputeRouteAffectedModels();
18981
+ this.applyModelOpacity();
18807
18982
  this.map.triggerRepaint();
18808
18983
  }
18809
18984
 
18810
18985
  /**
18811
- * Applies zoom-based transparency to placed GLB models, using each placement's resolved
18812
- * {@link ZoomTransparencyConfig} stored in `pivot.userData.zoomTransparency`. Hard threshold:
18813
- * fully opaque below the configured zoom, configured opacity at/above it. Only triggers a
18986
+ * Recomputes `pivot.userData.routeAffected` for every placed model by testing the current-floor
18987
+ * route collision points against each model's precomputed footprint. Cheap point-in-box tests in
18988
+ * the pivot's local x/z frame; runs only when the route path or the placed models change, never
18989
+ * per zoom frame.
18990
+ */
18991
+ }, {
18992
+ key: "recomputeRouteAffectedModels",
18993
+ value: function recomputeRouteAffectedModels() {
18994
+ var _this$threeMod4,
18995
+ _this3 = this;
18996
+ var three = (_this$threeMod4 = this.threeMod) === null || _this$threeMod4 === void 0 ? void 0 : _this$threeMod4.THREE;
18997
+ var modelsGroup = this.scene3DModelsGroup;
18998
+ if (!three || !modelsGroup) {
18999
+ return;
19000
+ }
19001
+ var points = this.scene3DRouteCollisionPoints.filter(function (p) {
19002
+ return p.floorKey === _this3.currentFloor;
19003
+ });
19004
+
19005
+ // Convert each route point into the models group's local frame (metres relative to
19006
+ // initialCenter), exactly as placements are positioned in `placeScene3DModels`. The group's
19007
+ // own transform (globalOffset) is applied via `localToWorld` at test time, so route points and
19008
+ // model pivots share one frame regardless of the collective offset.
19009
+ var refMercator = maplibre_gl.MercatorCoordinate.fromLngLat(this.initialCenter, 0);
19010
+ var meterScale = refMercator.meterInMercatorCoordinateUnits();
19011
+ var groupLocalPoints = points.map(function (p) {
19012
+ var target = maplibre_gl.MercatorCoordinate.fromLngLat([p.lng, p.lat], 0);
19013
+ var x = (target.x - refMercator.x) / meterScale;
19014
+ var z = (target.y - refMercator.y) / meterScale;
19015
+ return new three.Vector3(x, 0, z);
19016
+ });
19017
+ modelsGroup.updateMatrixWorld(true);
19018
+ var local = new three.Vector3();
19019
+ var _iterator3 = scene3DController_createForOfIteratorHelper(modelsGroup.children),
19020
+ _step3;
19021
+ try {
19022
+ var _loop2 = function _loop2() {
19023
+ var pivot = _step3.value;
19024
+ var routeCfg = pivot.userData.routeTransparency;
19025
+ var footprint = pivot.userData.footprint;
19026
+ // Only models with a route-transparency config participate (feature activation gate).
19027
+ if (!routeCfg || !footprint || groupLocalPoints.length === 0) {
19028
+ pivot.userData.routeAffected = false;
19029
+ return 1; // continue
19030
+ }
19031
+ pivot.userData.routeAffected = groupLocalPoints.some(function (gp) {
19032
+ // group-local -> world (applies globalOffset) -> pivot-local (undoes position/rotation/
19033
+ // scale), then test its x/z against the footprint. y is ignored (floor-level footprint).
19034
+ local.copy(gp);
19035
+ modelsGroup.localToWorld(local);
19036
+ pivot.worldToLocal(local);
19037
+ return pointInFootprint(footprint, local.x, local.z);
19038
+ });
19039
+ };
19040
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
19041
+ if (_loop2()) continue;
19042
+ }
19043
+ } catch (err) {
19044
+ _iterator3.e(err);
19045
+ } finally {
19046
+ _iterator3.f();
19047
+ }
19048
+ }
19049
+
19050
+ /**
19051
+ * Applies transparency to placed GLB models, combining zoom-based transparency
19052
+ * ({@link ZoomTransparencyConfig}, a hard threshold: fully opaque below the configured zoom,
19053
+ * configured opacity at/above it) with route-based transparency
19054
+ * ({@link RouteTransparencyConfig}) for models a route currently crosses
19055
+ * (`pivot.userData.routeAffected`). The more transparent of the two wins. Only triggers a
18814
19056
  * repaint when at least one material actually changed.
18815
19057
  */
18816
19058
  }, {
18817
- key: "applyModelZoomOpacity",
18818
- value: function applyModelZoomOpacity() {
19059
+ key: "applyModelOpacity",
19060
+ value: function applyModelOpacity() {
18819
19061
  if (!this.scene3DModelsGroup) {
18820
19062
  return;
18821
19063
  }
18822
19064
  var zoom = this.map.getZoom();
18823
19065
  var changed = false;
18824
- var _iterator3 = scene3DController_createForOfIteratorHelper(this.scene3DModelsGroup.children),
18825
- _step3;
19066
+ var _iterator4 = scene3DController_createForOfIteratorHelper(this.scene3DModelsGroup.children),
19067
+ _step4;
18826
19068
  try {
18827
- var _loop2 = function _loop2() {
18828
- var pivot = _step3.value;
18829
- var cfg = pivot.userData.zoomTransparency;
18830
- var opacity = opacityForZoom(cfg, zoom);
19069
+ var _loop3 = function _loop3() {
19070
+ var pivot = _step4.value;
19071
+ var zoomCfg = pivot.userData.zoomTransparency;
19072
+ var routeCfg = pivot.userData.routeTransparency;
19073
+ var routeAffected = pivot.userData.routeAffected === true;
19074
+ var opacity = effectiveModelOpacity(zoomCfg, routeCfg, zoom, routeAffected);
18831
19075
  pivot.traverse(function (obj) {
18832
19076
  var mesh = obj;
18833
19077
  if (!mesh.isMesh) {
18834
19078
  return;
18835
19079
  }
18836
19080
  var materials = Array.isArray(mesh.material) ? mesh.material : [mesh.material];
18837
- var _iterator4 = scene3DController_createForOfIteratorHelper(materials),
18838
- _step4;
19081
+ var _iterator5 = scene3DController_createForOfIteratorHelper(materials),
19082
+ _step5;
18839
19083
  try {
18840
- for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
18841
- var material = _step4.value;
19084
+ for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
19085
+ var material = _step5.value;
18842
19086
  if (material.opacity !== opacity) {
18843
19087
  material.transparent = opacity < 1;
18844
19088
  material.opacity = opacity;
@@ -18848,19 +19092,19 @@ var Scene3DController = /*#__PURE__*/function () {
18848
19092
  }
18849
19093
  }
18850
19094
  } catch (err) {
18851
- _iterator4.e(err);
19095
+ _iterator5.e(err);
18852
19096
  } finally {
18853
- _iterator4.f();
19097
+ _iterator5.f();
18854
19098
  }
18855
19099
  });
18856
19100
  };
18857
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
18858
- _loop2();
19101
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
19102
+ _loop3();
18859
19103
  }
18860
19104
  } catch (err) {
18861
- _iterator3.e(err);
19105
+ _iterator4.e(err);
18862
19106
  } finally {
18863
- _iterator3.f();
19107
+ _iterator4.f();
18864
19108
  }
18865
19109
  if (changed) {
18866
19110
  this.map.triggerRepaint();
@@ -18942,7 +19186,7 @@ var Scene3DController = /*#__PURE__*/function () {
18942
19186
  var _layerConfig$binaryDa2,
18943
19187
  _layerConfig$minZoom,
18944
19188
  _layerConfig$maxZoom,
18945
- _this3 = this;
19189
+ _this4 = this;
18946
19190
  var useSdf = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
18947
19191
  var deck = this.deckMod;
18948
19192
  if (!deck) return null;
@@ -18957,7 +19201,7 @@ var Scene3DController = /*#__PURE__*/function () {
18957
19201
  // Use area_name and poi Point features — unique per tile, no duplicates.
18958
19202
  // If a logo-{name} image exists in the sprite, the icon takes priority over the text label.
18959
19203
  var textData = buildLabelData(props.data || [], floorKey, function (imageId) {
18960
- return _this3.map.hasImage(imageId);
19204
+ return _this4.map.hasImage(imageId);
18961
19205
  }, (_layerConfig$defaultH2 = layerConfig.defaultHeight) !== null && _layerConfig$defaultH2 !== void 0 ? _layerConfig$defaultH2 : 5);
18962
19206
  if (!textData.length) return null;
18963
19207
  return new deck.TextLayer(scene3DController_objectSpread(scene3DController_objectSpread({}, props), {}, {
@@ -18996,7 +19240,7 @@ var Scene3DController = /*#__PURE__*/function () {
18996
19240
  var _layerConfig$binaryDa3,
18997
19241
  _layerConfig$minZoom2,
18998
19242
  _layerConfig$maxZoom2,
18999
- _this4 = this;
19243
+ _this5 = this;
19000
19244
  var deck = this.deckMod;
19001
19245
  if (!deck || !this.spriteIconMapping || !this.spriteAtlasImage) return null;
19002
19246
  return new deck.MVTLayer({
@@ -19012,8 +19256,8 @@ var Scene3DController = /*#__PURE__*/function () {
19012
19256
  return new deck.IconLayer(scene3DController_objectSpread(scene3DController_objectSpread({}, props), {}, {
19013
19257
  id: "".concat(props.id, "-poi-icons"),
19014
19258
  data: iconData,
19015
- iconAtlas: _this4.spriteAtlasImage,
19016
- iconMapping: _this4.spriteIconMapping,
19259
+ iconAtlas: _this5.spriteAtlasImage,
19260
+ iconMapping: _this5.spriteIconMapping,
19017
19261
  getIcon: function getIcon(d) {
19018
19262
  return d.icon;
19019
19263
  },
@@ -19038,7 +19282,7 @@ var Scene3DController = /*#__PURE__*/function () {
19038
19282
  var _layerConfig$binaryDa4,
19039
19283
  _layerConfig$minZoom3,
19040
19284
  _layerConfig$maxZoom3,
19041
- _this5 = this;
19285
+ _this6 = this;
19042
19286
  var deck = this.deckMod;
19043
19287
  if (!deck || !this.spriteIconMapping || !this.spriteAtlasImage) return null;
19044
19288
  return new deck.MVTLayer({
@@ -19049,13 +19293,13 @@ var Scene3DController = /*#__PURE__*/function () {
19049
19293
  maxZoom: (_layerConfig$maxZoom3 = layerConfig.maxZoom) !== null && _layerConfig$maxZoom3 !== void 0 ? _layerConfig$maxZoom3 : 24,
19050
19294
  renderSubLayers: function renderSubLayers(props) {
19051
19295
  var _layerConfig$defaultH4, _layerConfig$sizeUnit2, _layerConfig$sizeScal2, _layerConfig$billboar2;
19052
- var logoData = buildStoreLogoData(props.data || [], floorKey, _this5.spriteIconMapping, (_layerConfig$defaultH4 = layerConfig.defaultHeight) !== null && _layerConfig$defaultH4 !== void 0 ? _layerConfig$defaultH4 : 5);
19296
+ var logoData = buildStoreLogoData(props.data || [], floorKey, _this6.spriteIconMapping, (_layerConfig$defaultH4 = layerConfig.defaultHeight) !== null && _layerConfig$defaultH4 !== void 0 ? _layerConfig$defaultH4 : 5);
19053
19297
  if (!logoData.length) return null;
19054
19298
  return new deck.IconLayer(scene3DController_objectSpread(scene3DController_objectSpread({}, props), {}, {
19055
19299
  id: "".concat(props.id, "-store-logos"),
19056
19300
  data: logoData,
19057
- iconAtlas: _this5.spriteAtlasImage,
19058
- iconMapping: _this5.spriteIconMapping,
19301
+ iconAtlas: _this6.spriteAtlasImage,
19302
+ iconMapping: _this6.spriteIconMapping,
19059
19303
  getIcon: function getIcon(d) {
19060
19304
  return d.icon;
19061
19305
  },
@@ -19067,7 +19311,7 @@ var Scene3DController = /*#__PURE__*/function () {
19067
19311
  },
19068
19312
  getSize: function getSize(d) {
19069
19313
  var _layerConfig$logoScal;
19070
- return computeStoreLogoSize(_this5.spriteIconMapping, d.icon, (_layerConfig$logoScal = layerConfig.logoScale) !== null && _layerConfig$logoScal !== void 0 ? _layerConfig$logoScal : {});
19314
+ return computeStoreLogoSize(_this6.spriteIconMapping, d.icon, (_layerConfig$logoScal = layerConfig.logoScale) !== null && _layerConfig$logoScal !== void 0 ? _layerConfig$logoScal : {});
19071
19315
  },
19072
19316
  sizeUnits: (_layerConfig$sizeUnit2 = layerConfig.sizeUnits) !== null && _layerConfig$sizeUnit2 !== void 0 ? _layerConfig$sizeUnit2 : "meters",
19073
19317
  sizeScale: (_layerConfig$sizeScal2 = layerConfig.sizeScale) !== null && _layerConfig$sizeScal2 !== void 0 ? _layerConfig$sizeScal2 : 1,
@@ -19112,19 +19356,19 @@ var Scene3DController = /*#__PURE__*/function () {
19112
19356
  key: "hideLayers",
19113
19357
  value: function hideLayers(layersIds) {
19114
19358
  if (!layersIds) return;
19115
- var _iterator5 = scene3DController_createForOfIteratorHelper(layersIds),
19116
- _step5;
19359
+ var _iterator6 = scene3DController_createForOfIteratorHelper(layersIds),
19360
+ _step6;
19117
19361
  try {
19118
- for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
19119
- var layerId = _step5.value;
19362
+ for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
19363
+ var layerId = _step6.value;
19120
19364
  var layer = this.map.getLayer(layerId);
19121
19365
  if (!layer) continue;
19122
19366
  this.map.setLayoutProperty(layer.id, "visibility", "none");
19123
19367
  }
19124
19368
  } catch (err) {
19125
- _iterator5.e(err);
19369
+ _iterator6.e(err);
19126
19370
  } finally {
19127
- _iterator5.f();
19371
+ _iterator6.f();
19128
19372
  }
19129
19373
  }
19130
19374
  }]);
@@ -19424,6 +19668,22 @@ var CIRCLE_LAYER_SUFFIXES = {
19424
19668
  top: "-top"
19425
19669
  };
19426
19670
 
19671
+ /**
19672
+ * How many times a failed vector tile is reloaded before it is dropped from the retry
19673
+ * queue. Bounded so a permanently unavailable tile stops being requested, while a tile
19674
+ * that failed on a transient network error still gets several chances.
19675
+ */
19676
+ var MAX_TILE_RETRIES = 5;
19677
+
19678
+ /**
19679
+ * Base delay for the retry backoff. Attempt N waits `BASE * 2^(N-1)` before it is
19680
+ * eligible again — 1s, 2s, 4s, 8s — so a tile that keeps failing is retried ever less
19681
+ * often instead of once per timer tick.
19682
+ */
19683
+ var TILE_RETRY_BASE_DELAY_MS = 1000;
19684
+
19685
+ /** Bookkeeping for one tile in the retry queue. */
19686
+
19427
19687
  /** Fill/line layer ids for one circle render-order bucket. */
19428
19688
  function circleLayerIdsFor(order) {
19429
19689
  var suffix = CIRCLE_LAYER_SUFFIXES[order];
@@ -19516,7 +19776,7 @@ function parsePaddingValue(value, dimension) {
19516
19776
  if (!match) {
19517
19777
  return 0;
19518
19778
  }
19519
- var numericValue = parseFloat(match[1]);
19779
+ var numericValue = Number.parseFloat(match[1]);
19520
19780
  var unit = match[2] || "px";
19521
19781
  switch (unit) {
19522
19782
  case "px":
@@ -19617,6 +19877,12 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
19617
19877
  map_defineProperty(_this, "enableHover", false);
19618
19878
  map_defineProperty(_this, "hoveredId", "unselected");
19619
19879
  map_defineProperty(_this, "failedTiles", new Set());
19880
+ /**
19881
+ * Retry bookkeeping per failed tile. A WeakMap so it can never outlive the tiles
19882
+ * themselves — entries disappear with the tile objects, which is why none of the
19883
+ * `failedTiles.clear()` paths have to reset it.
19884
+ */
19885
+ map_defineProperty(_this, "tileRetryState", new WeakMap());
19620
19886
  map_defineProperty(_this, "geoLocation", navigator.geolocation);
19621
19887
  /** Owns the deck.gl overlay + GLB scene; created on style load only when 3D is active. */
19622
19888
  map_defineProperty(_this, "scene3D", undefined);
@@ -19750,6 +20016,8 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
19750
20016
  value: function onMapStyleLoaded(mapConfig, container, style) {
19751
20017
  var _mapConfig$pitch,
19752
20018
  _mapConfig$bearingSna,
20019
+ _mapConfig$showCompas,
20020
+ _mapConfig$showZoom,
19753
20021
  _mapConfig$navigation,
19754
20022
  _this6 = this;
19755
20023
  // Determine if service worker caching should be enabled
@@ -19792,8 +20060,8 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
19792
20060
  (_this$map$touchZoomRo = this.map.touchZoomRotate) === null || _this$map$touchZoomRo === void 0 || (_this$map$touchZoomRo2 = _this$map$touchZoomRo.disableRotation) === null || _this$map$touchZoomRo2 === void 0 || _this$map$touchZoomRo2.call(_this$map$touchZoomRo);
19793
20061
  }
19794
20062
  this.map.addControl(new maplibre_gl.NavigationControl({
19795
- showCompass: mapConfig.showCompass !== undefined ? mapConfig.showCompass : true,
19796
- showZoom: mapConfig.showZoom !== undefined ? mapConfig.showZoom : true
20063
+ showCompass: (_mapConfig$showCompas = mapConfig.showCompass) !== null && _mapConfig$showCompas !== void 0 ? _mapConfig$showCompas : true,
20064
+ showZoom: (_mapConfig$showZoom = mapConfig.showZoom) !== null && _mapConfig$showZoom !== void 0 ? _mapConfig$showZoom : true
19797
20065
  }), (_mapConfig$navigation = mapConfig.navigationPosition) !== null && _mapConfig$navigation !== void 0 ? _mapConfig$navigation : "top-right");
19798
20066
  this.map.on("load", function () {
19799
20067
  var _this6$scene3D, _mapConfig$onMapReady;
@@ -19874,7 +20142,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
19874
20142
  var property = _this8.map.getLayoutProperty(id, "symbol-placement");
19875
20143
  _this8.map.setLayoutProperty(id, "text-field", ["case", ["has", "name:".concat(lang)], ["get", "name:".concat(lang)], ["format", ["get", "name:latin"], property === "line" ? " " : "\n", ["get", "name:nonlatin"]]]);
19876
20144
  } catch (error) {
19877
- // Layer language update may fail if layer doesn't exist
20145
+ _this8.debugLog("Layer language update failed (layer may not exist)", error);
19878
20146
  }
19879
20147
  });
19880
20148
  // indoor layers
@@ -19888,7 +20156,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
19888
20156
  try {
19889
20157
  _this8.map.setLayoutProperty(id, "text-field", ["case", ["has", "name:".concat(lang)], ["get", "name:".concat(lang)], ["get", "name"]]);
19890
20158
  } catch (error) {
19891
- // Layer language update may fail if layer doesn't exist
20159
+ _this8.debugLog("Layer language update failed (layer may not exist)", error);
19892
20160
  }
19893
20161
  });
19894
20162
  }
@@ -19929,7 +20197,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
19929
20197
  }
19930
20198
  this.logEvent("clearTileCache");
19931
20199
  } catch (error) {
19932
- // Tile cache clear may fail if cache doesn't exist
20200
+ this.debugLog("Tile cache clear failed (cache may not exist)", error);
19933
20201
  }
19934
20202
  }
19935
20203
 
@@ -19952,6 +20220,24 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
19952
20220
  return (_this$currentFloor = this.currentFloor) !== null && _this$currentFloor !== void 0 ? _this$currentFloor : "";
19953
20221
  }
19954
20222
 
20223
+ /**
20224
+ * Sets the route path used for GLB route-transparency collision, so 3D models a route passes
20225
+ * through fade and reveal the floor plan underneath. Called by {@link RouteController} whenever
20226
+ * the set of drawn routes changes. Points are tagged with the floor their segment is drawn on;
20227
+ * only points on the displayed floor participate. Pass an empty array to clear.
20228
+ *
20229
+ * No-op unless the 3D scene is active.
20230
+ */
20231
+ }, {
20232
+ key: "setRouteCollisionPath",
20233
+ value: function setRouteCollisionPath(points) {
20234
+ var _this$scene3D;
20235
+ if (!this.is3DSceneActive()) {
20236
+ return;
20237
+ }
20238
+ (_this$scene3D = this.scene3D) === null || _this$scene3D === void 0 || _this$scene3D.setRouteCollisionPath(points);
20239
+ }
20240
+
19955
20241
  /**
19956
20242
  * Performs changes when parent place is updated
19957
20243
  * @param place new parent place
@@ -19966,7 +20252,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
19966
20252
  _this$innerFloors$fin,
19967
20253
  _this$innerFloors$fin2,
19968
20254
  _this$innerFloors$,
19969
- _this$scene3D,
20255
+ _this$scene3D2,
19970
20256
  _this9 = this;
19971
20257
  var updateStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
19972
20258
  var onStyleReady = arguments.length > 2 ? arguments[2] : undefined;
@@ -19981,7 +20267,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
19981
20267
  if (place) {
19982
20268
  this.subPlacesLoad(place.mapvxId);
19983
20269
  }
19984
- (_this$scene3D = this.scene3D) === null || _this$scene3D === void 0 || _this$scene3D.onFloorChange(this.currentFloor);
20270
+ (_this$scene3D2 = this.scene3D) === null || _this$scene3D2 === void 0 || _this$scene3D2.onFloorChange(this.currentFloor);
19985
20271
  if (updateStyle) {
19986
20272
  this.repository.fetchAndParseMapStyle(place === null || place === void 0 ? void 0 : place.mapvxId).then(function (style) {
19987
20273
  var useServiceWorkerCaching = _this9.tileCacheConfig.enabled && _this9.tileCacheConfig.persistToServiceWorker;
@@ -20003,7 +20289,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20003
20289
  }, {
20004
20290
  key: "updatePlaceAndFloor",
20005
20291
  value: function updatePlaceAndFloor(parentPlaceId, floorId) {
20006
- var _place$innerFloors$so2, _ref2, _ref3, _this$innerFloors$fin3, _this$innerFloors$2, _this$scene3D2;
20292
+ var _place$innerFloors$so2, _ref2, _ref3, _this$innerFloors$fin3, _this$innerFloors$2, _this$scene3D3;
20007
20293
  var place = this.potentialParentPlaces.find(function (place) {
20008
20294
  return place.mapvxId === parentPlaceId;
20009
20295
  });
@@ -20015,7 +20301,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20015
20301
  this.currentFloor = (_ref2 = (_ref3 = floorId !== null && floorId !== void 0 ? floorId : (_this$innerFloors$fin3 = this.innerFloors.find(function (floor) {
20016
20302
  return floor.defaultFloor;
20017
20303
  })) === null || _this$innerFloors$fin3 === void 0 ? void 0 : _this$innerFloors$fin3.key) !== null && _ref3 !== void 0 ? _ref3 : (_this$innerFloors$2 = this.innerFloors[0]) === null || _this$innerFloors$2 === void 0 ? void 0 : _this$innerFloors$2.key) !== null && _ref2 !== void 0 ? _ref2 : "";
20018
- (_this$scene3D2 = this.scene3D) === null || _this$scene3D2 === void 0 || _this$scene3D2.onFloorChange(this.currentFloor);
20304
+ (_this$scene3D3 = this.scene3D) === null || _this$scene3D3 === void 0 || _this$scene3D3.onFloorChange(this.currentFloor);
20019
20305
  }
20020
20306
  }, {
20021
20307
  key: "updateParentPlaceAndFloor",
@@ -20029,7 +20315,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20029
20315
  this.logEvent("updateParentPlaceAndFloor");
20030
20316
  options === null || options === void 0 || (_options$onComplete = options.onComplete) === null || _options$onComplete === void 0 || _options$onComplete.call(options);
20031
20317
  } catch (error) {
20032
- // Parent place/floor update may fail
20318
+ this.debugLog("Parent place/floor update failed", error);
20033
20319
  }
20034
20320
  }
20035
20321
  }, {
@@ -20075,14 +20361,14 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20075
20361
  }, {
20076
20362
  key: "whenStyleUpdates",
20077
20363
  value: function whenStyleUpdates(newStyle) {
20078
- var _this$scene3D3;
20364
+ var _this$scene3D4;
20079
20365
  if (newStyle) {
20080
20366
  this.setBaseFilters(newStyle);
20081
20367
  }
20082
20368
  this.routeController.addSourcesAndLayers();
20083
20369
  this.refreshCircles();
20084
20370
  this.filterByFloorKey(this.currentFloor);
20085
- (_this$scene3D3 = this.scene3D) === null || _this$scene3D3 === void 0 || _this$scene3D3.refreshOverlay(this.currentFloor);
20371
+ (_this$scene3D4 = this.scene3D) === null || _this$scene3D4 === void 0 || _this$scene3D4.refreshOverlay(this.currentFloor);
20086
20372
  }
20087
20373
  }, {
20088
20374
  key: "addMarker",
@@ -20114,7 +20400,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20114
20400
  this.logEvent("addMarker");
20115
20401
  return markerCreated.id;
20116
20402
  } catch (error) {
20117
- throw new Error("Failed to add marker");
20403
+ throw new Error("Failed to add marker", {
20404
+ cause: error
20405
+ });
20118
20406
  }
20119
20407
  }
20120
20408
  }, {
@@ -20131,7 +20419,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20131
20419
  this.logEvent("updateMarker");
20132
20420
  return (_marker$id = _marker === null || _marker === void 0 ? void 0 : _marker.id) !== null && _marker$id !== void 0 ? _marker$id : "";
20133
20421
  } catch (error) {
20134
- throw new Error("Failed to update marker");
20422
+ throw new Error("Failed to update marker", {
20423
+ cause: error
20424
+ });
20135
20425
  }
20136
20426
  }
20137
20427
  }, {
@@ -20146,7 +20436,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20146
20436
  }
20147
20437
  this.logEvent("updateMarkerPosition");
20148
20438
  } catch (error) {
20149
- throw new Error("Failed to update marker position");
20439
+ throw new Error("Failed to update marker position", {
20440
+ cause: error
20441
+ });
20150
20442
  }
20151
20443
  }
20152
20444
  }, {
@@ -20161,7 +20453,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20161
20453
  }
20162
20454
  this.logEvent("showMarker");
20163
20455
  } catch (error) {
20164
- // Show marker may fail if marker doesn't exist
20456
+ this.debugLog("Show marker failed (marker may not exist)", error);
20165
20457
  }
20166
20458
  }
20167
20459
  }, {
@@ -20176,7 +20468,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20176
20468
  }
20177
20469
  this.logEvent("hideMarker");
20178
20470
  } catch (error) {
20179
- // Hide marker may fail if marker doesn't exist
20471
+ this.debugLog("Hide marker failed (marker may not exist)", error);
20180
20472
  }
20181
20473
  }
20182
20474
  }, {
@@ -20194,7 +20486,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20194
20486
  }
20195
20487
  this.logEvent("removeMarker");
20196
20488
  } catch (error) {
20197
- throw new Error("Failed to remove marker");
20489
+ throw new Error("Failed to remove marker", {
20490
+ cause: error
20491
+ });
20198
20492
  }
20199
20493
  }
20200
20494
  }, {
@@ -20207,7 +20501,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20207
20501
  this.markers = [];
20208
20502
  this.logEvent("removeAllMarkers");
20209
20503
  } catch (error) {
20210
- throw new Error("Failed to remove all markers");
20504
+ throw new Error("Failed to remove all markers", {
20505
+ cause: error
20506
+ });
20211
20507
  }
20212
20508
  }
20213
20509
  }, {
@@ -20340,7 +20636,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20340
20636
  this.refreshCircles();
20341
20637
  this.logEvent("removeCircle");
20342
20638
  } catch (error) {
20343
- throw new Error("Failed to remove circle");
20639
+ throw new Error("Failed to remove circle", {
20640
+ cause: error
20641
+ });
20344
20642
  }
20345
20643
  }
20346
20644
  }, {
@@ -20351,7 +20649,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20351
20649
  this.refreshCircles();
20352
20650
  this.logEvent("removeAllCircles");
20353
20651
  } catch (error) {
20354
- throw new Error("Failed to remove all circles");
20652
+ throw new Error("Failed to remove all circles", {
20653
+ cause: error
20654
+ });
20355
20655
  }
20356
20656
  }
20357
20657
  }, {
@@ -20369,6 +20669,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20369
20669
  this.logEvent("showCircle");
20370
20670
  return true;
20371
20671
  } catch (error) {
20672
+ this.debugLog("Show circle failed", error);
20372
20673
  return false;
20373
20674
  }
20374
20675
  }
@@ -20387,6 +20688,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20387
20688
  this.logEvent("hideCircle");
20388
20689
  return true;
20389
20690
  } catch (error) {
20691
+ this.debugLog("Hide circle failed", error);
20390
20692
  return false;
20391
20693
  }
20392
20694
  }
@@ -20556,7 +20858,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20556
20858
  _iterator.f();
20557
20859
  }
20558
20860
  } catch (error) {
20559
- // Style may not be loaded yet; the styledata listener re-adds the layers
20861
+ this.debugLog("Layers not added: style not loaded yet, the styledata listener will re-add them", error);
20560
20862
  }
20561
20863
  }
20562
20864
 
@@ -20575,7 +20877,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20575
20877
  var source = this.map.getSource(CIRCLE_SOURCE_ID);
20576
20878
  source === null || source === void 0 || source.setData(this.circleFeatureCollection());
20577
20879
  } catch (error) {
20578
- // Source may not exist while a new style is loading
20880
+ this.debugLog("Source not found (a new style may still be loading)", error);
20579
20881
  }
20580
20882
  }
20581
20883
 
@@ -20615,7 +20917,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20615
20917
  this.logEvent("resize");
20616
20918
  }
20617
20919
  } catch (error) {
20618
- // Resize may fail if the map/container is not ready
20920
+ this.debugLog("Resize failed (map/container may not be ready)", error);
20619
20921
  }
20620
20922
  }
20621
20923
  }, {
@@ -20813,6 +21115,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20813
21115
  lng: coord.lng
20814
21116
  });
20815
21117
  } else {
21118
+ var _fitOptions$bearing, _fitOptions$pitch;
20816
21119
  var minLat;
20817
21120
  var minLng;
20818
21121
  var maxLat;
@@ -20848,8 +21151,8 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20848
21151
  });
20849
21152
  var bearing = this.map.getBearing();
20850
21153
  var pitch = this.map.getPitch();
20851
- fitOptions.bearing = fitOptions.bearing !== undefined ? fitOptions.bearing : bearing;
20852
- fitOptions.pitch = fitOptions.pitch !== undefined ? fitOptions.pitch : pitch;
21154
+ (_fitOptions$bearing = fitOptions.bearing) !== null && _fitOptions$bearing !== void 0 ? _fitOptions$bearing : fitOptions.bearing = bearing;
21155
+ (_fitOptions$pitch = fitOptions.pitch) !== null && _fitOptions$pitch !== void 0 ? _fitOptions$pitch : fitOptions.pitch = pitch;
20853
21156
  if (onComplete) {
20854
21157
  void this.map.once("moveend", onComplete);
20855
21158
  }
@@ -20859,7 +21162,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20859
21162
  }, {
20860
21163
  key: "easeToCoordinates",
20861
21164
  value: function easeToCoordinates(coordinates, options) {
20862
- var _options$maxZoom;
21165
+ var _options$bearing, _options$pitch, _options$maxZoom;
20863
21166
  if (coordinates.length === 0) {
20864
21167
  return;
20865
21168
  }
@@ -20887,8 +21190,8 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20887
21190
  }));
20888
21191
  return;
20889
21192
  }
20890
- var bearing = (options === null || options === void 0 ? void 0 : options.bearing) !== undefined ? options.bearing : this.map.getBearing();
20891
- var pitch = (options === null || options === void 0 ? void 0 : options.pitch) !== undefined ? options.pitch : this.map.getPitch();
21193
+ var bearing = (_options$bearing = options === null || options === void 0 ? void 0 : options.bearing) !== null && _options$bearing !== void 0 ? _options$bearing : this.map.getBearing();
21194
+ var pitch = (_options$pitch = options === null || options === void 0 ? void 0 : options.pitch) !== null && _options$pitch !== void 0 ? _options$pitch : this.map.getPitch();
20892
21195
  var cameraParams = {
20893
21196
  bearing: bearing,
20894
21197
  padding: padding,
@@ -20949,16 +21252,16 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20949
21252
  key: "updateFloor",
20950
21253
  value: function updateFloor(floorId, options) {
20951
21254
  try {
20952
- var _this$scene3D4, _this$onFloorChange2, _options$onComplete6;
21255
+ var _this$scene3D5, _this$onFloorChange2, _options$onComplete6;
20953
21256
  this.filterByFloorKey(floorId);
20954
- (_this$scene3D4 = this.scene3D) === null || _this$scene3D4 === void 0 || _this$scene3D4.onFloorChange(this.currentFloor);
21257
+ (_this$scene3D5 = this.scene3D) === null || _this$scene3D5 === void 0 || _this$scene3D5.onFloorChange(this.currentFloor);
20955
21258
  (_this$onFloorChange2 = this.onFloorChange) === null || _this$onFloorChange2 === void 0 || _this$onFloorChange2.call(this, floorId);
20956
21259
  this.logEvent("updateFloor", {
20957
21260
  floorId: floorId
20958
21261
  });
20959
21262
  options === null || options === void 0 || (_options$onComplete6 = options.onComplete) === null || _options$onComplete6 === void 0 || _options$onComplete6.call(options);
20960
21263
  } catch (error) {
20961
- // Floor update may fail
21264
+ this.debugLog("Floor update failed", error);
20962
21265
  }
20963
21266
  }
20964
21267
  }, {
@@ -20974,7 +21277,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
20974
21277
  floorId: floorId
20975
21278
  });
20976
21279
  } catch (error) {
20977
- // Place/floor update for routing may fail
21280
+ this.debugLog("Place/floor update for routing failed", error);
20978
21281
  }
20979
21282
  }
20980
21283
  }, {
@@ -21004,7 +21307,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
21004
21307
  case 3:
21005
21308
  _context.p = 3;
21006
21309
  _t = _context.v;
21007
- throw new Error("Error: Failed to add route");
21310
+ throw new Error("Error: Failed to add route", {
21311
+ cause: _t
21312
+ });
21008
21313
  case 4:
21009
21314
  return _context.a(2);
21010
21315
  }
@@ -21024,7 +21329,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
21024
21329
  drawRouteConfig,
21025
21330
  ticket,
21026
21331
  _route2,
21027
- cause,
21332
+ reason,
21028
21333
  _args2 = arguments,
21029
21334
  _t2;
21030
21335
  return map_regenerator().w(function (_context2) {
@@ -21068,8 +21373,10 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
21068
21373
  case 4:
21069
21374
  _context2.p = 4;
21070
21375
  _t2 = _context2.v;
21071
- cause = _t2 instanceof Error ? _t2.message : String(_t2);
21072
- throw new Error("Error: Failed to add route: ".concat(cause));
21376
+ reason = _t2 instanceof Error ? _t2.message : String(_t2);
21377
+ throw new Error("Error: Failed to add route: ".concat(reason), {
21378
+ cause: _t2
21379
+ });
21073
21380
  case 5:
21074
21381
  return _context2.a(2);
21075
21382
  }
@@ -21093,7 +21400,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
21093
21400
  });
21094
21401
  this.routeController.updateRouteProgress(routeId, position, behindConfig);
21095
21402
  } catch (error) {
21096
- // Update may fail if route doesn't exist
21403
+ this.debugLog("Route update failed (route may not exist)", error);
21097
21404
  }
21098
21405
  }
21099
21406
  }, {
@@ -21103,7 +21410,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
21103
21410
  this.logEvent("removeRoute");
21104
21411
  this.routeController.removeRoute(routeId);
21105
21412
  } catch (error) {
21106
- // Remove route may fail if no route exists
21413
+ this.debugLog("Remove route failed (no route may exist)", error);
21107
21414
  }
21108
21415
  this.syncLiveRouteId();
21109
21416
  }
@@ -21114,7 +21421,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
21114
21421
  this.logEvent("removeRouteById");
21115
21422
  this.routeController.removeRoute(routeId);
21116
21423
  } catch (error) {
21117
- // Remove route may fail if route doesn't exist
21424
+ this.debugLog("Remove route failed (route may not exist)", error);
21118
21425
  }
21119
21426
  this.syncLiveRouteId();
21120
21427
  }
@@ -21125,7 +21432,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
21125
21432
  this.logEvent("removeAllRoutes");
21126
21433
  this.routeController.removeAllRoutes();
21127
21434
  } catch (error) {
21128
- // Remove all routes may fail
21435
+ this.debugLog("Remove all routes failed", error);
21129
21436
  }
21130
21437
  this.syncLiveRouteId();
21131
21438
  }
@@ -21341,7 +21648,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
21341
21648
  }
21342
21649
  }
21343
21650
  } catch (error) {
21344
- // Place selection may fail if layer doesn't exist
21651
+ this.debugLog("Place selection failed (layer may not exist)", error);
21345
21652
  }
21346
21653
  }
21347
21654
  }, {
@@ -21453,7 +21760,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
21453
21760
  case 5:
21454
21761
  _context4.p = 5;
21455
21762
  _t4 = _context4.v;
21456
- throw new Error("Error: Failed to start animating route");
21763
+ throw new Error("Error: Failed to start animating route", {
21764
+ cause: _t4
21765
+ });
21457
21766
  case 6:
21458
21767
  return _context4.a(2);
21459
21768
  }
@@ -21503,7 +21812,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
21503
21812
  case 5:
21504
21813
  _context5.p = 5;
21505
21814
  _t5 = _context5.v;
21506
- throw new Error("Error: Failed to start animating route");
21815
+ throw new Error("Error: Failed to start animating route", {
21816
+ cause: _t5
21817
+ });
21507
21818
  case 6:
21508
21819
  return _context5.a(2);
21509
21820
  }
@@ -21521,7 +21832,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
21521
21832
  this.routeController.pauseAnimation(routeId);
21522
21833
  this.logEvent("pauseAnimateRoute");
21523
21834
  } catch (error) {
21524
- // Pause animation may fail if no animation is running
21835
+ this.debugLog("Pause animation failed (no animation may be running)", error);
21525
21836
  }
21526
21837
  }
21527
21838
  }, {
@@ -21531,7 +21842,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
21531
21842
  this.routeController.resumeAnimation(routeId);
21532
21843
  this.logEvent("resumeAnimateRoute");
21533
21844
  } catch (error) {
21534
- // Resume animation may fail if no animation is paused
21845
+ this.debugLog("Resume animation failed (no animation may be paused)", error);
21535
21846
  }
21536
21847
  }
21537
21848
  }, {
@@ -21541,7 +21852,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
21541
21852
  this.routeController.restartAnimation(routeId);
21542
21853
  this.logEvent("restartAnimateRoute");
21543
21854
  } catch (error) {
21544
- // Restart animation may fail if no animation exists
21855
+ this.debugLog("Restart animation failed (no animation may exist)", error);
21545
21856
  }
21546
21857
  }
21547
21858
  }, {
@@ -21591,7 +21902,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
21591
21902
  case 5:
21592
21903
  _context6.p = 5;
21593
21904
  _t6 = _context6.v;
21594
- throw new Error("Error: Failed to add step animation");
21905
+ throw new Error("Error: Failed to add step animation", {
21906
+ cause: _t6
21907
+ });
21595
21908
  case 6:
21596
21909
  return _context6.a(2);
21597
21910
  }
@@ -21642,7 +21955,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
21642
21955
  case 5:
21643
21956
  _context7.p = 5;
21644
21957
  _t7 = _context7.v;
21645
- throw new Error("Error: Failed to add step animation");
21958
+ throw new Error("Error: Failed to add step animation", {
21959
+ cause: _t7
21960
+ });
21646
21961
  case 6:
21647
21962
  return _context7.a(2);
21648
21963
  }
@@ -21660,7 +21975,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
21660
21975
  this.routeController.nextStepAnimation(routeId);
21661
21976
  this.logEvent("nextStepAnimation");
21662
21977
  } catch (error) {
21663
- throw new Error("Error: Failed to animate step");
21978
+ throw new Error("Error: Failed to animate step", {
21979
+ cause: error
21980
+ });
21664
21981
  }
21665
21982
  }
21666
21983
  }, {
@@ -21758,7 +22075,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
21758
22075
  this.map.setPaintProperty("indoor-bordered-places", "line-width", width);
21759
22076
  }
21760
22077
  } catch (error) {
21761
- throw new Error("Failed to add border to places");
22078
+ throw new Error("Failed to add border to places", {
22079
+ cause: error
22080
+ });
21762
22081
  }
21763
22082
  }
21764
22083
  }, {
@@ -21886,15 +22205,53 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
21886
22205
  });
21887
22206
 
21888
22207
  // Attempt to reload valid failed tiles
22208
+ var now = Date.now();
21889
22209
  tilesToRetry.forEach(function (tile) {
22210
+ var _this15$tileRetryStat;
22211
+ var retry = (_this15$tileRetryStat = _this15.tileRetryState.get(tile)) !== null && _this15$tileRetryStat !== void 0 ? _this15$tileRetryStat : {
22212
+ attempts: 0,
22213
+ nextAttemptAt: 0,
22214
+ pending: false
22215
+ };
22216
+
22217
+ // Skip tiles with a reload still in flight or still inside their backoff window.
22218
+ if (retry.pending || now < retry.nextAttemptAt) return;
22219
+ var onFailure = function onFailure(error) {
22220
+ var attempts = retry.attempts + 1;
22221
+ if (attempts >= MAX_TILE_RETRIES) {
22222
+ _this15.debugLog("Tile reload failed ".concat(attempts, " times, dropping it from the retry queue"), error);
22223
+ _this15.failedTiles["delete"](tile);
22224
+ _this15.tileRetryState["delete"](tile);
22225
+ return;
22226
+ }
22227
+
22228
+ // Stay in the queue and try again once the backoff has elapsed.
22229
+ var backoffMs = TILE_RETRY_BASE_DELAY_MS * Math.pow(2, attempts - 1);
22230
+ _this15.debugLog("Tile reload failed (attempt ".concat(attempts, "/").concat(MAX_TILE_RETRIES, "), retrying in ").concat(backoffMs, "ms"), error);
22231
+ _this15.tileRetryState.set(tile, {
22232
+ attempts: attempts,
22233
+ nextAttemptAt: Date.now() + backoffMs,
22234
+ pending: false
22235
+ });
22236
+ };
21890
22237
  try {
21891
22238
  // Verify tile still exists and is in a retryable state
21892
22239
  if (tile && (tile.state === "errored" || tile.state === "expired")) {
21893
- source.loadTile(tile);
22240
+ _this15.tileRetryState.set(tile, map_objectSpread(map_objectSpread({}, retry), {}, {
22241
+ pending: true
22242
+ }));
22243
+ // loadTile is async, so a rejection escapes this try/catch and has to be handled
22244
+ // on the promise itself - otherwise it surfaces as an unhandled rejection and the
22245
+ // tile is retried on every tick regardless of how often it has already failed.
22246
+ source.loadTile(tile).then(function () {
22247
+ // Loaded: forget the attempt history so a later failure starts from zero. The
22248
+ // tile leaves the queue through the tilesToRemove branch on the next tick,
22249
+ // once its state is no longer errored/expired.
22250
+ _this15.tileRetryState["delete"](tile);
22251
+ })["catch"](onFailure);
21894
22252
  }
21895
22253
  } catch (error) {
21896
- // If reload fails, remove tile from retry queue - this is expected
21897
- _this15.failedTiles["delete"](tile);
22254
+ onFailure(error);
21898
22255
  }
21899
22256
  });
21900
22257
  }, 1000);
@@ -22121,7 +22478,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
22121
22478
  case 2:
22122
22479
  _context.p = 2;
22123
22480
  _t = _context.v;
22124
- throw Error("Error getPlaceDetail");
22481
+ throw new Error("Error getPlaceDetail", {
22482
+ cause: _t
22483
+ });
22125
22484
  case 3:
22126
22485
  return _context.a(2);
22127
22486
  }
@@ -22153,7 +22512,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
22153
22512
  case 2:
22154
22513
  _context2.p = 2;
22155
22514
  _t2 = _context2.v;
22156
- throw Error("Error getAnyPlaceDetail");
22515
+ throw new Error("Error getAnyPlaceDetail", {
22516
+ cause: _t2
22517
+ });
22157
22518
  case 3:
22158
22519
  return _context2.a(2);
22159
22520
  }
@@ -22192,7 +22553,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
22192
22553
  this.logEvent("createMap");
22193
22554
  return map;
22194
22555
  } catch (error) {
22195
- throw new Error("Failed to create map");
22556
+ throw new Error("Failed to create map", {
22557
+ cause: error
22558
+ });
22196
22559
  }
22197
22560
  }
22198
22561
  }, {
@@ -22213,7 +22576,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
22213
22576
  case 2:
22214
22577
  _context3.p = 2;
22215
22578
  _t3 = _context3.v;
22216
- throw new Error("Failed to get configuration");
22579
+ throw new Error("Failed to get configuration", {
22580
+ cause: _t3
22581
+ });
22217
22582
  case 3:
22218
22583
  return _context3.a(2);
22219
22584
  }
@@ -22242,7 +22607,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
22242
22607
  case 2:
22243
22608
  _context4.p = 2;
22244
22609
  _t4 = _context4.v;
22245
- throw new Error("Failed to get categories");
22610
+ throw new Error("Failed to get categories", {
22611
+ cause: _t4
22612
+ });
22246
22613
  case 3:
22247
22614
  return _context4.a(2);
22248
22615
  }
@@ -22270,7 +22637,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
22270
22637
  case 2:
22271
22638
  _context5.p = 2;
22272
22639
  _t5 = _context5.v;
22273
- throw Error("Failed to get transport");
22640
+ throw new Error("Failed to get transport", {
22641
+ cause: _t5
22642
+ });
22274
22643
  case 3:
22275
22644
  return _context5.a(2);
22276
22645
  }
@@ -22289,7 +22658,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
22289
22658
  this.logEvent("getCachedPlaces");
22290
22659
  return places;
22291
22660
  } catch (error) {
22292
- throw Error("Failed to get cached places");
22661
+ throw new Error("Failed to get cached places", {
22662
+ cause: error
22663
+ });
22293
22664
  }
22294
22665
  }
22295
22666
  }, {
@@ -22310,7 +22681,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
22310
22681
  case 2:
22311
22682
  _context6.p = 2;
22312
22683
  _t6 = _context6.v;
22313
- throw Error("Failed to get available places");
22684
+ throw new Error("Failed to get available places", {
22685
+ cause: _t6
22686
+ });
22314
22687
  case 3:
22315
22688
  return _context6.a(2);
22316
22689
  }
@@ -22339,7 +22712,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
22339
22712
  case 2:
22340
22713
  _context7.p = 2;
22341
22714
  _t7 = _context7.v;
22342
- throw Error("Failed to get subplaces");
22715
+ throw new Error("Failed to get subplaces", {
22716
+ cause: _t7
22717
+ });
22343
22718
  case 3:
22344
22719
  return _context7.a(2);
22345
22720
  }
@@ -22368,7 +22743,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
22368
22743
  case 2:
22369
22744
  _context8.p = 2;
22370
22745
  _t8 = _context8.v;
22371
- throw Error("Failed to get places from institution");
22746
+ throw new Error("Failed to get places from institution", {
22747
+ cause: _t8
22748
+ });
22372
22749
  case 3:
22373
22750
  return _context8.a(2);
22374
22751
  }
@@ -22397,7 +22774,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
22397
22774
  case 2:
22398
22775
  _context9.p = 2;
22399
22776
  _t9 = _context9.v;
22400
- throw Error("Failed to get any sub-places");
22777
+ throw new Error("Failed to get any sub-places", {
22778
+ cause: _t9
22779
+ });
22401
22780
  case 3:
22402
22781
  return _context9.a(2);
22403
22782
  }
@@ -22426,7 +22805,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
22426
22805
  case 2:
22427
22806
  _context0.p = 2;
22428
22807
  _t0 = _context0.v;
22429
- throw Error("Error getInstitution");
22808
+ throw new Error("Error getInstitution", {
22809
+ cause: _t0
22810
+ });
22430
22811
  case 3:
22431
22812
  return _context0.a(2);
22432
22813
  }
@@ -22456,7 +22837,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
22456
22837
  case 2:
22457
22838
  _context1.p = 2;
22458
22839
  _t1 = _context1.v;
22459
- throw new Error("Failed to get route");
22840
+ throw new Error("Failed to get route", {
22841
+ cause: _t1
22842
+ });
22460
22843
  case 3:
22461
22844
  return _context1.a(2);
22462
22845
  }
@@ -22486,7 +22869,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
22486
22869
  case 2:
22487
22870
  _context10.p = 2;
22488
22871
  _t10 = _context10.v;
22489
- throw new Error("Failed to get route");
22872
+ throw new Error("Failed to get route", {
22873
+ cause: _t10
22874
+ });
22490
22875
  case 3:
22491
22876
  return _context10.a(2);
22492
22877
  }
@@ -22516,7 +22901,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
22516
22901
  case 2:
22517
22902
  _context11.p = 2;
22518
22903
  _t11 = _context11.v;
22519
- throw new Error("Failed to get route");
22904
+ throw new Error("Failed to get route", {
22905
+ cause: _t11
22906
+ });
22520
22907
  case 3:
22521
22908
  return _context11.a(2);
22522
22909
  }
@@ -22547,7 +22934,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
22547
22934
  case 2:
22548
22935
  _context12.p = 2;
22549
22936
  _t12 = _context12.v;
22550
- throw new Error("Failed to get places by input");
22937
+ throw new Error("Failed to get places by input", {
22938
+ cause: _t12
22939
+ });
22551
22940
  case 3:
22552
22941
  return _context12.a(2);
22553
22942
  }
@@ -22605,7 +22994,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
22605
22994
  case 4:
22606
22995
  _context13.p = 4;
22607
22996
  _t13 = _context13.v;
22608
- throw new Error("Failed to search places by tags");
22997
+ throw new Error("Failed to search places by tags", {
22998
+ cause: _t13
22999
+ });
22609
23000
  case 5:
22610
23001
  return _context13.a(2);
22611
23002
  }
@@ -22632,7 +23023,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
22632
23023
  case 1:
22633
23024
  _context14.p = 1;
22634
23025
  _t14 = _context14.v;
22635
- throw new Error("Failed to get places by category");
23026
+ throw new Error("Failed to get places by category", {
23027
+ cause: _t14
23028
+ });
22636
23029
  case 2:
22637
23030
  return _context14.a(2);
22638
23031
  }
@@ -22767,7 +23160,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
22767
23160
  case 2:
22768
23161
  _context16.p = 2;
22769
23162
  _t15 = _context16.v;
22770
- throw new Error("Failed to get cache timestamp");
23163
+ throw new Error("Failed to get cache timestamp", {
23164
+ cause: _t15
23165
+ });
22771
23166
  case 3:
22772
23167
  return _context16.a(2);
22773
23168
  }
@@ -22801,7 +23196,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
22801
23196
  case 2:
22802
23197
  _context17.p = 2;
22803
23198
  _t16 = _context17.v;
22804
- throw new Error("Failed to get css customization");
23199
+ throw new Error("Failed to get css customization", {
23200
+ cause: _t16
23201
+ });
22805
23202
  case 3:
22806
23203
  return _context17.a(2);
22807
23204
  }
@@ -22829,7 +23226,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
22829
23226
  case 2:
22830
23227
  _context18.p = 2;
22831
23228
  _t17 = _context18.v;
22832
- throw new Error("Failed to notify health");
23229
+ throw new Error("Failed to notify health", {
23230
+ cause: _t17
23231
+ });
22833
23232
  case 3:
22834
23233
  return _context18.a(2);
22835
23234
  }
@@ -23174,9 +23573,9 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23174
23573
  if (!hourStr || !minuteStr) {
23175
23574
  return "";
23176
23575
  }
23177
- var hour = parseInt(hourStr, 10);
23178
- var minute = parseInt(minuteStr, 10);
23179
- if (isNaN(hour) || isNaN(minute) || hour < 0 || hour > 23 || minute < 0 || minute > 59) {
23576
+ var hour = Number.parseInt(hourStr, 10);
23577
+ var minute = Number.parseInt(minuteStr, 10);
23578
+ if (Number.isNaN(hour) || Number.isNaN(minute) || hour < 0 || hour > 23 || minute < 0 || minute > 59) {
23180
23579
  return "";
23181
23580
  }
23182
23581
  var displayHour = hour % 24;
@@ -23307,13 +23706,13 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23307
23706
  return date.toLocaleDateString(currentLang, {
23308
23707
  weekday: "long"
23309
23708
  });
23310
- } catch (error) {
23709
+ } catch (_unused5) {
23311
23710
  // Fallback to English if the language is not valid
23312
23711
  return date.toLocaleDateString("en", {
23313
23712
  weekday: "long"
23314
23713
  });
23315
23714
  }
23316
- } catch (_unused5) {
23715
+ } catch (_unused6) {
23317
23716
  return "";
23318
23717
  }
23319
23718
  }
@@ -23344,7 +23743,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23344
23743
  var dayNumberB = OpeningHoursHelper.getDayNumber(keyB);
23345
23744
  return dayNumberA - dayNumberB;
23346
23745
  }));
23347
- } catch (_unused6) {
23746
+ } catch (_unused7) {
23348
23747
  return openingHours;
23349
23748
  }
23350
23749
  }
@@ -23390,7 +23789,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23390
23789
  if (is24Hours(interval)) {
23391
23790
  return true;
23392
23791
  }
23393
- if (interval && interval.open && interval.close && OpeningHoursHelper.isValidTime(interval.open) && OpeningHoursHelper.isValidTime(interval.close)) {
23792
+ if (interval !== null && interval !== void 0 && interval.open && interval.close && OpeningHoursHelper.isValidTime(interval.open) && OpeningHoursHelper.isValidTime(interval.close)) {
23394
23793
  // Create the date object based on yesterday
23395
23794
  var openTime = OpeningHoursHelper.parseTimeAsDate(interval.open, yesterday);
23396
23795
  var closeTime = OpeningHoursHelper.parseTimeAsDate(interval.close, yesterday);
@@ -23408,7 +23807,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23408
23807
  _iterator.f();
23409
23808
  }
23410
23809
  return false;
23411
- } catch (_unused7) {
23810
+ } catch (_unused8) {
23412
23811
  return false;
23413
23812
  }
23414
23813
  }
@@ -23431,7 +23830,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23431
23830
  try {
23432
23831
  var day = date.getDate();
23433
23832
  date.setDate(day - 1);
23434
- } catch (_unused8) {}
23833
+ } catch (_unused9) {}
23435
23834
  }
23436
23835
 
23437
23836
  /**
@@ -23452,7 +23851,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23452
23851
  try {
23453
23852
  var day = date.getDate();
23454
23853
  date.setDate(day + 1);
23455
- } catch (_unused9) {}
23854
+ } catch (_unused0) {}
23456
23855
  }
23457
23856
 
23458
23857
  /**
@@ -23497,7 +23896,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23497
23896
  if (is24Hours(interval)) {
23498
23897
  return true;
23499
23898
  }
23500
- if (interval && interval.open && interval.close && OpeningHoursHelper.isValidTime(interval.open) && OpeningHoursHelper.isValidTime(interval.close)) {
23899
+ if (interval !== null && interval !== void 0 && interval.open && interval.close && OpeningHoursHelper.isValidTime(interval.open) && OpeningHoursHelper.isValidTime(interval.close)) {
23501
23900
  // Create Date objects based on today
23502
23901
  var openTime = OpeningHoursHelper.parseTimeAsDate(interval.open, now);
23503
23902
  var closeTime = OpeningHoursHelper.parseTimeAsDate(interval.close, now);
@@ -23515,7 +23914,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23515
23914
  _iterator2.f();
23516
23915
  }
23517
23916
  return false; // The current time is not within any interval
23518
- } catch (_unused0) {
23917
+ } catch (_unused1) {
23519
23918
  return false;
23520
23919
  }
23521
23920
  }
@@ -23546,8 +23945,8 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23546
23945
  return false;
23547
23946
  }
23548
23947
  var intervals = openingHours[day];
23549
- return !!(intervals && intervals.length > 0);
23550
- } catch (_unused1) {
23948
+ return !!(intervals !== null && intervals !== void 0 && intervals.length);
23949
+ } catch (_unused10) {
23551
23950
  return false;
23552
23951
  }
23553
23952
  }
@@ -23576,7 +23975,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23576
23975
  }
23577
23976
  var timeRegex = /^([01][0-9]|2[0-3]):[0-5][0-9]$/; // HH:mm format (requires leading zero)
23578
23977
  return timeRegex.test(time);
23579
- } catch (_unused10) {
23978
+ } catch (_unused11) {
23580
23979
  return false;
23581
23980
  }
23582
23981
  }
@@ -23606,7 +24005,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23606
24005
  var baseDate = date ? new Date(date) : new Date();
23607
24006
  var newDate = new Date(baseDate.getFullYear(), baseDate.getMonth(), baseDate.getDate(), hours, minutes, 0, 0);
23608
24007
  return newDate;
23609
- } catch (_unused11) {
24008
+ } catch (_unused12) {
23610
24009
  return new Date();
23611
24010
  }
23612
24011
  }
@@ -23651,7 +24050,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23651
24050
  open: first.open,
23652
24051
  close: last.close
23653
24052
  };
23654
- } catch (_unused12) {
24053
+ } catch (_unused13) {
23655
24054
  return {
23656
24055
  open: "00:00",
23657
24056
  close: "00:00"
@@ -23685,7 +24084,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23685
24084
  // Compare the 'open' times as strings
23686
24085
  return a.open.localeCompare(b.open);
23687
24086
  });
23688
- } catch (_unused13) {
24087
+ } catch (_unused14) {
23689
24088
  return openingTimes;
23690
24089
  }
23691
24090
  }
@@ -23713,13 +24112,13 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23713
24112
  return "";
23714
24113
  }
23715
24114
  var intervals = openingHours[day];
23716
- if (intervals && intervals.length > 0) {
24115
+ if (intervals !== null && intervals !== void 0 && intervals.length) {
23717
24116
  var flattenedTime = OpeningHoursHelper.flattenOpeningTimes(intervals);
23718
24117
  return OpeningHoursHelper.formatTimeSchedule(flattenedTime);
23719
24118
  } else {
23720
24119
  return "";
23721
24120
  }
23722
- } catch (_unused14) {
24121
+ } catch (_unused15) {
23723
24122
  return "";
23724
24123
  }
23725
24124
  }
@@ -23748,13 +24147,13 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23748
24147
  return "";
23749
24148
  }
23750
24149
  var intervals = openingHours[day];
23751
- if (intervals && intervals.length > 0) {
24150
+ if (intervals !== null && intervals !== void 0 && intervals.length) {
23752
24151
  var flattenedTime = OpeningHoursHelper.flattenOpeningTimes(intervals);
23753
24152
  return OpeningHoursHelper.formatTimeSchedule(flattenedTime);
23754
24153
  } else {
23755
24154
  return "";
23756
24155
  }
23757
- } catch (_unused15) {
24156
+ } catch (_unused16) {
23758
24157
  return "";
23759
24158
  }
23760
24159
  }
@@ -23787,7 +24186,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23787
24186
  var minutesClose = OpeningHoursHelper.toMinutes(closeHour);
23788
24187
  var minutesCurrent = OpeningHoursHelper.toMinutes(currentHour);
23789
24188
  return minutesCurrent >= minutesOpen && minutesCurrent <= minutesClose;
23790
- } catch (_unused16) {
24189
+ } catch (_unused17) {
23791
24190
  return false;
23792
24191
  }
23793
24192
  }
@@ -23819,15 +24218,15 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23819
24218
  if (!hoursStr || !minutesStr) {
23820
24219
  return new Date();
23821
24220
  }
23822
- var hours = parseInt(hoursStr, 10);
23823
- var minutes = parseInt(minutesStr, 10);
23824
- if (isNaN(hours) || isNaN(minutes)) {
24221
+ var hours = Number.parseInt(hoursStr, 10);
24222
+ var minutes = Number.parseInt(minutesStr, 10);
24223
+ if (Number.isNaN(hours) || Number.isNaN(minutes)) {
23825
24224
  return new Date();
23826
24225
  }
23827
24226
  var date = baseDate ? new Date(baseDate) : new Date();
23828
24227
  date.setHours(hours, minutes, 0, 0);
23829
24228
  return date;
23830
- } catch (_unused17) {
24229
+ } catch (_unused18) {
23831
24230
  return new Date();
23832
24231
  }
23833
24232
  }
@@ -23869,7 +24268,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23869
24268
  return firstDay;
23870
24269
  }
23871
24270
  return "".concat(firstDay, " - ").concat(lastDay);
23872
- } catch (_unused18) {
24271
+ } catch (_unused19) {
23873
24272
  return "";
23874
24273
  }
23875
24274
  }
@@ -23906,7 +24305,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23906
24305
  return a.diff - b.diff;
23907
24306
  });
23908
24307
  return timesWithDiffs.length > 0 ? timesWithDiffs[0].time : "";
23909
- } catch (_unused19) {
24308
+ } catch (_unused20) {
23910
24309
  return "";
23911
24310
  }
23912
24311
  }
@@ -23954,7 +24353,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23954
24353
  var time = new Date(date);
23955
24354
  time.setSeconds(0, 0);
23956
24355
  return time >= startDate && time <= endDate;
23957
- } catch (_unused20) {
24356
+ } catch (_unused21) {
23958
24357
  return false;
23959
24358
  }
23960
24359
  }
@@ -23995,7 +24394,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
23995
24394
  return "";
23996
24395
  }
23997
24396
  return OpeningHoursHelper.convertSingleTimeTo12Hour(time);
23998
- } catch (_unused21) {
24397
+ } catch (_unused22) {
23999
24398
  return "";
24000
24399
  }
24001
24400
  }
@@ -24023,8 +24422,8 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
24023
24422
  if (dayName == null) {
24024
24423
  return false;
24025
24424
  }
24026
- return !!(openingHours && openingHours[dayName]);
24027
- } catch (_unused22) {
24425
+ return !!(openingHours !== null && openingHours !== void 0 && openingHours[dayName]);
24426
+ } catch (_unused23) {
24028
24427
  return false;
24029
24428
  }
24030
24429
  }
@@ -24058,13 +24457,13 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
24058
24457
  if (!hoursStr || !minutesStr) {
24059
24458
  return 0;
24060
24459
  }
24061
- var hours = parseInt(hoursStr, 10);
24062
- var minutes = parseInt(minutesStr, 10);
24063
- if (isNaN(hours) || isNaN(minutes)) {
24460
+ var hours = Number.parseInt(hoursStr, 10);
24461
+ var minutes = Number.parseInt(minutesStr, 10);
24462
+ if (Number.isNaN(hours) || Number.isNaN(minutes)) {
24064
24463
  return 0;
24065
24464
  }
24066
24465
  return hours * 60 + minutes;
24067
- } catch (_unused23) {
24466
+ } catch (_unused24) {
24068
24467
  return 0;
24069
24468
  }
24070
24469
  }