@vention/machine-logic-ui-sdk 0.23.1 → 0.24.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
@@ -24,7 +24,7 @@ var globalThis_1 =
24
24
 
25
25
  var objectGetOwnPropertyDescriptor = {};
26
26
 
27
- var fails$i = function (exec) {
27
+ var fails$j = function (exec) {
28
28
  try {
29
29
  return !!exec();
30
30
  } catch (error) {
@@ -32,17 +32,17 @@ var fails$i = function (exec) {
32
32
  }
33
33
  };
34
34
 
35
- var fails$h = fails$i;
35
+ var fails$i = fails$j;
36
36
 
37
37
  // Detect IE8's incomplete defineProperty implementation
38
- var descriptors = !fails$h(function () {
38
+ var descriptors = !fails$i(function () {
39
39
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
40
40
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
41
41
  });
42
42
 
43
- var fails$g = fails$i;
43
+ var fails$h = fails$j;
44
44
 
45
- var functionBindNative = !fails$g(function () {
45
+ var functionBindNative = !fails$h(function () {
46
46
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
47
47
  var test = (function () { /* empty */ }).bind();
48
48
  // eslint-disable-next-line no-prototype-builtins -- safe
@@ -51,10 +51,10 @@ var functionBindNative = !fails$g(function () {
51
51
 
52
52
  var NATIVE_BIND$2 = functionBindNative;
53
53
 
54
- var call$c = Function.prototype.call;
54
+ var call$g = Function.prototype.call;
55
55
 
56
- var functionCall = NATIVE_BIND$2 ? call$c.bind(call$c) : function () {
57
- return call$c.apply(call$c, arguments);
56
+ var functionCall = NATIVE_BIND$2 ? call$g.bind(call$g) : function () {
57
+ return call$g.apply(call$g, arguments);
58
58
  };
59
59
 
60
60
  var objectPropertyIsEnumerable = {};
@@ -85,33 +85,33 @@ var createPropertyDescriptor$3 = function (bitmap, value) {
85
85
  var NATIVE_BIND$1 = functionBindNative;
86
86
 
87
87
  var FunctionPrototype$2 = Function.prototype;
88
- var call$b = FunctionPrototype$2.call;
89
- var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$2.bind.bind(call$b, call$b);
88
+ var call$f = FunctionPrototype$2.call;
89
+ var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$2.bind.bind(call$f, call$f);
90
90
 
91
91
  var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
92
92
  return function () {
93
- return call$b.apply(fn, arguments);
93
+ return call$f.apply(fn, arguments);
94
94
  };
95
95
  };
96
96
 
97
- var uncurryThis$g = functionUncurryThis;
97
+ var uncurryThis$i = functionUncurryThis;
98
98
 
99
- var toString$8 = uncurryThis$g({}.toString);
100
- var stringSlice$6 = uncurryThis$g(''.slice);
99
+ var toString$9 = uncurryThis$i({}.toString);
100
+ var stringSlice$6 = uncurryThis$i(''.slice);
101
101
 
102
102
  var classofRaw$2 = function (it) {
103
- return stringSlice$6(toString$8(it), 8, -1);
103
+ return stringSlice$6(toString$9(it), 8, -1);
104
104
  };
105
105
 
106
- var uncurryThis$f = functionUncurryThis;
107
- var fails$f = fails$i;
106
+ var uncurryThis$h = functionUncurryThis;
107
+ var fails$g = fails$j;
108
108
  var classof$5 = classofRaw$2;
109
109
 
110
110
  var $Object$4 = Object;
111
- var split = uncurryThis$f(''.split);
111
+ var split = uncurryThis$h(''.split);
112
112
 
113
113
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
114
- var indexedObject = fails$f(function () {
114
+ var indexedObject = fails$g(function () {
115
115
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
116
116
  // eslint-disable-next-line no-prototype-builtins -- safe
117
117
  return !$Object$4('z').propertyIsEnumerable(0);
@@ -121,27 +121,27 @@ var indexedObject = fails$f(function () {
121
121
 
122
122
  // we can't use just `it == null` since of `document.all` special case
123
123
  // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
124
- var isNullOrUndefined$3 = function (it) {
124
+ var isNullOrUndefined$4 = function (it) {
125
125
  return it === null || it === undefined;
126
126
  };
127
127
 
128
- var isNullOrUndefined$2 = isNullOrUndefined$3;
128
+ var isNullOrUndefined$3 = isNullOrUndefined$4;
129
129
 
130
- var $TypeError$a = TypeError;
130
+ var $TypeError$b = TypeError;
131
131
 
132
132
  // `RequireObjectCoercible` abstract operation
133
133
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
134
- var requireObjectCoercible$7 = function (it) {
135
- if (isNullOrUndefined$2(it)) throw new $TypeError$a("Can't call method on " + it);
134
+ var requireObjectCoercible$8 = function (it) {
135
+ if (isNullOrUndefined$3(it)) throw new $TypeError$b("Can't call method on " + it);
136
136
  return it;
137
137
  };
138
138
 
139
139
  // toObject with fallback for non-array-like ES3 strings
140
140
  var IndexedObject = indexedObject;
141
- var requireObjectCoercible$6 = requireObjectCoercible$7;
141
+ var requireObjectCoercible$7 = requireObjectCoercible$8;
142
142
 
143
143
  var toIndexedObject$5 = function (it) {
144
- return IndexedObject(requireObjectCoercible$6(it));
144
+ return IndexedObject(requireObjectCoercible$7(it));
145
145
  };
146
146
 
147
147
  // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
@@ -169,13 +169,13 @@ var aFunction = function (argument) {
169
169
  return isCallable$f(argument) ? argument : undefined;
170
170
  };
171
171
 
172
- var getBuiltIn$3 = function (namespace, method) {
172
+ var getBuiltIn$4 = function (namespace, method) {
173
173
  return arguments.length < 2 ? aFunction(globalThis$f[namespace]) : globalThis$f[namespace] && globalThis$f[namespace][method];
174
174
  };
175
175
 
176
- var uncurryThis$e = functionUncurryThis;
176
+ var uncurryThis$g = functionUncurryThis;
177
177
 
178
- var objectIsPrototypeOf = uncurryThis$e({}.isPrototypeOf);
178
+ var objectIsPrototypeOf = uncurryThis$g({}.isPrototypeOf);
179
179
 
180
180
  var globalThis$e = globalThis_1;
181
181
 
@@ -214,13 +214,13 @@ var environmentV8Version = version;
214
214
 
215
215
  /* eslint-disable es/no-symbol -- required for testing */
216
216
  var V8_VERSION = environmentV8Version;
217
- var fails$e = fails$i;
217
+ var fails$f = fails$j;
218
218
  var globalThis$c = globalThis_1;
219
219
 
220
220
  var $String$5 = globalThis$c.String;
221
221
 
222
222
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
223
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$e(function () {
223
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$f(function () {
224
224
  var symbol = Symbol('symbol detection');
225
225
  // Chrome 38 Symbol has incorrect toString conversion
226
226
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -238,7 +238,7 @@ var useSymbolAsUid = NATIVE_SYMBOL$1
238
238
  && !Symbol.sham
239
239
  && typeof Symbol.iterator == 'symbol';
240
240
 
241
- var getBuiltIn$2 = getBuiltIn$3;
241
+ var getBuiltIn$3 = getBuiltIn$4;
242
242
  var isCallable$e = isCallable$h;
243
243
  var isPrototypeOf$1 = objectIsPrototypeOf;
244
244
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
@@ -248,7 +248,7 @@ var $Object$3 = Object;
248
248
  var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
249
249
  return typeof it == 'symbol';
250
250
  } : function (it) {
251
- var $Symbol = getBuiltIn$2('Symbol');
251
+ var $Symbol = getBuiltIn$3('Symbol');
252
252
  return isCallable$e($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$3(it));
253
253
  };
254
254
 
@@ -265,38 +265,38 @@ var tryToString$1 = function (argument) {
265
265
  var isCallable$d = isCallable$h;
266
266
  var tryToString = tryToString$1;
267
267
 
268
- var $TypeError$9 = TypeError;
268
+ var $TypeError$a = TypeError;
269
269
 
270
270
  // `Assert: IsCallable(argument) is true`
271
- var aCallable$2 = function (argument) {
271
+ var aCallable$3 = function (argument) {
272
272
  if (isCallable$d(argument)) return argument;
273
- throw new $TypeError$9(tryToString(argument) + ' is not a function');
273
+ throw new $TypeError$a(tryToString(argument) + ' is not a function');
274
274
  };
275
275
 
276
- var aCallable$1 = aCallable$2;
277
- var isNullOrUndefined$1 = isNullOrUndefined$3;
276
+ var aCallable$2 = aCallable$3;
277
+ var isNullOrUndefined$2 = isNullOrUndefined$4;
278
278
 
279
279
  // `GetMethod` abstract operation
280
280
  // https://tc39.es/ecma262/#sec-getmethod
281
- var getMethod$2 = function (V, P) {
281
+ var getMethod$4 = function (V, P) {
282
282
  var func = V[P];
283
- return isNullOrUndefined$1(func) ? undefined : aCallable$1(func);
283
+ return isNullOrUndefined$2(func) ? undefined : aCallable$2(func);
284
284
  };
285
285
 
286
- var call$a = functionCall;
286
+ var call$e = functionCall;
287
287
  var isCallable$c = isCallable$h;
288
288
  var isObject$8 = isObject$9;
289
289
 
290
- var $TypeError$8 = TypeError;
290
+ var $TypeError$9 = TypeError;
291
291
 
292
292
  // `OrdinaryToPrimitive` abstract operation
293
293
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
294
294
  var ordinaryToPrimitive$1 = function (input, pref) {
295
295
  var fn, val;
296
- if (pref === 'string' && isCallable$c(fn = input.toString) && !isObject$8(val = call$a(fn, input))) return val;
297
- if (isCallable$c(fn = input.valueOf) && !isObject$8(val = call$a(fn, input))) return val;
298
- if (pref !== 'string' && isCallable$c(fn = input.toString) && !isObject$8(val = call$a(fn, input))) return val;
299
- throw new $TypeError$8("Can't convert object to primitive value");
296
+ if (pref === 'string' && isCallable$c(fn = input.toString) && !isObject$8(val = call$e(fn, input))) return val;
297
+ if (isCallable$c(fn = input.valueOf) && !isObject$8(val = call$e(fn, input))) return val;
298
+ if (pref !== 'string' && isCallable$c(fn = input.toString) && !isObject$8(val = call$e(fn, input))) return val;
299
+ throw new $TypeError$9("Can't convert object to primitive value");
300
300
  };
301
301
 
302
302
  var sharedStore = {exports: {}};
@@ -336,20 +336,20 @@ var shared$4 = function (key, value) {
336
336
  return store$2[key] || (store$2[key] = value || {});
337
337
  };
338
338
 
339
- var requireObjectCoercible$5 = requireObjectCoercible$7;
339
+ var requireObjectCoercible$6 = requireObjectCoercible$8;
340
340
 
341
341
  var $Object$2 = Object;
342
342
 
343
343
  // `ToObject` abstract operation
344
344
  // https://tc39.es/ecma262/#sec-toobject
345
345
  var toObject$4 = function (argument) {
346
- return $Object$2(requireObjectCoercible$5(argument));
346
+ return $Object$2(requireObjectCoercible$6(argument));
347
347
  };
348
348
 
349
- var uncurryThis$d = functionUncurryThis;
349
+ var uncurryThis$f = functionUncurryThis;
350
350
  var toObject$3 = toObject$4;
351
351
 
352
- var hasOwnProperty = uncurryThis$d({}.hasOwnProperty);
352
+ var hasOwnProperty = uncurryThis$f({}.hasOwnProperty);
353
353
 
354
354
  // `HasOwnProperty` abstract operation
355
355
  // https://tc39.es/ecma262/#sec-hasownproperty
@@ -358,14 +358,14 @@ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
358
358
  return hasOwnProperty(toObject$3(it), key);
359
359
  };
360
360
 
361
- var uncurryThis$c = functionUncurryThis;
361
+ var uncurryThis$e = functionUncurryThis;
362
362
 
363
363
  var id = 0;
364
364
  var postfix = Math.random();
365
- var toString$7 = uncurryThis$c(1.0.toString);
365
+ var toString$8 = uncurryThis$e(1.0.toString);
366
366
 
367
367
  var uid$2 = function (key) {
368
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$7(++id + postfix, 36);
368
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$8(++id + postfix, 36);
369
369
  };
370
370
 
371
371
  var globalThis$9 = globalThis_1;
@@ -387,27 +387,27 @@ var wellKnownSymbol$c = function (name) {
387
387
  } return WellKnownSymbolsStore[name];
388
388
  };
389
389
 
390
- var call$9 = functionCall;
390
+ var call$d = functionCall;
391
391
  var isObject$7 = isObject$9;
392
392
  var isSymbol$1 = isSymbol$2;
393
- var getMethod$1 = getMethod$2;
393
+ var getMethod$3 = getMethod$4;
394
394
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
395
395
  var wellKnownSymbol$b = wellKnownSymbol$c;
396
396
 
397
- var $TypeError$7 = TypeError;
397
+ var $TypeError$8 = TypeError;
398
398
  var TO_PRIMITIVE = wellKnownSymbol$b('toPrimitive');
399
399
 
400
400
  // `ToPrimitive` abstract operation
401
401
  // https://tc39.es/ecma262/#sec-toprimitive
402
402
  var toPrimitive$1 = function (input, pref) {
403
403
  if (!isObject$7(input) || isSymbol$1(input)) return input;
404
- var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
404
+ var exoticToPrim = getMethod$3(input, TO_PRIMITIVE);
405
405
  var result;
406
406
  if (exoticToPrim) {
407
407
  if (pref === undefined) pref = 'default';
408
- result = call$9(exoticToPrim, input, pref);
408
+ result = call$d(exoticToPrim, input, pref);
409
409
  if (!isObject$7(result) || isSymbol$1(result)) return result;
410
- throw new $TypeError$7("Can't convert object to primitive value");
410
+ throw new $TypeError$8("Can't convert object to primitive value");
411
411
  }
412
412
  if (pref === undefined) pref = 'number';
413
413
  return ordinaryToPrimitive(input, pref);
@@ -435,11 +435,11 @@ var documentCreateElement$2 = function (it) {
435
435
  };
436
436
 
437
437
  var DESCRIPTORS$9 = descriptors;
438
- var fails$d = fails$i;
438
+ var fails$e = fails$j;
439
439
  var createElement = documentCreateElement$2;
440
440
 
441
441
  // Thanks to IE8 for its funny defineProperty
442
- var ie8DomDefine = !DESCRIPTORS$9 && !fails$d(function () {
442
+ var ie8DomDefine = !DESCRIPTORS$9 && !fails$e(function () {
443
443
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
444
444
  return Object.defineProperty(createElement('div'), 'a', {
445
445
  get: function () { return 7; }
@@ -447,7 +447,7 @@ var ie8DomDefine = !DESCRIPTORS$9 && !fails$d(function () {
447
447
  });
448
448
 
449
449
  var DESCRIPTORS$8 = descriptors;
450
- var call$8 = functionCall;
450
+ var call$c = functionCall;
451
451
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
452
452
  var createPropertyDescriptor$2 = createPropertyDescriptor$3;
453
453
  var toIndexedObject$4 = toIndexedObject$5;
@@ -466,17 +466,17 @@ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 :
466
466
  if (IE8_DOM_DEFINE$1) try {
467
467
  return $getOwnPropertyDescriptor$1(O, P);
468
468
  } catch (error) { /* empty */ }
469
- if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$8(propertyIsEnumerableModule.f, O, P), O[P]);
469
+ if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$c(propertyIsEnumerableModule.f, O, P), O[P]);
470
470
  };
471
471
 
472
472
  var objectDefineProperty = {};
473
473
 
474
474
  var DESCRIPTORS$7 = descriptors;
475
- var fails$c = fails$i;
475
+ var fails$d = fails$j;
476
476
 
477
477
  // V8 ~ Chrome 36-
478
478
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
479
- var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$c(function () {
479
+ var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$d(function () {
480
480
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
481
481
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
482
482
  value: 42,
@@ -487,21 +487,21 @@ var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$c(function () {
487
487
  var isObject$5 = isObject$9;
488
488
 
489
489
  var $String$3 = String;
490
- var $TypeError$6 = TypeError;
490
+ var $TypeError$7 = TypeError;
491
491
 
492
492
  // `Assert: Type(argument) is Object`
493
- var anObject$9 = function (argument) {
493
+ var anObject$c = function (argument) {
494
494
  if (isObject$5(argument)) return argument;
495
- throw new $TypeError$6($String$3(argument) + ' is not an object');
495
+ throw new $TypeError$7($String$3(argument) + ' is not an object');
496
496
  };
497
497
 
498
498
  var DESCRIPTORS$6 = descriptors;
499
499
  var IE8_DOM_DEFINE = ie8DomDefine;
500
500
  var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
501
- var anObject$8 = anObject$9;
501
+ var anObject$b = anObject$c;
502
502
  var toPropertyKey = toPropertyKey$2;
503
503
 
504
- var $TypeError$5 = TypeError;
504
+ var $TypeError$6 = TypeError;
505
505
  // eslint-disable-next-line es/no-object-defineproperty -- safe
506
506
  var $defineProperty = Object.defineProperty;
507
507
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -513,9 +513,9 @@ var WRITABLE = 'writable';
513
513
  // `Object.defineProperty` method
514
514
  // https://tc39.es/ecma262/#sec-object.defineproperty
515
515
  objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
516
- anObject$8(O);
516
+ anObject$b(O);
517
517
  P = toPropertyKey(P);
518
- anObject$8(Attributes);
518
+ anObject$b(Attributes);
519
519
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
520
520
  var current = $getOwnPropertyDescriptor(O, P);
521
521
  if (current && current[WRITABLE]) {
@@ -528,13 +528,13 @@ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
528
528
  }
529
529
  } return $defineProperty(O, P, Attributes);
530
530
  } : $defineProperty : function defineProperty(O, P, Attributes) {
531
- anObject$8(O);
531
+ anObject$b(O);
532
532
  P = toPropertyKey(P);
533
- anObject$8(Attributes);
533
+ anObject$b(Attributes);
534
534
  if (IE8_DOM_DEFINE) try {
535
535
  return $defineProperty(O, P, Attributes);
536
536
  } catch (error) { /* empty */ }
537
- if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$5('Accessors not supported');
537
+ if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$6('Accessors not supported');
538
538
  if ('value' in Attributes) O[P] = Attributes.value;
539
539
  return O;
540
540
  };
@@ -570,11 +570,11 @@ var functionName = {
570
570
  CONFIGURABLE: CONFIGURABLE
571
571
  };
572
572
 
573
- var uncurryThis$b = functionUncurryThis;
573
+ var uncurryThis$d = functionUncurryThis;
574
574
  var isCallable$b = isCallable$h;
575
575
  var store$1 = sharedStoreExports;
576
576
 
577
- var functionToString = uncurryThis$b(Function.toString);
577
+ var functionToString = uncurryThis$d(Function.toString);
578
578
 
579
579
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
580
580
  if (!isCallable$b(store$1.inspectSource)) {
@@ -595,10 +595,10 @@ var weakMapBasicDetection = isCallable$a(WeakMap$1) && /native code/.test(String
595
595
  var shared$2 = shared$4;
596
596
  var uid = uid$2;
597
597
 
598
- var keys = shared$2('keys');
598
+ var keys$1 = shared$2('keys');
599
599
 
600
600
  var sharedKey$3 = function (key) {
601
- return keys[key] || (keys[key] = uid(key));
601
+ return keys$1[key] || (keys$1[key] = uid(key));
602
602
  };
603
603
 
604
604
  var hiddenKeys$4 = {};
@@ -615,10 +615,10 @@ var hiddenKeys$3 = hiddenKeys$4;
615
615
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
616
616
  var TypeError$1 = globalThis$6.TypeError;
617
617
  var WeakMap = globalThis$6.WeakMap;
618
- var set, get, has;
618
+ var set, get, has$6;
619
619
 
620
620
  var enforce = function (it) {
621
- return has(it) ? get(it) : set(it, {});
621
+ return has$6(it) ? get(it) : set(it, {});
622
622
  };
623
623
 
624
624
  var getterFor = function (TYPE) {
@@ -646,7 +646,7 @@ if (NATIVE_WEAK_MAP || shared$1.state) {
646
646
  get = function (it) {
647
647
  return store.get(it) || {};
648
648
  };
649
- has = function (it) {
649
+ has$6 = function (it) {
650
650
  return store.has(it);
651
651
  };
652
652
  } else {
@@ -661,7 +661,7 @@ if (NATIVE_WEAK_MAP || shared$1.state) {
661
661
  get = function (it) {
662
662
  return hasOwn$6(it, STATE) ? it[STATE] : {};
663
663
  };
664
- has = function (it) {
664
+ has$6 = function (it) {
665
665
  return hasOwn$6(it, STATE);
666
666
  };
667
667
  }
@@ -669,13 +669,13 @@ if (NATIVE_WEAK_MAP || shared$1.state) {
669
669
  var internalState = {
670
670
  set: set,
671
671
  get: get,
672
- has: has,
672
+ has: has$6,
673
673
  enforce: enforce,
674
674
  getterFor: getterFor
675
675
  };
676
676
 
677
- var uncurryThis$a = functionUncurryThis;
678
- var fails$b = fails$i;
677
+ var uncurryThis$c = functionUncurryThis;
678
+ var fails$c = fails$j;
679
679
  var isCallable$9 = isCallable$h;
680
680
  var hasOwn$5 = hasOwnProperty_1;
681
681
  var DESCRIPTORS$3 = descriptors;
@@ -688,11 +688,11 @@ var getInternalState$2 = InternalStateModule$1.get;
688
688
  var $String$2 = String;
689
689
  // eslint-disable-next-line es/no-object-defineproperty -- safe
690
690
  var defineProperty$3 = Object.defineProperty;
691
- var stringSlice$5 = uncurryThis$a(''.slice);
692
- var replace$2 = uncurryThis$a(''.replace);
693
- var join = uncurryThis$a([].join);
691
+ var stringSlice$5 = uncurryThis$c(''.slice);
692
+ var replace$2 = uncurryThis$c(''.replace);
693
+ var join = uncurryThis$c([].join);
694
694
 
695
- var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$b(function () {
695
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$c(function () {
696
696
  return defineProperty$3(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
697
697
  });
698
698
 
@@ -776,42 +776,42 @@ var trunc = mathTrunc;
776
776
 
777
777
  // `ToIntegerOrInfinity` abstract operation
778
778
  // https://tc39.es/ecma262/#sec-tointegerorinfinity
779
- var toIntegerOrInfinity$4 = function (argument) {
779
+ var toIntegerOrInfinity$5 = function (argument) {
780
780
  var number = +argument;
781
781
  // eslint-disable-next-line no-self-compare -- NaN check
782
782
  return number !== number || number === 0 ? 0 : trunc(number);
783
783
  };
784
784
 
785
- var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
785
+ var toIntegerOrInfinity$4 = toIntegerOrInfinity$5;
786
786
 
787
- var max$1 = Math.max;
787
+ var max$2 = Math.max;
788
788
  var min$3 = Math.min;
789
789
 
790
790
  // Helper for a popular repeating case of the spec:
791
791
  // Let integer be ? ToInteger(index).
792
792
  // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
793
793
  var toAbsoluteIndex$1 = function (index, length) {
794
- var integer = toIntegerOrInfinity$3(index);
795
- return integer < 0 ? max$1(integer + length, 0) : min$3(integer, length);
794
+ var integer = toIntegerOrInfinity$4(index);
795
+ return integer < 0 ? max$2(integer + length, 0) : min$3(integer, length);
796
796
  };
797
797
 
798
- var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
798
+ var toIntegerOrInfinity$3 = toIntegerOrInfinity$5;
799
799
 
800
800
  var min$2 = Math.min;
801
801
 
802
802
  // `ToLength` abstract operation
803
803
  // https://tc39.es/ecma262/#sec-tolength
804
- var toLength$3 = function (argument) {
805
- var len = toIntegerOrInfinity$2(argument);
804
+ var toLength$4 = function (argument) {
805
+ var len = toIntegerOrInfinity$3(argument);
806
806
  return len > 0 ? min$2(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
807
807
  };
808
808
 
809
- var toLength$2 = toLength$3;
809
+ var toLength$3 = toLength$4;
810
810
 
811
811
  // `LengthOfArrayLike` abstract operation
812
812
  // https://tc39.es/ecma262/#sec-lengthofarraylike
813
813
  var lengthOfArrayLike$2 = function (obj) {
814
- return toLength$2(obj.length);
814
+ return toLength$3(obj.length);
815
815
  };
816
816
 
817
817
  var toIndexedObject$3 = toIndexedObject$5;
@@ -848,13 +848,13 @@ var arrayIncludes = {
848
848
  indexOf: createMethod$1(false)
849
849
  };
850
850
 
851
- var uncurryThis$9 = functionUncurryThis;
851
+ var uncurryThis$b = functionUncurryThis;
852
852
  var hasOwn$4 = hasOwnProperty_1;
853
853
  var toIndexedObject$2 = toIndexedObject$5;
854
854
  var indexOf$1 = arrayIncludes.indexOf;
855
855
  var hiddenKeys$2 = hiddenKeys$4;
856
856
 
857
- var push$1 = uncurryThis$9([].push);
857
+ var push$1 = uncurryThis$b([].push);
858
858
 
859
859
  var objectKeysInternal = function (object, names) {
860
860
  var O = toIndexedObject$2(object);
@@ -897,17 +897,17 @@ var objectGetOwnPropertySymbols = {};
897
897
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
898
898
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
899
899
 
900
- var getBuiltIn$1 = getBuiltIn$3;
901
- var uncurryThis$8 = functionUncurryThis;
900
+ var getBuiltIn$2 = getBuiltIn$4;
901
+ var uncurryThis$a = functionUncurryThis;
902
902
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
903
903
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
904
- var anObject$7 = anObject$9;
904
+ var anObject$a = anObject$c;
905
905
 
906
- var concat$1 = uncurryThis$8([].concat);
906
+ var concat$1 = uncurryThis$a([].concat);
907
907
 
908
908
  // all object keys, includes non-enumerable and symbols
909
- var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
910
- var keys = getOwnPropertyNamesModule.f(anObject$7(it));
909
+ var ownKeys$1 = getBuiltIn$2('Reflect', 'ownKeys') || function ownKeys(it) {
910
+ var keys = getOwnPropertyNamesModule.f(anObject$a(it));
911
911
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
912
912
  return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
913
913
  };
@@ -929,7 +929,7 @@ var copyConstructorProperties$1 = function (target, source, exceptions) {
929
929
  }
930
930
  };
931
931
 
932
- var fails$a = fails$i;
932
+ var fails$b = fails$j;
933
933
  var isCallable$7 = isCallable$h;
934
934
 
935
935
  var replacement = /#|\.prototype\./;
@@ -938,7 +938,7 @@ var isForced$1 = function (feature, detection) {
938
938
  var value = data[normalize(feature)];
939
939
  return value === POLYFILL ? true
940
940
  : value === NATIVE ? false
941
- : isCallable$7(detection) ? fails$a(detection)
941
+ : isCallable$7(detection) ? fails$b(detection)
942
942
  : !!detection;
943
943
  };
944
944
 
@@ -1022,7 +1022,7 @@ var objectKeys$1 = Object.keys || function keys(O) {
1022
1022
  var DESCRIPTORS$2 = descriptors;
1023
1023
  var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1024
1024
  var definePropertyModule = objectDefineProperty;
1025
- var anObject$6 = anObject$9;
1025
+ var anObject$9 = anObject$c;
1026
1026
  var toIndexedObject$1 = toIndexedObject$5;
1027
1027
  var objectKeys = objectKeys$1;
1028
1028
 
@@ -1030,7 +1030,7 @@ var objectKeys = objectKeys$1;
1030
1030
  // https://tc39.es/ecma262/#sec-object.defineproperties
1031
1031
  // eslint-disable-next-line es/no-object-defineproperties -- safe
1032
1032
  objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1033
- anObject$6(O);
1033
+ anObject$9(O);
1034
1034
  var props = toIndexedObject$1(Properties);
1035
1035
  var keys = objectKeys(Properties);
1036
1036
  var length = keys.length;
@@ -1040,12 +1040,12 @@ objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.de
1040
1040
  return O;
1041
1041
  };
1042
1042
 
1043
- var getBuiltIn = getBuiltIn$3;
1043
+ var getBuiltIn$1 = getBuiltIn$4;
1044
1044
 
1045
- var html$1 = getBuiltIn('document', 'documentElement');
1045
+ var html$1 = getBuiltIn$1('document', 'documentElement');
1046
1046
 
1047
1047
  /* global ActiveXObject -- old IE, WSH */
1048
- var anObject$5 = anObject$9;
1048
+ var anObject$8 = anObject$c;
1049
1049
  var definePropertiesModule = objectDefineProperties;
1050
1050
  var enumBugKeys = enumBugKeys$3;
1051
1051
  var hiddenKeys = hiddenKeys$4;
@@ -1120,7 +1120,7 @@ hiddenKeys[IE_PROTO$1] = true;
1120
1120
  var objectCreate = Object.create || function create(O, Properties) {
1121
1121
  var result;
1122
1122
  if (O !== null) {
1123
- EmptyConstructor[PROTOTYPE] = anObject$5(O);
1123
+ EmptyConstructor[PROTOTYPE] = anObject$8(O);
1124
1124
  result = new EmptyConstructor();
1125
1125
  EmptyConstructor[PROTOTYPE] = null;
1126
1126
  // add "__proto__" for Object.getPrototypeOf polyfill
@@ -1150,20 +1150,20 @@ var addToUnscopables$2 = function (key) {
1150
1150
  ArrayPrototype[UNSCOPABLES][key] = true;
1151
1151
  };
1152
1152
 
1153
- var $$6 = _export;
1153
+ var $$d = _export;
1154
1154
  var $includes = arrayIncludes.includes;
1155
- var fails$9 = fails$i;
1155
+ var fails$a = fails$j;
1156
1156
  var addToUnscopables$1 = addToUnscopables$2;
1157
1157
 
1158
1158
  // FF99+ bug
1159
- var BROKEN_ON_SPARSE = fails$9(function () {
1159
+ var BROKEN_ON_SPARSE = fails$a(function () {
1160
1160
  // eslint-disable-next-line es/no-array-prototype-includes -- detection
1161
1161
  return !Array(1).includes();
1162
1162
  });
1163
1163
 
1164
1164
  // `Array.prototype.includes` method
1165
1165
  // https://tc39.es/ecma262/#sec-array.prototype.includes
1166
- $$6({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
1166
+ $$d({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
1167
1167
  includes: function includes(el /* , fromIndex = 0 */) {
1168
1168
  return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
1169
1169
  }
@@ -1174,9 +1174,9 @@ addToUnscopables$1('includes');
1174
1174
 
1175
1175
  var iterators = {};
1176
1176
 
1177
- var fails$8 = fails$i;
1177
+ var fails$9 = fails$j;
1178
1178
 
1179
- var correctPrototypeGetter = !fails$8(function () {
1179
+ var correctPrototypeGetter = !fails$9(function () {
1180
1180
  function F() { /* empty */ }
1181
1181
  F.prototype.constructor = null;
1182
1182
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
@@ -1205,7 +1205,7 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf :
1205
1205
  } return object instanceof $Object$1 ? ObjectPrototype : null;
1206
1206
  };
1207
1207
 
1208
- var fails$7 = fails$i;
1208
+ var fails$8 = fails$j;
1209
1209
  var isCallable$5 = isCallable$h;
1210
1210
  var isObject$3 = isObject$9;
1211
1211
  var getPrototypeOf$1 = objectGetPrototypeOf;
@@ -1230,7 +1230,7 @@ if ([].keys) {
1230
1230
  }
1231
1231
  }
1232
1232
 
1233
- var NEW_ITERATOR_PROTOTYPE = !isObject$3(IteratorPrototype$2) || fails$7(function () {
1233
+ var NEW_ITERATOR_PROTOTYPE = !isObject$3(IteratorPrototype$2) || fails$8(function () {
1234
1234
  var test = {};
1235
1235
  // FF44- legacy iterators case
1236
1236
  return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
@@ -1280,13 +1280,13 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
1280
1280
  return IteratorConstructor;
1281
1281
  };
1282
1282
 
1283
- var uncurryThis$7 = functionUncurryThis;
1284
- var aCallable = aCallable$2;
1283
+ var uncurryThis$9 = functionUncurryThis;
1284
+ var aCallable$1 = aCallable$3;
1285
1285
 
1286
1286
  var functionUncurryThisAccessor = function (object, key, method) {
1287
1287
  try {
1288
1288
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1289
- return uncurryThis$7(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
1289
+ return uncurryThis$9(aCallable$1(Object.getOwnPropertyDescriptor(object, key)[method]));
1290
1290
  } catch (error) { /* empty */ }
1291
1291
  };
1292
1292
 
@@ -1299,17 +1299,17 @@ var isPossiblePrototype$1 = function (argument) {
1299
1299
  var isPossiblePrototype = isPossiblePrototype$1;
1300
1300
 
1301
1301
  var $String$1 = String;
1302
- var $TypeError$4 = TypeError;
1302
+ var $TypeError$5 = TypeError;
1303
1303
 
1304
1304
  var aPossiblePrototype$1 = function (argument) {
1305
1305
  if (isPossiblePrototype(argument)) return argument;
1306
- throw new $TypeError$4("Can't set " + $String$1(argument) + ' as a prototype');
1306
+ throw new $TypeError$5("Can't set " + $String$1(argument) + ' as a prototype');
1307
1307
  };
1308
1308
 
1309
1309
  /* eslint-disable no-proto -- safe */
1310
- var uncurryThisAccessor = functionUncurryThisAccessor;
1310
+ var uncurryThisAccessor$1 = functionUncurryThisAccessor;
1311
1311
  var isObject$1 = isObject$9;
1312
- var requireObjectCoercible$4 = requireObjectCoercible$7;
1312
+ var requireObjectCoercible$5 = requireObjectCoercible$8;
1313
1313
  var aPossiblePrototype = aPossiblePrototype$1;
1314
1314
 
1315
1315
  // `Object.setPrototypeOf` method
@@ -1321,12 +1321,12 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1321
1321
  var test = {};
1322
1322
  var setter;
1323
1323
  try {
1324
- setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
1324
+ setter = uncurryThisAccessor$1(Object.prototype, '__proto__', 'set');
1325
1325
  setter(test, []);
1326
1326
  CORRECT_SETTER = test instanceof Array;
1327
1327
  } catch (error) { /* empty */ }
1328
1328
  return function setPrototypeOf(O, proto) {
1329
- requireObjectCoercible$4(O);
1329
+ requireObjectCoercible$5(O);
1330
1330
  aPossiblePrototype(proto);
1331
1331
  if (!isObject$1(O)) return O;
1332
1332
  if (CORRECT_SETTER) setter(O, proto);
@@ -1335,8 +1335,8 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1335
1335
  };
1336
1336
  }() : undefined);
1337
1337
 
1338
- var $$5 = _export;
1339
- var call$7 = functionCall;
1338
+ var $$c = _export;
1339
+ var call$b = functionCall;
1340
1340
  var FunctionName = functionName;
1341
1341
  var isCallable$4 = isCallable$h;
1342
1342
  var createIteratorConstructor = iteratorCreateConstructor;
@@ -1408,7 +1408,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1408
1408
  createNonEnumerableProperty$2(IterablePrototype, 'name', VALUES);
1409
1409
  } else {
1410
1410
  INCORRECT_VALUES_NAME = true;
1411
- defaultIterator = function values() { return call$7(nativeIterator, this); };
1411
+ defaultIterator = function values() { return call$b(nativeIterator, this); };
1412
1412
  }
1413
1413
  }
1414
1414
 
@@ -1423,7 +1423,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1423
1423
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1424
1424
  defineBuiltIn$2(IterablePrototype, KEY, methods[KEY]);
1425
1425
  }
1426
- } else $$5({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1426
+ } else $$c({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1427
1427
  }
1428
1428
 
1429
1429
  // define iterator
@@ -1545,17 +1545,17 @@ var classof$3 = classof$4;
1545
1545
 
1546
1546
  var $String = String;
1547
1547
 
1548
- var toString$6 = function (argument) {
1548
+ var toString$7 = function (argument) {
1549
1549
  if (classof$3(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
1550
1550
  return $String(argument);
1551
1551
  };
1552
1552
 
1553
- var anObject$4 = anObject$9;
1553
+ var anObject$7 = anObject$c;
1554
1554
 
1555
1555
  // `RegExp.prototype.flags` getter implementation
1556
1556
  // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
1557
1557
  var regexpFlags$1 = function () {
1558
- var that = anObject$4(this);
1558
+ var that = anObject$7(this);
1559
1559
  var result = '';
1560
1560
  if (that.hasIndices) result += 'd';
1561
1561
  if (that.global) result += 'g';
@@ -1568,7 +1568,187 @@ var regexpFlags$1 = function () {
1568
1568
  return result;
1569
1569
  };
1570
1570
 
1571
- var call$6 = functionCall;
1571
+ var fails$7 = fails$j;
1572
+ var globalThis$4 = globalThis_1;
1573
+
1574
+ // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1575
+ var $RegExp$2 = globalThis$4.RegExp;
1576
+
1577
+ var UNSUPPORTED_Y$1 = fails$7(function () {
1578
+ var re = $RegExp$2('a', 'y');
1579
+ re.lastIndex = 2;
1580
+ return re.exec('abcd') !== null;
1581
+ });
1582
+
1583
+ // UC Browser bug
1584
+ // https://github.com/zloirock/core-js/issues/1008
1585
+ var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$7(function () {
1586
+ return !$RegExp$2('a', 'y').sticky;
1587
+ });
1588
+
1589
+ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$7(function () {
1590
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1591
+ var re = $RegExp$2('^r', 'gy');
1592
+ re.lastIndex = 2;
1593
+ return re.exec('str') !== null;
1594
+ });
1595
+
1596
+ var regexpStickyHelpers = {
1597
+ BROKEN_CARET: BROKEN_CARET,
1598
+ MISSED_STICKY: MISSED_STICKY,
1599
+ UNSUPPORTED_Y: UNSUPPORTED_Y$1
1600
+ };
1601
+
1602
+ var fails$6 = fails$j;
1603
+ var globalThis$3 = globalThis_1;
1604
+
1605
+ // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
1606
+ var $RegExp$1 = globalThis$3.RegExp;
1607
+
1608
+ var regexpUnsupportedDotAll = fails$6(function () {
1609
+ var re = $RegExp$1('.', 's');
1610
+ return !(re.dotAll && re.test('\n') && re.flags === 's');
1611
+ });
1612
+
1613
+ var fails$5 = fails$j;
1614
+ var globalThis$2 = globalThis_1;
1615
+
1616
+ // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
1617
+ var $RegExp = globalThis$2.RegExp;
1618
+
1619
+ var regexpUnsupportedNcg = fails$5(function () {
1620
+ var re = $RegExp('(?<a>b)', 'g');
1621
+ return re.exec('b').groups.a !== 'b' ||
1622
+ 'b'.replace(re, '$<a>c') !== 'bc';
1623
+ });
1624
+
1625
+ /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
1626
+ /* eslint-disable regexp/no-useless-quantifier -- testing */
1627
+ var call$a = functionCall;
1628
+ var uncurryThis$8 = functionUncurryThis;
1629
+ var toString$6 = toString$7;
1630
+ var regexpFlags = regexpFlags$1;
1631
+ var stickyHelpers = regexpStickyHelpers;
1632
+ var shared = shared$4;
1633
+ var create = objectCreate;
1634
+ var getInternalState = internalState.get;
1635
+ var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
1636
+ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
1637
+
1638
+ var nativeReplace = shared('native-string-replace', String.prototype.replace);
1639
+ var nativeExec = RegExp.prototype.exec;
1640
+ var patchedExec = nativeExec;
1641
+ var charAt$3 = uncurryThis$8(''.charAt);
1642
+ var indexOf = uncurryThis$8(''.indexOf);
1643
+ var replace$1 = uncurryThis$8(''.replace);
1644
+ var stringSlice$4 = uncurryThis$8(''.slice);
1645
+
1646
+ var UPDATES_LAST_INDEX_WRONG = (function () {
1647
+ var re1 = /a/;
1648
+ var re2 = /b*/g;
1649
+ call$a(nativeExec, re1, 'a');
1650
+ call$a(nativeExec, re2, 'a');
1651
+ return re1.lastIndex !== 0 || re2.lastIndex !== 0;
1652
+ })();
1653
+
1654
+ var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
1655
+
1656
+ // nonparticipating capturing group, copied from es5-shim's String#split patch.
1657
+ var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
1658
+
1659
+ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
1660
+
1661
+ if (PATCH) {
1662
+ patchedExec = function exec(string) {
1663
+ var re = this;
1664
+ var state = getInternalState(re);
1665
+ var str = toString$6(string);
1666
+ var raw = state.raw;
1667
+ var result, reCopy, lastIndex, match, i, object, group;
1668
+
1669
+ if (raw) {
1670
+ raw.lastIndex = re.lastIndex;
1671
+ result = call$a(patchedExec, raw, str);
1672
+ re.lastIndex = raw.lastIndex;
1673
+ return result;
1674
+ }
1675
+
1676
+ var groups = state.groups;
1677
+ var sticky = UNSUPPORTED_Y && re.sticky;
1678
+ var flags = call$a(regexpFlags, re);
1679
+ var source = re.source;
1680
+ var charsAdded = 0;
1681
+ var strCopy = str;
1682
+
1683
+ if (sticky) {
1684
+ flags = replace$1(flags, 'y', '');
1685
+ if (indexOf(flags, 'g') === -1) {
1686
+ flags += 'g';
1687
+ }
1688
+
1689
+ strCopy = stringSlice$4(str, re.lastIndex);
1690
+ // Support anchored sticky behavior.
1691
+ if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
1692
+ source = '(?: ' + source + ')';
1693
+ strCopy = ' ' + strCopy;
1694
+ charsAdded++;
1695
+ }
1696
+ // ^(? + rx + ) is needed, in combination with some str slicing, to
1697
+ // simulate the 'y' flag.
1698
+ reCopy = new RegExp('^(?:' + source + ')', flags);
1699
+ }
1700
+
1701
+ if (NPCG_INCLUDED) {
1702
+ reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
1703
+ }
1704
+ if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
1705
+
1706
+ match = call$a(nativeExec, sticky ? reCopy : re, strCopy);
1707
+
1708
+ if (sticky) {
1709
+ if (match) {
1710
+ match.input = stringSlice$4(match.input, charsAdded);
1711
+ match[0] = stringSlice$4(match[0], charsAdded);
1712
+ match.index = re.lastIndex;
1713
+ re.lastIndex += match[0].length;
1714
+ } else re.lastIndex = 0;
1715
+ } else if (UPDATES_LAST_INDEX_WRONG && match) {
1716
+ re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
1717
+ }
1718
+ if (NPCG_INCLUDED && match && match.length > 1) {
1719
+ // Fix browsers whose `exec` methods don't consistently return `undefined`
1720
+ // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
1721
+ call$a(nativeReplace, match[0], reCopy, function () {
1722
+ for (i = 1; i < arguments.length - 2; i++) {
1723
+ if (arguments[i] === undefined) match[i] = undefined;
1724
+ }
1725
+ });
1726
+ }
1727
+
1728
+ if (match && groups) {
1729
+ match.groups = object = create(null);
1730
+ for (i = 0; i < groups.length; i++) {
1731
+ group = groups[i];
1732
+ object[group[0]] = match[group[1]];
1733
+ }
1734
+ }
1735
+
1736
+ return match;
1737
+ };
1738
+ }
1739
+
1740
+ var regexpExec$2 = patchedExec;
1741
+
1742
+ var $$b = _export;
1743
+ var exec = regexpExec$2;
1744
+
1745
+ // `RegExp.prototype.exec` method
1746
+ // https://tc39.es/ecma262/#sec-regexp.prototype.exec
1747
+ $$b({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
1748
+ exec: exec
1749
+ });
1750
+
1751
+ var call$9 = functionCall;
1572
1752
  var hasOwn = hasOwnProperty_1;
1573
1753
  var isPrototypeOf = objectIsPrototypeOf;
1574
1754
  var regExpFlags = regexpFlags$1;
@@ -1578,21 +1758,21 @@ var RegExpPrototype$2 = RegExp.prototype;
1578
1758
  var regexpGetFlags = function (R) {
1579
1759
  var flags = R.flags;
1580
1760
  return flags === undefined && !('flags' in RegExpPrototype$2) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$2, R)
1581
- ? call$6(regExpFlags, R) : flags;
1761
+ ? call$9(regExpFlags, R) : flags;
1582
1762
  };
1583
1763
 
1584
1764
  var PROPER_FUNCTION_NAME = functionName.PROPER;
1585
1765
  var defineBuiltIn$1 = defineBuiltIn$5;
1586
- var anObject$3 = anObject$9;
1587
- var $toString = toString$6;
1588
- var fails$6 = fails$i;
1766
+ var anObject$6 = anObject$c;
1767
+ var $toString = toString$7;
1768
+ var fails$4 = fails$j;
1589
1769
  var getRegExpFlags = regexpGetFlags;
1590
1770
 
1591
1771
  var TO_STRING = 'toString';
1592
1772
  var RegExpPrototype$1 = RegExp.prototype;
1593
1773
  var nativeToString = RegExpPrototype$1[TO_STRING];
1594
1774
 
1595
- var NOT_GENERIC = fails$6(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
1775
+ var NOT_GENERIC = fails$4(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
1596
1776
  // FF44- RegExp#toString has a wrong name
1597
1777
  var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
1598
1778
 
@@ -1600,7 +1780,7 @@ var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
1600
1780
  // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
1601
1781
  if (NOT_GENERIC || INCORRECT_NAME) {
1602
1782
  defineBuiltIn$1(RegExpPrototype$1, TO_STRING, function toString() {
1603
- var R = anObject$3(this);
1783
+ var R = anObject$6(this);
1604
1784
  var pattern = $toString(R.source);
1605
1785
  var flags = $toString(getRegExpFlags(R));
1606
1786
  return '/' + pattern + '/' + flags;
@@ -1622,11 +1802,11 @@ var isRegexp = function (it) {
1622
1802
 
1623
1803
  var isRegExp = isRegexp;
1624
1804
 
1625
- var $TypeError$3 = TypeError;
1805
+ var $TypeError$4 = TypeError;
1626
1806
 
1627
1807
  var notARegexp = function (it) {
1628
1808
  if (isRegExp(it)) {
1629
- throw new $TypeError$3("The method doesn't accept regular expressions");
1809
+ throw new $TypeError$4("The method doesn't accept regular expressions");
1630
1810
  } return it;
1631
1811
  };
1632
1812
 
@@ -1646,87 +1826,277 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
1646
1826
  } return false;
1647
1827
  };
1648
1828
 
1649
- var $$4 = _export;
1650
- var uncurryThis$6 = functionUncurryThis;
1829
+ var $$a = _export;
1830
+ var uncurryThis$7 = functionUncurryThis;
1651
1831
  var notARegExp$1 = notARegexp;
1652
- var requireObjectCoercible$3 = requireObjectCoercible$7;
1653
- var toString$5 = toString$6;
1832
+ var requireObjectCoercible$4 = requireObjectCoercible$8;
1833
+ var toString$5 = toString$7;
1654
1834
  var correctIsRegExpLogic$1 = correctIsRegexpLogic;
1655
1835
 
1656
- var stringIndexOf$1 = uncurryThis$6(''.indexOf);
1836
+ var stringIndexOf$1 = uncurryThis$7(''.indexOf);
1657
1837
 
1658
1838
  // `String.prototype.includes` method
1659
1839
  // https://tc39.es/ecma262/#sec-string.prototype.includes
1660
- $$4({ target: 'String', proto: true, forced: !correctIsRegExpLogic$1('includes') }, {
1840
+ $$a({ target: 'String', proto: true, forced: !correctIsRegExpLogic$1('includes') }, {
1661
1841
  includes: function includes(searchString /* , position = 0 */) {
1662
1842
  return !!~stringIndexOf$1(
1663
- toString$5(requireObjectCoercible$3(this)),
1843
+ toString$5(requireObjectCoercible$4(this)),
1664
1844
  toString$5(notARegExp$1(searchString)),
1665
1845
  arguments.length > 1 ? arguments[1] : undefined
1666
1846
  );
1667
1847
  }
1668
1848
  });
1669
1849
 
1670
- // iterable DOM collections
1671
- // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1672
- var domIterables = {
1673
- CSSRuleList: 0,
1674
- CSSStyleDeclaration: 0,
1675
- CSSValueList: 0,
1676
- ClientRectList: 0,
1677
- DOMRectList: 0,
1678
- DOMStringList: 0,
1679
- DOMTokenList: 1,
1680
- DataTransferItemList: 0,
1681
- FileList: 0,
1682
- HTMLAllCollection: 0,
1683
- HTMLCollection: 0,
1684
- HTMLFormElement: 0,
1685
- HTMLSelectElement: 0,
1686
- MediaList: 0,
1687
- MimeTypeArray: 0,
1688
- NamedNodeMap: 0,
1689
- NodeList: 1,
1690
- PaintRequestList: 0,
1691
- Plugin: 0,
1692
- PluginArray: 0,
1693
- SVGLengthList: 0,
1694
- SVGNumberList: 0,
1695
- SVGPathSegList: 0,
1696
- SVGPointList: 0,
1697
- SVGStringList: 0,
1698
- SVGTransformList: 0,
1699
- SourceBufferList: 0,
1700
- StyleSheetList: 0,
1701
- TextTrackCueList: 0,
1702
- TextTrackList: 0,
1703
- TouchList: 0
1704
- };
1850
+ // TODO: Remove from `core-js@4` since it's moved to entry points
1705
1851
 
1706
- // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
1707
- var documentCreateElement = documentCreateElement$2;
1852
+ var call$8 = functionCall;
1853
+ var defineBuiltIn = defineBuiltIn$5;
1854
+ var regexpExec$1 = regexpExec$2;
1855
+ var fails$3 = fails$j;
1856
+ var wellKnownSymbol$2 = wellKnownSymbol$c;
1857
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
1708
1858
 
1709
- var classList = documentCreateElement('span').classList;
1710
- var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
1859
+ var SPECIES = wellKnownSymbol$2('species');
1860
+ var RegExpPrototype = RegExp.prototype;
1711
1861
 
1712
- var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1862
+ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
1863
+ var SYMBOL = wellKnownSymbol$2(KEY);
1713
1864
 
1714
- var globalThis$4 = globalThis_1;
1715
- var DOMIterables = domIterables;
1716
- var DOMTokenListPrototype = domTokenListPrototype;
1717
- var ArrayIteratorMethods = es_array_iterator;
1718
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
1719
- var setToStringTag = setToStringTag$3;
1720
- var wellKnownSymbol$2 = wellKnownSymbol$c;
1865
+ var DELEGATES_TO_SYMBOL = !fails$3(function () {
1866
+ // String methods call symbol-named RegExp methods
1867
+ var O = {};
1868
+ O[SYMBOL] = function () { return 7; };
1869
+ return ''[KEY](O) !== 7;
1870
+ });
1871
+
1872
+ var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$3(function () {
1873
+ // Symbol-named RegExp methods call .exec
1874
+ var execCalled = false;
1875
+ var re = /a/;
1876
+
1877
+ if (KEY === 'split') {
1878
+ // We can't use real regex here since it causes deoptimization
1879
+ // and serious performance degradation in V8
1880
+ // https://github.com/zloirock/core-js/issues/306
1881
+ re = {};
1882
+ // RegExp[@@split] doesn't call the regex's exec method, but first creates
1883
+ // a new one. We need to return the patched regex when creating the new one.
1884
+ re.constructor = {};
1885
+ re.constructor[SPECIES] = function () { return re; };
1886
+ re.flags = '';
1887
+ re[SYMBOL] = /./[SYMBOL];
1888
+ }
1889
+
1890
+ re.exec = function () {
1891
+ execCalled = true;
1892
+ return null;
1893
+ };
1894
+
1895
+ re[SYMBOL]('');
1896
+ return !execCalled;
1897
+ });
1898
+
1899
+ if (
1900
+ !DELEGATES_TO_SYMBOL ||
1901
+ !DELEGATES_TO_EXEC ||
1902
+ FORCED
1903
+ ) {
1904
+ var nativeRegExpMethod = /./[SYMBOL];
1905
+ var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
1906
+ var $exec = regexp.exec;
1907
+ if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
1908
+ if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
1909
+ // The native String method already delegates to @@method (this
1910
+ // polyfilled function), leasing to infinite recursion.
1911
+ // We avoid it by directly calling the native @@method method.
1912
+ return { done: true, value: call$8(nativeRegExpMethod, regexp, str, arg2) };
1913
+ }
1914
+ return { done: true, value: call$8(nativeMethod, str, regexp, arg2) };
1915
+ }
1916
+ return { done: false };
1917
+ });
1918
+
1919
+ defineBuiltIn(String.prototype, KEY, methods[0]);
1920
+ defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
1921
+ }
1922
+
1923
+ if (SHAM) createNonEnumerableProperty$1(RegExpPrototype[SYMBOL], 'sham', true);
1924
+ };
1925
+
1926
+ var uncurryThis$6 = functionUncurryThis;
1927
+ var toIntegerOrInfinity$2 = toIntegerOrInfinity$5;
1928
+ var toString$4 = toString$7;
1929
+ var requireObjectCoercible$3 = requireObjectCoercible$8;
1930
+
1931
+ var charAt$2 = uncurryThis$6(''.charAt);
1932
+ var charCodeAt = uncurryThis$6(''.charCodeAt);
1933
+ var stringSlice$3 = uncurryThis$6(''.slice);
1934
+
1935
+ var createMethod = function (CONVERT_TO_STRING) {
1936
+ return function ($this, pos) {
1937
+ var S = toString$4(requireObjectCoercible$3($this));
1938
+ var position = toIntegerOrInfinity$2(pos);
1939
+ var size = S.length;
1940
+ var first, second;
1941
+ if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
1942
+ first = charCodeAt(S, position);
1943
+ return first < 0xD800 || first > 0xDBFF || position + 1 === size
1944
+ || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
1945
+ ? CONVERT_TO_STRING
1946
+ ? charAt$2(S, position)
1947
+ : first
1948
+ : CONVERT_TO_STRING
1949
+ ? stringSlice$3(S, position, position + 2)
1950
+ : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
1951
+ };
1952
+ };
1953
+
1954
+ var stringMultibyte = {
1955
+ // `String.prototype.codePointAt` method
1956
+ // https://tc39.es/ecma262/#sec-string.prototype.codepointat
1957
+ codeAt: createMethod(false),
1958
+ // `String.prototype.at` method
1959
+ // https://github.com/mathiasbynens/String.prototype.at
1960
+ charAt: createMethod(true)
1961
+ };
1962
+
1963
+ var charAt$1 = stringMultibyte.charAt;
1964
+
1965
+ // `AdvanceStringIndex` abstract operation
1966
+ // https://tc39.es/ecma262/#sec-advancestringindex
1967
+ var advanceStringIndex$2 = function (S, index, unicode) {
1968
+ return index + (unicode ? charAt$1(S, index).length : 1);
1969
+ };
1721
1970
 
1722
- var ITERATOR = wellKnownSymbol$2('iterator');
1971
+ var call$7 = functionCall;
1972
+ var anObject$5 = anObject$c;
1973
+ var isCallable$2 = isCallable$h;
1974
+ var classof$1 = classofRaw$2;
1975
+ var regexpExec = regexpExec$2;
1976
+
1977
+ var $TypeError$3 = TypeError;
1978
+
1979
+ // `RegExpExec` abstract operation
1980
+ // https://tc39.es/ecma262/#sec-regexpexec
1981
+ var regexpExecAbstract = function (R, S) {
1982
+ var exec = R.exec;
1983
+ if (isCallable$2(exec)) {
1984
+ var result = call$7(exec, R, S);
1985
+ if (result !== null) anObject$5(result);
1986
+ return result;
1987
+ }
1988
+ if (classof$1(R) === 'RegExp') return call$7(regexpExec, R, S);
1989
+ throw new $TypeError$3('RegExp#exec called on incompatible receiver');
1990
+ };
1991
+
1992
+ var call$6 = functionCall;
1993
+ var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
1994
+ var anObject$4 = anObject$c;
1995
+ var isNullOrUndefined$1 = isNullOrUndefined$4;
1996
+ var toLength$2 = toLength$4;
1997
+ var toString$3 = toString$7;
1998
+ var requireObjectCoercible$2 = requireObjectCoercible$8;
1999
+ var getMethod$2 = getMethod$4;
2000
+ var advanceStringIndex$1 = advanceStringIndex$2;
2001
+ var regExpExec$1 = regexpExecAbstract;
2002
+
2003
+ // @@match logic
2004
+ fixRegExpWellKnownSymbolLogic$1('match', function (MATCH, nativeMatch, maybeCallNative) {
2005
+ return [
2006
+ // `String.prototype.match` method
2007
+ // https://tc39.es/ecma262/#sec-string.prototype.match
2008
+ function match(regexp) {
2009
+ var O = requireObjectCoercible$2(this);
2010
+ var matcher = isNullOrUndefined$1(regexp) ? undefined : getMethod$2(regexp, MATCH);
2011
+ return matcher ? call$6(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString$3(O));
2012
+ },
2013
+ // `RegExp.prototype[@@match]` method
2014
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
2015
+ function (string) {
2016
+ var rx = anObject$4(this);
2017
+ var S = toString$3(string);
2018
+ var res = maybeCallNative(nativeMatch, rx, S);
2019
+
2020
+ if (res.done) return res.value;
2021
+
2022
+ if (!rx.global) return regExpExec$1(rx, S);
2023
+
2024
+ var fullUnicode = rx.unicode;
2025
+ rx.lastIndex = 0;
2026
+ var A = [];
2027
+ var n = 0;
2028
+ var result;
2029
+ while ((result = regExpExec$1(rx, S)) !== null) {
2030
+ var matchStr = toString$3(result[0]);
2031
+ A[n] = matchStr;
2032
+ if (matchStr === '') rx.lastIndex = advanceStringIndex$1(S, toLength$2(rx.lastIndex), fullUnicode);
2033
+ n++;
2034
+ }
2035
+ return n === 0 ? null : A;
2036
+ }
2037
+ ];
2038
+ });
2039
+
2040
+ // iterable DOM collections
2041
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
2042
+ var domIterables = {
2043
+ CSSRuleList: 0,
2044
+ CSSStyleDeclaration: 0,
2045
+ CSSValueList: 0,
2046
+ ClientRectList: 0,
2047
+ DOMRectList: 0,
2048
+ DOMStringList: 0,
2049
+ DOMTokenList: 1,
2050
+ DataTransferItemList: 0,
2051
+ FileList: 0,
2052
+ HTMLAllCollection: 0,
2053
+ HTMLCollection: 0,
2054
+ HTMLFormElement: 0,
2055
+ HTMLSelectElement: 0,
2056
+ MediaList: 0,
2057
+ MimeTypeArray: 0,
2058
+ NamedNodeMap: 0,
2059
+ NodeList: 1,
2060
+ PaintRequestList: 0,
2061
+ Plugin: 0,
2062
+ PluginArray: 0,
2063
+ SVGLengthList: 0,
2064
+ SVGNumberList: 0,
2065
+ SVGPathSegList: 0,
2066
+ SVGPointList: 0,
2067
+ SVGStringList: 0,
2068
+ SVGTransformList: 0,
2069
+ SourceBufferList: 0,
2070
+ StyleSheetList: 0,
2071
+ TextTrackCueList: 0,
2072
+ TextTrackList: 0,
2073
+ TouchList: 0
2074
+ };
2075
+
2076
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
2077
+ var documentCreateElement = documentCreateElement$2;
2078
+
2079
+ var classList = documentCreateElement('span').classList;
2080
+ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
2081
+
2082
+ var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
2083
+
2084
+ var globalThis$1 = globalThis_1;
2085
+ var DOMIterables = domIterables;
2086
+ var DOMTokenListPrototype = domTokenListPrototype;
2087
+ var ArrayIteratorMethods = es_array_iterator;
2088
+ var createNonEnumerableProperty = createNonEnumerableProperty$5;
2089
+ var setToStringTag = setToStringTag$3;
2090
+ var wellKnownSymbol$1 = wellKnownSymbol$c;
2091
+
2092
+ var ITERATOR = wellKnownSymbol$1('iterator');
1723
2093
  var ArrayValues = ArrayIteratorMethods.values;
1724
2094
 
1725
2095
  var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1726
2096
  if (CollectionPrototype) {
1727
2097
  // some Chrome versions have non-configurable methods on DOMTokenList
1728
2098
  if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
1729
- createNonEnumerableProperty$1(CollectionPrototype, ITERATOR, ArrayValues);
2099
+ createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
1730
2100
  } catch (error) {
1731
2101
  CollectionPrototype[ITERATOR] = ArrayValues;
1732
2102
  }
@@ -1734,7 +2104,7 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1734
2104
  if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1735
2105
  // some Chrome versions have non-configurable methods on DOMTokenList
1736
2106
  if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
1737
- createNonEnumerableProperty$1(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
2107
+ createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1738
2108
  } catch (error) {
1739
2109
  CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
1740
2110
  }
@@ -1743,7 +2113,7 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1743
2113
  };
1744
2114
 
1745
2115
  for (var COLLECTION_NAME in DOMIterables) {
1746
- handlePrototype(globalThis$4[COLLECTION_NAME] && globalThis$4[COLLECTION_NAME].prototype, COLLECTION_NAME);
2116
+ handlePrototype(globalThis$1[COLLECTION_NAME] && globalThis$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
1747
2117
  }
1748
2118
 
1749
2119
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
@@ -1818,30 +2188,25 @@ const VirtualKeyboard = () => {
1818
2188
  const virtualKeyboardRef = useRef(null);
1819
2189
  const keyboardContainerRef = useRef(null);
1820
2190
  useEffect(function handleClickListeners() {
1821
- function handleClickOutside(event) {
1822
- if (keyboardContainerRef.current && !keyboardContainerRef.current.contains(event.target)) {
1823
- setIsKeyboardVisible(false);
1824
- }
1825
- }
1826
2191
  function handleMouseOrTouchUp(event) {
1827
2192
  if (isSubmitPressed) {
1828
2193
  event.preventDefault();
1829
2194
  setIsKeyboardVisible(false);
1830
2195
  setIsSubmitPressed(false);
2196
+ return;
2197
+ }
2198
+ if (keyboardContainerRef.current && !keyboardContainerRef.current.contains(event.target) && (document.activeElement == null || document.activeElement.tagName !== "INPUT")) {
2199
+ setIsKeyboardVisible(false);
1831
2200
  }
1832
2201
  }
1833
- document.addEventListener("mousedown", handleClickOutside);
1834
- document.addEventListener("touchstart", handleClickOutside);
1835
2202
  document.addEventListener("mouseup", handleMouseOrTouchUp);
1836
2203
  document.addEventListener("touchend", handleMouseOrTouchUp);
1837
2204
  return () => {
1838
- document.removeEventListener("mousedown", handleClickOutside);
1839
- document.removeEventListener("touchstart", handleClickOutside);
1840
2205
  document.removeEventListener("mouseup", handleMouseOrTouchUp);
1841
2206
  document.removeEventListener("touchend", handleMouseOrTouchUp);
1842
2207
  };
1843
2208
  }, [isSubmitPressed]);
1844
- useEffect(function showOrHideKeyboard() {
2209
+ useEffect(function showKeyboard() {
1845
2210
  // The keyboard will appear/disappear on mouse down
1846
2211
  // However, if the user is clicking something, like a submit button or the input itself, the mouse up will happen a few milliseconds after the keyboard is shown/hidden
1847
2212
  // The layout might shift, the page might scroll and the user might misclick because of that.
@@ -1963,7 +2328,11 @@ const VirtualKeyboard = () => {
1963
2328
  setKeyboardLayoutName(toggleLayout(keyboardLayoutName));
1964
2329
  setToggleLayoutOnInput(false);
1965
2330
  }
1966
- setInputValue(focusedTextInput, newValue, virtualKeyboardRef.current.caretPosition);
2331
+ // For number inputs only:
2332
+ // If you enter - or . more than once, it will take the most recent character as the input value (same as a normal keyboard)
2333
+ const isNewValueOnlyDashesAndPoints = newValue.match("^[.-]{2,}$");
2334
+ const isNumberInput = focusedTextInput.type === "tel" || focusedTextInput.type === "number";
2335
+ setInputValue(focusedTextInput, isNewValueOnlyDashesAndPoints && isNumberInput ? newValue.charAt(newValue.length - 1) : newValue, virtualKeyboardRef.current.caretPosition);
1967
2336
  };
1968
2337
  const handleKeyPress = keyboardKey => {
1969
2338
  if (focusedTextInput === undefined || virtualKeyboardRef.current === null) {
@@ -1996,402 +2365,101 @@ const VirtualKeyboard = () => {
1996
2365
  };
1997
2366
  if (!isKeyboardVisible) {
1998
2367
  return null;
1999
- }
2000
- return jsx("div", {
2001
- id: "virtual_keyboard",
2002
- ref: keyboardContainerRef,
2003
- onMouseDown: handleKeyboardContainerEvents,
2004
- onTouchStart: handleKeyboardContainerEvents,
2005
- children: jsx(Keyboard, {
2006
- keyboardRef: ref => {
2007
- virtualKeyboardRef.current = ref;
2008
- },
2009
- onInit: keyboard => {
2010
- if (keyboard === undefined) {
2011
- console.error("The virtual keyboard is open, but not available. This is not supposed to happen.");
2012
- return;
2013
- }
2014
- if (focusedTextInput === undefined) {
2015
- console.error("The virtual keyboard is open, but there's no focusedTextInput. This is not supposed to happen.");
2016
- return;
2017
- }
2018
- const textWasSelectedBeforeInit = isTextSelected(focusedTextInput);
2019
- keyboard.setCaretPosition(focusedTextInput.selectionStart);
2020
- keyboard.setInput(focusedTextInput.value);
2021
- if (textWasSelectedBeforeInit !== undefined && textWasSelectedBeforeInit) {
2022
- focusedTextInput.select();
2023
- }
2024
- keyboard.setCaretPosition(focusedTextInput.selectionStart);
2025
- keyboard.setInput(focusedTextInput.value);
2026
- },
2027
- onChange: handleInput,
2028
- onKeyPress: handleKeyPress,
2029
- layout: keyboardLayout,
2030
- layoutName: keyboardLayoutName,
2031
- preventMouseDownDefault: true,
2032
- stopMouseDownPropagation: true,
2033
- display: KeyboardDisplay,
2034
- newLineOnEnter: true
2035
- })
2036
- });
2037
- };
2038
- /**
2039
- * Sets the input value in a way that can be picked up by React if the element is managed by React.
2040
- *
2041
- * I don't understand any of this, but other people do
2042
- * - https://stackoverflow.com/questions/42550341/react-trigger-onchange-if-input-value-is-changing-by-state/59939017#59939017
2043
- */
2044
- function setInputValue(inputElement, inputValue, caretPosition) {
2045
- var _a, _b;
2046
- const valueSetter = (_a = Object.getOwnPropertyDescriptor(inputElement, "value")) === null || _a === void 0 ? void 0 : _a.set;
2047
- const inputPrototype = Object.getPrototypeOf(inputElement);
2048
- const prototypeValueSetter = (_b = Object.getOwnPropertyDescriptor(inputPrototype, "value")) === null || _b === void 0 ? void 0 : _b.set;
2049
- if (valueSetter !== undefined && prototypeValueSetter !== undefined && valueSetter !== prototypeValueSetter) {
2050
- prototypeValueSetter.call(inputElement, inputValue);
2051
- } else if (valueSetter !== undefined) {
2052
- valueSetter.call(inputElement, inputValue);
2053
- } else {
2054
- // Not managed by React, set it the normal way
2055
- inputElement.value = inputValue;
2056
- }
2057
- // The input caret position doesn't stay in sync after setting the value programmatically, so we set it
2058
- inputElement.setSelectionRange(caretPosition, caretPosition);
2059
- inputElement.dispatchEvent(new Event("input")); // Some jQuery handlers use on("input", handler)
2060
- inputElement.dispatchEvent(new Event("input", {
2061
- bubbles: true
2062
- })); // Used by React onChange handlers
2063
- }
2064
- function toggleLayout(keyboardLayoutName) {
2065
- return keyboardLayoutName === KeyboardLayoutName.DEFAULT ? KeyboardLayoutName.SHIFT : KeyboardLayoutName.DEFAULT;
2066
- }
2067
- function isTextSelected(inputElement) {
2068
- if (typeof inputElement.selectionStart == "number") {
2069
- return inputElement.selectionStart === 0 && inputElement.selectionEnd === inputElement.value.length;
2070
- } else if (typeof window.getSelection != "undefined") {
2071
- const selection = window.getSelection();
2072
- return (selection === null || selection === void 0 ? void 0 : selection.toString()) === inputElement.value;
2073
- }
2074
- }
2075
-
2076
- var fails$5 = fails$i;
2077
- var globalThis$3 = globalThis_1;
2078
-
2079
- // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
2080
- var $RegExp$2 = globalThis$3.RegExp;
2081
-
2082
- var UNSUPPORTED_Y$1 = fails$5(function () {
2083
- var re = $RegExp$2('a', 'y');
2084
- re.lastIndex = 2;
2085
- return re.exec('abcd') !== null;
2086
- });
2087
-
2088
- // UC Browser bug
2089
- // https://github.com/zloirock/core-js/issues/1008
2090
- var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$5(function () {
2091
- return !$RegExp$2('a', 'y').sticky;
2092
- });
2093
-
2094
- var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$5(function () {
2095
- // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
2096
- var re = $RegExp$2('^r', 'gy');
2097
- re.lastIndex = 2;
2098
- return re.exec('str') !== null;
2099
- });
2100
-
2101
- var regexpStickyHelpers = {
2102
- BROKEN_CARET: BROKEN_CARET,
2103
- MISSED_STICKY: MISSED_STICKY,
2104
- UNSUPPORTED_Y: UNSUPPORTED_Y$1
2105
- };
2106
-
2107
- var fails$4 = fails$i;
2108
- var globalThis$2 = globalThis_1;
2109
-
2110
- // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
2111
- var $RegExp$1 = globalThis$2.RegExp;
2112
-
2113
- var regexpUnsupportedDotAll = fails$4(function () {
2114
- var re = $RegExp$1('.', 's');
2115
- return !(re.dotAll && re.test('\n') && re.flags === 's');
2116
- });
2117
-
2118
- var fails$3 = fails$i;
2119
- var globalThis$1 = globalThis_1;
2120
-
2121
- // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
2122
- var $RegExp = globalThis$1.RegExp;
2123
-
2124
- var regexpUnsupportedNcg = fails$3(function () {
2125
- var re = $RegExp('(?<a>b)', 'g');
2126
- return re.exec('b').groups.a !== 'b' ||
2127
- 'b'.replace(re, '$<a>c') !== 'bc';
2128
- });
2129
-
2130
- /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
2131
- /* eslint-disable regexp/no-useless-quantifier -- testing */
2132
- var call$5 = functionCall;
2133
- var uncurryThis$5 = functionUncurryThis;
2134
- var toString$4 = toString$6;
2135
- var regexpFlags = regexpFlags$1;
2136
- var stickyHelpers = regexpStickyHelpers;
2137
- var shared = shared$4;
2138
- var create = objectCreate;
2139
- var getInternalState = internalState.get;
2140
- var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
2141
- var UNSUPPORTED_NCG = regexpUnsupportedNcg;
2142
-
2143
- var nativeReplace = shared('native-string-replace', String.prototype.replace);
2144
- var nativeExec = RegExp.prototype.exec;
2145
- var patchedExec = nativeExec;
2146
- var charAt$3 = uncurryThis$5(''.charAt);
2147
- var indexOf = uncurryThis$5(''.indexOf);
2148
- var replace$1 = uncurryThis$5(''.replace);
2149
- var stringSlice$4 = uncurryThis$5(''.slice);
2150
-
2151
- var UPDATES_LAST_INDEX_WRONG = (function () {
2152
- var re1 = /a/;
2153
- var re2 = /b*/g;
2154
- call$5(nativeExec, re1, 'a');
2155
- call$5(nativeExec, re2, 'a');
2156
- return re1.lastIndex !== 0 || re2.lastIndex !== 0;
2157
- })();
2158
-
2159
- var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
2160
-
2161
- // nonparticipating capturing group, copied from es5-shim's String#split patch.
2162
- var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
2163
-
2164
- var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
2165
-
2166
- if (PATCH) {
2167
- patchedExec = function exec(string) {
2168
- var re = this;
2169
- var state = getInternalState(re);
2170
- var str = toString$4(string);
2171
- var raw = state.raw;
2172
- var result, reCopy, lastIndex, match, i, object, group;
2173
-
2174
- if (raw) {
2175
- raw.lastIndex = re.lastIndex;
2176
- result = call$5(patchedExec, raw, str);
2177
- re.lastIndex = raw.lastIndex;
2178
- return result;
2179
- }
2180
-
2181
- var groups = state.groups;
2182
- var sticky = UNSUPPORTED_Y && re.sticky;
2183
- var flags = call$5(regexpFlags, re);
2184
- var source = re.source;
2185
- var charsAdded = 0;
2186
- var strCopy = str;
2187
-
2188
- if (sticky) {
2189
- flags = replace$1(flags, 'y', '');
2190
- if (indexOf(flags, 'g') === -1) {
2191
- flags += 'g';
2192
- }
2193
-
2194
- strCopy = stringSlice$4(str, re.lastIndex);
2195
- // Support anchored sticky behavior.
2196
- if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
2197
- source = '(?: ' + source + ')';
2198
- strCopy = ' ' + strCopy;
2199
- charsAdded++;
2200
- }
2201
- // ^(? + rx + ) is needed, in combination with some str slicing, to
2202
- // simulate the 'y' flag.
2203
- reCopy = new RegExp('^(?:' + source + ')', flags);
2204
- }
2205
-
2206
- if (NPCG_INCLUDED) {
2207
- reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
2208
- }
2209
- if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
2210
-
2211
- match = call$5(nativeExec, sticky ? reCopy : re, strCopy);
2212
-
2213
- if (sticky) {
2214
- if (match) {
2215
- match.input = stringSlice$4(match.input, charsAdded);
2216
- match[0] = stringSlice$4(match[0], charsAdded);
2217
- match.index = re.lastIndex;
2218
- re.lastIndex += match[0].length;
2219
- } else re.lastIndex = 0;
2220
- } else if (UPDATES_LAST_INDEX_WRONG && match) {
2221
- re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
2222
- }
2223
- if (NPCG_INCLUDED && match && match.length > 1) {
2224
- // Fix browsers whose `exec` methods don't consistently return `undefined`
2225
- // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
2226
- call$5(nativeReplace, match[0], reCopy, function () {
2227
- for (i = 1; i < arguments.length - 2; i++) {
2228
- if (arguments[i] === undefined) match[i] = undefined;
2229
- }
2230
- });
2231
- }
2232
-
2233
- if (match && groups) {
2234
- match.groups = object = create(null);
2235
- for (i = 0; i < groups.length; i++) {
2236
- group = groups[i];
2237
- object[group[0]] = match[group[1]];
2238
- }
2239
- }
2240
-
2241
- return match;
2242
- };
2243
- }
2244
-
2245
- var regexpExec$2 = patchedExec;
2246
-
2247
- var $$3 = _export;
2248
- var exec = regexpExec$2;
2249
-
2250
- // `RegExp.prototype.exec` method
2251
- // https://tc39.es/ecma262/#sec-regexp.prototype.exec
2252
- $$3({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
2253
- exec: exec
2254
- });
2255
-
2256
- var NATIVE_BIND = functionBindNative;
2257
-
2258
- var FunctionPrototype = Function.prototype;
2259
- var apply$1 = FunctionPrototype.apply;
2260
- var call$4 = FunctionPrototype.call;
2261
-
2262
- // eslint-disable-next-line es/no-reflect -- safe
2263
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$4.bind(apply$1) : function () {
2264
- return call$4.apply(apply$1, arguments);
2265
- });
2266
-
2267
- // TODO: Remove from `core-js@4` since it's moved to entry points
2268
-
2269
- var call$3 = functionCall;
2270
- var defineBuiltIn = defineBuiltIn$5;
2271
- var regexpExec$1 = regexpExec$2;
2272
- var fails$2 = fails$i;
2273
- var wellKnownSymbol$1 = wellKnownSymbol$c;
2274
- var createNonEnumerableProperty = createNonEnumerableProperty$5;
2275
-
2276
- var SPECIES = wellKnownSymbol$1('species');
2277
- var RegExpPrototype = RegExp.prototype;
2278
-
2279
- var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2280
- var SYMBOL = wellKnownSymbol$1(KEY);
2281
-
2282
- var DELEGATES_TO_SYMBOL = !fails$2(function () {
2283
- // String methods call symbol-named RegExp methods
2284
- var O = {};
2285
- O[SYMBOL] = function () { return 7; };
2286
- return ''[KEY](O) !== 7;
2287
- });
2288
-
2289
- var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$2(function () {
2290
- // Symbol-named RegExp methods call .exec
2291
- var execCalled = false;
2292
- var re = /a/;
2293
-
2294
- if (KEY === 'split') {
2295
- // We can't use real regex here since it causes deoptimization
2296
- // and serious performance degradation in V8
2297
- // https://github.com/zloirock/core-js/issues/306
2298
- re = {};
2299
- // RegExp[@@split] doesn't call the regex's exec method, but first creates
2300
- // a new one. We need to return the patched regex when creating the new one.
2301
- re.constructor = {};
2302
- re.constructor[SPECIES] = function () { return re; };
2303
- re.flags = '';
2304
- re[SYMBOL] = /./[SYMBOL];
2305
- }
2306
-
2307
- re.exec = function () {
2308
- execCalled = true;
2309
- return null;
2310
- };
2311
-
2312
- re[SYMBOL]('');
2313
- return !execCalled;
2314
- });
2315
-
2316
- if (
2317
- !DELEGATES_TO_SYMBOL ||
2318
- !DELEGATES_TO_EXEC ||
2319
- FORCED
2320
- ) {
2321
- var nativeRegExpMethod = /./[SYMBOL];
2322
- var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
2323
- var $exec = regexp.exec;
2324
- if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
2325
- if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
2326
- // The native String method already delegates to @@method (this
2327
- // polyfilled function), leasing to infinite recursion.
2328
- // We avoid it by directly calling the native @@method method.
2329
- return { done: true, value: call$3(nativeRegExpMethod, regexp, str, arg2) };
2330
- }
2331
- return { done: true, value: call$3(nativeMethod, str, regexp, arg2) };
2332
- }
2333
- return { done: false };
2334
- });
2335
-
2336
- defineBuiltIn(String.prototype, KEY, methods[0]);
2337
- defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
2338
- }
2339
-
2340
- if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
2341
- };
2342
-
2343
- var uncurryThis$4 = functionUncurryThis;
2344
- var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
2345
- var toString$3 = toString$6;
2346
- var requireObjectCoercible$2 = requireObjectCoercible$7;
2347
-
2348
- var charAt$2 = uncurryThis$4(''.charAt);
2349
- var charCodeAt = uncurryThis$4(''.charCodeAt);
2350
- var stringSlice$3 = uncurryThis$4(''.slice);
2351
-
2352
- var createMethod = function (CONVERT_TO_STRING) {
2353
- return function ($this, pos) {
2354
- var S = toString$3(requireObjectCoercible$2($this));
2355
- var position = toIntegerOrInfinity$1(pos);
2356
- var size = S.length;
2357
- var first, second;
2358
- if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
2359
- first = charCodeAt(S, position);
2360
- return first < 0xD800 || first > 0xDBFF || position + 1 === size
2361
- || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
2362
- ? CONVERT_TO_STRING
2363
- ? charAt$2(S, position)
2364
- : first
2365
- : CONVERT_TO_STRING
2366
- ? stringSlice$3(S, position, position + 2)
2367
- : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
2368
- };
2368
+ }
2369
+ return jsx("div", {
2370
+ id: "virtual_keyboard",
2371
+ ref: keyboardContainerRef,
2372
+ onMouseDown: handleKeyboardContainerEvents,
2373
+ onTouchStart: handleKeyboardContainerEvents,
2374
+ children: jsx(Keyboard, {
2375
+ keyboardRef: ref => {
2376
+ virtualKeyboardRef.current = ref;
2377
+ },
2378
+ onInit: keyboard => {
2379
+ if (keyboard === undefined) {
2380
+ console.error("The virtual keyboard is open, but not available. This is not supposed to happen.");
2381
+ return;
2382
+ }
2383
+ if (focusedTextInput === undefined) {
2384
+ console.error("The virtual keyboard is open, but there's no focusedTextInput. This is not supposed to happen.");
2385
+ return;
2386
+ }
2387
+ const textWasSelectedBeforeInit = isTextSelected(focusedTextInput);
2388
+ keyboard.setCaretPosition(focusedTextInput.selectionStart);
2389
+ keyboard.setInput(focusedTextInput.value);
2390
+ if (textWasSelectedBeforeInit !== undefined && textWasSelectedBeforeInit) {
2391
+ focusedTextInput.select();
2392
+ }
2393
+ keyboard.setCaretPosition(focusedTextInput.selectionStart);
2394
+ keyboard.setInput(focusedTextInput.value);
2395
+ },
2396
+ onChange: handleInput,
2397
+ onKeyPress: handleKeyPress,
2398
+ layout: keyboardLayout,
2399
+ layoutName: keyboardLayoutName,
2400
+ preventMouseDownDefault: true,
2401
+ stopMouseDownPropagation: true,
2402
+ display: KeyboardDisplay,
2403
+ newLineOnEnter: true
2404
+ })
2405
+ });
2369
2406
  };
2407
+ /**
2408
+ * Sets the input value in a way that can be picked up by React if the element is managed by React.
2409
+ *
2410
+ * I don't understand any of this, but other people do
2411
+ * - https://stackoverflow.com/questions/42550341/react-trigger-onchange-if-input-value-is-changing-by-state/59939017#59939017
2412
+ */
2413
+ function setInputValue(inputElement, inputValue, caretPosition) {
2414
+ var _a, _b;
2415
+ const valueSetter = (_a = Object.getOwnPropertyDescriptor(inputElement, "value")) === null || _a === void 0 ? void 0 : _a.set;
2416
+ const inputPrototype = Object.getPrototypeOf(inputElement);
2417
+ const prototypeValueSetter = (_b = Object.getOwnPropertyDescriptor(inputPrototype, "value")) === null || _b === void 0 ? void 0 : _b.set;
2418
+ if (valueSetter !== undefined && prototypeValueSetter !== undefined && valueSetter !== prototypeValueSetter) {
2419
+ prototypeValueSetter.call(inputElement, inputValue);
2420
+ } else if (valueSetter !== undefined) {
2421
+ valueSetter.call(inputElement, inputValue);
2422
+ } else {
2423
+ // Not managed by React, set it the normal way
2424
+ inputElement.value = inputValue;
2425
+ }
2426
+ // The input caret position doesn't stay in sync after setting the value programmatically, so we set it
2427
+ inputElement.setSelectionRange(caretPosition, caretPosition);
2428
+ inputElement.dispatchEvent(new Event("input")); // Some jQuery handlers use on("input", handler)
2429
+ inputElement.dispatchEvent(new Event("input", {
2430
+ bubbles: true
2431
+ })); // Used by React onChange handlers
2432
+ }
2433
+ function toggleLayout(keyboardLayoutName) {
2434
+ return keyboardLayoutName === KeyboardLayoutName.DEFAULT ? KeyboardLayoutName.SHIFT : KeyboardLayoutName.DEFAULT;
2435
+ }
2436
+ function isTextSelected(inputElement) {
2437
+ if (typeof inputElement.selectionStart == "number") {
2438
+ return inputElement.selectionStart === 0 && inputElement.selectionEnd === inputElement.value.length;
2439
+ } else if (typeof window.getSelection != "undefined") {
2440
+ const selection = window.getSelection();
2441
+ return (selection === null || selection === void 0 ? void 0 : selection.toString()) === inputElement.value;
2442
+ }
2443
+ }
2370
2444
 
2371
- var stringMultibyte = {
2372
- // `String.prototype.codePointAt` method
2373
- // https://tc39.es/ecma262/#sec-string.prototype.codepointat
2374
- codeAt: createMethod(false),
2375
- // `String.prototype.at` method
2376
- // https://github.com/mathiasbynens/String.prototype.at
2377
- charAt: createMethod(true)
2378
- };
2445
+ var NATIVE_BIND = functionBindNative;
2379
2446
 
2380
- var charAt$1 = stringMultibyte.charAt;
2447
+ var FunctionPrototype = Function.prototype;
2448
+ var apply$1 = FunctionPrototype.apply;
2449
+ var call$5 = FunctionPrototype.call;
2381
2450
 
2382
- // `AdvanceStringIndex` abstract operation
2383
- // https://tc39.es/ecma262/#sec-advancestringindex
2384
- var advanceStringIndex$1 = function (S, index, unicode) {
2385
- return index + (unicode ? charAt$1(S, index).length : 1);
2386
- };
2451
+ // eslint-disable-next-line es/no-reflect -- safe
2452
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$5.bind(apply$1) : function () {
2453
+ return call$5.apply(apply$1, arguments);
2454
+ });
2387
2455
 
2388
- var uncurryThis$3 = functionUncurryThis;
2456
+ var uncurryThis$5 = functionUncurryThis;
2389
2457
  var toObject$1 = toObject$4;
2390
2458
 
2391
2459
  var floor = Math.floor;
2392
- var charAt = uncurryThis$3(''.charAt);
2393
- var replace = uncurryThis$3(''.replace);
2394
- var stringSlice$2 = uncurryThis$3(''.slice);
2460
+ var charAt = uncurryThis$5(''.charAt);
2461
+ var replace = uncurryThis$5(''.replace);
2462
+ var stringSlice$2 = uncurryThis$5(''.slice);
2395
2463
  // eslint-disable-next-line redos/no-vulnerable -- safe
2396
2464
  var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
2397
2465
  var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
@@ -2431,52 +2499,31 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
2431
2499
  });
2432
2500
  };
2433
2501
 
2434
- var call$2 = functionCall;
2435
- var anObject$2 = anObject$9;
2436
- var isCallable$2 = isCallable$h;
2437
- var classof$1 = classofRaw$2;
2438
- var regexpExec = regexpExec$2;
2439
-
2440
- var $TypeError$2 = TypeError;
2441
-
2442
- // `RegExpExec` abstract operation
2443
- // https://tc39.es/ecma262/#sec-regexpexec
2444
- var regexpExecAbstract = function (R, S) {
2445
- var exec = R.exec;
2446
- if (isCallable$2(exec)) {
2447
- var result = call$2(exec, R, S);
2448
- if (result !== null) anObject$2(result);
2449
- return result;
2450
- }
2451
- if (classof$1(R) === 'RegExp') return call$2(regexpExec, R, S);
2452
- throw new $TypeError$2('RegExp#exec called on incompatible receiver');
2453
- };
2454
-
2455
2502
  var apply = functionApply;
2456
- var call$1 = functionCall;
2457
- var uncurryThis$2 = functionUncurryThis;
2503
+ var call$4 = functionCall;
2504
+ var uncurryThis$4 = functionUncurryThis;
2458
2505
  var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
2459
- var fails$1 = fails$i;
2460
- var anObject$1 = anObject$9;
2506
+ var fails$2 = fails$j;
2507
+ var anObject$3 = anObject$c;
2461
2508
  var isCallable$1 = isCallable$h;
2462
- var isNullOrUndefined = isNullOrUndefined$3;
2463
- var toIntegerOrInfinity = toIntegerOrInfinity$4;
2464
- var toLength$1 = toLength$3;
2465
- var toString$2 = toString$6;
2466
- var requireObjectCoercible$1 = requireObjectCoercible$7;
2467
- var advanceStringIndex = advanceStringIndex$1;
2468
- var getMethod = getMethod$2;
2509
+ var isNullOrUndefined = isNullOrUndefined$4;
2510
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$5;
2511
+ var toLength$1 = toLength$4;
2512
+ var toString$2 = toString$7;
2513
+ var requireObjectCoercible$1 = requireObjectCoercible$8;
2514
+ var advanceStringIndex = advanceStringIndex$2;
2515
+ var getMethod$1 = getMethod$4;
2469
2516
  var getSubstitution = getSubstitution$1;
2470
2517
  var regExpExec = regexpExecAbstract;
2471
2518
  var wellKnownSymbol = wellKnownSymbol$c;
2472
2519
 
2473
2520
  var REPLACE = wellKnownSymbol('replace');
2474
- var max = Math.max;
2521
+ var max$1 = Math.max;
2475
2522
  var min$1 = Math.min;
2476
- var concat = uncurryThis$2([].concat);
2477
- var push = uncurryThis$2([].push);
2478
- var stringIndexOf = uncurryThis$2(''.indexOf);
2479
- var stringSlice$1 = uncurryThis$2(''.slice);
2523
+ var concat = uncurryThis$4([].concat);
2524
+ var push = uncurryThis$4([].push);
2525
+ var stringIndexOf = uncurryThis$4(''.indexOf);
2526
+ var stringSlice$1 = uncurryThis$4(''.slice);
2480
2527
 
2481
2528
  var maybeToString = function (it) {
2482
2529
  return it === undefined ? it : String(it);
@@ -2497,7 +2544,7 @@ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
2497
2544
  return false;
2498
2545
  })();
2499
2546
 
2500
- var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$1(function () {
2547
+ var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$2(function () {
2501
2548
  var re = /./;
2502
2549
  re.exec = function () {
2503
2550
  var result = [];
@@ -2517,15 +2564,15 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2517
2564
  // https://tc39.es/ecma262/#sec-string.prototype.replace
2518
2565
  function replace(searchValue, replaceValue) {
2519
2566
  var O = requireObjectCoercible$1(this);
2520
- var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
2567
+ var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod$1(searchValue, REPLACE);
2521
2568
  return replacer
2522
- ? call$1(replacer, searchValue, O, replaceValue)
2523
- : call$1(nativeReplace, toString$2(O), searchValue, replaceValue);
2569
+ ? call$4(replacer, searchValue, O, replaceValue)
2570
+ : call$4(nativeReplace, toString$2(O), searchValue, replaceValue);
2524
2571
  },
2525
2572
  // `RegExp.prototype[@@replace]` method
2526
2573
  // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
2527
2574
  function (string, replaceValue) {
2528
- var rx = anObject$1(this);
2575
+ var rx = anObject$3(this);
2529
2576
  var S = toString$2(string);
2530
2577
 
2531
2578
  if (
@@ -2566,7 +2613,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2566
2613
  result = results[i];
2567
2614
 
2568
2615
  var matched = toString$2(result[0]);
2569
- var position = max(min$1(toIntegerOrInfinity(result.index), S.length), 0);
2616
+ var position = max$1(min$1(toIntegerOrInfinity$1(result.index), S.length), 0);
2570
2617
  var captures = [];
2571
2618
  var replacement;
2572
2619
  // NOTE: This is equivalent to
@@ -2595,25 +2642,25 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2595
2642
  }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
2596
2643
 
2597
2644
  var classofRaw = classofRaw$2;
2598
- var uncurryThis$1 = functionUncurryThis;
2645
+ var uncurryThis$3 = functionUncurryThis;
2599
2646
 
2600
2647
  var functionUncurryThisClause = function (fn) {
2601
2648
  // Nashorn bug:
2602
2649
  // https://github.com/zloirock/core-js/issues/1128
2603
2650
  // https://github.com/zloirock/core-js/issues/1130
2604
- if (classofRaw(fn) === 'Function') return uncurryThis$1(fn);
2651
+ if (classofRaw(fn) === 'Function') return uncurryThis$3(fn);
2605
2652
  };
2606
2653
 
2607
- var $$2 = _export;
2608
- var uncurryThis = functionUncurryThisClause;
2654
+ var $$9 = _export;
2655
+ var uncurryThis$2 = functionUncurryThisClause;
2609
2656
  var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
2610
- var toLength = toLength$3;
2611
- var toString$1 = toString$6;
2657
+ var toLength = toLength$4;
2658
+ var toString$1 = toString$7;
2612
2659
  var notARegExp = notARegexp;
2613
- var requireObjectCoercible = requireObjectCoercible$7;
2660
+ var requireObjectCoercible = requireObjectCoercible$8;
2614
2661
  var correctIsRegExpLogic = correctIsRegexpLogic;
2615
2662
 
2616
- var stringSlice = uncurryThis(''.slice);
2663
+ var stringSlice = uncurryThis$2(''.slice);
2617
2664
  var min = Math.min;
2618
2665
 
2619
2666
  var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
@@ -2625,7 +2672,7 @@ var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
2625
2672
 
2626
2673
  // `String.prototype.startsWith` method
2627
2674
  // https://tc39.es/ecma262/#sec-string.prototype.startswith
2628
- $$2({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
2675
+ $$9({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
2629
2676
  startsWith: function startsWith(searchString /* , position = 0 */) {
2630
2677
  var that = toString$1(requireObjectCoercible(this));
2631
2678
  notARegExp(searchString);
@@ -2679,7 +2726,7 @@ var isArray$1 = Array.isArray || function isArray(argument) {
2679
2726
  var DESCRIPTORS = descriptors;
2680
2727
  var isArray = isArray$1;
2681
2728
 
2682
- var $TypeError$1 = TypeError;
2729
+ var $TypeError$2 = TypeError;
2683
2730
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
2684
2731
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
2685
2732
 
@@ -2697,28 +2744,28 @@ var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () {
2697
2744
 
2698
2745
  var arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
2699
2746
  if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
2700
- throw new $TypeError$1('Cannot set read only .length');
2747
+ throw new $TypeError$2('Cannot set read only .length');
2701
2748
  } return O.length = length;
2702
2749
  } : function (O, length) {
2703
2750
  return O.length = length;
2704
2751
  };
2705
2752
 
2706
- var $TypeError = TypeError;
2753
+ var $TypeError$1 = TypeError;
2707
2754
  var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
2708
2755
 
2709
2756
  var doesNotExceedSafeInteger$1 = function (it) {
2710
- if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');
2757
+ if (it > MAX_SAFE_INTEGER) throw $TypeError$1('Maximum allowed index exceeded');
2711
2758
  return it;
2712
2759
  };
2713
2760
 
2714
- var $$1 = _export;
2761
+ var $$8 = _export;
2715
2762
  var toObject = toObject$4;
2716
2763
  var lengthOfArrayLike = lengthOfArrayLike$2;
2717
2764
  var setArrayLength = arraySetLength;
2718
2765
  var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
2719
- var fails = fails$i;
2766
+ var fails$1 = fails$j;
2720
2767
 
2721
- var INCORRECT_TO_LENGTH = fails(function () {
2768
+ var INCORRECT_TO_LENGTH = fails$1(function () {
2722
2769
  return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;
2723
2770
  });
2724
2771
 
@@ -2737,7 +2784,7 @@ var FORCED = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
2737
2784
 
2738
2785
  // `Array.prototype.push` method
2739
2786
  // https://tc39.es/ecma262/#sec-array.prototype.push
2740
- $$1({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
2787
+ $$8({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
2741
2788
  // eslint-disable-next-line no-unused-vars -- required for `.length`
2742
2789
  push: function push(item) {
2743
2790
  var O = toObject(this);
@@ -2755,11 +2802,11 @@ $$1({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
2755
2802
 
2756
2803
  // TODO: Remove from `core-js@4` since it's moved to entry points
2757
2804
 
2758
- var $ = _export;
2759
- var call = functionCall;
2805
+ var $$7 = _export;
2806
+ var call$3 = functionCall;
2760
2807
  var isCallable = isCallable$h;
2761
- var anObject = anObject$9;
2762
- var toString = toString$6;
2808
+ var anObject$2 = anObject$c;
2809
+ var toString = toString$7;
2763
2810
 
2764
2811
  var DELEGATES_TO_EXEC = function () {
2765
2812
  var execCalled = false;
@@ -2775,15 +2822,15 @@ var nativeTest = /./.test;
2775
2822
 
2776
2823
  // `RegExp.prototype.test` method
2777
2824
  // https://tc39.es/ecma262/#sec-regexp.prototype.test
2778
- $({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
2825
+ $$7({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
2779
2826
  test: function (S) {
2780
- var R = anObject(this);
2827
+ var R = anObject$2(this);
2781
2828
  var string = toString(S);
2782
2829
  var exec = R.exec;
2783
- if (!isCallable(exec)) return call(nativeTest, R, string);
2784
- var result = call(exec, R, string);
2830
+ if (!isCallable(exec)) return call$3(nativeTest, R, string);
2831
+ var result = call$3(exec, R, string);
2785
2832
  if (result === null) return false;
2786
- anObject(result);
2833
+ anObject$2(result);
2787
2834
  return true;
2788
2835
  }
2789
2836
  });
@@ -2902,9 +2949,423 @@ const navigateControlCenter = route => {
2902
2949
  window.parent.postMessage(`navigateTo${capitalizedRoute}`, "*");
2903
2950
  };
2904
2951
 
2952
+ var uncurryThis$1 = functionUncurryThis;
2953
+
2954
+ // eslint-disable-next-line es/no-set -- safe
2955
+ var SetPrototype$1 = Set.prototype;
2956
+
2957
+ var setHelpers = {
2958
+ // eslint-disable-next-line es/no-set -- safe
2959
+ Set: Set,
2960
+ add: uncurryThis$1(SetPrototype$1.add),
2961
+ has: uncurryThis$1(SetPrototype$1.has),
2962
+ remove: uncurryThis$1(SetPrototype$1['delete']),
2963
+ proto: SetPrototype$1
2964
+ };
2965
+
2966
+ var has$5 = setHelpers.has;
2967
+
2968
+ // Perform ? RequireInternalSlot(M, [[SetData]])
2969
+ var aSet$7 = function (it) {
2970
+ has$5(it);
2971
+ return it;
2972
+ };
2973
+
2974
+ var call$2 = functionCall;
2975
+
2976
+ var iterateSimple$7 = function (record, fn, ITERATOR_INSTEAD_OF_RECORD) {
2977
+ var iterator = ITERATOR_INSTEAD_OF_RECORD ? record : record.iterator;
2978
+ var next = record.next;
2979
+ var step, result;
2980
+ while (!(step = call$2(next, iterator)).done) {
2981
+ result = fn(step.value);
2982
+ if (result !== undefined) return result;
2983
+ }
2984
+ };
2985
+
2986
+ var uncurryThis = functionUncurryThis;
2987
+ var iterateSimple$6 = iterateSimple$7;
2988
+ var SetHelpers$5 = setHelpers;
2989
+
2990
+ var Set$3 = SetHelpers$5.Set;
2991
+ var SetPrototype = SetHelpers$5.proto;
2992
+ var forEach = uncurryThis(SetPrototype.forEach);
2993
+ var keys = uncurryThis(SetPrototype.keys);
2994
+ var next = keys(new Set$3()).next;
2995
+
2996
+ var setIterate = function (set, fn, interruptible) {
2997
+ return interruptible ? iterateSimple$6({ iterator: keys(set), next: next }, fn) : forEach(set, fn);
2998
+ };
2999
+
3000
+ var SetHelpers$4 = setHelpers;
3001
+ var iterate$1 = setIterate;
3002
+
3003
+ var Set$2 = SetHelpers$4.Set;
3004
+ var add$3 = SetHelpers$4.add;
3005
+
3006
+ var setClone = function (set) {
3007
+ var result = new Set$2();
3008
+ iterate$1(set, function (it) {
3009
+ add$3(result, it);
3010
+ });
3011
+ return result;
3012
+ };
3013
+
3014
+ var uncurryThisAccessor = functionUncurryThisAccessor;
3015
+ var SetHelpers$3 = setHelpers;
3016
+
3017
+ var setSize = uncurryThisAccessor(SetHelpers$3.proto, 'size', 'get') || function (set) {
3018
+ return set.size;
3019
+ };
3020
+
3021
+ // `GetIteratorDirect(obj)` abstract operation
3022
+ // https://tc39.es/proposal-iterator-helpers/#sec-getiteratordirect
3023
+ var getIteratorDirect$1 = function (obj) {
3024
+ return {
3025
+ iterator: obj,
3026
+ next: obj.next,
3027
+ done: false
3028
+ };
3029
+ };
3030
+
3031
+ var aCallable = aCallable$3;
3032
+ var anObject$1 = anObject$c;
3033
+ var call$1 = functionCall;
3034
+ var toIntegerOrInfinity = toIntegerOrInfinity$5;
3035
+ var getIteratorDirect = getIteratorDirect$1;
3036
+
3037
+ var INVALID_SIZE = 'Invalid size';
3038
+ var $RangeError = RangeError;
3039
+ var $TypeError = TypeError;
3040
+ var max = Math.max;
3041
+
3042
+ var SetRecord = function (set, intSize) {
3043
+ this.set = set;
3044
+ this.size = max(intSize, 0);
3045
+ this.has = aCallable(set.has);
3046
+ this.keys = aCallable(set.keys);
3047
+ };
3048
+
3049
+ SetRecord.prototype = {
3050
+ getIterator: function () {
3051
+ return getIteratorDirect(anObject$1(call$1(this.keys, this.set)));
3052
+ },
3053
+ includes: function (it) {
3054
+ return call$1(this.has, this.set, it);
3055
+ }
3056
+ };
3057
+
3058
+ // `GetSetRecord` abstract operation
3059
+ // https://tc39.es/proposal-set-methods/#sec-getsetrecord
3060
+ var getSetRecord$7 = function (obj) {
3061
+ anObject$1(obj);
3062
+ var numSize = +obj.size;
3063
+ // NOTE: If size is undefined, then numSize will be NaN
3064
+ // eslint-disable-next-line no-self-compare -- NaN check
3065
+ if (numSize !== numSize) throw new $TypeError(INVALID_SIZE);
3066
+ var intSize = toIntegerOrInfinity(numSize);
3067
+ if (intSize < 0) throw new $RangeError(INVALID_SIZE);
3068
+ return new SetRecord(obj, intSize);
3069
+ };
3070
+
3071
+ var aSet$6 = aSet$7;
3072
+ var SetHelpers$2 = setHelpers;
3073
+ var clone$2 = setClone;
3074
+ var size$4 = setSize;
3075
+ var getSetRecord$6 = getSetRecord$7;
3076
+ var iterateSet$2 = setIterate;
3077
+ var iterateSimple$5 = iterateSimple$7;
3078
+
3079
+ var has$4 = SetHelpers$2.has;
3080
+ var remove$1 = SetHelpers$2.remove;
3081
+
3082
+ // `Set.prototype.difference` method
3083
+ // https://github.com/tc39/proposal-set-methods
3084
+ var setDifference = function difference(other) {
3085
+ var O = aSet$6(this);
3086
+ var otherRec = getSetRecord$6(other);
3087
+ var result = clone$2(O);
3088
+ if (size$4(O) <= otherRec.size) iterateSet$2(O, function (e) {
3089
+ if (otherRec.includes(e)) remove$1(result, e);
3090
+ });
3091
+ else iterateSimple$5(otherRec.getIterator(), function (e) {
3092
+ if (has$4(O, e)) remove$1(result, e);
3093
+ });
3094
+ return result;
3095
+ };
3096
+
3097
+ var getBuiltIn = getBuiltIn$4;
3098
+
3099
+ var createSetLike = function (size) {
3100
+ return {
3101
+ size: size,
3102
+ has: function () {
3103
+ return false;
3104
+ },
3105
+ keys: function () {
3106
+ return {
3107
+ next: function () {
3108
+ return { done: true };
3109
+ }
3110
+ };
3111
+ }
3112
+ };
3113
+ };
3114
+
3115
+ var setMethodAcceptSetLike$7 = function (name) {
3116
+ var Set = getBuiltIn('Set');
3117
+ try {
3118
+ new Set()[name](createSetLike(0));
3119
+ try {
3120
+ // late spec change, early WebKit ~ Safari 17.0 beta implementation does not pass it
3121
+ // https://github.com/tc39/proposal-set-methods/pull/88
3122
+ new Set()[name](createSetLike(-1));
3123
+ return false;
3124
+ } catch (error2) {
3125
+ return true;
3126
+ }
3127
+ } catch (error) {
3128
+ return false;
3129
+ }
3130
+ };
3131
+
3132
+ var $$6 = _export;
3133
+ var difference = setDifference;
3134
+ var setMethodAcceptSetLike$6 = setMethodAcceptSetLike$7;
3135
+
3136
+ // `Set.prototype.difference` method
3137
+ // https://github.com/tc39/proposal-set-methods
3138
+ $$6({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$6('difference') }, {
3139
+ difference: difference
3140
+ });
3141
+
3142
+ var aSet$5 = aSet$7;
3143
+ var SetHelpers$1 = setHelpers;
3144
+ var size$3 = setSize;
3145
+ var getSetRecord$5 = getSetRecord$7;
3146
+ var iterateSet$1 = setIterate;
3147
+ var iterateSimple$4 = iterateSimple$7;
3148
+
3149
+ var Set$1 = SetHelpers$1.Set;
3150
+ var add$2 = SetHelpers$1.add;
3151
+ var has$3 = SetHelpers$1.has;
3152
+
3153
+ // `Set.prototype.intersection` method
3154
+ // https://github.com/tc39/proposal-set-methods
3155
+ var setIntersection = function intersection(other) {
3156
+ var O = aSet$5(this);
3157
+ var otherRec = getSetRecord$5(other);
3158
+ var result = new Set$1();
3159
+
3160
+ if (size$3(O) > otherRec.size) {
3161
+ iterateSimple$4(otherRec.getIterator(), function (e) {
3162
+ if (has$3(O, e)) add$2(result, e);
3163
+ });
3164
+ } else {
3165
+ iterateSet$1(O, function (e) {
3166
+ if (otherRec.includes(e)) add$2(result, e);
3167
+ });
3168
+ }
3169
+
3170
+ return result;
3171
+ };
3172
+
3173
+ var $$5 = _export;
3174
+ var fails = fails$j;
3175
+ var intersection = setIntersection;
3176
+ var setMethodAcceptSetLike$5 = setMethodAcceptSetLike$7;
3177
+
3178
+ var INCORRECT = !setMethodAcceptSetLike$5('intersection') || fails(function () {
3179
+ // eslint-disable-next-line es/no-array-from, es/no-set -- testing
3180
+ return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2';
3181
+ });
3182
+
3183
+ // `Set.prototype.intersection` method
3184
+ // https://github.com/tc39/proposal-set-methods
3185
+ $$5({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
3186
+ intersection: intersection
3187
+ });
3188
+
3189
+ var call = functionCall;
3190
+ var anObject = anObject$c;
3191
+ var getMethod = getMethod$4;
3192
+
3193
+ var iteratorClose$2 = function (iterator, kind, value) {
3194
+ var innerResult, innerError;
3195
+ anObject(iterator);
3196
+ try {
3197
+ innerResult = getMethod(iterator, 'return');
3198
+ if (!innerResult) {
3199
+ if (kind === 'throw') throw value;
3200
+ return value;
3201
+ }
3202
+ innerResult = call(innerResult, iterator);
3203
+ } catch (error) {
3204
+ innerError = true;
3205
+ innerResult = error;
3206
+ }
3207
+ if (kind === 'throw') throw value;
3208
+ if (innerError) throw innerResult;
3209
+ anObject(innerResult);
3210
+ return value;
3211
+ };
3212
+
3213
+ var aSet$4 = aSet$7;
3214
+ var has$2 = setHelpers.has;
3215
+ var size$2 = setSize;
3216
+ var getSetRecord$4 = getSetRecord$7;
3217
+ var iterateSet = setIterate;
3218
+ var iterateSimple$3 = iterateSimple$7;
3219
+ var iteratorClose$1 = iteratorClose$2;
3220
+
3221
+ // `Set.prototype.isDisjointFrom` method
3222
+ // https://tc39.github.io/proposal-set-methods/#Set.prototype.isDisjointFrom
3223
+ var setIsDisjointFrom = function isDisjointFrom(other) {
3224
+ var O = aSet$4(this);
3225
+ var otherRec = getSetRecord$4(other);
3226
+ if (size$2(O) <= otherRec.size) return iterateSet(O, function (e) {
3227
+ if (otherRec.includes(e)) return false;
3228
+ }, true) !== false;
3229
+ var iterator = otherRec.getIterator();
3230
+ return iterateSimple$3(iterator, function (e) {
3231
+ if (has$2(O, e)) return iteratorClose$1(iterator, 'normal', false);
3232
+ }) !== false;
3233
+ };
3234
+
3235
+ var $$4 = _export;
3236
+ var isDisjointFrom = setIsDisjointFrom;
3237
+ var setMethodAcceptSetLike$4 = setMethodAcceptSetLike$7;
3238
+
3239
+ // `Set.prototype.isDisjointFrom` method
3240
+ // https://github.com/tc39/proposal-set-methods
3241
+ $$4({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$4('isDisjointFrom') }, {
3242
+ isDisjointFrom: isDisjointFrom
3243
+ });
3244
+
3245
+ var aSet$3 = aSet$7;
3246
+ var size$1 = setSize;
3247
+ var iterate = setIterate;
3248
+ var getSetRecord$3 = getSetRecord$7;
3249
+
3250
+ // `Set.prototype.isSubsetOf` method
3251
+ // https://tc39.github.io/proposal-set-methods/#Set.prototype.isSubsetOf
3252
+ var setIsSubsetOf = function isSubsetOf(other) {
3253
+ var O = aSet$3(this);
3254
+ var otherRec = getSetRecord$3(other);
3255
+ if (size$1(O) > otherRec.size) return false;
3256
+ return iterate(O, function (e) {
3257
+ if (!otherRec.includes(e)) return false;
3258
+ }, true) !== false;
3259
+ };
3260
+
3261
+ var $$3 = _export;
3262
+ var isSubsetOf = setIsSubsetOf;
3263
+ var setMethodAcceptSetLike$3 = setMethodAcceptSetLike$7;
3264
+
3265
+ // `Set.prototype.isSubsetOf` method
3266
+ // https://github.com/tc39/proposal-set-methods
3267
+ $$3({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$3('isSubsetOf') }, {
3268
+ isSubsetOf: isSubsetOf
3269
+ });
3270
+
3271
+ var aSet$2 = aSet$7;
3272
+ var has$1 = setHelpers.has;
3273
+ var size = setSize;
3274
+ var getSetRecord$2 = getSetRecord$7;
3275
+ var iterateSimple$2 = iterateSimple$7;
3276
+ var iteratorClose = iteratorClose$2;
3277
+
3278
+ // `Set.prototype.isSupersetOf` method
3279
+ // https://tc39.github.io/proposal-set-methods/#Set.prototype.isSupersetOf
3280
+ var setIsSupersetOf = function isSupersetOf(other) {
3281
+ var O = aSet$2(this);
3282
+ var otherRec = getSetRecord$2(other);
3283
+ if (size(O) < otherRec.size) return false;
3284
+ var iterator = otherRec.getIterator();
3285
+ return iterateSimple$2(iterator, function (e) {
3286
+ if (!has$1(O, e)) return iteratorClose(iterator, 'normal', false);
3287
+ }) !== false;
3288
+ };
3289
+
3290
+ var $$2 = _export;
3291
+ var isSupersetOf = setIsSupersetOf;
3292
+ var setMethodAcceptSetLike$2 = setMethodAcceptSetLike$7;
3293
+
3294
+ // `Set.prototype.isSupersetOf` method
3295
+ // https://github.com/tc39/proposal-set-methods
3296
+ $$2({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$2('isSupersetOf') }, {
3297
+ isSupersetOf: isSupersetOf
3298
+ });
3299
+
3300
+ var aSet$1 = aSet$7;
3301
+ var SetHelpers = setHelpers;
3302
+ var clone$1 = setClone;
3303
+ var getSetRecord$1 = getSetRecord$7;
3304
+ var iterateSimple$1 = iterateSimple$7;
3305
+
3306
+ var add$1 = SetHelpers.add;
3307
+ var has = SetHelpers.has;
3308
+ var remove = SetHelpers.remove;
3309
+
3310
+ // `Set.prototype.symmetricDifference` method
3311
+ // https://github.com/tc39/proposal-set-methods
3312
+ var setSymmetricDifference = function symmetricDifference(other) {
3313
+ var O = aSet$1(this);
3314
+ var keysIter = getSetRecord$1(other).getIterator();
3315
+ var result = clone$1(O);
3316
+ iterateSimple$1(keysIter, function (e) {
3317
+ if (has(O, e)) remove(result, e);
3318
+ else add$1(result, e);
3319
+ });
3320
+ return result;
3321
+ };
3322
+
3323
+ var $$1 = _export;
3324
+ var symmetricDifference = setSymmetricDifference;
3325
+ var setMethodAcceptSetLike$1 = setMethodAcceptSetLike$7;
3326
+
3327
+ // `Set.prototype.symmetricDifference` method
3328
+ // https://github.com/tc39/proposal-set-methods
3329
+ $$1({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$1('symmetricDifference') }, {
3330
+ symmetricDifference: symmetricDifference
3331
+ });
3332
+
3333
+ var aSet = aSet$7;
3334
+ var add = setHelpers.add;
3335
+ var clone = setClone;
3336
+ var getSetRecord = getSetRecord$7;
3337
+ var iterateSimple = iterateSimple$7;
3338
+
3339
+ // `Set.prototype.union` method
3340
+ // https://github.com/tc39/proposal-set-methods
3341
+ var setUnion = function union(other) {
3342
+ var O = aSet(this);
3343
+ var keysIter = getSetRecord(other).getIterator();
3344
+ var result = clone(O);
3345
+ iterateSimple(keysIter, function (it) {
3346
+ add(result, it);
3347
+ });
3348
+ return result;
3349
+ };
3350
+
3351
+ var $ = _export;
3352
+ var union = setUnion;
3353
+ var setMethodAcceptSetLike = setMethodAcceptSetLike$7;
3354
+
3355
+ // `Set.prototype.union` method
3356
+ // https://github.com/tc39/proposal-set-methods
3357
+ $({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('union') }, {
3358
+ union: union
3359
+ });
3360
+
2905
3361
  const defaultContext = {
2906
3362
  client: null,
2907
- connectionStatus: "disconnected"
3363
+ connectionStatus: "disconnected",
3364
+ subscribedTopics: null,
3365
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
3366
+ addSubscribedTopic: () => {},
3367
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
3368
+ removeSubscribedTopic: () => {}
2908
3369
  };
2909
3370
  const mqttContext = /*#__PURE__*/createContext(defaultContext);
2910
3371
  const defaultProps = {
@@ -2913,10 +3374,16 @@ const defaultProps = {
2913
3374
  const MqttProvider = props => {
2914
3375
  const [connectionStatus, setConnectionStatus] = useState("disconnected");
2915
3376
  const [mqttClient, setMqttClient] = useState(null);
3377
+ const subscribedTopics = useRef(new Set());
3378
+ const addSubscribedTopic = topic => subscribedTopics.current.add(topic);
3379
+ const removeSubscribedTopic = topic => subscribedTopics.current.delete(topic);
2916
3380
  const contextValue = useMemo(() => ({
2917
3381
  client: mqttClient,
2918
- connectionStatus
2919
- }), [mqttClient, connectionStatus]);
3382
+ connectionStatus,
3383
+ subscribedTopics,
3384
+ addSubscribedTopic,
3385
+ removeSubscribedTopic
3386
+ }), [mqttClient, connectionStatus, subscribedTopics]);
2920
3387
  useEffect(function mqttConnection() {
2921
3388
  function connectToMqtt() {
2922
3389
  return __awaiter(this, void 0, void 0, function* () {
@@ -2927,6 +3394,7 @@ const MqttProvider = props => {
2927
3394
  setConnectionStatus("connected");
2928
3395
  console.log("Connected to MQTT");
2929
3396
  setMqttClient(client);
3397
+ subscribedTopics.current = new Set();
2930
3398
  });
2931
3399
  client.on("error", error => {
2932
3400
  setConnectionStatus("error");
@@ -2939,6 +3407,8 @@ const MqttProvider = props => {
2939
3407
  setConnectionStatus("disconnected");
2940
3408
  });
2941
3409
  return function cleanup() {
3410
+ client.unsubscribe(Array.from(subscribedTopics.current));
3411
+ client.removeAllListeners();
2942
3412
  setMqttClient(null);
2943
3413
  setConnectionStatus("disconnected");
2944
3414
  client.end();
@@ -2946,7 +3416,7 @@ const MqttProvider = props => {
2946
3416
  });
2947
3417
  }
2948
3418
  connectToMqtt();
2949
- }, []);
3419
+ }, [props.version, subscribedTopics]);
2950
3420
  return jsx(mqttContext.Provider, {
2951
3421
  value: contextValue,
2952
3422
  children: props.children
@@ -2956,20 +3426,26 @@ const MqttProvider = props => {
2956
3426
  const useMqttSubscription = props => {
2957
3427
  const mqtt = useContext(mqttContext);
2958
3428
  const [message, setMessage] = useState();
2959
- useEffect(function test() {
2960
- var _a, _b;
3429
+ useEffect(function subscribeToTopics() {
3430
+ var _a, _b, _c;
2961
3431
  if (mqtt.connectionStatus !== "connected" || !mqtt.client) return;
2962
- (_a = mqtt.client) === null || _a === void 0 ? void 0 : _a.subscribe(props.topic);
2963
- // Using the on message is not optimal as for every subscription we will add a new listener
2964
- // For the sake of simplicity we will keep it like this
2965
- (_b = mqtt.client) === null || _b === void 0 ? void 0 : _b.on("message", (topic, message) => {
3432
+ const handleMessage = (topic, message) => {
2966
3433
  if (topic === props.topic) setMessage(JSON.parse(message.toString()));
2967
- });
3434
+ };
3435
+ if (!((_a = mqtt.subscribedTopics) === null || _a === void 0 ? void 0 : _a.current.has(props.topic))) {
3436
+ mqtt.addSubscribedTopic(props.topic);
3437
+ (_b = mqtt.client) === null || _b === void 0 ? void 0 : _b.subscribe(props.topic);
3438
+ }
3439
+ (_c = mqtt.client) === null || _c === void 0 ? void 0 : _c.on("message", handleMessage);
2968
3440
  return function cleanup() {
2969
- var _a;
2970
- (_a = mqtt.client) === null || _a === void 0 ? void 0 : _a.unsubscribe(props.topic);
3441
+ var _a, _b;
3442
+ (_a = mqtt.client) === null || _a === void 0 ? void 0 : _a.off("message", handleMessage);
3443
+ if (props.unsubscribeOnUnmount) {
3444
+ mqtt.removeSubscribedTopic(props.topic);
3445
+ (_b = mqtt.client) === null || _b === void 0 ? void 0 : _b.unsubscribe(props.topic);
3446
+ }
2971
3447
  };
2972
- }, [mqtt, props.topic]);
3448
+ }, [mqtt, props.topic, props.unsubscribeOnUnmount]);
2973
3449
  return message;
2974
3450
  };
2975
3451