@opengeoweb/store 9.14.0 → 9.15.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
@@ -6,12 +6,12 @@ import { dateUtils, 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
+ import { useSelector, useDispatch, Provider } from 'react-redux';
10
+ import React, { useCallback, useEffect } from 'react';
9
11
  import { createStore as createStore$1 } from '@redux-eggs/redux-toolkit';
10
12
  import { getSagaExtension } from '@redux-eggs/saga-extension';
11
- import { takeLatest, takeEvery, select, put, all, call as call$d, delay } from 'redux-saga/effects';
13
+ import { takeLatest, takeEvery, select, put, all, call as call$e, delay } from 'redux-saga/effects';
12
14
  import { metronome } from '@opengeoweb/metronome';
13
- import React, { useCallback, useEffect } from 'react';
14
- import { Provider, useDispatch, useSelector } from 'react-redux';
15
15
 
16
16
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
17
17
 
@@ -20,7 +20,7 @@ var check = function (it) {
20
20
  };
21
21
 
22
22
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
23
- var global$i =
23
+ var global$h =
24
24
  // eslint-disable-next-line es/no-global-this -- safe
25
25
  check(typeof globalThis == 'object' && globalThis) ||
26
26
  check(typeof window == 'object' && window) ||
@@ -33,7 +33,7 @@ var global$i =
33
33
 
34
34
  var objectGetOwnPropertyDescriptor = {};
35
35
 
36
- var fails$m = function (exec) {
36
+ var fails$n = function (exec) {
37
37
  try {
38
38
  return !!exec();
39
39
  } catch (error) {
@@ -41,17 +41,17 @@ var fails$m = function (exec) {
41
41
  }
42
42
  };
43
43
 
44
- var fails$l = fails$m;
44
+ var fails$m = fails$n;
45
45
 
46
46
  // Detect IE8's incomplete defineProperty implementation
47
- var descriptors = !fails$l(function () {
47
+ var descriptors = !fails$m(function () {
48
48
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
49
49
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
50
50
  });
51
51
 
52
- var fails$k = fails$m;
52
+ var fails$l = fails$n;
53
53
 
54
- var functionBindNative = !fails$k(function () {
54
+ var functionBindNative = !fails$l(function () {
55
55
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
56
56
  var test = (function () { /* empty */ }).bind();
57
57
  // eslint-disable-next-line no-prototype-builtins -- safe
@@ -60,10 +60,10 @@ var functionBindNative = !fails$k(function () {
60
60
 
61
61
  var NATIVE_BIND$2 = functionBindNative;
62
62
 
63
- var call$c = Function.prototype.call;
63
+ var call$d = Function.prototype.call;
64
64
 
65
- var functionCall = NATIVE_BIND$2 ? call$c.bind(call$c) : function () {
66
- return call$c.apply(call$c, arguments);
65
+ var functionCall = NATIVE_BIND$2 ? call$d.bind(call$d) : function () {
66
+ return call$d.apply(call$d, arguments);
67
67
  };
68
68
 
69
69
  var objectPropertyIsEnumerable = {};
@@ -94,38 +94,38 @@ var createPropertyDescriptor$4 = function (bitmap, value) {
94
94
  var NATIVE_BIND$1 = functionBindNative;
95
95
 
96
96
  var FunctionPrototype$2 = Function.prototype;
97
- var call$b = FunctionPrototype$2.call;
98
- var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$2.bind.bind(call$b, call$b);
97
+ var call$c = FunctionPrototype$2.call;
98
+ var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$2.bind.bind(call$c, call$c);
99
99
 
100
100
  var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
101
101
  return function () {
102
- return call$b.apply(fn, arguments);
102
+ return call$c.apply(fn, arguments);
103
103
  };
104
104
  };
105
105
 
106
- var uncurryThis$i = functionUncurryThis;
106
+ var uncurryThis$l = functionUncurryThis;
107
107
 
108
- var toString$a = uncurryThis$i({}.toString);
109
- var stringSlice$4 = uncurryThis$i(''.slice);
108
+ var toString$b = uncurryThis$l({}.toString);
109
+ var stringSlice$4 = uncurryThis$l(''.slice);
110
110
 
111
111
  var classofRaw$1 = function (it) {
112
- return stringSlice$4(toString$a(it), 8, -1);
112
+ return stringSlice$4(toString$b(it), 8, -1);
113
113
  };
114
114
 
115
- var uncurryThis$h = functionUncurryThis;
116
- var fails$j = fails$m;
117
- var classof$7 = classofRaw$1;
115
+ var uncurryThis$k = functionUncurryThis;
116
+ var fails$k = fails$n;
117
+ var classof$8 = classofRaw$1;
118
118
 
119
119
  var $Object$4 = Object;
120
- var split = uncurryThis$h(''.split);
120
+ var split = uncurryThis$k(''.split);
121
121
 
122
122
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
123
- var indexedObject = fails$j(function () {
123
+ var indexedObject = fails$k(function () {
124
124
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
125
125
  // eslint-disable-next-line no-prototype-builtins -- safe
126
126
  return !$Object$4('z').propertyIsEnumerable(0);
127
127
  }) ? function (it) {
128
- return classof$7(it) === 'String' ? split(it, '') : $Object$4(it);
128
+ return classof$8(it) === 'String' ? split(it, '') : $Object$4(it);
129
129
  } : $Object$4;
130
130
 
131
131
  // we can't use just `it == null` since of `document.all` special case
@@ -140,17 +140,17 @@ var $TypeError$d = TypeError;
140
140
 
141
141
  // `RequireObjectCoercible` abstract operation
142
142
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
143
- var requireObjectCoercible$6 = function (it) {
143
+ var requireObjectCoercible$7 = function (it) {
144
144
  if (isNullOrUndefined$3(it)) throw new $TypeError$d("Can't call method on " + it);
145
145
  return it;
146
146
  };
147
147
 
148
148
  // toObject with fallback for non-array-like ES3 strings
149
149
  var IndexedObject$2 = indexedObject;
150
- var requireObjectCoercible$5 = requireObjectCoercible$6;
150
+ var requireObjectCoercible$6 = requireObjectCoercible$7;
151
151
 
152
152
  var toIndexedObject$5 = function (it) {
153
- return IndexedObject$2(requireObjectCoercible$5(it));
153
+ return IndexedObject$2(requireObjectCoercible$6(it));
154
154
  };
155
155
 
156
156
  // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
@@ -159,40 +159,40 @@ var documentAll = typeof document == 'object' && document.all;
159
159
  // `IsCallable` abstract operation
160
160
  // https://tc39.es/ecma262/#sec-iscallable
161
161
  // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
162
- var isCallable$i = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
162
+ var isCallable$k = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
163
163
  return typeof argument == 'function' || argument === documentAll;
164
164
  } : function (argument) {
165
165
  return typeof argument == 'function';
166
166
  };
167
167
 
168
- var isCallable$h = isCallable$i;
168
+ var isCallable$j = isCallable$k;
169
169
 
170
- var isObject$a = function (it) {
171
- return typeof it == 'object' ? it !== null : isCallable$h(it);
170
+ var isObject$b = function (it) {
171
+ return typeof it == 'object' ? it !== null : isCallable$j(it);
172
172
  };
173
173
 
174
- var global$h = global$i;
175
- var isCallable$g = isCallable$i;
174
+ var global$g = global$h;
175
+ var isCallable$i = isCallable$k;
176
176
 
177
177
  var aFunction = function (argument) {
178
- return isCallable$g(argument) ? argument : undefined;
178
+ return isCallable$i(argument) ? argument : undefined;
179
179
  };
180
180
 
181
- var getBuiltIn$5 = function (namespace, method) {
182
- return arguments.length < 2 ? aFunction(global$h[namespace]) : global$h[namespace] && global$h[namespace][method];
181
+ var getBuiltIn$6 = function (namespace, method) {
182
+ return arguments.length < 2 ? aFunction(global$g[namespace]) : global$g[namespace] && global$g[namespace][method];
183
183
  };
184
184
 
185
- var uncurryThis$g = functionUncurryThis;
185
+ var uncurryThis$j = functionUncurryThis;
186
186
 
187
- var objectIsPrototypeOf = uncurryThis$g({}.isPrototypeOf);
187
+ var objectIsPrototypeOf = uncurryThis$j({}.isPrototypeOf);
188
188
 
189
189
  var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
190
190
 
191
- var global$g = global$i;
191
+ var global$f = global$h;
192
192
  var userAgent = engineUserAgent;
193
193
 
194
- var process = global$g.process;
195
- var Deno = global$g.Deno;
194
+ var process = global$f.process;
195
+ var Deno = global$f.Deno;
196
196
  var versions = process && process.versions || Deno && Deno.version;
197
197
  var v8 = versions && versions.v8;
198
198
  var match, version;
@@ -218,62 +218,62 @@ var engineV8Version = version;
218
218
 
219
219
  /* eslint-disable es/no-symbol -- required for testing */
220
220
  var V8_VERSION = engineV8Version;
221
- var fails$i = fails$m;
222
- var global$f = global$i;
221
+ var fails$j = fails$n;
222
+ var global$e = global$h;
223
223
 
224
- var $String$5 = global$f.String;
224
+ var $String$6 = global$e.String;
225
225
 
226
226
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
227
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$i(function () {
227
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$j(function () {
228
228
  var symbol = Symbol('symbol detection');
229
229
  // Chrome 38 Symbol has incorrect toString conversion
230
230
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
231
231
  // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
232
232
  // of course, fail.
233
- return !$String$5(symbol) || !(Object(symbol) instanceof Symbol) ||
233
+ return !$String$6(symbol) || !(Object(symbol) instanceof Symbol) ||
234
234
  // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
235
235
  !Symbol.sham && V8_VERSION && V8_VERSION < 41;
236
236
  });
237
237
 
238
238
  /* eslint-disable es/no-symbol -- required for testing */
239
- var NATIVE_SYMBOL$1 = symbolConstructorDetection;
239
+ var NATIVE_SYMBOL$2 = symbolConstructorDetection;
240
240
 
241
- var useSymbolAsUid = NATIVE_SYMBOL$1
241
+ var useSymbolAsUid = NATIVE_SYMBOL$2
242
242
  && !Symbol.sham
243
243
  && typeof Symbol.iterator == 'symbol';
244
244
 
245
- var getBuiltIn$4 = getBuiltIn$5;
246
- var isCallable$f = isCallable$i;
245
+ var getBuiltIn$5 = getBuiltIn$6;
246
+ var isCallable$h = isCallable$k;
247
247
  var isPrototypeOf$1 = objectIsPrototypeOf;
248
248
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
249
249
 
250
250
  var $Object$3 = Object;
251
251
 
252
- var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
252
+ var isSymbol$3 = USE_SYMBOL_AS_UID$1 ? function (it) {
253
253
  return typeof it == 'symbol';
254
254
  } : function (it) {
255
- var $Symbol = getBuiltIn$4('Symbol');
256
- return isCallable$f($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$3(it));
255
+ var $Symbol = getBuiltIn$5('Symbol');
256
+ return isCallable$h($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$3(it));
257
257
  };
258
258
 
259
- var $String$4 = String;
259
+ var $String$5 = String;
260
260
 
261
261
  var tryToString$3 = function (argument) {
262
262
  try {
263
- return $String$4(argument);
263
+ return $String$5(argument);
264
264
  } catch (error) {
265
265
  return 'Object';
266
266
  }
267
267
  };
268
268
 
269
- var isCallable$e = isCallable$i;
269
+ var isCallable$g = isCallable$k;
270
270
  var tryToString$2 = tryToString$3;
271
271
 
272
272
  var $TypeError$c = TypeError;
273
273
 
274
274
  // `Assert: IsCallable(argument) is true`
275
275
  var aCallable$3 = function (argument) {
276
- if (isCallable$e(argument)) return argument;
276
+ if (isCallable$g(argument)) return argument;
277
277
  throw new $TypeError$c(tryToString$2(argument) + ' is not a function');
278
278
  };
279
279
 
@@ -287,9 +287,9 @@ var getMethod$2 = function (V, P) {
287
287
  return isNullOrUndefined$2(func) ? undefined : aCallable$2(func);
288
288
  };
289
289
 
290
- var call$a = functionCall;
291
- var isCallable$d = isCallable$i;
292
- var isObject$9 = isObject$a;
290
+ var call$b = functionCall;
291
+ var isCallable$f = isCallable$k;
292
+ var isObject$a = isObject$b;
293
293
 
294
294
  var $TypeError$b = TypeError;
295
295
 
@@ -297,61 +297,61 @@ var $TypeError$b = TypeError;
297
297
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
298
298
  var ordinaryToPrimitive$1 = function (input, pref) {
299
299
  var fn, val;
300
- if (pref === 'string' && isCallable$d(fn = input.toString) && !isObject$9(val = call$a(fn, input))) return val;
301
- if (isCallable$d(fn = input.valueOf) && !isObject$9(val = call$a(fn, input))) return val;
302
- if (pref !== 'string' && isCallable$d(fn = input.toString) && !isObject$9(val = call$a(fn, input))) return val;
300
+ if (pref === 'string' && isCallable$f(fn = input.toString) && !isObject$a(val = call$b(fn, input))) return val;
301
+ if (isCallable$f(fn = input.valueOf) && !isObject$a(val = call$b(fn, input))) return val;
302
+ if (pref !== 'string' && isCallable$f(fn = input.toString) && !isObject$a(val = call$b(fn, input))) return val;
303
303
  throw new $TypeError$b("Can't convert object to primitive value");
304
304
  };
305
305
 
306
- var shared$4 = {exports: {}};
306
+ var sharedStore = {exports: {}};
307
307
 
308
- var global$e = global$i;
308
+ var global$d = global$h;
309
309
 
310
310
  // eslint-disable-next-line es/no-object-defineproperty -- safe
311
311
  var defineProperty$6 = Object.defineProperty;
312
312
 
313
313
  var defineGlobalProperty$3 = function (key, value) {
314
314
  try {
315
- defineProperty$6(global$e, key, { value: value, configurable: true, writable: true });
315
+ defineProperty$6(global$d, key, { value: value, configurable: true, writable: true });
316
316
  } catch (error) {
317
- global$e[key] = value;
317
+ global$d[key] = value;
318
318
  } return value;
319
319
  };
320
320
 
321
- var global$d = global$i;
321
+ var globalThis$1 = global$h;
322
322
  var defineGlobalProperty$2 = defineGlobalProperty$3;
323
323
 
324
324
  var SHARED = '__core-js_shared__';
325
- var store$3 = global$d[SHARED] || defineGlobalProperty$2(SHARED, {});
326
-
327
- var sharedStore = store$3;
328
-
329
- var store$2 = sharedStore;
325
+ var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
330
326
 
331
- (shared$4.exports = function (key, value) {
332
- return store$2[key] || (store$2[key] = value !== undefined ? value : {});
333
- })('versions', []).push({
334
- version: '3.35.1',
327
+ (store$3.versions || (store$3.versions = [])).push({
328
+ version: '3.36.1',
335
329
  mode: 'global',
336
330
  copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
337
- license: 'https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE',
331
+ license: 'https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE',
338
332
  source: 'https://github.com/zloirock/core-js'
339
333
  });
340
334
 
341
- var requireObjectCoercible$4 = requireObjectCoercible$6;
335
+ var store$2 = sharedStore.exports;
336
+
337
+ var shared$4 = function (key, value) {
338
+ return store$2[key] || (store$2[key] = value || {});
339
+ };
340
+
341
+ var requireObjectCoercible$5 = requireObjectCoercible$7;
342
342
 
343
343
  var $Object$2 = Object;
344
344
 
345
345
  // `ToObject` abstract operation
346
346
  // https://tc39.es/ecma262/#sec-toobject
347
347
  var toObject$6 = function (argument) {
348
- return $Object$2(requireObjectCoercible$4(argument));
348
+ return $Object$2(requireObjectCoercible$5(argument));
349
349
  };
350
350
 
351
- var uncurryThis$f = functionUncurryThis;
351
+ var uncurryThis$i = functionUncurryThis;
352
352
  var toObject$5 = toObject$6;
353
353
 
354
- var hasOwnProperty = uncurryThis$f({}.hasOwnProperty);
354
+ var hasOwnProperty = uncurryThis$i({}.hasOwnProperty);
355
355
 
356
356
  // `HasOwnProperty` abstract operation
357
357
  // https://tc39.es/ecma262/#sec-hasownproperty
@@ -360,21 +360,21 @@ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
360
360
  return hasOwnProperty(toObject$5(it), key);
361
361
  };
362
362
 
363
- var uncurryThis$e = functionUncurryThis;
363
+ var uncurryThis$h = functionUncurryThis;
364
364
 
365
365
  var id = 0;
366
366
  var postfix = Math.random();
367
- var toString$9 = uncurryThis$e(1.0.toString);
367
+ var toString$a = uncurryThis$h(1.0.toString);
368
368
 
369
369
  var uid$2 = function (key) {
370
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$9(++id + postfix, 36);
370
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$a(++id + postfix, 36);
371
371
  };
372
372
 
373
- var global$c = global$i;
374
- var shared$3 = shared$4.exports;
373
+ var global$c = global$h;
374
+ var shared$3 = shared$4;
375
375
  var hasOwn$9 = hasOwnProperty_1;
376
376
  var uid$1 = uid$2;
377
- var NATIVE_SYMBOL = symbolConstructorDetection;
377
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
378
378
  var USE_SYMBOL_AS_UID = useSymbolAsUid;
379
379
 
380
380
  var Symbol$2 = global$c.Symbol;
@@ -383,15 +383,15 @@ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2['for'] || Symbol$2 : Sy
383
383
 
384
384
  var wellKnownSymbol$c = function (name) {
385
385
  if (!hasOwn$9(WellKnownSymbolsStore, name)) {
386
- WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$9(Symbol$2, name)
386
+ WellKnownSymbolsStore[name] = NATIVE_SYMBOL$1 && hasOwn$9(Symbol$2, name)
387
387
  ? Symbol$2[name]
388
388
  : createWellKnownSymbol('Symbol.' + name);
389
389
  } return WellKnownSymbolsStore[name];
390
390
  };
391
391
 
392
- var call$9 = functionCall;
393
- var isObject$8 = isObject$a;
394
- var isSymbol$1 = isSymbol$2;
392
+ var call$a = functionCall;
393
+ var isObject$9 = isObject$b;
394
+ var isSymbol$2 = isSymbol$3;
395
395
  var getMethod$1 = getMethod$2;
396
396
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
397
397
  var wellKnownSymbol$b = wellKnownSymbol$c;
@@ -402,13 +402,13 @@ var TO_PRIMITIVE = wellKnownSymbol$b('toPrimitive');
402
402
  // `ToPrimitive` abstract operation
403
403
  // https://tc39.es/ecma262/#sec-toprimitive
404
404
  var toPrimitive$1 = function (input, pref) {
405
- if (!isObject$8(input) || isSymbol$1(input)) return input;
405
+ if (!isObject$9(input) || isSymbol$2(input)) return input;
406
406
  var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
407
407
  var result;
408
408
  if (exoticToPrim) {
409
409
  if (pref === undefined) pref = 'default';
410
- result = call$9(exoticToPrim, input, pref);
411
- if (!isObject$8(result) || isSymbol$1(result)) return result;
410
+ result = call$a(exoticToPrim, input, pref);
411
+ if (!isObject$9(result) || isSymbol$2(result)) return result;
412
412
  throw new $TypeError$a("Can't convert object to primitive value");
413
413
  }
414
414
  if (pref === undefined) pref = 'number';
@@ -416,32 +416,32 @@ var toPrimitive$1 = function (input, pref) {
416
416
  };
417
417
 
418
418
  var toPrimitive = toPrimitive$1;
419
- var isSymbol = isSymbol$2;
419
+ var isSymbol$1 = isSymbol$3;
420
420
 
421
421
  // `ToPropertyKey` abstract operation
422
422
  // https://tc39.es/ecma262/#sec-topropertykey
423
423
  var toPropertyKey$2 = function (argument) {
424
424
  var key = toPrimitive(argument, 'string');
425
- return isSymbol(key) ? key : key + '';
425
+ return isSymbol$1(key) ? key : key + '';
426
426
  };
427
427
 
428
- var global$b = global$i;
429
- var isObject$7 = isObject$a;
428
+ var global$b = global$h;
429
+ var isObject$8 = isObject$b;
430
430
 
431
431
  var document$1 = global$b.document;
432
432
  // typeof document.createElement is 'object' in old IE
433
- var EXISTS$1 = isObject$7(document$1) && isObject$7(document$1.createElement);
433
+ var EXISTS$1 = isObject$8(document$1) && isObject$8(document$1.createElement);
434
434
 
435
435
  var documentCreateElement$2 = function (it) {
436
436
  return EXISTS$1 ? document$1.createElement(it) : {};
437
437
  };
438
438
 
439
439
  var DESCRIPTORS$b = descriptors;
440
- var fails$h = fails$m;
440
+ var fails$i = fails$n;
441
441
  var createElement = documentCreateElement$2;
442
442
 
443
443
  // Thanks to IE8 for its funny defineProperty
444
- var ie8DomDefine = !DESCRIPTORS$b && !fails$h(function () {
444
+ var ie8DomDefine = !DESCRIPTORS$b && !fails$i(function () {
445
445
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
446
446
  return Object.defineProperty(createElement('div'), 'a', {
447
447
  get: function () { return 7; }
@@ -449,7 +449,7 @@ var ie8DomDefine = !DESCRIPTORS$b && !fails$h(function () {
449
449
  });
450
450
 
451
451
  var DESCRIPTORS$a = descriptors;
452
- var call$8 = functionCall;
452
+ var call$9 = functionCall;
453
453
  var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
454
454
  var createPropertyDescriptor$3 = createPropertyDescriptor$4;
455
455
  var toIndexedObject$4 = toIndexedObject$5;
@@ -468,17 +468,17 @@ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$a ? $getOwnPropertyDescriptor$1 :
468
468
  if (IE8_DOM_DEFINE$1) try {
469
469
  return $getOwnPropertyDescriptor$1(O, P);
470
470
  } catch (error) { /* empty */ }
471
- if (hasOwn$8(O, P)) return createPropertyDescriptor$3(!call$8(propertyIsEnumerableModule$1.f, O, P), O[P]);
471
+ if (hasOwn$8(O, P)) return createPropertyDescriptor$3(!call$9(propertyIsEnumerableModule$1.f, O, P), O[P]);
472
472
  };
473
473
 
474
474
  var objectDefineProperty = {};
475
475
 
476
476
  var DESCRIPTORS$9 = descriptors;
477
- var fails$g = fails$m;
477
+ var fails$h = fails$n;
478
478
 
479
479
  // V8 ~ Chrome 36-
480
480
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
481
- var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$g(function () {
481
+ var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$h(function () {
482
482
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
483
483
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
484
484
  value: 42,
@@ -486,21 +486,21 @@ var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$g(function () {
486
486
  }).prototype !== 42;
487
487
  });
488
488
 
489
- var isObject$6 = isObject$a;
489
+ var isObject$7 = isObject$b;
490
490
 
491
- var $String$3 = String;
491
+ var $String$4 = String;
492
492
  var $TypeError$9 = TypeError;
493
493
 
494
494
  // `Assert: Type(argument) is Object`
495
- var anObject$a = function (argument) {
496
- if (isObject$6(argument)) return argument;
497
- throw new $TypeError$9($String$3(argument) + ' is not an object');
495
+ var anObject$9 = function (argument) {
496
+ if (isObject$7(argument)) return argument;
497
+ throw new $TypeError$9($String$4(argument) + ' is not an object');
498
498
  };
499
499
 
500
500
  var DESCRIPTORS$8 = descriptors;
501
501
  var IE8_DOM_DEFINE = ie8DomDefine;
502
502
  var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
503
- var anObject$9 = anObject$a;
503
+ var anObject$8 = anObject$9;
504
504
  var toPropertyKey = toPropertyKey$2;
505
505
 
506
506
  var $TypeError$8 = TypeError;
@@ -515,9 +515,9 @@ var WRITABLE = 'writable';
515
515
  // `Object.defineProperty` method
516
516
  // https://tc39.es/ecma262/#sec-object.defineproperty
517
517
  objectDefineProperty.f = DESCRIPTORS$8 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
518
- anObject$9(O);
518
+ anObject$8(O);
519
519
  P = toPropertyKey(P);
520
- anObject$9(Attributes);
520
+ anObject$8(Attributes);
521
521
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
522
522
  var current = $getOwnPropertyDescriptor(O, P);
523
523
  if (current && current[WRITABLE]) {
@@ -530,9 +530,9 @@ objectDefineProperty.f = DESCRIPTORS$8 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
530
530
  }
531
531
  } return $defineProperty(O, P, Attributes);
532
532
  } : $defineProperty : function defineProperty(O, P, Attributes) {
533
- anObject$9(O);
533
+ anObject$8(O);
534
534
  P = toPropertyKey(P);
535
- anObject$9(Attributes);
535
+ anObject$8(Attributes);
536
536
  if (IE8_DOM_DEFINE) try {
537
537
  return $defineProperty(O, P, Attributes);
538
538
  } catch (error) { /* empty */ }
@@ -572,14 +572,14 @@ var functionName = {
572
572
  CONFIGURABLE: CONFIGURABLE
573
573
  };
574
574
 
575
- var uncurryThis$d = functionUncurryThis;
576
- var isCallable$c = isCallable$i;
577
- var store$1 = sharedStore;
575
+ var uncurryThis$g = functionUncurryThis;
576
+ var isCallable$e = isCallable$k;
577
+ var store$1 = sharedStore.exports;
578
578
 
579
- var functionToString = uncurryThis$d(Function.toString);
579
+ var functionToString = uncurryThis$g(Function.toString);
580
580
 
581
581
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
582
- if (!isCallable$c(store$1.inspectSource)) {
582
+ if (!isCallable$e(store$1.inspectSource)) {
583
583
  store$1.inspectSource = function (it) {
584
584
  return functionToString(it);
585
585
  };
@@ -587,14 +587,14 @@ if (!isCallable$c(store$1.inspectSource)) {
587
587
 
588
588
  var inspectSource$2 = store$1.inspectSource;
589
589
 
590
- var global$a = global$i;
591
- var isCallable$b = isCallable$i;
590
+ var global$a = global$h;
591
+ var isCallable$d = isCallable$k;
592
592
 
593
593
  var WeakMap$1 = global$a.WeakMap;
594
594
 
595
- var weakMapBasicDetection = isCallable$b(WeakMap$1) && /native code/.test(String(WeakMap$1));
595
+ var weakMapBasicDetection = isCallable$d(WeakMap$1) && /native code/.test(String(WeakMap$1));
596
596
 
597
- var shared$2 = shared$4.exports;
597
+ var shared$2 = shared$4;
598
598
  var uid = uid$2;
599
599
 
600
600
  var keys = shared$2('keys');
@@ -606,11 +606,11 @@ var sharedKey$3 = function (key) {
606
606
  var hiddenKeys$4 = {};
607
607
 
608
608
  var NATIVE_WEAK_MAP = weakMapBasicDetection;
609
- var global$9 = global$i;
610
- var isObject$5 = isObject$a;
609
+ var global$9 = global$h;
610
+ var isObject$6 = isObject$b;
611
611
  var createNonEnumerableProperty$7 = createNonEnumerableProperty$8;
612
612
  var hasOwn$6 = hasOwnProperty_1;
613
- var shared$1 = sharedStore;
613
+ var shared$1 = sharedStore.exports;
614
614
  var sharedKey$2 = sharedKey$3;
615
615
  var hiddenKeys$3 = hiddenKeys$4;
616
616
 
@@ -626,7 +626,7 @@ var enforce = function (it) {
626
626
  var getterFor = function (TYPE) {
627
627
  return function (it) {
628
628
  var state;
629
- if (!isObject$5(it) || (state = get(it)).type !== TYPE) {
629
+ if (!isObject$6(it) || (state = get(it)).type !== TYPE) {
630
630
  throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
631
631
  } return state;
632
632
  };
@@ -676,9 +676,9 @@ var internalState = {
676
676
  getterFor: getterFor
677
677
  };
678
678
 
679
- var uncurryThis$c = functionUncurryThis;
680
- var fails$f = fails$m;
681
- var isCallable$a = isCallable$i;
679
+ var uncurryThis$f = functionUncurryThis;
680
+ var fails$g = fails$n;
681
+ var isCallable$c = isCallable$k;
682
682
  var hasOwn$5 = hasOwnProperty_1;
683
683
  var DESCRIPTORS$5 = descriptors;
684
684
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
@@ -687,22 +687,22 @@ var InternalStateModule$1 = internalState;
687
687
 
688
688
  var enforceInternalState = InternalStateModule$1.enforce;
689
689
  var getInternalState$2 = InternalStateModule$1.get;
690
- var $String$2 = String;
690
+ var $String$3 = String;
691
691
  // eslint-disable-next-line es/no-object-defineproperty -- safe
692
692
  var defineProperty$5 = Object.defineProperty;
693
- var stringSlice$3 = uncurryThis$c(''.slice);
694
- var replace$3 = uncurryThis$c(''.replace);
695
- var join = uncurryThis$c([].join);
693
+ var stringSlice$3 = uncurryThis$f(''.slice);
694
+ var replace$4 = uncurryThis$f(''.replace);
695
+ var join = uncurryThis$f([].join);
696
696
 
697
- var CONFIGURABLE_LENGTH = DESCRIPTORS$5 && !fails$f(function () {
697
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$5 && !fails$g(function () {
698
698
  return defineProperty$5(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
699
699
  });
700
700
 
701
701
  var TEMPLATE = String(String).split('String');
702
702
 
703
703
  var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
704
- if (stringSlice$3($String$2(name), 0, 7) === 'Symbol(') {
705
- name = '[' + replace$3($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
704
+ if (stringSlice$3($String$3(name), 0, 7) === 'Symbol(') {
705
+ name = '[' + replace$4($String$3(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
706
706
  }
707
707
  if (options && options.getter) name = 'get ' + name;
708
708
  if (options && options.setter) name = 'set ' + name;
@@ -728,10 +728,10 @@ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
728
728
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
729
729
  // eslint-disable-next-line no-extend-native -- required
730
730
  Function.prototype.toString = makeBuiltIn$1(function toString() {
731
- return isCallable$a(this) && getInternalState$2(this).source || inspectSource$1(this);
731
+ return isCallable$c(this) && getInternalState$2(this).source || inspectSource$1(this);
732
732
  }, 'toString');
733
733
 
734
- var isCallable$9 = isCallable$i;
734
+ var isCallable$b = isCallable$k;
735
735
  var definePropertyModule$2 = objectDefineProperty;
736
736
  var makeBuiltIn = makeBuiltIn$2.exports;
737
737
  var defineGlobalProperty$1 = defineGlobalProperty$3;
@@ -740,7 +740,7 @@ var defineBuiltIn$4 = function (O, key, value, options) {
740
740
  if (!options) options = {};
741
741
  var simple = options.enumerable;
742
742
  var name = options.name !== undefined ? options.name : key;
743
- if (isCallable$9(value)) makeBuiltIn(value, name, options);
743
+ if (isCallable$b(value)) makeBuiltIn(value, name, options);
744
744
  if (options.global) {
745
745
  if (simple) O[key] = value;
746
746
  else defineGlobalProperty$1(key, value);
@@ -823,6 +823,7 @@ var createMethod$3 = function (IS_INCLUDES) {
823
823
  return function ($this, el, fromIndex) {
824
824
  var O = toIndexedObject$3($this);
825
825
  var length = lengthOfArrayLike$3(O);
826
+ if (length === 0) return !IS_INCLUDES && -1;
826
827
  var index = toAbsoluteIndex(fromIndex, length);
827
828
  var value;
828
829
  // Array#includes uses SameValueZero equality algorithm
@@ -847,23 +848,23 @@ var arrayIncludes = {
847
848
  indexOf: createMethod$3(false)
848
849
  };
849
850
 
850
- var uncurryThis$b = functionUncurryThis;
851
+ var uncurryThis$e = functionUncurryThis;
851
852
  var hasOwn$4 = hasOwnProperty_1;
852
853
  var toIndexedObject$2 = toIndexedObject$5;
853
854
  var indexOf$1 = arrayIncludes.indexOf;
854
855
  var hiddenKeys$2 = hiddenKeys$4;
855
856
 
856
- var push$1 = uncurryThis$b([].push);
857
+ var push$2 = uncurryThis$e([].push);
857
858
 
858
859
  var objectKeysInternal = function (object, names) {
859
860
  var O = toIndexedObject$2(object);
860
861
  var i = 0;
861
862
  var result = [];
862
863
  var key;
863
- for (key in O) !hasOwn$4(hiddenKeys$2, key) && hasOwn$4(O, key) && push$1(result, key);
864
+ for (key in O) !hasOwn$4(hiddenKeys$2, key) && hasOwn$4(O, key) && push$2(result, key);
864
865
  // Don't enum bug & hidden keys
865
866
  while (names.length > i) if (hasOwn$4(O, key = names[i++])) {
866
- ~indexOf$1(result, key) || push$1(result, key);
867
+ ~indexOf$1(result, key) || push$2(result, key);
867
868
  }
868
869
  return result;
869
870
  };
@@ -896,17 +897,17 @@ var objectGetOwnPropertySymbols = {};
896
897
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
897
898
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
898
899
 
899
- var getBuiltIn$3 = getBuiltIn$5;
900
- var uncurryThis$a = functionUncurryThis;
900
+ var getBuiltIn$4 = getBuiltIn$6;
901
+ var uncurryThis$d = functionUncurryThis;
901
902
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
902
903
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
903
- var anObject$8 = anObject$a;
904
+ var anObject$7 = anObject$9;
904
905
 
905
- var concat$1 = uncurryThis$a([].concat);
906
+ var concat$1 = uncurryThis$d([].concat);
906
907
 
907
908
  // all object keys, includes non-enumerable and symbols
908
- var ownKeys$1 = getBuiltIn$3('Reflect', 'ownKeys') || function ownKeys(it) {
909
- var keys = getOwnPropertyNamesModule.f(anObject$8(it));
909
+ var ownKeys$1 = getBuiltIn$4('Reflect', 'ownKeys') || function ownKeys(it) {
910
+ var keys = getOwnPropertyNamesModule.f(anObject$7(it));
910
911
  var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
911
912
  return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
912
913
  };
@@ -928,8 +929,8 @@ var copyConstructorProperties$2 = function (target, source, exceptions) {
928
929
  }
929
930
  };
930
931
 
931
- var fails$e = fails$m;
932
- var isCallable$8 = isCallable$i;
932
+ var fails$f = fails$n;
933
+ var isCallable$a = isCallable$k;
933
934
 
934
935
  var replacement = /#|\.prototype\./;
935
936
 
@@ -937,7 +938,7 @@ var isForced$1 = function (feature, detection) {
937
938
  var value = data[normalize(feature)];
938
939
  return value === POLYFILL ? true
939
940
  : value === NATIVE ? false
940
- : isCallable$8(detection) ? fails$e(detection)
941
+ : isCallable$a(detection) ? fails$f(detection)
941
942
  : !!detection;
942
943
  };
943
944
 
@@ -951,7 +952,7 @@ var POLYFILL = isForced$1.POLYFILL = 'P';
951
952
 
952
953
  var isForced_1 = isForced$1;
953
954
 
954
- var global$8 = global$i;
955
+ var global$8 = global$h;
955
956
  var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
956
957
  var createNonEnumerableProperty$6 = createNonEnumerableProperty$8;
957
958
  var defineBuiltIn$3 = defineBuiltIn$4;
@@ -1017,9 +1018,9 @@ var objectKeys$2 = Object.keys || function keys(O) {
1017
1018
  };
1018
1019
 
1019
1020
  var DESCRIPTORS$4 = descriptors;
1020
- var uncurryThis$9 = functionUncurryThis;
1021
- var call$7 = functionCall;
1022
- var fails$d = fails$m;
1021
+ var uncurryThis$c = functionUncurryThis;
1022
+ var call$8 = functionCall;
1023
+ var fails$e = fails$n;
1023
1024
  var objectKeys$1 = objectKeys$2;
1024
1025
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1025
1026
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
@@ -1030,11 +1031,11 @@ var IndexedObject$1 = indexedObject;
1030
1031
  var $assign = Object.assign;
1031
1032
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1032
1033
  var defineProperty$4 = Object.defineProperty;
1033
- var concat = uncurryThis$9([].concat);
1034
+ var concat = uncurryThis$c([].concat);
1034
1035
 
1035
1036
  // `Object.assign` method
1036
1037
  // https://tc39.es/ecma262/#sec-object.assign
1037
- var objectAssign = !$assign || fails$d(function () {
1038
+ var objectAssign = !$assign || fails$e(function () {
1038
1039
  // should have correct order of operations (Edge bug)
1039
1040
  if (DESCRIPTORS$4 && $assign({ b: 1 }, $assign(defineProperty$4({}, 'a', {
1040
1041
  enumerable: true,
@@ -1068,18 +1069,18 @@ var objectAssign = !$assign || fails$d(function () {
1068
1069
  var key;
1069
1070
  while (length > j) {
1070
1071
  key = keys[j++];
1071
- if (!DESCRIPTORS$4 || call$7(propertyIsEnumerable, S, key)) T[key] = S[key];
1072
+ if (!DESCRIPTORS$4 || call$8(propertyIsEnumerable, S, key)) T[key] = S[key];
1072
1073
  }
1073
1074
  } return T;
1074
1075
  } : $assign;
1075
1076
 
1076
- var $$a = _export;
1077
+ var $$b = _export;
1077
1078
  var assign = objectAssign;
1078
1079
 
1079
1080
  // `Object.assign` method
1080
1081
  // https://tc39.es/ecma262/#sec-object.assign
1081
1082
  // eslint-disable-next-line es/no-object-assign -- required for testing
1082
- $$a({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1083
+ $$b({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1083
1084
  assign: assign
1084
1085
  });
1085
1086
 
@@ -1088,7 +1089,7 @@ var objectDefineProperties = {};
1088
1089
  var DESCRIPTORS$3 = descriptors;
1089
1090
  var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1090
1091
  var definePropertyModule = objectDefineProperty;
1091
- var anObject$7 = anObject$a;
1092
+ var anObject$6 = anObject$9;
1092
1093
  var toIndexedObject$1 = toIndexedObject$5;
1093
1094
  var objectKeys = objectKeys$2;
1094
1095
 
@@ -1096,7 +1097,7 @@ var objectKeys = objectKeys$2;
1096
1097
  // https://tc39.es/ecma262/#sec-object.defineproperties
1097
1098
  // eslint-disable-next-line es/no-object-defineproperties -- safe
1098
1099
  objectDefineProperties.f = DESCRIPTORS$3 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1099
- anObject$7(O);
1100
+ anObject$6(O);
1100
1101
  var props = toIndexedObject$1(Properties);
1101
1102
  var keys = objectKeys(Properties);
1102
1103
  var length = keys.length;
@@ -1106,12 +1107,12 @@ objectDefineProperties.f = DESCRIPTORS$3 && !V8_PROTOTYPE_DEFINE_BUG ? Object.de
1106
1107
  return O;
1107
1108
  };
1108
1109
 
1109
- var getBuiltIn$2 = getBuiltIn$5;
1110
+ var getBuiltIn$3 = getBuiltIn$6;
1110
1111
 
1111
- var html$1 = getBuiltIn$2('document', 'documentElement');
1112
+ var html$1 = getBuiltIn$3('document', 'documentElement');
1112
1113
 
1113
1114
  /* global ActiveXObject -- old IE, WSH */
1114
- var anObject$6 = anObject$a;
1115
+ var anObject$5 = anObject$9;
1115
1116
  var definePropertiesModule = objectDefineProperties;
1116
1117
  var enumBugKeys = enumBugKeys$3;
1117
1118
  var hiddenKeys = hiddenKeys$4;
@@ -1185,7 +1186,7 @@ hiddenKeys[IE_PROTO$1] = true;
1185
1186
  var objectCreate = Object.create || function create(O, Properties) {
1186
1187
  var result;
1187
1188
  if (O !== null) {
1188
- EmptyConstructor[PROTOTYPE] = anObject$6(O);
1189
+ EmptyConstructor[PROTOTYPE] = anObject$5(O);
1189
1190
  result = new EmptyConstructor();
1190
1191
  EmptyConstructor[PROTOTYPE] = null;
1191
1192
  // add "__proto__" for Object.getPrototypeOf polyfill
@@ -1215,20 +1216,20 @@ var addToUnscopables$2 = function (key) {
1215
1216
  ArrayPrototype[UNSCOPABLES][key] = true;
1216
1217
  };
1217
1218
 
1218
- var $$9 = _export;
1219
+ var $$a = _export;
1219
1220
  var $includes = arrayIncludes.includes;
1220
- var fails$c = fails$m;
1221
+ var fails$d = fails$n;
1221
1222
  var addToUnscopables$1 = addToUnscopables$2;
1222
1223
 
1223
1224
  // FF99+ bug
1224
- var BROKEN_ON_SPARSE = fails$c(function () {
1225
+ var BROKEN_ON_SPARSE = fails$d(function () {
1225
1226
  // eslint-disable-next-line es/no-array-prototype-includes -- detection
1226
1227
  return !Array(1).includes();
1227
1228
  });
1228
1229
 
1229
1230
  // `Array.prototype.includes` method
1230
1231
  // https://tc39.es/ecma262/#sec-array.prototype.includes
1231
- $$9({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
1232
+ $$a({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
1232
1233
  includes: function includes(el /* , fromIndex = 0 */) {
1233
1234
  return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
1234
1235
  }
@@ -1239,9 +1240,9 @@ addToUnscopables$1('includes');
1239
1240
 
1240
1241
  var iterators = {};
1241
1242
 
1242
- var fails$b = fails$m;
1243
+ var fails$c = fails$n;
1243
1244
 
1244
- var correctPrototypeGetter = !fails$b(function () {
1245
+ var correctPrototypeGetter = !fails$c(function () {
1245
1246
  function F() { /* empty */ }
1246
1247
  F.prototype.constructor = null;
1247
1248
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
@@ -1249,7 +1250,7 @@ var correctPrototypeGetter = !fails$b(function () {
1249
1250
  });
1250
1251
 
1251
1252
  var hasOwn$2 = hasOwnProperty_1;
1252
- var isCallable$7 = isCallable$i;
1253
+ var isCallable$9 = isCallable$k;
1253
1254
  var toObject$3 = toObject$6;
1254
1255
  var sharedKey = sharedKey$3;
1255
1256
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
@@ -1265,14 +1266,14 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf :
1265
1266
  var object = toObject$3(O);
1266
1267
  if (hasOwn$2(object, IE_PROTO)) return object[IE_PROTO];
1267
1268
  var constructor = object.constructor;
1268
- if (isCallable$7(constructor) && object instanceof constructor) {
1269
+ if (isCallable$9(constructor) && object instanceof constructor) {
1269
1270
  return constructor.prototype;
1270
1271
  } return object instanceof $Object$1 ? ObjectPrototype : null;
1271
1272
  };
1272
1273
 
1273
- var fails$a = fails$m;
1274
- var isCallable$6 = isCallable$i;
1275
- var isObject$4 = isObject$a;
1274
+ var fails$b = fails$n;
1275
+ var isCallable$8 = isCallable$k;
1276
+ var isObject$5 = isObject$b;
1276
1277
  var getPrototypeOf$1 = objectGetPrototypeOf;
1277
1278
  var defineBuiltIn$2 = defineBuiltIn$4;
1278
1279
  var wellKnownSymbol$9 = wellKnownSymbol$c;
@@ -1295,7 +1296,7 @@ if ([].keys) {
1295
1296
  }
1296
1297
  }
1297
1298
 
1298
- var NEW_ITERATOR_PROTOTYPE = !isObject$4(IteratorPrototype$2) || fails$a(function () {
1299
+ var NEW_ITERATOR_PROTOTYPE = !isObject$5(IteratorPrototype$2) || fails$b(function () {
1299
1300
  var test = {};
1300
1301
  // FF44- legacy iterators case
1301
1302
  return IteratorPrototype$2[ITERATOR$3].call(test) !== test;
@@ -1305,7 +1306,7 @@ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1305
1306
 
1306
1307
  // `%IteratorPrototype%[@@iterator]()` method
1307
1308
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1308
- if (!isCallable$6(IteratorPrototype$2[ITERATOR$3])) {
1309
+ if (!isCallable$8(IteratorPrototype$2[ITERATOR$3])) {
1309
1310
  defineBuiltIn$2(IteratorPrototype$2, ITERATOR$3, function () {
1310
1311
  return this;
1311
1312
  });
@@ -1345,35 +1346,36 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
1345
1346
  return IteratorConstructor;
1346
1347
  };
1347
1348
 
1348
- var uncurryThis$8 = functionUncurryThis;
1349
+ var uncurryThis$b = functionUncurryThis;
1349
1350
  var aCallable$1 = aCallable$3;
1350
1351
 
1351
1352
  var functionUncurryThisAccessor = function (object, key, method) {
1352
1353
  try {
1353
1354
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1354
- return uncurryThis$8(aCallable$1(Object.getOwnPropertyDescriptor(object, key)[method]));
1355
+ return uncurryThis$b(aCallable$1(Object.getOwnPropertyDescriptor(object, key)[method]));
1355
1356
  } catch (error) { /* empty */ }
1356
1357
  };
1357
1358
 
1358
- var isObject$3 = isObject$a;
1359
+ var isObject$4 = isObject$b;
1359
1360
 
1360
1361
  var isPossiblePrototype$1 = function (argument) {
1361
- return isObject$3(argument) || argument === null;
1362
+ return isObject$4(argument) || argument === null;
1362
1363
  };
1363
1364
 
1364
1365
  var isPossiblePrototype = isPossiblePrototype$1;
1365
1366
 
1366
- var $String$1 = String;
1367
+ var $String$2 = String;
1367
1368
  var $TypeError$7 = TypeError;
1368
1369
 
1369
1370
  var aPossiblePrototype$1 = function (argument) {
1370
1371
  if (isPossiblePrototype(argument)) return argument;
1371
- throw new $TypeError$7("Can't set " + $String$1(argument) + ' as a prototype');
1372
+ throw new $TypeError$7("Can't set " + $String$2(argument) + ' as a prototype');
1372
1373
  };
1373
1374
 
1374
1375
  /* eslint-disable no-proto -- safe */
1375
1376
  var uncurryThisAccessor = functionUncurryThisAccessor;
1376
- var anObject$5 = anObject$a;
1377
+ var isObject$3 = isObject$b;
1378
+ var requireObjectCoercible$4 = requireObjectCoercible$7;
1377
1379
  var aPossiblePrototype = aPossiblePrototype$1;
1378
1380
 
1379
1381
  // `Object.setPrototypeOf` method
@@ -1390,18 +1392,19 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1390
1392
  CORRECT_SETTER = test instanceof Array;
1391
1393
  } catch (error) { /* empty */ }
1392
1394
  return function setPrototypeOf(O, proto) {
1393
- anObject$5(O);
1395
+ requireObjectCoercible$4(O);
1394
1396
  aPossiblePrototype(proto);
1397
+ if (!isObject$3(O)) return O;
1395
1398
  if (CORRECT_SETTER) setter(O, proto);
1396
1399
  else O.__proto__ = proto;
1397
1400
  return O;
1398
1401
  };
1399
1402
  }() : undefined);
1400
1403
 
1401
- var $$8 = _export;
1402
- var call$6 = functionCall;
1404
+ var $$9 = _export;
1405
+ var call$7 = functionCall;
1403
1406
  var FunctionName = functionName;
1404
- var isCallable$5 = isCallable$i;
1407
+ var isCallable$7 = isCallable$k;
1405
1408
  var createIteratorConstructor = iteratorCreateConstructor;
1406
1409
  var getPrototypeOf = objectGetPrototypeOf;
1407
1410
  var setPrototypeOf$2 = objectSetPrototypeOf;
@@ -1456,7 +1459,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1456
1459
  if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1457
1460
  if (setPrototypeOf$2) {
1458
1461
  setPrototypeOf$2(CurrentIteratorPrototype, IteratorPrototype);
1459
- } else if (!isCallable$5(CurrentIteratorPrototype[ITERATOR$2])) {
1462
+ } else if (!isCallable$7(CurrentIteratorPrototype[ITERATOR$2])) {
1460
1463
  defineBuiltIn$1(CurrentIteratorPrototype, ITERATOR$2, returnThis);
1461
1464
  }
1462
1465
  }
@@ -1471,7 +1474,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1471
1474
  createNonEnumerableProperty$5(IterablePrototype, 'name', VALUES);
1472
1475
  } else {
1473
1476
  INCORRECT_VALUES_NAME = true;
1474
- defaultIterator = function values() { return call$6(nativeIterator, this); };
1477
+ defaultIterator = function values() { return call$7(nativeIterator, this); };
1475
1478
  }
1476
1479
  }
1477
1480
 
@@ -1486,7 +1489,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1486
1489
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1487
1490
  defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
1488
1491
  }
1489
- } else $$8({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1492
+ } else $$9({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1490
1493
  }
1491
1494
 
1492
1495
  // define iterator
@@ -1565,17 +1568,17 @@ if (DESCRIPTORS$2 && values.name !== 'values') try {
1565
1568
  defineProperty$1(values, 'name', { value: 'values' });
1566
1569
  } catch (error) { /* empty */ }
1567
1570
 
1568
- var classof$6 = classofRaw$1;
1571
+ var classof$7 = classofRaw$1;
1569
1572
 
1570
1573
  // `IsArray` abstract operation
1571
1574
  // https://tc39.es/ecma262/#sec-isarray
1572
1575
  // eslint-disable-next-line es/no-array-isarray -- safe
1573
- var isArray$1 = Array.isArray || function isArray(argument) {
1574
- return classof$6(argument) === 'Array';
1576
+ var isArray$2 = Array.isArray || function isArray(argument) {
1577
+ return classof$7(argument) === 'Array';
1575
1578
  };
1576
1579
 
1577
1580
  var DESCRIPTORS$1 = descriptors;
1578
- var isArray = isArray$1;
1581
+ var isArray$1 = isArray$2;
1579
1582
 
1580
1583
  var $TypeError$6 = TypeError;
1581
1584
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -1594,7 +1597,7 @@ var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS$1 && !function () {
1594
1597
  }();
1595
1598
 
1596
1599
  var arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
1597
- if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
1600
+ if (isArray$1(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
1598
1601
  throw new $TypeError$6('Cannot set read only .length');
1599
1602
  } return O.length = length;
1600
1603
  } : function (O, length) {
@@ -1609,14 +1612,14 @@ var doesNotExceedSafeInteger$2 = function (it) {
1609
1612
  return it;
1610
1613
  };
1611
1614
 
1612
- var $$7 = _export;
1615
+ var $$8 = _export;
1613
1616
  var toObject$2 = toObject$6;
1614
1617
  var lengthOfArrayLike$2 = lengthOfArrayLike$4;
1615
1618
  var setArrayLength$1 = arraySetLength;
1616
1619
  var doesNotExceedSafeInteger$1 = doesNotExceedSafeInteger$2;
1617
- var fails$9 = fails$m;
1620
+ var fails$a = fails$n;
1618
1621
 
1619
- var INCORRECT_TO_LENGTH = fails$9(function () {
1622
+ var INCORRECT_TO_LENGTH = fails$a(function () {
1620
1623
  return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;
1621
1624
  });
1622
1625
 
@@ -1635,7 +1638,7 @@ var FORCED$4 = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength$1();
1635
1638
 
1636
1639
  // `Array.prototype.push` method
1637
1640
  // https://tc39.es/ecma262/#sec-array.prototype.push
1638
- $$7({ target: 'Array', proto: true, arity: 1, forced: FORCED$4 }, {
1641
+ $$8({ target: 'Array', proto: true, arity: 1, forced: FORCED$4 }, {
1639
1642
  // eslint-disable-next-line no-unused-vars -- required for `.length`
1640
1643
  push: function push(item) {
1641
1644
  var O = toObject$2(this);
@@ -1658,6 +1661,8 @@ var lengthOfArrayLike$1 = lengthOfArrayLike$4;
1658
1661
 
1659
1662
  var $TypeError$4 = TypeError;
1660
1663
 
1664
+ var REDUCE_EMPTY = 'Reduce of empty array with no initial value';
1665
+
1661
1666
  // `Array.prototype.{ reduce, reduceRight }` methods implementation
1662
1667
  var createMethod$2 = function (IS_RIGHT) {
1663
1668
  return function (that, callbackfn, argumentsLength, memo) {
@@ -1665,6 +1670,7 @@ var createMethod$2 = function (IS_RIGHT) {
1665
1670
  var self = IndexedObject(O);
1666
1671
  var length = lengthOfArrayLike$1(O);
1667
1672
  aCallable(callbackfn);
1673
+ if (length === 0 && argumentsLength < 2) throw new $TypeError$4(REDUCE_EMPTY);
1668
1674
  var index = IS_RIGHT ? length - 1 : 0;
1669
1675
  var i = IS_RIGHT ? -1 : 1;
1670
1676
  if (argumentsLength < 2) while (true) {
@@ -1675,7 +1681,7 @@ var createMethod$2 = function (IS_RIGHT) {
1675
1681
  }
1676
1682
  index += i;
1677
1683
  if (IS_RIGHT ? index < 0 : length <= index) {
1678
- throw new $TypeError$4('Reduce of empty array with no initial value');
1684
+ throw new $TypeError$4(REDUCE_EMPTY);
1679
1685
  }
1680
1686
  }
1681
1687
  for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
@@ -1694,22 +1700,22 @@ var arrayReduce = {
1694
1700
  right: createMethod$2(true)
1695
1701
  };
1696
1702
 
1697
- var fails$8 = fails$m;
1703
+ var fails$9 = fails$n;
1698
1704
 
1699
1705
  var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
1700
1706
  var method = [][METHOD_NAME];
1701
- return !!method && fails$8(function () {
1707
+ return !!method && fails$9(function () {
1702
1708
  // eslint-disable-next-line no-useless-call -- required for testing
1703
1709
  method.call(null, argument || function () { return 1; }, 1);
1704
1710
  });
1705
1711
  };
1706
1712
 
1707
- var global$7 = global$i;
1708
- var classof$5 = classofRaw$1;
1713
+ var global$7 = global$h;
1714
+ var classof$6 = classofRaw$1;
1709
1715
 
1710
- var engineIsNode = classof$5(global$7.process) === 'process';
1716
+ var engineIsNode = classof$6(global$7.process) === 'process';
1711
1717
 
1712
- var $$6 = _export;
1718
+ var $$7 = _export;
1713
1719
  var $reduce = arrayReduce.left;
1714
1720
  var arrayMethodIsStrict = arrayMethodIsStrict$1;
1715
1721
  var CHROME_VERSION = engineV8Version;
@@ -1722,15 +1728,15 @@ var FORCED$3 = CHROME_BUG || !arrayMethodIsStrict('reduce');
1722
1728
 
1723
1729
  // `Array.prototype.reduce` method
1724
1730
  // https://tc39.es/ecma262/#sec-array.prototype.reduce
1725
- $$6({ target: 'Array', proto: true, forced: FORCED$3 }, {
1731
+ $$7({ target: 'Array', proto: true, forced: FORCED$3 }, {
1726
1732
  reduce: function reduce(callbackfn /* , initialValue */) {
1727
1733
  var length = arguments.length;
1728
1734
  return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
1729
1735
  }
1730
1736
  });
1731
1737
 
1732
- var isObject$2 = isObject$a;
1733
- var classof$4 = classofRaw$1;
1738
+ var isObject$2 = isObject$b;
1739
+ var classof$5 = classofRaw$1;
1734
1740
  var wellKnownSymbol$6 = wellKnownSymbol$c;
1735
1741
 
1736
1742
  var MATCH$1 = wellKnownSymbol$6('match');
@@ -1739,7 +1745,7 @@ var MATCH$1 = wellKnownSymbol$6('match');
1739
1745
  // https://tc39.es/ecma262/#sec-isregexp
1740
1746
  var isRegexp = function (it) {
1741
1747
  var isRegExp;
1742
- return isObject$2(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$4(it) === 'RegExp');
1748
+ return isObject$2(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$5(it) === 'RegExp');
1743
1749
  };
1744
1750
 
1745
1751
  var isRegExp = isRegexp;
@@ -1762,7 +1768,7 @@ test[TO_STRING_TAG$1] = 'z';
1762
1768
  var toStringTagSupport = String(test) === '[object z]';
1763
1769
 
1764
1770
  var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1765
- var isCallable$4 = isCallable$i;
1771
+ var isCallable$6 = isCallable$k;
1766
1772
  var classofRaw = classofRaw$1;
1767
1773
  var wellKnownSymbol$4 = wellKnownSymbol$c;
1768
1774
 
@@ -1780,7 +1786,7 @@ var tryGet = function (it, key) {
1780
1786
  };
1781
1787
 
1782
1788
  // getting tag from ES6+ `Object.prototype.toString`
1783
- var classof$3 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1789
+ var classof$4 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1784
1790
  var O, tag, result;
1785
1791
  return it === undefined ? 'Undefined' : it === null ? 'Null'
1786
1792
  // @@toStringTag case
@@ -1788,16 +1794,16 @@ var classof$3 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1788
1794
  // builtinTag case
1789
1795
  : CORRECT_ARGUMENTS ? classofRaw(O)
1790
1796
  // ES3 arguments fallback
1791
- : (result = classofRaw(O)) === 'Object' && isCallable$4(O.callee) ? 'Arguments' : result;
1797
+ : (result = classofRaw(O)) === 'Object' && isCallable$6(O.callee) ? 'Arguments' : result;
1792
1798
  };
1793
1799
 
1794
- var classof$2 = classof$3;
1800
+ var classof$3 = classof$4;
1795
1801
 
1796
- var $String = String;
1802
+ var $String$1 = String;
1797
1803
 
1798
- var toString$8 = function (argument) {
1799
- if (classof$2(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
1800
- return $String(argument);
1804
+ var toString$9 = function (argument) {
1805
+ if (classof$3(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
1806
+ return $String$1(argument);
1801
1807
  };
1802
1808
 
1803
1809
  var wellKnownSymbol$3 = wellKnownSymbol$c;
@@ -1816,22 +1822,22 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
1816
1822
  } return false;
1817
1823
  };
1818
1824
 
1819
- var $$5 = _export;
1820
- var uncurryThis$7 = functionUncurryThis;
1825
+ var $$6 = _export;
1826
+ var uncurryThis$a = functionUncurryThis;
1821
1827
  var notARegExp = notARegexp;
1822
- var requireObjectCoercible$3 = requireObjectCoercible$6;
1823
- var toString$7 = toString$8;
1828
+ var requireObjectCoercible$3 = requireObjectCoercible$7;
1829
+ var toString$8 = toString$9;
1824
1830
  var correctIsRegExpLogic = correctIsRegexpLogic;
1825
1831
 
1826
- var stringIndexOf = uncurryThis$7(''.indexOf);
1832
+ var stringIndexOf = uncurryThis$a(''.indexOf);
1827
1833
 
1828
1834
  // `String.prototype.includes` method
1829
1835
  // https://tc39.es/ecma262/#sec-string.prototype.includes
1830
- $$5({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
1836
+ $$6({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
1831
1837
  includes: function includes(searchString /* , position = 0 */) {
1832
1838
  return !!~stringIndexOf(
1833
- toString$7(requireObjectCoercible$3(this)),
1834
- toString$7(notARegExp(searchString)),
1839
+ toString$8(requireObjectCoercible$3(this)),
1840
+ toString$8(notARegExp(searchString)),
1835
1841
  arguments.length > 1 ? arguments[1] : undefined
1836
1842
  );
1837
1843
  }
@@ -1881,7 +1887,7 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
1881
1887
 
1882
1888
  var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1883
1889
 
1884
- var global$6 = global$i;
1890
+ var global$6 = global$h;
1885
1891
  var DOMIterables = domIterables;
1886
1892
  var DOMTokenListPrototype = domTokenListPrototype;
1887
1893
  var ArrayIteratorMethods = es_array_iterator;
@@ -3559,7 +3565,7 @@ var deletePropertyOrThrow$1 = function (O, P) {
3559
3565
  if (!delete O[P]) throw new $TypeError$2('Cannot delete property ' + tryToString$1(P) + ' of ' + tryToString$1(O));
3560
3566
  };
3561
3567
 
3562
- var $$4 = _export;
3568
+ var $$5 = _export;
3563
3569
  var toObject = toObject$6;
3564
3570
  var lengthOfArrayLike = lengthOfArrayLike$4;
3565
3571
  var setArrayLength = arraySetLength;
@@ -3583,7 +3589,7 @@ var FORCED$2 = INCORRECT_RESULT || !properErrorOnNonWritableLength();
3583
3589
 
3584
3590
  // `Array.prototype.unshift` method
3585
3591
  // https://tc39.es/ecma262/#sec-array.prototype.unshift
3586
- $$4({ target: 'Array', proto: true, arity: 1, forced: FORCED$2 }, {
3592
+ $$5({ target: 'Array', proto: true, arity: 1, forced: FORCED$2 }, {
3587
3593
  // eslint-disable-next-line no-unused-vars -- required for `.length`
3588
3594
  unshift: function unshift(item) {
3589
3595
  var O = toObject(this);
@@ -4427,6 +4433,7 @@ const {
4427
4433
  reducer: reducer$4
4428
4434
  } = slice$5;
4429
4435
 
4436
+ const useAppSelector = useSelector;
4430
4437
  const getUiStore = store => {
4431
4438
  if (store && store.ui) {
4432
4439
  return store.ui;
@@ -4544,9 +4551,28 @@ const getDialogIsLoading = createSelector(getDialogDetailsByType, details => {
4544
4551
  const getDialogError = createSelector(getDialogDetailsByType, details => {
4545
4552
  return details && details.error || '';
4546
4553
  }, selectorMemoizationOptions);
4554
+ const getUiDialogsByActiveMapId = (store, mapId) => {
4555
+ if (store && store.ui && store.ui.order) {
4556
+ const foundDialogsIds = store.ui.order.filter(id => {
4557
+ var _a, _b;
4558
+ return ((_b = (_a = store.ui) === null || _a === void 0 ? void 0 : _a.dialogs[id]) === null || _b === void 0 ? void 0 : _b.activeMapId) === mapId;
4559
+ });
4560
+ const foundDialogs = foundDialogsIds.reduce((list, id) => {
4561
+ var _a;
4562
+ const dialog = (_a = store.ui) === null || _a === void 0 ? void 0 : _a.dialogs[id];
4563
+ if (dialog) {
4564
+ return list.concat(dialog);
4565
+ }
4566
+ return list;
4567
+ }, []);
4568
+ return foundDialogs.length ? foundDialogs : [];
4569
+ }
4570
+ return [];
4571
+ };
4547
4572
 
4548
4573
  var selectors$6 = /*#__PURE__*/Object.freeze({
4549
4574
  __proto__: null,
4575
+ useAppSelector: useAppSelector,
4550
4576
  getUiStore: getUiStore,
4551
4577
  getDialogDetailsByType: getDialogDetailsByType,
4552
4578
  getisDialogOpen: getisDialogOpen,
@@ -4557,7 +4583,8 @@ var selectors$6 = /*#__PURE__*/Object.freeze({
4557
4583
  getActiveWindowId: getActiveWindowId,
4558
4584
  getIsActiveWindowId: getIsActiveWindowId,
4559
4585
  getDialogIsLoading: getDialogIsLoading,
4560
- getDialogError: getDialogError
4586
+ getDialogError: getDialogError,
4587
+ getUiDialogsByActiveMapId: getUiDialogsByActiveMapId
4561
4588
  });
4562
4589
 
4563
4590
  /* *
@@ -4600,6 +4627,81 @@ var types$3 = /*#__PURE__*/Object.freeze({
4600
4627
  get DialogTypes () { return DialogTypes; }
4601
4628
  });
4602
4629
 
4630
+ /* *
4631
+ * Licensed under the Apache License, Version 2.0 (the "License");
4632
+ * you may not use this file except in compliance with the License.
4633
+ * You may obtain a copy of the License at
4634
+ *
4635
+ * http://www.apache.org/licenses/LICENSE-2.0
4636
+ *
4637
+ * Unless required by applicable law or agreed to in writing, software
4638
+ * distributed under the License is distributed on an "AS IS" BASIS,
4639
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4640
+ * See the License for the specific language governing permissions and
4641
+ * limitations under the License.
4642
+ *
4643
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4644
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
4645
+ * */
4646
+ const useSetupDialog = (dialogType, source = 'app') => {
4647
+ const dispatch = useDispatch();
4648
+ const onCloseDialog = useCallback(() => {
4649
+ dispatch(uiActions.setToggleOpenDialog({
4650
+ type: dialogType,
4651
+ setOpen: false
4652
+ }));
4653
+ }, [dialogType, dispatch]);
4654
+ const registerDialog = useCallback(() => {
4655
+ dispatch(uiActions.registerDialog({
4656
+ type: dialogType,
4657
+ setOpen: false,
4658
+ source
4659
+ }));
4660
+ }, [dialogType, dispatch, source]);
4661
+ const unregisterDialog = useCallback(() => {
4662
+ dispatch(uiActions.unregisterDialog({
4663
+ type: dialogType
4664
+ }));
4665
+ }, [dialogType, dispatch]);
4666
+ // Register this dialog in the store
4667
+ useEffect(() => {
4668
+ registerDialog();
4669
+ return () => {
4670
+ unregisterDialog();
4671
+ };
4672
+ // eslint-disable-next-line react-hooks/exhaustive-deps
4673
+ }, []);
4674
+ const uiIsOrderedOnTop = useAppSelector(store => getDialogIsOrderedOnTop(store, dialogType));
4675
+ const setDialogOrder = useCallback(() => {
4676
+ if (!uiIsOrderedOnTop) {
4677
+ dispatch(uiActions.orderDialog({
4678
+ type: dialogType
4679
+ }));
4680
+ }
4681
+ }, [dialogType, dispatch, uiIsOrderedOnTop]);
4682
+ const dialogOrder = useAppSelector(store => getDialogOrder(store, dialogType));
4683
+ const uiSource = useAppSelector(store => getDialogSource(store, dialogType));
4684
+ const isDialogOpen = useAppSelector(store => getisDialogOpen(store, dialogType));
4685
+ const uiIsLoading = useAppSelector(store => getDialogIsLoading(store, dialogType));
4686
+ const uiError = useAppSelector(store => getDialogError(store, dialogType));
4687
+ const setFocused = focused => {
4688
+ dispatch(uiActions.setDialogFocused({
4689
+ type: dialogType,
4690
+ focused
4691
+ }));
4692
+ };
4693
+ return {
4694
+ setDialogOrder,
4695
+ dialogOrder,
4696
+ onCloseDialog,
4697
+ uiSource,
4698
+ isDialogOpen,
4699
+ uiIsLoading,
4700
+ uiError,
4701
+ setFocused
4702
+ };
4703
+ };
4704
+
4603
4705
  /* *
4604
4706
  * Licensed under the Apache License, Version 2.0 (the "License");
4605
4707
  * you may not use this file except in compliance with the License.
@@ -6314,6 +6416,168 @@ var types = /*#__PURE__*/Object.freeze({
6314
6416
  __proto__: null
6315
6417
  });
6316
6418
 
6419
+ var NATIVE_BIND = functionBindNative;
6420
+
6421
+ var FunctionPrototype = Function.prototype;
6422
+ var apply$2 = FunctionPrototype.apply;
6423
+ var call$6 = FunctionPrototype.call;
6424
+
6425
+ // eslint-disable-next-line es/no-reflect -- safe
6426
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$6.bind(apply$2) : function () {
6427
+ return call$6.apply(apply$2, arguments);
6428
+ });
6429
+
6430
+ var uncurryThis$9 = functionUncurryThis;
6431
+
6432
+ var arraySlice$1 = uncurryThis$9([].slice);
6433
+
6434
+ var uncurryThis$8 = functionUncurryThis;
6435
+ var isArray = isArray$2;
6436
+ var isCallable$5 = isCallable$k;
6437
+ var classof$2 = classofRaw$1;
6438
+ var toString$7 = toString$9;
6439
+
6440
+ var push$1 = uncurryThis$8([].push);
6441
+
6442
+ var getJsonReplacerFunction = function (replacer) {
6443
+ if (isCallable$5(replacer)) return replacer;
6444
+ if (!isArray(replacer)) return;
6445
+ var rawLength = replacer.length;
6446
+ var keys = [];
6447
+ for (var i = 0; i < rawLength; i++) {
6448
+ var element = replacer[i];
6449
+ if (typeof element == 'string') push$1(keys, element);
6450
+ else if (typeof element == 'number' || classof$2(element) === 'Number' || classof$2(element) === 'String') push$1(keys, toString$7(element));
6451
+ }
6452
+ var keysLength = keys.length;
6453
+ var root = true;
6454
+ return function (key, value) {
6455
+ if (root) {
6456
+ root = false;
6457
+ return value;
6458
+ }
6459
+ if (isArray(this)) return value;
6460
+ for (var j = 0; j < keysLength; j++) if (keys[j] === key) return value;
6461
+ };
6462
+ };
6463
+
6464
+ var $$4 = _export;
6465
+ var getBuiltIn$2 = getBuiltIn$6;
6466
+ var apply$1 = functionApply;
6467
+ var call$5 = functionCall;
6468
+ var uncurryThis$7 = functionUncurryThis;
6469
+ var fails$8 = fails$n;
6470
+ var isCallable$4 = isCallable$k;
6471
+ var isSymbol = isSymbol$3;
6472
+ var arraySlice = arraySlice$1;
6473
+ var getReplacerFunction = getJsonReplacerFunction;
6474
+ var NATIVE_SYMBOL = symbolConstructorDetection;
6475
+
6476
+ var $String = String;
6477
+ var $stringify = getBuiltIn$2('JSON', 'stringify');
6478
+ var exec$3 = uncurryThis$7(/./.exec);
6479
+ var charAt$3 = uncurryThis$7(''.charAt);
6480
+ var charCodeAt$1 = uncurryThis$7(''.charCodeAt);
6481
+ var replace$3 = uncurryThis$7(''.replace);
6482
+ var numberToString = uncurryThis$7(1.0.toString);
6483
+
6484
+ var tester = /[\uD800-\uDFFF]/g;
6485
+ var low = /^[\uD800-\uDBFF]$/;
6486
+ var hi = /^[\uDC00-\uDFFF]$/;
6487
+
6488
+ var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails$8(function () {
6489
+ var symbol = getBuiltIn$2('Symbol')('stringify detection');
6490
+ // MS Edge converts symbol values to JSON as {}
6491
+ return $stringify([symbol]) !== '[null]'
6492
+ // WebKit converts symbol values to JSON as null
6493
+ || $stringify({ a: symbol }) !== '{}'
6494
+ // V8 throws on boxed symbols
6495
+ || $stringify(Object(symbol)) !== '{}';
6496
+ });
6497
+
6498
+ // https://github.com/tc39/proposal-well-formed-stringify
6499
+ var ILL_FORMED_UNICODE = fails$8(function () {
6500
+ return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"'
6501
+ || $stringify('\uDEAD') !== '"\\udead"';
6502
+ });
6503
+
6504
+ var stringifyWithSymbolsFix = function (it, replacer) {
6505
+ var args = arraySlice(arguments);
6506
+ var $replacer = getReplacerFunction(replacer);
6507
+ if (!isCallable$4($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined
6508
+ args[1] = function (key, value) {
6509
+ // some old implementations (like WebKit) could pass numbers as keys
6510
+ if (isCallable$4($replacer)) value = call$5($replacer, this, $String(key), value);
6511
+ if (!isSymbol(value)) return value;
6512
+ };
6513
+ return apply$1($stringify, null, args);
6514
+ };
6515
+
6516
+ var fixIllFormed = function (match, offset, string) {
6517
+ var prev = charAt$3(string, offset - 1);
6518
+ var next = charAt$3(string, offset + 1);
6519
+ if ((exec$3(low, match) && !exec$3(hi, next)) || (exec$3(hi, match) && !exec$3(low, prev))) {
6520
+ return '\\u' + numberToString(charCodeAt$1(match, 0), 16);
6521
+ } return match;
6522
+ };
6523
+
6524
+ if ($stringify) {
6525
+ // `JSON.stringify` method
6526
+ // https://tc39.es/ecma262/#sec-json.stringify
6527
+ $$4({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
6528
+ // eslint-disable-next-line no-unused-vars -- required for `.length`
6529
+ stringify: function stringify(it, replacer, space) {
6530
+ var args = arraySlice(arguments);
6531
+ var result = apply$1(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args);
6532
+ return ILL_FORMED_UNICODE && typeof result == 'string' ? replace$3(result, tester, fixIllFormed) : result;
6533
+ }
6534
+ });
6535
+ }
6536
+
6537
+ /* *
6538
+ * Licensed under the Apache License, Version 2.0 (the "License");
6539
+ * you may not use this file except in compliance with the License.
6540
+ * You may obtain a copy of the License at
6541
+ *
6542
+ * http://www.apache.org/licenses/LICENSE-2.0
6543
+ *
6544
+ * Unless required by applicable law or agreed to in writing, software
6545
+ * distributed under the License is distributed on an "AS IS" BASIS,
6546
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6547
+ * See the License for the specific language governing permissions and
6548
+ * limitations under the License.
6549
+ *
6550
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6551
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
6552
+ * */
6553
+ const getUserAddedServices = () => {
6554
+ try {
6555
+ const storedString = window.localStorage.getItem('userAddedServices');
6556
+ const parsedData = JSON.parse(storedString);
6557
+ if (parsedData && typeof parsedData === 'object') {
6558
+ return Object.entries(parsedData).reduce((userServices, [serviceUrl, service]) => Object.assign(Object.assign({}, userServices), isNoIdService(service) ? {
6559
+ [serviceUrl]: Object.assign(Object.assign({}, service), {
6560
+ scope: 'user'
6561
+ })
6562
+ } : {}), {});
6563
+ }
6564
+ } catch (e) {
6565
+ console.error('Unable to read services from localStorage: ', e);
6566
+ }
6567
+ return {};
6568
+ };
6569
+ const setUserAddedServices = services => {
6570
+ try {
6571
+ window.localStorage.setItem('userAddedServices', JSON.stringify(services));
6572
+ } catch (e) {
6573
+ console.error('Unable to write services to localStorage: ', e);
6574
+ }
6575
+ };
6576
+ const isNoIdService = param => {
6577
+ const serviceParam = param;
6578
+ return !!((serviceParam === null || serviceParam === void 0 ? void 0 : serviceParam.name) && (serviceParam === null || serviceParam === void 0 ? void 0 : serviceParam.url));
6579
+ };
6580
+
6317
6581
  /* *
6318
6582
  * Licensed under the Apache License, Version 2.0 (the "License");
6319
6583
  * you may not use this file except in compliance with the License.
@@ -6490,17 +6754,6 @@ var storeTestSettings = /*#__PURE__*/Object.freeze({
6490
6754
  WmMultiDimensionServices: WmMultiDimensionServices
6491
6755
  });
6492
6756
 
6493
- var NATIVE_BIND = functionBindNative;
6494
-
6495
- var FunctionPrototype = Function.prototype;
6496
- var apply$1 = FunctionPrototype.apply;
6497
- var call$5 = FunctionPrototype.call;
6498
-
6499
- // eslint-disable-next-line es/no-reflect -- safe
6500
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$5.bind(apply$1) : function () {
6501
- return call$5.apply(apply$1, arguments);
6502
- });
6503
-
6504
6757
  var defineProperty = objectDefineProperty.f;
6505
6758
 
6506
6759
  var proxyAccessor$1 = function (Target, Source, key) {
@@ -6511,8 +6764,8 @@ var proxyAccessor$1 = function (Target, Source, key) {
6511
6764
  });
6512
6765
  };
6513
6766
 
6514
- var isCallable$3 = isCallable$i;
6515
- var isObject$1 = isObject$a;
6767
+ var isCallable$3 = isCallable$k;
6768
+ var isObject$1 = isObject$b;
6516
6769
  var setPrototypeOf$1 = objectSetPrototypeOf;
6517
6770
 
6518
6771
  // makes subclassing work correct for wrapped built-ins
@@ -6530,13 +6783,13 @@ var inheritIfRequired$1 = function ($this, dummy, Wrapper) {
6530
6783
  return $this;
6531
6784
  };
6532
6785
 
6533
- var toString$6 = toString$8;
6786
+ var toString$6 = toString$9;
6534
6787
 
6535
6788
  var normalizeStringArgument$1 = function (argument, $default) {
6536
6789
  return argument === undefined ? arguments.length < 2 ? '' : $default : toString$6(argument);
6537
6790
  };
6538
6791
 
6539
- var isObject = isObject$a;
6792
+ var isObject = isObject$b;
6540
6793
  var createNonEnumerableProperty$3 = createNonEnumerableProperty$8;
6541
6794
 
6542
6795
  // `InstallErrorCause` abstract operation
@@ -6563,7 +6816,7 @@ var errorStackClear = function (stack, dropEntries) {
6563
6816
  } return stack;
6564
6817
  };
6565
6818
 
6566
- var fails$7 = fails$m;
6819
+ var fails$7 = fails$n;
6567
6820
  var createPropertyDescriptor = createPropertyDescriptor$4;
6568
6821
 
6569
6822
  var errorStackInstallable = !fails$7(function () {
@@ -6588,7 +6841,7 @@ var errorStackInstall = function (error, C, stack, dropEntries) {
6588
6841
  }
6589
6842
  };
6590
6843
 
6591
- var getBuiltIn$1 = getBuiltIn$5;
6844
+ var getBuiltIn$1 = getBuiltIn$6;
6592
6845
  var hasOwn = hasOwnProperty_1;
6593
6846
  var createNonEnumerableProperty$1 = createNonEnumerableProperty$8;
6594
6847
  var isPrototypeOf = objectIsPrototypeOf;
@@ -6654,7 +6907,7 @@ var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_A
6654
6907
 
6655
6908
  /* eslint-disable no-unused-vars -- required for functions `.length` */
6656
6909
  var $$3 = _export;
6657
- var global$5 = global$i;
6910
+ var global$5 = global$h;
6658
6911
  var apply = functionApply;
6659
6912
  var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
6660
6913
 
@@ -6715,8 +6968,8 @@ var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u200
6715
6968
  '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
6716
6969
 
6717
6970
  var uncurryThis$5 = functionUncurryThis;
6718
- var requireObjectCoercible$2 = requireObjectCoercible$6;
6719
- var toString$5 = toString$8;
6971
+ var requireObjectCoercible$2 = requireObjectCoercible$7;
6972
+ var toString$5 = toString$9;
6720
6973
  var whitespaces$1 = whitespaces$2;
6721
6974
 
6722
6975
  var replace$1 = uncurryThis$5(''.replace);
@@ -6745,10 +6998,10 @@ var stringTrim = {
6745
6998
  trim: createMethod$1(3)
6746
6999
  };
6747
7000
 
6748
- var global$4 = global$i;
6749
- var fails$6 = fails$m;
7001
+ var global$4 = global$h;
7002
+ var fails$6 = fails$n;
6750
7003
  var uncurryThis$4 = functionUncurryThis;
6751
- var toString$4 = toString$8;
7004
+ var toString$4 = toString$9;
6752
7005
  var trim = stringTrim.trim;
6753
7006
  var whitespaces = whitespaces$2;
6754
7007
 
@@ -6777,7 +7030,7 @@ $$2({ global: true, forced: parseInt !== $parseInt }, {
6777
7030
  parseInt: $parseInt
6778
7031
  });
6779
7032
 
6780
- var anObject$4 = anObject$a;
7033
+ var anObject$4 = anObject$9;
6781
7034
 
6782
7035
  // `RegExp.prototype.flags` getter implementation
6783
7036
  // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
@@ -6795,8 +7048,8 @@ var regexpFlags$1 = function () {
6795
7048
  return result;
6796
7049
  };
6797
7050
 
6798
- var fails$5 = fails$m;
6799
- var global$3 = global$i;
7051
+ var fails$5 = fails$n;
7052
+ var global$3 = global$h;
6800
7053
 
6801
7054
  // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
6802
7055
  var $RegExp$2 = global$3.RegExp;
@@ -6826,8 +7079,8 @@ var regexpStickyHelpers = {
6826
7079
  UNSUPPORTED_Y: UNSUPPORTED_Y$2
6827
7080
  };
6828
7081
 
6829
- var fails$4 = fails$m;
6830
- var global$2 = global$i;
7082
+ var fails$4 = fails$n;
7083
+ var global$2 = global$h;
6831
7084
 
6832
7085
  // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
6833
7086
  var $RegExp$1 = global$2.RegExp;
@@ -6837,8 +7090,8 @@ var regexpUnsupportedDotAll = fails$4(function () {
6837
7090
  return !(re.dotAll && re.test('\n') && re.flags === 's');
6838
7091
  });
6839
7092
 
6840
- var fails$3 = fails$m;
6841
- var global$1 = global$i;
7093
+ var fails$3 = fails$n;
7094
+ var global$1 = global$h;
6842
7095
 
6843
7096
  // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
6844
7097
  var $RegExp = global$1.RegExp;
@@ -6853,10 +7106,10 @@ var regexpUnsupportedNcg = fails$3(function () {
6853
7106
  /* eslint-disable regexp/no-useless-quantifier -- testing */
6854
7107
  var call$4 = functionCall;
6855
7108
  var uncurryThis$3 = functionUncurryThis;
6856
- var toString$3 = toString$8;
7109
+ var toString$3 = toString$9;
6857
7110
  var regexpFlags = regexpFlags$1;
6858
7111
  var stickyHelpers$1 = regexpStickyHelpers;
6859
- var shared = shared$4.exports;
7112
+ var shared = shared$4;
6860
7113
  var create = objectCreate;
6861
7114
  var getInternalState = internalState.get;
6862
7115
  var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
@@ -6979,9 +7232,9 @@ $$1({ target: 'RegExp', proto: true, forced: /./.exec !== exec$1 }, {
6979
7232
 
6980
7233
  var $ = _export;
6981
7234
  var call$3 = functionCall;
6982
- var isCallable$2 = isCallable$i;
6983
- var anObject$3 = anObject$a;
6984
- var toString$2 = toString$8;
7235
+ var isCallable$2 = isCallable$k;
7236
+ var anObject$3 = anObject$9;
7237
+ var toString$2 = toString$9;
6985
7238
 
6986
7239
  var DELEGATES_TO_EXEC = function () {
6987
7240
  var execCalled = false;
@@ -7015,7 +7268,7 @@ $({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
7015
7268
  var call$2 = functionCall;
7016
7269
  var defineBuiltIn = defineBuiltIn$4;
7017
7270
  var regexpExec$1 = regexpExec$2;
7018
- var fails$2 = fails$m;
7271
+ var fails$2 = fails$n;
7019
7272
  var wellKnownSymbol$1 = wellKnownSymbol$c;
7020
7273
  var createNonEnumerableProperty = createNonEnumerableProperty$8;
7021
7274
 
@@ -7087,10 +7340,10 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
7087
7340
  };
7088
7341
 
7089
7342
  var uncurryThis$2 = functionUncurryThis;
7090
- var fails$1 = fails$m;
7091
- var isCallable$1 = isCallable$i;
7092
- var classof$1 = classof$3;
7093
- var getBuiltIn = getBuiltIn$5;
7343
+ var fails$1 = fails$n;
7344
+ var isCallable$1 = isCallable$k;
7345
+ var classof$1 = classof$4;
7346
+ var getBuiltIn = getBuiltIn$6;
7094
7347
  var inspectSource = inspectSource$2;
7095
7348
 
7096
7349
  var noop = function () { /* empty */ };
@@ -7149,7 +7402,7 @@ var aConstructor$1 = function (argument) {
7149
7402
  throw new $TypeError$1(tryToString(argument) + ' is not a constructor');
7150
7403
  };
7151
7404
 
7152
- var anObject$2 = anObject$a;
7405
+ var anObject$2 = anObject$9;
7153
7406
  var aConstructor = aConstructor$1;
7154
7407
  var isNullOrUndefined$1 = isNullOrUndefined$4;
7155
7408
  var wellKnownSymbol = wellKnownSymbol$c;
@@ -7166,8 +7419,8 @@ var speciesConstructor$1 = function (O, defaultConstructor) {
7166
7419
 
7167
7420
  var uncurryThis$1 = functionUncurryThis;
7168
7421
  var toIntegerOrInfinity = toIntegerOrInfinity$3;
7169
- var toString$1 = toString$8;
7170
- var requireObjectCoercible$1 = requireObjectCoercible$6;
7422
+ var toString$1 = toString$9;
7423
+ var requireObjectCoercible$1 = requireObjectCoercible$7;
7171
7424
 
7172
7425
  var charAt$1 = uncurryThis$1(''.charAt);
7173
7426
  var charCodeAt = uncurryThis$1(''.charCodeAt);
@@ -7210,8 +7463,8 @@ var advanceStringIndex$1 = function (S, index, unicode) {
7210
7463
  };
7211
7464
 
7212
7465
  var call$1 = functionCall;
7213
- var anObject$1 = anObject$a;
7214
- var isCallable = isCallable$i;
7466
+ var anObject$1 = anObject$9;
7467
+ var isCallable = isCallable$k;
7215
7468
  var classof = classofRaw$1;
7216
7469
  var regexpExec = regexpExec$2;
7217
7470
 
@@ -7233,17 +7486,17 @@ var regexpExecAbstract = function (R, S) {
7233
7486
  var call = functionCall;
7234
7487
  var uncurryThis = functionUncurryThis;
7235
7488
  var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
7236
- var anObject = anObject$a;
7489
+ var anObject = anObject$9;
7237
7490
  var isNullOrUndefined = isNullOrUndefined$4;
7238
- var requireObjectCoercible = requireObjectCoercible$6;
7491
+ var requireObjectCoercible = requireObjectCoercible$7;
7239
7492
  var speciesConstructor = speciesConstructor$1;
7240
7493
  var advanceStringIndex = advanceStringIndex$1;
7241
7494
  var toLength = toLength$2;
7242
- var toString = toString$8;
7495
+ var toString = toString$9;
7243
7496
  var getMethod = getMethod$2;
7244
7497
  var regExpExec = regexpExecAbstract;
7245
7498
  var stickyHelpers = regexpStickyHelpers;
7246
- var fails = fails$m;
7499
+ var fails = fails$n;
7247
7500
 
7248
7501
  var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
7249
7502
  var MAX_UINT32 = 0xFFFFFFFF;
@@ -7571,7 +7824,7 @@ function* setLayerDimensionsSaga({
7571
7824
  }))));
7572
7825
  }
7573
7826
  }
7574
- yield call$d(updateAnimation, mapId, incomingMaxTime);
7827
+ yield call$e(updateAnimation, mapId, incomingMaxTime);
7575
7828
  }
7576
7829
  } catch (error) {
7577
7830
  // eslint-disable-next-line no-console
@@ -7623,7 +7876,7 @@ function* toggleAutoUpdateSaga({
7623
7876
  yield all(payloads.map(payload => put(mapActions.toggleAutoUpdate(payload))));
7624
7877
  }
7625
7878
  }
7626
- yield call$d(updateAnimation, mapId, timeDimension.maxValue);
7879
+ yield call$e(updateAnimation, mapId, timeDimension.maxValue);
7627
7880
  }
7628
7881
  } catch (error) {
7629
7882
  // eslint-disable-next-line no-console
@@ -7698,7 +7951,7 @@ function* setMapPresetSaga({
7698
7951
  autoTimeStepLayerIdNew = activeLayerId;
7699
7952
  autoUpdateLayerIdNew = activeLayerId;
7700
7953
  }
7701
- const newLayerIds = yield call$d(replaceLayerIdsToEnsureUniqueLayerIdsInStore, {
7954
+ const newLayerIds = yield call$e(replaceLayerIdsToEnsureUniqueLayerIdsInStore, {
7702
7955
  layers: mapLayers,
7703
7956
  autoTimeStepLayerId: autoTimeStepLayerIdNew,
7704
7957
  autoUpdateLayerId: autoUpdateLayerIdNew
@@ -7723,7 +7976,7 @@ function* setMapPresetSaga({
7723
7976
  const allBaseLayers = [...baseLayersWithDefaultLayer, ...overLayersWithDefaultLayer].map(layer => Object.assign(Object.assign({}, layer), {
7724
7977
  id: webmapUtils.generateLayerId()
7725
7978
  }));
7726
- yield call$d(handleBaseLayersSaga, mapId, allBaseLayers);
7979
+ yield call$e(handleBaseLayersSaga, mapId, allBaseLayers);
7727
7980
  if (proj) {
7728
7981
  const isProjectionSupported = webmapUtils.getWMJSMapById(mapId).isProjectionSupported(proj.srs);
7729
7982
  if (!isProjectionSupported) {
@@ -7956,7 +8209,7 @@ function* rootSaga$4() {
7956
8209
 
7957
8210
  function* fetchServiceSaga(service) {
7958
8211
  try {
7959
- const layers = yield call$d(getCapabilities.getLayersFlattenedFromService, service.serviceUrl);
8212
+ const layers = yield call$e(getCapabilities.getLayersFlattenedFromService, service.serviceUrl);
7960
8213
  yield put(serviceActions.serviceSetLayers(Object.assign(Object.assign({}, service), {
7961
8214
  layers
7962
8215
  })));
@@ -7970,7 +8223,15 @@ function* fetchInitialServicesSaga({
7970
8223
  const {
7971
8224
  services
7972
8225
  } = payload;
7973
- yield all(services.map(service => call$d(fetchServiceSaga, service)));
8226
+ yield all(services.map(_a => {
8227
+ var {
8228
+ url
8229
+ } = _a,
8230
+ service = __rest(_a, ["url"]);
8231
+ return call$e(fetchServiceSaga, Object.assign(Object.assign({}, service), {
8232
+ serviceUrl: url
8233
+ }));
8234
+ }));
7974
8235
  }
7975
8236
  function* rootSaga$3() {
7976
8237
  yield takeEvery(serviceActions.fetchInitialServices, fetchInitialServicesSaga);
@@ -8086,6 +8347,57 @@ layersListener.startListening({
8086
8347
  })
8087
8348
  });
8088
8349
 
8350
+ const mapUiListener = createListenerMiddleware();
8351
+ mapUiListener.startListening({
8352
+ actionCreator: mapActions.registerMap,
8353
+ effect: (_, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
8354
+ const fields = getAllMapIds(listenerApi.getState());
8355
+ if (fields.length === 1) {
8356
+ const source = getDialogSource(listenerApi.getState(), 'legend');
8357
+ listenerApi.dispatch(uiActions.setActiveMapIdForDialog({
8358
+ type: 'legend',
8359
+ mapId: fields[0],
8360
+ setOpen: true,
8361
+ source
8362
+ }));
8363
+ }
8364
+ })
8365
+ });
8366
+ mapUiListener.startListening({
8367
+ actionCreator: mapActions.unregisterMap,
8368
+ effect: ({
8369
+ payload
8370
+ }, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
8371
+ const fields = getAllMapIds(listenerApi.getState());
8372
+ const activeLegendUI = getDialogDetailsByType(listenerApi.getState(), 'legend');
8373
+ if (fields.length && activeLegendUI && !fields.includes(activeLegendUI.activeMapId)) {
8374
+ listenerApi.dispatch(uiActions.setActiveMapIdForDialog({
8375
+ type: 'legend',
8376
+ mapId: fields[0],
8377
+ setOpen: activeLegendUI.isOpen
8378
+ }));
8379
+ } else if (!fields.length) {
8380
+ // if no more maps, we hide the legend
8381
+ listenerApi.dispatch(uiActions.setToggleOpenDialog({
8382
+ type: 'legend',
8383
+ setOpen: false
8384
+ }));
8385
+ }
8386
+ // close any remaining windows with map assigned to it
8387
+ const remainingDialogsConnectedToMap = getUiDialogsByActiveMapId(listenerApi.getState(), payload.mapId);
8388
+ if (remainingDialogsConnectedToMap.length) {
8389
+ remainingDialogsConnectedToMap.forEach(dialog => {
8390
+ if (dialog.isOpen) {
8391
+ listenerApi.dispatch(uiActions.setToggleOpenDialog({
8392
+ type: dialog.type,
8393
+ setOpen: false
8394
+ }));
8395
+ }
8396
+ });
8397
+ }
8398
+ })
8399
+ });
8400
+
8089
8401
  // TODO: This fixes typecheck errors but maybe there is a better way to do that
8090
8402
  createStore$1({
8091
8403
  extensions: [getSagaExtension()]
@@ -8099,7 +8411,7 @@ const mapStoreModuleConfig = {
8099
8411
  id: 'webmap-module',
8100
8412
  reducersMap: mapStoreReducers,
8101
8413
  sagas: [rootSaga$4, rootSaga$3],
8102
- middlewares: [metronomeListener.middleware, layersListener.middleware]
8414
+ middlewares: [metronomeListener.middleware, layersListener.middleware, mapUiListener.middleware]
8103
8415
  };
8104
8416
 
8105
8417
  const mapStoreActions = Object.assign(Object.assign(Object.assign({}, layerActions), mapActions), serviceActions);
@@ -8505,7 +8817,7 @@ function* navigateToUrlSaga(action) {
8505
8817
  const {
8506
8818
  payload
8507
8819
  } = action;
8508
- yield call$d(historyDict.navigate, payload.url);
8820
+ yield call$e(historyDict.navigate, payload.url);
8509
8821
  }
8510
8822
  function* rootSaga$1() {
8511
8823
  yield takeLatest(routerActions.navigateToUrl.type, navigateToUrlSaga);
@@ -9309,7 +9621,7 @@ function* addGroupTargetSaga({
9309
9621
  targetId: targetToUpdate
9310
9622
  } = payload;
9311
9623
  if (!linked) {
9312
- yield call$d(updateSourceValueWhenLinkingComponentToGroupSaga, groupId, targetToUpdate);
9624
+ yield call$e(updateSourceValueWhenLinkingComponentToGroupSaga, groupId, targetToUpdate);
9313
9625
  }
9314
9626
  }
9315
9627
  function* linkGroupTargetSaga({
@@ -9321,7 +9633,7 @@ function* linkGroupTargetSaga({
9321
9633
  targetId: targetToUpdate
9322
9634
  } = payload;
9323
9635
  if (!linked) {
9324
- yield call$d(updateSourceValueWhenLinkingComponentToGroupSaga, groupId, targetToUpdate);
9636
+ yield call$e(updateSourceValueWhenLinkingComponentToGroupSaga, groupId, targetToUpdate);
9325
9637
  }
9326
9638
  }
9327
9639
  function* updateViewStateSaga() {
@@ -9351,43 +9663,6 @@ const synchronizationGroupConfig = {
9351
9663
  sagas: [rootSaga$2, rootSaga]
9352
9664
  };
9353
9665
 
9354
- const uiListener = createListenerMiddleware();
9355
- uiListener.startListening({
9356
- actionCreator: mapActions.registerMap,
9357
- effect: (_, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
9358
- const fields = getAllMapIds(listenerApi.getState());
9359
- if (fields.length === 1) {
9360
- const source = getDialogSource(listenerApi.getState(), 'legend');
9361
- listenerApi.dispatch(uiActions.setActiveMapIdForDialog({
9362
- type: 'legend',
9363
- mapId: fields[0],
9364
- setOpen: true,
9365
- source
9366
- }));
9367
- }
9368
- })
9369
- });
9370
- uiListener.startListening({
9371
- actionCreator: mapActions.unregisterMap,
9372
- effect: (_, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
9373
- const fields = getAllMapIds(listenerApi.getState());
9374
- const activeUI = getDialogDetailsByType(listenerApi.getState(), 'legend');
9375
- if (fields.length && activeUI && !fields.includes(activeUI.activeMapId)) {
9376
- listenerApi.dispatch(uiActions.setActiveMapIdForDialog({
9377
- type: 'legend',
9378
- mapId: fields[0],
9379
- setOpen: activeUI.isOpen
9380
- }));
9381
- } else if (!fields.length) {
9382
- // if no more maps, we hide the legend
9383
- listenerApi.dispatch(uiActions.setToggleOpenDialog({
9384
- type: 'legend',
9385
- setOpen: false
9386
- }));
9387
- }
9388
- })
9389
- });
9390
-
9391
9666
  /* *
9392
9667
  * Licensed under the Apache License, Version 2.0 (the "License");
9393
9668
  * you may not use this file except in compliance with the License.
@@ -9408,8 +9683,7 @@ const uiModuleConfig = {
9408
9683
  id: 'ui-module',
9409
9684
  reducersMap: {
9410
9685
  ui: reducer$5
9411
- },
9412
- middlewares: [uiListener.middleware]
9686
+ }
9413
9687
  };
9414
9688
 
9415
9689
  /* *
@@ -9467,88 +9741,4 @@ const StoreProvider = ({
9467
9741
  store: store
9468
9742
  }, /*#__PURE__*/React.createElement(WrapperWithModules, null, children)));
9469
9743
 
9470
- /* *
9471
- * Licensed under the Apache License, Version 2.0 (the "License");
9472
- * you may not use this file except in compliance with the License.
9473
- * You may obtain a copy of the License at
9474
- *
9475
- * http://www.apache.org/licenses/LICENSE-2.0
9476
- *
9477
- * Unless required by applicable law or agreed to in writing, software
9478
- * distributed under the License is distributed on an "AS IS" BASIS,
9479
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9480
- * See the License for the specific language governing permissions and
9481
- * limitations under the License.
9482
- *
9483
- * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9484
- * Copyright 2023 - Finnish Meteorological Institute (FMI)
9485
- * */
9486
- const useSetupDialog = (dialogType, source = 'app') => {
9487
- const dispatch = useDispatch();
9488
- const onCloseDialog = useCallback(() => {
9489
- dispatch(uiActions.setToggleOpenDialog({
9490
- type: dialogType,
9491
- setOpen: false
9492
- }));
9493
- }, [dialogType, dispatch]);
9494
- const mapId = useSelector(store => getDialogMapId(store, dialogType));
9495
- const isMapPresent = useSelector(store => getIsMapPresent(store, mapId));
9496
- // Check to ensure the currently active map is still present on screen - if not, close the dialog
9497
- // exception for timeseries, since we dont need a map to show the timeseries view.
9498
- useEffect(() => {
9499
- if (mapId !== '' && !isMapPresent && !(dialogType === DialogTypes.TimeSeriesManager || dialogType === DialogTypes.TimeSeriesSelect)) {
9500
- onCloseDialog();
9501
- }
9502
- }, [mapId, isMapPresent, onCloseDialog, dialogType]);
9503
- const registerDialog = useCallback(() => {
9504
- dispatch(uiActions.registerDialog({
9505
- type: dialogType,
9506
- setOpen: false,
9507
- source
9508
- }));
9509
- }, [dialogType, dispatch, source]);
9510
- const unregisterDialog = useCallback(() => {
9511
- dispatch(uiActions.unregisterDialog({
9512
- type: dialogType
9513
- }));
9514
- }, [dialogType, dispatch]);
9515
- // Register this dialog in the store
9516
- useEffect(() => {
9517
- registerDialog();
9518
- return () => {
9519
- unregisterDialog();
9520
- };
9521
- // eslint-disable-next-line react-hooks/exhaustive-deps
9522
- }, []);
9523
- const uiIsOrderedOnTop = useSelector(store => getDialogIsOrderedOnTop(store, dialogType));
9524
- const setDialogOrder = useCallback(() => {
9525
- if (!uiIsOrderedOnTop) {
9526
- dispatch(uiActions.orderDialog({
9527
- type: dialogType
9528
- }));
9529
- }
9530
- }, [dialogType, dispatch, uiIsOrderedOnTop]);
9531
- const dialogOrder = useSelector(store => getDialogOrder(store, dialogType));
9532
- const uiSource = useSelector(store => getDialogSource(store, dialogType));
9533
- const isDialogOpen = useSelector(store => getisDialogOpen(store, dialogType));
9534
- const uiIsLoading = useSelector(store => getDialogIsLoading(store, dialogType));
9535
- const uiError = useSelector(store => getDialogError(store, dialogType));
9536
- const setFocused = focused => {
9537
- dispatch(uiActions.setDialogFocused({
9538
- type: dialogType,
9539
- focused
9540
- }));
9541
- };
9542
- return {
9543
- setDialogOrder,
9544
- dialogOrder,
9545
- onCloseDialog,
9546
- uiSource,
9547
- isDialogOpen,
9548
- uiIsLoading,
9549
- uiError,
9550
- setFocused
9551
- };
9552
- };
9553
-
9554
- export { IS_LEGEND_OPEN_BY_DEFAULT, StoreProvider, coreModuleConfig, createStore, drawtoolActions, drawtoolModuleConfig, reducer as drawtoolReducer, selectors as drawtoolSelectors, filterLayers$1 as filterLayers, genericActions, rootSaga$2 as genericSaga, selectors$4 as genericSelectors, types$1 as genericTypes, getSingularDrawtoolDrawLayerId, 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$4 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, 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 };
9744
+ export { IS_LEGEND_OPEN_BY_DEFAULT, StoreProvider, coreModuleConfig, createStore, drawtoolActions, drawtoolModuleConfig, reducer as drawtoolReducer, selectors as drawtoolSelectors, filterLayers$1 as filterLayers, genericActions, rootSaga$2 as genericSaga, 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$4 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 };