@sebgroup/green-react 1.0.0-beta.2 → 1.0.0-beta.6

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,3386 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import React, { useState, useEffect, useMemo, useRef } from 'react';
3
+ import { randomId, validateClassName } from '@sebgroup/extract';
4
+
5
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
6
+
7
+ var check = function (it) {
8
+ return it && it.Math == Math && it;
9
+ };
10
+
11
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
12
+ var global$E =
13
+ // eslint-disable-next-line es/no-global-this -- safe
14
+ check(typeof globalThis == 'object' && globalThis) ||
15
+ check(typeof window == 'object' && window) ||
16
+ // eslint-disable-next-line no-restricted-globals -- safe
17
+ check(typeof self == 'object' && self) ||
18
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
19
+ // eslint-disable-next-line no-new-func -- fallback
20
+ (function () { return this; })() || Function('return this')();
21
+
22
+ var objectGetOwnPropertyDescriptor = {};
23
+
24
+ var fails$d = function (exec) {
25
+ try {
26
+ return !!exec();
27
+ } catch (error) {
28
+ return true;
29
+ }
30
+ };
31
+
32
+ var fails$c = fails$d;
33
+
34
+ // Detect IE8's incomplete defineProperty implementation
35
+ var descriptors = !fails$c(function () {
36
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
37
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
38
+ });
39
+
40
+ var fails$b = fails$d;
41
+
42
+ var functionBindNative = !fails$b(function () {
43
+ var test = (function () { /* empty */ }).bind();
44
+ // eslint-disable-next-line no-prototype-builtins -- safe
45
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
46
+ });
47
+
48
+ var NATIVE_BIND$3 = functionBindNative;
49
+
50
+ var call$b = Function.prototype.call;
51
+
52
+ var functionCall = NATIVE_BIND$3 ? call$b.bind(call$b) : function () {
53
+ return call$b.apply(call$b, arguments);
54
+ };
55
+
56
+ var objectPropertyIsEnumerable = {};
57
+
58
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
59
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
60
+ var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
61
+
62
+ // Nashorn ~ JDK8 bug
63
+ var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
64
+
65
+ // `Object.prototype.propertyIsEnumerable` method implementation
66
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
67
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
68
+ var descriptor = getOwnPropertyDescriptor$2(this, V);
69
+ return !!descriptor && descriptor.enumerable;
70
+ } : $propertyIsEnumerable;
71
+
72
+ var createPropertyDescriptor$3 = function (bitmap, value) {
73
+ return {
74
+ enumerable: !(bitmap & 1),
75
+ configurable: !(bitmap & 2),
76
+ writable: !(bitmap & 4),
77
+ value: value
78
+ };
79
+ };
80
+
81
+ var NATIVE_BIND$2 = functionBindNative;
82
+
83
+ var FunctionPrototype$2 = Function.prototype;
84
+ var bind$5 = FunctionPrototype$2.bind;
85
+ var call$a = FunctionPrototype$2.call;
86
+ var uncurryThis$h = NATIVE_BIND$2 && bind$5.bind(call$a, call$a);
87
+
88
+ var functionUncurryThis = NATIVE_BIND$2 ? function (fn) {
89
+ return fn && uncurryThis$h(fn);
90
+ } : function (fn) {
91
+ return fn && function () {
92
+ return call$a.apply(fn, arguments);
93
+ };
94
+ };
95
+
96
+ var uncurryThis$g = functionUncurryThis;
97
+
98
+ var toString$5 = uncurryThis$g({}.toString);
99
+ var stringSlice$1 = uncurryThis$g(''.slice);
100
+
101
+ var classofRaw$1 = function (it) {
102
+ return stringSlice$1(toString$5(it), 8, -1);
103
+ };
104
+
105
+ var global$D = global$E;
106
+ var uncurryThis$f = functionUncurryThis;
107
+ var fails$a = fails$d;
108
+ var classof$5 = classofRaw$1;
109
+
110
+ var Object$5 = global$D.Object;
111
+ var split = uncurryThis$f(''.split);
112
+
113
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
114
+ var indexedObject = fails$a(function () {
115
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
116
+ // eslint-disable-next-line no-prototype-builtins -- safe
117
+ return !Object$5('z').propertyIsEnumerable(0);
118
+ }) ? function (it) {
119
+ return classof$5(it) == 'String' ? split(it, '') : Object$5(it);
120
+ } : Object$5;
121
+
122
+ var global$C = global$E;
123
+
124
+ var TypeError$e = global$C.TypeError;
125
+
126
+ // `RequireObjectCoercible` abstract operation
127
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
128
+ var requireObjectCoercible$3 = function (it) {
129
+ if (it == undefined) throw TypeError$e("Can't call method on " + it);
130
+ return it;
131
+ };
132
+
133
+ // toObject with fallback for non-array-like ES3 strings
134
+ var IndexedObject$1 = indexedObject;
135
+ var requireObjectCoercible$2 = requireObjectCoercible$3;
136
+
137
+ var toIndexedObject$5 = function (it) {
138
+ return IndexedObject$1(requireObjectCoercible$2(it));
139
+ };
140
+
141
+ // `IsCallable` abstract operation
142
+ // https://tc39.es/ecma262/#sec-iscallable
143
+ var isCallable$i = function (argument) {
144
+ return typeof argument == 'function';
145
+ };
146
+
147
+ var isCallable$h = isCallable$i;
148
+
149
+ var isObject$7 = function (it) {
150
+ return typeof it == 'object' ? it !== null : isCallable$h(it);
151
+ };
152
+
153
+ var global$B = global$E;
154
+ var isCallable$g = isCallable$i;
155
+
156
+ var aFunction = function (argument) {
157
+ return isCallable$g(argument) ? argument : undefined;
158
+ };
159
+
160
+ var getBuiltIn$7 = function (namespace, method) {
161
+ return arguments.length < 2 ? aFunction(global$B[namespace]) : global$B[namespace] && global$B[namespace][method];
162
+ };
163
+
164
+ var uncurryThis$e = functionUncurryThis;
165
+
166
+ var objectIsPrototypeOf = uncurryThis$e({}.isPrototypeOf);
167
+
168
+ var getBuiltIn$6 = getBuiltIn$7;
169
+
170
+ var engineUserAgent = getBuiltIn$6('navigator', 'userAgent') || '';
171
+
172
+ var global$A = global$E;
173
+ var userAgent$3 = engineUserAgent;
174
+
175
+ var process$3 = global$A.process;
176
+ var Deno = global$A.Deno;
177
+ var versions = process$3 && process$3.versions || Deno && Deno.version;
178
+ var v8 = versions && versions.v8;
179
+ var match, version;
180
+
181
+ if (v8) {
182
+ match = v8.split('.');
183
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
184
+ // but their correct versions are not interesting for us
185
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
186
+ }
187
+
188
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
189
+ // so check `userAgent` even if `.v8` exists, but 0
190
+ if (!version && userAgent$3) {
191
+ match = userAgent$3.match(/Edge\/(\d+)/);
192
+ if (!match || match[1] >= 74) {
193
+ match = userAgent$3.match(/Chrome\/(\d+)/);
194
+ if (match) version = +match[1];
195
+ }
196
+ }
197
+
198
+ var engineV8Version = version;
199
+
200
+ /* eslint-disable es/no-symbol -- required for testing */
201
+
202
+ var V8_VERSION$1 = engineV8Version;
203
+ var fails$9 = fails$d;
204
+
205
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
206
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$9(function () {
207
+ var symbol = Symbol();
208
+ // Chrome 38 Symbol has incorrect toString conversion
209
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
210
+ return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
211
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
212
+ !Symbol.sham && V8_VERSION$1 && V8_VERSION$1 < 41;
213
+ });
214
+
215
+ /* eslint-disable es/no-symbol -- required for testing */
216
+
217
+ var NATIVE_SYMBOL$2 = nativeSymbol;
218
+
219
+ var useSymbolAsUid = NATIVE_SYMBOL$2
220
+ && !Symbol.sham
221
+ && typeof Symbol.iterator == 'symbol';
222
+
223
+ var global$z = global$E;
224
+ var getBuiltIn$5 = getBuiltIn$7;
225
+ var isCallable$f = isCallable$i;
226
+ var isPrototypeOf$3 = objectIsPrototypeOf;
227
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
228
+
229
+ var Object$4 = global$z.Object;
230
+
231
+ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
232
+ return typeof it == 'symbol';
233
+ } : function (it) {
234
+ var $Symbol = getBuiltIn$5('Symbol');
235
+ return isCallable$f($Symbol) && isPrototypeOf$3($Symbol.prototype, Object$4(it));
236
+ };
237
+
238
+ var global$y = global$E;
239
+
240
+ var String$5 = global$y.String;
241
+
242
+ var tryToString$4 = function (argument) {
243
+ try {
244
+ return String$5(argument);
245
+ } catch (error) {
246
+ return 'Object';
247
+ }
248
+ };
249
+
250
+ var global$x = global$E;
251
+ var isCallable$e = isCallable$i;
252
+ var tryToString$3 = tryToString$4;
253
+
254
+ var TypeError$d = global$x.TypeError;
255
+
256
+ // `Assert: IsCallable(argument) is true`
257
+ var aCallable$5 = function (argument) {
258
+ if (isCallable$e(argument)) return argument;
259
+ throw TypeError$d(tryToString$3(argument) + ' is not a function');
260
+ };
261
+
262
+ var aCallable$4 = aCallable$5;
263
+
264
+ // `GetMethod` abstract operation
265
+ // https://tc39.es/ecma262/#sec-getmethod
266
+ var getMethod$3 = function (V, P) {
267
+ var func = V[P];
268
+ return func == null ? undefined : aCallable$4(func);
269
+ };
270
+
271
+ var global$w = global$E;
272
+ var call$9 = functionCall;
273
+ var isCallable$d = isCallable$i;
274
+ var isObject$6 = isObject$7;
275
+
276
+ var TypeError$c = global$w.TypeError;
277
+
278
+ // `OrdinaryToPrimitive` abstract operation
279
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
280
+ var ordinaryToPrimitive$1 = function (input, pref) {
281
+ var fn, val;
282
+ if (pref === 'string' && isCallable$d(fn = input.toString) && !isObject$6(val = call$9(fn, input))) return val;
283
+ if (isCallable$d(fn = input.valueOf) && !isObject$6(val = call$9(fn, input))) return val;
284
+ if (pref !== 'string' && isCallable$d(fn = input.toString) && !isObject$6(val = call$9(fn, input))) return val;
285
+ throw TypeError$c("Can't convert object to primitive value");
286
+ };
287
+
288
+ var shared$3 = {exports: {}};
289
+
290
+ var global$v = global$E;
291
+
292
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
293
+ var defineProperty$4 = Object.defineProperty;
294
+
295
+ var setGlobal$3 = function (key, value) {
296
+ try {
297
+ defineProperty$4(global$v, key, { value: value, configurable: true, writable: true });
298
+ } catch (error) {
299
+ global$v[key] = value;
300
+ } return value;
301
+ };
302
+
303
+ var global$u = global$E;
304
+ var setGlobal$2 = setGlobal$3;
305
+
306
+ var SHARED = '__core-js_shared__';
307
+ var store$3 = global$u[SHARED] || setGlobal$2(SHARED, {});
308
+
309
+ var sharedStore = store$3;
310
+
311
+ var store$2 = sharedStore;
312
+
313
+ (shared$3.exports = function (key, value) {
314
+ return store$2[key] || (store$2[key] = value !== undefined ? value : {});
315
+ })('versions', []).push({
316
+ version: '3.21.1',
317
+ mode: 'global',
318
+ copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
319
+ license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE',
320
+ source: 'https://github.com/zloirock/core-js'
321
+ });
322
+
323
+ var global$t = global$E;
324
+ var requireObjectCoercible$1 = requireObjectCoercible$3;
325
+
326
+ var Object$3 = global$t.Object;
327
+
328
+ // `ToObject` abstract operation
329
+ // https://tc39.es/ecma262/#sec-toobject
330
+ var toObject$3 = function (argument) {
331
+ return Object$3(requireObjectCoercible$1(argument));
332
+ };
333
+
334
+ var uncurryThis$d = functionUncurryThis;
335
+ var toObject$2 = toObject$3;
336
+
337
+ var hasOwnProperty = uncurryThis$d({}.hasOwnProperty);
338
+
339
+ // `HasOwnProperty` abstract operation
340
+ // https://tc39.es/ecma262/#sec-hasownproperty
341
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
342
+ return hasOwnProperty(toObject$2(it), key);
343
+ };
344
+
345
+ var uncurryThis$c = functionUncurryThis;
346
+
347
+ var id = 0;
348
+ var postfix = Math.random();
349
+ var toString$4 = uncurryThis$c(1.0.toString);
350
+
351
+ var uid$2 = function (key) {
352
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
353
+ };
354
+
355
+ var global$s = global$E;
356
+ var shared$2 = shared$3.exports;
357
+ var hasOwn$a = hasOwnProperty_1;
358
+ var uid$1 = uid$2;
359
+ var NATIVE_SYMBOL$1 = nativeSymbol;
360
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
361
+
362
+ var WellKnownSymbolsStore = shared$2('wks');
363
+ var Symbol$2 = global$s.Symbol;
364
+ var symbolFor = Symbol$2 && Symbol$2['for'];
365
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
366
+
367
+ var wellKnownSymbol$e = function (name) {
368
+ if (!hasOwn$a(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL$1 || typeof WellKnownSymbolsStore[name] == 'string')) {
369
+ var description = 'Symbol.' + name;
370
+ if (NATIVE_SYMBOL$1 && hasOwn$a(Symbol$2, name)) {
371
+ WellKnownSymbolsStore[name] = Symbol$2[name];
372
+ } else if (USE_SYMBOL_AS_UID && symbolFor) {
373
+ WellKnownSymbolsStore[name] = symbolFor(description);
374
+ } else {
375
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
376
+ }
377
+ } return WellKnownSymbolsStore[name];
378
+ };
379
+
380
+ var global$r = global$E;
381
+ var call$8 = functionCall;
382
+ var isObject$5 = isObject$7;
383
+ var isSymbol$1 = isSymbol$2;
384
+ var getMethod$2 = getMethod$3;
385
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
386
+ var wellKnownSymbol$d = wellKnownSymbol$e;
387
+
388
+ var TypeError$b = global$r.TypeError;
389
+ var TO_PRIMITIVE = wellKnownSymbol$d('toPrimitive');
390
+
391
+ // `ToPrimitive` abstract operation
392
+ // https://tc39.es/ecma262/#sec-toprimitive
393
+ var toPrimitive$1 = function (input, pref) {
394
+ if (!isObject$5(input) || isSymbol$1(input)) return input;
395
+ var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
396
+ var result;
397
+ if (exoticToPrim) {
398
+ if (pref === undefined) pref = 'default';
399
+ result = call$8(exoticToPrim, input, pref);
400
+ if (!isObject$5(result) || isSymbol$1(result)) return result;
401
+ throw TypeError$b("Can't convert object to primitive value");
402
+ }
403
+ if (pref === undefined) pref = 'number';
404
+ return ordinaryToPrimitive(input, pref);
405
+ };
406
+
407
+ var toPrimitive = toPrimitive$1;
408
+ var isSymbol = isSymbol$2;
409
+
410
+ // `ToPropertyKey` abstract operation
411
+ // https://tc39.es/ecma262/#sec-topropertykey
412
+ var toPropertyKey$2 = function (argument) {
413
+ var key = toPrimitive(argument, 'string');
414
+ return isSymbol(key) ? key : key + '';
415
+ };
416
+
417
+ var global$q = global$E;
418
+ var isObject$4 = isObject$7;
419
+
420
+ var document$3 = global$q.document;
421
+ // typeof document.createElement is 'object' in old IE
422
+ var EXISTS$1 = isObject$4(document$3) && isObject$4(document$3.createElement);
423
+
424
+ var documentCreateElement$2 = function (it) {
425
+ return EXISTS$1 ? document$3.createElement(it) : {};
426
+ };
427
+
428
+ var DESCRIPTORS$a = descriptors;
429
+ var fails$8 = fails$d;
430
+ var createElement$1 = documentCreateElement$2;
431
+
432
+ // Thanks to IE8 for its funny defineProperty
433
+ var ie8DomDefine = !DESCRIPTORS$a && !fails$8(function () {
434
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
435
+ return Object.defineProperty(createElement$1('div'), 'a', {
436
+ get: function () { return 7; }
437
+ }).a != 7;
438
+ });
439
+
440
+ var DESCRIPTORS$9 = descriptors;
441
+ var call$7 = functionCall;
442
+ var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
443
+ var createPropertyDescriptor$2 = createPropertyDescriptor$3;
444
+ var toIndexedObject$4 = toIndexedObject$5;
445
+ var toPropertyKey$1 = toPropertyKey$2;
446
+ var hasOwn$9 = hasOwnProperty_1;
447
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
448
+
449
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
450
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
451
+
452
+ // `Object.getOwnPropertyDescriptor` method
453
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
454
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$9 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
455
+ O = toIndexedObject$4(O);
456
+ P = toPropertyKey$1(P);
457
+ if (IE8_DOM_DEFINE$1) try {
458
+ return $getOwnPropertyDescriptor$1(O, P);
459
+ } catch (error) { /* empty */ }
460
+ if (hasOwn$9(O, P)) return createPropertyDescriptor$2(!call$7(propertyIsEnumerableModule$1.f, O, P), O[P]);
461
+ };
462
+
463
+ var objectDefineProperty = {};
464
+
465
+ var DESCRIPTORS$8 = descriptors;
466
+ var fails$7 = fails$d;
467
+
468
+ // V8 ~ Chrome 36-
469
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
470
+ var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$7(function () {
471
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
472
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
473
+ value: 42,
474
+ writable: false
475
+ }).prototype != 42;
476
+ });
477
+
478
+ var global$p = global$E;
479
+ var isObject$3 = isObject$7;
480
+
481
+ var String$4 = global$p.String;
482
+ var TypeError$a = global$p.TypeError;
483
+
484
+ // `Assert: Type(argument) is Object`
485
+ var anObject$a = function (argument) {
486
+ if (isObject$3(argument)) return argument;
487
+ throw TypeError$a(String$4(argument) + ' is not an object');
488
+ };
489
+
490
+ var global$o = global$E;
491
+ var DESCRIPTORS$7 = descriptors;
492
+ var IE8_DOM_DEFINE = ie8DomDefine;
493
+ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
494
+ var anObject$9 = anObject$a;
495
+ var toPropertyKey = toPropertyKey$2;
496
+
497
+ var TypeError$9 = global$o.TypeError;
498
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
499
+ var $defineProperty = Object.defineProperty;
500
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
501
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
502
+ var ENUMERABLE = 'enumerable';
503
+ var CONFIGURABLE$1 = 'configurable';
504
+ var WRITABLE = 'writable';
505
+
506
+ // `Object.defineProperty` method
507
+ // https://tc39.es/ecma262/#sec-object.defineproperty
508
+ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
509
+ anObject$9(O);
510
+ P = toPropertyKey(P);
511
+ anObject$9(Attributes);
512
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
513
+ var current = $getOwnPropertyDescriptor(O, P);
514
+ if (current && current[WRITABLE]) {
515
+ O[P] = Attributes.value;
516
+ Attributes = {
517
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
518
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
519
+ writable: false
520
+ };
521
+ }
522
+ } return $defineProperty(O, P, Attributes);
523
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
524
+ anObject$9(O);
525
+ P = toPropertyKey(P);
526
+ anObject$9(Attributes);
527
+ if (IE8_DOM_DEFINE) try {
528
+ return $defineProperty(O, P, Attributes);
529
+ } catch (error) { /* empty */ }
530
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError$9('Accessors not supported');
531
+ if ('value' in Attributes) O[P] = Attributes.value;
532
+ return O;
533
+ };
534
+
535
+ var DESCRIPTORS$6 = descriptors;
536
+ var definePropertyModule$4 = objectDefineProperty;
537
+ var createPropertyDescriptor$1 = createPropertyDescriptor$3;
538
+
539
+ var createNonEnumerableProperty$5 = DESCRIPTORS$6 ? function (object, key, value) {
540
+ return definePropertyModule$4.f(object, key, createPropertyDescriptor$1(1, value));
541
+ } : function (object, key, value) {
542
+ object[key] = value;
543
+ return object;
544
+ };
545
+
546
+ var redefine$5 = {exports: {}};
547
+
548
+ var uncurryThis$b = functionUncurryThis;
549
+ var isCallable$c = isCallable$i;
550
+ var store$1 = sharedStore;
551
+
552
+ var functionToString = uncurryThis$b(Function.toString);
553
+
554
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
555
+ if (!isCallable$c(store$1.inspectSource)) {
556
+ store$1.inspectSource = function (it) {
557
+ return functionToString(it);
558
+ };
559
+ }
560
+
561
+ var inspectSource$4 = store$1.inspectSource;
562
+
563
+ var global$n = global$E;
564
+ var isCallable$b = isCallable$i;
565
+ var inspectSource$3 = inspectSource$4;
566
+
567
+ var WeakMap$1 = global$n.WeakMap;
568
+
569
+ var nativeWeakMap = isCallable$b(WeakMap$1) && /native code/.test(inspectSource$3(WeakMap$1));
570
+
571
+ var shared$1 = shared$3.exports;
572
+ var uid = uid$2;
573
+
574
+ var keys = shared$1('keys');
575
+
576
+ var sharedKey$3 = function (key) {
577
+ return keys[key] || (keys[key] = uid(key));
578
+ };
579
+
580
+ var hiddenKeys$4 = {};
581
+
582
+ var NATIVE_WEAK_MAP = nativeWeakMap;
583
+ var global$m = global$E;
584
+ var uncurryThis$a = functionUncurryThis;
585
+ var isObject$2 = isObject$7;
586
+ var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
587
+ var hasOwn$8 = hasOwnProperty_1;
588
+ var shared = sharedStore;
589
+ var sharedKey$2 = sharedKey$3;
590
+ var hiddenKeys$3 = hiddenKeys$4;
591
+
592
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
593
+ var TypeError$8 = global$m.TypeError;
594
+ var WeakMap = global$m.WeakMap;
595
+ var set$1, get, has;
596
+
597
+ var enforce = function (it) {
598
+ return has(it) ? get(it) : set$1(it, {});
599
+ };
600
+
601
+ var getterFor = function (TYPE) {
602
+ return function (it) {
603
+ var state;
604
+ if (!isObject$2(it) || (state = get(it)).type !== TYPE) {
605
+ throw TypeError$8('Incompatible receiver, ' + TYPE + ' required');
606
+ } return state;
607
+ };
608
+ };
609
+
610
+ if (NATIVE_WEAK_MAP || shared.state) {
611
+ var store = shared.state || (shared.state = new WeakMap());
612
+ var wmget = uncurryThis$a(store.get);
613
+ var wmhas = uncurryThis$a(store.has);
614
+ var wmset = uncurryThis$a(store.set);
615
+ set$1 = function (it, metadata) {
616
+ if (wmhas(store, it)) throw new TypeError$8(OBJECT_ALREADY_INITIALIZED);
617
+ metadata.facade = it;
618
+ wmset(store, it, metadata);
619
+ return metadata;
620
+ };
621
+ get = function (it) {
622
+ return wmget(store, it) || {};
623
+ };
624
+ has = function (it) {
625
+ return wmhas(store, it);
626
+ };
627
+ } else {
628
+ var STATE = sharedKey$2('state');
629
+ hiddenKeys$3[STATE] = true;
630
+ set$1 = function (it, metadata) {
631
+ if (hasOwn$8(it, STATE)) throw new TypeError$8(OBJECT_ALREADY_INITIALIZED);
632
+ metadata.facade = it;
633
+ createNonEnumerableProperty$4(it, STATE, metadata);
634
+ return metadata;
635
+ };
636
+ get = function (it) {
637
+ return hasOwn$8(it, STATE) ? it[STATE] : {};
638
+ };
639
+ has = function (it) {
640
+ return hasOwn$8(it, STATE);
641
+ };
642
+ }
643
+
644
+ var internalState = {
645
+ set: set$1,
646
+ get: get,
647
+ has: has,
648
+ enforce: enforce,
649
+ getterFor: getterFor
650
+ };
651
+
652
+ var DESCRIPTORS$5 = descriptors;
653
+ var hasOwn$7 = hasOwnProperty_1;
654
+
655
+ var FunctionPrototype$1 = Function.prototype;
656
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
657
+ var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
658
+
659
+ var EXISTS = hasOwn$7(FunctionPrototype$1, 'name');
660
+ // additional protection from minified / mangled / dropped function names
661
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
662
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype$1, 'name').configurable));
663
+
664
+ var functionName = {
665
+ EXISTS: EXISTS,
666
+ PROPER: PROPER,
667
+ CONFIGURABLE: CONFIGURABLE
668
+ };
669
+
670
+ var global$l = global$E;
671
+ var isCallable$a = isCallable$i;
672
+ var hasOwn$6 = hasOwnProperty_1;
673
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
674
+ var setGlobal$1 = setGlobal$3;
675
+ var inspectSource$2 = inspectSource$4;
676
+ var InternalStateModule$2 = internalState;
677
+ var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
678
+
679
+ var getInternalState$2 = InternalStateModule$2.get;
680
+ var enforceInternalState = InternalStateModule$2.enforce;
681
+ var TEMPLATE = String(String).split('String');
682
+
683
+ (redefine$5.exports = function (O, key, value, options) {
684
+ var unsafe = options ? !!options.unsafe : false;
685
+ var simple = options ? !!options.enumerable : false;
686
+ var noTargetGet = options ? !!options.noTargetGet : false;
687
+ var name = options && options.name !== undefined ? options.name : key;
688
+ var state;
689
+ if (isCallable$a(value)) {
690
+ if (String(name).slice(0, 7) === 'Symbol(') {
691
+ name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
692
+ }
693
+ if (!hasOwn$6(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
694
+ createNonEnumerableProperty$3(value, 'name', name);
695
+ }
696
+ state = enforceInternalState(value);
697
+ if (!state.source) {
698
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
699
+ }
700
+ }
701
+ if (O === global$l) {
702
+ if (simple) O[key] = value;
703
+ else setGlobal$1(key, value);
704
+ return;
705
+ } else if (!unsafe) {
706
+ delete O[key];
707
+ } else if (!noTargetGet && O[key]) {
708
+ simple = true;
709
+ }
710
+ if (simple) O[key] = value;
711
+ else createNonEnumerableProperty$3(O, key, value);
712
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
713
+ })(Function.prototype, 'toString', function toString() {
714
+ return isCallable$a(this) && getInternalState$2(this).source || inspectSource$2(this);
715
+ });
716
+
717
+ var objectGetOwnPropertyNames = {};
718
+
719
+ var ceil = Math.ceil;
720
+ var floor = Math.floor;
721
+
722
+ // `ToIntegerOrInfinity` abstract operation
723
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
724
+ var toIntegerOrInfinity$2 = function (argument) {
725
+ var number = +argument;
726
+ // eslint-disable-next-line no-self-compare -- safe
727
+ return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
728
+ };
729
+
730
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
731
+
732
+ var max = Math.max;
733
+ var min$1 = Math.min;
734
+
735
+ // Helper for a popular repeating case of the spec:
736
+ // Let integer be ? ToInteger(index).
737
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
738
+ var toAbsoluteIndex$1 = function (index, length) {
739
+ var integer = toIntegerOrInfinity$1(index);
740
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
741
+ };
742
+
743
+ var toIntegerOrInfinity = toIntegerOrInfinity$2;
744
+
745
+ var min = Math.min;
746
+
747
+ // `ToLength` abstract operation
748
+ // https://tc39.es/ecma262/#sec-tolength
749
+ var toLength$1 = function (argument) {
750
+ return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
751
+ };
752
+
753
+ var toLength = toLength$1;
754
+
755
+ // `LengthOfArrayLike` abstract operation
756
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
757
+ var lengthOfArrayLike$2 = function (obj) {
758
+ return toLength(obj.length);
759
+ };
760
+
761
+ var toIndexedObject$3 = toIndexedObject$5;
762
+ var toAbsoluteIndex = toAbsoluteIndex$1;
763
+ var lengthOfArrayLike$1 = lengthOfArrayLike$2;
764
+
765
+ // `Array.prototype.{ indexOf, includes }` methods implementation
766
+ var createMethod$1 = function (IS_INCLUDES) {
767
+ return function ($this, el, fromIndex) {
768
+ var O = toIndexedObject$3($this);
769
+ var length = lengthOfArrayLike$1(O);
770
+ var index = toAbsoluteIndex(fromIndex, length);
771
+ var value;
772
+ // Array#includes uses SameValueZero equality algorithm
773
+ // eslint-disable-next-line no-self-compare -- NaN check
774
+ if (IS_INCLUDES && el != el) while (length > index) {
775
+ value = O[index++];
776
+ // eslint-disable-next-line no-self-compare -- NaN check
777
+ if (value != value) return true;
778
+ // Array#indexOf ignores holes, Array#includes - not
779
+ } else for (;length > index; index++) {
780
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
781
+ } return !IS_INCLUDES && -1;
782
+ };
783
+ };
784
+
785
+ var arrayIncludes = {
786
+ // `Array.prototype.includes` method
787
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
788
+ includes: createMethod$1(true),
789
+ // `Array.prototype.indexOf` method
790
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
791
+ indexOf: createMethod$1(false)
792
+ };
793
+
794
+ var uncurryThis$9 = functionUncurryThis;
795
+ var hasOwn$5 = hasOwnProperty_1;
796
+ var toIndexedObject$2 = toIndexedObject$5;
797
+ var indexOf = arrayIncludes.indexOf;
798
+ var hiddenKeys$2 = hiddenKeys$4;
799
+
800
+ var push = uncurryThis$9([].push);
801
+
802
+ var objectKeysInternal = function (object, names) {
803
+ var O = toIndexedObject$2(object);
804
+ var i = 0;
805
+ var result = [];
806
+ var key;
807
+ for (key in O) !hasOwn$5(hiddenKeys$2, key) && hasOwn$5(O, key) && push(result, key);
808
+ // Don't enum bug & hidden keys
809
+ while (names.length > i) if (hasOwn$5(O, key = names[i++])) {
810
+ ~indexOf(result, key) || push(result, key);
811
+ }
812
+ return result;
813
+ };
814
+
815
+ // IE8- don't enum bug keys
816
+ var enumBugKeys$3 = [
817
+ 'constructor',
818
+ 'hasOwnProperty',
819
+ 'isPrototypeOf',
820
+ 'propertyIsEnumerable',
821
+ 'toLocaleString',
822
+ 'toString',
823
+ 'valueOf'
824
+ ];
825
+
826
+ var internalObjectKeys$1 = objectKeysInternal;
827
+ var enumBugKeys$2 = enumBugKeys$3;
828
+
829
+ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
830
+
831
+ // `Object.getOwnPropertyNames` method
832
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
833
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
834
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
835
+ return internalObjectKeys$1(O, hiddenKeys$1);
836
+ };
837
+
838
+ var objectGetOwnPropertySymbols = {};
839
+
840
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
841
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
842
+
843
+ var getBuiltIn$4 = getBuiltIn$7;
844
+ var uncurryThis$8 = functionUncurryThis;
845
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
846
+ var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
847
+ var anObject$8 = anObject$a;
848
+
849
+ var concat$1 = uncurryThis$8([].concat);
850
+
851
+ // all object keys, includes non-enumerable and symbols
852
+ var ownKeys$1 = getBuiltIn$4('Reflect', 'ownKeys') || function ownKeys(it) {
853
+ var keys = getOwnPropertyNamesModule.f(anObject$8(it));
854
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
855
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
856
+ };
857
+
858
+ var hasOwn$4 = hasOwnProperty_1;
859
+ var ownKeys = ownKeys$1;
860
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
861
+ var definePropertyModule$3 = objectDefineProperty;
862
+
863
+ var copyConstructorProperties$2 = function (target, source, exceptions) {
864
+ var keys = ownKeys(source);
865
+ var defineProperty = definePropertyModule$3.f;
866
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
867
+ for (var i = 0; i < keys.length; i++) {
868
+ var key = keys[i];
869
+ if (!hasOwn$4(target, key) && !(exceptions && hasOwn$4(exceptions, key))) {
870
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
871
+ }
872
+ }
873
+ };
874
+
875
+ var fails$6 = fails$d;
876
+ var isCallable$9 = isCallable$i;
877
+
878
+ var replacement = /#|\.prototype\./;
879
+
880
+ var isForced$2 = function (feature, detection) {
881
+ var value = data[normalize(feature)];
882
+ return value == POLYFILL ? true
883
+ : value == NATIVE ? false
884
+ : isCallable$9(detection) ? fails$6(detection)
885
+ : !!detection;
886
+ };
887
+
888
+ var normalize = isForced$2.normalize = function (string) {
889
+ return String(string).replace(replacement, '.').toLowerCase();
890
+ };
891
+
892
+ var data = isForced$2.data = {};
893
+ var NATIVE = isForced$2.NATIVE = 'N';
894
+ var POLYFILL = isForced$2.POLYFILL = 'P';
895
+
896
+ var isForced_1 = isForced$2;
897
+
898
+ var global$k = global$E;
899
+ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
900
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
901
+ var redefine$4 = redefine$5.exports;
902
+ var setGlobal = setGlobal$3;
903
+ var copyConstructorProperties$1 = copyConstructorProperties$2;
904
+ var isForced$1 = isForced_1;
905
+
906
+ /*
907
+ options.target - name of the target object
908
+ options.global - target is the global object
909
+ options.stat - export as static methods of target
910
+ options.proto - export as prototype methods of target
911
+ options.real - real prototype method for the `pure` version
912
+ options.forced - export even if the native feature is available
913
+ options.bind - bind methods to the target, required for the `pure` version
914
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
915
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
916
+ options.sham - add a flag to not completely full polyfills
917
+ options.enumerable - export as enumerable property
918
+ options.noTargetGet - prevent calling a getter on target
919
+ options.name - the .name of the function if it does not match the key
920
+ */
921
+ var _export = function (options, source) {
922
+ var TARGET = options.target;
923
+ var GLOBAL = options.global;
924
+ var STATIC = options.stat;
925
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
926
+ if (GLOBAL) {
927
+ target = global$k;
928
+ } else if (STATIC) {
929
+ target = global$k[TARGET] || setGlobal(TARGET, {});
930
+ } else {
931
+ target = (global$k[TARGET] || {}).prototype;
932
+ }
933
+ if (target) for (key in source) {
934
+ sourceProperty = source[key];
935
+ if (options.noTargetGet) {
936
+ descriptor = getOwnPropertyDescriptor$1(target, key);
937
+ targetProperty = descriptor && descriptor.value;
938
+ } else targetProperty = target[key];
939
+ FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
940
+ // contained in target
941
+ if (!FORCED && targetProperty !== undefined) {
942
+ if (typeof sourceProperty == typeof targetProperty) continue;
943
+ copyConstructorProperties$1(sourceProperty, targetProperty);
944
+ }
945
+ // add a flag to not completely full polyfills
946
+ if (options.sham || (targetProperty && targetProperty.sham)) {
947
+ createNonEnumerableProperty$2(sourceProperty, 'sham', true);
948
+ }
949
+ // extend global
950
+ redefine$4(target, key, sourceProperty, options);
951
+ }
952
+ };
953
+
954
+ var internalObjectKeys = objectKeysInternal;
955
+ var enumBugKeys$1 = enumBugKeys$3;
956
+
957
+ // `Object.keys` method
958
+ // https://tc39.es/ecma262/#sec-object.keys
959
+ // eslint-disable-next-line es/no-object-keys -- safe
960
+ var objectKeys$2 = Object.keys || function keys(O) {
961
+ return internalObjectKeys(O, enumBugKeys$1);
962
+ };
963
+
964
+ var DESCRIPTORS$4 = descriptors;
965
+ var uncurryThis$7 = functionUncurryThis;
966
+ var call$6 = functionCall;
967
+ var fails$5 = fails$d;
968
+ var objectKeys$1 = objectKeys$2;
969
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
970
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
971
+ var toObject$1 = toObject$3;
972
+ var IndexedObject = indexedObject;
973
+
974
+ // eslint-disable-next-line es/no-object-assign -- safe
975
+ var $assign = Object.assign;
976
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
977
+ var defineProperty$3 = Object.defineProperty;
978
+ var concat = uncurryThis$7([].concat);
979
+
980
+ // `Object.assign` method
981
+ // https://tc39.es/ecma262/#sec-object.assign
982
+ var objectAssign = !$assign || fails$5(function () {
983
+ // should have correct order of operations (Edge bug)
984
+ if (DESCRIPTORS$4 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
985
+ enumerable: true,
986
+ get: function () {
987
+ defineProperty$3(this, 'b', {
988
+ value: 3,
989
+ enumerable: false
990
+ });
991
+ }
992
+ }), { b: 2 })).b !== 1) return true;
993
+ // should work with symbols and should have deterministic property order (V8 bug)
994
+ var A = {};
995
+ var B = {};
996
+ // eslint-disable-next-line es/no-symbol -- safe
997
+ var symbol = Symbol();
998
+ var alphabet = 'abcdefghijklmnopqrst';
999
+ A[symbol] = 7;
1000
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1001
+ return $assign({}, A)[symbol] != 7 || objectKeys$1($assign({}, B)).join('') != alphabet;
1002
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1003
+ var T = toObject$1(target);
1004
+ var argumentsLength = arguments.length;
1005
+ var index = 1;
1006
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1007
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
1008
+ while (argumentsLength > index) {
1009
+ var S = IndexedObject(arguments[index++]);
1010
+ var keys = getOwnPropertySymbols ? concat(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
1011
+ var length = keys.length;
1012
+ var j = 0;
1013
+ var key;
1014
+ while (length > j) {
1015
+ key = keys[j++];
1016
+ if (!DESCRIPTORS$4 || call$6(propertyIsEnumerable, S, key)) T[key] = S[key];
1017
+ }
1018
+ } return T;
1019
+ } : $assign;
1020
+
1021
+ var $$4 = _export;
1022
+ var assign = objectAssign;
1023
+
1024
+ // `Object.assign` method
1025
+ // https://tc39.es/ecma262/#sec-object.assign
1026
+ // eslint-disable-next-line es/no-object-assign -- required for testing
1027
+ $$4({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
1028
+ assign: assign
1029
+ });
1030
+
1031
+ /*! *****************************************************************************
1032
+ Copyright (c) Microsoft Corporation.
1033
+
1034
+ Permission to use, copy, modify, and/or distribute this software for any
1035
+ purpose with or without fee is hereby granted.
1036
+
1037
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1038
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1039
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1040
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1041
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1042
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1043
+ PERFORMANCE OF THIS SOFTWARE.
1044
+ ***************************************************************************** */
1045
+
1046
+ function __rest(s, e) {
1047
+ var t = {};
1048
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1049
+ t[p] = s[p];
1050
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
1051
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1052
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1053
+ t[p[i]] = s[p[i]];
1054
+ }
1055
+ return t;
1056
+ }
1057
+
1058
+ function Button({
1059
+ children,
1060
+ variant,
1061
+ onClick,
1062
+ active = false,
1063
+ type = 'button'
1064
+ }) {
1065
+ const props = {
1066
+ type
1067
+ };
1068
+ const classNames = [];
1069
+ if (variant) classNames.push(variant);
1070
+ if (active) classNames.push('active');
1071
+ if (classNames.length) props.className = classNames.join(' ');
1072
+ if (onClick) props.onClick = onClick;
1073
+ return jsx("button", Object.assign({}, props, {
1074
+ children: children
1075
+ }), void 0);
1076
+ }
1077
+
1078
+ const ModalHeader = ({
1079
+ header: _header = '',
1080
+ onClose
1081
+ }) => {
1082
+ const handleClose = event => {
1083
+ if (onClose) onClose(event);
1084
+ };
1085
+
1086
+ return jsxs("div", Object.assign({
1087
+ className: "header"
1088
+ }, {
1089
+ children: [jsx("h3", {
1090
+ children: _header
1091
+ }, void 0), jsx("button", Object.assign({
1092
+ className: "close",
1093
+ onClick: handleClose
1094
+ }, {
1095
+ children: jsx("span", Object.assign({
1096
+ className: "sr-only"
1097
+ }, {
1098
+ children: "Close"
1099
+ }), void 0)
1100
+ }), void 0)]
1101
+ }), void 0);
1102
+ };
1103
+
1104
+ const ModalBody = ({
1105
+ children
1106
+ }) => {
1107
+ return jsx("div", Object.assign({
1108
+ className: "body"
1109
+ }, {
1110
+ children: children
1111
+ }), void 0);
1112
+ };
1113
+
1114
+ const ModalFooter = ({
1115
+ confirm,
1116
+ dismiss,
1117
+ onClose,
1118
+ onConfirm,
1119
+ onDismiss
1120
+ }) => {
1121
+ const handleConfirm = event => {
1122
+ if (onConfirm) onConfirm(event);
1123
+ if (onClose) onClose(event);
1124
+ };
1125
+
1126
+ const handleDismiss = event => {
1127
+ if (onDismiss) onDismiss(event);
1128
+ if (onClose) onClose(event);
1129
+ };
1130
+
1131
+ return jsxs("div", Object.assign({
1132
+ className: "footer"
1133
+ }, {
1134
+ children: [dismiss && jsx(Button, Object.assign({
1135
+ variant: "secondary",
1136
+ onClick: handleDismiss
1137
+ }, {
1138
+ children: dismiss
1139
+ }), void 0), confirm && jsx(Button, Object.assign({
1140
+ variant: "primary",
1141
+ onClick: handleConfirm
1142
+ }, {
1143
+ children: confirm
1144
+ }), void 0)]
1145
+ }), void 0);
1146
+ };
1147
+
1148
+ const Modal = _a => {
1149
+ var {
1150
+ type = 'default',
1151
+ isOpen
1152
+ } = _a,
1153
+ props = __rest(_a, ["type", "isOpen"]);
1154
+
1155
+ const modalContent = () => {
1156
+ switch (type) {
1157
+ case 'slideout':
1158
+ {
1159
+ return jsxs("aside", Object.assign({
1160
+ role: "dialog"
1161
+ }, {
1162
+ children: [jsx(ModalHeader, Object.assign({}, props), void 0), jsx(ModalBody, Object.assign({}, props), void 0), jsx(ModalFooter, Object.assign({}, props), void 0)]
1163
+ }), void 0);
1164
+ }
1165
+
1166
+ case 'takeover':
1167
+ {
1168
+ return jsxs("main", Object.assign({
1169
+ role: "dialog"
1170
+ }, {
1171
+ children: [jsx(ModalHeader, Object.assign({}, props), void 0), jsx(ModalBody, Object.assign({}, props), void 0), jsx(ModalFooter, Object.assign({}, props), void 0)]
1172
+ }), void 0);
1173
+ }
1174
+
1175
+ default:
1176
+ {
1177
+ return jsxs("section", Object.assign({
1178
+ role: "dialog"
1179
+ }, {
1180
+ children: [jsx(ModalHeader, Object.assign({}, props), void 0), jsx(ModalBody, Object.assign({}, props), void 0), jsx(ModalFooter, Object.assign({}, props), void 0)]
1181
+ }), void 0);
1182
+ }
1183
+ }
1184
+ };
1185
+
1186
+ return isOpen ? modalContent() : null;
1187
+ };
1188
+
1189
+ var objectDefineProperties = {};
1190
+
1191
+ var DESCRIPTORS$3 = descriptors;
1192
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1193
+ var definePropertyModule$2 = objectDefineProperty;
1194
+ var anObject$7 = anObject$a;
1195
+ var toIndexedObject$1 = toIndexedObject$5;
1196
+ var objectKeys = objectKeys$2;
1197
+
1198
+ // `Object.defineProperties` method
1199
+ // https://tc39.es/ecma262/#sec-object.defineproperties
1200
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
1201
+ objectDefineProperties.f = DESCRIPTORS$3 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1202
+ anObject$7(O);
1203
+ var props = toIndexedObject$1(Properties);
1204
+ var keys = objectKeys(Properties);
1205
+ var length = keys.length;
1206
+ var index = 0;
1207
+ var key;
1208
+ while (length > index) definePropertyModule$2.f(O, key = keys[index++], props[key]);
1209
+ return O;
1210
+ };
1211
+
1212
+ var getBuiltIn$3 = getBuiltIn$7;
1213
+
1214
+ var html$2 = getBuiltIn$3('document', 'documentElement');
1215
+
1216
+ /* global ActiveXObject -- old IE, WSH */
1217
+
1218
+ var anObject$6 = anObject$a;
1219
+ var definePropertiesModule = objectDefineProperties;
1220
+ var enumBugKeys = enumBugKeys$3;
1221
+ var hiddenKeys = hiddenKeys$4;
1222
+ var html$1 = html$2;
1223
+ var documentCreateElement$1 = documentCreateElement$2;
1224
+ var sharedKey$1 = sharedKey$3;
1225
+
1226
+ var GT = '>';
1227
+ var LT = '<';
1228
+ var PROTOTYPE = 'prototype';
1229
+ var SCRIPT = 'script';
1230
+ var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1231
+
1232
+ var EmptyConstructor = function () { /* empty */ };
1233
+
1234
+ var scriptTag = function (content) {
1235
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1236
+ };
1237
+
1238
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1239
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
1240
+ activeXDocument.write(scriptTag(''));
1241
+ activeXDocument.close();
1242
+ var temp = activeXDocument.parentWindow.Object;
1243
+ activeXDocument = null; // avoid memory leak
1244
+ return temp;
1245
+ };
1246
+
1247
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
1248
+ var NullProtoObjectViaIFrame = function () {
1249
+ // Thrash, waste and sodomy: IE GC bug
1250
+ var iframe = documentCreateElement$1('iframe');
1251
+ var JS = 'java' + SCRIPT + ':';
1252
+ var iframeDocument;
1253
+ iframe.style.display = 'none';
1254
+ html$1.appendChild(iframe);
1255
+ // https://github.com/zloirock/core-js/issues/475
1256
+ iframe.src = String(JS);
1257
+ iframeDocument = iframe.contentWindow.document;
1258
+ iframeDocument.open();
1259
+ iframeDocument.write(scriptTag('document.F=Object'));
1260
+ iframeDocument.close();
1261
+ return iframeDocument.F;
1262
+ };
1263
+
1264
+ // Check for document.domain and active x support
1265
+ // No need to use active x approach when document.domain is not set
1266
+ // see https://github.com/es-shims/es5-shim/issues/150
1267
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1268
+ // avoid IE GC bug
1269
+ var activeXDocument;
1270
+ var NullProtoObject = function () {
1271
+ try {
1272
+ activeXDocument = new ActiveXObject('htmlfile');
1273
+ } catch (error) { /* ignore */ }
1274
+ NullProtoObject = typeof document != 'undefined'
1275
+ ? document.domain && activeXDocument
1276
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1277
+ : NullProtoObjectViaIFrame()
1278
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
1279
+ var length = enumBugKeys.length;
1280
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1281
+ return NullProtoObject();
1282
+ };
1283
+
1284
+ hiddenKeys[IE_PROTO$1] = true;
1285
+
1286
+ // `Object.create` method
1287
+ // https://tc39.es/ecma262/#sec-object.create
1288
+ var objectCreate = Object.create || function create(O, Properties) {
1289
+ var result;
1290
+ if (O !== null) {
1291
+ EmptyConstructor[PROTOTYPE] = anObject$6(O);
1292
+ result = new EmptyConstructor();
1293
+ EmptyConstructor[PROTOTYPE] = null;
1294
+ // add "__proto__" for Object.getPrototypeOf polyfill
1295
+ result[IE_PROTO$1] = O;
1296
+ } else result = NullProtoObject();
1297
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1298
+ };
1299
+
1300
+ var wellKnownSymbol$c = wellKnownSymbol$e;
1301
+ var create$1 = objectCreate;
1302
+ var definePropertyModule$1 = objectDefineProperty;
1303
+
1304
+ var UNSCOPABLES = wellKnownSymbol$c('unscopables');
1305
+ var ArrayPrototype$1 = Array.prototype;
1306
+
1307
+ // Array.prototype[@@unscopables]
1308
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1309
+ if (ArrayPrototype$1[UNSCOPABLES] == undefined) {
1310
+ definePropertyModule$1.f(ArrayPrototype$1, UNSCOPABLES, {
1311
+ configurable: true,
1312
+ value: create$1(null)
1313
+ });
1314
+ }
1315
+
1316
+ // add a key to Array.prototype[@@unscopables]
1317
+ var addToUnscopables$1 = function (key) {
1318
+ ArrayPrototype$1[UNSCOPABLES][key] = true;
1319
+ };
1320
+
1321
+ var iterators = {};
1322
+
1323
+ var fails$4 = fails$d;
1324
+
1325
+ var correctPrototypeGetter = !fails$4(function () {
1326
+ function F() { /* empty */ }
1327
+ F.prototype.constructor = null;
1328
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1329
+ return Object.getPrototypeOf(new F()) !== F.prototype;
1330
+ });
1331
+
1332
+ var global$j = global$E;
1333
+ var hasOwn$3 = hasOwnProperty_1;
1334
+ var isCallable$8 = isCallable$i;
1335
+ var toObject = toObject$3;
1336
+ var sharedKey = sharedKey$3;
1337
+ var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1338
+
1339
+ var IE_PROTO = sharedKey('IE_PROTO');
1340
+ var Object$2 = global$j.Object;
1341
+ var ObjectPrototype = Object$2.prototype;
1342
+
1343
+ // `Object.getPrototypeOf` method
1344
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
1345
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? Object$2.getPrototypeOf : function (O) {
1346
+ var object = toObject(O);
1347
+ if (hasOwn$3(object, IE_PROTO)) return object[IE_PROTO];
1348
+ var constructor = object.constructor;
1349
+ if (isCallable$8(constructor) && object instanceof constructor) {
1350
+ return constructor.prototype;
1351
+ } return object instanceof Object$2 ? ObjectPrototype : null;
1352
+ };
1353
+
1354
+ var fails$3 = fails$d;
1355
+ var isCallable$7 = isCallable$i;
1356
+ var getPrototypeOf$1 = objectGetPrototypeOf;
1357
+ var redefine$3 = redefine$5.exports;
1358
+ var wellKnownSymbol$b = wellKnownSymbol$e;
1359
+
1360
+ var ITERATOR$6 = wellKnownSymbol$b('iterator');
1361
+ var BUGGY_SAFARI_ITERATORS$1 = false;
1362
+
1363
+ // `%IteratorPrototype%` object
1364
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1365
+ var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
1366
+
1367
+ /* eslint-disable es/no-array-prototype-keys -- safe */
1368
+ if ([].keys) {
1369
+ arrayIterator = [].keys();
1370
+ // Safari 8 has buggy iterators w/o `next`
1371
+ if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
1372
+ else {
1373
+ PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
1374
+ if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
1375
+ }
1376
+ }
1377
+
1378
+ var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails$3(function () {
1379
+ var test = {};
1380
+ // FF44- legacy iterators case
1381
+ return IteratorPrototype$2[ITERATOR$6].call(test) !== test;
1382
+ });
1383
+
1384
+ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1385
+
1386
+ // `%IteratorPrototype%[@@iterator]()` method
1387
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1388
+ if (!isCallable$7(IteratorPrototype$2[ITERATOR$6])) {
1389
+ redefine$3(IteratorPrototype$2, ITERATOR$6, function () {
1390
+ return this;
1391
+ });
1392
+ }
1393
+
1394
+ var iteratorsCore = {
1395
+ IteratorPrototype: IteratorPrototype$2,
1396
+ BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1397
+ };
1398
+
1399
+ var defineProperty$2 = objectDefineProperty.f;
1400
+ var hasOwn$2 = hasOwnProperty_1;
1401
+ var wellKnownSymbol$a = wellKnownSymbol$e;
1402
+
1403
+ var TO_STRING_TAG$3 = wellKnownSymbol$a('toStringTag');
1404
+
1405
+ var setToStringTag$3 = function (target, TAG, STATIC) {
1406
+ if (target && !STATIC) target = target.prototype;
1407
+ if (target && !hasOwn$2(target, TO_STRING_TAG$3)) {
1408
+ defineProperty$2(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
1409
+ }
1410
+ };
1411
+
1412
+ var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1413
+ var create = objectCreate;
1414
+ var createPropertyDescriptor = createPropertyDescriptor$3;
1415
+ var setToStringTag$2 = setToStringTag$3;
1416
+ var Iterators$4 = iterators;
1417
+
1418
+ var returnThis$1 = function () { return this; };
1419
+
1420
+ var createIteratorConstructor$1 = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1421
+ var TO_STRING_TAG = NAME + ' Iterator';
1422
+ IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1423
+ setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
1424
+ Iterators$4[TO_STRING_TAG] = returnThis$1;
1425
+ return IteratorConstructor;
1426
+ };
1427
+
1428
+ var global$i = global$E;
1429
+ var isCallable$6 = isCallable$i;
1430
+
1431
+ var String$3 = global$i.String;
1432
+ var TypeError$7 = global$i.TypeError;
1433
+
1434
+ var aPossiblePrototype$1 = function (argument) {
1435
+ if (typeof argument == 'object' || isCallable$6(argument)) return argument;
1436
+ throw TypeError$7("Can't set " + String$3(argument) + ' as a prototype');
1437
+ };
1438
+
1439
+ /* eslint-disable no-proto -- safe */
1440
+
1441
+ var uncurryThis$6 = functionUncurryThis;
1442
+ var anObject$5 = anObject$a;
1443
+ var aPossiblePrototype = aPossiblePrototype$1;
1444
+
1445
+ // `Object.setPrototypeOf` method
1446
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
1447
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
1448
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
1449
+ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1450
+ var CORRECT_SETTER = false;
1451
+ var test = {};
1452
+ var setter;
1453
+ try {
1454
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1455
+ setter = uncurryThis$6(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1456
+ setter(test, []);
1457
+ CORRECT_SETTER = test instanceof Array;
1458
+ } catch (error) { /* empty */ }
1459
+ return function setPrototypeOf(O, proto) {
1460
+ anObject$5(O);
1461
+ aPossiblePrototype(proto);
1462
+ if (CORRECT_SETTER) setter(O, proto);
1463
+ else O.__proto__ = proto;
1464
+ return O;
1465
+ };
1466
+ }() : undefined);
1467
+
1468
+ var $$3 = _export;
1469
+ var call$5 = functionCall;
1470
+ var FunctionName = functionName;
1471
+ var isCallable$5 = isCallable$i;
1472
+ var createIteratorConstructor = createIteratorConstructor$1;
1473
+ var getPrototypeOf = objectGetPrototypeOf;
1474
+ var setPrototypeOf$1 = objectSetPrototypeOf;
1475
+ var setToStringTag$1 = setToStringTag$3;
1476
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
1477
+ var redefine$2 = redefine$5.exports;
1478
+ var wellKnownSymbol$9 = wellKnownSymbol$e;
1479
+ var Iterators$3 = iterators;
1480
+ var IteratorsCore = iteratorsCore;
1481
+
1482
+ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
1483
+ var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1484
+ var IteratorPrototype = IteratorsCore.IteratorPrototype;
1485
+ var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1486
+ var ITERATOR$5 = wellKnownSymbol$9('iterator');
1487
+ var KEYS = 'keys';
1488
+ var VALUES = 'values';
1489
+ var ENTRIES = 'entries';
1490
+
1491
+ var returnThis = function () { return this; };
1492
+
1493
+ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1494
+ createIteratorConstructor(IteratorConstructor, NAME, next);
1495
+
1496
+ var getIterationMethod = function (KIND) {
1497
+ if (KIND === DEFAULT && defaultIterator) return defaultIterator;
1498
+ if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
1499
+ switch (KIND) {
1500
+ case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
1501
+ case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
1502
+ case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
1503
+ } return function () { return new IteratorConstructor(this); };
1504
+ };
1505
+
1506
+ var TO_STRING_TAG = NAME + ' Iterator';
1507
+ var INCORRECT_VALUES_NAME = false;
1508
+ var IterablePrototype = Iterable.prototype;
1509
+ var nativeIterator = IterablePrototype[ITERATOR$5]
1510
+ || IterablePrototype['@@iterator']
1511
+ || DEFAULT && IterablePrototype[DEFAULT];
1512
+ var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
1513
+ var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
1514
+ var CurrentIteratorPrototype, methods, KEY;
1515
+
1516
+ // fix native
1517
+ if (anyNativeIterator) {
1518
+ CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
1519
+ if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1520
+ if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1521
+ if (setPrototypeOf$1) {
1522
+ setPrototypeOf$1(CurrentIteratorPrototype, IteratorPrototype);
1523
+ } else if (!isCallable$5(CurrentIteratorPrototype[ITERATOR$5])) {
1524
+ redefine$2(CurrentIteratorPrototype, ITERATOR$5, returnThis);
1525
+ }
1526
+ }
1527
+ // Set @@toStringTag to native iterators
1528
+ setToStringTag$1(CurrentIteratorPrototype, TO_STRING_TAG, true);
1529
+ }
1530
+ }
1531
+
1532
+ // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1533
+ if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1534
+ if (CONFIGURABLE_FUNCTION_NAME) {
1535
+ createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1536
+ } else {
1537
+ INCORRECT_VALUES_NAME = true;
1538
+ defaultIterator = function values() { return call$5(nativeIterator, this); };
1539
+ }
1540
+ }
1541
+
1542
+ // export additional methods
1543
+ if (DEFAULT) {
1544
+ methods = {
1545
+ values: getIterationMethod(VALUES),
1546
+ keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
1547
+ entries: getIterationMethod(ENTRIES)
1548
+ };
1549
+ if (FORCED) for (KEY in methods) {
1550
+ if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1551
+ redefine$2(IterablePrototype, KEY, methods[KEY]);
1552
+ }
1553
+ } else $$3({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1554
+ }
1555
+
1556
+ // define iterator
1557
+ if (IterablePrototype[ITERATOR$5] !== defaultIterator) {
1558
+ redefine$2(IterablePrototype, ITERATOR$5, defaultIterator, { name: DEFAULT });
1559
+ }
1560
+ Iterators$3[NAME] = defaultIterator;
1561
+
1562
+ return methods;
1563
+ };
1564
+
1565
+ var toIndexedObject = toIndexedObject$5;
1566
+ var addToUnscopables = addToUnscopables$1;
1567
+ var Iterators$2 = iterators;
1568
+ var InternalStateModule$1 = internalState;
1569
+ var defineProperty$1 = objectDefineProperty.f;
1570
+ var defineIterator = defineIterator$1;
1571
+ var DESCRIPTORS$2 = descriptors;
1572
+
1573
+ var ARRAY_ITERATOR = 'Array Iterator';
1574
+ var setInternalState$1 = InternalStateModule$1.set;
1575
+ var getInternalState$1 = InternalStateModule$1.getterFor(ARRAY_ITERATOR);
1576
+
1577
+ // `Array.prototype.entries` method
1578
+ // https://tc39.es/ecma262/#sec-array.prototype.entries
1579
+ // `Array.prototype.keys` method
1580
+ // https://tc39.es/ecma262/#sec-array.prototype.keys
1581
+ // `Array.prototype.values` method
1582
+ // https://tc39.es/ecma262/#sec-array.prototype.values
1583
+ // `Array.prototype[@@iterator]` method
1584
+ // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
1585
+ // `CreateArrayIterator` internal method
1586
+ // https://tc39.es/ecma262/#sec-createarrayiterator
1587
+ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1588
+ setInternalState$1(this, {
1589
+ type: ARRAY_ITERATOR,
1590
+ target: toIndexedObject(iterated), // target
1591
+ index: 0, // next index
1592
+ kind: kind // kind
1593
+ });
1594
+ // `%ArrayIteratorPrototype%.next` method
1595
+ // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1596
+ }, function () {
1597
+ var state = getInternalState$1(this);
1598
+ var target = state.target;
1599
+ var kind = state.kind;
1600
+ var index = state.index++;
1601
+ if (!target || index >= target.length) {
1602
+ state.target = undefined;
1603
+ return { value: undefined, done: true };
1604
+ }
1605
+ if (kind == 'keys') return { value: index, done: false };
1606
+ if (kind == 'values') return { value: target[index], done: false };
1607
+ return { value: [index, target[index]], done: false };
1608
+ }, 'values');
1609
+
1610
+ // argumentsList[@@iterator] is %ArrayProto_values%
1611
+ // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
1612
+ // https://tc39.es/ecma262/#sec-createmappedargumentsobject
1613
+ var values = Iterators$2.Arguments = Iterators$2.Array;
1614
+
1615
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1616
+ addToUnscopables('keys');
1617
+ addToUnscopables('values');
1618
+ addToUnscopables('entries');
1619
+
1620
+ // V8 ~ Chrome 45- bug
1621
+ if (DESCRIPTORS$2 && values.name !== 'values') try {
1622
+ defineProperty$1(values, 'name', { value: 'values' });
1623
+ } catch (error) { /* empty */ }
1624
+
1625
+ // iterable DOM collections
1626
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1627
+ var domIterables = {
1628
+ CSSRuleList: 0,
1629
+ CSSStyleDeclaration: 0,
1630
+ CSSValueList: 0,
1631
+ ClientRectList: 0,
1632
+ DOMRectList: 0,
1633
+ DOMStringList: 0,
1634
+ DOMTokenList: 1,
1635
+ DataTransferItemList: 0,
1636
+ FileList: 0,
1637
+ HTMLAllCollection: 0,
1638
+ HTMLCollection: 0,
1639
+ HTMLFormElement: 0,
1640
+ HTMLSelectElement: 0,
1641
+ MediaList: 0,
1642
+ MimeTypeArray: 0,
1643
+ NamedNodeMap: 0,
1644
+ NodeList: 1,
1645
+ PaintRequestList: 0,
1646
+ Plugin: 0,
1647
+ PluginArray: 0,
1648
+ SVGLengthList: 0,
1649
+ SVGNumberList: 0,
1650
+ SVGPathSegList: 0,
1651
+ SVGPointList: 0,
1652
+ SVGStringList: 0,
1653
+ SVGTransformList: 0,
1654
+ SourceBufferList: 0,
1655
+ StyleSheetList: 0,
1656
+ TextTrackCueList: 0,
1657
+ TextTrackList: 0,
1658
+ TouchList: 0
1659
+ };
1660
+
1661
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
1662
+ var documentCreateElement = documentCreateElement$2;
1663
+
1664
+ var classList = documentCreateElement('span').classList;
1665
+ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
1666
+
1667
+ var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1668
+
1669
+ var global$h = global$E;
1670
+ var DOMIterables = domIterables;
1671
+ var DOMTokenListPrototype = domTokenListPrototype;
1672
+ var ArrayIteratorMethods = es_array_iterator;
1673
+ var createNonEnumerableProperty = createNonEnumerableProperty$5;
1674
+ var wellKnownSymbol$8 = wellKnownSymbol$e;
1675
+
1676
+ var ITERATOR$4 = wellKnownSymbol$8('iterator');
1677
+ var TO_STRING_TAG$2 = wellKnownSymbol$8('toStringTag');
1678
+ var ArrayValues = ArrayIteratorMethods.values;
1679
+
1680
+ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1681
+ if (CollectionPrototype) {
1682
+ // some Chrome versions have non-configurable methods on DOMTokenList
1683
+ if (CollectionPrototype[ITERATOR$4] !== ArrayValues) try {
1684
+ createNonEnumerableProperty(CollectionPrototype, ITERATOR$4, ArrayValues);
1685
+ } catch (error) {
1686
+ CollectionPrototype[ITERATOR$4] = ArrayValues;
1687
+ }
1688
+ if (!CollectionPrototype[TO_STRING_TAG$2]) {
1689
+ createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG$2, COLLECTION_NAME);
1690
+ }
1691
+ if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1692
+ // some Chrome versions have non-configurable methods on DOMTokenList
1693
+ if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
1694
+ createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1695
+ } catch (error) {
1696
+ CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
1697
+ }
1698
+ }
1699
+ }
1700
+ };
1701
+
1702
+ for (var COLLECTION_NAME in DOMIterables) {
1703
+ handlePrototype(global$h[COLLECTION_NAME] && global$h[COLLECTION_NAME].prototype, COLLECTION_NAME);
1704
+ }
1705
+
1706
+ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1707
+
1708
+ const Flexbox = ({
1709
+ alignContent,
1710
+ alignItems,
1711
+ alignSelf,
1712
+ children,
1713
+ justifyContent
1714
+ }) => {
1715
+ const [classes, setClasses] = useState(['d-flex']);
1716
+ const [className, setClassName] = useState('d-flex'); // update className when classes change
1717
+
1718
+ useEffect(() => {
1719
+ const newClassName = classes.join(' ');
1720
+ if (newClassName !== className) setClassName(newClassName);
1721
+ }, [classes, className]); // update classes when props change
1722
+
1723
+ useEffect(() => {
1724
+ const newClasses = ['d-flex'];
1725
+ if (alignItems) newClasses.push(`align-items-${alignItems}`);
1726
+ if (alignContent) newClasses.push(`align-content-${alignContent}`);
1727
+ if (alignSelf) newClasses.push(`align-content-${alignSelf}`);
1728
+ if (justifyContent) newClasses.push(`justify-content-${justifyContent}`);
1729
+ setClasses(newClasses);
1730
+ }, [alignContent, alignItems, alignSelf, justifyContent]);
1731
+ return jsx("div", Object.assign({
1732
+ className: className
1733
+ }, {
1734
+ children: children
1735
+ }), void 0);
1736
+ };
1737
+
1738
+ function Card({
1739
+ children,
1740
+ header,
1741
+ footer
1742
+ }) {
1743
+ return jsxs("section", Object.assign({
1744
+ className: "card"
1745
+ }, {
1746
+ children: [jsx("header", {
1747
+ children: header
1748
+ }, void 0), jsx("p", {
1749
+ children: children
1750
+ }, void 0), jsx("footer", {
1751
+ children: footer
1752
+ }, void 0)]
1753
+ }), void 0);
1754
+ }
1755
+
1756
+ function Alert({
1757
+ type,
1758
+ header,
1759
+ footer,
1760
+ children,
1761
+ closeText,
1762
+ isCloseable = true
1763
+ }) {
1764
+ const [closeButton, setCloseButton] = useState();
1765
+ useEffect(() => {
1766
+ if (!isCloseable) {
1767
+ setCloseButton(null);
1768
+ } else {
1769
+ if (closeText) setCloseButton(jsx(Button, Object.assign({
1770
+ variant: "ghost"
1771
+ }, {
1772
+ children: jsx("span", Object.assign({
1773
+ className: "sr-only"
1774
+ }, {
1775
+ children: closeText
1776
+ }), void 0)
1777
+ }), void 0));else setCloseButton(jsx("button", {
1778
+ className: "close"
1779
+ }, void 0));
1780
+ }
1781
+ }, [isCloseable, closeText]);
1782
+ return jsxs("div", Object.assign({
1783
+ role: "alert",
1784
+ className: type
1785
+ }, {
1786
+ children: [header && jsxs("header", {
1787
+ children: [/*#__PURE__*/React.isValidElement(header) ? header : jsx("h3", {
1788
+ children: header
1789
+ }, void 0), closeButton]
1790
+ }, void 0), jsx("p", {
1791
+ children: children
1792
+ }, void 0), footer && jsx("footer", {
1793
+ children: footer
1794
+ }, void 0)]
1795
+ }), void 0);
1796
+ }
1797
+
1798
+ const ButtonGroup = ({
1799
+ children,
1800
+ selectedIndex,
1801
+ variant
1802
+ }) => {
1803
+ const [selected, setSelected] = useState(selectedIndex);
1804
+ const [buttons, setButtons] = useState([]);
1805
+ useEffect(() => {
1806
+ const buttonProps = (children instanceof Array ? children : [children]).filter(b => b && b.props).map((b, ix) => {
1807
+ const bp = b.props;
1808
+ const props = Object.assign(Object.assign({}, bp), {
1809
+ variant,
1810
+ key: bp.key || `btn_${ix}`,
1811
+ active: ix === selected,
1812
+ onClick: e => {
1813
+ setSelected(ix);
1814
+ if (bp.onClick) bp.onClick(e);
1815
+ }
1816
+ });
1817
+ return props;
1818
+ });
1819
+ setButtons(buttonProps);
1820
+ }, [children, selected, variant]);
1821
+ return jsx(Group, {
1822
+ children: buttons.map(props => jsx(Button, Object.assign({}, props), props.key))
1823
+ }, void 0);
1824
+ };
1825
+
1826
+ function Form({
1827
+ children,
1828
+ direction = 'vertical',
1829
+ formSize = 'md'
1830
+ }) {
1831
+ return jsx("form", Object.assign({
1832
+ className: [direction, `size-${formSize}`].join(' ')
1833
+ }, {
1834
+ children: children
1835
+ }), void 0);
1836
+ }
1837
+
1838
+ function Group({
1839
+ children,
1840
+ error,
1841
+ groupBorder = false
1842
+ }) {
1843
+ const groupClassName = `group ${groupBorder ? 'group-border' : ''} ${error ? 'is-invalid' : ''}`;
1844
+ const errorMessage = error ? error.message || error : '';
1845
+ return jsxs("div", Object.assign({
1846
+ className: "form-group"
1847
+ }, {
1848
+ children: [jsx("div", Object.assign({
1849
+ className: groupClassName
1850
+ }, {
1851
+ children: children
1852
+ }), void 0), error && jsx("span", Object.assign({
1853
+ className: "form-info"
1854
+ }, {
1855
+ children: errorMessage
1856
+ }), void 0)]
1857
+ }), void 0);
1858
+ }
1859
+
1860
+ var wellKnownSymbol$7 = wellKnownSymbol$e;
1861
+
1862
+ var TO_STRING_TAG$1 = wellKnownSymbol$7('toStringTag');
1863
+ var test = {};
1864
+
1865
+ test[TO_STRING_TAG$1] = 'z';
1866
+
1867
+ var toStringTagSupport = String(test) === '[object z]';
1868
+
1869
+ var global$g = global$E;
1870
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1871
+ var isCallable$4 = isCallable$i;
1872
+ var classofRaw = classofRaw$1;
1873
+ var wellKnownSymbol$6 = wellKnownSymbol$e;
1874
+
1875
+ var TO_STRING_TAG = wellKnownSymbol$6('toStringTag');
1876
+ var Object$1 = global$g.Object;
1877
+
1878
+ // ES3 wrong here
1879
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1880
+
1881
+ // fallback for IE11 Script Access Denied error
1882
+ var tryGet = function (it, key) {
1883
+ try {
1884
+ return it[key];
1885
+ } catch (error) { /* empty */ }
1886
+ };
1887
+
1888
+ // getting tag from ES6+ `Object.prototype.toString`
1889
+ var classof$4 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1890
+ var O, tag, result;
1891
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
1892
+ // @@toStringTag case
1893
+ : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
1894
+ // builtinTag case
1895
+ : CORRECT_ARGUMENTS ? classofRaw(O)
1896
+ // ES3 arguments fallback
1897
+ : (result = classofRaw(O)) == 'Object' && isCallable$4(O.callee) ? 'Arguments' : result;
1898
+ };
1899
+
1900
+ var global$f = global$E;
1901
+ var classof$3 = classof$4;
1902
+
1903
+ var String$2 = global$f.String;
1904
+
1905
+ var toString$3 = function (argument) {
1906
+ if (classof$3(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1907
+ return String$2(argument);
1908
+ };
1909
+
1910
+ // a string of all valid unicode whitespaces
1911
+ var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
1912
+ '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
1913
+
1914
+ var uncurryThis$5 = functionUncurryThis;
1915
+ var requireObjectCoercible = requireObjectCoercible$3;
1916
+ var toString$2 = toString$3;
1917
+ var whitespaces$1 = whitespaces$2;
1918
+
1919
+ var replace$1 = uncurryThis$5(''.replace);
1920
+ var whitespace = '[' + whitespaces$1 + ']';
1921
+ var ltrim = RegExp('^' + whitespace + whitespace + '*');
1922
+ var rtrim = RegExp(whitespace + whitespace + '*$');
1923
+
1924
+ // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
1925
+ var createMethod = function (TYPE) {
1926
+ return function ($this) {
1927
+ var string = toString$2(requireObjectCoercible($this));
1928
+ if (TYPE & 1) string = replace$1(string, ltrim, '');
1929
+ if (TYPE & 2) string = replace$1(string, rtrim, '');
1930
+ return string;
1931
+ };
1932
+ };
1933
+
1934
+ var stringTrim = {
1935
+ // `String.prototype.{ trimLeft, trimStart }` methods
1936
+ // https://tc39.es/ecma262/#sec-string.prototype.trimstart
1937
+ start: createMethod(1),
1938
+ // `String.prototype.{ trimRight, trimEnd }` methods
1939
+ // https://tc39.es/ecma262/#sec-string.prototype.trimend
1940
+ end: createMethod(2),
1941
+ // `String.prototype.trim` method
1942
+ // https://tc39.es/ecma262/#sec-string.prototype.trim
1943
+ trim: createMethod(3)
1944
+ };
1945
+
1946
+ var global$e = global$E;
1947
+ var fails$2 = fails$d;
1948
+ var uncurryThis$4 = functionUncurryThis;
1949
+ var toString$1 = toString$3;
1950
+ var trim = stringTrim.trim;
1951
+ var whitespaces = whitespaces$2;
1952
+
1953
+ var $parseInt$1 = global$e.parseInt;
1954
+ var Symbol$1 = global$e.Symbol;
1955
+ var ITERATOR$3 = Symbol$1 && Symbol$1.iterator;
1956
+ var hex = /^[+-]?0x/i;
1957
+ var exec$1 = uncurryThis$4(hex.exec);
1958
+ var FORCED$1 = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
1959
+ // MS Edge 18- broken with boxed symbols
1960
+ || (ITERATOR$3 && !fails$2(function () { $parseInt$1(Object(ITERATOR$3)); }));
1961
+
1962
+ // `parseInt` method
1963
+ // https://tc39.es/ecma262/#sec-parseint-string-radix
1964
+ var numberParseInt = FORCED$1 ? function parseInt(string, radix) {
1965
+ var S = trim(toString$1(string));
1966
+ return $parseInt$1(S, (radix >>> 0) || (exec$1(hex, S) ? 16 : 10));
1967
+ } : $parseInt$1;
1968
+
1969
+ var $$2 = _export;
1970
+ var $parseInt = numberParseInt;
1971
+
1972
+ // `parseInt` method
1973
+ // https://tc39.es/ecma262/#sec-parseint-string-radix
1974
+ $$2({ global: true, forced: parseInt != $parseInt }, {
1975
+ parseInt: $parseInt
1976
+ });
1977
+
1978
+ const useInput = (props, evaluator, notify) => {
1979
+ const id = useMemo(() => props.id || randomId(), [props.id]);
1980
+ const ref = useRef(null);
1981
+ const [value, setValue] = useState(props.value);
1982
+ const [checked, setChecked] = useState(props.checked);
1983
+ useEffect(() => {
1984
+ if (ref.current && ref.current.form) {
1985
+ const resetListener = () => {
1986
+ props.value && setValue(props.value);
1987
+ props.checked && setChecked(props.checked);
1988
+ };
1989
+
1990
+ const form = ref.current.form;
1991
+ form.addEventListener('reset', resetListener);
1992
+ return () => form.removeEventListener('reset', resetListener);
1993
+ } else {
1994
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
1995
+ return () => {};
1996
+ }
1997
+ }, [props]);
1998
+
1999
+ const onChange = event => {
2000
+ props.value && setValue(event.target.value);
2001
+ props.checked && setChecked(event.target.checked);
2002
+ if (notify) notify(evaluator(event.target));
2003
+ };
2004
+
2005
+ return Object.assign(Object.assign({}, props), {
2006
+ id,
2007
+ ref,
2008
+ value,
2009
+ checked,
2010
+ onChange
2011
+ });
2012
+ };
2013
+
2014
+ const RenderInput = (type, props, evaluator, label, info, listener) => {
2015
+ const _a = useInput(props, evaluator, listener),
2016
+ {
2017
+ value
2018
+ } = _a,
2019
+ inputProps = __rest(_a, ["value"]);
2020
+
2021
+ const propsWithDescription = info ? Object.assign(Object.assign({}, inputProps), {
2022
+ 'aria-describedby': `${inputProps.id}_info`
2023
+ }) : inputProps; // Render naked
2024
+
2025
+ if (!label && !info) return jsx("input", Object.assign({
2026
+ type: type,
2027
+ value: value
2028
+ }, propsWithDescription), void 0);
2029
+ return jsxs("div", Object.assign({
2030
+ className: "form-field"
2031
+ }, {
2032
+ children: [label && jsx("label", Object.assign({
2033
+ htmlFor: inputProps.id
2034
+ }, {
2035
+ children: label
2036
+ }), void 0), info && jsx("span", Object.assign({
2037
+ className: "form-info",
2038
+ id: "{inputProps.id}_info"
2039
+ }, {
2040
+ children: info
2041
+ }), void 0), jsx("input", Object.assign({
2042
+ type: type,
2043
+ value: value
2044
+ }, propsWithDescription), void 0)]
2045
+ }), void 0);
2046
+ };
2047
+
2048
+ const TextInput = _a => {
2049
+ var {
2050
+ label,
2051
+ info,
2052
+ onChangeText
2053
+ } = _a,
2054
+ props = __rest(_a, ["label", "info", "onChangeText"]);
2055
+
2056
+ return RenderInput('text', props, e => e.value, label, info, onChangeText);
2057
+ };
2058
+ const EmailInput = _a => {
2059
+ var {
2060
+ label,
2061
+ info,
2062
+ onChangeText
2063
+ } = _a,
2064
+ props = __rest(_a, ["label", "info", "onChangeText"]);
2065
+
2066
+ return RenderInput('email', props, e => e.value, label, info, onChangeText);
2067
+ };
2068
+ const NumberInput = _a => {
2069
+ var {
2070
+ label,
2071
+ info,
2072
+ onChangeText
2073
+ } = _a,
2074
+ props = __rest(_a, ["label", "info", "onChangeText"]);
2075
+
2076
+ return RenderInput('number', props, e => e.value.length ? parseInt(e.value, 10) : undefined, label, info, onChangeText);
2077
+ };
2078
+ const Checkbox = _a => {
2079
+ var {
2080
+ label,
2081
+ onChecked
2082
+ } = _a,
2083
+ props = __rest(_a, ["label", "onChecked"]);
2084
+
2085
+ const inputProps = useInput(props, e => e.checked, onChecked);
2086
+ return jsxs("label", Object.assign({
2087
+ htmlFor: inputProps.id,
2088
+ className: "form-control"
2089
+ }, {
2090
+ children: [label, jsx("input", Object.assign({
2091
+ type: "checkbox"
2092
+ }, inputProps), void 0), jsx("span", {}, void 0), jsx("i", {}, void 0)]
2093
+ }), void 0);
2094
+ };
2095
+ const RadioButton = _a => {
2096
+ var {
2097
+ label,
2098
+ onChangeRadioBtn,
2099
+ validator
2100
+ } = _a,
2101
+ props = __rest(_a, ["label", "onChangeRadioBtn", "validator"]);
2102
+
2103
+ const inputProps = useInput(props, e => {
2104
+ return {
2105
+ value: e.value,
2106
+ checked: e.checked
2107
+ };
2108
+ }, onChangeRadioBtn);
2109
+ return jsxs("label", Object.assign({
2110
+ htmlFor: inputProps.id,
2111
+ className: "form-control"
2112
+ }, {
2113
+ children: [jsx("input", Object.assign({
2114
+ type: "radio",
2115
+ name: "default"
2116
+ }, inputProps, {
2117
+ className: validator
2118
+ }), void 0), jsx("span", {
2119
+ children: label
2120
+ }, void 0), jsx("i", {}, void 0)]
2121
+ }), void 0);
2122
+ };
2123
+
2124
+ const Text = ({
2125
+ children
2126
+ }) => jsx("span", Object.assign({
2127
+ className: "form-text"
2128
+ }, {
2129
+ children: children
2130
+ }), void 0);
2131
+
2132
+ var $$1 = _export;
2133
+ var DESCRIPTORS$1 = descriptors;
2134
+ var global$d = global$E;
2135
+ var uncurryThis$3 = functionUncurryThis;
2136
+ var hasOwn$1 = hasOwnProperty_1;
2137
+ var isCallable$3 = isCallable$i;
2138
+ var isPrototypeOf$2 = objectIsPrototypeOf;
2139
+ var toString = toString$3;
2140
+ var defineProperty = objectDefineProperty.f;
2141
+ var copyConstructorProperties = copyConstructorProperties$2;
2142
+
2143
+ var NativeSymbol = global$d.Symbol;
2144
+ var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
2145
+
2146
+ if (DESCRIPTORS$1 && isCallable$3(NativeSymbol) && (!('description' in SymbolPrototype) ||
2147
+ // Safari 12 bug
2148
+ NativeSymbol().description !== undefined
2149
+ )) {
2150
+ var EmptyStringDescriptionStore = {};
2151
+ // wrap Symbol constructor for correct work with undefined description
2152
+ var SymbolWrapper = function Symbol() {
2153
+ var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]);
2154
+ var result = isPrototypeOf$2(SymbolPrototype, this)
2155
+ ? new NativeSymbol(description)
2156
+ // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
2157
+ : description === undefined ? NativeSymbol() : NativeSymbol(description);
2158
+ if (description === '') EmptyStringDescriptionStore[result] = true;
2159
+ return result;
2160
+ };
2161
+
2162
+ copyConstructorProperties(SymbolWrapper, NativeSymbol);
2163
+ SymbolWrapper.prototype = SymbolPrototype;
2164
+ SymbolPrototype.constructor = SymbolWrapper;
2165
+
2166
+ var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)';
2167
+ var symbolToString = uncurryThis$3(SymbolPrototype.toString);
2168
+ var symbolValueOf = uncurryThis$3(SymbolPrototype.valueOf);
2169
+ var regexp = /^Symbol\((.*)\)[^)]+$/;
2170
+ var replace = uncurryThis$3(''.replace);
2171
+ var stringSlice = uncurryThis$3(''.slice);
2172
+
2173
+ defineProperty(SymbolPrototype, 'description', {
2174
+ configurable: true,
2175
+ get: function description() {
2176
+ var symbol = symbolValueOf(this);
2177
+ var string = symbolToString(symbol);
2178
+ if (hasOwn$1(EmptyStringDescriptionStore, symbol)) return '';
2179
+ var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');
2180
+ return desc === '' ? undefined : desc;
2181
+ }
2182
+ });
2183
+
2184
+ $$1({ global: true, forced: true }, {
2185
+ Symbol: SymbolWrapper
2186
+ });
2187
+ }
2188
+
2189
+ var global$c = global$E;
2190
+
2191
+ var nativePromiseConstructor = global$c.Promise;
2192
+
2193
+ var redefine$1 = redefine$5.exports;
2194
+
2195
+ var redefineAll$1 = function (target, src, options) {
2196
+ for (var key in src) redefine$1(target, key, src[key], options);
2197
+ return target;
2198
+ };
2199
+
2200
+ var getBuiltIn$2 = getBuiltIn$7;
2201
+ var definePropertyModule = objectDefineProperty;
2202
+ var wellKnownSymbol$5 = wellKnownSymbol$e;
2203
+ var DESCRIPTORS = descriptors;
2204
+
2205
+ var SPECIES$2 = wellKnownSymbol$5('species');
2206
+
2207
+ var setSpecies$1 = function (CONSTRUCTOR_NAME) {
2208
+ var Constructor = getBuiltIn$2(CONSTRUCTOR_NAME);
2209
+ var defineProperty = definePropertyModule.f;
2210
+
2211
+ if (DESCRIPTORS && Constructor && !Constructor[SPECIES$2]) {
2212
+ defineProperty(Constructor, SPECIES$2, {
2213
+ configurable: true,
2214
+ get: function () { return this; }
2215
+ });
2216
+ }
2217
+ };
2218
+
2219
+ var global$b = global$E;
2220
+ var isPrototypeOf$1 = objectIsPrototypeOf;
2221
+
2222
+ var TypeError$6 = global$b.TypeError;
2223
+
2224
+ var anInstance$1 = function (it, Prototype) {
2225
+ if (isPrototypeOf$1(Prototype, it)) return it;
2226
+ throw TypeError$6('Incorrect invocation');
2227
+ };
2228
+
2229
+ var uncurryThis$2 = functionUncurryThis;
2230
+ var aCallable$3 = aCallable$5;
2231
+ var NATIVE_BIND$1 = functionBindNative;
2232
+
2233
+ var bind$4 = uncurryThis$2(uncurryThis$2.bind);
2234
+
2235
+ // optional / simple context binding
2236
+ var functionBindContext = function (fn, that) {
2237
+ aCallable$3(fn);
2238
+ return that === undefined ? fn : NATIVE_BIND$1 ? bind$4(fn, that) : function (/* ...args */) {
2239
+ return fn.apply(that, arguments);
2240
+ };
2241
+ };
2242
+
2243
+ var wellKnownSymbol$4 = wellKnownSymbol$e;
2244
+ var Iterators$1 = iterators;
2245
+
2246
+ var ITERATOR$2 = wellKnownSymbol$4('iterator');
2247
+ var ArrayPrototype = Array.prototype;
2248
+
2249
+ // check on default Array iterator
2250
+ var isArrayIteratorMethod$1 = function (it) {
2251
+ return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
2252
+ };
2253
+
2254
+ var classof$2 = classof$4;
2255
+ var getMethod$1 = getMethod$3;
2256
+ var Iterators = iterators;
2257
+ var wellKnownSymbol$3 = wellKnownSymbol$e;
2258
+
2259
+ var ITERATOR$1 = wellKnownSymbol$3('iterator');
2260
+
2261
+ var getIteratorMethod$2 = function (it) {
2262
+ if (it != undefined) return getMethod$1(it, ITERATOR$1)
2263
+ || getMethod$1(it, '@@iterator')
2264
+ || Iterators[classof$2(it)];
2265
+ };
2266
+
2267
+ var global$a = global$E;
2268
+ var call$4 = functionCall;
2269
+ var aCallable$2 = aCallable$5;
2270
+ var anObject$4 = anObject$a;
2271
+ var tryToString$2 = tryToString$4;
2272
+ var getIteratorMethod$1 = getIteratorMethod$2;
2273
+
2274
+ var TypeError$5 = global$a.TypeError;
2275
+
2276
+ var getIterator$1 = function (argument, usingIterator) {
2277
+ var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
2278
+ if (aCallable$2(iteratorMethod)) return anObject$4(call$4(iteratorMethod, argument));
2279
+ throw TypeError$5(tryToString$2(argument) + ' is not iterable');
2280
+ };
2281
+
2282
+ var call$3 = functionCall;
2283
+ var anObject$3 = anObject$a;
2284
+ var getMethod = getMethod$3;
2285
+
2286
+ var iteratorClose$1 = function (iterator, kind, value) {
2287
+ var innerResult, innerError;
2288
+ anObject$3(iterator);
2289
+ try {
2290
+ innerResult = getMethod(iterator, 'return');
2291
+ if (!innerResult) {
2292
+ if (kind === 'throw') throw value;
2293
+ return value;
2294
+ }
2295
+ innerResult = call$3(innerResult, iterator);
2296
+ } catch (error) {
2297
+ innerError = true;
2298
+ innerResult = error;
2299
+ }
2300
+ if (kind === 'throw') throw value;
2301
+ if (innerError) throw innerResult;
2302
+ anObject$3(innerResult);
2303
+ return value;
2304
+ };
2305
+
2306
+ var global$9 = global$E;
2307
+ var bind$3 = functionBindContext;
2308
+ var call$2 = functionCall;
2309
+ var anObject$2 = anObject$a;
2310
+ var tryToString$1 = tryToString$4;
2311
+ var isArrayIteratorMethod = isArrayIteratorMethod$1;
2312
+ var lengthOfArrayLike = lengthOfArrayLike$2;
2313
+ var isPrototypeOf = objectIsPrototypeOf;
2314
+ var getIterator = getIterator$1;
2315
+ var getIteratorMethod = getIteratorMethod$2;
2316
+ var iteratorClose = iteratorClose$1;
2317
+
2318
+ var TypeError$4 = global$9.TypeError;
2319
+
2320
+ var Result = function (stopped, result) {
2321
+ this.stopped = stopped;
2322
+ this.result = result;
2323
+ };
2324
+
2325
+ var ResultPrototype = Result.prototype;
2326
+
2327
+ var iterate$1 = function (iterable, unboundFunction, options) {
2328
+ var that = options && options.that;
2329
+ var AS_ENTRIES = !!(options && options.AS_ENTRIES);
2330
+ var IS_ITERATOR = !!(options && options.IS_ITERATOR);
2331
+ var INTERRUPTED = !!(options && options.INTERRUPTED);
2332
+ var fn = bind$3(unboundFunction, that);
2333
+ var iterator, iterFn, index, length, result, next, step;
2334
+
2335
+ var stop = function (condition) {
2336
+ if (iterator) iteratorClose(iterator, 'normal', condition);
2337
+ return new Result(true, condition);
2338
+ };
2339
+
2340
+ var callFn = function (value) {
2341
+ if (AS_ENTRIES) {
2342
+ anObject$2(value);
2343
+ return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
2344
+ } return INTERRUPTED ? fn(value, stop) : fn(value);
2345
+ };
2346
+
2347
+ if (IS_ITERATOR) {
2348
+ iterator = iterable;
2349
+ } else {
2350
+ iterFn = getIteratorMethod(iterable);
2351
+ if (!iterFn) throw TypeError$4(tryToString$1(iterable) + ' is not iterable');
2352
+ // optimisation for array iterators
2353
+ if (isArrayIteratorMethod(iterFn)) {
2354
+ for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
2355
+ result = callFn(iterable[index]);
2356
+ if (result && isPrototypeOf(ResultPrototype, result)) return result;
2357
+ } return new Result(false);
2358
+ }
2359
+ iterator = getIterator(iterable, iterFn);
2360
+ }
2361
+
2362
+ next = iterator.next;
2363
+ while (!(step = call$2(next, iterator)).done) {
2364
+ try {
2365
+ result = callFn(step.value);
2366
+ } catch (error) {
2367
+ iteratorClose(iterator, 'throw', error);
2368
+ }
2369
+ if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
2370
+ } return new Result(false);
2371
+ };
2372
+
2373
+ var wellKnownSymbol$2 = wellKnownSymbol$e;
2374
+
2375
+ var ITERATOR = wellKnownSymbol$2('iterator');
2376
+ var SAFE_CLOSING = false;
2377
+
2378
+ try {
2379
+ var called = 0;
2380
+ var iteratorWithReturn = {
2381
+ next: function () {
2382
+ return { done: !!called++ };
2383
+ },
2384
+ 'return': function () {
2385
+ SAFE_CLOSING = true;
2386
+ }
2387
+ };
2388
+ iteratorWithReturn[ITERATOR] = function () {
2389
+ return this;
2390
+ };
2391
+ // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
2392
+ Array.from(iteratorWithReturn, function () { throw 2; });
2393
+ } catch (error) { /* empty */ }
2394
+
2395
+ var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
2396
+ if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
2397
+ var ITERATION_SUPPORT = false;
2398
+ try {
2399
+ var object = {};
2400
+ object[ITERATOR] = function () {
2401
+ return {
2402
+ next: function () {
2403
+ return { done: ITERATION_SUPPORT = true };
2404
+ }
2405
+ };
2406
+ };
2407
+ exec(object);
2408
+ } catch (error) { /* empty */ }
2409
+ return ITERATION_SUPPORT;
2410
+ };
2411
+
2412
+ var uncurryThis$1 = functionUncurryThis;
2413
+ var fails$1 = fails$d;
2414
+ var isCallable$2 = isCallable$i;
2415
+ var classof$1 = classof$4;
2416
+ var getBuiltIn$1 = getBuiltIn$7;
2417
+ var inspectSource$1 = inspectSource$4;
2418
+
2419
+ var noop = function () { /* empty */ };
2420
+ var empty = [];
2421
+ var construct = getBuiltIn$1('Reflect', 'construct');
2422
+ var constructorRegExp = /^\s*(?:class|function)\b/;
2423
+ var exec = uncurryThis$1(constructorRegExp.exec);
2424
+ var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
2425
+
2426
+ var isConstructorModern = function isConstructor(argument) {
2427
+ if (!isCallable$2(argument)) return false;
2428
+ try {
2429
+ construct(noop, empty, argument);
2430
+ return true;
2431
+ } catch (error) {
2432
+ return false;
2433
+ }
2434
+ };
2435
+
2436
+ var isConstructorLegacy = function isConstructor(argument) {
2437
+ if (!isCallable$2(argument)) return false;
2438
+ switch (classof$1(argument)) {
2439
+ case 'AsyncFunction':
2440
+ case 'GeneratorFunction':
2441
+ case 'AsyncGeneratorFunction': return false;
2442
+ }
2443
+ try {
2444
+ // we can't check .prototype since constructors produced by .bind haven't it
2445
+ // `Function#toString` throws on some built-it function in some legacy engines
2446
+ // (for example, `DOMQuad` and similar in FF41-)
2447
+ return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource$1(argument));
2448
+ } catch (error) {
2449
+ return true;
2450
+ }
2451
+ };
2452
+
2453
+ isConstructorLegacy.sham = true;
2454
+
2455
+ // `IsConstructor` abstract operation
2456
+ // https://tc39.es/ecma262/#sec-isconstructor
2457
+ var isConstructor$1 = !construct || fails$1(function () {
2458
+ var called;
2459
+ return isConstructorModern(isConstructorModern.call)
2460
+ || !isConstructorModern(Object)
2461
+ || !isConstructorModern(function () { called = true; })
2462
+ || called;
2463
+ }) ? isConstructorLegacy : isConstructorModern;
2464
+
2465
+ var global$8 = global$E;
2466
+ var isConstructor = isConstructor$1;
2467
+ var tryToString = tryToString$4;
2468
+
2469
+ var TypeError$3 = global$8.TypeError;
2470
+
2471
+ // `Assert: IsConstructor(argument) is true`
2472
+ var aConstructor$1 = function (argument) {
2473
+ if (isConstructor(argument)) return argument;
2474
+ throw TypeError$3(tryToString(argument) + ' is not a constructor');
2475
+ };
2476
+
2477
+ var anObject$1 = anObject$a;
2478
+ var aConstructor = aConstructor$1;
2479
+ var wellKnownSymbol$1 = wellKnownSymbol$e;
2480
+
2481
+ var SPECIES$1 = wellKnownSymbol$1('species');
2482
+
2483
+ // `SpeciesConstructor` abstract operation
2484
+ // https://tc39.es/ecma262/#sec-speciesconstructor
2485
+ var speciesConstructor$1 = function (O, defaultConstructor) {
2486
+ var C = anObject$1(O).constructor;
2487
+ var S;
2488
+ return C === undefined || (S = anObject$1(C)[SPECIES$1]) == undefined ? defaultConstructor : aConstructor(S);
2489
+ };
2490
+
2491
+ var NATIVE_BIND = functionBindNative;
2492
+
2493
+ var FunctionPrototype = Function.prototype;
2494
+ var apply$1 = FunctionPrototype.apply;
2495
+ var call$1 = FunctionPrototype.call;
2496
+
2497
+ // eslint-disable-next-line es/no-reflect -- safe
2498
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$1.bind(apply$1) : function () {
2499
+ return call$1.apply(apply$1, arguments);
2500
+ });
2501
+
2502
+ var uncurryThis = functionUncurryThis;
2503
+
2504
+ var arraySlice$1 = uncurryThis([].slice);
2505
+
2506
+ var global$7 = global$E;
2507
+
2508
+ var TypeError$2 = global$7.TypeError;
2509
+
2510
+ var validateArgumentsLength$1 = function (passed, required) {
2511
+ if (passed < required) throw TypeError$2('Not enough arguments');
2512
+ return passed;
2513
+ };
2514
+
2515
+ var userAgent$2 = engineUserAgent;
2516
+
2517
+ var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
2518
+
2519
+ var classof = classofRaw$1;
2520
+ var global$6 = global$E;
2521
+
2522
+ var engineIsNode = classof(global$6.process) == 'process';
2523
+
2524
+ var global$5 = global$E;
2525
+ var apply = functionApply;
2526
+ var bind$2 = functionBindContext;
2527
+ var isCallable$1 = isCallable$i;
2528
+ var hasOwn = hasOwnProperty_1;
2529
+ var fails = fails$d;
2530
+ var html = html$2;
2531
+ var arraySlice = arraySlice$1;
2532
+ var createElement = documentCreateElement$2;
2533
+ var validateArgumentsLength = validateArgumentsLength$1;
2534
+ var IS_IOS$1 = engineIsIos;
2535
+ var IS_NODE$2 = engineIsNode;
2536
+
2537
+ var set = global$5.setImmediate;
2538
+ var clear = global$5.clearImmediate;
2539
+ var process$2 = global$5.process;
2540
+ var Dispatch = global$5.Dispatch;
2541
+ var Function$1 = global$5.Function;
2542
+ var MessageChannel = global$5.MessageChannel;
2543
+ var String$1 = global$5.String;
2544
+ var counter = 0;
2545
+ var queue$1 = {};
2546
+ var ONREADYSTATECHANGE = 'onreadystatechange';
2547
+ var location, defer, channel, port;
2548
+
2549
+ try {
2550
+ // Deno throws a ReferenceError on `location` access without `--location` flag
2551
+ location = global$5.location;
2552
+ } catch (error) { /* empty */ }
2553
+
2554
+ var run = function (id) {
2555
+ if (hasOwn(queue$1, id)) {
2556
+ var fn = queue$1[id];
2557
+ delete queue$1[id];
2558
+ fn();
2559
+ }
2560
+ };
2561
+
2562
+ var runner = function (id) {
2563
+ return function () {
2564
+ run(id);
2565
+ };
2566
+ };
2567
+
2568
+ var listener = function (event) {
2569
+ run(event.data);
2570
+ };
2571
+
2572
+ var post = function (id) {
2573
+ // old engines have not location.origin
2574
+ global$5.postMessage(String$1(id), location.protocol + '//' + location.host);
2575
+ };
2576
+
2577
+ // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
2578
+ if (!set || !clear) {
2579
+ set = function setImmediate(handler) {
2580
+ validateArgumentsLength(arguments.length, 1);
2581
+ var fn = isCallable$1(handler) ? handler : Function$1(handler);
2582
+ var args = arraySlice(arguments, 1);
2583
+ queue$1[++counter] = function () {
2584
+ apply(fn, undefined, args);
2585
+ };
2586
+ defer(counter);
2587
+ return counter;
2588
+ };
2589
+ clear = function clearImmediate(id) {
2590
+ delete queue$1[id];
2591
+ };
2592
+ // Node.js 0.8-
2593
+ if (IS_NODE$2) {
2594
+ defer = function (id) {
2595
+ process$2.nextTick(runner(id));
2596
+ };
2597
+ // Sphere (JS game engine) Dispatch API
2598
+ } else if (Dispatch && Dispatch.now) {
2599
+ defer = function (id) {
2600
+ Dispatch.now(runner(id));
2601
+ };
2602
+ // Browsers with MessageChannel, includes WebWorkers
2603
+ // except iOS - https://github.com/zloirock/core-js/issues/624
2604
+ } else if (MessageChannel && !IS_IOS$1) {
2605
+ channel = new MessageChannel();
2606
+ port = channel.port2;
2607
+ channel.port1.onmessage = listener;
2608
+ defer = bind$2(port.postMessage, port);
2609
+ // Browsers with postMessage, skip WebWorkers
2610
+ // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
2611
+ } else if (
2612
+ global$5.addEventListener &&
2613
+ isCallable$1(global$5.postMessage) &&
2614
+ !global$5.importScripts &&
2615
+ location && location.protocol !== 'file:' &&
2616
+ !fails(post)
2617
+ ) {
2618
+ defer = post;
2619
+ global$5.addEventListener('message', listener, false);
2620
+ // IE8-
2621
+ } else if (ONREADYSTATECHANGE in createElement('script')) {
2622
+ defer = function (id) {
2623
+ html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
2624
+ html.removeChild(this);
2625
+ run(id);
2626
+ };
2627
+ };
2628
+ // Rest old browsers
2629
+ } else {
2630
+ defer = function (id) {
2631
+ setTimeout(runner(id), 0);
2632
+ };
2633
+ }
2634
+ }
2635
+
2636
+ var task$1 = {
2637
+ set: set,
2638
+ clear: clear
2639
+ };
2640
+
2641
+ var userAgent$1 = engineUserAgent;
2642
+ var global$4 = global$E;
2643
+
2644
+ var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$4.Pebble !== undefined;
2645
+
2646
+ var userAgent = engineUserAgent;
2647
+
2648
+ var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
2649
+
2650
+ var global$3 = global$E;
2651
+ var bind$1 = functionBindContext;
2652
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
2653
+ var macrotask = task$1.set;
2654
+ var IS_IOS = engineIsIos;
2655
+ var IS_IOS_PEBBLE = engineIsIosPebble;
2656
+ var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
2657
+ var IS_NODE$1 = engineIsNode;
2658
+
2659
+ var MutationObserver = global$3.MutationObserver || global$3.WebKitMutationObserver;
2660
+ var document$2 = global$3.document;
2661
+ var process$1 = global$3.process;
2662
+ var Promise$1 = global$3.Promise;
2663
+ // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
2664
+ var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$3, 'queueMicrotask');
2665
+ var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
2666
+
2667
+ var flush, head, last, notify$1, toggle, node, promise, then;
2668
+
2669
+ // modern engines have queueMicrotask method
2670
+ if (!queueMicrotask) {
2671
+ flush = function () {
2672
+ var parent, fn;
2673
+ if (IS_NODE$1 && (parent = process$1.domain)) parent.exit();
2674
+ while (head) {
2675
+ fn = head.fn;
2676
+ head = head.next;
2677
+ try {
2678
+ fn();
2679
+ } catch (error) {
2680
+ if (head) notify$1();
2681
+ else last = undefined;
2682
+ throw error;
2683
+ }
2684
+ } last = undefined;
2685
+ if (parent) parent.enter();
2686
+ };
2687
+
2688
+ // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
2689
+ // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
2690
+ if (!IS_IOS && !IS_NODE$1 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
2691
+ toggle = true;
2692
+ node = document$2.createTextNode('');
2693
+ new MutationObserver(flush).observe(node, { characterData: true });
2694
+ notify$1 = function () {
2695
+ node.data = toggle = !toggle;
2696
+ };
2697
+ // environments with maybe non-completely correct, but existent Promise
2698
+ } else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
2699
+ // Promise.resolve without an argument throws an error in LG WebOS 2
2700
+ promise = Promise$1.resolve(undefined);
2701
+ // workaround of WebKit ~ iOS Safari 10.1 bug
2702
+ promise.constructor = Promise$1;
2703
+ then = bind$1(promise.then, promise);
2704
+ notify$1 = function () {
2705
+ then(flush);
2706
+ };
2707
+ // Node.js without promises
2708
+ } else if (IS_NODE$1) {
2709
+ notify$1 = function () {
2710
+ process$1.nextTick(flush);
2711
+ };
2712
+ // for other environments - macrotask based on:
2713
+ // - setImmediate
2714
+ // - MessageChannel
2715
+ // - window.postMessag
2716
+ // - onreadystatechange
2717
+ // - setTimeout
2718
+ } else {
2719
+ // strange IE + webpack dev server bug - use .bind(global)
2720
+ macrotask = bind$1(macrotask, global$3);
2721
+ notify$1 = function () {
2722
+ macrotask(flush);
2723
+ };
2724
+ }
2725
+ }
2726
+
2727
+ var microtask$1 = queueMicrotask || function (fn) {
2728
+ var task = { fn: fn, next: undefined };
2729
+ if (last) last.next = task;
2730
+ if (!head) {
2731
+ head = task;
2732
+ notify$1();
2733
+ } last = task;
2734
+ };
2735
+
2736
+ var newPromiseCapability$2 = {};
2737
+
2738
+ var aCallable$1 = aCallable$5;
2739
+
2740
+ var PromiseCapability = function (C) {
2741
+ var resolve, reject;
2742
+ this.promise = new C(function ($$resolve, $$reject) {
2743
+ if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
2744
+ resolve = $$resolve;
2745
+ reject = $$reject;
2746
+ });
2747
+ this.resolve = aCallable$1(resolve);
2748
+ this.reject = aCallable$1(reject);
2749
+ };
2750
+
2751
+ // `NewPromiseCapability` abstract operation
2752
+ // https://tc39.es/ecma262/#sec-newpromisecapability
2753
+ newPromiseCapability$2.f = function (C) {
2754
+ return new PromiseCapability(C);
2755
+ };
2756
+
2757
+ var anObject = anObject$a;
2758
+ var isObject$1 = isObject$7;
2759
+ var newPromiseCapability$1 = newPromiseCapability$2;
2760
+
2761
+ var promiseResolve$1 = function (C, x) {
2762
+ anObject(C);
2763
+ if (isObject$1(x) && x.constructor === C) return x;
2764
+ var promiseCapability = newPromiseCapability$1.f(C);
2765
+ var resolve = promiseCapability.resolve;
2766
+ resolve(x);
2767
+ return promiseCapability.promise;
2768
+ };
2769
+
2770
+ var global$2 = global$E;
2771
+
2772
+ var hostReportErrors$1 = function (a, b) {
2773
+ var console = global$2.console;
2774
+ if (console && console.error) {
2775
+ arguments.length == 1 ? console.error(a) : console.error(a, b);
2776
+ }
2777
+ };
2778
+
2779
+ var perform$1 = function (exec) {
2780
+ try {
2781
+ return { error: false, value: exec() };
2782
+ } catch (error) {
2783
+ return { error: true, value: error };
2784
+ }
2785
+ };
2786
+
2787
+ var Queue$1 = function () {
2788
+ this.head = null;
2789
+ this.tail = null;
2790
+ };
2791
+
2792
+ Queue$1.prototype = {
2793
+ add: function (item) {
2794
+ var entry = { item: item, next: null };
2795
+ if (this.head) this.tail.next = entry;
2796
+ else this.head = entry;
2797
+ this.tail = entry;
2798
+ },
2799
+ get: function () {
2800
+ var entry = this.head;
2801
+ if (entry) {
2802
+ this.head = entry.next;
2803
+ if (this.tail === entry) this.tail = null;
2804
+ return entry.item;
2805
+ }
2806
+ }
2807
+ };
2808
+
2809
+ var queue = Queue$1;
2810
+
2811
+ var engineIsBrowser = typeof window == 'object';
2812
+
2813
+ var $ = _export;
2814
+ var global$1 = global$E;
2815
+ var getBuiltIn = getBuiltIn$7;
2816
+ var call = functionCall;
2817
+ var NativePromise = nativePromiseConstructor;
2818
+ var redefine = redefine$5.exports;
2819
+ var redefineAll = redefineAll$1;
2820
+ var setPrototypeOf = objectSetPrototypeOf;
2821
+ var setToStringTag = setToStringTag$3;
2822
+ var setSpecies = setSpecies$1;
2823
+ var aCallable = aCallable$5;
2824
+ var isCallable = isCallable$i;
2825
+ var isObject = isObject$7;
2826
+ var anInstance = anInstance$1;
2827
+ var inspectSource = inspectSource$4;
2828
+ var iterate = iterate$1;
2829
+ var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
2830
+ var speciesConstructor = speciesConstructor$1;
2831
+ var task = task$1.set;
2832
+ var microtask = microtask$1;
2833
+ var promiseResolve = promiseResolve$1;
2834
+ var hostReportErrors = hostReportErrors$1;
2835
+ var newPromiseCapabilityModule = newPromiseCapability$2;
2836
+ var perform = perform$1;
2837
+ var Queue = queue;
2838
+ var InternalStateModule = internalState;
2839
+ var isForced = isForced_1;
2840
+ var wellKnownSymbol = wellKnownSymbol$e;
2841
+ var IS_BROWSER = engineIsBrowser;
2842
+ var IS_NODE = engineIsNode;
2843
+ var V8_VERSION = engineV8Version;
2844
+
2845
+ var SPECIES = wellKnownSymbol('species');
2846
+ var PROMISE = 'Promise';
2847
+
2848
+ var getInternalState = InternalStateModule.getterFor(PROMISE);
2849
+ var setInternalState = InternalStateModule.set;
2850
+ var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
2851
+ var NativePromisePrototype = NativePromise && NativePromise.prototype;
2852
+ var PromiseConstructor = NativePromise;
2853
+ var PromisePrototype = NativePromisePrototype;
2854
+ var TypeError$1 = global$1.TypeError;
2855
+ var document$1 = global$1.document;
2856
+ var process = global$1.process;
2857
+ var newPromiseCapability = newPromiseCapabilityModule.f;
2858
+ var newGenericPromiseCapability = newPromiseCapability;
2859
+
2860
+ var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$1.dispatchEvent);
2861
+ var NATIVE_REJECTION_EVENT = isCallable(global$1.PromiseRejectionEvent);
2862
+ var UNHANDLED_REJECTION = 'unhandledrejection';
2863
+ var REJECTION_HANDLED = 'rejectionhandled';
2864
+ var PENDING = 0;
2865
+ var FULFILLED = 1;
2866
+ var REJECTED = 2;
2867
+ var HANDLED = 1;
2868
+ var UNHANDLED = 2;
2869
+ var SUBCLASSING = false;
2870
+
2871
+ var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
2872
+
2873
+ var FORCED = isForced(PROMISE, function () {
2874
+ var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor);
2875
+ var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor);
2876
+ // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
2877
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
2878
+ // We can't detect it synchronously, so just check versions
2879
+ if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
2880
+ // We can't use @@species feature detection in V8 since it causes
2881
+ // deoptimization and performance degradation
2882
+ // https://github.com/zloirock/core-js/issues/679
2883
+ if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;
2884
+ // Detect correctness of subclassing with @@species support
2885
+ var promise = new PromiseConstructor(function (resolve) { resolve(1); });
2886
+ var FakePromise = function (exec) {
2887
+ exec(function () { /* empty */ }, function () { /* empty */ });
2888
+ };
2889
+ var constructor = promise.constructor = {};
2890
+ constructor[SPECIES] = FakePromise;
2891
+ SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
2892
+ if (!SUBCLASSING) return true;
2893
+ // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
2894
+ return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;
2895
+ });
2896
+
2897
+ var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {
2898
+ PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
2899
+ });
2900
+
2901
+ // helpers
2902
+ var isThenable = function (it) {
2903
+ var then;
2904
+ return isObject(it) && isCallable(then = it.then) ? then : false;
2905
+ };
2906
+
2907
+ var callReaction = function (reaction, state) {
2908
+ var value = state.value;
2909
+ var ok = state.state == FULFILLED;
2910
+ var handler = ok ? reaction.ok : reaction.fail;
2911
+ var resolve = reaction.resolve;
2912
+ var reject = reaction.reject;
2913
+ var domain = reaction.domain;
2914
+ var result, then, exited;
2915
+ try {
2916
+ if (handler) {
2917
+ if (!ok) {
2918
+ if (state.rejection === UNHANDLED) onHandleUnhandled(state);
2919
+ state.rejection = HANDLED;
2920
+ }
2921
+ if (handler === true) result = value;
2922
+ else {
2923
+ if (domain) domain.enter();
2924
+ result = handler(value); // can throw
2925
+ if (domain) {
2926
+ domain.exit();
2927
+ exited = true;
2928
+ }
2929
+ }
2930
+ if (result === reaction.promise) {
2931
+ reject(TypeError$1('Promise-chain cycle'));
2932
+ } else if (then = isThenable(result)) {
2933
+ call(then, result, resolve, reject);
2934
+ } else resolve(result);
2935
+ } else reject(value);
2936
+ } catch (error) {
2937
+ if (domain && !exited) domain.exit();
2938
+ reject(error);
2939
+ }
2940
+ };
2941
+
2942
+ var notify = function (state, isReject) {
2943
+ if (state.notified) return;
2944
+ state.notified = true;
2945
+ microtask(function () {
2946
+ var reactions = state.reactions;
2947
+ var reaction;
2948
+ while (reaction = reactions.get()) {
2949
+ callReaction(reaction, state);
2950
+ }
2951
+ state.notified = false;
2952
+ if (isReject && !state.rejection) onUnhandled(state);
2953
+ });
2954
+ };
2955
+
2956
+ var dispatchEvent = function (name, promise, reason) {
2957
+ var event, handler;
2958
+ if (DISPATCH_EVENT) {
2959
+ event = document$1.createEvent('Event');
2960
+ event.promise = promise;
2961
+ event.reason = reason;
2962
+ event.initEvent(name, false, true);
2963
+ global$1.dispatchEvent(event);
2964
+ } else event = { promise: promise, reason: reason };
2965
+ if (!NATIVE_REJECTION_EVENT && (handler = global$1['on' + name])) handler(event);
2966
+ else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
2967
+ };
2968
+
2969
+ var onUnhandled = function (state) {
2970
+ call(task, global$1, function () {
2971
+ var promise = state.facade;
2972
+ var value = state.value;
2973
+ var IS_UNHANDLED = isUnhandled(state);
2974
+ var result;
2975
+ if (IS_UNHANDLED) {
2976
+ result = perform(function () {
2977
+ if (IS_NODE) {
2978
+ process.emit('unhandledRejection', value, promise);
2979
+ } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
2980
+ });
2981
+ // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
2982
+ state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
2983
+ if (result.error) throw result.value;
2984
+ }
2985
+ });
2986
+ };
2987
+
2988
+ var isUnhandled = function (state) {
2989
+ return state.rejection !== HANDLED && !state.parent;
2990
+ };
2991
+
2992
+ var onHandleUnhandled = function (state) {
2993
+ call(task, global$1, function () {
2994
+ var promise = state.facade;
2995
+ if (IS_NODE) {
2996
+ process.emit('rejectionHandled', promise);
2997
+ } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
2998
+ });
2999
+ };
3000
+
3001
+ var bind = function (fn, state, unwrap) {
3002
+ return function (value) {
3003
+ fn(state, value, unwrap);
3004
+ };
3005
+ };
3006
+
3007
+ var internalReject = function (state, value, unwrap) {
3008
+ if (state.done) return;
3009
+ state.done = true;
3010
+ if (unwrap) state = unwrap;
3011
+ state.value = value;
3012
+ state.state = REJECTED;
3013
+ notify(state, true);
3014
+ };
3015
+
3016
+ var internalResolve = function (state, value, unwrap) {
3017
+ if (state.done) return;
3018
+ state.done = true;
3019
+ if (unwrap) state = unwrap;
3020
+ try {
3021
+ if (state.facade === value) throw TypeError$1("Promise can't be resolved itself");
3022
+ var then = isThenable(value);
3023
+ if (then) {
3024
+ microtask(function () {
3025
+ var wrapper = { done: false };
3026
+ try {
3027
+ call(then, value,
3028
+ bind(internalResolve, wrapper, state),
3029
+ bind(internalReject, wrapper, state)
3030
+ );
3031
+ } catch (error) {
3032
+ internalReject(wrapper, error, state);
3033
+ }
3034
+ });
3035
+ } else {
3036
+ state.value = value;
3037
+ state.state = FULFILLED;
3038
+ notify(state, false);
3039
+ }
3040
+ } catch (error) {
3041
+ internalReject({ done: false }, error, state);
3042
+ }
3043
+ };
3044
+
3045
+ // constructor polyfill
3046
+ if (FORCED) {
3047
+ // 25.4.3.1 Promise(executor)
3048
+ PromiseConstructor = function Promise(executor) {
3049
+ anInstance(this, PromisePrototype);
3050
+ aCallable(executor);
3051
+ call(Internal, this);
3052
+ var state = getInternalState(this);
3053
+ try {
3054
+ executor(bind(internalResolve, state), bind(internalReject, state));
3055
+ } catch (error) {
3056
+ internalReject(state, error);
3057
+ }
3058
+ };
3059
+ PromisePrototype = PromiseConstructor.prototype;
3060
+ // eslint-disable-next-line no-unused-vars -- required for `.length`
3061
+ Internal = function Promise(executor) {
3062
+ setInternalState(this, {
3063
+ type: PROMISE,
3064
+ done: false,
3065
+ notified: false,
3066
+ parent: false,
3067
+ reactions: new Queue(),
3068
+ rejection: false,
3069
+ state: PENDING,
3070
+ value: undefined
3071
+ });
3072
+ };
3073
+ Internal.prototype = redefineAll(PromisePrototype, {
3074
+ // `Promise.prototype.then` method
3075
+ // https://tc39.es/ecma262/#sec-promise.prototype.then
3076
+ // eslint-disable-next-line unicorn/no-thenable -- safe
3077
+ then: function then(onFulfilled, onRejected) {
3078
+ var state = getInternalPromiseState(this);
3079
+ var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
3080
+ state.parent = true;
3081
+ reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;
3082
+ reaction.fail = isCallable(onRejected) && onRejected;
3083
+ reaction.domain = IS_NODE ? process.domain : undefined;
3084
+ if (state.state == PENDING) state.reactions.add(reaction);
3085
+ else microtask(function () {
3086
+ callReaction(reaction, state);
3087
+ });
3088
+ return reaction.promise;
3089
+ },
3090
+ // `Promise.prototype.catch` method
3091
+ // https://tc39.es/ecma262/#sec-promise.prototype.catch
3092
+ 'catch': function (onRejected) {
3093
+ return this.then(undefined, onRejected);
3094
+ }
3095
+ });
3096
+ OwnPromiseCapability = function () {
3097
+ var promise = new Internal();
3098
+ var state = getInternalState(promise);
3099
+ this.promise = promise;
3100
+ this.resolve = bind(internalResolve, state);
3101
+ this.reject = bind(internalReject, state);
3102
+ };
3103
+ newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
3104
+ return C === PromiseConstructor || C === PromiseWrapper
3105
+ ? new OwnPromiseCapability(C)
3106
+ : newGenericPromiseCapability(C);
3107
+ };
3108
+
3109
+ if (isCallable(NativePromise) && NativePromisePrototype !== Object.prototype) {
3110
+ nativeThen = NativePromisePrototype.then;
3111
+
3112
+ if (!SUBCLASSING) {
3113
+ // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
3114
+ redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
3115
+ var that = this;
3116
+ return new PromiseConstructor(function (resolve, reject) {
3117
+ call(nativeThen, that, resolve, reject);
3118
+ }).then(onFulfilled, onRejected);
3119
+ // https://github.com/zloirock/core-js/issues/640
3120
+ }, { unsafe: true });
3121
+
3122
+ // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
3123
+ redefine(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true });
3124
+ }
3125
+
3126
+ // make `.constructor === Promise` work for native promise-based APIs
3127
+ try {
3128
+ delete NativePromisePrototype.constructor;
3129
+ } catch (error) { /* empty */ }
3130
+
3131
+ // make `instanceof Promise` work for native promise-based APIs
3132
+ if (setPrototypeOf) {
3133
+ setPrototypeOf(NativePromisePrototype, PromisePrototype);
3134
+ }
3135
+ }
3136
+ }
3137
+
3138
+ $({ global: true, wrap: true, forced: FORCED }, {
3139
+ Promise: PromiseConstructor
3140
+ });
3141
+
3142
+ setToStringTag(PromiseConstructor, PROMISE, false);
3143
+ setSpecies(PROMISE);
3144
+
3145
+ PromiseWrapper = getBuiltIn(PROMISE);
3146
+
3147
+ // statics
3148
+ $({ target: PROMISE, stat: true, forced: FORCED }, {
3149
+ // `Promise.reject` method
3150
+ // https://tc39.es/ecma262/#sec-promise.reject
3151
+ reject: function reject(r) {
3152
+ var capability = newPromiseCapability(this);
3153
+ call(capability.reject, undefined, r);
3154
+ return capability.promise;
3155
+ }
3156
+ });
3157
+
3158
+ $({ target: PROMISE, stat: true, forced: FORCED }, {
3159
+ // `Promise.resolve` method
3160
+ // https://tc39.es/ecma262/#sec-promise.resolve
3161
+ resolve: function resolve(x) {
3162
+ return promiseResolve(this, x);
3163
+ }
3164
+ });
3165
+
3166
+ $({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
3167
+ // `Promise.all` method
3168
+ // https://tc39.es/ecma262/#sec-promise.all
3169
+ all: function all(iterable) {
3170
+ var C = this;
3171
+ var capability = newPromiseCapability(C);
3172
+ var resolve = capability.resolve;
3173
+ var reject = capability.reject;
3174
+ var result = perform(function () {
3175
+ var $promiseResolve = aCallable(C.resolve);
3176
+ var values = [];
3177
+ var counter = 0;
3178
+ var remaining = 1;
3179
+ iterate(iterable, function (promise) {
3180
+ var index = counter++;
3181
+ var alreadyCalled = false;
3182
+ remaining++;
3183
+ call($promiseResolve, C, promise).then(function (value) {
3184
+ if (alreadyCalled) return;
3185
+ alreadyCalled = true;
3186
+ values[index] = value;
3187
+ --remaining || resolve(values);
3188
+ }, reject);
3189
+ });
3190
+ --remaining || resolve(values);
3191
+ });
3192
+ if (result.error) reject(result.value);
3193
+ return capability.promise;
3194
+ },
3195
+ // `Promise.race` method
3196
+ // https://tc39.es/ecma262/#sec-promise.race
3197
+ race: function race(iterable) {
3198
+ var C = this;
3199
+ var capability = newPromiseCapability(C);
3200
+ var reject = capability.reject;
3201
+ var result = perform(function () {
3202
+ var $promiseResolve = aCallable(C.resolve);
3203
+ iterate(iterable, function (promise) {
3204
+ call($promiseResolve, C, promise).then(capability.resolve, reject);
3205
+ });
3206
+ });
3207
+ if (result.error) reject(result.value);
3208
+ return capability.promise;
3209
+ }
3210
+ });
3211
+
3212
+ const RadioGroup = ({
3213
+ description,
3214
+ title,
3215
+ validator,
3216
+ children
3217
+ }) => {
3218
+ const validatorClassName = validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator);
3219
+ return jsxs("div", Object.assign({
3220
+ className: "form-group"
3221
+ }, {
3222
+ children: [jsxs("fieldset", Object.assign({
3223
+ className: validatorClassName
3224
+ }, {
3225
+ children: [jsx("legend", {
3226
+ children: title
3227
+ }, void 0), jsx("span", Object.assign({
3228
+ className: "form-info"
3229
+ }, {
3230
+ children: description
3231
+ }), void 0), React.Children.toArray(children).map(child => {
3232
+ return /*#__PURE__*/React.isValidElement(child) ? /*#__PURE__*/React.cloneElement(child, {
3233
+ validator: validatorClassName
3234
+ }) : child;
3235
+ })]
3236
+ }), void 0), (validator === null || validator === void 0 ? void 0 : validator.message) && jsx("span", Object.assign({
3237
+ className: "form-info"
3238
+ }, {
3239
+ children: validator === null || validator === void 0 ? void 0 : validator.message
3240
+ }), void 0)]
3241
+ }), void 0);
3242
+ };
3243
+
3244
+ const ListItem = _a => {
3245
+ var {
3246
+ listType,
3247
+ tableRowData,
3248
+ children
3249
+ } = _a,
3250
+ props = __rest(_a, ["listType", "tableRowData", "children"]);
3251
+
3252
+ if (listType === 'table') {
3253
+ return jsx("dl", {
3254
+ children: jsxs("div", {
3255
+ children: [jsx("dt", {
3256
+ children: tableRowData === null || tableRowData === void 0 ? void 0 : tableRowData.title
3257
+ }, void 0), tableRowData === null || tableRowData === void 0 ? void 0 : tableRowData.definition.map((item, index) => jsx("dd", {
3258
+ children: item
3259
+ }, index))]
3260
+ }, void 0)
3261
+ }, void 0);
3262
+ } else {
3263
+ return jsx("li", Object.assign({}, props, {
3264
+ children: children
3265
+ }), void 0);
3266
+ }
3267
+ };
3268
+
3269
+ const List = _a => {
3270
+ var {
3271
+ listType,
3272
+ tableCaption,
3273
+ tableData,
3274
+ children
3275
+ } = _a,
3276
+ props = __rest(_a, ["listType", "tableCaption", "tableData", "children"]);
3277
+
3278
+ if (listType === 'ordered') {
3279
+ return jsx("ol", Object.assign({}, props, {
3280
+ children: children === null || children === void 0 ? void 0 : children.map((child, index) => jsx(ListItem, {
3281
+ children: child
3282
+ }, index))
3283
+ }), void 0);
3284
+ } else if (listType !== 'table') {
3285
+ return jsx("ul", Object.assign({}, props, {
3286
+ className: listType
3287
+ }, {
3288
+ children: children === null || children === void 0 ? void 0 : children.map((child, index) => jsx(ListItem, {
3289
+ children: child
3290
+ }, index))
3291
+ }), void 0);
3292
+ } else {
3293
+ return jsxs("figure", {
3294
+ children: [jsx("figcaption", Object.assign({
3295
+ className: "table-list-caption"
3296
+ }, {
3297
+ children: tableCaption
3298
+ }), void 0), jsx("dl", {
3299
+ children: tableData === null || tableData === void 0 ? void 0 : tableData.map((data, index) => jsx(ListItem, {
3300
+ listType: listType,
3301
+ tableRowData: data
3302
+ }, index))
3303
+ }, void 0)]
3304
+ }, void 0);
3305
+ }
3306
+ };
3307
+
3308
+ const Link = _a => {
3309
+ var {
3310
+ button,
3311
+ children
3312
+ } = _a,
3313
+ props = __rest(_a, ["button", "children"]);
3314
+
3315
+ const [anchorProps, setAnchorProps] = useState({});
3316
+ useEffect(() => {
3317
+ const className = button ? typeof button === 'string' ? `button ${button}` : 'button' : undefined;
3318
+ const newProps = Object.assign({
3319
+ role: button ? 'button' : undefined,
3320
+ className: className
3321
+ }, props);
3322
+ setAnchorProps(newProps);
3323
+ }, [button]);
3324
+ return jsx("a", Object.assign({}, anchorProps, {
3325
+ children: children
3326
+ }), void 0);
3327
+ };
3328
+
3329
+ const Navbar = ({
3330
+ children,
3331
+ variant,
3332
+ title,
3333
+ titleLink,
3334
+ brandLink: _brandLink = 'https://www.seb.se',
3335
+ brandAriaLabel: _brandAriaLabel = 'Open seb.se in new tab'
3336
+ }) => {
3337
+ const [props, setProps] = useState({});
3338
+ useEffect(() => {
3339
+ const classNames = [];
3340
+ if (variant) classNames.push(variant);
3341
+ setProps(Object.assign(Object.assign({}, props), {
3342
+ className: classNames.join(' ')
3343
+ })); // eslint-disable-next-line react-hooks/exhaustive-deps
3344
+ }, [variant]);
3345
+ return jsxs("nav", Object.assign({
3346
+ role: "navigation"
3347
+ }, props, {
3348
+ children: [jsx(Link, {
3349
+ "aria-label": _brandAriaLabel,
3350
+ href: _brandLink,
3351
+ target: "_blank",
3352
+ className: "brand"
3353
+ }, void 0), jsx("div", Object.assign({
3354
+ className: "container-fluid"
3355
+ }, {
3356
+ children: jsxs("div", Object.assign({
3357
+ className: "row justify-content-between align-items-center"
3358
+ }, {
3359
+ children: [jsx("div", Object.assign({
3360
+ className: "col-auto"
3361
+ }, {
3362
+ children: titleLink ? jsx(Link, Object.assign({
3363
+ className: "mx-4",
3364
+ href: titleLink
3365
+ }, {
3366
+ children: jsx("h1", {
3367
+ children: title
3368
+ }, void 0)
3369
+ }), void 0) : jsx("h1", {
3370
+ children: title
3371
+ }, void 0)
3372
+ }), void 0), jsx("div", Object.assign({
3373
+ className: "col-auto"
3374
+ }, {
3375
+ children: jsx("div", Object.assign({
3376
+ className: "group size-sm"
3377
+ }, {
3378
+ children: children
3379
+ }), void 0)
3380
+ }), void 0)]
3381
+ }), void 0)
3382
+ }), void 0)]
3383
+ }), void 0);
3384
+ };
3385
+
3386
+ export { Alert, Button, ButtonGroup, Card, Checkbox, EmailInput, Flexbox, Form, Group, Link, List, Modal, Navbar, NumberInput, RadioButton, RadioGroup, Text, TextInput };