@thecb/components 6.0.0-beta.2 → 6.0.0-beta.22

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/dist/index.cjs.js CHANGED
@@ -6380,7 +6380,7 @@ var Box = function Box(_ref) {
6380
6380
  onFocus: onFocus,
6381
6381
  onBlur: onBlur,
6382
6382
  onTouchEnd: onTouchEnd
6383
- }, rest), safeChildren(children, /*#__PURE__*/React__default.createElement(React.Fragment, null)));
6383
+ }, rest), children && safeChildren(children, /*#__PURE__*/React__default.createElement(React.Fragment, null)));
6384
6384
  };
6385
6385
 
6386
6386
  var CenterWrapper = styled__default.div.withConfig({
@@ -19398,6 +19398,1254 @@ var DropdownIcon = function DropdownIcon() {
19398
19398
  })))));
19399
19399
  };
19400
19400
 
19401
+ var check = function (it) {
19402
+ return it && it.Math == Math && it;
19403
+ };
19404
+
19405
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
19406
+ var global_1 =
19407
+ // eslint-disable-next-line es-x/no-global-this -- safe
19408
+ check(typeof globalThis == 'object' && globalThis) ||
19409
+ check(typeof window == 'object' && window) ||
19410
+ // eslint-disable-next-line no-restricted-globals -- safe
19411
+ check(typeof self == 'object' && self) ||
19412
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
19413
+ // eslint-disable-next-line no-new-func -- fallback
19414
+ (function () { return this; })() || Function('return this')();
19415
+
19416
+ var fails = function (exec) {
19417
+ try {
19418
+ return !!exec();
19419
+ } catch (error) {
19420
+ return true;
19421
+ }
19422
+ };
19423
+
19424
+ // Detect IE8's incomplete defineProperty implementation
19425
+ var descriptors = !fails(function () {
19426
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
19427
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
19428
+ });
19429
+
19430
+ var functionBindNative = !fails(function () {
19431
+ // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
19432
+ var test = (function () { /* empty */ }).bind();
19433
+ // eslint-disable-next-line no-prototype-builtins -- safe
19434
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
19435
+ });
19436
+
19437
+ var call = Function.prototype.call;
19438
+
19439
+ var functionCall = functionBindNative ? call.bind(call) : function () {
19440
+ return call.apply(call, arguments);
19441
+ };
19442
+
19443
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
19444
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
19445
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
19446
+
19447
+ // Nashorn ~ JDK8 bug
19448
+ var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
19449
+
19450
+ // `Object.prototype.propertyIsEnumerable` method implementation
19451
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
19452
+ var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
19453
+ var descriptor = getOwnPropertyDescriptor(this, V);
19454
+ return !!descriptor && descriptor.enumerable;
19455
+ } : $propertyIsEnumerable;
19456
+
19457
+ var objectPropertyIsEnumerable = {
19458
+ f: f
19459
+ };
19460
+
19461
+ var createPropertyDescriptor = function (bitmap, value) {
19462
+ return {
19463
+ enumerable: !(bitmap & 1),
19464
+ configurable: !(bitmap & 2),
19465
+ writable: !(bitmap & 4),
19466
+ value: value
19467
+ };
19468
+ };
19469
+
19470
+ var FunctionPrototype = Function.prototype;
19471
+ var bind$1 = FunctionPrototype.bind;
19472
+ var call$1 = FunctionPrototype.call;
19473
+ var uncurryThis = functionBindNative && bind$1.bind(call$1, call$1);
19474
+
19475
+ var functionUncurryThis = functionBindNative ? function (fn) {
19476
+ return fn && uncurryThis(fn);
19477
+ } : function (fn) {
19478
+ return fn && function () {
19479
+ return call$1.apply(fn, arguments);
19480
+ };
19481
+ };
19482
+
19483
+ var toString$2 = functionUncurryThis({}.toString);
19484
+ var stringSlice = functionUncurryThis(''.slice);
19485
+
19486
+ var classofRaw = function (it) {
19487
+ return stringSlice(toString$2(it), 8, -1);
19488
+ };
19489
+
19490
+ var Object$1 = global_1.Object;
19491
+ var split = functionUncurryThis(''.split);
19492
+
19493
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
19494
+ var indexedObject = fails(function () {
19495
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
19496
+ // eslint-disable-next-line no-prototype-builtins -- safe
19497
+ return !Object$1('z').propertyIsEnumerable(0);
19498
+ }) ? function (it) {
19499
+ return classofRaw(it) == 'String' ? split(it, '') : Object$1(it);
19500
+ } : Object$1;
19501
+
19502
+ var TypeError$1 = global_1.TypeError;
19503
+
19504
+ // `RequireObjectCoercible` abstract operation
19505
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
19506
+ var requireObjectCoercible = function (it) {
19507
+ if (it == undefined) throw TypeError$1("Can't call method on " + it);
19508
+ return it;
19509
+ };
19510
+
19511
+ // toObject with fallback for non-array-like ES3 strings
19512
+
19513
+
19514
+
19515
+ var toIndexedObject = function (it) {
19516
+ return indexedObject(requireObjectCoercible(it));
19517
+ };
19518
+
19519
+ // `IsCallable` abstract operation
19520
+ // https://tc39.es/ecma262/#sec-iscallable
19521
+ var isCallable = function (argument) {
19522
+ return typeof argument == 'function';
19523
+ };
19524
+
19525
+ var isObject = function (it) {
19526
+ return typeof it == 'object' ? it !== null : isCallable(it);
19527
+ };
19528
+
19529
+ var aFunction = function (argument) {
19530
+ return isCallable(argument) ? argument : undefined;
19531
+ };
19532
+
19533
+ var getBuiltIn = function (namespace, method) {
19534
+ return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
19535
+ };
19536
+
19537
+ var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
19538
+
19539
+ var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
19540
+
19541
+ var process$1 = global_1.process;
19542
+ var Deno = global_1.Deno;
19543
+ var versions = process$1 && process$1.versions || Deno && Deno.version;
19544
+ var v8 = versions && versions.v8;
19545
+ var match, version;
19546
+
19547
+ if (v8) {
19548
+ match = v8.split('.');
19549
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
19550
+ // but their correct versions are not interesting for us
19551
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
19552
+ }
19553
+
19554
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
19555
+ // so check `userAgent` even if `.v8` exists, but 0
19556
+ if (!version && engineUserAgent) {
19557
+ match = engineUserAgent.match(/Edge\/(\d+)/);
19558
+ if (!match || match[1] >= 74) {
19559
+ match = engineUserAgent.match(/Chrome\/(\d+)/);
19560
+ if (match) version = +match[1];
19561
+ }
19562
+ }
19563
+
19564
+ var engineV8Version = version;
19565
+
19566
+ /* eslint-disable es-x/no-symbol -- required for testing */
19567
+
19568
+
19569
+
19570
+ // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
19571
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
19572
+ var symbol = Symbol();
19573
+ // Chrome 38 Symbol has incorrect toString conversion
19574
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
19575
+ return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
19576
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
19577
+ !Symbol.sham && engineV8Version && engineV8Version < 41;
19578
+ });
19579
+
19580
+ /* eslint-disable es-x/no-symbol -- required for testing */
19581
+
19582
+
19583
+ var useSymbolAsUid = nativeSymbol
19584
+ && !Symbol.sham
19585
+ && typeof Symbol.iterator == 'symbol';
19586
+
19587
+ var Object$2 = global_1.Object;
19588
+
19589
+ var isSymbol = useSymbolAsUid ? function (it) {
19590
+ return typeof it == 'symbol';
19591
+ } : function (it) {
19592
+ var $Symbol = getBuiltIn('Symbol');
19593
+ return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$2(it));
19594
+ };
19595
+
19596
+ var String$1 = global_1.String;
19597
+
19598
+ var tryToString = function (argument) {
19599
+ try {
19600
+ return String$1(argument);
19601
+ } catch (error) {
19602
+ return 'Object';
19603
+ }
19604
+ };
19605
+
19606
+ var TypeError$2 = global_1.TypeError;
19607
+
19608
+ // `Assert: IsCallable(argument) is true`
19609
+ var aCallable = function (argument) {
19610
+ if (isCallable(argument)) return argument;
19611
+ throw TypeError$2(tryToString(argument) + ' is not a function');
19612
+ };
19613
+
19614
+ // `GetMethod` abstract operation
19615
+ // https://tc39.es/ecma262/#sec-getmethod
19616
+ var getMethod = function (V, P) {
19617
+ var func = V[P];
19618
+ return func == null ? undefined : aCallable(func);
19619
+ };
19620
+
19621
+ var TypeError$3 = global_1.TypeError;
19622
+
19623
+ // `OrdinaryToPrimitive` abstract operation
19624
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
19625
+ var ordinaryToPrimitive = function (input, pref) {
19626
+ var fn, val;
19627
+ if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
19628
+ if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
19629
+ if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
19630
+ throw TypeError$3("Can't convert object to primitive value");
19631
+ };
19632
+
19633
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
19634
+ var defineProperty = Object.defineProperty;
19635
+
19636
+ var setGlobal = function (key, value) {
19637
+ try {
19638
+ defineProperty(global_1, key, { value: value, configurable: true, writable: true });
19639
+ } catch (error) {
19640
+ global_1[key] = value;
19641
+ } return value;
19642
+ };
19643
+
19644
+ var SHARED = '__core-js_shared__';
19645
+ var store = global_1[SHARED] || setGlobal(SHARED, {});
19646
+
19647
+ var sharedStore = store;
19648
+
19649
+ var shared = createCommonjsModule(function (module) {
19650
+ (module.exports = function (key, value) {
19651
+ return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
19652
+ })('versions', []).push({
19653
+ version: '3.22.5',
19654
+ mode: 'global',
19655
+ copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
19656
+ license: 'https://github.com/zloirock/core-js/blob/v3.22.5/LICENSE',
19657
+ source: 'https://github.com/zloirock/core-js'
19658
+ });
19659
+ });
19660
+
19661
+ var Object$3 = global_1.Object;
19662
+
19663
+ // `ToObject` abstract operation
19664
+ // https://tc39.es/ecma262/#sec-toobject
19665
+ var toObject = function (argument) {
19666
+ return Object$3(requireObjectCoercible(argument));
19667
+ };
19668
+
19669
+ var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
19670
+
19671
+ // `HasOwnProperty` abstract operation
19672
+ // https://tc39.es/ecma262/#sec-hasownproperty
19673
+ // eslint-disable-next-line es-x/no-object-hasown -- safe
19674
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
19675
+ return hasOwnProperty(toObject(it), key);
19676
+ };
19677
+
19678
+ var id = 0;
19679
+ var postfix = Math.random();
19680
+ var toString$3 = functionUncurryThis(1.0.toString);
19681
+
19682
+ var uid = function (key) {
19683
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
19684
+ };
19685
+
19686
+ var WellKnownSymbolsStore = shared('wks');
19687
+ var Symbol$1 = global_1.Symbol;
19688
+ var symbolFor = Symbol$1 && Symbol$1['for'];
19689
+ var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
19690
+
19691
+ var wellKnownSymbol = function (name) {
19692
+ if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
19693
+ var description = 'Symbol.' + name;
19694
+ if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
19695
+ WellKnownSymbolsStore[name] = Symbol$1[name];
19696
+ } else if (useSymbolAsUid && symbolFor) {
19697
+ WellKnownSymbolsStore[name] = symbolFor(description);
19698
+ } else {
19699
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
19700
+ }
19701
+ } return WellKnownSymbolsStore[name];
19702
+ };
19703
+
19704
+ var TypeError$4 = global_1.TypeError;
19705
+ var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
19706
+
19707
+ // `ToPrimitive` abstract operation
19708
+ // https://tc39.es/ecma262/#sec-toprimitive
19709
+ var toPrimitive = function (input, pref) {
19710
+ if (!isObject(input) || isSymbol(input)) return input;
19711
+ var exoticToPrim = getMethod(input, TO_PRIMITIVE);
19712
+ var result;
19713
+ if (exoticToPrim) {
19714
+ if (pref === undefined) pref = 'default';
19715
+ result = functionCall(exoticToPrim, input, pref);
19716
+ if (!isObject(result) || isSymbol(result)) return result;
19717
+ throw TypeError$4("Can't convert object to primitive value");
19718
+ }
19719
+ if (pref === undefined) pref = 'number';
19720
+ return ordinaryToPrimitive(input, pref);
19721
+ };
19722
+
19723
+ // `ToPropertyKey` abstract operation
19724
+ // https://tc39.es/ecma262/#sec-topropertykey
19725
+ var toPropertyKey = function (argument) {
19726
+ var key = toPrimitive(argument, 'string');
19727
+ return isSymbol(key) ? key : key + '';
19728
+ };
19729
+
19730
+ var document$1 = global_1.document;
19731
+ // typeof document.createElement is 'object' in old IE
19732
+ var EXISTS = isObject(document$1) && isObject(document$1.createElement);
19733
+
19734
+ var documentCreateElement = function (it) {
19735
+ return EXISTS ? document$1.createElement(it) : {};
19736
+ };
19737
+
19738
+ // Thanks to IE8 for its funny defineProperty
19739
+ var ie8DomDefine = !descriptors && !fails(function () {
19740
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
19741
+ return Object.defineProperty(documentCreateElement('div'), 'a', {
19742
+ get: function () { return 7; }
19743
+ }).a != 7;
19744
+ });
19745
+
19746
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
19747
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
19748
+
19749
+ // `Object.getOwnPropertyDescriptor` method
19750
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
19751
+ var f$1 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
19752
+ O = toIndexedObject(O);
19753
+ P = toPropertyKey(P);
19754
+ if (ie8DomDefine) try {
19755
+ return $getOwnPropertyDescriptor(O, P);
19756
+ } catch (error) { /* empty */ }
19757
+ if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
19758
+ };
19759
+
19760
+ var objectGetOwnPropertyDescriptor = {
19761
+ f: f$1
19762
+ };
19763
+
19764
+ // V8 ~ Chrome 36-
19765
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
19766
+ var v8PrototypeDefineBug = descriptors && fails(function () {
19767
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
19768
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
19769
+ value: 42,
19770
+ writable: false
19771
+ }).prototype != 42;
19772
+ });
19773
+
19774
+ var String$2 = global_1.String;
19775
+ var TypeError$5 = global_1.TypeError;
19776
+
19777
+ // `Assert: Type(argument) is Object`
19778
+ var anObject = function (argument) {
19779
+ if (isObject(argument)) return argument;
19780
+ throw TypeError$5(String$2(argument) + ' is not an object');
19781
+ };
19782
+
19783
+ var TypeError$6 = global_1.TypeError;
19784
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
19785
+ var $defineProperty = Object.defineProperty;
19786
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
19787
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
19788
+ var ENUMERABLE = 'enumerable';
19789
+ var CONFIGURABLE = 'configurable';
19790
+ var WRITABLE = 'writable';
19791
+
19792
+ // `Object.defineProperty` method
19793
+ // https://tc39.es/ecma262/#sec-object.defineproperty
19794
+ var f$2 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
19795
+ anObject(O);
19796
+ P = toPropertyKey(P);
19797
+ anObject(Attributes);
19798
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
19799
+ var current = $getOwnPropertyDescriptor$1(O, P);
19800
+ if (current && current[WRITABLE]) {
19801
+ O[P] = Attributes.value;
19802
+ Attributes = {
19803
+ configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
19804
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
19805
+ writable: false
19806
+ };
19807
+ }
19808
+ } return $defineProperty(O, P, Attributes);
19809
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
19810
+ anObject(O);
19811
+ P = toPropertyKey(P);
19812
+ anObject(Attributes);
19813
+ if (ie8DomDefine) try {
19814
+ return $defineProperty(O, P, Attributes);
19815
+ } catch (error) { /* empty */ }
19816
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError$6('Accessors not supported');
19817
+ if ('value' in Attributes) O[P] = Attributes.value;
19818
+ return O;
19819
+ };
19820
+
19821
+ var objectDefineProperty = {
19822
+ f: f$2
19823
+ };
19824
+
19825
+ var createNonEnumerableProperty = descriptors ? function (object, key, value) {
19826
+ return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
19827
+ } : function (object, key, value) {
19828
+ object[key] = value;
19829
+ return object;
19830
+ };
19831
+
19832
+ var FunctionPrototype$1 = Function.prototype;
19833
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
19834
+ var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
19835
+
19836
+ var EXISTS$1 = hasOwnProperty_1(FunctionPrototype$1, 'name');
19837
+ // additional protection from minified / mangled / dropped function names
19838
+ var PROPER = EXISTS$1 && (function something() { /* empty */ }).name === 'something';
19839
+ var CONFIGURABLE$1 = EXISTS$1 && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable));
19840
+
19841
+ var functionName = {
19842
+ EXISTS: EXISTS$1,
19843
+ PROPER: PROPER,
19844
+ CONFIGURABLE: CONFIGURABLE$1
19845
+ };
19846
+
19847
+ var functionToString = functionUncurryThis(Function.toString);
19848
+
19849
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
19850
+ if (!isCallable(sharedStore.inspectSource)) {
19851
+ sharedStore.inspectSource = function (it) {
19852
+ return functionToString(it);
19853
+ };
19854
+ }
19855
+
19856
+ var inspectSource = sharedStore.inspectSource;
19857
+
19858
+ var WeakMap$1 = global_1.WeakMap;
19859
+
19860
+ var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
19861
+
19862
+ var keys$1 = shared('keys');
19863
+
19864
+ var sharedKey = function (key) {
19865
+ return keys$1[key] || (keys$1[key] = uid(key));
19866
+ };
19867
+
19868
+ var hiddenKeys = {};
19869
+
19870
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
19871
+ var TypeError$7 = global_1.TypeError;
19872
+ var WeakMap$2 = global_1.WeakMap;
19873
+ var set, get, has;
19874
+
19875
+ var enforce = function (it) {
19876
+ return has(it) ? get(it) : set(it, {});
19877
+ };
19878
+
19879
+ var getterFor = function (TYPE) {
19880
+ return function (it) {
19881
+ var state;
19882
+ if (!isObject(it) || (state = get(it)).type !== TYPE) {
19883
+ throw TypeError$7('Incompatible receiver, ' + TYPE + ' required');
19884
+ } return state;
19885
+ };
19886
+ };
19887
+
19888
+ if (nativeWeakMap || sharedStore.state) {
19889
+ var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$2());
19890
+ var wmget = functionUncurryThis(store$1.get);
19891
+ var wmhas = functionUncurryThis(store$1.has);
19892
+ var wmset = functionUncurryThis(store$1.set);
19893
+ set = function (it, metadata) {
19894
+ if (wmhas(store$1, it)) throw new TypeError$7(OBJECT_ALREADY_INITIALIZED);
19895
+ metadata.facade = it;
19896
+ wmset(store$1, it, metadata);
19897
+ return metadata;
19898
+ };
19899
+ get = function (it) {
19900
+ return wmget(store$1, it) || {};
19901
+ };
19902
+ has = function (it) {
19903
+ return wmhas(store$1, it);
19904
+ };
19905
+ } else {
19906
+ var STATE = sharedKey('state');
19907
+ hiddenKeys[STATE] = true;
19908
+ set = function (it, metadata) {
19909
+ if (hasOwnProperty_1(it, STATE)) throw new TypeError$7(OBJECT_ALREADY_INITIALIZED);
19910
+ metadata.facade = it;
19911
+ createNonEnumerableProperty(it, STATE, metadata);
19912
+ return metadata;
19913
+ };
19914
+ get = function (it) {
19915
+ return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
19916
+ };
19917
+ has = function (it) {
19918
+ return hasOwnProperty_1(it, STATE);
19919
+ };
19920
+ }
19921
+
19922
+ var internalState = {
19923
+ set: set,
19924
+ get: get,
19925
+ has: has,
19926
+ enforce: enforce,
19927
+ getterFor: getterFor
19928
+ };
19929
+
19930
+ var makeBuiltIn_1 = createCommonjsModule(function (module) {
19931
+ var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
19932
+
19933
+
19934
+
19935
+ var enforceInternalState = internalState.enforce;
19936
+ var getInternalState = internalState.get;
19937
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
19938
+ var defineProperty = Object.defineProperty;
19939
+
19940
+ var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
19941
+ return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
19942
+ });
19943
+
19944
+ var TEMPLATE = String(String).split('String');
19945
+
19946
+ var makeBuiltIn = module.exports = function (value, name, options) {
19947
+ if (String(name).slice(0, 7) === 'Symbol(') {
19948
+ name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
19949
+ }
19950
+ if (options && options.getter) name = 'get ' + name;
19951
+ if (options && options.setter) name = 'set ' + name;
19952
+ if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
19953
+ defineProperty(value, 'name', { value: name, configurable: true });
19954
+ }
19955
+ if (CONFIGURABLE_LENGTH && options && hasOwnProperty_1(options, 'arity') && value.length !== options.arity) {
19956
+ defineProperty(value, 'length', { value: options.arity });
19957
+ }
19958
+ if (options && hasOwnProperty_1(options, 'constructor') && options.constructor) {
19959
+ if (descriptors) try {
19960
+ defineProperty(value, 'prototype', { writable: false });
19961
+ } catch (error) { /* empty */ }
19962
+ } else value.prototype = undefined;
19963
+ var state = enforceInternalState(value);
19964
+ if (!hasOwnProperty_1(state, 'source')) {
19965
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
19966
+ } return value;
19967
+ };
19968
+
19969
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
19970
+ // eslint-disable-next-line no-extend-native -- required
19971
+ Function.prototype.toString = makeBuiltIn(function toString() {
19972
+ return isCallable(this) && getInternalState(this).source || inspectSource(this);
19973
+ }, 'toString');
19974
+ });
19975
+
19976
+ var defineBuiltIn = function (O, key, value, options) {
19977
+ var unsafe = options ? !!options.unsafe : false;
19978
+ var simple = options ? !!options.enumerable : false;
19979
+ var noTargetGet = options ? !!options.noTargetGet : false;
19980
+ var name = options && options.name !== undefined ? options.name : key;
19981
+ if (isCallable(value)) makeBuiltIn_1(value, name, options);
19982
+ if (O === global_1) {
19983
+ if (simple) O[key] = value;
19984
+ else setGlobal(key, value);
19985
+ return O;
19986
+ } else if (!unsafe) {
19987
+ delete O[key];
19988
+ } else if (!noTargetGet && O[key]) {
19989
+ simple = true;
19990
+ }
19991
+ if (simple) O[key] = value;
19992
+ else createNonEnumerableProperty(O, key, value);
19993
+ return O;
19994
+ };
19995
+
19996
+ var ceil = Math.ceil;
19997
+ var floor = Math.floor;
19998
+
19999
+ // `ToIntegerOrInfinity` abstract operation
20000
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
20001
+ var toIntegerOrInfinity = function (argument) {
20002
+ var number = +argument;
20003
+ // eslint-disable-next-line no-self-compare -- safe
20004
+ return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
20005
+ };
20006
+
20007
+ var max = Math.max;
20008
+ var min = Math.min;
20009
+
20010
+ // Helper for a popular repeating case of the spec:
20011
+ // Let integer be ? ToInteger(index).
20012
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
20013
+ var toAbsoluteIndex = function (index, length) {
20014
+ var integer = toIntegerOrInfinity(index);
20015
+ return integer < 0 ? max(integer + length, 0) : min(integer, length);
20016
+ };
20017
+
20018
+ var min$1 = Math.min;
20019
+
20020
+ // `ToLength` abstract operation
20021
+ // https://tc39.es/ecma262/#sec-tolength
20022
+ var toLength = function (argument) {
20023
+ return argument > 0 ? min$1(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
20024
+ };
20025
+
20026
+ // `LengthOfArrayLike` abstract operation
20027
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
20028
+ var lengthOfArrayLike = function (obj) {
20029
+ return toLength(obj.length);
20030
+ };
20031
+
20032
+ // `Array.prototype.{ indexOf, includes }` methods implementation
20033
+ var createMethod = function (IS_INCLUDES) {
20034
+ return function ($this, el, fromIndex) {
20035
+ var O = toIndexedObject($this);
20036
+ var length = lengthOfArrayLike(O);
20037
+ var index = toAbsoluteIndex(fromIndex, length);
20038
+ var value;
20039
+ // Array#includes uses SameValueZero equality algorithm
20040
+ // eslint-disable-next-line no-self-compare -- NaN check
20041
+ if (IS_INCLUDES && el != el) while (length > index) {
20042
+ value = O[index++];
20043
+ // eslint-disable-next-line no-self-compare -- NaN check
20044
+ if (value != value) return true;
20045
+ // Array#indexOf ignores holes, Array#includes - not
20046
+ } else for (;length > index; index++) {
20047
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
20048
+ } return !IS_INCLUDES && -1;
20049
+ };
20050
+ };
20051
+
20052
+ var arrayIncludes = {
20053
+ // `Array.prototype.includes` method
20054
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
20055
+ includes: createMethod(true),
20056
+ // `Array.prototype.indexOf` method
20057
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
20058
+ indexOf: createMethod(false)
20059
+ };
20060
+
20061
+ var indexOf = arrayIncludes.indexOf;
20062
+
20063
+
20064
+ var push = functionUncurryThis([].push);
20065
+
20066
+ var objectKeysInternal = function (object, names) {
20067
+ var O = toIndexedObject(object);
20068
+ var i = 0;
20069
+ var result = [];
20070
+ var key;
20071
+ for (key in O) !hasOwnProperty_1(hiddenKeys, key) && hasOwnProperty_1(O, key) && push(result, key);
20072
+ // Don't enum bug & hidden keys
20073
+ while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
20074
+ ~indexOf(result, key) || push(result, key);
20075
+ }
20076
+ return result;
20077
+ };
20078
+
20079
+ // IE8- don't enum bug keys
20080
+ var enumBugKeys = [
20081
+ 'constructor',
20082
+ 'hasOwnProperty',
20083
+ 'isPrototypeOf',
20084
+ 'propertyIsEnumerable',
20085
+ 'toLocaleString',
20086
+ 'toString',
20087
+ 'valueOf'
20088
+ ];
20089
+
20090
+ var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
20091
+
20092
+ // `Object.getOwnPropertyNames` method
20093
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
20094
+ // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
20095
+ var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
20096
+ return objectKeysInternal(O, hiddenKeys$1);
20097
+ };
20098
+
20099
+ var objectGetOwnPropertyNames = {
20100
+ f: f$3
20101
+ };
20102
+
20103
+ // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
20104
+ var f$4 = Object.getOwnPropertySymbols;
20105
+
20106
+ var objectGetOwnPropertySymbols = {
20107
+ f: f$4
20108
+ };
20109
+
20110
+ var concat = functionUncurryThis([].concat);
20111
+
20112
+ // all object keys, includes non-enumerable and symbols
20113
+ var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
20114
+ var keys = objectGetOwnPropertyNames.f(anObject(it));
20115
+ var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
20116
+ return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
20117
+ };
20118
+
20119
+ var copyConstructorProperties = function (target, source, exceptions) {
20120
+ var keys = ownKeys$1(source);
20121
+ var defineProperty = objectDefineProperty.f;
20122
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
20123
+ for (var i = 0; i < keys.length; i++) {
20124
+ var key = keys[i];
20125
+ if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
20126
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
20127
+ }
20128
+ }
20129
+ };
20130
+
20131
+ var replacement = /#|\.prototype\./;
20132
+
20133
+ var isForced = function (feature, detection) {
20134
+ var value = data[normalize(feature)];
20135
+ return value == POLYFILL ? true
20136
+ : value == NATIVE ? false
20137
+ : isCallable(detection) ? fails(detection)
20138
+ : !!detection;
20139
+ };
20140
+
20141
+ var normalize = isForced.normalize = function (string) {
20142
+ return String(string).replace(replacement, '.').toLowerCase();
20143
+ };
20144
+
20145
+ var data = isForced.data = {};
20146
+ var NATIVE = isForced.NATIVE = 'N';
20147
+ var POLYFILL = isForced.POLYFILL = 'P';
20148
+
20149
+ var isForced_1 = isForced;
20150
+
20151
+ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
20152
+
20153
+
20154
+
20155
+
20156
+
20157
+
20158
+ /*
20159
+ options.target - name of the target object
20160
+ options.global - target is the global object
20161
+ options.stat - export as static methods of target
20162
+ options.proto - export as prototype methods of target
20163
+ options.real - real prototype method for the `pure` version
20164
+ options.forced - export even if the native feature is available
20165
+ options.bind - bind methods to the target, required for the `pure` version
20166
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
20167
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
20168
+ options.sham - add a flag to not completely full polyfills
20169
+ options.enumerable - export as enumerable property
20170
+ options.noTargetGet - prevent calling a getter on target
20171
+ options.name - the .name of the function if it does not match the key
20172
+ */
20173
+ var _export = function (options, source) {
20174
+ var TARGET = options.target;
20175
+ var GLOBAL = options.global;
20176
+ var STATIC = options.stat;
20177
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
20178
+ if (GLOBAL) {
20179
+ target = global_1;
20180
+ } else if (STATIC) {
20181
+ target = global_1[TARGET] || setGlobal(TARGET, {});
20182
+ } else {
20183
+ target = (global_1[TARGET] || {}).prototype;
20184
+ }
20185
+ if (target) for (key in source) {
20186
+ sourceProperty = source[key];
20187
+ if (options.noTargetGet) {
20188
+ descriptor = getOwnPropertyDescriptor$1(target, key);
20189
+ targetProperty = descriptor && descriptor.value;
20190
+ } else targetProperty = target[key];
20191
+ FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
20192
+ // contained in target
20193
+ if (!FORCED && targetProperty !== undefined) {
20194
+ if (typeof sourceProperty == typeof targetProperty) continue;
20195
+ copyConstructorProperties(sourceProperty, targetProperty);
20196
+ }
20197
+ // add a flag to not completely full polyfills
20198
+ if (options.sham || (targetProperty && targetProperty.sham)) {
20199
+ createNonEnumerableProperty(sourceProperty, 'sham', true);
20200
+ }
20201
+ defineBuiltIn(target, key, sourceProperty, options);
20202
+ }
20203
+ };
20204
+
20205
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
20206
+ var test$1 = {};
20207
+
20208
+ test$1[TO_STRING_TAG] = 'z';
20209
+
20210
+ var toStringTagSupport = String(test$1) === '[object z]';
20211
+
20212
+ var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
20213
+ var Object$4 = global_1.Object;
20214
+
20215
+ // ES3 wrong here
20216
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
20217
+
20218
+ // fallback for IE11 Script Access Denied error
20219
+ var tryGet = function (it, key) {
20220
+ try {
20221
+ return it[key];
20222
+ } catch (error) { /* empty */ }
20223
+ };
20224
+
20225
+ // getting tag from ES6+ `Object.prototype.toString`
20226
+ var classof = toStringTagSupport ? classofRaw : function (it) {
20227
+ var O, tag, result;
20228
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
20229
+ // @@toStringTag case
20230
+ : typeof (tag = tryGet(O = Object$4(it), TO_STRING_TAG$1)) == 'string' ? tag
20231
+ // builtinTag case
20232
+ : CORRECT_ARGUMENTS ? classofRaw(O)
20233
+ // ES3 arguments fallback
20234
+ : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
20235
+ };
20236
+
20237
+ var String$3 = global_1.String;
20238
+
20239
+ var toString_1 = function (argument) {
20240
+ if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
20241
+ return String$3(argument);
20242
+ };
20243
+
20244
+ var charAt = functionUncurryThis(''.charAt);
20245
+
20246
+ var FORCED = fails(function () {
20247
+ // eslint-disable-next-line es-x/no-array-string-prototype-at -- safe
20248
+ return '𠮷'.at(-2) !== '\uD842';
20249
+ });
20250
+
20251
+ // `String.prototype.at` method
20252
+ // https://github.com/tc39/proposal-relative-indexing-method
20253
+ _export({ target: 'String', proto: true, forced: FORCED }, {
20254
+ at: function at(index) {
20255
+ var S = toString_1(requireObjectCoercible(this));
20256
+ var len = S.length;
20257
+ var relativeIndex = toIntegerOrInfinity(index);
20258
+ var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
20259
+ return (k < 0 || k >= len) ? undefined : charAt(S, k);
20260
+ }
20261
+ });
20262
+
20263
+ // `Object.keys` method
20264
+ // https://tc39.es/ecma262/#sec-object.keys
20265
+ // eslint-disable-next-line es-x/no-object-keys -- safe
20266
+ var objectKeys = Object.keys || function keys(O) {
20267
+ return objectKeysInternal(O, enumBugKeys);
20268
+ };
20269
+
20270
+ // `Object.defineProperties` method
20271
+ // https://tc39.es/ecma262/#sec-object.defineproperties
20272
+ // eslint-disable-next-line es-x/no-object-defineproperties -- safe
20273
+ var f$5 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
20274
+ anObject(O);
20275
+ var props = toIndexedObject(Properties);
20276
+ var keys = objectKeys(Properties);
20277
+ var length = keys.length;
20278
+ var index = 0;
20279
+ var key;
20280
+ while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
20281
+ return O;
20282
+ };
20283
+
20284
+ var objectDefineProperties = {
20285
+ f: f$5
20286
+ };
20287
+
20288
+ var html = getBuiltIn('document', 'documentElement');
20289
+
20290
+ /* global ActiveXObject -- old IE, WSH */
20291
+
20292
+
20293
+
20294
+
20295
+
20296
+
20297
+
20298
+
20299
+ var GT = '>';
20300
+ var LT = '<';
20301
+ var PROTOTYPE = 'prototype';
20302
+ var SCRIPT = 'script';
20303
+ var IE_PROTO = sharedKey('IE_PROTO');
20304
+
20305
+ var EmptyConstructor = function () { /* empty */ };
20306
+
20307
+ var scriptTag = function (content) {
20308
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
20309
+ };
20310
+
20311
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
20312
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
20313
+ activeXDocument.write(scriptTag(''));
20314
+ activeXDocument.close();
20315
+ var temp = activeXDocument.parentWindow.Object;
20316
+ activeXDocument = null; // avoid memory leak
20317
+ return temp;
20318
+ };
20319
+
20320
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
20321
+ var NullProtoObjectViaIFrame = function () {
20322
+ // Thrash, waste and sodomy: IE GC bug
20323
+ var iframe = documentCreateElement('iframe');
20324
+ var JS = 'java' + SCRIPT + ':';
20325
+ var iframeDocument;
20326
+ iframe.style.display = 'none';
20327
+ html.appendChild(iframe);
20328
+ // https://github.com/zloirock/core-js/issues/475
20329
+ iframe.src = String(JS);
20330
+ iframeDocument = iframe.contentWindow.document;
20331
+ iframeDocument.open();
20332
+ iframeDocument.write(scriptTag('document.F=Object'));
20333
+ iframeDocument.close();
20334
+ return iframeDocument.F;
20335
+ };
20336
+
20337
+ // Check for document.domain and active x support
20338
+ // No need to use active x approach when document.domain is not set
20339
+ // see https://github.com/es-shims/es5-shim/issues/150
20340
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
20341
+ // avoid IE GC bug
20342
+ var activeXDocument;
20343
+ var NullProtoObject = function () {
20344
+ try {
20345
+ activeXDocument = new ActiveXObject('htmlfile');
20346
+ } catch (error) { /* ignore */ }
20347
+ NullProtoObject = typeof document != 'undefined'
20348
+ ? document.domain && activeXDocument
20349
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
20350
+ : NullProtoObjectViaIFrame()
20351
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
20352
+ var length = enumBugKeys.length;
20353
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
20354
+ return NullProtoObject();
20355
+ };
20356
+
20357
+ hiddenKeys[IE_PROTO] = true;
20358
+
20359
+ // `Object.create` method
20360
+ // https://tc39.es/ecma262/#sec-object.create
20361
+ // eslint-disable-next-line es-x/no-object-create -- safe
20362
+ var objectCreate = Object.create || function create(O, Properties) {
20363
+ var result;
20364
+ if (O !== null) {
20365
+ EmptyConstructor[PROTOTYPE] = anObject(O);
20366
+ result = new EmptyConstructor();
20367
+ EmptyConstructor[PROTOTYPE] = null;
20368
+ // add "__proto__" for Object.getPrototypeOf polyfill
20369
+ result[IE_PROTO] = O;
20370
+ } else result = NullProtoObject();
20371
+ return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
20372
+ };
20373
+
20374
+ var UNSCOPABLES = wellKnownSymbol('unscopables');
20375
+ var ArrayPrototype = Array.prototype;
20376
+
20377
+ // Array.prototype[@@unscopables]
20378
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
20379
+ if (ArrayPrototype[UNSCOPABLES] == undefined) {
20380
+ objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
20381
+ configurable: true,
20382
+ value: objectCreate(null)
20383
+ });
20384
+ }
20385
+
20386
+ // add a key to Array.prototype[@@unscopables]
20387
+ var addToUnscopables = function (key) {
20388
+ ArrayPrototype[UNSCOPABLES][key] = true;
20389
+ };
20390
+
20391
+ // `Array.prototype.at` method
20392
+ // https://github.com/tc39/proposal-relative-indexing-method
20393
+ _export({ target: 'Array', proto: true }, {
20394
+ at: function at(index) {
20395
+ var O = toObject(this);
20396
+ var len = lengthOfArrayLike(O);
20397
+ var relativeIndex = toIntegerOrInfinity(index);
20398
+ var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
20399
+ return (k < 0 || k >= len) ? undefined : O[k];
20400
+ }
20401
+ });
20402
+
20403
+ addToUnscopables('at');
20404
+
20405
+ // eslint-disable-next-line es-x/no-typed-arrays -- safe
20406
+ var arrayBufferNative = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
20407
+
20408
+ var correctPrototypeGetter = !fails(function () {
20409
+ function F() { /* empty */ }
20410
+ F.prototype.constructor = null;
20411
+ // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
20412
+ return Object.getPrototypeOf(new F()) !== F.prototype;
20413
+ });
20414
+
20415
+ var IE_PROTO$1 = sharedKey('IE_PROTO');
20416
+ var Object$5 = global_1.Object;
20417
+ var ObjectPrototype = Object$5.prototype;
20418
+
20419
+ // `Object.getPrototypeOf` method
20420
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
20421
+ var objectGetPrototypeOf = correctPrototypeGetter ? Object$5.getPrototypeOf : function (O) {
20422
+ var object = toObject(O);
20423
+ if (hasOwnProperty_1(object, IE_PROTO$1)) return object[IE_PROTO$1];
20424
+ var constructor = object.constructor;
20425
+ if (isCallable(constructor) && object instanceof constructor) {
20426
+ return constructor.prototype;
20427
+ } return object instanceof Object$5 ? ObjectPrototype : null;
20428
+ };
20429
+
20430
+ var String$4 = global_1.String;
20431
+ var TypeError$8 = global_1.TypeError;
20432
+
20433
+ var aPossiblePrototype = function (argument) {
20434
+ if (typeof argument == 'object' || isCallable(argument)) return argument;
20435
+ throw TypeError$8("Can't set " + String$4(argument) + ' as a prototype');
20436
+ };
20437
+
20438
+ /* eslint-disable no-proto -- safe */
20439
+
20440
+
20441
+
20442
+
20443
+ // `Object.setPrototypeOf` method
20444
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
20445
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
20446
+ // eslint-disable-next-line es-x/no-object-setprototypeof -- safe
20447
+ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
20448
+ var CORRECT_SETTER = false;
20449
+ var test = {};
20450
+ var setter;
20451
+ try {
20452
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
20453
+ setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
20454
+ setter(test, []);
20455
+ CORRECT_SETTER = test instanceof Array;
20456
+ } catch (error) { /* empty */ }
20457
+ return function setPrototypeOf(O, proto) {
20458
+ anObject(O);
20459
+ aPossiblePrototype(proto);
20460
+ if (CORRECT_SETTER) setter(O, proto);
20461
+ else O.__proto__ = proto;
20462
+ return O;
20463
+ };
20464
+ }() : undefined);
20465
+
20466
+ var defineProperty$1 = objectDefineProperty.f;
20467
+
20468
+
20469
+
20470
+
20471
+
20472
+
20473
+ var Int8Array = global_1.Int8Array;
20474
+ var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
20475
+ var Uint8ClampedArray = global_1.Uint8ClampedArray;
20476
+ var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;
20477
+ var TypedArray = Int8Array && objectGetPrototypeOf(Int8Array);
20478
+ var TypedArrayPrototype = Int8ArrayPrototype && objectGetPrototypeOf(Int8ArrayPrototype);
20479
+ var ObjectPrototype$1 = Object.prototype;
20480
+ var TypeError$9 = global_1.TypeError;
20481
+
20482
+ var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
20483
+ var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
20484
+ var TYPED_ARRAY_CONSTRUCTOR = uid('TYPED_ARRAY_CONSTRUCTOR');
20485
+ // Fixing native typed arrays in Opera Presto crashes the browser, see #595
20486
+ var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferNative && !!objectSetPrototypeOf && classof(global_1.opera) !== 'Opera';
20487
+ var TYPED_ARRAY_TAG_REQUIRED = false;
20488
+ var NAME, Constructor, Prototype;
20489
+
20490
+ var TypedArrayConstructorsList = {
20491
+ Int8Array: 1,
20492
+ Uint8Array: 1,
20493
+ Uint8ClampedArray: 1,
20494
+ Int16Array: 2,
20495
+ Uint16Array: 2,
20496
+ Int32Array: 4,
20497
+ Uint32Array: 4,
20498
+ Float32Array: 4,
20499
+ Float64Array: 8
20500
+ };
20501
+
20502
+ var BigIntArrayConstructorsList = {
20503
+ BigInt64Array: 8,
20504
+ BigUint64Array: 8
20505
+ };
20506
+
20507
+ var isView = function isView(it) {
20508
+ if (!isObject(it)) return false;
20509
+ var klass = classof(it);
20510
+ return klass === 'DataView'
20511
+ || hasOwnProperty_1(TypedArrayConstructorsList, klass)
20512
+ || hasOwnProperty_1(BigIntArrayConstructorsList, klass);
20513
+ };
20514
+
20515
+ var isTypedArray = function (it) {
20516
+ if (!isObject(it)) return false;
20517
+ var klass = classof(it);
20518
+ return hasOwnProperty_1(TypedArrayConstructorsList, klass)
20519
+ || hasOwnProperty_1(BigIntArrayConstructorsList, klass);
20520
+ };
20521
+
20522
+ var aTypedArray = function (it) {
20523
+ if (isTypedArray(it)) return it;
20524
+ throw TypeError$9('Target is not a typed array');
20525
+ };
20526
+
20527
+ var aTypedArrayConstructor = function (C) {
20528
+ if (isCallable(C) && (!objectSetPrototypeOf || objectIsPrototypeOf(TypedArray, C))) return C;
20529
+ throw TypeError$9(tryToString(C) + ' is not a typed array constructor');
20530
+ };
20531
+
20532
+ var exportTypedArrayMethod = function (KEY, property, forced, options) {
20533
+ if (!descriptors) return;
20534
+ if (forced) for (var ARRAY in TypedArrayConstructorsList) {
20535
+ var TypedArrayConstructor = global_1[ARRAY];
20536
+ if (TypedArrayConstructor && hasOwnProperty_1(TypedArrayConstructor.prototype, KEY)) try {
20537
+ delete TypedArrayConstructor.prototype[KEY];
20538
+ } catch (error) {
20539
+ // old WebKit bug - some methods are non-configurable
20540
+ try {
20541
+ TypedArrayConstructor.prototype[KEY] = property;
20542
+ } catch (error2) { /* empty */ }
20543
+ }
20544
+ }
20545
+ if (!TypedArrayPrototype[KEY] || forced) {
20546
+ defineBuiltIn(TypedArrayPrototype, KEY, forced ? property
20547
+ : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property, options);
20548
+ }
20549
+ };
20550
+
20551
+ var exportTypedArrayStaticMethod = function (KEY, property, forced) {
20552
+ var ARRAY, TypedArrayConstructor;
20553
+ if (!descriptors) return;
20554
+ if (objectSetPrototypeOf) {
20555
+ if (forced) for (ARRAY in TypedArrayConstructorsList) {
20556
+ TypedArrayConstructor = global_1[ARRAY];
20557
+ if (TypedArrayConstructor && hasOwnProperty_1(TypedArrayConstructor, KEY)) try {
20558
+ delete TypedArrayConstructor[KEY];
20559
+ } catch (error) { /* empty */ }
20560
+ }
20561
+ if (!TypedArray[KEY] || forced) {
20562
+ // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
20563
+ try {
20564
+ return defineBuiltIn(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);
20565
+ } catch (error) { /* empty */ }
20566
+ } else return;
20567
+ }
20568
+ for (ARRAY in TypedArrayConstructorsList) {
20569
+ TypedArrayConstructor = global_1[ARRAY];
20570
+ if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {
20571
+ defineBuiltIn(TypedArrayConstructor, KEY, property);
20572
+ }
20573
+ }
20574
+ };
20575
+
20576
+ for (NAME in TypedArrayConstructorsList) {
20577
+ Constructor = global_1[NAME];
20578
+ Prototype = Constructor && Constructor.prototype;
20579
+ if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);
20580
+ else NATIVE_ARRAY_BUFFER_VIEWS = false;
20581
+ }
20582
+
20583
+ for (NAME in BigIntArrayConstructorsList) {
20584
+ Constructor = global_1[NAME];
20585
+ Prototype = Constructor && Constructor.prototype;
20586
+ if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);
20587
+ }
20588
+
20589
+ // WebKit bug - typed arrays constructors prototype is Object.prototype
20590
+ if (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {
20591
+ // eslint-disable-next-line no-shadow -- safe
20592
+ TypedArray = function TypedArray() {
20593
+ throw TypeError$9('Incorrect invocation');
20594
+ };
20595
+ if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
20596
+ if (global_1[NAME]) objectSetPrototypeOf(global_1[NAME], TypedArray);
20597
+ }
20598
+ }
20599
+
20600
+ if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype$1) {
20601
+ TypedArrayPrototype = TypedArray.prototype;
20602
+ if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
20603
+ if (global_1[NAME]) objectSetPrototypeOf(global_1[NAME].prototype, TypedArrayPrototype);
20604
+ }
20605
+ }
20606
+
20607
+ // WebKit bug - one more object in Uint8ClampedArray prototype chain
20608
+ if (NATIVE_ARRAY_BUFFER_VIEWS && objectGetPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
20609
+ objectSetPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
20610
+ }
20611
+
20612
+ if (descriptors && !hasOwnProperty_1(TypedArrayPrototype, TO_STRING_TAG$2)) {
20613
+ TYPED_ARRAY_TAG_REQUIRED = true;
20614
+ defineProperty$1(TypedArrayPrototype, TO_STRING_TAG$2, { get: function () {
20615
+ return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
20616
+ } });
20617
+ for (NAME in TypedArrayConstructorsList) if (global_1[NAME]) {
20618
+ createNonEnumerableProperty(global_1[NAME], TYPED_ARRAY_TAG, NAME);
20619
+ }
20620
+ }
20621
+
20622
+ var arrayBufferViewCore = {
20623
+ NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
20624
+ TYPED_ARRAY_CONSTRUCTOR: TYPED_ARRAY_CONSTRUCTOR,
20625
+ TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG,
20626
+ aTypedArray: aTypedArray,
20627
+ aTypedArrayConstructor: aTypedArrayConstructor,
20628
+ exportTypedArrayMethod: exportTypedArrayMethod,
20629
+ exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
20630
+ isView: isView,
20631
+ isTypedArray: isTypedArray,
20632
+ TypedArray: TypedArray,
20633
+ TypedArrayPrototype: TypedArrayPrototype
20634
+ };
20635
+
20636
+ var aTypedArray$1 = arrayBufferViewCore.aTypedArray;
20637
+ var exportTypedArrayMethod$1 = arrayBufferViewCore.exportTypedArrayMethod;
20638
+
20639
+ // `%TypedArray%.prototype.at` method
20640
+ // https://github.com/tc39/proposal-relative-indexing-method
20641
+ exportTypedArrayMethod$1('at', function at(index) {
20642
+ var O = aTypedArray$1(this);
20643
+ var len = lengthOfArrayLike(O);
20644
+ var relativeIndex = toIntegerOrInfinity(index);
20645
+ var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
20646
+ return (k < 0 || k >= len) ? undefined : O[k];
20647
+ });
20648
+
19401
20649
  var selectedColor = "".concat(MATISSE_BLUE);
19402
20650
  var hoverColor$3 = "".concat(HOVER_LIGHT_BLUE);
19403
20651
  var fallbackValues$e = {
@@ -19408,24 +20656,24 @@ var fallbackValues$e = {
19408
20656
  var IconWrapper = styled__default.div.withConfig({
19409
20657
  displayName: "Dropdown__IconWrapper",
19410
20658
  componentId: "sc-pn6m0h-0"
19411
- })(["display:flex;flex-direction:column;justify-content:center;transition:transform 0.3s ease;", ""], function (_ref) {
20659
+ })(["position:absolute;display:flex;flex-direction:column;justify-content:center;transition:transform 0.3s ease;", ";top:20px;right:12px;"], function (_ref) {
19412
20660
  var open = _ref.open;
19413
20661
  return open ? "transform: rotate(-180deg)" : "";
19414
20662
  });
19415
20663
  var DropdownContentWrapper = styled__default.div.withConfig({
19416
20664
  displayName: "Dropdown__DropdownContentWrapper",
19417
20665
  componentId: "sc-pn6m0h-1"
19418
- })(["transform-origin:0 0;border:1px solid ", ";border-radius:2px;background-color:", ";padding:8px 0 8px;position:absolute;width:", ";min-width:100%;max-height:", ";overflow-y:scroll;z-index:1;box-sizing:border-box;&:focus{outline:none;}"], GREY_CHATEAU, WHITE, function (_ref2) {
20666
+ })(["transform-origin:0 0;border:1px solid ", ";border-radius:2px;background-color:", ";padding:8px 0 8px;position:absolute;width:", ";min-width:100%;max-height:", ";overflow-y:scroll;z-index:1;box-sizing:border-box;&:focus{outline:none;}ul{padding-left:0;}"], GREY_CHATEAU, WHITE, function (_ref2) {
19419
20667
  var widthFitOptions = _ref2.widthFitOptions;
19420
20668
  return widthFitOptions ? "fit-content" : "100%";
19421
20669
  }, function (_ref3) {
19422
20670
  var maxHeight = _ref3.maxHeight;
19423
20671
  return maxHeight || "400px";
19424
20672
  });
19425
- var DropdownItemWrapper = styled__default.div.withConfig({
20673
+ var DropdownItemWrapper = styled__default.li.withConfig({
19426
20674
  displayName: "Dropdown__DropdownItemWrapper",
19427
20675
  componentId: "sc-pn6m0h-2"
19428
- })(["background-color:", ";text-align:start;border-width:0px;border-color:transparent;box-shadow:none;padding:1rem;box-sizing:border-box;width:100%;cursor:", ";&:hover{background-color:", ";}&:focus{background-color:", ";outline:none;}"], function (_ref4) {
20676
+ })(["background-color:", ";text-align:start;border-width:0px;border-color:transparent;box-shadow:none;padding:1rem;box-sizing:border-box;width:100%;list-style:none;cursor:", ";&:hover{background-color:", ";}&:focus{background-color:", ";outline:none;}"], function (_ref4) {
19429
20677
  var selected = _ref4.selected,
19430
20678
  themeValues = _ref4.themeValues;
19431
20679
  return selected ? themeValues.selectedColor : WHITE;
@@ -19443,32 +20691,30 @@ var DropdownItemWrapper = styled__default.div.withConfig({
19443
20691
  themeValues = _ref7.themeValues;
19444
20692
  return selected ? themeValues.selectedColor : disabled ? WHITE : themeValues.hoverColor;
19445
20693
  });
19446
- var SearchInput = styled__default.input.withConfig({
19447
- displayName: "Dropdown__SearchInput",
19448
- componentId: "sc-pn6m0h-3"
19449
- })(["border:none;background-color:", ";font-size:16px;height:24px;"], function (_ref8) {
19450
- var themeValues = _ref8.themeValues;
19451
- return themeValues.hoverColor && themeValues.hoverColor;
19452
- });
19453
20694
 
19454
- var Dropdown = function Dropdown(_ref9) {
19455
- var placeholder = _ref9.placeholder,
19456
- options = _ref9.options,
19457
- value = _ref9.value,
19458
- isOpen = _ref9.isOpen,
19459
- isError = _ref9.isError,
19460
- onSelect = _ref9.onSelect,
19461
- _ref9$disabledValues = _ref9.disabledValues,
19462
- disabledValues = _ref9$disabledValues === void 0 ? [] : _ref9$disabledValues,
19463
- _ref9$onClick = _ref9.onClick,
19464
- onClick = _ref9$onClick === void 0 ? noop : _ref9$onClick,
19465
- themeValues = _ref9.themeValues,
19466
- maxHeight = _ref9.maxHeight,
19467
- _ref9$widthFitOptions = _ref9.widthFitOptions,
19468
- widthFitOptions = _ref9$widthFitOptions === void 0 ? false : _ref9$widthFitOptions,
19469
- disabled = _ref9.disabled,
19470
- _ref9$hasTitles = _ref9.hasTitles,
19471
- hasTitles = _ref9$hasTitles === void 0 ? false : _ref9$hasTitles;
20695
+ var Dropdown = function Dropdown(_ref8) {
20696
+ var placeholder = _ref8.placeholder,
20697
+ options = _ref8.options,
20698
+ value = _ref8.value,
20699
+ isOpen = _ref8.isOpen,
20700
+ isError = _ref8.isError,
20701
+ onSelect = _ref8.onSelect,
20702
+ _ref8$disabledValues = _ref8.disabledValues,
20703
+ disabledValues = _ref8$disabledValues === void 0 ? [] : _ref8$disabledValues,
20704
+ _ref8$onClick = _ref8.onClick,
20705
+ _onClick = _ref8$onClick === void 0 ? noop : _ref8$onClick,
20706
+ themeValues = _ref8.themeValues,
20707
+ maxHeight = _ref8.maxHeight,
20708
+ _ref8$widthFitOptions = _ref8.widthFitOptions,
20709
+ widthFitOptions = _ref8$widthFitOptions === void 0 ? false : _ref8$widthFitOptions,
20710
+ disabled = _ref8.disabled,
20711
+ _ref8$hasTitles = _ref8.hasTitles,
20712
+ hasTitles = _ref8$hasTitles === void 0 ? false : _ref8$hasTitles,
20713
+ _ref8$autoEraseTypeAh = _ref8.autoEraseTypeAhead,
20714
+ autoEraseTypeAhead = _ref8$autoEraseTypeAh === void 0 ? true : _ref8$autoEraseTypeAh,
20715
+ ariaLabelledby = _ref8.ariaLabelledby,
20716
+ _ref8$autocompleteVal = _ref8.autocompleteValue,
20717
+ autocompleteValue = _ref8$autocompleteVal === void 0 ? "" : _ref8$autocompleteVal;
19472
20718
 
19473
20719
  var _useState = React.useState(""),
19474
20720
  _useState2 = _slicedToArray(_useState, 2),
@@ -19490,6 +20736,21 @@ var Dropdown = function Dropdown(_ref9) {
19490
20736
  optionsChanged = _useState8[0],
19491
20737
  setOptionsChanged = _useState8[1];
19492
20738
 
20739
+ var _useState9 = React.useState(undefined),
20740
+ _useState10 = _slicedToArray(_useState9, 2),
20741
+ selectedRef = _useState10[0],
20742
+ setSelectedRef = _useState10[1];
20743
+
20744
+ var _useState11 = React.useState(undefined),
20745
+ _useState12 = _slicedToArray(_useState11, 2),
20746
+ focusedRef = _useState12[0],
20747
+ setFocusedRef = _useState12[1];
20748
+
20749
+ var _useState13 = React.useState(false),
20750
+ _useState14 = _slicedToArray(_useState13, 2),
20751
+ inputChangedByAutofill = _useState14[0],
20752
+ setInputChangedByAutofill = _useState14[1];
20753
+
19493
20754
  if (optionsState !== options) {
19494
20755
  setOptionsState(options);
19495
20756
  setOptionsChanged(true);
@@ -19500,10 +20761,10 @@ var Dropdown = function Dropdown(_ref9) {
19500
20761
  setOptionsChanged(false);
19501
20762
  }
19502
20763
 
19503
- var _useState9 = React.useState(null),
19504
- _useState10 = _slicedToArray(_useState9, 2),
19505
- timer = _useState10[0],
19506
- setTimer = _useState10[1];
20764
+ var _useState15 = React.useState(null),
20765
+ _useState16 = _slicedToArray(_useState15, 2),
20766
+ timer = _useState16[0],
20767
+ setTimer = _useState16[1];
19507
20768
 
19508
20769
  var optionRefs = React.useRef(_toConsumableArray(Array(options.length)).map(function () {
19509
20770
  return /*#__PURE__*/React.createRef();
@@ -19519,21 +20780,23 @@ var Dropdown = function Dropdown(_ref9) {
19519
20780
  };
19520
20781
 
19521
20782
  var onKeyDown = function onKeyDown(e) {
20783
+ console.log("current input value top of keyDown", inputValue);
19522
20784
  var key = e.key,
19523
20785
  keyCode = e.keyCode;
19524
20786
  var focus = document.activeElement;
19525
20787
  console.log("dropdown value is", value);
19526
- console.log("focus is", focus);
19527
- console.log("option refs are", optionRefs.current);
19528
20788
  var optionEl = optionRefs.current.find(function (ref) {
19529
20789
  return ref.current === focus;
19530
20790
  });
19531
- console.log("option el is", optionEl);
19532
20791
 
19533
20792
  switch (key) {
19534
20793
  case "ArrowDown":
19535
20794
  e.preventDefault();
19536
20795
 
20796
+ if (!isOpen) {
20797
+ _onClick();
20798
+ }
20799
+
19537
20800
  if (optionEl) {
19538
20801
  if (optionEl.current.nextElementSibling) {
19539
20802
  optionEl.current.nextElementSibling.focus();
@@ -19542,7 +20805,7 @@ var Dropdown = function Dropdown(_ref9) {
19542
20805
  break;
19543
20806
  }
19544
20807
  } else {
19545
- onClick();
20808
+ _onClick();
19546
20809
  }
19547
20810
 
19548
20811
  break;
@@ -19558,7 +20821,7 @@ var Dropdown = function Dropdown(_ref9) {
19558
20821
  break;
19559
20822
  }
19560
20823
  } else {
19561
- onClick();
20824
+ _onClick();
19562
20825
  }
19563
20826
 
19564
20827
  break;
@@ -19572,23 +20835,54 @@ var Dropdown = function Dropdown(_ref9) {
19572
20835
 
19573
20836
  case "Backspace" :
19574
20837
  e.preventDefault();
19575
- console.log("input value is", inputValue);
19576
- console.log("new input value will be", inputValue.slice(0, -1));
19577
20838
  setInputValue(inputValue.slice(0, -1));
19578
20839
  break;
20840
+
20841
+ case "Home":
20842
+ e.preventDefault();
20843
+ optionRefs.current[0].current.focus();
20844
+ break;
20845
+
20846
+ case "End":
20847
+ e.preventDefault();
20848
+ console.log("option refs current", optionRefs.current);
20849
+ optionRefs.current.at(-1).current.focus();
20850
+ break;
20851
+
20852
+ case "Escape":
20853
+ if (isOpen) {
20854
+ _onClick();
20855
+ }
20856
+
20857
+ break;
19579
20858
  }
19580
20859
 
19581
20860
  if (keyCode > 64 && keyCode < 91 || keyCode == 32 || keyCode == 189) {
19582
20861
  e.preventDefault();
20862
+ console.log("current input value inside keydown if", inputValue);
19583
20863
  setInputValue(inputValue + key);
19584
20864
  }
19585
20865
  };
19586
20866
 
19587
- React.useEffect(function () {
19588
- console.log("option refs in isopen useffect", optionRefs.current[0].current);
19589
- console.log("value in isopen useffect", value);
20867
+ var handleItemSelection = function handleItemSelection(evt, choice, i) {
20868
+ if (disabledValues.includes(choice.value)) {
20869
+ evt.preventDefault();
20870
+ } else {
20871
+ setSelectedRef(optionRefs.current[i]);
20872
+ onSelect(choice.value);
20873
+
20874
+ if (isOpen) {
20875
+ _onClick();
20876
+ }
20877
+ }
20878
+ };
19590
20879
 
19591
- if (isOpen && optionRefs.current[0].current) {
20880
+ React.useEffect(function () {
20881
+ if (isOpen && selectedRef !== undefined && selectedRef.current !== null) {
20882
+ // WAI-ARIA requires the selected option to receive focus
20883
+ selectedRef.current.focus();
20884
+ } else if (isOpen && optionRefs.current[0].current) {
20885
+ // If no selected option, first option receives focus
19592
20886
  optionRefs.current[0].current.focus();
19593
20887
  }
19594
20888
 
@@ -19596,16 +20890,20 @@ var Dropdown = function Dropdown(_ref9) {
19596
20890
  setInputValue("");
19597
20891
  }, [isOpen]);
19598
20892
  React.useEffect(function () {
19599
- clearTimeout(timer);
19600
- setTimer(setTimeout(function () {
19601
- return setInputValue("");
19602
- }, 2000));
20893
+ if (autoEraseTypeAhead) {
20894
+ clearTimeout(timer);
20895
+ setTimer(setTimeout(function () {
20896
+ return setInputValue("");
20897
+ }, 3000));
20898
+ }
20899
+
19603
20900
  setFilteredOptions(options.filter(function (option) {
19604
20901
  return option.value.toLowerCase().startsWith(inputValue.toLowerCase()) || option.text.toLowerCase().startsWith(inputValue.toLowerCase());
19605
20902
  }));
19606
20903
  }, [inputValue]);
19607
20904
  React.useEffect(function () {
19608
- if (!isOpen && filteredOptions[0] && !disabledValues.includes(filteredOptions[0].value) && filteredOptions[0].text != placeholder) {
20905
+ if ((!isOpen || inputChangedByAutofill) && filteredOptions[0] && !disabledValues.includes(filteredOptions[0].value) && filteredOptions[0].text != placeholder) {
20906
+ setInputChangedByAutofill(false);
19609
20907
  onSelect(filteredOptions[0].value);
19610
20908
  }
19611
20909
 
@@ -19616,69 +20914,106 @@ var Dropdown = function Dropdown(_ref9) {
19616
20914
  }
19617
20915
  }, [filteredOptions]);
19618
20916
  return /*#__PURE__*/React__default.createElement(Box, {
19619
- onKeyDown: onKeyDown,
19620
- onClick: onClick,
19621
20917
  padding: "0",
19622
- width: "100%",
19623
- hoverStyles: "background-color: ".concat(themeValues.hoverColor, ";"),
19624
- "aria-expanded": isOpen,
19625
- extraStyles: disabled && "color: #6e727e;\n background-color: #f7f7f7;\n pointer-events: none;",
19626
- title: hasTitles ? getSelection() : null
20918
+ background: isOpen ? themeValues.hoverColor : WHITE,
20919
+ extraStyles: "position: relative;",
20920
+ minWidth: "100%",
20921
+ onClick: function onClick() {
20922
+ if (!isOpen) {
20923
+ _onClick();
20924
+ }
20925
+ },
20926
+ onKeyDown: onKeyDown,
20927
+ width: "100%"
19627
20928
  }, /*#__PURE__*/React__default.createElement(Box, {
19628
- as: "button",
20929
+ as: "input",
20930
+ "aria-multiline": "false",
20931
+ "aria-autocomplete": "list",
20932
+ "aria-controls": "".concat(ariaLabelledby, "_listbox"),
20933
+ "aria-activedescendant": "focused_option",
20934
+ "aria-owns": "".concat(ariaLabelledby, "_listbox"),
20935
+ "aria-haspopup": "listbox",
20936
+ "aria-labelledby": ariaLabelledby,
20937
+ "aria-expanded": isOpen,
20938
+ autocomplete: autocompleteValue,
19629
20939
  background: isOpen ? themeValues.hoverColor : WHITE,
19630
- width: "100%",
19631
- padding: "12px",
19632
- hoverStyles: "background-color: ".concat(themeValues.hoverColor, ";"),
20940
+ borderRadius: "2px",
19633
20941
  borderSize: "1px",
19634
20942
  borderColor: isError ? ERROR_COLOR : isOpen ? themeValues.selectedColor : GREY_CHATEAU,
19635
- borderRadius: "2px",
20943
+ extraStyles: disabled && "color: #6e727e;\n background-color: #f7f7f7;\n pointer-events: none;",
20944
+ hoverStyles: "background-color: ".concat(themeValues.hoverColor, ";"),
20945
+ isOpen: isOpen,
20946
+ minHeight: "48px",
20947
+ minWidth: "100%",
20948
+ name: autocompleteValue,
20949
+ onChange: function onChange(e) {
20950
+ console.log("current input value onChange", inputValue);
20951
+ console.log("input change event", e.target);
20952
+ console.log("input change event value", e.target.value); // support autofill and copy/paste
20953
+
20954
+ if (e.target.value !== inputValue) {
20955
+ setInputValue(e.target.value);
20956
+ setInputChangedByAutofill(true);
20957
+ }
20958
+ },
20959
+ padding: "12px",
20960
+ placeholder: getSelection(),
20961
+ role: "combobox",
20962
+ themeValues: themeValues,
20963
+ title: hasTitles ? getSelection() : null,
20964
+ type: "text",
19636
20965
  tabIndex: 0,
19637
- dataQa: placeholder,
19638
- extraStyles: "height: 48px;\n ".concat(disabled && "color: #6e727e;\n background-color: #f7f7f7;\n pointer-events: none;", "\n ")
19639
- }, /*#__PURE__*/React__default.createElement(Stack, {
19640
- direction: "row",
19641
- bottomItem: 2
19642
- }, isOpen ? /*#__PURE__*/React__default.createElement(SearchInput, {
19643
- "aria-label": inputValue || "Dropdown awaiting search value",
19644
20966
  value: inputValue,
19645
- onChange: noop,
19646
- themeValues: themeValues
19647
- }) : /*#__PURE__*/React__default.createElement(Text$1, {
19648
- variant: "p",
19649
- extraStyles: disabled && "color: #6e727e;\n background-color: #f7f7f7;\n pointer-events: none;"
19650
- }, getSelection()), /*#__PURE__*/React__default.createElement(IconWrapper, {
19651
- open: isOpen
19652
- }, /*#__PURE__*/React__default.createElement(DropdownIcon, null)))), isOpen ? /*#__PURE__*/React__default.createElement(DropdownContentWrapper, {
20967
+ width: "100%",
20968
+ dataQa: placeholder
20969
+ }), /*#__PURE__*/React__default.createElement(IconWrapper, {
20970
+ open: isOpen,
20971
+ onClick: _onClick
20972
+ }, /*#__PURE__*/React__default.createElement(DropdownIcon, null)), /*#__PURE__*/React__default.createElement(React.Fragment, null, isOpen ? /*#__PURE__*/React__default.createElement(DropdownContentWrapper, {
19653
20973
  maxHeight: maxHeight,
19654
20974
  open: isOpen,
19655
20975
  ref: dropdownRef,
19656
20976
  widthFitOptions: widthFitOptions,
19657
- tabIndex: 0
20977
+ tabIndex: 0,
20978
+ role: "listbox",
20979
+ id: "".concat(ariaLabelledby, "_listbox")
19658
20980
  }, /*#__PURE__*/React__default.createElement(Stack, {
19659
- childGap: "0"
20981
+ childGap: "0",
20982
+ as: "ul"
19660
20983
  }, filteredOptions.map(function (choice, i) {
20984
+ if (choice.value === value && selectedRef !== optionRefs.current[i]) {
20985
+ setSelectedRef(optionRefs.current[i]);
20986
+ }
20987
+
19661
20988
  return /*#__PURE__*/React__default.createElement(DropdownItemWrapper, {
20989
+ id: focusedRef === optionRefs.current[i] ? "focused_option" : choice.value,
19662
20990
  key: choice.value,
19663
20991
  ref: optionRefs.current[i],
19664
- as: "button",
19665
20992
  tabIndex: -1,
19666
- onClick: disabledValues.includes(choice.value) ? function (evt) {
19667
- return evt.preventDefault();
19668
- } : function () {
19669
- return onSelect(choice.value);
20993
+ onClick: function onClick(e) {
20994
+ return handleItemSelection(e, choice, i);
20995
+ },
20996
+ onKeyDown: function onKeyDown(e) {
20997
+ if (e.keyCode === 13) {
20998
+ handleItemSelection(e, choice, i);
20999
+ }
19670
21000
  },
19671
21001
  selected: choice.value === value,
21002
+ "aria-selected": choice.value === value,
19672
21003
  disabled: disabledValues.includes(choice.value),
19673
21004
  "data-qa": choice.text,
19674
21005
  themeValues: themeValues,
19675
- title: hasTitles ? choice.text : null
21006
+ title: hasTitles ? choice.text : null,
21007
+ role: "option",
21008
+ onFocus: function onFocus() {
21009
+ return setFocusedRef(optionRefs.current[i]);
21010
+ }
19676
21011
  }, /*#__PURE__*/React__default.createElement(Text$1, {
19677
21012
  variant: "p",
19678
21013
  color: choice.value === value ? WHITE : disabledValues.includes(choice.value) ? STORM_GREY : MINESHAFT_GREY,
19679
21014
  extraStyles: "padding-left: 16px; \n cursor: ".concat(disabledValues.includes(choice.value) ? "default" : "pointer", "; \n white-space: nowrap; \n overflow: hidden; \n text-overflow: ellipsis;")
19680
21015
  }, choice.text));
19681
- }))) : /*#__PURE__*/React__default.createElement(React.Fragment, null));
21016
+ }))) : /*#__PURE__*/React__default.createElement(React.Fragment, null)));
19682
21017
  };
19683
21018
 
19684
21019
  var Dropdown$1 = themeComponent(Dropdown, "Dropdown", fallbackValues$e);
@@ -19779,7 +21114,8 @@ var FormSelect = function FormSelect(_ref) {
19779
21114
  disabled = _ref.disabled,
19780
21115
  themeValues = _ref.themeValues,
19781
21116
  _ref$hasTitles = _ref.hasTitles,
19782
- hasTitles = _ref$hasTitles === void 0 ? false : _ref$hasTitles;
21117
+ hasTitles = _ref$hasTitles === void 0 ? false : _ref$hasTitles,
21118
+ autocompleteValue = _ref.autocompleteValue;
19783
21119
 
19784
21120
  var _useState = React.useState(false),
19785
21121
  _useState2 = _slicedToArray(_useState, 2),
@@ -19817,7 +21153,7 @@ var FormSelect = function FormSelect(_ref) {
19817
21153
  extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
19818
21154
  id: labelTextWhenNoError.replace(/\s+/g, "-")
19819
21155
  }, labelTextWhenNoError))), /*#__PURE__*/React__default.createElement(Dropdown$1, {
19820
- "aria-labelledby": labelTextWhenNoError.replace(/\s+/g, "-"),
21156
+ ariaLabelledby: labelTextWhenNoError.replace(/\s+/g, "-"),
19821
21157
  maxHeight: dropdownMaxHeight,
19822
21158
  hasTitles: hasTitles,
19823
21159
  placeholder: options[0] ? options[0].text : "",
@@ -19834,7 +21170,8 @@ var FormSelect = function FormSelect(_ref) {
19834
21170
  onClick: function onClick() {
19835
21171
  return setOpen(!open);
19836
21172
  },
19837
- disabled: disabled
21173
+ disabled: disabled,
21174
+ autocompleteValue: autocompleteValue
19838
21175
  }), /*#__PURE__*/React__default.createElement(Stack, {
19839
21176
  direction: "row",
19840
21177
  justify: "space-between"
@@ -20607,7 +21944,8 @@ var CountryDropdown = function CountryDropdown(_ref) {
20607
21944
  labelTextWhenNoError: labelTextWhenNoError,
20608
21945
  errorMessages: errorMessages,
20609
21946
  showErrors: showErrors,
20610
- onChange: onChange
21947
+ onChange: onChange,
21948
+ autocompleteValue: "country-name"
20611
21949
  });
20612
21950
  };
20613
21951
 
@@ -33023,7 +34361,8 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
33023
34361
  fieldActions: fieldActions,
33024
34362
  labelTextWhenNoError: labelTextWhenNoError,
33025
34363
  errorMessages: errorMessages,
33026
- showErrors: showErrors
34364
+ showErrors: showErrors,
34365
+ autocompleteValue: "address-level1"
33027
34366
  });
33028
34367
  };
33029
34368
 
@@ -33754,20 +35093,20 @@ function isPlainObject(value) {
33754
35093
  }
33755
35094
  var assign = Object.assign || function assign(target, value) {
33756
35095
  for (var key in value) {
33757
- if (has(value, key)) {
35096
+ if (has$1(value, key)) {
33758
35097
  target[key] = value[key];
33759
35098
  }
33760
35099
  }
33761
35100
 
33762
35101
  return target;
33763
35102
  };
33764
- var ownKeys$1 = typeof Reflect !== "undefined" && Reflect.ownKeys ? Reflect.ownKeys : typeof Object.getOwnPropertySymbols !== "undefined" ? function (obj) { return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj)); } : Object.getOwnPropertyNames;
35103
+ var ownKeys$2 = typeof Reflect !== "undefined" && Reflect.ownKeys ? Reflect.ownKeys : typeof Object.getOwnPropertySymbols !== "undefined" ? function (obj) { return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj)); } : Object.getOwnPropertyNames;
33765
35104
  function shallowCopy(base, invokeGetters) {
33766
35105
  if ( invokeGetters === void 0 ) invokeGetters = false;
33767
35106
 
33768
35107
  if (Array.isArray(base)) { return base.slice(); }
33769
35108
  var clone = Object.create(Object.getPrototypeOf(base));
33770
- ownKeys$1(base).forEach(function (key) {
35109
+ ownKeys$2(base).forEach(function (key) {
33771
35110
  if (key === DRAFT_STATE) {
33772
35111
  return; // Never copy over draft state.
33773
35112
  }
@@ -33799,14 +35138,14 @@ function each(value, cb) {
33799
35138
  if (Array.isArray(value)) {
33800
35139
  for (var i = 0; i < value.length; i++) { cb(i, value[i], value); }
33801
35140
  } else {
33802
- ownKeys$1(value).forEach(function (key) { return cb(key, value[key], value); });
35141
+ ownKeys$2(value).forEach(function (key) { return cb(key, value[key], value); });
33803
35142
  }
33804
35143
  }
33805
35144
  function isEnumerable(base, prop) {
33806
35145
  var desc = Object.getOwnPropertyDescriptor(base, prop);
33807
35146
  return !!desc && desc.enumerable;
33808
35147
  }
33809
- function has(thing, prop) {
35148
+ function has$1(thing, prop) {
33810
35149
  return Object.prototype.hasOwnProperty.call(thing, prop);
33811
35150
  }
33812
35151
  function is(x, y) {
@@ -33870,7 +35209,7 @@ function revoke(draft) {
33870
35209
 
33871
35210
  // but share them all instead
33872
35211
 
33873
- var descriptors = {};
35212
+ var descriptors$1 = {};
33874
35213
  function willFinalize(scope, result, isReplaced) {
33875
35214
  scope.drafts.forEach(function (draft) {
33876
35215
  draft[DRAFT_STATE].finalizing = true;
@@ -33938,7 +35277,7 @@ function peek(draft, prop) {
33938
35277
  return draft[prop];
33939
35278
  }
33940
35279
 
33941
- function get(state, prop) {
35280
+ function get$1(state, prop) {
33942
35281
  assertUnrevoked(state);
33943
35282
  var value = peek(source(state), prop);
33944
35283
  if (state.finalizing) { return value; } // Create a draft if the value is unmodified.
@@ -33989,17 +35328,17 @@ function clonePotentialDraft(base) {
33989
35328
  }
33990
35329
 
33991
35330
  function proxyProperty(draft, prop, enumerable) {
33992
- var desc = descriptors[prop];
35331
+ var desc = descriptors$1[prop];
33993
35332
 
33994
35333
  if (desc) {
33995
35334
  desc.enumerable = enumerable;
33996
35335
  } else {
33997
- descriptors[prop] = desc = {
35336
+ descriptors$1[prop] = desc = {
33998
35337
  configurable: true,
33999
35338
  enumerable: enumerable,
34000
35339
 
34001
- get: function get$1() {
34002
- return get(this[DRAFT_STATE], prop);
35340
+ get: function get$1$1() {
35341
+ return get$1(this[DRAFT_STATE], prop);
34003
35342
  },
34004
35343
 
34005
35344
  set: function set$1$1(value) {
@@ -34045,7 +35384,7 @@ function markChangesRecursively(object) {
34045
35384
  // Look for added keys.
34046
35385
  Object.keys(draft).forEach(function (key) {
34047
35386
  // The `undefined` check is a fast path for pre-existing keys.
34048
- if (base[key] === undefined && !has(base, key)) {
35387
+ if (base[key] === undefined && !has$1(base, key)) {
34049
35388
  assigned[key] = true;
34050
35389
  markChanged(state);
34051
35390
  } else if (!assigned[key]) {
@@ -34056,7 +35395,7 @@ function markChangesRecursively(object) {
34056
35395
 
34057
35396
  Object.keys(base).forEach(function (key) {
34058
35397
  // The `undefined` check is a fast path for pre-existing keys.
34059
- if (draft[key] === undefined && !has(draft, key)) {
35398
+ if (draft[key] === undefined && !has$1(draft, key)) {
34060
35399
  assigned[key] = false;
34061
35400
  markChanged(state);
34062
35401
  }
@@ -34089,7 +35428,7 @@ function hasObjectChanges(state) {
34089
35428
  var key = keys[i];
34090
35429
  var baseValue = base[key]; // The `undefined` check is a fast path for pre-existing keys.
34091
35430
 
34092
- if (baseValue === undefined && !has(base, key)) {
35431
+ if (baseValue === undefined && !has$1(base, key)) {
34093
35432
  return true;
34094
35433
  } // Once a base key is deleted, future changes go undetected, because its
34095
35434
  // descriptor is erased. This branch detects any missed changes.
@@ -34174,7 +35513,7 @@ function createProxy$1(base, parent) {
34174
35513
  return proxy;
34175
35514
  }
34176
35515
  var objectTraps = {
34177
- get: get$1,
35516
+ get: get$1$1,
34178
35517
 
34179
35518
  has: function has(target, prop) {
34180
35519
  return prop in source$1(target);
@@ -34186,7 +35525,7 @@ var objectTraps = {
34186
35525
 
34187
35526
  set: set$1$1,
34188
35527
  deleteProperty: deleteProperty,
34189
- getOwnPropertyDescriptor: getOwnPropertyDescriptor,
35528
+ getOwnPropertyDescriptor: getOwnPropertyDescriptor$2,
34190
35529
 
34191
35530
  defineProperty: function defineProperty() {
34192
35531
  throw new Error("Object.defineProperty() cannot be used on an Immer draft"); // prettier-ignore
@@ -34237,11 +35576,11 @@ function peek$1(draft, prop) {
34237
35576
  return desc && desc.value;
34238
35577
  }
34239
35578
 
34240
- function get$1(state, prop) {
35579
+ function get$1$1(state, prop) {
34241
35580
  if (prop === DRAFT_STATE) { return state; }
34242
35581
  var drafts = state.drafts; // Check for existing draft in unmodified state.
34243
35582
 
34244
- if (!state.modified && has(drafts, prop)) {
35583
+ if (!state.modified && has$1(drafts, prop)) {
34245
35584
  return drafts[prop];
34246
35585
  }
34247
35586
 
@@ -34294,7 +35633,7 @@ function deleteProperty(state, prop) {
34294
35633
  // the same guarantee in ES5 mode.
34295
35634
 
34296
35635
 
34297
- function getOwnPropertyDescriptor(state, prop) {
35636
+ function getOwnPropertyDescriptor$2(state, prop) {
34298
35637
  var owner = source$1(state);
34299
35638
  var desc = Reflect.getOwnPropertyDescriptor(owner, prop);
34300
35639
 
@@ -34713,7 +36052,7 @@ Immer.prototype.finalize = function finalize (draft, path, scope) {
34713
36052
  var base = state.base;
34714
36053
  var copy = state.copy;
34715
36054
  each(base, function (prop) {
34716
- if (!has(copy, prop)) { this$1$1.onDelete(state, prop); }
36055
+ if (!has$1(copy, prop)) { this$1$1.onDelete(state, prop); }
34717
36056
  });
34718
36057
  }
34719
36058
  }
@@ -34892,7 +36231,7 @@ const createInitialState = formConfig => {
34892
36231
  };
34893
36232
 
34894
36233
  const SET = "field/SET";
34895
- const set = fieldName => value => ({
36234
+ const set$2 = fieldName => value => ({
34896
36235
  type: SET,
34897
36236
  payload: { fieldName, value }
34898
36237
  });
@@ -34972,7 +36311,7 @@ const createMapDispatchToProps = formConfig => {
34972
36311
  const keys = Object.keys(formConfig);
34973
36312
  for (let fieldName of keys) {
34974
36313
  dispatchObj.fields[fieldName] = {
34975
- set: value => dispatch(set(fieldName)(value)),
36314
+ set: value => dispatch(set$2(fieldName)(value)),
34976
36315
  addValidator: validator => dispatch(addValidator(fieldName)(validator))
34977
36316
  };
34978
36317
  }
@@ -37908,7 +39247,7 @@ var tabbable_1 = tabbable;
37908
39247
 
37909
39248
  var immutable = extend;
37910
39249
 
37911
- var hasOwnProperty = Object.prototype.hasOwnProperty;
39250
+ var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
37912
39251
 
37913
39252
  function extend() {
37914
39253
  var target = {};
@@ -37917,7 +39256,7 @@ function extend() {
37917
39256
  var source = arguments[i];
37918
39257
 
37919
39258
  for (var key in source) {
37920
- if (hasOwnProperty.call(source, key)) {
39259
+ if (hasOwnProperty$1.call(source, key)) {
37921
39260
  target[key] = source[key];
37922
39261
  }
37923
39262
  }