azure-maps-control 2.2.4 → 2.2.5

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.
@@ -43619,7 +43619,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
43619
43619
  return Url;
43620
43620
  }());
43621
43621
 
43622
- var version = "2.2.4";
43622
+ var version = "2.2.5";
43623
43623
 
43624
43624
  /**
43625
43625
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -53440,6 +53440,72 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
53440
53440
 
53441
53441
  var cloneDeepWith_1 = cloneDeepWith;
53442
53442
 
53443
+ /**
53444
+ * A hidden HTML element that is used to provide accessibility to shapes such as bubble.
53445
+ */
53446
+ var AccessibleIndicator = /** @class */ (function () {
53447
+ /**
53448
+ * Constructs an AccessibleIndicator object by initializing a hidden `div` element.
53449
+ * @internal
53450
+ */
53451
+ function AccessibleIndicator(options) {
53452
+ var _this = this;
53453
+ /**
53454
+ * Attaches the indicator to the HTML document in a hidden style.
53455
+ * @param map The map.
53456
+ */
53457
+ this.attach = function (map) {
53458
+ // If attaching to a different map, remove popup on current map
53459
+ if (_this.map !== map) {
53460
+ // If map was defined the indicator was attached to another map.
53461
+ if (_this.map) {
53462
+ _this.detachFromCurrentMap();
53463
+ }
53464
+ _this.map = map;
53465
+ _this.map.indicators._getCollectionDiv().appendChild(_this.element);
53466
+ _this.map.indicators.add(_this);
53467
+ }
53468
+ };
53469
+ /**
53470
+ * Removes the indicator from the map and the HTML document.
53471
+ */
53472
+ this.remove = function () {
53473
+ _this.detachFromCurrentMap();
53474
+ _this.element.remove();
53475
+ };
53476
+ /**
53477
+ * Get the DOM element of the indicator.
53478
+ * @returns The DOM element of the indicator.
53479
+ */
53480
+ this.getElement = function () {
53481
+ return _this.element;
53482
+ };
53483
+ this.detachFromCurrentMap = function () {
53484
+ if (_this.map) {
53485
+ _this.map.indicators.remove(_this);
53486
+ delete _this.map;
53487
+ }
53488
+ };
53489
+ this.element = document.createElement("div");
53490
+ // Set tabindex to 0 to make the element focusable.
53491
+ this.element.setAttribute("tabindex", "0");
53492
+ // Set the role to option, and it's container to listbox so the reader will read the listbox as a list.
53493
+ // For example, NVDA will read "data point, {posinset} of {setsize}" when the indicator is focused.
53494
+ this.element.setAttribute("role", "option");
53495
+ if (options === null || options === void 0 ? void 0 : options.setSize)
53496
+ this.element.setAttribute("aria-setsize", options.setSize.toString());
53497
+ if (options === null || options === void 0 ? void 0 : options.positionInSet)
53498
+ this.element.setAttribute("aria-posinset", options.positionInSet.toString());
53499
+ this.element.setAttribute("aria-label", "data point");
53500
+ this.element.classList.add(AccessibleIndicator.Css.hidden);
53501
+ }
53502
+ // CSS class names.
53503
+ AccessibleIndicator.Css = {
53504
+ hidden: "hidden-accessible-element"
53505
+ };
53506
+ return AccessibleIndicator;
53507
+ }());
53508
+
53443
53509
  var __extends$k = (window && window.__extends) || (function () {
53444
53510
  var extendStatics = function (d, b) {
53445
53511
  extendStatics = Object.setPrototypeOf ||
@@ -54298,7 +54364,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
54298
54364
  // and can be used to determine which events are ours vs Mapbox's.
54299
54365
  Layer.LayerEvents = {
54300
54366
  layeradded: undefined,
54301
- layerremoved: undefined
54367
+ layerremoved: undefined,
54368
+ focusin: undefined,
54369
+ focusout: undefined,
54302
54370
  };
54303
54371
  return Layer;
54304
54372
  }(EventEmitter));
@@ -54453,6 +54521,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
54453
54521
  * @default 8
54454
54522
  */
54455
54523
  _this.radius = 8;
54524
+ /**
54525
+ * @internal
54526
+ * Specifies whether to create focusable indicators for the bubbles.
54527
+ *
54528
+ * Note: We treat this as an internal option for now because we hadn't fully decided the default styling for the indicators.
54529
+ * Once we decide, we will make this a public option or remove it.
54530
+ */
54531
+ _this.createIndicators = false;
54456
54532
  return _this;
54457
54533
  }
54458
54534
  return BubbleLayerOptions;
@@ -54473,6 +54549,58 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
54473
54549
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
54474
54550
  };
54475
54551
  })();
54552
+ var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
54553
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
54554
+ return new (P || (P = Promise))(function (resolve, reject) {
54555
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
54556
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
54557
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
54558
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
54559
+ });
54560
+ };
54561
+ var __generator$1 = (window && window.__generator) || function (thisArg, body) {
54562
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
54563
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
54564
+ function verb(n) { return function (v) { return step([n, v]); }; }
54565
+ function step(op) {
54566
+ if (f) throw new TypeError("Generator is already executing.");
54567
+ while (_) try {
54568
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
54569
+ if (y = 0, t) op = [op[0] & 2, t.value];
54570
+ switch (op[0]) {
54571
+ case 0: case 1: t = op; break;
54572
+ case 4: _.label++; return { value: op[1], done: false };
54573
+ case 5: _.label++; y = op[1]; op = [0]; continue;
54574
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
54575
+ default:
54576
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
54577
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
54578
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
54579
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
54580
+ if (t[2]) _.ops.pop();
54581
+ _.trys.pop(); continue;
54582
+ }
54583
+ op = body.call(thisArg, _);
54584
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
54585
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
54586
+ }
54587
+ };
54588
+ var __read$3 = (window && window.__read) || function (o, n) {
54589
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
54590
+ if (!m) return o;
54591
+ var i = m.call(o), r, ar = [], e;
54592
+ try {
54593
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
54594
+ }
54595
+ catch (error) { e = { error: error }; }
54596
+ finally {
54597
+ try {
54598
+ if (r && !r.done && (m = i["return"])) m.call(i);
54599
+ }
54600
+ finally { if (e) throw e.error; }
54601
+ }
54602
+ return ar;
54603
+ };
54476
54604
  /**
54477
54605
  * Renders Point objects as scalable circles (bubbles).
54478
54606
  */
@@ -54486,6 +54614,72 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
54486
54614
  */
54487
54615
  function BubbleLayer(source, id, options) {
54488
54616
  var _this = _super.call(this, id) || this;
54617
+ _this.accessibleIndicator = [];
54618
+ _this.setAccessibleIndicator = function () { return __awaiter$1(_this, void 0, void 0, function () {
54619
+ var features, createIndicator, insertHiddenBefore, attach;
54620
+ var _this = this;
54621
+ return __generator$1(this, function (_a) {
54622
+ this.accessibleIndicator.forEach(function (indicator) { return indicator.remove(); });
54623
+ this.accessibleIndicator = [];
54624
+ features = this.map.layers.getRenderedShapes(this.map.getCamera().bounds, this);
54625
+ createIndicator = function (features, idx) {
54626
+ var bubbleFeature = features[idx];
54627
+ var indicator = new AccessibleIndicator({ positionInSet: idx + 1, setSize: features.length });
54628
+ var element = indicator.getElement();
54629
+ var _a = __read$3(_this.map.positionsToPixels([bubbleFeature.data.geometry.coordinates]), 1), pixel = _a[0];
54630
+ element.addEventListener('focusin', function (event) {
54631
+ _this.accessibleIndicator.filter(function (p) { return p !== indicator; }).forEach(function (popup) { return popup.remove(); });
54632
+ // insert previous and next popups
54633
+ if (idx - 1 >= 0) {
54634
+ insertHiddenBefore(indicator, createIndicator(features, idx - 1));
54635
+ }
54636
+ if (idx + 1 < features.length) {
54637
+ attach(createIndicator(features, idx + 1));
54638
+ }
54639
+ _this.map._getMap().setPaintProperty(_this.id, 'circle-stroke-color', ['case', ['==', ['get', '_azureMapsShapeId'], bubbleFeature.data.id], '#000000', _this.options.strokeColor]);
54640
+ var focusEvent = {
54641
+ target: element,
54642
+ type: 'focusin',
54643
+ map: _this.map,
54644
+ shape: bubbleFeature,
54645
+ originalEvent: event,
54646
+ pixel: pixel
54647
+ };
54648
+ _this._invokeEvent('focusin', focusEvent);
54649
+ });
54650
+ element.addEventListener('focusout', function (event) {
54651
+ _this.map._getMap().setPaintProperty(_this.id, 'circle-stroke-color', ['case', ['==', ['get', '_azureMapsShapeId'], bubbleFeature.data.id], _this.options.strokeColor, _this.options.strokeColor]);
54652
+ var focusEvent = {
54653
+ target: element,
54654
+ type: 'focusout',
54655
+ map: _this.map,
54656
+ shape: bubbleFeature,
54657
+ originalEvent: event,
54658
+ pixel: pixel
54659
+ };
54660
+ _this._invokeEvent('focusout', focusEvent);
54661
+ });
54662
+ _this.accessibleIndicator.push(indicator);
54663
+ return indicator;
54664
+ };
54665
+ insertHiddenBefore = function (base, toInsert) {
54666
+ toInsert.attach(_this.map);
54667
+ var elementToSwapIn = toInsert.getElement();
54668
+ var baseElement = base.getElement();
54669
+ baseElement.parentElement.insertBefore(elementToSwapIn, baseElement);
54670
+ };
54671
+ attach = function (popup) {
54672
+ popup.attach(_this.map);
54673
+ };
54674
+ if (features.length > 0) {
54675
+ attach(createIndicator(features, 0));
54676
+ }
54677
+ if (features.length > 1) {
54678
+ attach(createIndicator(features, features.length - 1));
54679
+ }
54680
+ return [2 /*return*/];
54681
+ });
54682
+ }); };
54489
54683
  _this.options = new BubbleLayerOptions().merge(cloneDeepWith_1(options, BubbleLayerOptions._cloneCustomizer));
54490
54684
  _this.options.source = source || _this.options.source;
54491
54685
  return _this;
@@ -54533,6 +54727,20 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
54533
54727
  }
54534
54728
  this.options = newOptions;
54535
54729
  };
54730
+ BubbleLayer.prototype.onAdd = function (map) {
54731
+ _super.prototype.onAdd.call(this, map);
54732
+ if (this.options.createIndicators) {
54733
+ map.events.addOnce('idle', this.setAccessibleIndicator);
54734
+ map.events.add('moveend', this.setAccessibleIndicator);
54735
+ }
54736
+ };
54737
+ BubbleLayer.prototype.onRemove = function () {
54738
+ _super.prototype.onRemove.call(this);
54739
+ if (this.options.createIndicators) {
54740
+ this.map.events.remove('idle', this.setAccessibleIndicator);
54741
+ this.map.events.remove('moveend', this.setAccessibleIndicator);
54742
+ }
54743
+ };
54536
54744
  /**
54537
54745
  * @internal
54538
54746
  */
@@ -55651,7 +55859,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
55651
55859
  };
55652
55860
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
55653
55861
  };
55654
- var __read$3 = (window && window.__read) || function (o, n) {
55862
+ var __read$4 = (window && window.__read) || function (o, n) {
55655
55863
  var m = typeof Symbol === "function" && o[Symbol.iterator];
55656
55864
  if (!m) return o;
55657
55865
  var i = m.call(o), r, ar = [], e;
@@ -55742,7 +55950,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
55742
55950
  finally { if (e_1) throw e_1.error; }
55743
55951
  }
55744
55952
  // Then execute the standard merge behavior.
55745
- var merged = _super.prototype.merge.apply(this, __spreadArray([], __read$3(valueList)));
55953
+ var merged = _super.prototype.merge.apply(this, __spreadArray([], __read$4(valueList)));
55746
55954
  if (isNewColorSet) {
55747
55955
  merged.fillPattern = undefined;
55748
55956
  }
@@ -57073,7 +57281,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
57073
57281
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
57074
57282
  };
57075
57283
  })();
57076
- var __read$4 = (window && window.__read) || function (o, n) {
57284
+ var __read$5 = (window && window.__read) || function (o, n) {
57077
57285
  var m = typeof Symbol === "function" && o[Symbol.iterator];
57078
57286
  if (!m) return o;
57079
57287
  var i = m.call(o), r, ar = [], e;
@@ -57185,7 +57393,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
57185
57393
  */
57186
57394
  _this._onDown = function (event) {
57187
57395
  _this.map.popups._addDraggedPopup(_this);
57188
- var _a = __read$4(_this.map.positionsToPixels([_this.options.position]), 1), anchorPixel = _a[0];
57396
+ var _a = __read$5(_this.map.positionsToPixels([_this.options.position]), 1), anchorPixel = _a[0];
57189
57397
  if (event.type === "mousedown") {
57190
57398
  event = event;
57191
57399
  _this.dragOffset = [
@@ -57349,7 +57557,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
57349
57557
  pixel[0] + this.dragOffset[0],
57350
57558
  pixel[1] + this.dragOffset[1]
57351
57559
  ];
57352
- var _a = __read$4(this.map.pixelsToPositions([anchorPixel]), 1), anchorPos = _a[0];
57560
+ var _a = __read$5(this.map.pixelsToPositions([anchorPixel]), 1), anchorPos = _a[0];
57353
57561
  this.options.position = anchorPos;
57354
57562
  this.marker.setLngLat(this.options.position);
57355
57563
  this._invokeEvent("drag", { type: "drag", target: this });
@@ -57503,7 +57711,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
57503
57711
  posY = pt.y;
57504
57712
  }
57505
57713
  else {
57506
- var _a = __read$4(map.positionsToPixels([options.position]), 1), _b = __read$4(_a[0], 2), x = _b[0], y = _b[1];
57714
+ var _a = __read$5(map.positionsToPixels([options.position]), 1), _b = __read$5(_a[0], 2), x = _b[0], y = _b[1];
57507
57715
  posX = x;
57508
57716
  posY = y;
57509
57717
  }
@@ -58420,7 +58628,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
58420
58628
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
58421
58629
  };
58422
58630
  })();
58423
- var __read$5 = (window && window.__read) || function (o, n) {
58631
+ var __read$6 = (window && window.__read) || function (o, n) {
58424
58632
  var m = typeof Symbol === "function" && o[Symbol.iterator];
58425
58633
  if (!m) return o;
58426
58634
  var i = m.call(o), r, ar = [], e;
@@ -58573,7 +58781,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
58573
58781
  for (var _i = 0; _i < arguments.length; _i++) {
58574
58782
  valueList[_i] = arguments[_i];
58575
58783
  }
58576
- var merged = _super.prototype.merge.apply(this, __spreadArray$1([], __read$5(valueList)));
58784
+ var merged = _super.prototype.merge.apply(this, __spreadArray$1([], __read$6(valueList)));
58577
58785
  if (merged.authType === exports.AuthenticationType.subscriptionKey) {
58578
58786
  merged.authContext = merged.aadAppId = merged.getToken = undefined;
58579
58787
  }
@@ -59477,7 +59685,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59477
59685
  return MapLabelCache;
59478
59686
  }());
59479
59687
 
59480
- var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
59688
+ var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
59481
59689
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
59482
59690
  return new (P || (P = Promise))(function (resolve, reject) {
59483
59691
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -59486,7 +59694,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59486
59694
  step((generator = generator.apply(thisArg, _arguments || [])).next());
59487
59695
  });
59488
59696
  };
59489
- var __generator$1 = (window && window.__generator) || function (thisArg, body) {
59697
+ var __generator$2 = (window && window.__generator) || function (thisArg, body) {
59490
59698
  var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
59491
59699
  return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
59492
59700
  function verb(n) { return function (v) { return step([n, v]); }; }
@@ -59513,7 +59721,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59513
59721
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
59514
59722
  }
59515
59723
  };
59516
- var __read$6 = (window && window.__read) || function (o, n) {
59724
+ var __read$7 = (window && window.__read) || function (o, n) {
59517
59725
  var m = typeof Symbol === "function" && o[Symbol.iterator];
59518
59726
  if (!m) return o;
59519
59727
  var i = m.call(o), r, ar = [], e;
@@ -59766,9 +59974,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59766
59974
  // Flag indicating if detailed descriptions which include zoom, lat/lon information should be returned.
59767
59975
  this._returnDetailedDescriptions = false;
59768
59976
  /** Event handler for shortcuts. */
59769
- this._shortcutListener = function (e) { return __awaiter$1(_this, void 0, void 0, function () {
59977
+ this._shortcutListener = function (e) { return __awaiter$2(_this, void 0, void 0, function () {
59770
59978
  var cam, styleOps, lang, style, camDesc;
59771
- return __generator$1(this, function (_a) {
59979
+ return __generator$2(this, function (_a) {
59772
59980
  switch (_a.label) {
59773
59981
  case 0:
59774
59982
  if (!(e.altKey && e.ctrlKey && e.keyCode === 68)) return [3 /*break*/, 2];
@@ -59836,9 +60044,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59836
60044
  /** Event handler for when the mouse or touch goes down */
59837
60045
  this._onPointerDown = function (event) {
59838
60046
  _this._lastPointerPos = _this._getEventPos(event);
59839
- _this._pointerTimeout = setTimeout(function () { return __awaiter$1(_this, void 0, void 0, function () {
60047
+ _this._pointerTimeout = setTimeout(function () { return __awaiter$2(_this, void 0, void 0, function () {
59840
60048
  var styleOps, lang, style, cam, loc;
59841
- return __generator$1(this, function (_a) {
60049
+ return __generator$2(this, function (_a) {
59842
60050
  switch (_a.label) {
59843
60051
  case 0:
59844
60052
  styleOps = this._map.getStyle();
@@ -59896,9 +60104,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59896
60104
  delete _this._rotateTimeout;
59897
60105
  };
59898
60106
  /** Called when the map has finished changing styles and is ready to create a new description */
59899
- this._updateStyle = function () { return __awaiter$1(_this, void 0, void 0, function () {
60107
+ this._updateStyle = function () { return __awaiter$2(_this, void 0, void 0, function () {
59900
60108
  var cam, styleOps, lang, style, camDesc;
59901
- return __generator$1(this, function (_a) {
60109
+ return __generator$2(this, function (_a) {
59902
60110
  switch (_a.label) {
59903
60111
  case 0:
59904
60112
  cam = this._map.getCamera();
@@ -59950,9 +60158,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59950
60158
  delete _this._moveTimeout;
59951
60159
  }
59952
60160
  // Send the new description to the map.
59953
- _this._moveTimeout = setTimeout(function () { return __awaiter$1(_this, void 0, void 0, function () {
60161
+ _this._moveTimeout = setTimeout(function () { return __awaiter$2(_this, void 0, void 0, function () {
59954
60162
  var loc;
59955
- return __generator$1(this, function (_a) {
60163
+ return __generator$2(this, function (_a) {
59956
60164
  switch (_a.label) {
59957
60165
  case 0:
59958
60166
  // Clear the rotate timeout as the move description will cover rotation.
@@ -59997,7 +60205,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59997
60205
  // Derive polygon layers from the label config.
59998
60206
  _this._polygonStyleLayer = _this._labelConfig.reduce(function (acc, cur) {
59999
60207
  if (cur.polygonSources) {
60000
- acc.push.apply(acc, __spreadArray$2([], __read$6(cur.polygonSources)));
60208
+ acc.push.apply(acc, __spreadArray$2([], __read$7(cur.polygonSources)));
60001
60209
  }
60002
60210
  return acc;
60003
60211
  }, []);
@@ -60057,7 +60265,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60057
60265
  };
60058
60266
  /** Checks if the location has changed enough to justify a new description */
60059
60267
  MapViewDescriptor.prototype._checkLocThreshold = function (newCenter, lastCenter) {
60060
- var _a = __read$6(this._map.positionsToPixels([lastCenter, newCenter]), 2), lastPixel = _a[0], newPixel = _a[1];
60268
+ var _a = __read$7(this._map.positionsToPixels([lastCenter, newCenter]), 2), lastPixel = _a[0], newPixel = _a[1];
60061
60269
  return Pixel.getDistance(lastPixel, newPixel) >= this._moveThreshold;
60062
60270
  };
60063
60271
  /** Checks if the heading has changed enough to justify a new description */
@@ -60082,10 +60290,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60082
60290
  * @param cam The map camera informaiton.
60083
60291
  */
60084
60292
  MapViewDescriptor.prototype._getLocDesc = function (cam, lang, style) {
60085
- return __awaiter$1(this, void 0, void 0, function () {
60293
+ return __awaiter$2(this, void 0, void 0, function () {
60086
60294
  var info_1, cPx_1, intersects_1, intersectingPolygon, intersectingType_1, i, cnt, layerInfo, cl_1;
60087
60295
  var _this = this;
60088
- return __generator$1(this, function (_a) {
60296
+ return __generator$2(this, function (_a) {
60089
60297
  switch (_a.label) {
60090
60298
  case 0:
60091
60299
  if (!(style !== "blank")) return [3 /*break*/, 3];
@@ -60869,14 +61077,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60869
61077
  var trafficOptions = _this.map.getTraffic();
60870
61078
  if (trafficOptions.flow !== "none") {
60871
61079
  var trafficFlowComponent = _this.map.layers.getLayerById("traffic_" + trafficOptions.flow);
61080
+ if (!trafficFlowComponent && ['absolute', 'relative-delay'].includes(trafficOptions.flow)) {
61081
+ // Fallback to relative if deprecated flow type is used
61082
+ trafficFlowComponent = _this.map.layers.getLayerById("traffic_relative");
61083
+ }
60872
61084
  if (trafficFlowComponent) {
60873
- _this.lastFlowMode = trafficOptions.flow;
61085
+ _this.lastFlowMode = trafficFlowComponent.getId().replace("traffic_", "");
60874
61086
  trafficFlowComponent._updateLayoutProperty("visibility", "visible", "none");
60875
61087
  }
60876
61088
  }
60877
61089
  };
60878
61090
  this.removeFromMap = function () {
60879
- var trafficOptions = _this.map.getTraffic();
60880
61091
  if (_this.lastFlowMode != "none") {
60881
61092
  var trafficFlowComponent = _this.map.layers.getLayerById("traffic_" + _this.lastFlowMode);
60882
61093
  if (trafficFlowComponent) {
@@ -61129,7 +61340,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61129
61340
  return IncidentPopupFactory;
61130
61341
  }());
61131
61342
 
61132
- var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
61343
+ var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
61133
61344
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
61134
61345
  return new (P || (P = Promise))(function (resolve, reject) {
61135
61346
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -61138,7 +61349,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61138
61349
  step((generator = generator.apply(thisArg, _arguments || [])).next());
61139
61350
  });
61140
61351
  };
61141
- var __generator$2 = (window && window.__generator) || function (thisArg, body) {
61352
+ var __generator$3 = (window && window.__generator) || function (thisArg, body) {
61142
61353
  var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
61143
61354
  return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
61144
61355
  function verb(n) { return function (v) { return step([n, v]); }; }
@@ -61192,10 +61403,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61192
61403
  _this.map.events.add('moveend', _this.setAccessiblePopups);
61193
61404
  };
61194
61405
  this.accessiblePopups = [];
61195
- this.setAccessiblePopups = function () { return __awaiter$2(_this, void 0, void 0, function () {
61406
+ this.setAccessiblePopups = function () { return __awaiter$3(_this, void 0, void 0, function () {
61196
61407
  var features, localizedStrings, createPopup, insertHiddenBefore, insertHiddenInFront, addHidden;
61197
61408
  var _this = this;
61198
- return __generator$2(this, function (_a) {
61409
+ return __generator$3(this, function (_a) {
61199
61410
  switch (_a.label) {
61200
61411
  case 0:
61201
61412
  this.accessiblePopups.forEach(function (popup) { return popup.remove(); });
@@ -64463,7 +64674,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64463
64674
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
64464
64675
  return c > 3 && r && Object.defineProperty(target, key, r), r;
64465
64676
  };
64466
- var __read$7 = (window && window.__read) || function (o, n) {
64677
+ var __read$8 = (window && window.__read) || function (o, n) {
64467
64678
  var m = typeof Symbol === "function" && o[Symbol.iterator];
64468
64679
  if (!m) return o;
64469
64680
  var i = m.call(o), r, ar = [], e;
@@ -64499,7 +64710,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64499
64710
  ];
64500
64711
  var allowedAttributionAttributes = __spreadArray$3([
64501
64712
  'href'
64502
- ], __read$7(attributionRuleAttributes));
64713
+ ], __read$8(attributionRuleAttributes));
64503
64714
  var AttributionRuleProxy = /** @class */ (function () {
64504
64715
  function AttributionRuleProxy(element, attributionChangeCallback) {
64505
64716
  var _this = this;
@@ -64722,7 +64933,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64722
64933
  };
64723
64934
  AttributionRuleProxy.prototype.applyAttributionResponse = function (attributions) {
64724
64935
  var _this = this;
64725
- var copyrights = attributions.map(function (resp) { return resp.copyrights || []; }).reduce(function (flat, copyrights) { return __spreadArray$3(__spreadArray$3([], __read$7(flat)), __read$7(copyrights)); }, []);
64936
+ var copyrights = attributions.map(function (resp) { return resp.copyrights || []; }).reduce(function (flat, copyrights) { return __spreadArray$3(__spreadArray$3([], __read$8(flat)), __read$8(copyrights)); }, []);
64726
64937
  if (copyrights.length == 0) {
64727
64938
  // no attribution for a provided tileset/bbox/z
64728
64939
  return;
@@ -64771,7 +64982,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64771
64982
  return AttributionRuleProxy;
64772
64983
  }());
64773
64984
 
64774
- var __read$8 = (window && window.__read) || function (o, n) {
64985
+ var __read$9 = (window && window.__read) || function (o, n) {
64775
64986
  var m = typeof Symbol === "function" && o[Symbol.iterator];
64776
64987
  if (!m) return o;
64777
64988
  var i = m.call(o), r, ar = [], e;
@@ -64825,7 +65036,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64825
65036
  var style = map.getStyle();
64826
65037
  return Object.entries(style.sources)
64827
65038
  .filter(function (_a) {
64828
- var _b = __read$8(_a, 1), key = _b[0];
65039
+ var _b = __read$9(_a, 1), key = _b[0];
64829
65040
  return style.layers
64830
65041
  .filter(function (layer) { return layer && layer['source'] == key; })
64831
65042
  .reduce(function (isVisible, layer) {
@@ -64833,7 +65044,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64833
65044
  return !isLayerHidden || isVisible;
64834
65045
  }, false);
64835
65046
  }).map(function (_a) {
64836
- var _b = __read$8(_a, 1), key = _b[0];
65047
+ var _b = __read$9(_a, 1), key = _b[0];
64837
65048
  return map.getSource(key);
64838
65049
  });
64839
65050
  };
@@ -64908,10 +65119,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64908
65119
  }, function () { return document.createElement('span'); });
64909
65120
  });
64910
65121
  var registeredRuleSet = new Set(Object.values(registeredRules));
64911
- var redundantRules = new Set(__spreadArray$4([], __read$8(allRules)).filter(function (rule) { return !registeredRuleSet.has(rule); }));
64912
- var redundantElements = new Set(__spreadArray$4([], __read$8(redundantRules)).map(function (rule) { return rule.getElement(); }));
65122
+ var redundantRules = new Set(__spreadArray$4([], __read$9(allRules)).filter(function (rule) { return !registeredRuleSet.has(rule); }));
65123
+ var redundantElements = new Set(__spreadArray$4([], __read$9(redundantRules)).map(function (rule) { return rule.getElement(); }));
64913
65124
  // eject redundant rules associated elements altogether
64914
- __spreadArray$4([], __read$8(redundantElements)).filter(function (elem) { return elem.parentElement !== null; })
65125
+ __spreadArray$4([], __read$9(redundantElements)).filter(function (elem) { return elem.parentElement !== null; })
64915
65126
  .forEach(function (elem) { return elem.parentElement.removeChild(elem); });
64916
65127
  _this.rules = Object.values(registeredRules);
64917
65128
  var attributionsToApply = attributions
@@ -64947,7 +65158,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64947
65158
  var visibleTextNodes = function (elem) {
64948
65159
  return Array.from(elem.style.display != 'none' ? elem.children : [])
64949
65160
  .map(function (elem) { return visibleTextNodes(elem); })
64950
- .reduce(function (flattened, nodes) { return __spreadArray$4(__spreadArray$4([], __read$8(flattened)), __read$8(nodes)); }, Array.from(elem.style.display != 'none' ? elem.childNodes : []).filter(function (node) { return node.nodeType == node.TEXT_NODE; }));
65161
+ .reduce(function (flattened, nodes) { return __spreadArray$4(__spreadArray$4([], __read$9(flattened)), __read$9(nodes)); }, Array.from(elem.style.display != 'none' ? elem.childNodes : []).filter(function (node) { return node.nodeType == node.TEXT_NODE; }));
64951
65162
  };
64952
65163
  var newRenderContext = _this.virtualContext.cloneNode(true);
64953
65164
  var visibleNodes = visibleTextNodes(newRenderContext);
@@ -64962,7 +65173,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64962
65173
  // }
64963
65174
  // });
64964
65175
  // strip all predefined keywords
64965
- visibleNodes.forEach(function (node) { return node.textContent = __spreadArray$4([], __read$8(attributionFilters)).reduce(function (target, filter) { return target.replace(filter, '').trim(); }, node.textContent); });
65176
+ visibleNodes.forEach(function (node) { return node.textContent = __spreadArray$4([], __read$9(attributionFilters)).reduce(function (target, filter) { return target.replace(filter, '').trim(); }, node.textContent); });
64966
65177
  // strip year from each node
64967
65178
  // visibleNodes.forEach(node => node.textContent = node.textContent.replace(copyrightYearPattern, '').trim());
64968
65179
  // deduplicate attribution text
@@ -67927,7 +68138,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
67927
68138
  };
67928
68139
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
67929
68140
  };
67930
- var __read$9 = (window && window.__read) || function (o, n) {
68141
+ var __read$a = (window && window.__read) || function (o, n) {
67931
68142
  var m = typeof Symbol === "function" && o[Symbol.iterator];
67932
68143
  if (!m) return o;
67933
68144
  var i = m.call(o), r, ar = [], e;
@@ -68125,7 +68336,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
68125
68336
  var callbacks = new Dictionary(this.mapCallbackHandler.getEventCallbacks(eventType, layer));
68126
68337
  if (callbacks) {
68127
68338
  callbacks.forEach(function (_a, callback) {
68128
- var _b = __read$9(_a, 2), _ = _b[0], once = _b[1];
68339
+ var _b = __read$a(_a, 2), _ = _b[0], once = _b[1];
68129
68340
  // Invoking a listener this way circumvents the fire once logic in the modified callback.
68130
68341
  // So we check if the callback was added as a fire once and if so remove it here.
68131
68342
  if (once) {
@@ -68233,7 +68444,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
68233
68444
  eventDict.forEach(function (callbackDict, eventType) {
68234
68445
  callbackDict.forEach(function (_a) {
68235
68446
  var e_6, _b;
68236
- var _c = __read$9(_a, 1), modifiedCallback = _c[0];
68447
+ var _c = __read$a(_a, 1), modifiedCallback = _c[0];
68237
68448
  try {
68238
68449
  for (var _d = __values$a(layer._getLayerIds()), _e = _d.next(); !_e.done; _e = _d.next()) {
68239
68450
  var mbLayerId = _e.value;
@@ -68266,7 +68477,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
68266
68477
  eventDict.forEach(function (callbackDict, eventType) {
68267
68478
  callbackDict.forEach(function (_a) {
68268
68479
  var e_7, _b;
68269
- var _c = __read$9(_a, 1), modifiedCallback = _c[0];
68480
+ var _c = __read$a(_a, 1), modifiedCallback = _c[0];
68270
68481
  try {
68271
68482
  for (var _d = __values$a(layer._getLayerIds()), _e = _d.next(); !_e.done; _e = _d.next()) {
68272
68483
  var mbLayerId = _e.value;
@@ -68665,7 +68876,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
68665
68876
  };
68666
68877
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
68667
68878
  };
68668
- var __read$a = (window && window.__read) || function (o, n) {
68879
+ var __read$b = (window && window.__read) || function (o, n) {
68669
68880
  var m = typeof Symbol === "function" && o[Symbol.iterator];
68670
68881
  if (!m) return o;
68671
68882
  var i = m.call(o), r, ar = [], e;
@@ -69117,7 +69328,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
69117
69328
  // If a specified layer hasn't been added to the map throw an error.
69118
69329
  var index = this_1.layerIndex.findIndex(function (l) { return l.getId() === layerId; });
69119
69330
  if (index > -1) {
69120
- layerIds.push.apply(layerIds, __spreadArray$5([], __read$a(this_1.layerIndex[index]._getLayerIds()
69331
+ layerIds.push.apply(layerIds, __spreadArray$5([], __read$b(this_1.layerIndex[index]._getLayerIds()
69121
69332
  .filter(function (id) { return !!_this.map._getMap().getLayer(id); }))));
69122
69333
  }
69123
69334
  else {
@@ -69860,7 +70071,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
69860
70071
  };
69861
70072
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
69862
70073
  };
69863
- var __read$b = (window && window.__read) || function (o, n) {
70074
+ var __read$c = (window && window.__read) || function (o, n) {
69864
70075
  var m = typeof Symbol === "function" && o[Symbol.iterator];
69865
70076
  if (!m) return o;
69866
70077
  var i = m.call(o), r, ar = [], e;
@@ -69951,7 +70162,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
69951
70162
  }
69952
70163
  finally { if (e_1) throw e_1.error; }
69953
70164
  }
69954
- return _super.prototype.merge.apply(this, __spreadArray$6([], __read$b(valuesList)));
70165
+ return _super.prototype.merge.apply(this, __spreadArray$6([], __read$c(valuesList)));
69955
70166
  };
69956
70167
  return CameraBoundsOptions;
69957
70168
  }(Options));
@@ -70424,7 +70635,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70424
70635
  };
70425
70636
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
70426
70637
  };
70427
- var __read$c = (window && window.__read) || function (o, n) {
70638
+ var __read$d = (window && window.__read) || function (o, n) {
70428
70639
  var m = typeof Symbol === "function" && o[Symbol.iterator];
70429
70640
  if (!m) return o;
70430
70641
  var i = m.call(o), r, ar = [], e;
@@ -70599,7 +70810,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70599
70810
  finally { if (e_1) throw e_1.error; }
70600
70811
  }
70601
70812
  // Then execute the standard merge behavior.
70602
- return _super.prototype.merge.apply(this, __spreadArray$7([], __read$c(valueList)));
70813
+ return _super.prototype.merge.apply(this, __spreadArray$7([], __read$d(valueList)));
70603
70814
  };
70604
70815
  return StyleOptions;
70605
70816
  }(Options));
@@ -70641,7 +70852,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70641
70852
  };
70642
70853
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
70643
70854
  };
70644
- var __read$d = (window && window.__read) || function (o, n) {
70855
+ var __read$e = (window && window.__read) || function (o, n) {
70645
70856
  var m = typeof Symbol === "function" && o[Symbol.iterator];
70646
70857
  if (!m) return o;
70647
70858
  var i = m.call(o), r, ar = [], e;
@@ -70892,10 +71103,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70892
71103
  // won't change default behavior in Options as usually that's what desired
70893
71104
  // instead capture it here and reassign.
70894
71105
  var currentTransforms = this._transformers;
70895
- var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$8(__spreadArray$8([], __read$d(flattened)), __read$d(value._transformers || [])); }, []) : [];
71106
+ var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$8(__spreadArray$8([], __read$e(flattened)), __read$e(value._transformers || [])); }, []) : [];
70896
71107
  // Then execute the standard merge behavior.
70897
71108
  // If subscription key auth method isn't being used then the subscription key property should be undefined.
70898
- var merged = _super.prototype.merge.apply(this, __spreadArray$8([], __read$d(valueList)));
71109
+ var merged = _super.prototype.merge.apply(this, __spreadArray$8([], __read$e(valueList)));
70899
71110
  if (merged.authOptions.authType !== exports.AuthenticationType.subscriptionKey) {
70900
71111
  merged["subscription-key"] = merged.subscriptionKey = undefined;
70901
71112
  }
@@ -70907,7 +71118,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70907
71118
  if (merged.mapConfiguration && typeof merged.mapConfiguration !== 'string') {
70908
71119
  merged.mapConfiguration = __assign$7(__assign$7({}, merged.mapConfiguration), { defaultConfiguration: merged.mapConfiguration.defaultConfiguration || merged.mapConfiguration['defaultStyle'], configurations: merged.mapConfiguration.configurations || merged.mapConfiguration['styles'] });
70909
71120
  }
70910
- this._transformers = __spreadArray$8(__spreadArray$8([], __read$d(currentTransforms || [])), __read$d(transformersToMerge.filter(function (toMerge) { return !currentTransforms.includes(toMerge); })));
71121
+ this._transformers = __spreadArray$8(__spreadArray$8([], __read$e(currentTransforms || [])), __read$e(transformersToMerge.filter(function (toMerge) { return !currentTransforms.includes(toMerge); })));
70911
71122
  if (this.transformRequest && !this._transformers.includes(this.transformRequest)) {
70912
71123
  this._transformers.push(this.transformRequest);
70913
71124
  }
@@ -71103,7 +71314,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71103
71314
  };
71104
71315
  return __assign$8.apply(this, arguments);
71105
71316
  };
71106
- var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
71317
+ var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
71107
71318
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
71108
71319
  return new (P || (P = Promise))(function (resolve, reject) {
71109
71320
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -71112,7 +71323,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71112
71323
  step((generator = generator.apply(thisArg, _arguments || [])).next());
71113
71324
  });
71114
71325
  };
71115
- var __generator$3 = (window && window.__generator) || function (thisArg, body) {
71326
+ var __generator$4 = (window && window.__generator) || function (thisArg, body) {
71116
71327
  var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
71117
71328
  return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
71118
71329
  function verb(n) { return function (v) { return step([n, v]); }; }
@@ -71139,7 +71350,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71139
71350
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
71140
71351
  }
71141
71352
  };
71142
- var __read$e = (window && window.__read) || function (o, n) {
71353
+ var __read$f = (window && window.__read) || function (o, n) {
71143
71354
  var m = typeof Symbol === "function" && o[Symbol.iterator];
71144
71355
  if (!m) return o;
71145
71356
  var i = m.call(o), r, ar = [], e;
@@ -71206,9 +71417,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71206
71417
  _this._progressiveLoadingState.mapStyle = currentMapStyle;
71207
71418
  // Select deferrable layers
71208
71419
  var deferredLayers = Object.entries(layerGroupLayers).reduce(function (deferred, _a) {
71209
- var _b = __read$e(_a, 2), groupName = _b[0], layers = _b[1];
71420
+ var _b = __read$f(_a, 2), groupName = _b[0], layers = _b[1];
71210
71421
  var isInInitialLayerGroup = validInitLayerGroups.includes(groupName);
71211
- return __spreadArray$9(__spreadArray$9([], __read$e(deferred)), __read$e(layers.filter(function (layer) {
71422
+ return __spreadArray$9(__spreadArray$9([], __read$f(deferred)), __read$f(layers.filter(function (layer) {
71212
71423
  var _a;
71213
71424
  // Exclude custom layers
71214
71425
  if (layer.type === 'custom')
@@ -71289,9 +71500,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71289
71500
  || definitions.configurations[0];
71290
71501
  }
71291
71502
  };
71292
- this._lookUpAsync = function (options) { return __awaiter$3(_this, void 0, void 0, function () {
71503
+ this._lookUpAsync = function (options) { return __awaiter$4(_this, void 0, void 0, function () {
71293
71504
  var definitions, result;
71294
- return __generator$3(this, function (_a) {
71505
+ return __generator$4(this, function (_a) {
71295
71506
  switch (_a.label) {
71296
71507
  case 0: return [4 /*yield*/, this.definitions()];
71297
71508
  case 1:
@@ -71477,8 +71688,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71477
71688
  return style.theme.toLowerCase();
71478
71689
  };
71479
71690
  StyleManager.prototype.getThemeAsync = function (styleOptions) {
71480
- return __awaiter$3(this, void 0, void 0, function () {
71481
- return __generator$3(this, function (_a) {
71691
+ return __awaiter$4(this, void 0, void 0, function () {
71692
+ return __generator$4(this, function (_a) {
71482
71693
  switch (_a.label) {
71483
71694
  case 0: return [4 /*yield*/, this._lookUpAsync(styleOptions)];
71484
71695
  case 1: return [2 /*return*/, (_a.sent()).theme];
@@ -71568,9 +71779,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71568
71779
  setLayerVisibility(nextLayer, styleOptions.showBuildingModels ? 'visible' : 'none');
71569
71780
  }
71570
71781
  // Set visibility of traffic layers depending on traffic settings.
71571
- if (trafficOptions.flow !== 'none' &&
71572
- layerGroup === "traffic_" + trafficOptions.flow &&
71573
- nextLayer.type == 'line') {
71782
+ if (trafficOptions.flow !== 'none' && nextLayer.type == 'line' &&
71783
+ (layerGroup === "traffic_" + trafficOptions.flow ||
71784
+ // Check if deprecated flow types are used and the layer is a bing-traffic layer.
71785
+ // Needed for backwards compatibility in Bing styles to support deprecated flow types.
71786
+ (['absolute', 'relative-delay'].includes(trafficOptions.flow) && nextLayer['source'] === "bing-traffic"))) {
71574
71787
  setLayerVisibility(nextLayer, 'visible');
71575
71788
  }
71576
71789
  // Set visibility of labels
@@ -71599,7 +71812,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71599
71812
  // A FundamentalMapLayer (grouped layer) representation of the next style must be built.
71600
71813
  var previousLayers = this.map.layers.getLayers();
71601
71814
  var nextLayers = Object.entries(layerGroupLayers).map(function (_a) {
71602
- var _b = __read$e(_a, 2), layerGroupName = _b[0], layerGroupMapboxLayers = _b[1];
71815
+ var _b = __read$f(_a, 2), layerGroupName = _b[0], layerGroupMapboxLayers = _b[1];
71603
71816
  return _this._buildFundamentalLayerFrom(layerGroupMapboxLayers, layerGroupName);
71604
71817
  });
71605
71818
  // Update FundamentalMapLayers in LayerManager
@@ -71698,10 +71911,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71698
71911
  StyleManager.prototype._request = function (domain, path, resourceType, customQueryParams) {
71699
71912
  var _a, _b;
71700
71913
  if (customQueryParams === void 0) { customQueryParams = {}; }
71701
- return __awaiter$3(this, void 0, void 0, function () {
71914
+ return __awaiter$4(this, void 0, void 0, function () {
71702
71915
  var requestParams, fetchOptions;
71703
71916
  var _c;
71704
- return __generator$3(this, function (_d) {
71917
+ return __generator$4(this, function (_d) {
71705
71918
  switch (_d.label) {
71706
71919
  case 0:
71707
71920
  requestParams = {
@@ -71764,6 +71977,123 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71764
71977
  */
71765
71978
  var isHMREnabled = function () { return 'ENVIRONMENT' in window && !!window['ENVIRONMENT']['hmr']; };
71766
71979
 
71980
+ var __values$j = (window && window.__values) || function(o) {
71981
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
71982
+ if (m) return m.call(o);
71983
+ if (o && typeof o.length === "number") return {
71984
+ next: function () {
71985
+ if (o && i >= o.length) o = void 0;
71986
+ return { value: o && o[i++], done: !o };
71987
+ }
71988
+ };
71989
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
71990
+ };
71991
+ /**
71992
+ * @internal
71993
+ * A manager for the map control's hidden indicators.
71994
+ * Exposed through the `indicators` property of the `atlas.Map` class.
71995
+ * Cannot be instantiated by the user.
71996
+ */
71997
+ var AccessibleIndicatorManager = /** @class */ (function () {
71998
+ /**
71999
+ * Constructs the indicator manager to be exposed only through the `indicators` property of the `Map` class.
72000
+ * @param map The map whose indicators are being managed by this.
72001
+ * @internal
72002
+ */
72003
+ function AccessibleIndicatorManager(map) {
72004
+ this.map = map;
72005
+ this.indicators = new Set();
72006
+ }
72007
+ /**
72008
+ * Adds an indicator to the map
72009
+ * @param indicator The indicator(s) to add.
72010
+ */
72011
+ AccessibleIndicatorManager.prototype.add = function (indicator) {
72012
+ var e_1, _a;
72013
+ indicator = Array.isArray(indicator) ? indicator : [indicator];
72014
+ try {
72015
+ for (var indicator_1 = __values$j(indicator), indicator_1_1 = indicator_1.next(); !indicator_1_1.done; indicator_1_1 = indicator_1.next()) {
72016
+ var i = indicator_1_1.value;
72017
+ if (!this.indicators.has(i)) {
72018
+ this.indicators.add(i);
72019
+ i.attach(this.map);
72020
+ }
72021
+ }
72022
+ }
72023
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
72024
+ finally {
72025
+ try {
72026
+ if (indicator_1_1 && !indicator_1_1.done && (_a = indicator_1.return)) _a.call(indicator_1);
72027
+ }
72028
+ finally { if (e_1) throw e_1.error; }
72029
+ }
72030
+ };
72031
+ /**
72032
+ * Removes all indicators from the map.
72033
+ */
72034
+ AccessibleIndicatorManager.prototype.clear = function () {
72035
+ var _this = this;
72036
+ this.indicators.forEach(function (indicator) {
72037
+ _this.indicators.delete(indicator);
72038
+ indicator.remove();
72039
+ });
72040
+ };
72041
+ /**
72042
+ * Removes an indicator from the map
72043
+ * @param indicator The indicator(s) to remove.
72044
+ */
72045
+ AccessibleIndicatorManager.prototype.remove = function (indicator) {
72046
+ var e_2, _a;
72047
+ indicator = Array.isArray(indicator) ? indicator : [indicator];
72048
+ try {
72049
+ for (var indicator_2 = __values$j(indicator), indicator_2_1 = indicator_2.next(); !indicator_2_1.done; indicator_2_1 = indicator_2.next()) {
72050
+ var i = indicator_2_1.value;
72051
+ if (this.indicators.has(i)) {
72052
+ this.indicators.delete(i);
72053
+ i.remove();
72054
+ }
72055
+ }
72056
+ }
72057
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
72058
+ finally {
72059
+ try {
72060
+ if (indicator_2_1 && !indicator_2_1.done && (_a = indicator_2.return)) _a.call(indicator_2);
72061
+ }
72062
+ finally { if (e_2) throw e_2.error; }
72063
+ }
72064
+ };
72065
+ /**
72066
+ * Returns the indicators currently attached to the map.
72067
+ */
72068
+ AccessibleIndicatorManager.prototype.getIndicators = function () {
72069
+ return Array.from(this.indicators);
72070
+ };
72071
+ /**
72072
+ * Returns the div element that should contain all the indicator containers.
72073
+ * Creates it if it doesn't already exist.
72074
+ * @internal
72075
+ */
72076
+ AccessibleIndicatorManager.prototype._getCollectionDiv = function () {
72077
+ var collection = this.map.getMapContainer()
72078
+ .querySelector("." + AccessibleIndicatorManager.Css.collection);
72079
+ if (!collection) {
72080
+ // If the collection div doesn't exist create it.
72081
+ collection = document.createElement("div");
72082
+ collection.setAttribute("aria-label", "map data");
72083
+ // Set the container role to listbox, and the descents' role to option, so the reader will read the listbox as a list.
72084
+ // For example, NVDA will read "data point, 1 of 1" when the indicator is focused.
72085
+ collection.setAttribute("role", "listbox");
72086
+ collection.classList.add(AccessibleIndicatorManager.Css.collection);
72087
+ this.map.getMapContainer().appendChild(collection);
72088
+ }
72089
+ return collection;
72090
+ };
72091
+ AccessibleIndicatorManager.Css = {
72092
+ collection: "accessible-indicator-collection-container"
72093
+ };
72094
+ return AccessibleIndicatorManager;
72095
+ }());
72096
+
71767
72097
  var __extends$19 = (window && window.__extends) || (function () {
71768
72098
  var extendStatics = function (d, b) {
71769
72099
  extendStatics = Object.setPrototypeOf ||
@@ -71790,7 +72120,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71790
72120
  };
71791
72121
  return __assign$9.apply(this, arguments);
71792
72122
  };
71793
- var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
72123
+ var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
71794
72124
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
71795
72125
  return new (P || (P = Promise))(function (resolve, reject) {
71796
72126
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -71799,7 +72129,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71799
72129
  step((generator = generator.apply(thisArg, _arguments || [])).next());
71800
72130
  });
71801
72131
  };
71802
- var __generator$4 = (window && window.__generator) || function (thisArg, body) {
72132
+ var __generator$5 = (window && window.__generator) || function (thisArg, body) {
71803
72133
  var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
71804
72134
  return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
71805
72135
  function verb(n) { return function (v) { return step([n, v]); }; }
@@ -71826,7 +72156,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71826
72156
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
71827
72157
  }
71828
72158
  };
71829
- var __read$f = (window && window.__read) || function (o, n) {
72159
+ var __read$g = (window && window.__read) || function (o, n) {
71830
72160
  var m = typeof Symbol === "function" && o[Symbol.iterator];
71831
72161
  if (!m) return o;
71832
72162
  var i = m.call(o), r, ar = [], e;
@@ -71847,7 +72177,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71847
72177
  to[j] = from[i];
71848
72178
  return to;
71849
72179
  };
71850
- var __values$j = (window && window.__values) || function(o) {
72180
+ var __values$k = (window && window.__values) || function(o) {
71851
72181
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
71852
72182
  if (m) return m.call(o);
71853
72183
  if (o && typeof o.length === "number") return {
@@ -71957,6 +72287,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71957
72287
  _this.markers = new HtmlMarkerManager(_this);
71958
72288
  _this.sources = new SourceManager(_this);
71959
72289
  _this.popups = new PopupManager(_this);
72290
+ _this.indicators = new AccessibleIndicatorManager(_this);
71960
72291
  // Add CSS classes and set attributes for DOM elements.
71961
72292
  _this.map.getContainer().classList.add(Map.Css.container);
71962
72293
  _this.map.getCanvasContainer().classList.add(Map.Css.canvasContainer);
@@ -71999,7 +72330,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71999
72330
  _this.localizedStringsPromise = Localizer.getStrings(_this.styleOptions.language);
72000
72331
  var stylesInit = _this.styles.initStyleset();
72001
72332
  Promise.all([authManInit, stylesInit]).then(function (_a) {
72002
- var _b = __read$f(_a, 2), _ = _b[0], definitions = _b[1];
72333
+ var _b = __read$g(_a, 2), _ = _b[0], definitions = _b[1];
72003
72334
  // Check that the map hasn't been removed for any reason.
72004
72335
  // If so no need to finish styling the map.
72005
72336
  if (_this.removed) {
@@ -72100,6 +72431,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
72100
72431
  else {
72101
72432
  this.accessibleMapDelegate.removeFromMap();
72102
72433
  }
72434
+ if (this.styles.serviceOptions.mapConfiguration !== this.serviceOptions.mapConfiguration) {
72435
+ this.styles.initPromise = null;
72436
+ this.styles.serviceOptions.mapConfiguration = this.serviceOptions.mapConfiguration;
72437
+ this.setStyle({});
72438
+ }
72103
72439
  };
72104
72440
  /**
72105
72441
  * Adds request transformer
@@ -72649,7 +72985,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
72649
72985
  urls = layer.getOptions().subdomains || [];
72650
72986
  }
72651
72987
  // Add the tile urls to the layer, but don't update the map yet.
72652
- urls.push.apply(urls, __spreadArray$a([], __read$f(tileSources)));
72988
+ urls.push.apply(urls, __spreadArray$a([], __read$g(tileSources)));
72653
72989
  layer._setOptionsNoUpdate({
72654
72990
  subdomains: urls
72655
72991
  });
@@ -72671,7 +73007,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
72671
73007
  Map.prototype.removeLayers = function (layerNames) {
72672
73008
  var e_1, _a;
72673
73009
  try {
72674
- for (var layerNames_1 = __values$j(layerNames), layerNames_1_1 = layerNames_1.next(); !layerNames_1_1.done; layerNames_1_1 = layerNames_1.next()) {
73010
+ for (var layerNames_1 = __values$k(layerNames), layerNames_1_1 = layerNames_1.next(); !layerNames_1_1.done; layerNames_1_1 = layerNames_1.next()) {
72675
73011
  var layerName = layerNames_1_1.value;
72676
73012
  // Previously calling removeLayers for layers that didn't exist in the map just did nothing.
72677
73013
  // Now, LayerManager will throw an error, so we need to check if the layer exists before calling remove.
@@ -72813,6 +73149,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
72813
73149
  this.layers.clear();
72814
73150
  this.sources.clear();
72815
73151
  this.markers.clear();
73152
+ this.indicators.clear();
72816
73153
  };
72817
73154
  /**
72818
73155
  * Clean up the map's resources. Map will not function correctly after calling this method.
@@ -72865,7 +73202,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
72865
73202
  var e_2, _a;
72866
73203
  var positions = [];
72867
73204
  try {
72868
- for (var pixels_1 = __values$j(pixels), pixels_1_1 = pixels_1.next(); !pixels_1_1.done; pixels_1_1 = pixels_1.next()) {
73205
+ for (var pixels_1 = __values$k(pixels), pixels_1_1 = pixels_1.next(); !pixels_1_1.done; pixels_1_1 = pixels_1.next()) {
72869
73206
  var pixel = pixels_1_1.value;
72870
73207
  var lngLat = this.map.unproject(pixel);
72871
73208
  positions.push(new Position(lngLat.lng, lngLat.lat));
@@ -72888,7 +73225,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
72888
73225
  var e_3, _a;
72889
73226
  var pixels = [];
72890
73227
  try {
72891
- for (var positions_1 = __values$j(positions), positions_1_1 = positions_1.next(); !positions_1_1.done; positions_1_1 = positions_1.next()) {
73228
+ for (var positions_1 = __values$k(positions), positions_1_1 = positions_1.next(); !positions_1_1.done; positions_1_1 = positions_1.next()) {
72892
73229
  var position = positions_1_1.value;
72893
73230
  var point = this.map.project(position);
72894
73231
  pixels.push(new Pixel(point.x, point.y));
@@ -72936,8 +73273,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
72936
73273
  */
72937
73274
  Map.prototype._rebuildStyle = function (diff) {
72938
73275
  if (diff === void 0) { diff = true; }
72939
- return __awaiter$4(this, void 0, void 0, function () {
72940
- return __generator$4(this, function (_a) {
73276
+ return __awaiter$5(this, void 0, void 0, function () {
73277
+ return __generator$5(this, function (_a) {
72941
73278
  this.styles.setStyle(this.styleOptions, diff);
72942
73279
  this.imageSprite._restoreImages();
72943
73280
  return [2 /*return*/];
@@ -73153,7 +73490,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
73153
73490
  return Map;
73154
73491
  }(EventEmitter));
73155
73492
 
73156
- var __read$g = (window && window.__read) || function (o, n) {
73493
+ var __read$h = (window && window.__read) || function (o, n) {
73157
73494
  var m = typeof Symbol === "function" && o[Symbol.iterator];
73158
73495
  if (!m) return o;
73159
73496
  var i = m.call(o), r, ar = [], e;
@@ -73315,7 +73652,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
73315
73652
  lineLength = 50;
73316
73653
  }
73317
73654
  var lines = c.split(/<(tr|div|br|li|h[0-9]|p>)/);
73318
- longestStringLength = Math.max.apply(Math, __spreadArray$b([], __read$g((lines.map(function (el) { return el.replace(/<[a-zA-Z0-9\s=\/]+>/g, "").length; }))))) - 1;
73655
+ longestStringLength = Math.max.apply(Math, __spreadArray$b([], __read$h((lines.map(function (el) { return el.replace(/<[a-zA-Z0-9\s=\/]+>/g, "").length; }))))) - 1;
73319
73656
  var w = Math.ceil(longestStringLength * 3.5);
73320
73657
  if (w < width) {
73321
73658
  width = w;