azure-maps-control 2.1.2 → 2.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/atlas.js CHANGED
@@ -77,7 +77,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
77
77
  }
78
78
 
79
79
  var azuremapsMaplibreGlUnminified = createCommonjsModule(function (module, exports) {
80
- /* The Azure Maps fork of MapLibre GL JS is licensed under the 3-Clause BSD License. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v1.14.0-rc1/LICENSE.txt */
80
+ /* The Azure Maps fork of MapLibre GL JS is licensed under the 3-Clause BSD License. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v1.14.0-rc4/LICENSE.txt */
81
81
  (function (global, factory) {
82
82
  module.exports = factory() ;
83
83
  }(commonjsGlobal, (function () {
@@ -109,7 +109,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
109
109
  return module = { exports: {} }, fn(module, module.exports), module.exports;
110
110
  }
111
111
 
112
- var version = "1.14.0-rc1";
112
+ var version = "1.14.0-rc4";
113
113
 
114
114
  var unitbezier = UnitBezier;
115
115
  function UnitBezier(p1x, p1y, p2x, p2y) {
@@ -15831,7 +15831,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15831
15831
  }
15832
15832
  queue.sort(compareX);
15833
15833
  for (i = 0; i < queue.length; i++) {
15834
- eliminateHole(queue[i], outerNode);
15834
+ outerNode = eliminateHole(queue[i], outerNode);
15835
15835
  outerNode = filterPoints(outerNode, outerNode.next);
15836
15836
  }
15837
15837
  return outerNode;
@@ -15840,12 +15840,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15840
15840
  return a.x - b.x;
15841
15841
  }
15842
15842
  function eliminateHole(hole, outerNode) {
15843
- outerNode = findHoleBridge(hole, outerNode);
15844
- if (outerNode) {
15845
- var b = splitPolygon(outerNode, hole);
15846
- filterPoints(outerNode, outerNode.next);
15847
- filterPoints(b, b.next);
15843
+ var bridge = findHoleBridge(hole, outerNode);
15844
+ if (!bridge) {
15845
+ return outerNode;
15848
15846
  }
15847
+ var bridgeReverse = splitPolygon(bridge, hole);
15848
+ var filteredBridge = filterPoints(bridge, bridge.next);
15849
+ filterPoints(bridgeReverse, bridgeReverse.next);
15850
+ return outerNode === bridge ? filteredBridge : outerNode;
15849
15851
  }
15850
15852
  function findHoleBridge(hole, outerNode) {
15851
15853
  var p = outerNode, hx = hole.x, hy = hole.y, qx = -Infinity, m;
@@ -24086,11 +24088,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
24086
24088
  }
24087
24089
  }
24088
24090
  function rewindRing(ring, dir) {
24089
- var area = 0;
24091
+ var area = 0, err = 0;
24090
24092
  for (var i = 0, len = ring.length, j = len - 1; i < len; j = i++) {
24091
- area += (ring[i][0] - ring[j][0]) * (ring[j][1] + ring[i][1]);
24093
+ var k = (ring[i][0] - ring[j][0]) * (ring[j][1] + ring[i][1]);
24094
+ var m = area + k;
24095
+ err += Math.abs(area) >= Math.abs(k) ? area - m + k : k - m + area;
24096
+ area = m;
24092
24097
  }
24093
- if (area >= 0 !== !!dir) {
24098
+ if (area + err >= 0 !== !!dir) {
24094
24099
  ring.reverse();
24095
24100
  }
24096
24101
  }
@@ -24264,14 +24269,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
24264
24269
  var keycache = context.keycache;
24265
24270
  var valuecache = context.valuecache;
24266
24271
  for (var key in feature.properties) {
24272
+ var value = feature.properties[key];
24267
24273
  var keyIndex = keycache[key];
24274
+ if (value === null) {
24275
+ continue;
24276
+ }
24268
24277
  if (typeof keyIndex === 'undefined') {
24269
24278
  keys.push(key);
24270
24279
  keyIndex = keys.length - 1;
24271
24280
  keycache[key] = keyIndex;
24272
24281
  }
24273
24282
  pbf.writeVarint(keyIndex);
24274
- var value = feature.properties[key];
24275
24283
  var type = typeof value;
24276
24284
  if (type !== 'string' && type !== 'boolean' && type !== 'number') {
24277
24285
  value = JSON.stringify(value);
@@ -33067,7 +33075,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
33067
33075
  }
33068
33076
  };
33069
33077
  Style.prototype.update = function update(parameters) {
33070
- if (!this.loaded) {
33078
+ if (!this._loaded) {
33071
33079
  return;
33072
33080
  }
33073
33081
  var changed = this._changed;
@@ -33088,6 +33096,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
33088
33096
  this._updateTilesForChangedImages();
33089
33097
  for (var id$1 in this._updatedPaintProps) {
33090
33098
  this._layers[id$1].updateTransitions(parameters);
33099
+ this._serializedLayers[id$1] = this._layers[id$1].serialize();
33091
33100
  }
33092
33101
  this.light.updateTransitions(parameters);
33093
33102
  this._resetUpdates();
@@ -33468,6 +33477,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
33468
33477
  return;
33469
33478
  }
33470
33479
  layer.setLayoutProperty(name, value, options);
33480
+ this._serializedLayers[layerId] = layer.serialize();
33471
33481
  this._updateLayer(layer);
33472
33482
  };
33473
33483
  Style.prototype.getLayoutProperty = function getLayoutProperty(layerId, name) {
@@ -43477,7 +43487,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
43477
43487
  return Url;
43478
43488
  }());
43479
43489
 
43480
- var version = "2.1.2";
43490
+ var version = "2.1.6";
43481
43491
 
43482
43492
  /**
43483
43493
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -43509,6 +43519,70 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
43509
43519
  return Version;
43510
43520
  }());
43511
43521
 
43522
+ /** The vertical distance between the tooltip and its target */
43523
+ var tooltipVerticalOffset = 4;
43524
+ /**
43525
+ * Creates tooltip content element
43526
+ */
43527
+ var buildAccessibleTooltip = function (name) {
43528
+ var tooltipContent = document.createElement("span");
43529
+ tooltipContent.innerText = name;
43530
+ tooltipContent.classList.add('tooltiptext');
43531
+ // mimics default edge tooltip theming
43532
+ if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
43533
+ tooltipContent.classList.add('dark');
43534
+ }
43535
+ window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', function (e) {
43536
+ var isDark = e.matches;
43537
+ if (isDark && !tooltipContent.classList.contains('dark')) {
43538
+ tooltipContent.classList.add('dark');
43539
+ }
43540
+ else if (!isDark && tooltipContent.classList.contains('dark')) {
43541
+ tooltipContent.classList.remove('dark');
43542
+ }
43543
+ });
43544
+ return tooltipContent;
43545
+ };
43546
+ /**
43547
+ * Determines tooltip position
43548
+ * @param tooltip tooltip to position
43549
+ * @param eventTarget target element that tooltip is bound to
43550
+ * @param forceAbsolute position:fixed is generally desired, however since tooltip is positioned alongside the target,
43551
+ * the runtime transform of the parent container(maplibre marker) will apply to tooltip as well, in such case resort to position:absolute
43552
+ */
43553
+ var positionTooltip = function (tooltip, eventTarget, forceAbsolute) {
43554
+ if (forceAbsolute === void 0) { forceAbsolute = false; }
43555
+ var positionTooltip = function (event) {
43556
+ var buttonRect = eventTarget.getBoundingClientRect();
43557
+ var tooltipRect = tooltip.getBoundingClientRect();
43558
+ var left, top;
43559
+ if ((buttonRect.x + tooltipRect.width) > window.innerWidth) {
43560
+ // the tooltip body may not fit the visible window width
43561
+ left = window.innerWidth - tooltipRect.width;
43562
+ }
43563
+ else {
43564
+ left = buttonRect.x;
43565
+ }
43566
+ if ((buttonRect.y + buttonRect.height + tooltipRect.height + tooltipVerticalOffset) > window.innerHeight) {
43567
+ // the tooltip body may not fit the visible window height
43568
+ // position above the target element
43569
+ top = buttonRect.y - tooltipRect.height - tooltipVerticalOffset;
43570
+ }
43571
+ else {
43572
+ top = buttonRect.y + buttonRect.height + tooltipVerticalOffset;
43573
+ }
43574
+ if (forceAbsolute && eventTarget.parentElement) {
43575
+ var parentRect = eventTarget.parentElement ? eventTarget.parentElement.getBoundingClientRect() : null;
43576
+ tooltip.style.position = 'absolute';
43577
+ left = left - parentRect.x;
43578
+ top = top - parentRect.y;
43579
+ }
43580
+ tooltip.style.transform = "translate(" + left + "px, " + top + "px)";
43581
+ };
43582
+ eventTarget.addEventListener("mouseover", positionTooltip);
43583
+ eventTarget.addEventListener("focusin", positionTooltip);
43584
+ };
43585
+
43512
43586
  (function (ControlPosition) {
43513
43587
  /**
43514
43588
  * Places the control in the top left of the map.
@@ -43846,6 +43920,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
43846
43920
  var container = this.buildContainer(map, this.options.style, "Rotation Control");
43847
43921
  var rotationButton = this.constructRotationButton(map);
43848
43922
  var grid = this.constructRotationGrid(map, options);
43923
+ var tooltip = buildAccessibleTooltip("Reset to Default Rotation");
43849
43924
  container.addEventListener("mouseover", function (event) {
43850
43925
  _this.lastActiveTime = _this.lastActiveTime || event.timeStamp;
43851
43926
  _this.hasMouse = true;
@@ -43881,9 +43956,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
43881
43956
  if (options && CompassControl.InvertOrderPositions.includes(options.position)) {
43882
43957
  container.appendChild(grid);
43883
43958
  container.appendChild(rotationButton);
43959
+ container.appendChild(tooltip);
43960
+ positionTooltip(tooltip, rotationButton);
43884
43961
  }
43885
43962
  else {
43886
43963
  container.appendChild(rotationButton);
43964
+ container.appendChild(tooltip);
43965
+ positionTooltip(tooltip, rotationButton);
43887
43966
  container.appendChild(grid);
43888
43967
  }
43889
43968
  return container;
@@ -43894,13 +43973,23 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
43894
43973
  grid.classList.add("hidden-accessible-element");
43895
43974
  var rotationRightButton = this.constructRightRotationButton(map);
43896
43975
  var rotationLeftButton = this.constructLeftRotationButton(map);
43976
+ var tooltipLeft = buildAccessibleTooltip("Rotate Left");
43977
+ var tooltipRight = buildAccessibleTooltip("Rotate Right");
43897
43978
  if (options && CompassControl.InvertOrderPositions.includes(options.position)) {
43898
43979
  grid.appendChild(rotationRightButton);
43980
+ grid.appendChild(tooltipRight);
43981
+ positionTooltip(tooltipRight, rotationRightButton);
43899
43982
  grid.appendChild(rotationLeftButton);
43983
+ grid.appendChild(tooltipLeft);
43984
+ positionTooltip(tooltipLeft, rotationLeftButton);
43900
43985
  }
43901
43986
  else {
43902
43987
  grid.appendChild(rotationLeftButton);
43988
+ grid.appendChild(tooltipLeft);
43989
+ positionTooltip(tooltipLeft, rotationLeftButton);
43903
43990
  grid.appendChild(rotationRightButton);
43991
+ grid.appendChild(tooltipRight);
43992
+ positionTooltip(tooltipRight, rotationRightButton);
43904
43993
  }
43905
43994
  return grid;
43906
43995
  };
@@ -43909,7 +43998,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
43909
43998
  var rotationButton = document.createElement("button");
43910
43999
  rotationButton.classList.add("azure-maps-control-button");
43911
44000
  rotationButton.classList.add("rotation");
43912
- rotationButton.setAttribute("title", "Reset to Default Rotation");
44001
+ rotationButton.setAttribute("aria-label", "Reset to Default Rotation");
43913
44002
  rotationButton.setAttribute("alt", "Reset to Default Rotation");
43914
44003
  rotationButton.setAttribute("type", "button");
43915
44004
  var icon = document.createElement("div");
@@ -43932,7 +44021,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
43932
44021
  var rotationRightButton = document.createElement("button");
43933
44022
  rotationRightButton.classList.add("azure-maps-control-button");
43934
44023
  rotationRightButton.classList.add("rotation-right");
43935
- rotationRightButton.setAttribute("title", "Rotate Right");
44024
+ rotationRightButton.setAttribute("aria-label", "Rotate Right");
43936
44025
  rotationRightButton.setAttribute("alt", "Rotate Right");
43937
44026
  rotationRightButton.setAttribute("type", "button");
43938
44027
  rotationRightButton.addEventListener("click", function () {
@@ -43949,7 +44038,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
43949
44038
  var rotationLeftButton = document.createElement("button");
43950
44039
  rotationLeftButton.classList.add("azure-maps-control-button");
43951
44040
  rotationLeftButton.classList.add("rotation-left");
43952
- rotationLeftButton.setAttribute("title", "Rotate Left");
44041
+ rotationLeftButton.setAttribute("aria-label", "Rotate Left");
43953
44042
  rotationLeftButton.setAttribute("alt", "Rotate Left");
43954
44043
  rotationLeftButton.setAttribute("type", "button");
43955
44044
  rotationLeftButton.addEventListener("click", function () {
@@ -44033,6 +44122,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
44033
44122
  var container = this.buildContainer(map, this.options.style, "Pitch Control");
44034
44123
  var pitchButton = this.constructPitchButton(map);
44035
44124
  var grid = this.constructPitchGrid(map, options);
44125
+ var tooltip = buildAccessibleTooltip("Reset to Default Pitch");
44036
44126
  container.addEventListener("mouseover", function (event) {
44037
44127
  _this.lastActiveTime = _this.lastActiveTime || event.timeStamp;
44038
44128
  _this.hasMouse = true;
@@ -44068,9 +44158,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
44068
44158
  if (options && PitchControl.INVERT_ORDER_POSITIONS.includes(options.position)) {
44069
44159
  container.appendChild(grid);
44070
44160
  container.appendChild(pitchButton);
44161
+ container.appendChild(tooltip);
44162
+ positionTooltip(tooltip, container);
44071
44163
  }
44072
44164
  else {
44073
44165
  container.appendChild(pitchButton);
44166
+ container.appendChild(tooltip);
44167
+ positionTooltip(tooltip, container);
44074
44168
  container.appendChild(grid);
44075
44169
  }
44076
44170
  this.map = map;
@@ -44096,13 +44190,23 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
44096
44190
  grid.classList.add("hidden-accessible-element");
44097
44191
  this.pitchIncrementButton = this.constructPitchIncrementButton(map);
44098
44192
  this.pitchDecrementButton = this.constructPitchDecrementButton(map);
44193
+ var tooltipIncrement = buildAccessibleTooltip("Increase Pitch");
44194
+ var tooltipDecrease = buildAccessibleTooltip("Decrease Pitch");
44099
44195
  if (options && PitchControl.INVERT_ORDER_POSITIONS.includes(options.position)) {
44100
44196
  grid.appendChild(this.pitchDecrementButton);
44197
+ grid.appendChild(tooltipDecrease);
44198
+ positionTooltip(tooltipDecrease, this.pitchDecrementButton);
44101
44199
  grid.appendChild(this.pitchIncrementButton);
44200
+ grid.appendChild(tooltipIncrement);
44201
+ positionTooltip(tooltipIncrement, this.pitchIncrementButton);
44102
44202
  }
44103
44203
  else {
44104
44204
  grid.appendChild(this.pitchIncrementButton);
44205
+ grid.appendChild(tooltipIncrement);
44206
+ positionTooltip(tooltipIncrement, this.pitchIncrementButton);
44105
44207
  grid.appendChild(this.pitchDecrementButton);
44208
+ grid.appendChild(tooltipDecrease);
44209
+ positionTooltip(tooltipDecrease, this.pitchDecrementButton);
44106
44210
  }
44107
44211
  return grid;
44108
44212
  };
@@ -44111,7 +44215,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
44111
44215
  var pitchButton = document.createElement("button");
44112
44216
  pitchButton.classList.add("azure-maps-control-button");
44113
44217
  pitchButton.classList.add("pitch");
44114
- pitchButton.setAttribute("title", "Reset to Default Pitch");
44218
+ pitchButton.setAttribute("aria-label", "Reset to Default Pitch");
44115
44219
  pitchButton.setAttribute("alt", "Reset to Default Pitch");
44116
44220
  pitchButton.setAttribute("type", "button");
44117
44221
  pitchButton.addEventListener("click", function () {
@@ -44129,7 +44233,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
44129
44233
  var pitchDecrementButton = document.createElement("button");
44130
44234
  pitchDecrementButton.classList.add("azure-maps-control-button");
44131
44235
  pitchDecrementButton.classList.add("pitch-down");
44132
- pitchDecrementButton.setAttribute("title", "Decrease Pitch");
44236
+ pitchDecrementButton.setAttribute("aria-label", "Decrease Pitch");
44133
44237
  pitchDecrementButton.setAttribute("alt", "Decrease Pitch");
44134
44238
  pitchDecrementButton.setAttribute("type", "button");
44135
44239
  pitchDecrementButton.addEventListener("click", function () {
@@ -44146,7 +44250,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
44146
44250
  var pitchIncrementButton = document.createElement("button");
44147
44251
  pitchIncrementButton.classList.add("azure-maps-control-button");
44148
44252
  pitchIncrementButton.classList.add("pitch-up");
44149
- pitchIncrementButton.setAttribute("title", "Increase Pitch");
44253
+ pitchIncrementButton.setAttribute("aria-label", "Increase Pitch");
44150
44254
  pitchIncrementButton.setAttribute("alt", "Increase Pitch");
44151
44255
  pitchIncrementButton.setAttribute("type", "button");
44152
44256
  pitchIncrementButton.addEventListener("click", function () {
@@ -46734,6 +46838,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
46734
46838
  var container = this.buildContainer(map, this.options.style, "Map Style Control");
46735
46839
  var styleOpsGrid = this.buildStyleOpsGrid(container);
46736
46840
  var currStyleButton = this.buildCurrStyleBtn(container, styleOpsGrid);
46841
+ var tooltip = buildAccessibleTooltip("Select Style");
46737
46842
  container.addEventListener("mouseover", function () {
46738
46843
  _this.hasMouse = true;
46739
46844
  container.classList.add(StyleControl.Css.inUse);
@@ -46763,9 +46868,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
46763
46868
  if (options && StyleControl.InvertOrderPositions.includes(options.position)) {
46764
46869
  container.appendChild(styleOpsGrid);
46765
46870
  container.appendChild(currStyleButton);
46871
+ container.appendChild(tooltip);
46872
+ positionTooltip(tooltip, currStyleButton);
46766
46873
  }
46767
46874
  else {
46768
46875
  container.appendChild(currStyleButton);
46876
+ container.appendChild(tooltip);
46877
+ positionTooltip(tooltip, currStyleButton);
46769
46878
  container.appendChild(styleOpsGrid);
46770
46879
  }
46771
46880
  return container;
@@ -46821,7 +46930,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
46821
46930
  var _this = this;
46822
46931
  var styleOptionButton = document.createElement("button");
46823
46932
  var friendlyName = this.mapToFriendlyStyleName(name);
46824
- styleOptionButton.setAttribute("title", friendlyName);
46825
46933
  styleOptionButton.setAttribute("alt", friendlyName);
46826
46934
  styleOptionButton.setAttribute("type", "button");
46827
46935
  var styleIconImage = new Image();
@@ -46841,15 +46949,22 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
46841
46949
  if (_this.options.autoSelectionMode) {
46842
46950
  _this.map.setStyle({ style: name });
46843
46951
  }
46952
+ Object.entries(_this.styleButtons).forEach(function (_a) {
46953
+ var _b = __read(_a, 2), styleName = _b[0], button = _b[1];
46954
+ return button.setAttribute('aria-current', styleName === name ? 'true' : 'false');
46955
+ });
46844
46956
  }
46845
46957
  });
46958
+ var iconDiv = document.createElement('div');
46959
+ iconDiv.classList.add('selected-icon');
46960
+ styleOptionButton.appendChild(iconDiv);
46846
46961
  return styleOptionButton;
46847
46962
  };
46848
46963
  StyleControl.prototype.buildCurrStyleBtn = function (container, opsGrid) {
46849
46964
  var selectCurrButton = document.createElement("button");
46850
46965
  selectCurrButton.classList.add(StyleControl.Css.button);
46851
46966
  selectCurrButton.classList.add(StyleControl.Css.currentStyle);
46852
- selectCurrButton.setAttribute("title", "Select Style");
46967
+ selectCurrButton.setAttribute("aria-label", "Select Style");
46853
46968
  selectCurrButton.setAttribute("alt", "Select Style");
46854
46969
  selectCurrButton.setAttribute("type", "button");
46855
46970
  this.currStyleImage = new Image();
@@ -46912,6 +47027,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
46912
47027
  var styleOptionButton = _this.buildSelectStyleBtn(styleName, iconUrl);
46913
47028
  styleOpsGrid.appendChild(styleOptionButton);
46914
47029
  _this.styleButtons[styleName] = styleOptionButton;
47030
+ var tooltip = buildAccessibleTooltip(_this.mapToFriendlyStyleName(styleName));
47031
+ styleOpsGrid.appendChild(tooltip);
47032
+ positionTooltip(tooltip, styleOptionButton);
46915
47033
  });
46916
47034
  }
46917
47035
  else {
@@ -46920,8 +47038,15 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
46920
47038
  var styleOptionButton = _this.buildSelectStyleBtn(styleName, iconUrl);
46921
47039
  styleOpsGrid.appendChild(styleOptionButton);
46922
47040
  _this.styleButtons[styleName] = styleOptionButton;
47041
+ var tooltip = buildAccessibleTooltip(_this.mapToFriendlyStyleName(styleName));
47042
+ styleOpsGrid.appendChild(tooltip);
47043
+ positionTooltip(tooltip, styleOptionButton);
46923
47044
  });
46924
47045
  }
47046
+ Object.entries(_this.styleButtons).forEach(function (_a) {
47047
+ var _b = __read(_a, 2), styleName = _b[0], button = _b[1];
47048
+ return button.setAttribute('aria-current', styleName === currStyle ? 'true' : 'false');
47049
+ });
46925
47050
  _this.map.events.add("styledata", _this.onStyleChange);
46926
47051
  });
46927
47052
  return styleOpsGrid;
@@ -46958,11 +47083,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
46958
47083
  }(ControlBase));
46959
47084
 
46960
47085
  /**
46961
- * The options for a TrafficControl object.
47086
+ * The options for setting traffic on the map.
46962
47087
  */
46963
- var TrafficControlOptions = /** @class */ (function (_super) {
46964
- __extends(TrafficControlOptions, _super);
46965
- function TrafficControlOptions() {
47088
+ var TrafficOptions = /** @class */ (function (_super) {
47089
+ __extends(TrafficOptions, _super);
47090
+ function TrafficOptions() {
46966
47091
  var _this = _super !== null && _super.apply(this, arguments) || this;
46967
47092
  /**
46968
47093
  * The type of traffic flow to display:
@@ -46971,16 +47096,28 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
46971
47096
  * <p>"absolute" is the absolute speed of the road</p>
46972
47097
  * <p>"relative-delay" displays relative speed only where they differ from free-flow;
46973
47098
  * false to stop displaying the traffic flow.</p>
46974
- * default `"relative"``
46975
- * @default "relative"
47099
+ * default `"none"``
47100
+ * @default "none"
46976
47101
  */
46977
- _this.flow = "relative";
47102
+ _this.flow = "none";
46978
47103
  /**
46979
47104
  * Whether to display incidents on the map.
46980
- * default `true`
46981
- * @default true
47105
+ * default `false`
47106
+ * @default false
46982
47107
  */
46983
- _this.incidents = true;
47108
+ _this.incidents = false;
47109
+ return _this;
47110
+ }
47111
+ return TrafficOptions;
47112
+ }(Options));
47113
+
47114
+ /**
47115
+ * The options for a TrafficControl object.
47116
+ */
47117
+ var TrafficControlOptions = /** @class */ (function (_super) {
47118
+ __extends(TrafficControlOptions, _super);
47119
+ function TrafficControlOptions() {
47120
+ var _this = _super !== null && _super.apply(this, arguments) || this;
46984
47121
  /**
46985
47122
  * Specifies if the control is in the active state (displaying traffic).
46986
47123
  * Default: false
@@ -46996,7 +47133,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
46996
47133
  return _this;
46997
47134
  }
46998
47135
  return TrafficControlOptions;
46999
- }(Options));
47136
+ }(TrafficOptions));
47000
47137
 
47001
47138
  /**
47002
47139
  * A control that toggles traffic data on the map.
@@ -47011,9 +47148,49 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
47011
47148
  var _this = _super.call(this) || this;
47012
47149
  _this.hasMouse = false;
47013
47150
  _this.hasFocus = false;
47014
- _this.options = new TrafficControlOptions().merge(options);
47151
+ // desired map traffic state when control is enabled
47152
+ _this.options = new TrafficOptions().merge({
47153
+ flow: 'relative',
47154
+ incidents: true
47155
+ });
47156
+ _this.style = exports.ControlStyle.light;
47157
+ _this.container = null;
47158
+ _this.trafficButton = null;
47159
+ _this.map = null;
47160
+ if (options) {
47161
+ _this.initIsActive = options.isActive || false;
47162
+ _this.options.flow = options.flow || 'relative';
47163
+ _this.options.incidents = options.incidents || true;
47164
+ _this.style = options.style || exports.ControlStyle.light;
47165
+ }
47015
47166
  return _this;
47016
47167
  }
47168
+ Object.defineProperty(TrafficControl.prototype, "isActive", {
47169
+ /**
47170
+ * Current control state (is traffic information displayed?)
47171
+ */
47172
+ get: function () {
47173
+ if (!this.map) {
47174
+ return false;
47175
+ }
47176
+ var trafficState = this.map.getTraffic();
47177
+ return trafficState.flow !== "none" || trafficState.incidents;
47178
+ },
47179
+ /**
47180
+ * Sets the control state
47181
+ */
47182
+ set: function (newValue) {
47183
+ if (!this.map) {
47184
+ return;
47185
+ }
47186
+ this.map.setTraffic({
47187
+ flow: newValue ? this.options.flow : 'none',
47188
+ incidents: newValue ? this.options.incidents : false
47189
+ });
47190
+ },
47191
+ enumerable: false,
47192
+ configurable: true
47193
+ });
47017
47194
  /**
47018
47195
  * Initialization method for the control which is called when added to the map.
47019
47196
  * @param map The map that the control will be added to.
@@ -47021,49 +47198,63 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
47021
47198
  * @return An HTMLElement to be placed on the map for the control.
47022
47199
  */
47023
47200
  TrafficControl.prototype.onAdd = function (map) {
47024
- this.container = this.buildContainer(map, this.options.style, "Traffic Control");
47201
+ this.map = map;
47202
+ var trafficState = map.getTraffic();
47203
+ // bring map traffic state in sync with desired if initIsActive have been set
47204
+ if (this.initIsActive !== undefined) {
47205
+ this.isActive = this.initIsActive;
47206
+ }
47207
+ this.container = this.buildContainer(map, this.style, "Traffic Control");
47025
47208
  this.container.style.flexDirection = "column";
47026
47209
  var trafficButton = this.constructTrafficButton(map);
47027
47210
  this.container.appendChild(trafficButton);
47211
+ var tooltip = buildAccessibleTooltip("Toggle Traffic Display");
47212
+ this.container.appendChild(tooltip);
47213
+ positionTooltip(tooltip, trafficButton);
47028
47214
  return this.container;
47029
47215
  };
47216
+ TrafficControl.prototype.onRemove = function () {
47217
+ this.map = null;
47218
+ };
47030
47219
  /**
47031
47220
  * Get the TrafficControlOptions
47032
47221
  */
47033
47222
  TrafficControl.prototype.getOptions = function () {
47034
- return cloneDeep_1(this.options);
47223
+ return new TrafficControlOptions().merge({
47224
+ isActive: this.isActive,
47225
+ flow: this.options.flow,
47226
+ incidents: this.options.incidents,
47227
+ style: this.style
47228
+ });
47229
+ };
47230
+ /**
47231
+ * Updates the button state according to current traffic state
47232
+ * This is invoked on init in constructTrafficButton and on each Map.setTraffic()
47233
+ */
47234
+ TrafficControl.prototype.updateButtonState = function () {
47235
+ if (this.isActive) {
47236
+ this.container.classList.add("in-use");
47237
+ }
47238
+ else {
47239
+ this.container.classList.remove("in-use");
47240
+ }
47241
+ if (this.trafficButton) {
47242
+ this.trafficButton.setAttribute("aria-pressed", this.isActive ? "true" : "false");
47243
+ }
47035
47244
  };
47036
47245
  TrafficControl.prototype.constructTrafficButton = function (map) {
47037
47246
  var _this = this;
47038
47247
  var trafficButton = document.createElement("button");
47039
47248
  trafficButton.classList.add("azure-maps-control-button");
47040
47249
  trafficButton.classList.add("traffic");
47041
- trafficButton.setAttribute("title", "toggle traffic display");
47042
- trafficButton.setAttribute("alt", "toggle traffic display");
47250
+ trafficButton.setAttribute("aria-label", "Toggle Traffic Display");
47251
+ trafficButton.setAttribute("alt", "Toggle Traffic Display");
47043
47252
  trafficButton.setAttribute("type", "button");
47253
+ this.trafficButton = trafficButton;
47254
+ this.updateButtonState();
47044
47255
  // toggle button
47045
47256
  trafficButton.addEventListener("click", function () {
47046
- var t = map.getTraffic();
47047
- _this.options.isActive = !(t.flow !== "none" || t.incidents);
47048
- if (_this.options.isActive) {
47049
- map.setTraffic({
47050
- flow: _this.options.flow,
47051
- incidents: _this.options.incidents
47052
- });
47053
- _this.container.classList.add("in-use");
47054
- }
47055
- else {
47056
- map.setTraffic({
47057
- flow: "none",
47058
- incidents: false
47059
- });
47060
- _this.container.classList.remove("in-use");
47061
- }
47062
- });
47063
- map.events.addOnce("styledata", function () {
47064
- if (_this.options.isActive) {
47065
- trafficButton.dispatchEvent(new Event("click"));
47066
- }
47257
+ _this.isActive = !_this.isActive;
47067
47258
  });
47068
47259
  return trafficButton;
47069
47260
  };
@@ -47101,18 +47292,19 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
47101
47292
  var e_1, _a, e_2, _b;
47102
47293
  var trafficLegend = document.createElement("div");
47103
47294
  trafficLegend.classList.add("traffic-legend", "hidden");
47104
- trafficLegend.setAttribute("title", "Traffic Legend");
47105
47295
  trafficLegend.setAttribute("alt", "Traffic Legend");
47106
47296
  var trafficLegendTable = document.createElement("table");
47107
47297
  // legend table title
47108
47298
  var tr1 = document.createElement("tr");
47109
47299
  var td = document.createElement("td");
47110
- td.setAttribute("title", "Traffic");
47111
47300
  td.setAttribute("alt", "Traffic");
47112
47301
  td.appendChild(document.createTextNode("Traffic"));
47302
+ var tooltip = buildAccessibleTooltip("Traffic");
47113
47303
  td.classList.add("traffic-legend-title");
47114
47304
  td.colSpan = 6;
47115
47305
  tr1.appendChild(td);
47306
+ tr1.appendChild(tooltip);
47307
+ positionTooltip(tooltip, td);
47116
47308
  trafficLegendTable.appendChild(tr1);
47117
47309
  // legend table contents
47118
47310
  var tr2 = document.createElement("tr");
@@ -47121,13 +47313,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
47121
47313
  var col = _d.value;
47122
47314
  var data = document.createElement("td");
47123
47315
  if (col === "Fast" || col === "Slow") {
47124
- data.setAttribute("title", col);
47125
47316
  data.setAttribute("alt", col);
47126
47317
  data.appendChild(document.createTextNode(col));
47127
47318
  data.classList.add("traffic-legend-text");
47128
47319
  }
47129
47320
  else {
47130
47321
  data.classList.add("traffic-legend-colors");
47322
+ data.setAttribute("aria-label", "Traffic Legend");
47323
+ data.setAttribute("role", "img");
47131
47324
  try {
47132
47325
  for (var col_1 = (e_2 = void 0, __values(col)), col_1_1 = col_1.next(); !col_1_1.done; col_1_1 = col_1.next()) {
47133
47326
  var color = col_1_1.value;
@@ -47145,6 +47338,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
47145
47338
  }
47146
47339
  }
47147
47340
  tr2.appendChild(data);
47341
+ var tooltip_1 = buildAccessibleTooltip(col instanceof Array ? "Traffic Legend" : col);
47342
+ tr2.appendChild(tooltip_1);
47343
+ positionTooltip(tooltip_1, data);
47148
47344
  }
47149
47345
  }
47150
47346
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
@@ -48095,6 +48291,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
48095
48291
  * Cached array of powers of 10. This will be faster than call Math.pow.
48096
48292
  */
48097
48293
  var POWERS_OF_10 = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000];
48294
+ /**
48295
+ * Maximum latitude as defined in WebMercator
48296
+ */
48297
+ var WEBMERCATOR_MAXLAT = 85.0511;
48098
48298
  //////////////////////
48099
48299
  /// Private Functions
48100
48300
  //////////////////////
@@ -48969,11 +49169,42 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
48969
49169
  var normalUnit = _normalizeDistanceUnit(units);
48970
49170
  return convertDistance(EARTH_RADIUS_SEMI_MAJOR_AXIS, DistanceUnits.meters, normalUnit);
48971
49171
  }
49172
+ /**
49173
+ * constructs raw geodesic path that doesn't handle antimeridian crossing
49174
+ */
49175
+ function _constructGeodesic(position, nextPosition, nodeSize) {
49176
+ var geodesic = [];
49177
+ // Convert positions from degrees to Radians
49178
+ var lat1 = _toRadians(position[1]);
49179
+ var lon1 = _toRadians(position[0]);
49180
+ var lat2 = _toRadians(nextPosition[1]);
49181
+ var lon2 = _toRadians(nextPosition[0]);
49182
+ // Calculate the total extent of the route
49183
+ var d = 2 * Math.asin(Math.sqrt(Math.pow((Math.sin((lat1 - lat2) / 2)), 2) + Math.cos(lat1) * Math.cos(lat2) * Math.pow((Math.sin((lon1 - lon2) / 2)), 2)));
49184
+ // Calculate positions at fixed intervals along the route
49185
+ for (var k = 0; k <= nodeSize; k++) {
49186
+ var f = (k / nodeSize);
49187
+ var A = Math.sin((1 - f) * d) / Math.sin(d);
49188
+ var B = Math.sin(f * d) / Math.sin(d);
49189
+ // Obtain 3D Cartesian coordinates of each point
49190
+ var x = A * Math.cos(lat1) * Math.cos(lon1) + B * Math.cos(lat2) * Math.cos(lon2);
49191
+ var y = A * Math.cos(lat1) * Math.sin(lon1) + B * Math.cos(lat2) * Math.sin(lon2);
49192
+ var z = A * Math.sin(lat1) + B * Math.sin(lat2);
49193
+ // Convert these to latitude/longitude
49194
+ var lat = Math.atan2(z, Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)));
49195
+ var lon = Math.atan2(y, x);
49196
+ lat = _clip(_toDegrees(lat), -85, 85);
49197
+ lon = _toDegrees(lon);
49198
+ // Add this to the array
49199
+ geodesic.push([lon, lat]);
49200
+ }
49201
+ return geodesic;
49202
+ }
48972
49203
  /**
48973
49204
  * Takes an array of positions objects and fills in the space between them with accurately positioned positions to form an approximated Geodesic path.
48974
49205
  * @param path Array of position objects that form a path to fill in.
48975
49206
  * @param nodeSize Number of nodes to insert between each position. Default: 15
48976
- * @returns An array of position objects that form a geodesic paths.
49207
+ * @returns An array of position objects that form a geodesic paths, geodesic path crossing antimeridian will contain longitude outside of -180 to 180 range. See getGeodesicPaths() when this is undesired.
48977
49208
  */
48978
49209
  function getGeodesicPath(path, nodeSize) {
48979
49210
  if (!nodeSize || nodeSize <= 0) {
@@ -48987,34 +49218,70 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
48987
49218
  locs = path.coordinates;
48988
49219
  }
48989
49220
  var len = locs.length - 1;
48990
- var outputLocs = [];
49221
+ var geodesic = [];
48991
49222
  for (var i = 0; i < len; i++) {
48992
49223
  // Convert positions from degrees to Radians
48993
- var lat1 = _toRadians(locs[i][1]);
48994
- var lon1 = _toRadians(locs[i][0]);
48995
- var lat2 = _toRadians(locs[i + 1][1]);
48996
- var lon2 = _toRadians(locs[i + 1][0]);
48997
- // Calculate the total extent of the route
48998
- var d = 2 * Math.asin(Math.sqrt(Math.pow((Math.sin((lat1 - lat2) / 2)), 2) + Math.cos(lat1) * Math.cos(lat2) * Math.pow((Math.sin((lon1 - lon2) / 2)), 2)));
48999
- // Calculate positions at fixed intervals along the route
49000
- for (var k = 0; k <= nodeSize; k++) {
49001
- var f = (k / nodeSize);
49002
- var A = Math.sin((1 - f) * d) / Math.sin(d);
49003
- var B = Math.sin(f * d) / Math.sin(d);
49004
- // Obtain 3D Cartesian coordinates of each point
49005
- var x = A * Math.cos(lat1) * Math.cos(lon1) + B * Math.cos(lat2) * Math.cos(lon2);
49006
- var y = A * Math.cos(lat1) * Math.sin(lon1) + B * Math.cos(lat2) * Math.sin(lon2);
49007
- var z = A * Math.sin(lat1) + B * Math.sin(lat2);
49008
- // Convert these to latitude/longitude
49009
- var lat = Math.atan2(z, Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)));
49010
- var lon = Math.atan2(y, x);
49011
- lat = _clip(_toDegrees(lat), -85, 85);
49012
- lon = _toDegrees(lon);
49013
- // Add this to the array
49014
- outputLocs.push([lon, lat]);
49224
+ geodesic = geodesic.concat(_constructGeodesic(locs[i], locs[i + 1], nodeSize));
49225
+ }
49226
+ return geodesic.reduce(function (targetPath, coord) {
49227
+ var last = targetPath.length > 0 ? targetPath[targetPath.length - 1] : null;
49228
+ // denormalize longitude on antimeridian crossing
49229
+ if (last && Math.abs(coord[0] - last[0]) > 180.0) {
49230
+ var denormLon = last[0] < 0 ? coord[0] - 360.0 : coord[0] + 360.0;
49231
+ targetPath.push([denormLon, coord[1]]);
49232
+ }
49233
+ else {
49234
+ targetPath.push(coord);
49015
49235
  }
49236
+ return targetPath;
49237
+ }, []);
49238
+ }
49239
+ /**
49240
+ * Takes an array of positions objects and fills in the space between them with accurately positioned positions to form an approximated Geodesic path broken by antimeridian into multiple sub-paths.
49241
+ * @param path Array of position objects that form a path to fill in.
49242
+ * @param nodeSize Number of nodes to insert between each position. Default: 15
49243
+ * @returns An array of paths that form geodesic paths, Comparing to getGeodesicPath, sub-paths will always contain longitude in -180 to 180 range
49244
+ */
49245
+ function getGeodesicPaths(path, nodeSize) {
49246
+ if (!nodeSize || nodeSize <= 0) {
49247
+ nodeSize = 15;
49016
49248
  }
49017
- // TODO: Check for crossing the antimeridian, consider splitting path by -180/180 longitude
49249
+ var locs;
49250
+ if (Array.isArray(path)) {
49251
+ locs = path;
49252
+ }
49253
+ else if (path.type && path.type === "LineString") {
49254
+ locs = path.coordinates;
49255
+ }
49256
+ var len = locs.length - 1;
49257
+ var currentNonCrossing = [];
49258
+ var outputLocs = [];
49259
+ for (var i = 0; i < len; i++) {
49260
+ var geodesic = _constructGeodesic(locs[i], locs[i + 1], nodeSize);
49261
+ for (var k = 0; k < geodesic.length; k++) {
49262
+ currentNonCrossing.push(geodesic[k]);
49263
+ if (k + 1 >= geodesic.length) {
49264
+ continue;
49265
+ }
49266
+ var _a = __read(geodesic[k], 2), lon1 = _a[0], lat1 = _a[1];
49267
+ var _b = __read(geodesic[k + 1], 2), lon2 = _b[0], lat2 = _b[1];
49268
+ // split the line by antimeridian
49269
+ // and break geodesic into two line segments
49270
+ if (Math.abs(lon2 - lon1) > 180.0) {
49271
+ var denormLon2 = lon1 > 0 ? lon2 + 360.0 : lon2 - 360.0;
49272
+ var antiLon = lon1 > 0 ? 180.0 : -180.0;
49273
+ var abs = Math.abs(denormLon2 - lon1);
49274
+ var antiAbs = Math.abs(antiLon - lon1);
49275
+ var f = antiAbs / abs;
49276
+ var dLat = (lat2 - lat1) * f;
49277
+ var antiLat = lat1 + dLat;
49278
+ currentNonCrossing.push([antiLon, antiLat]);
49279
+ outputLocs.push(currentNonCrossing);
49280
+ currentNonCrossing = [[-antiLon, antiLat]];
49281
+ }
49282
+ }
49283
+ }
49284
+ outputLocs.push(currentNonCrossing);
49018
49285
  return outputLocs;
49019
49286
  }
49020
49287
  /**
@@ -50421,6 +50688,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
50421
50688
  var index$1 = /*#__PURE__*/Object.freeze({
50422
50689
  __proto__: null,
50423
50690
  AffineTransform: AffineTransform,
50691
+ WEBMERCATOR_MAXLAT: WEBMERCATOR_MAXLAT,
50424
50692
  _precision: _precision,
50425
50693
  get AreaUnits () { return AreaUnits; },
50426
50694
  get DistanceUnits () { return DistanceUnits; },
@@ -50434,6 +50702,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
50434
50702
  getDistanceTo: getDistanceTo,
50435
50703
  getEarthRadius: getEarthRadius,
50436
50704
  getGeodesicPath: getGeodesicPath,
50705
+ getGeodesicPaths: getGeodesicPaths,
50437
50706
  getHeading: getHeading,
50438
50707
  getLengthOfPath: getLengthOfPath,
50439
50708
  getPositionAlongPath: getPositionAlongPath,
@@ -51563,8 +51832,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
51563
51832
  this.container.style.flexDirection = "column";
51564
51833
  this.zoomInButton = this.constructZoomInButton(map);
51565
51834
  this.zoomOutButton = this.constructZoomOutButton(map);
51835
+ var tooltipZoomIn = buildAccessibleTooltip("Zoom In");
51836
+ var tooltipZoomOut = buildAccessibleTooltip("Zoom Out");
51566
51837
  this.container.appendChild(this.zoomInButton);
51838
+ this.container.appendChild(tooltipZoomIn);
51567
51839
  this.container.appendChild(this.zoomOutButton);
51840
+ this.container.appendChild(tooltipZoomOut);
51841
+ positionTooltip(tooltipZoomIn, this.zoomInButton);
51842
+ positionTooltip(tooltipZoomOut, this.zoomOutButton);
51568
51843
  map.events.add('zoom', this.zoomChanged);
51569
51844
  map.events.add('minzoomchanged', this.minZoomChanged);
51570
51845
  map.events.add('maxzoomchanged', this.maxZoomChanged);
@@ -51590,8 +51865,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
51590
51865
  // small values need special handling, since depending on the height of the map view
51591
51866
  // the actual zoom we can zoom out to can be above or below 0 when the entire map fits the height into the view
51592
51867
  // use web mercator bounds to check if entire latitude range is visible
51593
- var reachedLatitudeBoundaries = BoundingBox.getSouth(this.map.getCamera().bounds) <= -ZoomControl.WEBMERCATOR_MAXLAT
51594
- && BoundingBox.getNorth(this.map.getCamera().bounds) >= ZoomControl.WEBMERCATOR_MAXLAT;
51868
+ var reachedLatitudeBoundaries = BoundingBox.getSouth(this.map.getCamera().bounds) <= -WEBMERCATOR_MAXLAT
51869
+ && BoundingBox.getNorth(this.map.getCamera().bounds) >= WEBMERCATOR_MAXLAT;
51595
51870
  var zoomOutDisabled = this.map.getCamera().zoom <= this.map._getMap().getMinZoom() || reachedLatitudeBoundaries;
51596
51871
  if (this.zoomInButton && this.zoomInButton.disabled != zoomInDisabled) {
51597
51872
  this.zoomInButton.disabled = zoomInDisabled;
@@ -51605,7 +51880,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
51605
51880
  var zoomInButton = document.createElement("button");
51606
51881
  zoomInButton.classList.add("azure-maps-control-button");
51607
51882
  zoomInButton.classList.add("zoom-in");
51608
- zoomInButton.setAttribute("title", "Zoom In");
51883
+ zoomInButton.setAttribute("aria-label", "Zoom In");
51609
51884
  zoomInButton.setAttribute("alt", "Zoom In");
51610
51885
  zoomInButton.setAttribute("type", "button");
51611
51886
  zoomInButton.addEventListener("click", function () {
@@ -51622,7 +51897,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
51622
51897
  var zoomOutButton = document.createElement("button");
51623
51898
  zoomOutButton.classList.add("azure-maps-control-button");
51624
51899
  zoomOutButton.classList.add("zoom-out");
51625
- zoomOutButton.setAttribute("title", "Zoom Out");
51900
+ zoomOutButton.setAttribute("aria-label", "Zoom Out");
51626
51901
  zoomOutButton.setAttribute("alt", "Zoom Out");
51627
51902
  zoomOutButton.setAttribute("type", "button");
51628
51903
  zoomOutButton.addEventListener("click", function () {
@@ -51634,7 +51909,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
51634
51909
  });
51635
51910
  return zoomOutButton;
51636
51911
  };
51637
- ZoomControl.WEBMERCATOR_MAXLAT = 85.0511;
51638
51912
  ZoomControl.ZOOM_DURATION_MS = 200;
51639
51913
  return ZoomControl;
51640
51914
  }(ControlBase));
@@ -52497,6 +52771,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
52497
52771
  if (value instanceof Source) {
52498
52772
  return value;
52499
52773
  }
52774
+ else {
52775
+ return undefined;
52776
+ }
52500
52777
  };
52501
52778
  return LayerOptions;
52502
52779
  }(Options));
@@ -52753,6 +53030,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
52753
53030
  if (value instanceof Source) {
52754
53031
  return value;
52755
53032
  }
53033
+ else {
53034
+ return undefined;
53035
+ }
52756
53036
  };
52757
53037
  return HeatMapLayerOptions;
52758
53038
  }(LayerOptions));
@@ -52948,6 +53228,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
52948
53228
  if (value instanceof Source) {
52949
53229
  return value;
52950
53230
  }
53231
+ else {
53232
+ return undefined;
53233
+ }
52951
53234
  };
52952
53235
  return ImageLayerOptions;
52953
53236
  }(MediaLayerOptions));
@@ -54735,6 +55018,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
54735
55018
  if (_this.options.closeButton) {
54736
55019
  _this.closeBtn = _this._createCloseButton();
54737
55020
  _this.contentDiv.appendChild(_this.closeBtn);
55021
+ var tooltip = buildAccessibleTooltip("close");
55022
+ _this.contentDiv.appendChild(tooltip);
55023
+ positionTooltip(tooltip, _this.closeBtn, true);
54738
55024
  }
54739
55025
  return _this;
54740
55026
  }
@@ -54768,6 +55054,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
54768
55054
  if (newOptions.closeButton && !this.closeBtn) {
54769
55055
  this.closeBtn = this._createCloseButton();
54770
55056
  this.contentDiv.appendChild(this.closeBtn);
55057
+ var tooltip = buildAccessibleTooltip("close");
55058
+ this.contentDiv.appendChild(tooltip);
55059
+ positionTooltip(tooltip, this.closeBtn, true);
54771
55060
  }
54772
55061
  else if (!newOptions.closeButton && this.closeBtn) {
54773
55062
  this.contentDiv.removeChild(this.closeBtn);
@@ -54945,7 +55234,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
54945
55234
  ele.addEventListener("click", this.close);
54946
55235
  ele.classList.add(Popup.Css.close);
54947
55236
  ele.setAttribute("aria-label", "close");
54948
- ele.setAttribute("title", "close");
54949
55237
  ele.setAttribute("tabindex", "0");
54950
55238
  ele.innerHTML = "&times;";
54951
55239
  return ele;
@@ -55208,6 +55496,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
55208
55496
  // They must use setOptions(...).
55209
55497
  return cloneDeepWith_1(this.options, HtmlMarkerOptions._cloneCustomizer);
55210
55498
  };
55499
+ /**
55500
+ * Returns the underlying `Marker`'s HTML element.
55501
+ */
55502
+ HtmlMarker.prototype.getElement = function () {
55503
+ return this.marker.getElement();
55504
+ };
55211
55505
  /**
55212
55506
  * Sets the options of the marker.
55213
55507
  * @param options The options for the marker.
@@ -55232,7 +55526,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
55232
55526
  (newOptions.color !== this.options.color ||
55233
55527
  newOptions.text !== this.options.text ||
55234
55528
  newOptions.secondaryColor !== this.options.secondaryColor)) {
55235
- this.element.innerHTML = this._getSubbedHtmlString(newOptions);
55529
+ this.element.innerHTML = this._getSubbedHtmlString(newOptions) || "";
55236
55530
  }
55237
55531
  if (newOptions.draggable !== this.options.draggable) {
55238
55532
  this._setDraggable(newOptions.draggable);
@@ -55327,7 +55621,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
55327
55621
  // Must converts a HTML string to a HTMLElement (div with innerHTML == htmlContent).
55328
55622
  // Must also handle the substitution of HTML string placeholders.
55329
55623
  if (typeof options.htmlContent === "string") {
55330
- var subbedContent = this._getSubbedHtmlString(options);
55624
+ var subbedContent = this._getSubbedHtmlString(options) || "";
55331
55625
  this.element = Html.convertHtmlString(subbedContent);
55332
55626
  }
55333
55627
  else {
@@ -55378,6 +55672,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
55378
55672
  .replace(/{secondaryColor}/ig, options.secondaryColor || "")
55379
55673
  .replace(/{text}/ig, options.text || "");
55380
55674
  }
55675
+ else {
55676
+ return null;
55677
+ }
55381
55678
  };
55382
55679
  /**
55383
55680
  * Returns the element that should contain all the markers.
@@ -56968,7 +57265,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
56968
57265
  }());
56969
57266
 
56970
57267
  /*
56971
- * Application Insights JavaScript SDK - Core, 2.6.3
57268
+ * Application Insights JavaScript SDK - Core, 2.6.5
56972
57269
  * Copyright (c) Microsoft and contributors. All rights reserved.
56973
57270
  */
56974
57271
 
@@ -57616,7 +57913,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
57616
57913
  dynamicProto[DynProtoDefaultOptions] = perfDefaults;
57617
57914
 
57618
57915
  /*
57619
- * Application Insights JavaScript SDK - Core, 2.6.3
57916
+ * Application Insights JavaScript SDK - Core, 2.6.5
57620
57917
  * Copyright (c) Microsoft and contributors. All rights reserved.
57621
57918
  */
57622
57919
 
@@ -57721,7 +58018,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
57721
58018
  };
57722
58019
 
57723
58020
  /*
57724
- * Application Insights JavaScript SDK - Core, 2.6.3
58021
+ * Application Insights JavaScript SDK - Core, 2.6.5
57725
58022
  * Copyright (c) Microsoft and contributors. All rights reserved.
57726
58023
  */
57727
58024
  // RESTRICT and AVOID circular dependencies you should not import other contained modules or export the contents of this file directly
@@ -58262,7 +58559,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
58262
58559
  }
58263
58560
 
58264
58561
  /*
58265
- * Application Insights JavaScript SDK - Core, 2.6.3
58562
+ * Application Insights JavaScript SDK - Core, 2.6.5
58266
58563
  * Copyright (c) Microsoft and contributors. All rights reserved.
58267
58564
  */
58268
58565
  /**
@@ -58520,7 +58817,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
58520
58817
  }
58521
58818
 
58522
58819
  /*
58523
- * Application Insights JavaScript SDK - Core, 2.6.3
58820
+ * Application Insights JavaScript SDK - Core, 2.6.5
58524
58821
  * Copyright (c) Microsoft and contributors. All rights reserved.
58525
58822
  */
58526
58823
  /**
@@ -58598,7 +58895,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
58598
58895
  throw message;
58599
58896
  }
58600
58897
  else {
58601
- if (!isUndefined(message) && !!message && !isUndefined(message.message)) {
58898
+ if (!isUndefined(message.message)) {
58602
58899
  var logLevel = _self.consoleLoggingLevel();
58603
58900
  if (isUserAct) {
58604
58901
  // check if this message type was already logged to console for this page view and if so, don't log it again
@@ -58699,7 +58996,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
58699
58996
  }());
58700
58997
 
58701
58998
  /*
58702
- * Application Insights JavaScript SDK - Core, 2.6.3
58999
+ * Application Insights JavaScript SDK - Core, 2.6.5
58703
59000
  * Copyright (c) Microsoft and contributors. All rights reserved.
58704
59001
  */
58705
59002
  var strExecutionContextKey = "ctx";
@@ -58827,7 +59124,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
58827
59124
  function doPerf(mgrSource, getSource, func, details, isAsync) {
58828
59125
  if (mgrSource) {
58829
59126
  var perfMgr = mgrSource;
58830
- if (perfMgr && isFunction$1(perfMgr["getPerfMgr"])) {
59127
+ if (isFunction$1(perfMgr["getPerfMgr"])) {
58831
59128
  // Looks like a perf manager provider object
58832
59129
  perfMgr = perfMgr["getPerfMgr"]();
58833
59130
  }
@@ -58872,7 +59169,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
58872
59169
  }
58873
59170
 
58874
59171
  /*
58875
- * Application Insights JavaScript SDK - Core, 2.6.3
59172
+ * Application Insights JavaScript SDK - Core, 2.6.5
58876
59173
  * Copyright (c) Microsoft and contributors. All rights reserved.
58877
59174
  */
58878
59175
  var TelemetryPluginChain = /** @class */ (function () {
@@ -58940,7 +59237,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
58940
59237
  }());
58941
59238
 
58942
59239
  /*
58943
- * Application Insights JavaScript SDK - Core, 2.6.3
59240
+ * Application Insights JavaScript SDK - Core, 2.6.5
58944
59241
  * Copyright (c) Microsoft and contributors. All rights reserved.
58945
59242
  */
58946
59243
  /**
@@ -59090,7 +59387,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59090
59387
  }());
59091
59388
 
59092
59389
  /*
59093
- * Application Insights JavaScript SDK - Core, 2.6.3
59390
+ * Application Insights JavaScript SDK - Core, 2.6.5
59094
59391
  * Copyright (c) Microsoft and contributors. All rights reserved.
59095
59392
  */
59096
59393
 
@@ -59099,7 +59396,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59099
59396
  var strExtensionConfig = "extensionConfig";
59100
59397
 
59101
59398
  /*
59102
- * Application Insights JavaScript SDK - Core, 2.6.3
59399
+ * Application Insights JavaScript SDK - Core, 2.6.5
59103
59400
  * Copyright (c) Microsoft and contributors. All rights reserved.
59104
59401
  */
59105
59402
  var strGetPlugin = "getPlugin";
@@ -59185,7 +59482,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59185
59482
  }());
59186
59483
 
59187
59484
  /*
59188
- * Application Insights JavaScript SDK - Core, 2.6.3
59485
+ * Application Insights JavaScript SDK - Core, 2.6.5
59189
59486
  * Copyright (c) Microsoft and contributors. All rights reserved.
59190
59487
  */
59191
59488
  var processTelemetry = "processTelemetry";
@@ -59242,7 +59539,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59242
59539
  }
59243
59540
 
59244
59541
  /*
59245
- * Application Insights JavaScript SDK - Core, 2.6.3
59542
+ * Application Insights JavaScript SDK - Core, 2.6.5
59246
59543
  * Copyright (c) Microsoft and contributors. All rights reserved.
59247
59544
  */
59248
59545
  var ChannelControllerPriority = 500;
@@ -59336,7 +59633,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59336
59633
  }(BaseTelemetryPlugin));
59337
59634
 
59338
59635
  /*
59339
- * Application Insights JavaScript SDK - Core, 2.6.3
59636
+ * Application Insights JavaScript SDK - Core, 2.6.5
59340
59637
  * Copyright (c) Microsoft and contributors. All rights reserved.
59341
59638
  */
59342
59639
  var strToGMTString = "toGMTString";
@@ -59412,7 +59709,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59412
59709
  cookieMgr = core.getCookieMgr();
59413
59710
  }
59414
59711
  else if (config) {
59415
- var cookieCfg = (config || {}).cookieCfg;
59712
+ var cookieCfg = config.cookieCfg;
59416
59713
  if (cookieCfg[strConfigCookieMgr]) {
59417
59714
  cookieMgr = cookieCfg[strConfigCookieMgr];
59418
59715
  }
@@ -59646,7 +59943,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59646
59943
  }
59647
59944
 
59648
59945
  /*
59649
- * Application Insights JavaScript SDK - Core, 2.6.3
59946
+ * Application Insights JavaScript SDK - Core, 2.6.5
59650
59947
  * Copyright (c) Microsoft and contributors. All rights reserved.
59651
59948
  */
59652
59949
  var validationError = "Extensions must provide callback to initialize";
@@ -59830,7 +60127,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59830
60127
  }());
59831
60128
 
59832
60129
  /*
59833
- * Application Insights JavaScript SDK - Core, 2.6.3
60130
+ * Application Insights JavaScript SDK - Core, 2.6.5
59834
60131
  * Copyright (c) Microsoft and contributors. All rights reserved.
59835
60132
  */
59836
60133
  /**
@@ -59934,7 +60231,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59934
60231
  }());
59935
60232
 
59936
60233
  /*
59937
- * Application Insights JavaScript SDK - Core, 2.6.3
60234
+ * Application Insights JavaScript SDK - Core, 2.6.5
59938
60235
  * Copyright (c) Microsoft and contributors. All rights reserved.
59939
60236
  */
59940
60237
  var AppInsightsCore = /** @class */ (function (_super) {
@@ -60026,7 +60323,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60026
60323
  }(BaseCore));
60027
60324
 
60028
60325
  /*
60029
- * Application Insights JavaScript SDK - Core, 2.6.3
60326
+ * Application Insights JavaScript SDK - Core, 2.6.5
60030
60327
  * Copyright (c) Microsoft and contributors. All rights reserved.
60031
60328
  */
60032
60329
  var UInt32Mask = 0x100000000;
@@ -60105,7 +60402,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60105
60402
  }
60106
60403
 
60107
60404
  /*
60108
- * Application Insights JavaScript SDK - Core, 2.6.3
60405
+ * Application Insights JavaScript SDK - Core, 2.6.5
60109
60406
  * Copyright (c) Microsoft and contributors. All rights reserved.
60110
60407
  */
60111
60408
  /**
@@ -60183,7 +60480,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60183
60480
  };
60184
60481
 
60185
60482
  /*
60186
- * Application Insights JavaScript SDK - Core, 2.6.3
60483
+ * Application Insights JavaScript SDK - Core, 2.6.5
60187
60484
  * Copyright (c) Microsoft and contributors. All rights reserved.
60188
60485
  */
60189
60486
  var aiInstrumentHooks = "_aiHooks";
@@ -60396,7 +60693,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60396
60693
  }
60397
60694
 
60398
60695
  /*
60399
- * Application Insights JavaScript SDK - Common, 2.6.3
60696
+ * Application Insights JavaScript SDK - Common, 2.6.5
60400
60697
  * Copyright (c) Microsoft and contributors. All rights reserved.
60401
60698
  */
60402
60699
 
@@ -60414,7 +60711,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60414
60711
  };
60415
60712
 
60416
60713
  /*
60417
- * Application Insights JavaScript SDK - Common, 2.6.3
60714
+ * Application Insights JavaScript SDK - Common, 2.6.5
60418
60715
  * Copyright (c) Microsoft and contributors. All rights reserved.
60419
60716
  */
60420
60717
  function dataSanitizeKeyAndAddUniqueness(logger, key, map) {
@@ -60535,7 +60832,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60535
60832
  }
60536
60833
 
60537
60834
  /*
60538
- * Application Insights JavaScript SDK - Common, 2.6.3
60835
+ * Application Insights JavaScript SDK - Common, 2.6.5
60539
60836
  * Copyright (c) Microsoft and contributors. All rights reserved.
60540
60837
  */
60541
60838
  function createDomEvent(eventName) {
@@ -60554,7 +60851,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60554
60851
  }
60555
60852
 
60556
60853
  /*
60557
- * Application Insights JavaScript SDK - Common, 2.6.3
60854
+ * Application Insights JavaScript SDK - Common, 2.6.5
60558
60855
  * Copyright (c) Microsoft and contributors. All rights reserved.
60559
60856
  */
60560
60857
  function stringToBoolOrDefault(str, defaultValue) {
@@ -60602,7 +60899,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60602
60899
  }
60603
60900
 
60604
60901
  /*
60605
- * Application Insights JavaScript SDK - Common, 2.6.3
60902
+ * Application Insights JavaScript SDK - Common, 2.6.5
60606
60903
  * Copyright (c) Microsoft and contributors. All rights reserved.
60607
60904
  */
60608
60905
 
@@ -60622,7 +60919,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60622
60919
  var strNotSpecified = "not_specified";
60623
60920
 
60624
60921
  /*
60625
- * Application Insights JavaScript SDK - Common, 2.6.3
60922
+ * Application Insights JavaScript SDK - Common, 2.6.5
60626
60923
  * Copyright (c) Microsoft and contributors. All rights reserved.
60627
60924
  */
60628
60925
 
@@ -60652,7 +60949,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60652
60949
  })(DistributedTracingModes || (DistributedTracingModes = {}));
60653
60950
 
60654
60951
  /*
60655
- * Application Insights JavaScript SDK - Common, 2.6.3
60952
+ * Application Insights JavaScript SDK - Common, 2.6.5
60656
60953
  * Copyright (c) Microsoft and contributors. All rights reserved.
60657
60954
  */
60658
60955
  var _canUseLocalStorage = undefined;
@@ -60688,6 +60985,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60688
60985
  }
60689
60986
  }
60690
60987
  catch (exception) {
60988
+ // eslint-disable-next-line no-empty
60691
60989
  }
60692
60990
  return null;
60693
60991
  }
@@ -60801,7 +61099,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60801
61099
  }
60802
61100
 
60803
61101
  /*
60804
- * Application Insights JavaScript SDK - Common, 2.6.3
61102
+ * Application Insights JavaScript SDK - Common, 2.6.5
60805
61103
  * Copyright (c) Microsoft and contributors. All rights reserved.
60806
61104
  */
60807
61105
  var _document = getDocument() || {};
@@ -60846,7 +61144,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60846
61144
  }
60847
61145
  // Fallback method to grab host from url if document.createElement method is not available
60848
61146
  function urlParseHost(url, inclPort) {
60849
- var fullHost = urlParseFullHost(url, inclPort);
61147
+ var fullHost = urlParseFullHost(url, inclPort) || "";
60850
61148
  if (fullHost) {
60851
61149
  var match = fullHost.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);
60852
61150
  if (match != null && match.length > 3 && isString(match[2]) && match[2].length > 0) {
@@ -60879,7 +61177,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60879
61177
  }
60880
61178
 
60881
61179
  /*
60882
- * Application Insights JavaScript SDK - Common, 2.6.3
61180
+ * Application Insights JavaScript SDK - Common, 2.6.5
60883
61181
  * Copyright (c) Microsoft and contributors. All rights reserved.
60884
61182
  */
60885
61183
  // listing only non-geo specific locations
@@ -60917,14 +61215,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60917
61215
  // try and parse it to remove if it matches the default protocol port
60918
61216
  requestHost = (urlParseFullHost(requestUrl, true) || "").toLowerCase();
60919
61217
  }
60920
- if ((!config || !config.enableCorsCorrelation) && requestHost !== currentHost) {
61218
+ if ((!config || !config.enableCorsCorrelation) && (requestHost && requestHost !== currentHost)) {
60921
61219
  return false;
60922
61220
  }
60923
61221
  var includedDomains = config && config.correlationHeaderDomains;
60924
61222
  if (includedDomains) {
60925
61223
  var matchExists_1;
60926
61224
  arrForEach(includedDomains, function (domain) {
60927
- var regex = new RegExp(domain.toLowerCase().replace(/\./g, "\.").replace(/\*/g, ".*"));
61225
+ var regex = new RegExp(domain.toLowerCase().replace(/\\/g, "\\\\").replace(/\./g, "\\.").replace(/\*/g, ".*"));
60928
61226
  matchExists_1 = matchExists_1 || regex.test(requestHost);
60929
61227
  });
60930
61228
  if (!matchExists_1) {
@@ -60936,7 +61234,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60936
61234
  return true;
60937
61235
  }
60938
61236
  for (var i = 0; i < excludedDomains.length; i++) {
60939
- var regex = new RegExp(excludedDomains[i].toLowerCase().replace(/\./g, "\.").replace(/\*/g, ".*"));
61237
+ var regex = new RegExp(excludedDomains[i].toLowerCase().replace(/\\/g, "\\\\").replace(/\./g, "\\.").replace(/\*/g, ".*"));
60940
61238
  if (regex.test(requestHost)) {
60941
61239
  return false;
60942
61240
  }
@@ -61021,7 +61319,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61021
61319
  }
61022
61320
 
61023
61321
  /*
61024
- * Application Insights JavaScript SDK - Common, 2.6.3
61322
+ * Application Insights JavaScript SDK - Common, 2.6.5
61025
61323
  * Copyright (c) Microsoft and contributors. All rights reserved.
61026
61324
  */
61027
61325
  var _FIELDS_SEPARATOR = ";";
@@ -61054,7 +61352,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61054
61352
  }
61055
61353
 
61056
61354
  /*
61057
- * Application Insights JavaScript SDK - Common, 2.6.3
61355
+ * Application Insights JavaScript SDK - Common, 2.6.5
61058
61356
  * Copyright (c) Microsoft and contributors. All rights reserved.
61059
61357
  */
61060
61358
 
@@ -61070,7 +61368,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61070
61368
  }());
61071
61369
 
61072
61370
  /*
61073
- * Application Insights JavaScript SDK - Common, 2.6.3
61371
+ * Application Insights JavaScript SDK - Common, 2.6.5
61074
61372
  * Copyright (c) Microsoft and contributors. All rights reserved.
61075
61373
  */
61076
61374
  /**
@@ -61085,7 +61383,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61085
61383
  }(Base));
61086
61384
 
61087
61385
  /*
61088
- * Application Insights JavaScript SDK - Common, 2.6.3
61386
+ * Application Insights JavaScript SDK - Common, 2.6.5
61089
61387
  * Copyright (c) Microsoft and contributors. All rights reserved.
61090
61388
  */
61091
61389
 
@@ -61112,7 +61410,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61112
61410
  }());
61113
61411
 
61114
61412
  /*
61115
- * Application Insights JavaScript SDK - Common, 2.6.3
61413
+ * Application Insights JavaScript SDK - Common, 2.6.5
61116
61414
  * Copyright (c) Microsoft and contributors. All rights reserved.
61117
61415
  */
61118
61416
  var Envelope$1 = /** @class */ (function (_super) {
@@ -61141,7 +61439,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61141
61439
  }(Envelope));
61142
61440
 
61143
61441
  /*
61144
- * Application Insights JavaScript SDK - Common, 2.6.3
61442
+ * Application Insights JavaScript SDK - Common, 2.6.5
61145
61443
  * Copyright (c) Microsoft and contributors. All rights reserved.
61146
61444
  */
61147
61445
 
@@ -61168,7 +61466,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61168
61466
  }());
61169
61467
 
61170
61468
  /*
61171
- * Application Insights JavaScript SDK - Common, 2.6.3
61469
+ * Application Insights JavaScript SDK - Common, 2.6.5
61172
61470
  * Copyright (c) Microsoft and contributors. All rights reserved.
61173
61471
  */
61174
61472
  var Event$1 = /** @class */ (function (_super) {
@@ -61195,7 +61493,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61195
61493
  }(EventData));
61196
61494
 
61197
61495
  /*
61198
- * Application Insights JavaScript SDK - Common, 2.6.3
61496
+ * Application Insights JavaScript SDK - Common, 2.6.5
61199
61497
  * Copyright (c) Microsoft and contributors. All rights reserved.
61200
61498
  */
61201
61499
 
@@ -61211,7 +61509,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61211
61509
  }());
61212
61510
 
61213
61511
  /*
61214
- * Application Insights JavaScript SDK - Common, 2.6.3
61512
+ * Application Insights JavaScript SDK - Common, 2.6.5
61215
61513
  * Copyright (c) Microsoft and contributors. All rights reserved.
61216
61514
  */
61217
61515
 
@@ -61242,7 +61540,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61242
61540
  }());
61243
61541
 
61244
61542
  /*
61245
- * Application Insights JavaScript SDK - Common, 2.6.3
61543
+ * Application Insights JavaScript SDK - Common, 2.6.5
61246
61544
  * Copyright (c) Microsoft and contributors. All rights reserved.
61247
61545
  */
61248
61546
 
@@ -61265,7 +61563,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61265
61563
  }());
61266
61564
 
61267
61565
  /*
61268
- * Application Insights JavaScript SDK - Common, 2.6.3
61566
+ * Application Insights JavaScript SDK - Common, 2.6.5
61269
61567
  * Copyright (c) Microsoft and contributors. All rights reserved.
61270
61568
  */
61271
61569
  var NoMethod = "<no_method>";
@@ -61298,7 +61596,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61298
61596
  function _formatMessage(theEvent, errorType) {
61299
61597
  var evtMessage = theEvent;
61300
61598
  if (theEvent) {
61301
- evtMessage = theEvent[strMessage] || theEvent[strDescription] || "";
61599
+ if (evtMessage && !isString(evtMessage)) {
61600
+ evtMessage = theEvent[strMessage] || theEvent[strDescription] || evtMessage;
61601
+ }
61302
61602
  // Make sure the message is a string
61303
61603
  if (evtMessage && !isString(evtMessage)) {
61304
61604
  // tslint:disable-next-line: prefer-conditional-expression
@@ -61482,12 +61782,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61482
61782
  typeName = errorType.typeName || errorType.name || "";
61483
61783
  if (!typeName) {
61484
61784
  try {
61485
- var funcNameRegex = /function (.{1,})\(/;
61785
+ var funcNameRegex = /function (.{1,200})\(/;
61486
61786
  var results = (funcNameRegex).exec((errorType).constructor.toString());
61487
61787
  typeName = (results && results.length > 1) ? results[1] : "";
61488
61788
  }
61489
61789
  catch (e) {
61490
- // Ignore
61790
+ // eslint-disable-next-line no-empty -- Ignoring any failures as nothing we can do
61491
61791
  }
61492
61792
  }
61493
61793
  }
@@ -61518,6 +61818,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61518
61818
  }
61519
61819
  }
61520
61820
  catch (e) {
61821
+ // eslint-disable-next-line no-empty -- Ignoring any failures as nothing we can do
61521
61822
  }
61522
61823
  }
61523
61824
  // Fallback to just letting the object format itself into a string
@@ -61748,13 +62049,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61748
62049
  };
61749
62050
  // regex to match stack frames from ie/chrome/ff
61750
62051
  // methodName=$2, fileName=$4, lineNo=$5, column=$6
61751
- _StackFrame.regex = /^([\s]+at)?[\s]*([^\@\()]+?)[\s]*(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/;
62052
+ _StackFrame.regex = /^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/;
61752
62053
  _StackFrame.baseSize = 58; // '{"method":"","level":,"assembly":"","fileName":"","line":}'.length
61753
62054
  return _StackFrame;
61754
62055
  }(StackFrame));
61755
62056
 
61756
62057
  /*
61757
- * Application Insights JavaScript SDK - Common, 2.6.3
62058
+ * Application Insights JavaScript SDK - Common, 2.6.5
61758
62059
  * Copyright (c) Microsoft and contributors. All rights reserved.
61759
62060
  */
61760
62061
 
@@ -61785,7 +62086,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61785
62086
  }());
61786
62087
 
61787
62088
  /*
61788
- * Application Insights JavaScript SDK - Common, 2.6.3
62089
+ * Application Insights JavaScript SDK - Common, 2.6.5
61789
62090
  * Copyright (c) Microsoft and contributors. All rights reserved.
61790
62091
  */
61791
62092
 
@@ -61801,7 +62102,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61801
62102
  })(DataPointType || (DataPointType = {}));
61802
62103
 
61803
62104
  /*
61804
- * Application Insights JavaScript SDK - Common, 2.6.3
62105
+ * Application Insights JavaScript SDK - Common, 2.6.5
61805
62106
  * Copyright (c) Microsoft and contributors. All rights reserved.
61806
62107
  */
61807
62108
  /**
@@ -61818,7 +62119,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61818
62119
  }());
61819
62120
 
61820
62121
  /*
61821
- * Application Insights JavaScript SDK - Common, 2.6.3
62122
+ * Application Insights JavaScript SDK - Common, 2.6.5
61822
62123
  * Copyright (c) Microsoft and contributors. All rights reserved.
61823
62124
  */
61824
62125
  var DataPoint$1 = /** @class */ (function (_super) {
@@ -61843,7 +62144,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61843
62144
  }(DataPoint));
61844
62145
 
61845
62146
  /*
61846
- * Application Insights JavaScript SDK - Common, 2.6.3
62147
+ * Application Insights JavaScript SDK - Common, 2.6.5
61847
62148
  * Copyright (c) Microsoft and contributors. All rights reserved.
61848
62149
  */
61849
62150
  var Metric = /** @class */ (function (_super) {
@@ -61875,7 +62176,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61875
62176
  }(MetricData));
61876
62177
 
61877
62178
  /*
61878
- * Application Insights JavaScript SDK - Common, 2.6.3
62179
+ * Application Insights JavaScript SDK - Common, 2.6.5
61879
62180
  * Copyright (c) Microsoft and contributors. All rights reserved.
61880
62181
  */
61881
62182
  /**
@@ -61903,7 +62204,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61903
62204
  }(EventData));
61904
62205
 
61905
62206
  /*
61906
- * Application Insights JavaScript SDK - Common, 2.6.3
62207
+ * Application Insights JavaScript SDK - Common, 2.6.5
61907
62208
  * Copyright (c) Microsoft and contributors. All rights reserved.
61908
62209
  */
61909
62210
  var PageView = /** @class */ (function (_super) {
@@ -61938,7 +62239,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61938
62239
  }(PageViewData));
61939
62240
 
61940
62241
  /*
61941
- * Application Insights JavaScript SDK - Common, 2.6.3
62242
+ * Application Insights JavaScript SDK - Common, 2.6.5
61942
62243
  * Copyright (c) Microsoft and contributors. All rights reserved.
61943
62244
  */
61944
62245
 
@@ -61969,7 +62270,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
61969
62270
  }());
61970
62271
 
61971
62272
  /*
61972
- * Application Insights JavaScript SDK - Common, 2.6.3
62273
+ * Application Insights JavaScript SDK - Common, 2.6.5
61973
62274
  * Copyright (c) Microsoft and contributors. All rights reserved.
61974
62275
  */
61975
62276
  var RemoteDependencyData$1 = /** @class */ (function (_super) {
@@ -62025,7 +62326,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
62025
62326
  }(RemoteDependencyData));
62026
62327
 
62027
62328
  /*
62028
- * Application Insights JavaScript SDK - Common, 2.6.3
62329
+ * Application Insights JavaScript SDK - Common, 2.6.5
62029
62330
  * Copyright (c) Microsoft and contributors. All rights reserved.
62030
62331
  */
62031
62332
 
@@ -62052,7 +62353,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
62052
62353
  }());
62053
62354
 
62054
62355
  /*
62055
- * Application Insights JavaScript SDK - Common, 2.6.3
62356
+ * Application Insights JavaScript SDK - Common, 2.6.5
62056
62357
  * Copyright (c) Microsoft and contributors. All rights reserved.
62057
62358
  */
62058
62359
  var Trace = /** @class */ (function (_super) {
@@ -62083,7 +62384,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
62083
62384
  }(MessageData));
62084
62385
 
62085
62386
  /*
62086
- * Application Insights JavaScript SDK - Common, 2.6.3
62387
+ * Application Insights JavaScript SDK - Common, 2.6.5
62087
62388
  * Copyright (c) Microsoft and contributors. All rights reserved.
62088
62389
  */
62089
62390
  /**
@@ -62111,7 +62412,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
62111
62412
  }(PageViewData));
62112
62413
 
62113
62414
  /*
62114
- * Application Insights JavaScript SDK - Common, 2.6.3
62415
+ * Application Insights JavaScript SDK - Common, 2.6.5
62115
62416
  * Copyright (c) Microsoft and contributors. All rights reserved.
62116
62417
  */
62117
62418
  var PageViewPerformance = /** @class */ (function (_super) {
@@ -62154,7 +62455,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
62154
62455
  }(PageViewPerfData));
62155
62456
 
62156
62457
  /*
62157
- * Application Insights JavaScript SDK - Common, 2.6.3
62458
+ * Application Insights JavaScript SDK - Common, 2.6.5
62158
62459
  * Copyright (c) Microsoft and contributors. All rights reserved.
62159
62460
  */
62160
62461
  var Data$1 = /** @class */ (function (_super) {
@@ -62179,7 +62480,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
62179
62480
  }(Data));
62180
62481
 
62181
62482
  /*
62182
- * Application Insights JavaScript SDK - Common, 2.6.3
62483
+ * Application Insights JavaScript SDK - Common, 2.6.5
62183
62484
  * Copyright (c) Microsoft and contributors. All rights reserved.
62184
62485
  */
62185
62486
 
@@ -62198,7 +62499,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
62198
62499
  })(SeverityLevel || (SeverityLevel = {}));
62199
62500
 
62200
62501
  /*
62201
- * Application Insights JavaScript SDK - Common, 2.6.3
62502
+ * Application Insights JavaScript SDK - Common, 2.6.5
62202
62503
  * Copyright (c) Microsoft and contributors. All rights reserved.
62203
62504
  */
62204
62505
  function _aiNameFunc(baseName) {
@@ -62282,7 +62583,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
62282
62583
  })));
62283
62584
 
62284
62585
  /*
62285
- * Application Insights JavaScript SDK - Common, 2.6.3
62586
+ * Application Insights JavaScript SDK - Common, 2.6.5
62286
62587
  * Copyright (c) Microsoft and contributors. All rights reserved.
62287
62588
  */
62288
62589
  var TelemetryItemCreator = /** @class */ (function () {
@@ -62326,7 +62627,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
62326
62627
  }());
62327
62628
 
62328
62629
  /*
62329
- * Application Insights JavaScript SDK - Common, 2.6.3
62630
+ * Application Insights JavaScript SDK - Common, 2.6.5
62330
62631
  * Copyright (c) Microsoft and contributors. All rights reserved.
62331
62632
  */
62332
62633
  var Extensions = {
@@ -62342,7 +62643,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
62342
62643
  var CtxTagKeys = new ContextTagKeys();
62343
62644
 
62344
62645
  /*
62345
- * Application Insights JavaScript SDK - Common, 2.6.3
62646
+ * Application Insights JavaScript SDK - Common, 2.6.5
62346
62647
  * Copyright (c) Microsoft and contributors. All rights reserved.
62347
62648
  */
62348
62649
  var PropertiesPluginIdentifier = "AppInsightsPropertiesPlugin";
@@ -62350,7 +62651,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
62350
62651
  var AnalyticsPluginIdentifier = "ApplicationInsightsAnalytics";
62351
62652
 
62352
62653
  /*
62353
- * Application Insights JavaScript SDK - Web Analytics, 2.6.3
62654
+ * Application Insights JavaScript SDK - Web Analytics, 2.6.5
62354
62655
  * Copyright (c) Microsoft and contributors. All rights reserved.
62355
62656
  */
62356
62657
  /**
@@ -62507,7 +62808,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
62507
62808
  }());
62508
62809
 
62509
62810
  /*
62510
- * Application Insights JavaScript SDK - Web Analytics, 2.6.3
62811
+ * Application Insights JavaScript SDK - Web Analytics, 2.6.5
62511
62812
  * Copyright (c) Microsoft and contributors. All rights reserved.
62512
62813
  */
62513
62814
  /**
@@ -62622,7 +62923,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
62622
62923
  }());
62623
62924
 
62624
62925
  /*
62625
- * Application Insights JavaScript SDK - Web Analytics, 2.6.3
62926
+ * Application Insights JavaScript SDK - Web Analytics, 2.6.5
62626
62927
  * Copyright (c) Microsoft and contributors. All rights reserved.
62627
62928
  */
62628
62929
  /**
@@ -62786,7 +63087,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
62786
63087
  }());
62787
63088
 
62788
63089
  /*
62789
- * Application Insights JavaScript SDK - Web Analytics, 2.6.3
63090
+ * Application Insights JavaScript SDK - Web Analytics, 2.6.5
62790
63091
  * Copyright (c) Microsoft and contributors. All rights reserved.
62791
63092
  */
62792
63093
  var durationProperty = "duration";
@@ -62796,6 +63097,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
62796
63097
  target.dispatchEvent(evnt);
62797
63098
  }
62798
63099
  }
63100
+ function _getReason(error) {
63101
+ if (error && error.reason) {
63102
+ var reason = error.reason;
63103
+ if (!isString(reason) && isFunction$1(reason.toString)) {
63104
+ return reason.toString();
63105
+ }
63106
+ return dumpObj(reason);
63107
+ }
63108
+ // Pass the original object down which will eventually get evaluated for any message or description
63109
+ return error || "";
63110
+ }
62799
63111
  var ApplicationInsights = /** @class */ (function (_super) {
62800
63112
  __extendsFn(ApplicationInsights, _super);
62801
63113
  function ApplicationInsights() {
@@ -63180,7 +63492,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
63180
63492
  var evt = _window[strEvent];
63181
63493
  var handled = originalOnUnhandledRejection_1 && originalOnUnhandledRejection_1.call(_window, error);
63182
63494
  if (handled !== true) {
63183
- instance._onerror(Exception.CreateAutoException(error.reason.toString(), _location ? _location.href : "", 0, 0, error, evt));
63495
+ instance._onerror(Exception.CreateAutoException(_getReason(error), _location ? _location.href : "", 0, 0, error, evt));
63184
63496
  }
63185
63497
  return handled;
63186
63498
  };
@@ -63326,7 +63638,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
63326
63638
  // Removed Stub for ApplicationInsights.prototype._onerror.
63327
63639
  // Removed Stub for ApplicationInsights.prototype.addTelemetryInitializer.
63328
63640
  // Removed Stub for ApplicationInsights.prototype.initialize.
63329
- ApplicationInsights.Version = "2.6.3"; // Not currently used anywhere
63641
+ ApplicationInsights.Version = "2.6.5"; // Not currently used anywhere
63330
63642
  return ApplicationInsights;
63331
63643
  }(BaseTelemetryPlugin));
63332
63644
  /**
@@ -63360,7 +63672,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
63360
63672
  }());
63361
63673
 
63362
63674
  /*
63363
- * Application Insights JavaScript SDK - Channel, 2.6.3
63675
+ * Application Insights JavaScript SDK - Channel, 2.6.5
63364
63676
  * Copyright (c) Microsoft and contributors. All rights reserved.
63365
63677
  */
63366
63678
  /*
@@ -63541,7 +63853,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
63541
63853
  }());
63542
63854
 
63543
63855
  /*
63544
- * Application Insights JavaScript SDK - Channel, 2.6.3
63856
+ * Application Insights JavaScript SDK - Channel, 2.6.5
63545
63857
  * Copyright (c) Microsoft and contributors. All rights reserved.
63546
63858
  */
63547
63859
  // these two constants are used to filter out properties not needed when trying to extract custom properties and measurements from the incoming payload
@@ -63676,7 +63988,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
63676
63988
  this._logger.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.TelemetryEnvelopeInvalid, "telemetryItem.baseData cannot be null.");
63677
63989
  }
63678
63990
  };
63679
- EnvelopeCreator.Version = "2.6.3";
63991
+ EnvelopeCreator.Version = "2.6.5";
63680
63992
  return EnvelopeCreator;
63681
63993
  }());
63682
63994
  var DependencyEnvelopeCreator = /** @class */ (function (_super) {
@@ -63871,7 +64183,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
63871
64183
  }(EnvelopeCreator));
63872
64184
 
63873
64185
  /*
63874
- * Application Insights JavaScript SDK - Channel, 2.6.3
64186
+ * Application Insights JavaScript SDK - Channel, 2.6.5
63875
64187
  * Copyright (c) Microsoft and contributors. All rights reserved.
63876
64188
  */
63877
64189
  var Serializer = /** @class */ (function () {
@@ -64033,7 +64345,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64033
64345
  }());
64034
64346
 
64035
64347
  /*
64036
- * Application Insights JavaScript SDK - Channel, 2.6.3
64348
+ * Application Insights JavaScript SDK - Channel, 2.6.5
64037
64349
  * Copyright (c) Microsoft and contributors. All rights reserved.
64038
64350
  */
64039
64351
  /**
@@ -64107,7 +64419,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64107
64419
  var Offline = OfflineListener.Offline;
64108
64420
 
64109
64421
  /*
64110
- * Application Insights JavaScript SDK - Channel, 2.6.3
64422
+ * Application Insights JavaScript SDK - Channel, 2.6.5
64111
64423
  * Copyright (c) Microsoft and contributors. All rights reserved.
64112
64424
  */
64113
64425
 
@@ -64144,7 +64456,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64144
64456
  }());
64145
64457
 
64146
64458
  /*
64147
- * Application Insights JavaScript SDK - Channel, 2.6.3
64459
+ * Application Insights JavaScript SDK - Channel, 2.6.5
64148
64460
  * Copyright (c) Microsoft and contributors. All rights reserved.
64149
64461
  */
64150
64462
  var SamplingScoreGenerator = /** @class */ (function () {
@@ -64176,7 +64488,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64176
64488
  }());
64177
64489
 
64178
64490
  /*
64179
- * Application Insights JavaScript SDK - Channel, 2.6.3
64491
+ * Application Insights JavaScript SDK - Channel, 2.6.5
64180
64492
  * Copyright (c) Microsoft and contributors. All rights reserved.
64181
64493
  */
64182
64494
  var Sample = /** @class */ (function () {
@@ -64186,7 +64498,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64186
64498
  this._logger = logger || safeGetLogger(null);
64187
64499
  if (sampleRate > 100 || sampleRate < 0) {
64188
64500
  this._logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.SampleRateOutOfRange, "Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.", { samplingRate: sampleRate }, true);
64189
- this.sampleRate = 100;
64501
+ sampleRate = 100;
64190
64502
  }
64191
64503
  this.sampleRate = sampleRate;
64192
64504
  this.samplingScoreGenerator = new SamplingScoreGenerator();
@@ -64211,7 +64523,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64211
64523
  }());
64212
64524
 
64213
64525
  /*
64214
- * Application Insights JavaScript SDK - Channel, 2.6.3
64526
+ * Application Insights JavaScript SDK - Channel, 2.6.5
64215
64527
  * Copyright (c) Microsoft and contributors. All rights reserved.
64216
64528
  */
64217
64529
  function _getResponseText(xhr) {
@@ -64315,7 +64627,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64315
64627
  _self._sender = _xhrSender;
64316
64628
  _self._XMLHttpRequestSupported = true;
64317
64629
  }
64318
- else if (typeof XDomainRequest !== undefined) {
64630
+ else if (typeof XDomainRequest !== strShimUndefined) {
64319
64631
  _self._sender = _xdrSender; // IE 8 and 9
64320
64632
  }
64321
64633
  }
@@ -64533,7 +64845,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64533
64845
  if ((status < 200 || status >= 300) && status !== 0) {
64534
64846
  // Update End Point url if permanent redirect or moved permanently
64535
64847
  // Updates the end point url before retry
64536
- if (status === 301 || status === 308) {
64848
+ if (status === 301 || status === 307 || status === 308) {
64537
64849
  if (!_checkAndUpdateEndPointUrl(responseUrl)) {
64538
64850
  _self._onError(payload, errorMessage);
64539
64851
  return;
@@ -64934,7 +65246,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64934
65246
  }(BaseTelemetryPlugin));
64935
65247
 
64936
65248
  /*
64937
- * Application Insights JavaScript SDK - Properties Plugin, 2.6.3
65249
+ * Application Insights JavaScript SDK - Properties Plugin, 2.6.5
64938
65250
  * Copyright (c) Microsoft and contributors. All rights reserved.
64939
65251
  */
64940
65252
  var cookieNameConst = 'ai_session';
@@ -64961,7 +65273,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64961
65273
  config.sessionRenewalMs = function () { return _SessionManager.renewalSpan; };
64962
65274
  }
64963
65275
  _self.config = config;
64964
- _storageNamePrefix = function () { return _self.config.namePrefix && _self.config.namePrefix() ? cookieNameConst + _self.config.namePrefix() : cookieNameConst; };
65276
+ // sessionCookiePostfix takes the preference if it is configured, otherwise takes namePrefix if configured.
65277
+ var sessionCookiePostfix = (_self.config.sessionCookiePostfix && _self.config.sessionCookiePostfix()) ?
65278
+ _self.config.sessionCookiePostfix() :
65279
+ ((_self.config.namePrefix && _self.config.namePrefix()) ? _self.config.namePrefix() : "");
65280
+ _storageNamePrefix = function () { return cookieNameConst + sessionCookiePostfix; };
64965
65281
  _self.automaticSession = new Session();
64966
65282
  _self.update = function () {
64967
65283
  // Always using Date getTime() as there is a bug in older IE instances that causes the performance timings to have the hi-bit set eg 0x800000000 causing
@@ -65111,7 +65427,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
65111
65427
  }());
65112
65428
 
65113
65429
  /*
65114
- * Application Insights JavaScript SDK - Properties Plugin, 2.6.3
65430
+ * Application Insights JavaScript SDK - Properties Plugin, 2.6.5
65115
65431
  * Copyright (c) Microsoft and contributors. All rights reserved.
65116
65432
  */
65117
65433
 
@@ -65123,7 +65439,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
65123
65439
  }());
65124
65440
 
65125
65441
  /*
65126
- * Application Insights JavaScript SDK - Properties Plugin, 2.6.3
65442
+ * Application Insights JavaScript SDK - Properties Plugin, 2.6.5
65127
65443
  * Copyright (c) Microsoft and contributors. All rights reserved.
65128
65444
  */
65129
65445
 
@@ -65143,12 +65459,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
65143
65459
  }());
65144
65460
 
65145
65461
  /*
65146
- * Application Insights JavaScript SDK - Properties Plugin, 2.6.3
65462
+ * Application Insights JavaScript SDK - Properties Plugin, 2.6.5
65147
65463
  * Copyright (c) Microsoft and contributors. All rights reserved.
65148
65464
  */
65149
65465
 
65150
65466
 
65151
- var Version$1 = "2.6.3";
65467
+ var Version$1 = "2.6.5";
65152
65468
  var Internal = /** @class */ (function () {
65153
65469
  /**
65154
65470
  * Constructs a new instance of the internal telemetry data class.
@@ -65160,7 +65476,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
65160
65476
  }());
65161
65477
 
65162
65478
  /*
65163
- * Application Insights JavaScript SDK - Properties Plugin, 2.6.3
65479
+ * Application Insights JavaScript SDK - Properties Plugin, 2.6.5
65164
65480
  * Copyright (c) Microsoft and contributors. All rights reserved.
65165
65481
  */
65166
65482
  function _validateUserInput(id) {
@@ -65179,9 +65495,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
65179
65495
  this.isNewUser = false;
65180
65496
  var _logger = safeGetLogger(core);
65181
65497
  var _cookieManager = safeGetCookieMgr(core);
65498
+ var _storageNamePrefix;
65182
65499
  dynamicProto(User, this, function (_self) {
65500
+ _self.config = config;
65501
+ var userCookiePostfix = (_self.config.userCookiePostfix && _self.config.userCookiePostfix()) ? _self.config.userCookiePostfix() : "";
65502
+ _storageNamePrefix = function () { return User.userCookieName + userCookiePostfix; };
65183
65503
  // get userId or create new one if none exists
65184
- var cookie = _cookieManager.get(User.userCookieName);
65504
+ var cookie = _cookieManager.get(_storageNamePrefix());
65185
65505
  if (cookie) {
65186
65506
  _self.isNewUser = false;
65187
65507
  var params = cookie.split(User.cookieSeparator);
@@ -65189,7 +65509,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
65189
65509
  _self.id = params[0];
65190
65510
  }
65191
65511
  }
65192
- _self.config = config;
65193
65512
  if (!_self.id) {
65194
65513
  var theConfig = (config || {});
65195
65514
  var getNewId = (theConfig.getNewId ? theConfig.getNewId() : null) || newId;
@@ -65202,7 +65521,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
65202
65521
  _self.accountAcquisitionDate = acqStr;
65203
65522
  _self.isNewUser = true;
65204
65523
  var newCookie = [_self.id, acqStr];
65205
- _cookieManager.set(User.userCookieName, newCookie.join(User.cookieSeparator), oneYear);
65524
+ _cookieManager.set(_storageNamePrefix(), newCookie.join(User.cookieSeparator), oneYear);
65206
65525
  // If we have an config.namePrefix() + ai_session in local storage this means the user actively removed our cookies.
65207
65526
  // We should respect their wishes and clear ourselves from local storage
65208
65527
  var name_1 = config.namePrefix && config.namePrefix() ? config.namePrefix() + 'ai_session' : 'ai_session';
@@ -65266,7 +65585,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
65266
65585
  }());
65267
65586
 
65268
65587
  /*
65269
- * Application Insights JavaScript SDK - Properties Plugin, 2.6.3
65588
+ * Application Insights JavaScript SDK - Properties Plugin, 2.6.5
65270
65589
  * Copyright (c) Microsoft and contributors. All rights reserved.
65271
65590
  */
65272
65591
 
@@ -65278,7 +65597,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
65278
65597
  }());
65279
65598
 
65280
65599
  /*
65281
- * Application Insights JavaScript SDK - Properties Plugin, 2.6.3
65600
+ * Application Insights JavaScript SDK - Properties Plugin, 2.6.5
65282
65601
  * Copyright (c) Microsoft and contributors. All rights reserved.
65283
65602
  */
65284
65603
  var TelemetryTrace = /** @class */ (function () {
@@ -65297,7 +65616,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
65297
65616
  }());
65298
65617
 
65299
65618
  /*
65300
- * Application Insights JavaScript SDK - Properties Plugin, 2.6.3
65619
+ * Application Insights JavaScript SDK - Properties Plugin, 2.6.5
65301
65620
  * Copyright (c) Microsoft and contributors. All rights reserved.
65302
65621
  */
65303
65622
  var strExt = "ext";
@@ -65429,7 +65748,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
65429
65748
  }());
65430
65749
 
65431
65750
  /*
65432
- * Application Insights JavaScript SDK - Properties Plugin, 2.6.3
65751
+ * Application Insights JavaScript SDK - Properties Plugin, 2.6.5
65433
65752
  * Copyright (c) Microsoft and contributors. All rights reserved.
65434
65753
  */
65435
65754
  var PropertiesPlugin = /** @class */ (function (_super) {
@@ -65515,6 +65834,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
65515
65834
  isBrowserLinkTrackingEnabled: function () { return false; },
65516
65835
  appId: function () { return null; },
65517
65836
  namePrefix: function () { return undefined; },
65837
+ sessionCookiePostfix: function () { return undefined; },
65838
+ userCookiePostfix: function () { return undefined; },
65518
65839
  idLength: function () { return 22; },
65519
65840
  getNewId: function () { return null; }
65520
65841
  };
@@ -65526,7 +65847,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
65526
65847
  }(BaseTelemetryPlugin));
65527
65848
 
65528
65849
  /*
65529
- * Application Insights JavaScript SDK - Dependencies Plugin, 2.6.3
65850
+ * Application Insights JavaScript SDK - Dependencies Plugin, 2.6.5
65530
65851
  * Copyright (c) Microsoft and contributors. All rights reserved.
65531
65852
  */
65532
65853
  var strProperties$1 = "properties";
@@ -65783,7 +66104,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
65783
66104
  }());
65784
66105
 
65785
66106
  /*
65786
- * Application Insights JavaScript SDK - Dependencies Plugin, 2.6.3
66107
+ * Application Insights JavaScript SDK - Dependencies Plugin, 2.6.5
65787
66108
  * Copyright (c) Microsoft and contributors. All rights reserved.
65788
66109
  */
65789
66110
  var Traceparent = /** @class */ (function () {
@@ -65820,7 +66141,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
65820
66141
  }());
65821
66142
 
65822
66143
  /*
65823
- * Application Insights JavaScript SDK - Dependencies Plugin, 2.6.3
66144
+ * Application Insights JavaScript SDK - Dependencies Plugin, 2.6.5
65824
66145
  * Copyright (c) Microsoft and contributors. All rights reserved.
65825
66146
  */
65826
66147
  var AJAX_MONITOR_PREFIX = "ai.ajxmn.";
@@ -65938,6 +66259,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
65938
66259
  var _enableResponseHeaderTracking = false;
65939
66260
  var _hooks = [];
65940
66261
  var _disabledUrls = {};
66262
+ var _excludeRequestFromAutoTrackingPatterns;
65941
66263
  dynamicProto(AjaxMonitor, _this, function (_self, base) {
65942
66264
  _self.initialize = function (config, core, extensions, pluginChain) {
65943
66265
  if (!_self.isInitialized()) {
@@ -65952,6 +66274,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
65952
66274
  _enableAjaxPerfTracking = _config.enableAjaxPerfTracking;
65953
66275
  _maxAjaxCallsPerView = _config.maxAjaxCallsPerView;
65954
66276
  _enableResponseHeaderTracking = _config.enableResponseHeaderTracking;
66277
+ _excludeRequestFromAutoTrackingPatterns = _config.excludeRequestFromAutoTrackingPatterns;
65955
66278
  _isUsingAIHeaders = distributedTracingMode === DistributedTracingModes.AI || distributedTracingMode === DistributedTracingModes.AI_AND_W3C;
65956
66279
  _isUsingW3CHeaders = distributedTracingMode === DistributedTracingModes.AI_AND_W3C || distributedTracingMode === DistributedTracingModes.W3C;
65957
66280
  if (_enableAjaxPerfTracking) {
@@ -66197,7 +66520,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
66197
66520
  if (_isMonitoredXhrInstance(xhr) && !ajaxData.xhrMonitoringState.sendDone) {
66198
66521
  _createMarkId("xhr", ajaxData);
66199
66522
  ajaxData.requestSentTime = dateTimeUtilsNow();
66200
- xhr = _self.includeCorrelationHeaders(ajaxData, undefined, undefined, xhr);
66523
+ _self.includeCorrelationHeaders(ajaxData, undefined, undefined, xhr);
66201
66524
  ajaxData.xhrMonitoringState.sendDone = true;
66202
66525
  }
66203
66526
  },
@@ -66233,6 +66556,20 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
66233
66556
  function _isDisabledRequest(xhr, request, init) {
66234
66557
  var isDisabled = false;
66235
66558
  var theUrl = ((!isString(request) ? (request || {}).url || "" : request) || "").toLowerCase();
66559
+ // check excludeRequestFromAutoTrackingPatterns before stripping off any query string
66560
+ arrForEach(_excludeRequestFromAutoTrackingPatterns, function (regex) {
66561
+ var theRegex = regex;
66562
+ if (isString(regex)) {
66563
+ theRegex = new RegExp(regex);
66564
+ }
66565
+ if (!isDisabled) {
66566
+ isDisabled = theRegex.test(theUrl);
66567
+ }
66568
+ });
66569
+ // if request url matches with exclude regex pattern, return true and no need to check for headers
66570
+ if (isDisabled) {
66571
+ return isDisabled;
66572
+ }
66236
66573
  var idx = _indexOf(theUrl, "?");
66237
66574
  var idx2 = _indexOf(theUrl, "#");
66238
66575
  if (idx === -1 || (idx2 !== -1 && idx2 < idx)) {
@@ -66580,6 +66917,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
66580
66917
  maxAjaxCallsPerView: 500,
66581
66918
  disableAjaxTracking: false,
66582
66919
  disableFetchTracking: true,
66920
+ excludeRequestFromAutoTrackingPatterns: undefined,
66583
66921
  disableCorrelationHeaders: false,
66584
66922
  distributedTracingMode: DistributedTracingModes.AI_AND_W3C,
66585
66923
  correlationHeaderExcludedDomains: [
@@ -66626,7 +66964,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
66626
66964
  }(BaseTelemetryPlugin));
66627
66965
 
66628
66966
  /*
66629
- * Application Insights JavaScript SDK - Web, 2.6.3
66967
+ * Application Insights JavaScript SDK - Web, 2.6.5
66630
66968
  * Copyright (c) Microsoft and contributors. All rights reserved.
66631
66969
  */
66632
66970
  var _internalSdkSrc;
@@ -66978,16 +67316,18 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
66978
67316
  var added = addEventHandler('beforeunload', performHousekeeping);
66979
67317
  added = addEventHandler('unload', performHousekeeping) || added;
66980
67318
  added = addEventHandler('pagehide', performHousekeeping) || added;
67319
+ added = addEventHandler('visibilitychange', performHousekeeping) || added;
66981
67320
  // A reactNative app may not have a window and therefore the beforeunload/pagehide events -- so don't
66982
67321
  // log the failure in this case
66983
67322
  if (!added && !isReactNative()) {
66984
67323
  appInsightsInstance.appInsights.core.logger.throwInternal(LoggingSeverity.CRITICAL, _InternalMessageId.FailedToAddHandlerForOnBeforeUnload, 'Could not add handler for beforeunload and pagehide');
66985
67324
  }
66986
67325
  }
66987
- // We also need to hook the pagehide event as not all versions of Safari support load/unload events.
67326
+ // We also need to hook the pagehide and visibilitychange events as not all versions of Safari support load/unload events.
66988
67327
  if (!appInsightsInstance.appInsights.config.disableFlushOnUnload) {
66989
67328
  // Not adding any telemetry as pagehide as it's not supported on all browsers
66990
67329
  addEventHandler('pagehide', performHousekeeping);
67330
+ addEventHandler('visibilitychange', performHousekeeping);
66991
67331
  }
66992
67332
  }
66993
67333
  };
@@ -67023,6 +67363,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
67023
67363
  }
67024
67364
  }
67025
67365
  catch (e) {
67366
+ // eslint-disable-next-line no-empty
67026
67367
  }
67027
67368
  if (sdkSrc) {
67028
67369
  try {
@@ -67047,6 +67388,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
67047
67388
  }
67048
67389
  }
67049
67390
  catch (e) {
67391
+ // eslint-disable-next-line no-empty
67050
67392
  }
67051
67393
  }
67052
67394
  })();
@@ -67189,16 +67531,16 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
67189
67531
  }
67190
67532
  this.options.copyrightContent = newOptions.copyrightContent;
67191
67533
  }
67192
- if (!newOptions.showLogo && this.logoDiv) {
67534
+ if (!newOptions.showLogo && this.logoAnchor) {
67193
67535
  this.addRemoveLogo(false);
67194
67536
  }
67195
- else if (newOptions.showLogo && !this.logoDiv) {
67537
+ else if (newOptions.showLogo && !this.logoAnchor) {
67196
67538
  this.addRemoveLogo(true);
67197
67539
  }
67198
- if (!newOptions.showFeedbackLink && this.feedbackDiv) {
67540
+ if (!newOptions.showFeedbackLink && this.feedbackAnchor) {
67199
67541
  this.addRemoveFeedbackDiv(false);
67200
67542
  }
67201
- else if (newOptions.showFeedbackLink && !this.feedbackDiv) {
67543
+ else if (newOptions.showFeedbackLink && !this.feedbackAnchor) {
67202
67544
  this.addRemoveFeedbackDiv(true);
67203
67545
  }
67204
67546
  this.options = newOptions;
@@ -67217,56 +67559,45 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
67217
67559
  return copyright;
67218
67560
  };
67219
67561
  CopyrightControl.prototype.buildFeedbackLink = function () {
67220
- var _this = this;
67221
67562
  var link = document.createElement("a");
67563
+ link.setAttribute("alt", "Give Feedback");
67564
+ link.setAttribute("aria-label", "Give Feedback");
67222
67565
  link.href = "https://feedback.azuremaps.com";
67223
67566
  link.target = "_blank";
67224
67567
  link.rel = "noopener";
67225
67568
  link.className = "azure-map-feedback";
67226
- link.onmouseover = function () {
67227
- _this.tooltip.style.visibility = "visible";
67228
- };
67229
- link.onmouseout = function () {
67230
- _this.tooltip.style.visibility = "hidden";
67231
- };
67232
67569
  return link;
67233
67570
  };
67234
- CopyrightControl.prototype.addToolTip = function () {
67235
- var tooltip = document.createElement("div");
67236
- var tooltipText = document.createElement("div");
67237
- tooltipText.innerText = "Give Feedback";
67238
- tooltipText.className = "azure-map-feedback-tooltip";
67239
- var tooltipBeak = document.createElement("div");
67240
- tooltipBeak.className = "azure-map-feedback-tooltip-beak";
67241
- tooltip.appendChild(tooltipText);
67242
- tooltip.appendChild(tooltipBeak);
67243
- tooltip.style.visibility = "hidden";
67244
- tooltip.style.zIndex = "1000";
67245
- return tooltip;
67246
- };
67247
67571
  CopyrightControl.prototype.addRemoveFeedbackDiv = function (add) {
67248
67572
  if (add) {
67249
- this.feedbackDiv = this.buildFeedbackLink();
67250
- this.container.appendChild(this.feedbackDiv);
67251
- this.tooltip = this.addToolTip();
67573
+ this.feedbackAnchor = this.buildFeedbackLink();
67574
+ this.tooltip = buildAccessibleTooltip("Give Feedback");
67575
+ this.container.appendChild(this.feedbackAnchor);
67252
67576
  this.container.appendChild(this.tooltip);
67577
+ positionTooltip(this.tooltip, this.feedbackAnchor);
67253
67578
  }
67254
67579
  else {
67255
- this.feedbackDiv.remove();
67580
+ this.feedbackAnchor.remove();
67256
67581
  this.tooltip.remove();
67257
67582
  delete this.tooltip;
67258
- delete this.feedbackDiv;
67583
+ delete this.feedbackAnchor;
67259
67584
  }
67260
67585
  };
67261
67586
  CopyrightControl.prototype.addRemoveLogo = function (add) {
67262
67587
  if (add) {
67263
- this.logoDiv = document.createElement("div");
67264
- this.logoDiv.className = "azure-map-logo";
67265
- this.container.appendChild(this.logoDiv);
67588
+ this.logoAnchor = document.createElement("a");
67589
+ this.logoAnchor.className = "azure-map-logo";
67590
+ this.logoAnchor.href = "https://microsoft.com";
67591
+ this.logoAnchor.setAttribute("aria-label", "Microsoft");
67592
+ this.container.appendChild(this.logoAnchor);
67593
+ this.logoTooltip = buildAccessibleTooltip("Visit microsoft.com");
67594
+ this.container.appendChild(this.logoTooltip);
67595
+ positionTooltip(this.logoTooltip, this.logoAnchor);
67266
67596
  }
67267
67597
  else {
67268
- this.logoDiv.remove();
67269
- delete this.logoDiv;
67598
+ this.logoAnchor.remove();
67599
+ this.logoTooltip.remove();
67600
+ delete this.logoAnchor;
67270
67601
  }
67271
67602
  };
67272
67603
  return CopyrightControl;
@@ -68319,6 +68650,16 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
68319
68650
  if (this._getCanonicalZoom(this._lastCam.zoom) !== this._getCanonicalZoom(cam.zoom)) {
68320
68651
  msg.push("to " + this._getCanonicalZoom(cam.zoom) + " level");
68321
68652
  }
68653
+ // announce maximum zoom reached
68654
+ if (cam.zoom >= cam.maxZoom) {
68655
+ msg.push("Zoom In button disabled, maximum zoom level reached");
68656
+ }
68657
+ var reachedLatitudeBoundaries = BoundingBox.getSouth(cam.bounds) <= -WEBMERCATOR_MAXLAT
68658
+ && BoundingBox.getNorth(cam.bounds) >= WEBMERCATOR_MAXLAT;
68659
+ // annouce minimum zoom level reached
68660
+ if (cam.zoom <= cam.minZoom || reachedLatitudeBoundaries) {
68661
+ msg.push("Zoom Out button disabled, minimum zoom level reached");
68662
+ }
68322
68663
  // Add the complete message to the actions array.
68323
68664
  actions.push(msg.join(" "));
68324
68665
  }
@@ -68819,14 +69160,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
68819
69160
  var titleEl = document.createElement("div");
68820
69161
  titleEl.classList.add("incident-popup-title");
68821
69162
  titleEl.classList.add("font-segoeui-b");
68822
- titleEl.setAttribute("tabindex", "0");
68823
69163
  titleEl.innerText = incident.properties.incidentType;
68824
69164
  titleEl.setAttribute("aria-label", "Incident Type " + incident.properties.incidentType);
68825
69165
  var subtitleEl = document.createElement("div");
68826
69166
  subtitleEl.classList.add("incident-popup-subtitle");
68827
69167
  subtitleEl.classList.add("font-segoeui-b");
68828
69168
  subtitleEl.setAttribute("aria-label", "Incident Description " + incident.properties.description);
68829
- subtitleEl.setAttribute("tabindex", "0");
68830
69169
  subtitleEl.innerText = incident.properties.description;
68831
69170
  var headerEl = document.createElement("div");
68832
69171
  headerEl.classList.add("incident-popup-header");
@@ -68886,7 +69225,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
68886
69225
  messageEl.classList.add("message");
68887
69226
  messageEl.classList.add("font-segoeui");
68888
69227
  messageEl.setAttribute("aria-label", "Incident " + iconName + " " + message);
68889
- messageEl.setAttribute("tabindex", "0");
68890
69228
  messageEl.innerText = message;
68891
69229
  infoSectionEl.appendChild(iconEl);
68892
69230
  infoSectionEl.appendChild(messageEl);
@@ -69183,9 +69521,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
69183
69521
  if (_this.dpPoint) {
69184
69522
  _this.map._getMap().touchZoomRotate.enable();
69185
69523
  _this.map._getMap().dragPan.enable();
69186
- _this.map._getMap().touchZoomRotate.onStart(Date.now() - _this.startTiming >= _this.delay
69187
- ? data.originalEvent
69188
- : _this.startEventData.originalEvent);
69189
69524
  }
69190
69525
  _this.dpPoint = undefined;
69191
69526
  return;
@@ -72187,7 +72522,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
72187
72522
  this.minZoom !== undefined ? "minzoom=" + this.minZoom : '',
72188
72523
  this.maxZoom !== undefined ? "maxzoom=" + this.maxZoom : '',
72189
72524
  this.geometry !== undefined ? this.element.attributes.getNamedItem('data-azure-maps-attribution-geometry').value : '',
72190
- this.tilesetId !== undefined && this.dynamic ? "tilesetId=" + this.tilesetId : ''
72525
+ this.tilesetId !== undefined ? "tilesetId=" + this.tilesetId : '',
72526
+ this.dynamic ? "dynamic" : ''
72191
72527
  ].filter(function (comp) { return comp.length > 0; }).join(';');
72192
72528
  },
72193
72529
  enumerable: false,
@@ -72473,16 +72809,21 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
72473
72809
  this.loadAttributionOnceSourcesLoaded = function () {
72474
72810
  var sources = _this.getMapStyleSources();
72475
72811
  Promise.all(sources.map(function (source) { return new Promise(function (resolve, reject) {
72476
- source.on('data', function sourceDataListener(event) {
72477
- if (event.sourceDataType == 'metadata') {
72478
- source.off('data', sourceDataListener);
72479
- resolve(source);
72480
- }
72481
- });
72482
- source.on('error', function tilejsonLoadError(event) {
72483
- source.off('error', tilejsonLoadError);
72484
- reject(event);
72485
- });
72812
+ if ('tiles' in source) {
72813
+ resolve(source);
72814
+ }
72815
+ else {
72816
+ source.on('data', function sourceDataListener(event) {
72817
+ if (event.sourceDataType == 'metadata') {
72818
+ source.off('data', sourceDataListener);
72819
+ resolve(source);
72820
+ }
72821
+ });
72822
+ source.on('error', function tilejsonLoadError(event) {
72823
+ source.off('error', tilejsonLoadError);
72824
+ reject(event);
72825
+ });
72826
+ }
72486
72827
  })
72487
72828
  // mimics https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled
72488
72829
  // until wider availability (https://caniuse.com/?search=allSettled)
@@ -74916,6 +75257,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
74916
75257
  else if (this.options.authType === exports.AuthenticationType.subscriptionKey) {
74917
75258
  return this.options.subscriptionKey;
74918
75259
  }
75260
+ else {
75261
+ return undefined;
75262
+ }
74919
75263
  };
74920
75264
  /**
74921
75265
  * Given a token, calculate the time left for token expiry
@@ -75652,7 +75996,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
75652
75996
  */
75653
75997
  EventManager.prototype._invokeListeners = function (eventType, layer, args) {
75654
75998
  var _this = this;
75655
- var callbacks = this.mapCallbackHandler.getEventCallbacks(eventType, layer);
75999
+ // copy event callbacks in order to prevent being mutated during iteration below (even callbacks added as part of other event callbacks)
76000
+ var callbacks = new Dictionary(this.mapCallbackHandler.getEventCallbacks(eventType, layer));
75656
76001
  if (callbacks) {
75657
76002
  callbacks.forEach(function (_a, callback) {
75658
76003
  var _b = __read(_a, 2), _ = _b[0], once = _b[1];
@@ -75966,11 +76311,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
75966
76311
  var timedOut_1 = false;
75967
76312
  // Use the map to send the request so transformRequest is used.
75968
76313
  _this.map._sendRequest(imageSrc, "Image").then(function (response) {
75969
- if (!timedOut_1) {
75970
- return response.blob();
75971
- }
76314
+ return !timedOut_1 ? response.blob() : undefined;
75972
76315
  }).then(function (blob) {
75973
- if (!timedOut_1) {
76316
+ if (!timedOut_1 && blob) {
75974
76317
  clearTimeout(timeoutId_1);
75975
76318
  var imageEle_1 = new Image();
75976
76319
  // Wait for the blob to load into the element.
@@ -77731,35 +78074,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
77731
78074
  return StyleOptions;
77732
78075
  }(Options));
77733
78076
 
77734
- /**
77735
- * The options for setting traffic on the map.
77736
- */
77737
- var TrafficOptions = /** @class */ (function (_super) {
77738
- __extends(TrafficOptions, _super);
77739
- function TrafficOptions() {
77740
- var _this = _super !== null && _super.apply(this, arguments) || this;
77741
- /**
77742
- * The type of traffic flow to display:
77743
- * <p>"none" is to display no traffic flow data</p>
77744
- * <p>"relative" is the speed of the road relative to free-flow</p>
77745
- * <p>"absolute" is the absolute speed of the road</p>
77746
- * <p>"relative-delay" displays relative speed only where they differ from free-flow;
77747
- * false to stop displaying the traffic flow.</p>
77748
- * default `"none"``
77749
- * @default "none"
77750
- */
77751
- _this.flow = "none";
77752
- /**
77753
- * Whether to display incidents on the map.
77754
- * default `false`
77755
- * @default false
77756
- */
77757
- _this.incidents = false;
77758
- return _this;
77759
- }
77760
- return TrafficOptions;
77761
- }(Options));
77762
-
77763
78077
  var composeTransformers = function (transformers) { return transformers.length == 0
77764
78078
  ? undefined
77765
78079
  : transformers.slice(1).reduce(function (chained, transform) {
@@ -77881,6 +78195,23 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
77881
78195
  * By default, it is set to half the number of CPU cores (capped at 6).
77882
78196
  */
77883
78197
  _this.workerCount = getWorkerCount();
78198
+ /**
78199
+ * Controls the duration of the fade-in/fade-out animation for label collisions, in milliseconds.
78200
+ * This setting affects all symbol layers.
78201
+ * This setting does not affect the duration of runtime styling transitions or raster tile cross-fading.
78202
+ * @default 300
78203
+ */
78204
+ _this.fadeDuration = 300;
78205
+ /**
78206
+ * Defines a CSS font-family for locally overriding generation of glyphs in the
78207
+ * 'CJK Unified Ideographs', 'Hiragana', 'Katakana' and 'Hangul Syllables' ranges.
78208
+ * In these ranges, font settings from the map's style will be ignored,
78209
+ * except for font-weight keywords (light/regular/medium/bold). Set to false,
78210
+ * to enable font settings from the map's style for these glyph ranges.
78211
+ * The purpose of this option is to avoid bandwidth-intensive glyph server requests.
78212
+ * @default 'sans-serif'
78213
+ */
78214
+ _this.localIdeographFontFamily = 'sans-serif';
77884
78215
  return _this;
77885
78216
  }
77886
78217
  /**
@@ -78017,13 +78348,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
78017
78348
  var _a, _b;
78018
78349
  var layerId = (_b = (_a = layer) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : layer;
78019
78350
  if (!layerId.startsWith("microsoft.")) {
78020
- return;
78351
+ return undefined;
78021
78352
  }
78022
78353
  var idTokens = layerId.split('.');
78023
78354
  if (idTokens.length >= 4) {
78024
78355
  return idTokens[3];
78025
78356
  }
78026
- return;
78357
+ return undefined;
78027
78358
  };
78028
78359
  return LayerGroupComparator;
78029
78360
  }());
@@ -78144,6 +78475,22 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
78144
78475
  */
78145
78476
  StyleManager.prototype._stylePatch = function (previousStyle, nextStyle, preserveLayer, updatePaintProperty, updateLayoutProperty, updateFilter) {
78146
78477
  var _this = this;
78478
+ // Layers in the next style with default properties that do not align with current StyleOptions
78479
+ // should be modified before they are applied to the map.
78480
+ var styleOptions = this.map.getStyle();
78481
+ var trafficOptions = this.map.getTraffic();
78482
+ // force a replacement of language placeholder in the tileset url to avoid resolution to a same cache with placeholders on language change
78483
+ nextStyle.sources = Object.entries(nextStyle.sources).reduce(function (newSources, _a) {
78484
+ var _b = __read(_a, 2), sourceKey = _b[0], source = _b[1];
78485
+ var newSource = __assign({}, source);
78486
+ if ('url' in newSource && typeof newSource.url === 'string') {
78487
+ if (newSource.url.includes(constants.languagePlaceHolder)) {
78488
+ newSource.url = newSource.url.replace(constants.languagePlaceHolder, styleOptions.language);
78489
+ }
78490
+ }
78491
+ newSources[sourceKey] = newSource;
78492
+ return newSources;
78493
+ }, {});
78147
78494
  // A FundamentalMapLayer (grouped layer) representation of the next style must be built.
78148
78495
  var previousLayers = this.map.layers.getLayers();
78149
78496
  var nextLayers = [];
@@ -78154,10 +78501,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
78154
78501
  currentLayerGroupId = nextLayerGroup;
78155
78502
  currentLayerGroupLayers = [];
78156
78503
  };
78157
- // Layers in the next style with default properties that do not align with current StyleOptions
78158
- // should be modified before they are applied to the map.
78159
- var styleOptions = this.map.getStyle();
78160
- var trafficOptions = this.map.getTraffic();
78161
78504
  nextStyle.layers.forEach(function (nextLayer) {
78162
78505
  var _a, _b, _c;
78163
78506
  var layerGroup = LayerGroupComparator.getLayerGroup(nextLayer.id);
@@ -78423,6 +78766,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
78423
78766
  var mapboxMapOptions = {
78424
78767
  attributionControl: false,
78425
78768
  container: container,
78769
+ fadeDuration: _this.serviceOptions.fadeDuration,
78770
+ localIdeographFontFamily: _this.serviceOptions.localIdeographFontFamily,
78426
78771
  preserveDrawingBuffer: _this.styleOptions.preserveDrawingBuffer,
78427
78772
  refreshExpiredTiles: _this.serviceOptions.refreshExpiredTiles,
78428
78773
  renderWorldCopies: _this.styleOptions.renderWorldCopies,
@@ -79257,6 +79602,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
79257
79602
  var previousIncidentsOption = this.trafficOptions.incidents;
79258
79603
  var previousFlowOption = this.trafficOptions.flow;
79259
79604
  this.trafficOptions = new TrafficOptions().merge(this.trafficOptions, options);
79605
+ this.controls.getControls().filter(function (control) { return control instanceof TrafficControl; }).forEach(function (control) {
79606
+ return control.updateButtonState();
79607
+ });
79260
79608
  if (this.incidentDelegate) {
79261
79609
  if (this.trafficOptions.incidents) {
79262
79610
  if (!previousIncidentsOption) {