@opengeoweb/store 9.25.2 → 9.26.0

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/index.esm.js CHANGED
@@ -1,16 +1,16 @@
1
- import { webmapUtils, LayerType, getWMJSMapById, WMLayer, webmapTestSettings, isProjectionSupported, handleDateUtilsISOString, getCapabilities, getWMSRequests } from '@opengeoweb/webmap';
1
+ import { webmapUtils, LayerType, getWMJSMapById, WMLayer, webmapTestSettings, handleDateUtilsISOString, getCapabilities, getWMSRequests, isProjectionSupported } from '@opengeoweb/webmap';
2
2
  import { createAction, createSlice, createSelector, createEntityAdapter, createListenerMiddleware, isAnyOf } from '@reduxjs/toolkit';
3
3
  import { getGeoJson, moveFeature, createInterSections, getLastEmptyFeatureIndex, defaultLayers, emptyGeoJSON, addSelectionTypeToGeoJSON, getFeatureCollection, defaultIntersectionStyleProperties } from '@opengeoweb/webmap-react';
4
4
  export { defaultLayers } from '@opengeoweb/webmap-react';
5
- import { dateUtils, defaultDelay, withEggs } from '@opengeoweb/shared';
5
+ import { dateUtils, PROJECTION, defaultDelay, withEggs } from '@opengeoweb/shared';
6
6
  import { defaultTimeSpan, defaultTimeStep, defaultAnimationDelayAtStart, defaultSecondsPerPx, roundWithTimeStep, getSpeedDelay } from '@opengeoweb/timeslider';
7
7
  import { produce } from 'immer';
8
8
  import { isEqual, compact } from 'lodash';
9
9
  import { useSelector, useDispatch, Provider } from 'react-redux';
10
10
  import { useCallback, useEffect } from 'react';
11
- import { createStore as createStore$1 } from '@redux-eggs/redux-toolkit';
11
+ import { createStore } from '@redux-eggs/redux-toolkit';
12
12
  import { getSagaExtension } from '@redux-eggs/saga-extension';
13
- import { takeEvery, call as call$e, put, select, delay, all, takeLatest } from 'redux-saga/effects';
13
+ import { takeEvery, select, put, all, call as call$e, takeLatest } from 'redux-saga/effects';
14
14
  import { metronome } from '@opengeoweb/metronome';
15
15
  import { jsx } from 'react/jsx-runtime';
16
16
 
@@ -21,7 +21,7 @@ var check = function (it) {
21
21
  };
22
22
 
23
23
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
24
- var global$h =
24
+ var global$g =
25
25
  // eslint-disable-next-line es/no-global-this -- safe
26
26
  check(typeof globalThis == 'object' && globalThis) ||
27
27
  check(typeof window == 'object' && window) ||
@@ -34,7 +34,7 @@ var global$h =
34
34
 
35
35
  var objectGetOwnPropertyDescriptor = {};
36
36
 
37
- var fails$n = function (exec) {
37
+ var fails$m = function (exec) {
38
38
  try {
39
39
  return !!exec();
40
40
  } catch (error) {
@@ -42,17 +42,17 @@ var fails$n = function (exec) {
42
42
  }
43
43
  };
44
44
 
45
- var fails$m = fails$n;
45
+ var fails$l = fails$m;
46
46
 
47
47
  // Detect IE8's incomplete defineProperty implementation
48
- var descriptors = !fails$m(function () {
48
+ var descriptors = !fails$l(function () {
49
49
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
50
50
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
51
51
  });
52
52
 
53
- var fails$l = fails$n;
53
+ var fails$k = fails$m;
54
54
 
55
- var functionBindNative = !fails$l(function () {
55
+ var functionBindNative = !fails$k(function () {
56
56
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
57
57
  var test = (function () { /* empty */ }).bind();
58
58
  // eslint-disable-next-line no-prototype-builtins -- safe
@@ -104,24 +104,24 @@ var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
104
104
  };
105
105
  };
106
106
 
107
- var uncurryThis$l = functionUncurryThis;
107
+ var uncurryThis$j = functionUncurryThis;
108
108
 
109
- var toString$b = uncurryThis$l({}.toString);
110
- var stringSlice$4 = uncurryThis$l(''.slice);
109
+ var toString$9 = uncurryThis$j({}.toString);
110
+ var stringSlice$4 = uncurryThis$j(''.slice);
111
111
 
112
112
  var classofRaw$1 = function (it) {
113
- return stringSlice$4(toString$b(it), 8, -1);
113
+ return stringSlice$4(toString$9(it), 8, -1);
114
114
  };
115
115
 
116
- var uncurryThis$k = functionUncurryThis;
117
- var fails$k = fails$n;
116
+ var uncurryThis$i = functionUncurryThis;
117
+ var fails$j = fails$m;
118
118
  var classof$8 = classofRaw$1;
119
119
 
120
120
  var $Object$4 = Object;
121
- var split = uncurryThis$k(''.split);
121
+ var split = uncurryThis$i(''.split);
122
122
 
123
123
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
124
- var indexedObject = fails$k(function () {
124
+ var indexedObject = fails$j(function () {
125
125
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
126
126
  // eslint-disable-next-line no-prototype-builtins -- safe
127
127
  return !$Object$4('z').propertyIsEnumerable(0);
@@ -141,17 +141,17 @@ var $TypeError$d = TypeError;
141
141
 
142
142
  // `RequireObjectCoercible` abstract operation
143
143
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
144
- var requireObjectCoercible$7 = function (it) {
144
+ var requireObjectCoercible$6 = function (it) {
145
145
  if (isNullOrUndefined$3(it)) throw new $TypeError$d("Can't call method on " + it);
146
146
  return it;
147
147
  };
148
148
 
149
149
  // toObject with fallback for non-array-like ES3 strings
150
150
  var IndexedObject$2 = indexedObject;
151
- var requireObjectCoercible$6 = requireObjectCoercible$7;
151
+ var requireObjectCoercible$5 = requireObjectCoercible$6;
152
152
 
153
153
  var toIndexedObject$5 = function (it) {
154
- return IndexedObject$2(requireObjectCoercible$6(it));
154
+ return IndexedObject$2(requireObjectCoercible$5(it));
155
155
  };
156
156
 
157
157
  // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
@@ -172,7 +172,7 @@ var isObject$b = function (it) {
172
172
  return typeof it == 'object' ? it !== null : isCallable$j(it);
173
173
  };
174
174
 
175
- var global$g = global$h;
175
+ var global$f = global$g;
176
176
  var isCallable$i = isCallable$k;
177
177
 
178
178
  var aFunction = function (argument) {
@@ -180,20 +180,20 @@ var aFunction = function (argument) {
180
180
  };
181
181
 
182
182
  var getBuiltIn$6 = function (namespace, method) {
183
- return arguments.length < 2 ? aFunction(global$g[namespace]) : global$g[namespace] && global$g[namespace][method];
183
+ return arguments.length < 2 ? aFunction(global$f[namespace]) : global$f[namespace] && global$f[namespace][method];
184
184
  };
185
185
 
186
- var uncurryThis$j = functionUncurryThis;
186
+ var uncurryThis$h = functionUncurryThis;
187
187
 
188
- var objectIsPrototypeOf = uncurryThis$j({}.isPrototypeOf);
188
+ var objectIsPrototypeOf = uncurryThis$h({}.isPrototypeOf);
189
189
 
190
190
  var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
191
191
 
192
- var global$f = global$h;
192
+ var global$e = global$g;
193
193
  var userAgent = engineUserAgent;
194
194
 
195
- var process = global$f.process;
196
- var Deno = global$f.Deno;
195
+ var process = global$e.process;
196
+ var Deno = global$e.Deno;
197
197
  var versions = process && process.versions || Deno && Deno.version;
198
198
  var v8 = versions && versions.v8;
199
199
  var match, version;
@@ -219,13 +219,13 @@ var engineV8Version = version;
219
219
 
220
220
  /* eslint-disable es/no-symbol -- required for testing */
221
221
  var V8_VERSION = engineV8Version;
222
- var fails$j = fails$n;
223
- var global$e = global$h;
222
+ var fails$i = fails$m;
223
+ var global$d = global$g;
224
224
 
225
- var $String$6 = global$e.String;
225
+ var $String$6 = global$d.String;
226
226
 
227
227
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
228
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$j(function () {
228
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$i(function () {
229
229
  var symbol = Symbol('symbol detection');
230
230
  // Chrome 38 Symbol has incorrect toString conversion
231
231
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -306,20 +306,20 @@ var ordinaryToPrimitive$1 = function (input, pref) {
306
306
 
307
307
  var sharedStore = {exports: {}};
308
308
 
309
- var global$d = global$h;
309
+ var global$c = global$g;
310
310
 
311
311
  // eslint-disable-next-line es/no-object-defineproperty -- safe
312
312
  var defineProperty$6 = Object.defineProperty;
313
313
 
314
314
  var defineGlobalProperty$3 = function (key, value) {
315
315
  try {
316
- defineProperty$6(global$d, key, { value: value, configurable: true, writable: true });
316
+ defineProperty$6(global$c, key, { value: value, configurable: true, writable: true });
317
317
  } catch (error) {
318
- global$d[key] = value;
318
+ global$c[key] = value;
319
319
  } return value;
320
320
  };
321
321
 
322
- var globalThis$1 = global$h;
322
+ var globalThis$1 = global$g;
323
323
  var defineGlobalProperty$2 = defineGlobalProperty$3;
324
324
 
325
325
  var SHARED = '__core-js_shared__';
@@ -341,20 +341,20 @@ var shared$4 = function (key, value) {
341
341
  return store$2[key] || (store$2[key] = value || {});
342
342
  };
343
343
 
344
- var requireObjectCoercible$5 = requireObjectCoercible$7;
344
+ var requireObjectCoercible$4 = requireObjectCoercible$6;
345
345
 
346
346
  var $Object$2 = Object;
347
347
 
348
348
  // `ToObject` abstract operation
349
349
  // https://tc39.es/ecma262/#sec-toobject
350
350
  var toObject$6 = function (argument) {
351
- return $Object$2(requireObjectCoercible$5(argument));
351
+ return $Object$2(requireObjectCoercible$4(argument));
352
352
  };
353
353
 
354
- var uncurryThis$i = functionUncurryThis;
354
+ var uncurryThis$g = functionUncurryThis;
355
355
  var toObject$5 = toObject$6;
356
356
 
357
- var hasOwnProperty = uncurryThis$i({}.hasOwnProperty);
357
+ var hasOwnProperty = uncurryThis$g({}.hasOwnProperty);
358
358
 
359
359
  // `HasOwnProperty` abstract operation
360
360
  // https://tc39.es/ecma262/#sec-hasownproperty
@@ -363,31 +363,31 @@ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
363
363
  return hasOwnProperty(toObject$5(it), key);
364
364
  };
365
365
 
366
- var uncurryThis$h = functionUncurryThis;
366
+ var uncurryThis$f = functionUncurryThis;
367
367
 
368
368
  var id = 0;
369
369
  var postfix = Math.random();
370
- var toString$a = uncurryThis$h(1.0.toString);
370
+ var toString$8 = uncurryThis$f(1.0.toString);
371
371
 
372
372
  var uid$2 = function (key) {
373
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$a(++id + postfix, 36);
373
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$8(++id + postfix, 36);
374
374
  };
375
375
 
376
- var global$c = global$h;
376
+ var global$b = global$g;
377
377
  var shared$3 = shared$4;
378
378
  var hasOwn$9 = hasOwnProperty_1;
379
379
  var uid$1 = uid$2;
380
380
  var NATIVE_SYMBOL$1 = symbolConstructorDetection;
381
381
  var USE_SYMBOL_AS_UID = useSymbolAsUid;
382
382
 
383
- var Symbol$2 = global$c.Symbol;
383
+ var Symbol$1 = global$b.Symbol;
384
384
  var WellKnownSymbolsStore = shared$3('wks');
385
- var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2['for'] || Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
385
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
386
386
 
387
387
  var wellKnownSymbol$c = function (name) {
388
388
  if (!hasOwn$9(WellKnownSymbolsStore, name)) {
389
- WellKnownSymbolsStore[name] = NATIVE_SYMBOL$1 && hasOwn$9(Symbol$2, name)
390
- ? Symbol$2[name]
389
+ WellKnownSymbolsStore[name] = NATIVE_SYMBOL$1 && hasOwn$9(Symbol$1, name)
390
+ ? Symbol$1[name]
391
391
  : createWellKnownSymbol('Symbol.' + name);
392
392
  } return WellKnownSymbolsStore[name];
393
393
  };
@@ -428,10 +428,10 @@ var toPropertyKey$2 = function (argument) {
428
428
  return isSymbol$1(key) ? key : key + '';
429
429
  };
430
430
 
431
- var global$b = global$h;
431
+ var global$a = global$g;
432
432
  var isObject$8 = isObject$b;
433
433
 
434
- var document$1 = global$b.document;
434
+ var document$1 = global$a.document;
435
435
  // typeof document.createElement is 'object' in old IE
436
436
  var EXISTS$1 = isObject$8(document$1) && isObject$8(document$1.createElement);
437
437
 
@@ -440,11 +440,11 @@ var documentCreateElement$2 = function (it) {
440
440
  };
441
441
 
442
442
  var DESCRIPTORS$b = descriptors;
443
- var fails$i = fails$n;
443
+ var fails$h = fails$m;
444
444
  var createElement = documentCreateElement$2;
445
445
 
446
446
  // Thanks to IE8 for its funny defineProperty
447
- var ie8DomDefine = !DESCRIPTORS$b && !fails$i(function () {
447
+ var ie8DomDefine = !DESCRIPTORS$b && !fails$h(function () {
448
448
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
449
449
  return Object.defineProperty(createElement('div'), 'a', {
450
450
  get: function () { return 7; }
@@ -477,11 +477,11 @@ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$a ? $getOwnPropertyDescriptor$1 :
477
477
  var objectDefineProperty = {};
478
478
 
479
479
  var DESCRIPTORS$9 = descriptors;
480
- var fails$h = fails$n;
480
+ var fails$g = fails$m;
481
481
 
482
482
  // V8 ~ Chrome 36-
483
483
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
484
- var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$h(function () {
484
+ var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$g(function () {
485
485
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
486
486
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
487
487
  value: 42,
@@ -575,11 +575,11 @@ var functionName = {
575
575
  CONFIGURABLE: CONFIGURABLE
576
576
  };
577
577
 
578
- var uncurryThis$g = functionUncurryThis;
578
+ var uncurryThis$e = functionUncurryThis;
579
579
  var isCallable$e = isCallable$k;
580
580
  var store$1 = sharedStoreExports;
581
581
 
582
- var functionToString = uncurryThis$g(Function.toString);
582
+ var functionToString = uncurryThis$e(Function.toString);
583
583
 
584
584
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
585
585
  if (!isCallable$e(store$1.inspectSource)) {
@@ -590,10 +590,10 @@ if (!isCallable$e(store$1.inspectSource)) {
590
590
 
591
591
  var inspectSource$2 = store$1.inspectSource;
592
592
 
593
- var global$a = global$h;
593
+ var global$9 = global$g;
594
594
  var isCallable$d = isCallable$k;
595
595
 
596
- var WeakMap$1 = global$a.WeakMap;
596
+ var WeakMap$1 = global$9.WeakMap;
597
597
 
598
598
  var weakMapBasicDetection = isCallable$d(WeakMap$1) && /native code/.test(String(WeakMap$1));
599
599
 
@@ -609,7 +609,7 @@ var sharedKey$3 = function (key) {
609
609
  var hiddenKeys$4 = {};
610
610
 
611
611
  var NATIVE_WEAK_MAP = weakMapBasicDetection;
612
- var global$9 = global$h;
612
+ var global$8 = global$g;
613
613
  var isObject$6 = isObject$b;
614
614
  var createNonEnumerableProperty$7 = createNonEnumerableProperty$8;
615
615
  var hasOwn$6 = hasOwnProperty_1;
@@ -618,8 +618,8 @@ var sharedKey$2 = sharedKey$3;
618
618
  var hiddenKeys$3 = hiddenKeys$4;
619
619
 
620
620
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
621
- var TypeError$1 = global$9.TypeError;
622
- var WeakMap = global$9.WeakMap;
621
+ var TypeError$1 = global$8.TypeError;
622
+ var WeakMap = global$8.WeakMap;
623
623
  var set, get, has;
624
624
 
625
625
  var enforce = function (it) {
@@ -679,8 +679,8 @@ var internalState = {
679
679
  getterFor: getterFor
680
680
  };
681
681
 
682
- var uncurryThis$f = functionUncurryThis;
683
- var fails$g = fails$n;
682
+ var uncurryThis$d = functionUncurryThis;
683
+ var fails$f = fails$m;
684
684
  var isCallable$c = isCallable$k;
685
685
  var hasOwn$5 = hasOwnProperty_1;
686
686
  var DESCRIPTORS$5 = descriptors;
@@ -693,11 +693,11 @@ var getInternalState$2 = InternalStateModule$1.get;
693
693
  var $String$3 = String;
694
694
  // eslint-disable-next-line es/no-object-defineproperty -- safe
695
695
  var defineProperty$5 = Object.defineProperty;
696
- var stringSlice$3 = uncurryThis$f(''.slice);
697
- var replace$4 = uncurryThis$f(''.replace);
698
- var join = uncurryThis$f([].join);
696
+ var stringSlice$3 = uncurryThis$d(''.slice);
697
+ var replace$3 = uncurryThis$d(''.replace);
698
+ var join = uncurryThis$d([].join);
699
699
 
700
- var CONFIGURABLE_LENGTH = DESCRIPTORS$5 && !fails$g(function () {
700
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$5 && !fails$f(function () {
701
701
  return defineProperty$5(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
702
702
  });
703
703
 
@@ -705,7 +705,7 @@ var TEMPLATE = String(String).split('String');
705
705
 
706
706
  var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
707
707
  if (stringSlice$3($String$3(name), 0, 7) === 'Symbol(') {
708
- name = '[' + replace$4($String$3(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
708
+ name = '[' + replace$3($String$3(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
709
709
  }
710
710
  if (options && options.getter) name = 'get ' + name;
711
711
  if (options && options.setter) name = 'set ' + name;
@@ -824,7 +824,7 @@ var toAbsoluteIndex = toAbsoluteIndex$1;
824
824
  var lengthOfArrayLike$3 = lengthOfArrayLike$4;
825
825
 
826
826
  // `Array.prototype.{ indexOf, includes }` methods implementation
827
- var createMethod$3 = function (IS_INCLUDES) {
827
+ var createMethod$2 = function (IS_INCLUDES) {
828
828
  return function ($this, el, fromIndex) {
829
829
  var O = toIndexedObject$3($this);
830
830
  var length = lengthOfArrayLike$3(O);
@@ -847,19 +847,19 @@ var createMethod$3 = function (IS_INCLUDES) {
847
847
  var arrayIncludes = {
848
848
  // `Array.prototype.includes` method
849
849
  // https://tc39.es/ecma262/#sec-array.prototype.includes
850
- includes: createMethod$3(true),
850
+ includes: createMethod$2(true),
851
851
  // `Array.prototype.indexOf` method
852
852
  // https://tc39.es/ecma262/#sec-array.prototype.indexof
853
- indexOf: createMethod$3(false)
853
+ indexOf: createMethod$2(false)
854
854
  };
855
855
 
856
- var uncurryThis$e = functionUncurryThis;
856
+ var uncurryThis$c = functionUncurryThis;
857
857
  var hasOwn$4 = hasOwnProperty_1;
858
858
  var toIndexedObject$2 = toIndexedObject$5;
859
859
  var indexOf$1 = arrayIncludes.indexOf;
860
860
  var hiddenKeys$2 = hiddenKeys$4;
861
861
 
862
- var push$2 = uncurryThis$e([].push);
862
+ var push$2 = uncurryThis$c([].push);
863
863
 
864
864
  var objectKeysInternal = function (object, names) {
865
865
  var O = toIndexedObject$2(object);
@@ -903,12 +903,12 @@ var objectGetOwnPropertySymbols = {};
903
903
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
904
904
 
905
905
  var getBuiltIn$4 = getBuiltIn$6;
906
- var uncurryThis$d = functionUncurryThis;
906
+ var uncurryThis$b = functionUncurryThis;
907
907
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
908
908
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
909
909
  var anObject$7 = anObject$9;
910
910
 
911
- var concat$1 = uncurryThis$d([].concat);
911
+ var concat$1 = uncurryThis$b([].concat);
912
912
 
913
913
  // all object keys, includes non-enumerable and symbols
914
914
  var ownKeys$1 = getBuiltIn$4('Reflect', 'ownKeys') || function ownKeys(it) {
@@ -934,7 +934,7 @@ var copyConstructorProperties$2 = function (target, source, exceptions) {
934
934
  }
935
935
  };
936
936
 
937
- var fails$f = fails$n;
937
+ var fails$e = fails$m;
938
938
  var isCallable$a = isCallable$k;
939
939
 
940
940
  var replacement = /#|\.prototype\./;
@@ -943,7 +943,7 @@ var isForced$1 = function (feature, detection) {
943
943
  var value = data[normalize(feature)];
944
944
  return value === POLYFILL ? true
945
945
  : value === NATIVE ? false
946
- : isCallable$a(detection) ? fails$f(detection)
946
+ : isCallable$a(detection) ? fails$e(detection)
947
947
  : !!detection;
948
948
  };
949
949
 
@@ -957,7 +957,7 @@ var POLYFILL = isForced$1.POLYFILL = 'P';
957
957
 
958
958
  var isForced_1 = isForced$1;
959
959
 
960
- var global$8 = global$h;
960
+ var global$7 = global$g;
961
961
  var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
962
962
  var createNonEnumerableProperty$6 = createNonEnumerableProperty$8;
963
963
  var defineBuiltIn$3 = defineBuiltIn$4;
@@ -986,11 +986,11 @@ var _export = function (options, source) {
986
986
  var STATIC = options.stat;
987
987
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
988
988
  if (GLOBAL) {
989
- target = global$8;
989
+ target = global$7;
990
990
  } else if (STATIC) {
991
- target = global$8[TARGET] || defineGlobalProperty(TARGET, {});
991
+ target = global$7[TARGET] || defineGlobalProperty(TARGET, {});
992
992
  } else {
993
- target = global$8[TARGET] && global$8[TARGET].prototype;
993
+ target = global$7[TARGET] && global$7[TARGET].prototype;
994
994
  }
995
995
  if (target) for (key in source) {
996
996
  sourceProperty = source[key];
@@ -1023,9 +1023,9 @@ var objectKeys$2 = Object.keys || function keys(O) {
1023
1023
  };
1024
1024
 
1025
1025
  var DESCRIPTORS$4 = descriptors;
1026
- var uncurryThis$c = functionUncurryThis;
1026
+ var uncurryThis$a = functionUncurryThis;
1027
1027
  var call$8 = functionCall;
1028
- var fails$e = fails$n;
1028
+ var fails$d = fails$m;
1029
1029
  var objectKeys$1 = objectKeys$2;
1030
1030
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1031
1031
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
@@ -1036,11 +1036,11 @@ var IndexedObject$1 = indexedObject;
1036
1036
  var $assign = Object.assign;
1037
1037
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1038
1038
  var defineProperty$4 = Object.defineProperty;
1039
- var concat = uncurryThis$c([].concat);
1039
+ var concat = uncurryThis$a([].concat);
1040
1040
 
1041
1041
  // `Object.assign` method
1042
1042
  // https://tc39.es/ecma262/#sec-object.assign
1043
- var objectAssign = !$assign || fails$e(function () {
1043
+ var objectAssign = !$assign || fails$d(function () {
1044
1044
  // should have correct order of operations (Edge bug)
1045
1045
  if (DESCRIPTORS$4 && $assign({ b: 1 }, $assign(defineProperty$4({}, 'a', {
1046
1046
  enumerable: true,
@@ -1079,13 +1079,13 @@ var objectAssign = !$assign || fails$e(function () {
1079
1079
  } return T;
1080
1080
  } : $assign;
1081
1081
 
1082
- var $$b = _export;
1082
+ var $$a = _export;
1083
1083
  var assign = objectAssign;
1084
1084
 
1085
1085
  // `Object.assign` method
1086
1086
  // https://tc39.es/ecma262/#sec-object.assign
1087
1087
  // eslint-disable-next-line es/no-object-assign -- required for testing
1088
- $$b({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1088
+ $$a({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1089
1089
  assign: assign
1090
1090
  });
1091
1091
 
@@ -1221,20 +1221,20 @@ var addToUnscopables$2 = function (key) {
1221
1221
  ArrayPrototype[UNSCOPABLES][key] = true;
1222
1222
  };
1223
1223
 
1224
- var $$a = _export;
1224
+ var $$9 = _export;
1225
1225
  var $includes = arrayIncludes.includes;
1226
- var fails$d = fails$n;
1226
+ var fails$c = fails$m;
1227
1227
  var addToUnscopables$1 = addToUnscopables$2;
1228
1228
 
1229
1229
  // FF99+ bug
1230
- var BROKEN_ON_SPARSE = fails$d(function () {
1230
+ var BROKEN_ON_SPARSE = fails$c(function () {
1231
1231
  // eslint-disable-next-line es/no-array-prototype-includes -- detection
1232
1232
  return !Array(1).includes();
1233
1233
  });
1234
1234
 
1235
1235
  // `Array.prototype.includes` method
1236
1236
  // https://tc39.es/ecma262/#sec-array.prototype.includes
1237
- $$a({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
1237
+ $$9({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
1238
1238
  includes: function includes(el /* , fromIndex = 0 */) {
1239
1239
  return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
1240
1240
  }
@@ -1245,9 +1245,9 @@ addToUnscopables$1('includes');
1245
1245
 
1246
1246
  var iterators = {};
1247
1247
 
1248
- var fails$c = fails$n;
1248
+ var fails$b = fails$m;
1249
1249
 
1250
- var correctPrototypeGetter = !fails$c(function () {
1250
+ var correctPrototypeGetter = !fails$b(function () {
1251
1251
  function F() { /* empty */ }
1252
1252
  F.prototype.constructor = null;
1253
1253
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
@@ -1276,14 +1276,14 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf :
1276
1276
  } return object instanceof $Object$1 ? ObjectPrototype : null;
1277
1277
  };
1278
1278
 
1279
- var fails$b = fails$n;
1279
+ var fails$a = fails$m;
1280
1280
  var isCallable$8 = isCallable$k;
1281
1281
  var isObject$5 = isObject$b;
1282
1282
  var getPrototypeOf$1 = objectGetPrototypeOf;
1283
1283
  var defineBuiltIn$2 = defineBuiltIn$4;
1284
1284
  var wellKnownSymbol$9 = wellKnownSymbol$c;
1285
1285
 
1286
- var ITERATOR$3 = wellKnownSymbol$9('iterator');
1286
+ var ITERATOR$2 = wellKnownSymbol$9('iterator');
1287
1287
  var BUGGY_SAFARI_ITERATORS$1 = false;
1288
1288
 
1289
1289
  // `%IteratorPrototype%` object
@@ -1301,18 +1301,18 @@ if ([].keys) {
1301
1301
  }
1302
1302
  }
1303
1303
 
1304
- var NEW_ITERATOR_PROTOTYPE = !isObject$5(IteratorPrototype$2) || fails$b(function () {
1304
+ var NEW_ITERATOR_PROTOTYPE = !isObject$5(IteratorPrototype$2) || fails$a(function () {
1305
1305
  var test = {};
1306
1306
  // FF44- legacy iterators case
1307
- return IteratorPrototype$2[ITERATOR$3].call(test) !== test;
1307
+ return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
1308
1308
  });
1309
1309
 
1310
1310
  if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1311
1311
 
1312
1312
  // `%IteratorPrototype%[@@iterator]()` method
1313
1313
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1314
- if (!isCallable$8(IteratorPrototype$2[ITERATOR$3])) {
1315
- defineBuiltIn$2(IteratorPrototype$2, ITERATOR$3, function () {
1314
+ if (!isCallable$8(IteratorPrototype$2[ITERATOR$2])) {
1315
+ defineBuiltIn$2(IteratorPrototype$2, ITERATOR$2, function () {
1316
1316
  return this;
1317
1317
  });
1318
1318
  }
@@ -1351,13 +1351,13 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
1351
1351
  return IteratorConstructor;
1352
1352
  };
1353
1353
 
1354
- var uncurryThis$b = functionUncurryThis;
1354
+ var uncurryThis$9 = functionUncurryThis;
1355
1355
  var aCallable$1 = aCallable$3;
1356
1356
 
1357
1357
  var functionUncurryThisAccessor = function (object, key, method) {
1358
1358
  try {
1359
1359
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1360
- return uncurryThis$b(aCallable$1(Object.getOwnPropertyDescriptor(object, key)[method]));
1360
+ return uncurryThis$9(aCallable$1(Object.getOwnPropertyDescriptor(object, key)[method]));
1361
1361
  } catch (error) { /* empty */ }
1362
1362
  };
1363
1363
 
@@ -1380,7 +1380,7 @@ var aPossiblePrototype$1 = function (argument) {
1380
1380
  /* eslint-disable no-proto -- safe */
1381
1381
  var uncurryThisAccessor = functionUncurryThisAccessor;
1382
1382
  var isObject$3 = isObject$b;
1383
- var requireObjectCoercible$4 = requireObjectCoercible$7;
1383
+ var requireObjectCoercible$3 = requireObjectCoercible$6;
1384
1384
  var aPossiblePrototype = aPossiblePrototype$1;
1385
1385
 
1386
1386
  // `Object.setPrototypeOf` method
@@ -1397,7 +1397,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1397
1397
  CORRECT_SETTER = test instanceof Array;
1398
1398
  } catch (error) { /* empty */ }
1399
1399
  return function setPrototypeOf(O, proto) {
1400
- requireObjectCoercible$4(O);
1400
+ requireObjectCoercible$3(O);
1401
1401
  aPossiblePrototype(proto);
1402
1402
  if (!isObject$3(O)) return O;
1403
1403
  if (CORRECT_SETTER) setter(O, proto);
@@ -1406,7 +1406,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1406
1406
  };
1407
1407
  }() : undefined);
1408
1408
 
1409
- var $$9 = _export;
1409
+ var $$8 = _export;
1410
1410
  var call$7 = functionCall;
1411
1411
  var FunctionName = functionName;
1412
1412
  var isCallable$7 = isCallable$k;
@@ -1424,7 +1424,7 @@ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
1424
1424
  var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1425
1425
  var IteratorPrototype = IteratorsCore.IteratorPrototype;
1426
1426
  var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1427
- var ITERATOR$2 = wellKnownSymbol$7('iterator');
1427
+ var ITERATOR$1 = wellKnownSymbol$7('iterator');
1428
1428
  var KEYS = 'keys';
1429
1429
  var VALUES = 'values';
1430
1430
  var ENTRIES = 'entries';
@@ -1450,7 +1450,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1450
1450
  var TO_STRING_TAG = NAME + ' Iterator';
1451
1451
  var INCORRECT_VALUES_NAME = false;
1452
1452
  var IterablePrototype = Iterable.prototype;
1453
- var nativeIterator = IterablePrototype[ITERATOR$2]
1453
+ var nativeIterator = IterablePrototype[ITERATOR$1]
1454
1454
  || IterablePrototype['@@iterator']
1455
1455
  || DEFAULT && IterablePrototype[DEFAULT];
1456
1456
  var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
@@ -1464,8 +1464,8 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1464
1464
  if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1465
1465
  if (setPrototypeOf$2) {
1466
1466
  setPrototypeOf$2(CurrentIteratorPrototype, IteratorPrototype);
1467
- } else if (!isCallable$7(CurrentIteratorPrototype[ITERATOR$2])) {
1468
- defineBuiltIn$1(CurrentIteratorPrototype, ITERATOR$2, returnThis);
1467
+ } else if (!isCallable$7(CurrentIteratorPrototype[ITERATOR$1])) {
1468
+ defineBuiltIn$1(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1469
1469
  }
1470
1470
  }
1471
1471
  // Set @@toStringTag to native iterators
@@ -1494,12 +1494,12 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1494
1494
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1495
1495
  defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
1496
1496
  }
1497
- } else $$9({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1497
+ } else $$8({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1498
1498
  }
1499
1499
 
1500
1500
  // define iterator
1501
- if (IterablePrototype[ITERATOR$2] !== defaultIterator) {
1502
- defineBuiltIn$1(IterablePrototype, ITERATOR$2, defaultIterator, { name: DEFAULT });
1501
+ if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
1502
+ defineBuiltIn$1(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1503
1503
  }
1504
1504
  Iterators$1[NAME] = defaultIterator;
1505
1505
 
@@ -1617,14 +1617,14 @@ var doesNotExceedSafeInteger$2 = function (it) {
1617
1617
  return it;
1618
1618
  };
1619
1619
 
1620
- var $$8 = _export;
1620
+ var $$7 = _export;
1621
1621
  var toObject$2 = toObject$6;
1622
1622
  var lengthOfArrayLike$2 = lengthOfArrayLike$4;
1623
1623
  var setArrayLength$1 = arraySetLength;
1624
1624
  var doesNotExceedSafeInteger$1 = doesNotExceedSafeInteger$2;
1625
- var fails$a = fails$n;
1625
+ var fails$9 = fails$m;
1626
1626
 
1627
- var INCORRECT_TO_LENGTH = fails$a(function () {
1627
+ var INCORRECT_TO_LENGTH = fails$9(function () {
1628
1628
  return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;
1629
1629
  });
1630
1630
 
@@ -1639,11 +1639,11 @@ var properErrorOnNonWritableLength$1 = function () {
1639
1639
  }
1640
1640
  };
1641
1641
 
1642
- var FORCED$4 = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength$1();
1642
+ var FORCED$3 = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength$1();
1643
1643
 
1644
1644
  // `Array.prototype.push` method
1645
1645
  // https://tc39.es/ecma262/#sec-array.prototype.push
1646
- $$8({ target: 'Array', proto: true, arity: 1, forced: FORCED$4 }, {
1646
+ $$7({ target: 'Array', proto: true, arity: 1, forced: FORCED$3 }, {
1647
1647
  // eslint-disable-next-line no-unused-vars -- required for `.length`
1648
1648
  push: function push(item) {
1649
1649
  var O = toObject$2(this);
@@ -1669,7 +1669,7 @@ var $TypeError$4 = TypeError;
1669
1669
  var REDUCE_EMPTY = 'Reduce of empty array with no initial value';
1670
1670
 
1671
1671
  // `Array.prototype.{ reduce, reduceRight }` methods implementation
1672
- var createMethod$2 = function (IS_RIGHT) {
1672
+ var createMethod$1 = function (IS_RIGHT) {
1673
1673
  return function (that, callbackfn, argumentsLength, memo) {
1674
1674
  var O = toObject$1(that);
1675
1675
  var self = IndexedObject(O);
@@ -1699,28 +1699,28 @@ var createMethod$2 = function (IS_RIGHT) {
1699
1699
  var arrayReduce = {
1700
1700
  // `Array.prototype.reduce` method
1701
1701
  // https://tc39.es/ecma262/#sec-array.prototype.reduce
1702
- left: createMethod$2(false),
1702
+ left: createMethod$1(false),
1703
1703
  // `Array.prototype.reduceRight` method
1704
1704
  // https://tc39.es/ecma262/#sec-array.prototype.reduceright
1705
- right: createMethod$2(true)
1705
+ right: createMethod$1(true)
1706
1706
  };
1707
1707
 
1708
- var fails$9 = fails$n;
1708
+ var fails$8 = fails$m;
1709
1709
 
1710
1710
  var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
1711
1711
  var method = [][METHOD_NAME];
1712
- return !!method && fails$9(function () {
1712
+ return !!method && fails$8(function () {
1713
1713
  // eslint-disable-next-line no-useless-call -- required for testing
1714
1714
  method.call(null, argument || function () { return 1; }, 1);
1715
1715
  });
1716
1716
  };
1717
1717
 
1718
- var global$7 = global$h;
1718
+ var global$6 = global$g;
1719
1719
  var classof$6 = classofRaw$1;
1720
1720
 
1721
- var engineIsNode = classof$6(global$7.process) === 'process';
1721
+ var engineIsNode = classof$6(global$6.process) === 'process';
1722
1722
 
1723
- var $$7 = _export;
1723
+ var $$6 = _export;
1724
1724
  var $reduce = arrayReduce.left;
1725
1725
  var arrayMethodIsStrict = arrayMethodIsStrict$1;
1726
1726
  var CHROME_VERSION = engineV8Version;
@@ -1729,11 +1729,11 @@ var IS_NODE = engineIsNode;
1729
1729
  // Chrome 80-82 has a critical bug
1730
1730
  // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
1731
1731
  var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
1732
- var FORCED$3 = CHROME_BUG || !arrayMethodIsStrict('reduce');
1732
+ var FORCED$2 = CHROME_BUG || !arrayMethodIsStrict('reduce');
1733
1733
 
1734
1734
  // `Array.prototype.reduce` method
1735
1735
  // https://tc39.es/ecma262/#sec-array.prototype.reduce
1736
- $$7({ target: 'Array', proto: true, forced: FORCED$3 }, {
1736
+ $$6({ target: 'Array', proto: true, forced: FORCED$2 }, {
1737
1737
  reduce: function reduce(callbackfn /* , initialValue */) {
1738
1738
  var length = arguments.length;
1739
1739
  return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
@@ -1806,7 +1806,7 @@ var classof$3 = classof$4;
1806
1806
 
1807
1807
  var $String$1 = String;
1808
1808
 
1809
- var toString$9 = function (argument) {
1809
+ var toString$7 = function (argument) {
1810
1810
  if (classof$3(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
1811
1811
  return $String$1(argument);
1812
1812
  };
@@ -1827,22 +1827,22 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
1827
1827
  } return false;
1828
1828
  };
1829
1829
 
1830
- var $$6 = _export;
1831
- var uncurryThis$a = functionUncurryThis;
1830
+ var $$5 = _export;
1831
+ var uncurryThis$8 = functionUncurryThis;
1832
1832
  var notARegExp = notARegexp;
1833
- var requireObjectCoercible$3 = requireObjectCoercible$7;
1834
- var toString$8 = toString$9;
1833
+ var requireObjectCoercible$2 = requireObjectCoercible$6;
1834
+ var toString$6 = toString$7;
1835
1835
  var correctIsRegExpLogic = correctIsRegexpLogic;
1836
1836
 
1837
- var stringIndexOf = uncurryThis$a(''.indexOf);
1837
+ var stringIndexOf = uncurryThis$8(''.indexOf);
1838
1838
 
1839
1839
  // `String.prototype.includes` method
1840
1840
  // https://tc39.es/ecma262/#sec-string.prototype.includes
1841
- $$6({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
1841
+ $$5({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
1842
1842
  includes: function includes(searchString /* , position = 0 */) {
1843
1843
  return !!~stringIndexOf(
1844
- toString$8(requireObjectCoercible$3(this)),
1845
- toString$8(notARegExp(searchString)),
1844
+ toString$6(requireObjectCoercible$2(this)),
1845
+ toString$6(notARegExp(searchString)),
1846
1846
  arguments.length > 1 ? arguments[1] : undefined
1847
1847
  );
1848
1848
  }
@@ -1892,7 +1892,7 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
1892
1892
 
1893
1893
  var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1894
1894
 
1895
- var global$6 = global$h;
1895
+ var global$5 = global$g;
1896
1896
  var DOMIterables = domIterables;
1897
1897
  var DOMTokenListPrototype = domTokenListPrototype;
1898
1898
  var ArrayIteratorMethods = es_array_iterator;
@@ -1900,16 +1900,16 @@ var createNonEnumerableProperty$4 = createNonEnumerableProperty$8;
1900
1900
  var setToStringTag = setToStringTag$3;
1901
1901
  var wellKnownSymbol$2 = wellKnownSymbol$c;
1902
1902
 
1903
- var ITERATOR$1 = wellKnownSymbol$2('iterator');
1903
+ var ITERATOR = wellKnownSymbol$2('iterator');
1904
1904
  var ArrayValues = ArrayIteratorMethods.values;
1905
1905
 
1906
1906
  var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1907
1907
  if (CollectionPrototype) {
1908
1908
  // some Chrome versions have non-configurable methods on DOMTokenList
1909
- if (CollectionPrototype[ITERATOR$1] !== ArrayValues) try {
1910
- createNonEnumerableProperty$4(CollectionPrototype, ITERATOR$1, ArrayValues);
1909
+ if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
1910
+ createNonEnumerableProperty$4(CollectionPrototype, ITERATOR, ArrayValues);
1911
1911
  } catch (error) {
1912
- CollectionPrototype[ITERATOR$1] = ArrayValues;
1912
+ CollectionPrototype[ITERATOR] = ArrayValues;
1913
1913
  }
1914
1914
  setToStringTag(CollectionPrototype, COLLECTION_NAME, true);
1915
1915
  if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
@@ -1924,7 +1924,7 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1924
1924
  };
1925
1925
 
1926
1926
  for (var COLLECTION_NAME in DOMIterables) {
1927
- handlePrototype(global$6[COLLECTION_NAME] && global$6[COLLECTION_NAME].prototype, COLLECTION_NAME);
1927
+ handlePrototype(global$5[COLLECTION_NAME] && global$5[COLLECTION_NAME].prototype, COLLECTION_NAME);
1928
1928
  }
1929
1929
 
1930
1930
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
@@ -1988,6 +1988,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
1988
1988
  *
1989
1989
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1990
1990
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
1991
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
1991
1992
  * */
1992
1993
  var LayerStatus;
1993
1994
  (function (LayerStatus) {
@@ -2001,7 +2002,7 @@ var LayerActionOrigin;
2001
2002
  LayerActionOrigin["ReactMapViewParseLayer"] = "ReactMapViewParseLayer";
2002
2003
  LayerActionOrigin["updateLayerInformationListener"] = "updateLayerInformationListener";
2003
2004
  LayerActionOrigin["toggleAutoUpdateListener"] = "toggleAutoUpdateListener";
2004
- LayerActionOrigin["unregisterMapSaga"] = "unregisterMapSaga";
2005
+ LayerActionOrigin["unregisterMapListener"] = "unregisterMapListener";
2005
2006
  })(LayerActionOrigin || (LayerActionOrigin = {}));
2006
2007
 
2007
2008
  var types$5 = /*#__PURE__*/Object.freeze({
@@ -2028,7 +2029,7 @@ const createMap = ({
2028
2029
  right: 19000000,
2029
2030
  top: 19000000
2030
2031
  },
2031
- srs: _srs = 'EPSG:3857',
2032
+ srs: _srs = PROJECTION.EPSG_3857.value,
2032
2033
  baseLayers: _baseLayers = [],
2033
2034
  overLayers: _overLayers = [],
2034
2035
  mapLayers: _mapLayers = [],
@@ -2394,6 +2395,7 @@ var utils$2 = /*#__PURE__*/Object.freeze({
2394
2395
  *
2395
2396
  * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2396
2397
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
2398
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2397
2399
  * */
2398
2400
  /**
2399
2401
  * These actions causes circular dependency if they are defined in the reducer.ts file.
@@ -2418,6 +2420,7 @@ const setMapPreset = createAction('SET_MAP_PRESET');
2418
2420
  *
2419
2421
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2420
2422
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
2423
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2421
2424
  * */
2422
2425
  /**
2423
2426
  * Generic action to set the time.
@@ -2462,6 +2465,7 @@ const setBbox = createAction('GENERIC_SETBBOX');
2462
2465
  *
2463
2466
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2464
2467
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
2468
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2465
2469
  * */
2466
2470
  /**
2467
2471
  * These actions are fired by the generic/saga.ts, based on generic actions and the synchronizationGroup state.
@@ -3106,6 +3110,7 @@ const layerActions = slice$7.actions;
3106
3110
  *
3107
3111
  * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3108
3112
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
3113
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
3109
3114
  * */
3110
3115
  const selectorMemoizationOptions = {
3111
3116
  memoizeOptions: {
@@ -3476,6 +3481,7 @@ var selectors$7 = /*#__PURE__*/Object.freeze({
3476
3481
  *
3477
3482
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3478
3483
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
3484
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
3479
3485
  * */
3480
3486
  var AnimationLength;
3481
3487
  (function (AnimationLength) {
@@ -3582,7 +3588,7 @@ var deletePropertyOrThrow$1 = function (O, P) {
3582
3588
  if (!delete O[P]) throw new $TypeError$2('Cannot delete property ' + tryToString$1(P) + ' of ' + tryToString$1(O));
3583
3589
  };
3584
3590
 
3585
- var $$5 = _export;
3591
+ var $$4 = _export;
3586
3592
  var toObject = toObject$6;
3587
3593
  var lengthOfArrayLike = lengthOfArrayLike$4;
3588
3594
  var setArrayLength = arraySetLength;
@@ -3602,11 +3608,11 @@ var properErrorOnNonWritableLength = function () {
3602
3608
  }
3603
3609
  };
3604
3610
 
3605
- var FORCED$2 = INCORRECT_RESULT || !properErrorOnNonWritableLength();
3611
+ var FORCED$1 = INCORRECT_RESULT || !properErrorOnNonWritableLength();
3606
3612
 
3607
3613
  // `Array.prototype.unshift` method
3608
3614
  // https://tc39.es/ecma262/#sec-array.prototype.unshift
3609
- $$5({ target: 'Array', proto: true, arity: 1, forced: FORCED$2 }, {
3615
+ $$4({ target: 'Array', proto: true, arity: 1, forced: FORCED$1 }, {
3610
3616
  // eslint-disable-next-line no-unused-vars -- required for `.length`
3611
3617
  unshift: function unshift(item) {
3612
3618
  var O = toObject(this);
@@ -4617,6 +4623,7 @@ var selectors$6 = /*#__PURE__*/Object.freeze({
4617
4623
  *
4618
4624
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4619
4625
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
4626
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4620
4627
  * */
4621
4628
  var DialogTypes;
4622
4629
  (function (DialogTypes) {
@@ -4658,6 +4665,7 @@ var types$3 = /*#__PURE__*/Object.freeze({
4658
4665
  *
4659
4666
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4660
4667
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
4668
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4661
4669
  * */
4662
4670
  const useSetupDialog = (dialogType, source = 'app') => {
4663
4671
  const dispatch = useDispatch();
@@ -4726,6 +4734,7 @@ const useSetupDialog = (dialogType, source = 'app') => {
4726
4734
  *
4727
4735
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4728
4736
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
4737
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4729
4738
  * */
4730
4739
  /* Type constants */
4731
4740
  const SYNCGROUPS_TYPE_SETTIME = 'SYNCGROUPS_TYPE_SETTIME';
@@ -4756,6 +4765,7 @@ var constants$1 = /*#__PURE__*/Object.freeze({
4756
4765
  *
4757
4766
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4758
4767
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
4768
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4759
4769
  * */
4760
4770
  /**
4761
4771
  * The removeInPlace() method modifies an array in place, by removing elements that pass the test implemented by the provided function.
@@ -5021,6 +5031,7 @@ const {
5021
5031
  *
5022
5032
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
5023
5033
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
5034
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
5024
5035
  * */
5025
5036
  const SyncGroupTypeList = [SYNCGROUPS_TYPE_SETBBOX, SYNCGROUPS_TYPE_SETTIME];
5026
5037
  var SyncGroupActionOrigin;
@@ -5255,6 +5266,7 @@ var selector = /*#__PURE__*/Object.freeze({
5255
5266
  *
5256
5267
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
5257
5268
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
5269
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
5258
5270
  * */
5259
5271
  const synchronizationGroupStore = store => store && store.syncronizationGroupStore ? store.syncronizationGroupStore : null;
5260
5272
  const getSynchronizationGroupStore = createSelector(synchronizationGroupStore, store => store, selectorMemoizationOptions);
@@ -5297,6 +5309,7 @@ var selectors$4 = /*#__PURE__*/Object.freeze({
5297
5309
  *
5298
5310
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
5299
5311
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
5312
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
5300
5313
  * */
5301
5314
 
5302
5315
  var types$1 = /*#__PURE__*/Object.freeze({
@@ -5318,6 +5331,7 @@ var types$1 = /*#__PURE__*/Object.freeze({
5318
5331
  *
5319
5332
  * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
5320
5333
  * Copyright 2024 - Finnish Meteorological Institute (FMI)
5334
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
5321
5335
  * */
5322
5336
  const ANY_EDR_SERVICE = 'any_edr';
5323
5337
 
@@ -5341,6 +5355,7 @@ var constants = /*#__PURE__*/Object.freeze({
5341
5355
  *
5342
5356
  * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
5343
5357
  * Copyright 2024 - Finnish Meteorological Institute (FMI)
5358
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
5344
5359
  * */
5345
5360
  const loadingIndicatorAdapter = createEntityAdapter();
5346
5361
  const initLoadingIndicatorStateForId = (draft, id) => {
@@ -5411,6 +5426,7 @@ const {
5411
5426
  *
5412
5427
  * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
5413
5428
  * Copyright 2024 - Finnish Meteorological Institute (FMI)
5429
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
5414
5430
  * */
5415
5431
  const {
5416
5432
  selectById: selectLoadingIndicatorById
@@ -6104,8 +6120,9 @@ const getAnimationList = createSelector(getMapById, getAnimationStartTime, getAn
6104
6120
  * @param {string} mapId mapId: string - Id of the map
6105
6121
  * @returns {object} Returns min and max value of time dimension of autoTimeStep-layer. If no autoTimeStep-layer it returns default start/end time from store.
6106
6122
  */
6107
- const getAnimationRange = createSelector(store => store, getAutoTimeStepLayerId, getAnimationStartTime, getAnimationEndTime, isAnimationLengthAuto, getLayerTimeDimension, (store, autoTimeStepLayerId, startTime, endTime, isAnimationLengthAuto) => {
6108
- const layerTimeDimension = getLayerTimeDimension(store, autoTimeStepLayerId);
6123
+ const getAnimationRange = createSelector(getLayersById, getAutoTimeStepLayerId, getAnimationStartTime, getAnimationEndTime, isAnimationLengthAuto, (layers, autoTimeStepLayerId, startTime, endTime, isAnimationLengthAuto) => {
6124
+ var _a, _b;
6125
+ const layerTimeDimension = autoTimeStepLayerId && ((_b = (_a = layers === null || layers === void 0 ? void 0 : layers[autoTimeStepLayerId]) === null || _a === void 0 ? void 0 : _a.dimensions) === null || _b === void 0 ? void 0 : _b.find(dimension => dimension.name === 'time'));
6109
6126
  const {
6110
6127
  minValue,
6111
6128
  maxValue
@@ -6117,7 +6134,7 @@ const getAnimationRange = createSelector(store => store, getAutoTimeStepLayerId,
6117
6134
  animationStartTime,
6118
6135
  animationEndTime
6119
6136
  };
6120
- });
6137
+ }, selectorMemoizationOptions);
6121
6138
 
6122
6139
  var selectors$2 = /*#__PURE__*/Object.freeze({
6123
6140
  __proto__: null,
@@ -6196,6 +6213,7 @@ var selectors$2 = /*#__PURE__*/Object.freeze({
6196
6213
  *
6197
6214
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6198
6215
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
6216
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6199
6217
  * */
6200
6218
  var MapActionOrigin;
6201
6219
  (function (MapActionOrigin) {
@@ -6222,6 +6240,7 @@ var enums = /*#__PURE__*/Object.freeze({
6222
6240
  *
6223
6241
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6224
6242
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
6243
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6225
6244
  * */
6226
6245
  const IS_LEGEND_OPEN_BY_DEFAULT = false;
6227
6246
 
@@ -6333,6 +6352,7 @@ const serviceActions = slice$2.actions;
6333
6352
  *
6334
6353
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6335
6354
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
6355
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6336
6356
  * */
6337
6357
  const getServicesStore = store => store === null || store === void 0 ? void 0 : store.services;
6338
6358
  /**
@@ -6437,6 +6457,7 @@ var selectors$1 = /*#__PURE__*/Object.freeze({
6437
6457
  *
6438
6458
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6439
6459
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
6460
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6440
6461
  * */
6441
6462
 
6442
6463
  var types = /*#__PURE__*/Object.freeze({
@@ -6454,17 +6475,17 @@ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND
6454
6475
  return call$6.apply(apply$2, arguments);
6455
6476
  });
6456
6477
 
6457
- var uncurryThis$9 = functionUncurryThis;
6478
+ var uncurryThis$7 = functionUncurryThis;
6458
6479
 
6459
- var arraySlice$1 = uncurryThis$9([].slice);
6480
+ var arraySlice$1 = uncurryThis$7([].slice);
6460
6481
 
6461
- var uncurryThis$8 = functionUncurryThis;
6482
+ var uncurryThis$6 = functionUncurryThis;
6462
6483
  var isArray = isArray$2;
6463
6484
  var isCallable$5 = isCallable$k;
6464
6485
  var classof$2 = classofRaw$1;
6465
- var toString$7 = toString$9;
6486
+ var toString$5 = toString$7;
6466
6487
 
6467
- var push$1 = uncurryThis$8([].push);
6488
+ var push$1 = uncurryThis$6([].push);
6468
6489
 
6469
6490
  var getJsonReplacerFunction = function (replacer) {
6470
6491
  if (isCallable$5(replacer)) return replacer;
@@ -6474,7 +6495,7 @@ var getJsonReplacerFunction = function (replacer) {
6474
6495
  for (var i = 0; i < rawLength; i++) {
6475
6496
  var element = replacer[i];
6476
6497
  if (typeof element == 'string') push$1(keys, element);
6477
- else if (typeof element == 'number' || classof$2(element) === 'Number' || classof$2(element) === 'String') push$1(keys, toString$7(element));
6498
+ else if (typeof element == 'number' || classof$2(element) === 'Number' || classof$2(element) === 'String') push$1(keys, toString$5(element));
6478
6499
  }
6479
6500
  var keysLength = keys.length;
6480
6501
  var root = true;
@@ -6488,12 +6509,12 @@ var getJsonReplacerFunction = function (replacer) {
6488
6509
  };
6489
6510
  };
6490
6511
 
6491
- var $$4 = _export;
6512
+ var $$3 = _export;
6492
6513
  var getBuiltIn$2 = getBuiltIn$6;
6493
6514
  var apply$1 = functionApply;
6494
6515
  var call$5 = functionCall;
6495
- var uncurryThis$7 = functionUncurryThis;
6496
- var fails$8 = fails$n;
6516
+ var uncurryThis$5 = functionUncurryThis;
6517
+ var fails$7 = fails$m;
6497
6518
  var isCallable$4 = isCallable$k;
6498
6519
  var isSymbol = isSymbol$3;
6499
6520
  var arraySlice = arraySlice$1;
@@ -6502,17 +6523,17 @@ var NATIVE_SYMBOL = symbolConstructorDetection;
6502
6523
 
6503
6524
  var $String = String;
6504
6525
  var $stringify = getBuiltIn$2('JSON', 'stringify');
6505
- var exec$3 = uncurryThis$7(/./.exec);
6506
- var charAt$3 = uncurryThis$7(''.charAt);
6507
- var charCodeAt$1 = uncurryThis$7(''.charCodeAt);
6508
- var replace$3 = uncurryThis$7(''.replace);
6509
- var numberToString = uncurryThis$7(1.0.toString);
6526
+ var exec$2 = uncurryThis$5(/./.exec);
6527
+ var charAt$3 = uncurryThis$5(''.charAt);
6528
+ var charCodeAt$1 = uncurryThis$5(''.charCodeAt);
6529
+ var replace$2 = uncurryThis$5(''.replace);
6530
+ var numberToString = uncurryThis$5(1.0.toString);
6510
6531
 
6511
6532
  var tester = /[\uD800-\uDFFF]/g;
6512
6533
  var low = /^[\uD800-\uDBFF]$/;
6513
6534
  var hi = /^[\uDC00-\uDFFF]$/;
6514
6535
 
6515
- var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails$8(function () {
6536
+ var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails$7(function () {
6516
6537
  var symbol = getBuiltIn$2('Symbol')('stringify detection');
6517
6538
  // MS Edge converts symbol values to JSON as {}
6518
6539
  return $stringify([symbol]) !== '[null]'
@@ -6523,7 +6544,7 @@ var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails$8(function () {
6523
6544
  });
6524
6545
 
6525
6546
  // https://github.com/tc39/proposal-well-formed-stringify
6526
- var ILL_FORMED_UNICODE = fails$8(function () {
6547
+ var ILL_FORMED_UNICODE = fails$7(function () {
6527
6548
  return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"'
6528
6549
  || $stringify('\uDEAD') !== '"\\udead"';
6529
6550
  });
@@ -6543,7 +6564,7 @@ var stringifyWithSymbolsFix = function (it, replacer) {
6543
6564
  var fixIllFormed = function (match, offset, string) {
6544
6565
  var prev = charAt$3(string, offset - 1);
6545
6566
  var next = charAt$3(string, offset + 1);
6546
- if ((exec$3(low, match) && !exec$3(hi, next)) || (exec$3(hi, match) && !exec$3(low, prev))) {
6567
+ if ((exec$2(low, match) && !exec$2(hi, next)) || (exec$2(hi, match) && !exec$2(low, prev))) {
6547
6568
  return '\\u' + numberToString(charCodeAt$1(match, 0), 16);
6548
6569
  } return match;
6549
6570
  };
@@ -6551,12 +6572,12 @@ var fixIllFormed = function (match, offset, string) {
6551
6572
  if ($stringify) {
6552
6573
  // `JSON.stringify` method
6553
6574
  // https://tc39.es/ecma262/#sec-json.stringify
6554
- $$4({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
6575
+ $$3({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
6555
6576
  // eslint-disable-next-line no-unused-vars -- required for `.length`
6556
6577
  stringify: function stringify(it, replacer, space) {
6557
6578
  var args = arraySlice(arguments);
6558
6579
  var result = apply$1(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args);
6559
- return ILL_FORMED_UNICODE && typeof result == 'string' ? replace$3(result, tester, fixIllFormed) : result;
6580
+ return ILL_FORMED_UNICODE && typeof result == 'string' ? replace$2(result, tester, fixIllFormed) : result;
6560
6581
  }
6561
6582
  });
6562
6583
  }
@@ -6576,6 +6597,7 @@ if ($stringify) {
6576
6597
  *
6577
6598
  * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6578
6599
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
6600
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6579
6601
  * */
6580
6602
  const getUserAddedServices = () => {
6581
6603
  try {
@@ -6620,6 +6642,7 @@ const isNoIdService = param => {
6620
6642
  *
6621
6643
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6622
6644
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
6645
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6623
6646
  * */
6624
6647
  const {
6625
6648
  WmLayerWithoutTimeDimension,
@@ -6781,150 +6804,501 @@ var storeTestSettings = /*#__PURE__*/Object.freeze({
6781
6804
  styleListForRADNLOPERR25PCPRRL3KNMILayer: styleListForRADNLOPERR25PCPRRL3KNMILayer
6782
6805
  });
6783
6806
 
6784
- var defineProperty = objectDefineProperty.f;
6785
-
6786
- var proxyAccessor$1 = function (Target, Source, key) {
6787
- key in Target || defineProperty(Target, key, {
6788
- configurable: true,
6789
- get: function () { return Source[key]; },
6790
- set: function (it) { Source[key] = it; }
6791
- });
6792
- };
6793
-
6794
- var isCallable$3 = isCallable$k;
6795
- var isObject$1 = isObject$b;
6796
- var setPrototypeOf$1 = objectSetPrototypeOf;
6797
-
6798
- // makes subclassing work correct for wrapped built-ins
6799
- var inheritIfRequired$1 = function ($this, dummy, Wrapper) {
6800
- var NewTarget, NewTargetPrototype;
6801
- if (
6802
- // it can work only with native `setPrototypeOf`
6803
- setPrototypeOf$1 &&
6804
- // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
6805
- isCallable$3(NewTarget = dummy.constructor) &&
6806
- NewTarget !== Wrapper &&
6807
- isObject$1(NewTargetPrototype = NewTarget.prototype) &&
6808
- NewTargetPrototype !== Wrapper.prototype
6809
- ) setPrototypeOf$1($this, NewTargetPrototype);
6810
- return $this;
6811
- };
6807
+ function* setStepBackwardOrForwardSaga({
6808
+ payload
6809
+ }) {
6810
+ const {
6811
+ mapId,
6812
+ isForwardStep
6813
+ } = payload;
6814
+ const timeStep = yield select(getMapTimeStep, mapId);
6815
+ const currentTime = yield select(getSelectedTime, mapId);
6816
+ const [dataStartTime, dataEndTime] = yield select(getDataLimitsFromLayers, mapId);
6817
+ if (dateUtils.isValid(currentTime)) {
6818
+ const makeForwardStep = () => {
6819
+ const nextTime = currentTime + timeStep;
6820
+ const roundedTime = roundWithTimeStep(nextTime, timeStep, 'ceil');
6821
+ const newTime = Math.min(roundedTime, dataEndTime || roundedTime);
6822
+ return dateUtils.fromUnix(newTime).toISOString();
6823
+ };
6824
+ const makeBackwardStep = () => {
6825
+ const nextTime = currentTime - timeStep;
6826
+ const roundedTime = roundWithTimeStep(nextTime, timeStep, 'floor');
6827
+ const newTime = Math.max(roundedTime, dataStartTime || roundedTime);
6828
+ return dateUtils.fromUnix(newTime).toISOString();
6829
+ };
6830
+ const selectedTimeString = isForwardStep ? makeForwardStep() : makeBackwardStep();
6831
+ const isMapAnimating = yield select(isAnimating, mapId);
6832
+ if (isMapAnimating) {
6833
+ yield put(mapActions.mapStopAnimation({
6834
+ mapId,
6835
+ origin: MapActionOrigin.map
6836
+ }));
6837
+ }
6838
+ const isAutoUpdateOn = yield select(isAutoUpdating, mapId);
6839
+ if (isAutoUpdateOn) {
6840
+ yield put(mapActions.toggleAutoUpdate({
6841
+ mapId,
6842
+ shouldAutoUpdate: false
6843
+ }));
6844
+ }
6845
+ yield put(genericActions.setTime({
6846
+ origin: '',
6847
+ sourceId: mapId,
6848
+ value: handleDateUtilsISOString(selectedTimeString)
6849
+ }));
6850
+ }
6851
+ }
6852
+ function* rootSaga$2() {
6853
+ // resets IWMJSMap state
6854
+ yield takeEvery(mapActions.setStepBackwardOrForward.type, setStepBackwardOrForwardSaga);
6855
+ }
6812
6856
 
6813
- var toString$6 = toString$9;
6857
+ function* fetchServiceSaga(service) {
6858
+ try {
6859
+ const layers = yield call$e(getCapabilities.getLayersFlattenedFromService, service.serviceUrl);
6860
+ yield put(serviceActions.serviceSetLayers(Object.assign(Object.assign({}, service), {
6861
+ layers
6862
+ })));
6863
+ } catch (error) {
6864
+ // not implemented yet
6865
+ }
6866
+ }
6867
+ function* fetchInitialServicesSaga({
6868
+ payload
6869
+ }) {
6870
+ const {
6871
+ services
6872
+ } = payload;
6873
+ yield all(services.map(_a => {
6874
+ var {
6875
+ url
6876
+ } = _a,
6877
+ service = __rest(_a, ["url"]);
6878
+ return call$e(fetchServiceSaga, Object.assign(Object.assign({}, service), {
6879
+ serviceUrl: url
6880
+ }));
6881
+ }));
6882
+ }
6883
+ function* rootSaga$1() {
6884
+ yield takeEvery(serviceActions.fetchInitialServices, fetchInitialServicesSaga);
6885
+ }
6814
6886
 
6815
- var normalizeStringArgument$1 = function (argument, $default) {
6816
- return argument === undefined ? arguments.length < 2 ? '' : $default : toString$6(argument);
6887
+ /* A map with all the timerIds and their current step */
6888
+ const stepMap = new Map();
6889
+ /* A map with a list of timers and their dwell */
6890
+ const timerDwellMap = new Map();
6891
+ /**
6892
+ * Returns the next step for given timerId.
6893
+ * @param timerId The timer id
6894
+ * @param numberOfStepsInAnimation Animation length in steps
6895
+ * @param numStepsToGoForward Amount of steps to go forwards, defaults to 1. Can be positive and negative
6896
+ * @returns
6897
+ */
6898
+ const getNextStep = (timerId, numberOfStepsInAnimation, numStepsToGoForward = 1) => {
6899
+ const currentStep = getCurrentStep(timerId);
6900
+ const nextStep = currentStep + numStepsToGoForward;
6901
+ const nextStepClipped = (nextStep % numberOfStepsInAnimation + numberOfStepsInAnimation) % numberOfStepsInAnimation;
6902
+ return nextStepClipped;
6817
6903
  };
6818
-
6819
- var isObject = isObject$b;
6820
- var createNonEnumerableProperty$3 = createNonEnumerableProperty$8;
6821
-
6822
- // `InstallErrorCause` abstract operation
6823
- // https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
6824
- var installErrorCause$1 = function (O, options) {
6825
- if (isObject(options) && 'cause' in options) {
6826
- createNonEnumerableProperty$3(O, 'cause', options.cause);
6904
+ /**
6905
+ * Handles dwell at the end of the animation loop sequence. The number of steps to wait till proceed can be set by the dwell parameter.
6906
+ * @param timerId The timer id
6907
+ * @param numberOfStepsInAnimation Number of steps in the animation
6908
+ * @param dwell The number of steps to wait at the end of the animation sequence before to continue
6909
+ * @returns
6910
+ */
6911
+ const handleTimerDwell = (timerId, numberOfStepsInAnimation, dwell = 8) => {
6912
+ if (dwell > 0) {
6913
+ const currentStep = getCurrentStep(timerId);
6914
+ // Reset the dwell if we are not at the last animation step
6915
+ if (currentStep < numberOfStepsInAnimation - 1) {
6916
+ timerDwellMap.set(timerId, dwell);
6917
+ return false;
6918
+ }
6919
+ // We are at the last animation step, check the dwell
6920
+ const timerDwell = timerDwellMap.has(timerId) && timerDwellMap.get(timerId) || 0;
6921
+ if (currentStep === numberOfStepsInAnimation - 1 && timerDwell > 0) {
6922
+ timerDwellMap.set(timerId, timerDwell - 1);
6923
+ return true;
6924
+ }
6827
6925
  }
6926
+ return false;
6828
6927
  };
6829
-
6830
- var uncurryThis$6 = functionUncurryThis;
6831
-
6832
- var $Error = Error;
6833
- var replace$2 = uncurryThis$6(''.replace);
6834
-
6835
- var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
6836
- // eslint-disable-next-line redos/no-vulnerable -- safe
6837
- var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
6838
- var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
6839
-
6840
- var errorStackClear = function (stack, dropEntries) {
6841
- if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
6842
- while (dropEntries--) stack = replace$2(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
6843
- } return stack;
6928
+ /**
6929
+ * Set step for the timerId
6930
+ * @param timerId
6931
+ * @param timerStep
6932
+ */
6933
+ const setStep = (timerId, timerStep) => {
6934
+ stepMap.set(timerId, timerStep);
6844
6935
  };
6845
-
6846
- var fails$7 = fails$n;
6847
- var createPropertyDescriptor = createPropertyDescriptor$4;
6848
-
6849
- var errorStackInstallable = !fails$7(function () {
6850
- var error = new Error('a');
6851
- if (!('stack' in error)) return true;
6852
- // eslint-disable-next-line es/no-object-defineproperty -- safe
6853
- Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
6854
- return error.stack !== 7;
6855
- });
6856
-
6857
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$8;
6858
- var clearErrorStack = errorStackClear;
6859
- var ERROR_STACK_INSTALLABLE = errorStackInstallable;
6860
-
6861
- // non-standard V8
6862
- var captureStackTrace = Error.captureStackTrace;
6863
-
6864
- var errorStackInstall = function (error, C, stack, dropEntries) {
6865
- if (ERROR_STACK_INSTALLABLE) {
6866
- if (captureStackTrace) captureStackTrace(error, C);
6867
- else createNonEnumerableProperty$2(error, 'stack', clearErrorStack(stack, dropEntries));
6868
- }
6936
+ /**
6937
+ * Gets the current step for the timer
6938
+ * @param timerId
6939
+ * @returns
6940
+ */
6941
+ const getCurrentStep = timerId => {
6942
+ return stepMap.get(timerId) || 0;
6943
+ };
6944
+ const MAX_NUMBER_STEPS_FORWARD_TO_PREFETCH = 2;
6945
+ const MAX_NUMBER_OF_PARALLEL_LOADING_IMAGES = 8;
6946
+ /**
6947
+ * This prefetches all images connected to the same sync group as provided timerId
6948
+ * @param timerId The timerId
6949
+ * @param animationListValues List of animation steps in isostring to animate
6950
+ * @param targets List of targets to check
6951
+ * @returns True if all maps are ready to go forward, false if the map has no data to display yet.
6952
+ */
6953
+ const prefetchAnimationTargetsForMetronome = (timerId, animationListValues, targets) => {
6954
+ let timerShouldStepForward = true;
6955
+ // The following code prefetches/buffers for all maps in the group
6956
+ for (let numPrefetch = 0; numPrefetch < MAX_NUMBER_STEPS_FORWARD_TO_PREFETCH; numPrefetch += 1) {
6957
+ const nextStep = getNextStep(timerId, animationListValues.length, numPrefetch + 1);
6958
+ const nextTimeValueStepToCheck = animationListValues[nextStep];
6959
+ for (const target of targets) {
6960
+ const targetMapId = target.targetId;
6961
+ const wmMap = getWMJSMapById(targetMapId);
6962
+ if (!wmMap) {
6963
+ return true; // Map was not registered so there is nothing to prefetch, do not block going forward
6964
+ }
6965
+ const layersImageUrls = getWMSRequests(wmMap, [{
6966
+ name: 'time',
6967
+ currentValue: nextTimeValueStepToCheck
6968
+ }]);
6969
+ for (const layersImageUrl of layersImageUrls) {
6970
+ const image = wmMap.getMapImageStore.getImage(layersImageUrl.url);
6971
+ if (!image.isLoaded()) {
6972
+ if (wmMap.getMapImageStore.getNumImagesLoading() < MAX_NUMBER_OF_PARALLEL_LOADING_IMAGES) {
6973
+ image.load();
6974
+ }
6975
+ if (numPrefetch === 0) {
6976
+ const altImage = wmMap.getAlternativeImage(layersImageUrl.url, wmMap.getBBOX(), true);
6977
+ // No alternative image available yet, so skipping animation.
6978
+ if (altImage.length === 0) {
6979
+ // This is useful to indicate that the map is loading and has nothing yet to display.
6980
+ // console.warn('No data available: Not stepping forward');
6981
+ timerShouldStepForward = false;
6982
+ }
6983
+ }
6984
+ } else if (image.isStale()) {
6985
+ if (wmMap.getMapImageStore.getNumImagesLoading() < MAX_NUMBER_OF_PARALLEL_LOADING_IMAGES) {
6986
+ image.forceReload(true);
6987
+ }
6988
+ }
6989
+ }
6990
+ }
6991
+ }
6992
+ return timerShouldStepForward;
6869
6993
  };
6870
6994
 
6871
- var getBuiltIn$1 = getBuiltIn$6;
6872
- var hasOwn = hasOwnProperty_1;
6873
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$8;
6874
- var isPrototypeOf = objectIsPrototypeOf;
6875
- var setPrototypeOf = objectSetPrototypeOf;
6876
- var copyConstructorProperties = copyConstructorProperties$2;
6877
- var proxyAccessor = proxyAccessor$1;
6878
- var inheritIfRequired = inheritIfRequired$1;
6879
- var normalizeStringArgument = normalizeStringArgument$1;
6880
- var installErrorCause = installErrorCause$1;
6881
- var installErrorStack = errorStackInstall;
6882
- var DESCRIPTORS = descriptors;
6883
-
6884
- var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
6885
- var STACK_TRACE_LIMIT = 'stackTraceLimit';
6886
- var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
6887
- var path = FULL_NAME.split('.');
6888
- var ERROR_NAME = path[path.length - 1];
6889
- var OriginalError = getBuiltIn$1.apply(null, path);
6995
+ /**
6996
+ * This handler is triggered by the metronome. An array of timerIds is given as argument.
6997
+ * It will update the animation loop of multiple maps and sliders
6998
+ * It will prefetch images for maps
6999
+ * @param timerIds string[] array of timerIds
7000
+ * @param listenerApi ListenerEffectAPI<CoreAppStore, Dispatch, unknown> listenerApi as received from listener
7001
+ */
7002
+ const metronomeHandler = (timerIds, listenerApi) => {
7003
+ const targetsWithUpdateValue = [];
7004
+ for (const timerId of timerIds) {
7005
+ const animationListValuesNameAndValue = getAnimationList(listenerApi.getState(), timerId);
7006
+ const animationListValues = animationListValuesNameAndValue.map(nameAndValue => nameAndValue.value);
7007
+ const targets = getTargets(listenerApi.getState(), {
7008
+ sourceId: timerId,
7009
+ origin: timerId
7010
+ }, SYNCGROUPS_TYPE_SETTIME);
7011
+ if (targets.length === 0) {
7012
+ // When there are no targets, default to one
7013
+ targets.push({
7014
+ targetId: timerId,
7015
+ value: ''
7016
+ });
7017
+ }
7018
+ const timerIsInDwell = handleTimerDwell(timerId, animationListValues.length);
7019
+ const timerShouldStepForward = prefetchAnimationTargetsForMetronome(timerId, animationListValues, targets) && !timerIsInDwell;
7020
+ // Determine the next step
7021
+ const timerStep = timerShouldStepForward ? getNextStep(timerId, animationListValues.length) : getCurrentStep(timerId);
7022
+ setStep(timerId, timerStep);
7023
+ const updatedValue = animationListValues[timerStep];
7024
+ targetsWithUpdateValue.push(...targets.map(target => {
7025
+ return Object.assign(Object.assign({}, target), {
7026
+ value: updatedValue
7027
+ });
7028
+ }));
7029
+ const speedDelay = getMapAnimationDelay(listenerApi.getState(), timerId);
7030
+ const speed = 1000 / (speedDelay || 1);
7031
+ metronome.setSpeed(timerId, speed);
7032
+ }
7033
+ // Update all targets of all sync groups in one action.
7034
+ if (targetsWithUpdateValue.length > 0) {
7035
+ listenerApi.dispatch(setTimeSync(null, targetsWithUpdateValue, ['metronomesaga']));
7036
+ }
7037
+ };
7038
+ const metronomeListener = createListenerMiddleware();
7039
+ metronomeListener.startListening({
7040
+ actionCreator: mapActions.mapStartAnimation,
7041
+ effect: (_, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
7042
+ // register handler with access to listenerApi
7043
+ metronome.handleTimerTicks = timerIds => {
7044
+ metronomeHandler(timerIds, listenerApi);
7045
+ };
7046
+ })
7047
+ });
6890
7048
 
6891
- if (!OriginalError) return;
7049
+ /* *
7050
+ * Licensed under the Apache License, Version 2.0 (the "License");
7051
+ * you may not use this file except in compliance with the License.
7052
+ * You may obtain a copy of the License at
7053
+ *
7054
+ * http://www.apache.org/licenses/LICENSE-2.0
7055
+ *
7056
+ * Unless required by applicable law or agreed to in writing, software
7057
+ * distributed under the License is distributed on an "AS IS" BASIS,
7058
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7059
+ * See the License for the specific language governing permissions and
7060
+ * limitations under the License.
7061
+ *
7062
+ * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7063
+ * Copyright 2024 - Finnish Meteorological Institute (FMI)
7064
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
7065
+ * */
7066
+ const layersListener = createListenerMiddleware();
7067
+ layersListener.startListening({
7068
+ actionCreator: layerActions.showLayerInfo,
7069
+ effect: ({
7070
+ payload
7071
+ }, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
7072
+ const {
7073
+ mapId,
7074
+ source
7075
+ } = payload;
7076
+ const currentActiveMapId = getDialogMapId(listenerApi.getState(), DialogTypes.LayerInfo);
7077
+ const isOpenInStore = getisDialogOpen(listenerApi.getState(), DialogTypes.LayerInfo);
7078
+ if (currentActiveMapId !== mapId ? true : !isOpenInStore) {
7079
+ listenerApi.dispatch(uiActions.setActiveMapIdForDialog({
7080
+ type: DialogTypes.LayerInfo,
7081
+ mapId,
7082
+ setOpen: true,
7083
+ source
7084
+ }));
7085
+ }
7086
+ })
7087
+ });
7088
+ layersListener.startListening({
7089
+ actionCreator: uiActions.setToggleOpenDialog,
7090
+ effect: ({
7091
+ payload
7092
+ }, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
7093
+ const {
7094
+ setOpen,
7095
+ type
7096
+ } = payload;
7097
+ // close LayerInfo if open and LayerManager is closed
7098
+ if (type === DialogTypes.LayerManager && !setOpen) {
7099
+ const isOpenInStore = getisDialogOpen(listenerApi.getState(), DialogTypes.LayerInfo);
7100
+ if (isOpenInStore) {
7101
+ listenerApi.dispatch(layerActions.hideLayerInfo());
7102
+ }
7103
+ }
7104
+ })
7105
+ });
6892
7106
 
6893
- var OriginalErrorPrototype = OriginalError.prototype;
7107
+ const mapUiListener = createListenerMiddleware();
7108
+ mapUiListener.startListening({
7109
+ actionCreator: mapActions.registerMap,
7110
+ effect: (_, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
7111
+ const fields = getAllMapIds(listenerApi.getState());
7112
+ if (fields.length === 1) {
7113
+ const source = getDialogSource(listenerApi.getState(), 'legend');
7114
+ listenerApi.dispatch(uiActions.setActiveMapIdForDialog({
7115
+ type: 'legend',
7116
+ mapId: fields[0],
7117
+ setOpen: true,
7118
+ source
7119
+ }));
7120
+ }
7121
+ })
7122
+ });
7123
+ mapUiListener.startListening({
7124
+ actionCreator: mapActions.unregisterMap,
7125
+ effect: ({
7126
+ payload
7127
+ }, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
7128
+ const fields = getAllMapIds(listenerApi.getState());
7129
+ const activeLegendUI = getDialogDetailsByType(listenerApi.getState(), 'legend');
7130
+ if (fields.length && activeLegendUI && !fields.includes(activeLegendUI.activeMapId)) {
7131
+ listenerApi.dispatch(uiActions.setActiveMapIdForDialog({
7132
+ type: 'legend',
7133
+ mapId: fields[0],
7134
+ setOpen: activeLegendUI.isOpen
7135
+ }));
7136
+ } else if (!fields.length) {
7137
+ // if no more maps, we hide the legend
7138
+ listenerApi.dispatch(uiActions.setToggleOpenDialog({
7139
+ type: 'legend',
7140
+ setOpen: false
7141
+ }));
7142
+ }
7143
+ // close any remaining windows with map assigned to it
7144
+ const remainingDialogsConnectedToMap = getUiDialogsByActiveMapId(listenerApi.getState(), payload.mapId);
7145
+ if (remainingDialogsConnectedToMap.length) {
7146
+ remainingDialogsConnectedToMap.forEach(dialog => {
7147
+ if (dialog.isOpen) {
7148
+ listenerApi.dispatch(uiActions.setToggleOpenDialog({
7149
+ type: dialog.type,
7150
+ setOpen: false
7151
+ }));
7152
+ }
7153
+ });
7154
+ }
7155
+ })
7156
+ });
6894
7157
 
6895
- // V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
6896
- if (hasOwn(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
7158
+ var defineProperty = objectDefineProperty.f;
6897
7159
 
6898
- if (!FORCED) return OriginalError;
7160
+ var proxyAccessor$1 = function (Target, Source, key) {
7161
+ key in Target || defineProperty(Target, key, {
7162
+ configurable: true,
7163
+ get: function () { return Source[key]; },
7164
+ set: function (it) { Source[key] = it; }
7165
+ });
7166
+ };
6899
7167
 
6900
- var BaseError = getBuiltIn$1('Error');
7168
+ var isCallable$3 = isCallable$k;
7169
+ var isObject$1 = isObject$b;
7170
+ var setPrototypeOf$1 = objectSetPrototypeOf;
6901
7171
 
6902
- var WrappedError = wrapper(function (a, b) {
6903
- var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
6904
- var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
6905
- if (message !== undefined) createNonEnumerableProperty$1(result, 'message', message);
6906
- installErrorStack(result, WrappedError, result.stack, 2);
6907
- if (this && isPrototypeOf(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);
6908
- if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
6909
- return result;
6910
- });
7172
+ // makes subclassing work correct for wrapped built-ins
7173
+ var inheritIfRequired$1 = function ($this, dummy, Wrapper) {
7174
+ var NewTarget, NewTargetPrototype;
7175
+ if (
7176
+ // it can work only with native `setPrototypeOf`
7177
+ setPrototypeOf$1 &&
7178
+ // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
7179
+ isCallable$3(NewTarget = dummy.constructor) &&
7180
+ NewTarget !== Wrapper &&
7181
+ isObject$1(NewTargetPrototype = NewTarget.prototype) &&
7182
+ NewTargetPrototype !== Wrapper.prototype
7183
+ ) setPrototypeOf$1($this, NewTargetPrototype);
7184
+ return $this;
7185
+ };
6911
7186
 
6912
- WrappedError.prototype = OriginalErrorPrototype;
7187
+ var toString$4 = toString$7;
6913
7188
 
6914
- if (ERROR_NAME !== 'Error') {
6915
- if (setPrototypeOf) setPrototypeOf(WrappedError, BaseError);
6916
- else copyConstructorProperties(WrappedError, BaseError, { name: true });
6917
- } else if (DESCRIPTORS && STACK_TRACE_LIMIT in OriginalError) {
6918
- proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);
6919
- proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');
6920
- }
7189
+ var normalizeStringArgument$1 = function (argument, $default) {
7190
+ return argument === undefined ? arguments.length < 2 ? '' : $default : toString$4(argument);
7191
+ };
6921
7192
 
6922
- copyConstructorProperties(WrappedError, OriginalError);
7193
+ var isObject = isObject$b;
7194
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$8;
6923
7195
 
6924
- try {
6925
- // Safari 13- bug: WebAssembly errors does not have a proper `.name`
6926
- if (OriginalErrorPrototype.name !== ERROR_NAME) {
6927
- createNonEnumerableProperty$1(OriginalErrorPrototype, 'name', ERROR_NAME);
7196
+ // `InstallErrorCause` abstract operation
7197
+ // https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
7198
+ var installErrorCause$1 = function (O, options) {
7199
+ if (isObject(options) && 'cause' in options) {
7200
+ createNonEnumerableProperty$3(O, 'cause', options.cause);
7201
+ }
7202
+ };
7203
+
7204
+ var uncurryThis$4 = functionUncurryThis;
7205
+
7206
+ var $Error = Error;
7207
+ var replace$1 = uncurryThis$4(''.replace);
7208
+
7209
+ var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
7210
+ // eslint-disable-next-line redos/no-vulnerable -- safe
7211
+ var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
7212
+ var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
7213
+
7214
+ var errorStackClear = function (stack, dropEntries) {
7215
+ if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
7216
+ while (dropEntries--) stack = replace$1(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
7217
+ } return stack;
7218
+ };
7219
+
7220
+ var fails$6 = fails$m;
7221
+ var createPropertyDescriptor = createPropertyDescriptor$4;
7222
+
7223
+ var errorStackInstallable = !fails$6(function () {
7224
+ var error = new Error('a');
7225
+ if (!('stack' in error)) return true;
7226
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
7227
+ Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
7228
+ return error.stack !== 7;
7229
+ });
7230
+
7231
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$8;
7232
+ var clearErrorStack = errorStackClear;
7233
+ var ERROR_STACK_INSTALLABLE = errorStackInstallable;
7234
+
7235
+ // non-standard V8
7236
+ var captureStackTrace = Error.captureStackTrace;
7237
+
7238
+ var errorStackInstall = function (error, C, stack, dropEntries) {
7239
+ if (ERROR_STACK_INSTALLABLE) {
7240
+ if (captureStackTrace) captureStackTrace(error, C);
7241
+ else createNonEnumerableProperty$2(error, 'stack', clearErrorStack(stack, dropEntries));
7242
+ }
7243
+ };
7244
+
7245
+ var getBuiltIn$1 = getBuiltIn$6;
7246
+ var hasOwn = hasOwnProperty_1;
7247
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$8;
7248
+ var isPrototypeOf = objectIsPrototypeOf;
7249
+ var setPrototypeOf = objectSetPrototypeOf;
7250
+ var copyConstructorProperties = copyConstructorProperties$2;
7251
+ var proxyAccessor = proxyAccessor$1;
7252
+ var inheritIfRequired = inheritIfRequired$1;
7253
+ var normalizeStringArgument = normalizeStringArgument$1;
7254
+ var installErrorCause = installErrorCause$1;
7255
+ var installErrorStack = errorStackInstall;
7256
+ var DESCRIPTORS = descriptors;
7257
+
7258
+ var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
7259
+ var STACK_TRACE_LIMIT = 'stackTraceLimit';
7260
+ var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
7261
+ var path = FULL_NAME.split('.');
7262
+ var ERROR_NAME = path[path.length - 1];
7263
+ var OriginalError = getBuiltIn$1.apply(null, path);
7264
+
7265
+ if (!OriginalError) return;
7266
+
7267
+ var OriginalErrorPrototype = OriginalError.prototype;
7268
+
7269
+ // V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
7270
+ if (hasOwn(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
7271
+
7272
+ if (!FORCED) return OriginalError;
7273
+
7274
+ var BaseError = getBuiltIn$1('Error');
7275
+
7276
+ var WrappedError = wrapper(function (a, b) {
7277
+ var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
7278
+ var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
7279
+ if (message !== undefined) createNonEnumerableProperty$1(result, 'message', message);
7280
+ installErrorStack(result, WrappedError, result.stack, 2);
7281
+ if (this && isPrototypeOf(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);
7282
+ if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
7283
+ return result;
7284
+ });
7285
+
7286
+ WrappedError.prototype = OriginalErrorPrototype;
7287
+
7288
+ if (ERROR_NAME !== 'Error') {
7289
+ if (setPrototypeOf) setPrototypeOf(WrappedError, BaseError);
7290
+ else copyConstructorProperties(WrappedError, BaseError, { name: true });
7291
+ } else if (DESCRIPTORS && STACK_TRACE_LIMIT in OriginalError) {
7292
+ proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);
7293
+ proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');
7294
+ }
7295
+
7296
+ copyConstructorProperties(WrappedError, OriginalError);
7297
+
7298
+ try {
7299
+ // Safari 13- bug: WebAssembly errors does not have a proper `.name`
7300
+ if (OriginalErrorPrototype.name !== ERROR_NAME) {
7301
+ createNonEnumerableProperty$1(OriginalErrorPrototype, 'name', ERROR_NAME);
6928
7302
  }
6929
7303
  OriginalErrorPrototype.constructor = WrappedError;
6930
7304
  } catch (error) { /* empty */ }
@@ -6933,28 +7307,28 @@ var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_A
6933
7307
  };
6934
7308
 
6935
7309
  /* eslint-disable no-unused-vars -- required for functions `.length` */
6936
- var $$3 = _export;
6937
- var global$5 = global$h;
7310
+ var $$2 = _export;
7311
+ var global$4 = global$g;
6938
7312
  var apply = functionApply;
6939
7313
  var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
6940
7314
 
6941
7315
  var WEB_ASSEMBLY = 'WebAssembly';
6942
- var WebAssembly = global$5[WEB_ASSEMBLY];
7316
+ var WebAssembly = global$4[WEB_ASSEMBLY];
6943
7317
 
6944
7318
  // eslint-disable-next-line es/no-error-cause -- feature detection
6945
- var FORCED$1 = new Error('e', { cause: 7 }).cause !== 7;
7319
+ var FORCED = new Error('e', { cause: 7 }).cause !== 7;
6946
7320
 
6947
7321
  var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
6948
7322
  var O = {};
6949
- O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED$1);
6950
- $$3({ global: true, constructor: true, arity: 1, forced: FORCED$1 }, O);
7323
+ O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED);
7324
+ $$2({ global: true, constructor: true, arity: 1, forced: FORCED }, O);
6951
7325
  };
6952
7326
 
6953
7327
  var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
6954
7328
  if (WebAssembly && WebAssembly[ERROR_NAME]) {
6955
7329
  var O = {};
6956
- O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED$1);
6957
- $$3({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED$1 }, O);
7330
+ O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED);
7331
+ $$2({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED }, O);
6958
7332
  }
6959
7333
  };
6960
7334
 
@@ -6990,73 +7364,6 @@ exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
6990
7364
  return function RuntimeError(message) { return apply(init, this, arguments); };
6991
7365
  });
6992
7366
 
6993
- // a string of all valid unicode whitespaces
6994
- var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
6995
- '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
6996
-
6997
- var uncurryThis$5 = functionUncurryThis;
6998
- var requireObjectCoercible$2 = requireObjectCoercible$7;
6999
- var toString$5 = toString$9;
7000
- var whitespaces$1 = whitespaces$2;
7001
-
7002
- var replace$1 = uncurryThis$5(''.replace);
7003
- var ltrim = RegExp('^[' + whitespaces$1 + ']+');
7004
- var rtrim = RegExp('(^|[^' + whitespaces$1 + '])[' + whitespaces$1 + ']+$');
7005
-
7006
- // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
7007
- var createMethod$1 = function (TYPE) {
7008
- return function ($this) {
7009
- var string = toString$5(requireObjectCoercible$2($this));
7010
- if (TYPE & 1) string = replace$1(string, ltrim, '');
7011
- if (TYPE & 2) string = replace$1(string, rtrim, '$1');
7012
- return string;
7013
- };
7014
- };
7015
-
7016
- var stringTrim = {
7017
- // `String.prototype.{ trimLeft, trimStart }` methods
7018
- // https://tc39.es/ecma262/#sec-string.prototype.trimstart
7019
- start: createMethod$1(1),
7020
- // `String.prototype.{ trimRight, trimEnd }` methods
7021
- // https://tc39.es/ecma262/#sec-string.prototype.trimend
7022
- end: createMethod$1(2),
7023
- // `String.prototype.trim` method
7024
- // https://tc39.es/ecma262/#sec-string.prototype.trim
7025
- trim: createMethod$1(3)
7026
- };
7027
-
7028
- var global$4 = global$h;
7029
- var fails$6 = fails$n;
7030
- var uncurryThis$4 = functionUncurryThis;
7031
- var toString$4 = toString$9;
7032
- var trim = stringTrim.trim;
7033
- var whitespaces = whitespaces$2;
7034
-
7035
- var $parseInt$1 = global$4.parseInt;
7036
- var Symbol$1 = global$4.Symbol;
7037
- var ITERATOR = Symbol$1 && Symbol$1.iterator;
7038
- var hex = /^[+-]?0x/i;
7039
- var exec$2 = uncurryThis$4(hex.exec);
7040
- var FORCED = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
7041
- // MS Edge 18- broken with boxed symbols
7042
- || (ITERATOR && !fails$6(function () { $parseInt$1(Object(ITERATOR)); }));
7043
-
7044
- // `parseInt` method
7045
- // https://tc39.es/ecma262/#sec-parseint-string-radix
7046
- var numberParseInt = FORCED ? function parseInt(string, radix) {
7047
- var S = trim(toString$4(string));
7048
- return $parseInt$1(S, (radix >>> 0) || (exec$2(hex, S) ? 16 : 10));
7049
- } : $parseInt$1;
7050
-
7051
- var $$2 = _export;
7052
- var $parseInt = numberParseInt;
7053
-
7054
- // `parseInt` method
7055
- // https://tc39.es/ecma262/#sec-parseint-string-radix
7056
- $$2({ global: true, forced: parseInt !== $parseInt }, {
7057
- parseInt: $parseInt
7058
- });
7059
-
7060
7367
  var anObject$4 = anObject$9;
7061
7368
 
7062
7369
  // `RegExp.prototype.flags` getter implementation
@@ -7075,8 +7382,8 @@ var regexpFlags$1 = function () {
7075
7382
  return result;
7076
7383
  };
7077
7384
 
7078
- var fails$5 = fails$n;
7079
- var global$3 = global$h;
7385
+ var fails$5 = fails$m;
7386
+ var global$3 = global$g;
7080
7387
 
7081
7388
  // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
7082
7389
  var $RegExp$2 = global$3.RegExp;
@@ -7106,8 +7413,8 @@ var regexpStickyHelpers = {
7106
7413
  UNSUPPORTED_Y: UNSUPPORTED_Y$2
7107
7414
  };
7108
7415
 
7109
- var fails$4 = fails$n;
7110
- var global$2 = global$h;
7416
+ var fails$4 = fails$m;
7417
+ var global$2 = global$g;
7111
7418
 
7112
7419
  // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
7113
7420
  var $RegExp$1 = global$2.RegExp;
@@ -7117,8 +7424,8 @@ var regexpUnsupportedDotAll = fails$4(function () {
7117
7424
  return !(re.dotAll && re.test('\n') && re.flags === 's');
7118
7425
  });
7119
7426
 
7120
- var fails$3 = fails$n;
7121
- var global$1 = global$h;
7427
+ var fails$3 = fails$m;
7428
+ var global$1 = global$g;
7122
7429
 
7123
7430
  // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
7124
7431
  var $RegExp = global$1.RegExp;
@@ -7133,7 +7440,7 @@ var regexpUnsupportedNcg = fails$3(function () {
7133
7440
  /* eslint-disable regexp/no-useless-quantifier -- testing */
7134
7441
  var call$4 = functionCall;
7135
7442
  var uncurryThis$3 = functionUncurryThis;
7136
- var toString$3 = toString$9;
7443
+ var toString$3 = toString$7;
7137
7444
  var regexpFlags = regexpFlags$1;
7138
7445
  var stickyHelpers$1 = regexpStickyHelpers;
7139
7446
  var shared = shared$4;
@@ -7261,7 +7568,7 @@ var $ = _export;
7261
7568
  var call$3 = functionCall;
7262
7569
  var isCallable$2 = isCallable$k;
7263
7570
  var anObject$3 = anObject$9;
7264
- var toString$2 = toString$9;
7571
+ var toString$2 = toString$7;
7265
7572
 
7266
7573
  var DELEGATES_TO_EXEC = function () {
7267
7574
  var execCalled = false;
@@ -7295,7 +7602,7 @@ $({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
7295
7602
  var call$2 = functionCall;
7296
7603
  var defineBuiltIn = defineBuiltIn$4;
7297
7604
  var regexpExec$1 = regexpExec$2;
7298
- var fails$2 = fails$n;
7605
+ var fails$2 = fails$m;
7299
7606
  var wellKnownSymbol$1 = wellKnownSymbol$c;
7300
7607
  var createNonEnumerableProperty = createNonEnumerableProperty$8;
7301
7608
 
@@ -7367,7 +7674,7 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
7367
7674
  };
7368
7675
 
7369
7676
  var uncurryThis$2 = functionUncurryThis;
7370
- var fails$1 = fails$n;
7677
+ var fails$1 = fails$m;
7371
7678
  var isCallable$1 = isCallable$k;
7372
7679
  var classof$1 = classof$4;
7373
7680
  var getBuiltIn = getBuiltIn$6;
@@ -7446,8 +7753,8 @@ var speciesConstructor$1 = function (O, defaultConstructor) {
7446
7753
 
7447
7754
  var uncurryThis$1 = functionUncurryThis;
7448
7755
  var toIntegerOrInfinity = toIntegerOrInfinity$3;
7449
- var toString$1 = toString$9;
7450
- var requireObjectCoercible$1 = requireObjectCoercible$7;
7756
+ var toString$1 = toString$7;
7757
+ var requireObjectCoercible$1 = requireObjectCoercible$6;
7451
7758
 
7452
7759
  var charAt$1 = uncurryThis$1(''.charAt);
7453
7760
  var charCodeAt = uncurryThis$1(''.charCodeAt);
@@ -7515,15 +7822,15 @@ var uncurryThis = functionUncurryThis;
7515
7822
  var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
7516
7823
  var anObject = anObject$9;
7517
7824
  var isNullOrUndefined = isNullOrUndefined$4;
7518
- var requireObjectCoercible = requireObjectCoercible$7;
7825
+ var requireObjectCoercible = requireObjectCoercible$6;
7519
7826
  var speciesConstructor = speciesConstructor$1;
7520
7827
  var advanceStringIndex = advanceStringIndex$1;
7521
7828
  var toLength = toLength$2;
7522
- var toString = toString$9;
7829
+ var toString = toString$7;
7523
7830
  var getMethod = getMethod$2;
7524
7831
  var regExpExec = regexpExecAbstract;
7525
7832
  var stickyHelpers = regexpStickyHelpers;
7526
- var fails = fails$n;
7833
+ var fails = fails$m;
7527
7834
 
7528
7835
  var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
7529
7836
  var MAX_UINT32 = 0xFFFFFFFF;
@@ -7534,738 +7841,103 @@ var stringSlice = uncurryThis(''.slice);
7534
7841
  // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
7535
7842
  // Weex JS has frozen built-in prototypes, so use try / catch wrapper
7536
7843
  var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
7537
- // eslint-disable-next-line regexp/no-empty-group -- required for testing
7538
- var re = /(?:)/;
7539
- var originalExec = re.exec;
7540
- re.exec = function () { return originalExec.apply(this, arguments); };
7541
- var result = 'ab'.split(re);
7542
- return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
7543
- });
7544
-
7545
- var BUGGY = 'abbc'.split(/(b)*/)[1] === 'c' ||
7546
- // eslint-disable-next-line regexp/no-empty-group -- required for testing
7547
- 'test'.split(/(?:)/, -1).length !== 4 ||
7548
- 'ab'.split(/(?:ab)*/).length !== 2 ||
7549
- '.'.split(/(.?)(.?)/).length !== 4 ||
7550
- // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
7551
- '.'.split(/()()/).length > 1 ||
7552
- ''.split(/.?/).length;
7553
-
7554
- // @@split logic
7555
- fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {
7556
- var internalSplit = '0'.split(undefined, 0).length ? function (separator, limit) {
7557
- return separator === undefined && limit === 0 ? [] : call(nativeSplit, this, separator, limit);
7558
- } : nativeSplit;
7559
-
7560
- return [
7561
- // `String.prototype.split` method
7562
- // https://tc39.es/ecma262/#sec-string.prototype.split
7563
- function split(separator, limit) {
7564
- var O = requireObjectCoercible(this);
7565
- var splitter = isNullOrUndefined(separator) ? undefined : getMethod(separator, SPLIT);
7566
- return splitter
7567
- ? call(splitter, separator, O, limit)
7568
- : call(internalSplit, toString(O), separator, limit);
7569
- },
7570
- // `RegExp.prototype[@@split]` method
7571
- // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
7572
- //
7573
- // NOTE: This cannot be properly polyfilled in engines that don't support
7574
- // the 'y' flag.
7575
- function (string, limit) {
7576
- var rx = anObject(this);
7577
- var S = toString(string);
7578
-
7579
- if (!BUGGY) {
7580
- var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
7581
- if (res.done) return res.value;
7582
- }
7583
-
7584
- var C = speciesConstructor(rx, RegExp);
7585
- var unicodeMatching = rx.unicode;
7586
- var flags = (rx.ignoreCase ? 'i' : '') +
7587
- (rx.multiline ? 'm' : '') +
7588
- (rx.unicode ? 'u' : '') +
7589
- (UNSUPPORTED_Y ? 'g' : 'y');
7590
- // ^(? + rx + ) is needed, in combination with some S slicing, to
7591
- // simulate the 'y' flag.
7592
- var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
7593
- var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
7594
- if (lim === 0) return [];
7595
- if (S.length === 0) return regExpExec(splitter, S) === null ? [S] : [];
7596
- var p = 0;
7597
- var q = 0;
7598
- var A = [];
7599
- while (q < S.length) {
7600
- splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
7601
- var z = regExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S);
7602
- var e;
7603
- if (
7604
- z === null ||
7605
- (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p
7606
- ) {
7607
- q = advanceStringIndex(S, q, unicodeMatching);
7608
- } else {
7609
- push(A, stringSlice(S, p, q));
7610
- if (A.length === lim) return A;
7611
- for (var i = 1; i <= z.length - 1; i++) {
7612
- push(A, z[i]);
7613
- if (A.length === lim) return A;
7614
- }
7615
- q = p = e;
7616
- }
7617
- }
7618
- push(A, stringSlice(S, p));
7619
- return A;
7620
- }
7621
- ];
7622
- }, BUGGY || !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
7623
-
7624
- const isAnimationEndTimeValid = animationEndTime => {
7625
- const hasValidPrefix = animationEndTime.split(/[-+]/)[0] === 'NOW' || animationEndTime.split(/[-+]/)[0] === 'TODAY';
7626
- const durationString = animationEndTime.substring(animationEndTime.indexOf('PT') + 2);
7627
- const hasValidDate = /^(\d+H)?(\d+M)?$/.test(durationString);
7628
- if (hasValidPrefix && hasValidDate) {
7629
- return true;
7630
- }
7631
- const parsedDate = dateUtils.parseISO(animationEndTime);
7632
- return dateUtils.isValid(parsedDate);
7633
- };
7634
- function* handleBaseLayersSaga(mapId, baseLayers) {
7635
- const baseLayer = baseLayers.find(layer => layer.layerType === 'baseLayer');
7636
- const currentAvailableBaseLayers = yield select(getAvailableBaseLayersForMap, mapId);
7637
- // find a availableBaseLayer with the same name, and use that id for the active baselayer
7638
- const activeAvailableBaseLayer = currentAvailableBaseLayers.find(availableBaseLayer => availableBaseLayer.name === baseLayer.name);
7639
- const activeBaseLayerId = activeAvailableBaseLayer ? activeAvailableBaseLayer.id : webmapUtils.generateLayerId();
7640
- // if the baseLayer can't be found in a visible available baseLayer list, add it
7641
- if (!activeAvailableBaseLayer && currentAvailableBaseLayers.length) {
7642
- yield put(layerActions.addAvailableBaseLayers({
7643
- // TODO: remove type casting in https://gitlab.com/opengeoweb/opengeoweb/-/issues/1884
7644
- layers: [Object.assign(Object.assign({}, baseLayer), {
7645
- mapId,
7646
- id: activeBaseLayerId
7647
- })]
7648
- }));
7649
- }
7650
- const baseLayersWithActiveId = baseLayers.map((layer, index) => index === 0 ? Object.assign(Object.assign({}, layer), {
7651
- id: activeBaseLayerId || layer.id
7652
- }) : layer);
7653
- yield put(layerActions.setBaseLayers({
7654
- mapId,
7655
- // TODO: remove type casting in https://gitlab.com/opengeoweb/opengeoweb/-/issues/1884
7656
- layers: baseLayersWithActiveId
7657
- }));
7658
- }
7659
- function* setMapPresetSaga({
7660
- payload
7661
- }) {
7662
- var _a, _b, _c;
7663
- try {
7664
- const {
7665
- mapId,
7666
- initialProps
7667
- } = payload;
7668
- const {
7669
- mapPreset
7670
- } = initialProps;
7671
- if (mapPreset) {
7672
- const {
7673
- layers,
7674
- activeLayerId,
7675
- autoTimeStepLayerId,
7676
- autoUpdateLayerId,
7677
- proj,
7678
- shouldAutoUpdate,
7679
- shouldAnimate,
7680
- animationPayload,
7681
- toggleTimestepAuto,
7682
- showTimeSlider,
7683
- displayMapPin,
7684
- shouldShowZoomControls,
7685
- shouldShowLegend,
7686
- dockedLayerManagerSize
7687
- } = mapPreset;
7688
- const {
7689
- mapLayers,
7690
- baseLayers,
7691
- overLayers
7692
- } = filterLayers(layers);
7693
- if (layers) {
7694
- // make sure all layers have a unique id before going forward
7695
- let autoTimeStepLayerIdNew = autoTimeStepLayerId;
7696
- let autoUpdateLayerIdNew = autoUpdateLayerId;
7697
- const onlyActiveLayerIdIsSet = !autoTimeStepLayerId && !autoUpdateLayerId && activeLayerId;
7698
- if (onlyActiveLayerIdIsSet) {
7699
- autoTimeStepLayerIdNew = activeLayerId;
7700
- autoUpdateLayerIdNew = activeLayerId;
7701
- }
7702
- const newLayerIds = yield call$e(replaceLayerIdsToEnsureUniqueLayerIdsInStore, {
7703
- layers: mapLayers,
7704
- autoTimeStepLayerId: autoTimeStepLayerIdNew,
7705
- autoUpdateLayerId: autoUpdateLayerIdNew
7706
- });
7707
- // set layers
7708
- yield put(layerActions.setLayers({
7709
- mapId,
7710
- layers: newLayerIds.layers
7711
- }));
7712
- // set active layer if given otherwise to first layer
7713
- const firstLayerId = (_a = newLayerIds.layers[0]) === null || _a === void 0 ? void 0 : _a.id;
7714
- yield put(mapActions.setAutoLayerId({
7715
- mapId,
7716
- autoTimeStepLayerId: (_b = newLayerIds.autoTimeStepLayerId) !== null && _b !== void 0 ? _b : firstLayerId,
7717
- autoUpdateLayerId: (_c = newLayerIds.autoUpdateLayerId) !== null && _c !== void 0 ? _c : firstLayerId
7718
- }));
7719
- }
7720
- // sets (default) baseLayers
7721
- const baseLayersWithDefaultLayer = baseLayers.length ? baseLayers : [defaultLayers.baseLayerGrey];
7722
- // sets (default) overLayers
7723
- const overLayersWithDefaultLayer = overLayers.length ? overLayers : [defaultLayers.overLayer];
7724
- const allBaseLayers = [...baseLayersWithDefaultLayer, ...overLayersWithDefaultLayer].map(layer => Object.assign(Object.assign({}, layer), {
7725
- id: webmapUtils.generateLayerId()
7726
- }));
7727
- yield call$e(handleBaseLayersSaga, mapId, allBaseLayers);
7728
- if (proj) {
7729
- const checkIsprojectionSupported = isProjectionSupported(proj.srs);
7730
- if (!checkIsprojectionSupported) {
7731
- throw new Error(`Projection ${proj.srs} is not supported`);
7732
- }
7733
- // set bbox
7734
- yield put(mapActions.setBbox({
7735
- mapId,
7736
- bbox: proj.bbox,
7737
- srs: proj.srs
7738
- }));
7739
- }
7740
- const animationLength = animationPayload && animationPayload.duration;
7741
- const animationEndTime = animationPayload && animationPayload.endTime && isAnimationEndTimeValid(animationPayload.endTime) && animationPayload.endTime;
7742
- const shouldEndtimeOverride = animationPayload ? animationPayload.shouldEndtimeOverride : false;
7743
- if (shouldEndtimeOverride) {
7744
- // auto update
7745
- yield put(mapActions.setEndTimeOverriding({
7746
- mapId,
7747
- shouldEndtimeOverride
7748
- }));
7749
- }
7750
- if (shouldAutoUpdate !== undefined && !animationEndTime) {
7751
- // auto update
7752
- yield put(mapActions.toggleAutoUpdate({
7753
- mapId,
7754
- shouldAutoUpdate
7755
- }));
7756
- }
7757
- if (showTimeSlider !== undefined) {
7758
- // toggle timeslider
7759
- yield put(mapActions.toggleTimeSliderIsVisible({
7760
- mapId,
7761
- isTimeSliderVisible: showTimeSlider
7762
- }));
7763
- }
7764
- if (shouldShowZoomControls !== undefined) {
7765
- // toggle zoom controls
7766
- yield put(mapActions.toggleZoomControls({
7767
- mapId,
7768
- shouldShowZoomControls
7769
- }));
7770
- }
7771
- if (displayMapPin !== undefined) {
7772
- // display map pin
7773
- yield put(mapActions.toggleMapPinIsVisible({
7774
- mapId,
7775
- displayMapPin
7776
- }));
7777
- }
7778
- // sets timestep by interval of animationPayload
7779
- const interval = animationPayload && animationPayload.interval;
7780
- if (interval) {
7781
- yield put(mapActions.setTimeStep({
7782
- mapId,
7783
- timeStep: interval
7784
- }));
7785
- }
7786
- // sets animationEndTime by endTime of animationPayload
7787
- if (animationEndTime) {
7788
- const endTime = animationEndTime.includes('NOW') || animationEndTime.includes('TODAY') ? dateUtils.convertNOWandTODAYFormatsToUTC(animationEndTime) : animationEndTime;
7789
- yield put(mapActions.setAnimationEndTime({
7790
- mapId,
7791
- animationEndTime: handleDateUtilsISOString(endTime)
7792
- }));
7793
- const startTime = handleDateUtilsISOString(dateUtils.sub(dateUtils.utc(endTime), {
7794
- minutes: 5 * 60 // set to default of 5 hours
7795
- }).toISOString());
7796
- yield put(mapActions.setAnimationStartTime({
7797
- mapId,
7798
- animationStartTime: startTime
7799
- }));
7800
- yield put(genericActions.setTime({
7801
- origin: '',
7802
- sourceId: mapId,
7803
- value: startTime
7804
- }));
7805
- const centerTimeInSeconds = new Date(handleDateUtilsISOString(endTime)).getTime();
7806
- yield put(mapActions.setTimeSliderCenterTime({
7807
- mapId,
7808
- timeSliderCenterTime: centerTimeInSeconds
7809
- }));
7810
- }
7811
- // sets animationStartTime by duration of animationPayload
7812
- if (animationLength) {
7813
- const animationEnd = yield select(getAnimationEndTime, mapId);
7814
- const startTime = handleDateUtilsISOString(dateUtils.sub(dateUtils.utc(animationEnd), {
7815
- minutes: animationLength
7816
- }).toISOString());
7817
- yield put(mapActions.setAnimationStartTime({
7818
- mapId,
7819
- animationStartTime: startTime
7820
- }));
7821
- yield put(genericActions.setTime({
7822
- origin: '',
7823
- sourceId: mapId,
7824
- value: startTime
7825
- }));
7826
- }
7827
- // sets animationDelay by speed of animationPayload
7828
- if (animationPayload && animationPayload.speed) {
7829
- yield put(mapActions.setAnimationDelay({
7830
- mapId,
7831
- animationDelay: getSpeedDelay(animationPayload.speed)
7832
- }));
7833
- }
7834
- // turn animation on
7835
- if (shouldAnimate === true) {
7836
- const duration = animationPayload && animationPayload.duration ? animationPayload.duration : 5 * 60; // set to default of 5 hours
7837
- const animationEnd = shouldEndtimeOverride && animationEndTime ? yield select(getAnimationEndTime, mapId) : dateUtils.dateToString(dateUtils.utc(), dateFormat);
7838
- const animationStart = shouldEndtimeOverride && animationLength ? yield select(getAnimationStartTime, mapId) : dateUtils.dateToString(dateUtils.sub(dateUtils.utc(animationEnd), {
7839
- minutes: duration
7840
- }), dateFormat);
7841
- yield put(mapActions.mapStartAnimation({
7842
- mapId,
7843
- start: animationStart,
7844
- end: animationEnd,
7845
- interval: interval || defaultTimeStep
7846
- }));
7847
- // If animation interval set, set the timestep auto property to false
7848
- if (interval) {
7849
- yield put(mapActions.toggleTimestepAuto({
7850
- mapId,
7851
- timestepAuto: false
7852
- }));
7853
- }
7854
- } else if (toggleTimestepAuto !== undefined) {
7855
- // Set timestep auto based on preset if animation is off
7856
- yield put(mapActions.toggleTimestepAuto({
7857
- mapId,
7858
- timestepAuto: toggleTimestepAuto
7859
- }));
7860
- }
7861
- // show legend
7862
- const shouldOpenLegend = shouldShowLegend !== undefined ? shouldShowLegend : IS_LEGEND_OPEN_BY_DEFAULT;
7863
- const legendId = yield select(getLegendId, mapId);
7864
- if (legendId) {
7865
- yield put(uiActions.setToggleOpenDialog({
7866
- type: legendId,
7867
- setOpen: shouldOpenLegend
7868
- }));
7869
- }
7870
- if (dockedLayerManagerSize) {
7871
- yield put(mapActions.setDockedLayerManagerSize({
7872
- mapId,
7873
- dockedLayerManagerSize
7874
- }));
7875
- }
7876
- while (animationEndTime && (shouldEndtimeOverride || !(shouldAutoUpdate || shouldAnimate))) {
7877
- const fiveMinuteDelayForAnimation = 1000 * 60 * 5;
7878
- yield delay(fiveMinuteDelayForAnimation);
7879
- const animationEnd = yield select(getAnimationEndTime, mapId);
7880
- yield put(mapActions.setAnimationEndTime({
7881
- mapId,
7882
- animationEndTime: dateUtils.add(dateUtils.utc(animationEnd), {
7883
- minutes: 5
7884
- }).toISOString()
7885
- }));
7886
- const animationStart = yield select(getAnimationStartTime, mapId);
7887
- yield put(mapActions.setAnimationStartTime({
7888
- mapId,
7889
- animationStartTime: dateUtils.add(dateUtils.utc(animationStart), {
7890
- minutes: 5
7891
- }).toISOString()
7892
- }));
7893
- }
7894
- }
7895
- } catch (error) {
7896
- yield put(mapActions.setMapPresetError({
7897
- mapId: payload.mapId,
7898
- error: error.message
7899
- }));
7900
- }
7901
- }
7902
- function* unregisterMapSaga({
7903
- payload
7904
- }) {
7905
- const {
7906
- mapId
7907
- } = payload;
7908
- const layerList = yield select(getLayersByMapId, mapId);
7909
- metronome.unregister(mapId);
7910
- yield all(layerList.map(layer => put(layerActions.layerDelete({
7911
- mapId,
7912
- layerId: layer.id,
7913
- origin: LayerActionOrigin.unregisterMapSaga
7914
- }))));
7915
- }
7916
- function* setStepBackwardOrForwardSaga({
7917
- payload
7918
- }) {
7919
- const {
7920
- mapId,
7921
- isForwardStep
7922
- } = payload;
7923
- const timeStep = yield select(getMapTimeStep, mapId);
7924
- const currentTime = yield select(getSelectedTime, mapId);
7925
- const [dataStartTime, dataEndTime] = yield select(getDataLimitsFromLayers, mapId);
7926
- if (dateUtils.isValid(currentTime)) {
7927
- const makeForwardStep = () => {
7928
- const nextTime = currentTime + timeStep;
7929
- const roundedTime = roundWithTimeStep(nextTime, timeStep, 'ceil');
7930
- const newTime = Math.min(roundedTime, dataEndTime || roundedTime);
7931
- return dateUtils.fromUnix(newTime).toISOString();
7932
- };
7933
- const makeBackwardStep = () => {
7934
- const nextTime = currentTime - timeStep;
7935
- const roundedTime = roundWithTimeStep(nextTime, timeStep, 'floor');
7936
- const newTime = Math.max(roundedTime, dataStartTime || roundedTime);
7937
- return dateUtils.fromUnix(newTime).toISOString();
7938
- };
7939
- const selectedTimeString = isForwardStep ? makeForwardStep() : makeBackwardStep();
7940
- const isMapAnimating = yield select(isAnimating, mapId);
7941
- if (isMapAnimating) {
7942
- yield put(mapActions.mapStopAnimation({
7943
- mapId,
7944
- origin: MapActionOrigin.map
7945
- }));
7946
- }
7947
- const isAutoUpdateOn = yield select(isAutoUpdating, mapId);
7948
- if (isAutoUpdateOn) {
7949
- yield put(mapActions.toggleAutoUpdate({
7950
- mapId,
7951
- shouldAutoUpdate: false
7952
- }));
7953
- }
7954
- yield put(genericActions.setTime({
7955
- origin: '',
7956
- sourceId: mapId,
7957
- value: handleDateUtilsISOString(selectedTimeString)
7958
- }));
7959
- }
7960
- }
7961
- function* rootSaga$2() {
7962
- // resets IWMJSMap state
7963
- yield takeEvery(mapActions.setMapPreset.type, setMapPresetSaga);
7964
- yield takeEvery(mapActions.unregisterMap.type, unregisterMapSaga);
7965
- yield takeEvery(mapActions.setStepBackwardOrForward.type, setStepBackwardOrForwardSaga);
7966
- }
7967
-
7968
- function* fetchServiceSaga(service) {
7969
- try {
7970
- const layers = yield call$e(getCapabilities.getLayersFlattenedFromService, service.serviceUrl);
7971
- yield put(serviceActions.serviceSetLayers(Object.assign(Object.assign({}, service), {
7972
- layers
7973
- })));
7974
- } catch (error) {
7975
- // not implemented yet
7976
- }
7977
- }
7978
- function* fetchInitialServicesSaga({
7979
- payload
7980
- }) {
7981
- const {
7982
- services
7983
- } = payload;
7984
- yield all(services.map(_a => {
7985
- var {
7986
- url
7987
- } = _a,
7988
- service = __rest(_a, ["url"]);
7989
- return call$e(fetchServiceSaga, Object.assign(Object.assign({}, service), {
7990
- serviceUrl: url
7991
- }));
7992
- }));
7993
- }
7994
- function* rootSaga$1() {
7995
- yield takeEvery(serviceActions.fetchInitialServices, fetchInitialServicesSaga);
7996
- }
7997
-
7998
- /* A map with all the timerIds and their current step */
7999
- const stepMap = new Map();
8000
- /* A map with a list of timers and their dwell */
8001
- const timerDwellMap = new Map();
8002
- /**
8003
- * Returns the next step for given timerId.
8004
- * @param timerId The timer id
8005
- * @param numberOfStepsInAnimation Animation length in steps
8006
- * @param numStepsToGoForward Amount of steps to go forwards, defaults to 1. Can be positive and negative
8007
- * @returns
8008
- */
8009
- const getNextStep = (timerId, numberOfStepsInAnimation, numStepsToGoForward = 1) => {
8010
- const currentStep = getCurrentStep(timerId);
8011
- const nextStep = currentStep + numStepsToGoForward;
8012
- const nextStepClipped = (nextStep % numberOfStepsInAnimation + numberOfStepsInAnimation) % numberOfStepsInAnimation;
8013
- return nextStepClipped;
8014
- };
8015
- /**
8016
- * Handles dwell at the end of the animation loop sequence. The number of steps to wait till proceed can be set by the dwell parameter.
8017
- * @param timerId The timer id
8018
- * @param numberOfStepsInAnimation Number of steps in the animation
8019
- * @param dwell The number of steps to wait at the end of the animation sequence before to continue
8020
- * @returns
8021
- */
8022
- const handleTimerDwell = (timerId, numberOfStepsInAnimation, dwell = 8) => {
8023
- if (dwell > 0) {
8024
- const currentStep = getCurrentStep(timerId);
8025
- // Reset the dwell if we are not at the last animation step
8026
- if (currentStep < numberOfStepsInAnimation - 1) {
8027
- timerDwellMap.set(timerId, dwell);
8028
- return false;
8029
- }
8030
- // We are at the last animation step, check the dwell
8031
- const timerDwell = timerDwellMap.has(timerId) && timerDwellMap.get(timerId) || 0;
8032
- if (currentStep === numberOfStepsInAnimation - 1 && timerDwell > 0) {
8033
- timerDwellMap.set(timerId, timerDwell - 1);
8034
- return true;
8035
- }
8036
- }
8037
- return false;
8038
- };
8039
- /**
8040
- * Set step for the timerId
8041
- * @param timerId
8042
- * @param timerStep
8043
- */
8044
- const setStep = (timerId, timerStep) => {
8045
- stepMap.set(timerId, timerStep);
8046
- };
8047
- /**
8048
- * Gets the current step for the timer
8049
- * @param timerId
8050
- * @returns
8051
- */
8052
- const getCurrentStep = timerId => {
8053
- return stepMap.get(timerId) || 0;
8054
- };
8055
- const MAX_NUMBER_STEPS_FORWARD_TO_PREFETCH = 2;
8056
- const MAX_NUMBER_OF_PARALLEL_LOADING_IMAGES = 8;
8057
- /**
8058
- * This prefetches all images connected to the same sync group as provided timerId
8059
- * @param timerId The timerId
8060
- * @param animationListValues List of animation steps in isostring to animate
8061
- * @param targets List of targets to check
8062
- * @returns True if all maps are ready to go forward, false if the map has no data to display yet.
8063
- */
8064
- const prefetchAnimationTargetsForMetronome = (timerId, animationListValues, targets) => {
8065
- let timerShouldStepForward = true;
8066
- // The following code prefetches/buffers for all maps in the group
8067
- for (let numPrefetch = 0; numPrefetch < MAX_NUMBER_STEPS_FORWARD_TO_PREFETCH; numPrefetch += 1) {
8068
- const nextStep = getNextStep(timerId, animationListValues.length, numPrefetch + 1);
8069
- const nextTimeValueStepToCheck = animationListValues[nextStep];
8070
- for (const target of targets) {
8071
- const targetMapId = target.targetId;
8072
- const wmMap = getWMJSMapById(targetMapId);
8073
- if (wmMap) {
8074
- const layersImageUrls = getWMSRequests(wmMap, [{
8075
- name: 'time',
8076
- currentValue: nextTimeValueStepToCheck
8077
- }]);
8078
- for (const layersImageUrl of layersImageUrls) {
8079
- const image = wmMap.getMapImageStore.getImage(layersImageUrl.url);
8080
- if (!image.isLoaded()) {
8081
- if (wmMap.getMapImageStore.getNumImagesLoading() < MAX_NUMBER_OF_PARALLEL_LOADING_IMAGES) {
8082
- image.load();
8083
- }
8084
- if (numPrefetch === 0) {
8085
- const altImage = wmMap.getAlternativeImage(layersImageUrl.url, wmMap.getBBOX(), true);
8086
- // No alternative image available yet, so skipping animation.
8087
- if (altImage.length === 0) {
8088
- // This is useful to indicate that the map is loading and has nothing yet to display.
8089
- // console.warn('No data available: Not stepping forward');
8090
- timerShouldStepForward = false;
8091
- }
8092
- }
8093
- } else if (image.isStale()) {
8094
- if (wmMap.getMapImageStore.getNumImagesLoading() < MAX_NUMBER_OF_PARALLEL_LOADING_IMAGES) {
8095
- image.forceReload(true);
8096
- }
8097
- }
8098
- }
8099
- } else {
8100
- return false; // Map was not registered so there is nothing to prefetch
8101
- }
8102
- }
8103
- }
8104
- return timerShouldStepForward;
8105
- };
8106
-
8107
- /**
8108
- * This handler is triggered by the metronome. An array of timerIds is given as argument.
8109
- * It will update the animation loop of multiple maps and sliders
8110
- * It will prefetch images for maps
8111
- * @param timerIds string[] array of timerIds
8112
- * @param listenerApi ListenerEffectAPI<CoreAppStore, Dispatch, unknown> listenerApi as received from listener
8113
- */
8114
- const metronomeHandler = (timerIds, listenerApi) => {
8115
- const targetsWithUpdateValue = [];
8116
- for (const timerId of timerIds) {
8117
- const animationListValuesNameAndValue = getAnimationList(listenerApi.getState(), timerId);
8118
- const animationListValues = animationListValuesNameAndValue.map(nameAndValue => nameAndValue.value);
8119
- const targets = getTargets(listenerApi.getState(), {
8120
- sourceId: timerId,
8121
- origin: timerId
8122
- }, SYNCGROUPS_TYPE_SETTIME);
8123
- if (targets.length === 0) {
8124
- // When there are no targets, default to one
8125
- targets.push({
8126
- targetId: timerId,
8127
- value: ''
8128
- });
8129
- }
8130
- const timerIsInDwell = handleTimerDwell(timerId, animationListValues.length);
8131
- const timerShouldStepForward = prefetchAnimationTargetsForMetronome(timerId, animationListValues, targets) && !timerIsInDwell;
8132
- // Determine the next step
8133
- const timerStep = timerShouldStepForward ? getNextStep(timerId, animationListValues.length) : getCurrentStep(timerId);
8134
- setStep(timerId, timerStep);
8135
- const updatedValue = animationListValues[timerStep];
8136
- targetsWithUpdateValue.push(...targets.map(target => {
8137
- return Object.assign(Object.assign({}, target), {
8138
- value: updatedValue
8139
- });
8140
- }));
8141
- const speedDelay = getMapAnimationDelay(listenerApi.getState(), timerId);
8142
- const speed = 1000 / (speedDelay || 1);
8143
- metronome.setSpeed(timerId, speed);
8144
- }
8145
- // Update all targets of all sync groups in one action.
8146
- if (targetsWithUpdateValue.length > 0) {
8147
- listenerApi.dispatch(setTimeSync(null, targetsWithUpdateValue, ['metronomesaga']));
8148
- }
8149
- };
8150
- const metronomeListener = createListenerMiddleware();
8151
- metronomeListener.startListening({
8152
- actionCreator: mapActions.mapStartAnimation,
8153
- effect: (_, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
8154
- // register handler with access to listenerApi
8155
- metronome.handleTimerTicks = timerIds => {
8156
- metronomeHandler(timerIds, listenerApi);
8157
- };
8158
- })
8159
- });
8160
-
8161
- /* *
8162
- * Licensed under the Apache License, Version 2.0 (the "License");
8163
- * you may not use this file except in compliance with the License.
8164
- * You may obtain a copy of the License at
8165
- *
8166
- * http://www.apache.org/licenses/LICENSE-2.0
8167
- *
8168
- * Unless required by applicable law or agreed to in writing, software
8169
- * distributed under the License is distributed on an "AS IS" BASIS,
8170
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8171
- * See the License for the specific language governing permissions and
8172
- * limitations under the License.
8173
- *
8174
- * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
8175
- * Copyright 2024 - Finnish Meteorological Institute (FMI)
8176
- * */
8177
- const layersListener = createListenerMiddleware();
8178
- layersListener.startListening({
8179
- actionCreator: layerActions.showLayerInfo,
8180
- effect: ({
8181
- payload
8182
- }, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
8183
- const {
8184
- mapId,
8185
- source
8186
- } = payload;
8187
- const currentActiveMapId = getDialogMapId(listenerApi.getState(), DialogTypes.LayerInfo);
8188
- const isOpenInStore = getisDialogOpen(listenerApi.getState(), DialogTypes.LayerInfo);
8189
- if (currentActiveMapId !== mapId ? true : !isOpenInStore) {
8190
- listenerApi.dispatch(uiActions.setActiveMapIdForDialog({
8191
- type: DialogTypes.LayerInfo,
8192
- mapId,
8193
- setOpen: true,
8194
- source
8195
- }));
8196
- }
8197
- })
8198
- });
8199
- layersListener.startListening({
8200
- actionCreator: uiActions.setToggleOpenDialog,
8201
- effect: ({
8202
- payload
8203
- }, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
8204
- const {
8205
- setOpen,
8206
- type
8207
- } = payload;
8208
- // close LayerInfo if open and LayerManager is closed
8209
- if (type === DialogTypes.LayerManager && !setOpen) {
8210
- const isOpenInStore = getisDialogOpen(listenerApi.getState(), DialogTypes.LayerInfo);
8211
- if (isOpenInStore) {
8212
- listenerApi.dispatch(layerActions.hideLayerInfo());
8213
- }
8214
- }
8215
- })
7844
+ // eslint-disable-next-line regexp/no-empty-group -- required for testing
7845
+ var re = /(?:)/;
7846
+ var originalExec = re.exec;
7847
+ re.exec = function () { return originalExec.apply(this, arguments); };
7848
+ var result = 'ab'.split(re);
7849
+ return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
8216
7850
  });
8217
7851
 
8218
- const mapUiListener = createListenerMiddleware();
8219
- mapUiListener.startListening({
8220
- actionCreator: mapActions.registerMap,
8221
- effect: (_, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
8222
- const fields = getAllMapIds(listenerApi.getState());
8223
- if (fields.length === 1) {
8224
- const source = getDialogSource(listenerApi.getState(), 'legend');
8225
- listenerApi.dispatch(uiActions.setActiveMapIdForDialog({
8226
- type: 'legend',
8227
- mapId: fields[0],
8228
- setOpen: true,
8229
- source
8230
- }));
8231
- }
8232
- })
8233
- });
8234
- mapUiListener.startListening({
8235
- actionCreator: mapActions.unregisterMap,
8236
- effect: ({
8237
- payload
8238
- }, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
8239
- const fields = getAllMapIds(listenerApi.getState());
8240
- const activeLegendUI = getDialogDetailsByType(listenerApi.getState(), 'legend');
8241
- if (fields.length && activeLegendUI && !fields.includes(activeLegendUI.activeMapId)) {
8242
- listenerApi.dispatch(uiActions.setActiveMapIdForDialog({
8243
- type: 'legend',
8244
- mapId: fields[0],
8245
- setOpen: activeLegendUI.isOpen
8246
- }));
8247
- } else if (!fields.length) {
8248
- // if no more maps, we hide the legend
8249
- listenerApi.dispatch(uiActions.setToggleOpenDialog({
8250
- type: 'legend',
8251
- setOpen: false
8252
- }));
8253
- }
8254
- // close any remaining windows with map assigned to it
8255
- const remainingDialogsConnectedToMap = getUiDialogsByActiveMapId(listenerApi.getState(), payload.mapId);
8256
- if (remainingDialogsConnectedToMap.length) {
8257
- remainingDialogsConnectedToMap.forEach(dialog => {
8258
- if (dialog.isOpen) {
8259
- listenerApi.dispatch(uiActions.setToggleOpenDialog({
8260
- type: dialog.type,
8261
- setOpen: false
8262
- }));
7852
+ var BUGGY = 'abbc'.split(/(b)*/)[1] === 'c' ||
7853
+ // eslint-disable-next-line regexp/no-empty-group -- required for testing
7854
+ 'test'.split(/(?:)/, -1).length !== 4 ||
7855
+ 'ab'.split(/(?:ab)*/).length !== 2 ||
7856
+ '.'.split(/(.?)(.?)/).length !== 4 ||
7857
+ // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
7858
+ '.'.split(/()()/).length > 1 ||
7859
+ ''.split(/.?/).length;
7860
+
7861
+ // @@split logic
7862
+ fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {
7863
+ var internalSplit = '0'.split(undefined, 0).length ? function (separator, limit) {
7864
+ return separator === undefined && limit === 0 ? [] : call(nativeSplit, this, separator, limit);
7865
+ } : nativeSplit;
7866
+
7867
+ return [
7868
+ // `String.prototype.split` method
7869
+ // https://tc39.es/ecma262/#sec-string.prototype.split
7870
+ function split(separator, limit) {
7871
+ var O = requireObjectCoercible(this);
7872
+ var splitter = isNullOrUndefined(separator) ? undefined : getMethod(separator, SPLIT);
7873
+ return splitter
7874
+ ? call(splitter, separator, O, limit)
7875
+ : call(internalSplit, toString(O), separator, limit);
7876
+ },
7877
+ // `RegExp.prototype[@@split]` method
7878
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
7879
+ //
7880
+ // NOTE: This cannot be properly polyfilled in engines that don't support
7881
+ // the 'y' flag.
7882
+ function (string, limit) {
7883
+ var rx = anObject(this);
7884
+ var S = toString(string);
7885
+
7886
+ if (!BUGGY) {
7887
+ var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
7888
+ if (res.done) return res.value;
7889
+ }
7890
+
7891
+ var C = speciesConstructor(rx, RegExp);
7892
+ var unicodeMatching = rx.unicode;
7893
+ var flags = (rx.ignoreCase ? 'i' : '') +
7894
+ (rx.multiline ? 'm' : '') +
7895
+ (rx.unicode ? 'u' : '') +
7896
+ (UNSUPPORTED_Y ? 'g' : 'y');
7897
+ // ^(? + rx + ) is needed, in combination with some S slicing, to
7898
+ // simulate the 'y' flag.
7899
+ var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
7900
+ var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
7901
+ if (lim === 0) return [];
7902
+ if (S.length === 0) return regExpExec(splitter, S) === null ? [S] : [];
7903
+ var p = 0;
7904
+ var q = 0;
7905
+ var A = [];
7906
+ while (q < S.length) {
7907
+ splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
7908
+ var z = regExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S);
7909
+ var e;
7910
+ if (
7911
+ z === null ||
7912
+ (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p
7913
+ ) {
7914
+ q = advanceStringIndex(S, q, unicodeMatching);
7915
+ } else {
7916
+ push(A, stringSlice(S, p, q));
7917
+ if (A.length === lim) return A;
7918
+ for (var i = 1; i <= z.length - 1; i++) {
7919
+ push(A, z[i]);
7920
+ if (A.length === lim) return A;
7921
+ }
7922
+ q = p = e;
8263
7923
  }
8264
- });
7924
+ }
7925
+ push(A, stringSlice(S, p));
7926
+ return A;
8265
7927
  }
8266
- })
8267
- });
7928
+ ];
7929
+ }, BUGGY || !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
8268
7930
 
7931
+ const isAnimationEndTimeValid = animationEndTime => {
7932
+ const hasValidPrefix = animationEndTime.split(/[-+]/)[0] === 'NOW' || animationEndTime.split(/[-+]/)[0] === 'TODAY';
7933
+ const durationString = animationEndTime.substring(animationEndTime.indexOf('PT') + 2);
7934
+ const hasValidDate = /^(\d+H)?(\d+M)?$/.test(durationString);
7935
+ if (hasValidPrefix && hasValidDate) {
7936
+ return true;
7937
+ }
7938
+ const parsedDate = dateUtils.parseISO(animationEndTime);
7939
+ return dateUtils.isValid(parsedDate);
7940
+ };
8269
7941
  const mapListener = createListenerMiddleware();
8270
7942
  mapListener.startListening({
8271
7943
  actionCreator: layerActions.layerDelete,
@@ -8464,9 +8136,297 @@ mapListener.startListening({
8464
8136
  metronome.unregister(mapId);
8465
8137
  }
8466
8138
  });
8139
+ const handleBaseLayers = (mapId, baseLayers, listenerApi) => {
8140
+ const baseLayer = baseLayers.find(layer => layer.layerType === 'baseLayer');
8141
+ const currentAvailableBaseLayers = getAvailableBaseLayersForMap(listenerApi.getState(), mapId);
8142
+ // find a availableBaseLayer with the same name, and use that id for the active baselayer
8143
+ const activeAvailableBaseLayer = currentAvailableBaseLayers.find(availableBaseLayer => availableBaseLayer.name === baseLayer.name);
8144
+ const activeBaseLayerId = activeAvailableBaseLayer ? activeAvailableBaseLayer.id : webmapUtils.generateLayerId();
8145
+ // if the baseLayer can't be found in a visible available baseLayer list, add it
8146
+ // This happens when switching to a preset that has non-default baselayers
8147
+ if (!activeAvailableBaseLayer && currentAvailableBaseLayers.length) {
8148
+ listenerApi.dispatch(layerActions.addAvailableBaseLayers({
8149
+ layers: [Object.assign(Object.assign({}, baseLayer), {
8150
+ mapId,
8151
+ id: activeBaseLayerId
8152
+ })]
8153
+ }));
8154
+ }
8155
+ const baseLayersWithActiveId = baseLayers.map((layer, index) => index === 0 ? Object.assign(Object.assign({}, layer), {
8156
+ id: activeBaseLayerId || layer.id
8157
+ }) : layer);
8158
+ listenerApi.dispatch(layerActions.setBaseLayers({
8159
+ mapId,
8160
+ layers: baseLayersWithActiveId
8161
+ }));
8162
+ };
8163
+ mapListener.startListening({
8164
+ actionCreator: mapActions.setMapPreset,
8165
+ effect: ({
8166
+ payload
8167
+ }, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
8168
+ var _a, _b, _c;
8169
+ try {
8170
+ const {
8171
+ mapId,
8172
+ initialProps
8173
+ } = payload;
8174
+ const {
8175
+ mapPreset
8176
+ } = initialProps;
8177
+ if (mapPreset) {
8178
+ const {
8179
+ layers,
8180
+ activeLayerId,
8181
+ autoTimeStepLayerId,
8182
+ autoUpdateLayerId,
8183
+ proj,
8184
+ shouldAutoUpdate,
8185
+ shouldAnimate,
8186
+ animationPayload,
8187
+ toggleTimestepAuto,
8188
+ showTimeSlider,
8189
+ displayMapPin,
8190
+ shouldShowZoomControls,
8191
+ shouldShowLegend,
8192
+ dockedLayerManagerSize
8193
+ } = mapPreset;
8194
+ const {
8195
+ mapLayers,
8196
+ baseLayers,
8197
+ overLayers
8198
+ } = filterLayers(layers);
8199
+ if (layers) {
8200
+ // make sure all layers have a unique id before going forward
8201
+ let autoTimeStepLayerIdNew = autoTimeStepLayerId;
8202
+ let autoUpdateLayerIdNew = autoUpdateLayerId;
8203
+ const onlyActiveLayerIdIsSet = !autoTimeStepLayerId && !autoUpdateLayerId && activeLayerId;
8204
+ if (onlyActiveLayerIdIsSet) {
8205
+ autoTimeStepLayerIdNew = activeLayerId;
8206
+ autoUpdateLayerIdNew = activeLayerId;
8207
+ }
8208
+ const newLayerIds = replaceLayerIdsToEnsureUniqueLayerIdsInStore({
8209
+ layers: mapLayers,
8210
+ autoTimeStepLayerId: autoTimeStepLayerIdNew,
8211
+ autoUpdateLayerId: autoUpdateLayerIdNew
8212
+ });
8213
+ // set layers
8214
+ listenerApi.dispatch(layerActions.setLayers({
8215
+ mapId,
8216
+ layers: newLayerIds.layers
8217
+ }));
8218
+ // set active layer if given otherwise to first layer
8219
+ const firstLayerId = (_a = newLayerIds.layers[0]) === null || _a === void 0 ? void 0 : _a.id;
8220
+ listenerApi.dispatch(mapActions.setAutoLayerId({
8221
+ mapId,
8222
+ autoTimeStepLayerId: (_b = newLayerIds.autoTimeStepLayerId) !== null && _b !== void 0 ? _b : firstLayerId,
8223
+ autoUpdateLayerId: (_c = newLayerIds.autoUpdateLayerId) !== null && _c !== void 0 ? _c : firstLayerId
8224
+ }));
8225
+ }
8226
+ // sets (default) baseLayers
8227
+ const baseLayersWithDefaultLayer = baseLayers.length ? baseLayers : [defaultLayers.baseLayerGrey];
8228
+ // sets (default) overLayers
8229
+ const overLayersWithDefaultLayer = overLayers.length ? overLayers : [defaultLayers.overLayer];
8230
+ const allBaseLayers = [...baseLayersWithDefaultLayer, ...overLayersWithDefaultLayer].map(layer => Object.assign(Object.assign({}, layer), {
8231
+ id: webmapUtils.generateLayerId()
8232
+ }));
8233
+ handleBaseLayers(mapId, allBaseLayers, listenerApi);
8234
+ if (proj) {
8235
+ const checkIsprojectionSupported = isProjectionSupported(proj.srs);
8236
+ if (!checkIsprojectionSupported) {
8237
+ throw new Error(`Projection ${proj.srs} is not supported`);
8238
+ }
8239
+ // set bbox
8240
+ listenerApi.dispatch(mapActions.setBbox({
8241
+ mapId,
8242
+ bbox: proj.bbox,
8243
+ srs: proj.srs
8244
+ }));
8245
+ }
8246
+ const animationLength = animationPayload && animationPayload.duration;
8247
+ const animationEndTime = animationPayload && animationPayload.endTime && isAnimationEndTimeValid(animationPayload.endTime) && animationPayload.endTime;
8248
+ const shouldEndtimeOverride = animationPayload ? animationPayload.shouldEndtimeOverride : false;
8249
+ if (shouldEndtimeOverride) {
8250
+ // auto update
8251
+ listenerApi.dispatch(mapActions.setEndTimeOverriding({
8252
+ mapId,
8253
+ shouldEndtimeOverride
8254
+ }));
8255
+ }
8256
+ if (shouldAutoUpdate !== undefined && !animationEndTime) {
8257
+ // auto update
8258
+ listenerApi.dispatch(mapActions.toggleAutoUpdate({
8259
+ mapId,
8260
+ shouldAutoUpdate
8261
+ }));
8262
+ }
8263
+ if (showTimeSlider !== undefined) {
8264
+ // toggle timeslider
8265
+ listenerApi.dispatch(mapActions.toggleTimeSliderIsVisible({
8266
+ mapId,
8267
+ isTimeSliderVisible: showTimeSlider
8268
+ }));
8269
+ }
8270
+ if (shouldShowZoomControls !== undefined) {
8271
+ // toggle zoom controls
8272
+ listenerApi.dispatch(mapActions.toggleZoomControls({
8273
+ mapId,
8274
+ shouldShowZoomControls
8275
+ }));
8276
+ }
8277
+ if (displayMapPin !== undefined) {
8278
+ // display map pin
8279
+ listenerApi.dispatch(mapActions.toggleMapPinIsVisible({
8280
+ mapId,
8281
+ displayMapPin
8282
+ }));
8283
+ }
8284
+ // sets timestep by interval of animationPayload
8285
+ const interval = animationPayload && animationPayload.interval;
8286
+ if (interval) {
8287
+ listenerApi.dispatch(mapActions.setTimeStep({
8288
+ mapId,
8289
+ timeStep: interval
8290
+ }));
8291
+ }
8292
+ // sets animationEndTime by endTime of animationPayload
8293
+ if (animationEndTime) {
8294
+ const endTime = animationEndTime.includes('NOW') || animationEndTime.includes('TODAY') ? dateUtils.convertNOWandTODAYFormatsToUTC(animationEndTime) : animationEndTime;
8295
+ listenerApi.dispatch(mapActions.setAnimationEndTime({
8296
+ mapId,
8297
+ animationEndTime: handleDateUtilsISOString(endTime)
8298
+ }));
8299
+ const startTime = handleDateUtilsISOString(dateUtils.sub(dateUtils.utc(endTime), {
8300
+ minutes: 5 * 60 // set to default of 5 hours
8301
+ }).toISOString());
8302
+ listenerApi.dispatch(mapActions.setAnimationStartTime({
8303
+ mapId,
8304
+ animationStartTime: startTime
8305
+ }));
8306
+ listenerApi.dispatch(genericActions.setTime({
8307
+ origin: '',
8308
+ sourceId: mapId,
8309
+ value: startTime
8310
+ }));
8311
+ const centerTimeInSeconds = new Date(handleDateUtilsISOString(endTime)).getTime();
8312
+ listenerApi.dispatch(mapActions.setTimeSliderCenterTime({
8313
+ mapId,
8314
+ timeSliderCenterTime: centerTimeInSeconds
8315
+ }));
8316
+ }
8317
+ // sets animationStartTime by duration of animationPayload
8318
+ if (animationLength) {
8319
+ const animationEnd = getAnimationEndTime(listenerApi.getState(), mapId);
8320
+ const startTime = handleDateUtilsISOString(dateUtils.sub(dateUtils.utc(animationEnd), {
8321
+ minutes: animationLength
8322
+ }).toISOString());
8323
+ listenerApi.dispatch(mapActions.setAnimationStartTime({
8324
+ mapId,
8325
+ animationStartTime: startTime
8326
+ }));
8327
+ listenerApi.dispatch(genericActions.setTime({
8328
+ origin: '',
8329
+ sourceId: mapId,
8330
+ value: startTime
8331
+ }));
8332
+ }
8333
+ // sets animationDelay by speed of animationPayload
8334
+ if (animationPayload && animationPayload.speed) {
8335
+ listenerApi.dispatch(mapActions.setAnimationDelay({
8336
+ mapId,
8337
+ animationDelay: getSpeedDelay(animationPayload.speed)
8338
+ }));
8339
+ }
8340
+ // turn animation on
8341
+ if (shouldAnimate === true) {
8342
+ const duration = animationPayload && animationPayload.duration ? animationPayload.duration : 5 * 60; // set to default of 5 hours
8343
+ const animationEnd = shouldEndtimeOverride && animationEndTime ? getAnimationEndTime(listenerApi.getState(), mapId) : dateUtils.dateToString(dateUtils.utc(), dateFormat);
8344
+ const animationStart = shouldEndtimeOverride && animationLength ? getAnimationStartTime(listenerApi.getState(), mapId) : dateUtils.dateToString(dateUtils.sub(dateUtils.utc(animationEnd), {
8345
+ minutes: duration
8346
+ }), dateFormat);
8347
+ listenerApi.dispatch(mapActions.mapStartAnimation({
8348
+ mapId,
8349
+ start: animationStart,
8350
+ end: animationEnd,
8351
+ interval: interval || defaultTimeStep
8352
+ }));
8353
+ // If animation interval set, set the timestep auto property to false
8354
+ if (interval) {
8355
+ listenerApi.dispatch(mapActions.toggleTimestepAuto({
8356
+ mapId,
8357
+ timestepAuto: false
8358
+ }));
8359
+ }
8360
+ } else if (toggleTimestepAuto !== undefined) {
8361
+ // Set timestep auto based on preset if animation is off
8362
+ listenerApi.dispatch(mapActions.toggleTimestepAuto({
8363
+ mapId,
8364
+ timestepAuto: toggleTimestepAuto
8365
+ }));
8366
+ }
8367
+ // show legend
8368
+ const shouldOpenLegend = shouldShowLegend !== undefined ? shouldShowLegend : IS_LEGEND_OPEN_BY_DEFAULT;
8369
+ const legendId = getLegendId(listenerApi.getState(), mapId);
8370
+ if (legendId) {
8371
+ listenerApi.dispatch(uiActions.setToggleOpenDialog({
8372
+ type: legendId,
8373
+ setOpen: shouldOpenLegend
8374
+ }));
8375
+ }
8376
+ if (dockedLayerManagerSize) {
8377
+ listenerApi.dispatch(mapActions.setDockedLayerManagerSize({
8378
+ mapId,
8379
+ dockedLayerManagerSize
8380
+ }));
8381
+ }
8382
+ while (animationEndTime && (shouldEndtimeOverride || !(shouldAutoUpdate || shouldAnimate))) {
8383
+ const fiveMinuteDelayForAnimation = 1000 * 60 * 5;
8384
+ // eslint-disable-next-line no-await-in-loop
8385
+ yield listenerApi.delay(fiveMinuteDelayForAnimation);
8386
+ const animationEnd = getAnimationEndTime(listenerApi.getState(), mapId);
8387
+ listenerApi.dispatch(mapActions.setAnimationEndTime({
8388
+ mapId,
8389
+ animationEndTime: dateUtils.add(dateUtils.utc(animationEnd), {
8390
+ minutes: 5
8391
+ }).toISOString()
8392
+ }));
8393
+ const animationStart = getAnimationStartTime(listenerApi.getState(), mapId);
8394
+ listenerApi.dispatch(mapActions.setAnimationStartTime({
8395
+ mapId,
8396
+ animationStartTime: dateUtils.add(dateUtils.utc(animationStart), {
8397
+ minutes: 5
8398
+ }).toISOString()
8399
+ }));
8400
+ }
8401
+ }
8402
+ } catch (error) {
8403
+ listenerApi.dispatch(mapActions.setMapPresetError({
8404
+ mapId: payload.mapId,
8405
+ error: error.message
8406
+ }));
8407
+ }
8408
+ })
8409
+ });
8410
+ mapListener.startListening({
8411
+ actionCreator: mapActions.unregisterMap,
8412
+ effect: ({
8413
+ payload
8414
+ }, listenerApi) => {
8415
+ const {
8416
+ mapId
8417
+ } = payload;
8418
+ const layerList = getLayersByMapId(listenerApi.getState(), mapId);
8419
+ metronome.unregister(mapId);
8420
+ layerList.map(layer => listenerApi.dispatch(layerActions.layerDelete({
8421
+ mapId,
8422
+ layerId: layer.id,
8423
+ origin: LayerActionOrigin.unregisterMapListener
8424
+ })));
8425
+ }
8426
+ });
8467
8427
 
8468
8428
  // TODO: This fixes typecheck errors but maybe there is a better way to do that
8469
- createStore$1({
8429
+ createStore({
8470
8430
  extensions: [getSagaExtension()]
8471
8431
  });
8472
8432
  const mapStoreReducers = {
@@ -8742,6 +8702,7 @@ genericListener.startListening({
8742
8702
  *
8743
8703
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
8744
8704
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
8705
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
8745
8706
  * */
8746
8707
  const initialState$1 = {};
8747
8708
  const slice$1 = createSlice({
@@ -8775,6 +8736,7 @@ const routerActions = slice$1.actions;
8775
8736
  *
8776
8737
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
8777
8738
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
8739
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
8778
8740
  * */
8779
8741
  // stores navigate hook method to object, so it can be used outside components
8780
8742
  const historyDict = {
@@ -8802,6 +8764,7 @@ var utils = /*#__PURE__*/Object.freeze({
8802
8764
  *
8803
8765
  * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
8804
8766
  * Copyright 2024 - Finnish Meteorological Institute (FMI)
8767
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
8805
8768
  * */
8806
8769
  const routerListener = createListenerMiddleware();
8807
8770
  routerListener.startListening({
@@ -8829,6 +8792,7 @@ routerListener.startListening({
8829
8792
  *
8830
8793
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
8831
8794
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
8795
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
8832
8796
  * */
8833
8797
  const routerModuleConfig = {
8834
8798
  id: 'router',
@@ -9013,6 +8977,7 @@ const drawtoolActions = slice.actions;
9013
8977
  *
9014
8978
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9015
8979
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
8980
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
9016
8981
  * */
9017
8982
  const getDrawingtoolStore = store => {
9018
8983
  if (store && store.drawingtools) {
@@ -9283,6 +9248,7 @@ drawingToolListener.startListening({
9283
9248
  *
9284
9249
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9285
9250
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
9251
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
9286
9252
  * */
9287
9253
  const drawtoolModuleConfig = {
9288
9254
  id: 'drawtool-module',
@@ -9307,6 +9273,7 @@ const drawtoolModuleConfig = {
9307
9273
  *
9308
9274
  * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9309
9275
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
9276
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
9310
9277
  * */
9311
9278
  const getSingularDrawtoolDrawLayerId = mapId => `drawlayer-${mapId}`;
9312
9279
 
@@ -9592,6 +9559,7 @@ var storeTestUtils = /*#__PURE__*/Object.freeze({
9592
9559
  *
9593
9560
  * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9594
9561
  * Copyright 2020 - Finnish Meteorological Institute (FMI)
9562
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
9595
9563
  * */
9596
9564
  function* addLayerActionsSaga({
9597
9565
  payload,
@@ -9692,6 +9660,7 @@ function* rootSaga() {
9692
9660
  *
9693
9661
  * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9694
9662
  * Copyright 2024 - Finnish Meteorological Institute (FMI)
9663
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
9695
9664
  * */
9696
9665
  const syncGroupsListener = createListenerMiddleware();
9697
9666
  syncGroupsListener.startListening({
@@ -9767,6 +9736,7 @@ const synchronizationGroupConfig = {
9767
9736
  *
9768
9737
  * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9769
9738
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
9739
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
9770
9740
  * */
9771
9741
  const uiModuleConfig = {
9772
9742
  id: 'ui-module',
@@ -9790,13 +9760,12 @@ const uiModuleConfig = {
9790
9760
  *
9791
9761
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9792
9762
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
9763
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
9793
9764
  * */
9794
9765
  const coreModuleConfig = [mapStoreModuleConfig, synchronizationGroupConfig, uiModuleConfig, drawtoolModuleConfig];
9795
9766
 
9796
- const createStore = () => createStore$1({
9797
- extensions: [getSagaExtension({}), {
9798
- middlewares: [metronomeListener.middleware, mapListener.middleware]
9799
- }]
9767
+ const createCustomStore = () => createStore({
9768
+ extensions: [getSagaExtension({})]
9800
9769
  });
9801
9770
  const WrapperWithModules = withEggs(coreModuleConfig)(({
9802
9771
  children
@@ -9818,4 +9787,4 @@ const StoreProvider = ({
9818
9787
  })
9819
9788
  }));
9820
9789
 
9821
- export { IS_LEGEND_OPEN_BY_DEFAULT, StoreProvider, coreModuleConfig, createStore, drawtoolActions, drawtoolModuleConfig, reducer as drawtoolReducer, selectors as drawtoolSelectors, filterLayers$1 as filterLayers, genericActions, genericListener, selectors$4 as genericSelectors, types$1 as genericTypes, getSingularDrawtoolDrawLayerId, getUserAddedServices, initialState$3 as initialState, layerActions, reducer$6 as layerReducer, selectors$7 as layerSelectors, types$5 as layerTypes, utils$2 as layerUtils, loadingIndicatorActions, constants as loadingIndicatorConstants, loadingIndicatorReducer, selectors$3 as loadingIndicatorSelectors, mapActions, enums as mapEnums, rootSaga$2 as mapSaga, selectors$2 as mapSelectors, mapStoreActions, mapStoreModuleConfig, mapStoreReducers, types$4 as mapTypes, mapUtils, routerActions, routerModuleConfig, utils as routerUtils, selectorMemoizationOptions, serviceActions, selectors$1 as serviceSelectors, types as serviceTypes, setUserAddedServices, storeTestSettings, storeTestUtils, utils$1 as storeUtils, constants$1 as syncConstants, actions as syncGroupsActions, reducer$3 as syncGroupsReducer, selector as syncGroupsSelector, selectors$5 as syncGroupsSelectors, types$2 as syncGroupsTypes, types$2 as types, uiActions, uiModuleConfig, reducer$5 as uiReducer, selectors$6 as uiSelectors, types$3 as uiTypes, useSetupDialog, reducer$4 as webmapReducer };
9790
+ export { IS_LEGEND_OPEN_BY_DEFAULT, StoreProvider, coreModuleConfig, createCustomStore, drawtoolActions, drawtoolModuleConfig, reducer as drawtoolReducer, selectors as drawtoolSelectors, filterLayers$1 as filterLayers, genericActions, genericListener, selectors$4 as genericSelectors, types$1 as genericTypes, getSingularDrawtoolDrawLayerId, getUserAddedServices, initialState$3 as initialState, layerActions, reducer$6 as layerReducer, selectors$7 as layerSelectors, types$5 as layerTypes, utils$2 as layerUtils, loadingIndicatorActions, constants as loadingIndicatorConstants, loadingIndicatorReducer, selectors$3 as loadingIndicatorSelectors, mapActions, enums as mapEnums, rootSaga$2 as mapSaga, selectors$2 as mapSelectors, mapStoreActions, mapStoreModuleConfig, mapStoreReducers, types$4 as mapTypes, mapUtils, routerActions, routerModuleConfig, utils as routerUtils, selectorMemoizationOptions, serviceActions, selectors$1 as serviceSelectors, types as serviceTypes, setUserAddedServices, storeTestSettings, storeTestUtils, utils$1 as storeUtils, constants$1 as syncConstants, actions as syncGroupsActions, reducer$3 as syncGroupsReducer, selector as syncGroupsSelector, selectors$5 as syncGroupsSelectors, types$2 as syncGroupsTypes, types$2 as types, uiActions, uiModuleConfig, reducer$5 as uiReducer, selectors$6 as uiSelectors, types$3 as uiTypes, useSetupDialog, reducer$4 as webmapReducer };