@vention/machine-logic-ui-sdk 0.0.0-dev.4527.a3d343ca7

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 ADDED
@@ -0,0 +1,4180 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import require$$0, { useState, useRef, useEffect, createContext, useMemo, useContext } from 'react';
3
+ import { tss } from 'tss-react/mui';
4
+ import mqtt from 'mqtt';
5
+
6
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
7
+
8
+ function getDefaultExportFromCjs (x) {
9
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
10
+ }
11
+
12
+ var check = function (it) {
13
+ return it && it.Math === Math && it;
14
+ };
15
+
16
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
17
+ var globalThis_1 =
18
+ // eslint-disable-next-line es/no-global-this -- safe
19
+ check(typeof globalThis == 'object' && globalThis) ||
20
+ check(typeof window == 'object' && window) ||
21
+ // eslint-disable-next-line no-restricted-globals -- safe
22
+ check(typeof self == 'object' && self) ||
23
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
24
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
25
+ // eslint-disable-next-line no-new-func -- fallback
26
+ (function () { return this; })() || Function('return this')();
27
+
28
+ var objectGetOwnPropertyDescriptor = {};
29
+
30
+ var fails$l = function (exec) {
31
+ try {
32
+ return !!exec();
33
+ } catch (error) {
34
+ return true;
35
+ }
36
+ };
37
+
38
+ var fails$k = fails$l;
39
+
40
+ // Detect IE8's incomplete defineProperty implementation
41
+ var descriptors = !fails$k(function () {
42
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
43
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
44
+ });
45
+
46
+ var fails$j = fails$l;
47
+
48
+ var functionBindNative = !fails$j(function () {
49
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
50
+ var test = (function () { /* empty */ }).bind();
51
+ // eslint-disable-next-line no-prototype-builtins -- safe
52
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
53
+ });
54
+
55
+ var NATIVE_BIND$3 = functionBindNative;
56
+
57
+ var call$l = Function.prototype.call;
58
+
59
+ var functionCall = NATIVE_BIND$3 ? call$l.bind(call$l) : function () {
60
+ return call$l.apply(call$l, arguments);
61
+ };
62
+
63
+ var objectPropertyIsEnumerable = {};
64
+
65
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
66
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
67
+ var getOwnPropertyDescriptor$4 = Object.getOwnPropertyDescriptor;
68
+
69
+ // Nashorn ~ JDK8 bug
70
+ var NASHORN_BUG = getOwnPropertyDescriptor$4 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
71
+
72
+ // `Object.prototype.propertyIsEnumerable` method implementation
73
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
74
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
75
+ var descriptor = getOwnPropertyDescriptor$4(this, V);
76
+ return !!descriptor && descriptor.enumerable;
77
+ } : $propertyIsEnumerable;
78
+
79
+ var createPropertyDescriptor$4 = function (bitmap, value) {
80
+ return {
81
+ enumerable: !(bitmap & 1),
82
+ configurable: !(bitmap & 2),
83
+ writable: !(bitmap & 4),
84
+ value: value
85
+ };
86
+ };
87
+
88
+ var NATIVE_BIND$2 = functionBindNative;
89
+
90
+ var FunctionPrototype$2 = Function.prototype;
91
+ var call$k = FunctionPrototype$2.call;
92
+ var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$k, call$k);
93
+
94
+ var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
95
+ return function () {
96
+ return call$k.apply(fn, arguments);
97
+ };
98
+ };
99
+
100
+ var uncurryThis$l = functionUncurryThis;
101
+
102
+ var toString$a = uncurryThis$l({}.toString);
103
+ var stringSlice$6 = uncurryThis$l(''.slice);
104
+
105
+ var classofRaw$2 = function (it) {
106
+ return stringSlice$6(toString$a(it), 8, -1);
107
+ };
108
+
109
+ var uncurryThis$k = functionUncurryThis;
110
+ var fails$i = fails$l;
111
+ var classof$6 = classofRaw$2;
112
+
113
+ var $Object$4 = Object;
114
+ var split = uncurryThis$k(''.split);
115
+
116
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
117
+ var indexedObject = fails$i(function () {
118
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
119
+ // eslint-disable-next-line no-prototype-builtins -- safe
120
+ return !$Object$4('z').propertyIsEnumerable(0);
121
+ }) ? function (it) {
122
+ return classof$6(it) === 'String' ? split(it, '') : $Object$4(it);
123
+ } : $Object$4;
124
+
125
+ // we can't use just `it == null` since of `document.all` special case
126
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
127
+ var isNullOrUndefined$5 = function (it) {
128
+ return it === null || it === undefined;
129
+ };
130
+
131
+ var isNullOrUndefined$4 = isNullOrUndefined$5;
132
+
133
+ var $TypeError$f = TypeError;
134
+
135
+ // `RequireObjectCoercible` abstract operation
136
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
137
+ var requireObjectCoercible$8 = function (it) {
138
+ if (isNullOrUndefined$4(it)) throw new $TypeError$f("Can't call method on " + it);
139
+ return it;
140
+ };
141
+
142
+ // toObject with fallback for non-array-like ES3 strings
143
+ var IndexedObject = indexedObject;
144
+ var requireObjectCoercible$7 = requireObjectCoercible$8;
145
+
146
+ var toIndexedObject$5 = function (it) {
147
+ return IndexedObject(requireObjectCoercible$7(it));
148
+ };
149
+
150
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
151
+ var documentAll = typeof document == 'object' && document.all;
152
+
153
+ // `IsCallable` abstract operation
154
+ // https://tc39.es/ecma262/#sec-iscallable
155
+ // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
156
+ var isCallable$j = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
157
+ return typeof argument == 'function' || argument === documentAll;
158
+ } : function (argument) {
159
+ return typeof argument == 'function';
160
+ };
161
+
162
+ var isCallable$i = isCallable$j;
163
+
164
+ var isObject$a = function (it) {
165
+ return typeof it == 'object' ? it !== null : isCallable$i(it);
166
+ };
167
+
168
+ var globalThis$h = globalThis_1;
169
+ var isCallable$h = isCallable$j;
170
+
171
+ var aFunction = function (argument) {
172
+ return isCallable$h(argument) ? argument : undefined;
173
+ };
174
+
175
+ var getBuiltIn$5 = function (namespace, method) {
176
+ return arguments.length < 2 ? aFunction(globalThis$h[namespace]) : globalThis$h[namespace] && globalThis$h[namespace][method];
177
+ };
178
+
179
+ var uncurryThis$j = functionUncurryThis;
180
+
181
+ var objectIsPrototypeOf = uncurryThis$j({}.isPrototypeOf);
182
+
183
+ var globalThis$g = globalThis_1;
184
+
185
+ var navigator$1 = globalThis$g.navigator;
186
+ var userAgent$1 = navigator$1 && navigator$1.userAgent;
187
+
188
+ var environmentUserAgent = userAgent$1 ? String(userAgent$1) : '';
189
+
190
+ var globalThis$f = globalThis_1;
191
+ var userAgent = environmentUserAgent;
192
+
193
+ var process = globalThis$f.process;
194
+ var Deno$1 = globalThis$f.Deno;
195
+ var versions = process && process.versions || Deno$1 && Deno$1.version;
196
+ var v8 = versions && versions.v8;
197
+ var match, version;
198
+
199
+ if (v8) {
200
+ match = v8.split('.');
201
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
202
+ // but their correct versions are not interesting for us
203
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
204
+ }
205
+
206
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
207
+ // so check `userAgent` even if `.v8` exists, but 0
208
+ if (!version && userAgent) {
209
+ match = userAgent.match(/Edge\/(\d+)/);
210
+ if (!match || match[1] >= 74) {
211
+ match = userAgent.match(/Chrome\/(\d+)/);
212
+ if (match) version = +match[1];
213
+ }
214
+ }
215
+
216
+ var environmentV8Version = version;
217
+
218
+ /* eslint-disable es/no-symbol -- required for testing */
219
+ var V8_VERSION = environmentV8Version;
220
+ var fails$h = fails$l;
221
+ var globalThis$e = globalThis_1;
222
+
223
+ var $String$5 = globalThis$e.String;
224
+
225
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
226
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$h(function () {
227
+ var symbol = Symbol('symbol detection');
228
+ // Chrome 38 Symbol has incorrect toString conversion
229
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
230
+ // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
231
+ // of course, fail.
232
+ return !$String$5(symbol) || !(Object(symbol) instanceof Symbol) ||
233
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
234
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
235
+ });
236
+
237
+ /* eslint-disable es/no-symbol -- required for testing */
238
+ var NATIVE_SYMBOL$2 = symbolConstructorDetection;
239
+
240
+ var useSymbolAsUid = NATIVE_SYMBOL$2
241
+ && !Symbol.sham
242
+ && typeof Symbol.iterator == 'symbol';
243
+
244
+ var getBuiltIn$4 = getBuiltIn$5;
245
+ var isCallable$g = isCallable$j;
246
+ var isPrototypeOf$3 = objectIsPrototypeOf;
247
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
248
+
249
+ var $Object$3 = Object;
250
+
251
+ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
252
+ return typeof it == 'symbol';
253
+ } : function (it) {
254
+ var $Symbol = getBuiltIn$4('Symbol');
255
+ return isCallable$g($Symbol) && isPrototypeOf$3($Symbol.prototype, $Object$3(it));
256
+ };
257
+
258
+ var $String$4 = String;
259
+
260
+ var tryToString$3 = function (argument) {
261
+ try {
262
+ return $String$4(argument);
263
+ } catch (error) {
264
+ return 'Object';
265
+ }
266
+ };
267
+
268
+ var isCallable$f = isCallable$j;
269
+ var tryToString$2 = tryToString$3;
270
+
271
+ var $TypeError$e = TypeError;
272
+
273
+ // `Assert: IsCallable(argument) is true`
274
+ var aCallable$7 = function (argument) {
275
+ if (isCallable$f(argument)) return argument;
276
+ throw new $TypeError$e(tryToString$2(argument) + ' is not a function');
277
+ };
278
+
279
+ var aCallable$6 = aCallable$7;
280
+ var isNullOrUndefined$3 = isNullOrUndefined$5;
281
+
282
+ // `GetMethod` abstract operation
283
+ // https://tc39.es/ecma262/#sec-getmethod
284
+ var getMethod$6 = function (V, P) {
285
+ var func = V[P];
286
+ return isNullOrUndefined$3(func) ? undefined : aCallable$6(func);
287
+ };
288
+
289
+ var call$j = functionCall;
290
+ var isCallable$e = isCallable$j;
291
+ var isObject$9 = isObject$a;
292
+
293
+ var $TypeError$d = TypeError;
294
+
295
+ // `OrdinaryToPrimitive` abstract operation
296
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
297
+ var ordinaryToPrimitive$1 = function (input, pref) {
298
+ var fn, val;
299
+ if (pref === 'string' && isCallable$e(fn = input.toString) && !isObject$9(val = call$j(fn, input))) return val;
300
+ if (isCallable$e(fn = input.valueOf) && !isObject$9(val = call$j(fn, input))) return val;
301
+ if (pref !== 'string' && isCallable$e(fn = input.toString) && !isObject$9(val = call$j(fn, input))) return val;
302
+ throw new $TypeError$d("Can't convert object to primitive value");
303
+ };
304
+
305
+ var sharedStore = {exports: {}};
306
+
307
+ var isPure = false;
308
+
309
+ var globalThis$d = globalThis_1;
310
+
311
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
312
+ var defineProperty$5 = Object.defineProperty;
313
+
314
+ var defineGlobalProperty$3 = function (key, value) {
315
+ try {
316
+ defineProperty$5(globalThis$d, key, { value: value, configurable: true, writable: true });
317
+ } catch (error) {
318
+ globalThis$d[key] = value;
319
+ } return value;
320
+ };
321
+
322
+ var globalThis$c = globalThis_1;
323
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
324
+
325
+ var SHARED = '__core-js_shared__';
326
+ var store$3 = sharedStore.exports = globalThis$c[SHARED] || defineGlobalProperty$2(SHARED, {});
327
+
328
+ (store$3.versions || (store$3.versions = [])).push({
329
+ version: '3.38.1',
330
+ mode: 'global',
331
+ copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
332
+ license: 'https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE',
333
+ source: 'https://github.com/zloirock/core-js'
334
+ });
335
+
336
+ var sharedStoreExports = sharedStore.exports;
337
+
338
+ var store$2 = sharedStoreExports;
339
+
340
+ var shared$4 = function (key, value) {
341
+ return store$2[key] || (store$2[key] = value || {});
342
+ };
343
+
344
+ var requireObjectCoercible$6 = requireObjectCoercible$8;
345
+
346
+ var $Object$2 = Object;
347
+
348
+ // `ToObject` abstract operation
349
+ // https://tc39.es/ecma262/#sec-toobject
350
+ var toObject$4 = function (argument) {
351
+ return $Object$2(requireObjectCoercible$6(argument));
352
+ };
353
+
354
+ var uncurryThis$i = functionUncurryThis;
355
+ var toObject$3 = toObject$4;
356
+
357
+ var hasOwnProperty = uncurryThis$i({}.hasOwnProperty);
358
+
359
+ // `HasOwnProperty` abstract operation
360
+ // https://tc39.es/ecma262/#sec-hasownproperty
361
+ // eslint-disable-next-line es/no-object-hasown -- safe
362
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
363
+ return hasOwnProperty(toObject$3(it), key);
364
+ };
365
+
366
+ var uncurryThis$h = functionUncurryThis;
367
+
368
+ var id = 0;
369
+ var postfix = Math.random();
370
+ var toString$9 = uncurryThis$h(1.0.toString);
371
+
372
+ var uid$2 = function (key) {
373
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$9(++id + postfix, 36);
374
+ };
375
+
376
+ var globalThis$b = globalThis_1;
377
+ var shared$3 = shared$4;
378
+ var hasOwn$c = hasOwnProperty_1;
379
+ var uid$1 = uid$2;
380
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
381
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
382
+
383
+ var Symbol$1 = globalThis$b.Symbol;
384
+ var WellKnownSymbolsStore = shared$3('wks');
385
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
386
+
387
+ var wellKnownSymbol$g = function (name) {
388
+ if (!hasOwn$c(WellKnownSymbolsStore, name)) {
389
+ WellKnownSymbolsStore[name] = NATIVE_SYMBOL$1 && hasOwn$c(Symbol$1, name)
390
+ ? Symbol$1[name]
391
+ : createWellKnownSymbol('Symbol.' + name);
392
+ } return WellKnownSymbolsStore[name];
393
+ };
394
+
395
+ var call$i = functionCall;
396
+ var isObject$8 = isObject$a;
397
+ var isSymbol$1 = isSymbol$2;
398
+ var getMethod$5 = getMethod$6;
399
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
400
+ var wellKnownSymbol$f = wellKnownSymbol$g;
401
+
402
+ var $TypeError$c = TypeError;
403
+ var TO_PRIMITIVE = wellKnownSymbol$f('toPrimitive');
404
+
405
+ // `ToPrimitive` abstract operation
406
+ // https://tc39.es/ecma262/#sec-toprimitive
407
+ var toPrimitive$1 = function (input, pref) {
408
+ if (!isObject$8(input) || isSymbol$1(input)) return input;
409
+ var exoticToPrim = getMethod$5(input, TO_PRIMITIVE);
410
+ var result;
411
+ if (exoticToPrim) {
412
+ if (pref === undefined) pref = 'default';
413
+ result = call$i(exoticToPrim, input, pref);
414
+ if (!isObject$8(result) || isSymbol$1(result)) return result;
415
+ throw new $TypeError$c("Can't convert object to primitive value");
416
+ }
417
+ if (pref === undefined) pref = 'number';
418
+ return ordinaryToPrimitive(input, pref);
419
+ };
420
+
421
+ var toPrimitive = toPrimitive$1;
422
+ var isSymbol = isSymbol$2;
423
+
424
+ // `ToPropertyKey` abstract operation
425
+ // https://tc39.es/ecma262/#sec-topropertykey
426
+ var toPropertyKey$2 = function (argument) {
427
+ var key = toPrimitive(argument, 'string');
428
+ return isSymbol(key) ? key : key + '';
429
+ };
430
+
431
+ var globalThis$a = globalThis_1;
432
+ var isObject$7 = isObject$a;
433
+
434
+ var document$1 = globalThis$a.document;
435
+ // typeof document.createElement is 'object' in old IE
436
+ var EXISTS$1 = isObject$7(document$1) && isObject$7(document$1.createElement);
437
+
438
+ var documentCreateElement$2 = function (it) {
439
+ return EXISTS$1 ? document$1.createElement(it) : {};
440
+ };
441
+
442
+ var DESCRIPTORS$c = descriptors;
443
+ var fails$g = fails$l;
444
+ var createElement = documentCreateElement$2;
445
+
446
+ // Thanks to IE8 for its funny defineProperty
447
+ var ie8DomDefine = !DESCRIPTORS$c && !fails$g(function () {
448
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
449
+ return Object.defineProperty(createElement('div'), 'a', {
450
+ get: function () { return 7; }
451
+ }).a !== 7;
452
+ });
453
+
454
+ var DESCRIPTORS$b = descriptors;
455
+ var call$h = functionCall;
456
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
457
+ var createPropertyDescriptor$3 = createPropertyDescriptor$4;
458
+ var toIndexedObject$4 = toIndexedObject$5;
459
+ var toPropertyKey$1 = toPropertyKey$2;
460
+ var hasOwn$b = hasOwnProperty_1;
461
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
462
+
463
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
464
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
465
+
466
+ // `Object.getOwnPropertyDescriptor` method
467
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
468
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$b ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
469
+ O = toIndexedObject$4(O);
470
+ P = toPropertyKey$1(P);
471
+ if (IE8_DOM_DEFINE$1) try {
472
+ return $getOwnPropertyDescriptor$1(O, P);
473
+ } catch (error) { /* empty */ }
474
+ if (hasOwn$b(O, P)) return createPropertyDescriptor$3(!call$h(propertyIsEnumerableModule.f, O, P), O[P]);
475
+ };
476
+
477
+ var objectDefineProperty = {};
478
+
479
+ var DESCRIPTORS$a = descriptors;
480
+ var fails$f = fails$l;
481
+
482
+ // V8 ~ Chrome 36-
483
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
484
+ var v8PrototypeDefineBug = DESCRIPTORS$a && fails$f(function () {
485
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
486
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
487
+ value: 42,
488
+ writable: false
489
+ }).prototype !== 42;
490
+ });
491
+
492
+ var isObject$6 = isObject$a;
493
+
494
+ var $String$3 = String;
495
+ var $TypeError$b = TypeError;
496
+
497
+ // `Assert: Type(argument) is Object`
498
+ var anObject$i = function (argument) {
499
+ if (isObject$6(argument)) return argument;
500
+ throw new $TypeError$b($String$3(argument) + ' is not an object');
501
+ };
502
+
503
+ var DESCRIPTORS$9 = descriptors;
504
+ var IE8_DOM_DEFINE = ie8DomDefine;
505
+ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
506
+ var anObject$h = anObject$i;
507
+ var toPropertyKey = toPropertyKey$2;
508
+
509
+ var $TypeError$a = TypeError;
510
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
511
+ var $defineProperty = Object.defineProperty;
512
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
513
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
514
+ var ENUMERABLE = 'enumerable';
515
+ var CONFIGURABLE$1 = 'configurable';
516
+ var WRITABLE = 'writable';
517
+
518
+ // `Object.defineProperty` method
519
+ // https://tc39.es/ecma262/#sec-object.defineproperty
520
+ objectDefineProperty.f = DESCRIPTORS$9 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
521
+ anObject$h(O);
522
+ P = toPropertyKey(P);
523
+ anObject$h(Attributes);
524
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
525
+ var current = $getOwnPropertyDescriptor(O, P);
526
+ if (current && current[WRITABLE]) {
527
+ O[P] = Attributes.value;
528
+ Attributes = {
529
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
530
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
531
+ writable: false
532
+ };
533
+ }
534
+ } return $defineProperty(O, P, Attributes);
535
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
536
+ anObject$h(O);
537
+ P = toPropertyKey(P);
538
+ anObject$h(Attributes);
539
+ if (IE8_DOM_DEFINE) try {
540
+ return $defineProperty(O, P, Attributes);
541
+ } catch (error) { /* empty */ }
542
+ if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$a('Accessors not supported');
543
+ if ('value' in Attributes) O[P] = Attributes.value;
544
+ return O;
545
+ };
546
+
547
+ var DESCRIPTORS$8 = descriptors;
548
+ var definePropertyModule$4 = objectDefineProperty;
549
+ var createPropertyDescriptor$2 = createPropertyDescriptor$4;
550
+
551
+ var createNonEnumerableProperty$6 = DESCRIPTORS$8 ? function (object, key, value) {
552
+ return definePropertyModule$4.f(object, key, createPropertyDescriptor$2(1, value));
553
+ } : function (object, key, value) {
554
+ object[key] = value;
555
+ return object;
556
+ };
557
+
558
+ var makeBuiltIn$3 = {exports: {}};
559
+
560
+ var DESCRIPTORS$7 = descriptors;
561
+ var hasOwn$a = hasOwnProperty_1;
562
+
563
+ var FunctionPrototype$1 = Function.prototype;
564
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
565
+ var getDescriptor = DESCRIPTORS$7 && Object.getOwnPropertyDescriptor;
566
+
567
+ var EXISTS = hasOwn$a(FunctionPrototype$1, 'name');
568
+ // additional protection from minified / mangled / dropped function names
569
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
570
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$7 || (DESCRIPTORS$7 && getDescriptor(FunctionPrototype$1, 'name').configurable));
571
+
572
+ var functionName = {
573
+ PROPER: PROPER,
574
+ CONFIGURABLE: CONFIGURABLE
575
+ };
576
+
577
+ var uncurryThis$g = functionUncurryThis;
578
+ var isCallable$d = isCallable$j;
579
+ var store$1 = sharedStoreExports;
580
+
581
+ var functionToString = uncurryThis$g(Function.toString);
582
+
583
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
584
+ if (!isCallable$d(store$1.inspectSource)) {
585
+ store$1.inspectSource = function (it) {
586
+ return functionToString(it);
587
+ };
588
+ }
589
+
590
+ var inspectSource$1 = store$1.inspectSource;
591
+
592
+ var globalThis$9 = globalThis_1;
593
+ var isCallable$c = isCallable$j;
594
+
595
+ var WeakMap$1 = globalThis$9.WeakMap;
596
+
597
+ var weakMapBasicDetection = isCallable$c(WeakMap$1) && /native code/.test(String(WeakMap$1));
598
+
599
+ var shared$2 = shared$4;
600
+ var uid = uid$2;
601
+
602
+ var keys$1 = shared$2('keys');
603
+
604
+ var sharedKey$3 = function (key) {
605
+ return keys$1[key] || (keys$1[key] = uid(key));
606
+ };
607
+
608
+ var hiddenKeys$4 = {};
609
+
610
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
611
+ var globalThis$8 = globalThis_1;
612
+ var isObject$5 = isObject$a;
613
+ var createNonEnumerableProperty$5 = createNonEnumerableProperty$6;
614
+ var hasOwn$9 = hasOwnProperty_1;
615
+ var shared$1 = sharedStoreExports;
616
+ var sharedKey$2 = sharedKey$3;
617
+ var hiddenKeys$3 = hiddenKeys$4;
618
+
619
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
620
+ var TypeError$1 = globalThis$8.TypeError;
621
+ var WeakMap = globalThis$8.WeakMap;
622
+ var set, get, has$6;
623
+
624
+ var enforce = function (it) {
625
+ return has$6(it) ? get(it) : set(it, {});
626
+ };
627
+
628
+ var getterFor = function (TYPE) {
629
+ return function (it) {
630
+ var state;
631
+ if (!isObject$5(it) || (state = get(it)).type !== TYPE) {
632
+ throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
633
+ } return state;
634
+ };
635
+ };
636
+
637
+ if (NATIVE_WEAK_MAP || shared$1.state) {
638
+ var store = shared$1.state || (shared$1.state = new WeakMap());
639
+ /* eslint-disable no-self-assign -- prototype methods protection */
640
+ store.get = store.get;
641
+ store.has = store.has;
642
+ store.set = store.set;
643
+ /* eslint-enable no-self-assign -- prototype methods protection */
644
+ set = function (it, metadata) {
645
+ if (store.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
646
+ metadata.facade = it;
647
+ store.set(it, metadata);
648
+ return metadata;
649
+ };
650
+ get = function (it) {
651
+ return store.get(it) || {};
652
+ };
653
+ has$6 = function (it) {
654
+ return store.has(it);
655
+ };
656
+ } else {
657
+ var STATE = sharedKey$2('state');
658
+ hiddenKeys$3[STATE] = true;
659
+ set = function (it, metadata) {
660
+ if (hasOwn$9(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
661
+ metadata.facade = it;
662
+ createNonEnumerableProperty$5(it, STATE, metadata);
663
+ return metadata;
664
+ };
665
+ get = function (it) {
666
+ return hasOwn$9(it, STATE) ? it[STATE] : {};
667
+ };
668
+ has$6 = function (it) {
669
+ return hasOwn$9(it, STATE);
670
+ };
671
+ }
672
+
673
+ var internalState = {
674
+ set: set,
675
+ get: get,
676
+ has: has$6,
677
+ enforce: enforce,
678
+ getterFor: getterFor
679
+ };
680
+
681
+ var uncurryThis$f = functionUncurryThis;
682
+ var fails$e = fails$l;
683
+ var isCallable$b = isCallable$j;
684
+ var hasOwn$8 = hasOwnProperty_1;
685
+ var DESCRIPTORS$6 = descriptors;
686
+ var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
687
+ var inspectSource = inspectSource$1;
688
+ var InternalStateModule$2 = internalState;
689
+
690
+ var enforceInternalState = InternalStateModule$2.enforce;
691
+ var getInternalState$2 = InternalStateModule$2.get;
692
+ var $String$2 = String;
693
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
694
+ var defineProperty$4 = Object.defineProperty;
695
+ var stringSlice$5 = uncurryThis$f(''.slice);
696
+ var replace$2 = uncurryThis$f(''.replace);
697
+ var join = uncurryThis$f([].join);
698
+
699
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$6 && !fails$e(function () {
700
+ return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
701
+ });
702
+
703
+ var TEMPLATE = String(String).split('String');
704
+
705
+ var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
706
+ if (stringSlice$5($String$2(name), 0, 7) === 'Symbol(') {
707
+ name = '[' + replace$2($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
708
+ }
709
+ if (options && options.getter) name = 'get ' + name;
710
+ if (options && options.setter) name = 'set ' + name;
711
+ if (!hasOwn$8(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
712
+ if (DESCRIPTORS$6) defineProperty$4(value, 'name', { value: name, configurable: true });
713
+ else value.name = name;
714
+ }
715
+ if (CONFIGURABLE_LENGTH && options && hasOwn$8(options, 'arity') && value.length !== options.arity) {
716
+ defineProperty$4(value, 'length', { value: options.arity });
717
+ }
718
+ try {
719
+ if (options && hasOwn$8(options, 'constructor') && options.constructor) {
720
+ if (DESCRIPTORS$6) defineProperty$4(value, 'prototype', { writable: false });
721
+ // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
722
+ } else if (value.prototype) value.prototype = undefined;
723
+ } catch (error) { /* empty */ }
724
+ var state = enforceInternalState(value);
725
+ if (!hasOwn$8(state, 'source')) {
726
+ state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
727
+ } return value;
728
+ };
729
+
730
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
731
+ // eslint-disable-next-line no-extend-native -- required
732
+ Function.prototype.toString = makeBuiltIn$2(function toString() {
733
+ return isCallable$b(this) && getInternalState$2(this).source || inspectSource(this);
734
+ }, 'toString');
735
+
736
+ var makeBuiltInExports = makeBuiltIn$3.exports;
737
+
738
+ var isCallable$a = isCallable$j;
739
+ var definePropertyModule$3 = objectDefineProperty;
740
+ var makeBuiltIn$1 = makeBuiltInExports;
741
+ var defineGlobalProperty$1 = defineGlobalProperty$3;
742
+
743
+ var defineBuiltIn$6 = function (O, key, value, options) {
744
+ if (!options) options = {};
745
+ var simple = options.enumerable;
746
+ var name = options.name !== undefined ? options.name : key;
747
+ if (isCallable$a(value)) makeBuiltIn$1(value, name, options);
748
+ if (options.global) {
749
+ if (simple) O[key] = value;
750
+ else defineGlobalProperty$1(key, value);
751
+ } else {
752
+ try {
753
+ if (!options.unsafe) delete O[key];
754
+ else if (O[key]) simple = true;
755
+ } catch (error) { /* empty */ }
756
+ if (simple) O[key] = value;
757
+ else definePropertyModule$3.f(O, key, {
758
+ value: value,
759
+ enumerable: false,
760
+ configurable: !options.nonConfigurable,
761
+ writable: !options.nonWritable
762
+ });
763
+ } return O;
764
+ };
765
+
766
+ var objectGetOwnPropertyNames = {};
767
+
768
+ var ceil = Math.ceil;
769
+ var floor$1 = Math.floor;
770
+
771
+ // `Math.trunc` method
772
+ // https://tc39.es/ecma262/#sec-math.trunc
773
+ // eslint-disable-next-line es/no-math-trunc -- safe
774
+ var mathTrunc = Math.trunc || function trunc(x) {
775
+ var n = +x;
776
+ return (n > 0 ? floor$1 : ceil)(n);
777
+ };
778
+
779
+ var trunc = mathTrunc;
780
+
781
+ // `ToIntegerOrInfinity` abstract operation
782
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
783
+ var toIntegerOrInfinity$5 = function (argument) {
784
+ var number = +argument;
785
+ // eslint-disable-next-line no-self-compare -- NaN check
786
+ return number !== number || number === 0 ? 0 : trunc(number);
787
+ };
788
+
789
+ var toIntegerOrInfinity$4 = toIntegerOrInfinity$5;
790
+
791
+ var max$2 = Math.max;
792
+ var min$3 = Math.min;
793
+
794
+ // Helper for a popular repeating case of the spec:
795
+ // Let integer be ? ToInteger(index).
796
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
797
+ var toAbsoluteIndex$1 = function (index, length) {
798
+ var integer = toIntegerOrInfinity$4(index);
799
+ return integer < 0 ? max$2(integer + length, 0) : min$3(integer, length);
800
+ };
801
+
802
+ var toIntegerOrInfinity$3 = toIntegerOrInfinity$5;
803
+
804
+ var min$2 = Math.min;
805
+
806
+ // `ToLength` abstract operation
807
+ // https://tc39.es/ecma262/#sec-tolength
808
+ var toLength$4 = function (argument) {
809
+ var len = toIntegerOrInfinity$3(argument);
810
+ return len > 0 ? min$2(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
811
+ };
812
+
813
+ var toLength$3 = toLength$4;
814
+
815
+ // `LengthOfArrayLike` abstract operation
816
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
817
+ var lengthOfArrayLike$4 = function (obj) {
818
+ return toLength$3(obj.length);
819
+ };
820
+
821
+ var toIndexedObject$3 = toIndexedObject$5;
822
+ var toAbsoluteIndex = toAbsoluteIndex$1;
823
+ var lengthOfArrayLike$3 = lengthOfArrayLike$4;
824
+
825
+ // `Array.prototype.{ indexOf, includes }` methods implementation
826
+ var createMethod$1 = function (IS_INCLUDES) {
827
+ return function ($this, el, fromIndex) {
828
+ var O = toIndexedObject$3($this);
829
+ var length = lengthOfArrayLike$3(O);
830
+ if (length === 0) return !IS_INCLUDES && -1;
831
+ var index = toAbsoluteIndex(fromIndex, length);
832
+ var value;
833
+ // Array#includes uses SameValueZero equality algorithm
834
+ // eslint-disable-next-line no-self-compare -- NaN check
835
+ if (IS_INCLUDES && el !== el) while (length > index) {
836
+ value = O[index++];
837
+ // eslint-disable-next-line no-self-compare -- NaN check
838
+ if (value !== value) return true;
839
+ // Array#indexOf ignores holes, Array#includes - not
840
+ } else for (;length > index; index++) {
841
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
842
+ } return !IS_INCLUDES && -1;
843
+ };
844
+ };
845
+
846
+ var arrayIncludes = {
847
+ // `Array.prototype.includes` method
848
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
849
+ includes: createMethod$1(true),
850
+ // `Array.prototype.indexOf` method
851
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
852
+ indexOf: createMethod$1(false)
853
+ };
854
+
855
+ var uncurryThis$e = functionUncurryThis;
856
+ var hasOwn$7 = hasOwnProperty_1;
857
+ var toIndexedObject$2 = toIndexedObject$5;
858
+ var indexOf$1 = arrayIncludes.indexOf;
859
+ var hiddenKeys$2 = hiddenKeys$4;
860
+
861
+ var push$2 = uncurryThis$e([].push);
862
+
863
+ var objectKeysInternal = function (object, names) {
864
+ var O = toIndexedObject$2(object);
865
+ var i = 0;
866
+ var result = [];
867
+ var key;
868
+ for (key in O) !hasOwn$7(hiddenKeys$2, key) && hasOwn$7(O, key) && push$2(result, key);
869
+ // Don't enum bug & hidden keys
870
+ while (names.length > i) if (hasOwn$7(O, key = names[i++])) {
871
+ ~indexOf$1(result, key) || push$2(result, key);
872
+ }
873
+ return result;
874
+ };
875
+
876
+ // IE8- don't enum bug keys
877
+ var enumBugKeys$3 = [
878
+ 'constructor',
879
+ 'hasOwnProperty',
880
+ 'isPrototypeOf',
881
+ 'propertyIsEnumerable',
882
+ 'toLocaleString',
883
+ 'toString',
884
+ 'valueOf'
885
+ ];
886
+
887
+ var internalObjectKeys$1 = objectKeysInternal;
888
+ var enumBugKeys$2 = enumBugKeys$3;
889
+
890
+ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
891
+
892
+ // `Object.getOwnPropertyNames` method
893
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
894
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
895
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
896
+ return internalObjectKeys$1(O, hiddenKeys$1);
897
+ };
898
+
899
+ var objectGetOwnPropertySymbols = {};
900
+
901
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
902
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
903
+
904
+ var getBuiltIn$3 = getBuiltIn$5;
905
+ var uncurryThis$d = functionUncurryThis;
906
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
907
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
908
+ var anObject$g = anObject$i;
909
+
910
+ var concat$1 = uncurryThis$d([].concat);
911
+
912
+ // all object keys, includes non-enumerable and symbols
913
+ var ownKeys$1 = getBuiltIn$3('Reflect', 'ownKeys') || function ownKeys(it) {
914
+ var keys = getOwnPropertyNamesModule.f(anObject$g(it));
915
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
916
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
917
+ };
918
+
919
+ var hasOwn$6 = hasOwnProperty_1;
920
+ var ownKeys = ownKeys$1;
921
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
922
+ var definePropertyModule$2 = objectDefineProperty;
923
+
924
+ var copyConstructorProperties$1 = function (target, source, exceptions) {
925
+ var keys = ownKeys(source);
926
+ var defineProperty = definePropertyModule$2.f;
927
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
928
+ for (var i = 0; i < keys.length; i++) {
929
+ var key = keys[i];
930
+ if (!hasOwn$6(target, key) && !(exceptions && hasOwn$6(exceptions, key))) {
931
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
932
+ }
933
+ }
934
+ };
935
+
936
+ var fails$d = fails$l;
937
+ var isCallable$9 = isCallable$j;
938
+
939
+ var replacement = /#|\.prototype\./;
940
+
941
+ var isForced$1 = function (feature, detection) {
942
+ var value = data[normalize(feature)];
943
+ return value === POLYFILL ? true
944
+ : value === NATIVE ? false
945
+ : isCallable$9(detection) ? fails$d(detection)
946
+ : !!detection;
947
+ };
948
+
949
+ var normalize = isForced$1.normalize = function (string) {
950
+ return String(string).replace(replacement, '.').toLowerCase();
951
+ };
952
+
953
+ var data = isForced$1.data = {};
954
+ var NATIVE = isForced$1.NATIVE = 'N';
955
+ var POLYFILL = isForced$1.POLYFILL = 'P';
956
+
957
+ var isForced_1 = isForced$1;
958
+
959
+ var globalThis$7 = globalThis_1;
960
+ var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f;
961
+ var createNonEnumerableProperty$4 = createNonEnumerableProperty$6;
962
+ var defineBuiltIn$5 = defineBuiltIn$6;
963
+ var defineGlobalProperty = defineGlobalProperty$3;
964
+ var copyConstructorProperties = copyConstructorProperties$1;
965
+ var isForced = isForced_1;
966
+
967
+ /*
968
+ options.target - name of the target object
969
+ options.global - target is the global object
970
+ options.stat - export as static methods of target
971
+ options.proto - export as prototype methods of target
972
+ options.real - real prototype method for the `pure` version
973
+ options.forced - export even if the native feature is available
974
+ options.bind - bind methods to the target, required for the `pure` version
975
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
976
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
977
+ options.sham - add a flag to not completely full polyfills
978
+ options.enumerable - export as enumerable property
979
+ options.dontCallGetSet - prevent calling a getter on target
980
+ options.name - the .name of the function if it does not match the key
981
+ */
982
+ var _export = function (options, source) {
983
+ var TARGET = options.target;
984
+ var GLOBAL = options.global;
985
+ var STATIC = options.stat;
986
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
987
+ if (GLOBAL) {
988
+ target = globalThis$7;
989
+ } else if (STATIC) {
990
+ target = globalThis$7[TARGET] || defineGlobalProperty(TARGET, {});
991
+ } else {
992
+ target = globalThis$7[TARGET] && globalThis$7[TARGET].prototype;
993
+ }
994
+ if (target) for (key in source) {
995
+ sourceProperty = source[key];
996
+ if (options.dontCallGetSet) {
997
+ descriptor = getOwnPropertyDescriptor$3(target, key);
998
+ targetProperty = descriptor && descriptor.value;
999
+ } else targetProperty = target[key];
1000
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1001
+ // contained in target
1002
+ if (!FORCED && targetProperty !== undefined) {
1003
+ if (typeof sourceProperty == typeof targetProperty) continue;
1004
+ copyConstructorProperties(sourceProperty, targetProperty);
1005
+ }
1006
+ // add a flag to not completely full polyfills
1007
+ if (options.sham || (targetProperty && targetProperty.sham)) {
1008
+ createNonEnumerableProperty$4(sourceProperty, 'sham', true);
1009
+ }
1010
+ defineBuiltIn$5(target, key, sourceProperty, options);
1011
+ }
1012
+ };
1013
+
1014
+ var objectDefineProperties = {};
1015
+
1016
+ var internalObjectKeys = objectKeysInternal;
1017
+ var enumBugKeys$1 = enumBugKeys$3;
1018
+
1019
+ // `Object.keys` method
1020
+ // https://tc39.es/ecma262/#sec-object.keys
1021
+ // eslint-disable-next-line es/no-object-keys -- safe
1022
+ var objectKeys$1 = Object.keys || function keys(O) {
1023
+ return internalObjectKeys(O, enumBugKeys$1);
1024
+ };
1025
+
1026
+ var DESCRIPTORS$5 = descriptors;
1027
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1028
+ var definePropertyModule$1 = objectDefineProperty;
1029
+ var anObject$f = anObject$i;
1030
+ var toIndexedObject$1 = toIndexedObject$5;
1031
+ var objectKeys = objectKeys$1;
1032
+
1033
+ // `Object.defineProperties` method
1034
+ // https://tc39.es/ecma262/#sec-object.defineproperties
1035
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
1036
+ objectDefineProperties.f = DESCRIPTORS$5 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1037
+ anObject$f(O);
1038
+ var props = toIndexedObject$1(Properties);
1039
+ var keys = objectKeys(Properties);
1040
+ var length = keys.length;
1041
+ var index = 0;
1042
+ var key;
1043
+ while (length > index) definePropertyModule$1.f(O, key = keys[index++], props[key]);
1044
+ return O;
1045
+ };
1046
+
1047
+ var getBuiltIn$2 = getBuiltIn$5;
1048
+
1049
+ var html$1 = getBuiltIn$2('document', 'documentElement');
1050
+
1051
+ /* global ActiveXObject -- old IE, WSH */
1052
+ var anObject$e = anObject$i;
1053
+ var definePropertiesModule = objectDefineProperties;
1054
+ var enumBugKeys = enumBugKeys$3;
1055
+ var hiddenKeys = hiddenKeys$4;
1056
+ var html = html$1;
1057
+ var documentCreateElement$1 = documentCreateElement$2;
1058
+ var sharedKey$1 = sharedKey$3;
1059
+
1060
+ var GT = '>';
1061
+ var LT = '<';
1062
+ var PROTOTYPE = 'prototype';
1063
+ var SCRIPT = 'script';
1064
+ var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1065
+
1066
+ var EmptyConstructor = function () { /* empty */ };
1067
+
1068
+ var scriptTag = function (content) {
1069
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1070
+ };
1071
+
1072
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1073
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
1074
+ activeXDocument.write(scriptTag(''));
1075
+ activeXDocument.close();
1076
+ var temp = activeXDocument.parentWindow.Object;
1077
+ // eslint-disable-next-line no-useless-assignment -- avoid memory leak
1078
+ activeXDocument = null;
1079
+ return temp;
1080
+ };
1081
+
1082
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
1083
+ var NullProtoObjectViaIFrame = function () {
1084
+ // Thrash, waste and sodomy: IE GC bug
1085
+ var iframe = documentCreateElement$1('iframe');
1086
+ var JS = 'java' + SCRIPT + ':';
1087
+ var iframeDocument;
1088
+ iframe.style.display = 'none';
1089
+ html.appendChild(iframe);
1090
+ // https://github.com/zloirock/core-js/issues/475
1091
+ iframe.src = String(JS);
1092
+ iframeDocument = iframe.contentWindow.document;
1093
+ iframeDocument.open();
1094
+ iframeDocument.write(scriptTag('document.F=Object'));
1095
+ iframeDocument.close();
1096
+ return iframeDocument.F;
1097
+ };
1098
+
1099
+ // Check for document.domain and active x support
1100
+ // No need to use active x approach when document.domain is not set
1101
+ // see https://github.com/es-shims/es5-shim/issues/150
1102
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1103
+ // avoid IE GC bug
1104
+ var activeXDocument;
1105
+ var NullProtoObject = function () {
1106
+ try {
1107
+ activeXDocument = new ActiveXObject('htmlfile');
1108
+ } catch (error) { /* ignore */ }
1109
+ NullProtoObject = typeof document != 'undefined'
1110
+ ? document.domain && activeXDocument
1111
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1112
+ : NullProtoObjectViaIFrame()
1113
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
1114
+ var length = enumBugKeys.length;
1115
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1116
+ return NullProtoObject();
1117
+ };
1118
+
1119
+ hiddenKeys[IE_PROTO$1] = true;
1120
+
1121
+ // `Object.create` method
1122
+ // https://tc39.es/ecma262/#sec-object.create
1123
+ // eslint-disable-next-line es/no-object-create -- safe
1124
+ var objectCreate = Object.create || function create(O, Properties) {
1125
+ var result;
1126
+ if (O !== null) {
1127
+ EmptyConstructor[PROTOTYPE] = anObject$e(O);
1128
+ result = new EmptyConstructor();
1129
+ EmptyConstructor[PROTOTYPE] = null;
1130
+ // add "__proto__" for Object.getPrototypeOf polyfill
1131
+ result[IE_PROTO$1] = O;
1132
+ } else result = NullProtoObject();
1133
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1134
+ };
1135
+
1136
+ var wellKnownSymbol$e = wellKnownSymbol$g;
1137
+ var create$3 = objectCreate;
1138
+ var defineProperty$3 = objectDefineProperty.f;
1139
+
1140
+ var UNSCOPABLES = wellKnownSymbol$e('unscopables');
1141
+ var ArrayPrototype$1 = Array.prototype;
1142
+
1143
+ // Array.prototype[@@unscopables]
1144
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1145
+ if (ArrayPrototype$1[UNSCOPABLES] === undefined) {
1146
+ defineProperty$3(ArrayPrototype$1, UNSCOPABLES, {
1147
+ configurable: true,
1148
+ value: create$3(null)
1149
+ });
1150
+ }
1151
+
1152
+ // add a key to Array.prototype[@@unscopables]
1153
+ var addToUnscopables$2 = function (key) {
1154
+ ArrayPrototype$1[UNSCOPABLES][key] = true;
1155
+ };
1156
+
1157
+ var $$h = _export;
1158
+ var $includes = arrayIncludes.includes;
1159
+ var fails$c = fails$l;
1160
+ var addToUnscopables$1 = addToUnscopables$2;
1161
+
1162
+ // FF99+ bug
1163
+ var BROKEN_ON_SPARSE = fails$c(function () {
1164
+ // eslint-disable-next-line es/no-array-prototype-includes -- detection
1165
+ return !Array(1).includes();
1166
+ });
1167
+
1168
+ // `Array.prototype.includes` method
1169
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
1170
+ $$h({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
1171
+ includes: function includes(el /* , fromIndex = 0 */) {
1172
+ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
1173
+ }
1174
+ });
1175
+
1176
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1177
+ addToUnscopables$1('includes');
1178
+
1179
+ var iterators = {};
1180
+
1181
+ var fails$b = fails$l;
1182
+
1183
+ var correctPrototypeGetter = !fails$b(function () {
1184
+ function F() { /* empty */ }
1185
+ F.prototype.constructor = null;
1186
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1187
+ return Object.getPrototypeOf(new F()) !== F.prototype;
1188
+ });
1189
+
1190
+ var hasOwn$5 = hasOwnProperty_1;
1191
+ var isCallable$8 = isCallable$j;
1192
+ var toObject$2 = toObject$4;
1193
+ var sharedKey = sharedKey$3;
1194
+ var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1195
+
1196
+ var IE_PROTO = sharedKey('IE_PROTO');
1197
+ var $Object$1 = Object;
1198
+ var ObjectPrototype = $Object$1.prototype;
1199
+
1200
+ // `Object.getPrototypeOf` method
1201
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
1202
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
1203
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1204
+ var object = toObject$2(O);
1205
+ if (hasOwn$5(object, IE_PROTO)) return object[IE_PROTO];
1206
+ var constructor = object.constructor;
1207
+ if (isCallable$8(constructor) && object instanceof constructor) {
1208
+ return constructor.prototype;
1209
+ } return object instanceof $Object$1 ? ObjectPrototype : null;
1210
+ };
1211
+
1212
+ var fails$a = fails$l;
1213
+ var isCallable$7 = isCallable$j;
1214
+ var isObject$4 = isObject$a;
1215
+ var getPrototypeOf$2 = objectGetPrototypeOf;
1216
+ var defineBuiltIn$4 = defineBuiltIn$6;
1217
+ var wellKnownSymbol$d = wellKnownSymbol$g;
1218
+
1219
+ var ITERATOR$5 = wellKnownSymbol$d('iterator');
1220
+ var BUGGY_SAFARI_ITERATORS$1 = false;
1221
+
1222
+ // `%IteratorPrototype%` object
1223
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1224
+ var IteratorPrototype$4, PrototypeOfArrayIteratorPrototype, arrayIterator;
1225
+
1226
+ /* eslint-disable es/no-array-prototype-keys -- safe */
1227
+ if ([].keys) {
1228
+ arrayIterator = [].keys();
1229
+ // Safari 8 has buggy iterators w/o `next`
1230
+ if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
1231
+ else {
1232
+ PrototypeOfArrayIteratorPrototype = getPrototypeOf$2(getPrototypeOf$2(arrayIterator));
1233
+ if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$4 = PrototypeOfArrayIteratorPrototype;
1234
+ }
1235
+ }
1236
+
1237
+ var NEW_ITERATOR_PROTOTYPE = !isObject$4(IteratorPrototype$4) || fails$a(function () {
1238
+ var test = {};
1239
+ // FF44- legacy iterators case
1240
+ return IteratorPrototype$4[ITERATOR$5].call(test) !== test;
1241
+ });
1242
+
1243
+ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$4 = {};
1244
+
1245
+ // `%IteratorPrototype%[@@iterator]()` method
1246
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1247
+ if (!isCallable$7(IteratorPrototype$4[ITERATOR$5])) {
1248
+ defineBuiltIn$4(IteratorPrototype$4, ITERATOR$5, function () {
1249
+ return this;
1250
+ });
1251
+ }
1252
+
1253
+ var iteratorsCore = {
1254
+ IteratorPrototype: IteratorPrototype$4,
1255
+ BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1256
+ };
1257
+
1258
+ var defineProperty$2 = objectDefineProperty.f;
1259
+ var hasOwn$4 = hasOwnProperty_1;
1260
+ var wellKnownSymbol$c = wellKnownSymbol$g;
1261
+
1262
+ var TO_STRING_TAG$4 = wellKnownSymbol$c('toStringTag');
1263
+
1264
+ var setToStringTag$3 = function (target, TAG, STATIC) {
1265
+ if (target && !STATIC) target = target.prototype;
1266
+ if (target && !hasOwn$4(target, TO_STRING_TAG$4)) {
1267
+ defineProperty$2(target, TO_STRING_TAG$4, { configurable: true, value: TAG });
1268
+ }
1269
+ };
1270
+
1271
+ var IteratorPrototype$3 = iteratorsCore.IteratorPrototype;
1272
+ var create$2 = objectCreate;
1273
+ var createPropertyDescriptor$1 = createPropertyDescriptor$4;
1274
+ var setToStringTag$2 = setToStringTag$3;
1275
+ var Iterators$4 = iterators;
1276
+
1277
+ var returnThis$1 = function () { return this; };
1278
+
1279
+ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1280
+ var TO_STRING_TAG = NAME + ' Iterator';
1281
+ IteratorConstructor.prototype = create$2(IteratorPrototype$3, { next: createPropertyDescriptor$1(+!ENUMERABLE_NEXT, next) });
1282
+ setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
1283
+ Iterators$4[TO_STRING_TAG] = returnThis$1;
1284
+ return IteratorConstructor;
1285
+ };
1286
+
1287
+ var uncurryThis$c = functionUncurryThis;
1288
+ var aCallable$5 = aCallable$7;
1289
+
1290
+ var functionUncurryThisAccessor = function (object, key, method) {
1291
+ try {
1292
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1293
+ return uncurryThis$c(aCallable$5(Object.getOwnPropertyDescriptor(object, key)[method]));
1294
+ } catch (error) { /* empty */ }
1295
+ };
1296
+
1297
+ var isObject$3 = isObject$a;
1298
+
1299
+ var isPossiblePrototype$1 = function (argument) {
1300
+ return isObject$3(argument) || argument === null;
1301
+ };
1302
+
1303
+ var isPossiblePrototype = isPossiblePrototype$1;
1304
+
1305
+ var $String$1 = String;
1306
+ var $TypeError$9 = TypeError;
1307
+
1308
+ var aPossiblePrototype$1 = function (argument) {
1309
+ if (isPossiblePrototype(argument)) return argument;
1310
+ throw new $TypeError$9("Can't set " + $String$1(argument) + ' as a prototype');
1311
+ };
1312
+
1313
+ /* eslint-disable no-proto -- safe */
1314
+ var uncurryThisAccessor$1 = functionUncurryThisAccessor;
1315
+ var isObject$2 = isObject$a;
1316
+ var requireObjectCoercible$5 = requireObjectCoercible$8;
1317
+ var aPossiblePrototype = aPossiblePrototype$1;
1318
+
1319
+ // `Object.setPrototypeOf` method
1320
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
1321
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
1322
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
1323
+ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1324
+ var CORRECT_SETTER = false;
1325
+ var test = {};
1326
+ var setter;
1327
+ try {
1328
+ setter = uncurryThisAccessor$1(Object.prototype, '__proto__', 'set');
1329
+ setter(test, []);
1330
+ CORRECT_SETTER = test instanceof Array;
1331
+ } catch (error) { /* empty */ }
1332
+ return function setPrototypeOf(O, proto) {
1333
+ requireObjectCoercible$5(O);
1334
+ aPossiblePrototype(proto);
1335
+ if (!isObject$2(O)) return O;
1336
+ if (CORRECT_SETTER) setter(O, proto);
1337
+ else O.__proto__ = proto;
1338
+ return O;
1339
+ };
1340
+ }() : undefined);
1341
+
1342
+ var $$g = _export;
1343
+ var call$g = functionCall;
1344
+ var FunctionName = functionName;
1345
+ var isCallable$6 = isCallable$j;
1346
+ var createIteratorConstructor = iteratorCreateConstructor;
1347
+ var getPrototypeOf$1 = objectGetPrototypeOf;
1348
+ var setPrototypeOf = objectSetPrototypeOf;
1349
+ var setToStringTag$1 = setToStringTag$3;
1350
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$6;
1351
+ var defineBuiltIn$3 = defineBuiltIn$6;
1352
+ var wellKnownSymbol$b = wellKnownSymbol$g;
1353
+ var Iterators$3 = iterators;
1354
+ var IteratorsCore = iteratorsCore;
1355
+
1356
+ var PROPER_FUNCTION_NAME$1 = FunctionName.PROPER;
1357
+ var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1358
+ var IteratorPrototype$2 = IteratorsCore.IteratorPrototype;
1359
+ var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1360
+ var ITERATOR$4 = wellKnownSymbol$b('iterator');
1361
+ var KEYS = 'keys';
1362
+ var VALUES = 'values';
1363
+ var ENTRIES = 'entries';
1364
+
1365
+ var returnThis = function () { return this; };
1366
+
1367
+ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1368
+ createIteratorConstructor(IteratorConstructor, NAME, next);
1369
+
1370
+ var getIterationMethod = function (KIND) {
1371
+ if (KIND === DEFAULT && defaultIterator) return defaultIterator;
1372
+ if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];
1373
+
1374
+ switch (KIND) {
1375
+ case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
1376
+ case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
1377
+ case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
1378
+ }
1379
+
1380
+ return function () { return new IteratorConstructor(this); };
1381
+ };
1382
+
1383
+ var TO_STRING_TAG = NAME + ' Iterator';
1384
+ var INCORRECT_VALUES_NAME = false;
1385
+ var IterablePrototype = Iterable.prototype;
1386
+ var nativeIterator = IterablePrototype[ITERATOR$4]
1387
+ || IterablePrototype['@@iterator']
1388
+ || DEFAULT && IterablePrototype[DEFAULT];
1389
+ var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
1390
+ var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
1391
+ var CurrentIteratorPrototype, methods, KEY;
1392
+
1393
+ // fix native
1394
+ if (anyNativeIterator) {
1395
+ CurrentIteratorPrototype = getPrototypeOf$1(anyNativeIterator.call(new Iterable()));
1396
+ if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1397
+ if (getPrototypeOf$1(CurrentIteratorPrototype) !== IteratorPrototype$2) {
1398
+ if (setPrototypeOf) {
1399
+ setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2);
1400
+ } else if (!isCallable$6(CurrentIteratorPrototype[ITERATOR$4])) {
1401
+ defineBuiltIn$3(CurrentIteratorPrototype, ITERATOR$4, returnThis);
1402
+ }
1403
+ }
1404
+ // Set @@toStringTag to native iterators
1405
+ setToStringTag$1(CurrentIteratorPrototype, TO_STRING_TAG, true);
1406
+ }
1407
+ }
1408
+
1409
+ // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1410
+ if (PROPER_FUNCTION_NAME$1 && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1411
+ if (CONFIGURABLE_FUNCTION_NAME) {
1412
+ createNonEnumerableProperty$3(IterablePrototype, 'name', VALUES);
1413
+ } else {
1414
+ INCORRECT_VALUES_NAME = true;
1415
+ defaultIterator = function values() { return call$g(nativeIterator, this); };
1416
+ }
1417
+ }
1418
+
1419
+ // export additional methods
1420
+ if (DEFAULT) {
1421
+ methods = {
1422
+ values: getIterationMethod(VALUES),
1423
+ keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
1424
+ entries: getIterationMethod(ENTRIES)
1425
+ };
1426
+ if (FORCED) for (KEY in methods) {
1427
+ if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1428
+ defineBuiltIn$3(IterablePrototype, KEY, methods[KEY]);
1429
+ }
1430
+ } else $$g({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1431
+ }
1432
+
1433
+ // define iterator
1434
+ if (IterablePrototype[ITERATOR$4] !== defaultIterator) {
1435
+ defineBuiltIn$3(IterablePrototype, ITERATOR$4, defaultIterator, { name: DEFAULT });
1436
+ }
1437
+ Iterators$3[NAME] = defaultIterator;
1438
+
1439
+ return methods;
1440
+ };
1441
+
1442
+ // `CreateIterResultObject` abstract operation
1443
+ // https://tc39.es/ecma262/#sec-createiterresultobject
1444
+ var createIterResultObject$2 = function (value, done) {
1445
+ return { value: value, done: done };
1446
+ };
1447
+
1448
+ var toIndexedObject = toIndexedObject$5;
1449
+ var addToUnscopables = addToUnscopables$2;
1450
+ var Iterators$2 = iterators;
1451
+ var InternalStateModule$1 = internalState;
1452
+ var defineProperty$1 = objectDefineProperty.f;
1453
+ var defineIterator = iteratorDefine;
1454
+ var createIterResultObject$1 = createIterResultObject$2;
1455
+ var DESCRIPTORS$4 = descriptors;
1456
+
1457
+ var ARRAY_ITERATOR = 'Array Iterator';
1458
+ var setInternalState$1 = InternalStateModule$1.set;
1459
+ var getInternalState$1 = InternalStateModule$1.getterFor(ARRAY_ITERATOR);
1460
+
1461
+ // `Array.prototype.entries` method
1462
+ // https://tc39.es/ecma262/#sec-array.prototype.entries
1463
+ // `Array.prototype.keys` method
1464
+ // https://tc39.es/ecma262/#sec-array.prototype.keys
1465
+ // `Array.prototype.values` method
1466
+ // https://tc39.es/ecma262/#sec-array.prototype.values
1467
+ // `Array.prototype[@@iterator]` method
1468
+ // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
1469
+ // `CreateArrayIterator` internal method
1470
+ // https://tc39.es/ecma262/#sec-createarrayiterator
1471
+ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1472
+ setInternalState$1(this, {
1473
+ type: ARRAY_ITERATOR,
1474
+ target: toIndexedObject(iterated), // target
1475
+ index: 0, // next index
1476
+ kind: kind // kind
1477
+ });
1478
+ // `%ArrayIteratorPrototype%.next` method
1479
+ // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1480
+ }, function () {
1481
+ var state = getInternalState$1(this);
1482
+ var target = state.target;
1483
+ var index = state.index++;
1484
+ if (!target || index >= target.length) {
1485
+ state.target = null;
1486
+ return createIterResultObject$1(undefined, true);
1487
+ }
1488
+ switch (state.kind) {
1489
+ case 'keys': return createIterResultObject$1(index, false);
1490
+ case 'values': return createIterResultObject$1(target[index], false);
1491
+ } return createIterResultObject$1([index, target[index]], false);
1492
+ }, 'values');
1493
+
1494
+ // argumentsList[@@iterator] is %ArrayProto_values%
1495
+ // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
1496
+ // https://tc39.es/ecma262/#sec-createmappedargumentsobject
1497
+ var values = Iterators$2.Arguments = Iterators$2.Array;
1498
+
1499
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1500
+ addToUnscopables('keys');
1501
+ addToUnscopables('values');
1502
+ addToUnscopables('entries');
1503
+
1504
+ // V8 ~ Chrome 45- bug
1505
+ if (DESCRIPTORS$4 && values.name !== 'values') try {
1506
+ defineProperty$1(values, 'name', { value: 'values' });
1507
+ } catch (error) { /* empty */ }
1508
+
1509
+ var wellKnownSymbol$a = wellKnownSymbol$g;
1510
+
1511
+ var TO_STRING_TAG$3 = wellKnownSymbol$a('toStringTag');
1512
+ var test = {};
1513
+
1514
+ test[TO_STRING_TAG$3] = 'z';
1515
+
1516
+ var toStringTagSupport = String(test) === '[object z]';
1517
+
1518
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1519
+ var isCallable$5 = isCallable$j;
1520
+ var classofRaw$1 = classofRaw$2;
1521
+ var wellKnownSymbol$9 = wellKnownSymbol$g;
1522
+
1523
+ var TO_STRING_TAG$2 = wellKnownSymbol$9('toStringTag');
1524
+ var $Object = Object;
1525
+
1526
+ // ES3 wrong here
1527
+ var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments';
1528
+
1529
+ // fallback for IE11 Script Access Denied error
1530
+ var tryGet = function (it, key) {
1531
+ try {
1532
+ return it[key];
1533
+ } catch (error) { /* empty */ }
1534
+ };
1535
+
1536
+ // getting tag from ES6+ `Object.prototype.toString`
1537
+ var classof$5 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1538
+ var O, tag, result;
1539
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
1540
+ // @@toStringTag case
1541
+ : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG$2)) == 'string' ? tag
1542
+ // builtinTag case
1543
+ : CORRECT_ARGUMENTS ? classofRaw$1(O)
1544
+ // ES3 arguments fallback
1545
+ : (result = classofRaw$1(O)) === 'Object' && isCallable$5(O.callee) ? 'Arguments' : result;
1546
+ };
1547
+
1548
+ var classof$4 = classof$5;
1549
+
1550
+ var $String = String;
1551
+
1552
+ var toString$8 = function (argument) {
1553
+ if (classof$4(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
1554
+ return $String(argument);
1555
+ };
1556
+
1557
+ var anObject$d = anObject$i;
1558
+
1559
+ // `RegExp.prototype.flags` getter implementation
1560
+ // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
1561
+ var regexpFlags$1 = function () {
1562
+ var that = anObject$d(this);
1563
+ var result = '';
1564
+ if (that.hasIndices) result += 'd';
1565
+ if (that.global) result += 'g';
1566
+ if (that.ignoreCase) result += 'i';
1567
+ if (that.multiline) result += 'm';
1568
+ if (that.dotAll) result += 's';
1569
+ if (that.unicode) result += 'u';
1570
+ if (that.unicodeSets) result += 'v';
1571
+ if (that.sticky) result += 'y';
1572
+ return result;
1573
+ };
1574
+
1575
+ var fails$9 = fails$l;
1576
+ var globalThis$6 = globalThis_1;
1577
+
1578
+ // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1579
+ var $RegExp$2 = globalThis$6.RegExp;
1580
+
1581
+ var UNSUPPORTED_Y$1 = fails$9(function () {
1582
+ var re = $RegExp$2('a', 'y');
1583
+ re.lastIndex = 2;
1584
+ return re.exec('abcd') !== null;
1585
+ });
1586
+
1587
+ // UC Browser bug
1588
+ // https://github.com/zloirock/core-js/issues/1008
1589
+ UNSUPPORTED_Y$1 || fails$9(function () {
1590
+ return !$RegExp$2('a', 'y').sticky;
1591
+ });
1592
+
1593
+ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$9(function () {
1594
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1595
+ var re = $RegExp$2('^r', 'gy');
1596
+ re.lastIndex = 2;
1597
+ return re.exec('str') !== null;
1598
+ });
1599
+
1600
+ var regexpStickyHelpers = {
1601
+ BROKEN_CARET: BROKEN_CARET};
1602
+
1603
+ var fails$8 = fails$l;
1604
+ var globalThis$5 = globalThis_1;
1605
+
1606
+ // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
1607
+ var $RegExp$1 = globalThis$5.RegExp;
1608
+
1609
+ var regexpUnsupportedDotAll = fails$8(function () {
1610
+ var re = $RegExp$1('.', 's');
1611
+ return !(re.dotAll && re.test('\n') && re.flags === 's');
1612
+ });
1613
+
1614
+ var fails$7 = fails$l;
1615
+ var globalThis$4 = globalThis_1;
1616
+
1617
+ // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
1618
+ var $RegExp = globalThis$4.RegExp;
1619
+
1620
+ var regexpUnsupportedNcg = fails$7(function () {
1621
+ var re = $RegExp('(?<a>b)', 'g');
1622
+ return re.exec('b').groups.a !== 'b' ||
1623
+ 'b'.replace(re, '$<a>c') !== 'bc';
1624
+ });
1625
+
1626
+ /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
1627
+ /* eslint-disable regexp/no-useless-quantifier -- testing */
1628
+ var call$f = functionCall;
1629
+ var uncurryThis$b = functionUncurryThis;
1630
+ var toString$7 = toString$8;
1631
+ var regexpFlags = regexpFlags$1;
1632
+ var stickyHelpers = regexpStickyHelpers;
1633
+ var shared = shared$4;
1634
+ var create$1 = objectCreate;
1635
+ var getInternalState = internalState.get;
1636
+ var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
1637
+ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
1638
+
1639
+ var nativeReplace = shared('native-string-replace', String.prototype.replace);
1640
+ var nativeExec = RegExp.prototype.exec;
1641
+ var patchedExec = nativeExec;
1642
+ var charAt$3 = uncurryThis$b(''.charAt);
1643
+ var indexOf = uncurryThis$b(''.indexOf);
1644
+ var replace$1 = uncurryThis$b(''.replace);
1645
+ var stringSlice$4 = uncurryThis$b(''.slice);
1646
+
1647
+ var UPDATES_LAST_INDEX_WRONG = (function () {
1648
+ var re1 = /a/;
1649
+ var re2 = /b*/g;
1650
+ call$f(nativeExec, re1, 'a');
1651
+ call$f(nativeExec, re2, 'a');
1652
+ return re1.lastIndex !== 0 || re2.lastIndex !== 0;
1653
+ })();
1654
+
1655
+ var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
1656
+
1657
+ // nonparticipating capturing group, copied from es5-shim's String#split patch.
1658
+ var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
1659
+
1660
+ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
1661
+
1662
+ if (PATCH) {
1663
+ patchedExec = function exec(string) {
1664
+ var re = this;
1665
+ var state = getInternalState(re);
1666
+ var str = toString$7(string);
1667
+ var raw = state.raw;
1668
+ var result, reCopy, lastIndex, match, i, object, group;
1669
+
1670
+ if (raw) {
1671
+ raw.lastIndex = re.lastIndex;
1672
+ result = call$f(patchedExec, raw, str);
1673
+ re.lastIndex = raw.lastIndex;
1674
+ return result;
1675
+ }
1676
+
1677
+ var groups = state.groups;
1678
+ var sticky = UNSUPPORTED_Y && re.sticky;
1679
+ var flags = call$f(regexpFlags, re);
1680
+ var source = re.source;
1681
+ var charsAdded = 0;
1682
+ var strCopy = str;
1683
+
1684
+ if (sticky) {
1685
+ flags = replace$1(flags, 'y', '');
1686
+ if (indexOf(flags, 'g') === -1) {
1687
+ flags += 'g';
1688
+ }
1689
+
1690
+ strCopy = stringSlice$4(str, re.lastIndex);
1691
+ // Support anchored sticky behavior.
1692
+ if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
1693
+ source = '(?: ' + source + ')';
1694
+ strCopy = ' ' + strCopy;
1695
+ charsAdded++;
1696
+ }
1697
+ // ^(? + rx + ) is needed, in combination with some str slicing, to
1698
+ // simulate the 'y' flag.
1699
+ reCopy = new RegExp('^(?:' + source + ')', flags);
1700
+ }
1701
+
1702
+ if (NPCG_INCLUDED) {
1703
+ reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
1704
+ }
1705
+ if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
1706
+
1707
+ match = call$f(nativeExec, sticky ? reCopy : re, strCopy);
1708
+
1709
+ if (sticky) {
1710
+ if (match) {
1711
+ match.input = stringSlice$4(match.input, charsAdded);
1712
+ match[0] = stringSlice$4(match[0], charsAdded);
1713
+ match.index = re.lastIndex;
1714
+ re.lastIndex += match[0].length;
1715
+ } else re.lastIndex = 0;
1716
+ } else if (UPDATES_LAST_INDEX_WRONG && match) {
1717
+ re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
1718
+ }
1719
+ if (NPCG_INCLUDED && match && match.length > 1) {
1720
+ // Fix browsers whose `exec` methods don't consistently return `undefined`
1721
+ // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
1722
+ call$f(nativeReplace, match[0], reCopy, function () {
1723
+ for (i = 1; i < arguments.length - 2; i++) {
1724
+ if (arguments[i] === undefined) match[i] = undefined;
1725
+ }
1726
+ });
1727
+ }
1728
+
1729
+ if (match && groups) {
1730
+ match.groups = object = create$1(null);
1731
+ for (i = 0; i < groups.length; i++) {
1732
+ group = groups[i];
1733
+ object[group[0]] = match[group[1]];
1734
+ }
1735
+ }
1736
+
1737
+ return match;
1738
+ };
1739
+ }
1740
+
1741
+ var regexpExec$2 = patchedExec;
1742
+
1743
+ var $$f = _export;
1744
+ var exec$2 = regexpExec$2;
1745
+
1746
+ // `RegExp.prototype.exec` method
1747
+ // https://tc39.es/ecma262/#sec-regexp.prototype.exec
1748
+ $$f({ target: 'RegExp', proto: true, forced: /./.exec !== exec$2 }, {
1749
+ exec: exec$2
1750
+ });
1751
+
1752
+ var call$e = functionCall;
1753
+ var hasOwn$3 = hasOwnProperty_1;
1754
+ var isPrototypeOf$2 = objectIsPrototypeOf;
1755
+ var regExpFlags = regexpFlags$1;
1756
+
1757
+ var RegExpPrototype$2 = RegExp.prototype;
1758
+
1759
+ var regexpGetFlags = function (R) {
1760
+ var flags = R.flags;
1761
+ return flags === undefined && !('flags' in RegExpPrototype$2) && !hasOwn$3(R, 'flags') && isPrototypeOf$2(RegExpPrototype$2, R)
1762
+ ? call$e(regExpFlags, R) : flags;
1763
+ };
1764
+
1765
+ var PROPER_FUNCTION_NAME = functionName.PROPER;
1766
+ var defineBuiltIn$2 = defineBuiltIn$6;
1767
+ var anObject$c = anObject$i;
1768
+ var $toString = toString$8;
1769
+ var fails$6 = fails$l;
1770
+ var getRegExpFlags = regexpGetFlags;
1771
+
1772
+ var TO_STRING = 'toString';
1773
+ var RegExpPrototype$1 = RegExp.prototype;
1774
+ var nativeToString = RegExpPrototype$1[TO_STRING];
1775
+
1776
+ var NOT_GENERIC = fails$6(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
1777
+ // FF44- RegExp#toString has a wrong name
1778
+ var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
1779
+
1780
+ // `RegExp.prototype.toString` method
1781
+ // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
1782
+ if (NOT_GENERIC || INCORRECT_NAME) {
1783
+ defineBuiltIn$2(RegExpPrototype$1, TO_STRING, function toString() {
1784
+ var R = anObject$c(this);
1785
+ var pattern = $toString(R.source);
1786
+ var flags = $toString(getRegExpFlags(R));
1787
+ return '/' + pattern + '/' + flags;
1788
+ }, { unsafe: true });
1789
+ }
1790
+
1791
+ var isObject$1 = isObject$a;
1792
+ var classof$3 = classofRaw$2;
1793
+ var wellKnownSymbol$8 = wellKnownSymbol$g;
1794
+
1795
+ var MATCH$1 = wellKnownSymbol$8('match');
1796
+
1797
+ // `IsRegExp` abstract operation
1798
+ // https://tc39.es/ecma262/#sec-isregexp
1799
+ var isRegexp = function (it) {
1800
+ var isRegExp;
1801
+ return isObject$1(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$3(it) === 'RegExp');
1802
+ };
1803
+
1804
+ var isRegExp = isRegexp;
1805
+
1806
+ var $TypeError$8 = TypeError;
1807
+
1808
+ var notARegexp = function (it) {
1809
+ if (isRegExp(it)) {
1810
+ throw new $TypeError$8("The method doesn't accept regular expressions");
1811
+ } return it;
1812
+ };
1813
+
1814
+ var wellKnownSymbol$7 = wellKnownSymbol$g;
1815
+
1816
+ var MATCH = wellKnownSymbol$7('match');
1817
+
1818
+ var correctIsRegexpLogic = function (METHOD_NAME) {
1819
+ var regexp = /./;
1820
+ try {
1821
+ '/./'[METHOD_NAME](regexp);
1822
+ } catch (error1) {
1823
+ try {
1824
+ regexp[MATCH] = false;
1825
+ return '/./'[METHOD_NAME](regexp);
1826
+ } catch (error2) { /* empty */ }
1827
+ } return false;
1828
+ };
1829
+
1830
+ var $$e = _export;
1831
+ var uncurryThis$a = functionUncurryThis;
1832
+ var notARegExp$1 = notARegexp;
1833
+ var requireObjectCoercible$4 = requireObjectCoercible$8;
1834
+ var toString$6 = toString$8;
1835
+ var correctIsRegExpLogic$1 = correctIsRegexpLogic;
1836
+
1837
+ var stringIndexOf$1 = uncurryThis$a(''.indexOf);
1838
+
1839
+ // `String.prototype.includes` method
1840
+ // https://tc39.es/ecma262/#sec-string.prototype.includes
1841
+ $$e({ target: 'String', proto: true, forced: !correctIsRegExpLogic$1('includes') }, {
1842
+ includes: function includes(searchString /* , position = 0 */) {
1843
+ return !!~stringIndexOf$1(
1844
+ toString$6(requireObjectCoercible$4(this)),
1845
+ toString$6(notARegExp$1(searchString)),
1846
+ arguments.length > 1 ? arguments[1] : undefined
1847
+ );
1848
+ }
1849
+ });
1850
+
1851
+ // TODO: Remove from `core-js@4` since it's moved to entry points
1852
+
1853
+ var call$d = functionCall;
1854
+ var defineBuiltIn$1 = defineBuiltIn$6;
1855
+ var regexpExec$1 = regexpExec$2;
1856
+ var fails$5 = fails$l;
1857
+ var wellKnownSymbol$6 = wellKnownSymbol$g;
1858
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$6;
1859
+
1860
+ var SPECIES = wellKnownSymbol$6('species');
1861
+ var RegExpPrototype = RegExp.prototype;
1862
+
1863
+ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
1864
+ var SYMBOL = wellKnownSymbol$6(KEY);
1865
+
1866
+ var DELEGATES_TO_SYMBOL = !fails$5(function () {
1867
+ // String methods call symbol-named RegExp methods
1868
+ var O = {};
1869
+ O[SYMBOL] = function () { return 7; };
1870
+ return ''[KEY](O) !== 7;
1871
+ });
1872
+
1873
+ var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$5(function () {
1874
+ // Symbol-named RegExp methods call .exec
1875
+ var execCalled = false;
1876
+ var re = /a/;
1877
+
1878
+ if (KEY === 'split') {
1879
+ // We can't use real regex here since it causes deoptimization
1880
+ // and serious performance degradation in V8
1881
+ // https://github.com/zloirock/core-js/issues/306
1882
+ re = {};
1883
+ // RegExp[@@split] doesn't call the regex's exec method, but first creates
1884
+ // a new one. We need to return the patched regex when creating the new one.
1885
+ re.constructor = {};
1886
+ re.constructor[SPECIES] = function () { return re; };
1887
+ re.flags = '';
1888
+ re[SYMBOL] = /./[SYMBOL];
1889
+ }
1890
+
1891
+ re.exec = function () {
1892
+ execCalled = true;
1893
+ return null;
1894
+ };
1895
+
1896
+ re[SYMBOL]('');
1897
+ return !execCalled;
1898
+ });
1899
+
1900
+ if (
1901
+ !DELEGATES_TO_SYMBOL ||
1902
+ !DELEGATES_TO_EXEC ||
1903
+ FORCED
1904
+ ) {
1905
+ var nativeRegExpMethod = /./[SYMBOL];
1906
+ var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
1907
+ var $exec = regexp.exec;
1908
+ if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
1909
+ if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
1910
+ // The native String method already delegates to @@method (this
1911
+ // polyfilled function), leasing to infinite recursion.
1912
+ // We avoid it by directly calling the native @@method method.
1913
+ return { done: true, value: call$d(nativeRegExpMethod, regexp, str, arg2) };
1914
+ }
1915
+ return { done: true, value: call$d(nativeMethod, str, regexp, arg2) };
1916
+ }
1917
+ return { done: false };
1918
+ });
1919
+
1920
+ defineBuiltIn$1(String.prototype, KEY, methods[0]);
1921
+ defineBuiltIn$1(RegExpPrototype, SYMBOL, methods[1]);
1922
+ }
1923
+
1924
+ if (SHAM) createNonEnumerableProperty$2(RegExpPrototype[SYMBOL], 'sham', true);
1925
+ };
1926
+
1927
+ var uncurryThis$9 = functionUncurryThis;
1928
+ var toIntegerOrInfinity$2 = toIntegerOrInfinity$5;
1929
+ var toString$5 = toString$8;
1930
+ var requireObjectCoercible$3 = requireObjectCoercible$8;
1931
+
1932
+ var charAt$2 = uncurryThis$9(''.charAt);
1933
+ var charCodeAt = uncurryThis$9(''.charCodeAt);
1934
+ var stringSlice$3 = uncurryThis$9(''.slice);
1935
+
1936
+ var createMethod = function (CONVERT_TO_STRING) {
1937
+ return function ($this, pos) {
1938
+ var S = toString$5(requireObjectCoercible$3($this));
1939
+ var position = toIntegerOrInfinity$2(pos);
1940
+ var size = S.length;
1941
+ var first, second;
1942
+ if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
1943
+ first = charCodeAt(S, position);
1944
+ return first < 0xD800 || first > 0xDBFF || position + 1 === size
1945
+ || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
1946
+ ? CONVERT_TO_STRING
1947
+ ? charAt$2(S, position)
1948
+ : first
1949
+ : CONVERT_TO_STRING
1950
+ ? stringSlice$3(S, position, position + 2)
1951
+ : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
1952
+ };
1953
+ };
1954
+
1955
+ var stringMultibyte = {
1956
+ // `String.prototype.at` method
1957
+ // https://github.com/mathiasbynens/String.prototype.at
1958
+ charAt: createMethod(true)
1959
+ };
1960
+
1961
+ var charAt$1 = stringMultibyte.charAt;
1962
+
1963
+ // `AdvanceStringIndex` abstract operation
1964
+ // https://tc39.es/ecma262/#sec-advancestringindex
1965
+ var advanceStringIndex$2 = function (S, index, unicode) {
1966
+ return index + (unicode ? charAt$1(S, index).length : 1);
1967
+ };
1968
+
1969
+ var call$c = functionCall;
1970
+ var anObject$b = anObject$i;
1971
+ var isCallable$4 = isCallable$j;
1972
+ var classof$2 = classofRaw$2;
1973
+ var regexpExec = regexpExec$2;
1974
+
1975
+ var $TypeError$7 = TypeError;
1976
+
1977
+ // `RegExpExec` abstract operation
1978
+ // https://tc39.es/ecma262/#sec-regexpexec
1979
+ var regexpExecAbstract = function (R, S) {
1980
+ var exec = R.exec;
1981
+ if (isCallable$4(exec)) {
1982
+ var result = call$c(exec, R, S);
1983
+ if (result !== null) anObject$b(result);
1984
+ return result;
1985
+ }
1986
+ if (classof$2(R) === 'RegExp') return call$c(regexpExec, R, S);
1987
+ throw new $TypeError$7('RegExp#exec called on incompatible receiver');
1988
+ };
1989
+
1990
+ var call$b = functionCall;
1991
+ var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
1992
+ var anObject$a = anObject$i;
1993
+ var isNullOrUndefined$2 = isNullOrUndefined$5;
1994
+ var toLength$2 = toLength$4;
1995
+ var toString$4 = toString$8;
1996
+ var requireObjectCoercible$2 = requireObjectCoercible$8;
1997
+ var getMethod$4 = getMethod$6;
1998
+ var advanceStringIndex$1 = advanceStringIndex$2;
1999
+ var regExpExec$1 = regexpExecAbstract;
2000
+
2001
+ // @@match logic
2002
+ fixRegExpWellKnownSymbolLogic$1('match', function (MATCH, nativeMatch, maybeCallNative) {
2003
+ return [
2004
+ // `String.prototype.match` method
2005
+ // https://tc39.es/ecma262/#sec-string.prototype.match
2006
+ function match(regexp) {
2007
+ var O = requireObjectCoercible$2(this);
2008
+ var matcher = isNullOrUndefined$2(regexp) ? undefined : getMethod$4(regexp, MATCH);
2009
+ return matcher ? call$b(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString$4(O));
2010
+ },
2011
+ // `RegExp.prototype[@@match]` method
2012
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
2013
+ function (string) {
2014
+ var rx = anObject$a(this);
2015
+ var S = toString$4(string);
2016
+ var res = maybeCallNative(nativeMatch, rx, S);
2017
+
2018
+ if (res.done) return res.value;
2019
+
2020
+ if (!rx.global) return regExpExec$1(rx, S);
2021
+
2022
+ var fullUnicode = rx.unicode;
2023
+ rx.lastIndex = 0;
2024
+ var A = [];
2025
+ var n = 0;
2026
+ var result;
2027
+ while ((result = regExpExec$1(rx, S)) !== null) {
2028
+ var matchStr = toString$4(result[0]);
2029
+ A[n] = matchStr;
2030
+ if (matchStr === '') rx.lastIndex = advanceStringIndex$1(S, toLength$2(rx.lastIndex), fullUnicode);
2031
+ n++;
2032
+ }
2033
+ return n === 0 ? null : A;
2034
+ }
2035
+ ];
2036
+ });
2037
+
2038
+ // iterable DOM collections
2039
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
2040
+ var domIterables = {
2041
+ CSSRuleList: 0,
2042
+ CSSStyleDeclaration: 0,
2043
+ CSSValueList: 0,
2044
+ ClientRectList: 0,
2045
+ DOMRectList: 0,
2046
+ DOMStringList: 0,
2047
+ DOMTokenList: 1,
2048
+ DataTransferItemList: 0,
2049
+ FileList: 0,
2050
+ HTMLAllCollection: 0,
2051
+ HTMLCollection: 0,
2052
+ HTMLFormElement: 0,
2053
+ HTMLSelectElement: 0,
2054
+ MediaList: 0,
2055
+ MimeTypeArray: 0,
2056
+ NamedNodeMap: 0,
2057
+ NodeList: 1,
2058
+ PaintRequestList: 0,
2059
+ Plugin: 0,
2060
+ PluginArray: 0,
2061
+ SVGLengthList: 0,
2062
+ SVGNumberList: 0,
2063
+ SVGPathSegList: 0,
2064
+ SVGPointList: 0,
2065
+ SVGStringList: 0,
2066
+ SVGTransformList: 0,
2067
+ SourceBufferList: 0,
2068
+ StyleSheetList: 0,
2069
+ TextTrackCueList: 0,
2070
+ TextTrackList: 0,
2071
+ TouchList: 0
2072
+ };
2073
+
2074
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
2075
+ var documentCreateElement = documentCreateElement$2;
2076
+
2077
+ var classList = documentCreateElement('span').classList;
2078
+ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
2079
+
2080
+ var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
2081
+
2082
+ var globalThis$3 = globalThis_1;
2083
+ var DOMIterables = domIterables;
2084
+ var DOMTokenListPrototype = domTokenListPrototype;
2085
+ var ArrayIteratorMethods = es_array_iterator;
2086
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$6;
2087
+ var setToStringTag = setToStringTag$3;
2088
+ var wellKnownSymbol$5 = wellKnownSymbol$g;
2089
+
2090
+ var ITERATOR$3 = wellKnownSymbol$5('iterator');
2091
+ var ArrayValues = ArrayIteratorMethods.values;
2092
+
2093
+ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
2094
+ if (CollectionPrototype) {
2095
+ // some Chrome versions have non-configurable methods on DOMTokenList
2096
+ if (CollectionPrototype[ITERATOR$3] !== ArrayValues) try {
2097
+ createNonEnumerableProperty$1(CollectionPrototype, ITERATOR$3, ArrayValues);
2098
+ } catch (error) {
2099
+ CollectionPrototype[ITERATOR$3] = ArrayValues;
2100
+ }
2101
+ setToStringTag(CollectionPrototype, COLLECTION_NAME, true);
2102
+ if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
2103
+ // some Chrome versions have non-configurable methods on DOMTokenList
2104
+ if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
2105
+ createNonEnumerableProperty$1(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
2106
+ } catch (error) {
2107
+ CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
2108
+ }
2109
+ }
2110
+ }
2111
+ };
2112
+
2113
+ for (var COLLECTION_NAME in DOMIterables) {
2114
+ handlePrototype(globalThis$3[COLLECTION_NAME] && globalThis$3[COLLECTION_NAME].prototype, COLLECTION_NAME);
2115
+ }
2116
+
2117
+ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
2118
+
2119
+ var build = {exports: {}};
2120
+
2121
+ /*!
2122
+ *
2123
+ * react-simple-keyboard v3.8.15
2124
+ * https://github.com/hodgef/react-simple-keyboard
2125
+ *
2126
+ * Copyright (c) Francisco Hodge (https://github.com/hodgef) and project contributors.
2127
+ *
2128
+ * This source code is licensed under the MIT license found in the
2129
+ * LICENSE file in the root directory of this source tree.
2130
+ *
2131
+ */
2132
+
2133
+ (function (module, exports$1) {
2134
+ !function(t,e){module.exports=e(require$$0);}(commonjsGlobal,(function(t){return function(){var e={981:function(){"undefined"==typeof Element||"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this);}),"undefined"!=typeof self&&"document"in self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&function(t){if("Element"in t){var e="classList",n="prototype",o=t.Element[n],r=Object,i=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},a=Array[n].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return -1},s=function(t,e){this.name=t,this.code=DOMException[t],this.message=e;},u=function(t,e){if(""===e)throw new s("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(e))throw new s("INVALID_CHARACTER_ERR","The token must not contain space characters.");return a.call(t,e)},c=function(t){for(var e=i.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],o=0,r=n.length;o<r;o++)this.push(n[o]);this._updateClassName=function(){t.setAttribute("class",this.toString());};},l=c[n]=[],f=function(){return new c(this)};if(s[n]=Error[n],l.item=function(t){return this[t]||null},l.contains=function(t){return ~u(this,t+"")},l.add=function(){var t,e=arguments,n=0,o=e.length,r=false;do{~u(this,t=e[n]+"")||(this.push(t),r=true);}while(++n<o);r&&this._updateClassName();},l.remove=function(){var t,e,n=arguments,o=0,r=n.length,i=false;do{for(e=u(this,t=n[o]+"");~e;)this.splice(e,1),i=true,e=u(this,t);}while(++o<r);i&&this._updateClassName();},l.toggle=function(t,e){var n=this.contains(t),o=n?true!==e&&"remove":false!==e&&"add";return o&&this[o](t),true===e||false===e?e:!n},l.replace=function(t,e){var n=u(t+"");~n&&(this.splice(n,1,e),this._updateClassName());},l.toString=function(){return this.join(" ")},r.defineProperty){var d={get:f,enumerable:true,configurable:true};try{r.defineProperty(o,e,d);}catch(t){ void 0!==t.number&&-2146823252!==t.number||(d.enumerable=false,r.defineProperty(o,e,d));}}else r[n].__defineGetter__&&o.__defineGetter__(e,f);}}(self),function(){var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var n,o=arguments.length;for(n=0;n<o;n++)t=arguments[n],e.call(this,t);};};e("add"),e("remove");}if(t.classList.toggle("c3",false),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)};}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(t,e){var n=this.toString().split(" "),o=n.indexOf(t+"");~o&&(n=n.slice(o),this.remove.apply(this,n),this.add(e),this.add.apply(this,n.slice(1)));}),t=null;}());},548:function(t){t.exports=function(){var t={9306:function(t,e,n){var o=n(4901),r=n(6823),i=TypeError;t.exports=function(t){if(o(t))return t;throw new i(r(t)+" is not a function")};},5548:function(t,e,n){var o=n(3517),r=n(6823),i=TypeError;t.exports=function(t){if(o(t))return t;throw new i(r(t)+" is not a constructor")};},3506:function(t,e,n){var o=n(3925),r=String,i=TypeError;t.exports=function(t){if(o(t))return t;throw new i("Can't set "+r(t)+" as a prototype")};},6469:function(t,e,n){var o=n(8227),r=n(2360),i=n(4913).f,a=o("unscopables"),s=Array.prototype;void 0===s[a]&&i(s,a,{configurable:true,value:r(null)}),t.exports=function(t){s[a][t]=true;};},7829:function(t,e,n){var o=n(8183).charAt;t.exports=function(t,e,n){return e+(n?o(t,e).length:1)};},8551:function(t,e,n){var o=n(34),r=String,i=TypeError;t.exports=function(t){if(o(t))return t;throw new i(r(t)+" is not an object")};},235:function(t,e,n){var o=n(9213).forEach,r=n(4598)("forEach");t.exports=r?[].forEach:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)};},7916:function(t,e,n){var o=n(6080),r=n(9565),i=n(8981),a=n(6319),s=n(4209),u=n(3517),c=n(6198),l=n(4659),f=n(81),d=n(851),p=Array;t.exports=function(t){var e=i(t),n=u(this),h=arguments.length,v=h>1?arguments[1]:void 0,y=void 0!==v;y&&(v=o(v,h>2?arguments[2]:void 0));var g,m,b,w,x,E,O=d(e),S=0;if(!O||this===p&&s(O))for(g=c(e),m=n?new this(g):p(g);g>S;S++)E=y?v(e[S],S):e[S],l(m,S,E);else for(m=n?new this:[],x=(w=f(e,O)).next;!(b=r(x,w)).done;S++)E=y?a(w,v,[b.value,S],true):b.value,l(m,S,E);return m.length=S,m};},9617:function(t,e,n){var o=n(5397),r=n(5610),i=n(6198),a=function(t){return function(e,n,a){var s=o(e),u=i(s);if(0===u)return !t&&-1;var c,l=r(a,u);if(t&&n!=n){for(;u>l;)if((c=s[l++])!=c)return true}else for(;u>l;l++)if((t||l in s)&&s[l]===n)return t||l||0;return !t&&-1}};t.exports={includes:a(true),indexOf:a(false)};},9213:function(t,e,n){var o=n(6080),r=n(9504),i=n(7055),a=n(8981),s=n(6198),u=n(1469),c=r([].push),l=function(t){var e=1===t,n=2===t,r=3===t,l=4===t,f=6===t,d=7===t,p=5===t||f;return function(h,v,y,g){for(var m,b,w=a(h),x=i(w),E=s(x),O=o(v,y),S=0,k=g||u,P=e?k(h,E):n||d?k(h,0):void 0;E>S;S++)if((p||S in x)&&(b=O(m=x[S],S,w),t))if(e)P[S]=b;else if(b)switch(t){case 3:return true;case 5:return m;case 6:return S;case 2:c(P,m);}else switch(t){case 4:return false;case 7:c(P,m);}return f?-1:r||l?l:P}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)};},597:function(t,e,n){var o=n(9039),r=n(8227),i=n(9519),a=r("species");t.exports=function(t){return i>=51||!o((function(){var e=[];return (e.constructor={})[a]=function(){return {foo:1}},1!==e[t](Boolean).foo}))};},4598:function(t,e,n){var o=n(9039);t.exports=function(t,e){var n=[][t];return !!n&&o((function(){n.call(null,e||function(){return 1},1);}))};},926:function(t,e,n){var o=n(9306),r=n(8981),i=n(7055),a=n(6198),s=TypeError,u="Reduce of empty array with no initial value",c=function(t){return function(e,n,c,l){var f=r(e),d=i(f),p=a(f);if(o(n),0===p&&c<2)throw new s(u);var h=t?p-1:0,v=t?-1:1;if(c<2)for(;;){if(h in d){l=d[h],h+=v;break}if(h+=v,t?h<0:p<=h)throw new s(u)}for(;t?h>=0:p>h;h+=v)h in d&&(l=n(l,d[h],h,f));return l}};t.exports={left:c(false),right:c(true)};},4527:function(t,e,n){var o=n(3724),r=n(4376),i=TypeError,a=Object.getOwnPropertyDescriptor,s=o&&!function(){if(void 0!==this)return true;try{Object.defineProperty([],"length",{writable:!1}).length=1;}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(r(t)&&!a(t,"length").writable)throw new i("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e};},7680:function(t,e,n){var o=n(9504);t.exports=o([].slice);},4488:function(t,e,n){var o=n(7680),r=Math.floor,i=function(t,e){var n=t.length;if(n<8)for(var a,s,u=1;u<n;){for(s=u,a=t[u];s&&e(t[s-1],a)>0;)t[s]=t[--s];s!==u++&&(t[s]=a);}else for(var c=r(n/2),l=i(o(t,0,c),e),f=i(o(t,c),e),d=l.length,p=f.length,h=0,v=0;h<d||v<p;)t[h+v]=h<d&&v<p?e(l[h],f[v])<=0?l[h++]:f[v++]:h<d?l[h++]:f[v++];return t};t.exports=i;},7433:function(t,e,n){var o=n(4376),r=n(3517),i=n(34),a=n(8227)("species"),s=Array;t.exports=function(t){var e;return o(t)&&(e=t.constructor,(r(e)&&(e===s||o(e.prototype))||i(e)&&null===(e=e[a]))&&(e=void 0)),void 0===e?s:e};},1469:function(t,e,n){var o=n(7433);t.exports=function(t,e){return new(o(t))(0===e?0:e)};},6319:function(t,e,n){var o=n(8551),r=n(9539);t.exports=function(t,e,n,i){try{return i?e(o(n)[0],n[1]):e(n)}catch(e){r(t,"throw",e);}};},4428:function(t,e,n){var o=n(8227)("iterator"),r=false;try{var i=0,a={next:function(){return {done:!!i++}},return:function(){r=!0;}};a[o]=function(){return this},Array.from(a,(function(){throw 2}));}catch(t){}t.exports=function(t,e){try{if(!e&&!r)return !1}catch(t){return false}var n=false;try{var i={};i[o]=function(){return {next:function(){return {done:n=!0}}}},t(i);}catch(t){}return n};},2195:function(t,e,n){var o=n(9504),r=o({}.toString),i=o("".slice);t.exports=function(t){return i(r(t),8,-1)};},6955:function(t,e,n){var o=n(2140),r=n(4901),i=n(2195),a=n(8227)("toStringTag"),s=Object,u="Arguments"===i(function(){return arguments}());t.exports=o?i:function(t){var e,n,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=s(t),a))?n:u?i(e):"Object"===(o=i(e))&&r(e.callee)?"Arguments":o};},7740:function(t,e,n){var o=n(9297),r=n(5031),i=n(7347),a=n(4913);t.exports=function(t,e,n){for(var s=r(e),u=a.f,c=i.f,l=0;l<s.length;l++){var f=s[l];o(t,f)||n&&o(n,f)||u(t,f,c(e,f));}};},1436:function(t,e,n){var o=n(8227)("match");t.exports=function(t){var e=/./;try{"/./"[t](e);}catch(n){try{return e[o]=!1,"/./"[t](e)}catch(t){}}return false};},2211:function(t,e,n){var o=n(9039);t.exports=!o((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}));},2529:function(t){t.exports=function(t,e){return {value:t,done:e}};},6699:function(t,e,n){var o=n(3724),r=n(4913),i=n(6980);t.exports=o?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t};},6980:function(t){t.exports=function(t,e){return {enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}};},4659:function(t,e,n){var o=n(3724),r=n(4913),i=n(6980);t.exports=function(t,e,n){o?r.f(t,e,i(0,n)):t[e]=n;};},3640:function(t,e,n){var o=n(8551),r=n(4270),i=TypeError;t.exports=function(t){if(o(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw new i("Incorrect hint");return r(this,t)};},2106:function(t,e,n){var o=n(283),r=n(4913);t.exports=function(t,e,n){return n.get&&o(n.get,e,{getter:true}),n.set&&o(n.set,e,{setter:true}),r.f(t,e,n)};},6840:function(t,e,n){var o=n(4901),r=n(4913),i=n(283),a=n(9433);t.exports=function(t,e,n,s){s||(s={});var u=s.enumerable,c=void 0!==s.name?s.name:e;if(o(n)&&i(n,c,s),s.global)u?t[e]=n:a(e,n);else {try{s.unsafe?t[e]&&(u=!0):delete t[e];}catch(t){}u?t[e]=n:r.f(t,e,{value:n,enumerable:false,configurable:!s.nonConfigurable,writable:!s.nonWritable});}return t};},9433:function(t,e,n){var o=n(4576),r=Object.defineProperty;t.exports=function(t,e){try{r(o,t,{value:e,configurable:!0,writable:!0});}catch(n){o[t]=e;}return e};},4606:function(t,e,n){var o=n(6823),r=TypeError;t.exports=function(t,e){if(!delete t[e])throw new r("Cannot delete property "+o(e)+" of "+o(t))};},3724:function(t,e,n){var o=n(9039);t.exports=!o((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}));},4055:function(t,e,n){var o=n(4576),r=n(34),i=o.document,a=r(i)&&r(i.createElement);t.exports=function(t){return a?i.createElement(t):{}};},6837:function(t){var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t};},7400:function(t){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};},9296:function(t,e,n){var o=n(4055)("span").classList,r=o&&o.constructor&&o.constructor.prototype;t.exports=r===Object.prototype?void 0:r;},8727:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"];},3709:function(t,e,n){var o=n(2839).match(/firefox\/(\d+)/i);t.exports=!!o&&+o[1];},3763:function(t,e,n){var o=n(2839);t.exports=/MSIE|Trident/.test(o);},6193:function(t,e,n){var o=n(4215);t.exports="NODE"===o;},2839:function(t,e,n){var o=n(4576).navigator,r=o&&o.userAgent;t.exports=r?String(r):"";},9519:function(t,e,n){var o,r,i=n(4576),a=n(2839),s=i.process,u=i.Deno,c=s&&s.versions||u&&u.version,l=c&&c.v8;l&&(r=(o=l.split("."))[0]>0&&o[0]<4?1:+(o[0]+o[1])),!r&&a&&(!(o=a.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=a.match(/Chrome\/(\d+)/))&&(r=+o[1]),t.exports=r;},3607:function(t,e,n){var o=n(2839).match(/AppleWebKit\/(\d+)\./);t.exports=!!o&&+o[1];},4215:function(t,e,n){var o=n(4576),r=n(2839),i=n(2195),a=function(t){return r.slice(0,t.length)===t};t.exports=a("Bun/")?"BUN":a("Cloudflare-Workers")?"CLOUDFLARE":a("Deno/")?"DENO":a("Node.js/")?"NODE":o.Bun&&"string"==typeof Bun.version?"BUN":o.Deno&&"object"==typeof Deno.version?"DENO":"process"===i(o.process)?"NODE":o.window&&o.document?"BROWSER":"REST";},6518:function(t,e,n){var o=n(4576),r=n(7347).f,i=n(6699),a=n(6840),s=n(9433),u=n(7740),c=n(2796);t.exports=function(t,e){var n,l,f,d,p,h=t.target,v=t.global,y=t.stat;if(n=v?o:y?o[h]||s(h,{}):o[h]&&o[h].prototype)for(l in e){if(d=e[l],f=t.dontCallGetSet?(p=r(n,l))&&p.value:n[l],!c(v?l:h+(y?".":"#")+l,t.forced)&&void 0!==f){if(typeof d==typeof f)continue;u(d,f);}(t.sham||f&&f.sham)&&i(d,"sham",true),a(n,l,d,t);}};},9039:function(t){t.exports=function(t){try{return !!t()}catch(t){return true}};},9228:function(t,e,n){n(7495);var o=n(9565),r=n(6840),i=n(7323),a=n(9039),s=n(8227),u=n(6699),c=s("species"),l=RegExp.prototype;t.exports=function(t,e,n,f){var d=s(t),p=!a((function(){var e={};return e[d]=function(){return 7},7!==""[t](e)})),h=p&&!a((function(){var e=false,n=/a/;return "split"===t&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[d]=/./[d]),n.exec=function(){return e=true,null},n[d](""),!e}));if(!p||!h||n){var v=/./[d],y=e(d,""[t],(function(t,e,n,r,a){var s=e.exec;return s===i||s===l.exec?p&&!a?{done:true,value:o(v,e,n,r)}:{done:true,value:o(t,n,e,r)}:{done:false}}));r(String.prototype,t,y[0]),r(l,d,y[1]);}f&&u(l[d],"sham",true);};},8745:function(t,e,n){var o=n(616),r=Function.prototype,i=r.apply,a=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(o?a.bind(i):function(){return a.apply(i,arguments)});},6080:function(t,e,n){var o=n(7476),r=n(9306),i=n(616),a=o(o.bind);t.exports=function(t,e){return r(t),void 0===e?t:i?a(t,e):function(){return t.apply(e,arguments)}};},616:function(t,e,n){var o=n(9039);t.exports=!o((function(){var t=function(){}.bind();return "function"!=typeof t||t.hasOwnProperty("prototype")}));},9565:function(t,e,n){var o=n(616),r=Function.prototype.call;t.exports=o?r.bind(r):function(){return r.apply(r,arguments)};},350:function(t,e,n){var o=n(3724),r=n(9297),i=Function.prototype,a=o&&Object.getOwnPropertyDescriptor,s=r(i,"name"),u=s&&"something"===function(){}.name,c=s&&(!o||o&&a(i,"name").configurable);t.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c};},6706:function(t,e,n){var o=n(9504),r=n(9306);t.exports=function(t,e,n){try{return o(r(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}};},7476:function(t,e,n){var o=n(2195),r=n(9504);t.exports=function(t){if("Function"===o(t))return r(t)};},9504:function(t,e,n){var o=n(616),r=Function.prototype,i=r.call,a=o&&r.bind.bind(i,i);t.exports=o?a:function(t){return function(){return i.apply(t,arguments)}};},7751:function(t,e,n){var o=n(4576),r=n(4901);t.exports=function(t,e){return arguments.length<2?(n=o[t],r(n)?n:void 0):o[t]&&o[t][e];var n;};},851:function(t,e,n){var o=n(6955),r=n(5966),i=n(4117),a=n(6269),s=n(8227)("iterator");t.exports=function(t){if(!i(t))return r(t,s)||r(t,"@@iterator")||a[o(t)]};},81:function(t,e,n){var o=n(9565),r=n(9306),i=n(8551),a=n(6823),s=n(851),u=TypeError;t.exports=function(t,e){var n=arguments.length<2?s(t):e;if(r(n))return i(o(n,t));throw new u(a(t)+" is not iterable")};},6933:function(t,e,n){var o=n(9504),r=n(4376),i=n(4901),a=n(2195),s=n(655),u=o([].push);t.exports=function(t){if(i(t))return t;if(r(t)){for(var e=t.length,n=[],o=0;o<e;o++){var c=t[o];"string"==typeof c?u(n,c):"number"!=typeof c&&"Number"!==a(c)&&"String"!==a(c)||u(n,s(c));}var l=n.length,f=true;return function(t,e){if(f)return f=false,e;if(r(this))return e;for(var o=0;o<l;o++)if(n[o]===t)return e}}};},5966:function(t,e,n){var o=n(9306),r=n(4117);t.exports=function(t,e){var n=t[e];return r(n)?void 0:o(n)};},2478:function(t,e,n){var o=n(9504),r=n(8981),i=Math.floor,a=o("".charAt),s=o("".replace),u=o("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,o,f,d){var p=n+t.length,h=o.length,v=l;return void 0!==f&&(f=r(f),v=c),s(d,v,(function(r,s){var c;switch(a(s,0)){case "$":return "$";case "&":return t;case "`":return u(e,0,n);case "'":return u(e,p);case "<":c=f[u(s,1,-1)];break;default:var l=+s;if(0===l)return r;if(l>h){var d=i(l/10);return 0===d?r:d<=h?void 0===o[d-1]?a(s,1):o[d-1]+a(s,1):r}c=o[l-1];}return void 0===c?"":c}))};},4576:function(t,e,n){var o=function(t){return t&&t.Math===Math&&t};t.exports=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof n.g&&n.g)||o("object"==typeof this&&this)||function(){return this}()||Function("return this")();},9297:function(t,e,n){var o=n(9504),r=n(8981),i=o({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(r(t),e)};},421:function(t){t.exports={};},397:function(t,e,n){var o=n(7751);t.exports=o("document","documentElement");},5917:function(t,e,n){var o=n(3724),r=n(9039),i=n(4055);t.exports=!o&&!r((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}));},7055:function(t,e,n){var o=n(9504),r=n(9039),i=n(2195),a=Object,s=o("".split);t.exports=r((function(){return !a("z").propertyIsEnumerable(0)}))?function(t){return "String"===i(t)?s(t,""):a(t)}:a;},3167:function(t,e,n){var o=n(4901),r=n(34),i=n(2967);t.exports=function(t,e,n){var a,s;return i&&o(a=e.constructor)&&a!==n&&r(s=a.prototype)&&s!==n.prototype&&i(t,s),t};},3706:function(t,e,n){var o=n(9504),r=n(4901),i=n(7629),a=o(Function.toString);r(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource;},1181:function(t,e,n){var o,r,i,a=n(8622),s=n(4576),u=n(34),c=n(6699),l=n(9297),f=n(7629),d=n(6119),p=n(421),h="Object already initialized",v=s.TypeError,y=s.WeakMap;if(a||f.state){var g=f.state||(f.state=new y);g.get=g.get,g.has=g.has,g.set=g.set,o=function(t,e){if(g.has(t))throw new v(h);return e.facade=t,g.set(t,e),e},r=function(t){return g.get(t)||{}},i=function(t){return g.has(t)};}else {var m=d("state");p[m]=true,o=function(t,e){if(l(t,m))throw new v(h);return e.facade=t,c(t,m,e),e},r=function(t){return l(t,m)?t[m]:{}},i=function(t){return l(t,m)};}t.exports={set:o,get:r,has:i,enforce:function(t){return i(t)?r(t):o(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=r(e)).type!==t)throw new v("Incompatible receiver, "+t+" required");return n}}};},4209:function(t,e,n){var o=n(8227),r=n(6269),i=o("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||a[i]===t)};},4376:function(t,e,n){var o=n(2195);t.exports=Array.isArray||function(t){return "Array"===o(t)};},4901:function(t){var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return "function"==typeof t||t===e}:function(t){return "function"==typeof t};},3517:function(t,e,n){var o=n(9504),r=n(9039),i=n(4901),a=n(6955),s=n(7751),u=n(3706),c=function(){},l=s("Reflect","construct"),f=/^\s*(?:class|function)\b/,d=o(f.exec),p=!f.test(c),h=function(t){if(!i(t))return false;try{return l(c,[],t),!0}catch(t){return false}},v=function(t){if(!i(t))return false;switch(a(t)){case "AsyncFunction":case "GeneratorFunction":case "AsyncGeneratorFunction":return false}try{return p||!!d(f,u(t))}catch(t){return true}};v.sham=true,t.exports=!l||r((function(){var t;return h(h.call)||!h(Object)||!h((function(){t=true;}))||t}))?v:h;},2796:function(t,e,n){var o=n(9039),r=n(4901),i=/#|\.prototype\./,a=function(t,e){var n=u[s(t)];return n===l||n!==c&&(r(e)?o(e):!!e)},s=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},u=a.data={},c=a.NATIVE="N",l=a.POLYFILL="P";t.exports=a;},2087:function(t,e,n){var o=n(34),r=Math.floor;t.exports=Number.isInteger||function(t){return !o(t)&&isFinite(t)&&r(t)===t};},4117:function(t){t.exports=function(t){return null==t};},34:function(t,e,n){var o=n(4901);t.exports=function(t){return "object"==typeof t?null!==t:o(t)};},3925:function(t,e,n){var o=n(34);t.exports=function(t){return o(t)||null===t};},6395:function(t){t.exports=false;},788:function(t,e,n){var o=n(34),r=n(2195),i=n(8227)("match");t.exports=function(t){var e;return o(t)&&(void 0!==(e=t[i])?!!e:"RegExp"===r(t))};},757:function(t,e,n){var o=n(7751),r=n(4901),i=n(1625),a=n(7040),s=Object;t.exports=a?function(t){return "symbol"==typeof t}:function(t){var e=o("Symbol");return r(e)&&i(e.prototype,s(t))};},9539:function(t,e,n){var o=n(9565),r=n(8551),i=n(5966);t.exports=function(t,e,n){var a,s;r(t);try{if(!(a=i(t,"return"))){if("throw"===e)throw n;return n}a=o(a,t);}catch(t){s=true,a=t;}if("throw"===e)throw n;if(s)throw a;return r(a),n};},3994:function(t,e,n){var o=n(7657).IteratorPrototype,r=n(2360),i=n(6980),a=n(687),s=n(6269),u=function(){return this};t.exports=function(t,e,n,c){var l=e+" Iterator";return t.prototype=r(o,{next:i(+!c,n)}),a(t,l,false,true),s[l]=u,t};},1088:function(t,e,n){var o=n(6518),r=n(9565),i=n(6395),a=n(350),s=n(4901),u=n(3994),c=n(2787),l=n(2967),f=n(687),d=n(6699),p=n(6840),h=n(8227),v=n(6269),y=n(7657),g=a.PROPER,m=a.CONFIGURABLE,b=y.IteratorPrototype,w=y.BUGGY_SAFARI_ITERATORS,x=h("iterator"),E="keys",O="values",S="entries",k=function(){return this};t.exports=function(t,e,n,a,h,y,P){u(n,e,a);var I,C,A,M=function(t){if(t===h&&R)return R;if(!w&&t&&t in N)return N[t];switch(t){case E:case O:case S:return function(){return new n(this,t)}}return function(){return new n(this)}},D=e+" Iterator",T=false,N=t.prototype,j=N[x]||N["@@iterator"]||h&&N[h],R=!w&&j||M(h),L="Array"===e&&N.entries||j;if(L&&(I=c(L.call(new t)))!==Object.prototype&&I.next&&(i||c(I)===b||(l?l(I,b):s(I[x])||p(I,x,k)),f(I,D,true,true),i&&(v[D]=k)),g&&h===O&&j&&j.name!==O&&(!i&&m?d(N,"name",O):(T=true,R=function(){return r(j,this)})),h)if(C={values:M(O),keys:y?R:M(E),entries:M(S)},P)for(A in C)(w||T||!(A in N))&&p(N,A,C[A]);else o({target:e,proto:true,forced:w||T},C);return i&&!P||N[x]===R||p(N,x,R,{name:h}),v[e]=R,C};},7657:function(t,e,n){var o,r,i,a=n(9039),s=n(4901),u=n(34),c=n(2360),l=n(2787),f=n(6840),d=n(8227),p=n(6395),h=d("iterator"),v=false;[].keys&&("next"in(i=[].keys())?(r=l(l(i)))!==Object.prototype&&(o=r):v=true),!u(o)||a((function(){var t={};return o[h].call(t)!==t}))?o={}:p&&(o=c(o)),s(o[h])||f(o,h,(function(){return this})),t.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:v};},6269:function(t){t.exports={};},6198:function(t,e,n){var o=n(8014);t.exports=function(t){return o(t.length)};},283:function(t,e,n){var o=n(9504),r=n(9039),i=n(4901),a=n(9297),s=n(3724),u=n(350).CONFIGURABLE,c=n(3706),l=n(1181),f=l.enforce,d=l.get,p=String,h=Object.defineProperty,v=o("".slice),y=o("".replace),g=o([].join),m=s&&!r((function(){return 8!==h((function(){}),"length",{value:8}).length})),b=String(String).split("String"),w=t.exports=function(t,e,n){"Symbol("===v(p(e),0,7)&&(e="["+y(p(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!a(t,"name")||u&&t.name!==e)&&(s?h(t,"name",{value:e,configurable:true}):t.name=e),m&&n&&a(n,"arity")&&t.length!==n.arity&&h(t,"length",{value:n.arity});try{n&&a(n,"constructor")&&n.constructor?s&&h(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0);}catch(t){}var o=f(t);return a(o,"source")||(o.source=g(b,"string"==typeof e?e:"")),t};Function.prototype.toString=w((function(){return i(this)&&d(this).source||c(this)}),"toString");},741:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var o=+t;return (o>0?n:e)(o)};},5749:function(t,e,n){var o=n(788),r=TypeError;t.exports=function(t){if(o(t))throw new r("The method doesn't accept regular expressions");return t};},4213:function(t,e,n){var o=n(3724),r=n(9504),i=n(9565),a=n(9039),s=n(1072),u=n(3717),c=n(8773),l=n(8981),f=n(7055),d=Object.assign,p=Object.defineProperty,h=r([].concat);t.exports=!d||a((function(){if(o&&1!==d({b:1},d(p({},"a",{enumerable:true,get:function(){p(this,"b",{value:3,enumerable:false});}}),{b:2})).b)return true;var t={},e={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t;})),7!==d({},t)[n]||s(d({},e)).join("")!==r}))?function(t,e){for(var n=l(t),r=arguments.length,a=1,d=u.f,p=c.f;r>a;)for(var v,y=f(arguments[a++]),g=d?h(s(y),d(y)):s(y),m=g.length,b=0;m>b;)v=g[b++],o&&!i(p,y,v)||(n[v]=y[v]);return n}:d;},2360:function(t,e,n){var o,r=n(8551),i=n(6801),a=n(8727),s=n(421),u=n(397),c=n(4055),l=n(6119),f="prototype",d="script",p=l("IE_PROTO"),h=function(){},v=function(t){return "<"+d+">"+t+"</"+d+">"},y=function(t){t.write(v("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){try{o=new ActiveXObject("htmlfile");}catch(t){}var t,e,n;g="undefined"!=typeof document?document.domain&&o?y(o):(e=c("iframe"),n="java"+d+":",e.style.display="none",u.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(v("document.F=Object")),t.close(),t.F):y(o);for(var r=a.length;r--;)delete g[f][a[r]];return g()};s[p]=true,t.exports=Object.create||function(t,e){var n;return null!==t?(h[f]=r(t),n=new h,h[f]=null,n[p]=t):n=g(),void 0===e?n:i.f(n,e)};},6801:function(t,e,n){var o=n(3724),r=n(8686),i=n(4913),a=n(8551),s=n(5397),u=n(1072);e.f=o&&!r?Object.defineProperties:function(t,e){a(t);for(var n,o=s(e),r=u(e),c=r.length,l=0;c>l;)i.f(t,n=r[l++],o[n]);return t};},4913:function(t,e,n){var o=n(3724),r=n(5917),i=n(8686),a=n(8551),s=n(6969),u=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",d="configurable",p="writable";e.f=o?i?function(t,e,n){if(a(t),e=s(e),a(n),"function"==typeof t&&"prototype"===e&&"value"in n&&p in n&&!n[p]){var o=l(t,e);o&&o[p]&&(t[e]=n.value,n={configurable:d in n?n[d]:o[d],enumerable:f in n?n[f]:o[f],writable:false});}return c(t,e,n)}:c:function(t,e,n){if(a(t),e=s(e),a(n),r)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new u("Accessors not supported");return "value"in n&&(t[e]=n.value),t};},7347:function(t,e,n){var o=n(3724),r=n(9565),i=n(8773),a=n(6980),s=n(5397),u=n(6969),c=n(9297),l=n(5917),f=Object.getOwnPropertyDescriptor;e.f=o?f:function(t,e){if(t=s(t),e=u(e),l)try{return f(t,e)}catch(t){}if(c(t,e))return a(!r(i.f,t,e),t[e])};},298:function(t,e,n){var o=n(2195),r=n(5397),i=n(8480).f,a=n(7680),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"Window"===o(t)?function(t){try{return i(t)}catch(t){return a(s)}}(t):i(r(t))};},8480:function(t,e,n){var o=n(1828),r=n(8727).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return o(t,r)};},3717:function(t,e){e.f=Object.getOwnPropertySymbols;},2787:function(t,e,n){var o=n(9297),r=n(4901),i=n(8981),a=n(6119),s=n(2211),u=a("IE_PROTO"),c=Object,l=c.prototype;t.exports=s?c.getPrototypeOf:function(t){var e=i(t);if(o(e,u))return e[u];var n=e.constructor;return r(n)&&e instanceof n?n.prototype:e instanceof c?l:null};},1625:function(t,e,n){var o=n(9504);t.exports=o({}.isPrototypeOf);},1828:function(t,e,n){var o=n(9504),r=n(9297),i=n(5397),a=n(9617).indexOf,s=n(421),u=o([].push);t.exports=function(t,e){var n,o=i(t),c=0,l=[];for(n in o)!r(s,n)&&r(o,n)&&u(l,n);for(;e.length>c;)r(o,n=e[c++])&&(~a(l,n)||u(l,n));return l};},1072:function(t,e,n){var o=n(1828),r=n(8727);t.exports=Object.keys||function(t){return o(t,r)};},8773:function(t,e){var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,r=o&&!n.call({1:2},1);e.f=r?function(t){var e=o(this,t);return !!e&&e.enumerable}:n;},2551:function(t,e,n){var o=n(6395),r=n(4576),i=n(9039),a=n(3607);t.exports=o||!i((function(){if(!(a&&a<535)){var t=Math.random();__defineSetter__.call(null,t,(function(){})),delete r[t];}}));},2967:function(t,e,n){var o=n(6706),r=n(34),i=n(7750),a=n(3506);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=false,n={};try{(t=o(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array;}catch(t){}return function(n,o){return i(n),a(o),r(n)?(e?t(n,o):n.__proto__=o,n):n}}():void 0);},3179:function(t,e,n){var o=n(2140),r=n(6955);t.exports=o?{}.toString:function(){return "[object "+r(this)+"]"};},4270:function(t,e,n){var o=n(9565),r=n(4901),i=n(34),a=TypeError;t.exports=function(t,e){var n,s;if("string"===e&&r(n=t.toString)&&!i(s=o(n,t)))return s;if(r(n=t.valueOf)&&!i(s=o(n,t)))return s;if("string"!==e&&r(n=t.toString)&&!i(s=o(n,t)))return s;throw new a("Can't convert object to primitive value")};},5031:function(t,e,n){var o=n(7751),r=n(9504),i=n(8480),a=n(3717),s=n(8551),u=r([].concat);t.exports=o("Reflect","ownKeys")||function(t){var e=i.f(s(t)),n=a.f;return n?u(e,n(t)):e};},9167:function(t,e,n){var o=n(4576);t.exports=o;},1056:function(t,e,n){var o=n(4913).f;t.exports=function(t,e,n){n in t||o(t,n,{configurable:true,get:function(){return e[n]},set:function(t){e[n]=t;}});};},6682:function(t,e,n){var o=n(9565),r=n(8551),i=n(4901),a=n(2195),s=n(7323),u=TypeError;t.exports=function(t,e){var n=t.exec;if(i(n)){var c=o(n,t,e);return null!==c&&r(c),c}if("RegExp"===a(t))return o(s,t,e);throw new u("RegExp#exec called on incompatible receiver")};},7323:function(t,e,n){var o,r,i=n(9565),a=n(9504),s=n(655),u=n(7979),c=n(8429),l=n(5745),f=n(2360),d=n(1181).get,p=n(3635),h=n(8814),v=l("native-string-replace",String.prototype.replace),y=RegExp.prototype.exec,g=y,m=a("".charAt),b=a("".indexOf),w=a("".replace),x=a("".slice),E=(r=/b*/g,i(y,o=/a/,"a"),i(y,r,"a"),0!==o.lastIndex||0!==r.lastIndex),O=c.BROKEN_CARET,S=void 0!==/()??/.exec("")[1];(E||S||O||p||h)&&(g=function(t){var e,n,o,r,a,c,l,p=this,h=d(p),k=s(t),P=h.raw;if(P)return P.lastIndex=p.lastIndex,e=i(g,P,k),p.lastIndex=P.lastIndex,e;var I=h.groups,C=O&&p.sticky,A=i(u,p),M=p.source,D=0,T=k;if(C&&(A=w(A,"y",""),-1===b(A,"g")&&(A+="g"),T=x(k,p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&"\n"!==m(k,p.lastIndex-1))&&(M="(?: "+M+")",T=" "+T,D++),n=new RegExp("^(?:"+M+")",A)),S&&(n=new RegExp("^"+M+"$(?!\\s)",A)),E&&(o=p.lastIndex),r=i(y,C?n:p,T),C?r?(r.input=x(r.input,D),r[0]=x(r[0],D),r.index=p.lastIndex,p.lastIndex+=r[0].length):p.lastIndex=0:E&&r&&(p.lastIndex=p.global?r.index+r[0].length:o),S&&r&&r.length>1&&i(v,r[0],n,(function(){for(a=1;a<arguments.length-2;a++) void 0===arguments[a]&&(r[a]=void 0);})),r&&I)for(r.groups=c=f(null),a=0;a<I.length;a++)c[(l=I[a])[0]]=r[l[1]];return r}),t.exports=g;},7979:function(t,e,n){var o=n(8551);t.exports=function(){var t=o(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e};},1034:function(t,e,n){var o=n(9565),r=n(9297),i=n(1625),a=n(7979),s=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in s||r(t,"flags")||!i(s,t)?e:o(a,t)};},8429:function(t,e,n){var o=n(9039),r=n(4576).RegExp,i=o((function(){var t=r("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),a=i||o((function(){return !r("a","y").sticky})),s=i||o((function(){var t=r("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));t.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:i};},3635:function(t,e,n){var o=n(9039),r=n(4576).RegExp;t.exports=o((function(){var t=r(".","s");return !(t.dotAll&&t.test("\n")&&"s"===t.flags)}));},8814:function(t,e,n){var o=n(9039),r=n(4576).RegExp;t.exports=o((function(){var t=r("(?<a>b)","g");return "b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}));},7750:function(t,e,n){var o=n(4117),r=TypeError;t.exports=function(t){if(o(t))throw new r("Can't call method on "+t);return t};},7633:function(t,e,n){var o=n(7751),r=n(2106),i=n(8227),a=n(3724),s=i("species");t.exports=function(t){var e=o(t);a&&e&&!e[s]&&r(e,s,{configurable:true,get:function(){return this}});};},687:function(t,e,n){var o=n(4913).f,r=n(9297),i=n(8227)("toStringTag");t.exports=function(t,e,n){t&&!n&&(t=t.prototype),t&&!r(t,i)&&o(t,i,{configurable:true,value:e});};},6119:function(t,e,n){var o=n(5745),r=n(3392),i=o("keys");t.exports=function(t){return i[t]||(i[t]=r(t))};},7629:function(t,e,n){var o=n(6395),r=n(4576),i=n(9433),a="__core-js_shared__",s=t.exports=r[a]||i(a,{});(s.versions||(s.versions=[])).push({version:"3.38.1",mode:o?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});},5745:function(t,e,n){var o=n(7629);t.exports=function(t,e){return o[t]||(o[t]=e||{})};},2293:function(t,e,n){var o=n(8551),r=n(5548),i=n(4117),a=n(8227)("species");t.exports=function(t,e){var n,s=o(t).constructor;return void 0===s||i(n=o(s)[a])?e:r(n)};},8183:function(t,e,n){var o=n(9504),r=n(1291),i=n(655),a=n(7750),s=o("".charAt),u=o("".charCodeAt),c=o("".slice),l=function(t){return function(e,n){var o,l,f=i(a(e)),d=r(n),p=f.length;return d<0||d>=p?t?"":void 0:(o=u(f,d))<55296||o>56319||d+1===p||(l=u(f,d+1))<56320||l>57343?t?s(f,d):o:t?c(f,d,d+2):l-56320+(o-55296<<10)+65536}};t.exports={codeAt:l(false),charAt:l(true)};},706:function(t,e,n){var o=n(350).PROPER,r=n(9039),i=n(7452);t.exports=function(t){return r((function(){return !!i[t]()||"​…᠎"!=="​…᠎"[t]()||o&&i[t].name!==t}))};},3802:function(t,e,n){var o=n(9504),r=n(7750),i=n(655),a=n(7452),s=o("".replace),u=RegExp("^["+a+"]+"),c=RegExp("(^|[^"+a+"])["+a+"]+$"),l=function(t){return function(e){var n=i(r(e));return 1&t&&(n=s(n,u,"")),2&t&&(n=s(n,c,"$1")),n}};t.exports={start:l(1),end:l(2),trim:l(3)};},4495:function(t,e,n){var o=n(9519),r=n(9039),i=n(4576).String;t.exports=!!Object.getOwnPropertySymbols&&!r((function(){var t=Symbol("symbol detection");return !i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&o&&o<41}));},8242:function(t,e,n){var o=n(9565),r=n(7751),i=n(8227),a=n(6840);t.exports=function(){var t=r("Symbol"),e=t&&t.prototype,n=e&&e.valueOf,s=i("toPrimitive");e&&!e[s]&&a(e,s,(function(t){return o(n,this)}),{arity:1});};},1296:function(t,e,n){var o=n(4495);t.exports=o&&!!Symbol.for&&!!Symbol.keyFor;},1240:function(t,e,n){var o=n(9504);t.exports=o(1..valueOf);},5610:function(t,e,n){var o=n(1291),r=Math.max,i=Math.min;t.exports=function(t,e){var n=o(t);return n<0?r(n+e,0):i(n,e)};},5397:function(t,e,n){var o=n(7055),r=n(7750);t.exports=function(t){return o(r(t))};},1291:function(t,e,n){var o=n(741);t.exports=function(t){var e=+t;return e!=e||0===e?0:o(e)};},8014:function(t,e,n){var o=n(1291),r=Math.min;t.exports=function(t){var e=o(t);return e>0?r(e,9007199254740991):0};},8981:function(t,e,n){var o=n(7750),r=Object;t.exports=function(t){return r(o(t))};},2777:function(t,e,n){var o=n(9565),r=n(34),i=n(757),a=n(5966),s=n(4270),u=n(8227),c=TypeError,l=u("toPrimitive");t.exports=function(t,e){if(!r(t)||i(t))return t;var n,u=a(t,l);if(u){if(void 0===e&&(e="default"),n=o(u,t,e),!r(n)||i(n))return n;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)};},6969:function(t,e,n){var o=n(2777),r=n(757);t.exports=function(t){var e=o(t,"string");return r(e)?e:e+""};},2140:function(t,e,n){var o={};o[n(8227)("toStringTag")]="z",t.exports="[object z]"===String(o);},655:function(t,e,n){var o=n(6955),r=String;t.exports=function(t){if("Symbol"===o(t))throw new TypeError("Cannot convert a Symbol value to a string");return r(t)};},6823:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return "Object"}};},3392:function(t,e,n){var o=n(9504),r=0,i=Math.random(),a=o(1..toString);t.exports=function(t){return "Symbol("+(void 0===t?"":t)+")_"+a(++r+i,36)};},7040:function(t,e,n){var o=n(4495);t.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator;},8686:function(t,e,n){var o=n(3724),r=n(9039);t.exports=o&&r((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:false}).prototype}));},8622:function(t,e,n){var o=n(4576),r=n(4901),i=o.WeakMap;t.exports=r(i)&&/native code/.test(String(i));},511:function(t,e,n){var o=n(9167),r=n(9297),i=n(1951),a=n(4913).f;t.exports=function(t){var e=o.Symbol||(o.Symbol={});r(e,t)||a(e,t,{value:i.f(t)});};},1951:function(t,e,n){var o=n(8227);e.f=o;},8227:function(t,e,n){var o=n(4576),r=n(5745),i=n(9297),a=n(3392),s=n(4495),u=n(7040),c=o.Symbol,l=r("wks"),f=u?c.for||c:c&&c.withoutSetter||a;t.exports=function(t){return i(l,t)||(l[t]=s&&i(c,t)?c[t]:f("Symbol."+t)),l[t]};},7452:function(t){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff";},8706:function(t,e,n){var o=n(6518),r=n(9039),i=n(4376),a=n(34),s=n(8981),u=n(6198),c=n(6837),l=n(4659),f=n(1469),d=n(597),p=n(8227),h=n(9519),v=p("isConcatSpreadable"),y=h>=51||!r((function(){var t=[];return t[v]=false,t.concat()[0]!==t})),g=function(t){if(!a(t))return false;var e=t[v];return void 0!==e?!!e:i(t)};o({target:"Array",proto:true,arity:1,forced:!y||!d("concat")},{concat:function(t){var e,n,o,r,i,a=s(this),d=f(a,0),p=0;for(e=-1,o=arguments.length;e<o;e++)if(g(i=-1===e?a:arguments[e]))for(r=u(i),c(p+r),n=0;n<r;n++,p++)n in i&&l(d,p,i[n]);else c(p+1),l(d,p++,i);return d.length=p,d}});},2008:function(t,e,n){var o=n(6518),r=n(9213).filter;o({target:"Array",proto:true,forced:!n(597)("filter")},{filter:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}});},3418:function(t,e,n){var o=n(6518),r=n(7916);o({target:"Array",stat:true,forced:!n(4428)((function(t){Array.from(t);}))},{from:r});},4423:function(t,e,n){var o=n(6518),r=n(9617).includes,i=n(9039),a=n(6469);o({target:"Array",proto:true,forced:i((function(){return !Array(1).includes()}))},{includes:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),a("includes");},5276:function(t,e,n){var o=n(6518),r=n(7476),i=n(9617).indexOf,a=n(4598),s=r([].indexOf),u=!!s&&1/s([1],1,-0)<0;o({target:"Array",proto:true,forced:u||!a("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return u?s(this,t,e)||0:i(this,t,e)}});},3792:function(t,e,n){var o=n(5397),r=n(6469),i=n(6269),a=n(1181),s=n(4913).f,u=n(1088),c=n(2529),l=n(6395),f=n(3724),d="Array Iterator",p=a.set,h=a.getterFor(d);t.exports=u(Array,"Array",(function(t,e){p(this,{type:d,target:o(t),index:0,kind:e});}),(function(){var t=h(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=null,c(void 0,true);switch(t.kind){case "keys":return c(n,false);case "values":return c(e[n],false)}return c([n,e[n]],false)}),"values");var v=i.Arguments=i.Array;if(r("keys"),r("values"),r("entries"),!l&&f&&"values"!==v.name)try{s(v,"name",{value:"values"});}catch(t){}},8598:function(t,e,n){var o=n(6518),r=n(9504),i=n(7055),a=n(5397),s=n(4598),u=r([].join);o({target:"Array",proto:true,forced:i!==Object||!s("join",",")},{join:function(t){return u(a(this),void 0===t?",":t)}});},2062:function(t,e,n){var o=n(6518),r=n(9213).map;o({target:"Array",proto:true,forced:!n(597)("map")},{map:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}});},2712:function(t,e,n){var o=n(6518),r=n(926).left,i=n(4598),a=n(9519);o({target:"Array",proto:true,forced:!n(6193)&&a>79&&a<83||!i("reduce")},{reduce:function(t){var e=arguments.length;return r(this,t,e,e>1?arguments[1]:void 0)}});},4782:function(t,e,n){var o=n(6518),r=n(4376),i=n(3517),a=n(34),s=n(5610),u=n(6198),c=n(5397),l=n(4659),f=n(8227),d=n(597),p=n(7680),h=d("slice"),v=f("species"),y=Array,g=Math.max;o({target:"Array",proto:true,forced:!h},{slice:function(t,e){var n,o,f,d=c(this),h=u(d),m=s(t,h),b=s(void 0===e?h:e,h);if(r(d)&&(n=d.constructor,(i(n)&&(n===y||r(n.prototype))||a(n)&&null===(n=n[v]))&&(n=void 0),n===y||void 0===n))return p(d,m,b);for(o=new(void 0===n?y:n)(g(b-m,0)),f=0;m<b;m++,f++)m in d&&l(o,f,d[m]);return o.length=f,o}});},6910:function(t,e,n){var o=n(6518),r=n(9504),i=n(9306),a=n(8981),s=n(6198),u=n(4606),c=n(655),l=n(9039),f=n(4488),d=n(4598),p=n(3709),h=n(3763),v=n(9519),y=n(3607),g=[],m=r(g.sort),b=r(g.push),w=l((function(){g.sort(void 0);})),x=l((function(){g.sort(null);})),E=d("sort"),O=!l((function(){if(v)return v<70;if(!(p&&p>3)){if(h)return true;if(y)return y<603;var t,e,n,o,r="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2;}for(o=0;o<47;o++)g.push({k:e+o,v:n});}for(g.sort((function(t,e){return e.v-t.v})),o=0;o<g.length;o++)e=g[o].k.charAt(0),r.charAt(r.length-1)!==e&&(r+=e);return "DGBEFHACIJK"!==r}}));o({target:"Array",proto:true,forced:w||!x||!E||!O},{sort:function(t){ void 0!==t&&i(t);var e=a(this);if(O)return void 0===t?m(e):m(e,t);var n,o,r=[],l=s(e);for(o=0;o<l;o++)o in e&&b(r,e[o]);for(f(r,function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:c(e)>c(n)?1:-1}}(t)),n=s(r),o=0;o<n;)e[o]=r[o++];for(;o<l;)u(e,o++);return e}});},4554:function(t,e,n){var o=n(6518),r=n(8981),i=n(5610),a=n(1291),s=n(6198),u=n(4527),c=n(6837),l=n(1469),f=n(4659),d=n(4606),p=n(597)("splice"),h=Math.max,v=Math.min;o({target:"Array",proto:true,forced:!p},{splice:function(t,e){var n,o,p,y,g,m,b=r(this),w=s(b),x=i(t,w),E=arguments.length;for(0===E?n=o=0:1===E?(n=0,o=w-x):(n=E-2,o=v(h(a(e),0),w-x)),c(w+n-o),p=l(b,o),y=0;y<o;y++)(g=x+y)in b&&f(p,y,b[g]);if(p.length=o,n<o){for(y=x;y<w-o;y++)m=y+n,(g=y+o)in b?b[m]=b[g]:d(b,m);for(y=w;y>w-o+n;y--)d(b,y-1);}else if(n>o)for(y=w-o;y>x;y--)m=y+n-1,(g=y+o-1)in b?b[m]=b[g]:d(b,m);for(y=0;y<n;y++)b[y+x]=arguments[y+2];return u(b,w-o+n),p}});},739:function(t,e,n){var o=n(6518),r=n(9039),i=n(8981),a=n(2777);o({target:"Date",proto:true,arity:1,forced:r((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(t){var e=i(this),n=a(e,"number");return "number"!=typeof n||isFinite(n)?e.toISOString():null}});},9572:function(t,e,n){var o=n(9297),r=n(6840),i=n(3640),a=n(8227)("toPrimitive"),s=Date.prototype;o(s,a)||r(s,a,i);},2010:function(t,e,n){var o=n(3724),r=n(350).EXISTS,i=n(9504),a=n(2106),s=Function.prototype,u=i(s.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=i(c.exec);o&&!r&&a(s,"name",{configurable:true,get:function(){try{return l(c,u(this))[1]}catch(t){return ""}}});},3110:function(t,e,n){var o=n(6518),r=n(7751),i=n(8745),a=n(9565),s=n(9504),u=n(9039),c=n(4901),l=n(757),f=n(7680),d=n(6933),p=n(4495),h=String,v=r("JSON","stringify"),y=s(/./.exec),g=s("".charAt),m=s("".charCodeAt),b=s("".replace),w=s(1..toString),x=/[\uD800-\uDFFF]/g,E=/^[\uD800-\uDBFF]$/,O=/^[\uDC00-\uDFFF]$/,S=!p||u((function(){var t=r("Symbol")("stringify detection");return "[null]"!==v([t])||"{}"!==v({a:t})||"{}"!==v(Object(t))})),k=u((function(){return '"\\udf06\\ud834"'!==v("\udf06\ud834")||'"\\udead"'!==v("\udead")})),P=function(t,e){var n=f(arguments),o=d(e);if(c(o)||void 0!==t&&!l(t))return n[1]=function(t,e){if(c(o)&&(e=a(o,this,h(t),e)),!l(e))return e},i(v,null,n)},I=function(t,e,n){var o=g(n,e-1),r=g(n,e+1);return y(E,t)&&!y(O,r)||y(O,t)&&!y(E,o)?"\\u"+w(m(t,0),16):t};v&&o({target:"JSON",stat:true,arity:3,forced:S||k},{stringify:function(t,e,n){var o=f(arguments),r=i(S?P:v,null,o);return k&&"string"==typeof r?b(r,x,I):r}});},2892:function(t,e,n){var o=n(6518),r=n(6395),i=n(3724),a=n(4576),s=n(9167),u=n(9504),c=n(2796),l=n(9297),f=n(3167),d=n(1625),p=n(757),h=n(2777),v=n(9039),y=n(8480).f,g=n(7347).f,m=n(4913).f,b=n(1240),w=n(3802).trim,x="Number",E=a[x],O=s[x],S=E.prototype,k=a.TypeError,P=u("".slice),I=u("".charCodeAt),C=function(t){var e,n,o,r,i,a,s,u,c=h(t,"number");if(p(c))throw new k("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=w(c),43===(e=I(c,0))||45===e){if(88===(n=I(c,2))||120===n)return NaN}else if(48===e){switch(I(c,1)){case 66:case 98:o=2,r=49;break;case 79:case 111:o=8,r=55;break;default:return +c}for(a=(i=P(c,2)).length,s=0;s<a;s++)if((u=I(i,s))<48||u>r)return NaN;return parseInt(i,o)}return +c},A=c(x,!E(" 0o1")||!E("0b1")||E("+0x1")),M=function(t){var e,n=arguments.length<1?0:E(function(t){var e=h(t,"number");return "bigint"==typeof e?e:C(e)}(t));return d(S,e=this)&&v((function(){b(e);}))?f(Object(n),this,M):n};M.prototype=S,A&&!r&&(S.constructor=M),o({global:true,constructor:true,wrap:true,forced:A},{Number:M});var D=function(t,e){for(var n,o=i?y(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),r=0;o.length>r;r++)l(e,n=o[r])&&!l(t,n)&&m(t,n,g(e,n));};r&&O&&D(s[x],O),(A||r)&&D(s[x],E);},2637:function(t,e,n){n(6518)({target:"Number",stat:true},{isInteger:n(2087)});},9085:function(t,e,n){var o=n(6518),r=n(4213);o({target:"Object",stat:true,arity:2,forced:Object.assign!==r},{assign:r});},7427:function(t,e,n){var o=n(6518),r=n(3724),i=n(2551),a=n(9306),s=n(8981),u=n(4913);r&&o({target:"Object",proto:true,forced:i},{__defineGetter__:function(t,e){u.f(s(this),t,{get:a(e),enumerable:true,configurable:true});}});},3851:function(t,e,n){var o=n(6518),r=n(9039),i=n(5397),a=n(7347).f,s=n(3724);o({target:"Object",stat:true,forced:!s||r((function(){a(1);})),sham:!s},{getOwnPropertyDescriptor:function(t,e){return a(i(t),e)}});},1278:function(t,e,n){var o=n(6518),r=n(3724),i=n(5031),a=n(5397),s=n(7347),u=n(4659);o({target:"Object",stat:true,sham:!r},{getOwnPropertyDescriptors:function(t){for(var e,n,o=a(t),r=s.f,c=i(o),l={},f=0;c.length>f;) void 0!==(n=r(o,e=c[f++]))&&u(l,e,n);return l}});},1480:function(t,e,n){var o=n(6518),r=n(9039),i=n(298).f;o({target:"Object",stat:true,forced:r((function(){return !Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:i});},9773:function(t,e,n){var o=n(6518),r=n(4495),i=n(9039),a=n(3717),s=n(8981);o({target:"Object",stat:true,forced:!r||i((function(){a.f(1);}))},{getOwnPropertySymbols:function(t){var e=a.f;return e?e(s(t)):[]}});},9432:function(t,e,n){var o=n(6518),r=n(8981),i=n(1072);o({target:"Object",stat:true,forced:n(9039)((function(){i(1);}))},{keys:function(t){return i(r(t))}});},6099:function(t,e,n){var o=n(2140),r=n(6840),i=n(3179);o||r(Object.prototype,"toString",i,{unsafe:true});},4864:function(t,e,n){var o=n(3724),r=n(4576),i=n(9504),a=n(2796),s=n(3167),u=n(6699),c=n(2360),l=n(8480).f,f=n(1625),d=n(788),p=n(655),h=n(1034),v=n(8429),y=n(1056),g=n(6840),m=n(9039),b=n(9297),w=n(1181).enforce,x=n(7633),E=n(8227),O=n(3635),S=n(8814),k=E("match"),P=r.RegExp,I=P.prototype,C=r.SyntaxError,A=i(I.exec),M=i("".charAt),D=i("".replace),T=i("".indexOf),N=i("".slice),j=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,R=/a/g,L=/a/g,B=new P(R)!==R,K=v.MISSED_STICKY,_=v.UNSUPPORTED_Y;if(a("RegExp",o&&(!B||K||O||S||m((function(){return L[k]=false,P(R)!==R||P(L)===L||"/a/i"!==String(P(R,"i"))}))))){for(var F=function(t,e){var n,o,r,i,a,l,v=f(I,this),y=d(t),g=void 0===e,m=[],x=t;if(!v&&y&&g&&t.constructor===F)return t;if((y||f(I,t))&&(t=t.source,g&&(e=h(x))),t=void 0===t?"":p(t),e=void 0===e?"":p(e),x=t,O&&"dotAll"in R&&(o=!!e&&T(e,"s")>-1)&&(e=D(e,/s/g,"")),n=e,K&&"sticky"in R&&(r=!!e&&T(e,"y")>-1)&&_&&(e=D(e,/y/g,"")),S&&(i=function(t){for(var e,n=t.length,o=0,r="",i=[],a=c(null),s=false,u=false,l=0,f="";o<=n;o++){if("\\"===(e=M(t,o)))e+=M(t,++o);else if("]"===e)s=false;else if(!s)switch(true){case "["===e:s=true;break;case "("===e:if(r+=e,"?:"===N(t,o+1,o+3))continue;A(j,N(t,o+1))&&(o+=2,u=true),l++;continue;case ">"===e&&u:if(""===f||b(a,f))throw new C("Invalid capture group name");a[f]=true,i[i.length]=[f,l],u=false,f="";continue}u?f+=e:r+=e;}return [r,i]}(t),t=i[0],m=i[1]),a=s(P(t,e),v?this:I,F),(o||r||m.length)&&(l=w(a),o&&(l.dotAll=true,l.raw=F(function(t){for(var e,n=t.length,o=0,r="",i=false;o<=n;o++)"\\"!==(e=M(t,o))?i||"."!==e?("["===e?i=true:"]"===e&&(i=false),r+=e):r+="[\\s\\S]":r+=e+M(t,++o);return r}(t),n)),r&&(l.sticky=true),m.length&&(l.groups=m)),t!==x)try{u(a,"source",""===x?"(?:)":x);}catch(t){}return a},U=l(P),H=0;U.length>H;)y(F,P,U[H++]);I.constructor=F,F.prototype=I,g(r,"RegExp",F,{constructor:true});}x("RegExp");},7495:function(t,e,n){var o=n(6518),r=n(7323);o({target:"RegExp",proto:true,forced:/./.exec!==r},{exec:r});},8781:function(t,e,n){var o=n(350).PROPER,r=n(6840),i=n(8551),a=n(655),s=n(9039),u=n(1034),c="toString",l=RegExp.prototype,f=l[c],d=s((function(){return "/a/b"!==f.call({source:"a",flags:"b"})})),p=o&&f.name!==c;(d||p)&&r(l,c,(function(){var t=i(this);return "/"+a(t.source)+"/"+a(u(t))}),{unsafe:true});},1699:function(t,e,n){var o=n(6518),r=n(9504),i=n(5749),a=n(7750),s=n(655),u=n(1436),c=r("".indexOf);o({target:"String",proto:true,forced:!u("includes")},{includes:function(t){return !!~c(s(a(this)),s(i(t)),arguments.length>1?arguments[1]:void 0)}});},7764:function(t,e,n){var o=n(8183).charAt,r=n(655),i=n(1181),a=n(1088),s=n(2529),u="String Iterator",c=i.set,l=i.getterFor(u);a(String,"String",(function(t){c(this,{type:u,string:r(t),index:0});}),(function(){var t,e=l(this),n=e.string,r=e.index;return r>=n.length?s(void 0,true):(t=o(n,r),e.index+=t.length,s(t,false))}));},8543:function(t,e,n){var o=n(6518),r=n(9565),i=n(7476),a=n(3994),s=n(2529),u=n(7750),c=n(8014),l=n(655),f=n(8551),d=n(4117),p=n(2195),h=n(788),v=n(1034),y=n(5966),g=n(6840),m=n(9039),b=n(8227),w=n(2293),x=n(7829),E=n(6682),O=n(1181),S=n(6395),k=b("matchAll"),P="RegExp String",I=P+" Iterator",C=O.set,A=O.getterFor(I),M=RegExp.prototype,D=TypeError,T=i("".indexOf),N=i("".matchAll),j=!!N&&!m((function(){N("a",/./);})),R=a((function(t,e,n,o){C(this,{type:I,regexp:t,string:e,global:n,unicode:o,done:false});}),P,(function(){var t=A(this);if(t.done)return s(void 0,true);var e=t.regexp,n=t.string,o=E(e,n);return null===o?(t.done=true,s(void 0,true)):t.global?(""===l(o[0])&&(e.lastIndex=x(n,c(e.lastIndex),t.unicode)),s(o,false)):(t.done=true,s(o,false))})),L=function(t){var e,n,o,r=f(this),i=l(t),a=w(r,RegExp),s=l(v(r));return e=new a(a===RegExp?r.source:r,s),n=!!~T(s,"g"),o=!!~T(s,"u"),e.lastIndex=c(r.lastIndex),new R(e,i,n,o)};o({target:"String",proto:true,forced:j},{matchAll:function(t){var e,n,o,i,a=u(this);if(d(t)){if(j)return N(a,t)}else {if(h(t)&&(e=l(u(v(t))),!~T(e,"g")))throw new D("`.matchAll` does not allow non-global regexes");if(j)return N(a,t);if(void 0===(o=y(t,k))&&S&&"RegExp"===p(t)&&(o=L),o)return r(o,t,a)}return n=l(a),i=new RegExp(t,"g"),S?r(L,i,n):i[k](n)}}),S||k in M||g(M,k,L);},1761:function(t,e,n){var o=n(9565),r=n(9228),i=n(8551),a=n(4117),s=n(8014),u=n(655),c=n(7750),l=n(5966),f=n(7829),d=n(6682);r("match",(function(t,e,n){return [function(e){var n=c(this),r=a(e)?void 0:l(e,t);return r?o(r,e,n):new RegExp(e)[t](u(n))},function(t){var o=i(this),r=u(t),a=n(e,o,r);if(a.done)return a.value;if(!o.global)return d(o,r);var c=o.unicode;o.lastIndex=0;for(var l,p=[],h=0;null!==(l=d(o,r));){var v=u(l[0]);p[h]=v,""===v&&(o.lastIndex=f(r,s(o.lastIndex),c)),h++;}return 0===h?null:p}]}));},5440:function(t,e,n){var o=n(8745),r=n(9565),i=n(9504),a=n(9228),s=n(9039),u=n(8551),c=n(4901),l=n(4117),f=n(1291),d=n(8014),p=n(655),h=n(7750),v=n(7829),y=n(5966),g=n(2478),m=n(6682),b=n(8227)("replace"),w=Math.max,x=Math.min,E=i([].concat),O=i([].push),S=i("".indexOf),k=i("".slice),P="$0"==="a".replace(/./,"$0"),I=!!/./[b]&&""===/./[b]("a","$0");a("replace",(function(t,e,n){var i=I?"$":"$0";return [function(t,n){var o=h(this),i=l(t)?void 0:y(t,b);return i?r(i,t,o,n):r(e,p(o),t,n)},function(t,r){var a=u(this),s=p(t);if("string"==typeof r&&-1===S(r,i)&&-1===S(r,"$<")){var l=n(e,a,s,r);if(l.done)return l.value}var h=c(r);h||(r=p(r));var y,b=a.global;b&&(y=a.unicode,a.lastIndex=0);for(var P,I=[];null!==(P=m(a,s))&&(O(I,P),b);)""===p(P[0])&&(a.lastIndex=v(s,d(a.lastIndex),y));for(var C,A="",M=0,D=0;D<I.length;D++){for(var T,N=p((P=I[D])[0]),j=w(x(f(P.index),s.length),0),R=[],L=1;L<P.length;L++)O(R,void 0===(C=P[L])?C:String(C));var B=P.groups;if(h){var K=E([N],R,j,s);void 0!==B&&O(K,B),T=p(o(r,void 0,K));}else T=g(N,s,j,R,B,r);j>=M&&(A+=k(s,M,j)+T,M=j+N.length);}return A+k(s,M)}]}),!!s((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!P||I);},744:function(t,e,n){var o=n(9565),r=n(9504),i=n(9228),a=n(8551),s=n(4117),u=n(7750),c=n(2293),l=n(7829),f=n(8014),d=n(655),p=n(5966),h=n(6682),v=n(8429),y=n(9039),g=v.UNSUPPORTED_Y,m=Math.min,b=r([].push),w=r("".slice),x=!y((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),E="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;i("split",(function(t,e,n){var r="0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:o(e,this,t,n)}:e;return [function(e,n){var i=u(this),a=s(e)?void 0:p(e,t);return a?o(a,e,i,n):o(r,d(i),e,n)},function(t,o){var i=a(this),s=d(t);if(!E){var u=n(r,i,s,o,r!==e);if(u.done)return u.value}var p=c(i,RegExp),v=i.unicode,y=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(g?"g":"y"),x=new p(g?"^(?:"+i.source+")":i,y),O=void 0===o?4294967295:o>>>0;if(0===O)return [];if(0===s.length)return null===h(x,s)?[s]:[];for(var S=0,k=0,P=[];k<s.length;){x.lastIndex=g?0:k;var I,C=h(x,g?w(s,k):s);if(null===C||(I=m(f(x.lastIndex+(g?k:0)),s.length))===S)k=l(s,k,v);else {if(b(P,w(s,S,k)),P.length===O)return P;for(var A=1;A<=C.length-1;A++)if(b(P,C[A]),P.length===O)return P;k=S=I;}}return b(P,w(s,S)),P}]}),E||!x,g);},2762:function(t,e,n){var o=n(6518),r=n(3802).trim;o({target:"String",proto:true,forced:n(706)("trim")},{trim:function(){return r(this)}});},6761:function(t,e,n){var o=n(6518),r=n(4576),i=n(9565),a=n(9504),s=n(6395),u=n(3724),c=n(4495),l=n(9039),f=n(9297),d=n(1625),p=n(8551),h=n(5397),v=n(6969),y=n(655),g=n(6980),m=n(2360),b=n(1072),w=n(8480),x=n(298),E=n(3717),O=n(7347),S=n(4913),k=n(6801),P=n(8773),I=n(6840),C=n(2106),A=n(5745),M=n(6119),D=n(421),T=n(3392),N=n(8227),j=n(1951),R=n(511),L=n(8242),B=n(687),K=n(1181),_=n(9213).forEach,F=M("hidden"),U="Symbol",H="prototype",$=K.set,G=K.getterFor(U),V=Object[H],z=r.Symbol,Y=z&&z[H],W=r.RangeError,J=r.TypeError,X=r.QObject,q=O.f,Q=S.f,Z=x.f,tt=P.f,et=a([].push),nt=A("symbols"),ot=A("op-symbols"),rt=A("wks"),it=!X||!X[H]||!X[H].findChild,at=function(t,e,n){var o=q(V,e);o&&delete V[e],Q(t,e,n),o&&t!==V&&Q(V,e,o);},st=u&&l((function(){return 7!==m(Q({},"a",{get:function(){return Q(this,"a",{value:7}).a}})).a}))?at:Q,ut=function(t,e){var n=nt[t]=m(Y);return $(n,{type:U,tag:t,description:e}),u||(n.description=e),n},ct=function(t,e,n){t===V&&ct(ot,e,n),p(t);var o=v(e);return p(n),f(nt,o)?(n.enumerable?(f(t,F)&&t[F][o]&&(t[F][o]=false),n=m(n,{enumerable:g(0,false)})):(f(t,F)||Q(t,F,g(1,m(null))),t[F][o]=true),st(t,o,n)):Q(t,o,n)},lt=function(t,e){p(t);var n=h(e),o=b(n).concat(ht(n));return _(o,(function(e){u&&!i(ft,n,e)||ct(t,e,n[e]);})),t},ft=function(t){var e=v(t),n=i(tt,this,e);return !(this===V&&f(nt,e)&&!f(ot,e))&&(!(n||!f(this,e)||!f(nt,e)||f(this,F)&&this[F][e])||n)},dt=function(t,e){var n=h(t),o=v(e);if(n!==V||!f(nt,o)||f(ot,o)){var r=q(n,o);return !r||!f(nt,o)||f(n,F)&&n[F][o]||(r.enumerable=true),r}},pt=function(t){var e=Z(h(t)),n=[];return _(e,(function(t){f(nt,t)||f(D,t)||et(n,t);})),n},ht=function(t){var e=t===V,n=Z(e?ot:h(t)),o=[];return _(n,(function(t){!f(nt,t)||e&&!f(V,t)||et(o,nt[t]);})),o};c||(z=function(){if(d(Y,this))throw new J("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,e=T(t),n=function(t){var o=void 0===this?r:this;o===V&&i(n,ot,t),f(o,F)&&f(o[F],e)&&(o[F][e]=false);var a=g(1,t);try{st(o,e,a);}catch(t){if(!(t instanceof W))throw t;at(o,e,a);}};return u&&it&&st(V,e,{configurable:true,set:n}),ut(e,t)},I(Y=z[H],"toString",(function(){return G(this).tag})),I(z,"withoutSetter",(function(t){return ut(T(t),t)})),P.f=ft,S.f=ct,k.f=lt,O.f=dt,w.f=x.f=pt,E.f=ht,j.f=function(t){return ut(N(t),t)},u&&(C(Y,"description",{configurable:true,get:function(){return G(this).description}}),s||I(V,"propertyIsEnumerable",ft,{unsafe:true}))),o({global:true,constructor:true,wrap:true,forced:!c,sham:!c},{Symbol:z}),_(b(rt),(function(t){R(t);})),o({target:U,stat:true,forced:!c},{useSetter:function(){it=true;},useSimple:function(){it=false;}}),o({target:"Object",stat:true,forced:!c,sham:!u},{create:function(t,e){return void 0===e?m(t):lt(m(t),e)},defineProperty:ct,defineProperties:lt,getOwnPropertyDescriptor:dt}),o({target:"Object",stat:true,forced:!c},{getOwnPropertyNames:pt}),L(),B(z,U),D[F]=true;},9463:function(t,e,n){var o=n(6518),r=n(3724),i=n(4576),a=n(9504),s=n(9297),u=n(4901),c=n(1625),l=n(655),f=n(2106),d=n(7740),p=i.Symbol,h=p&&p.prototype;if(r&&u(p)&&(!("description"in h)||void 0!==p().description)){var v={},y=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),e=c(h,this)?new p(t):void 0===t?p():p(t);return ""===t&&(v[e]=true),e};d(y,p),y.prototype=h,h.constructor=y;var g="Symbol(description detection)"===String(p("description detection")),m=a(h.valueOf),b=a(h.toString),w=/^Symbol\((.*)\)[^)]+$/,x=a("".replace),E=a("".slice);f(h,"description",{configurable:true,get:function(){var t=m(this);if(s(v,t))return "";var e=b(t),n=g?E(e,7,-1):x(e,w,"$1");return ""===n?void 0:n}}),o({global:true,constructor:true,forced:true},{Symbol:y});}},1510:function(t,e,n){var o=n(6518),r=n(7751),i=n(9297),a=n(655),s=n(5745),u=n(1296),c=s("string-to-symbol-registry"),l=s("symbol-to-string-registry");o({target:"Symbol",stat:true,forced:!u},{for:function(t){var e=a(t);if(i(c,e))return c[e];var n=r("Symbol")(e);return c[e]=n,l[n]=e,n}});},2259:function(t,e,n){n(511)("iterator");},2675:function(t,e,n){n(6761),n(1510),n(7812),n(3110),n(9773);},7812:function(t,e,n){var o=n(6518),r=n(9297),i=n(757),a=n(6823),s=n(5745),u=n(1296),c=s("symbol-to-string-registry");o({target:"Symbol",stat:true,forced:!u},{keyFor:function(t){if(!i(t))throw new TypeError(a(t)+" is not a symbol");if(r(c,t))return c[t]}});},5700:function(t,e,n){var o=n(511),r=n(8242);o("toPrimitive"),r();},8344:function(t,e,n){n(8543);},3500:function(t,e,n){var o=n(4576),r=n(7400),i=n(9296),a=n(235),s=n(6699),u=function(t){if(t&&t.forEach!==a)try{s(t,"forEach",a);}catch(e){t.forEach=a;}};for(var c in r)r[c]&&u(o[c]&&o[c].prototype);u(i);},2953:function(t,e,n){var o=n(4576),r=n(7400),i=n(9296),a=n(3792),s=n(6699),u=n(687),c=n(8227)("iterator"),l=a.values,f=function(t,e){if(t){if(t[c]!==l)try{s(t,c,l);}catch(e){t[c]=l;}if(u(t,e,true),r[e])for(var n in a)if(t[n]!==a[n])try{s(t,n,a[n]);}catch(e){t[n]=a[n];}}};for(var d in r)f(o[d]&&o[d].prototype,d);f(i,"DOMTokenList");}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={exports:{}};return t[o].call(i.exports,i,i.exports,n),i.exports}n.d=function(t,e){for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:true,get:e[o]});},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:true});};var o={};function r(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return "Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function u(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||false,o.configurable=true,"value"in o&&(o.writable=true),Object.defineProperty(t,l(o.key),o);}}function c(t,e,n){return (e=l(e))in t?Object.defineProperty(t,e,{value:n,enumerable:true,configurable:true,writable:true}):t[e]=n,t}function l(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=s(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return ("string"===e?String:Number)(t)}(t,"string");return "symbol"==s(e)?e:e+""}n.r(o),n.d(o,{SimpleKeyboard:function(){return T},default:function(){return N}}),n(5276),n(8598),n(4782),n(4554),n(2010),n(7427),n(6099),n(7495),n(8781),n(5440),n(744),n(2762),"undefined"==typeof Element||"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this);}),"undefined"!=typeof self&&"document"in self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&function(t){if("Element"in t){var e="classList",n="prototype",o=t.Element[n],r=Object,i=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},a=Array[n].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return -1},s=function(t,e){this.name=t,this.code=DOMException[t],this.message=e;},u=function(t,e){if(""===e)throw new s("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(e))throw new s("INVALID_CHARACTER_ERR","The token must not contain space characters.");return a.call(t,e)},c=function(t){for(var e=i.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],o=0,r=n.length;o<r;o++)this.push(n[o]);this._updateClassName=function(){t.setAttribute("class",this.toString());};},l=c[n]=[],f=function(){return new c(this)};if(s[n]=Error[n],l.item=function(t){return this[t]||null},l.contains=function(t){return ~u(this,t+"")},l.add=function(){var t,e=arguments,n=0,o=e.length,r=false;do{~u(this,t=e[n]+"")||(this.push(t),r=true);}while(++n<o);r&&this._updateClassName();},l.remove=function(){var t,e,n=arguments,o=0,r=n.length,i=false;do{for(e=u(this,t=n[o]+"");~e;)this.splice(e,1),i=true,e=u(this,t);}while(++o<r);i&&this._updateClassName();},l.toggle=function(t,e){var n=this.contains(t),o=n?true!==e&&"remove":false!==e&&"add";return o&&this[o](t),true===e||false===e?e:!n},l.replace=function(t,e){var n=u(t+"");~n&&(this.splice(n,1,e),this._updateClassName());},l.toString=function(){return this.join(" ")},r.defineProperty){var d={get:f,enumerable:true,configurable:true};try{r.defineProperty(o,e,d);}catch(t){ void 0!==t.number&&-2146823252!==t.number||(d.enumerable=false,r.defineProperty(o,e,d));}}else r[n].__defineGetter__&&o.__defineGetter__(e,f);}}(self),function(){var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var n,o=arguments.length;for(n=0;n<o;n++)t=arguments[n],e.call(this,t);};};e("add"),e("remove");}if(t.classList.toggle("c3",false),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)};}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(t,e){var n=this.toString().split(" "),o=n.indexOf(t+"");~o&&(n=n.slice(o),this.remove.apply(this,n),this.add(e),this.add.apply(this,n.slice(1)));}),t=null;}()),n(2675),n(9463),n(2259),n(5700),n(8706),n(2008),n(3418),n(4423),n(3792),n(2062),n(6910),n(739),n(9572),n(2892),n(9085),n(3851),n(1278),n(9432),n(4864),n(1699),n(7764),n(8344),n(3500),n(2953),n(2712),n(2637),n(1480),n(1761);var f=function(){return t=function t(e){var n=e.getOptions,o=e.getCaretPosition,r=e.getCaretPositionEnd,i=e.dispatch;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),c(this,"getOptions",void 0),c(this,"getCaretPosition",void 0),c(this,"getCaretPositionEnd",void 0),c(this,"dispatch",void 0),c(this,"maxLengthReached",void 0),c(this,"isStandardButton",(function(t){return t&&!("{"===t[0]&&"}"===t[t.length-1])})),this.getOptions=n,this.getCaretPosition=o,this.getCaretPositionEnd=r,this.dispatch=i,t.bindMethods(t,this);},e=[{key:"getButtonType",value:function(t){return t.includes("{")&&t.includes("}")&&"{//}"!==t?"functionBtn":"standardBtn"}},{key:"getButtonClass",value:function(t){var e=this.getButtonType(t),n=t.replace("{","").replace("}",""),o="";return "standardBtn"!==e&&(o=" hg-button-".concat(n)),"hg-".concat(e).concat(o)}},{key:"getDefaultDiplay",value:function(){return {"{bksp}":"backspace","{backspace}":"backspace","{enter}":"< enter","{shift}":"shift","{shiftleft}":"shift","{shiftright}":"shift","{alt}":"alt","{s}":"shift","{tab}":"tab","{lock}":"caps","{capslock}":"caps","{accept}":"Submit","{space}":" ","{//}":" ","{esc}":"esc","{escape}":"esc","{f1}":"f1","{f2}":"f2","{f3}":"f3","{f4}":"f4","{f5}":"f5","{f6}":"f6","{f7}":"f7","{f8}":"f8","{f9}":"f9","{f10}":"f10","{f11}":"f11","{f12}":"f12","{numpaddivide}":"/","{numlock}":"lock","{arrowup}":"↑","{arrowleft}":"←","{arrowdown}":"↓","{arrowright}":"→","{prtscr}":"print","{scrolllock}":"scroll","{pause}":"pause","{insert}":"ins","{home}":"home","{pageup}":"up","{delete}":"del","{forwarddelete}":"del","{end}":"end","{pagedown}":"down","{numpadmultiply}":"*","{numpadsubtract}":"-","{numpadadd}":"+","{numpadenter}":"enter","{period}":".","{numpaddecimal}":".","{numpad0}":"0","{numpad1}":"1","{numpad2}":"2","{numpad3}":"3","{numpad4}":"4","{numpad5}":"5","{numpad6}":"6","{numpad7}":"7","{numpad8}":"8","{numpad9}":"9"}}},{key:"getButtonDisplayName",value:function(t,e){return (e=arguments.length>2&&void 0!==arguments[2]&&arguments[2]?Object.assign({},this.getDefaultDiplay(),e):e||this.getDefaultDiplay())[t]||t}},{key:"getUpdatedInput",value:function(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=this.getOptions(),a=[n,o,r],s=e;return ("{bksp}"===t||"{backspace}"===t)&&s.length>0?s=this.removeAt.apply(this,[s].concat(a)):("{delete}"===t||"{forwarddelete}"===t)&&s.length>0?s=this.removeForwardsAt.apply(this,[s].concat(a)):"{space}"===t?s=this.addStringAt.apply(this,[s," "].concat(a)):"{tab}"!==t||"boolean"==typeof i.tabCharOnTab&&false===i.tabCharOnTab?"{enter}"!==t&&"{numpadenter}"!==t||!i.newLineOnEnter?t.includes("numpad")&&Number.isInteger(Number(t[t.length-2]))?s=this.addStringAt.apply(this,[s,t[t.length-2]].concat(a)):"{numpaddivide}"===t?s=this.addStringAt.apply(this,[s,"/"].concat(a)):"{numpadmultiply}"===t?s=this.addStringAt.apply(this,[s,"*"].concat(a)):"{numpadsubtract}"===t?s=this.addStringAt.apply(this,[s,"-"].concat(a)):"{numpadadd}"===t?s=this.addStringAt.apply(this,[s,"+"].concat(a)):"{numpaddecimal}"===t?s=this.addStringAt.apply(this,[s,"."].concat(a)):"{"===t||"}"===t?s=this.addStringAt.apply(this,[s,t].concat(a)):t.includes("{")||t.includes("}")||(s=this.addStringAt.apply(this,[s,t].concat(a))):s=this.addStringAt.apply(this,[s,"\n"].concat(a)):s=this.addStringAt.apply(this,[s,"\t"].concat(a)),i.debug&&console.log("Input will be: "+s),s}},{key:"updateCaretPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.updateCaretPosAction(t,e);this.dispatch((function(t){t.setCaretPosition(n);}));}},{key:"updateCaretPosAction",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getOptions(),o=this.getCaretPosition();return null!=o&&(e?o>0&&(o-=t):o+=t),n.debug&&console.log("Caret at:",o),o}},{key:"addStringAt",value:function(t,e){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return o||0===o?(n=[t.slice(0,o),e,t.slice(r)].join(""),this.isMaxLengthReached()||i&&this.updateCaretPos(e.length)):n=t+e,n}},{key:"removeAt",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.length,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(0===n&&0===o)return t;if(n===o){var i=/([\uD800-\uDBFF][\uDC00-\uDFFF])/g;n&&n>=0?t.substring(n-2,n).match(i)?(e=t.substr(0,n-2)+t.substr(n),r&&this.updateCaretPos(2,true)):(e=t.substr(0,n-1)+t.substr(n),r&&this.updateCaretPos(1,true)):t.slice(-2).match(i)?(e=t.slice(0,-2),r&&this.updateCaretPos(2,true)):(e=t.slice(0,-1),r&&this.updateCaretPos(1,true));}else e=t.slice(0,n)+t.slice(o),r&&this.dispatch((function(t){t.setCaretPosition(n);}));return e}},{key:"removeForwardsAt",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.length,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return null!=t&&t.length&&null!==n?(n===o?e=t.substring(n,n+2).match(/([\uD800-\uDBFF][\uDC00-\uDFFF])/g)?t.substr(0,n)+t.substr(n+2):t.substr(0,n)+t.substr(n+1):(e=t.slice(0,n)+t.slice(o),r&&this.dispatch((function(t){t.setCaretPosition(n);}))),e):t}},{key:"handleMaxLength",value:function(t,e){var n=this.getOptions(),o=n.maxLength,r=t[n.inputName||"default"],i=e.length-1>=o;if(e.length<=r.length)return false;if(Number.isInteger(o))return n.debug&&console.log("maxLength (num) reached:",i),i?(this.maxLengthReached=true,true):(this.maxLengthReached=false,false);if("object"===s(o)){var a=e.length-1>=o[n.inputName||"default"];return n.debug&&console.log("maxLength (obj) reached:",a),a?(this.maxLengthReached=true,true):(this.maxLengthReached=false,false)}}},{key:"isMaxLengthReached",value:function(){return Boolean(this.maxLengthReached)}},{key:"isTouchDevice",value:function(){return "ontouchstart"in window||navigator.maxTouchPoints}},{key:"pointerEventsSupported",value:function(){return !!window.PointerEvent}},{key:"camelCase",value:function(t){return t?t.toLowerCase().trim().split(/[.\-_\s]/g).reduce((function(t,e){return e.length?t+e[0].toUpperCase()+e.slice(1):t})):""}},{key:"chunkArray",value:function(t,e){return r(Array(Math.ceil(t.length/e))).map((function(n,o){return t.slice(e*o,e+e*o)}))}},{key:"escapeRegex",value:function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}},{key:"getRtlOffset",value:function(t,e){var n=t,o=e.indexOf("‫");return o<t&&-1!=o&&n--,e.indexOf("‬")<t&&-1!=o&&n--,n<0?0:n}}],n=[{key:"bindMethods",value:function(t,e){var n,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=i(t))||e){n&&(t=n);var o=0,r=function(){};return {s:r,n:function(){return o>=t.length?{done:true}:{done:false,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=true,u=false;return {s:function(){n=n.call(t);},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=true,a=t;},f:function(){try{s||null==n.return||n.return();}finally{if(u)throw a}}}}(Object.getOwnPropertyNames(t.prototype));try{for(o.s();!(n=o.n()).done;){var r=n.value;"constructor"===r||"bindMethods"===r||(e[r]=e[r].bind(e));}}catch(t){o.e(t);}finally{o.f();}}}],e&&u(t.prototype,e),n&&u(t,n),Object.defineProperty(t,"prototype",{writable:false}),t;var t,e,n;}();c(f,"noop",(function(){}));var d=f;function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function h(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||false,o.configurable=true,"value"in o&&(o.writable=true),Object.defineProperty(t,y(o.key),o);}}function v(t,e,n){return (e=y(e))in t?Object.defineProperty(t,e,{value:n,enumerable:true,configurable:true,writable:true}):t[e]=n,t}function y(t){var e=function(t,e){if("object"!=p(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=p(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return ("string"===e?String:Number)(t)}(t,"string");return "symbol"==p(e)?e:e+""}var g=function(){return t=function t(e){var n=this,o=e.dispatch,r=e.getOptions;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),v(this,"getOptions",void 0),v(this,"dispatch",void 0),v(this,"isModifierKey",(function(t){return t.altKey||t.ctrlKey||t.shiftKey||["Tab","CapsLock","Esc","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t.code||t.key||n.keyCodeToKey(null==t?void 0:t.keyCode))})),this.dispatch=o,this.getOptions=r,d.bindMethods(t,this);},e=[{key:"handleHighlightKeyDown",value:function(t){var e=this.getOptions();e.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(t)&&(t.preventDefault(),t.stopImmediatePropagation());var n=this.getSimpleKeyboardLayoutKey(t);this.dispatch((function(o){var r,i,a=o.getButtonElement(n),s=o.getButtonElement("{".concat(n,"}"));if(a)r=a,i=n;else {if(!s)return;r=s,i="{".concat(n,"}");}var u,c,l,f,d=function(t){t.style.background=e.physicalKeyboardHighlightBgColor||"#dadce4",t.style.color=e.physicalKeyboardHighlightTextColor||"black";};if(r)if(Array.isArray(r)){if(r.forEach((function(t){return d(t)})),e.physicalKeyboardHighlightPress)if(e.physicalKeyboardHighlightPressUsePointerEvents)null===(u=r[0])||void 0===u||null===(c=u.onpointerdown)||void 0===c||c.call(u,t);else if(e.physicalKeyboardHighlightPressUseClick){var p;null===(p=r[0])||void 0===p||p.click();}else o.handleButtonClicked(i,t);}else d(r),e.physicalKeyboardHighlightPress&&(e.physicalKeyboardHighlightPressUsePointerEvents?null===(l=r)||void 0===l||null===(f=l.onpointerdown)||void 0===f||f.call(l,t):e.physicalKeyboardHighlightPressUseClick?r.click():o.handleButtonClicked(i,t));}));}},{key:"handleHighlightKeyUp",value:function(t){var e=this.getOptions();e.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(t)&&(t.preventDefault(),t.stopImmediatePropagation());var n=this.getSimpleKeyboardLayoutKey(t);this.dispatch((function(o){var r,i,a,s=o.getButtonElement(n)||o.getButtonElement("{".concat(n,"}")),u=function(t){t.removeAttribute&&t.removeAttribute("style");};s&&(Array.isArray(s)?(s.forEach((function(t){return u(t)})),e.physicalKeyboardHighlightPressUsePointerEvents&&(null===(r=s[0])||void 0===r||null===(i=r.onpointerup)||void 0===i||i.call(r,t))):(u(s),e.physicalKeyboardHighlightPressUsePointerEvents&&(null==s||null===(a=s.onpointerup)||void 0===a||a.call(s,t))));}));}},{key:"getSimpleKeyboardLayoutKey",value:function(t){var e,n="",o=t.code||t.key||this.keyCodeToKey(null==t?void 0:t.keyCode);return (n=null!=o&&o.includes("Numpad")||null!=o&&o.includes("Shift")||null!=o&&o.includes("Space")||null!=o&&o.includes("Backspace")||null!=o&&o.includes("Control")||null!=o&&o.includes("Alt")||null!=o&&o.includes("Meta")?t.code||"":t.key||this.keyCodeToKey(null==t?void 0:t.keyCode)||"").length>1?null===(e=n)||void 0===e?void 0:e.toLowerCase():n}},{key:"keyCodeToKey",value:function(t){return {8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",91:"Meta",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9",106:"NumpadMultiply",107:"NumpadAdd",109:"NumpadSubtract",110:"NumpadDecimal",111:"NumpadDivide",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}[t]||""}}],e&&h(t.prototype,e),n&&h(t,n),Object.defineProperty(t,"prototype",{writable:false}),t;var t,e,n;}();function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function b(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||false,o.configurable=true,"value"in o&&(o.writable=true),Object.defineProperty(t,x(o.key),o);}}function w(t,e,n){return (e=x(e))in t?Object.defineProperty(t,e,{value:n,enumerable:true,configurable:true,writable:true}):t[e]=n,t}function x(t){var e=function(t,e){if("object"!=m(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=m(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return ("string"===e?String:Number)(t)}(t,"string");return "symbol"==m(e)?e:e+""}var E=function(){return t=function t(e){var n=e.utilities,o=e.options;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),w(this,"utilities",void 0),w(this,"options",void 0),w(this,"candidateBoxElement",void 0),w(this,"pageIndex",0),w(this,"pageSize",void 0),this.utilities=n,this.options=o,d.bindMethods(t,this),this.pageSize=this.utilities.getOptions().layoutCandidatesPageSize||5;},e=[{key:"destroy",value:function(){this.candidateBoxElement&&(this.candidateBoxElement.remove(),this.pageIndex=0);}},{key:"show",value:function(t){var e=this,n=t.candidateValue,o=t.targetElement,r=t.onSelect;if(n&&n.length){var i=this.utilities.chunkArray(n.split(" "),this.pageSize);this.renderPage({candidateListPages:i,targetElement:o,pageIndex:this.pageIndex,nbPages:i.length,onItemSelected:function(t,n){r(t,n),e.destroy();}});}}},{key:"renderPage",value:function(t){var e,n=this,o=t.candidateListPages,r=t.targetElement,i=t.pageIndex,a=t.nbPages,s=t.onItemSelected;null===(e=this.candidateBoxElement)||void 0===e||e.remove(),this.candidateBoxElement=document.createElement("div"),this.candidateBoxElement.className="hg-candidate-box";var u=document.createElement("ul");u.className="hg-candidate-box-list",o[i].forEach((function(t){var e,o=document.createElement("li"),r=function(){var t=new(n.options.useTouchEvents?TouchEvent:MouseEvent)("click");return Object.defineProperty(t,"target",{value:o}),t};o.className="hg-candidate-box-list-item",o.innerHTML=(null===(e=n.options.display)||void 0===e?void 0:e[t])||t,n.options.useTouchEvents?o.ontouchstart=function(e){return s(t,e||r())}:o.onclick=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r();return s(t,e)},u.appendChild(o);}));var c=i>0,l=document.createElement("div");l.classList.add("hg-candidate-box-prev"),c&&l.classList.add("hg-candidate-box-btn-active");var f=function(){c&&n.renderPage({candidateListPages:o,targetElement:r,pageIndex:i-1,nbPages:a,onItemSelected:s});};this.options.useTouchEvents?l.ontouchstart=f:l.onclick=f,this.candidateBoxElement.appendChild(l),this.candidateBoxElement.appendChild(u);var d=i<a-1,p=document.createElement("div");p.classList.add("hg-candidate-box-next"),d&&p.classList.add("hg-candidate-box-btn-active");var h=function(){d&&n.renderPage({candidateListPages:o,targetElement:r,pageIndex:i+1,nbPages:a,onItemSelected:s});};this.options.useTouchEvents?p.ontouchstart=h:p.onclick=h,this.candidateBoxElement.appendChild(p),r.prepend(this.candidateBoxElement);}}],e&&b(t.prototype,e),n&&b(t,n),Object.defineProperty(t,"prototype",{writable:false}),t;var t,e,n;}(),O=E;function S(t){return function(t){if(Array.isArray(t))return k(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return k(t,e);var n={}.toString.call(t).slice(8,-1);return "Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}function P(t){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P(t)}function I(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o);}return n}function C(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||false,o.configurable=true,"value"in o&&(o.writable=true),Object.defineProperty(t,M(o.key),o);}}function A(t,e,n){return (e=M(e))in t?Object.defineProperty(t,e,{value:n,enumerable:true,configurable:true,writable:true}):t[e]=n,t}function M(t){var e=function(t,e){if("object"!=P(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=P(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return ("string"===e?String:Number)(t)}(t,"string");return "symbol"==P(e)?e:e+""}var D=function(){return t=function t(e,n){var o=this;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),A(this,"input",void 0),A(this,"options",void 0),A(this,"utilities",void 0),A(this,"caretPosition",void 0),A(this,"caretPositionEnd",void 0),A(this,"keyboardDOM",void 0),A(this,"keyboardPluginClasses",void 0),A(this,"keyboardDOMClass",void 0),A(this,"buttonElements",void 0),A(this,"currentInstanceName",void 0),A(this,"allKeyboardInstances",void 0),A(this,"keyboardInstanceNames",void 0),A(this,"isFirstKeyboardInstance",void 0),A(this,"physicalKeyboard",void 0),A(this,"modules",void 0),A(this,"activeButtonClass",void 0),A(this,"holdInteractionTimeout",void 0),A(this,"holdTimeout",void 0),A(this,"isMouseHold",void 0),A(this,"initialized",void 0),A(this,"candidateBox",void 0),A(this,"keyboardRowsDOM",void 0),A(this,"defaultName","default"),A(this,"activeInputElement",null),A(this,"handleParams",(function(t,e){var n,o,r;if("string"==typeof t)n=t.split(".").join(""),o=document.querySelector(".".concat(n)),r=e;else if(t instanceof HTMLDivElement){if(!t.className)throw console.warn("Any DOM element passed as parameter must have a class."),new Error("KEYBOARD_DOM_CLASS_ERROR");n=t.className.split(" ")[0],o=t,r=e;}else n="simple-keyboard",o=document.querySelector(".".concat(n)),r=t;return {keyboardDOMClass:n,keyboardDOM:o,options:r}})),A(this,"getOptions",(function(){return o.options})),A(this,"getCaretPosition",(function(){return o.caretPosition})),A(this,"getCaretPositionEnd",(function(){return o.caretPositionEnd})),A(this,"registerModule",(function(t,e){o.modules[t]||(o.modules[t]={}),e(o.modules[t]);})),A(this,"getKeyboardClassString",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return [o.keyboardDOMClass].concat(e).filter((function(t){return !!t})).join(" ")})),"undefined"!=typeof window){var r=this.handleParams(e,n),i=r.keyboardDOMClass,a=r.keyboardDOM,s=r.options,u=void 0===s?{}:s;this.utilities=new d({getOptions:this.getOptions,getCaretPosition:this.getCaretPosition,getCaretPositionEnd:this.getCaretPositionEnd,dispatch:this.dispatch}),this.caretPosition=null,this.caretPositionEnd=null,this.keyboardDOM=a,this.options=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?I(Object(n),true).forEach((function(e){A(t,e,n[e]);})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e));}));}return t}({layoutName:"default",theme:"hg-theme-default",inputName:"default",preventMouseDownDefault:false,enableLayoutCandidates:true,excludeFromLayout:{}},u),this.keyboardPluginClasses="",d.bindMethods(t,this);var c=this.options.inputName,l=void 0===c?this.defaultName:c;if(this.input={},this.input[l]="",this.keyboardDOMClass=i,this.buttonElements={},window.SimpleKeyboardInstances||(window.SimpleKeyboardInstances={}),this.currentInstanceName=this.utilities.camelCase(this.keyboardDOMClass),window.SimpleKeyboardInstances[this.currentInstanceName]=this,this.allKeyboardInstances=window.SimpleKeyboardInstances,this.keyboardInstanceNames=Object.keys(window.SimpleKeyboardInstances),this.isFirstKeyboardInstance=this.keyboardInstanceNames[0]===this.currentInstanceName,this.physicalKeyboard=new g({dispatch:this.dispatch,getOptions:this.getOptions}),this.candidateBox=this.options.enableLayoutCandidates?new O({utilities:this.utilities,options:this.options}):null,!this.keyboardDOM)throw console.warn('".'.concat(i,'" was not found in the DOM.')),new Error("KEYBOARD_DOM_ERROR");this.render(),this.modules={},this.loadModules();}},e=[{key:"setCaretPosition",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;this.caretPosition=t,this.caretPositionEnd=e;}},{key:"getInputCandidates",value:function(t){var e=this,n=this.options,o=n.layoutCandidates,r=n.layoutCandidatesCaseSensitiveMatch;if(!o||"object"!==P(o))return {};var i=Object.keys(o).filter((function(n){var o=t.substring(0,e.getCaretPositionEnd()||0)||t,i=new RegExp("".concat(e.utilities.escapeRegex(n),"$"),r?"g":"gi");return !!S(o.matchAll(i)).length}));if(i.length>1){var a=i.sort((function(t,e){return e.length-t.length}))[0];return {candidateKey:a,candidateValue:o[a]}}if(i.length){var s=i[0];return {candidateKey:s,candidateValue:o[s]}}return {}}},{key:"showCandidatesBox",value:function(t,e,n){var o=this;this.candidateBox&&this.candidateBox.show({candidateValue:e,targetElement:n,onSelect:function(e,n){var r=o.options,i=r.layoutCandidatesCaseSensitiveMatch,a=r.disableCandidateNormalization,s=r.enableLayoutCandidatesKeyPress,u=e;a||(u=e.normalize("NFD")),"function"==typeof o.options.beforeInputUpdate&&o.options.beforeInputUpdate(o);var c=o.getInput(o.options.inputName,true),l=o.getCaretPositionEnd()||0,f=c.substring(0,l||0)||c,d=new RegExp("".concat(o.utilities.escapeRegex(t),"$"),i?"g":"gi"),p=f.replace(d,u),h=c.replace(f,p),v=p.length-f.length,y=(l||c.length)+v;y<0&&(y=0),o.setInput(h,o.options.inputName,true),o.setCaretPosition(y),s&&"function"==typeof o.options.onKeyPress&&o.options.onKeyPress(e,n),"function"==typeof o.options.onChange&&o.options.onChange(o.getInput(o.options.inputName,true),n),"function"==typeof o.options.onChangeAll&&o.options.onChangeAll(o.getAllInputs(),n);}});}},{key:"handleButtonClicked",value:function(t,e){var n=this.options,o=n.inputName,r=void 0===o?this.defaultName:o,i=n.debug;if("{//}"!==t){this.input[r]||(this.input[r]=""),"function"==typeof this.options.beforeInputUpdate&&this.options.beforeInputUpdate(this);var a=this.utilities.getUpdatedInput(t,this.input[r],this.caretPosition,this.caretPositionEnd);if(this.utilities.isStandardButton(t)&&this.activeInputElement&&this.input[r]&&this.input[r]===a&&0===this.caretPosition&&this.caretPositionEnd===a.length)return this.setInput("",this.options.inputName,true),this.setCaretPosition(0),this.activeInputElement.value="",this.activeInputElement.setSelectionRange(0,0),void this.handleButtonClicked(t,e);if("function"==typeof this.options.onKeyPress&&this.options.onKeyPress(t,e),this.input[r]!==a&&(!this.options.inputPattern||this.options.inputPattern&&this.inputPatternIsValid(a))){if(this.options.maxLength&&this.utilities.handleMaxLength(this.input,a))return;var s=this.utilities.getUpdatedInput(t,this.input[r],this.caretPosition,this.caretPositionEnd,true);if(this.setInput(s,this.options.inputName,true),i&&console.log("Input changed:",this.getAllInputs()),this.options.debug&&console.log("Caret at: ",this.getCaretPosition(),this.getCaretPositionEnd(),"(".concat(this.keyboardDOMClass,")"),null==e?void 0:e.type),this.options.syncInstanceInputs&&this.syncInstanceInputs(),"function"==typeof this.options.onChange&&this.options.onChange(this.getInput(this.options.inputName,true),e),"function"==typeof this.options.onChangeAll&&this.options.onChangeAll(this.getAllInputs(),e),null!=e&&e.target&&this.options.enableLayoutCandidates){var u,c=this.getInputCandidates(a),l=c.candidateKey,f=c.candidateValue;l&&f?this.showCandidatesBox(l,f,this.keyboardDOM):null===(u=this.candidateBox)||void 0===u||u.destroy();}}this.caretPositionEnd&&this.caretPosition!==this.caretPositionEnd&&(this.setCaretPosition(this.caretPositionEnd,this.caretPositionEnd),this.activeInputElement&&this.activeInputElement.setSelectionRange(this.caretPositionEnd,this.caretPositionEnd),this.options.debug&&console.log("Caret position aligned",this.caretPosition)),i&&console.log("Key pressed:",t);}}},{key:"getMouseHold",value:function(){return this.isMouseHold}},{key:"setMouseHold",value:function(t){this.options.syncInstanceInputs?this.dispatch((function(e){e.isMouseHold=t;})):this.isMouseHold=t;}},{key:"handleButtonMouseDown",value:function(t,e){var n=this;e&&(this.options.preventMouseDownDefault&&e.preventDefault(),this.options.stopMouseDownPropagation&&e.stopPropagation(),e.target.classList.add(this.activeButtonClass)),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdTimeout&&clearTimeout(this.holdTimeout),this.setMouseHold(true),this.options.disableButtonHold||(this.holdTimeout=window.setTimeout((function(){(n.getMouseHold()&&(!t.includes("{")&&!t.includes("}")||"{delete}"===t||"{backspace}"===t||"{bksp}"===t||"{space}"===t||"{tab}"===t)||"{arrowright}"===t||"{arrowleft}"===t||"{arrowup}"===t||"{arrowdown}"===t)&&(n.options.debug&&console.log("Button held:",t),n.handleButtonHold(t)),clearTimeout(n.holdTimeout);}),500));}},{key:"handleButtonMouseUp",value:function(t,e){var n=this;e&&(this.options.preventMouseUpDefault&&e.preventDefault&&e.preventDefault(),this.options.stopMouseUpPropagation&&e.stopPropagation&&e.stopPropagation(),!(e.target===this.keyboardDOM||e.target&&this.keyboardDOM.contains(e.target)||this.candidateBox&&this.candidateBox.candidateBoxElement&&(e.target===this.candidateBox.candidateBoxElement||e.target&&this.candidateBox.candidateBoxElement.contains(e.target)))&&this.candidateBox&&this.candidateBox.destroy()),this.recurseButtons((function(t){t.classList.remove(n.activeButtonClass);})),this.setMouseHold(false),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),t&&"function"==typeof this.options.onKeyReleased&&this.options.onKeyReleased(t,e);}},{key:"handleKeyboardContainerMouseDown",value:function(t){this.options.preventMouseDownDefault&&t.preventDefault();}},{key:"handleButtonHold",value:function(t){var e=this;this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdInteractionTimeout=window.setTimeout((function(){e.getMouseHold()?(e.handleButtonClicked(t),e.handleButtonHold(t)):clearTimeout(e.holdInteractionTimeout);}),100);}},{key:"syncInstanceInputs",value:function(){var t=this;this.dispatch((function(e){e.replaceInput(t.input),e.setCaretPosition(t.caretPosition,t.caretPositionEnd);}));}},{key:"clearInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.inputName||this.defaultName;this.input[t]="",this.setCaretPosition(0),this.options.syncInstanceInputs&&this.syncInstanceInputs();}},{key:"getInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.inputName||this.defaultName,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.options.syncInstanceInputs&&!e&&this.syncInstanceInputs(),this.options.rtl?"‫"+this.input[t].replace("‫","").replace("‬","")+"‬":this.input[t]}},{key:"getAllInputs",value:function(){var t=this,e={};return Object.keys(this.input).forEach((function(n){e[n]=t.getInput(n,true);})),e}},{key:"setInput",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.inputName||this.defaultName,n=arguments.length>2?arguments[2]:void 0;this.input[e]=t,!n&&this.options.syncInstanceInputs&&this.syncInstanceInputs();}},{key:"replaceInput",value:function(t){this.input=t;}},{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.changedOptions(t);this.options=Object.assign(this.options,t),e.length&&(this.options.debug&&console.log("changedOptions",e),this.onSetOptions(e),this.render());}},{key:"changedOptions",value:function(t){var e=this;return Object.keys(t).filter((function(n){return JSON.stringify(t[n])!==JSON.stringify(e.options[n])}))}},{key:"onSetOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.includes("layoutName")&&this.candidateBox&&this.candidateBox.destroy(),(t.includes("layoutCandidatesPageSize")||t.includes("layoutCandidates"))&&this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=new O({utilities:this.utilities,options:this.options}));}},{key:"resetRows",value:function(){this.keyboardRowsDOM&&this.keyboardRowsDOM.remove(),this.keyboardDOM.className=this.keyboardDOMClass,this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.buttonElements={};}},{key:"dispatch",value:function(t){if(!window.SimpleKeyboardInstances)throw console.warn("SimpleKeyboardInstances is not defined. Dispatch cannot be called."),new Error("INSTANCES_VAR_ERROR");return Object.keys(window.SimpleKeyboardInstances).forEach((function(e){t(window.SimpleKeyboardInstances[e],e);}))}},{key:"addButtonTheme",value:function(t,e){var n=this;e&&t&&(t.split(" ").forEach((function(o){e.split(" ").forEach((function(e){n.options.buttonTheme||(n.options.buttonTheme=[]);var r=false;n.options.buttonTheme.map((function(t){if(null!=t&&t.class.split(" ").includes(e)){r=true;var n=t.buttons.split(" ");n.includes(o)||(r=true,n.push(o),t.buttons=n.join(" "));}return t})),r||n.options.buttonTheme.push({class:e,buttons:t});}));})),this.render());}},{key:"removeButtonTheme",value:function(t,e){var n=this;if(!t&&!e)return this.options.buttonTheme=[],void this.render();t&&Array.isArray(this.options.buttonTheme)&&this.options.buttonTheme.length&&(t.split(" ").forEach((function(t){var o;null===(o=n.options)||void 0===o||null===(o=o.buttonTheme)||void 0===o||o.map((function(o,r){if(o&&e&&e.includes(o.class)||!e){var i,a,s=null===(i=o)||void 0===i?void 0:i.buttons.split(" ").filter((function(e){return e!==t}));o&&null!=s&&s.length?o.buttons=s.join(" "):(null===(a=n.options.buttonTheme)||void 0===a||a.splice(r,1),o=null);}return o}));})),this.render());}},{key:"getButtonElement",value:function(t){var e,n=this.buttonElements[t];return n&&(e=n.length>1?n:n[0]),e}},{key:"inputPatternIsValid",value:function(t){var e,n=this.options.inputPattern;if((e=n instanceof RegExp?n:n[this.options.inputName||this.defaultName])&&t){var o=e.test(t);return this.options.debug&&console.log('inputPattern ("'.concat(e,'"): ').concat(o?"passed":"did not pass!")),o}return true}},{key:"setEventListeners",value:function(){if(this.isFirstKeyboardInstance||!this.allKeyboardInstances){this.options.debug&&console.log("Caret handling started (".concat(this.keyboardDOMClass,")"));var t=this.options.physicalKeyboardHighlightPreventDefault,e=void 0!==t&&t;document.addEventListener("keyup",this.handleKeyUp,e),document.addEventListener("keydown",this.handleKeyDown,e),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("touchend",this.handleTouchEnd),this.options.updateCaretOnSelectionChange&&document.addEventListener("selectionchange",this.handleSelectionChange),document.addEventListener("select",this.handleSelect);}}},{key:"handleKeyUp",value:function(t){this.caretEventHandler(t),this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyUp(t);}},{key:"handleKeyDown",value:function(t){this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyDown(t);}},{key:"handleMouseUp",value:function(t){this.caretEventHandler(t);}},{key:"handleTouchEnd",value:function(t){this.caretEventHandler(t);}},{key:"handleSelect",value:function(t){this.caretEventHandler(t);}},{key:"handleSelectionChange",value:function(t){navigator.userAgent.includes("Firefox")||this.caretEventHandler(t);}},{key:"caretEventHandler",value:function(t){var e,n=this;t.target.tagName&&(e=t.target.tagName.toLowerCase()),this.dispatch((function(o){var r=t.target===o.keyboardDOM||t.target&&o.keyboardDOM.contains(t.target);if(n.options.syncInstanceInputs&&Array.isArray(t.path)&&(r=t.path.some((function(t){var e;return null==t||null===(e=t.hasAttribute)||void 0===e?void 0:e.call(t,"data-skInstance")}))),("textarea"===e||"input"===e&&["text","search","url","tel","password"].includes(t.target.type))&&!o.options.disableCaretPositioning){var i=t.target.selectionStart,a=t.target.selectionEnd;o.options.rtl&&(i=o.utilities.getRtlOffset(i,o.getInput()),a=o.utilities.getRtlOffset(a,o.getInput())),o.setCaretPosition(i,a),o.activeInputElement=t.target,o.options.debug&&console.log("Caret at: ",o.getCaretPosition(),o.getCaretPositionEnd(),t&&t.target.tagName.toLowerCase(),"(".concat(o.keyboardDOMClass,")"),null==t?void 0:t.type);}else !o.options.disableCaretPositioning&&r||"selectionchange"===(null==t?void 0:t.type)||(o.setCaretPosition(null),o.activeInputElement=null,o.options.debug&&console.log('Caret position reset due to "'.concat(null==t?void 0:t.type,'" event'),t));}));}},{key:"recurseButtons",value:function(t){var e=this;t&&Object.keys(this.buttonElements).forEach((function(n){return e.buttonElements[n].forEach(t)}));}},{key:"destroy",value:function(){this.options.debug&&console.log("Destroying simple-keyboard instance: ".concat(this.currentInstanceName));var t=this.options.physicalKeyboardHighlightPreventDefault,e=void 0!==t&&t;document.removeEventListener("keyup",this.handleKeyUp,e),document.removeEventListener("keydown",this.handleKeyDown,e),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("touchend",this.handleTouchEnd),document.removeEventListener("select",this.handleSelect),this.options.updateCaretOnSelectionChange&&document.removeEventListener("selectionchange",this.handleSelectionChange),document.onpointerup=null,document.ontouchend=null,document.ontouchcancel=null,document.onmouseup=null,this.recurseButtons((function(t){t&&(t.onpointerdown=null,t.onpointerup=null,t.onpointercancel=null,t.ontouchstart=null,t.ontouchend=null,t.ontouchcancel=null,t.onclick=null,t.onmousedown=null,t.onmouseup=null,t.remove(),t=null);})),this.keyboardDOM.onpointerdown=null,this.keyboardDOM.ontouchstart=null,this.keyboardDOM.onmousedown=null,this.resetRows(),this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=null),this.activeInputElement=null,this.keyboardDOM.removeAttribute("data-skInstance"),this.keyboardDOM.innerHTML="",window.SimpleKeyboardInstances[this.currentInstanceName]=null,delete window.SimpleKeyboardInstances[this.currentInstanceName],this.initialized=false;}},{key:"getButtonThemeClasses",value:function(t){var e=this.options.buttonTheme,n=[];return Array.isArray(e)&&e.forEach((function(e){if(e&&e.class&&"string"==typeof e.class&&e.buttons&&"string"==typeof e.buttons){var o=e.class.split(" ");e.buttons.split(" ").includes(t)&&(n=[].concat(S(n),S(o)));}else console.warn('Incorrect "buttonTheme". Please check the documentation.',e);})),n}},{key:"setDOMButtonAttributes",value:function(t,e){var n=this.options.buttonAttributes;Array.isArray(n)&&n.forEach((function(n){n.attribute&&"string"==typeof n.attribute&&n.value&&"string"==typeof n.value&&n.buttons&&"string"==typeof n.buttons?n.buttons.split(" ").includes(t)&&e(n.attribute,n.value):console.warn('Incorrect "buttonAttributes". Please check the documentation.',n);}));}},{key:"onTouchDeviceDetected",value:function(){this.processAutoTouchEvents(),this.disableContextualWindow();}},{key:"disableContextualWindow",value:function(){window.oncontextmenu=function(t){if(t.target.classList.contains("hg-button"))return t.preventDefault(),t.stopPropagation(),false};}},{key:"processAutoTouchEvents",value:function(){this.options.autoUseTouchEvents&&(this.options.useTouchEvents=true,this.options.debug&&console.log("autoUseTouchEvents: Touch device detected, useTouchEvents enabled."));}},{key:"onInit",value:function(){this.options.debug&&console.log("".concat(this.keyboardDOMClass," Initialized")),this.setEventListeners(),"function"==typeof this.options.onInit&&this.options.onInit(this);}},{key:"beforeFirstRender",value:function(){this.utilities.isTouchDevice()&&this.onTouchDeviceDetected(),"function"==typeof this.options.beforeFirstRender&&this.options.beforeFirstRender(this),this.isFirstKeyboardInstance&&this.utilities.pointerEventsSupported()&&!this.options.useTouchEvents&&!this.options.useMouseEvents&&this.options.debug&&console.log("Using PointerEvents as it is supported by this browser"),this.options.useTouchEvents&&this.options.debug&&console.log("useTouchEvents has been enabled. Only touch events will be used.");}},{key:"beforeRender",value:function(){"function"==typeof this.options.beforeRender&&this.options.beforeRender(this);}},{key:"onRender",value:function(){"function"==typeof this.options.onRender&&this.options.onRender(this);}},{key:"onModulesLoaded",value:function(){"function"==typeof this.options.onModulesLoaded&&this.options.onModulesLoaded(this);}},{key:"loadModules",value:function(){var t=this;Array.isArray(this.options.modules)&&(this.options.modules.forEach((function(e){var n=new e(t);n.init&&n.init(t);})),this.keyboardPluginClasses="modules-loaded",this.render(),this.onModulesLoaded());}},{key:"getModuleProp",value:function(t,e){return !!this.modules[t]&&this.modules[t][e]}},{key:"getModulesList",value:function(){return Object.keys(this.modules)}},{key:"parseRowDOMContainers",value:function(t,e,n,o){var r=this,i=Array.from(t.children),a=0;return i.length&&n.forEach((function(n,s){var u=o[s];if(!(u&&u>n))return false;var c=n-a,l=u-a,f=document.createElement("div");f.className+="hg-button-container";var d="".concat(r.options.layoutName,"-r").concat(e,"c").concat(s);f.setAttribute("data-skUID",d);var p=i.splice(c,l-c+1);a=l-c,p.forEach((function(t){return f.appendChild(t)})),i.splice(c,0,f),t.innerHTML="",i.forEach((function(e){return t.appendChild(e)})),r.options.debug&&console.log("rowDOMContainer",p,c,l,a+1);})),t}},{key:"render",value:function(){var t=this;this.resetRows(),this.initialized||this.beforeFirstRender(),this.beforeRender();var e="hg-layout-".concat(this.options.layoutName),n=this.options.layout||{default:["` 1 2 3 4 5 6 7 8 9 0 - = {bksp}","{tab} q w e r t y u i o p [ ] \\","{lock} a s d f g h j k l ; ' {enter}","{shift} z x c v b n m , . / {shift}",".com @ {space}"],shift:["~ ! @ # $ % ^ & * ( ) _ + {bksp}","{tab} Q W E R T Y U I O P { } |",'{lock} A S D F G H J K L : " {enter}',"{shift} Z X C V B N M < > ? {shift}",".com @ {space}"]},o=this.options.useTouchEvents||false,r=o?"hg-touch-events":"",i=this.options.useMouseEvents||false,a=this.options.disableRowButtonContainers;this.keyboardDOM.className=this.getKeyboardClassString(this.options.theme,e,this.keyboardPluginClasses,r),this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.keyboardRowsDOM=document.createElement("div"),this.keyboardRowsDOM.className="hg-rows",n[this.options.layoutName||this.defaultName].forEach((function(e,n){var r=e.split(" ");t.options.excludeFromLayout&&t.options.excludeFromLayout[t.options.layoutName||t.defaultName]&&(r=r.filter((function(e){return t.options.excludeFromLayout&&!t.options.excludeFromLayout[t.options.layoutName||t.defaultName].includes(e)})));var s=document.createElement("div");s.className+="hg-row";var u=[],c=[];r.forEach((function(e,r){var l,f=!a&&"string"==typeof e&&e.length>1&&0===e.indexOf("["),d=!a&&"string"==typeof e&&e.length>1&&e.indexOf("]")===e.length-1;f&&(u.push(r),e=e.replace(/\[/g,"")),d&&(c.push(r),e=e.replace(/\]/g,""));var p=t.utilities.getButtonClass(e),h=t.utilities.getButtonDisplayName(e,t.options.display,t.options.mergeDisplay),v=t.options.useButtonTag?"button":"div",y=document.createElement(v);y.className+="hg-button ".concat(p),(l=y.classList).add.apply(l,S(t.getButtonThemeClasses(e))),t.setDOMButtonAttributes(e,(function(t,e){y.setAttribute(t,e);})),t.activeButtonClass="hg-activeButton",!t.utilities.pointerEventsSupported()||o||i?o?(y.ontouchstart=function(n){t.handleButtonClicked(e,n),t.handleButtonMouseDown(e,n);},y.ontouchend=function(n){t.handleButtonMouseUp(e,n);},y.ontouchcancel=function(n){t.handleButtonMouseUp(e,n);}):(y.onclick=function(n){t.setMouseHold(false),"function"!=typeof t.options.onKeyReleased&&t.handleButtonClicked(e,n);},y.onmousedown=function(n){"function"!=typeof t.options.onKeyReleased||t.isMouseHold||t.handleButtonClicked(e,n),t.handleButtonMouseDown(e,n);},y.onmouseup=function(n){t.handleButtonMouseUp(e,n);}):(y.onpointerdown=function(n){t.handleButtonClicked(e,n),t.handleButtonMouseDown(e,n);},y.onpointerup=function(n){t.handleButtonMouseUp(e,n);},y.onpointercancel=function(n){t.handleButtonMouseUp(e,n);}),y.setAttribute("data-skBtn",e);var g="".concat(t.options.layoutName,"-r").concat(n,"b").concat(r);y.setAttribute("data-skBtnUID",g);var m=document.createElement("span");m.innerHTML=h,y.appendChild(m),t.buttonElements[e]||(t.buttonElements[e]=[]),t.buttonElements[e].push(y),s.appendChild(y);})),s=t.parseRowDOMContainers(s,n,u,c),t.keyboardRowsDOM.appendChild(s);})),this.keyboardDOM.appendChild(this.keyboardRowsDOM),this.onRender(),this.initialized||(this.initialized=true,!this.utilities.pointerEventsSupported()||o||i?o?(document.ontouchend=function(e){return t.handleButtonMouseUp(void 0,e)},document.ontouchcancel=function(e){return t.handleButtonMouseUp(void 0,e)},this.keyboardDOM.ontouchstart=function(e){return t.handleKeyboardContainerMouseDown(e)}):o||(document.onmouseup=function(e){return t.handleButtonMouseUp(void 0,e)},this.keyboardDOM.onmousedown=function(e){return t.handleKeyboardContainerMouseDown(e)}):(document.onpointerup=function(e){return t.handleButtonMouseUp(void 0,e)},this.keyboardDOM.onpointerdown=function(e){return t.handleKeyboardContainerMouseDown(e)}),this.onInit());}}],e&&C(t.prototype,e),n&&C(t,n),Object.defineProperty(t,"prototype",{writable:false}),t;var t,e,n;}(),T=D,N=T;return o}();},442:function(e){e.exports=t;}},n={};function o(t){var r=n[t];if(void 0!==r)return r.exports;var i=n[t]={exports:{}};return e[t].call(i.exports,i,i.exports,o),i.exports}o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:true,get:e[n]});},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:true});};var r={};return function(){o.r(r),o.d(r,{KeyboardReact:function(){return l},default:function(){return f}});o(981);var t=o(442),e=o(548),n=o.n(e);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o);}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),true).forEach((function(e){u(t,e,n[e]);})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e));}));}return t}function u(t,e,n){return (e=function(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=i(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return ("string"===e?String:Number)(t)}(t,"string");return "symbol"==i(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:true,configurable:true,writable:true}):t[e]=n,t}var c=function(t){return s(s({},t),{},{keyboardRef:null})},l=function(e){var o=e.baseClass||"react-simple-keyboard",r=t.useRef(null),i=t.useRef(null),a=t.useRef(null),u=t.useRef(e);return t.useEffect((function(){return function(){a.current&&a.current.destroy(),r.current=false;}}),[]),t.useEffect((function(){var t=function(t){return s(s({},t),{},{theme:"simple-keyboard ".concat(t.theme||"hg-theme-default")})}(e);if(!r.current){r.current=true,t.debug&&console.log("ReactSimpleKeyboard: Init");var l=i.current,f=".".concat(o);a.current=new(n())(l||f,t),t.keyboardRef&&t.keyboardRef(a.current);}var d=function(t,e){var n=c(e),o=c(t);return Object.keys(n).filter((function(t){return n[t]!==o[t]}))}(u.current,t);if(d.length){var p=a.current;u.current=t,null==p||p.setOptions(t),t.debug&&console.log("ReactSimpleKeyboard - setOptions called due to updated props:",d);}}),[r,o,u,e]),t.createElement("div",{className:o,ref:i})},f=l;}(),r}()}));
2135
+ } (build));
2136
+
2137
+ var buildExports = build.exports;
2138
+ var Keyboard = /*@__PURE__*/getDefaultExportFromCjs(buildExports);
2139
+
2140
+ var KeyboardLayoutName;
2141
+ (function (KeyboardLayoutName) {
2142
+ KeyboardLayoutName["DEFAULT"] = "default";
2143
+ KeyboardLayoutName["SHIFT"] = "shift";
2144
+ })(KeyboardLayoutName || (KeyboardLayoutName = {}));
2145
+ var KeyboardKey;
2146
+ (function (KeyboardKey) {
2147
+ KeyboardKey["SHIFT"] = "{shift}";
2148
+ KeyboardKey["CAPS_LOCK"] = "{lock}";
2149
+ KeyboardKey["BACKSPACE"] = "{bksp}";
2150
+ KeyboardKey["ENTER"] = "{enter}";
2151
+ KeyboardKey["SUBMIT"] = "{submit}";
2152
+ KeyboardKey["TAB"] = "{tab}";
2153
+ KeyboardKey["SPACE"] = "{space}";
2154
+ // All the other keys should be a literal of what they represent
2155
+ })(KeyboardKey || (KeyboardKey = {}));
2156
+ const TEXT = {
2157
+ default: [`\` 1 2 3 4 5 6 7 8 9 0 - = ${KeyboardKey.BACKSPACE}`, `${KeyboardKey.TAB} q w e r t y u i o p [ ] \\`, `${KeyboardKey.CAPS_LOCK} a s d f g h j k l ; ' ${KeyboardKey.SUBMIT}`, `${KeyboardKey.SHIFT} z x c v b n m , . / ${KeyboardKey.ENTER}`, `${KeyboardKey.SPACE}`],
2158
+ shift: [`~ ! @ # $ % ^ & * ( ) _ + ${KeyboardKey.BACKSPACE}`, `${KeyboardKey.TAB} Q W E R T Y U I O P { } |`, `${KeyboardKey.CAPS_LOCK} A S D F G H J K L : " ${KeyboardKey.SUBMIT}`, `${KeyboardKey.SHIFT} Z X C V B N M < > ? ${KeyboardKey.ENTER}`, `${KeyboardKey.SPACE}`]
2159
+ };
2160
+ const NUMERIC = {
2161
+ default: ["1 2 3", "4 5 6", "7 8 9", ". 0 -", `${KeyboardKey.BACKSPACE} ${KeyboardKey.SUBMIT}`]
2162
+ };
2163
+ const KeyboardLayout = {
2164
+ TEXT,
2165
+ NUMERIC
2166
+ };
2167
+ const KeyboardDisplay = {
2168
+ [KeyboardKey.SHIFT]: "shift ⇧",
2169
+ [KeyboardKey.CAPS_LOCK]: "caps lock ⇪",
2170
+ [KeyboardKey.BACKSPACE]: "backspace ⌫",
2171
+ [KeyboardKey.ENTER]: "enter ↵",
2172
+ [KeyboardKey.SUBMIT]: "submit ✓",
2173
+ [KeyboardKey.TAB]: "tab ⇥",
2174
+ [KeyboardKey.SPACE]: "space"
2175
+ };
2176
+ const KeyboardLayoutsByInputType = {
2177
+ // Input type number cannot be supported because we cannot set the cursor position on number inputs
2178
+ // Use type "tel" instead
2179
+ // number: KeyboardLayout.NUMERIC,
2180
+ tel: KeyboardLayout.NUMERIC,
2181
+ date: KeyboardLayout.NUMERIC,
2182
+ // Never tested, might not work very well
2183
+ week: KeyboardLayout.NUMERIC,
2184
+ // Never tested, might not work very well
2185
+ text: KeyboardLayout.TEXT,
2186
+ password: KeyboardLayout.TEXT,
2187
+ "datetime-local": KeyboardLayout.TEXT,
2188
+ // Never tested, might not work very well
2189
+ month: KeyboardLayout.TEXT,
2190
+ // Never tested, might not work very well
2191
+ time: KeyboardLayout.TEXT,
2192
+ // Never tested, might not work very well
2193
+ email: KeyboardLayout.TEXT,
2194
+ search: KeyboardLayout.TEXT,
2195
+ url: KeyboardLayout.TEXT,
2196
+ textarea: KeyboardLayout.TEXT
2197
+ };
2198
+
2199
+ const VirtualKeyboard = () => {
2200
+ const {
2201
+ classes
2202
+ } = useStyles();
2203
+ const [initialInputValue, setInitialInputValue] = useState();
2204
+ const [toggleLayoutOnInput, setToggleLayoutOnInput] = useState(false);
2205
+ const [isKeyboardVisible, setIsKeyboardVisible] = useState(false);
2206
+ const [keyboardLayout, setKeyboardLayout] = useState(KeyboardLayout.TEXT);
2207
+ const [keyboardLayoutName, setKeyboardLayoutName] = useState(KeyboardLayoutName.DEFAULT);
2208
+ const [focusedTextInput, setFocusedTextInput] = useState();
2209
+ const [isSubmitPressed, setIsSubmitPressed] = useState(false);
2210
+ const virtualKeyboardRef = useRef(null);
2211
+ const keyboardContainerRef = useRef(null);
2212
+ useEffect(function handleClickListeners() {
2213
+ function handleMouseOrTouchUp(event) {
2214
+ if (isSubmitPressed) {
2215
+ event.preventDefault();
2216
+ setIsKeyboardVisible(false);
2217
+ setIsSubmitPressed(false);
2218
+ return;
2219
+ }
2220
+ if (keyboardContainerRef.current && !keyboardContainerRef.current.contains(event.target) && (document.activeElement == null || document.activeElement.tagName !== "INPUT")) {
2221
+ setIsKeyboardVisible(false);
2222
+ }
2223
+ }
2224
+ document.addEventListener("mouseup", handleMouseOrTouchUp);
2225
+ document.addEventListener("touchend", handleMouseOrTouchUp);
2226
+ return () => {
2227
+ document.removeEventListener("mouseup", handleMouseOrTouchUp);
2228
+ document.removeEventListener("touchend", handleMouseOrTouchUp);
2229
+ };
2230
+ }, [isSubmitPressed]);
2231
+ useEffect(function showKeyboard() {
2232
+ // The keyboard will appear/disappear on mouse down
2233
+ // 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
2234
+ // The layout might shift, the page might scroll and the user might misclick because of that.
2235
+ // To prevent this, we introduce a small delay to allow the user to finish the click they started.
2236
+ // The layout will shift after the click.
2237
+ const effectDelayMs = 150;
2238
+ if (focusedTextInput !== undefined) {
2239
+ const showTimeout = setTimeout(() => {
2240
+ setIsKeyboardVisible(true);
2241
+ }, effectDelayMs);
2242
+ return () => {
2243
+ clearTimeout(showTimeout);
2244
+ };
2245
+ }
2246
+ }, [focusedTextInput]);
2247
+ useEffect(function scrollInputIntoViewAfterKeyboardAppears() {
2248
+ if (isKeyboardVisible && focusedTextInput !== undefined) {
2249
+ focusedTextInput.scrollIntoView({
2250
+ behavior: "smooth",
2251
+ block: "center"
2252
+ });
2253
+ }
2254
+ }, [isKeyboardVisible, focusedTextInput]);
2255
+ useEffect(function attachToFocusedTextInput() {
2256
+ const setFocusedInputIfFocusedElementIsInput = event => {
2257
+ var _a;
2258
+ const eventTarget = event.target;
2259
+ if (eventTarget.type === "number") {
2260
+ console.warn("The VirtualKeyboard cannot support an input of type number. Use type 'tel' instead.", eventTarget);
2261
+ eventTarget.type = "tel";
2262
+ }
2263
+ const targetKeyboardLayout = KeyboardLayoutsByInputType[eventTarget.type];
2264
+ if (targetKeyboardLayout !== undefined) {
2265
+ setKeyboardLayout(targetKeyboardLayout);
2266
+ setKeyboardLayoutName(KeyboardLayoutName.DEFAULT);
2267
+ setFocusedTextInput(eventTarget);
2268
+ setInitialInputValue(eventTarget.value);
2269
+ (_a = virtualKeyboardRef.current) === null || _a === void 0 ? void 0 : _a.setInput(eventTarget.value);
2270
+ }
2271
+ };
2272
+ document.addEventListener("focus", setFocusedInputIfFocusedElementIsInput, {
2273
+ capture: true
2274
+ });
2275
+ return () => {
2276
+ document.removeEventListener("focus", setFocusedInputIfFocusedElementIsInput, {
2277
+ capture: true
2278
+ });
2279
+ };
2280
+ }, []);
2281
+ useEffect(function detachWhenTextInputLosesFocus() {
2282
+ if (focusedTextInput === undefined || initialInputValue === undefined) {
2283
+ return;
2284
+ }
2285
+ const unsetFocusedTextInput = () => {
2286
+ if (initialInputValue !== focusedTextInput.value) {
2287
+ focusedTextInput.dispatchEvent(new Event("change")); // Some jQuery handlers use on("change", handler)
2288
+ }
2289
+ setFocusedTextInput(undefined);
2290
+ setInitialInputValue(undefined);
2291
+ };
2292
+ focusedTextInput.addEventListener("blur", unsetFocusedTextInput, {
2293
+ capture: true
2294
+ });
2295
+ return () => {
2296
+ if (!isKeyboardVisible) {
2297
+ focusedTextInput.removeEventListener("blur", unsetFocusedTextInput, {
2298
+ capture: true
2299
+ });
2300
+ }
2301
+ };
2302
+ }, [focusedTextInput, initialInputValue, isKeyboardVisible]);
2303
+ // Stay in sync with external changes originating from code or physical keyboard
2304
+ useEffect(function syncExternalChangesFromCodeOrKeyboard() {
2305
+ if (focusedTextInput === undefined) {
2306
+ return;
2307
+ }
2308
+ const updateKeyboardInput = () => {
2309
+ var _a, _b;
2310
+ (_a = virtualKeyboardRef.current) === null || _a === void 0 ? void 0 : _a.setInput(focusedTextInput.value);
2311
+ (_b = virtualKeyboardRef.current) === null || _b === void 0 ? void 0 : _b.setCaretPosition(focusedTextInput.selectionStart, focusedTextInput.selectionEnd);
2312
+ };
2313
+ /** Without adding a click event listener, moving the caret by tapping somewhere on your input does not work correctly with inputs in a shadow dom.
2314
+ * the caret position needs to be explicitly set on click */
2315
+ focusedTextInput.addEventListener("input", updateKeyboardInput, {
2316
+ capture: true
2317
+ });
2318
+ focusedTextInput.addEventListener("click", updateKeyboardInput, {
2319
+ capture: true
2320
+ });
2321
+ focusedTextInput.addEventListener("touchstart", updateKeyboardInput, {
2322
+ capture: true
2323
+ });
2324
+ focusedTextInput.addEventListener("touchend", updateKeyboardInput, {
2325
+ capture: true
2326
+ });
2327
+ return () => {
2328
+ focusedTextInput.removeEventListener("input", updateKeyboardInput, {
2329
+ capture: true
2330
+ });
2331
+ focusedTextInput.removeEventListener("click", updateKeyboardInput, {
2332
+ capture: true
2333
+ });
2334
+ focusedTextInput.removeEventListener("touchstart", updateKeyboardInput, {
2335
+ capture: true
2336
+ });
2337
+ focusedTextInput.removeEventListener("touchend", updateKeyboardInput, {
2338
+ capture: true
2339
+ });
2340
+ };
2341
+ }, [focusedTextInput]);
2342
+ const handleInput = (newValue, event) => {
2343
+ if (focusedTextInput === undefined) {
2344
+ return;
2345
+ }
2346
+ if (String(focusedTextInput.className).includes("monaco")) {
2347
+ /* skip: MonacoEditor textarea input actions via VirtualKeyboard are
2348
+ * handled below using the monacoEventEmitter + editor.trigger(...) calls. */
2349
+ return;
2350
+ }
2351
+ if (toggleLayoutOnInput) {
2352
+ setKeyboardLayoutName(toggleLayout(keyboardLayoutName));
2353
+ setToggleLayoutOnInput(false);
2354
+ }
2355
+ // For number inputs only:
2356
+ // If you enter - or . more than once, it will take the most recent character as the input value (same as a normal keyboard)
2357
+ const isNewValueOnlyDashesAndPoints = newValue.match("^[.-]{2,}$");
2358
+ const isNumberInput = focusedTextInput.type === "tel" || focusedTextInput.type === "number";
2359
+ setInputValue(focusedTextInput, isNewValueOnlyDashesAndPoints && isNumberInput ? newValue.charAt(newValue.length - 1) : newValue, virtualKeyboardRef.current.caretPosition);
2360
+ };
2361
+ const handleKeyPress = keyboardKey => {
2362
+ if (focusedTextInput === undefined || virtualKeyboardRef.current === null) {
2363
+ return;
2364
+ }
2365
+ switch (keyboardKey) {
2366
+ case KeyboardKey.SHIFT:
2367
+ setToggleLayoutOnInput(!toggleLayoutOnInput);
2368
+ setKeyboardLayoutName(toggleLayout(keyboardLayoutName));
2369
+ setIsKeyboardVisible(true);
2370
+ break;
2371
+ case KeyboardKey.CAPS_LOCK:
2372
+ setKeyboardLayoutName(toggleLayout(keyboardLayoutName));
2373
+ setIsKeyboardVisible(true);
2374
+ break;
2375
+ case KeyboardKey.SUBMIT:
2376
+ focusedTextInput.blur();
2377
+ setIsSubmitPressed(true);
2378
+ break;
2379
+ }
2380
+ };
2381
+ const handleKeyboardContainerEvents = event => {
2382
+ event.stopPropagation();
2383
+ if (event.cancelable && event.type === "mousedown") {
2384
+ event.preventDefault();
2385
+ }
2386
+ if (focusedTextInput) {
2387
+ focusedTextInput.focus();
2388
+ }
2389
+ };
2390
+ if (!isKeyboardVisible) {
2391
+ return null;
2392
+ }
2393
+ return jsx("div", {
2394
+ id: "virtual_keyboard",
2395
+ ref: keyboardContainerRef,
2396
+ onMouseDown: handleKeyboardContainerEvents,
2397
+ onTouchStart: handleKeyboardContainerEvents,
2398
+ className: classes.virtualKeyboard,
2399
+ children: jsx(Keyboard, {
2400
+ keyboardRef: ref => {
2401
+ virtualKeyboardRef.current = ref;
2402
+ },
2403
+ onInit: keyboard => {
2404
+ if (keyboard === undefined) {
2405
+ console.error("The virtual keyboard is open, but not available. This is not supposed to happen.");
2406
+ return;
2407
+ }
2408
+ if (focusedTextInput === undefined) {
2409
+ console.error("The virtual keyboard is open, but there's no focusedTextInput. This is not supposed to happen.");
2410
+ return;
2411
+ }
2412
+ const textWasSelectedBeforeInit = isTextSelected(focusedTextInput);
2413
+ keyboard.setCaretPosition(focusedTextInput.selectionStart);
2414
+ keyboard.setInput(focusedTextInput.value);
2415
+ if (textWasSelectedBeforeInit !== undefined && textWasSelectedBeforeInit) {
2416
+ focusedTextInput.select();
2417
+ }
2418
+ keyboard.setCaretPosition(focusedTextInput.selectionStart);
2419
+ keyboard.setInput(focusedTextInput.value);
2420
+ },
2421
+ onChange: handleInput,
2422
+ onKeyPress: handleKeyPress,
2423
+ layout: keyboardLayout,
2424
+ layoutName: keyboardLayoutName,
2425
+ preventMouseDownDefault: true,
2426
+ stopMouseDownPropagation: true,
2427
+ display: KeyboardDisplay,
2428
+ newLineOnEnter: true
2429
+ })
2430
+ });
2431
+ };
2432
+ /**
2433
+ * Sets the input value in a way that can be picked up by React if the element is managed by React.
2434
+ *
2435
+ * I don't understand any of this, but other people do
2436
+ * - https://stackoverflow.com/questions/42550341/react-trigger-onchange-if-input-value-is-changing-by-state/59939017#59939017
2437
+ */
2438
+ function setInputValue(inputElement, inputValue, caretPosition) {
2439
+ var _a, _b;
2440
+ const valueSetter = (_a = Object.getOwnPropertyDescriptor(inputElement, "value")) === null || _a === void 0 ? void 0 : _a.set;
2441
+ const inputPrototype = Object.getPrototypeOf(inputElement);
2442
+ const prototypeValueSetter = (_b = Object.getOwnPropertyDescriptor(inputPrototype, "value")) === null || _b === void 0 ? void 0 : _b.set;
2443
+ if (valueSetter !== undefined && prototypeValueSetter !== undefined && valueSetter !== prototypeValueSetter) {
2444
+ prototypeValueSetter.call(inputElement, inputValue);
2445
+ } else if (valueSetter !== undefined) {
2446
+ valueSetter.call(inputElement, inputValue);
2447
+ } else {
2448
+ // Not managed by React, set it the normal way
2449
+ inputElement.value = inputValue;
2450
+ }
2451
+ // The input caret position doesn't stay in sync after setting the value programmatically, so we set it
2452
+ inputElement.setSelectionRange(caretPosition, caretPosition);
2453
+ inputElement.dispatchEvent(new Event("input")); // Some jQuery handlers use on("input", handler)
2454
+ inputElement.dispatchEvent(new Event("input", {
2455
+ bubbles: true
2456
+ })); // Used by React onChange handlers
2457
+ }
2458
+ function toggleLayout(keyboardLayoutName) {
2459
+ return keyboardLayoutName === KeyboardLayoutName.DEFAULT ? KeyboardLayoutName.SHIFT : KeyboardLayoutName.DEFAULT;
2460
+ }
2461
+ function isTextSelected(inputElement) {
2462
+ if (typeof inputElement.selectionStart == "number") {
2463
+ return inputElement.selectionStart === 0 && inputElement.selectionEnd === inputElement.value.length;
2464
+ } else if (typeof window.getSelection != "undefined") {
2465
+ const selection = window.getSelection();
2466
+ return (selection === null || selection === void 0 ? void 0 : selection.toString()) === inputElement.value;
2467
+ }
2468
+ }
2469
+ const useStyles = tss.create({
2470
+ virtualKeyboard: {
2471
+ height: "45vh",
2472
+ position: "sticky",
2473
+ bottom: 0,
2474
+ flexShrink: 0,
2475
+ fontSize: "26px",
2476
+ zIndex: 999999,
2477
+ // The ultimate "above everything"
2478
+ /* Make the keyboard take up all the height provided by its parent (#virtual_keyboard) */
2479
+ "& .react-simple-keyboard": {
2480
+ height: "100%"
2481
+ },
2482
+ "& .hg-rows": {
2483
+ height: "100%",
2484
+ display: "flex",
2485
+ flexDirection: "column",
2486
+ "& .hg-row": {
2487
+ flexGrow: 1
2488
+ }
2489
+ },
2490
+ "& .hg-theme-default .hg-button": {
2491
+ height: "100%",
2492
+ /* Make sure the "@" button which can appear when to change to the "shift" layout takes up all the space */
2493
+ "&[data-skbtn='@']": {
2494
+ maxWidth: "initial"
2495
+ },
2496
+ /* Keep the "@" and ".com" buttons small when next to the space bar */
2497
+ "&[data-skbtn='.com'][data-skbtnuid='default-r4b0'], &[data-skbtn='.com'][data-skbtnuid='shift-r4b0'], &[data-skbtn='@'][data-skbtnuid='default-r4b1'], &[data-skbtn='@'][data-skbtnuid='shift-r4b1']": {
2498
+ maxWidth: "120px"
2499
+ }
2500
+ }
2501
+ }
2502
+ });
2503
+
2504
+ var NATIVE_BIND$1 = functionBindNative;
2505
+
2506
+ var FunctionPrototype = Function.prototype;
2507
+ var apply$1 = FunctionPrototype.apply;
2508
+ var call$a = FunctionPrototype.call;
2509
+
2510
+ // eslint-disable-next-line es/no-reflect -- safe
2511
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$a.bind(apply$1) : function () {
2512
+ return call$a.apply(apply$1, arguments);
2513
+ });
2514
+
2515
+ var uncurryThis$8 = functionUncurryThis;
2516
+ var toObject$1 = toObject$4;
2517
+
2518
+ var floor = Math.floor;
2519
+ var charAt = uncurryThis$8(''.charAt);
2520
+ var replace = uncurryThis$8(''.replace);
2521
+ var stringSlice$2 = uncurryThis$8(''.slice);
2522
+ // eslint-disable-next-line redos/no-vulnerable -- safe
2523
+ var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
2524
+ var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
2525
+
2526
+ // `GetSubstitution` abstract operation
2527
+ // https://tc39.es/ecma262/#sec-getsubstitution
2528
+ var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
2529
+ var tailPos = position + matched.length;
2530
+ var m = captures.length;
2531
+ var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
2532
+ if (namedCaptures !== undefined) {
2533
+ namedCaptures = toObject$1(namedCaptures);
2534
+ symbols = SUBSTITUTION_SYMBOLS;
2535
+ }
2536
+ return replace(replacement, symbols, function (match, ch) {
2537
+ var capture;
2538
+ switch (charAt(ch, 0)) {
2539
+ case '$': return '$';
2540
+ case '&': return matched;
2541
+ case '`': return stringSlice$2(str, 0, position);
2542
+ case "'": return stringSlice$2(str, tailPos);
2543
+ case '<':
2544
+ capture = namedCaptures[stringSlice$2(ch, 1, -1)];
2545
+ break;
2546
+ default: // \d\d?
2547
+ var n = +ch;
2548
+ if (n === 0) return match;
2549
+ if (n > m) {
2550
+ var f = floor(n / 10);
2551
+ if (f === 0) return match;
2552
+ if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
2553
+ return match;
2554
+ }
2555
+ capture = captures[n - 1];
2556
+ }
2557
+ return capture === undefined ? '' : capture;
2558
+ });
2559
+ };
2560
+
2561
+ var apply = functionApply;
2562
+ var call$9 = functionCall;
2563
+ var uncurryThis$7 = functionUncurryThis;
2564
+ var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
2565
+ var fails$4 = fails$l;
2566
+ var anObject$9 = anObject$i;
2567
+ var isCallable$3 = isCallable$j;
2568
+ var isNullOrUndefined$1 = isNullOrUndefined$5;
2569
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$5;
2570
+ var toLength$1 = toLength$4;
2571
+ var toString$3 = toString$8;
2572
+ var requireObjectCoercible$1 = requireObjectCoercible$8;
2573
+ var advanceStringIndex = advanceStringIndex$2;
2574
+ var getMethod$3 = getMethod$6;
2575
+ var getSubstitution = getSubstitution$1;
2576
+ var regExpExec = regexpExecAbstract;
2577
+ var wellKnownSymbol$4 = wellKnownSymbol$g;
2578
+
2579
+ var REPLACE = wellKnownSymbol$4('replace');
2580
+ var max$1 = Math.max;
2581
+ var min$1 = Math.min;
2582
+ var concat = uncurryThis$7([].concat);
2583
+ var push$1 = uncurryThis$7([].push);
2584
+ var stringIndexOf = uncurryThis$7(''.indexOf);
2585
+ var stringSlice$1 = uncurryThis$7(''.slice);
2586
+
2587
+ var maybeToString = function (it) {
2588
+ return it === undefined ? it : String(it);
2589
+ };
2590
+
2591
+ // IE <= 11 replaces $0 with the whole match, as if it was $&
2592
+ // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
2593
+ var REPLACE_KEEPS_$0 = (function () {
2594
+ // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
2595
+ return 'a'.replace(/./, '$0') === '$0';
2596
+ })();
2597
+
2598
+ // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
2599
+ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
2600
+ if (/./[REPLACE]) {
2601
+ return /./[REPLACE]('a', '$0') === '';
2602
+ }
2603
+ return false;
2604
+ })();
2605
+
2606
+ var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$4(function () {
2607
+ var re = /./;
2608
+ re.exec = function () {
2609
+ var result = [];
2610
+ result.groups = { a: '7' };
2611
+ return result;
2612
+ };
2613
+ // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
2614
+ return ''.replace(re, '$<a>') !== '7';
2615
+ });
2616
+
2617
+ // @@replace logic
2618
+ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
2619
+ var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
2620
+
2621
+ return [
2622
+ // `String.prototype.replace` method
2623
+ // https://tc39.es/ecma262/#sec-string.prototype.replace
2624
+ function replace(searchValue, replaceValue) {
2625
+ var O = requireObjectCoercible$1(this);
2626
+ var replacer = isNullOrUndefined$1(searchValue) ? undefined : getMethod$3(searchValue, REPLACE);
2627
+ return replacer
2628
+ ? call$9(replacer, searchValue, O, replaceValue)
2629
+ : call$9(nativeReplace, toString$3(O), searchValue, replaceValue);
2630
+ },
2631
+ // `RegExp.prototype[@@replace]` method
2632
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
2633
+ function (string, replaceValue) {
2634
+ var rx = anObject$9(this);
2635
+ var S = toString$3(string);
2636
+
2637
+ if (
2638
+ typeof replaceValue == 'string' &&
2639
+ stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
2640
+ stringIndexOf(replaceValue, '$<') === -1
2641
+ ) {
2642
+ var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
2643
+ if (res.done) return res.value;
2644
+ }
2645
+
2646
+ var functionalReplace = isCallable$3(replaceValue);
2647
+ if (!functionalReplace) replaceValue = toString$3(replaceValue);
2648
+
2649
+ var global = rx.global;
2650
+ var fullUnicode;
2651
+ if (global) {
2652
+ fullUnicode = rx.unicode;
2653
+ rx.lastIndex = 0;
2654
+ }
2655
+
2656
+ var results = [];
2657
+ var result;
2658
+ while (true) {
2659
+ result = regExpExec(rx, S);
2660
+ if (result === null) break;
2661
+
2662
+ push$1(results, result);
2663
+ if (!global) break;
2664
+
2665
+ var matchStr = toString$3(result[0]);
2666
+ if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength$1(rx.lastIndex), fullUnicode);
2667
+ }
2668
+
2669
+ var accumulatedResult = '';
2670
+ var nextSourcePosition = 0;
2671
+ for (var i = 0; i < results.length; i++) {
2672
+ result = results[i];
2673
+
2674
+ var matched = toString$3(result[0]);
2675
+ var position = max$1(min$1(toIntegerOrInfinity$1(result.index), S.length), 0);
2676
+ var captures = [];
2677
+ var replacement;
2678
+ // NOTE: This is equivalent to
2679
+ // captures = result.slice(1).map(maybeToString)
2680
+ // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
2681
+ // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
2682
+ // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
2683
+ for (var j = 1; j < result.length; j++) push$1(captures, maybeToString(result[j]));
2684
+ var namedCaptures = result.groups;
2685
+ if (functionalReplace) {
2686
+ var replacerArgs = concat([matched], captures, position, S);
2687
+ if (namedCaptures !== undefined) push$1(replacerArgs, namedCaptures);
2688
+ replacement = toString$3(apply(replaceValue, undefined, replacerArgs));
2689
+ } else {
2690
+ replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
2691
+ }
2692
+ if (position >= nextSourcePosition) {
2693
+ accumulatedResult += stringSlice$1(S, nextSourcePosition, position) + replacement;
2694
+ nextSourcePosition = position + matched.length;
2695
+ }
2696
+ }
2697
+
2698
+ return accumulatedResult + stringSlice$1(S, nextSourcePosition);
2699
+ }
2700
+ ];
2701
+ }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
2702
+
2703
+ var classofRaw = classofRaw$2;
2704
+ var uncurryThis$6 = functionUncurryThis;
2705
+
2706
+ var functionUncurryThisClause = function (fn) {
2707
+ // Nashorn bug:
2708
+ // https://github.com/zloirock/core-js/issues/1128
2709
+ // https://github.com/zloirock/core-js/issues/1130
2710
+ if (classofRaw(fn) === 'Function') return uncurryThis$6(fn);
2711
+ };
2712
+
2713
+ var $$d = _export;
2714
+ var uncurryThis$5 = functionUncurryThisClause;
2715
+ var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
2716
+ var toLength = toLength$4;
2717
+ var toString$2 = toString$8;
2718
+ var notARegExp = notARegexp;
2719
+ var requireObjectCoercible = requireObjectCoercible$8;
2720
+ var correctIsRegExpLogic = correctIsRegexpLogic;
2721
+
2722
+ var stringSlice = uncurryThis$5(''.slice);
2723
+ var min = Math.min;
2724
+
2725
+ var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
2726
+ // https://github.com/zloirock/core-js/pull/702
2727
+ var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
2728
+ var descriptor = getOwnPropertyDescriptor$2(String.prototype, 'startsWith');
2729
+ return descriptor && !descriptor.writable;
2730
+ }();
2731
+
2732
+ // `String.prototype.startsWith` method
2733
+ // https://tc39.es/ecma262/#sec-string.prototype.startswith
2734
+ $$d({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
2735
+ startsWith: function startsWith(searchString /* , position = 0 */) {
2736
+ var that = toString$2(requireObjectCoercible(this));
2737
+ notARegExp(searchString);
2738
+ var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
2739
+ var search = toString$2(searchString);
2740
+ return stringSlice(that, index, index + search.length) === search;
2741
+ }
2742
+ });
2743
+
2744
+ /******************************************************************************
2745
+ Copyright (c) Microsoft Corporation.
2746
+
2747
+ Permission to use, copy, modify, and/or distribute this software for any
2748
+ purpose with or without fee is hereby granted.
2749
+
2750
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
2751
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2752
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
2753
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2754
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2755
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2756
+ PERFORMANCE OF THIS SOFTWARE.
2757
+ ***************************************************************************** */
2758
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
2759
+
2760
+
2761
+ function __awaiter(thisArg, _arguments, P, generator) {
2762
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
2763
+ return new (P || (P = Promise))(function (resolve, reject) {
2764
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
2765
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
2766
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
2767
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
2768
+ });
2769
+ }
2770
+
2771
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
2772
+ var e = new Error(message);
2773
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
2774
+ };
2775
+
2776
+ var classof$1 = classofRaw$2;
2777
+
2778
+ // `IsArray` abstract operation
2779
+ // https://tc39.es/ecma262/#sec-isarray
2780
+ // eslint-disable-next-line es/no-array-isarray -- safe
2781
+ var isArray$2 = Array.isArray || function isArray(argument) {
2782
+ return classof$1(argument) === 'Array';
2783
+ };
2784
+
2785
+ var DESCRIPTORS$3 = descriptors;
2786
+ var isArray$1 = isArray$2;
2787
+
2788
+ var $TypeError$6 = TypeError;
2789
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
2790
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
2791
+
2792
+ // Safari < 13 does not throw an error in this case
2793
+ var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS$3 && !function () {
2794
+ // makes no sense without proper strict mode support
2795
+ if (this !== undefined) return true;
2796
+ try {
2797
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
2798
+ Object.defineProperty([], 'length', { writable: false }).length = 1;
2799
+ } catch (error) {
2800
+ return error instanceof TypeError;
2801
+ }
2802
+ }();
2803
+
2804
+ var arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
2805
+ if (isArray$1(O) && !getOwnPropertyDescriptor$1(O, 'length').writable) {
2806
+ throw new $TypeError$6('Cannot set read only .length');
2807
+ } return O.length = length;
2808
+ } : function (O, length) {
2809
+ return O.length = length;
2810
+ };
2811
+
2812
+ var $TypeError$5 = TypeError;
2813
+ var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
2814
+
2815
+ var doesNotExceedSafeInteger$1 = function (it) {
2816
+ if (it > MAX_SAFE_INTEGER) throw $TypeError$5('Maximum allowed index exceeded');
2817
+ return it;
2818
+ };
2819
+
2820
+ var $$c = _export;
2821
+ var toObject = toObject$4;
2822
+ var lengthOfArrayLike$2 = lengthOfArrayLike$4;
2823
+ var setArrayLength = arraySetLength;
2824
+ var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
2825
+ var fails$3 = fails$l;
2826
+
2827
+ var INCORRECT_TO_LENGTH = fails$3(function () {
2828
+ return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;
2829
+ });
2830
+
2831
+ // V8 <= 121 and Safari <= 15.4; FF < 23 throws InternalError
2832
+ // https://bugs.chromium.org/p/v8/issues/detail?id=12681
2833
+ var properErrorOnNonWritableLength = function () {
2834
+ try {
2835
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
2836
+ Object.defineProperty([], 'length', { writable: false }).push();
2837
+ } catch (error) {
2838
+ return error instanceof TypeError;
2839
+ }
2840
+ };
2841
+
2842
+ var FORCED$1 = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
2843
+
2844
+ // `Array.prototype.push` method
2845
+ // https://tc39.es/ecma262/#sec-array.prototype.push
2846
+ $$c({ target: 'Array', proto: true, arity: 1, forced: FORCED$1 }, {
2847
+ // eslint-disable-next-line no-unused-vars -- required for `.length`
2848
+ push: function push(item) {
2849
+ var O = toObject(this);
2850
+ var len = lengthOfArrayLike$2(O);
2851
+ var argCount = arguments.length;
2852
+ doesNotExceedSafeInteger(len + argCount);
2853
+ for (var i = 0; i < argCount; i++) {
2854
+ O[len] = arguments[i];
2855
+ len++;
2856
+ }
2857
+ setArrayLength(O, len);
2858
+ return len;
2859
+ }
2860
+ });
2861
+
2862
+ // TODO: Remove from `core-js@4` since it's moved to entry points
2863
+
2864
+ var $$b = _export;
2865
+ var call$8 = functionCall;
2866
+ var isCallable$2 = isCallable$j;
2867
+ var anObject$8 = anObject$i;
2868
+ var toString$1 = toString$8;
2869
+
2870
+ var DELEGATES_TO_EXEC = function () {
2871
+ var execCalled = false;
2872
+ var re = /[ac]/;
2873
+ re.exec = function () {
2874
+ execCalled = true;
2875
+ return /./.exec.apply(this, arguments);
2876
+ };
2877
+ return re.test('abc') === true && execCalled;
2878
+ }();
2879
+
2880
+ var nativeTest = /./.test;
2881
+
2882
+ // `RegExp.prototype.test` method
2883
+ // https://tc39.es/ecma262/#sec-regexp.prototype.test
2884
+ $$b({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
2885
+ test: function (S) {
2886
+ var R = anObject$8(this);
2887
+ var string = toString$1(S);
2888
+ var exec = R.exec;
2889
+ if (!isCallable$2(exec)) return call$8(nativeTest, R, string);
2890
+ var result = call$8(exec, R, string);
2891
+ if (result === null) return false;
2892
+ anObject$8(result);
2893
+ return true;
2894
+ }
2895
+ });
2896
+
2897
+ var isPrototypeOf$1 = objectIsPrototypeOf;
2898
+
2899
+ var $TypeError$4 = TypeError;
2900
+
2901
+ var anInstance$1 = function (it, Prototype) {
2902
+ if (isPrototypeOf$1(Prototype, it)) return it;
2903
+ throw new $TypeError$4('Incorrect invocation');
2904
+ };
2905
+
2906
+ var makeBuiltIn = makeBuiltInExports;
2907
+ var defineProperty = objectDefineProperty;
2908
+
2909
+ var defineBuiltInAccessor$1 = function (target, name, descriptor) {
2910
+ if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
2911
+ if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
2912
+ return defineProperty.f(target, name, descriptor);
2913
+ };
2914
+
2915
+ var DESCRIPTORS$2 = descriptors;
2916
+ var definePropertyModule = objectDefineProperty;
2917
+ var createPropertyDescriptor = createPropertyDescriptor$4;
2918
+
2919
+ var createProperty$2 = function (object, key, value) {
2920
+ if (DESCRIPTORS$2) definePropertyModule.f(object, key, createPropertyDescriptor(0, value));
2921
+ else object[key] = value;
2922
+ };
2923
+
2924
+ var $$a = _export;
2925
+ var globalThis$2 = globalThis_1;
2926
+ var anInstance = anInstance$1;
2927
+ var anObject$7 = anObject$i;
2928
+ var isCallable$1 = isCallable$j;
2929
+ var getPrototypeOf = objectGetPrototypeOf;
2930
+ var defineBuiltInAccessor = defineBuiltInAccessor$1;
2931
+ var createProperty$1 = createProperty$2;
2932
+ var fails$2 = fails$l;
2933
+ var hasOwn$2 = hasOwnProperty_1;
2934
+ var wellKnownSymbol$3 = wellKnownSymbol$g;
2935
+ var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
2936
+ var DESCRIPTORS$1 = descriptors;
2937
+
2938
+ var CONSTRUCTOR = 'constructor';
2939
+ var ITERATOR$2 = 'Iterator';
2940
+ var TO_STRING_TAG$1 = wellKnownSymbol$3('toStringTag');
2941
+
2942
+ var $TypeError$3 = TypeError;
2943
+ var NativeIterator = globalThis$2[ITERATOR$2];
2944
+
2945
+ // FF56- have non-standard global helper `Iterator`
2946
+ var FORCED = !isCallable$1(NativeIterator)
2947
+ || NativeIterator.prototype !== IteratorPrototype$1
2948
+ // FF44- non-standard `Iterator` passes previous tests
2949
+ || !fails$2(function () { NativeIterator({}); });
2950
+
2951
+ var IteratorConstructor = function Iterator() {
2952
+ anInstance(this, IteratorPrototype$1);
2953
+ if (getPrototypeOf(this) === IteratorPrototype$1) throw new $TypeError$3('Abstract class Iterator not directly constructable');
2954
+ };
2955
+
2956
+ var defineIteratorPrototypeAccessor = function (key, value) {
2957
+ if (DESCRIPTORS$1) {
2958
+ defineBuiltInAccessor(IteratorPrototype$1, key, {
2959
+ configurable: true,
2960
+ get: function () {
2961
+ return value;
2962
+ },
2963
+ set: function (replacement) {
2964
+ anObject$7(this);
2965
+ if (this === IteratorPrototype$1) throw new $TypeError$3("You can't redefine this property");
2966
+ if (hasOwn$2(this, key)) this[key] = replacement;
2967
+ else createProperty$1(this, key, replacement);
2968
+ }
2969
+ });
2970
+ } else IteratorPrototype$1[key] = value;
2971
+ };
2972
+
2973
+ if (!hasOwn$2(IteratorPrototype$1, TO_STRING_TAG$1)) defineIteratorPrototypeAccessor(TO_STRING_TAG$1, ITERATOR$2);
2974
+
2975
+ if (FORCED || !hasOwn$2(IteratorPrototype$1, CONSTRUCTOR) || IteratorPrototype$1[CONSTRUCTOR] === Object) {
2976
+ defineIteratorPrototypeAccessor(CONSTRUCTOR, IteratorConstructor);
2977
+ }
2978
+
2979
+ IteratorConstructor.prototype = IteratorPrototype$1;
2980
+
2981
+ // `Iterator` constructor
2982
+ // https://github.com/tc39/proposal-iterator-helpers
2983
+ $$a({ global: true, constructor: true, forced: FORCED }, {
2984
+ Iterator: IteratorConstructor
2985
+ });
2986
+
2987
+ // `GetIteratorDirect(obj)` abstract operation
2988
+ // https://tc39.es/proposal-iterator-helpers/#sec-getiteratordirect
2989
+ var getIteratorDirect$3 = function (obj) {
2990
+ return {
2991
+ iterator: obj,
2992
+ next: obj.next,
2993
+ done: false
2994
+ };
2995
+ };
2996
+
2997
+ var defineBuiltIn = defineBuiltIn$6;
2998
+
2999
+ var defineBuiltIns$1 = function (target, src, options) {
3000
+ for (var key in src) defineBuiltIn(target, key, src[key], options);
3001
+ return target;
3002
+ };
3003
+
3004
+ var call$7 = functionCall;
3005
+ var anObject$6 = anObject$i;
3006
+ var getMethod$2 = getMethod$6;
3007
+
3008
+ var iteratorClose$5 = function (iterator, kind, value) {
3009
+ var innerResult, innerError;
3010
+ anObject$6(iterator);
3011
+ try {
3012
+ innerResult = getMethod$2(iterator, 'return');
3013
+ if (!innerResult) {
3014
+ if (kind === 'throw') throw value;
3015
+ return value;
3016
+ }
3017
+ innerResult = call$7(innerResult, iterator);
3018
+ } catch (error) {
3019
+ innerError = true;
3020
+ innerResult = error;
3021
+ }
3022
+ if (kind === 'throw') throw value;
3023
+ if (innerError) throw innerResult;
3024
+ anObject$6(innerResult);
3025
+ return value;
3026
+ };
3027
+
3028
+ var call$6 = functionCall;
3029
+ var create = objectCreate;
3030
+ var createNonEnumerableProperty = createNonEnumerableProperty$6;
3031
+ var defineBuiltIns = defineBuiltIns$1;
3032
+ var wellKnownSymbol$2 = wellKnownSymbol$g;
3033
+ var InternalStateModule = internalState;
3034
+ var getMethod$1 = getMethod$6;
3035
+ var IteratorPrototype = iteratorsCore.IteratorPrototype;
3036
+ var createIterResultObject = createIterResultObject$2;
3037
+ var iteratorClose$4 = iteratorClose$5;
3038
+
3039
+ var TO_STRING_TAG = wellKnownSymbol$2('toStringTag');
3040
+ var ITERATOR_HELPER = 'IteratorHelper';
3041
+ var WRAP_FOR_VALID_ITERATOR = 'WrapForValidIterator';
3042
+ var setInternalState = InternalStateModule.set;
3043
+
3044
+ var createIteratorProxyPrototype = function (IS_ITERATOR) {
3045
+ var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER);
3046
+
3047
+ return defineBuiltIns(create(IteratorPrototype), {
3048
+ next: function next() {
3049
+ var state = getInternalState(this);
3050
+ // for simplification:
3051
+ // for `%WrapForValidIteratorPrototype%.next` our `nextHandler` returns `IterResultObject`
3052
+ // for `%IteratorHelperPrototype%.next` - just a value
3053
+ if (IS_ITERATOR) return state.nextHandler();
3054
+ try {
3055
+ var result = state.done ? undefined : state.nextHandler();
3056
+ return createIterResultObject(result, state.done);
3057
+ } catch (error) {
3058
+ state.done = true;
3059
+ throw error;
3060
+ }
3061
+ },
3062
+ 'return': function () {
3063
+ var state = getInternalState(this);
3064
+ var iterator = state.iterator;
3065
+ state.done = true;
3066
+ if (IS_ITERATOR) {
3067
+ var returnMethod = getMethod$1(iterator, 'return');
3068
+ return returnMethod ? call$6(returnMethod, iterator) : createIterResultObject(undefined, true);
3069
+ }
3070
+ if (state.inner) try {
3071
+ iteratorClose$4(state.inner.iterator, 'normal');
3072
+ } catch (error) {
3073
+ return iteratorClose$4(iterator, 'throw', error);
3074
+ }
3075
+ iteratorClose$4(iterator, 'normal');
3076
+ return createIterResultObject(undefined, true);
3077
+ }
3078
+ });
3079
+ };
3080
+
3081
+ var WrapForValidIteratorPrototype = createIteratorProxyPrototype(true);
3082
+ var IteratorHelperPrototype = createIteratorProxyPrototype(false);
3083
+
3084
+ createNonEnumerableProperty(IteratorHelperPrototype, TO_STRING_TAG, 'Iterator Helper');
3085
+
3086
+ var iteratorCreateProxy = function (nextHandler, IS_ITERATOR) {
3087
+ var IteratorProxy = function Iterator(record, state) {
3088
+ if (state) {
3089
+ state.iterator = record.iterator;
3090
+ state.next = record.next;
3091
+ } else state = record;
3092
+ state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER;
3093
+ state.nextHandler = nextHandler;
3094
+ state.counter = 0;
3095
+ state.done = false;
3096
+ setInternalState(this, state);
3097
+ };
3098
+
3099
+ IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype;
3100
+
3101
+ return IteratorProxy;
3102
+ };
3103
+
3104
+ var anObject$5 = anObject$i;
3105
+ var iteratorClose$3 = iteratorClose$5;
3106
+
3107
+ // call something on iterator step with safe closing on error
3108
+ var callWithSafeIterationClosing$1 = function (iterator, fn, value, ENTRIES) {
3109
+ try {
3110
+ return ENTRIES ? fn(anObject$5(value)[0], value[1]) : fn(value);
3111
+ } catch (error) {
3112
+ iteratorClose$3(iterator, 'throw', error);
3113
+ }
3114
+ };
3115
+
3116
+ var $$9 = _export;
3117
+ var call$5 = functionCall;
3118
+ var aCallable$4 = aCallable$7;
3119
+ var anObject$4 = anObject$i;
3120
+ var getIteratorDirect$2 = getIteratorDirect$3;
3121
+ var createIteratorProxy = iteratorCreateProxy;
3122
+ var callWithSafeIterationClosing = callWithSafeIterationClosing$1;
3123
+ var IS_PURE = isPure;
3124
+
3125
+ var IteratorProxy = createIteratorProxy(function () {
3126
+ var iterator = this.iterator;
3127
+ var predicate = this.predicate;
3128
+ var next = this.next;
3129
+ var result, done, value;
3130
+ while (true) {
3131
+ result = anObject$4(call$5(next, iterator));
3132
+ done = this.done = !!result.done;
3133
+ if (done) return;
3134
+ value = result.value;
3135
+ if (callWithSafeIterationClosing(iterator, predicate, [value, this.counter++], true)) return value;
3136
+ }
3137
+ });
3138
+
3139
+ // `Iterator.prototype.filter` method
3140
+ // https://github.com/tc39/proposal-iterator-helpers
3141
+ $$9({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, {
3142
+ filter: function filter(predicate) {
3143
+ anObject$4(this);
3144
+ aCallable$4(predicate);
3145
+ return new IteratorProxy(getIteratorDirect$2(this), {
3146
+ predicate: predicate
3147
+ });
3148
+ }
3149
+ });
3150
+
3151
+ var uncurryThis$4 = functionUncurryThisClause;
3152
+ var aCallable$3 = aCallable$7;
3153
+ var NATIVE_BIND = functionBindNative;
3154
+
3155
+ var bind$1 = uncurryThis$4(uncurryThis$4.bind);
3156
+
3157
+ // optional / simple context binding
3158
+ var functionBindContext = function (fn, that) {
3159
+ aCallable$3(fn);
3160
+ return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
3161
+ return fn.apply(that, arguments);
3162
+ };
3163
+ };
3164
+
3165
+ var wellKnownSymbol$1 = wellKnownSymbol$g;
3166
+ var Iterators$1 = iterators;
3167
+
3168
+ var ITERATOR$1 = wellKnownSymbol$1('iterator');
3169
+ var ArrayPrototype = Array.prototype;
3170
+
3171
+ // check on default Array iterator
3172
+ var isArrayIteratorMethod$1 = function (it) {
3173
+ return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$1] === it);
3174
+ };
3175
+
3176
+ var classof = classof$5;
3177
+ var getMethod = getMethod$6;
3178
+ var isNullOrUndefined = isNullOrUndefined$5;
3179
+ var Iterators = iterators;
3180
+ var wellKnownSymbol = wellKnownSymbol$g;
3181
+
3182
+ var ITERATOR = wellKnownSymbol('iterator');
3183
+
3184
+ var getIteratorMethod$2 = function (it) {
3185
+ if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR)
3186
+ || getMethod(it, '@@iterator')
3187
+ || Iterators[classof(it)];
3188
+ };
3189
+
3190
+ var call$4 = functionCall;
3191
+ var aCallable$2 = aCallable$7;
3192
+ var anObject$3 = anObject$i;
3193
+ var tryToString$1 = tryToString$3;
3194
+ var getIteratorMethod$1 = getIteratorMethod$2;
3195
+
3196
+ var $TypeError$2 = TypeError;
3197
+
3198
+ var getIterator$1 = function (argument, usingIterator) {
3199
+ var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
3200
+ if (aCallable$2(iteratorMethod)) return anObject$3(call$4(iteratorMethod, argument));
3201
+ throw new $TypeError$2(tryToString$1(argument) + ' is not iterable');
3202
+ };
3203
+
3204
+ var bind = functionBindContext;
3205
+ var call$3 = functionCall;
3206
+ var anObject$2 = anObject$i;
3207
+ var tryToString = tryToString$3;
3208
+ var isArrayIteratorMethod = isArrayIteratorMethod$1;
3209
+ var lengthOfArrayLike$1 = lengthOfArrayLike$4;
3210
+ var isPrototypeOf = objectIsPrototypeOf;
3211
+ var getIterator = getIterator$1;
3212
+ var getIteratorMethod = getIteratorMethod$2;
3213
+ var iteratorClose$2 = iteratorClose$5;
3214
+
3215
+ var $TypeError$1 = TypeError;
3216
+
3217
+ var Result = function (stopped, result) {
3218
+ this.stopped = stopped;
3219
+ this.result = result;
3220
+ };
3221
+
3222
+ var ResultPrototype = Result.prototype;
3223
+
3224
+ var iterate$3 = function (iterable, unboundFunction, options) {
3225
+ var that = options && options.that;
3226
+ var AS_ENTRIES = !!(options && options.AS_ENTRIES);
3227
+ var IS_RECORD = !!(options && options.IS_RECORD);
3228
+ var IS_ITERATOR = !!(options && options.IS_ITERATOR);
3229
+ var INTERRUPTED = !!(options && options.INTERRUPTED);
3230
+ var fn = bind(unboundFunction, that);
3231
+ var iterator, iterFn, index, length, result, next, step;
3232
+
3233
+ var stop = function (condition) {
3234
+ if (iterator) iteratorClose$2(iterator, 'normal', condition);
3235
+ return new Result(true, condition);
3236
+ };
3237
+
3238
+ var callFn = function (value) {
3239
+ if (AS_ENTRIES) {
3240
+ anObject$2(value);
3241
+ return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
3242
+ } return INTERRUPTED ? fn(value, stop) : fn(value);
3243
+ };
3244
+
3245
+ if (IS_RECORD) {
3246
+ iterator = iterable.iterator;
3247
+ } else if (IS_ITERATOR) {
3248
+ iterator = iterable;
3249
+ } else {
3250
+ iterFn = getIteratorMethod(iterable);
3251
+ if (!iterFn) throw new $TypeError$1(tryToString(iterable) + ' is not iterable');
3252
+ // optimisation for array iterators
3253
+ if (isArrayIteratorMethod(iterFn)) {
3254
+ for (index = 0, length = lengthOfArrayLike$1(iterable); length > index; index++) {
3255
+ result = callFn(iterable[index]);
3256
+ if (result && isPrototypeOf(ResultPrototype, result)) return result;
3257
+ } return new Result(false);
3258
+ }
3259
+ iterator = getIterator(iterable, iterFn);
3260
+ }
3261
+
3262
+ next = IS_RECORD ? iterable.next : iterator.next;
3263
+ while (!(step = call$3(next, iterator)).done) {
3264
+ try {
3265
+ result = callFn(step.value);
3266
+ } catch (error) {
3267
+ iteratorClose$2(iterator, 'throw', error);
3268
+ }
3269
+ if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
3270
+ } return new Result(false);
3271
+ };
3272
+
3273
+ var $$8 = _export;
3274
+ var iterate$2 = iterate$3;
3275
+ var aCallable$1 = aCallable$7;
3276
+ var anObject$1 = anObject$i;
3277
+ var getIteratorDirect$1 = getIteratorDirect$3;
3278
+
3279
+ // `Iterator.prototype.forEach` method
3280
+ // https://github.com/tc39/proposal-iterator-helpers
3281
+ $$8({ target: 'Iterator', proto: true, real: true }, {
3282
+ forEach: function forEach(fn) {
3283
+ anObject$1(this);
3284
+ aCallable$1(fn);
3285
+ var record = getIteratorDirect$1(this);
3286
+ var counter = 0;
3287
+ iterate$2(record, function (value) {
3288
+ fn(value, counter++);
3289
+ }, { IS_RECORD: true });
3290
+ }
3291
+ });
3292
+
3293
+ const MQTT_TIMEOUT_SECONDS = 3;
3294
+ const MQTT_TIMEOUT_MS = MQTT_TIMEOUT_SECONDS * 1000;
3295
+ const KEEP_ALIVE_SECONDS = 5;
3296
+ const RECONNECT_INTERVAL_MS = 1 * 1000; // 1 second
3297
+ function getClientId() {
3298
+ return "pendant_" + Math.random().toString(16).substr(2, 8);
3299
+ }
3300
+ class MqttClient {
3301
+ constructor(url, connectCallback) {
3302
+ this.subscriptions = [];
3303
+ this.connect(url, connectCallback);
3304
+ }
3305
+ connect(url, connectCallback) {
3306
+ const options = {
3307
+ connectTimeout: MQTT_TIMEOUT_MS,
3308
+ clientId: getClientId(),
3309
+ reconnectPeriod: 0,
3310
+ keepalive: KEEP_ALIVE_SECONDS
3311
+ };
3312
+ this.mqttClient = mqtt.connect(url, options);
3313
+ this.mqttClient.on("connect", () => {
3314
+ connectCallback === null || connectCallback === void 0 ? void 0 : connectCallback();
3315
+ });
3316
+ this.mqttClient.on("close", () => {
3317
+ var _a;
3318
+ console.warn("MQTT connection closed");
3319
+ (_a = this.mqttClient) === null || _a === void 0 ? void 0 : _a.end(true, {}, () => {
3320
+ console.log("MQTT connection ended");
3321
+ this.mqttClient = undefined;
3322
+ setTimeout(() => this.connect(url, connectCallback), RECONNECT_INTERVAL_MS);
3323
+ });
3324
+ });
3325
+ this.mqttClient.on("error", error => {
3326
+ console.error("Error encountered in mqtt client: ", error);
3327
+ });
3328
+ this.mqttClient.on("message", (topic, message) => {
3329
+ this.subscriptions.forEach(sub => {
3330
+ if (sub.pattern.test(topic)) {
3331
+ sub.callback(topic, message.toString());
3332
+ }
3333
+ });
3334
+ });
3335
+ }
3336
+ subscribe(topic, regex, cb) {
3337
+ var _a;
3338
+ this.subscriptions.push({
3339
+ pattern: regex,
3340
+ callback: cb
3341
+ });
3342
+ (_a = this.mqttClient) === null || _a === void 0 ? void 0 : _a.subscribe(topic, err => {
3343
+ if (err) {
3344
+ this.subscriptions = this.subscriptions.filter(sub => sub.pattern !== regex || sub.callback !== cb);
3345
+ console.error("Unable to subscribe to MQTT broker with error: ", err);
3346
+ }
3347
+ });
3348
+ }
3349
+ unsubscribe(topic, regex, cb) {
3350
+ var _a;
3351
+ this.subscriptions = this.subscriptions.filter(sub => sub.pattern !== regex || sub.callback !== cb);
3352
+ const sameTopicSubscriptions = this.subscriptions.filter(sub => String(sub.pattern) === String(regex));
3353
+ if (sameTopicSubscriptions.length <= 0) {
3354
+ (_a = this.mqttClient) === null || _a === void 0 ? void 0 : _a.unsubscribe(topic);
3355
+ }
3356
+ }
3357
+ publish(topic, message, retain = false) {
3358
+ var _a;
3359
+ const options = {
3360
+ retain
3361
+ };
3362
+ (_a = this.mqttClient) === null || _a === void 0 ? void 0 : _a.publish(topic, message, options);
3363
+ }
3364
+ }
3365
+
3366
+ const isTouchScreenDevice = () => "ontouchstart" in window || navigator.maxTouchPoints > 0;
3367
+ const isOnEdge = () => {
3368
+ return window.location.hostname.startsWith("192.168") || window.location.hostname.startsWith("localhost");
3369
+ };
3370
+ const getExecutionEngineHttpUrl = () => {
3371
+ return isOnEdge() ? `http://${window.location.hostname}:3100` : getExecutionEngineUrlGivenUiIframeUrl(window.location.href);
3372
+ };
3373
+ const getMqttWsUrl = (...args_1) => __awaiter(void 0, [...args_1], void 0, function* (version = "v2") {
3374
+ const urlOnEdge = version === "v2" ? "ws://192.168.5.2:9001" : `ws://${window.location.hostname}:9001`;
3375
+ return isOnEdge() ? urlOnEdge : getMqttWsUrlGivenUiIframeUrl(window.location.href);
3376
+ });
3377
+ const connectToMqttAndGetClient = () => __awaiter(void 0, void 0, void 0, function* () {
3378
+ const websocketUrl = yield getMqttWsUrl();
3379
+ return new MqttClient(websocketUrl, () => console.log("Connected to MQTT Broker"));
3380
+ });
3381
+ const getMachineCodeProcessHttpUrl = processName => {
3382
+ const executionEngineHttpUrl = getExecutionEngineHttpUrl();
3383
+ return `${executionEngineHttpUrl}/v1/machineCode/services/${processName}`;
3384
+ };
3385
+ const getExecutionEngineUrlGivenUiIframeUrl = uiIframeUrl => {
3386
+ const machineCodeUiIndex = uiIframeUrl.indexOf("/machineCodeUi");
3387
+ if (machineCodeUiIndex === -1) return uiIframeUrl;
3388
+ return uiIframeUrl.slice(0, machineCodeUiIndex);
3389
+ };
3390
+ const getMqttWsUrlGivenUiIframeUrl = uiIframeUrl => {
3391
+ const parts = uiIframeUrl.split("/");
3392
+ const passthroughIndex = parts.indexOf("passthrough");
3393
+ const tokenIndex = passthroughIndex + 1;
3394
+ const baseUrl = parts.slice(0, parts.indexOf("digital-twin") + 1).join("/");
3395
+ const token = parts[tokenIndex];
3396
+ const wssBaseUrl = baseUrl.replace("https:", "wss:");
3397
+ return `${wssBaseUrl}/${token}/mqtt`;
3398
+ };
3399
+ const closeCustomUi = () => {
3400
+ window.parent.postMessage("closeCustomUi", "*");
3401
+ };
3402
+ const navigateControlCenter = route => {
3403
+ const capitalizedRoute = route.charAt(0).toUpperCase() + route.slice(1);
3404
+ window.parent.postMessage(`navigateTo${capitalizedRoute}`, "*");
3405
+ };
3406
+
3407
+ var uncurryThis$3 = functionUncurryThis;
3408
+
3409
+ // eslint-disable-next-line es/no-set -- safe
3410
+ var SetPrototype$1 = Set.prototype;
3411
+
3412
+ var setHelpers = {
3413
+ // eslint-disable-next-line es/no-set -- safe
3414
+ Set: Set,
3415
+ add: uncurryThis$3(SetPrototype$1.add),
3416
+ has: uncurryThis$3(SetPrototype$1.has),
3417
+ remove: uncurryThis$3(SetPrototype$1['delete']),
3418
+ proto: SetPrototype$1
3419
+ };
3420
+
3421
+ var has$5 = setHelpers.has;
3422
+
3423
+ // Perform ? RequireInternalSlot(M, [[SetData]])
3424
+ var aSet$7 = function (it) {
3425
+ has$5(it);
3426
+ return it;
3427
+ };
3428
+
3429
+ var call$2 = functionCall;
3430
+
3431
+ var iterateSimple$7 = function (record, fn, ITERATOR_INSTEAD_OF_RECORD) {
3432
+ var iterator = ITERATOR_INSTEAD_OF_RECORD ? record : record.iterator;
3433
+ var next = record.next;
3434
+ var step, result;
3435
+ while (!(step = call$2(next, iterator)).done) {
3436
+ result = fn(step.value);
3437
+ if (result !== undefined) return result;
3438
+ }
3439
+ };
3440
+
3441
+ var uncurryThis$2 = functionUncurryThis;
3442
+ var iterateSimple$6 = iterateSimple$7;
3443
+ var SetHelpers$5 = setHelpers;
3444
+
3445
+ var Set$3 = SetHelpers$5.Set;
3446
+ var SetPrototype = SetHelpers$5.proto;
3447
+ var forEach = uncurryThis$2(SetPrototype.forEach);
3448
+ var keys = uncurryThis$2(SetPrototype.keys);
3449
+ var next = keys(new Set$3()).next;
3450
+
3451
+ var setIterate = function (set, fn, interruptible) {
3452
+ return interruptible ? iterateSimple$6({ iterator: keys(set), next: next }, fn) : forEach(set, fn);
3453
+ };
3454
+
3455
+ var SetHelpers$4 = setHelpers;
3456
+ var iterate$1 = setIterate;
3457
+
3458
+ var Set$2 = SetHelpers$4.Set;
3459
+ var add$3 = SetHelpers$4.add;
3460
+
3461
+ var setClone = function (set) {
3462
+ var result = new Set$2();
3463
+ iterate$1(set, function (it) {
3464
+ add$3(result, it);
3465
+ });
3466
+ return result;
3467
+ };
3468
+
3469
+ var uncurryThisAccessor = functionUncurryThisAccessor;
3470
+ var SetHelpers$3 = setHelpers;
3471
+
3472
+ var setSize = uncurryThisAccessor(SetHelpers$3.proto, 'size', 'get') || function (set) {
3473
+ return set.size;
3474
+ };
3475
+
3476
+ var aCallable = aCallable$7;
3477
+ var anObject = anObject$i;
3478
+ var call$1 = functionCall;
3479
+ var toIntegerOrInfinity = toIntegerOrInfinity$5;
3480
+ var getIteratorDirect = getIteratorDirect$3;
3481
+
3482
+ var INVALID_SIZE = 'Invalid size';
3483
+ var $RangeError = RangeError;
3484
+ var $TypeError = TypeError;
3485
+ var max = Math.max;
3486
+
3487
+ var SetRecord = function (set, intSize) {
3488
+ this.set = set;
3489
+ this.size = max(intSize, 0);
3490
+ this.has = aCallable(set.has);
3491
+ this.keys = aCallable(set.keys);
3492
+ };
3493
+
3494
+ SetRecord.prototype = {
3495
+ getIterator: function () {
3496
+ return getIteratorDirect(anObject(call$1(this.keys, this.set)));
3497
+ },
3498
+ includes: function (it) {
3499
+ return call$1(this.has, this.set, it);
3500
+ }
3501
+ };
3502
+
3503
+ // `GetSetRecord` abstract operation
3504
+ // https://tc39.es/proposal-set-methods/#sec-getsetrecord
3505
+ var getSetRecord$7 = function (obj) {
3506
+ anObject(obj);
3507
+ var numSize = +obj.size;
3508
+ // NOTE: If size is undefined, then numSize will be NaN
3509
+ // eslint-disable-next-line no-self-compare -- NaN check
3510
+ if (numSize !== numSize) throw new $TypeError(INVALID_SIZE);
3511
+ var intSize = toIntegerOrInfinity(numSize);
3512
+ if (intSize < 0) throw new $RangeError(INVALID_SIZE);
3513
+ return new SetRecord(obj, intSize);
3514
+ };
3515
+
3516
+ var aSet$6 = aSet$7;
3517
+ var SetHelpers$2 = setHelpers;
3518
+ var clone$2 = setClone;
3519
+ var size$4 = setSize;
3520
+ var getSetRecord$6 = getSetRecord$7;
3521
+ var iterateSet$2 = setIterate;
3522
+ var iterateSimple$5 = iterateSimple$7;
3523
+
3524
+ var has$4 = SetHelpers$2.has;
3525
+ var remove$1 = SetHelpers$2.remove;
3526
+
3527
+ // `Set.prototype.difference` method
3528
+ // https://github.com/tc39/proposal-set-methods
3529
+ var setDifference = function difference(other) {
3530
+ var O = aSet$6(this);
3531
+ var otherRec = getSetRecord$6(other);
3532
+ var result = clone$2(O);
3533
+ if (size$4(O) <= otherRec.size) iterateSet$2(O, function (e) {
3534
+ if (otherRec.includes(e)) remove$1(result, e);
3535
+ });
3536
+ else iterateSimple$5(otherRec.getIterator(), function (e) {
3537
+ if (has$4(O, e)) remove$1(result, e);
3538
+ });
3539
+ return result;
3540
+ };
3541
+
3542
+ var getBuiltIn$1 = getBuiltIn$5;
3543
+
3544
+ var createSetLike = function (size) {
3545
+ return {
3546
+ size: size,
3547
+ has: function () {
3548
+ return false;
3549
+ },
3550
+ keys: function () {
3551
+ return {
3552
+ next: function () {
3553
+ return { done: true };
3554
+ }
3555
+ };
3556
+ }
3557
+ };
3558
+ };
3559
+
3560
+ var setMethodAcceptSetLike$7 = function (name) {
3561
+ var Set = getBuiltIn$1('Set');
3562
+ try {
3563
+ new Set()[name](createSetLike(0));
3564
+ try {
3565
+ // late spec change, early WebKit ~ Safari 17.0 beta implementation does not pass it
3566
+ // https://github.com/tc39/proposal-set-methods/pull/88
3567
+ new Set()[name](createSetLike(-1));
3568
+ return false;
3569
+ } catch (error2) {
3570
+ return true;
3571
+ }
3572
+ } catch (error) {
3573
+ return false;
3574
+ }
3575
+ };
3576
+
3577
+ var $$7 = _export;
3578
+ var difference = setDifference;
3579
+ var setMethodAcceptSetLike$6 = setMethodAcceptSetLike$7;
3580
+
3581
+ // `Set.prototype.difference` method
3582
+ // https://github.com/tc39/proposal-set-methods
3583
+ $$7({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$6('difference') }, {
3584
+ difference: difference
3585
+ });
3586
+
3587
+ var aSet$5 = aSet$7;
3588
+ var SetHelpers$1 = setHelpers;
3589
+ var size$3 = setSize;
3590
+ var getSetRecord$5 = getSetRecord$7;
3591
+ var iterateSet$1 = setIterate;
3592
+ var iterateSimple$4 = iterateSimple$7;
3593
+
3594
+ var Set$1 = SetHelpers$1.Set;
3595
+ var add$2 = SetHelpers$1.add;
3596
+ var has$3 = SetHelpers$1.has;
3597
+
3598
+ // `Set.prototype.intersection` method
3599
+ // https://github.com/tc39/proposal-set-methods
3600
+ var setIntersection = function intersection(other) {
3601
+ var O = aSet$5(this);
3602
+ var otherRec = getSetRecord$5(other);
3603
+ var result = new Set$1();
3604
+
3605
+ if (size$3(O) > otherRec.size) {
3606
+ iterateSimple$4(otherRec.getIterator(), function (e) {
3607
+ if (has$3(O, e)) add$2(result, e);
3608
+ });
3609
+ } else {
3610
+ iterateSet$1(O, function (e) {
3611
+ if (otherRec.includes(e)) add$2(result, e);
3612
+ });
3613
+ }
3614
+
3615
+ return result;
3616
+ };
3617
+
3618
+ var $$6 = _export;
3619
+ var fails$1 = fails$l;
3620
+ var intersection = setIntersection;
3621
+ var setMethodAcceptSetLike$5 = setMethodAcceptSetLike$7;
3622
+
3623
+ var INCORRECT = !setMethodAcceptSetLike$5('intersection') || fails$1(function () {
3624
+ // eslint-disable-next-line es/no-array-from, es/no-set -- testing
3625
+ return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2';
3626
+ });
3627
+
3628
+ // `Set.prototype.intersection` method
3629
+ // https://github.com/tc39/proposal-set-methods
3630
+ $$6({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
3631
+ intersection: intersection
3632
+ });
3633
+
3634
+ var aSet$4 = aSet$7;
3635
+ var has$2 = setHelpers.has;
3636
+ var size$2 = setSize;
3637
+ var getSetRecord$4 = getSetRecord$7;
3638
+ var iterateSet = setIterate;
3639
+ var iterateSimple$3 = iterateSimple$7;
3640
+ var iteratorClose$1 = iteratorClose$5;
3641
+
3642
+ // `Set.prototype.isDisjointFrom` method
3643
+ // https://tc39.github.io/proposal-set-methods/#Set.prototype.isDisjointFrom
3644
+ var setIsDisjointFrom = function isDisjointFrom(other) {
3645
+ var O = aSet$4(this);
3646
+ var otherRec = getSetRecord$4(other);
3647
+ if (size$2(O) <= otherRec.size) return iterateSet(O, function (e) {
3648
+ if (otherRec.includes(e)) return false;
3649
+ }, true) !== false;
3650
+ var iterator = otherRec.getIterator();
3651
+ return iterateSimple$3(iterator, function (e) {
3652
+ if (has$2(O, e)) return iteratorClose$1(iterator, 'normal', false);
3653
+ }) !== false;
3654
+ };
3655
+
3656
+ var $$5 = _export;
3657
+ var isDisjointFrom = setIsDisjointFrom;
3658
+ var setMethodAcceptSetLike$4 = setMethodAcceptSetLike$7;
3659
+
3660
+ // `Set.prototype.isDisjointFrom` method
3661
+ // https://github.com/tc39/proposal-set-methods
3662
+ $$5({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$4('isDisjointFrom') }, {
3663
+ isDisjointFrom: isDisjointFrom
3664
+ });
3665
+
3666
+ var aSet$3 = aSet$7;
3667
+ var size$1 = setSize;
3668
+ var iterate = setIterate;
3669
+ var getSetRecord$3 = getSetRecord$7;
3670
+
3671
+ // `Set.prototype.isSubsetOf` method
3672
+ // https://tc39.github.io/proposal-set-methods/#Set.prototype.isSubsetOf
3673
+ var setIsSubsetOf = function isSubsetOf(other) {
3674
+ var O = aSet$3(this);
3675
+ var otherRec = getSetRecord$3(other);
3676
+ if (size$1(O) > otherRec.size) return false;
3677
+ return iterate(O, function (e) {
3678
+ if (!otherRec.includes(e)) return false;
3679
+ }, true) !== false;
3680
+ };
3681
+
3682
+ var $$4 = _export;
3683
+ var isSubsetOf = setIsSubsetOf;
3684
+ var setMethodAcceptSetLike$3 = setMethodAcceptSetLike$7;
3685
+
3686
+ // `Set.prototype.isSubsetOf` method
3687
+ // https://github.com/tc39/proposal-set-methods
3688
+ $$4({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$3('isSubsetOf') }, {
3689
+ isSubsetOf: isSubsetOf
3690
+ });
3691
+
3692
+ var aSet$2 = aSet$7;
3693
+ var has$1 = setHelpers.has;
3694
+ var size = setSize;
3695
+ var getSetRecord$2 = getSetRecord$7;
3696
+ var iterateSimple$2 = iterateSimple$7;
3697
+ var iteratorClose = iteratorClose$5;
3698
+
3699
+ // `Set.prototype.isSupersetOf` method
3700
+ // https://tc39.github.io/proposal-set-methods/#Set.prototype.isSupersetOf
3701
+ var setIsSupersetOf = function isSupersetOf(other) {
3702
+ var O = aSet$2(this);
3703
+ var otherRec = getSetRecord$2(other);
3704
+ if (size(O) < otherRec.size) return false;
3705
+ var iterator = otherRec.getIterator();
3706
+ return iterateSimple$2(iterator, function (e) {
3707
+ if (!has$1(O, e)) return iteratorClose(iterator, 'normal', false);
3708
+ }) !== false;
3709
+ };
3710
+
3711
+ var $$3 = _export;
3712
+ var isSupersetOf = setIsSupersetOf;
3713
+ var setMethodAcceptSetLike$2 = setMethodAcceptSetLike$7;
3714
+
3715
+ // `Set.prototype.isSupersetOf` method
3716
+ // https://github.com/tc39/proposal-set-methods
3717
+ $$3({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$2('isSupersetOf') }, {
3718
+ isSupersetOf: isSupersetOf
3719
+ });
3720
+
3721
+ var aSet$1 = aSet$7;
3722
+ var SetHelpers = setHelpers;
3723
+ var clone$1 = setClone;
3724
+ var getSetRecord$1 = getSetRecord$7;
3725
+ var iterateSimple$1 = iterateSimple$7;
3726
+
3727
+ var add$1 = SetHelpers.add;
3728
+ var has = SetHelpers.has;
3729
+ var remove = SetHelpers.remove;
3730
+
3731
+ // `Set.prototype.symmetricDifference` method
3732
+ // https://github.com/tc39/proposal-set-methods
3733
+ var setSymmetricDifference = function symmetricDifference(other) {
3734
+ var O = aSet$1(this);
3735
+ var keysIter = getSetRecord$1(other).getIterator();
3736
+ var result = clone$1(O);
3737
+ iterateSimple$1(keysIter, function (e) {
3738
+ if (has(O, e)) remove(result, e);
3739
+ else add$1(result, e);
3740
+ });
3741
+ return result;
3742
+ };
3743
+
3744
+ var $$2 = _export;
3745
+ var symmetricDifference = setSymmetricDifference;
3746
+ var setMethodAcceptSetLike$1 = setMethodAcceptSetLike$7;
3747
+
3748
+ // `Set.prototype.symmetricDifference` method
3749
+ // https://github.com/tc39/proposal-set-methods
3750
+ $$2({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$1('symmetricDifference') }, {
3751
+ symmetricDifference: symmetricDifference
3752
+ });
3753
+
3754
+ var aSet = aSet$7;
3755
+ var add = setHelpers.add;
3756
+ var clone = setClone;
3757
+ var getSetRecord = getSetRecord$7;
3758
+ var iterateSimple = iterateSimple$7;
3759
+
3760
+ // `Set.prototype.union` method
3761
+ // https://github.com/tc39/proposal-set-methods
3762
+ var setUnion = function union(other) {
3763
+ var O = aSet(this);
3764
+ var keysIter = getSetRecord(other).getIterator();
3765
+ var result = clone(O);
3766
+ iterateSimple(keysIter, function (it) {
3767
+ add(result, it);
3768
+ });
3769
+ return result;
3770
+ };
3771
+
3772
+ var $$1 = _export;
3773
+ var union = setUnion;
3774
+ var setMethodAcceptSetLike = setMethodAcceptSetLike$7;
3775
+
3776
+ // `Set.prototype.union` method
3777
+ // https://github.com/tc39/proposal-set-methods
3778
+ $$1({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('union') }, {
3779
+ union: union
3780
+ });
3781
+
3782
+ const defaultContext = {
3783
+ client: null,
3784
+ connectionStatus: "disconnected",
3785
+ subscribedTopics: null,
3786
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
3787
+ addSubscribedTopic: () => {},
3788
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
3789
+ removeSubscribedTopic: () => {}
3790
+ };
3791
+ const mqttContext = /*#__PURE__*/createContext(defaultContext);
3792
+ const defaultProps = {
3793
+ version: "v2"
3794
+ };
3795
+ const MqttProvider = props => {
3796
+ const [connectionStatus, setConnectionStatus] = useState("disconnected");
3797
+ const [mqttClient, setMqttClient] = useState(null);
3798
+ const subscribedTopics = useRef(new Set());
3799
+ const addSubscribedTopic = topic => subscribedTopics.current.add(topic);
3800
+ const removeSubscribedTopic = topic => subscribedTopics.current.delete(topic);
3801
+ const contextValue = useMemo(() => ({
3802
+ client: mqttClient,
3803
+ connectionStatus,
3804
+ subscribedTopics,
3805
+ addSubscribedTopic,
3806
+ removeSubscribedTopic
3807
+ }), [mqttClient, connectionStatus, subscribedTopics]);
3808
+ useEffect(function mqttConnection() {
3809
+ function connectToMqtt() {
3810
+ return __awaiter(this, void 0, void 0, function* () {
3811
+ var _a;
3812
+ console.log("Connecting to MQTT");
3813
+ const client = mqtt.connect(yield getMqttWsUrl((_a = props.version) !== null && _a !== void 0 ? _a : defaultProps.version));
3814
+ client.on("connect", () => {
3815
+ setConnectionStatus("connected");
3816
+ console.log("Connected to MQTT");
3817
+ setMqttClient(client);
3818
+ subscribedTopics.current = new Set();
3819
+ });
3820
+ client.on("error", error => {
3821
+ setConnectionStatus("error");
3822
+ console.error("MQTT error:", error);
3823
+ });
3824
+ client.on("offline", () => {
3825
+ setConnectionStatus("disconnected");
3826
+ });
3827
+ client.on("end", () => {
3828
+ setConnectionStatus("disconnected");
3829
+ });
3830
+ return function cleanup() {
3831
+ client.unsubscribe(Array.from(subscribedTopics.current));
3832
+ client.removeAllListeners();
3833
+ setMqttClient(null);
3834
+ setConnectionStatus("disconnected");
3835
+ client.end();
3836
+ };
3837
+ });
3838
+ }
3839
+ connectToMqtt();
3840
+ }, [props.version, subscribedTopics]);
3841
+ return jsx(mqttContext.Provider, {
3842
+ value: contextValue,
3843
+ children: props.children
3844
+ });
3845
+ };
3846
+
3847
+ var uncurryThis$1 = functionUncurryThis;
3848
+ var hasOwn$1 = hasOwnProperty_1;
3849
+
3850
+ var $SyntaxError = SyntaxError;
3851
+ var $parseInt = parseInt;
3852
+ var fromCharCode = String.fromCharCode;
3853
+ var at$1 = uncurryThis$1(''.charAt);
3854
+ var slice$1 = uncurryThis$1(''.slice);
3855
+ var exec$1 = uncurryThis$1(/./.exec);
3856
+
3857
+ var codePoints = {
3858
+ '\\"': '"',
3859
+ '\\\\': '\\',
3860
+ '\\/': '/',
3861
+ '\\b': '\b',
3862
+ '\\f': '\f',
3863
+ '\\n': '\n',
3864
+ '\\r': '\r',
3865
+ '\\t': '\t'
3866
+ };
3867
+
3868
+ var IS_4_HEX_DIGITS = /^[\da-f]{4}$/i;
3869
+ // eslint-disable-next-line regexp/no-control-character -- safe
3870
+ var IS_C0_CONTROL_CODE = /^[\u0000-\u001F]$/;
3871
+
3872
+ var parseJsonString = function (source, i) {
3873
+ var unterminated = true;
3874
+ var value = '';
3875
+ while (i < source.length) {
3876
+ var chr = at$1(source, i);
3877
+ if (chr === '\\') {
3878
+ var twoChars = slice$1(source, i, i + 2);
3879
+ if (hasOwn$1(codePoints, twoChars)) {
3880
+ value += codePoints[twoChars];
3881
+ i += 2;
3882
+ } else if (twoChars === '\\u') {
3883
+ i += 2;
3884
+ var fourHexDigits = slice$1(source, i, i + 4);
3885
+ if (!exec$1(IS_4_HEX_DIGITS, fourHexDigits)) throw new $SyntaxError('Bad Unicode escape at: ' + i);
3886
+ value += fromCharCode($parseInt(fourHexDigits, 16));
3887
+ i += 4;
3888
+ } else throw new $SyntaxError('Unknown escape sequence: "' + twoChars + '"');
3889
+ } else if (chr === '"') {
3890
+ unterminated = false;
3891
+ i++;
3892
+ break;
3893
+ } else {
3894
+ if (exec$1(IS_C0_CONTROL_CODE, chr)) throw new $SyntaxError('Bad control character in string literal at: ' + i);
3895
+ value += chr;
3896
+ i++;
3897
+ }
3898
+ }
3899
+ if (unterminated) throw new $SyntaxError('Unterminated string at: ' + i);
3900
+ return { value: value, end: i };
3901
+ };
3902
+
3903
+ var $ = _export;
3904
+ var DESCRIPTORS = descriptors;
3905
+ var globalThis$1 = globalThis_1;
3906
+ var getBuiltIn = getBuiltIn$5;
3907
+ var uncurryThis = functionUncurryThis;
3908
+ var call = functionCall;
3909
+ var isCallable = isCallable$j;
3910
+ var isObject = isObject$a;
3911
+ var isArray = isArray$2;
3912
+ var hasOwn = hasOwnProperty_1;
3913
+ var toString = toString$8;
3914
+ var lengthOfArrayLike = lengthOfArrayLike$4;
3915
+ var createProperty = createProperty$2;
3916
+ var fails = fails$l;
3917
+ var parseJSONString = parseJsonString;
3918
+ var NATIVE_SYMBOL = symbolConstructorDetection;
3919
+
3920
+ var JSON$1 = globalThis$1.JSON;
3921
+ var Number$1 = globalThis$1.Number;
3922
+ var SyntaxError$1 = globalThis$1.SyntaxError;
3923
+ var nativeParse = JSON$1 && JSON$1.parse;
3924
+ var enumerableOwnProperties = getBuiltIn('Object', 'keys');
3925
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
3926
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
3927
+ var at = uncurryThis(''.charAt);
3928
+ var slice = uncurryThis(''.slice);
3929
+ var exec = uncurryThis(/./.exec);
3930
+ var push = uncurryThis([].push);
3931
+
3932
+ var IS_DIGIT = /^\d$/;
3933
+ var IS_NON_ZERO_DIGIT = /^[1-9]$/;
3934
+ var IS_NUMBER_START = /^[\d-]$/;
3935
+ var IS_WHITESPACE = /^[\t\n\r ]$/;
3936
+
3937
+ var PRIMITIVE = 0;
3938
+ var OBJECT = 1;
3939
+
3940
+ var $parse = function (source, reviver) {
3941
+ source = toString(source);
3942
+ var context = new Context(source, 0);
3943
+ var root = context.parse();
3944
+ var value = root.value;
3945
+ var endIndex = context.skip(IS_WHITESPACE, root.end);
3946
+ if (endIndex < source.length) {
3947
+ throw new SyntaxError$1('Unexpected extra character: "' + at(source, endIndex) + '" after the parsed data at: ' + endIndex);
3948
+ }
3949
+ return isCallable(reviver) ? internalize({ '': value }, '', reviver, root) : value;
3950
+ };
3951
+
3952
+ var internalize = function (holder, name, reviver, node) {
3953
+ var val = holder[name];
3954
+ var unmodified = node && val === node.value;
3955
+ var context = unmodified && typeof node.source == 'string' ? { source: node.source } : {};
3956
+ var elementRecordsLen, keys, len, i, P;
3957
+ if (isObject(val)) {
3958
+ var nodeIsArray = isArray(val);
3959
+ var nodes = unmodified ? node.nodes : nodeIsArray ? [] : {};
3960
+ if (nodeIsArray) {
3961
+ elementRecordsLen = nodes.length;
3962
+ len = lengthOfArrayLike(val);
3963
+ for (i = 0; i < len; i++) {
3964
+ internalizeProperty(val, i, internalize(val, '' + i, reviver, i < elementRecordsLen ? nodes[i] : undefined));
3965
+ }
3966
+ } else {
3967
+ keys = enumerableOwnProperties(val);
3968
+ len = lengthOfArrayLike(keys);
3969
+ for (i = 0; i < len; i++) {
3970
+ P = keys[i];
3971
+ internalizeProperty(val, P, internalize(val, P, reviver, hasOwn(nodes, P) ? nodes[P] : undefined));
3972
+ }
3973
+ }
3974
+ }
3975
+ return call(reviver, holder, name, val, context);
3976
+ };
3977
+
3978
+ var internalizeProperty = function (object, key, value) {
3979
+ if (DESCRIPTORS) {
3980
+ var descriptor = getOwnPropertyDescriptor(object, key);
3981
+ if (descriptor && !descriptor.configurable) return;
3982
+ }
3983
+ if (value === undefined) delete object[key];
3984
+ else createProperty(object, key, value);
3985
+ };
3986
+
3987
+ var Node = function (value, end, source, nodes) {
3988
+ this.value = value;
3989
+ this.end = end;
3990
+ this.source = source;
3991
+ this.nodes = nodes;
3992
+ };
3993
+
3994
+ var Context = function (source, index) {
3995
+ this.source = source;
3996
+ this.index = index;
3997
+ };
3998
+
3999
+ // https://www.json.org/json-en.html
4000
+ Context.prototype = {
4001
+ fork: function (nextIndex) {
4002
+ return new Context(this.source, nextIndex);
4003
+ },
4004
+ parse: function () {
4005
+ var source = this.source;
4006
+ var i = this.skip(IS_WHITESPACE, this.index);
4007
+ var fork = this.fork(i);
4008
+ var chr = at(source, i);
4009
+ if (exec(IS_NUMBER_START, chr)) return fork.number();
4010
+ switch (chr) {
4011
+ case '{':
4012
+ return fork.object();
4013
+ case '[':
4014
+ return fork.array();
4015
+ case '"':
4016
+ return fork.string();
4017
+ case 't':
4018
+ return fork.keyword(true);
4019
+ case 'f':
4020
+ return fork.keyword(false);
4021
+ case 'n':
4022
+ return fork.keyword(null);
4023
+ } throw new SyntaxError$1('Unexpected character: "' + chr + '" at: ' + i);
4024
+ },
4025
+ node: function (type, value, start, end, nodes) {
4026
+ return new Node(value, end, type ? null : slice(this.source, start, end), nodes);
4027
+ },
4028
+ object: function () {
4029
+ var source = this.source;
4030
+ var i = this.index + 1;
4031
+ var expectKeypair = false;
4032
+ var object = {};
4033
+ var nodes = {};
4034
+ while (i < source.length) {
4035
+ i = this.until(['"', '}'], i);
4036
+ if (at(source, i) === '}' && !expectKeypair) {
4037
+ i++;
4038
+ break;
4039
+ }
4040
+ // Parsing the key
4041
+ var result = this.fork(i).string();
4042
+ var key = result.value;
4043
+ i = result.end;
4044
+ i = this.until([':'], i) + 1;
4045
+ // Parsing value
4046
+ i = this.skip(IS_WHITESPACE, i);
4047
+ result = this.fork(i).parse();
4048
+ createProperty(nodes, key, result);
4049
+ createProperty(object, key, result.value);
4050
+ i = this.until([',', '}'], result.end);
4051
+ var chr = at(source, i);
4052
+ if (chr === ',') {
4053
+ expectKeypair = true;
4054
+ i++;
4055
+ } else if (chr === '}') {
4056
+ i++;
4057
+ break;
4058
+ }
4059
+ }
4060
+ return this.node(OBJECT, object, this.index, i, nodes);
4061
+ },
4062
+ array: function () {
4063
+ var source = this.source;
4064
+ var i = this.index + 1;
4065
+ var expectElement = false;
4066
+ var array = [];
4067
+ var nodes = [];
4068
+ while (i < source.length) {
4069
+ i = this.skip(IS_WHITESPACE, i);
4070
+ if (at(source, i) === ']' && !expectElement) {
4071
+ i++;
4072
+ break;
4073
+ }
4074
+ var result = this.fork(i).parse();
4075
+ push(nodes, result);
4076
+ push(array, result.value);
4077
+ i = this.until([',', ']'], result.end);
4078
+ if (at(source, i) === ',') {
4079
+ expectElement = true;
4080
+ i++;
4081
+ } else if (at(source, i) === ']') {
4082
+ i++;
4083
+ break;
4084
+ }
4085
+ }
4086
+ return this.node(OBJECT, array, this.index, i, nodes);
4087
+ },
4088
+ string: function () {
4089
+ var index = this.index;
4090
+ var parsed = parseJSONString(this.source, this.index + 1);
4091
+ return this.node(PRIMITIVE, parsed.value, index, parsed.end);
4092
+ },
4093
+ number: function () {
4094
+ var source = this.source;
4095
+ var startIndex = this.index;
4096
+ var i = startIndex;
4097
+ if (at(source, i) === '-') i++;
4098
+ if (at(source, i) === '0') i++;
4099
+ else if (exec(IS_NON_ZERO_DIGIT, at(source, i))) i = this.skip(IS_DIGIT, i + 1);
4100
+ else throw new SyntaxError$1('Failed to parse number at: ' + i);
4101
+ if (at(source, i) === '.') i = this.skip(IS_DIGIT, i + 1);
4102
+ if (at(source, i) === 'e' || at(source, i) === 'E') {
4103
+ i++;
4104
+ if (at(source, i) === '+' || at(source, i) === '-') i++;
4105
+ var exponentStartIndex = i;
4106
+ i = this.skip(IS_DIGIT, i);
4107
+ if (exponentStartIndex === i) throw new SyntaxError$1("Failed to parse number's exponent value at: " + i);
4108
+ }
4109
+ return this.node(PRIMITIVE, Number$1(slice(source, startIndex, i)), startIndex, i);
4110
+ },
4111
+ keyword: function (value) {
4112
+ var keyword = '' + value;
4113
+ var index = this.index;
4114
+ var endIndex = index + keyword.length;
4115
+ if (slice(this.source, index, endIndex) !== keyword) throw new SyntaxError$1('Failed to parse value at: ' + index);
4116
+ return this.node(PRIMITIVE, value, index, endIndex);
4117
+ },
4118
+ skip: function (regex, i) {
4119
+ var source = this.source;
4120
+ for (; i < source.length; i++) if (!exec(regex, at(source, i))) break;
4121
+ return i;
4122
+ },
4123
+ until: function (array, i) {
4124
+ i = this.skip(IS_WHITESPACE, i);
4125
+ var chr = at(this.source, i);
4126
+ for (var j = 0; j < array.length; j++) if (array[j] === chr) return i;
4127
+ throw new SyntaxError$1('Unexpected character: "' + chr + '" at: ' + i);
4128
+ }
4129
+ };
4130
+
4131
+ var NO_SOURCE_SUPPORT = fails(function () {
4132
+ var unsafeInt = '9007199254740993';
4133
+ var source;
4134
+ nativeParse(unsafeInt, function (key, value, context) {
4135
+ source = context.source;
4136
+ });
4137
+ return source !== unsafeInt;
4138
+ });
4139
+
4140
+ var PROPER_BASE_PARSE = NATIVE_SYMBOL && !fails(function () {
4141
+ // Safari 9 bug
4142
+ return 1 / nativeParse('-0 \t') !== -Infinity;
4143
+ });
4144
+
4145
+ // `JSON.parse` method
4146
+ // https://tc39.es/ecma262/#sec-json.parse
4147
+ // https://github.com/tc39/proposal-json-parse-with-source
4148
+ $({ target: 'JSON', stat: true, forced: NO_SOURCE_SUPPORT }, {
4149
+ parse: function parse(text, reviver) {
4150
+ return PROPER_BASE_PARSE && !isCallable(reviver) ? nativeParse(text) : $parse(text, reviver);
4151
+ }
4152
+ });
4153
+
4154
+ const useMqttSubscription = props => {
4155
+ const mqtt = useContext(mqttContext);
4156
+ const [message, setMessage] = useState();
4157
+ useEffect(function subscribeToTopics() {
4158
+ var _a, _b, _c;
4159
+ if (mqtt.connectionStatus !== "connected" || !mqtt.client) return;
4160
+ const handleMessage = (topic, message) => {
4161
+ if (topic === props.topic) setMessage(JSON.parse(message.toString()));
4162
+ };
4163
+ if (!((_a = mqtt.subscribedTopics) === null || _a === void 0 ? void 0 : _a.current.has(props.topic))) {
4164
+ mqtt.addSubscribedTopic(props.topic);
4165
+ (_b = mqtt.client) === null || _b === void 0 ? void 0 : _b.subscribe(props.topic);
4166
+ }
4167
+ (_c = mqtt.client) === null || _c === void 0 ? void 0 : _c.on("message", handleMessage);
4168
+ return function cleanup() {
4169
+ var _a, _b;
4170
+ (_a = mqtt.client) === null || _a === void 0 ? void 0 : _a.off("message", handleMessage);
4171
+ if (props.unsubscribeOnUnmount) {
4172
+ mqtt.removeSubscribedTopic(props.topic);
4173
+ (_b = mqtt.client) === null || _b === void 0 ? void 0 : _b.unsubscribe(props.topic);
4174
+ }
4175
+ };
4176
+ }, [mqtt, props.topic, props.unsubscribeOnUnmount]);
4177
+ return message;
4178
+ };
4179
+
4180
+ export { MqttClient, MqttProvider, VirtualKeyboard, closeCustomUi, connectToMqttAndGetClient, getExecutionEngineHttpUrl, getMachineCodeProcessHttpUrl, getMqttWsUrl, getMqttWsUrlGivenUiIframeUrl, isOnEdge, isTouchScreenDevice, mqttContext, navigateControlCenter, useMqttSubscription, useStyles };