@thecb/components 6.0.0-beta.7 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -6301,7 +6301,7 @@ var _excluded$3 = ["padding", "borderSize", "borderColor", "borderRadius", "boxS
6301
6301
  completely off screen (only for users of screen readers)
6302
6302
  */
6303
6303
 
6304
- var Box = function Box(_ref) {
6304
+ var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
6305
6305
  var _ref$padding = _ref.padding,
6306
6306
  padding = _ref$padding === void 0 ? "16px" : _ref$padding,
6307
6307
  _ref$borderSize = _ref.borderSize,
@@ -6371,9 +6371,10 @@ var Box = function Box(_ref) {
6371
6371
  onMouseLeave: onMouseLeave,
6372
6372
  onFocus: onFocus,
6373
6373
  onBlur: onBlur,
6374
- onTouchEnd: onTouchEnd
6375
- }, rest), safeChildren(children, /*#__PURE__*/React.createElement(Fragment, null)));
6376
- };
6374
+ onTouchEnd: onTouchEnd,
6375
+ ref: ref
6376
+ }, rest), children && safeChildren(children, /*#__PURE__*/React.createElement(Fragment, null)));
6377
+ });
6377
6378
 
6378
6379
  var CenterWrapper = styled.div.withConfig({
6379
6380
  displayName: "Centerstyled__CenterWrapper",
@@ -19390,6 +19391,1254 @@ var DropdownIcon = function DropdownIcon() {
19390
19391
  })))));
19391
19392
  };
19392
19393
 
19394
+ var check = function (it) {
19395
+ return it && it.Math == Math && it;
19396
+ };
19397
+
19398
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
19399
+ var global_1 =
19400
+ // eslint-disable-next-line es-x/no-global-this -- safe
19401
+ check(typeof globalThis == 'object' && globalThis) ||
19402
+ check(typeof window == 'object' && window) ||
19403
+ // eslint-disable-next-line no-restricted-globals -- safe
19404
+ check(typeof self == 'object' && self) ||
19405
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
19406
+ // eslint-disable-next-line no-new-func -- fallback
19407
+ (function () { return this; })() || Function('return this')();
19408
+
19409
+ var fails = function (exec) {
19410
+ try {
19411
+ return !!exec();
19412
+ } catch (error) {
19413
+ return true;
19414
+ }
19415
+ };
19416
+
19417
+ // Detect IE8's incomplete defineProperty implementation
19418
+ var descriptors = !fails(function () {
19419
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
19420
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
19421
+ });
19422
+
19423
+ var functionBindNative = !fails(function () {
19424
+ // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
19425
+ var test = (function () { /* empty */ }).bind();
19426
+ // eslint-disable-next-line no-prototype-builtins -- safe
19427
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
19428
+ });
19429
+
19430
+ var call = Function.prototype.call;
19431
+
19432
+ var functionCall = functionBindNative ? call.bind(call) : function () {
19433
+ return call.apply(call, arguments);
19434
+ };
19435
+
19436
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
19437
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
19438
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
19439
+
19440
+ // Nashorn ~ JDK8 bug
19441
+ var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
19442
+
19443
+ // `Object.prototype.propertyIsEnumerable` method implementation
19444
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
19445
+ var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
19446
+ var descriptor = getOwnPropertyDescriptor(this, V);
19447
+ return !!descriptor && descriptor.enumerable;
19448
+ } : $propertyIsEnumerable;
19449
+
19450
+ var objectPropertyIsEnumerable = {
19451
+ f: f
19452
+ };
19453
+
19454
+ var createPropertyDescriptor = function (bitmap, value) {
19455
+ return {
19456
+ enumerable: !(bitmap & 1),
19457
+ configurable: !(bitmap & 2),
19458
+ writable: !(bitmap & 4),
19459
+ value: value
19460
+ };
19461
+ };
19462
+
19463
+ var FunctionPrototype = Function.prototype;
19464
+ var bind$1 = FunctionPrototype.bind;
19465
+ var call$1 = FunctionPrototype.call;
19466
+ var uncurryThis = functionBindNative && bind$1.bind(call$1, call$1);
19467
+
19468
+ var functionUncurryThis = functionBindNative ? function (fn) {
19469
+ return fn && uncurryThis(fn);
19470
+ } : function (fn) {
19471
+ return fn && function () {
19472
+ return call$1.apply(fn, arguments);
19473
+ };
19474
+ };
19475
+
19476
+ var toString$2 = functionUncurryThis({}.toString);
19477
+ var stringSlice = functionUncurryThis(''.slice);
19478
+
19479
+ var classofRaw = function (it) {
19480
+ return stringSlice(toString$2(it), 8, -1);
19481
+ };
19482
+
19483
+ var Object$1 = global_1.Object;
19484
+ var split = functionUncurryThis(''.split);
19485
+
19486
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
19487
+ var indexedObject = fails(function () {
19488
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
19489
+ // eslint-disable-next-line no-prototype-builtins -- safe
19490
+ return !Object$1('z').propertyIsEnumerable(0);
19491
+ }) ? function (it) {
19492
+ return classofRaw(it) == 'String' ? split(it, '') : Object$1(it);
19493
+ } : Object$1;
19494
+
19495
+ var TypeError$1 = global_1.TypeError;
19496
+
19497
+ // `RequireObjectCoercible` abstract operation
19498
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
19499
+ var requireObjectCoercible = function (it) {
19500
+ if (it == undefined) throw TypeError$1("Can't call method on " + it);
19501
+ return it;
19502
+ };
19503
+
19504
+ // toObject with fallback for non-array-like ES3 strings
19505
+
19506
+
19507
+
19508
+ var toIndexedObject = function (it) {
19509
+ return indexedObject(requireObjectCoercible(it));
19510
+ };
19511
+
19512
+ // `IsCallable` abstract operation
19513
+ // https://tc39.es/ecma262/#sec-iscallable
19514
+ var isCallable = function (argument) {
19515
+ return typeof argument == 'function';
19516
+ };
19517
+
19518
+ var isObject = function (it) {
19519
+ return typeof it == 'object' ? it !== null : isCallable(it);
19520
+ };
19521
+
19522
+ var aFunction = function (argument) {
19523
+ return isCallable(argument) ? argument : undefined;
19524
+ };
19525
+
19526
+ var getBuiltIn = function (namespace, method) {
19527
+ return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
19528
+ };
19529
+
19530
+ var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
19531
+
19532
+ var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
19533
+
19534
+ var process$1 = global_1.process;
19535
+ var Deno = global_1.Deno;
19536
+ var versions = process$1 && process$1.versions || Deno && Deno.version;
19537
+ var v8 = versions && versions.v8;
19538
+ var match, version;
19539
+
19540
+ if (v8) {
19541
+ match = v8.split('.');
19542
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
19543
+ // but their correct versions are not interesting for us
19544
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
19545
+ }
19546
+
19547
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
19548
+ // so check `userAgent` even if `.v8` exists, but 0
19549
+ if (!version && engineUserAgent) {
19550
+ match = engineUserAgent.match(/Edge\/(\d+)/);
19551
+ if (!match || match[1] >= 74) {
19552
+ match = engineUserAgent.match(/Chrome\/(\d+)/);
19553
+ if (match) version = +match[1];
19554
+ }
19555
+ }
19556
+
19557
+ var engineV8Version = version;
19558
+
19559
+ /* eslint-disable es-x/no-symbol -- required for testing */
19560
+
19561
+
19562
+
19563
+ // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
19564
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
19565
+ var symbol = Symbol();
19566
+ // Chrome 38 Symbol has incorrect toString conversion
19567
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
19568
+ return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
19569
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
19570
+ !Symbol.sham && engineV8Version && engineV8Version < 41;
19571
+ });
19572
+
19573
+ /* eslint-disable es-x/no-symbol -- required for testing */
19574
+
19575
+
19576
+ var useSymbolAsUid = nativeSymbol
19577
+ && !Symbol.sham
19578
+ && typeof Symbol.iterator == 'symbol';
19579
+
19580
+ var Object$2 = global_1.Object;
19581
+
19582
+ var isSymbol = useSymbolAsUid ? function (it) {
19583
+ return typeof it == 'symbol';
19584
+ } : function (it) {
19585
+ var $Symbol = getBuiltIn('Symbol');
19586
+ return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$2(it));
19587
+ };
19588
+
19589
+ var String$1 = global_1.String;
19590
+
19591
+ var tryToString = function (argument) {
19592
+ try {
19593
+ return String$1(argument);
19594
+ } catch (error) {
19595
+ return 'Object';
19596
+ }
19597
+ };
19598
+
19599
+ var TypeError$2 = global_1.TypeError;
19600
+
19601
+ // `Assert: IsCallable(argument) is true`
19602
+ var aCallable = function (argument) {
19603
+ if (isCallable(argument)) return argument;
19604
+ throw TypeError$2(tryToString(argument) + ' is not a function');
19605
+ };
19606
+
19607
+ // `GetMethod` abstract operation
19608
+ // https://tc39.es/ecma262/#sec-getmethod
19609
+ var getMethod = function (V, P) {
19610
+ var func = V[P];
19611
+ return func == null ? undefined : aCallable(func);
19612
+ };
19613
+
19614
+ var TypeError$3 = global_1.TypeError;
19615
+
19616
+ // `OrdinaryToPrimitive` abstract operation
19617
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
19618
+ var ordinaryToPrimitive = function (input, pref) {
19619
+ var fn, val;
19620
+ if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
19621
+ if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
19622
+ if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
19623
+ throw TypeError$3("Can't convert object to primitive value");
19624
+ };
19625
+
19626
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
19627
+ var defineProperty = Object.defineProperty;
19628
+
19629
+ var setGlobal = function (key, value) {
19630
+ try {
19631
+ defineProperty(global_1, key, { value: value, configurable: true, writable: true });
19632
+ } catch (error) {
19633
+ global_1[key] = value;
19634
+ } return value;
19635
+ };
19636
+
19637
+ var SHARED = '__core-js_shared__';
19638
+ var store = global_1[SHARED] || setGlobal(SHARED, {});
19639
+
19640
+ var sharedStore = store;
19641
+
19642
+ var shared = createCommonjsModule(function (module) {
19643
+ (module.exports = function (key, value) {
19644
+ return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
19645
+ })('versions', []).push({
19646
+ version: '3.22.5',
19647
+ mode: 'global',
19648
+ copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
19649
+ license: 'https://github.com/zloirock/core-js/blob/v3.22.5/LICENSE',
19650
+ source: 'https://github.com/zloirock/core-js'
19651
+ });
19652
+ });
19653
+
19654
+ var Object$3 = global_1.Object;
19655
+
19656
+ // `ToObject` abstract operation
19657
+ // https://tc39.es/ecma262/#sec-toobject
19658
+ var toObject = function (argument) {
19659
+ return Object$3(requireObjectCoercible(argument));
19660
+ };
19661
+
19662
+ var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
19663
+
19664
+ // `HasOwnProperty` abstract operation
19665
+ // https://tc39.es/ecma262/#sec-hasownproperty
19666
+ // eslint-disable-next-line es-x/no-object-hasown -- safe
19667
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
19668
+ return hasOwnProperty(toObject(it), key);
19669
+ };
19670
+
19671
+ var id = 0;
19672
+ var postfix = Math.random();
19673
+ var toString$3 = functionUncurryThis(1.0.toString);
19674
+
19675
+ var uid = function (key) {
19676
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
19677
+ };
19678
+
19679
+ var WellKnownSymbolsStore = shared('wks');
19680
+ var Symbol$1 = global_1.Symbol;
19681
+ var symbolFor = Symbol$1 && Symbol$1['for'];
19682
+ var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
19683
+
19684
+ var wellKnownSymbol = function (name) {
19685
+ if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
19686
+ var description = 'Symbol.' + name;
19687
+ if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
19688
+ WellKnownSymbolsStore[name] = Symbol$1[name];
19689
+ } else if (useSymbolAsUid && symbolFor) {
19690
+ WellKnownSymbolsStore[name] = symbolFor(description);
19691
+ } else {
19692
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
19693
+ }
19694
+ } return WellKnownSymbolsStore[name];
19695
+ };
19696
+
19697
+ var TypeError$4 = global_1.TypeError;
19698
+ var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
19699
+
19700
+ // `ToPrimitive` abstract operation
19701
+ // https://tc39.es/ecma262/#sec-toprimitive
19702
+ var toPrimitive = function (input, pref) {
19703
+ if (!isObject(input) || isSymbol(input)) return input;
19704
+ var exoticToPrim = getMethod(input, TO_PRIMITIVE);
19705
+ var result;
19706
+ if (exoticToPrim) {
19707
+ if (pref === undefined) pref = 'default';
19708
+ result = functionCall(exoticToPrim, input, pref);
19709
+ if (!isObject(result) || isSymbol(result)) return result;
19710
+ throw TypeError$4("Can't convert object to primitive value");
19711
+ }
19712
+ if (pref === undefined) pref = 'number';
19713
+ return ordinaryToPrimitive(input, pref);
19714
+ };
19715
+
19716
+ // `ToPropertyKey` abstract operation
19717
+ // https://tc39.es/ecma262/#sec-topropertykey
19718
+ var toPropertyKey = function (argument) {
19719
+ var key = toPrimitive(argument, 'string');
19720
+ return isSymbol(key) ? key : key + '';
19721
+ };
19722
+
19723
+ var document$1 = global_1.document;
19724
+ // typeof document.createElement is 'object' in old IE
19725
+ var EXISTS = isObject(document$1) && isObject(document$1.createElement);
19726
+
19727
+ var documentCreateElement = function (it) {
19728
+ return EXISTS ? document$1.createElement(it) : {};
19729
+ };
19730
+
19731
+ // Thanks to IE8 for its funny defineProperty
19732
+ var ie8DomDefine = !descriptors && !fails(function () {
19733
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
19734
+ return Object.defineProperty(documentCreateElement('div'), 'a', {
19735
+ get: function () { return 7; }
19736
+ }).a != 7;
19737
+ });
19738
+
19739
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
19740
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
19741
+
19742
+ // `Object.getOwnPropertyDescriptor` method
19743
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
19744
+ var f$1 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
19745
+ O = toIndexedObject(O);
19746
+ P = toPropertyKey(P);
19747
+ if (ie8DomDefine) try {
19748
+ return $getOwnPropertyDescriptor(O, P);
19749
+ } catch (error) { /* empty */ }
19750
+ if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
19751
+ };
19752
+
19753
+ var objectGetOwnPropertyDescriptor = {
19754
+ f: f$1
19755
+ };
19756
+
19757
+ // V8 ~ Chrome 36-
19758
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
19759
+ var v8PrototypeDefineBug = descriptors && fails(function () {
19760
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
19761
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
19762
+ value: 42,
19763
+ writable: false
19764
+ }).prototype != 42;
19765
+ });
19766
+
19767
+ var String$2 = global_1.String;
19768
+ var TypeError$5 = global_1.TypeError;
19769
+
19770
+ // `Assert: Type(argument) is Object`
19771
+ var anObject = function (argument) {
19772
+ if (isObject(argument)) return argument;
19773
+ throw TypeError$5(String$2(argument) + ' is not an object');
19774
+ };
19775
+
19776
+ var TypeError$6 = global_1.TypeError;
19777
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
19778
+ var $defineProperty = Object.defineProperty;
19779
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
19780
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
19781
+ var ENUMERABLE = 'enumerable';
19782
+ var CONFIGURABLE = 'configurable';
19783
+ var WRITABLE = 'writable';
19784
+
19785
+ // `Object.defineProperty` method
19786
+ // https://tc39.es/ecma262/#sec-object.defineproperty
19787
+ var f$2 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
19788
+ anObject(O);
19789
+ P = toPropertyKey(P);
19790
+ anObject(Attributes);
19791
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
19792
+ var current = $getOwnPropertyDescriptor$1(O, P);
19793
+ if (current && current[WRITABLE]) {
19794
+ O[P] = Attributes.value;
19795
+ Attributes = {
19796
+ configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
19797
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
19798
+ writable: false
19799
+ };
19800
+ }
19801
+ } return $defineProperty(O, P, Attributes);
19802
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
19803
+ anObject(O);
19804
+ P = toPropertyKey(P);
19805
+ anObject(Attributes);
19806
+ if (ie8DomDefine) try {
19807
+ return $defineProperty(O, P, Attributes);
19808
+ } catch (error) { /* empty */ }
19809
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError$6('Accessors not supported');
19810
+ if ('value' in Attributes) O[P] = Attributes.value;
19811
+ return O;
19812
+ };
19813
+
19814
+ var objectDefineProperty = {
19815
+ f: f$2
19816
+ };
19817
+
19818
+ var createNonEnumerableProperty = descriptors ? function (object, key, value) {
19819
+ return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
19820
+ } : function (object, key, value) {
19821
+ object[key] = value;
19822
+ return object;
19823
+ };
19824
+
19825
+ var FunctionPrototype$1 = Function.prototype;
19826
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
19827
+ var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
19828
+
19829
+ var EXISTS$1 = hasOwnProperty_1(FunctionPrototype$1, 'name');
19830
+ // additional protection from minified / mangled / dropped function names
19831
+ var PROPER = EXISTS$1 && (function something() { /* empty */ }).name === 'something';
19832
+ var CONFIGURABLE$1 = EXISTS$1 && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable));
19833
+
19834
+ var functionName = {
19835
+ EXISTS: EXISTS$1,
19836
+ PROPER: PROPER,
19837
+ CONFIGURABLE: CONFIGURABLE$1
19838
+ };
19839
+
19840
+ var functionToString = functionUncurryThis(Function.toString);
19841
+
19842
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
19843
+ if (!isCallable(sharedStore.inspectSource)) {
19844
+ sharedStore.inspectSource = function (it) {
19845
+ return functionToString(it);
19846
+ };
19847
+ }
19848
+
19849
+ var inspectSource = sharedStore.inspectSource;
19850
+
19851
+ var WeakMap$1 = global_1.WeakMap;
19852
+
19853
+ var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
19854
+
19855
+ var keys$1 = shared('keys');
19856
+
19857
+ var sharedKey = function (key) {
19858
+ return keys$1[key] || (keys$1[key] = uid(key));
19859
+ };
19860
+
19861
+ var hiddenKeys = {};
19862
+
19863
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
19864
+ var TypeError$7 = global_1.TypeError;
19865
+ var WeakMap$2 = global_1.WeakMap;
19866
+ var set, get, has;
19867
+
19868
+ var enforce = function (it) {
19869
+ return has(it) ? get(it) : set(it, {});
19870
+ };
19871
+
19872
+ var getterFor = function (TYPE) {
19873
+ return function (it) {
19874
+ var state;
19875
+ if (!isObject(it) || (state = get(it)).type !== TYPE) {
19876
+ throw TypeError$7('Incompatible receiver, ' + TYPE + ' required');
19877
+ } return state;
19878
+ };
19879
+ };
19880
+
19881
+ if (nativeWeakMap || sharedStore.state) {
19882
+ var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$2());
19883
+ var wmget = functionUncurryThis(store$1.get);
19884
+ var wmhas = functionUncurryThis(store$1.has);
19885
+ var wmset = functionUncurryThis(store$1.set);
19886
+ set = function (it, metadata) {
19887
+ if (wmhas(store$1, it)) throw new TypeError$7(OBJECT_ALREADY_INITIALIZED);
19888
+ metadata.facade = it;
19889
+ wmset(store$1, it, metadata);
19890
+ return metadata;
19891
+ };
19892
+ get = function (it) {
19893
+ return wmget(store$1, it) || {};
19894
+ };
19895
+ has = function (it) {
19896
+ return wmhas(store$1, it);
19897
+ };
19898
+ } else {
19899
+ var STATE = sharedKey('state');
19900
+ hiddenKeys[STATE] = true;
19901
+ set = function (it, metadata) {
19902
+ if (hasOwnProperty_1(it, STATE)) throw new TypeError$7(OBJECT_ALREADY_INITIALIZED);
19903
+ metadata.facade = it;
19904
+ createNonEnumerableProperty(it, STATE, metadata);
19905
+ return metadata;
19906
+ };
19907
+ get = function (it) {
19908
+ return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
19909
+ };
19910
+ has = function (it) {
19911
+ return hasOwnProperty_1(it, STATE);
19912
+ };
19913
+ }
19914
+
19915
+ var internalState = {
19916
+ set: set,
19917
+ get: get,
19918
+ has: has,
19919
+ enforce: enforce,
19920
+ getterFor: getterFor
19921
+ };
19922
+
19923
+ var makeBuiltIn_1 = createCommonjsModule(function (module) {
19924
+ var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
19925
+
19926
+
19927
+
19928
+ var enforceInternalState = internalState.enforce;
19929
+ var getInternalState = internalState.get;
19930
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
19931
+ var defineProperty = Object.defineProperty;
19932
+
19933
+ var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
19934
+ return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
19935
+ });
19936
+
19937
+ var TEMPLATE = String(String).split('String');
19938
+
19939
+ var makeBuiltIn = module.exports = function (value, name, options) {
19940
+ if (String(name).slice(0, 7) === 'Symbol(') {
19941
+ name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
19942
+ }
19943
+ if (options && options.getter) name = 'get ' + name;
19944
+ if (options && options.setter) name = 'set ' + name;
19945
+ if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
19946
+ defineProperty(value, 'name', { value: name, configurable: true });
19947
+ }
19948
+ if (CONFIGURABLE_LENGTH && options && hasOwnProperty_1(options, 'arity') && value.length !== options.arity) {
19949
+ defineProperty(value, 'length', { value: options.arity });
19950
+ }
19951
+ if (options && hasOwnProperty_1(options, 'constructor') && options.constructor) {
19952
+ if (descriptors) try {
19953
+ defineProperty(value, 'prototype', { writable: false });
19954
+ } catch (error) { /* empty */ }
19955
+ } else value.prototype = undefined;
19956
+ var state = enforceInternalState(value);
19957
+ if (!hasOwnProperty_1(state, 'source')) {
19958
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
19959
+ } return value;
19960
+ };
19961
+
19962
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
19963
+ // eslint-disable-next-line no-extend-native -- required
19964
+ Function.prototype.toString = makeBuiltIn(function toString() {
19965
+ return isCallable(this) && getInternalState(this).source || inspectSource(this);
19966
+ }, 'toString');
19967
+ });
19968
+
19969
+ var defineBuiltIn = function (O, key, value, options) {
19970
+ var unsafe = options ? !!options.unsafe : false;
19971
+ var simple = options ? !!options.enumerable : false;
19972
+ var noTargetGet = options ? !!options.noTargetGet : false;
19973
+ var name = options && options.name !== undefined ? options.name : key;
19974
+ if (isCallable(value)) makeBuiltIn_1(value, name, options);
19975
+ if (O === global_1) {
19976
+ if (simple) O[key] = value;
19977
+ else setGlobal(key, value);
19978
+ return O;
19979
+ } else if (!unsafe) {
19980
+ delete O[key];
19981
+ } else if (!noTargetGet && O[key]) {
19982
+ simple = true;
19983
+ }
19984
+ if (simple) O[key] = value;
19985
+ else createNonEnumerableProperty(O, key, value);
19986
+ return O;
19987
+ };
19988
+
19989
+ var ceil = Math.ceil;
19990
+ var floor = Math.floor;
19991
+
19992
+ // `ToIntegerOrInfinity` abstract operation
19993
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
19994
+ var toIntegerOrInfinity = function (argument) {
19995
+ var number = +argument;
19996
+ // eslint-disable-next-line no-self-compare -- safe
19997
+ return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
19998
+ };
19999
+
20000
+ var max = Math.max;
20001
+ var min = Math.min;
20002
+
20003
+ // Helper for a popular repeating case of the spec:
20004
+ // Let integer be ? ToInteger(index).
20005
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
20006
+ var toAbsoluteIndex = function (index, length) {
20007
+ var integer = toIntegerOrInfinity(index);
20008
+ return integer < 0 ? max(integer + length, 0) : min(integer, length);
20009
+ };
20010
+
20011
+ var min$1 = Math.min;
20012
+
20013
+ // `ToLength` abstract operation
20014
+ // https://tc39.es/ecma262/#sec-tolength
20015
+ var toLength = function (argument) {
20016
+ return argument > 0 ? min$1(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
20017
+ };
20018
+
20019
+ // `LengthOfArrayLike` abstract operation
20020
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
20021
+ var lengthOfArrayLike = function (obj) {
20022
+ return toLength(obj.length);
20023
+ };
20024
+
20025
+ // `Array.prototype.{ indexOf, includes }` methods implementation
20026
+ var createMethod = function (IS_INCLUDES) {
20027
+ return function ($this, el, fromIndex) {
20028
+ var O = toIndexedObject($this);
20029
+ var length = lengthOfArrayLike(O);
20030
+ var index = toAbsoluteIndex(fromIndex, length);
20031
+ var value;
20032
+ // Array#includes uses SameValueZero equality algorithm
20033
+ // eslint-disable-next-line no-self-compare -- NaN check
20034
+ if (IS_INCLUDES && el != el) while (length > index) {
20035
+ value = O[index++];
20036
+ // eslint-disable-next-line no-self-compare -- NaN check
20037
+ if (value != value) return true;
20038
+ // Array#indexOf ignores holes, Array#includes - not
20039
+ } else for (;length > index; index++) {
20040
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
20041
+ } return !IS_INCLUDES && -1;
20042
+ };
20043
+ };
20044
+
20045
+ var arrayIncludes = {
20046
+ // `Array.prototype.includes` method
20047
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
20048
+ includes: createMethod(true),
20049
+ // `Array.prototype.indexOf` method
20050
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
20051
+ indexOf: createMethod(false)
20052
+ };
20053
+
20054
+ var indexOf = arrayIncludes.indexOf;
20055
+
20056
+
20057
+ var push = functionUncurryThis([].push);
20058
+
20059
+ var objectKeysInternal = function (object, names) {
20060
+ var O = toIndexedObject(object);
20061
+ var i = 0;
20062
+ var result = [];
20063
+ var key;
20064
+ for (key in O) !hasOwnProperty_1(hiddenKeys, key) && hasOwnProperty_1(O, key) && push(result, key);
20065
+ // Don't enum bug & hidden keys
20066
+ while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
20067
+ ~indexOf(result, key) || push(result, key);
20068
+ }
20069
+ return result;
20070
+ };
20071
+
20072
+ // IE8- don't enum bug keys
20073
+ var enumBugKeys = [
20074
+ 'constructor',
20075
+ 'hasOwnProperty',
20076
+ 'isPrototypeOf',
20077
+ 'propertyIsEnumerable',
20078
+ 'toLocaleString',
20079
+ 'toString',
20080
+ 'valueOf'
20081
+ ];
20082
+
20083
+ var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
20084
+
20085
+ // `Object.getOwnPropertyNames` method
20086
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
20087
+ // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
20088
+ var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
20089
+ return objectKeysInternal(O, hiddenKeys$1);
20090
+ };
20091
+
20092
+ var objectGetOwnPropertyNames = {
20093
+ f: f$3
20094
+ };
20095
+
20096
+ // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
20097
+ var f$4 = Object.getOwnPropertySymbols;
20098
+
20099
+ var objectGetOwnPropertySymbols = {
20100
+ f: f$4
20101
+ };
20102
+
20103
+ var concat = functionUncurryThis([].concat);
20104
+
20105
+ // all object keys, includes non-enumerable and symbols
20106
+ var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
20107
+ var keys = objectGetOwnPropertyNames.f(anObject(it));
20108
+ var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
20109
+ return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
20110
+ };
20111
+
20112
+ var copyConstructorProperties = function (target, source, exceptions) {
20113
+ var keys = ownKeys$1(source);
20114
+ var defineProperty = objectDefineProperty.f;
20115
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
20116
+ for (var i = 0; i < keys.length; i++) {
20117
+ var key = keys[i];
20118
+ if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
20119
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
20120
+ }
20121
+ }
20122
+ };
20123
+
20124
+ var replacement = /#|\.prototype\./;
20125
+
20126
+ var isForced = function (feature, detection) {
20127
+ var value = data[normalize(feature)];
20128
+ return value == POLYFILL ? true
20129
+ : value == NATIVE ? false
20130
+ : isCallable(detection) ? fails(detection)
20131
+ : !!detection;
20132
+ };
20133
+
20134
+ var normalize = isForced.normalize = function (string) {
20135
+ return String(string).replace(replacement, '.').toLowerCase();
20136
+ };
20137
+
20138
+ var data = isForced.data = {};
20139
+ var NATIVE = isForced.NATIVE = 'N';
20140
+ var POLYFILL = isForced.POLYFILL = 'P';
20141
+
20142
+ var isForced_1 = isForced;
20143
+
20144
+ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
20145
+
20146
+
20147
+
20148
+
20149
+
20150
+
20151
+ /*
20152
+ options.target - name of the target object
20153
+ options.global - target is the global object
20154
+ options.stat - export as static methods of target
20155
+ options.proto - export as prototype methods of target
20156
+ options.real - real prototype method for the `pure` version
20157
+ options.forced - export even if the native feature is available
20158
+ options.bind - bind methods to the target, required for the `pure` version
20159
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
20160
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
20161
+ options.sham - add a flag to not completely full polyfills
20162
+ options.enumerable - export as enumerable property
20163
+ options.noTargetGet - prevent calling a getter on target
20164
+ options.name - the .name of the function if it does not match the key
20165
+ */
20166
+ var _export = function (options, source) {
20167
+ var TARGET = options.target;
20168
+ var GLOBAL = options.global;
20169
+ var STATIC = options.stat;
20170
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
20171
+ if (GLOBAL) {
20172
+ target = global_1;
20173
+ } else if (STATIC) {
20174
+ target = global_1[TARGET] || setGlobal(TARGET, {});
20175
+ } else {
20176
+ target = (global_1[TARGET] || {}).prototype;
20177
+ }
20178
+ if (target) for (key in source) {
20179
+ sourceProperty = source[key];
20180
+ if (options.noTargetGet) {
20181
+ descriptor = getOwnPropertyDescriptor$1(target, key);
20182
+ targetProperty = descriptor && descriptor.value;
20183
+ } else targetProperty = target[key];
20184
+ FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
20185
+ // contained in target
20186
+ if (!FORCED && targetProperty !== undefined) {
20187
+ if (typeof sourceProperty == typeof targetProperty) continue;
20188
+ copyConstructorProperties(sourceProperty, targetProperty);
20189
+ }
20190
+ // add a flag to not completely full polyfills
20191
+ if (options.sham || (targetProperty && targetProperty.sham)) {
20192
+ createNonEnumerableProperty(sourceProperty, 'sham', true);
20193
+ }
20194
+ defineBuiltIn(target, key, sourceProperty, options);
20195
+ }
20196
+ };
20197
+
20198
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
20199
+ var test$1 = {};
20200
+
20201
+ test$1[TO_STRING_TAG] = 'z';
20202
+
20203
+ var toStringTagSupport = String(test$1) === '[object z]';
20204
+
20205
+ var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
20206
+ var Object$4 = global_1.Object;
20207
+
20208
+ // ES3 wrong here
20209
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
20210
+
20211
+ // fallback for IE11 Script Access Denied error
20212
+ var tryGet = function (it, key) {
20213
+ try {
20214
+ return it[key];
20215
+ } catch (error) { /* empty */ }
20216
+ };
20217
+
20218
+ // getting tag from ES6+ `Object.prototype.toString`
20219
+ var classof = toStringTagSupport ? classofRaw : function (it) {
20220
+ var O, tag, result;
20221
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
20222
+ // @@toStringTag case
20223
+ : typeof (tag = tryGet(O = Object$4(it), TO_STRING_TAG$1)) == 'string' ? tag
20224
+ // builtinTag case
20225
+ : CORRECT_ARGUMENTS ? classofRaw(O)
20226
+ // ES3 arguments fallback
20227
+ : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
20228
+ };
20229
+
20230
+ var String$3 = global_1.String;
20231
+
20232
+ var toString_1 = function (argument) {
20233
+ if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
20234
+ return String$3(argument);
20235
+ };
20236
+
20237
+ var charAt = functionUncurryThis(''.charAt);
20238
+
20239
+ var FORCED = fails(function () {
20240
+ // eslint-disable-next-line es-x/no-array-string-prototype-at -- safe
20241
+ return '𠮷'.at(-2) !== '\uD842';
20242
+ });
20243
+
20244
+ // `String.prototype.at` method
20245
+ // https://github.com/tc39/proposal-relative-indexing-method
20246
+ _export({ target: 'String', proto: true, forced: FORCED }, {
20247
+ at: function at(index) {
20248
+ var S = toString_1(requireObjectCoercible(this));
20249
+ var len = S.length;
20250
+ var relativeIndex = toIntegerOrInfinity(index);
20251
+ var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
20252
+ return (k < 0 || k >= len) ? undefined : charAt(S, k);
20253
+ }
20254
+ });
20255
+
20256
+ // `Object.keys` method
20257
+ // https://tc39.es/ecma262/#sec-object.keys
20258
+ // eslint-disable-next-line es-x/no-object-keys -- safe
20259
+ var objectKeys = Object.keys || function keys(O) {
20260
+ return objectKeysInternal(O, enumBugKeys);
20261
+ };
20262
+
20263
+ // `Object.defineProperties` method
20264
+ // https://tc39.es/ecma262/#sec-object.defineproperties
20265
+ // eslint-disable-next-line es-x/no-object-defineproperties -- safe
20266
+ var f$5 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
20267
+ anObject(O);
20268
+ var props = toIndexedObject(Properties);
20269
+ var keys = objectKeys(Properties);
20270
+ var length = keys.length;
20271
+ var index = 0;
20272
+ var key;
20273
+ while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
20274
+ return O;
20275
+ };
20276
+
20277
+ var objectDefineProperties = {
20278
+ f: f$5
20279
+ };
20280
+
20281
+ var html = getBuiltIn('document', 'documentElement');
20282
+
20283
+ /* global ActiveXObject -- old IE, WSH */
20284
+
20285
+
20286
+
20287
+
20288
+
20289
+
20290
+
20291
+
20292
+ var GT = '>';
20293
+ var LT = '<';
20294
+ var PROTOTYPE = 'prototype';
20295
+ var SCRIPT = 'script';
20296
+ var IE_PROTO = sharedKey('IE_PROTO');
20297
+
20298
+ var EmptyConstructor = function () { /* empty */ };
20299
+
20300
+ var scriptTag = function (content) {
20301
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
20302
+ };
20303
+
20304
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
20305
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
20306
+ activeXDocument.write(scriptTag(''));
20307
+ activeXDocument.close();
20308
+ var temp = activeXDocument.parentWindow.Object;
20309
+ activeXDocument = null; // avoid memory leak
20310
+ return temp;
20311
+ };
20312
+
20313
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
20314
+ var NullProtoObjectViaIFrame = function () {
20315
+ // Thrash, waste and sodomy: IE GC bug
20316
+ var iframe = documentCreateElement('iframe');
20317
+ var JS = 'java' + SCRIPT + ':';
20318
+ var iframeDocument;
20319
+ iframe.style.display = 'none';
20320
+ html.appendChild(iframe);
20321
+ // https://github.com/zloirock/core-js/issues/475
20322
+ iframe.src = String(JS);
20323
+ iframeDocument = iframe.contentWindow.document;
20324
+ iframeDocument.open();
20325
+ iframeDocument.write(scriptTag('document.F=Object'));
20326
+ iframeDocument.close();
20327
+ return iframeDocument.F;
20328
+ };
20329
+
20330
+ // Check for document.domain and active x support
20331
+ // No need to use active x approach when document.domain is not set
20332
+ // see https://github.com/es-shims/es5-shim/issues/150
20333
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
20334
+ // avoid IE GC bug
20335
+ var activeXDocument;
20336
+ var NullProtoObject = function () {
20337
+ try {
20338
+ activeXDocument = new ActiveXObject('htmlfile');
20339
+ } catch (error) { /* ignore */ }
20340
+ NullProtoObject = typeof document != 'undefined'
20341
+ ? document.domain && activeXDocument
20342
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
20343
+ : NullProtoObjectViaIFrame()
20344
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
20345
+ var length = enumBugKeys.length;
20346
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
20347
+ return NullProtoObject();
20348
+ };
20349
+
20350
+ hiddenKeys[IE_PROTO] = true;
20351
+
20352
+ // `Object.create` method
20353
+ // https://tc39.es/ecma262/#sec-object.create
20354
+ // eslint-disable-next-line es-x/no-object-create -- safe
20355
+ var objectCreate = Object.create || function create(O, Properties) {
20356
+ var result;
20357
+ if (O !== null) {
20358
+ EmptyConstructor[PROTOTYPE] = anObject(O);
20359
+ result = new EmptyConstructor();
20360
+ EmptyConstructor[PROTOTYPE] = null;
20361
+ // add "__proto__" for Object.getPrototypeOf polyfill
20362
+ result[IE_PROTO] = O;
20363
+ } else result = NullProtoObject();
20364
+ return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
20365
+ };
20366
+
20367
+ var UNSCOPABLES = wellKnownSymbol('unscopables');
20368
+ var ArrayPrototype = Array.prototype;
20369
+
20370
+ // Array.prototype[@@unscopables]
20371
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
20372
+ if (ArrayPrototype[UNSCOPABLES] == undefined) {
20373
+ objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
20374
+ configurable: true,
20375
+ value: objectCreate(null)
20376
+ });
20377
+ }
20378
+
20379
+ // add a key to Array.prototype[@@unscopables]
20380
+ var addToUnscopables = function (key) {
20381
+ ArrayPrototype[UNSCOPABLES][key] = true;
20382
+ };
20383
+
20384
+ // `Array.prototype.at` method
20385
+ // https://github.com/tc39/proposal-relative-indexing-method
20386
+ _export({ target: 'Array', proto: true }, {
20387
+ at: function at(index) {
20388
+ var O = toObject(this);
20389
+ var len = lengthOfArrayLike(O);
20390
+ var relativeIndex = toIntegerOrInfinity(index);
20391
+ var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
20392
+ return (k < 0 || k >= len) ? undefined : O[k];
20393
+ }
20394
+ });
20395
+
20396
+ addToUnscopables('at');
20397
+
20398
+ // eslint-disable-next-line es-x/no-typed-arrays -- safe
20399
+ var arrayBufferNative = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
20400
+
20401
+ var correctPrototypeGetter = !fails(function () {
20402
+ function F() { /* empty */ }
20403
+ F.prototype.constructor = null;
20404
+ // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
20405
+ return Object.getPrototypeOf(new F()) !== F.prototype;
20406
+ });
20407
+
20408
+ var IE_PROTO$1 = sharedKey('IE_PROTO');
20409
+ var Object$5 = global_1.Object;
20410
+ var ObjectPrototype = Object$5.prototype;
20411
+
20412
+ // `Object.getPrototypeOf` method
20413
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
20414
+ var objectGetPrototypeOf = correctPrototypeGetter ? Object$5.getPrototypeOf : function (O) {
20415
+ var object = toObject(O);
20416
+ if (hasOwnProperty_1(object, IE_PROTO$1)) return object[IE_PROTO$1];
20417
+ var constructor = object.constructor;
20418
+ if (isCallable(constructor) && object instanceof constructor) {
20419
+ return constructor.prototype;
20420
+ } return object instanceof Object$5 ? ObjectPrototype : null;
20421
+ };
20422
+
20423
+ var String$4 = global_1.String;
20424
+ var TypeError$8 = global_1.TypeError;
20425
+
20426
+ var aPossiblePrototype = function (argument) {
20427
+ if (typeof argument == 'object' || isCallable(argument)) return argument;
20428
+ throw TypeError$8("Can't set " + String$4(argument) + ' as a prototype');
20429
+ };
20430
+
20431
+ /* eslint-disable no-proto -- safe */
20432
+
20433
+
20434
+
20435
+
20436
+ // `Object.setPrototypeOf` method
20437
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
20438
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
20439
+ // eslint-disable-next-line es-x/no-object-setprototypeof -- safe
20440
+ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
20441
+ var CORRECT_SETTER = false;
20442
+ var test = {};
20443
+ var setter;
20444
+ try {
20445
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
20446
+ setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
20447
+ setter(test, []);
20448
+ CORRECT_SETTER = test instanceof Array;
20449
+ } catch (error) { /* empty */ }
20450
+ return function setPrototypeOf(O, proto) {
20451
+ anObject(O);
20452
+ aPossiblePrototype(proto);
20453
+ if (CORRECT_SETTER) setter(O, proto);
20454
+ else O.__proto__ = proto;
20455
+ return O;
20456
+ };
20457
+ }() : undefined);
20458
+
20459
+ var defineProperty$1 = objectDefineProperty.f;
20460
+
20461
+
20462
+
20463
+
20464
+
20465
+
20466
+ var Int8Array = global_1.Int8Array;
20467
+ var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
20468
+ var Uint8ClampedArray = global_1.Uint8ClampedArray;
20469
+ var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;
20470
+ var TypedArray = Int8Array && objectGetPrototypeOf(Int8Array);
20471
+ var TypedArrayPrototype = Int8ArrayPrototype && objectGetPrototypeOf(Int8ArrayPrototype);
20472
+ var ObjectPrototype$1 = Object.prototype;
20473
+ var TypeError$9 = global_1.TypeError;
20474
+
20475
+ var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
20476
+ var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
20477
+ var TYPED_ARRAY_CONSTRUCTOR = uid('TYPED_ARRAY_CONSTRUCTOR');
20478
+ // Fixing native typed arrays in Opera Presto crashes the browser, see #595
20479
+ var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferNative && !!objectSetPrototypeOf && classof(global_1.opera) !== 'Opera';
20480
+ var TYPED_ARRAY_TAG_REQUIRED = false;
20481
+ var NAME, Constructor, Prototype;
20482
+
20483
+ var TypedArrayConstructorsList = {
20484
+ Int8Array: 1,
20485
+ Uint8Array: 1,
20486
+ Uint8ClampedArray: 1,
20487
+ Int16Array: 2,
20488
+ Uint16Array: 2,
20489
+ Int32Array: 4,
20490
+ Uint32Array: 4,
20491
+ Float32Array: 4,
20492
+ Float64Array: 8
20493
+ };
20494
+
20495
+ var BigIntArrayConstructorsList = {
20496
+ BigInt64Array: 8,
20497
+ BigUint64Array: 8
20498
+ };
20499
+
20500
+ var isView = function isView(it) {
20501
+ if (!isObject(it)) return false;
20502
+ var klass = classof(it);
20503
+ return klass === 'DataView'
20504
+ || hasOwnProperty_1(TypedArrayConstructorsList, klass)
20505
+ || hasOwnProperty_1(BigIntArrayConstructorsList, klass);
20506
+ };
20507
+
20508
+ var isTypedArray = function (it) {
20509
+ if (!isObject(it)) return false;
20510
+ var klass = classof(it);
20511
+ return hasOwnProperty_1(TypedArrayConstructorsList, klass)
20512
+ || hasOwnProperty_1(BigIntArrayConstructorsList, klass);
20513
+ };
20514
+
20515
+ var aTypedArray = function (it) {
20516
+ if (isTypedArray(it)) return it;
20517
+ throw TypeError$9('Target is not a typed array');
20518
+ };
20519
+
20520
+ var aTypedArrayConstructor = function (C) {
20521
+ if (isCallable(C) && (!objectSetPrototypeOf || objectIsPrototypeOf(TypedArray, C))) return C;
20522
+ throw TypeError$9(tryToString(C) + ' is not a typed array constructor');
20523
+ };
20524
+
20525
+ var exportTypedArrayMethod = function (KEY, property, forced, options) {
20526
+ if (!descriptors) return;
20527
+ if (forced) for (var ARRAY in TypedArrayConstructorsList) {
20528
+ var TypedArrayConstructor = global_1[ARRAY];
20529
+ if (TypedArrayConstructor && hasOwnProperty_1(TypedArrayConstructor.prototype, KEY)) try {
20530
+ delete TypedArrayConstructor.prototype[KEY];
20531
+ } catch (error) {
20532
+ // old WebKit bug - some methods are non-configurable
20533
+ try {
20534
+ TypedArrayConstructor.prototype[KEY] = property;
20535
+ } catch (error2) { /* empty */ }
20536
+ }
20537
+ }
20538
+ if (!TypedArrayPrototype[KEY] || forced) {
20539
+ defineBuiltIn(TypedArrayPrototype, KEY, forced ? property
20540
+ : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property, options);
20541
+ }
20542
+ };
20543
+
20544
+ var exportTypedArrayStaticMethod = function (KEY, property, forced) {
20545
+ var ARRAY, TypedArrayConstructor;
20546
+ if (!descriptors) return;
20547
+ if (objectSetPrototypeOf) {
20548
+ if (forced) for (ARRAY in TypedArrayConstructorsList) {
20549
+ TypedArrayConstructor = global_1[ARRAY];
20550
+ if (TypedArrayConstructor && hasOwnProperty_1(TypedArrayConstructor, KEY)) try {
20551
+ delete TypedArrayConstructor[KEY];
20552
+ } catch (error) { /* empty */ }
20553
+ }
20554
+ if (!TypedArray[KEY] || forced) {
20555
+ // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
20556
+ try {
20557
+ return defineBuiltIn(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);
20558
+ } catch (error) { /* empty */ }
20559
+ } else return;
20560
+ }
20561
+ for (ARRAY in TypedArrayConstructorsList) {
20562
+ TypedArrayConstructor = global_1[ARRAY];
20563
+ if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {
20564
+ defineBuiltIn(TypedArrayConstructor, KEY, property);
20565
+ }
20566
+ }
20567
+ };
20568
+
20569
+ for (NAME in TypedArrayConstructorsList) {
20570
+ Constructor = global_1[NAME];
20571
+ Prototype = Constructor && Constructor.prototype;
20572
+ if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);
20573
+ else NATIVE_ARRAY_BUFFER_VIEWS = false;
20574
+ }
20575
+
20576
+ for (NAME in BigIntArrayConstructorsList) {
20577
+ Constructor = global_1[NAME];
20578
+ Prototype = Constructor && Constructor.prototype;
20579
+ if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);
20580
+ }
20581
+
20582
+ // WebKit bug - typed arrays constructors prototype is Object.prototype
20583
+ if (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {
20584
+ // eslint-disable-next-line no-shadow -- safe
20585
+ TypedArray = function TypedArray() {
20586
+ throw TypeError$9('Incorrect invocation');
20587
+ };
20588
+ if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
20589
+ if (global_1[NAME]) objectSetPrototypeOf(global_1[NAME], TypedArray);
20590
+ }
20591
+ }
20592
+
20593
+ if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype$1) {
20594
+ TypedArrayPrototype = TypedArray.prototype;
20595
+ if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
20596
+ if (global_1[NAME]) objectSetPrototypeOf(global_1[NAME].prototype, TypedArrayPrototype);
20597
+ }
20598
+ }
20599
+
20600
+ // WebKit bug - one more object in Uint8ClampedArray prototype chain
20601
+ if (NATIVE_ARRAY_BUFFER_VIEWS && objectGetPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
20602
+ objectSetPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
20603
+ }
20604
+
20605
+ if (descriptors && !hasOwnProperty_1(TypedArrayPrototype, TO_STRING_TAG$2)) {
20606
+ TYPED_ARRAY_TAG_REQUIRED = true;
20607
+ defineProperty$1(TypedArrayPrototype, TO_STRING_TAG$2, { get: function () {
20608
+ return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
20609
+ } });
20610
+ for (NAME in TypedArrayConstructorsList) if (global_1[NAME]) {
20611
+ createNonEnumerableProperty(global_1[NAME], TYPED_ARRAY_TAG, NAME);
20612
+ }
20613
+ }
20614
+
20615
+ var arrayBufferViewCore = {
20616
+ NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
20617
+ TYPED_ARRAY_CONSTRUCTOR: TYPED_ARRAY_CONSTRUCTOR,
20618
+ TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG,
20619
+ aTypedArray: aTypedArray,
20620
+ aTypedArrayConstructor: aTypedArrayConstructor,
20621
+ exportTypedArrayMethod: exportTypedArrayMethod,
20622
+ exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
20623
+ isView: isView,
20624
+ isTypedArray: isTypedArray,
20625
+ TypedArray: TypedArray,
20626
+ TypedArrayPrototype: TypedArrayPrototype
20627
+ };
20628
+
20629
+ var aTypedArray$1 = arrayBufferViewCore.aTypedArray;
20630
+ var exportTypedArrayMethod$1 = arrayBufferViewCore.exportTypedArrayMethod;
20631
+
20632
+ // `%TypedArray%.prototype.at` method
20633
+ // https://github.com/tc39/proposal-relative-indexing-method
20634
+ exportTypedArrayMethod$1('at', function at(index) {
20635
+ var O = aTypedArray$1(this);
20636
+ var len = lengthOfArrayLike(O);
20637
+ var relativeIndex = toIntegerOrInfinity(index);
20638
+ var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
20639
+ return (k < 0 || k >= len) ? undefined : O[k];
20640
+ });
20641
+
19393
20642
  var selectedColor = "".concat(MATISSE_BLUE);
19394
20643
  var hoverColor$3 = "".concat(HOVER_LIGHT_BLUE);
19395
20644
  var fallbackValues$e = {
@@ -19400,24 +20649,24 @@ var fallbackValues$e = {
19400
20649
  var IconWrapper = styled.div.withConfig({
19401
20650
  displayName: "Dropdown__IconWrapper",
19402
20651
  componentId: "sc-pn6m0h-0"
19403
- })(["display:flex;flex-direction:column;justify-content:center;transition:transform 0.3s ease;", ""], function (_ref) {
20652
+ })(["position:absolute;display:flex;flex-direction:column;justify-content:center;transition:transform 0.3s ease;", ";top:20px;right:12px;"], function (_ref) {
19404
20653
  var open = _ref.open;
19405
20654
  return open ? "transform: rotate(-180deg)" : "";
19406
20655
  });
19407
20656
  var DropdownContentWrapper = styled.div.withConfig({
19408
20657
  displayName: "Dropdown__DropdownContentWrapper",
19409
20658
  componentId: "sc-pn6m0h-1"
19410
- })(["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) {
20659
+ })(["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) {
19411
20660
  var widthFitOptions = _ref2.widthFitOptions;
19412
20661
  return widthFitOptions ? "fit-content" : "100%";
19413
20662
  }, function (_ref3) {
19414
20663
  var maxHeight = _ref3.maxHeight;
19415
20664
  return maxHeight || "400px";
19416
20665
  });
19417
- var DropdownItemWrapper = styled.div.withConfig({
20666
+ var DropdownItemWrapper = styled.li.withConfig({
19418
20667
  displayName: "Dropdown__DropdownItemWrapper",
19419
20668
  componentId: "sc-pn6m0h-2"
19420
- })(["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) {
20669
+ })(["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) {
19421
20670
  var selected = _ref4.selected,
19422
20671
  themeValues = _ref4.themeValues;
19423
20672
  return selected ? themeValues.selectedColor : WHITE;
@@ -19435,10 +20684,6 @@ var DropdownItemWrapper = styled.div.withConfig({
19435
20684
  themeValues = _ref7.themeValues;
19436
20685
  return selected ? themeValues.selectedColor : disabled ? WHITE : themeValues.hoverColor;
19437
20686
  });
19438
- var SearchInput = styled.input.withConfig({
19439
- displayName: "Dropdown__SearchInput",
19440
- componentId: "sc-pn6m0h-3"
19441
- })(["border:none;background-color:transparent;font-size:16px;height:24px;min-width:80%;"]);
19442
20687
 
19443
20688
  var Dropdown = function Dropdown(_ref8) {
19444
20689
  var placeholder = _ref8.placeholder,
@@ -19450,7 +20695,7 @@ var Dropdown = function Dropdown(_ref8) {
19450
20695
  _ref8$disabledValues = _ref8.disabledValues,
19451
20696
  disabledValues = _ref8$disabledValues === void 0 ? [] : _ref8$disabledValues,
19452
20697
  _ref8$onClick = _ref8.onClick,
19453
- onClick = _ref8$onClick === void 0 ? noop : _ref8$onClick,
20698
+ _onClick = _ref8$onClick === void 0 ? noop : _ref8$onClick,
19454
20699
  themeValues = _ref8.themeValues,
19455
20700
  maxHeight = _ref8.maxHeight,
19456
20701
  _ref8$widthFitOptions = _ref8.widthFitOptions,
@@ -19462,7 +20707,9 @@ var Dropdown = function Dropdown(_ref8) {
19462
20707
  autoEraseTypeAhead = _ref8$autoEraseTypeAh === void 0 ? true : _ref8$autoEraseTypeAh,
19463
20708
  ariaLabelledby = _ref8.ariaLabelledby,
19464
20709
  _ref8$autocompleteVal = _ref8.autocompleteValue,
19465
- autocompleteValue = _ref8$autocompleteVal === void 0 ? "" : _ref8$autocompleteVal;
20710
+ autocompleteValue = _ref8$autocompleteVal === void 0 ? "" : _ref8$autocompleteVal,
20711
+ _ref8$smoothScroll = _ref8.smoothScroll,
20712
+ smoothScroll = _ref8$smoothScroll === void 0 ? true : _ref8$smoothScroll;
19466
20713
 
19467
20714
  var _useState = useState(""),
19468
20715
  _useState2 = _slicedToArray(_useState, 2),
@@ -19489,6 +20736,21 @@ var Dropdown = function Dropdown(_ref8) {
19489
20736
  selectedRef = _useState10[0],
19490
20737
  setSelectedRef = _useState10[1];
19491
20738
 
20739
+ var _useState11 = useState(undefined),
20740
+ _useState12 = _slicedToArray(_useState11, 2),
20741
+ focusedRef = _useState12[0],
20742
+ setFocusedRef = _useState12[1];
20743
+
20744
+ var _useState13 = useState(false),
20745
+ _useState14 = _slicedToArray(_useState13, 2),
20746
+ inputChangedByAutofill = _useState14[0],
20747
+ setInputChangedByAutofill = _useState14[1];
20748
+
20749
+ var _useState15 = useState(false),
20750
+ _useState16 = _slicedToArray(_useState15, 2),
20751
+ focusedByClick = _useState16[0],
20752
+ setFocusedByClick = _useState16[1];
20753
+
19492
20754
  if (optionsState !== options) {
19493
20755
  setOptionsState(options);
19494
20756
  setOptionsChanged(true);
@@ -19499,10 +20761,10 @@ var Dropdown = function Dropdown(_ref8) {
19499
20761
  setOptionsChanged(false);
19500
20762
  }
19501
20763
 
19502
- var _useState11 = useState(null),
19503
- _useState12 = _slicedToArray(_useState11, 2),
19504
- timer = _useState12[0],
19505
- setTimer = _useState12[1];
20764
+ var _useState17 = useState(null),
20765
+ _useState18 = _slicedToArray(_useState17, 2),
20766
+ timer = _useState18[0],
20767
+ setTimer = _useState18[1];
19506
20768
 
19507
20769
  var optionRefs = useRef(_toConsumableArray(Array(options.length)).map(function () {
19508
20770
  return /*#__PURE__*/createRef();
@@ -19518,23 +20780,21 @@ var Dropdown = function Dropdown(_ref8) {
19518
20780
  };
19519
20781
 
19520
20782
  var onKeyDown = function onKeyDown(e) {
19521
- var _optionRefs$current$l, _optionRefs$current;
19522
-
19523
20783
  var key = e.key,
19524
20784
  keyCode = e.keyCode;
19525
20785
  var focus = document.activeElement;
19526
- console.log("dropdown value is", value);
19527
- console.log("focus is", focus);
19528
- console.log("option refs are", optionRefs.current);
19529
20786
  var optionEl = optionRefs.current.find(function (ref) {
19530
20787
  return ref.current === focus;
19531
20788
  });
19532
- console.log("option el is", optionEl);
19533
20789
 
19534
20790
  switch (key) {
19535
20791
  case "ArrowDown":
19536
20792
  e.preventDefault();
19537
20793
 
20794
+ if (!isOpen) {
20795
+ _onClick();
20796
+ }
20797
+
19538
20798
  if (optionEl) {
19539
20799
  if (optionEl.current.nextElementSibling) {
19540
20800
  optionEl.current.nextElementSibling.focus();
@@ -19543,7 +20803,7 @@ var Dropdown = function Dropdown(_ref8) {
19543
20803
  break;
19544
20804
  }
19545
20805
  } else {
19546
- onClick();
20806
+ _onClick();
19547
20807
  }
19548
20808
 
19549
20809
  break;
@@ -19559,7 +20819,7 @@ var Dropdown = function Dropdown(_ref8) {
19559
20819
  break;
19560
20820
  }
19561
20821
  } else {
19562
- onClick();
20822
+ _onClick();
19563
20823
  }
19564
20824
 
19565
20825
  break;
@@ -19583,7 +20843,14 @@ var Dropdown = function Dropdown(_ref8) {
19583
20843
 
19584
20844
  case "End":
19585
20845
  e.preventDefault();
19586
- optionRefs.current[(_optionRefs$current$l = optionRefs === null || optionRefs === void 0 ? void 0 : (_optionRefs$current = optionRefs.current) === null || _optionRefs$current === void 0 ? void 0 : _optionRefs$current.length) !== null && _optionRefs$current$l !== void 0 ? _optionRefs$current$l : 0 - 1].current.focus();
20846
+ optionRefs.current.at(-1).current.focus();
20847
+ break;
20848
+
20849
+ case "Escape":
20850
+ if (isOpen) {
20851
+ _onClick();
20852
+ }
20853
+
19587
20854
  break;
19588
20855
  }
19589
20856
 
@@ -19593,19 +20860,40 @@ var Dropdown = function Dropdown(_ref8) {
19593
20860
  }
19594
20861
  };
19595
20862
 
20863
+ var handleItemSelection = function handleItemSelection(evt, choice, i) {
20864
+ if (disabledValues.includes(choice.value)) {
20865
+ evt.preventDefault();
20866
+ } else {
20867
+ setSelectedRef(optionRefs.current[i]);
20868
+ onSelect(choice.value);
20869
+
20870
+ if (isOpen) {
20871
+ _onClick();
20872
+ }
20873
+ }
20874
+ };
20875
+
19596
20876
  useEffect$1(function () {
19597
- console.log("option refs in isopen useffect", optionRefs.current[0].current);
19598
- console.log("selected refs in isopen useffect", selectedRef);
19599
- console.log("value in isopen useffect", value);
20877
+ var selectedRefExists = selectedRef !== undefined && selectedRef.current !== null;
19600
20878
 
19601
- if (isOpen && selectedRef !== undefined) {
19602
- // WAI-ARIA requires the selected option to receive focus
20879
+ if (isOpen && selectedRefExists && !focusedByClick) {
20880
+ // For keyboard users, WAI-ARIA requires the selected option to receive focus
19603
20881
  selectedRef.current.focus();
19604
- } else if (isOpen && optionRefs.current[0].current) {
20882
+ } else if (isOpen && optionRefs.current[0].current && !focusedByClick) {
19605
20883
  // If no selected option, first option receives focus
19606
20884
  optionRefs.current[0].current.focus();
19607
20885
  }
19608
20886
 
20887
+ if (isOpen && focusedByClick && selectedRefExists) {
20888
+ // To support autofill for mouse users, we maintain focus on input just scroll item into view
20889
+ selectedRef.current.scrollIntoView({
20890
+ behavior: smoothScroll ? "smooth" : "auto",
20891
+ block: "nearest",
20892
+ inline: "start"
20893
+ });
20894
+ setFocusedByClick(false);
20895
+ }
20896
+
19609
20897
  clearTimeout(timer);
19610
20898
  setInputValue("");
19611
20899
  }, [isOpen]);
@@ -19614,7 +20902,7 @@ var Dropdown = function Dropdown(_ref8) {
19614
20902
  clearTimeout(timer);
19615
20903
  setTimer(setTimeout(function () {
19616
20904
  return setInputValue("");
19617
- }, 5000));
20905
+ }, 3000));
19618
20906
  }
19619
20907
 
19620
20908
  setFilteredOptions(options.filter(function (option) {
@@ -19622,10 +20910,20 @@ var Dropdown = function Dropdown(_ref8) {
19622
20910
  }));
19623
20911
  }, [inputValue]);
19624
20912
  useEffect$1(function () {
19625
- if (!isOpen && filteredOptions[0] && !disabledValues.includes(filteredOptions[0].value) && filteredOptions[0].text != placeholder) {
19626
- console.log("filtered options are", filteredOptions);
19627
- console.log("option refs are", optionRefs);
20913
+ if (
20914
+ /*
20915
+ Either user has typed a value into input that matches a non-disabled option or
20916
+ user has autofilled or pasted into input a string matching a valid option
20917
+ */
20918
+ (!isOpen || inputChangedByAutofill) && filteredOptions[0] && !disabledValues.includes(filteredOptions[0].value) && filteredOptions[0].text != placeholder) {
20919
+ setInputChangedByAutofill(false);
19628
20920
  onSelect(filteredOptions[0].value);
20921
+
20922
+ if (isOpen) {
20923
+ setTimeout(function () {
20924
+ return _onClick();
20925
+ }, 1000);
20926
+ }
19629
20927
  }
19630
20928
 
19631
20929
  if (optionRefs.current[0].current) {
@@ -19635,53 +20933,61 @@ var Dropdown = function Dropdown(_ref8) {
19635
20933
  }
19636
20934
  }, [filteredOptions]);
19637
20935
  return /*#__PURE__*/React.createElement(Box, {
19638
- onKeyDown: onKeyDown,
19639
- onClick: onClick,
19640
20936
  padding: "0",
19641
- width: "100%",
19642
- hoverStyles: "background-color: ".concat(themeValues.hoverColor, ";"),
19643
- "aria-expanded": isOpen,
19644
- role: "combobox",
20937
+ background: isOpen ? themeValues.hoverColor : WHITE,
20938
+ extraStyles: "position: relative;",
20939
+ minWidth: "100%",
20940
+ onClick: function onClick() {
20941
+ if (!isOpen) {
20942
+ setFocusedByClick(true);
20943
+
20944
+ _onClick();
20945
+ }
20946
+ },
20947
+ onKeyDown: onKeyDown,
20948
+ width: "100%"
20949
+ }, /*#__PURE__*/React.createElement(Box, {
20950
+ as: "input",
20951
+ "aria-multiline": "false",
20952
+ "aria-autocomplete": "list",
20953
+ "aria-controls": "".concat(ariaLabelledby, "_listbox"),
20954
+ "aria-activedescendant": "focused_option",
19645
20955
  "aria-owns": "".concat(ariaLabelledby, "_listbox"),
19646
20956
  "aria-haspopup": "listbox",
19647
20957
  "aria-labelledby": ariaLabelledby,
19648
- extraStyles: disabled && "color: #6e727e;\n background-color: #f7f7f7;\n pointer-events: none;",
19649
- title: hasTitles ? getSelection() : null
19650
- }, /*#__PURE__*/React.createElement(Box, {
19651
- as: "button",
20958
+ "aria-expanded": isOpen,
20959
+ autocomplete: autocompleteValue,
19652
20960
  background: isOpen ? themeValues.hoverColor : WHITE,
19653
- width: "100%",
19654
- padding: "12px",
19655
- hoverStyles: "background-color: ".concat(themeValues.hoverColor, ";"),
20961
+ borderRadius: "2px",
19656
20962
  borderSize: "1px",
19657
20963
  borderColor: isError ? ERROR_COLOR : isOpen ? themeValues.selectedColor : GREY_CHATEAU,
19658
- borderRadius: "2px",
19659
- tabIndex: 0,
19660
- dataQa: placeholder,
19661
- extraStyles: "height: 48px;\n ".concat(disabled && "color: #6e727e;\n background-color: #f7f7f7;\n pointer-events: none;", "\n ")
19662
- }, /*#__PURE__*/React.createElement(Stack, {
19663
- direction: "row",
19664
- bottomItem: 2,
19665
- extraStyles: "position: relative;"
19666
- }, /*#__PURE__*/React.createElement(SearchInput, {
19667
- "aria-label": getSelection(),
20964
+ extraStyles: disabled && "color: #6e727e;\n background-color: #f7f7f7;\n pointer-events: none;",
20965
+ hoverStyles: "background-color: ".concat(themeValues.hoverColor, ";"),
20966
+ isOpen: isOpen,
20967
+ minHeight: "48px",
20968
+ minWidth: "100%",
20969
+ name: autocompleteValue,
20970
+ onChange: function onChange(e) {
20971
+ // support autofill and copy/paste
20972
+ if (e.target.value !== inputValue) {
20973
+ setInputValue(e.target.value);
20974
+ setInputChangedByAutofill(true);
20975
+ }
20976
+ },
20977
+ padding: "12px",
19668
20978
  placeholder: getSelection(),
19669
- value: inputValue,
19670
- onChange: noop,
20979
+ role: "combobox",
19671
20980
  themeValues: themeValues,
19672
- role: "searchbox",
20981
+ title: hasTitles ? getSelection() : null,
19673
20982
  type: "text",
19674
- "aria-multiline": "false",
19675
- "aria-autocomplete": "list",
19676
- "aria-controls": "".concat(ariaLabelledby, "_listbox"),
19677
- "aria-activedescendant": "selected_option",
19678
- isOpen: isOpen,
19679
- tabIndex: -1,
19680
- name: autocompleteValue,
19681
- autocomplete: autocompleteValue
20983
+ tabIndex: 0,
20984
+ value: inputValue,
20985
+ width: "100%",
20986
+ dataQa: placeholder
19682
20987
  }), /*#__PURE__*/React.createElement(IconWrapper, {
19683
- open: isOpen
19684
- }, /*#__PURE__*/React.createElement(DropdownIcon, null)))), isOpen ? /*#__PURE__*/React.createElement(DropdownContentWrapper, {
20988
+ open: isOpen,
20989
+ onClick: _onClick
20990
+ }, /*#__PURE__*/React.createElement(DropdownIcon, null)), /*#__PURE__*/React.createElement(Fragment, null, isOpen ? /*#__PURE__*/React.createElement(DropdownContentWrapper, {
19685
20991
  maxHeight: maxHeight,
19686
20992
  open: isOpen,
19687
20993
  ref: dropdownRef,
@@ -19690,23 +20996,25 @@ var Dropdown = function Dropdown(_ref8) {
19690
20996
  role: "listbox",
19691
20997
  id: "".concat(ariaLabelledby, "_listbox")
19692
20998
  }, /*#__PURE__*/React.createElement(Stack, {
19693
- childGap: "0"
20999
+ childGap: "0",
21000
+ as: "ul"
19694
21001
  }, filteredOptions.map(function (choice, i) {
19695
21002
  if (choice.value === value && selectedRef !== optionRefs.current[i]) {
19696
21003
  setSelectedRef(optionRefs.current[i]);
19697
21004
  }
19698
21005
 
19699
21006
  return /*#__PURE__*/React.createElement(DropdownItemWrapper, {
19700
- id: choice.value === value ? "selected_option" : choice.value,
21007
+ id: focusedRef === optionRefs.current[i] ? "focused_option" : choice.value,
19701
21008
  key: choice.value,
19702
21009
  ref: optionRefs.current[i],
19703
- as: "button",
19704
21010
  tabIndex: -1,
19705
- onClick: disabledValues.includes(choice.value) ? function (evt) {
19706
- return evt.preventDefault();
19707
- } : function () {
19708
- setSelectedRef(optionRefs.current[i]);
19709
- onSelect(choice.value);
21011
+ onClick: function onClick(e) {
21012
+ return handleItemSelection(e, choice, i);
21013
+ },
21014
+ onKeyDown: function onKeyDown(e) {
21015
+ if (e.keyCode === 13) {
21016
+ handleItemSelection(e, choice, i);
21017
+ }
19710
21018
  },
19711
21019
  selected: choice.value === value,
19712
21020
  "aria-selected": choice.value === value,
@@ -19714,13 +21022,16 @@ var Dropdown = function Dropdown(_ref8) {
19714
21022
  "data-qa": choice.text,
19715
21023
  themeValues: themeValues,
19716
21024
  title: hasTitles ? choice.text : null,
19717
- role: "option"
21025
+ role: "option",
21026
+ onFocus: function onFocus() {
21027
+ return setFocusedRef(optionRefs.current[i]);
21028
+ }
19718
21029
  }, /*#__PURE__*/React.createElement(Text$1, {
19719
21030
  variant: "p",
19720
21031
  color: choice.value === value ? WHITE : disabledValues.includes(choice.value) ? STORM_GREY : MINESHAFT_GREY,
19721
21032
  extraStyles: "padding-left: 16px; \n cursor: ".concat(disabledValues.includes(choice.value) ? "default" : "pointer", "; \n white-space: nowrap; \n overflow: hidden; \n text-overflow: ellipsis;")
19722
21033
  }, choice.text));
19723
- }))) : /*#__PURE__*/React.createElement(Fragment, null));
21034
+ }))) : /*#__PURE__*/React.createElement(Fragment, null)));
19724
21035
  };
19725
21036
 
19726
21037
  var Dropdown$1 = themeComponent(Dropdown, "Dropdown", fallbackValues$e);
@@ -19822,7 +21133,9 @@ var FormSelect = function FormSelect(_ref) {
19822
21133
  themeValues = _ref.themeValues,
19823
21134
  _ref$hasTitles = _ref.hasTitles,
19824
21135
  hasTitles = _ref$hasTitles === void 0 ? false : _ref$hasTitles,
19825
- autocompleteValue = _ref.autocompleteValue;
21136
+ autocompleteValue = _ref.autocompleteValue,
21137
+ _ref$smoothScroll = _ref.smoothScroll,
21138
+ smoothScroll = _ref$smoothScroll === void 0 ? true : _ref$smoothScroll;
19826
21139
 
19827
21140
  var _useState = useState(false),
19828
21141
  _useState2 = _slicedToArray(_useState, 2),
@@ -19878,7 +21191,8 @@ var FormSelect = function FormSelect(_ref) {
19878
21191
  return setOpen(!open);
19879
21192
  },
19880
21193
  disabled: disabled,
19881
- autocompleteValue: autocompleteValue
21194
+ autocompleteValue: autocompleteValue,
21195
+ smoothScroll: smoothScroll
19882
21196
  }), /*#__PURE__*/React.createElement(Stack, {
19883
21197
  direction: "row",
19884
21198
  justify: "space-between"
@@ -33800,20 +35114,20 @@ function isPlainObject(value) {
33800
35114
  }
33801
35115
  var assign = Object.assign || function assign(target, value) {
33802
35116
  for (var key in value) {
33803
- if (has(value, key)) {
35117
+ if (has$1(value, key)) {
33804
35118
  target[key] = value[key];
33805
35119
  }
33806
35120
  }
33807
35121
 
33808
35122
  return target;
33809
35123
  };
33810
- 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;
35124
+ 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;
33811
35125
  function shallowCopy(base, invokeGetters) {
33812
35126
  if ( invokeGetters === void 0 ) invokeGetters = false;
33813
35127
 
33814
35128
  if (Array.isArray(base)) { return base.slice(); }
33815
35129
  var clone = Object.create(Object.getPrototypeOf(base));
33816
- ownKeys$1(base).forEach(function (key) {
35130
+ ownKeys$2(base).forEach(function (key) {
33817
35131
  if (key === DRAFT_STATE) {
33818
35132
  return; // Never copy over draft state.
33819
35133
  }
@@ -33845,14 +35159,14 @@ function each(value, cb) {
33845
35159
  if (Array.isArray(value)) {
33846
35160
  for (var i = 0; i < value.length; i++) { cb(i, value[i], value); }
33847
35161
  } else {
33848
- ownKeys$1(value).forEach(function (key) { return cb(key, value[key], value); });
35162
+ ownKeys$2(value).forEach(function (key) { return cb(key, value[key], value); });
33849
35163
  }
33850
35164
  }
33851
35165
  function isEnumerable(base, prop) {
33852
35166
  var desc = Object.getOwnPropertyDescriptor(base, prop);
33853
35167
  return !!desc && desc.enumerable;
33854
35168
  }
33855
- function has(thing, prop) {
35169
+ function has$1(thing, prop) {
33856
35170
  return Object.prototype.hasOwnProperty.call(thing, prop);
33857
35171
  }
33858
35172
  function is(x, y) {
@@ -33916,7 +35230,7 @@ function revoke(draft) {
33916
35230
 
33917
35231
  // but share them all instead
33918
35232
 
33919
- var descriptors = {};
35233
+ var descriptors$1 = {};
33920
35234
  function willFinalize(scope, result, isReplaced) {
33921
35235
  scope.drafts.forEach(function (draft) {
33922
35236
  draft[DRAFT_STATE].finalizing = true;
@@ -33984,7 +35298,7 @@ function peek(draft, prop) {
33984
35298
  return draft[prop];
33985
35299
  }
33986
35300
 
33987
- function get(state, prop) {
35301
+ function get$1(state, prop) {
33988
35302
  assertUnrevoked(state);
33989
35303
  var value = peek(source(state), prop);
33990
35304
  if (state.finalizing) { return value; } // Create a draft if the value is unmodified.
@@ -34035,17 +35349,17 @@ function clonePotentialDraft(base) {
34035
35349
  }
34036
35350
 
34037
35351
  function proxyProperty(draft, prop, enumerable) {
34038
- var desc = descriptors[prop];
35352
+ var desc = descriptors$1[prop];
34039
35353
 
34040
35354
  if (desc) {
34041
35355
  desc.enumerable = enumerable;
34042
35356
  } else {
34043
- descriptors[prop] = desc = {
35357
+ descriptors$1[prop] = desc = {
34044
35358
  configurable: true,
34045
35359
  enumerable: enumerable,
34046
35360
 
34047
- get: function get$1() {
34048
- return get(this[DRAFT_STATE], prop);
35361
+ get: function get$1$1() {
35362
+ return get$1(this[DRAFT_STATE], prop);
34049
35363
  },
34050
35364
 
34051
35365
  set: function set$1$1(value) {
@@ -34091,7 +35405,7 @@ function markChangesRecursively(object) {
34091
35405
  // Look for added keys.
34092
35406
  Object.keys(draft).forEach(function (key) {
34093
35407
  // The `undefined` check is a fast path for pre-existing keys.
34094
- if (base[key] === undefined && !has(base, key)) {
35408
+ if (base[key] === undefined && !has$1(base, key)) {
34095
35409
  assigned[key] = true;
34096
35410
  markChanged(state);
34097
35411
  } else if (!assigned[key]) {
@@ -34102,7 +35416,7 @@ function markChangesRecursively(object) {
34102
35416
 
34103
35417
  Object.keys(base).forEach(function (key) {
34104
35418
  // The `undefined` check is a fast path for pre-existing keys.
34105
- if (draft[key] === undefined && !has(draft, key)) {
35419
+ if (draft[key] === undefined && !has$1(draft, key)) {
34106
35420
  assigned[key] = false;
34107
35421
  markChanged(state);
34108
35422
  }
@@ -34135,7 +35449,7 @@ function hasObjectChanges(state) {
34135
35449
  var key = keys[i];
34136
35450
  var baseValue = base[key]; // The `undefined` check is a fast path for pre-existing keys.
34137
35451
 
34138
- if (baseValue === undefined && !has(base, key)) {
35452
+ if (baseValue === undefined && !has$1(base, key)) {
34139
35453
  return true;
34140
35454
  } // Once a base key is deleted, future changes go undetected, because its
34141
35455
  // descriptor is erased. This branch detects any missed changes.
@@ -34220,7 +35534,7 @@ function createProxy$1(base, parent) {
34220
35534
  return proxy;
34221
35535
  }
34222
35536
  var objectTraps = {
34223
- get: get$1,
35537
+ get: get$1$1,
34224
35538
 
34225
35539
  has: function has(target, prop) {
34226
35540
  return prop in source$1(target);
@@ -34232,7 +35546,7 @@ var objectTraps = {
34232
35546
 
34233
35547
  set: set$1$1,
34234
35548
  deleteProperty: deleteProperty,
34235
- getOwnPropertyDescriptor: getOwnPropertyDescriptor,
35549
+ getOwnPropertyDescriptor: getOwnPropertyDescriptor$2,
34236
35550
 
34237
35551
  defineProperty: function defineProperty() {
34238
35552
  throw new Error("Object.defineProperty() cannot be used on an Immer draft"); // prettier-ignore
@@ -34283,11 +35597,11 @@ function peek$1(draft, prop) {
34283
35597
  return desc && desc.value;
34284
35598
  }
34285
35599
 
34286
- function get$1(state, prop) {
35600
+ function get$1$1(state, prop) {
34287
35601
  if (prop === DRAFT_STATE) { return state; }
34288
35602
  var drafts = state.drafts; // Check for existing draft in unmodified state.
34289
35603
 
34290
- if (!state.modified && has(drafts, prop)) {
35604
+ if (!state.modified && has$1(drafts, prop)) {
34291
35605
  return drafts[prop];
34292
35606
  }
34293
35607
 
@@ -34340,7 +35654,7 @@ function deleteProperty(state, prop) {
34340
35654
  // the same guarantee in ES5 mode.
34341
35655
 
34342
35656
 
34343
- function getOwnPropertyDescriptor(state, prop) {
35657
+ function getOwnPropertyDescriptor$2(state, prop) {
34344
35658
  var owner = source$1(state);
34345
35659
  var desc = Reflect.getOwnPropertyDescriptor(owner, prop);
34346
35660
 
@@ -34759,7 +36073,7 @@ Immer.prototype.finalize = function finalize (draft, path, scope) {
34759
36073
  var base = state.base;
34760
36074
  var copy = state.copy;
34761
36075
  each(base, function (prop) {
34762
- if (!has(copy, prop)) { this$1$1.onDelete(state, prop); }
36076
+ if (!has$1(copy, prop)) { this$1$1.onDelete(state, prop); }
34763
36077
  });
34764
36078
  }
34765
36079
  }
@@ -34938,7 +36252,7 @@ const createInitialState = formConfig => {
34938
36252
  };
34939
36253
 
34940
36254
  const SET = "field/SET";
34941
- const set = fieldName => value => ({
36255
+ const set$2 = fieldName => value => ({
34942
36256
  type: SET,
34943
36257
  payload: { fieldName, value }
34944
36258
  });
@@ -35018,7 +36332,7 @@ const createMapDispatchToProps = formConfig => {
35018
36332
  const keys = Object.keys(formConfig);
35019
36333
  for (let fieldName of keys) {
35020
36334
  dispatchObj.fields[fieldName] = {
35021
- set: value => dispatch(set(fieldName)(value)),
36335
+ set: value => dispatch(set$2(fieldName)(value)),
35022
36336
  addValidator: validator => dispatch(addValidator(fieldName)(validator))
35023
36337
  };
35024
36338
  }
@@ -37954,7 +39268,7 @@ var tabbable_1 = tabbable;
37954
39268
 
37955
39269
  var immutable = extend;
37956
39270
 
37957
- var hasOwnProperty = Object.prototype.hasOwnProperty;
39271
+ var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
37958
39272
 
37959
39273
  function extend() {
37960
39274
  var target = {};
@@ -37963,7 +39277,7 @@ function extend() {
37963
39277
  var source = arguments[i];
37964
39278
 
37965
39279
  for (var key in source) {
37966
- if (hasOwnProperty.call(source, key)) {
39280
+ if (hasOwnProperty$1.call(source, key)) {
37967
39281
  target[key] = source[key];
37968
39282
  }
37969
39283
  }