@geotrekce/geotrek-rando-widget 0.0.13 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/cjs/css-shim-1269258a.js +6 -0
  2. package/dist/cjs/{dom-d5e52c7e.js → dom-36862b77.js} +1 -1
  3. package/dist/cjs/geotrek-rando-widget.cjs.js +4 -4
  4. package/dist/cjs/grw-app.cjs.entry.js +5 -4
  5. package/dist/cjs/grw-filter_6.cjs.entry.js +489 -183
  6. package/dist/cjs/grw-information-desk-detail_3.cjs.entry.js +2 -2
  7. package/dist/cjs/grw-trek-card.cjs.entry.js +15 -7
  8. package/dist/cjs/{index-66d58516.js → index-e5425fef.js} +437 -266
  9. package/dist/cjs/loader.cjs.js +4 -4
  10. package/dist/cjs/{shadow-css-cf936b02.js → shadow-css-346c0795.js} +1 -1
  11. package/dist/cjs/{store-d301af22.js → store-a9172740.js} +4 -2
  12. package/dist/collection/collection-manifest.json +2 -2
  13. package/dist/collection/components/grw-app/grw-app.css +4 -0
  14. package/dist/collection/components/grw-app/grw-app.js +432 -450
  15. package/dist/collection/components/grw-filter/grw-filter.js +65 -61
  16. package/dist/collection/components/grw-information-desk-detail/grw-information-desk-detail.js +35 -44
  17. package/dist/collection/components/grw-map/grw-map.css +5 -4
  18. package/dist/collection/components/grw-map/grw-map.js +251 -217
  19. package/dist/collection/components/grw-poi-detail/grw-poi-detail.js +33 -32
  20. package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.js +42 -47
  21. package/dist/collection/components/grw-trek-card/grw-trek-card.js +142 -129
  22. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +135 -208
  23. package/dist/collection/components/grw-treks-list/grw-treks-list.js +95 -65
  24. package/dist/collection/store/grw-trek-provider.js +61 -55
  25. package/dist/collection/store/grw-treks-provider.js +181 -177
  26. package/dist/collection/store/store.js +3 -2
  27. package/dist/components/grw-app.js +4 -3
  28. package/dist/components/grw-map2.js +467 -176
  29. package/dist/components/grw-trek-card2.js +17 -7
  30. package/dist/components/grw-trek-detail2.js +10 -3
  31. package/dist/components/grw-trek-provider2.js +6 -2
  32. package/dist/components/grw-treks-list2.js +7 -2
  33. package/dist/components/grw-treks-provider2.js +5 -3
  34. package/dist/components/store.js +3 -2
  35. package/dist/esm/css-shim-88cc621b.js +4 -0
  36. package/dist/esm/{dom-9794f747.js → dom-665d6011.js} +1 -1
  37. package/dist/esm/geotrek-rando-widget.js +4 -4
  38. package/dist/esm/grw-app.entry.js +5 -4
  39. package/dist/esm/grw-filter_6.entry.js +489 -183
  40. package/dist/esm/grw-information-desk-detail_3.entry.js +2 -2
  41. package/dist/esm/grw-trek-card.entry.js +15 -7
  42. package/dist/esm/{index-899307bb.js → index-185d186f.js} +437 -266
  43. package/dist/esm/loader.js +4 -4
  44. package/dist/esm/polyfills/css-shim.js +1 -1
  45. package/dist/esm/{shadow-css-4cd4480f.js → shadow-css-b18e99d7.js} +1 -1
  46. package/dist/esm/{store-70461a28.js → store-38e90440.js} +4 -3
  47. package/dist/esm-es5/css-shim-88cc621b.js +1 -0
  48. package/dist/esm-es5/{dom-9794f747.js → dom-665d6011.js} +0 -0
  49. package/dist/esm-es5/geotrek-rando-widget.js +1 -1
  50. package/dist/esm-es5/grw-app.entry.js +1 -1
  51. package/dist/esm-es5/grw-filter_6.entry.js +3 -3
  52. package/dist/esm-es5/grw-information-desk-detail_3.entry.js +1 -1
  53. package/dist/esm-es5/grw-trek-card.entry.js +1 -1
  54. package/dist/esm-es5/index-185d186f.js +2 -0
  55. package/dist/esm-es5/loader.js +1 -1
  56. package/dist/esm-es5/{shadow-css-4cd4480f.js → shadow-css-b18e99d7.js} +0 -0
  57. package/dist/esm-es5/{store-70461a28.js → store-38e90440.js} +1 -1
  58. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
  59. package/dist/geotrek-rando-widget/geotrek-rando-widget.js +2 -2
  60. package/dist/geotrek-rando-widget/p-144c62f8.system.entry.js +1 -0
  61. package/dist/geotrek-rando-widget/p-23a696ea.system.entry.js +6 -0
  62. package/dist/geotrek-rando-widget/p-412fe797.system.js +1 -0
  63. package/dist/geotrek-rando-widget/p-4b12d113.js +1 -0
  64. package/dist/geotrek-rando-widget/p-54bf2ec8.js +2 -0
  65. package/dist/geotrek-rando-widget/{p-d1582cff.js → p-62b28500.js} +0 -0
  66. package/dist/geotrek-rando-widget/{p-2bd0278f.system.entry.js → p-6484dee6.system.entry.js} +1 -1
  67. package/dist/geotrek-rando-widget/{p-c8c96517.system.js → p-6a050b2c.system.js} +0 -0
  68. package/dist/geotrek-rando-widget/{p-b1530d9c.system.js → p-88092d06.system.js} +0 -0
  69. package/dist/geotrek-rando-widget/{p-533fc2bb.entry.js → p-911224bd.entry.js} +1 -1
  70. package/dist/geotrek-rando-widget/p-b44ba765.entry.js +1 -0
  71. package/dist/geotrek-rando-widget/p-bd5f732d.entry.js +1 -0
  72. package/dist/geotrek-rando-widget/p-d2dd6057.js +1 -0
  73. package/dist/geotrek-rando-widget/p-d6fffac2.entry.js +1 -0
  74. package/dist/geotrek-rando-widget/p-dd8d9020.system.js +2 -0
  75. package/dist/geotrek-rando-widget/p-e2652fee.system.js +1 -0
  76. package/dist/geotrek-rando-widget/p-e763374d.system.entry.js +1 -0
  77. package/dist/geotrek-rando-widget/{p-4eaf20b7.js → p-f26ed61d.js} +0 -0
  78. package/dist/geotrek-rando-widget/{p-82ca029f.system.js → p-f7cc8285.system.js} +1 -1
  79. package/dist/types/components/grw-map/grw-map.d.ts +3 -1
  80. package/dist/types/components/grw-trek-card/grw-trek-card.d.ts +4 -1
  81. package/dist/types/components/grw-trek-detail/grw-trek-detail.d.ts +3 -1
  82. package/dist/types/components/grw-treks-list/grw-treks-list.d.ts +1 -0
  83. package/dist/types/components.d.ts +8 -0
  84. package/dist/types/stencil-public-runtime.d.ts +15 -4
  85. package/dist/types/store/store.d.ts +5 -3
  86. package/dist/types/types/types.d.ts +6 -0
  87. package/loader/package.json +1 -0
  88. package/package.json +12 -12
  89. package/readme.md +4 -6
  90. package/dist/cjs/css-shim-6f592941.js +0 -6
  91. package/dist/esm/css-shim-2d0a698c.js +0 -4
  92. package/dist/esm-es5/css-shim-2d0a698c.js +0 -1
  93. package/dist/esm-es5/index-899307bb.js +0 -2
  94. package/dist/geotrek-rando-widget/p-067c02c4.system.js +0 -1
  95. package/dist/geotrek-rando-widget/p-0c5b047c.js +0 -1
  96. package/dist/geotrek-rando-widget/p-18038011.js +0 -1
  97. package/dist/geotrek-rando-widget/p-2712caa8.system.entry.js +0 -6
  98. package/dist/geotrek-rando-widget/p-32d97a4f.system.js +0 -1
  99. package/dist/geotrek-rando-widget/p-3ed52659.entry.js +0 -1
  100. package/dist/geotrek-rando-widget/p-4690907e.js +0 -2
  101. package/dist/geotrek-rando-widget/p-48d5dde7.entry.js +0 -1
  102. package/dist/geotrek-rando-widget/p-8f9914f4.system.js +0 -2
  103. package/dist/geotrek-rando-widget/p-e1431f36.system.entry.js +0 -1
  104. package/dist/geotrek-rando-widget/p-e38f4ff4.system.entry.js +0 -1
  105. package/dist/geotrek-rando-widget/p-f5d98aae.entry.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { s as state, o as onChange } from './store.js';
2
+ import { s as state, o as onChange, r as reset } from './store.js';
3
3
 
4
4
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
5
5
 
@@ -19,14 +19,14 @@ function commonjsRequire () {
19
19
 
20
20
  var leafletSrc = createCommonjsModule(function (module, exports) {
21
21
  /* @preserve
22
- * Leaflet 1.8.0, a JS library for interactive maps. https://leafletjs.com
22
+ * Leaflet 1.9.2, a JS library for interactive maps. https://leafletjs.com
23
23
  * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade
24
24
  */
25
25
 
26
26
  (function (global, factory) {
27
27
  factory(exports) ;
28
28
  })(commonjsGlobal, (function (exports) {
29
- var version = "1.8.0";
29
+ var version = "1.9.2";
30
30
 
31
31
  /*
32
32
  * @namespace Util
@@ -522,35 +522,30 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
522
522
  },
523
523
 
524
524
  // attach listener (without syntactic sugar now)
525
- _on: function (type, fn, context) {
525
+ _on: function (type, fn, context, _once) {
526
526
  if (typeof fn !== 'function') {
527
527
  console.warn('wrong listener type: ' + typeof fn);
528
528
  return;
529
529
  }
530
- this._events = this._events || {};
531
530
 
532
- /* get/init listeners for type */
533
- var typeListeners = this._events[type];
534
- if (!typeListeners) {
535
- typeListeners = [];
536
- this._events[type] = typeListeners;
531
+ // check if fn already there
532
+ if (this._listens(type, fn, context) !== false) {
533
+ return;
537
534
  }
538
535
 
539
536
  if (context === this) {
540
537
  // Less memory footprint.
541
538
  context = undefined;
542
539
  }
543
- var newListener = {fn: fn, ctx: context},
544
- listeners = typeListeners;
545
540
 
546
- // check if fn already there
547
- for (var i = 0, len = listeners.length; i < len; i++) {
548
- if (listeners[i].fn === fn && listeners[i].ctx === context) {
549
- return;
550
- }
541
+ var newListener = {fn: fn, ctx: context};
542
+ if (_once) {
543
+ newListener.once = true;
551
544
  }
552
545
 
553
- listeners.push(newListener);
546
+ this._events = this._events || {};
547
+ this._events[type] = this._events[type] || [];
548
+ this._events[type].push(newListener);
554
549
  },
555
550
 
556
551
  _off: function (type, fn, context) {
@@ -558,10 +553,11 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
558
553
  i,
559
554
  len;
560
555
 
561
- if (!this._events) { return; }
556
+ if (!this._events) {
557
+ return;
558
+ }
562
559
 
563
560
  listeners = this._events[type];
564
-
565
561
  if (!listeners) {
566
562
  return;
567
563
  }
@@ -579,32 +575,24 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
579
575
  return;
580
576
  }
581
577
 
582
- if (context === this) {
583
- context = undefined;
584
- }
585
-
586
578
  if (typeof fn !== 'function') {
587
579
  console.warn('wrong listener type: ' + typeof fn);
588
580
  return;
589
581
  }
582
+
590
583
  // find fn and remove it
591
- for (i = 0, len = listeners.length; i < len; i++) {
592
- var l = listeners[i];
593
- if (l.ctx !== context) { continue; }
594
- if (l.fn === fn) {
595
- if (this._firingCount) {
596
- // set the removed listener to noop so that's not called if remove happens in fire
597
- l.fn = falseFn;
598
-
599
- /* copy array in case events are being fired */
600
- this._events[type] = listeners = listeners.slice();
601
- }
602
- listeners.splice(i, 1);
584
+ var index = this._listens(type, fn, context);
585
+ if (index !== false) {
586
+ var listener = listeners[index];
587
+ if (this._firingCount) {
588
+ // set the removed listener to noop so that's not called if remove happens in fire
589
+ listener.fn = falseFn;
603
590
 
604
- return;
591
+ /* copy array in case events are being fired */
592
+ this._events[type] = listeners = listeners.slice();
605
593
  }
594
+ listeners.splice(index, 1);
606
595
  }
607
- console.warn('listener not found');
608
596
  },
609
597
 
610
598
  // @method fire(type: String, data?: Object, propagate?: Boolean): this
@@ -622,12 +610,16 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
622
610
 
623
611
  if (this._events) {
624
612
  var listeners = this._events[type];
625
-
626
613
  if (listeners) {
627
614
  this._firingCount = (this._firingCount + 1) || 1;
628
615
  for (var i = 0, len = listeners.length; i < len; i++) {
629
616
  var l = listeners[i];
630
- l.fn.call(l.ctx || this, event);
617
+ // off overwrites l.fn, so we need to copy fn to a var
618
+ var fn = l.fn;
619
+ if (l.once) {
620
+ this.off(type, fn, l.ctx);
621
+ }
622
+ fn.call(l.ctx || this, event);
631
623
  }
632
624
 
633
625
  this._firingCount--;
@@ -643,45 +635,85 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
643
635
  },
644
636
 
645
637
  // @method listens(type: String, propagate?: Boolean): Boolean
638
+ // @method listens(type: String, fn: Function, context?: Object, propagate?: Boolean): Boolean
646
639
  // Returns `true` if a particular event type has any listeners attached to it.
647
640
  // The verification can optionally be propagated, it will return `true` if parents have the listener attached to it.
648
- listens: function (type, propagate) {
641
+ listens: function (type, fn, context, propagate) {
649
642
  if (typeof type !== 'string') {
650
643
  console.warn('"string" type argument expected');
651
644
  }
645
+
646
+ // we don't overwrite the input `fn` value, because we need to use it for propagation
647
+ var _fn = fn;
648
+ if (typeof fn !== 'function') {
649
+ propagate = !!fn;
650
+ _fn = undefined;
651
+ context = undefined;
652
+ }
653
+
652
654
  var listeners = this._events && this._events[type];
653
- if (listeners && listeners.length) { return true; }
655
+ if (listeners && listeners.length) {
656
+ if (this._listens(type, _fn, context) !== false) {
657
+ return true;
658
+ }
659
+ }
654
660
 
655
661
  if (propagate) {
656
662
  // also check parents for listeners if event propagates
657
663
  for (var id in this._eventParents) {
658
- if (this._eventParents[id].listens(type, propagate)) { return true; }
664
+ if (this._eventParents[id].listens(type, fn, context, propagate)) { return true; }
665
+ }
666
+ }
667
+ return false;
668
+ },
669
+
670
+ // returns the index (number) or false
671
+ _listens: function (type, fn, context) {
672
+ if (!this._events) {
673
+ return false;
674
+ }
675
+
676
+ var listeners = this._events[type] || [];
677
+ if (!fn) {
678
+ return !!listeners.length;
679
+ }
680
+
681
+ if (context === this) {
682
+ // Less memory footprint.
683
+ context = undefined;
684
+ }
685
+
686
+ for (var i = 0, len = listeners.length; i < len; i++) {
687
+ if (listeners[i].fn === fn && listeners[i].ctx === context) {
688
+ return i;
659
689
  }
660
690
  }
661
691
  return false;
692
+
662
693
  },
663
694
 
664
695
  // @method once(…): this
665
696
  // Behaves as [`on(…)`](#evented-on), except the listener will only get fired once and then removed.
666
697
  once: function (types, fn, context) {
667
698
 
699
+ // types can be a map of types/handlers
668
700
  if (typeof types === 'object') {
669
701
  for (var type in types) {
670
- this.once(type, types[type], fn);
702
+ // we don't process space-separated events here for performance;
703
+ // it's a hot path since Layer uses the on(obj) syntax
704
+ this._on(type, types[type], fn, true);
671
705
  }
672
- return this;
673
- }
674
706
 
675
- var handler = bind(function () {
676
- this
677
- .off(types, fn, context)
678
- .off(types, handler, context);
679
- }, this);
707
+ } else {
708
+ // types can be a string of space-separated words
709
+ types = splitWords(types);
710
+
711
+ for (var i = 0, len = types.length; i < len; i++) {
712
+ this._on(types[i], fn, context, true);
713
+ }
714
+ }
680
715
 
681
- // add a listener that's executed once and removed after that
682
- return this
683
- .on(types, fn, context)
684
- .on(types, handler, context);
716
+ return this;
685
717
  },
686
718
 
687
719
  // @method addEventParent(obj: Evented): this
@@ -997,21 +1029,36 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
997
1029
  Bounds.prototype = {
998
1030
  // @method extend(point: Point): this
999
1031
  // Extends the bounds to contain the given point.
1000
- extend: function (point) { // (Point)
1001
- point = toPoint(point);
1032
+
1033
+ // @alternative
1034
+ // @method extend(otherBounds: Bounds): this
1035
+ // Extend the bounds to contain the given bounds
1036
+ extend: function (obj) {
1037
+ var min2, max2;
1038
+ if (!obj) { return this; }
1039
+
1040
+ if (obj instanceof Point || typeof obj[0] === 'number' || 'x' in obj) {
1041
+ min2 = max2 = toPoint(obj);
1042
+ } else {
1043
+ obj = toBounds(obj);
1044
+ min2 = obj.min;
1045
+ max2 = obj.max;
1046
+
1047
+ if (!min2 || !max2) { return this; }
1048
+ }
1002
1049
 
1003
1050
  // @property min: Point
1004
1051
  // The top left corner of the rectangle.
1005
1052
  // @property max: Point
1006
1053
  // The bottom right corner of the rectangle.
1007
1054
  if (!this.min && !this.max) {
1008
- this.min = point.clone();
1009
- this.max = point.clone();
1055
+ this.min = min2.clone();
1056
+ this.max = max2.clone();
1010
1057
  } else {
1011
- this.min.x = Math.min(point.x, this.min.x);
1012
- this.max.x = Math.max(point.x, this.max.x);
1013
- this.min.y = Math.min(point.y, this.min.y);
1014
- this.max.y = Math.max(point.y, this.max.y);
1058
+ this.min.x = Math.min(min2.x, this.min.x);
1059
+ this.max.x = Math.max(max2.x, this.max.x);
1060
+ this.min.y = Math.min(min2.y, this.min.y);
1061
+ this.max.y = Math.max(max2.y, this.max.y);
1015
1062
  }
1016
1063
  return this;
1017
1064
  },
@@ -1019,7 +1066,7 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
1019
1066
  // @method getCenter(round?: Boolean): Point
1020
1067
  // Returns the center point of the bounds.
1021
1068
  getCenter: function (round) {
1022
- return new Point(
1069
+ return toPoint(
1023
1070
  (this.min.x + this.max.x) / 2,
1024
1071
  (this.min.y + this.max.y) / 2, round);
1025
1072
  },
@@ -1027,13 +1074,13 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
1027
1074
  // @method getBottomLeft(): Point
1028
1075
  // Returns the bottom-left point of the bounds.
1029
1076
  getBottomLeft: function () {
1030
- return new Point(this.min.x, this.max.y);
1077
+ return toPoint(this.min.x, this.max.y);
1031
1078
  },
1032
1079
 
1033
1080
  // @method getTopRight(): Point
1034
1081
  // Returns the top-right point of the bounds.
1035
1082
  getTopRight: function () { // -> Point
1036
- return new Point(this.max.x, this.min.y);
1083
+ return toPoint(this.max.x, this.min.y);
1037
1084
  },
1038
1085
 
1039
1086
  // @method getTopLeft(): Point
@@ -1113,9 +1160,40 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
1113
1160
  return xOverlaps && yOverlaps;
1114
1161
  },
1115
1162
 
1163
+ // @method isValid(): Boolean
1164
+ // Returns `true` if the bounds are properly initialized.
1116
1165
  isValid: function () {
1117
1166
  return !!(this.min && this.max);
1118
- }
1167
+ },
1168
+
1169
+
1170
+ // @method pad(bufferRatio: Number): Bounds
1171
+ // Returns bounds created by extending or retracting the current bounds by a given ratio in each direction.
1172
+ // For example, a ratio of 0.5 extends the bounds by 50% in each direction.
1173
+ // Negative values will retract the bounds.
1174
+ pad: function (bufferRatio) {
1175
+ var min = this.min,
1176
+ max = this.max,
1177
+ heightBuffer = Math.abs(min.x - max.x) * bufferRatio,
1178
+ widthBuffer = Math.abs(min.y - max.y) * bufferRatio;
1179
+
1180
+
1181
+ return toBounds(
1182
+ toPoint(min.x - heightBuffer, min.y - widthBuffer),
1183
+ toPoint(max.x + heightBuffer, max.y + widthBuffer));
1184
+ },
1185
+
1186
+
1187
+ // @method equals(otherBounds: Bounds): Boolean
1188
+ // Returns `true` if the rectangle is equivalent to the given bounds.
1189
+ equals: function (bounds) {
1190
+ if (!bounds) { return false; }
1191
+
1192
+ bounds = toBounds(bounds);
1193
+
1194
+ return this.min.equals(bounds.getTopLeft()) &&
1195
+ this.max.equals(bounds.getBottomRight());
1196
+ },
1119
1197
  };
1120
1198
 
1121
1199
 
@@ -2023,6 +2101,13 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
2023
2101
  }
2024
2102
  }());
2025
2103
 
2104
+
2105
+ // @property mac: Boolean; `true` when the browser is running in a Mac platform
2106
+ var mac = navigator.platform.indexOf('Mac') === 0;
2107
+
2108
+ // @property mac: Boolean; `true` when the browser is running in a Linux platform
2109
+ var linux = navigator.platform.indexOf('Linux') === 0;
2110
+
2026
2111
  function userAgentContains(str) {
2027
2112
  return navigator.userAgent.toLowerCase().indexOf(str) >= 0;
2028
2113
  }
@@ -2061,7 +2146,9 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
2061
2146
  canvas: canvas$1,
2062
2147
  svg: svg$1,
2063
2148
  vml: vml,
2064
- inlineSvg: inlineSvg
2149
+ inlineSvg: inlineSvg,
2150
+ mac: mac,
2151
+ linux: linux
2065
2152
  };
2066
2153
 
2067
2154
  /*
@@ -2204,6 +2291,25 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
2204
2291
  return;
2205
2292
  }
2206
2293
 
2294
+ // When clicking on an <input>, the browser generates a click on its
2295
+ // <label> (and vice versa) triggering two clicks in quick succession.
2296
+ // This ignores clicks on elements which are a label with a 'for'
2297
+ // attribute (or children of such a label), but not children of
2298
+ // a <input>.
2299
+ var path = getPropagationPath(e);
2300
+ if (path.some(function (el) {
2301
+ return el instanceof HTMLLabelElement && el.attributes.for;
2302
+ }) &&
2303
+ !path.some(function (el) {
2304
+ return (
2305
+ el instanceof HTMLInputElement ||
2306
+ el instanceof HTMLSelectElement
2307
+ );
2308
+ })
2309
+ ) {
2310
+ return;
2311
+ }
2312
+
2207
2313
  var now = Date.now();
2208
2314
  if (now - last <= delay) {
2209
2315
  detail++;
@@ -2825,6 +2931,26 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
2825
2931
  return this;
2826
2932
  }
2827
2933
 
2934
+ // @function getPropagationPath(ev: DOMEvent): Array
2935
+ // Compatibility polyfill for [`Event.composedPath()`](https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath).
2936
+ // Returns an array containing the `HTMLElement`s that the given DOM event
2937
+ // should propagate to (if not stopped).
2938
+ function getPropagationPath(ev) {
2939
+ if (ev.composedPath) {
2940
+ return ev.composedPath();
2941
+ }
2942
+
2943
+ var path = [];
2944
+ var el = ev.target;
2945
+
2946
+ while (el) {
2947
+ path.push(el);
2948
+ el = el.parentNode;
2949
+ }
2950
+ return path;
2951
+ }
2952
+
2953
+
2828
2954
  // @function getMousePosition(ev: DOMEvent, container?: HTMLElement): Point
2829
2955
  // Gets normalized mouse position from a DOM event relative to the
2830
2956
  // `container` (border excluded) or to the whole page if not specified.
@@ -2844,12 +2970,15 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
2844
2970
  );
2845
2971
  }
2846
2972
 
2847
- // Chrome on Win scrolls double the pixels as in other platforms (see #4538),
2848
- // and Firefox scrolls device pixels, not CSS pixels
2849
- var wheelPxFactor =
2850
- (Browser.win && Browser.chrome) ? 2 * window.devicePixelRatio :
2851
- Browser.gecko ? window.devicePixelRatio : 1;
2852
2973
 
2974
+ // except , Safari and
2975
+ // We need double the scroll pixels (see #7403 and #4538) for all Browsers
2976
+ // except OSX (Mac) -> 3x, Chrome running on Linux 1x
2977
+
2978
+ var wheelPxFactor =
2979
+ (Browser.linux && Browser.chrome) ? window.devicePixelRatio :
2980
+ Browser.mac ? window.devicePixelRatio * 3 :
2981
+ window.devicePixelRatio > 0 ? 2 * window.devicePixelRatio : 1;
2853
2982
  // @function getWheelDelta(ev: DOMEvent): Number
2854
2983
  // Gets normalized wheel delta from a wheel DOM event, in vertical
2855
2984
  // pixels scrolled (negative if scrolling down).
@@ -2893,6 +3022,7 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
2893
3022
  disableClickPropagation: disableClickPropagation,
2894
3023
  preventDefault: preventDefault,
2895
3024
  stop: stop,
3025
+ getPropagationPath: getPropagationPath,
2896
3026
  getMousePosition: getMousePosition,
2897
3027
  getWheelDelta: getWheelDelta,
2898
3028
  isExternalTarget: isExternalTarget,
@@ -2908,8 +3038,21 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
2908
3038
  *
2909
3039
  * @example
2910
3040
  * ```js
2911
- * var fx = new L.PosAnimation();
2912
- * fx.run(el, [300, 500], 0.5);
3041
+ * var myPositionMarker = L.marker([48.864716, 2.294694]).addTo(map);
3042
+ *
3043
+ * myPositionMarker.on("click", function() {
3044
+ * var pos = map.latLngToLayerPoint(myPositionMarker.getLatLng());
3045
+ * pos.y -= 25;
3046
+ * var fx = new L.PosAnimation();
3047
+ *
3048
+ * fx.once('end',function() {
3049
+ * pos.y += 25;
3050
+ * fx.run(myPositionMarker._icon, pos, 0.8);
3051
+ * });
3052
+ *
3053
+ * fx.run(myPositionMarker._icon, pos, 0.3);
3054
+ * });
3055
+ *
2913
3056
  * ```
2914
3057
  *
2915
3058
  * @constructor L.PosAnimation()
@@ -3189,7 +3332,7 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
3189
3332
  }
3190
3333
 
3191
3334
  // animation didn't start, just reset the map view
3192
- this._resetView(center, zoom);
3335
+ this._resetView(center, zoom, options.pan && options.pan.noMoveStart);
3193
3336
 
3194
3337
  return this;
3195
3338
  },
@@ -3432,11 +3575,13 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
3432
3575
  setMaxBounds: function (bounds) {
3433
3576
  bounds = toLatLngBounds(bounds);
3434
3577
 
3578
+ if (this.listens('moveend', this._panInsideMaxBounds)) {
3579
+ this.off('moveend', this._panInsideMaxBounds);
3580
+ }
3581
+
3435
3582
  if (!bounds.isValid()) {
3436
3583
  this.options.maxBounds = null;
3437
- return this.off('moveend', this._panInsideMaxBounds);
3438
- } else if (this.options.maxBounds) {
3439
- this.off('moveend', this._panInsideMaxBounds);
3584
+ return this;
3440
3585
  }
3441
3586
 
3442
3587
  this.options.maxBounds = bounds;
@@ -3806,7 +3951,7 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
3806
3951
  this._checkIfLoaded();
3807
3952
 
3808
3953
  if (this._lastCenter && !this._moved()) {
3809
- return this._lastCenter;
3954
+ return this._lastCenter.clone();
3810
3955
  }
3811
3956
  return this.layerPointToLatLng(this._getCenterLayerPoint());
3812
3957
  },
@@ -4155,7 +4300,7 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
4155
4300
  // private methods that modify map state
4156
4301
 
4157
4302
  // @section Map state change events
4158
- _resetView: function (center, zoom) {
4303
+ _resetView: function (center, zoom, noMoveStart) {
4159
4304
  setPosition(this._mapPane, new Point(0, 0));
4160
4305
 
4161
4306
  var loading = !this._loaded;
@@ -4166,7 +4311,7 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
4166
4311
 
4167
4312
  var zoomChanged = this._zoom !== zoom;
4168
4313
  this
4169
- ._moveStart(zoomChanged, false)
4314
+ ._moveStart(zoomChanged, noMoveStart)
4170
4315
  ._move(center, zoom)
4171
4316
  ._moveEnd(zoomChanged);
4172
4317
 
@@ -4363,7 +4508,7 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
4363
4508
  },
4364
4509
 
4365
4510
  _isClickDisabled: function (el) {
4366
- while (el !== this._container) {
4511
+ while (el && el !== this._container) {
4367
4512
  if (el['_leaflet_disable_click']) { return true; }
4368
4513
  el = el.parentNode;
4369
4514
  }
@@ -5589,7 +5734,7 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
5589
5734
  return new Scale(options);
5590
5735
  };
5591
5736
 
5592
- var ukrainianFlag = '<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>';
5737
+ var ukrainianFlag = '<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>';
5593
5738
 
5594
5739
 
5595
5740
  /*
@@ -5658,7 +5803,7 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
5658
5803
  },
5659
5804
 
5660
5805
  // @method addAttribution(text: String): this
5661
- // Adds an attribution text (e.g. `'Vector data &copy; Mapbox'`).
5806
+ // Adds an attribution text (e.g. `'&copy; OpenStreetMap contributors'`).
5662
5807
  addAttribution: function (text) {
5663
5808
  if (!text) { return this; }
5664
5809
 
@@ -6248,6 +6393,55 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
6248
6393
  function _flat(latlngs) {
6249
6394
  console.warn('Deprecated use of _flat, please use L.LineUtil.isFlat instead.');
6250
6395
  return isFlat(latlngs);
6396
+ }
6397
+
6398
+ /* @function polylineCenter(latlngs: LatLng[], crs: CRS): LatLng
6399
+ * Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the passed LatLngs (first ring) from a polyline.
6400
+ */
6401
+ function polylineCenter(latlngs, crs) {
6402
+ var i, halfDist, segDist, dist, p1, p2, ratio, center;
6403
+
6404
+ if (!latlngs || latlngs.length === 0) {
6405
+ throw new Error('latlngs not passed');
6406
+ }
6407
+
6408
+ if (!isFlat(latlngs)) {
6409
+ console.warn('latlngs are not flat! Only the first ring will be used');
6410
+ latlngs = latlngs[0];
6411
+ }
6412
+
6413
+ var points = [];
6414
+ for (var j in latlngs) {
6415
+ points.push(crs.project(toLatLng(latlngs[j])));
6416
+ }
6417
+
6418
+ var len = points.length;
6419
+
6420
+ for (i = 0, halfDist = 0; i < len - 1; i++) {
6421
+ halfDist += points[i].distanceTo(points[i + 1]) / 2;
6422
+ }
6423
+
6424
+ // The line is so small in the current view that all points are on the same pixel.
6425
+ if (halfDist === 0) {
6426
+ center = points[0];
6427
+ } else {
6428
+ for (i = 0, dist = 0; i < len - 1; i++) {
6429
+ p1 = points[i];
6430
+ p2 = points[i + 1];
6431
+ segDist = p1.distanceTo(p2);
6432
+ dist += segDist;
6433
+
6434
+ if (dist > halfDist) {
6435
+ ratio = (dist - halfDist) / segDist;
6436
+ center = [
6437
+ p2.x - ratio * (p2.x - p1.x),
6438
+ p2.y - ratio * (p2.y - p1.y)
6439
+ ];
6440
+ break;
6441
+ }
6442
+ }
6443
+ }
6444
+ return crs.unproject(toPoint(center));
6251
6445
  }
6252
6446
 
6253
6447
  var LineUtil = {
@@ -6260,7 +6454,8 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
6260
6454
  _getBitCode: _getBitCode,
6261
6455
  _sqClosestPointOnSegment: _sqClosestPointOnSegment,
6262
6456
  isFlat: isFlat,
6263
- _flat: _flat
6457
+ _flat: _flat,
6458
+ polylineCenter: polylineCenter
6264
6459
  };
6265
6460
 
6266
6461
  /*
@@ -6315,11 +6510,55 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
6315
6510
  }
6316
6511
 
6317
6512
  return points;
6513
+ }
6514
+
6515
+ /* @function polygonCenter(latlngs: LatLng[] crs: CRS): LatLng
6516
+ * Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the passed LatLngs (first ring) from a polygon.
6517
+ */
6518
+ function polygonCenter(latlngs, crs) {
6519
+ var i, j, p1, p2, f, area, x, y, center;
6520
+
6521
+ if (!latlngs || latlngs.length === 0) {
6522
+ throw new Error('latlngs not passed');
6523
+ }
6524
+
6525
+ if (!isFlat(latlngs)) {
6526
+ console.warn('latlngs are not flat! Only the first ring will be used');
6527
+ latlngs = latlngs[0];
6528
+ }
6529
+
6530
+ var points = [];
6531
+ for (var k in latlngs) {
6532
+ points.push(crs.project(toLatLng(latlngs[k])));
6533
+ }
6534
+
6535
+ var len = points.length;
6536
+ area = x = y = 0;
6537
+
6538
+ // polygon centroid algorithm;
6539
+ for (i = 0, j = len - 1; i < len; j = i++) {
6540
+ p1 = points[i];
6541
+ p2 = points[j];
6542
+
6543
+ f = p1.y * p2.x - p2.y * p1.x;
6544
+ x += (p1.x + p2.x) * f;
6545
+ y += (p1.y + p2.y) * f;
6546
+ area += f * 3;
6547
+ }
6548
+
6549
+ if (area === 0) {
6550
+ // Polygon is so small that all points are on same pixel.
6551
+ center = points[0];
6552
+ } else {
6553
+ center = [x / area, y / area];
6554
+ }
6555
+ return crs.unproject(toPoint(center));
6318
6556
  }
6319
6557
 
6320
6558
  var PolyUtil = {
6321
6559
  __proto__: null,
6322
- clipPolygon: clipPolygon
6560
+ clipPolygon: clipPolygon,
6561
+ polygonCenter: polygonCenter
6323
6562
  };
6324
6563
 
6325
6564
  /*
@@ -8278,38 +8517,7 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
8278
8517
  if (!this._map) {
8279
8518
  throw new Error('Must add layer to map before using getCenter()');
8280
8519
  }
8281
-
8282
- var i, halfDist, segDist, dist, p1, p2, ratio,
8283
- points = this._rings[0],
8284
- len = points.length;
8285
-
8286
- if (!len) { return null; }
8287
-
8288
- // polyline centroid algorithm; only uses the first ring if there are multiple
8289
-
8290
- for (i = 0, halfDist = 0; i < len - 1; i++) {
8291
- halfDist += points[i].distanceTo(points[i + 1]) / 2;
8292
- }
8293
-
8294
- // The line is so small in the current view that all points are on the same pixel.
8295
- if (halfDist === 0) {
8296
- return this._map.layerPointToLatLng(points[0]);
8297
- }
8298
-
8299
- for (i = 0, dist = 0; i < len - 1; i++) {
8300
- p1 = points[i];
8301
- p2 = points[i + 1];
8302
- segDist = p1.distanceTo(p2);
8303
- dist += segDist;
8304
-
8305
- if (dist > halfDist) {
8306
- ratio = (dist - halfDist) / segDist;
8307
- return this._map.layerPointToLatLng([
8308
- p2.x - ratio * (p2.x - p1.x),
8309
- p2.y - ratio * (p2.y - p1.y)
8310
- ]);
8311
- }
8312
- }
8520
+ return polylineCenter(this._defaultShape(), this._map.options.crs);
8313
8521
  },
8314
8522
 
8315
8523
  // @method getBounds(): LatLngBounds
@@ -8551,39 +8759,14 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
8551
8759
  return !this._latlngs.length || !this._latlngs[0].length;
8552
8760
  },
8553
8761
 
8762
+ // @method getCenter(): LatLng
8763
+ // Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the Polygon.
8554
8764
  getCenter: function () {
8555
8765
  // throws error when not yet added to map as this center calculation requires projected coordinates
8556
8766
  if (!this._map) {
8557
8767
  throw new Error('Must add layer to map before using getCenter()');
8558
8768
  }
8559
-
8560
- var i, j, p1, p2, f, area, x, y, center,
8561
- points = this._rings[0],
8562
- len = points.length;
8563
-
8564
- if (!len) { return null; }
8565
-
8566
- // polygon centroid algorithm; only uses the first ring if there are multiple
8567
-
8568
- area = x = y = 0;
8569
-
8570
- for (i = 0, j = len - 1; i < len; j = i++) {
8571
- p1 = points[i];
8572
- p2 = points[j];
8573
-
8574
- f = p1.y * p2.x - p2.y * p1.x;
8575
- x += (p1.x + p2.x) * f;
8576
- y += (p1.y + p2.y) * f;
8577
- area += f * 3;
8578
- }
8579
-
8580
- if (area === 0) {
8581
- // Polygon is so small that all points are on same pixel.
8582
- center = points[0];
8583
- } else {
8584
- center = [x / area, y / area];
8585
- }
8586
- return this._map.layerPointToLatLng(center);
8769
+ return polygonCenter(this._defaultShape(), this._map.options.crs);
8587
8770
  },
8588
8771
 
8589
8772
  _convertLatLngs: function (latlngs) {
@@ -8868,14 +9051,24 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
8868
9051
 
8869
9052
  case 'GeometryCollection':
8870
9053
  for (i = 0, len = geometry.geometries.length; i < len; i++) {
8871
- var layer = geometryToLayer({
9054
+ var geoLayer = geometryToLayer({
8872
9055
  geometry: geometry.geometries[i],
8873
9056
  type: 'Feature',
8874
9057
  properties: geojson.properties
8875
9058
  }, options);
8876
9059
 
8877
- if (layer) {
8878
- layers.push(layer);
9060
+ if (geoLayer) {
9061
+ layers.push(geoLayer);
9062
+ }
9063
+ }
9064
+ return new FeatureGroup(layers);
9065
+
9066
+ case 'FeatureCollection':
9067
+ for (i = 0, len = geometry.features.length; i < len; i++) {
9068
+ var featureLayer = geometryToLayer(geometry.features[i], options);
9069
+
9070
+ if (featureLayer) {
9071
+ layers.push(featureLayer);
8879
9072
  }
8880
9073
  }
8881
9074
  return new FeatureGroup(layers);
@@ -8934,8 +9127,9 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
8934
9127
  var coords = [];
8935
9128
 
8936
9129
  for (var i = 0, len = latlngs.length; i < len; i++) {
9130
+ // Check for flat arrays required to ensure unbalanced arrays are correctly converted in recursion
8937
9131
  coords.push(levelsDeep ?
8938
- latLngsToCoords(latlngs[i], levelsDeep - 1, closed, precision) :
9132
+ latLngsToCoords(latlngs[i], isFlat(latlngs[i]) ? 0 : levelsDeep - 1, closed, precision) :
8939
9133
  latLngToCoords(latlngs[i], precision));
8940
9134
  }
8941
9135
 
@@ -9544,13 +9738,25 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
9544
9738
 
9545
9739
  // @option pane: String = undefined
9546
9740
  // `Map pane` where the overlay will be added.
9547
- pane: undefined
9741
+ pane: undefined,
9742
+
9743
+ // @option content: String|HTMLElement|Function = ''
9744
+ // Sets the HTML content of the overlay while initializing. If a function is passed the source layer will be
9745
+ // passed to the function. The function should return a `String` or `HTMLElement` to be used in the overlay.
9746
+ content: ''
9548
9747
  },
9549
9748
 
9550
9749
  initialize: function (options, source) {
9551
- setOptions(this, options);
9552
-
9553
- this._source = source;
9750
+ if (options && (options instanceof L.LatLng || isArray(options))) {
9751
+ this._latlng = toLatLng(options);
9752
+ setOptions(this, source);
9753
+ } else {
9754
+ setOptions(this, options);
9755
+ this._source = source;
9756
+ }
9757
+ if (this.options.content) {
9758
+ this._content = this.options.content;
9759
+ }
9554
9760
  },
9555
9761
 
9556
9762
  // @method openOn(map: Map): this
@@ -9862,7 +10068,8 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
9862
10068
  * marker.bindPopup(popupContent).openPopup();
9863
10069
  * ```
9864
10070
  * Path overlays like polylines also have a `bindPopup` method.
9865
- * Here's a more complicated way to open a popup on a map:
10071
+ *
10072
+ * A popup can be also standalone:
9866
10073
  *
9867
10074
  * ```js
9868
10075
  * var popup = L.popup()
@@ -9870,6 +10077,11 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
9870
10077
  * .setContent('<p>Hello world!<br />This is a nice popup.</p>')
9871
10078
  * .openOn(map);
9872
10079
  * ```
10080
+ * or
10081
+ * ```js
10082
+ * var popup = L.popup(latlng, {content: '<p>Hello world!<br />This is a nice popup.</p>')
10083
+ * .openOn(map);
10084
+ * ```
9873
10085
  */
9874
10086
 
9875
10087
 
@@ -9898,6 +10110,8 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
9898
10110
  // @option maxHeight: Number = null
9899
10111
  // If set, creates a scrollable container of the given height
9900
10112
  // inside a popup if its content exceeds it.
10113
+ // The scrollable container can be styled using the
10114
+ // `leaflet-popup-scrolled` CSS class selector.
9901
10115
  maxHeight: null,
9902
10116
 
9903
10117
  // @option autoPan: Boolean = true
@@ -10043,7 +10257,10 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
10043
10257
  closeButton.href = '#close';
10044
10258
  closeButton.innerHTML = '<span aria-hidden="true">&#215;</span>';
10045
10259
 
10046
- on(closeButton, 'click', this.close, this);
10260
+ on(closeButton, 'click', function (ev) {
10261
+ preventDefault(ev);
10262
+ this.close();
10263
+ }, this);
10047
10264
  }
10048
10265
  },
10049
10266
 
@@ -10137,6 +10354,9 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
10137
10354
  // @namespace Popup
10138
10355
  // @factory L.popup(options?: Popup options, source?: Layer)
10139
10356
  // Instantiates a `Popup` object given an optional `options` object that describes its appearance and location and an optional `source` object that is used to tag the popup with a reference to the Layer to which it refers.
10357
+ // @alternative
10358
+ // @factory L.popup(latlng: LatLng, options?: Popup options)
10359
+ // Instantiates a `Popup` object given `latlng` where the popup will open and an optional `options` object that describes its appearance and location.
10140
10360
  var popup = function (options, source) {
10141
10361
  return new Popup(options, source);
10142
10362
  };
@@ -10234,7 +10454,8 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
10234
10454
  // @method openPopup(latlng?: LatLng): this
10235
10455
  // Opens the bound popup at the specified `latlng` or at the default popup anchor if no `latlng` is passed.
10236
10456
  openPopup: function (latlng) {
10237
- if (this._popup && this._popup._prepareOpen(latlng)) {
10457
+ if (this._popup && this._popup._prepareOpen(latlng || this._latlng)) {
10458
+
10238
10459
  // open the popup on the map
10239
10460
  this._popup.openOn(this._map);
10240
10461
  }
@@ -10320,10 +10541,28 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
10320
10541
  * Used to display small texts on top of map layers.
10321
10542
  *
10322
10543
  * @example
10544
+ * If you want to just bind a tooltip to marker:
10323
10545
  *
10324
10546
  * ```js
10325
10547
  * marker.bindTooltip("my tooltip text").openTooltip();
10326
10548
  * ```
10549
+ * Path overlays like polylines also have a `bindTooltip` method.
10550
+ *
10551
+ * A tooltip can be also standalone:
10552
+ *
10553
+ * ```js
10554
+ * var tooltip = L.tooltip()
10555
+ * .setLatLng(latlng)
10556
+ * .setContent('Hello world!<br />This is a nice tooltip.')
10557
+ * .addTo(map);
10558
+ * ```
10559
+ * or
10560
+ * ```js
10561
+ * var tooltip = L.tooltip(latlng, {content: 'Hello world!<br />This is a nice tooltip.'})
10562
+ * .addTo(map);
10563
+ * ```
10564
+ *
10565
+ *
10327
10566
  * Note about tooltip offset. Leaflet takes two options in consideration
10328
10567
  * for computing tooltip offsetting:
10329
10568
  * - the `offset` Tooltip option: it defaults to [0, 0], and it's specific to one tooltip.
@@ -10424,6 +10663,9 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
10424
10663
  className = prefix + ' ' + (this.options.className || '') + ' leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide');
10425
10664
 
10426
10665
  this._contentNode = this._container = create$1('div', className);
10666
+
10667
+ this._container.setAttribute('role', 'tooltip');
10668
+ this._container.setAttribute('id', 'leaflet-tooltip-' + stamp(this));
10427
10669
  },
10428
10670
 
10429
10671
  _updateLayout: function () {},
@@ -10504,7 +10746,10 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
10504
10746
 
10505
10747
  // @namespace Tooltip
10506
10748
  // @factory L.tooltip(options?: Tooltip options, source?: Layer)
10507
- // Instantiates a Tooltip object given an optional `options` object that describes its appearance and location and an optional `source` object that is used to tag the tooltip with a reference to the Layer to which it refers.
10749
+ // Instantiates a `Tooltip` object given an optional `options` object that describes its appearance and location and an optional `source` object that is used to tag the tooltip with a reference to the Layer to which it refers.
10750
+ // @alternative
10751
+ // @factory L.tooltip(latlng: LatLng, options?: Tooltip options)
10752
+ // Instantiates a `Tooltip` object given `latlng` where the tooltip will open and an optional `options` object that describes its appearance and location.
10508
10753
  var tooltip = function (options, source) {
10509
10754
  return new Tooltip(options, source);
10510
10755
  };
@@ -10592,6 +10837,11 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
10592
10837
  events.mouseover = this._openTooltip;
10593
10838
  events.mouseout = this.closeTooltip;
10594
10839
  events.click = this._openTooltip;
10840
+ if (this._map) {
10841
+ this._addFocusListeners();
10842
+ } else {
10843
+ events.add = this._addFocusListeners;
10844
+ }
10595
10845
  } else {
10596
10846
  events.add = this._openTooltip;
10597
10847
  }
@@ -10608,6 +10858,12 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
10608
10858
  if (this._tooltip && this._tooltip._prepareOpen(latlng)) {
10609
10859
  // open the tooltip on the map
10610
10860
  this._tooltip.openOn(this._map);
10861
+
10862
+ if (this.getElement) {
10863
+ this._setAriaDescribedByOnLayer(this);
10864
+ } else if (this.eachLayer) {
10865
+ this.eachLayer(this._setAriaDescribedByOnLayer, this);
10866
+ }
10611
10867
  }
10612
10868
  return this;
10613
10869
  },
@@ -10650,6 +10906,33 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
10650
10906
  return this._tooltip;
10651
10907
  },
10652
10908
 
10909
+ _addFocusListeners: function () {
10910
+ if (this.getElement) {
10911
+ this._addFocusListenersOnLayer(this);
10912
+ } else if (this.eachLayer) {
10913
+ this.eachLayer(this._addFocusListenersOnLayer, this);
10914
+ }
10915
+ },
10916
+
10917
+ _addFocusListenersOnLayer: function (layer) {
10918
+ var el = layer.getElement();
10919
+ if (el) {
10920
+ on(el, 'focus', function () {
10921
+ this._tooltip._source = layer;
10922
+ this.openTooltip();
10923
+ }, this);
10924
+ on(el, 'blur', this.closeTooltip, this);
10925
+ }
10926
+ },
10927
+
10928
+ _setAriaDescribedByOnLayer: function (layer) {
10929
+ var el = layer.getElement();
10930
+ if (el) {
10931
+ el.setAttribute('aria-describedby', this._tooltip._container.id);
10932
+ }
10933
+ },
10934
+
10935
+
10653
10936
  _openTooltip: function (e) {
10654
10937
  if (!this._tooltip || !this._map || (this._map.dragging && this._map.dragging.moving())) {
10655
10938
  return;
@@ -11665,7 +11948,7 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
11665
11948
  * @example
11666
11949
  *
11667
11950
  * ```js
11668
- * L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png?{foo}', {foo: 'bar', attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(map);
11951
+ * L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png?{foo}', {foo: 'bar', attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(map);
11669
11952
  * ```
11670
11953
  *
11671
11954
  * @section URL template
@@ -11752,13 +12035,19 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
11752
12035
 
11753
12036
  if (!options.zoomReverse) {
11754
12037
  options.zoomOffset++;
11755
- options.maxZoom--;
12038
+ options.maxZoom = Math.max(options.minZoom, options.maxZoom - 1);
11756
12039
  } else {
11757
12040
  options.zoomOffset--;
11758
- options.minZoom++;
12041
+ options.minZoom = Math.min(options.maxZoom, options.minZoom + 1);
11759
12042
  }
11760
12043
 
11761
12044
  options.minZoom = Math.max(0, options.minZoom);
12045
+ } else if (!options.zoomReverse) {
12046
+ // make sure maxZoom is gte minZoom
12047
+ options.maxZoom = Math.max(options.minZoom, options.maxZoom);
12048
+ } else {
12049
+ // make sure minZoom is lte maxZoom
12050
+ options.minZoom = Math.min(options.maxZoom, options.minZoom);
11762
12051
  }
11763
12052
 
11764
12053
  if (typeof options.subdomains === 'string') {
@@ -11805,18 +12094,12 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
11805
12094
  tile.referrerPolicy = this.options.referrerPolicy;
11806
12095
  }
11807
12096
 
11808
- /*
11809
- Alt tag is set to empty string to keep screen readers from reading URL and for compliance reasons
11810
- https://www.w3.org/TR/WCAG20-TECHS/H67
11811
- */
12097
+ // The alt attribute is set to the empty string,
12098
+ // allowing screen readers to ignore the decorative image tiles.
12099
+ // https://www.w3.org/WAI/tutorials/images/decorative/
12100
+ // https://www.w3.org/TR/html-aria/#el-img-empty-alt
11812
12101
  tile.alt = '';
11813
12102
 
11814
- /*
11815
- Set role="presentation" to force screen readers to ignore this
11816
- https://www.w3.org/TR/wai-aria/roles#textalternativecomputation
11817
- */
11818
- tile.setAttribute('role', 'presentation');
11819
-
11820
12103
  tile.src = this.getTileUrl(coords);
11821
12104
 
11822
12105
  return tile;
@@ -14009,7 +14292,7 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
14009
14292
 
14010
14293
  cancelAnimFrame(this._animRequest);
14011
14294
 
14012
- var moveFn = bind(map._move, map, this._center, this._zoom, {pinch: true, round: false});
14295
+ var moveFn = bind(map._move, map, this._center, this._zoom, {pinch: true, round: false}, undefined);
14013
14296
  this._animRequest = requestAnimFrame(moveFn, this, true);
14014
14297
 
14015
14298
  preventDefault(e);
@@ -14142,7 +14425,7 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
14142
14425
 
14143
14426
  const departureArrivalImage = `<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><path d="M80,464V68.14a8,8,0,0,1,4-6.9C91.81,56.66,112.92,48,160,48c64,0,145,48,192,48a199.53,199.53,0,0,0,77.23-15.77A2,2,0,0,1,432,82.08V301.44a4,4,0,0,1-2.39,3.65C421.37,308.7,392.33,320,352,320c-48,0-128-32-192-32s-80,16-80,16" style=";fill:#ffffff;stroke:currentColor;stroke-linecap:round;stroke-miterlimit:10;stroke-width:32px"/></svg>`;
14144
14427
 
14145
- const grwMapCss = ".leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none !important;max-height:none !important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none !important;max-height:none !important;width:auto;padding:0}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51, 181, 229, 0.4)}.leaflet-tile{-webkit-filter:inherit;filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity 0.2s linear;-moz-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform 0.25s cubic-bezier(0,0,0.25,1);-moz-transition:-moz-transform 0.25s cubic-bezier(0,0,0.25,1);transition:-webkit-transform 0.25s cubic-bezier(0,0,0.25,1);transition:transform 0.25s cubic-bezier(0,0,0.25,1);transition:transform 0.25s cubic-bezier(0,0,0.25,1), -webkit-transform 0.25s cubic-bezier(0,0,0.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078A8}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,0.5)}.leaflet-container{font-family:\"Helvetica Neue\", Arial, Helvetica, sans-serif;font-size:12px;font-size:0.75rem;line-height:1.5}.leaflet-bar{-webkit-box-shadow:0 1px 5px rgba(0,0,0,0.65);box-shadow:0 1px 5px rgba(0,0,0,0.65);border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:black}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:bold 18px 'Lucida Console', Monaco, monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{-webkit-box-shadow:0 1px 5px rgba(0,0,0,0.4);box-shadow:0 1px 5px rgba(0,0,0,0.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(images/layers.png);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(images/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(images/marker-icon.png)}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255, 255, 255, 0.8);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-control-attribution svg{display:inline !important}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;overflow:hidden;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;background:#fff;background:rgba(255, 255, 255, 0.5)}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{-webkit-box-shadow:none;box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,0.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:17px 0;margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:white;color:#333;-webkit-box-shadow:0 3px 14px rgba(0,0,0,0.4);box-shadow:0 3px 14px rgba(0,0,0,0.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma, Verdana, sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto;border-bottom:1px solid #ddd;border-top:1px solid #ddd}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.4);box-shadow:0 1px 3px rgba(0,0,0,0.4)}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:\"\"}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;color-adjust:exact}}grw-map{font-family:\"Roboto\";display:block;height:100%;max-height:100vh}.departure-icon svg,.arrival-icon svg{width:48px;height:48px}.departure-icon svg path,.arrival-icon svg path{fill:currentColor;stroke:currentColor}.departure-icon{color:var(--color-departure-icon)}.arrival-icon{color:var(--color-arrival-icon)}.trek-marker{background-color:var(--color-primary);border-radius:50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.trek-marker img{width:36px !important}.map-loader-container{position:absolute;z-index:500;width:100%;height:100%;background:rgba(255, 255, 255, 0.5);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.map-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-tint);border-bottom-color:var(--color-primary);border-radius:50%;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-animation:rotation 1s linear infinite;animation:rotation 1s linear infinite}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.leaflet-popup-content{width:144px;margin:0}.trek-departure-popup{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100px;height:auto;padding:24px}.trek-departure-popup img{border-radius:8px;-webkit-box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25);box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25)}.trek-departure-popup .trek-name{color:var(--color-primary);font-weight:bold;font-size:12px}.trek-departure-popup .trek-name-margin-top{margin-top:12px}.poi-tooltip .poi-name,.poi-tooltip .information-desks-name,.poi-tooltip .sensitive-area-name,.information-desks-tooltip .poi-name,.information-desks-tooltip .information-desks-name,.information-desks-tooltip .sensitive-area-name,.sensitive-area-tooltip .poi-name,.sensitive-area-tooltip .information-desks-name,.sensitive-area-tooltip .sensitive-area-name{color:var(--color-primary);font-weight:bold;font-size:12px}.sensitiveAreasCheckboxContainer{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;background-color:#ffffff;padding:8px;border-radius:8px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.sensitiveAreasCheckboxContainer input,.sensitiveAreasCheckboxContainer label{cursor:pointer}.sensitiveAreasCheckboxContainer input{margin:0}.sensitiveAreasCheckboxContainer label{padding-left:8px}.poi-icon,.information-desks-icon{background-color:var(--color-poi-icon);border-radius:50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.poi-icon img,.information-desks-icon img{width:36px !important}.parking-icon{background-color:#0000ff;border-radius:50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:48px;height:48px;font-size:24px;color:#ffffff}.point-reference-icon{background-color:#ff0000;border:1px solid #ffffff;border-radius:50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:24px;height:24px;font-size:18px;color:#ffffff}";
14428
+ const grwMapCss = ".leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none !important;max-height:none !important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none !important;max-height:none !important;width:auto;padding:0}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51, 181, 229, 0.4)}.leaflet-tile{-webkit-filter:inherit;filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity 0.2s linear;-moz-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform 0.25s cubic-bezier(0,0,0.25,1);-moz-transition:-moz-transform 0.25s cubic-bezier(0,0,0.25,1);transition:-webkit-transform 0.25s cubic-bezier(0,0,0.25,1);transition:transform 0.25s cubic-bezier(0,0,0.25,1);transition:transform 0.25s cubic-bezier(0,0,0.25,1), -webkit-transform 0.25s cubic-bezier(0,0,0.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078A8}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,0.5)}.leaflet-container{font-family:\"Helvetica Neue\", Arial, Helvetica, sans-serif;font-size:12px;font-size:0.75rem;line-height:1.5}.leaflet-bar{-webkit-box-shadow:0 1px 5px rgba(0,0,0,0.65);box-shadow:0 1px 5px rgba(0,0,0,0.65);border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:black}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:bold 18px 'Lucida Console', Monaco, monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{-webkit-box-shadow:0 1px 5px rgba(0,0,0,0.4);box-shadow:0 1px 5px rgba(0,0,0,0.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(images/layers.png);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(images/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(images/marker-icon.png)}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255, 255, 255, 0.8);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline !important;vertical-align:baseline !important;width:1em;height:0.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;overflow:hidden;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;background:#fff;background:rgba(255, 255, 255, 0.5)}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{-webkit-box-shadow:none;box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,0.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:17px 0;margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:white;color:#333;-webkit-box-shadow:0 3px 14px rgba(0,0,0,0.4);box-shadow:0 3px 14px rgba(0,0,0,0.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma, Verdana, sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.4);box-shadow:0 1px 3px rgba(0,0,0,0.4)}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:\"\"}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}grw-map{font-family:\"Roboto\";display:block;height:100%;max-height:100vh}.departure-icon svg,.arrival-icon svg{width:48px;height:48px}.departure-icon svg path,.arrival-icon svg path{fill:currentColor;stroke:currentColor}.departure-icon{color:var(--color-departure-icon)}.arrival-icon{color:var(--color-arrival-icon)}.trek-marker{background-color:var(--color-primary);border-radius:50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.trek-marker img{width:36px !important}.map-loader-container{position:absolute;z-index:500;width:100%;height:100%;background:rgba(255, 255, 255, 0.5);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.map-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-tint);border-bottom-color:var(--color-primary);border-radius:50%;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-animation:rotation 1s linear infinite;animation:rotation 1s linear infinite}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.leaflet-popup-content{width:144px;margin:0}.trek-departure-popup{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100px;height:auto;padding:24px}.trek-departure-popup img{border-radius:8px;-webkit-box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25);box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25)}.trek-departure-popup .trek-name{color:var(--color-primary);font-weight:bold;font-size:12px}.trek-departure-popup .trek-name-margin-top{margin-top:12px}.poi-tooltip .poi-name,.poi-tooltip .information-desks-name,.poi-tooltip .sensitive-area-name,.information-desks-tooltip .poi-name,.information-desks-tooltip .information-desks-name,.information-desks-tooltip .sensitive-area-name,.sensitive-area-tooltip .poi-name,.sensitive-area-tooltip .information-desks-name,.sensitive-area-tooltip .sensitive-area-name{color:var(--color-primary);font-weight:bold;font-size:12px}.sensitiveAreasCheckboxContainer{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;background-color:#ffffff;padding:8px;border-radius:8px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.sensitiveAreasCheckboxContainer input,.sensitiveAreasCheckboxContainer label{cursor:pointer}.sensitiveAreasCheckboxContainer input{margin:0}.sensitiveAreasCheckboxContainer label{padding-left:8px}.poi-icon,.information-desks-icon{background-color:var(--color-poi-icon);border-radius:50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.poi-icon img,.information-desks-icon img{width:36px !important}.parking-icon{background-color:#0000ff;border-radius:50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:48px;height:48px;font-size:24px;color:#ffffff}.point-reference-icon{background-color:#ff0000;border:1px solid #ffffff;border-radius:50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:24px;height:24px;font-size:18px;color:#ffffff}";
14146
14429
 
14147
14430
  const GrwMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
14148
14431
  constructor() {
@@ -14159,9 +14442,10 @@ const GrwMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
14159
14442
  this.colorArrivalIcon = '#85003b';
14160
14443
  this.colorSensitiveArea = ' #4974a5';
14161
14444
  this.colorPoiIcon = '#974c6e';
14445
+ this.resetStoreOnDisconnected = true;
14162
14446
  this.handleTreksWithinBoundsBind = this.handleTreksWithinBounds.bind(this);
14163
14447
  }
14164
- connectedCallback() {
14448
+ componentDidLoad() {
14165
14449
  this.map = leafletSrc.map(this.element, {
14166
14450
  center: this.center.split(',').map(Number),
14167
14451
  zoom: this.zoom,
@@ -14282,7 +14566,8 @@ const GrwMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
14282
14566
  }
14283
14567
  }
14284
14568
  handleTreksWithinBounds() {
14285
- if (!state.currentMapTreksBounds || state.currentMapTreksBounds.toBBoxString() !== this.map.getBounds().toBBoxString()) {
14569
+ if ((state.currentTreks && !state.currentMapTreksBounds) ||
14570
+ (state.currentTreks && state.currentMapTreksBounds && state.currentMapTreksBounds.toBBoxString() !== this.map.getBounds().toBBoxString())) {
14286
14571
  state.treksWithinBounds = state.currentTreks.filter(trek => this.map.getBounds().contains(leafletSrc.latLng(trek.departure_geom[1], trek.departure_geom[0])));
14287
14572
  }
14288
14573
  }
@@ -14530,6 +14815,11 @@ const GrwMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
14530
14815
  this.currentPointsReferenceLayer = null;
14531
14816
  }
14532
14817
  }
14818
+ disconnectedCallback() {
14819
+ if (this.resetStoreOnDisconnected) {
14820
+ reset();
14821
+ }
14822
+ }
14533
14823
  render() {
14534
14824
  return (h(Host, { style: {
14535
14825
  '--color-primary': this.colorPrimary,
@@ -14553,6 +14843,7 @@ const GrwMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
14553
14843
  "colorArrivalIcon": [1, "color-arrival-icon"],
14554
14844
  "colorSensitiveArea": [1, "color-sensitive-area"],
14555
14845
  "colorPoiIcon": [1, "color-poi-icon"],
14846
+ "resetStoreOnDisconnected": [4, "reset-store-on-disconnected"],
14556
14847
  "mapIsReady": [32]
14557
14848
  }]);
14558
14849
  function defineCustomElement() {