@thecb/components 6.0.0-beta.9 → 6.0.2
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 +1431 -110
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1431 -110
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -1
- package/src/components/atoms/dropdown/Dropdown.js +196 -149
- package/src/components/atoms/form-select/FormSelect.js +3 -1
- package/src/components/atoms/layouts/Box.js +79 -73
- package/src/components/molecules/highlight-tab-row/HighlightTabRow.js +3 -0
- package/src/util/general.js +21 -0
package/dist/index.cjs.js
CHANGED
|
@@ -6145,6 +6145,8 @@ var checkDeniedCards = function checkDeniedCards(name) {
|
|
|
6145
6145
|
*/
|
|
6146
6146
|
|
|
6147
6147
|
var screenReaderOnlyStyle = "\n position: absolute;\n left: -10000px;\n top: auto;\n width: 1px;\n height: 1px;\n overflow: hidden;\n";
|
|
6148
|
+
var inputPlaceholderTextStyle = "\n ::-webkit-input-placeholder {\n color: ".concat(CHARADE_GREY, ";\n }\n ::-moz-placeholder {\n color: ").concat(CHARADE_GREY, ";\n }\n ::-ms-placeholder {\n color: ").concat(CHARADE_GREY, ";\n }\n ::placeholder {\n color: ").concat(CHARADE_GREY, ";\n }\n");
|
|
6149
|
+
var inputDisabledStyle = "\n color: #6e727e;\n background-color: #f7f7f7;\n pointer-events: none;\n";
|
|
6148
6150
|
|
|
6149
6151
|
var general = /*#__PURE__*/Object.freeze({
|
|
6150
6152
|
__proto__: null,
|
|
@@ -6157,7 +6159,9 @@ var general = /*#__PURE__*/Object.freeze({
|
|
|
6157
6159
|
checkCardBrand: checkCardBrand,
|
|
6158
6160
|
displayCardBrand: displayCardBrand,
|
|
6159
6161
|
checkDeniedCards: checkDeniedCards,
|
|
6160
|
-
screenReaderOnlyStyle: screenReaderOnlyStyle
|
|
6162
|
+
screenReaderOnlyStyle: screenReaderOnlyStyle,
|
|
6163
|
+
inputPlaceholderTextStyle: inputPlaceholderTextStyle,
|
|
6164
|
+
inputDisabledStyle: inputDisabledStyle
|
|
6161
6165
|
});
|
|
6162
6166
|
|
|
6163
6167
|
var _excluded$1 = ["themeValues", "weight", "color", "textWrap", "extraStyles", "hoverStyles", "onClick", "onKeyPress", "as", "dataQa", "children"];
|
|
@@ -6309,7 +6313,7 @@ var _excluded$3 = ["padding", "borderSize", "borderColor", "borderRadius", "boxS
|
|
|
6309
6313
|
completely off screen (only for users of screen readers)
|
|
6310
6314
|
*/
|
|
6311
6315
|
|
|
6312
|
-
var Box = function
|
|
6316
|
+
var Box = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
6313
6317
|
var _ref$padding = _ref.padding,
|
|
6314
6318
|
padding = _ref$padding === void 0 ? "16px" : _ref$padding,
|
|
6315
6319
|
_ref$borderSize = _ref.borderSize,
|
|
@@ -6379,9 +6383,10 @@ var Box = function Box(_ref) {
|
|
|
6379
6383
|
onMouseLeave: onMouseLeave,
|
|
6380
6384
|
onFocus: onFocus,
|
|
6381
6385
|
onBlur: onBlur,
|
|
6382
|
-
onTouchEnd: onTouchEnd
|
|
6383
|
-
|
|
6384
|
-
};
|
|
6386
|
+
onTouchEnd: onTouchEnd,
|
|
6387
|
+
ref: ref
|
|
6388
|
+
}, rest), children && safeChildren(children, /*#__PURE__*/React__default.createElement(React.Fragment, null)));
|
|
6389
|
+
});
|
|
6385
6390
|
|
|
6386
6391
|
var CenterWrapper = styled__default.div.withConfig({
|
|
6387
6392
|
displayName: "Centerstyled__CenterWrapper",
|
|
@@ -19398,6 +19403,1254 @@ var DropdownIcon = function DropdownIcon() {
|
|
|
19398
19403
|
})))));
|
|
19399
19404
|
};
|
|
19400
19405
|
|
|
19406
|
+
var check = function (it) {
|
|
19407
|
+
return it && it.Math == Math && it;
|
|
19408
|
+
};
|
|
19409
|
+
|
|
19410
|
+
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
19411
|
+
var global_1 =
|
|
19412
|
+
// eslint-disable-next-line es-x/no-global-this -- safe
|
|
19413
|
+
check(typeof globalThis == 'object' && globalThis) ||
|
|
19414
|
+
check(typeof window == 'object' && window) ||
|
|
19415
|
+
// eslint-disable-next-line no-restricted-globals -- safe
|
|
19416
|
+
check(typeof self == 'object' && self) ||
|
|
19417
|
+
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
19418
|
+
// eslint-disable-next-line no-new-func -- fallback
|
|
19419
|
+
(function () { return this; })() || Function('return this')();
|
|
19420
|
+
|
|
19421
|
+
var fails = function (exec) {
|
|
19422
|
+
try {
|
|
19423
|
+
return !!exec();
|
|
19424
|
+
} catch (error) {
|
|
19425
|
+
return true;
|
|
19426
|
+
}
|
|
19427
|
+
};
|
|
19428
|
+
|
|
19429
|
+
// Detect IE8's incomplete defineProperty implementation
|
|
19430
|
+
var descriptors = !fails(function () {
|
|
19431
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
19432
|
+
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
19433
|
+
});
|
|
19434
|
+
|
|
19435
|
+
var functionBindNative = !fails(function () {
|
|
19436
|
+
// eslint-disable-next-line es-x/no-function-prototype-bind -- safe
|
|
19437
|
+
var test = (function () { /* empty */ }).bind();
|
|
19438
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
19439
|
+
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
19440
|
+
});
|
|
19441
|
+
|
|
19442
|
+
var call = Function.prototype.call;
|
|
19443
|
+
|
|
19444
|
+
var functionCall = functionBindNative ? call.bind(call) : function () {
|
|
19445
|
+
return call.apply(call, arguments);
|
|
19446
|
+
};
|
|
19447
|
+
|
|
19448
|
+
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
19449
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
19450
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
19451
|
+
|
|
19452
|
+
// Nashorn ~ JDK8 bug
|
|
19453
|
+
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
19454
|
+
|
|
19455
|
+
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
19456
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
19457
|
+
var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
19458
|
+
var descriptor = getOwnPropertyDescriptor(this, V);
|
|
19459
|
+
return !!descriptor && descriptor.enumerable;
|
|
19460
|
+
} : $propertyIsEnumerable;
|
|
19461
|
+
|
|
19462
|
+
var objectPropertyIsEnumerable = {
|
|
19463
|
+
f: f
|
|
19464
|
+
};
|
|
19465
|
+
|
|
19466
|
+
var createPropertyDescriptor = function (bitmap, value) {
|
|
19467
|
+
return {
|
|
19468
|
+
enumerable: !(bitmap & 1),
|
|
19469
|
+
configurable: !(bitmap & 2),
|
|
19470
|
+
writable: !(bitmap & 4),
|
|
19471
|
+
value: value
|
|
19472
|
+
};
|
|
19473
|
+
};
|
|
19474
|
+
|
|
19475
|
+
var FunctionPrototype = Function.prototype;
|
|
19476
|
+
var bind$1 = FunctionPrototype.bind;
|
|
19477
|
+
var call$1 = FunctionPrototype.call;
|
|
19478
|
+
var uncurryThis = functionBindNative && bind$1.bind(call$1, call$1);
|
|
19479
|
+
|
|
19480
|
+
var functionUncurryThis = functionBindNative ? function (fn) {
|
|
19481
|
+
return fn && uncurryThis(fn);
|
|
19482
|
+
} : function (fn) {
|
|
19483
|
+
return fn && function () {
|
|
19484
|
+
return call$1.apply(fn, arguments);
|
|
19485
|
+
};
|
|
19486
|
+
};
|
|
19487
|
+
|
|
19488
|
+
var toString$2 = functionUncurryThis({}.toString);
|
|
19489
|
+
var stringSlice = functionUncurryThis(''.slice);
|
|
19490
|
+
|
|
19491
|
+
var classofRaw = function (it) {
|
|
19492
|
+
return stringSlice(toString$2(it), 8, -1);
|
|
19493
|
+
};
|
|
19494
|
+
|
|
19495
|
+
var Object$1 = global_1.Object;
|
|
19496
|
+
var split = functionUncurryThis(''.split);
|
|
19497
|
+
|
|
19498
|
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
19499
|
+
var indexedObject = fails(function () {
|
|
19500
|
+
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
19501
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
19502
|
+
return !Object$1('z').propertyIsEnumerable(0);
|
|
19503
|
+
}) ? function (it) {
|
|
19504
|
+
return classofRaw(it) == 'String' ? split(it, '') : Object$1(it);
|
|
19505
|
+
} : Object$1;
|
|
19506
|
+
|
|
19507
|
+
var TypeError$1 = global_1.TypeError;
|
|
19508
|
+
|
|
19509
|
+
// `RequireObjectCoercible` abstract operation
|
|
19510
|
+
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
19511
|
+
var requireObjectCoercible = function (it) {
|
|
19512
|
+
if (it == undefined) throw TypeError$1("Can't call method on " + it);
|
|
19513
|
+
return it;
|
|
19514
|
+
};
|
|
19515
|
+
|
|
19516
|
+
// toObject with fallback for non-array-like ES3 strings
|
|
19517
|
+
|
|
19518
|
+
|
|
19519
|
+
|
|
19520
|
+
var toIndexedObject = function (it) {
|
|
19521
|
+
return indexedObject(requireObjectCoercible(it));
|
|
19522
|
+
};
|
|
19523
|
+
|
|
19524
|
+
// `IsCallable` abstract operation
|
|
19525
|
+
// https://tc39.es/ecma262/#sec-iscallable
|
|
19526
|
+
var isCallable = function (argument) {
|
|
19527
|
+
return typeof argument == 'function';
|
|
19528
|
+
};
|
|
19529
|
+
|
|
19530
|
+
var isObject = function (it) {
|
|
19531
|
+
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
19532
|
+
};
|
|
19533
|
+
|
|
19534
|
+
var aFunction = function (argument) {
|
|
19535
|
+
return isCallable(argument) ? argument : undefined;
|
|
19536
|
+
};
|
|
19537
|
+
|
|
19538
|
+
var getBuiltIn = function (namespace, method) {
|
|
19539
|
+
return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
|
|
19540
|
+
};
|
|
19541
|
+
|
|
19542
|
+
var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
|
|
19543
|
+
|
|
19544
|
+
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
|
19545
|
+
|
|
19546
|
+
var process$1 = global_1.process;
|
|
19547
|
+
var Deno = global_1.Deno;
|
|
19548
|
+
var versions = process$1 && process$1.versions || Deno && Deno.version;
|
|
19549
|
+
var v8 = versions && versions.v8;
|
|
19550
|
+
var match, version;
|
|
19551
|
+
|
|
19552
|
+
if (v8) {
|
|
19553
|
+
match = v8.split('.');
|
|
19554
|
+
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
19555
|
+
// but their correct versions are not interesting for us
|
|
19556
|
+
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
19557
|
+
}
|
|
19558
|
+
|
|
19559
|
+
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
19560
|
+
// so check `userAgent` even if `.v8` exists, but 0
|
|
19561
|
+
if (!version && engineUserAgent) {
|
|
19562
|
+
match = engineUserAgent.match(/Edge\/(\d+)/);
|
|
19563
|
+
if (!match || match[1] >= 74) {
|
|
19564
|
+
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
|
19565
|
+
if (match) version = +match[1];
|
|
19566
|
+
}
|
|
19567
|
+
}
|
|
19568
|
+
|
|
19569
|
+
var engineV8Version = version;
|
|
19570
|
+
|
|
19571
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
19572
|
+
|
|
19573
|
+
|
|
19574
|
+
|
|
19575
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
|
|
19576
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
19577
|
+
var symbol = Symbol();
|
|
19578
|
+
// Chrome 38 Symbol has incorrect toString conversion
|
|
19579
|
+
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
19580
|
+
return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
19581
|
+
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
19582
|
+
!Symbol.sham && engineV8Version && engineV8Version < 41;
|
|
19583
|
+
});
|
|
19584
|
+
|
|
19585
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
19586
|
+
|
|
19587
|
+
|
|
19588
|
+
var useSymbolAsUid = nativeSymbol
|
|
19589
|
+
&& !Symbol.sham
|
|
19590
|
+
&& typeof Symbol.iterator == 'symbol';
|
|
19591
|
+
|
|
19592
|
+
var Object$2 = global_1.Object;
|
|
19593
|
+
|
|
19594
|
+
var isSymbol = useSymbolAsUid ? function (it) {
|
|
19595
|
+
return typeof it == 'symbol';
|
|
19596
|
+
} : function (it) {
|
|
19597
|
+
var $Symbol = getBuiltIn('Symbol');
|
|
19598
|
+
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$2(it));
|
|
19599
|
+
};
|
|
19600
|
+
|
|
19601
|
+
var String$1 = global_1.String;
|
|
19602
|
+
|
|
19603
|
+
var tryToString = function (argument) {
|
|
19604
|
+
try {
|
|
19605
|
+
return String$1(argument);
|
|
19606
|
+
} catch (error) {
|
|
19607
|
+
return 'Object';
|
|
19608
|
+
}
|
|
19609
|
+
};
|
|
19610
|
+
|
|
19611
|
+
var TypeError$2 = global_1.TypeError;
|
|
19612
|
+
|
|
19613
|
+
// `Assert: IsCallable(argument) is true`
|
|
19614
|
+
var aCallable = function (argument) {
|
|
19615
|
+
if (isCallable(argument)) return argument;
|
|
19616
|
+
throw TypeError$2(tryToString(argument) + ' is not a function');
|
|
19617
|
+
};
|
|
19618
|
+
|
|
19619
|
+
// `GetMethod` abstract operation
|
|
19620
|
+
// https://tc39.es/ecma262/#sec-getmethod
|
|
19621
|
+
var getMethod = function (V, P) {
|
|
19622
|
+
var func = V[P];
|
|
19623
|
+
return func == null ? undefined : aCallable(func);
|
|
19624
|
+
};
|
|
19625
|
+
|
|
19626
|
+
var TypeError$3 = global_1.TypeError;
|
|
19627
|
+
|
|
19628
|
+
// `OrdinaryToPrimitive` abstract operation
|
|
19629
|
+
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
19630
|
+
var ordinaryToPrimitive = function (input, pref) {
|
|
19631
|
+
var fn, val;
|
|
19632
|
+
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
19633
|
+
if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
|
|
19634
|
+
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
19635
|
+
throw TypeError$3("Can't convert object to primitive value");
|
|
19636
|
+
};
|
|
19637
|
+
|
|
19638
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
19639
|
+
var defineProperty = Object.defineProperty;
|
|
19640
|
+
|
|
19641
|
+
var setGlobal = function (key, value) {
|
|
19642
|
+
try {
|
|
19643
|
+
defineProperty(global_1, key, { value: value, configurable: true, writable: true });
|
|
19644
|
+
} catch (error) {
|
|
19645
|
+
global_1[key] = value;
|
|
19646
|
+
} return value;
|
|
19647
|
+
};
|
|
19648
|
+
|
|
19649
|
+
var SHARED = '__core-js_shared__';
|
|
19650
|
+
var store = global_1[SHARED] || setGlobal(SHARED, {});
|
|
19651
|
+
|
|
19652
|
+
var sharedStore = store;
|
|
19653
|
+
|
|
19654
|
+
var shared = createCommonjsModule(function (module) {
|
|
19655
|
+
(module.exports = function (key, value) {
|
|
19656
|
+
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
19657
|
+
})('versions', []).push({
|
|
19658
|
+
version: '3.22.5',
|
|
19659
|
+
mode: 'global',
|
|
19660
|
+
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
19661
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.22.5/LICENSE',
|
|
19662
|
+
source: 'https://github.com/zloirock/core-js'
|
|
19663
|
+
});
|
|
19664
|
+
});
|
|
19665
|
+
|
|
19666
|
+
var Object$3 = global_1.Object;
|
|
19667
|
+
|
|
19668
|
+
// `ToObject` abstract operation
|
|
19669
|
+
// https://tc39.es/ecma262/#sec-toobject
|
|
19670
|
+
var toObject = function (argument) {
|
|
19671
|
+
return Object$3(requireObjectCoercible(argument));
|
|
19672
|
+
};
|
|
19673
|
+
|
|
19674
|
+
var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
|
|
19675
|
+
|
|
19676
|
+
// `HasOwnProperty` abstract operation
|
|
19677
|
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
19678
|
+
// eslint-disable-next-line es-x/no-object-hasown -- safe
|
|
19679
|
+
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
19680
|
+
return hasOwnProperty(toObject(it), key);
|
|
19681
|
+
};
|
|
19682
|
+
|
|
19683
|
+
var id = 0;
|
|
19684
|
+
var postfix = Math.random();
|
|
19685
|
+
var toString$3 = functionUncurryThis(1.0.toString);
|
|
19686
|
+
|
|
19687
|
+
var uid = function (key) {
|
|
19688
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
|
|
19689
|
+
};
|
|
19690
|
+
|
|
19691
|
+
var WellKnownSymbolsStore = shared('wks');
|
|
19692
|
+
var Symbol$1 = global_1.Symbol;
|
|
19693
|
+
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
19694
|
+
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
|
19695
|
+
|
|
19696
|
+
var wellKnownSymbol = function (name) {
|
|
19697
|
+
if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
19698
|
+
var description = 'Symbol.' + name;
|
|
19699
|
+
if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
|
|
19700
|
+
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
19701
|
+
} else if (useSymbolAsUid && symbolFor) {
|
|
19702
|
+
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
19703
|
+
} else {
|
|
19704
|
+
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
19705
|
+
}
|
|
19706
|
+
} return WellKnownSymbolsStore[name];
|
|
19707
|
+
};
|
|
19708
|
+
|
|
19709
|
+
var TypeError$4 = global_1.TypeError;
|
|
19710
|
+
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
|
19711
|
+
|
|
19712
|
+
// `ToPrimitive` abstract operation
|
|
19713
|
+
// https://tc39.es/ecma262/#sec-toprimitive
|
|
19714
|
+
var toPrimitive = function (input, pref) {
|
|
19715
|
+
if (!isObject(input) || isSymbol(input)) return input;
|
|
19716
|
+
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
19717
|
+
var result;
|
|
19718
|
+
if (exoticToPrim) {
|
|
19719
|
+
if (pref === undefined) pref = 'default';
|
|
19720
|
+
result = functionCall(exoticToPrim, input, pref);
|
|
19721
|
+
if (!isObject(result) || isSymbol(result)) return result;
|
|
19722
|
+
throw TypeError$4("Can't convert object to primitive value");
|
|
19723
|
+
}
|
|
19724
|
+
if (pref === undefined) pref = 'number';
|
|
19725
|
+
return ordinaryToPrimitive(input, pref);
|
|
19726
|
+
};
|
|
19727
|
+
|
|
19728
|
+
// `ToPropertyKey` abstract operation
|
|
19729
|
+
// https://tc39.es/ecma262/#sec-topropertykey
|
|
19730
|
+
var toPropertyKey = function (argument) {
|
|
19731
|
+
var key = toPrimitive(argument, 'string');
|
|
19732
|
+
return isSymbol(key) ? key : key + '';
|
|
19733
|
+
};
|
|
19734
|
+
|
|
19735
|
+
var document$1 = global_1.document;
|
|
19736
|
+
// typeof document.createElement is 'object' in old IE
|
|
19737
|
+
var EXISTS = isObject(document$1) && isObject(document$1.createElement);
|
|
19738
|
+
|
|
19739
|
+
var documentCreateElement = function (it) {
|
|
19740
|
+
return EXISTS ? document$1.createElement(it) : {};
|
|
19741
|
+
};
|
|
19742
|
+
|
|
19743
|
+
// Thanks to IE8 for its funny defineProperty
|
|
19744
|
+
var ie8DomDefine = !descriptors && !fails(function () {
|
|
19745
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
19746
|
+
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
|
19747
|
+
get: function () { return 7; }
|
|
19748
|
+
}).a != 7;
|
|
19749
|
+
});
|
|
19750
|
+
|
|
19751
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
19752
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
19753
|
+
|
|
19754
|
+
// `Object.getOwnPropertyDescriptor` method
|
|
19755
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
19756
|
+
var f$1 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
19757
|
+
O = toIndexedObject(O);
|
|
19758
|
+
P = toPropertyKey(P);
|
|
19759
|
+
if (ie8DomDefine) try {
|
|
19760
|
+
return $getOwnPropertyDescriptor(O, P);
|
|
19761
|
+
} catch (error) { /* empty */ }
|
|
19762
|
+
if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
|
|
19763
|
+
};
|
|
19764
|
+
|
|
19765
|
+
var objectGetOwnPropertyDescriptor = {
|
|
19766
|
+
f: f$1
|
|
19767
|
+
};
|
|
19768
|
+
|
|
19769
|
+
// V8 ~ Chrome 36-
|
|
19770
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
19771
|
+
var v8PrototypeDefineBug = descriptors && fails(function () {
|
|
19772
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
19773
|
+
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
19774
|
+
value: 42,
|
|
19775
|
+
writable: false
|
|
19776
|
+
}).prototype != 42;
|
|
19777
|
+
});
|
|
19778
|
+
|
|
19779
|
+
var String$2 = global_1.String;
|
|
19780
|
+
var TypeError$5 = global_1.TypeError;
|
|
19781
|
+
|
|
19782
|
+
// `Assert: Type(argument) is Object`
|
|
19783
|
+
var anObject = function (argument) {
|
|
19784
|
+
if (isObject(argument)) return argument;
|
|
19785
|
+
throw TypeError$5(String$2(argument) + ' is not an object');
|
|
19786
|
+
};
|
|
19787
|
+
|
|
19788
|
+
var TypeError$6 = global_1.TypeError;
|
|
19789
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
19790
|
+
var $defineProperty = Object.defineProperty;
|
|
19791
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
19792
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
19793
|
+
var ENUMERABLE = 'enumerable';
|
|
19794
|
+
var CONFIGURABLE = 'configurable';
|
|
19795
|
+
var WRITABLE = 'writable';
|
|
19796
|
+
|
|
19797
|
+
// `Object.defineProperty` method
|
|
19798
|
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
19799
|
+
var f$2 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
|
|
19800
|
+
anObject(O);
|
|
19801
|
+
P = toPropertyKey(P);
|
|
19802
|
+
anObject(Attributes);
|
|
19803
|
+
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
19804
|
+
var current = $getOwnPropertyDescriptor$1(O, P);
|
|
19805
|
+
if (current && current[WRITABLE]) {
|
|
19806
|
+
O[P] = Attributes.value;
|
|
19807
|
+
Attributes = {
|
|
19808
|
+
configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
|
|
19809
|
+
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
19810
|
+
writable: false
|
|
19811
|
+
};
|
|
19812
|
+
}
|
|
19813
|
+
} return $defineProperty(O, P, Attributes);
|
|
19814
|
+
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
19815
|
+
anObject(O);
|
|
19816
|
+
P = toPropertyKey(P);
|
|
19817
|
+
anObject(Attributes);
|
|
19818
|
+
if (ie8DomDefine) try {
|
|
19819
|
+
return $defineProperty(O, P, Attributes);
|
|
19820
|
+
} catch (error) { /* empty */ }
|
|
19821
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError$6('Accessors not supported');
|
|
19822
|
+
if ('value' in Attributes) O[P] = Attributes.value;
|
|
19823
|
+
return O;
|
|
19824
|
+
};
|
|
19825
|
+
|
|
19826
|
+
var objectDefineProperty = {
|
|
19827
|
+
f: f$2
|
|
19828
|
+
};
|
|
19829
|
+
|
|
19830
|
+
var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
|
19831
|
+
return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
|
|
19832
|
+
} : function (object, key, value) {
|
|
19833
|
+
object[key] = value;
|
|
19834
|
+
return object;
|
|
19835
|
+
};
|
|
19836
|
+
|
|
19837
|
+
var FunctionPrototype$1 = Function.prototype;
|
|
19838
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
19839
|
+
var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
|
|
19840
|
+
|
|
19841
|
+
var EXISTS$1 = hasOwnProperty_1(FunctionPrototype$1, 'name');
|
|
19842
|
+
// additional protection from minified / mangled / dropped function names
|
|
19843
|
+
var PROPER = EXISTS$1 && (function something() { /* empty */ }).name === 'something';
|
|
19844
|
+
var CONFIGURABLE$1 = EXISTS$1 && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
|
19845
|
+
|
|
19846
|
+
var functionName = {
|
|
19847
|
+
EXISTS: EXISTS$1,
|
|
19848
|
+
PROPER: PROPER,
|
|
19849
|
+
CONFIGURABLE: CONFIGURABLE$1
|
|
19850
|
+
};
|
|
19851
|
+
|
|
19852
|
+
var functionToString = functionUncurryThis(Function.toString);
|
|
19853
|
+
|
|
19854
|
+
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
19855
|
+
if (!isCallable(sharedStore.inspectSource)) {
|
|
19856
|
+
sharedStore.inspectSource = function (it) {
|
|
19857
|
+
return functionToString(it);
|
|
19858
|
+
};
|
|
19859
|
+
}
|
|
19860
|
+
|
|
19861
|
+
var inspectSource = sharedStore.inspectSource;
|
|
19862
|
+
|
|
19863
|
+
var WeakMap$1 = global_1.WeakMap;
|
|
19864
|
+
|
|
19865
|
+
var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
|
|
19866
|
+
|
|
19867
|
+
var keys$1 = shared('keys');
|
|
19868
|
+
|
|
19869
|
+
var sharedKey = function (key) {
|
|
19870
|
+
return keys$1[key] || (keys$1[key] = uid(key));
|
|
19871
|
+
};
|
|
19872
|
+
|
|
19873
|
+
var hiddenKeys = {};
|
|
19874
|
+
|
|
19875
|
+
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
19876
|
+
var TypeError$7 = global_1.TypeError;
|
|
19877
|
+
var WeakMap$2 = global_1.WeakMap;
|
|
19878
|
+
var set, get, has;
|
|
19879
|
+
|
|
19880
|
+
var enforce = function (it) {
|
|
19881
|
+
return has(it) ? get(it) : set(it, {});
|
|
19882
|
+
};
|
|
19883
|
+
|
|
19884
|
+
var getterFor = function (TYPE) {
|
|
19885
|
+
return function (it) {
|
|
19886
|
+
var state;
|
|
19887
|
+
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
19888
|
+
throw TypeError$7('Incompatible receiver, ' + TYPE + ' required');
|
|
19889
|
+
} return state;
|
|
19890
|
+
};
|
|
19891
|
+
};
|
|
19892
|
+
|
|
19893
|
+
if (nativeWeakMap || sharedStore.state) {
|
|
19894
|
+
var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$2());
|
|
19895
|
+
var wmget = functionUncurryThis(store$1.get);
|
|
19896
|
+
var wmhas = functionUncurryThis(store$1.has);
|
|
19897
|
+
var wmset = functionUncurryThis(store$1.set);
|
|
19898
|
+
set = function (it, metadata) {
|
|
19899
|
+
if (wmhas(store$1, it)) throw new TypeError$7(OBJECT_ALREADY_INITIALIZED);
|
|
19900
|
+
metadata.facade = it;
|
|
19901
|
+
wmset(store$1, it, metadata);
|
|
19902
|
+
return metadata;
|
|
19903
|
+
};
|
|
19904
|
+
get = function (it) {
|
|
19905
|
+
return wmget(store$1, it) || {};
|
|
19906
|
+
};
|
|
19907
|
+
has = function (it) {
|
|
19908
|
+
return wmhas(store$1, it);
|
|
19909
|
+
};
|
|
19910
|
+
} else {
|
|
19911
|
+
var STATE = sharedKey('state');
|
|
19912
|
+
hiddenKeys[STATE] = true;
|
|
19913
|
+
set = function (it, metadata) {
|
|
19914
|
+
if (hasOwnProperty_1(it, STATE)) throw new TypeError$7(OBJECT_ALREADY_INITIALIZED);
|
|
19915
|
+
metadata.facade = it;
|
|
19916
|
+
createNonEnumerableProperty(it, STATE, metadata);
|
|
19917
|
+
return metadata;
|
|
19918
|
+
};
|
|
19919
|
+
get = function (it) {
|
|
19920
|
+
return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
|
|
19921
|
+
};
|
|
19922
|
+
has = function (it) {
|
|
19923
|
+
return hasOwnProperty_1(it, STATE);
|
|
19924
|
+
};
|
|
19925
|
+
}
|
|
19926
|
+
|
|
19927
|
+
var internalState = {
|
|
19928
|
+
set: set,
|
|
19929
|
+
get: get,
|
|
19930
|
+
has: has,
|
|
19931
|
+
enforce: enforce,
|
|
19932
|
+
getterFor: getterFor
|
|
19933
|
+
};
|
|
19934
|
+
|
|
19935
|
+
var makeBuiltIn_1 = createCommonjsModule(function (module) {
|
|
19936
|
+
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
19937
|
+
|
|
19938
|
+
|
|
19939
|
+
|
|
19940
|
+
var enforceInternalState = internalState.enforce;
|
|
19941
|
+
var getInternalState = internalState.get;
|
|
19942
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
19943
|
+
var defineProperty = Object.defineProperty;
|
|
19944
|
+
|
|
19945
|
+
var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
|
|
19946
|
+
return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
19947
|
+
});
|
|
19948
|
+
|
|
19949
|
+
var TEMPLATE = String(String).split('String');
|
|
19950
|
+
|
|
19951
|
+
var makeBuiltIn = module.exports = function (value, name, options) {
|
|
19952
|
+
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
19953
|
+
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
19954
|
+
}
|
|
19955
|
+
if (options && options.getter) name = 'get ' + name;
|
|
19956
|
+
if (options && options.setter) name = 'set ' + name;
|
|
19957
|
+
if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
|
|
19958
|
+
defineProperty(value, 'name', { value: name, configurable: true });
|
|
19959
|
+
}
|
|
19960
|
+
if (CONFIGURABLE_LENGTH && options && hasOwnProperty_1(options, 'arity') && value.length !== options.arity) {
|
|
19961
|
+
defineProperty(value, 'length', { value: options.arity });
|
|
19962
|
+
}
|
|
19963
|
+
if (options && hasOwnProperty_1(options, 'constructor') && options.constructor) {
|
|
19964
|
+
if (descriptors) try {
|
|
19965
|
+
defineProperty(value, 'prototype', { writable: false });
|
|
19966
|
+
} catch (error) { /* empty */ }
|
|
19967
|
+
} else value.prototype = undefined;
|
|
19968
|
+
var state = enforceInternalState(value);
|
|
19969
|
+
if (!hasOwnProperty_1(state, 'source')) {
|
|
19970
|
+
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
19971
|
+
} return value;
|
|
19972
|
+
};
|
|
19973
|
+
|
|
19974
|
+
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
19975
|
+
// eslint-disable-next-line no-extend-native -- required
|
|
19976
|
+
Function.prototype.toString = makeBuiltIn(function toString() {
|
|
19977
|
+
return isCallable(this) && getInternalState(this).source || inspectSource(this);
|
|
19978
|
+
}, 'toString');
|
|
19979
|
+
});
|
|
19980
|
+
|
|
19981
|
+
var defineBuiltIn = function (O, key, value, options) {
|
|
19982
|
+
var unsafe = options ? !!options.unsafe : false;
|
|
19983
|
+
var simple = options ? !!options.enumerable : false;
|
|
19984
|
+
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
19985
|
+
var name = options && options.name !== undefined ? options.name : key;
|
|
19986
|
+
if (isCallable(value)) makeBuiltIn_1(value, name, options);
|
|
19987
|
+
if (O === global_1) {
|
|
19988
|
+
if (simple) O[key] = value;
|
|
19989
|
+
else setGlobal(key, value);
|
|
19990
|
+
return O;
|
|
19991
|
+
} else if (!unsafe) {
|
|
19992
|
+
delete O[key];
|
|
19993
|
+
} else if (!noTargetGet && O[key]) {
|
|
19994
|
+
simple = true;
|
|
19995
|
+
}
|
|
19996
|
+
if (simple) O[key] = value;
|
|
19997
|
+
else createNonEnumerableProperty(O, key, value);
|
|
19998
|
+
return O;
|
|
19999
|
+
};
|
|
20000
|
+
|
|
20001
|
+
var ceil = Math.ceil;
|
|
20002
|
+
var floor = Math.floor;
|
|
20003
|
+
|
|
20004
|
+
// `ToIntegerOrInfinity` abstract operation
|
|
20005
|
+
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
20006
|
+
var toIntegerOrInfinity = function (argument) {
|
|
20007
|
+
var number = +argument;
|
|
20008
|
+
// eslint-disable-next-line no-self-compare -- safe
|
|
20009
|
+
return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
|
|
20010
|
+
};
|
|
20011
|
+
|
|
20012
|
+
var max = Math.max;
|
|
20013
|
+
var min = Math.min;
|
|
20014
|
+
|
|
20015
|
+
// Helper for a popular repeating case of the spec:
|
|
20016
|
+
// Let integer be ? ToInteger(index).
|
|
20017
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
20018
|
+
var toAbsoluteIndex = function (index, length) {
|
|
20019
|
+
var integer = toIntegerOrInfinity(index);
|
|
20020
|
+
return integer < 0 ? max(integer + length, 0) : min(integer, length);
|
|
20021
|
+
};
|
|
20022
|
+
|
|
20023
|
+
var min$1 = Math.min;
|
|
20024
|
+
|
|
20025
|
+
// `ToLength` abstract operation
|
|
20026
|
+
// https://tc39.es/ecma262/#sec-tolength
|
|
20027
|
+
var toLength = function (argument) {
|
|
20028
|
+
return argument > 0 ? min$1(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
20029
|
+
};
|
|
20030
|
+
|
|
20031
|
+
// `LengthOfArrayLike` abstract operation
|
|
20032
|
+
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
20033
|
+
var lengthOfArrayLike = function (obj) {
|
|
20034
|
+
return toLength(obj.length);
|
|
20035
|
+
};
|
|
20036
|
+
|
|
20037
|
+
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
20038
|
+
var createMethod = function (IS_INCLUDES) {
|
|
20039
|
+
return function ($this, el, fromIndex) {
|
|
20040
|
+
var O = toIndexedObject($this);
|
|
20041
|
+
var length = lengthOfArrayLike(O);
|
|
20042
|
+
var index = toAbsoluteIndex(fromIndex, length);
|
|
20043
|
+
var value;
|
|
20044
|
+
// Array#includes uses SameValueZero equality algorithm
|
|
20045
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
20046
|
+
if (IS_INCLUDES && el != el) while (length > index) {
|
|
20047
|
+
value = O[index++];
|
|
20048
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
20049
|
+
if (value != value) return true;
|
|
20050
|
+
// Array#indexOf ignores holes, Array#includes - not
|
|
20051
|
+
} else for (;length > index; index++) {
|
|
20052
|
+
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
20053
|
+
} return !IS_INCLUDES && -1;
|
|
20054
|
+
};
|
|
20055
|
+
};
|
|
20056
|
+
|
|
20057
|
+
var arrayIncludes = {
|
|
20058
|
+
// `Array.prototype.includes` method
|
|
20059
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
20060
|
+
includes: createMethod(true),
|
|
20061
|
+
// `Array.prototype.indexOf` method
|
|
20062
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
20063
|
+
indexOf: createMethod(false)
|
|
20064
|
+
};
|
|
20065
|
+
|
|
20066
|
+
var indexOf = arrayIncludes.indexOf;
|
|
20067
|
+
|
|
20068
|
+
|
|
20069
|
+
var push = functionUncurryThis([].push);
|
|
20070
|
+
|
|
20071
|
+
var objectKeysInternal = function (object, names) {
|
|
20072
|
+
var O = toIndexedObject(object);
|
|
20073
|
+
var i = 0;
|
|
20074
|
+
var result = [];
|
|
20075
|
+
var key;
|
|
20076
|
+
for (key in O) !hasOwnProperty_1(hiddenKeys, key) && hasOwnProperty_1(O, key) && push(result, key);
|
|
20077
|
+
// Don't enum bug & hidden keys
|
|
20078
|
+
while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
|
|
20079
|
+
~indexOf(result, key) || push(result, key);
|
|
20080
|
+
}
|
|
20081
|
+
return result;
|
|
20082
|
+
};
|
|
20083
|
+
|
|
20084
|
+
// IE8- don't enum bug keys
|
|
20085
|
+
var enumBugKeys = [
|
|
20086
|
+
'constructor',
|
|
20087
|
+
'hasOwnProperty',
|
|
20088
|
+
'isPrototypeOf',
|
|
20089
|
+
'propertyIsEnumerable',
|
|
20090
|
+
'toLocaleString',
|
|
20091
|
+
'toString',
|
|
20092
|
+
'valueOf'
|
|
20093
|
+
];
|
|
20094
|
+
|
|
20095
|
+
var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
|
|
20096
|
+
|
|
20097
|
+
// `Object.getOwnPropertyNames` method
|
|
20098
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
20099
|
+
// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
|
|
20100
|
+
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
20101
|
+
return objectKeysInternal(O, hiddenKeys$1);
|
|
20102
|
+
};
|
|
20103
|
+
|
|
20104
|
+
var objectGetOwnPropertyNames = {
|
|
20105
|
+
f: f$3
|
|
20106
|
+
};
|
|
20107
|
+
|
|
20108
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
|
|
20109
|
+
var f$4 = Object.getOwnPropertySymbols;
|
|
20110
|
+
|
|
20111
|
+
var objectGetOwnPropertySymbols = {
|
|
20112
|
+
f: f$4
|
|
20113
|
+
};
|
|
20114
|
+
|
|
20115
|
+
var concat = functionUncurryThis([].concat);
|
|
20116
|
+
|
|
20117
|
+
// all object keys, includes non-enumerable and symbols
|
|
20118
|
+
var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
20119
|
+
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
|
20120
|
+
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
|
20121
|
+
return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
|
|
20122
|
+
};
|
|
20123
|
+
|
|
20124
|
+
var copyConstructorProperties = function (target, source, exceptions) {
|
|
20125
|
+
var keys = ownKeys$1(source);
|
|
20126
|
+
var defineProperty = objectDefineProperty.f;
|
|
20127
|
+
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
20128
|
+
for (var i = 0; i < keys.length; i++) {
|
|
20129
|
+
var key = keys[i];
|
|
20130
|
+
if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
|
|
20131
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
20132
|
+
}
|
|
20133
|
+
}
|
|
20134
|
+
};
|
|
20135
|
+
|
|
20136
|
+
var replacement = /#|\.prototype\./;
|
|
20137
|
+
|
|
20138
|
+
var isForced = function (feature, detection) {
|
|
20139
|
+
var value = data[normalize(feature)];
|
|
20140
|
+
return value == POLYFILL ? true
|
|
20141
|
+
: value == NATIVE ? false
|
|
20142
|
+
: isCallable(detection) ? fails(detection)
|
|
20143
|
+
: !!detection;
|
|
20144
|
+
};
|
|
20145
|
+
|
|
20146
|
+
var normalize = isForced.normalize = function (string) {
|
|
20147
|
+
return String(string).replace(replacement, '.').toLowerCase();
|
|
20148
|
+
};
|
|
20149
|
+
|
|
20150
|
+
var data = isForced.data = {};
|
|
20151
|
+
var NATIVE = isForced.NATIVE = 'N';
|
|
20152
|
+
var POLYFILL = isForced.POLYFILL = 'P';
|
|
20153
|
+
|
|
20154
|
+
var isForced_1 = isForced;
|
|
20155
|
+
|
|
20156
|
+
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
20157
|
+
|
|
20158
|
+
|
|
20159
|
+
|
|
20160
|
+
|
|
20161
|
+
|
|
20162
|
+
|
|
20163
|
+
/*
|
|
20164
|
+
options.target - name of the target object
|
|
20165
|
+
options.global - target is the global object
|
|
20166
|
+
options.stat - export as static methods of target
|
|
20167
|
+
options.proto - export as prototype methods of target
|
|
20168
|
+
options.real - real prototype method for the `pure` version
|
|
20169
|
+
options.forced - export even if the native feature is available
|
|
20170
|
+
options.bind - bind methods to the target, required for the `pure` version
|
|
20171
|
+
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
20172
|
+
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
20173
|
+
options.sham - add a flag to not completely full polyfills
|
|
20174
|
+
options.enumerable - export as enumerable property
|
|
20175
|
+
options.noTargetGet - prevent calling a getter on target
|
|
20176
|
+
options.name - the .name of the function if it does not match the key
|
|
20177
|
+
*/
|
|
20178
|
+
var _export = function (options, source) {
|
|
20179
|
+
var TARGET = options.target;
|
|
20180
|
+
var GLOBAL = options.global;
|
|
20181
|
+
var STATIC = options.stat;
|
|
20182
|
+
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
20183
|
+
if (GLOBAL) {
|
|
20184
|
+
target = global_1;
|
|
20185
|
+
} else if (STATIC) {
|
|
20186
|
+
target = global_1[TARGET] || setGlobal(TARGET, {});
|
|
20187
|
+
} else {
|
|
20188
|
+
target = (global_1[TARGET] || {}).prototype;
|
|
20189
|
+
}
|
|
20190
|
+
if (target) for (key in source) {
|
|
20191
|
+
sourceProperty = source[key];
|
|
20192
|
+
if (options.noTargetGet) {
|
|
20193
|
+
descriptor = getOwnPropertyDescriptor$1(target, key);
|
|
20194
|
+
targetProperty = descriptor && descriptor.value;
|
|
20195
|
+
} else targetProperty = target[key];
|
|
20196
|
+
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
20197
|
+
// contained in target
|
|
20198
|
+
if (!FORCED && targetProperty !== undefined) {
|
|
20199
|
+
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
20200
|
+
copyConstructorProperties(sourceProperty, targetProperty);
|
|
20201
|
+
}
|
|
20202
|
+
// add a flag to not completely full polyfills
|
|
20203
|
+
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
20204
|
+
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
|
20205
|
+
}
|
|
20206
|
+
defineBuiltIn(target, key, sourceProperty, options);
|
|
20207
|
+
}
|
|
20208
|
+
};
|
|
20209
|
+
|
|
20210
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
20211
|
+
var test$1 = {};
|
|
20212
|
+
|
|
20213
|
+
test$1[TO_STRING_TAG] = 'z';
|
|
20214
|
+
|
|
20215
|
+
var toStringTagSupport = String(test$1) === '[object z]';
|
|
20216
|
+
|
|
20217
|
+
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
|
20218
|
+
var Object$4 = global_1.Object;
|
|
20219
|
+
|
|
20220
|
+
// ES3 wrong here
|
|
20221
|
+
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
20222
|
+
|
|
20223
|
+
// fallback for IE11 Script Access Denied error
|
|
20224
|
+
var tryGet = function (it, key) {
|
|
20225
|
+
try {
|
|
20226
|
+
return it[key];
|
|
20227
|
+
} catch (error) { /* empty */ }
|
|
20228
|
+
};
|
|
20229
|
+
|
|
20230
|
+
// getting tag from ES6+ `Object.prototype.toString`
|
|
20231
|
+
var classof = toStringTagSupport ? classofRaw : function (it) {
|
|
20232
|
+
var O, tag, result;
|
|
20233
|
+
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
20234
|
+
// @@toStringTag case
|
|
20235
|
+
: typeof (tag = tryGet(O = Object$4(it), TO_STRING_TAG$1)) == 'string' ? tag
|
|
20236
|
+
// builtinTag case
|
|
20237
|
+
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
20238
|
+
// ES3 arguments fallback
|
|
20239
|
+
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
20240
|
+
};
|
|
20241
|
+
|
|
20242
|
+
var String$3 = global_1.String;
|
|
20243
|
+
|
|
20244
|
+
var toString_1 = function (argument) {
|
|
20245
|
+
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
20246
|
+
return String$3(argument);
|
|
20247
|
+
};
|
|
20248
|
+
|
|
20249
|
+
var charAt = functionUncurryThis(''.charAt);
|
|
20250
|
+
|
|
20251
|
+
var FORCED = fails(function () {
|
|
20252
|
+
// eslint-disable-next-line es-x/no-array-string-prototype-at -- safe
|
|
20253
|
+
return '𠮷'.at(-2) !== '\uD842';
|
|
20254
|
+
});
|
|
20255
|
+
|
|
20256
|
+
// `String.prototype.at` method
|
|
20257
|
+
// https://github.com/tc39/proposal-relative-indexing-method
|
|
20258
|
+
_export({ target: 'String', proto: true, forced: FORCED }, {
|
|
20259
|
+
at: function at(index) {
|
|
20260
|
+
var S = toString_1(requireObjectCoercible(this));
|
|
20261
|
+
var len = S.length;
|
|
20262
|
+
var relativeIndex = toIntegerOrInfinity(index);
|
|
20263
|
+
var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
|
|
20264
|
+
return (k < 0 || k >= len) ? undefined : charAt(S, k);
|
|
20265
|
+
}
|
|
20266
|
+
});
|
|
20267
|
+
|
|
20268
|
+
// `Object.keys` method
|
|
20269
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
20270
|
+
// eslint-disable-next-line es-x/no-object-keys -- safe
|
|
20271
|
+
var objectKeys = Object.keys || function keys(O) {
|
|
20272
|
+
return objectKeysInternal(O, enumBugKeys);
|
|
20273
|
+
};
|
|
20274
|
+
|
|
20275
|
+
// `Object.defineProperties` method
|
|
20276
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
20277
|
+
// eslint-disable-next-line es-x/no-object-defineproperties -- safe
|
|
20278
|
+
var f$5 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
20279
|
+
anObject(O);
|
|
20280
|
+
var props = toIndexedObject(Properties);
|
|
20281
|
+
var keys = objectKeys(Properties);
|
|
20282
|
+
var length = keys.length;
|
|
20283
|
+
var index = 0;
|
|
20284
|
+
var key;
|
|
20285
|
+
while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
|
|
20286
|
+
return O;
|
|
20287
|
+
};
|
|
20288
|
+
|
|
20289
|
+
var objectDefineProperties = {
|
|
20290
|
+
f: f$5
|
|
20291
|
+
};
|
|
20292
|
+
|
|
20293
|
+
var html = getBuiltIn('document', 'documentElement');
|
|
20294
|
+
|
|
20295
|
+
/* global ActiveXObject -- old IE, WSH */
|
|
20296
|
+
|
|
20297
|
+
|
|
20298
|
+
|
|
20299
|
+
|
|
20300
|
+
|
|
20301
|
+
|
|
20302
|
+
|
|
20303
|
+
|
|
20304
|
+
var GT = '>';
|
|
20305
|
+
var LT = '<';
|
|
20306
|
+
var PROTOTYPE = 'prototype';
|
|
20307
|
+
var SCRIPT = 'script';
|
|
20308
|
+
var IE_PROTO = sharedKey('IE_PROTO');
|
|
20309
|
+
|
|
20310
|
+
var EmptyConstructor = function () { /* empty */ };
|
|
20311
|
+
|
|
20312
|
+
var scriptTag = function (content) {
|
|
20313
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
20314
|
+
};
|
|
20315
|
+
|
|
20316
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
20317
|
+
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
20318
|
+
activeXDocument.write(scriptTag(''));
|
|
20319
|
+
activeXDocument.close();
|
|
20320
|
+
var temp = activeXDocument.parentWindow.Object;
|
|
20321
|
+
activeXDocument = null; // avoid memory leak
|
|
20322
|
+
return temp;
|
|
20323
|
+
};
|
|
20324
|
+
|
|
20325
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
20326
|
+
var NullProtoObjectViaIFrame = function () {
|
|
20327
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
20328
|
+
var iframe = documentCreateElement('iframe');
|
|
20329
|
+
var JS = 'java' + SCRIPT + ':';
|
|
20330
|
+
var iframeDocument;
|
|
20331
|
+
iframe.style.display = 'none';
|
|
20332
|
+
html.appendChild(iframe);
|
|
20333
|
+
// https://github.com/zloirock/core-js/issues/475
|
|
20334
|
+
iframe.src = String(JS);
|
|
20335
|
+
iframeDocument = iframe.contentWindow.document;
|
|
20336
|
+
iframeDocument.open();
|
|
20337
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
|
20338
|
+
iframeDocument.close();
|
|
20339
|
+
return iframeDocument.F;
|
|
20340
|
+
};
|
|
20341
|
+
|
|
20342
|
+
// Check for document.domain and active x support
|
|
20343
|
+
// No need to use active x approach when document.domain is not set
|
|
20344
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
|
20345
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
20346
|
+
// avoid IE GC bug
|
|
20347
|
+
var activeXDocument;
|
|
20348
|
+
var NullProtoObject = function () {
|
|
20349
|
+
try {
|
|
20350
|
+
activeXDocument = new ActiveXObject('htmlfile');
|
|
20351
|
+
} catch (error) { /* ignore */ }
|
|
20352
|
+
NullProtoObject = typeof document != 'undefined'
|
|
20353
|
+
? document.domain && activeXDocument
|
|
20354
|
+
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
20355
|
+
: NullProtoObjectViaIFrame()
|
|
20356
|
+
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
20357
|
+
var length = enumBugKeys.length;
|
|
20358
|
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
20359
|
+
return NullProtoObject();
|
|
20360
|
+
};
|
|
20361
|
+
|
|
20362
|
+
hiddenKeys[IE_PROTO] = true;
|
|
20363
|
+
|
|
20364
|
+
// `Object.create` method
|
|
20365
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
20366
|
+
// eslint-disable-next-line es-x/no-object-create -- safe
|
|
20367
|
+
var objectCreate = Object.create || function create(O, Properties) {
|
|
20368
|
+
var result;
|
|
20369
|
+
if (O !== null) {
|
|
20370
|
+
EmptyConstructor[PROTOTYPE] = anObject(O);
|
|
20371
|
+
result = new EmptyConstructor();
|
|
20372
|
+
EmptyConstructor[PROTOTYPE] = null;
|
|
20373
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
20374
|
+
result[IE_PROTO] = O;
|
|
20375
|
+
} else result = NullProtoObject();
|
|
20376
|
+
return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
|
|
20377
|
+
};
|
|
20378
|
+
|
|
20379
|
+
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
|
20380
|
+
var ArrayPrototype = Array.prototype;
|
|
20381
|
+
|
|
20382
|
+
// Array.prototype[@@unscopables]
|
|
20383
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
20384
|
+
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
20385
|
+
objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
|
|
20386
|
+
configurable: true,
|
|
20387
|
+
value: objectCreate(null)
|
|
20388
|
+
});
|
|
20389
|
+
}
|
|
20390
|
+
|
|
20391
|
+
// add a key to Array.prototype[@@unscopables]
|
|
20392
|
+
var addToUnscopables = function (key) {
|
|
20393
|
+
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
20394
|
+
};
|
|
20395
|
+
|
|
20396
|
+
// `Array.prototype.at` method
|
|
20397
|
+
// https://github.com/tc39/proposal-relative-indexing-method
|
|
20398
|
+
_export({ target: 'Array', proto: true }, {
|
|
20399
|
+
at: function at(index) {
|
|
20400
|
+
var O = toObject(this);
|
|
20401
|
+
var len = lengthOfArrayLike(O);
|
|
20402
|
+
var relativeIndex = toIntegerOrInfinity(index);
|
|
20403
|
+
var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
|
|
20404
|
+
return (k < 0 || k >= len) ? undefined : O[k];
|
|
20405
|
+
}
|
|
20406
|
+
});
|
|
20407
|
+
|
|
20408
|
+
addToUnscopables('at');
|
|
20409
|
+
|
|
20410
|
+
// eslint-disable-next-line es-x/no-typed-arrays -- safe
|
|
20411
|
+
var arrayBufferNative = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
|
|
20412
|
+
|
|
20413
|
+
var correctPrototypeGetter = !fails(function () {
|
|
20414
|
+
function F() { /* empty */ }
|
|
20415
|
+
F.prototype.constructor = null;
|
|
20416
|
+
// eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
|
|
20417
|
+
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
20418
|
+
});
|
|
20419
|
+
|
|
20420
|
+
var IE_PROTO$1 = sharedKey('IE_PROTO');
|
|
20421
|
+
var Object$5 = global_1.Object;
|
|
20422
|
+
var ObjectPrototype = Object$5.prototype;
|
|
20423
|
+
|
|
20424
|
+
// `Object.getPrototypeOf` method
|
|
20425
|
+
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
20426
|
+
var objectGetPrototypeOf = correctPrototypeGetter ? Object$5.getPrototypeOf : function (O) {
|
|
20427
|
+
var object = toObject(O);
|
|
20428
|
+
if (hasOwnProperty_1(object, IE_PROTO$1)) return object[IE_PROTO$1];
|
|
20429
|
+
var constructor = object.constructor;
|
|
20430
|
+
if (isCallable(constructor) && object instanceof constructor) {
|
|
20431
|
+
return constructor.prototype;
|
|
20432
|
+
} return object instanceof Object$5 ? ObjectPrototype : null;
|
|
20433
|
+
};
|
|
20434
|
+
|
|
20435
|
+
var String$4 = global_1.String;
|
|
20436
|
+
var TypeError$8 = global_1.TypeError;
|
|
20437
|
+
|
|
20438
|
+
var aPossiblePrototype = function (argument) {
|
|
20439
|
+
if (typeof argument == 'object' || isCallable(argument)) return argument;
|
|
20440
|
+
throw TypeError$8("Can't set " + String$4(argument) + ' as a prototype');
|
|
20441
|
+
};
|
|
20442
|
+
|
|
20443
|
+
/* eslint-disable no-proto -- safe */
|
|
20444
|
+
|
|
20445
|
+
|
|
20446
|
+
|
|
20447
|
+
|
|
20448
|
+
// `Object.setPrototypeOf` method
|
|
20449
|
+
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
20450
|
+
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
20451
|
+
// eslint-disable-next-line es-x/no-object-setprototypeof -- safe
|
|
20452
|
+
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
20453
|
+
var CORRECT_SETTER = false;
|
|
20454
|
+
var test = {};
|
|
20455
|
+
var setter;
|
|
20456
|
+
try {
|
|
20457
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
20458
|
+
setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
20459
|
+
setter(test, []);
|
|
20460
|
+
CORRECT_SETTER = test instanceof Array;
|
|
20461
|
+
} catch (error) { /* empty */ }
|
|
20462
|
+
return function setPrototypeOf(O, proto) {
|
|
20463
|
+
anObject(O);
|
|
20464
|
+
aPossiblePrototype(proto);
|
|
20465
|
+
if (CORRECT_SETTER) setter(O, proto);
|
|
20466
|
+
else O.__proto__ = proto;
|
|
20467
|
+
return O;
|
|
20468
|
+
};
|
|
20469
|
+
}() : undefined);
|
|
20470
|
+
|
|
20471
|
+
var defineProperty$1 = objectDefineProperty.f;
|
|
20472
|
+
|
|
20473
|
+
|
|
20474
|
+
|
|
20475
|
+
|
|
20476
|
+
|
|
20477
|
+
|
|
20478
|
+
var Int8Array = global_1.Int8Array;
|
|
20479
|
+
var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
|
|
20480
|
+
var Uint8ClampedArray = global_1.Uint8ClampedArray;
|
|
20481
|
+
var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;
|
|
20482
|
+
var TypedArray = Int8Array && objectGetPrototypeOf(Int8Array);
|
|
20483
|
+
var TypedArrayPrototype = Int8ArrayPrototype && objectGetPrototypeOf(Int8ArrayPrototype);
|
|
20484
|
+
var ObjectPrototype$1 = Object.prototype;
|
|
20485
|
+
var TypeError$9 = global_1.TypeError;
|
|
20486
|
+
|
|
20487
|
+
var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
|
|
20488
|
+
var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
|
|
20489
|
+
var TYPED_ARRAY_CONSTRUCTOR = uid('TYPED_ARRAY_CONSTRUCTOR');
|
|
20490
|
+
// Fixing native typed arrays in Opera Presto crashes the browser, see #595
|
|
20491
|
+
var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferNative && !!objectSetPrototypeOf && classof(global_1.opera) !== 'Opera';
|
|
20492
|
+
var TYPED_ARRAY_TAG_REQUIRED = false;
|
|
20493
|
+
var NAME, Constructor, Prototype;
|
|
20494
|
+
|
|
20495
|
+
var TypedArrayConstructorsList = {
|
|
20496
|
+
Int8Array: 1,
|
|
20497
|
+
Uint8Array: 1,
|
|
20498
|
+
Uint8ClampedArray: 1,
|
|
20499
|
+
Int16Array: 2,
|
|
20500
|
+
Uint16Array: 2,
|
|
20501
|
+
Int32Array: 4,
|
|
20502
|
+
Uint32Array: 4,
|
|
20503
|
+
Float32Array: 4,
|
|
20504
|
+
Float64Array: 8
|
|
20505
|
+
};
|
|
20506
|
+
|
|
20507
|
+
var BigIntArrayConstructorsList = {
|
|
20508
|
+
BigInt64Array: 8,
|
|
20509
|
+
BigUint64Array: 8
|
|
20510
|
+
};
|
|
20511
|
+
|
|
20512
|
+
var isView = function isView(it) {
|
|
20513
|
+
if (!isObject(it)) return false;
|
|
20514
|
+
var klass = classof(it);
|
|
20515
|
+
return klass === 'DataView'
|
|
20516
|
+
|| hasOwnProperty_1(TypedArrayConstructorsList, klass)
|
|
20517
|
+
|| hasOwnProperty_1(BigIntArrayConstructorsList, klass);
|
|
20518
|
+
};
|
|
20519
|
+
|
|
20520
|
+
var isTypedArray = function (it) {
|
|
20521
|
+
if (!isObject(it)) return false;
|
|
20522
|
+
var klass = classof(it);
|
|
20523
|
+
return hasOwnProperty_1(TypedArrayConstructorsList, klass)
|
|
20524
|
+
|| hasOwnProperty_1(BigIntArrayConstructorsList, klass);
|
|
20525
|
+
};
|
|
20526
|
+
|
|
20527
|
+
var aTypedArray = function (it) {
|
|
20528
|
+
if (isTypedArray(it)) return it;
|
|
20529
|
+
throw TypeError$9('Target is not a typed array');
|
|
20530
|
+
};
|
|
20531
|
+
|
|
20532
|
+
var aTypedArrayConstructor = function (C) {
|
|
20533
|
+
if (isCallable(C) && (!objectSetPrototypeOf || objectIsPrototypeOf(TypedArray, C))) return C;
|
|
20534
|
+
throw TypeError$9(tryToString(C) + ' is not a typed array constructor');
|
|
20535
|
+
};
|
|
20536
|
+
|
|
20537
|
+
var exportTypedArrayMethod = function (KEY, property, forced, options) {
|
|
20538
|
+
if (!descriptors) return;
|
|
20539
|
+
if (forced) for (var ARRAY in TypedArrayConstructorsList) {
|
|
20540
|
+
var TypedArrayConstructor = global_1[ARRAY];
|
|
20541
|
+
if (TypedArrayConstructor && hasOwnProperty_1(TypedArrayConstructor.prototype, KEY)) try {
|
|
20542
|
+
delete TypedArrayConstructor.prototype[KEY];
|
|
20543
|
+
} catch (error) {
|
|
20544
|
+
// old WebKit bug - some methods are non-configurable
|
|
20545
|
+
try {
|
|
20546
|
+
TypedArrayConstructor.prototype[KEY] = property;
|
|
20547
|
+
} catch (error2) { /* empty */ }
|
|
20548
|
+
}
|
|
20549
|
+
}
|
|
20550
|
+
if (!TypedArrayPrototype[KEY] || forced) {
|
|
20551
|
+
defineBuiltIn(TypedArrayPrototype, KEY, forced ? property
|
|
20552
|
+
: NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property, options);
|
|
20553
|
+
}
|
|
20554
|
+
};
|
|
20555
|
+
|
|
20556
|
+
var exportTypedArrayStaticMethod = function (KEY, property, forced) {
|
|
20557
|
+
var ARRAY, TypedArrayConstructor;
|
|
20558
|
+
if (!descriptors) return;
|
|
20559
|
+
if (objectSetPrototypeOf) {
|
|
20560
|
+
if (forced) for (ARRAY in TypedArrayConstructorsList) {
|
|
20561
|
+
TypedArrayConstructor = global_1[ARRAY];
|
|
20562
|
+
if (TypedArrayConstructor && hasOwnProperty_1(TypedArrayConstructor, KEY)) try {
|
|
20563
|
+
delete TypedArrayConstructor[KEY];
|
|
20564
|
+
} catch (error) { /* empty */ }
|
|
20565
|
+
}
|
|
20566
|
+
if (!TypedArray[KEY] || forced) {
|
|
20567
|
+
// V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
|
|
20568
|
+
try {
|
|
20569
|
+
return defineBuiltIn(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);
|
|
20570
|
+
} catch (error) { /* empty */ }
|
|
20571
|
+
} else return;
|
|
20572
|
+
}
|
|
20573
|
+
for (ARRAY in TypedArrayConstructorsList) {
|
|
20574
|
+
TypedArrayConstructor = global_1[ARRAY];
|
|
20575
|
+
if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {
|
|
20576
|
+
defineBuiltIn(TypedArrayConstructor, KEY, property);
|
|
20577
|
+
}
|
|
20578
|
+
}
|
|
20579
|
+
};
|
|
20580
|
+
|
|
20581
|
+
for (NAME in TypedArrayConstructorsList) {
|
|
20582
|
+
Constructor = global_1[NAME];
|
|
20583
|
+
Prototype = Constructor && Constructor.prototype;
|
|
20584
|
+
if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);
|
|
20585
|
+
else NATIVE_ARRAY_BUFFER_VIEWS = false;
|
|
20586
|
+
}
|
|
20587
|
+
|
|
20588
|
+
for (NAME in BigIntArrayConstructorsList) {
|
|
20589
|
+
Constructor = global_1[NAME];
|
|
20590
|
+
Prototype = Constructor && Constructor.prototype;
|
|
20591
|
+
if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);
|
|
20592
|
+
}
|
|
20593
|
+
|
|
20594
|
+
// WebKit bug - typed arrays constructors prototype is Object.prototype
|
|
20595
|
+
if (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {
|
|
20596
|
+
// eslint-disable-next-line no-shadow -- safe
|
|
20597
|
+
TypedArray = function TypedArray() {
|
|
20598
|
+
throw TypeError$9('Incorrect invocation');
|
|
20599
|
+
};
|
|
20600
|
+
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
|
|
20601
|
+
if (global_1[NAME]) objectSetPrototypeOf(global_1[NAME], TypedArray);
|
|
20602
|
+
}
|
|
20603
|
+
}
|
|
20604
|
+
|
|
20605
|
+
if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype$1) {
|
|
20606
|
+
TypedArrayPrototype = TypedArray.prototype;
|
|
20607
|
+
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
|
|
20608
|
+
if (global_1[NAME]) objectSetPrototypeOf(global_1[NAME].prototype, TypedArrayPrototype);
|
|
20609
|
+
}
|
|
20610
|
+
}
|
|
20611
|
+
|
|
20612
|
+
// WebKit bug - one more object in Uint8ClampedArray prototype chain
|
|
20613
|
+
if (NATIVE_ARRAY_BUFFER_VIEWS && objectGetPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
|
|
20614
|
+
objectSetPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
|
|
20615
|
+
}
|
|
20616
|
+
|
|
20617
|
+
if (descriptors && !hasOwnProperty_1(TypedArrayPrototype, TO_STRING_TAG$2)) {
|
|
20618
|
+
TYPED_ARRAY_TAG_REQUIRED = true;
|
|
20619
|
+
defineProperty$1(TypedArrayPrototype, TO_STRING_TAG$2, { get: function () {
|
|
20620
|
+
return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
|
|
20621
|
+
} });
|
|
20622
|
+
for (NAME in TypedArrayConstructorsList) if (global_1[NAME]) {
|
|
20623
|
+
createNonEnumerableProperty(global_1[NAME], TYPED_ARRAY_TAG, NAME);
|
|
20624
|
+
}
|
|
20625
|
+
}
|
|
20626
|
+
|
|
20627
|
+
var arrayBufferViewCore = {
|
|
20628
|
+
NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
|
|
20629
|
+
TYPED_ARRAY_CONSTRUCTOR: TYPED_ARRAY_CONSTRUCTOR,
|
|
20630
|
+
TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG,
|
|
20631
|
+
aTypedArray: aTypedArray,
|
|
20632
|
+
aTypedArrayConstructor: aTypedArrayConstructor,
|
|
20633
|
+
exportTypedArrayMethod: exportTypedArrayMethod,
|
|
20634
|
+
exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
|
|
20635
|
+
isView: isView,
|
|
20636
|
+
isTypedArray: isTypedArray,
|
|
20637
|
+
TypedArray: TypedArray,
|
|
20638
|
+
TypedArrayPrototype: TypedArrayPrototype
|
|
20639
|
+
};
|
|
20640
|
+
|
|
20641
|
+
var aTypedArray$1 = arrayBufferViewCore.aTypedArray;
|
|
20642
|
+
var exportTypedArrayMethod$1 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
20643
|
+
|
|
20644
|
+
// `%TypedArray%.prototype.at` method
|
|
20645
|
+
// https://github.com/tc39/proposal-relative-indexing-method
|
|
20646
|
+
exportTypedArrayMethod$1('at', function at(index) {
|
|
20647
|
+
var O = aTypedArray$1(this);
|
|
20648
|
+
var len = lengthOfArrayLike(O);
|
|
20649
|
+
var relativeIndex = toIntegerOrInfinity(index);
|
|
20650
|
+
var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
|
|
20651
|
+
return (k < 0 || k >= len) ? undefined : O[k];
|
|
20652
|
+
});
|
|
20653
|
+
|
|
19401
20654
|
var selectedColor = "".concat(MATISSE_BLUE);
|
|
19402
20655
|
var hoverColor$3 = "".concat(HOVER_LIGHT_BLUE);
|
|
19403
20656
|
var fallbackValues$e = {
|
|
@@ -19408,24 +20661,24 @@ var fallbackValues$e = {
|
|
|
19408
20661
|
var IconWrapper = styled__default.div.withConfig({
|
|
19409
20662
|
displayName: "Dropdown__IconWrapper",
|
|
19410
20663
|
componentId: "sc-pn6m0h-0"
|
|
19411
|
-
})(["display:flex;flex-direction:column;justify-content:center;transition:transform 0.3s ease;", ""], function (_ref) {
|
|
20664
|
+
})(["position:absolute;display:flex;flex-direction:column;justify-content:center;transition:transform 0.3s ease;", ";top:20px;right:12px;"], function (_ref) {
|
|
19412
20665
|
var open = _ref.open;
|
|
19413
20666
|
return open ? "transform: rotate(-180deg)" : "";
|
|
19414
20667
|
});
|
|
19415
20668
|
var DropdownContentWrapper = styled__default.div.withConfig({
|
|
19416
20669
|
displayName: "Dropdown__DropdownContentWrapper",
|
|
19417
20670
|
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) {
|
|
20671
|
+
})(["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
20672
|
var widthFitOptions = _ref2.widthFitOptions;
|
|
19420
20673
|
return widthFitOptions ? "fit-content" : "100%";
|
|
19421
20674
|
}, function (_ref3) {
|
|
19422
20675
|
var maxHeight = _ref3.maxHeight;
|
|
19423
20676
|
return maxHeight || "400px";
|
|
19424
20677
|
});
|
|
19425
|
-
var DropdownItemWrapper = styled__default.
|
|
20678
|
+
var DropdownItemWrapper = styled__default.li.withConfig({
|
|
19426
20679
|
displayName: "Dropdown__DropdownItemWrapper",
|
|
19427
20680
|
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) {
|
|
20681
|
+
})(["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
20682
|
var selected = _ref4.selected,
|
|
19430
20683
|
themeValues = _ref4.themeValues;
|
|
19431
20684
|
return selected ? themeValues.selectedColor : WHITE;
|
|
@@ -19443,10 +20696,6 @@ var DropdownItemWrapper = styled__default.div.withConfig({
|
|
|
19443
20696
|
themeValues = _ref7.themeValues;
|
|
19444
20697
|
return selected ? themeValues.selectedColor : disabled ? WHITE : themeValues.hoverColor;
|
|
19445
20698
|
});
|
|
19446
|
-
var SearchInput = styled__default.input.withConfig({
|
|
19447
|
-
displayName: "Dropdown__SearchInput",
|
|
19448
|
-
componentId: "sc-pn6m0h-3"
|
|
19449
|
-
})(["border:none;background-color:transparent;font-size:16px;height:24px;min-width:80%;"]);
|
|
19450
20699
|
|
|
19451
20700
|
var Dropdown = function Dropdown(_ref8) {
|
|
19452
20701
|
var placeholder = _ref8.placeholder,
|
|
@@ -19458,7 +20707,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19458
20707
|
_ref8$disabledValues = _ref8.disabledValues,
|
|
19459
20708
|
disabledValues = _ref8$disabledValues === void 0 ? [] : _ref8$disabledValues,
|
|
19460
20709
|
_ref8$onClick = _ref8.onClick,
|
|
19461
|
-
|
|
20710
|
+
_onClick = _ref8$onClick === void 0 ? noop : _ref8$onClick,
|
|
19462
20711
|
themeValues = _ref8.themeValues,
|
|
19463
20712
|
maxHeight = _ref8.maxHeight,
|
|
19464
20713
|
_ref8$widthFitOptions = _ref8.widthFitOptions,
|
|
@@ -19470,7 +20719,9 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19470
20719
|
autoEraseTypeAhead = _ref8$autoEraseTypeAh === void 0 ? true : _ref8$autoEraseTypeAh,
|
|
19471
20720
|
ariaLabelledby = _ref8.ariaLabelledby,
|
|
19472
20721
|
_ref8$autocompleteVal = _ref8.autocompleteValue,
|
|
19473
|
-
autocompleteValue = _ref8$autocompleteVal === void 0 ? "" : _ref8$autocompleteVal
|
|
20722
|
+
autocompleteValue = _ref8$autocompleteVal === void 0 ? "" : _ref8$autocompleteVal,
|
|
20723
|
+
_ref8$smoothScroll = _ref8.smoothScroll,
|
|
20724
|
+
smoothScroll = _ref8$smoothScroll === void 0 ? true : _ref8$smoothScroll;
|
|
19474
20725
|
|
|
19475
20726
|
var _useState = React.useState(""),
|
|
19476
20727
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -19497,6 +20748,21 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19497
20748
|
selectedRef = _useState10[0],
|
|
19498
20749
|
setSelectedRef = _useState10[1];
|
|
19499
20750
|
|
|
20751
|
+
var _useState11 = React.useState(undefined),
|
|
20752
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
20753
|
+
focusedRef = _useState12[0],
|
|
20754
|
+
setFocusedRef = _useState12[1];
|
|
20755
|
+
|
|
20756
|
+
var _useState13 = React.useState(false),
|
|
20757
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
20758
|
+
inputChangedByAutofill = _useState14[0],
|
|
20759
|
+
setInputChangedByAutofill = _useState14[1];
|
|
20760
|
+
|
|
20761
|
+
var _useState15 = React.useState(false),
|
|
20762
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
20763
|
+
focusedByClick = _useState16[0],
|
|
20764
|
+
setFocusedByClick = _useState16[1];
|
|
20765
|
+
|
|
19500
20766
|
if (optionsState !== options) {
|
|
19501
20767
|
setOptionsState(options);
|
|
19502
20768
|
setOptionsChanged(true);
|
|
@@ -19507,10 +20773,10 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19507
20773
|
setOptionsChanged(false);
|
|
19508
20774
|
}
|
|
19509
20775
|
|
|
19510
|
-
var
|
|
19511
|
-
|
|
19512
|
-
timer =
|
|
19513
|
-
setTimer =
|
|
20776
|
+
var _useState17 = React.useState(null),
|
|
20777
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
20778
|
+
timer = _useState18[0],
|
|
20779
|
+
setTimer = _useState18[1];
|
|
19514
20780
|
|
|
19515
20781
|
var optionRefs = React.useRef(_toConsumableArray(Array(options.length)).map(function () {
|
|
19516
20782
|
return /*#__PURE__*/React.createRef();
|
|
@@ -19526,25 +20792,21 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19526
20792
|
};
|
|
19527
20793
|
|
|
19528
20794
|
var onKeyDown = function onKeyDown(e) {
|
|
19529
|
-
var _optionRefs$current$l, _optionRefs$current;
|
|
19530
|
-
|
|
19531
|
-
console.log("key down event is", e.target);
|
|
19532
|
-
console.log("key down event value is", e.target.value);
|
|
19533
20795
|
var key = e.key,
|
|
19534
20796
|
keyCode = e.keyCode;
|
|
19535
20797
|
var focus = document.activeElement;
|
|
19536
|
-
console.log("dropdown value is", value);
|
|
19537
|
-
console.log("focus is", focus);
|
|
19538
|
-
console.log("option refs are", optionRefs.current);
|
|
19539
20798
|
var optionEl = optionRefs.current.find(function (ref) {
|
|
19540
20799
|
return ref.current === focus;
|
|
19541
20800
|
});
|
|
19542
|
-
console.log("option el is", optionEl);
|
|
19543
20801
|
|
|
19544
20802
|
switch (key) {
|
|
19545
20803
|
case "ArrowDown":
|
|
19546
20804
|
e.preventDefault();
|
|
19547
20805
|
|
|
20806
|
+
if (!isOpen) {
|
|
20807
|
+
_onClick();
|
|
20808
|
+
}
|
|
20809
|
+
|
|
19548
20810
|
if (optionEl) {
|
|
19549
20811
|
if (optionEl.current.nextElementSibling) {
|
|
19550
20812
|
optionEl.current.nextElementSibling.focus();
|
|
@@ -19553,7 +20815,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19553
20815
|
break;
|
|
19554
20816
|
}
|
|
19555
20817
|
} else {
|
|
19556
|
-
|
|
20818
|
+
_onClick();
|
|
19557
20819
|
}
|
|
19558
20820
|
|
|
19559
20821
|
break;
|
|
@@ -19569,7 +20831,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19569
20831
|
break;
|
|
19570
20832
|
}
|
|
19571
20833
|
} else {
|
|
19572
|
-
|
|
20834
|
+
_onClick();
|
|
19573
20835
|
}
|
|
19574
20836
|
|
|
19575
20837
|
break;
|
|
@@ -19593,7 +20855,14 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19593
20855
|
|
|
19594
20856
|
case "End":
|
|
19595
20857
|
e.preventDefault();
|
|
19596
|
-
optionRefs.current
|
|
20858
|
+
optionRefs.current.at(-1).current.focus();
|
|
20859
|
+
break;
|
|
20860
|
+
|
|
20861
|
+
case "Escape":
|
|
20862
|
+
if (isOpen) {
|
|
20863
|
+
_onClick();
|
|
20864
|
+
}
|
|
20865
|
+
|
|
19597
20866
|
break;
|
|
19598
20867
|
}
|
|
19599
20868
|
|
|
@@ -19603,20 +20872,40 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19603
20872
|
}
|
|
19604
20873
|
};
|
|
19605
20874
|
|
|
20875
|
+
var handleItemSelection = function handleItemSelection(evt, choice, i) {
|
|
20876
|
+
if (disabledValues.includes(choice.value)) {
|
|
20877
|
+
evt.preventDefault();
|
|
20878
|
+
} else {
|
|
20879
|
+
setSelectedRef(optionRefs.current[i]);
|
|
20880
|
+
onSelect(choice.value);
|
|
20881
|
+
|
|
20882
|
+
if (isOpen) {
|
|
20883
|
+
_onClick();
|
|
20884
|
+
}
|
|
20885
|
+
}
|
|
20886
|
+
};
|
|
20887
|
+
|
|
19606
20888
|
React.useEffect(function () {
|
|
19607
|
-
|
|
19608
|
-
console.log("option ref current in isopen useffect", optionRefs.current[0].current);
|
|
19609
|
-
console.log("selected refs in isopen useffect", selectedRef);
|
|
19610
|
-
console.log("value in isopen useffect", value);
|
|
20889
|
+
var selectedRefExists = selectedRef !== undefined && selectedRef.current !== null;
|
|
19611
20890
|
|
|
19612
|
-
if (isOpen &&
|
|
19613
|
-
// WAI-ARIA requires the selected option to receive focus
|
|
20891
|
+
if (isOpen && selectedRefExists && !focusedByClick) {
|
|
20892
|
+
// For keyboard users, WAI-ARIA requires the selected option to receive focus
|
|
19614
20893
|
selectedRef.current.focus();
|
|
19615
|
-
} else if (isOpen && optionRefs.current[0].current) {
|
|
20894
|
+
} else if (isOpen && optionRefs.current[0].current && !focusedByClick) {
|
|
19616
20895
|
// If no selected option, first option receives focus
|
|
19617
20896
|
optionRefs.current[0].current.focus();
|
|
19618
20897
|
}
|
|
19619
20898
|
|
|
20899
|
+
if (isOpen && focusedByClick && selectedRefExists) {
|
|
20900
|
+
// To support autofill for mouse users, we maintain focus on input just scroll item into view
|
|
20901
|
+
selectedRef.current.scrollIntoView({
|
|
20902
|
+
behavior: smoothScroll ? "smooth" : "auto",
|
|
20903
|
+
block: "nearest",
|
|
20904
|
+
inline: "start"
|
|
20905
|
+
});
|
|
20906
|
+
setFocusedByClick(false);
|
|
20907
|
+
}
|
|
20908
|
+
|
|
19620
20909
|
clearTimeout(timer);
|
|
19621
20910
|
setInputValue("");
|
|
19622
20911
|
}, [isOpen]);
|
|
@@ -19633,10 +20922,20 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19633
20922
|
}));
|
|
19634
20923
|
}, [inputValue]);
|
|
19635
20924
|
React.useEffect(function () {
|
|
19636
|
-
if (
|
|
19637
|
-
|
|
19638
|
-
|
|
20925
|
+
if (
|
|
20926
|
+
/*
|
|
20927
|
+
Either user has typed a value into input that matches a non-disabled option or
|
|
20928
|
+
user has autofilled or pasted into input a string matching a valid option
|
|
20929
|
+
*/
|
|
20930
|
+
(!isOpen || inputChangedByAutofill) && filteredOptions[0] && !disabledValues.includes(filteredOptions[0].value) && filteredOptions[0].text != placeholder) {
|
|
20931
|
+
setInputChangedByAutofill(false);
|
|
19639
20932
|
onSelect(filteredOptions[0].value);
|
|
20933
|
+
|
|
20934
|
+
if (isOpen) {
|
|
20935
|
+
setTimeout(function () {
|
|
20936
|
+
return _onClick();
|
|
20937
|
+
}, 1000);
|
|
20938
|
+
}
|
|
19640
20939
|
}
|
|
19641
20940
|
|
|
19642
20941
|
if (optionRefs.current[0].current) {
|
|
@@ -19646,50 +20945,61 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19646
20945
|
}
|
|
19647
20946
|
}, [filteredOptions]);
|
|
19648
20947
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
19649
|
-
|
|
19650
|
-
onClick: onClick,
|
|
19651
|
-
padding: "12px",
|
|
19652
|
-
width: "100%",
|
|
19653
|
-
hoverStyles: "background-color: ".concat(themeValues.hoverColor, ";"),
|
|
20948
|
+
padding: "0",
|
|
19654
20949
|
background: isOpen ? themeValues.hoverColor : WHITE,
|
|
19655
|
-
"
|
|
19656
|
-
|
|
20950
|
+
extraStyles: "position: relative;",
|
|
20951
|
+
minWidth: "100%",
|
|
20952
|
+
onClick: function onClick() {
|
|
20953
|
+
if (!isOpen) {
|
|
20954
|
+
setFocusedByClick(true);
|
|
20955
|
+
|
|
20956
|
+
_onClick();
|
|
20957
|
+
}
|
|
20958
|
+
},
|
|
20959
|
+
onKeyDown: onKeyDown,
|
|
20960
|
+
width: "100%"
|
|
20961
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
20962
|
+
as: "input",
|
|
20963
|
+
"aria-multiline": "false",
|
|
20964
|
+
"aria-autocomplete": "list",
|
|
20965
|
+
"aria-controls": "".concat(ariaLabelledby, "_listbox"),
|
|
20966
|
+
"aria-activedescendant": "focused_option",
|
|
19657
20967
|
"aria-owns": "".concat(ariaLabelledby, "_listbox"),
|
|
19658
20968
|
"aria-haspopup": "listbox",
|
|
19659
20969
|
"aria-labelledby": ariaLabelledby,
|
|
19660
|
-
|
|
19661
|
-
|
|
19662
|
-
|
|
19663
|
-
tabIndex: 0,
|
|
20970
|
+
"aria-expanded": isOpen,
|
|
20971
|
+
autocomplete: autocompleteValue,
|
|
20972
|
+
background: isOpen ? themeValues.hoverColor : WHITE,
|
|
19664
20973
|
borderRadius: "2px",
|
|
19665
20974
|
borderSize: "1px",
|
|
19666
|
-
borderColor: isError ? ERROR_COLOR : isOpen ? themeValues.selectedColor : GREY_CHATEAU
|
|
19667
|
-
|
|
19668
|
-
|
|
19669
|
-
|
|
19670
|
-
|
|
19671
|
-
|
|
19672
|
-
|
|
19673
|
-
placeholder: getSelection(),
|
|
19674
|
-
value: inputValue,
|
|
20975
|
+
borderColor: isError ? ERROR_COLOR : isOpen ? themeValues.selectedColor : GREY_CHATEAU,
|
|
20976
|
+
extraStyles: disabled ? "".concat(inputPlaceholderTextStyle).concat(inputDisabledStyle) : inputPlaceholderTextStyle,
|
|
20977
|
+
hoverStyles: "background-color: ".concat(themeValues.hoverColor, ";"),
|
|
20978
|
+
isOpen: isOpen,
|
|
20979
|
+
minHeight: "48px",
|
|
20980
|
+
minWidth: "100%",
|
|
20981
|
+
name: autocompleteValue,
|
|
19675
20982
|
onChange: function onChange(e) {
|
|
19676
|
-
|
|
19677
|
-
|
|
20983
|
+
// support autofill and copy/paste
|
|
20984
|
+
if (e.target.value !== inputValue) {
|
|
20985
|
+
setInputValue(e.target.value);
|
|
20986
|
+
setInputChangedByAutofill(true);
|
|
20987
|
+
}
|
|
19678
20988
|
},
|
|
20989
|
+
padding: "12px",
|
|
20990
|
+
placeholder: getSelection(),
|
|
20991
|
+
role: "combobox",
|
|
19679
20992
|
themeValues: themeValues,
|
|
19680
|
-
|
|
20993
|
+
title: hasTitles ? getSelection() : null,
|
|
19681
20994
|
type: "text",
|
|
19682
|
-
|
|
19683
|
-
|
|
19684
|
-
|
|
19685
|
-
|
|
19686
|
-
isOpen: isOpen,
|
|
19687
|
-
tabIndex: -1,
|
|
19688
|
-
name: autocompleteValue,
|
|
19689
|
-
autocomplete: autocompleteValue
|
|
20995
|
+
tabIndex: 0,
|
|
20996
|
+
value: inputValue,
|
|
20997
|
+
width: "100%",
|
|
20998
|
+
dataQa: placeholder
|
|
19690
20999
|
}), /*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
19691
|
-
open: isOpen
|
|
19692
|
-
|
|
21000
|
+
open: isOpen,
|
|
21001
|
+
onClick: _onClick
|
|
21002
|
+
}, /*#__PURE__*/React__default.createElement(DropdownIcon, null)), /*#__PURE__*/React__default.createElement(React.Fragment, null, isOpen ? /*#__PURE__*/React__default.createElement(DropdownContentWrapper, {
|
|
19693
21003
|
maxHeight: maxHeight,
|
|
19694
21004
|
open: isOpen,
|
|
19695
21005
|
ref: dropdownRef,
|
|
@@ -19698,23 +21008,25 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19698
21008
|
role: "listbox",
|
|
19699
21009
|
id: "".concat(ariaLabelledby, "_listbox")
|
|
19700
21010
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
19701
|
-
childGap: "0"
|
|
21011
|
+
childGap: "0",
|
|
21012
|
+
as: "ul"
|
|
19702
21013
|
}, filteredOptions.map(function (choice, i) {
|
|
19703
21014
|
if (choice.value === value && selectedRef !== optionRefs.current[i]) {
|
|
19704
21015
|
setSelectedRef(optionRefs.current[i]);
|
|
19705
21016
|
}
|
|
19706
21017
|
|
|
19707
21018
|
return /*#__PURE__*/React__default.createElement(DropdownItemWrapper, {
|
|
19708
|
-
id:
|
|
21019
|
+
id: focusedRef === optionRefs.current[i] ? "focused_option" : choice.value,
|
|
19709
21020
|
key: choice.value,
|
|
19710
21021
|
ref: optionRefs.current[i],
|
|
19711
|
-
as: "button",
|
|
19712
21022
|
tabIndex: -1,
|
|
19713
|
-
onClick:
|
|
19714
|
-
return
|
|
19715
|
-
}
|
|
19716
|
-
|
|
19717
|
-
|
|
21023
|
+
onClick: function onClick(e) {
|
|
21024
|
+
return handleItemSelection(e, choice, i);
|
|
21025
|
+
},
|
|
21026
|
+
onKeyDown: function onKeyDown(e) {
|
|
21027
|
+
if (e.keyCode === 13) {
|
|
21028
|
+
handleItemSelection(e, choice, i);
|
|
21029
|
+
}
|
|
19718
21030
|
},
|
|
19719
21031
|
selected: choice.value === value,
|
|
19720
21032
|
"aria-selected": choice.value === value,
|
|
@@ -19722,13 +21034,16 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19722
21034
|
"data-qa": choice.text,
|
|
19723
21035
|
themeValues: themeValues,
|
|
19724
21036
|
title: hasTitles ? choice.text : null,
|
|
19725
|
-
role: "option"
|
|
21037
|
+
role: "option",
|
|
21038
|
+
onFocus: function onFocus() {
|
|
21039
|
+
return setFocusedRef(optionRefs.current[i]);
|
|
21040
|
+
}
|
|
19726
21041
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
19727
21042
|
variant: "p",
|
|
19728
21043
|
color: choice.value === value ? WHITE : disabledValues.includes(choice.value) ? STORM_GREY : MINESHAFT_GREY,
|
|
19729
21044
|
extraStyles: "padding-left: 16px; \n cursor: ".concat(disabledValues.includes(choice.value) ? "default" : "pointer", "; \n white-space: nowrap; \n overflow: hidden; \n text-overflow: ellipsis;")
|
|
19730
21045
|
}, choice.text));
|
|
19731
|
-
}))) : /*#__PURE__*/React__default.createElement(React.Fragment, null));
|
|
21046
|
+
}))) : /*#__PURE__*/React__default.createElement(React.Fragment, null)));
|
|
19732
21047
|
};
|
|
19733
21048
|
|
|
19734
21049
|
var Dropdown$1 = themeComponent(Dropdown, "Dropdown", fallbackValues$e);
|
|
@@ -19830,7 +21145,9 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
19830
21145
|
themeValues = _ref.themeValues,
|
|
19831
21146
|
_ref$hasTitles = _ref.hasTitles,
|
|
19832
21147
|
hasTitles = _ref$hasTitles === void 0 ? false : _ref$hasTitles,
|
|
19833
|
-
autocompleteValue = _ref.autocompleteValue
|
|
21148
|
+
autocompleteValue = _ref.autocompleteValue,
|
|
21149
|
+
_ref$smoothScroll = _ref.smoothScroll,
|
|
21150
|
+
smoothScroll = _ref$smoothScroll === void 0 ? true : _ref$smoothScroll;
|
|
19834
21151
|
|
|
19835
21152
|
var _useState = React.useState(false),
|
|
19836
21153
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -19886,7 +21203,8 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
19886
21203
|
return setOpen(!open);
|
|
19887
21204
|
},
|
|
19888
21205
|
disabled: disabled,
|
|
19889
|
-
autocompleteValue: autocompleteValue
|
|
21206
|
+
autocompleteValue: autocompleteValue,
|
|
21207
|
+
smoothScroll: smoothScroll
|
|
19890
21208
|
}), /*#__PURE__*/React__default.createElement(Stack, {
|
|
19891
21209
|
direction: "row",
|
|
19892
21210
|
justify: "space-between"
|
|
@@ -33808,20 +35126,20 @@ function isPlainObject(value) {
|
|
|
33808
35126
|
}
|
|
33809
35127
|
var assign = Object.assign || function assign(target, value) {
|
|
33810
35128
|
for (var key in value) {
|
|
33811
|
-
if (has(value, key)) {
|
|
35129
|
+
if (has$1(value, key)) {
|
|
33812
35130
|
target[key] = value[key];
|
|
33813
35131
|
}
|
|
33814
35132
|
}
|
|
33815
35133
|
|
|
33816
35134
|
return target;
|
|
33817
35135
|
};
|
|
33818
|
-
var ownKeys$
|
|
35136
|
+
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;
|
|
33819
35137
|
function shallowCopy(base, invokeGetters) {
|
|
33820
35138
|
if ( invokeGetters === void 0 ) invokeGetters = false;
|
|
33821
35139
|
|
|
33822
35140
|
if (Array.isArray(base)) { return base.slice(); }
|
|
33823
35141
|
var clone = Object.create(Object.getPrototypeOf(base));
|
|
33824
|
-
ownKeys$
|
|
35142
|
+
ownKeys$2(base).forEach(function (key) {
|
|
33825
35143
|
if (key === DRAFT_STATE) {
|
|
33826
35144
|
return; // Never copy over draft state.
|
|
33827
35145
|
}
|
|
@@ -33853,14 +35171,14 @@ function each(value, cb) {
|
|
|
33853
35171
|
if (Array.isArray(value)) {
|
|
33854
35172
|
for (var i = 0; i < value.length; i++) { cb(i, value[i], value); }
|
|
33855
35173
|
} else {
|
|
33856
|
-
ownKeys$
|
|
35174
|
+
ownKeys$2(value).forEach(function (key) { return cb(key, value[key], value); });
|
|
33857
35175
|
}
|
|
33858
35176
|
}
|
|
33859
35177
|
function isEnumerable(base, prop) {
|
|
33860
35178
|
var desc = Object.getOwnPropertyDescriptor(base, prop);
|
|
33861
35179
|
return !!desc && desc.enumerable;
|
|
33862
35180
|
}
|
|
33863
|
-
function has(thing, prop) {
|
|
35181
|
+
function has$1(thing, prop) {
|
|
33864
35182
|
return Object.prototype.hasOwnProperty.call(thing, prop);
|
|
33865
35183
|
}
|
|
33866
35184
|
function is(x, y) {
|
|
@@ -33924,7 +35242,7 @@ function revoke(draft) {
|
|
|
33924
35242
|
|
|
33925
35243
|
// but share them all instead
|
|
33926
35244
|
|
|
33927
|
-
var descriptors = {};
|
|
35245
|
+
var descriptors$1 = {};
|
|
33928
35246
|
function willFinalize(scope, result, isReplaced) {
|
|
33929
35247
|
scope.drafts.forEach(function (draft) {
|
|
33930
35248
|
draft[DRAFT_STATE].finalizing = true;
|
|
@@ -33992,7 +35310,7 @@ function peek(draft, prop) {
|
|
|
33992
35310
|
return draft[prop];
|
|
33993
35311
|
}
|
|
33994
35312
|
|
|
33995
|
-
function get(state, prop) {
|
|
35313
|
+
function get$1(state, prop) {
|
|
33996
35314
|
assertUnrevoked(state);
|
|
33997
35315
|
var value = peek(source(state), prop);
|
|
33998
35316
|
if (state.finalizing) { return value; } // Create a draft if the value is unmodified.
|
|
@@ -34043,17 +35361,17 @@ function clonePotentialDraft(base) {
|
|
|
34043
35361
|
}
|
|
34044
35362
|
|
|
34045
35363
|
function proxyProperty(draft, prop, enumerable) {
|
|
34046
|
-
var desc = descriptors[prop];
|
|
35364
|
+
var desc = descriptors$1[prop];
|
|
34047
35365
|
|
|
34048
35366
|
if (desc) {
|
|
34049
35367
|
desc.enumerable = enumerable;
|
|
34050
35368
|
} else {
|
|
34051
|
-
descriptors[prop] = desc = {
|
|
35369
|
+
descriptors$1[prop] = desc = {
|
|
34052
35370
|
configurable: true,
|
|
34053
35371
|
enumerable: enumerable,
|
|
34054
35372
|
|
|
34055
|
-
get: function get$1() {
|
|
34056
|
-
return get(this[DRAFT_STATE], prop);
|
|
35373
|
+
get: function get$1$1() {
|
|
35374
|
+
return get$1(this[DRAFT_STATE], prop);
|
|
34057
35375
|
},
|
|
34058
35376
|
|
|
34059
35377
|
set: function set$1$1(value) {
|
|
@@ -34099,7 +35417,7 @@ function markChangesRecursively(object) {
|
|
|
34099
35417
|
// Look for added keys.
|
|
34100
35418
|
Object.keys(draft).forEach(function (key) {
|
|
34101
35419
|
// The `undefined` check is a fast path for pre-existing keys.
|
|
34102
|
-
if (base[key] === undefined && !has(base, key)) {
|
|
35420
|
+
if (base[key] === undefined && !has$1(base, key)) {
|
|
34103
35421
|
assigned[key] = true;
|
|
34104
35422
|
markChanged(state);
|
|
34105
35423
|
} else if (!assigned[key]) {
|
|
@@ -34110,7 +35428,7 @@ function markChangesRecursively(object) {
|
|
|
34110
35428
|
|
|
34111
35429
|
Object.keys(base).forEach(function (key) {
|
|
34112
35430
|
// The `undefined` check is a fast path for pre-existing keys.
|
|
34113
|
-
if (draft[key] === undefined && !has(draft, key)) {
|
|
35431
|
+
if (draft[key] === undefined && !has$1(draft, key)) {
|
|
34114
35432
|
assigned[key] = false;
|
|
34115
35433
|
markChanged(state);
|
|
34116
35434
|
}
|
|
@@ -34143,7 +35461,7 @@ function hasObjectChanges(state) {
|
|
|
34143
35461
|
var key = keys[i];
|
|
34144
35462
|
var baseValue = base[key]; // The `undefined` check is a fast path for pre-existing keys.
|
|
34145
35463
|
|
|
34146
|
-
if (baseValue === undefined && !has(base, key)) {
|
|
35464
|
+
if (baseValue === undefined && !has$1(base, key)) {
|
|
34147
35465
|
return true;
|
|
34148
35466
|
} // Once a base key is deleted, future changes go undetected, because its
|
|
34149
35467
|
// descriptor is erased. This branch detects any missed changes.
|
|
@@ -34228,7 +35546,7 @@ function createProxy$1(base, parent) {
|
|
|
34228
35546
|
return proxy;
|
|
34229
35547
|
}
|
|
34230
35548
|
var objectTraps = {
|
|
34231
|
-
get: get$1,
|
|
35549
|
+
get: get$1$1,
|
|
34232
35550
|
|
|
34233
35551
|
has: function has(target, prop) {
|
|
34234
35552
|
return prop in source$1(target);
|
|
@@ -34240,7 +35558,7 @@ var objectTraps = {
|
|
|
34240
35558
|
|
|
34241
35559
|
set: set$1$1,
|
|
34242
35560
|
deleteProperty: deleteProperty,
|
|
34243
|
-
getOwnPropertyDescriptor: getOwnPropertyDescriptor,
|
|
35561
|
+
getOwnPropertyDescriptor: getOwnPropertyDescriptor$2,
|
|
34244
35562
|
|
|
34245
35563
|
defineProperty: function defineProperty() {
|
|
34246
35564
|
throw new Error("Object.defineProperty() cannot be used on an Immer draft"); // prettier-ignore
|
|
@@ -34291,11 +35609,11 @@ function peek$1(draft, prop) {
|
|
|
34291
35609
|
return desc && desc.value;
|
|
34292
35610
|
}
|
|
34293
35611
|
|
|
34294
|
-
function get$1(state, prop) {
|
|
35612
|
+
function get$1$1(state, prop) {
|
|
34295
35613
|
if (prop === DRAFT_STATE) { return state; }
|
|
34296
35614
|
var drafts = state.drafts; // Check for existing draft in unmodified state.
|
|
34297
35615
|
|
|
34298
|
-
if (!state.modified && has(drafts, prop)) {
|
|
35616
|
+
if (!state.modified && has$1(drafts, prop)) {
|
|
34299
35617
|
return drafts[prop];
|
|
34300
35618
|
}
|
|
34301
35619
|
|
|
@@ -34348,7 +35666,7 @@ function deleteProperty(state, prop) {
|
|
|
34348
35666
|
// the same guarantee in ES5 mode.
|
|
34349
35667
|
|
|
34350
35668
|
|
|
34351
|
-
function getOwnPropertyDescriptor(state, prop) {
|
|
35669
|
+
function getOwnPropertyDescriptor$2(state, prop) {
|
|
34352
35670
|
var owner = source$1(state);
|
|
34353
35671
|
var desc = Reflect.getOwnPropertyDescriptor(owner, prop);
|
|
34354
35672
|
|
|
@@ -34767,7 +36085,7 @@ Immer.prototype.finalize = function finalize (draft, path, scope) {
|
|
|
34767
36085
|
var base = state.base;
|
|
34768
36086
|
var copy = state.copy;
|
|
34769
36087
|
each(base, function (prop) {
|
|
34770
|
-
if (!has(copy, prop)) { this$1$1.onDelete(state, prop); }
|
|
36088
|
+
if (!has$1(copy, prop)) { this$1$1.onDelete(state, prop); }
|
|
34771
36089
|
});
|
|
34772
36090
|
}
|
|
34773
36091
|
}
|
|
@@ -34946,7 +36264,7 @@ const createInitialState = formConfig => {
|
|
|
34946
36264
|
};
|
|
34947
36265
|
|
|
34948
36266
|
const SET = "field/SET";
|
|
34949
|
-
const set = fieldName => value => ({
|
|
36267
|
+
const set$2 = fieldName => value => ({
|
|
34950
36268
|
type: SET,
|
|
34951
36269
|
payload: { fieldName, value }
|
|
34952
36270
|
});
|
|
@@ -35026,7 +36344,7 @@ const createMapDispatchToProps = formConfig => {
|
|
|
35026
36344
|
const keys = Object.keys(formConfig);
|
|
35027
36345
|
for (let fieldName of keys) {
|
|
35028
36346
|
dispatchObj.fields[fieldName] = {
|
|
35029
|
-
set: value => dispatch(set(fieldName)(value)),
|
|
36347
|
+
set: value => dispatch(set$2(fieldName)(value)),
|
|
35030
36348
|
addValidator: validator => dispatch(addValidator(fieldName)(validator))
|
|
35031
36349
|
};
|
|
35032
36350
|
}
|
|
@@ -35950,7 +37268,10 @@ var HighlightTabRow = function HighlightTabRow(_ref) {
|
|
|
35950
37268
|
boxShadow: "0px 0px 4px 0px rgb(110, 114, 126)",
|
|
35951
37269
|
role: "region",
|
|
35952
37270
|
"aria-label": "Payment step"
|
|
35953
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
37271
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
37272
|
+
srOnly: true,
|
|
37273
|
+
padding: "0"
|
|
37274
|
+
}, /*#__PURE__*/React__default.createElement(Text$1, null, "Current step: ".concat(tabs[highlightIndex]))), /*#__PURE__*/React__default.createElement(Center, {
|
|
35954
37275
|
maxWidth: "76.5rem"
|
|
35955
37276
|
}, /*#__PURE__*/React__default.createElement(Reel, {
|
|
35956
37277
|
padding: "0",
|
|
@@ -37962,7 +39283,7 @@ var tabbable_1 = tabbable;
|
|
|
37962
39283
|
|
|
37963
39284
|
var immutable = extend;
|
|
37964
39285
|
|
|
37965
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
39286
|
+
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
37966
39287
|
|
|
37967
39288
|
function extend() {
|
|
37968
39289
|
var target = {};
|
|
@@ -37971,7 +39292,7 @@ function extend() {
|
|
|
37971
39292
|
var source = arguments[i];
|
|
37972
39293
|
|
|
37973
39294
|
for (var key in source) {
|
|
37974
|
-
if (hasOwnProperty.call(source, key)) {
|
|
39295
|
+
if (hasOwnProperty$1.call(source, key)) {
|
|
37975
39296
|
target[key] = source[key];
|
|
37976
39297
|
}
|
|
37977
39298
|
}
|