@thecb/components 8.4.12-beta.2 → 8.4.13-beta.1
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 +1575 -435
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1576 -435
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/molecules/partial-amount-form/PartialAmountForm.state.js +22 -40
- package/src/components/molecules/partial-amount-form/index.js +2 -9
- package/src/components/molecules/payment-details/PaymentDetails.js +36 -16
package/dist/index.cjs.js
CHANGED
|
@@ -19016,14 +19016,12 @@ function _extends$1() {
|
|
|
19016
19016
|
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
19017
19017
|
for (var i = 1; i < arguments.length; i++) {
|
|
19018
19018
|
var source = arguments[i];
|
|
19019
|
-
|
|
19020
19019
|
for (var key in source) {
|
|
19021
19020
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
19022
19021
|
target[key] = source[key];
|
|
19023
19022
|
}
|
|
19024
19023
|
}
|
|
19025
19024
|
}
|
|
19026
|
-
|
|
19027
19025
|
return target;
|
|
19028
19026
|
};
|
|
19029
19027
|
return _extends$1.apply(this, arguments);
|
|
@@ -19033,7 +19031,6 @@ function _assertThisInitialized(self) {
|
|
|
19033
19031
|
if (self === void 0) {
|
|
19034
19032
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
19035
19033
|
}
|
|
19036
|
-
|
|
19037
19034
|
return self;
|
|
19038
19035
|
}
|
|
19039
19036
|
|
|
@@ -19066,7 +19063,6 @@ function _isNativeReflectConstruct() {
|
|
|
19066
19063
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
19067
19064
|
if (Reflect.construct.sham) return false;
|
|
19068
19065
|
if (typeof Proxy === "function") return true;
|
|
19069
|
-
|
|
19070
19066
|
try {
|
|
19071
19067
|
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
19072
19068
|
return true;
|
|
@@ -19088,30 +19084,23 @@ function _construct(Parent, args, Class) {
|
|
|
19088
19084
|
return instance;
|
|
19089
19085
|
};
|
|
19090
19086
|
}
|
|
19091
|
-
|
|
19092
19087
|
return _construct.apply(null, arguments);
|
|
19093
19088
|
}
|
|
19094
19089
|
|
|
19095
19090
|
function _wrapNativeSuper(Class) {
|
|
19096
19091
|
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
19097
|
-
|
|
19098
19092
|
_wrapNativeSuper = function _wrapNativeSuper(Class) {
|
|
19099
19093
|
if (Class === null || !_isNativeFunction(Class)) return Class;
|
|
19100
|
-
|
|
19101
19094
|
if (typeof Class !== "function") {
|
|
19102
19095
|
throw new TypeError("Super expression must either be null or a function");
|
|
19103
19096
|
}
|
|
19104
|
-
|
|
19105
19097
|
if (typeof _cache !== "undefined") {
|
|
19106
19098
|
if (_cache.has(Class)) return _cache.get(Class);
|
|
19107
|
-
|
|
19108
19099
|
_cache.set(Class, Wrapper);
|
|
19109
19100
|
}
|
|
19110
|
-
|
|
19111
19101
|
function Wrapper() {
|
|
19112
19102
|
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
|
|
19113
19103
|
}
|
|
19114
|
-
|
|
19115
19104
|
Wrapper.prototype = Object.create(Class.prototype, {
|
|
19116
19105
|
constructor: {
|
|
19117
19106
|
value: Wrapper,
|
|
@@ -19122,7 +19111,6 @@ function _wrapNativeSuper(Class) {
|
|
|
19122
19111
|
});
|
|
19123
19112
|
return _setPrototypeOf(Wrapper, Class);
|
|
19124
19113
|
};
|
|
19125
|
-
|
|
19126
19114
|
return _wrapNativeSuper(Class);
|
|
19127
19115
|
}
|
|
19128
19116
|
|
|
@@ -22405,7 +22393,7 @@ var check = function (it) {
|
|
|
22405
22393
|
|
|
22406
22394
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
22407
22395
|
var global_1 =
|
|
22408
|
-
// eslint-disable-next-line es
|
|
22396
|
+
// eslint-disable-next-line es/no-global-this -- safe
|
|
22409
22397
|
check(typeof globalThis == 'object' && globalThis) ||
|
|
22410
22398
|
check(typeof window == 'object' && window) ||
|
|
22411
22399
|
// eslint-disable-next-line no-restricted-globals -- safe
|
|
@@ -22424,12 +22412,12 @@ var fails = function (exec) {
|
|
|
22424
22412
|
|
|
22425
22413
|
// Detect IE8's incomplete defineProperty implementation
|
|
22426
22414
|
var descriptors = !fails(function () {
|
|
22427
|
-
// eslint-disable-next-line es
|
|
22415
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
22428
22416
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
22429
22417
|
});
|
|
22430
22418
|
|
|
22431
22419
|
var functionBindNative = !fails(function () {
|
|
22432
|
-
// eslint-disable-next-line es
|
|
22420
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
22433
22421
|
var test = (function () { /* empty */ }).bind();
|
|
22434
22422
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
22435
22423
|
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
@@ -22442,7 +22430,7 @@ var functionCall = functionBindNative ? call.bind(call) : function () {
|
|
|
22442
22430
|
};
|
|
22443
22431
|
|
|
22444
22432
|
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
22445
|
-
// eslint-disable-next-line es
|
|
22433
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
22446
22434
|
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
22447
22435
|
|
|
22448
22436
|
// Nashorn ~ JDK8 bug
|
|
@@ -22469,14 +22457,11 @@ var createPropertyDescriptor = function (bitmap, value) {
|
|
|
22469
22457
|
};
|
|
22470
22458
|
|
|
22471
22459
|
var FunctionPrototype = Function.prototype;
|
|
22472
|
-
var bind$1 = FunctionPrototype.bind;
|
|
22473
22460
|
var call$1 = FunctionPrototype.call;
|
|
22474
|
-
var
|
|
22461
|
+
var uncurryThisWithBind = functionBindNative && FunctionPrototype.bind.bind(call$1, call$1);
|
|
22475
22462
|
|
|
22476
|
-
var functionUncurryThis = functionBindNative ? function (fn) {
|
|
22477
|
-
return
|
|
22478
|
-
} : function (fn) {
|
|
22479
|
-
return fn && function () {
|
|
22463
|
+
var functionUncurryThis = functionBindNative ? uncurryThisWithBind : function (fn) {
|
|
22464
|
+
return function () {
|
|
22480
22465
|
return call$1.apply(fn, arguments);
|
|
22481
22466
|
};
|
|
22482
22467
|
};
|
|
@@ -22500,12 +22485,18 @@ var indexedObject = fails(function () {
|
|
|
22500
22485
|
return classofRaw(it) == 'String' ? split(it, '') : $Object(it);
|
|
22501
22486
|
} : $Object;
|
|
22502
22487
|
|
|
22488
|
+
// we can't use just `it == null` since of `document.all` special case
|
|
22489
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
22490
|
+
var isNullOrUndefined = function (it) {
|
|
22491
|
+
return it === null || it === undefined;
|
|
22492
|
+
};
|
|
22493
|
+
|
|
22503
22494
|
var $TypeError = TypeError;
|
|
22504
22495
|
|
|
22505
22496
|
// `RequireObjectCoercible` abstract operation
|
|
22506
22497
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
22507
22498
|
var requireObjectCoercible = function (it) {
|
|
22508
|
-
if (it
|
|
22499
|
+
if (isNullOrUndefined(it)) throw $TypeError("Can't call method on " + it);
|
|
22509
22500
|
return it;
|
|
22510
22501
|
};
|
|
22511
22502
|
|
|
@@ -22517,13 +22508,32 @@ var toIndexedObject = function (it) {
|
|
|
22517
22508
|
return indexedObject(requireObjectCoercible(it));
|
|
22518
22509
|
};
|
|
22519
22510
|
|
|
22511
|
+
var documentAll = typeof document == 'object' && document.all;
|
|
22512
|
+
|
|
22513
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
22514
|
+
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
22515
|
+
var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;
|
|
22516
|
+
|
|
22517
|
+
var documentAll_1 = {
|
|
22518
|
+
all: documentAll,
|
|
22519
|
+
IS_HTMLDDA: IS_HTMLDDA
|
|
22520
|
+
};
|
|
22521
|
+
|
|
22522
|
+
var documentAll$1 = documentAll_1.all;
|
|
22523
|
+
|
|
22520
22524
|
// `IsCallable` abstract operation
|
|
22521
22525
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
22522
|
-
var isCallable = function (argument) {
|
|
22526
|
+
var isCallable = documentAll_1.IS_HTMLDDA ? function (argument) {
|
|
22527
|
+
return typeof argument == 'function' || argument === documentAll$1;
|
|
22528
|
+
} : function (argument) {
|
|
22523
22529
|
return typeof argument == 'function';
|
|
22524
22530
|
};
|
|
22525
22531
|
|
|
22526
|
-
var
|
|
22532
|
+
var documentAll$2 = documentAll_1.all;
|
|
22533
|
+
|
|
22534
|
+
var isObject = documentAll_1.IS_HTMLDDA ? function (it) {
|
|
22535
|
+
return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll$2;
|
|
22536
|
+
} : function (it) {
|
|
22527
22537
|
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
22528
22538
|
};
|
|
22529
22539
|
|
|
@@ -22537,7 +22547,7 @@ var getBuiltIn = function (namespace, method) {
|
|
|
22537
22547
|
|
|
22538
22548
|
var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
|
|
22539
22549
|
|
|
22540
|
-
var engineUserAgent =
|
|
22550
|
+
var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
|
|
22541
22551
|
|
|
22542
22552
|
var process$1 = global_1.process;
|
|
22543
22553
|
var Deno = global_1.Deno;
|
|
@@ -22564,12 +22574,12 @@ if (!version && engineUserAgent) {
|
|
|
22564
22574
|
|
|
22565
22575
|
var engineV8Version = version;
|
|
22566
22576
|
|
|
22567
|
-
/* eslint-disable es
|
|
22577
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
|
22568
22578
|
|
|
22569
22579
|
|
|
22570
22580
|
|
|
22571
|
-
// eslint-disable-next-line es
|
|
22572
|
-
var
|
|
22581
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
22582
|
+
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
22573
22583
|
var symbol = Symbol();
|
|
22574
22584
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
22575
22585
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
@@ -22578,10 +22588,10 @@ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
|
22578
22588
|
!Symbol.sham && engineV8Version && engineV8Version < 41;
|
|
22579
22589
|
});
|
|
22580
22590
|
|
|
22581
|
-
/* eslint-disable es
|
|
22591
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
|
22582
22592
|
|
|
22583
22593
|
|
|
22584
|
-
var useSymbolAsUid =
|
|
22594
|
+
var useSymbolAsUid = symbolConstructorDetection
|
|
22585
22595
|
&& !Symbol.sham
|
|
22586
22596
|
&& typeof Symbol.iterator == 'symbol';
|
|
22587
22597
|
|
|
@@ -22616,7 +22626,7 @@ var aCallable = function (argument) {
|
|
|
22616
22626
|
// https://tc39.es/ecma262/#sec-getmethod
|
|
22617
22627
|
var getMethod = function (V, P) {
|
|
22618
22628
|
var func = V[P];
|
|
22619
|
-
return func
|
|
22629
|
+
return isNullOrUndefined(func) ? undefined : aCallable(func);
|
|
22620
22630
|
};
|
|
22621
22631
|
|
|
22622
22632
|
var $TypeError$2 = TypeError;
|
|
@@ -22631,7 +22641,7 @@ var ordinaryToPrimitive = function (input, pref) {
|
|
|
22631
22641
|
throw $TypeError$2("Can't convert object to primitive value");
|
|
22632
22642
|
};
|
|
22633
22643
|
|
|
22634
|
-
// eslint-disable-next-line es
|
|
22644
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
22635
22645
|
var defineProperty = Object.defineProperty;
|
|
22636
22646
|
|
|
22637
22647
|
var defineGlobalProperty = function (key, value) {
|
|
@@ -22651,10 +22661,10 @@ var shared = createCommonjsModule(function (module) {
|
|
|
22651
22661
|
(module.exports = function (key, value) {
|
|
22652
22662
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
22653
22663
|
})('versions', []).push({
|
|
22654
|
-
version: '3.
|
|
22664
|
+
version: '3.29.0',
|
|
22655
22665
|
mode: 'global',
|
|
22656
|
-
copyright: '© 2014-
|
|
22657
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
22666
|
+
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
|
|
22667
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE',
|
|
22658
22668
|
source: 'https://github.com/zloirock/core-js'
|
|
22659
22669
|
});
|
|
22660
22670
|
});
|
|
@@ -22671,7 +22681,7 @@ var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
|
|
|
22671
22681
|
|
|
22672
22682
|
// `HasOwnProperty` abstract operation
|
|
22673
22683
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
22674
|
-
// eslint-disable-next-line es
|
|
22684
|
+
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
22675
22685
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
22676
22686
|
return hasOwnProperty(toObject(it), key);
|
|
22677
22687
|
};
|
|
@@ -22684,21 +22694,15 @@ var uid = function (key) {
|
|
|
22684
22694
|
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
|
|
22685
22695
|
};
|
|
22686
22696
|
|
|
22687
|
-
var WellKnownSymbolsStore = shared('wks');
|
|
22688
22697
|
var Symbol$1 = global_1.Symbol;
|
|
22689
|
-
var
|
|
22690
|
-
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
|
22698
|
+
var WellKnownSymbolsStore = shared('wks');
|
|
22699
|
+
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
|
22691
22700
|
|
|
22692
22701
|
var wellKnownSymbol = function (name) {
|
|
22693
|
-
if (!hasOwnProperty_1(WellKnownSymbolsStore, name)
|
|
22694
|
-
|
|
22695
|
-
|
|
22696
|
-
|
|
22697
|
-
} else if (useSymbolAsUid && symbolFor) {
|
|
22698
|
-
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
22699
|
-
} else {
|
|
22700
|
-
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
22701
|
-
}
|
|
22702
|
+
if (!hasOwnProperty_1(WellKnownSymbolsStore, name)) {
|
|
22703
|
+
WellKnownSymbolsStore[name] = symbolConstructorDetection && hasOwnProperty_1(Symbol$1, name)
|
|
22704
|
+
? Symbol$1[name]
|
|
22705
|
+
: createWellKnownSymbol('Symbol.' + name);
|
|
22702
22706
|
} return WellKnownSymbolsStore[name];
|
|
22703
22707
|
};
|
|
22704
22708
|
|
|
@@ -22738,13 +22742,13 @@ var documentCreateElement = function (it) {
|
|
|
22738
22742
|
|
|
22739
22743
|
// Thanks to IE8 for its funny defineProperty
|
|
22740
22744
|
var ie8DomDefine = !descriptors && !fails(function () {
|
|
22741
|
-
// eslint-disable-next-line es
|
|
22745
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
22742
22746
|
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
|
22743
22747
|
get: function () { return 7; }
|
|
22744
22748
|
}).a != 7;
|
|
22745
22749
|
});
|
|
22746
22750
|
|
|
22747
|
-
// eslint-disable-next-line es
|
|
22751
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
22748
22752
|
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
22749
22753
|
|
|
22750
22754
|
// `Object.getOwnPropertyDescriptor` method
|
|
@@ -22765,7 +22769,7 @@ var objectGetOwnPropertyDescriptor = {
|
|
|
22765
22769
|
// V8 ~ Chrome 36-
|
|
22766
22770
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
22767
22771
|
var v8PrototypeDefineBug = descriptors && fails(function () {
|
|
22768
|
-
// eslint-disable-next-line es
|
|
22772
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
22769
22773
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
22770
22774
|
value: 42,
|
|
22771
22775
|
writable: false
|
|
@@ -22782,9 +22786,9 @@ var anObject = function (argument) {
|
|
|
22782
22786
|
};
|
|
22783
22787
|
|
|
22784
22788
|
var $TypeError$5 = TypeError;
|
|
22785
|
-
// eslint-disable-next-line es
|
|
22789
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
22786
22790
|
var $defineProperty = Object.defineProperty;
|
|
22787
|
-
// eslint-disable-next-line es
|
|
22791
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
22788
22792
|
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
22789
22793
|
var ENUMERABLE = 'enumerable';
|
|
22790
22794
|
var CONFIGURABLE = 'configurable';
|
|
@@ -22831,7 +22835,7 @@ var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
|
|
22831
22835
|
};
|
|
22832
22836
|
|
|
22833
22837
|
var FunctionPrototype$1 = Function.prototype;
|
|
22834
|
-
// eslint-disable-next-line es
|
|
22838
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
22835
22839
|
var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
|
|
22836
22840
|
|
|
22837
22841
|
var EXISTS$1 = hasOwnProperty_1(FunctionPrototype$1, 'name');
|
|
@@ -22858,7 +22862,7 @@ var inspectSource = sharedStore.inspectSource;
|
|
|
22858
22862
|
|
|
22859
22863
|
var WeakMap$1 = global_1.WeakMap;
|
|
22860
22864
|
|
|
22861
|
-
var
|
|
22865
|
+
var weakMapBasicDetection = isCallable(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
22862
22866
|
|
|
22863
22867
|
var keys$1 = shared('keys');
|
|
22864
22868
|
|
|
@@ -22886,28 +22890,30 @@ var getterFor = function (TYPE) {
|
|
|
22886
22890
|
};
|
|
22887
22891
|
};
|
|
22888
22892
|
|
|
22889
|
-
if (
|
|
22893
|
+
if (weakMapBasicDetection || sharedStore.state) {
|
|
22890
22894
|
var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$2());
|
|
22891
|
-
|
|
22892
|
-
|
|
22893
|
-
|
|
22895
|
+
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
22896
|
+
store$1.get = store$1.get;
|
|
22897
|
+
store$1.has = store$1.has;
|
|
22898
|
+
store$1.set = store$1.set;
|
|
22899
|
+
/* eslint-enable no-self-assign -- prototype methods protection */
|
|
22894
22900
|
set = function (it, metadata) {
|
|
22895
|
-
if (
|
|
22901
|
+
if (store$1.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
22896
22902
|
metadata.facade = it;
|
|
22897
|
-
|
|
22903
|
+
store$1.set(it, metadata);
|
|
22898
22904
|
return metadata;
|
|
22899
22905
|
};
|
|
22900
22906
|
get = function (it) {
|
|
22901
|
-
return
|
|
22907
|
+
return store$1.get(it) || {};
|
|
22902
22908
|
};
|
|
22903
22909
|
has = function (it) {
|
|
22904
|
-
return
|
|
22910
|
+
return store$1.has(it);
|
|
22905
22911
|
};
|
|
22906
22912
|
} else {
|
|
22907
22913
|
var STATE = sharedKey('state');
|
|
22908
22914
|
hiddenKeys[STATE] = true;
|
|
22909
22915
|
set = function (it, metadata) {
|
|
22910
|
-
if (hasOwnProperty_1(it, STATE)) throw
|
|
22916
|
+
if (hasOwnProperty_1(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
22911
22917
|
metadata.facade = it;
|
|
22912
22918
|
createNonEnumerableProperty(it, STATE, metadata);
|
|
22913
22919
|
return metadata;
|
|
@@ -22935,8 +22941,12 @@ var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
|
22935
22941
|
|
|
22936
22942
|
var enforceInternalState = internalState.enforce;
|
|
22937
22943
|
var getInternalState = internalState.get;
|
|
22938
|
-
|
|
22944
|
+
var $String = String;
|
|
22945
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
22939
22946
|
var defineProperty = Object.defineProperty;
|
|
22947
|
+
var stringSlice = functionUncurryThis(''.slice);
|
|
22948
|
+
var replace = functionUncurryThis(''.replace);
|
|
22949
|
+
var join = functionUncurryThis([].join);
|
|
22940
22950
|
|
|
22941
22951
|
var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
|
|
22942
22952
|
return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
@@ -22945,8 +22955,8 @@ var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
|
|
|
22945
22955
|
var TEMPLATE = String(String).split('String');
|
|
22946
22956
|
|
|
22947
22957
|
var makeBuiltIn = module.exports = function (value, name, options) {
|
|
22948
|
-
if (String(name)
|
|
22949
|
-
name = '[' + String(name)
|
|
22958
|
+
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
|
|
22959
|
+
name = '[' + replace($String(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
22950
22960
|
}
|
|
22951
22961
|
if (options && options.getter) name = 'get ' + name;
|
|
22952
22962
|
if (options && options.setter) name = 'set ' + name;
|
|
@@ -22965,7 +22975,7 @@ var makeBuiltIn = module.exports = function (value, name, options) {
|
|
|
22965
22975
|
} catch (error) { /* empty */ }
|
|
22966
22976
|
var state = enforceInternalState(value);
|
|
22967
22977
|
if (!hasOwnProperty_1(state, 'source')) {
|
|
22968
|
-
state.source =
|
|
22978
|
+
state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
|
|
22969
22979
|
} return value;
|
|
22970
22980
|
};
|
|
22971
22981
|
|
|
@@ -23004,7 +23014,7 @@ var floor = Math.floor;
|
|
|
23004
23014
|
|
|
23005
23015
|
// `Math.trunc` method
|
|
23006
23016
|
// https://tc39.es/ecma262/#sec-math.trunc
|
|
23007
|
-
// eslint-disable-next-line es
|
|
23017
|
+
// eslint-disable-next-line es/no-math-trunc -- safe
|
|
23008
23018
|
var mathTrunc = Math.trunc || function trunc(x) {
|
|
23009
23019
|
var n = +x;
|
|
23010
23020
|
return (n > 0 ? floor : ceil)(n);
|
|
@@ -23105,7 +23115,7 @@ var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
|
|
|
23105
23115
|
|
|
23106
23116
|
// `Object.getOwnPropertyNames` method
|
|
23107
23117
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
23108
|
-
// eslint-disable-next-line es
|
|
23118
|
+
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
23109
23119
|
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
23110
23120
|
return objectKeysInternal(O, hiddenKeys$1);
|
|
23111
23121
|
};
|
|
@@ -23114,7 +23124,7 @@ var objectGetOwnPropertyNames = {
|
|
|
23114
23124
|
f: f$3
|
|
23115
23125
|
};
|
|
23116
23126
|
|
|
23117
|
-
// eslint-disable-next-line es
|
|
23127
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
23118
23128
|
var f$4 = Object.getOwnPropertySymbols;
|
|
23119
23129
|
|
|
23120
23130
|
var objectGetOwnPropertySymbols = {
|
|
@@ -23258,7 +23268,7 @@ var toString_1 = function (argument) {
|
|
|
23258
23268
|
var charAt = functionUncurryThis(''.charAt);
|
|
23259
23269
|
|
|
23260
23270
|
var FORCED = fails(function () {
|
|
23261
|
-
// eslint-disable-next-line es
|
|
23271
|
+
// eslint-disable-next-line es/no-array-string-prototype-at -- safe
|
|
23262
23272
|
return '𠮷'.at(-2) !== '\uD842';
|
|
23263
23273
|
});
|
|
23264
23274
|
|
|
@@ -23276,14 +23286,14 @@ _export({ target: 'String', proto: true, forced: FORCED }, {
|
|
|
23276
23286
|
|
|
23277
23287
|
// `Object.keys` method
|
|
23278
23288
|
// https://tc39.es/ecma262/#sec-object.keys
|
|
23279
|
-
// eslint-disable-next-line es
|
|
23289
|
+
// eslint-disable-next-line es/no-object-keys -- safe
|
|
23280
23290
|
var objectKeys = Object.keys || function keys(O) {
|
|
23281
23291
|
return objectKeysInternal(O, enumBugKeys);
|
|
23282
23292
|
};
|
|
23283
23293
|
|
|
23284
23294
|
// `Object.defineProperties` method
|
|
23285
23295
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
23286
|
-
// eslint-disable-next-line es
|
|
23296
|
+
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
23287
23297
|
var f$5 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
23288
23298
|
anObject(O);
|
|
23289
23299
|
var props = toIndexedObject(Properties);
|
|
@@ -23372,7 +23382,7 @@ hiddenKeys[IE_PROTO] = true;
|
|
|
23372
23382
|
|
|
23373
23383
|
// `Object.create` method
|
|
23374
23384
|
// https://tc39.es/ecma262/#sec-object.create
|
|
23375
|
-
// eslint-disable-next-line es
|
|
23385
|
+
// eslint-disable-next-line es/no-object-create -- safe
|
|
23376
23386
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
23377
23387
|
var result;
|
|
23378
23388
|
if (O !== null) {
|
|
@@ -23418,13 +23428,19 @@ _export({ target: 'Array', proto: true }, {
|
|
|
23418
23428
|
|
|
23419
23429
|
addToUnscopables('at');
|
|
23420
23430
|
|
|
23421
|
-
// eslint-disable-next-line es
|
|
23422
|
-
var
|
|
23431
|
+
// eslint-disable-next-line es/no-typed-arrays -- safe
|
|
23432
|
+
var arrayBufferBasicDetection = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
|
|
23433
|
+
|
|
23434
|
+
var defineBuiltInAccessor = function (target, name, descriptor) {
|
|
23435
|
+
if (descriptor.get) makeBuiltIn_1(descriptor.get, name, { getter: true });
|
|
23436
|
+
if (descriptor.set) makeBuiltIn_1(descriptor.set, name, { setter: true });
|
|
23437
|
+
return objectDefineProperty.f(target, name, descriptor);
|
|
23438
|
+
};
|
|
23423
23439
|
|
|
23424
23440
|
var correctPrototypeGetter = !fails(function () {
|
|
23425
23441
|
function F() { /* empty */ }
|
|
23426
23442
|
F.prototype.constructor = null;
|
|
23427
|
-
// eslint-disable-next-line es
|
|
23443
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
23428
23444
|
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
23429
23445
|
});
|
|
23430
23446
|
|
|
@@ -23434,7 +23450,7 @@ var ObjectPrototype = $Object$4.prototype;
|
|
|
23434
23450
|
|
|
23435
23451
|
// `Object.getPrototypeOf` method
|
|
23436
23452
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
23437
|
-
// eslint-disable-next-line es
|
|
23453
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
23438
23454
|
var objectGetPrototypeOf = correctPrototypeGetter ? $Object$4.getPrototypeOf : function (O) {
|
|
23439
23455
|
var object = toObject(O);
|
|
23440
23456
|
if (hasOwnProperty_1(object, IE_PROTO$1)) return object[IE_PROTO$1];
|
|
@@ -23444,6 +23460,13 @@ var objectGetPrototypeOf = correctPrototypeGetter ? $Object$4.getPrototypeOf : f
|
|
|
23444
23460
|
} return object instanceof $Object$4 ? ObjectPrototype : null;
|
|
23445
23461
|
};
|
|
23446
23462
|
|
|
23463
|
+
var functionUncurryThisAccessor = function (object, key, method) {
|
|
23464
|
+
try {
|
|
23465
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
23466
|
+
return functionUncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
|
|
23467
|
+
} catch (error) { /* empty */ }
|
|
23468
|
+
};
|
|
23469
|
+
|
|
23447
23470
|
var $String$3 = String;
|
|
23448
23471
|
var $TypeError$6 = TypeError;
|
|
23449
23472
|
|
|
@@ -23460,14 +23483,13 @@ var aPossiblePrototype = function (argument) {
|
|
|
23460
23483
|
// `Object.setPrototypeOf` method
|
|
23461
23484
|
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
23462
23485
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
23463
|
-
// eslint-disable-next-line es
|
|
23486
|
+
// eslint-disable-next-line es/no-object-setprototypeof -- safe
|
|
23464
23487
|
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
23465
23488
|
var CORRECT_SETTER = false;
|
|
23466
23489
|
var test = {};
|
|
23467
23490
|
var setter;
|
|
23468
23491
|
try {
|
|
23469
|
-
|
|
23470
|
-
setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
23492
|
+
setter = functionUncurryThisAccessor(Object.prototype, '__proto__', 'set');
|
|
23471
23493
|
setter(test, []);
|
|
23472
23494
|
CORRECT_SETTER = test instanceof Array;
|
|
23473
23495
|
} catch (error) { /* empty */ }
|
|
@@ -23480,14 +23502,6 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
23480
23502
|
};
|
|
23481
23503
|
}() : undefined);
|
|
23482
23504
|
|
|
23483
|
-
var defineProperty$2 = objectDefineProperty.f;
|
|
23484
|
-
|
|
23485
|
-
|
|
23486
|
-
|
|
23487
|
-
|
|
23488
|
-
|
|
23489
|
-
|
|
23490
|
-
|
|
23491
23505
|
var enforceInternalState = internalState.enforce;
|
|
23492
23506
|
var getInternalState = internalState.get;
|
|
23493
23507
|
var Int8Array = global_1.Int8Array;
|
|
@@ -23503,7 +23517,7 @@ var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
|
|
|
23503
23517
|
var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
|
|
23504
23518
|
var TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';
|
|
23505
23519
|
// Fixing native typed arrays in Opera Presto crashes the browser, see #595
|
|
23506
|
-
var NATIVE_ARRAY_BUFFER_VIEWS =
|
|
23520
|
+
var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferBasicDetection && !!objectSetPrototypeOf && classof(global_1.opera) !== 'Opera';
|
|
23507
23521
|
var TYPED_ARRAY_TAG_REQUIRED = false;
|
|
23508
23522
|
var NAME, Constructor, Prototype;
|
|
23509
23523
|
|
|
@@ -23638,9 +23652,12 @@ if (NATIVE_ARRAY_BUFFER_VIEWS && objectGetPrototypeOf(Uint8ClampedArrayPrototype
|
|
|
23638
23652
|
|
|
23639
23653
|
if (descriptors && !hasOwnProperty_1(TypedArrayPrototype, TO_STRING_TAG$2)) {
|
|
23640
23654
|
TYPED_ARRAY_TAG_REQUIRED = true;
|
|
23641
|
-
|
|
23642
|
-
|
|
23643
|
-
|
|
23655
|
+
defineBuiltInAccessor(TypedArrayPrototype, TO_STRING_TAG$2, {
|
|
23656
|
+
configurable: true,
|
|
23657
|
+
get: function () {
|
|
23658
|
+
return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
|
|
23659
|
+
}
|
|
23660
|
+
});
|
|
23644
23661
|
for (NAME in TypedArrayConstructorsList) if (global_1[NAME]) {
|
|
23645
23662
|
createNonEnumerableProperty(global_1[NAME], TYPED_ARRAY_TAG, NAME);
|
|
23646
23663
|
}
|
|
@@ -38562,52 +38579,44 @@ var TableHeading_styled = styled__default.th.withConfig({
|
|
|
38562
38579
|
return extraStyles;
|
|
38563
38580
|
});
|
|
38564
38581
|
|
|
38565
|
-
const validatorToPredicate =
|
|
38566
|
-
|
|
38567
|
-
|
|
38568
|
-
|
|
38582
|
+
const validatorToPredicate = (validatorFn, emptyCase) => (
|
|
38583
|
+
value,
|
|
38584
|
+
...rest
|
|
38585
|
+
) => (value === "" ? emptyCase : validatorFn(value, ...rest));
|
|
38569
38586
|
|
|
38570
38587
|
var commonjsGlobal$1 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
38571
38588
|
|
|
38572
|
-
function getDefaultExportFromCjs (x) {
|
|
38573
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
38574
|
-
}
|
|
38575
|
-
|
|
38576
38589
|
var dayjs_min = {exports: {}};
|
|
38577
38590
|
|
|
38578
38591
|
(function (module, exports) {
|
|
38579
|
-
|
|
38580
|
-
}
|
|
38592
|
+
!function(t,e){module.exports=e();}(commonjsGlobal$1,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",$="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},D="en",v={};v[D]=M;var p=function(t){return t instanceof _},S=function(t,e,n){var r;if(!t)return D;if("string"==typeof t)v[t]&&(r=t),e&&(v[t]=e,r=t);else {var i=t.name;v[i]=t,r=i;}return !n&&r&&(D=r),r||!n&&D},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=g;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===$)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),$=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},l=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(h){case c:return r?$(1,0):$(31,11);case f:return r?$(1,M):$(0,M+1);case o:var D=this.$locale().weekStart||0,v=(y<D?y+7:y)-D;return $(r?m-v:m+(6-v),M);case a:case d:return l(g+"Hours",0);case u:return l(g+"Minutes",1);case s:return l(g+"Seconds",2);case i:return l(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),$=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],l=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[$](l),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else $&&this.$d[$](l);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,$=this;r=Number(r);var l=O.p(h),y=function(t){var e=w($);return O.w(e.date(e.date()+Math.round(t*r)),$)};if(l===f)return this.set(f,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return y(1);if(l===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[l]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||$;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].substr(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||l[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,$){var l,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,g=this-M,D=O.m(this,M);return D=(l={},l[c]=D/12,l[f]=D,l[h]=D/3,l[o]=(g-m)/6048e5,l[a]=(g-m)/864e5,l[u]=g/n,l[s]=g/e,l[i]=g/t,l)[y]||g,$?D:O.a(D)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return v[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),b=_.prototype;return w.prototype=b,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){b[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=v[D],w.Ls=v,w.p={},w}));
|
|
38593
|
+
}(dayjs_min));
|
|
38581
38594
|
|
|
38582
|
-
var
|
|
38583
|
-
var dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
|
|
38595
|
+
var dayjs = dayjs_min.exports;
|
|
38584
38596
|
|
|
38585
38597
|
var customParseFormat$1 = {exports: {}};
|
|
38586
38598
|
|
|
38587
38599
|
(function (module, exports) {
|
|
38588
|
-
|
|
38589
|
-
}
|
|
38600
|
+
!function(t,e){module.exports=e();}(commonjsGlobal$1,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^\s\d-_:/()]+/,o={},s=function(t){return (t=+t)+(t>68?1900:2e3)};var a=function(t){return function(e){this[t]=+e;}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t);}],u=function(t){var e=o[t];return e&&(e.indexOf?e:e.s.concat(e.f))},h=function(t,e){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(t.indexOf(r(i,0,e))>-1){n=i>12;break}}else n=t===(e?"pm":"PM");return n},d={A:[i,function(t){this.afternoon=h(t,!1);}],a:[i,function(t){this.afternoon=h(t,!0);}],S:[/\d/,function(t){this.milliseconds=100*+t;}],SS:[n,function(t){this.milliseconds=10*+t;}],SSS:[/\d{3}/,function(t){this.milliseconds=+t;}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(t){var e=o.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r);}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(t){var e=u("months"),n=(u("monthsShort")||e.map((function(t){return t.substr(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[i,function(t){var e=u("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e;}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(t){this.year=s(t);}],YYYY:[/\d{4}/,a("year")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var o=r&&r.toUpperCase();return n||i[r]||t[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),a=s.length,f=0;f<a;f+=1){var u=s[f],h=d[u],c=h&&h[0],l=h&&h[1];s[f]=l?{regex:c,parser:l}:u.replace(/^\[|\]$/g,"");}return function(t){for(var e={},n=0,r=0;n<a;n+=1){var i=s[n];if("string"==typeof i)r+=i.length;else {var o=i.regex,f=i.parser,u=t.substr(r),h=o.exec(u)[0];f.call(e,h),t=t.replace(h,"");}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon;}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(s=t.parseTwoDigitYear);var r=e.prototype,i=r.parse;r.parse=function(t){var e=t.date,r=t.utc,s=t.args;this.$u=r;var a=s[1];if("string"==typeof a){var f=!0===s[2],u=!0===s[3],h=f||u,d=s[2];u&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(t,e,n){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var r=c(e)(t),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,u=r.seconds,h=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=u||0,g=h||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(t){return new Date("")}}(e,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),h&&e!=this.format(a)&&(this.$d=new Date("")),o={};}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""));}else i.call(this,t);};}}));
|
|
38601
|
+
}(customParseFormat$1));
|
|
38590
38602
|
|
|
38591
|
-
var
|
|
38592
|
-
var customParseFormat = /*@__PURE__*/getDefaultExportFromCjs(customParseFormatExports);
|
|
38603
|
+
var customParseFormat = customParseFormat$1.exports;
|
|
38593
38604
|
|
|
38594
38605
|
var isSameOrBefore$1 = {exports: {}};
|
|
38595
38606
|
|
|
38596
38607
|
(function (module, exports) {
|
|
38597
|
-
|
|
38598
|
-
}
|
|
38608
|
+
!function(e,i){module.exports=i();}(commonjsGlobal$1,(function(){return function(e,i){i.prototype.isSameOrBefore=function(e,i){return this.isSame(e,i)||this.isBefore(e,i)};}}));
|
|
38609
|
+
}(isSameOrBefore$1));
|
|
38599
38610
|
|
|
38600
|
-
var
|
|
38601
|
-
var isSameOrBefore = /*@__PURE__*/getDefaultExportFromCjs(isSameOrBeforeExports);
|
|
38611
|
+
var isSameOrBefore = isSameOrBefore$1.exports;
|
|
38602
38612
|
|
|
38603
38613
|
var isSameOrAfter$1 = {exports: {}};
|
|
38604
38614
|
|
|
38605
38615
|
(function (module, exports) {
|
|
38606
|
-
|
|
38607
|
-
}
|
|
38616
|
+
!function(e,t){module.exports=t();}(commonjsGlobal$1,(function(){return function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)};}}));
|
|
38617
|
+
}(isSameOrAfter$1));
|
|
38608
38618
|
|
|
38609
|
-
var
|
|
38610
|
-
var isSameOrAfter = /*@__PURE__*/getDefaultExportFromCjs(isSameOrAfterExports);
|
|
38619
|
+
var isSameOrAfter = isSameOrAfter$1.exports;
|
|
38611
38620
|
|
|
38612
38621
|
/* eslint-disable no-unused-vars */
|
|
38613
38622
|
|
|
@@ -38623,24 +38632,24 @@ dayjs.extend(isSameOrAfter);
|
|
|
38623
38632
|
|
|
38624
38633
|
let validatorFns = {};
|
|
38625
38634
|
|
|
38626
|
-
const INCLUDED_IN =
|
|
38627
|
-
const INCLUDED_IN_ERROR =
|
|
38635
|
+
const INCLUDED_IN = "validator/INCLUDED_IN";
|
|
38636
|
+
const INCLUDED_IN_ERROR = "error/INCLUDED_IN";
|
|
38628
38637
|
const includedIn = createValidator(INCLUDED_IN, INCLUDED_IN_ERROR);
|
|
38629
38638
|
validatorFns[INCLUDED_IN] = (value, args, form) =>
|
|
38630
38639
|
Array.isArray(args[0]) ? args[0].includes(value) : args[0] === value;
|
|
38631
38640
|
|
|
38632
|
-
const REQUIRED =
|
|
38633
|
-
const REQUIRED_ERROR =
|
|
38641
|
+
const REQUIRED = "validator/REQUIRED";
|
|
38642
|
+
const REQUIRED_ERROR = "error/REQUIRED";
|
|
38634
38643
|
const required = createValidator(REQUIRED, REQUIRED_ERROR);
|
|
38635
|
-
validatorFns[REQUIRED] = (value, args, form) => value !==
|
|
38644
|
+
validatorFns[REQUIRED] = (value, args, form) => value !== "";
|
|
38636
38645
|
|
|
38637
|
-
const ONLY_INTEGERS =
|
|
38638
|
-
const ONLY_INTEGERS_ERROR =
|
|
38646
|
+
const ONLY_INTEGERS = "validator/ONLY_INTEGERS";
|
|
38647
|
+
const ONLY_INTEGERS_ERROR = "error/ONLY_INTEGERS";
|
|
38639
38648
|
const onlyIntegers = createValidator(ONLY_INTEGERS, ONLY_INTEGERS_ERROR);
|
|
38640
38649
|
validatorFns[ONLY_INTEGERS] = (value, args, form) => /^(-?\d+)?$/.test(value);
|
|
38641
38650
|
|
|
38642
|
-
const ONLY_NATURALS =
|
|
38643
|
-
const ONLY_NATURALS_ERROR =
|
|
38651
|
+
const ONLY_NATURALS = "validator/ONLY_NATURALS";
|
|
38652
|
+
const ONLY_NATURALS_ERROR = "error/ONLY_NATURALS";
|
|
38644
38653
|
const onlyNaturals = createValidator(ONLY_NATURALS, ONLY_NATURALS_ERROR);
|
|
38645
38654
|
validatorFns[ONLY_NATURALS] = (value, args, form) => /^(\d+)?$/.test(value);
|
|
38646
38655
|
|
|
@@ -38653,8 +38662,8 @@ not tested as validation function
|
|
|
38653
38662
|
to validate exp date instead use combo of:
|
|
38654
38663
|
required(), hasLength(), isValidMonth(), dateAfterToday()
|
|
38655
38664
|
*/
|
|
38656
|
-
const ONLY_EXPIRATION_DATE =
|
|
38657
|
-
const ONLY_EXPIRATION_DATE_ERROR =
|
|
38665
|
+
const ONLY_EXPIRATION_DATE = "validator/ONLY_EXPIRATION_DATE";
|
|
38666
|
+
const ONLY_EXPIRATION_DATE_ERROR = "error/ONLY_EXPIRATION_DATE";
|
|
38658
38667
|
const onlyExpirationDate = createValidator(
|
|
38659
38668
|
ONLY_EXPIRATION_DATE,
|
|
38660
38669
|
ONLY_EXPIRATION_DATE_ERROR
|
|
@@ -38662,63 +38671,64 @@ const onlyExpirationDate = createValidator(
|
|
|
38662
38671
|
validatorFns[ONLY_EXPIRATION_DATE] = (value, args, form) =>
|
|
38663
38672
|
/^(\d?\d?\/?\d?\d?)?$/.test(value);
|
|
38664
38673
|
|
|
38665
|
-
const NUMBER_LESS_THAN =
|
|
38666
|
-
const NUMBER_LESS_THAN_ERROR =
|
|
38674
|
+
const NUMBER_LESS_THAN = "validator/NUMBER_LESS_THAN";
|
|
38675
|
+
const NUMBER_LESS_THAN_ERROR = "error/NUMBER_LESS_THAN";
|
|
38667
38676
|
const numberLessThan = createValidator(
|
|
38668
38677
|
NUMBER_LESS_THAN,
|
|
38669
38678
|
NUMBER_LESS_THAN_ERROR
|
|
38670
38679
|
);
|
|
38671
38680
|
validatorFns[NUMBER_LESS_THAN] = (value, args, form) => {
|
|
38672
|
-
if (value ===
|
|
38681
|
+
if (value === "") {
|
|
38673
38682
|
return true;
|
|
38674
38683
|
}
|
|
38675
38684
|
return Number(value) < args[0];
|
|
38676
38685
|
};
|
|
38677
38686
|
|
|
38678
|
-
const NUMBER_LESS_THAN_OR_EQUAL_TO =
|
|
38687
|
+
const NUMBER_LESS_THAN_OR_EQUAL_TO =
|
|
38688
|
+
"validator/NUMBER_LESS_THAN_OR_EQUAL_TO";
|
|
38679
38689
|
const NUMBER_LESS_THAN_OR_EQUAL_TO_ERROR =
|
|
38680
|
-
|
|
38690
|
+
"error/NUMBER_LESS_THAN_OR_EQUAL_TO";
|
|
38681
38691
|
const numberLessThanOrEqualTo = createValidator(
|
|
38682
38692
|
NUMBER_LESS_THAN_OR_EQUAL_TO,
|
|
38683
38693
|
NUMBER_LESS_THAN_OR_EQUAL_TO_ERROR
|
|
38684
38694
|
);
|
|
38685
38695
|
validatorFns[NUMBER_LESS_THAN_OR_EQUAL_TO] = (value, args, form) => {
|
|
38686
|
-
if (value ===
|
|
38696
|
+
if (value === "") {
|
|
38687
38697
|
return true;
|
|
38688
38698
|
}
|
|
38689
38699
|
return Number(value) <= args[0];
|
|
38690
38700
|
};
|
|
38691
38701
|
|
|
38692
|
-
const NUMBER_GREATER_THAN =
|
|
38693
|
-
const NUMBER_GREATER_THAN_ERROR =
|
|
38702
|
+
const NUMBER_GREATER_THAN = "validator/NUMBER_GREATER_THAN";
|
|
38703
|
+
const NUMBER_GREATER_THAN_ERROR = "error/NUMBER_GREATER_THAN";
|
|
38694
38704
|
const numberGreaterThan = createValidator(
|
|
38695
38705
|
NUMBER_GREATER_THAN,
|
|
38696
38706
|
NUMBER_GREATER_THAN_ERROR
|
|
38697
38707
|
);
|
|
38698
38708
|
validatorFns[NUMBER_GREATER_THAN] = (value, args, form) => {
|
|
38699
|
-
if (value ===
|
|
38709
|
+
if (value === "") {
|
|
38700
38710
|
return true;
|
|
38701
38711
|
}
|
|
38702
38712
|
return Number(value) > args[0];
|
|
38703
38713
|
};
|
|
38704
38714
|
|
|
38705
38715
|
const NUMBER_GREATER_THAN_OR_EQUAL_TO =
|
|
38706
|
-
|
|
38716
|
+
"validator/NUMBER_GREATER_THAN_OR_EQUAL_TO";
|
|
38707
38717
|
const NUMBER_GREATER_THAN_OR_EQUAL_TO_ERROR =
|
|
38708
|
-
|
|
38718
|
+
"error/NUMBER_GREATER_THAN_OR_EQUAL_TO";
|
|
38709
38719
|
const numberGreaterThanOrEqualTo = createValidator(
|
|
38710
38720
|
NUMBER_GREATER_THAN_OR_EQUAL_TO,
|
|
38711
38721
|
NUMBER_GREATER_THAN_OR_EQUAL_TO_ERROR
|
|
38712
38722
|
);
|
|
38713
38723
|
validatorFns[NUMBER_GREATER_THAN_OR_EQUAL_TO] = (value, args, form) => {
|
|
38714
|
-
if (value ===
|
|
38724
|
+
if (value === "") {
|
|
38715
38725
|
return true;
|
|
38716
38726
|
}
|
|
38717
38727
|
return Number(value) >= args[0];
|
|
38718
38728
|
};
|
|
38719
38729
|
|
|
38720
|
-
const MATCHES_FIELD =
|
|
38721
|
-
const MATCHES_FIELD_ERROR$1 =
|
|
38730
|
+
const MATCHES_FIELD = "validator/MATCHES_FIELD";
|
|
38731
|
+
const MATCHES_FIELD_ERROR$1 = "error/MATCHES_FIELD";
|
|
38722
38732
|
const matchesField = createValidator(MATCHES_FIELD, MATCHES_FIELD_ERROR$1);
|
|
38723
38733
|
validatorFns[MATCHES_FIELD] = (value, args, form) => {
|
|
38724
38734
|
const dependentField = form[args[0]];
|
|
@@ -38731,7 +38741,7 @@ validatorFns[MATCHES_FIELD] = (value, args, form) => {
|
|
|
38731
38741
|
return value === dependentFieldValue;
|
|
38732
38742
|
};
|
|
38733
38743
|
|
|
38734
|
-
const validateWhenErrorMessage =
|
|
38744
|
+
const validateWhenErrorMessage = type =>
|
|
38735
38745
|
`${type} was passed to validateWhen, but that validator type does not exist.
|
|
38736
38746
|
Please check that you are only calling validator creator functions exported from
|
|
38737
38747
|
redux-freeform in your form config and that you didn't forget to
|
|
@@ -38739,21 +38749,25 @@ const validateWhenErrorMessage = (type) =>
|
|
|
38739
38749
|
createFormState). Also make sure you aren't passing validateWhen() to validateWhen
|
|
38740
38750
|
as the primary validator.`;
|
|
38741
38751
|
|
|
38742
|
-
const VALIDATE_WHEN =
|
|
38743
|
-
const VALIDATE_WHEN_ERROR =
|
|
38744
|
-
const validateWhen = (
|
|
38752
|
+
const VALIDATE_WHEN = "validator/VALIDATE_WHEN";
|
|
38753
|
+
const VALIDATE_WHEN_ERROR = "error/VALIDATE_WHEN";
|
|
38754
|
+
const validateWhen = (
|
|
38755
|
+
dependentValidator,
|
|
38756
|
+
primaryValidator,
|
|
38757
|
+
optionalFieldName
|
|
38758
|
+
) => ({
|
|
38745
38759
|
type: VALIDATE_WHEN,
|
|
38746
38760
|
args: [dependentValidator, primaryValidator, optionalFieldName],
|
|
38747
|
-
error: dependentValidator.error
|
|
38761
|
+
error: dependentValidator.error
|
|
38748
38762
|
});
|
|
38749
38763
|
validateWhen.error = VALIDATE_WHEN_ERROR;
|
|
38750
38764
|
validatorFns[VALIDATE_WHEN] = (value, args, form) => {
|
|
38751
38765
|
const [dependentValidator, primaryValidator, optionalFieldName] = args;
|
|
38752
|
-
const dependsOnOtherField = typeof optionalFieldName ===
|
|
38766
|
+
const dependsOnOtherField = typeof optionalFieldName === "string";
|
|
38753
38767
|
|
|
38754
38768
|
if (
|
|
38755
38769
|
primaryValidator.type === undefined ||
|
|
38756
|
-
typeof validatorFns[primaryValidator.type] !==
|
|
38770
|
+
typeof validatorFns[primaryValidator.type] !== "function"
|
|
38757
38771
|
) {
|
|
38758
38772
|
throw new Error(validateWhenErrorMessage(primaryValidator.type));
|
|
38759
38773
|
}
|
|
@@ -38777,22 +38791,26 @@ validatorFns[VALIDATE_WHEN] = (value, args, form) => {
|
|
|
38777
38791
|
);
|
|
38778
38792
|
|
|
38779
38793
|
return primaryPredicatePassed
|
|
38780
|
-
? validatorFns[dependentValidator.type](
|
|
38794
|
+
? validatorFns[dependentValidator.type](
|
|
38795
|
+
value,
|
|
38796
|
+
dependentValidator.args,
|
|
38797
|
+
form
|
|
38798
|
+
)
|
|
38781
38799
|
: true;
|
|
38782
38800
|
};
|
|
38783
38801
|
|
|
38784
|
-
const validateSumErrorMessage =
|
|
38802
|
+
const validateSumErrorMessage = type =>
|
|
38785
38803
|
`${type} was passed to validateSum, but that validator type does not exist.
|
|
38786
38804
|
Please check that you are only calling validator creator functions exported from
|
|
38787
38805
|
redux-freeform in your form config and that you didn't forget to
|
|
38788
38806
|
invoke the validator creator (you cannot pass the functions themselves to
|
|
38789
38807
|
createFormState).`;
|
|
38790
|
-
const VALIDATE_SUM =
|
|
38791
|
-
const VALIDATE_SUM_ERROR =
|
|
38808
|
+
const VALIDATE_SUM = "validator/VALIDATE_SUM";
|
|
38809
|
+
const VALIDATE_SUM_ERROR = "error/VALIDATE_SUM";
|
|
38792
38810
|
const validateSum = (validator, fieldNamesArray) => ({
|
|
38793
38811
|
type: VALIDATE_SUM,
|
|
38794
38812
|
args: [validator, fieldNamesArray],
|
|
38795
|
-
error: validator.error
|
|
38813
|
+
error: validator.error
|
|
38796
38814
|
});
|
|
38797
38815
|
validateSum.error = VALIDATE_SUM_ERROR;
|
|
38798
38816
|
validatorFns[VALIDATE_SUM] = (value, args, form) => {
|
|
@@ -38800,7 +38818,7 @@ validatorFns[VALIDATE_SUM] = (value, args, form) => {
|
|
|
38800
38818
|
|
|
38801
38819
|
if (
|
|
38802
38820
|
validator.type === undefined ||
|
|
38803
|
-
typeof validatorFns[validator.type] !==
|
|
38821
|
+
typeof validatorFns[validator.type] !== "function"
|
|
38804
38822
|
) {
|
|
38805
38823
|
throw new Error(validateSumErrorMessage(validator.type));
|
|
38806
38824
|
}
|
|
@@ -38821,35 +38839,37 @@ validatorFns[VALIDATE_SUM] = (value, args, form) => {
|
|
|
38821
38839
|
return validatorFns[validator.type](sum, validator.args, form);
|
|
38822
38840
|
};
|
|
38823
38841
|
|
|
38824
|
-
const HAS_LENGTH =
|
|
38825
|
-
const HAS_LENGTH_ERROR =
|
|
38842
|
+
const HAS_LENGTH = "validator/HAS_LENGTH";
|
|
38843
|
+
const HAS_LENGTH_ERROR = "error/HAS_LENGTH";
|
|
38826
38844
|
const hasLength = createValidator(HAS_LENGTH, HAS_LENGTH_ERROR);
|
|
38827
38845
|
validatorFns[HAS_LENGTH] = (value, args, form) => {
|
|
38828
|
-
if (value ===
|
|
38846
|
+
if (value === "") {
|
|
38829
38847
|
return true;
|
|
38830
38848
|
}
|
|
38831
38849
|
const min = args[0];
|
|
38832
38850
|
const max = args[1];
|
|
38833
38851
|
if (max == undefined || min == undefined) {
|
|
38834
38852
|
throw new Error(
|
|
38835
|
-
|
|
38853
|
+
"Max and min need to be defined for hasLength, both or one of them is undefined"
|
|
38836
38854
|
);
|
|
38837
38855
|
}
|
|
38838
38856
|
if (max < min) {
|
|
38839
|
-
throw new Error(
|
|
38857
|
+
throw new Error(
|
|
38858
|
+
"hasLength validator was passed a min greater than the max"
|
|
38859
|
+
);
|
|
38840
38860
|
}
|
|
38841
38861
|
const valueLength = value.length;
|
|
38842
38862
|
return max >= valueLength && valueLength >= min;
|
|
38843
38863
|
};
|
|
38844
38864
|
|
|
38845
|
-
const DATE_BEFORE_TODAY =
|
|
38846
|
-
const DATE_BEFORE_TODAY_ERROR =
|
|
38865
|
+
const DATE_BEFORE_TODAY = "validator/DATE_BEFORE_TODAY";
|
|
38866
|
+
const DATE_BEFORE_TODAY_ERROR = "error/DATE_BEFORE_TODAY";
|
|
38847
38867
|
const dateBeforeToday = createValidator(
|
|
38848
38868
|
DATE_BEFORE_TODAY,
|
|
38849
38869
|
DATE_BEFORE_TODAY_ERROR
|
|
38850
38870
|
);
|
|
38851
38871
|
validatorFns[DATE_BEFORE_TODAY] = (value, args, form) => {
|
|
38852
|
-
if (value ===
|
|
38872
|
+
if (value === "") {
|
|
38853
38873
|
return true;
|
|
38854
38874
|
}
|
|
38855
38875
|
const dateFormat = args[0];
|
|
@@ -38858,7 +38878,7 @@ validatorFns[DATE_BEFORE_TODAY] = (value, args, form) => {
|
|
|
38858
38878
|
|
|
38859
38879
|
if (dateFormat == undefined || unit == undefined) {
|
|
38860
38880
|
throw new Error(
|
|
38861
|
-
|
|
38881
|
+
"Date format and unit need to be defined for dateBeforeToday, one or both are undefined"
|
|
38862
38882
|
);
|
|
38863
38883
|
}
|
|
38864
38884
|
const now = dayjs();
|
|
@@ -38870,14 +38890,14 @@ validatorFns[DATE_BEFORE_TODAY] = (value, args, form) => {
|
|
|
38870
38890
|
return dateValue.isBefore(now, unit);
|
|
38871
38891
|
};
|
|
38872
38892
|
|
|
38873
|
-
const DATE_AFTER_TODAY =
|
|
38874
|
-
const DATE_AFTER_TODAY_ERROR =
|
|
38893
|
+
const DATE_AFTER_TODAY = "validator/DATE_AFTER_TODAY";
|
|
38894
|
+
const DATE_AFTER_TODAY_ERROR = "error/DATE_AFTER_TODAY";
|
|
38875
38895
|
const dateAfterToday = createValidator(
|
|
38876
38896
|
DATE_AFTER_TODAY,
|
|
38877
38897
|
DATE_AFTER_TODAY_ERROR
|
|
38878
38898
|
);
|
|
38879
38899
|
validatorFns[DATE_AFTER_TODAY] = (value, args, form) => {
|
|
38880
|
-
if (value ===
|
|
38900
|
+
if (value === "") {
|
|
38881
38901
|
return true;
|
|
38882
38902
|
}
|
|
38883
38903
|
const dateFormat = args[0];
|
|
@@ -38886,7 +38906,7 @@ validatorFns[DATE_AFTER_TODAY] = (value, args, form) => {
|
|
|
38886
38906
|
|
|
38887
38907
|
if (dateFormat == undefined || unit == undefined) {
|
|
38888
38908
|
throw new Error(
|
|
38889
|
-
|
|
38909
|
+
"Date format and unit need to be defined for dateAfterToday, one or both are undefined"
|
|
38890
38910
|
);
|
|
38891
38911
|
}
|
|
38892
38912
|
const now = dayjs();
|
|
@@ -38898,11 +38918,14 @@ validatorFns[DATE_AFTER_TODAY] = (value, args, form) => {
|
|
|
38898
38918
|
return dateValue.isAfter(now, unit);
|
|
38899
38919
|
};
|
|
38900
38920
|
|
|
38901
|
-
const IS_VALID_MONTH =
|
|
38902
|
-
const IS_VALID_MONTH_ERROR =
|
|
38903
|
-
const isValidMonth = createValidator(
|
|
38921
|
+
const IS_VALID_MONTH = "validator/IS_VALID_MONTH";
|
|
38922
|
+
const IS_VALID_MONTH_ERROR = "error/IS_VALID_MONTH";
|
|
38923
|
+
const isValidMonth = createValidator(
|
|
38924
|
+
IS_VALID_MONTH,
|
|
38925
|
+
IS_VALID_MONTH_ERROR
|
|
38926
|
+
);
|
|
38904
38927
|
validatorFns[IS_VALID_MONTH] = (value, args, form) => {
|
|
38905
|
-
if (value ===
|
|
38928
|
+
if (value === "") {
|
|
38906
38929
|
return true;
|
|
38907
38930
|
}
|
|
38908
38931
|
// Function takes one argument representing the character position
|
|
@@ -38912,43 +38935,43 @@ validatorFns[IS_VALID_MONTH] = (value, args, form) => {
|
|
|
38912
38935
|
// Only works with two digit months (01, 02, 03, etc)
|
|
38913
38936
|
const monthStartPosition = parseInt(args[0]);
|
|
38914
38937
|
const monthEndPosition = monthStartPosition + 2;
|
|
38915
|
-
if (
|
|
38916
|
-
throw new Error(
|
|
38938
|
+
if (monthStartPosition === NaN) {
|
|
38939
|
+
throw new Error("Month start position has to be a valid integer string");
|
|
38917
38940
|
}
|
|
38918
38941
|
const month = parseInt(value.slice(monthStartPosition, monthEndPosition));
|
|
38919
|
-
if (
|
|
38942
|
+
if (month === NaN) {
|
|
38920
38943
|
return false;
|
|
38921
38944
|
}
|
|
38922
38945
|
return month >= 1 && month <= 12;
|
|
38923
38946
|
};
|
|
38924
38947
|
|
|
38925
|
-
const MATCHES_REGEX =
|
|
38926
|
-
const MATCHES_REGEX_ERROR =
|
|
38948
|
+
const MATCHES_REGEX = "validator/MATCHES_REGEX";
|
|
38949
|
+
const MATCHES_REGEX_ERROR = "error/MATCHES_REGEX";
|
|
38927
38950
|
const matchesRegex = createValidator(MATCHES_REGEX, MATCHES_REGEX_ERROR);
|
|
38928
38951
|
validatorFns[MATCHES_REGEX] = (value, args, form) => {
|
|
38929
|
-
if (value ===
|
|
38952
|
+
if (value === "") {
|
|
38930
38953
|
return true;
|
|
38931
38954
|
}
|
|
38932
38955
|
return new RegExp(args[0]).test(value); // new RexExp never throws an error, no matter the input
|
|
38933
38956
|
};
|
|
38934
38957
|
|
|
38935
38958
|
// based on http://www.brainjar.com/js/validation/
|
|
38936
|
-
const IS_ROUTING_NUMBER =
|
|
38937
|
-
const IS_ROUTING_NUMBER_ERROR =
|
|
38959
|
+
const IS_ROUTING_NUMBER = "validator/IS_ROUTING_NUMBER";
|
|
38960
|
+
const IS_ROUTING_NUMBER_ERROR = "error/IS_ROUTING_NUMBER";
|
|
38938
38961
|
const isRoutingNumber = createValidator(
|
|
38939
38962
|
IS_ROUTING_NUMBER,
|
|
38940
38963
|
IS_ROUTING_NUMBER_ERROR
|
|
38941
38964
|
);
|
|
38942
38965
|
validatorFns[IS_ROUTING_NUMBER] = (value, args, form) => {
|
|
38943
|
-
if (value ===
|
|
38966
|
+
if (value === "") {
|
|
38944
38967
|
return true;
|
|
38945
38968
|
}
|
|
38946
38969
|
if (value.length != 9) {
|
|
38947
38970
|
return false;
|
|
38948
38971
|
}
|
|
38949
38972
|
const sum = value
|
|
38950
|
-
.split(
|
|
38951
|
-
.map(
|
|
38973
|
+
.split("")
|
|
38974
|
+
.map(ch => parseInt(ch))
|
|
38952
38975
|
.reduce((acc, cur, idx) => {
|
|
38953
38976
|
switch (idx % 3) {
|
|
38954
38977
|
case 0:
|
|
@@ -38962,69 +38985,69 @@ validatorFns[IS_ROUTING_NUMBER] = (value, args, form) => {
|
|
|
38962
38985
|
return sum != 0 && sum % 10 == 0;
|
|
38963
38986
|
};
|
|
38964
38987
|
|
|
38965
|
-
const HAS_NUMBER =
|
|
38966
|
-
const HAS_NUMBER_ERROR$1 =
|
|
38988
|
+
const HAS_NUMBER = "validator/HAS_NUMBER";
|
|
38989
|
+
const HAS_NUMBER_ERROR$1 = "error/HAS_NUMBER";
|
|
38967
38990
|
const hasNumber = createValidator(HAS_NUMBER, HAS_NUMBER_ERROR$1);
|
|
38968
38991
|
validatorFns[HAS_NUMBER] = (value, args, form) => {
|
|
38969
|
-
if (value ===
|
|
38992
|
+
if (value === "") {
|
|
38970
38993
|
return true;
|
|
38971
38994
|
}
|
|
38972
38995
|
return new RegExp(/[0-9]/).test(value);
|
|
38973
38996
|
};
|
|
38974
38997
|
|
|
38975
|
-
const HAS_LOWERCASE_LETTER =
|
|
38976
|
-
const HAS_LOWERCASE_LETTER_ERROR$1 =
|
|
38998
|
+
const HAS_LOWERCASE_LETTER = "validator/HAS_LOWERCASE_LETTER";
|
|
38999
|
+
const HAS_LOWERCASE_LETTER_ERROR$1 = "error/HAS_LOWERCASE_LETTER";
|
|
38977
39000
|
const hasLowercaseLetter = createValidator(
|
|
38978
39001
|
HAS_LOWERCASE_LETTER,
|
|
38979
39002
|
HAS_LOWERCASE_LETTER_ERROR$1
|
|
38980
39003
|
);
|
|
38981
39004
|
validatorFns[HAS_LOWERCASE_LETTER] = (value, args, form) => {
|
|
38982
|
-
if (value ===
|
|
39005
|
+
if (value === "") {
|
|
38983
39006
|
return true;
|
|
38984
39007
|
}
|
|
38985
39008
|
return new RegExp(/[a-z]/).test(value);
|
|
38986
39009
|
};
|
|
38987
39010
|
|
|
38988
|
-
const HAS_UPPERCASE_LETTER =
|
|
38989
|
-
const HAS_UPPERCASE_LETTER_ERROR$1 =
|
|
39011
|
+
const HAS_UPPERCASE_LETTER = "validator/HAS_UPPERCASE_LETTER";
|
|
39012
|
+
const HAS_UPPERCASE_LETTER_ERROR$1 = "error/HAS_UPPERCASE_LETTER";
|
|
38990
39013
|
const hasUppercaseLetter = createValidator(
|
|
38991
39014
|
HAS_UPPERCASE_LETTER,
|
|
38992
39015
|
HAS_UPPERCASE_LETTER_ERROR$1
|
|
38993
39016
|
);
|
|
38994
39017
|
validatorFns[HAS_UPPERCASE_LETTER] = (value, args, form) => {
|
|
38995
|
-
if (value ===
|
|
39018
|
+
if (value === "") {
|
|
38996
39019
|
return true;
|
|
38997
39020
|
}
|
|
38998
39021
|
return new RegExp(/[A-Z]/).test(value);
|
|
38999
39022
|
};
|
|
39000
39023
|
|
|
39001
|
-
const HAS_SPECIAL_CHARACTER =
|
|
39002
|
-
const HAS_SPECIAL_CHARACTER_ERROR$1 =
|
|
39024
|
+
const HAS_SPECIAL_CHARACTER = "validator/HAS_SPECIAL_CHARACTER";
|
|
39025
|
+
const HAS_SPECIAL_CHARACTER_ERROR$1 = "error/HAS_SPECIAL_CHARACTER";
|
|
39003
39026
|
const hasSpecialCharacter = createValidator(
|
|
39004
39027
|
HAS_SPECIAL_CHARACTER,
|
|
39005
39028
|
HAS_SPECIAL_CHARACTER_ERROR$1
|
|
39006
39029
|
);
|
|
39007
39030
|
validatorFns[HAS_SPECIAL_CHARACTER] = (value, args, form) => {
|
|
39008
|
-
if (value ===
|
|
39031
|
+
if (value === "") {
|
|
39009
39032
|
return true;
|
|
39010
39033
|
}
|
|
39011
39034
|
return new RegExp(/[!@#$%^&*.?]/).test(value);
|
|
39012
39035
|
};
|
|
39013
39036
|
|
|
39014
|
-
const IS_PROBABLY_EMAIL =
|
|
39015
|
-
const IS_PROBABLY_EMAIL_ERROR =
|
|
39037
|
+
const IS_PROBABLY_EMAIL = "validator/IS_PROBABLY_EMAIL";
|
|
39038
|
+
const IS_PROBABLY_EMAIL_ERROR = "error/IS_PROBABLY_EMAIL";
|
|
39016
39039
|
const isProbablyEmail = createValidator(
|
|
39017
39040
|
IS_PROBABLY_EMAIL,
|
|
39018
39041
|
IS_PROBABLY_EMAIL_ERROR
|
|
39019
39042
|
);
|
|
39020
39043
|
validatorFns[IS_PROBABLY_EMAIL] = (value, args, form) => {
|
|
39021
|
-
if (value ===
|
|
39044
|
+
if (value === "") {
|
|
39022
39045
|
return true;
|
|
39023
39046
|
}
|
|
39024
39047
|
return new RegExp(/^\S+@\S+\.\S+$/).test(value);
|
|
39025
39048
|
};
|
|
39026
39049
|
|
|
39027
|
-
const runValidatorErrorMessage =
|
|
39050
|
+
const runValidatorErrorMessage = type =>
|
|
39028
39051
|
`${type} was passed to runValidator, but that validator type does not exist.
|
|
39029
39052
|
Please check that you are only calling validator creator functions exported from
|
|
39030
39053
|
redux-freeform in your form config and that you didn't forget to
|
|
@@ -39039,238 +39062,1330 @@ const runValidator = (validator, value, form) => {
|
|
|
39039
39062
|
return validatorFn(value, validator.args, form) ? null : validator.error;
|
|
39040
39063
|
};
|
|
39041
39064
|
|
|
39042
|
-
const
|
|
39065
|
+
const _computeErrors = (fieldName, form, validators) => {
|
|
39043
39066
|
return validators
|
|
39044
|
-
.map(
|
|
39045
|
-
.filter(
|
|
39067
|
+
.map(v => runValidator(v, form[fieldName].rawValue, form))
|
|
39068
|
+
.filter(x => x !== null);
|
|
39046
39069
|
};
|
|
39047
39070
|
|
|
39048
39071
|
const computeConstraints = (fieldName, form) => {
|
|
39049
39072
|
const constraints = form[fieldName].constraints;
|
|
39050
|
-
return
|
|
39073
|
+
return _computeErrors(fieldName, form, constraints);
|
|
39051
39074
|
};
|
|
39052
39075
|
|
|
39053
39076
|
const computeErrors = (fieldName, form) => {
|
|
39054
39077
|
const validators = form[fieldName].validators;
|
|
39055
|
-
return
|
|
39078
|
+
return _computeErrors(fieldName, form, validators);
|
|
39079
|
+
};
|
|
39080
|
+
|
|
39081
|
+
var obj;
|
|
39082
|
+
var NOTHING = typeof Symbol !== "undefined" ? Symbol("immer-nothing") : ( obj = {}, obj["immer-nothing"] = true, obj );
|
|
39083
|
+
var DRAFTABLE = typeof Symbol !== "undefined" && Symbol.for ? Symbol.for("immer-draftable") : "__$immer_draftable";
|
|
39084
|
+
var DRAFT_STATE = typeof Symbol !== "undefined" && Symbol.for ? Symbol.for("immer-state") : "__$immer_state";
|
|
39085
|
+
function isDraft(value) {
|
|
39086
|
+
return !!value && !!value[DRAFT_STATE];
|
|
39087
|
+
}
|
|
39088
|
+
function isDraftable(value) {
|
|
39089
|
+
if (!value) { return false; }
|
|
39090
|
+
return isPlainObject(value) || !!value[DRAFTABLE] || !!value.constructor[DRAFTABLE];
|
|
39091
|
+
}
|
|
39092
|
+
function isPlainObject(value) {
|
|
39093
|
+
if (!value || typeof value !== "object") { return false; }
|
|
39094
|
+
if (Array.isArray(value)) { return true; }
|
|
39095
|
+
var proto = Object.getPrototypeOf(value);
|
|
39096
|
+
return !proto || proto === Object.prototype;
|
|
39097
|
+
}
|
|
39098
|
+
var assign = Object.assign || function assign(target, value) {
|
|
39099
|
+
for (var key in value) {
|
|
39100
|
+
if (has$1(value, key)) {
|
|
39101
|
+
target[key] = value[key];
|
|
39102
|
+
}
|
|
39103
|
+
}
|
|
39104
|
+
|
|
39105
|
+
return target;
|
|
39056
39106
|
};
|
|
39107
|
+
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;
|
|
39108
|
+
function shallowCopy(base, invokeGetters) {
|
|
39109
|
+
if ( invokeGetters === void 0 ) invokeGetters = false;
|
|
39110
|
+
|
|
39111
|
+
if (Array.isArray(base)) { return base.slice(); }
|
|
39112
|
+
var clone = Object.create(Object.getPrototypeOf(base));
|
|
39113
|
+
ownKeys$2(base).forEach(function (key) {
|
|
39114
|
+
if (key === DRAFT_STATE) {
|
|
39115
|
+
return; // Never copy over draft state.
|
|
39116
|
+
}
|
|
39117
|
+
|
|
39118
|
+
var desc = Object.getOwnPropertyDescriptor(base, key);
|
|
39119
|
+
var value = desc.value;
|
|
39120
|
+
|
|
39121
|
+
if (desc.get) {
|
|
39122
|
+
if (!invokeGetters) {
|
|
39123
|
+
throw new Error("Immer drafts cannot have computed properties");
|
|
39124
|
+
}
|
|
39125
|
+
|
|
39126
|
+
value = desc.get.call(base);
|
|
39127
|
+
}
|
|
39057
39128
|
|
|
39058
|
-
|
|
39059
|
-
|
|
39060
|
-
|
|
39061
|
-
|
|
39062
|
-
|
|
39063
|
-
|
|
39064
|
-
|
|
39129
|
+
if (desc.enumerable) {
|
|
39130
|
+
clone[key] = value;
|
|
39131
|
+
} else {
|
|
39132
|
+
Object.defineProperty(clone, key, {
|
|
39133
|
+
value: value,
|
|
39134
|
+
writable: true,
|
|
39135
|
+
configurable: true
|
|
39136
|
+
});
|
|
39137
|
+
}
|
|
39138
|
+
});
|
|
39139
|
+
return clone;
|
|
39140
|
+
}
|
|
39141
|
+
function each(value, cb) {
|
|
39142
|
+
if (Array.isArray(value)) {
|
|
39143
|
+
for (var i = 0; i < value.length; i++) { cb(i, value[i], value); }
|
|
39144
|
+
} else {
|
|
39145
|
+
ownKeys$2(value).forEach(function (key) { return cb(key, value[key], value); });
|
|
39146
|
+
}
|
|
39147
|
+
}
|
|
39148
|
+
function isEnumerable(base, prop) {
|
|
39149
|
+
var desc = Object.getOwnPropertyDescriptor(base, prop);
|
|
39150
|
+
return !!desc && desc.enumerable;
|
|
39151
|
+
}
|
|
39152
|
+
function has$1(thing, prop) {
|
|
39153
|
+
return Object.prototype.hasOwnProperty.call(thing, prop);
|
|
39154
|
+
}
|
|
39155
|
+
function is(x, y) {
|
|
39156
|
+
// From: https://github.com/facebook/fbjs/blob/c69904a511b900266935168223063dd8772dfc40/packages/fbjs/src/core/shallowEqual.js
|
|
39157
|
+
if (x === y) {
|
|
39158
|
+
return x !== 0 || 1 / x === 1 / y;
|
|
39159
|
+
} else {
|
|
39160
|
+
return x !== x && y !== y;
|
|
39065
39161
|
}
|
|
39162
|
+
}
|
|
39163
|
+
function clone(obj) {
|
|
39164
|
+
if (!isDraftable(obj)) { return obj; }
|
|
39165
|
+
if (Array.isArray(obj)) { return obj.map(clone); }
|
|
39166
|
+
var cloned = Object.create(Object.getPrototypeOf(obj));
|
|
39167
|
+
|
|
39168
|
+
for (var key in obj) { cloned[key] = clone(obj[key]); }
|
|
39169
|
+
|
|
39170
|
+
return cloned;
|
|
39171
|
+
}
|
|
39172
|
+
|
|
39173
|
+
/** Each scope represents a `produce` call. */
|
|
39174
|
+
|
|
39175
|
+
var ImmerScope = function ImmerScope(parent) {
|
|
39176
|
+
this.drafts = [];
|
|
39177
|
+
this.parent = parent; // Whenever the modified draft contains a draft from another scope, we
|
|
39178
|
+
// need to prevent auto-freezing so the unowned draft can be finalized.
|
|
39179
|
+
|
|
39180
|
+
this.canAutoFreeze = true; // To avoid prototype lookups:
|
|
39181
|
+
|
|
39182
|
+
this.patches = null;
|
|
39066
39183
|
};
|
|
39067
39184
|
|
|
39068
|
-
|
|
39069
|
-
|
|
39070
|
-
|
|
39071
|
-
|
|
39072
|
-
|
|
39073
|
-
let dirty = fieldName === changedFieldName ? true : field.dirty;
|
|
39074
|
-
formState[fieldName].dirty = dirty;
|
|
39185
|
+
ImmerScope.prototype.usePatches = function usePatches (patchListener) {
|
|
39186
|
+
if (patchListener) {
|
|
39187
|
+
this.patches = [];
|
|
39188
|
+
this.inversePatches = [];
|
|
39189
|
+
this.patchListener = patchListener;
|
|
39075
39190
|
}
|
|
39076
39191
|
};
|
|
39077
39192
|
|
|
39078
|
-
function n(n){for(var r=arguments.length,t=Array(r>1?r-1:0),e=1;e<r;e++)t[e-1]=arguments[e];if("production"!==process.env.NODE_ENV){var i=Y[n],o=i?"function"==typeof i?i.apply(null,t):i:"unknown error nr: "+n;throw Error("[Immer] "+o)}throw Error("[Immer] minified error nr: "+n+(t.length?" "+t.map((function(n){return "'"+n+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function r(n){return !!n&&!!n[Q]}function t(n){var r;return !!n&&(function(n){if(!n||"object"!=typeof n)return !1;var r=Object.getPrototypeOf(n);if(null===r)return !0;var t=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return t===Object||"function"==typeof t&&Function.toString.call(t)===Z}(n)||Array.isArray(n)||!!n[L]||!!(null===(r=n.constructor)||void 0===r?void 0:r[L])||s(n)||v(n))}function i(n,r,t){void 0===t&&(t=!1),0===o(n)?(t?Object.keys:nn)(n).forEach((function(e){t&&"symbol"==typeof e||r(e,n[e],n);})):n.forEach((function(t,e){return r(e,t,n)}));}function o(n){var r=n[Q];return r?r.i>3?r.i-4:r.i:Array.isArray(n)?1:s(n)?2:v(n)?3:0}function u(n,r){return 2===o(n)?n.has(r):Object.prototype.hasOwnProperty.call(n,r)}function a$1(n,r){return 2===o(n)?n.get(r):n[r]}function f$6(n,r,t){var e=o(n);2===e?n.set(r,t):3===e?n.add(t):n[r]=t;}function c$1(n,r){return n===r?0!==n||1/n==1/r:n!=n&&r!=r}function s(n){return X&&n instanceof Map}function v(n){return q&&n instanceof Set}function p(n){return n.o||n.t}function l(n){if(Array.isArray(n))return Array.prototype.slice.call(n);var r=rn(n);delete r[Q];for(var t=nn(r),e=0;e<t.length;e++){var i=t[e],o=r[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(r[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:n[i]});}return Object.create(Object.getPrototypeOf(n),r)}function d(n,e){return void 0===e&&(e=!1),y(n)||r(n)||!t(n)||(o(n)>1&&(n.set=n.add=n.clear=n.delete=h),Object.freeze(n),e&&i(n,(function(n,r){return d(r,!0)}),!0)),n}function h(){n(2);}function y(n){return null==n||"object"!=typeof n||Object.isFrozen(n)}function b$1(r){var t=tn[r];return t||n(18,r),t}function _(){return "production"===process.env.NODE_ENV||U||n(0),U}function j(n,r){r&&(b$1("Patches"),n.u=[],n.s=[],n.v=r);}function g(n){O(n),n.p.forEach(S),n.p=null;}function O(n){n===U&&(U=n.l);}function w(n){return U={p:[],l:U,h:n,m:!0,_:0}}function S(n){var r=n[Q];0===r.i||1===r.i?r.j():r.g=!0;}function P(r,e){e._=e.p.length;var i=e.p[0],o=void 0!==r&&r!==i;return e.h.O||b$1("ES5").S(e,r,o),o?(i[Q].P&&(g(e),n(4)),t(r)&&(r=M(e,r),e.l||x(e,r)),e.u&&b$1("Patches").M(i[Q].t,r,e.u,e.s)):r=M(e,i,[]),g(e),e.u&&e.v(e.u,e.s),r!==H?r:void 0}function M(n,r,t){if(y(r))return r;var e=r[Q];if(!e)return i(r,(function(i,o){return A(n,e,r,i,o,t)}),!0),r;if(e.A!==n)return r;if(!e.P)return x(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=l(e.k):e.o,u=o,a=!1;3===e.i&&(u=new Set(o),o.clear(),a=!0),i(u,(function(r,i){return A(n,e,o,r,i,t,a)})),x(n,o,!1),t&&n.u&&b$1("Patches").N(e,t,n.u,n.s);}return e.o}function A(e,i,o,a,c,s,v){if("production"!==process.env.NODE_ENV&&c===o&&n(5),r(c)){var p=M(e,c,s&&i&&3!==i.i&&!u(i.R,a)?s.concat(a):void 0);if(f$6(o,a,p),!r(p))return;e.m=!1;}else v&&o.add(c);if(t(c)&&!y(c)){if(!e.h.D&&e._<1)return;M(e,c),i&&i.A.l||x(e,c);}}function x(n,r,t){void 0===t&&(t=!1),!n.l&&n.h.D&&n.m&&d(r,t);}function z(n,r){var t=n[Q];return (t?p(t):n)[r]}function I(n,r){if(r in n)for(var t=Object.getPrototypeOf(n);t;){var e=Object.getOwnPropertyDescriptor(t,r);if(e)return e;t=Object.getPrototypeOf(t);}}function k(n){n.P||(n.P=!0,n.l&&k(n.l));}function E(n){n.o||(n.o=l(n.t));}function N(n,r,t){var e=s(r)?b$1("MapSet").F(r,t):v(r)?b$1("MapSet").T(r,t):n.O?function(n,r){var t=Array.isArray(n),e={i:t?1:0,A:r?r.A:_(),P:!1,I:!1,R:{},l:r,t:n,k:null,o:null,j:null,C:!1},i=e,o=en;t&&(i=[e],o=on);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(r,t):b$1("ES5").J(r,t);return (t?t.A:_()).p.push(e),e}function R(e){return r(e)||n(22,e),function n(r){if(!t(r))return r;var e,u=r[Q],c=o(r);if(u){if(!u.P&&(u.i<4||!b$1("ES5").K(u)))return u.t;u.I=!0,e=D(r,c),u.I=!1;}else e=D(r,c);return i(e,(function(r,t){u&&a$1(u.t,r)===t||f$6(e,r,n(t));})),3===c?new Set(e):e}(e)}function D(n,r){switch(r){case 2:return new Map(n);case 3:return Array.from(n)}return l(n)}var G,U,W="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),X="undefined"!=typeof Map,q="undefined"!=typeof Set,B="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,H=W?Symbol.for("immer-nothing"):((G={})["immer-nothing"]=!0,G),L=W?Symbol.for("immer-draftable"):"__$immer_draftable",Q=W?Symbol.for("immer-state"):"__$immer_state",Y={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(n){return "Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+n},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(n){return "Cannot apply patch, path doesn't resolve: "+n},16:'Sets cannot have "replace" patches.',17:function(n){return "Unsupported patch operation: "+n},18:function(n){return "The plugin for '"+n+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+n+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(n){return "produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+n+"'"},22:function(n){return "'current' expects a draft, got: "+n},23:function(n){return "'original' expects a draft, got: "+n},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},Z=""+Object.prototype.constructor,nn="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,rn=Object.getOwnPropertyDescriptors||function(n){var r={};return nn(n).forEach((function(t){r[t]=Object.getOwnPropertyDescriptor(n,t);})),r},tn={},en={get:function(n,r){if(r===Q)return n;var e=p(n);if(!u(e,r))return function(n,r,t){var e,i=I(r,t);return i?"value"in i?i.value:null===(e=i.get)||void 0===e?void 0:e.call(n.k):void 0}(n,e,r);var i=e[r];return n.I||!t(i)?i:i===z(n.t,r)?(E(n),n.o[r]=N(n.A.h,i,n)):i},has:function(n,r){return r in p(n)},ownKeys:function(n){return Reflect.ownKeys(p(n))},set:function(n,r,t){var e=I(p(n),r);if(null==e?void 0:e.set)return e.set.call(n.k,t),!0;if(!n.P){var i=z(p(n),r),o=null==i?void 0:i[Q];if(o&&o.t===t)return n.o[r]=t,n.R[r]=!1,!0;if(c$1(t,i)&&(void 0!==t||u(n.t,r)))return !0;E(n),k(n);}return n.o[r]===t&&(void 0!==t||r in n.o)||Number.isNaN(t)&&Number.isNaN(n.o[r])||(n.o[r]=t,n.R[r]=!0),!0},deleteProperty:function(n,r){return void 0!==z(n.t,r)||r in n.t?(n.R[r]=!1,E(n),k(n)):delete n.R[r],n.o&&delete n.o[r],!0},getOwnPropertyDescriptor:function(n,r){var t=p(n),e=Reflect.getOwnPropertyDescriptor(t,r);return e?{writable:!0,configurable:1!==n.i||"length"!==r,enumerable:e.enumerable,value:t[r]}:e},defineProperty:function(){n(11);},getPrototypeOf:function(n){return Object.getPrototypeOf(n.t)},setPrototypeOf:function(){n(12);}},on={};i(en,(function(n,r){on[n]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)};})),on.deleteProperty=function(r,t){return "production"!==process.env.NODE_ENV&&isNaN(parseInt(t))&&n(13),on.set.call(this,r,t,void 0)},on.set=function(r,t,e){return "production"!==process.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&n(14),en.set.call(this,r[0],t,e,r[0])};var un=function(){function e(r){var e=this;this.O=B,this.D=!0,this.produce=function(r,i,o){if("function"==typeof r&&"function"!=typeof i){var u=i;i=r;var a=e;return function(n){var r=this;void 0===n&&(n=u);for(var t=arguments.length,e=Array(t>1?t-1:0),o=1;o<t;o++)e[o-1]=arguments[o];return a.produce(n,(function(n){var t;return (t=i).call.apply(t,[r,n].concat(e))}))}}var f;if("function"!=typeof i&&n(6),void 0!==o&&"function"!=typeof o&&n(7),t(r)){var c=w(e),s=N(e,r,void 0),v=!0;try{f=i(s),v=!1;}finally{v?g(c):O(c);}return "undefined"!=typeof Promise&&f instanceof Promise?f.then((function(n){return j(c,o),P(n,c)}),(function(n){throw g(c),n})):(j(c,o),P(f,c))}if(!r||"object"!=typeof r){if(void 0===(f=i(r))&&(f=r),f===H&&(f=void 0),e.D&&d(f,!0),o){var p=[],l=[];b$1("Patches").M(r,f,p,l),o(p,l);}return f}n(21,r);},this.produceWithPatches=function(n,r){if("function"==typeof n)return function(r){for(var t=arguments.length,i=Array(t>1?t-1:0),o=1;o<t;o++)i[o-1]=arguments[o];return e.produceWithPatches(r,(function(r){return n.apply(void 0,[r].concat(i))}))};var t,i,o=e.produce(n,r,(function(n,r){t=n,i=r;}));return "undefined"!=typeof Promise&&o instanceof Promise?o.then((function(n){return [n,t,i]})):[o,t,i]},"boolean"==typeof(null==r?void 0:r.useProxies)&&this.setUseProxies(r.useProxies),"boolean"==typeof(null==r?void 0:r.autoFreeze)&&this.setAutoFreeze(r.autoFreeze);}var i=e.prototype;return i.createDraft=function(e){t(e)||n(8),r(e)&&(e=R(e));var i=w(this),o=N(this,e,void 0);return o[Q].C=!0,O(i),o},i.finishDraft=function(r,t){var e=r&&r[Q];"production"!==process.env.NODE_ENV&&(e&&e.C||n(9),e.I&&n(10));var i=e.A;return j(i,t),P(void 0,i)},i.setAutoFreeze=function(n){this.D=n;},i.setUseProxies=function(r){r&&!B&&n(20),this.O=r;},i.applyPatches=function(n,t){var e;for(e=t.length-1;e>=0;e--){var i=t[e];if(0===i.path.length&&"replace"===i.op){n=i.value;break}}e>-1&&(t=t.slice(e+1));var o=b$1("Patches").$;return r(n)?o(n,t):this.produce(n,(function(n){return o(n,t)}))},e}(),an=new un,fn=an.produce;an.produceWithPatches.bind(an);an.setAutoFreeze.bind(an);an.setUseProxies.bind(an);an.applyPatches.bind(an);an.createDraft.bind(an);an.finishDraft.bind(an);var produce = fn;
|
|
39193
|
+
ImmerScope.prototype.revoke = function revoke$1 () {
|
|
39194
|
+
this.leave();
|
|
39195
|
+
this.drafts.forEach(revoke);
|
|
39196
|
+
this.drafts = null; // Make draft-related methods throw.
|
|
39197
|
+
};
|
|
39079
39198
|
|
|
39080
|
-
|
|
39081
|
-
|
|
39082
|
-
|
|
39083
|
-
for (let formKey of formConfigKeys) {
|
|
39084
|
-
initialForm[formKey] = {
|
|
39085
|
-
dirty: false,
|
|
39086
|
-
rawValue: formConfig[formKey].defaultValue || '',
|
|
39087
|
-
validators: formConfig[formKey].validators || [],
|
|
39088
|
-
constraints: formConfig[formKey].constraints || [],
|
|
39089
|
-
};
|
|
39090
|
-
}
|
|
39091
|
-
// Because validators require the entire form we have to do a
|
|
39092
|
-
// second pass to add errors once the initial form has been
|
|
39093
|
-
// constructed
|
|
39094
|
-
for (let formKey of formConfigKeys) {
|
|
39095
|
-
let errors = computeErrors(formKey, initialForm);
|
|
39096
|
-
initialForm[formKey].errors = errors;
|
|
39097
|
-
initialForm[formKey].hasErrors = errors.length > 0;
|
|
39199
|
+
ImmerScope.prototype.leave = function leave () {
|
|
39200
|
+
if (this === ImmerScope.current) {
|
|
39201
|
+
ImmerScope.current = this.parent;
|
|
39098
39202
|
}
|
|
39203
|
+
};
|
|
39204
|
+
ImmerScope.current = null;
|
|
39099
39205
|
|
|
39100
|
-
|
|
39206
|
+
ImmerScope.enter = function () {
|
|
39207
|
+
return this.current = new ImmerScope(this.current);
|
|
39101
39208
|
};
|
|
39102
39209
|
|
|
39103
|
-
|
|
39104
|
-
|
|
39105
|
-
|
|
39106
|
-
payload: { fieldName, value },
|
|
39107
|
-
});
|
|
39210
|
+
function revoke(draft) {
|
|
39211
|
+
draft[DRAFT_STATE].revoke();
|
|
39212
|
+
}
|
|
39108
39213
|
|
|
39109
|
-
|
|
39110
|
-
const clear = () => ({ type: CLEAR });
|
|
39214
|
+
// but share them all instead
|
|
39111
39215
|
|
|
39112
|
-
|
|
39113
|
-
|
|
39114
|
-
|
|
39115
|
-
|
|
39116
|
-
});
|
|
39216
|
+
var descriptors$1 = {};
|
|
39217
|
+
function willFinalize(scope, result, isReplaced) {
|
|
39218
|
+
scope.drafts.forEach(function (draft) {
|
|
39219
|
+
draft[DRAFT_STATE].finalizing = true;
|
|
39220
|
+
});
|
|
39117
39221
|
|
|
39118
|
-
|
|
39119
|
-
|
|
39120
|
-
|
|
39121
|
-
|
|
39122
|
-
});
|
|
39222
|
+
if (!isReplaced) {
|
|
39223
|
+
if (scope.patches) {
|
|
39224
|
+
markChangesRecursively(scope.drafts[0]);
|
|
39225
|
+
} // This is faster when we don't care about which attributes changed.
|
|
39123
39226
|
|
|
39124
|
-
const CLEAR_FIELD_VALIDATORS = 'field/CLEAR_FIELD_VALIDATORS';
|
|
39125
|
-
const clearFieldValidators = (fieldName) => () => ({
|
|
39126
|
-
type: CLEAR_FIELD_VALIDATORS,
|
|
39127
|
-
payload: { fieldName },
|
|
39128
|
-
});
|
|
39129
39227
|
|
|
39130
|
-
|
|
39131
|
-
|
|
39132
|
-
|
|
39133
|
-
|
|
39134
|
-
|
|
39135
|
-
|
|
39136
|
-
|
|
39137
|
-
|
|
39138
|
-
|
|
39139
|
-
|
|
39140
|
-
|
|
39141
|
-
|
|
39142
|
-
|
|
39143
|
-
|
|
39144
|
-
|
|
39145
|
-
|
|
39228
|
+
markChangesSweep(scope.drafts);
|
|
39229
|
+
} // When a child draft is returned, look for changes.
|
|
39230
|
+
else if (isDraft(result) && result[DRAFT_STATE].scope === scope) {
|
|
39231
|
+
markChangesSweep(scope.drafts);
|
|
39232
|
+
}
|
|
39233
|
+
}
|
|
39234
|
+
function createProxy(base, parent) {
|
|
39235
|
+
var isArray = Array.isArray(base);
|
|
39236
|
+
var draft = clonePotentialDraft(base);
|
|
39237
|
+
each(draft, function (prop) {
|
|
39238
|
+
proxyProperty(draft, prop, isArray || isEnumerable(base, prop));
|
|
39239
|
+
}); // See "proxy.js" for property documentation.
|
|
39240
|
+
|
|
39241
|
+
var scope = parent ? parent.scope : ImmerScope.current;
|
|
39242
|
+
var state = {
|
|
39243
|
+
scope: scope,
|
|
39244
|
+
modified: false,
|
|
39245
|
+
finalizing: false,
|
|
39246
|
+
// es5 only
|
|
39247
|
+
finalized: false,
|
|
39248
|
+
assigned: {},
|
|
39249
|
+
parent: parent,
|
|
39250
|
+
base: base,
|
|
39251
|
+
draft: draft,
|
|
39252
|
+
copy: null,
|
|
39253
|
+
revoke: revoke$1,
|
|
39254
|
+
revoked: false // es5 only
|
|
39146
39255
|
|
|
39147
|
-
|
|
39148
|
-
|
|
39149
|
-
|
|
39150
|
-
|
|
39151
|
-
|
|
39152
|
-
|
|
39153
|
-
|
|
39154
|
-
|
|
39155
|
-
|
|
39156
|
-
|
|
39157
|
-
|
|
39158
|
-
|
|
39159
|
-
|
|
39160
|
-
|
|
39256
|
+
};
|
|
39257
|
+
createHiddenProperty(draft, DRAFT_STATE, state);
|
|
39258
|
+
scope.drafts.push(draft);
|
|
39259
|
+
return draft;
|
|
39260
|
+
}
|
|
39261
|
+
|
|
39262
|
+
function revoke$1() {
|
|
39263
|
+
this.revoked = true;
|
|
39264
|
+
}
|
|
39265
|
+
|
|
39266
|
+
function source(state) {
|
|
39267
|
+
return state.copy || state.base;
|
|
39268
|
+
} // Access a property without creating an Immer draft.
|
|
39269
|
+
|
|
39270
|
+
|
|
39271
|
+
function peek(draft, prop) {
|
|
39272
|
+
var state = draft[DRAFT_STATE];
|
|
39273
|
+
|
|
39274
|
+
if (state && !state.finalizing) {
|
|
39275
|
+
state.finalizing = true;
|
|
39276
|
+
var value = draft[prop];
|
|
39277
|
+
state.finalizing = false;
|
|
39278
|
+
return value;
|
|
39279
|
+
}
|
|
39280
|
+
|
|
39281
|
+
return draft[prop];
|
|
39282
|
+
}
|
|
39283
|
+
|
|
39284
|
+
function get$1(state, prop) {
|
|
39285
|
+
assertUnrevoked(state);
|
|
39286
|
+
var value = peek(source(state), prop);
|
|
39287
|
+
if (state.finalizing) { return value; } // Create a draft if the value is unmodified.
|
|
39288
|
+
|
|
39289
|
+
if (value === peek(state.base, prop) && isDraftable(value)) {
|
|
39290
|
+
prepareCopy(state);
|
|
39291
|
+
return state.copy[prop] = createProxy(value, state);
|
|
39292
|
+
}
|
|
39293
|
+
|
|
39294
|
+
return value;
|
|
39295
|
+
}
|
|
39296
|
+
|
|
39297
|
+
function set$1(state, prop, value) {
|
|
39298
|
+
assertUnrevoked(state);
|
|
39299
|
+
state.assigned[prop] = true;
|
|
39300
|
+
|
|
39301
|
+
if (!state.modified) {
|
|
39302
|
+
if (is(value, peek(source(state), prop))) { return; }
|
|
39303
|
+
markChanged(state);
|
|
39304
|
+
prepareCopy(state);
|
|
39305
|
+
}
|
|
39306
|
+
|
|
39307
|
+
state.copy[prop] = value;
|
|
39308
|
+
}
|
|
39309
|
+
|
|
39310
|
+
function markChanged(state) {
|
|
39311
|
+
if (!state.modified) {
|
|
39312
|
+
state.modified = true;
|
|
39313
|
+
if (state.parent) { markChanged(state.parent); }
|
|
39314
|
+
}
|
|
39315
|
+
}
|
|
39316
|
+
|
|
39317
|
+
function prepareCopy(state) {
|
|
39318
|
+
if (!state.copy) { state.copy = clonePotentialDraft(state.base); }
|
|
39319
|
+
}
|
|
39320
|
+
|
|
39321
|
+
function clonePotentialDraft(base) {
|
|
39322
|
+
var state = base && base[DRAFT_STATE];
|
|
39323
|
+
|
|
39324
|
+
if (state) {
|
|
39325
|
+
state.finalizing = true;
|
|
39326
|
+
var draft = shallowCopy(state.draft, true);
|
|
39327
|
+
state.finalizing = false;
|
|
39328
|
+
return draft;
|
|
39329
|
+
}
|
|
39330
|
+
|
|
39331
|
+
return shallowCopy(base);
|
|
39332
|
+
}
|
|
39333
|
+
|
|
39334
|
+
function proxyProperty(draft, prop, enumerable) {
|
|
39335
|
+
var desc = descriptors$1[prop];
|
|
39336
|
+
|
|
39337
|
+
if (desc) {
|
|
39338
|
+
desc.enumerable = enumerable;
|
|
39339
|
+
} else {
|
|
39340
|
+
descriptors$1[prop] = desc = {
|
|
39341
|
+
configurable: true,
|
|
39342
|
+
enumerable: enumerable,
|
|
39343
|
+
|
|
39344
|
+
get: function get$1$1() {
|
|
39345
|
+
return get$1(this[DRAFT_STATE], prop);
|
|
39346
|
+
},
|
|
39347
|
+
|
|
39348
|
+
set: function set$1$1(value) {
|
|
39349
|
+
set$1(this[DRAFT_STATE], prop, value);
|
|
39161
39350
|
}
|
|
39162
|
-
|
|
39163
|
-
|
|
39164
|
-
|
|
39165
|
-
|
|
39166
|
-
|
|
39167
|
-
|
|
39168
|
-
|
|
39169
|
-
|
|
39170
|
-
|
|
39171
|
-
|
|
39172
|
-
|
|
39351
|
+
|
|
39352
|
+
};
|
|
39353
|
+
}
|
|
39354
|
+
|
|
39355
|
+
Object.defineProperty(draft, prop, desc);
|
|
39356
|
+
}
|
|
39357
|
+
|
|
39358
|
+
function assertUnrevoked(state) {
|
|
39359
|
+
if (state.revoked === true) { throw new Error("Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? " + JSON.stringify(source(state))); }
|
|
39360
|
+
} // This looks expensive, but only proxies are visited, and only objects without known changes are scanned.
|
|
39361
|
+
|
|
39362
|
+
|
|
39363
|
+
function markChangesSweep(drafts) {
|
|
39364
|
+
// The natural order of drafts in the `scope` array is based on when they
|
|
39365
|
+
// were accessed. By processing drafts in reverse natural order, we have a
|
|
39366
|
+
// better chance of processing leaf nodes first. When a leaf node is known to
|
|
39367
|
+
// have changed, we can avoid any traversal of its ancestor nodes.
|
|
39368
|
+
for (var i = drafts.length - 1; i >= 0; i--) {
|
|
39369
|
+
var state = drafts[i][DRAFT_STATE];
|
|
39370
|
+
|
|
39371
|
+
if (!state.modified) {
|
|
39372
|
+
if (Array.isArray(state.base)) {
|
|
39373
|
+
if (hasArrayChanges(state)) { markChanged(state); }
|
|
39374
|
+
} else if (hasObjectChanges(state)) { markChanged(state); }
|
|
39375
|
+
}
|
|
39376
|
+
}
|
|
39377
|
+
}
|
|
39378
|
+
|
|
39379
|
+
function markChangesRecursively(object) {
|
|
39380
|
+
if (!object || typeof object !== "object") { return; }
|
|
39381
|
+
var state = object[DRAFT_STATE];
|
|
39382
|
+
if (!state) { return; }
|
|
39383
|
+
var base = state.base;
|
|
39384
|
+
var draft = state.draft;
|
|
39385
|
+
var assigned = state.assigned;
|
|
39386
|
+
|
|
39387
|
+
if (!Array.isArray(object)) {
|
|
39388
|
+
// Look for added keys.
|
|
39389
|
+
Object.keys(draft).forEach(function (key) {
|
|
39390
|
+
// The `undefined` check is a fast path for pre-existing keys.
|
|
39391
|
+
if (base[key] === undefined && !has$1(base, key)) {
|
|
39392
|
+
assigned[key] = true;
|
|
39393
|
+
markChanged(state);
|
|
39394
|
+
} else if (!assigned[key]) {
|
|
39395
|
+
// Only untouched properties trigger recursion.
|
|
39396
|
+
markChangesRecursively(draft[key]);
|
|
39173
39397
|
}
|
|
39174
|
-
|
|
39175
|
-
const fieldToClear = action.payload.fieldName;
|
|
39398
|
+
}); // Look for removed keys.
|
|
39176
39399
|
|
|
39177
|
-
|
|
39178
|
-
|
|
39179
|
-
|
|
39180
|
-
|
|
39400
|
+
Object.keys(base).forEach(function (key) {
|
|
39401
|
+
// The `undefined` check is a fast path for pre-existing keys.
|
|
39402
|
+
if (draft[key] === undefined && !has$1(draft, key)) {
|
|
39403
|
+
assigned[key] = false;
|
|
39404
|
+
markChanged(state);
|
|
39181
39405
|
}
|
|
39182
|
-
|
|
39183
|
-
|
|
39184
|
-
|
|
39185
|
-
|
|
39406
|
+
});
|
|
39407
|
+
} else if (hasArrayChanges(state)) {
|
|
39408
|
+
markChanged(state);
|
|
39409
|
+
assigned.length = true;
|
|
39186
39410
|
|
|
39187
|
-
|
|
39188
|
-
|
|
39189
|
-
|
|
39190
|
-
|
|
39191
|
-
return (dispatch) => {
|
|
39192
|
-
if (dispatch == cachedDispatch) {
|
|
39193
|
-
return cacheValue;
|
|
39411
|
+
if (draft.length < base.length) {
|
|
39412
|
+
for (var i = draft.length; i < base.length; i++) { assigned[i] = false; }
|
|
39413
|
+
} else {
|
|
39414
|
+
for (var i$1 = base.length; i$1 < draft.length; i$1++) { assigned[i$1] = true; }
|
|
39194
39415
|
}
|
|
39195
|
-
|
|
39196
|
-
|
|
39197
|
-
|
|
39198
|
-
|
|
39199
|
-
dispatchObj.fields[fieldName] = {
|
|
39200
|
-
set: (value) => dispatch(set$1(fieldName)(value)),
|
|
39201
|
-
addValidator: (validator) => dispatch(addValidator(fieldName)(validator)),
|
|
39202
|
-
removeValidator: (validator) =>
|
|
39203
|
-
dispatch(removeValidator(fieldName)(validator)),
|
|
39204
|
-
clear: () => dispatch(clearFieldValidators(fieldName)()),
|
|
39205
|
-
};
|
|
39416
|
+
|
|
39417
|
+
for (var i$2 = 0; i$2 < draft.length; i$2++) {
|
|
39418
|
+
// Only untouched indices trigger recursion.
|
|
39419
|
+
if (assigned[i$2] === undefined) { markChangesRecursively(draft[i$2]); }
|
|
39206
39420
|
}
|
|
39207
|
-
|
|
39208
|
-
|
|
39209
|
-
cacheValue = { actions: dispatchObj };
|
|
39210
|
-
return cacheValue;
|
|
39211
|
-
};
|
|
39212
|
-
};
|
|
39421
|
+
}
|
|
39422
|
+
}
|
|
39213
39423
|
|
|
39214
|
-
|
|
39424
|
+
function hasObjectChanges(state) {
|
|
39425
|
+
var base = state.base;
|
|
39426
|
+
var draft = state.draft; // Search for added keys and changed keys. Start at the back, because
|
|
39427
|
+
// non-numeric keys are ordered by time of definition on the object.
|
|
39215
39428
|
|
|
39216
|
-
|
|
39217
|
-
reducer: createFormReducer(formConfig),
|
|
39218
|
-
mapDispatchToProps: createMapDispatchToProps(formConfig),
|
|
39219
|
-
mapStateToProps: mapStateToProps,
|
|
39220
|
-
});
|
|
39429
|
+
var keys = Object.keys(draft);
|
|
39221
39430
|
|
|
39222
|
-
var
|
|
39223
|
-
|
|
39431
|
+
for (var i = keys.length - 1; i >= 0; i--) {
|
|
39432
|
+
var key = keys[i];
|
|
39433
|
+
var baseValue = base[key]; // The `undefined` check is a fast path for pre-existing keys.
|
|
39224
39434
|
|
|
39225
|
-
|
|
39226
|
-
|
|
39227
|
-
|
|
39228
|
-
|
|
39229
|
-
|
|
39230
|
-
|
|
39231
|
-
|
|
39232
|
-
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
39233
|
-
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
39234
|
-
saveToWallet = _ref.saveToWallet,
|
|
39235
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked;
|
|
39435
|
+
if (baseValue === undefined && !has$1(base, key)) {
|
|
39436
|
+
return true;
|
|
39437
|
+
} // Once a base key is deleted, future changes go undetected, because its
|
|
39438
|
+
// descriptor is erased. This branch detects any missed changes.
|
|
39439
|
+
else {
|
|
39440
|
+
var value = draft[key];
|
|
39441
|
+
var state$1 = value && value[DRAFT_STATE];
|
|
39236
39442
|
|
|
39237
|
-
|
|
39238
|
-
|
|
39239
|
-
|
|
39240
|
-
|
|
39241
|
-
|
|
39242
|
-
|
|
39243
|
-
}
|
|
39443
|
+
if (state$1 ? state$1.base !== baseValue : !is(value, baseValue)) {
|
|
39444
|
+
return true;
|
|
39445
|
+
}
|
|
39446
|
+
}
|
|
39447
|
+
} // At this point, no keys were added or changed.
|
|
39448
|
+
// Compare key count to determine if keys were deleted.
|
|
39244
39449
|
|
|
39245
|
-
var street1ErrorMessages = _defineProperty({}, required.error, "Street is required");
|
|
39246
39450
|
|
|
39247
|
-
|
|
39451
|
+
return keys.length !== Object.keys(base).length;
|
|
39452
|
+
}
|
|
39248
39453
|
|
|
39249
|
-
|
|
39454
|
+
function hasArrayChanges(state) {
|
|
39455
|
+
var draft = state.draft;
|
|
39456
|
+
if (draft.length !== state.base.length) { return true; } // See #116
|
|
39457
|
+
// If we first shorten the length, our array interceptors will be removed.
|
|
39458
|
+
// If after that new items are added, result in the same original length,
|
|
39459
|
+
// those last items will have no intercepting property.
|
|
39460
|
+
// So if there is no own descriptor on the last position, we know that items were removed and added
|
|
39461
|
+
// N.B.: splice, unshift, etc only shift values around, but not prop descriptors, so we only have to check
|
|
39462
|
+
// the last one
|
|
39250
39463
|
|
|
39251
|
-
var
|
|
39464
|
+
var descriptor = Object.getOwnPropertyDescriptor(draft, draft.length - 1); // descriptor can be null, but only for newly created sparse arrays, eg. new Array(10)
|
|
39252
39465
|
|
|
39253
|
-
|
|
39466
|
+
if (descriptor && !descriptor.get) { return true; } // For all other cases, we don't have to compare, as they would have been picked up by the index setters
|
|
39254
39467
|
|
|
39255
|
-
|
|
39256
|
-
|
|
39257
|
-
variant: variant,
|
|
39258
|
-
role: "form",
|
|
39259
|
-
"aria-label": "Address"
|
|
39260
|
-
}, /*#__PURE__*/React__default.createElement(FormInputColumn, null, /*#__PURE__*/React__default.createElement(CountryDropdown, {
|
|
39261
|
-
labelTextWhenNoError: "Country",
|
|
39262
|
-
errorMessages: countryErrorMessages,
|
|
39263
|
-
field: fields.country,
|
|
39264
|
-
onChange: function onChange(value) {
|
|
39265
|
-
actions.fields.country.set(value); // temporary measure to not dirty fields until
|
|
39266
|
-
// we can write a reset function for fields
|
|
39468
|
+
return false;
|
|
39469
|
+
}
|
|
39267
39470
|
|
|
39268
|
-
|
|
39269
|
-
|
|
39270
|
-
|
|
39471
|
+
function createHiddenProperty(target, prop, value) {
|
|
39472
|
+
Object.defineProperty(target, prop, {
|
|
39473
|
+
value: value,
|
|
39474
|
+
enumerable: false,
|
|
39475
|
+
writable: true
|
|
39476
|
+
});
|
|
39477
|
+
}
|
|
39271
39478
|
|
|
39272
|
-
|
|
39273
|
-
|
|
39479
|
+
var legacyProxy = /*#__PURE__*/Object.freeze({
|
|
39480
|
+
willFinalize: willFinalize,
|
|
39481
|
+
createProxy: createProxy
|
|
39482
|
+
});
|
|
39483
|
+
|
|
39484
|
+
function willFinalize$1() {}
|
|
39485
|
+
function createProxy$1(base, parent) {
|
|
39486
|
+
var scope = parent ? parent.scope : ImmerScope.current;
|
|
39487
|
+
var state = {
|
|
39488
|
+
// Track which produce call this is associated with.
|
|
39489
|
+
scope: scope,
|
|
39490
|
+
// True for both shallow and deep changes.
|
|
39491
|
+
modified: false,
|
|
39492
|
+
// Used during finalization.
|
|
39493
|
+
finalized: false,
|
|
39494
|
+
// Track which properties have been assigned (true) or deleted (false).
|
|
39495
|
+
assigned: {},
|
|
39496
|
+
// The parent draft state.
|
|
39497
|
+
parent: parent,
|
|
39498
|
+
// The base state.
|
|
39499
|
+
base: base,
|
|
39500
|
+
// The base proxy.
|
|
39501
|
+
draft: null,
|
|
39502
|
+
// Any property proxies.
|
|
39503
|
+
drafts: {},
|
|
39504
|
+
// The base copy with any updated values.
|
|
39505
|
+
copy: null,
|
|
39506
|
+
// Called by the `produce` function.
|
|
39507
|
+
revoke: null
|
|
39508
|
+
};
|
|
39509
|
+
var ref = Array.isArray(base) ? // [state] is used for arrays, to make sure the proxy is array-ish and not violate invariants,
|
|
39510
|
+
// although state itself is an object
|
|
39511
|
+
Proxy.revocable([state], arrayTraps) : Proxy.revocable(state, objectTraps);
|
|
39512
|
+
var revoke = ref.revoke;
|
|
39513
|
+
var proxy = ref.proxy;
|
|
39514
|
+
state.draft = proxy;
|
|
39515
|
+
state.revoke = revoke;
|
|
39516
|
+
scope.drafts.push(proxy);
|
|
39517
|
+
return proxy;
|
|
39518
|
+
}
|
|
39519
|
+
var objectTraps = {
|
|
39520
|
+
get: get$1$1,
|
|
39521
|
+
|
|
39522
|
+
has: function has(target, prop) {
|
|
39523
|
+
return prop in source$1(target);
|
|
39524
|
+
},
|
|
39525
|
+
|
|
39526
|
+
ownKeys: function ownKeys(target) {
|
|
39527
|
+
return Reflect.ownKeys(source$1(target));
|
|
39528
|
+
},
|
|
39529
|
+
|
|
39530
|
+
set: set$1$1,
|
|
39531
|
+
deleteProperty: deleteProperty,
|
|
39532
|
+
getOwnPropertyDescriptor: getOwnPropertyDescriptor$2,
|
|
39533
|
+
|
|
39534
|
+
defineProperty: function defineProperty() {
|
|
39535
|
+
throw new Error("Object.defineProperty() cannot be used on an Immer draft"); // prettier-ignore
|
|
39536
|
+
},
|
|
39537
|
+
|
|
39538
|
+
getPrototypeOf: function getPrototypeOf(target) {
|
|
39539
|
+
return Object.getPrototypeOf(target.base);
|
|
39540
|
+
},
|
|
39541
|
+
|
|
39542
|
+
setPrototypeOf: function setPrototypeOf() {
|
|
39543
|
+
throw new Error("Object.setPrototypeOf() cannot be used on an Immer draft"); // prettier-ignore
|
|
39544
|
+
}
|
|
39545
|
+
|
|
39546
|
+
};
|
|
39547
|
+
var arrayTraps = {};
|
|
39548
|
+
each(objectTraps, function (key, fn) {
|
|
39549
|
+
arrayTraps[key] = function () {
|
|
39550
|
+
arguments[0] = arguments[0][0];
|
|
39551
|
+
return fn.apply(this, arguments);
|
|
39552
|
+
};
|
|
39553
|
+
});
|
|
39554
|
+
|
|
39555
|
+
arrayTraps.deleteProperty = function (state, prop) {
|
|
39556
|
+
if (isNaN(parseInt(prop))) {
|
|
39557
|
+
throw new Error("Immer only supports deleting array indices"); // prettier-ignore
|
|
39558
|
+
}
|
|
39559
|
+
|
|
39560
|
+
return objectTraps.deleteProperty.call(this, state[0], prop);
|
|
39561
|
+
};
|
|
39562
|
+
|
|
39563
|
+
arrayTraps.set = function (state, prop, value) {
|
|
39564
|
+
if (prop !== "length" && isNaN(parseInt(prop))) {
|
|
39565
|
+
throw new Error("Immer only supports setting array indices and the 'length' property"); // prettier-ignore
|
|
39566
|
+
}
|
|
39567
|
+
|
|
39568
|
+
return objectTraps.set.call(this, state[0], prop, value);
|
|
39569
|
+
}; // returns the object we should be reading the current value from, which is base, until some change has been made
|
|
39570
|
+
|
|
39571
|
+
|
|
39572
|
+
function source$1(state) {
|
|
39573
|
+
return state.copy || state.base;
|
|
39574
|
+
} // Access a property without creating an Immer draft.
|
|
39575
|
+
|
|
39576
|
+
|
|
39577
|
+
function peek$1(draft, prop) {
|
|
39578
|
+
var state = draft[DRAFT_STATE];
|
|
39579
|
+
var desc = Reflect.getOwnPropertyDescriptor(state ? source$1(state) : draft, prop);
|
|
39580
|
+
return desc && desc.value;
|
|
39581
|
+
}
|
|
39582
|
+
|
|
39583
|
+
function get$1$1(state, prop) {
|
|
39584
|
+
if (prop === DRAFT_STATE) { return state; }
|
|
39585
|
+
var drafts = state.drafts; // Check for existing draft in unmodified state.
|
|
39586
|
+
|
|
39587
|
+
if (!state.modified && has$1(drafts, prop)) {
|
|
39588
|
+
return drafts[prop];
|
|
39589
|
+
}
|
|
39590
|
+
|
|
39591
|
+
var value = source$1(state)[prop];
|
|
39592
|
+
|
|
39593
|
+
if (state.finalized || !isDraftable(value)) {
|
|
39594
|
+
return value;
|
|
39595
|
+
} // Check for existing draft in modified state.
|
|
39596
|
+
|
|
39597
|
+
|
|
39598
|
+
if (state.modified) {
|
|
39599
|
+
// Assigned values are never drafted. This catches any drafts we created, too.
|
|
39600
|
+
if (value !== peek$1(state.base, prop)) { return value; } // Store drafts on the copy (when one exists).
|
|
39601
|
+
|
|
39602
|
+
drafts = state.copy;
|
|
39603
|
+
}
|
|
39604
|
+
|
|
39605
|
+
return drafts[prop] = createProxy$1(value, state);
|
|
39606
|
+
}
|
|
39607
|
+
|
|
39608
|
+
function set$1$1(state, prop, value) {
|
|
39609
|
+
if (!state.modified) {
|
|
39610
|
+
var baseValue = peek$1(state.base, prop); // Optimize based on value's truthiness. Truthy values are guaranteed to
|
|
39611
|
+
// never be undefined, so we can avoid the `in` operator. Lastly, truthy
|
|
39612
|
+
// values may be drafts, but falsy values are never drafts.
|
|
39613
|
+
|
|
39614
|
+
var isUnchanged = value ? is(baseValue, value) || value === state.drafts[prop] : is(baseValue, value) && prop in state.base;
|
|
39615
|
+
if (isUnchanged) { return true; }
|
|
39616
|
+
markChanged$1(state);
|
|
39617
|
+
}
|
|
39618
|
+
|
|
39619
|
+
state.assigned[prop] = true;
|
|
39620
|
+
state.copy[prop] = value;
|
|
39621
|
+
return true;
|
|
39622
|
+
}
|
|
39623
|
+
|
|
39624
|
+
function deleteProperty(state, prop) {
|
|
39625
|
+
// The `undefined` check is a fast path for pre-existing keys.
|
|
39626
|
+
if (peek$1(state.base, prop) !== undefined || prop in state.base) {
|
|
39627
|
+
state.assigned[prop] = false;
|
|
39628
|
+
markChanged$1(state);
|
|
39629
|
+
} else if (state.assigned[prop]) {
|
|
39630
|
+
// if an originally not assigned property was deleted
|
|
39631
|
+
delete state.assigned[prop];
|
|
39632
|
+
}
|
|
39633
|
+
|
|
39634
|
+
if (state.copy) { delete state.copy[prop]; }
|
|
39635
|
+
return true;
|
|
39636
|
+
} // Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
|
39637
|
+
// the same guarantee in ES5 mode.
|
|
39638
|
+
|
|
39639
|
+
|
|
39640
|
+
function getOwnPropertyDescriptor$2(state, prop) {
|
|
39641
|
+
var owner = source$1(state);
|
|
39642
|
+
var desc = Reflect.getOwnPropertyDescriptor(owner, prop);
|
|
39643
|
+
|
|
39644
|
+
if (desc) {
|
|
39645
|
+
desc.writable = true;
|
|
39646
|
+
desc.configurable = !Array.isArray(owner) || prop !== "length";
|
|
39647
|
+
}
|
|
39648
|
+
|
|
39649
|
+
return desc;
|
|
39650
|
+
}
|
|
39651
|
+
|
|
39652
|
+
function markChanged$1(state) {
|
|
39653
|
+
if (!state.modified) {
|
|
39654
|
+
state.modified = true;
|
|
39655
|
+
state.copy = assign(shallowCopy(state.base), state.drafts);
|
|
39656
|
+
state.drafts = null;
|
|
39657
|
+
if (state.parent) { markChanged$1(state.parent); }
|
|
39658
|
+
}
|
|
39659
|
+
}
|
|
39660
|
+
|
|
39661
|
+
var modernProxy = /*#__PURE__*/Object.freeze({
|
|
39662
|
+
willFinalize: willFinalize$1,
|
|
39663
|
+
createProxy: createProxy$1
|
|
39664
|
+
});
|
|
39665
|
+
|
|
39666
|
+
function generatePatches(state, basePath, patches, inversePatches) {
|
|
39667
|
+
Array.isArray(state.base) ? generateArrayPatches(state, basePath, patches, inversePatches) : generateObjectPatches(state, basePath, patches, inversePatches);
|
|
39668
|
+
}
|
|
39669
|
+
|
|
39670
|
+
function generateArrayPatches(state, basePath, patches, inversePatches) {
|
|
39671
|
+
var assign, assign$1;
|
|
39672
|
+
|
|
39673
|
+
var base = state.base;
|
|
39674
|
+
var copy = state.copy;
|
|
39675
|
+
var assigned = state.assigned; // Reduce complexity by ensuring `base` is never longer.
|
|
39676
|
+
|
|
39677
|
+
if (copy.length < base.length) {
|
|
39678
|
+
(assign = [copy, base], base = assign[0], copy = assign[1]);
|
|
39679
|
+
(assign$1 = [inversePatches, patches], patches = assign$1[0], inversePatches = assign$1[1]);
|
|
39680
|
+
}
|
|
39681
|
+
|
|
39682
|
+
var delta = copy.length - base.length; // Find the first replaced index.
|
|
39683
|
+
|
|
39684
|
+
var start = 0;
|
|
39685
|
+
|
|
39686
|
+
while (base[start] === copy[start] && start < base.length) {
|
|
39687
|
+
++start;
|
|
39688
|
+
} // Find the last replaced index. Search from the end to optimize splice patches.
|
|
39689
|
+
|
|
39690
|
+
|
|
39691
|
+
var end = base.length;
|
|
39692
|
+
|
|
39693
|
+
while (end > start && base[end - 1] === copy[end + delta - 1]) {
|
|
39694
|
+
--end;
|
|
39695
|
+
} // Process replaced indices.
|
|
39696
|
+
|
|
39697
|
+
|
|
39698
|
+
for (var i = start; i < end; ++i) {
|
|
39699
|
+
if (assigned[i] && copy[i] !== base[i]) {
|
|
39700
|
+
var path = basePath.concat([i]);
|
|
39701
|
+
patches.push({
|
|
39702
|
+
op: "replace",
|
|
39703
|
+
path: path,
|
|
39704
|
+
value: copy[i]
|
|
39705
|
+
});
|
|
39706
|
+
inversePatches.push({
|
|
39707
|
+
op: "replace",
|
|
39708
|
+
path: path,
|
|
39709
|
+
value: base[i]
|
|
39710
|
+
});
|
|
39711
|
+
}
|
|
39712
|
+
}
|
|
39713
|
+
|
|
39714
|
+
var replaceCount = patches.length; // Process added indices.
|
|
39715
|
+
|
|
39716
|
+
for (var i$1 = end + delta - 1; i$1 >= end; --i$1) {
|
|
39717
|
+
var path$1 = basePath.concat([i$1]);
|
|
39718
|
+
patches[replaceCount + i$1 - end] = {
|
|
39719
|
+
op: "add",
|
|
39720
|
+
path: path$1,
|
|
39721
|
+
value: copy[i$1]
|
|
39722
|
+
};
|
|
39723
|
+
inversePatches.push({
|
|
39724
|
+
op: "remove",
|
|
39725
|
+
path: path$1
|
|
39726
|
+
});
|
|
39727
|
+
}
|
|
39728
|
+
}
|
|
39729
|
+
|
|
39730
|
+
function generateObjectPatches(state, basePath, patches, inversePatches) {
|
|
39731
|
+
var base = state.base;
|
|
39732
|
+
var copy = state.copy;
|
|
39733
|
+
each(state.assigned, function (key, assignedValue) {
|
|
39734
|
+
var origValue = base[key];
|
|
39735
|
+
var value = copy[key];
|
|
39736
|
+
var op = !assignedValue ? "remove" : key in base ? "replace" : "add";
|
|
39737
|
+
if (origValue === value && op === "replace") { return; }
|
|
39738
|
+
var path = basePath.concat(key);
|
|
39739
|
+
patches.push(op === "remove" ? {
|
|
39740
|
+
op: op,
|
|
39741
|
+
path: path
|
|
39742
|
+
} : {
|
|
39743
|
+
op: op,
|
|
39744
|
+
path: path,
|
|
39745
|
+
value: value
|
|
39746
|
+
});
|
|
39747
|
+
inversePatches.push(op === "add" ? {
|
|
39748
|
+
op: "remove",
|
|
39749
|
+
path: path
|
|
39750
|
+
} : op === "remove" ? {
|
|
39751
|
+
op: "add",
|
|
39752
|
+
path: path,
|
|
39753
|
+
value: origValue
|
|
39754
|
+
} : {
|
|
39755
|
+
op: "replace",
|
|
39756
|
+
path: path,
|
|
39757
|
+
value: origValue
|
|
39758
|
+
});
|
|
39759
|
+
});
|
|
39760
|
+
}
|
|
39761
|
+
|
|
39762
|
+
var applyPatches = function (draft, patches) {
|
|
39763
|
+
for (var i$1 = 0, list = patches; i$1 < list.length; i$1 += 1) {
|
|
39764
|
+
var patch = list[i$1];
|
|
39765
|
+
|
|
39766
|
+
var path = patch.path;
|
|
39767
|
+
var op = patch.op;
|
|
39768
|
+
var value = clone(patch.value); // used to clone patch to ensure original patch is not modified, see #411
|
|
39769
|
+
|
|
39770
|
+
if (!path.length) { throw new Error("Illegal state"); }
|
|
39771
|
+
var base = draft;
|
|
39772
|
+
|
|
39773
|
+
for (var i = 0; i < path.length - 1; i++) {
|
|
39774
|
+
base = base[path[i]];
|
|
39775
|
+
if (!base || typeof base !== "object") { throw new Error("Cannot apply patch, path doesn't resolve: " + path.join("/")); } // prettier-ignore
|
|
39776
|
+
}
|
|
39777
|
+
|
|
39778
|
+
var key = path[path.length - 1];
|
|
39779
|
+
|
|
39780
|
+
switch (op) {
|
|
39781
|
+
case "replace":
|
|
39782
|
+
// if value is an object, then it's assigned by reference
|
|
39783
|
+
// in the following add or remove ops, the value field inside the patch will also be modifyed
|
|
39784
|
+
// so we use value from the cloned patch
|
|
39785
|
+
base[key] = value;
|
|
39786
|
+
break;
|
|
39787
|
+
|
|
39788
|
+
case "add":
|
|
39789
|
+
if (Array.isArray(base)) {
|
|
39790
|
+
// TODO: support "foo/-" paths for appending to an array
|
|
39791
|
+
base.splice(key, 0, value);
|
|
39792
|
+
} else {
|
|
39793
|
+
base[key] = value;
|
|
39794
|
+
}
|
|
39795
|
+
|
|
39796
|
+
break;
|
|
39797
|
+
|
|
39798
|
+
case "remove":
|
|
39799
|
+
if (Array.isArray(base)) {
|
|
39800
|
+
base.splice(key, 1);
|
|
39801
|
+
} else {
|
|
39802
|
+
delete base[key];
|
|
39803
|
+
}
|
|
39804
|
+
|
|
39805
|
+
break;
|
|
39806
|
+
|
|
39807
|
+
default:
|
|
39808
|
+
throw new Error("Unsupported patch operation: " + op);
|
|
39809
|
+
}
|
|
39810
|
+
}
|
|
39811
|
+
|
|
39812
|
+
return draft;
|
|
39813
|
+
};
|
|
39814
|
+
|
|
39815
|
+
function verifyMinified() {}
|
|
39816
|
+
|
|
39817
|
+
var configDefaults = {
|
|
39818
|
+
useProxies: typeof Proxy !== "undefined" && typeof Reflect !== "undefined",
|
|
39819
|
+
autoFreeze: typeof process !== "undefined" ? process.env.NODE_ENV !== "production" : verifyMinified.name === "verifyMinified",
|
|
39820
|
+
onAssign: null,
|
|
39821
|
+
onDelete: null,
|
|
39822
|
+
onCopy: null
|
|
39823
|
+
};
|
|
39824
|
+
var Immer = function Immer(config) {
|
|
39825
|
+
assign(this, configDefaults, config);
|
|
39826
|
+
this.setUseProxies(this.useProxies);
|
|
39827
|
+
this.produce = this.produce.bind(this);
|
|
39828
|
+
};
|
|
39829
|
+
|
|
39830
|
+
Immer.prototype.produce = function produce (base, recipe, patchListener) {
|
|
39831
|
+
var this$1$1 = this;
|
|
39832
|
+
|
|
39833
|
+
// curried invocation
|
|
39834
|
+
if (typeof base === "function" && typeof recipe !== "function") {
|
|
39835
|
+
var defaultBase = recipe;
|
|
39836
|
+
recipe = base;
|
|
39837
|
+
var self = this;
|
|
39838
|
+
return function curriedProduce(base) {
|
|
39839
|
+
var this$1$1 = this;
|
|
39840
|
+
if ( base === void 0 ) base = defaultBase;
|
|
39841
|
+
var args = [], len = arguments.length - 1;
|
|
39842
|
+
while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
|
|
39843
|
+
|
|
39844
|
+
return self.produce(base, function (draft) { return recipe.call.apply(recipe, [ this$1$1, draft ].concat( args )); }); // prettier-ignore
|
|
39845
|
+
};
|
|
39846
|
+
} // prettier-ignore
|
|
39847
|
+
|
|
39848
|
+
|
|
39849
|
+
{
|
|
39850
|
+
if (typeof recipe !== "function") {
|
|
39851
|
+
throw new Error("The first or second argument to `produce` must be a function");
|
|
39852
|
+
}
|
|
39853
|
+
|
|
39854
|
+
if (patchListener !== undefined && typeof patchListener !== "function") {
|
|
39855
|
+
throw new Error("The third argument to `produce` must be a function or undefined");
|
|
39856
|
+
}
|
|
39857
|
+
}
|
|
39858
|
+
var result; // Only plain objects, arrays, and "immerable classes" are drafted.
|
|
39859
|
+
|
|
39860
|
+
if (isDraftable(base)) {
|
|
39861
|
+
var scope = ImmerScope.enter();
|
|
39862
|
+
var proxy = this.createProxy(base);
|
|
39863
|
+
var hasError = true;
|
|
39864
|
+
|
|
39865
|
+
try {
|
|
39866
|
+
result = recipe(proxy);
|
|
39867
|
+
hasError = false;
|
|
39868
|
+
} finally {
|
|
39869
|
+
// finally instead of catch + rethrow better preserves original stack
|
|
39870
|
+
if (hasError) { scope.revoke(); }else { scope.leave(); }
|
|
39871
|
+
}
|
|
39872
|
+
|
|
39873
|
+
if (result instanceof Promise) {
|
|
39874
|
+
return result.then(function (result) {
|
|
39875
|
+
scope.usePatches(patchListener);
|
|
39876
|
+
return this$1$1.processResult(result, scope);
|
|
39877
|
+
}, function (error) {
|
|
39878
|
+
scope.revoke();
|
|
39879
|
+
throw error;
|
|
39880
|
+
});
|
|
39881
|
+
}
|
|
39882
|
+
|
|
39883
|
+
scope.usePatches(patchListener);
|
|
39884
|
+
return this.processResult(result, scope);
|
|
39885
|
+
} else {
|
|
39886
|
+
result = recipe(base);
|
|
39887
|
+
if (result === undefined) { return base; }
|
|
39888
|
+
return result !== NOTHING ? result : undefined;
|
|
39889
|
+
}
|
|
39890
|
+
};
|
|
39891
|
+
|
|
39892
|
+
Immer.prototype.produceWithPatches = function produceWithPatches (arg1, arg2, arg3) {
|
|
39893
|
+
var this$1$1 = this;
|
|
39894
|
+
|
|
39895
|
+
if (typeof arg1 === "function") {
|
|
39896
|
+
return function (state) {
|
|
39897
|
+
var args = [], len = arguments.length - 1;
|
|
39898
|
+
while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
|
|
39899
|
+
|
|
39900
|
+
return this$1$1.produceWithPatches(state, function (draft) { return arg1.apply(void 0, [ draft ].concat( args )); });
|
|
39901
|
+
};
|
|
39902
|
+
} // non-curried form
|
|
39903
|
+
|
|
39904
|
+
|
|
39905
|
+
if (arg3) { throw new Error("A patch listener cannot be passed to produceWithPatches"); }
|
|
39906
|
+
var patches, inversePatches;
|
|
39907
|
+
var nextState = this.produce(arg1, arg2, function (p, ip) {
|
|
39908
|
+
patches = p;
|
|
39909
|
+
inversePatches = ip;
|
|
39910
|
+
});
|
|
39911
|
+
return [nextState, patches, inversePatches];
|
|
39912
|
+
};
|
|
39913
|
+
|
|
39914
|
+
Immer.prototype.createDraft = function createDraft (base) {
|
|
39915
|
+
if (!isDraftable(base)) {
|
|
39916
|
+
throw new Error("First argument to `createDraft` must be a plain object, an array, or an immerable object"); // prettier-ignore
|
|
39917
|
+
}
|
|
39918
|
+
|
|
39919
|
+
var scope = ImmerScope.enter();
|
|
39920
|
+
var proxy = this.createProxy(base);
|
|
39921
|
+
proxy[DRAFT_STATE].isManual = true;
|
|
39922
|
+
scope.leave();
|
|
39923
|
+
return proxy;
|
|
39924
|
+
};
|
|
39925
|
+
|
|
39926
|
+
Immer.prototype.finishDraft = function finishDraft (draft, patchListener) {
|
|
39927
|
+
var state = draft && draft[DRAFT_STATE];
|
|
39928
|
+
|
|
39929
|
+
if (!state || !state.isManual) {
|
|
39930
|
+
throw new Error("First argument to `finishDraft` must be a draft returned by `createDraft`"); // prettier-ignore
|
|
39931
|
+
}
|
|
39932
|
+
|
|
39933
|
+
if (state.finalized) {
|
|
39934
|
+
throw new Error("The given draft is already finalized"); // prettier-ignore
|
|
39935
|
+
}
|
|
39936
|
+
|
|
39937
|
+
var scope = state.scope;
|
|
39938
|
+
scope.usePatches(patchListener);
|
|
39939
|
+
return this.processResult(undefined, scope);
|
|
39940
|
+
};
|
|
39941
|
+
|
|
39942
|
+
Immer.prototype.setAutoFreeze = function setAutoFreeze (value) {
|
|
39943
|
+
this.autoFreeze = value;
|
|
39944
|
+
};
|
|
39945
|
+
|
|
39946
|
+
Immer.prototype.setUseProxies = function setUseProxies (value) {
|
|
39947
|
+
this.useProxies = value;
|
|
39948
|
+
assign(this, value ? modernProxy : legacyProxy);
|
|
39949
|
+
};
|
|
39950
|
+
|
|
39951
|
+
Immer.prototype.applyPatches = function applyPatches$1 (base, patches) {
|
|
39952
|
+
// If a patch replaces the entire state, take that replacement as base
|
|
39953
|
+
// before applying patches
|
|
39954
|
+
var i;
|
|
39955
|
+
|
|
39956
|
+
for (i = patches.length - 1; i >= 0; i--) {
|
|
39957
|
+
var patch = patches[i];
|
|
39958
|
+
|
|
39959
|
+
if (patch.path.length === 0 && patch.op === "replace") {
|
|
39960
|
+
base = patch.value;
|
|
39961
|
+
break;
|
|
39962
|
+
}
|
|
39963
|
+
}
|
|
39964
|
+
|
|
39965
|
+
if (isDraft(base)) {
|
|
39966
|
+
// N.B: never hits if some patch a replacement, patches are never drafts
|
|
39967
|
+
return applyPatches(base, patches);
|
|
39968
|
+
} // Otherwise, produce a copy of the base state.
|
|
39969
|
+
|
|
39970
|
+
|
|
39971
|
+
return this.produce(base, function (draft) { return applyPatches(draft, patches.slice(i + 1)); });
|
|
39972
|
+
};
|
|
39973
|
+
/** @internal */
|
|
39974
|
+
|
|
39975
|
+
|
|
39976
|
+
Immer.prototype.processResult = function processResult (result, scope) {
|
|
39977
|
+
var baseDraft = scope.drafts[0];
|
|
39978
|
+
var isReplaced = result !== undefined && result !== baseDraft;
|
|
39979
|
+
this.willFinalize(scope, result, isReplaced);
|
|
39980
|
+
|
|
39981
|
+
if (isReplaced) {
|
|
39982
|
+
if (baseDraft[DRAFT_STATE].modified) {
|
|
39983
|
+
scope.revoke();
|
|
39984
|
+
throw new Error("An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."); // prettier-ignore
|
|
39985
|
+
}
|
|
39986
|
+
|
|
39987
|
+
if (isDraftable(result)) {
|
|
39988
|
+
// Finalize the result in case it contains (or is) a subset of the draft.
|
|
39989
|
+
result = this.finalize(result, null, scope);
|
|
39990
|
+
}
|
|
39991
|
+
|
|
39992
|
+
if (scope.patches) {
|
|
39993
|
+
scope.patches.push({
|
|
39994
|
+
op: "replace",
|
|
39995
|
+
path: [],
|
|
39996
|
+
value: result
|
|
39997
|
+
});
|
|
39998
|
+
scope.inversePatches.push({
|
|
39999
|
+
op: "replace",
|
|
40000
|
+
path: [],
|
|
40001
|
+
value: baseDraft[DRAFT_STATE].base
|
|
40002
|
+
});
|
|
40003
|
+
}
|
|
40004
|
+
} else {
|
|
40005
|
+
// Finalize the base draft.
|
|
40006
|
+
result = this.finalize(baseDraft, [], scope);
|
|
40007
|
+
}
|
|
40008
|
+
|
|
40009
|
+
scope.revoke();
|
|
40010
|
+
|
|
40011
|
+
if (scope.patches) {
|
|
40012
|
+
scope.patchListener(scope.patches, scope.inversePatches);
|
|
40013
|
+
}
|
|
40014
|
+
|
|
40015
|
+
return result !== NOTHING ? result : undefined;
|
|
40016
|
+
};
|
|
40017
|
+
/**
|
|
40018
|
+
* @internal
|
|
40019
|
+
* Finalize a draft, returning either the unmodified base state or a modified
|
|
40020
|
+
* copy of the base state.
|
|
40021
|
+
*/
|
|
40022
|
+
|
|
40023
|
+
|
|
40024
|
+
Immer.prototype.finalize = function finalize (draft, path, scope) {
|
|
40025
|
+
var this$1$1 = this;
|
|
40026
|
+
|
|
40027
|
+
var state = draft[DRAFT_STATE];
|
|
40028
|
+
|
|
40029
|
+
if (!state) {
|
|
40030
|
+
if (Object.isFrozen(draft)) { return draft; }
|
|
40031
|
+
return this.finalizeTree(draft, null, scope);
|
|
40032
|
+
} // Never finalize drafts owned by another scope.
|
|
40033
|
+
|
|
40034
|
+
|
|
40035
|
+
if (state.scope !== scope) {
|
|
40036
|
+
return draft;
|
|
40037
|
+
}
|
|
40038
|
+
|
|
40039
|
+
if (!state.modified) {
|
|
40040
|
+
return state.base;
|
|
40041
|
+
}
|
|
40042
|
+
|
|
40043
|
+
if (!state.finalized) {
|
|
40044
|
+
state.finalized = true;
|
|
40045
|
+
this.finalizeTree(state.draft, path, scope);
|
|
40046
|
+
|
|
40047
|
+
if (this.onDelete) {
|
|
40048
|
+
// The `assigned` object is unreliable with ES5 drafts.
|
|
40049
|
+
if (this.useProxies) {
|
|
40050
|
+
var assigned = state.assigned;
|
|
40051
|
+
|
|
40052
|
+
for (var prop in assigned) {
|
|
40053
|
+
if (!assigned[prop]) { this.onDelete(state, prop); }
|
|
40054
|
+
}
|
|
40055
|
+
} else {
|
|
40056
|
+
var base = state.base;
|
|
40057
|
+
var copy = state.copy;
|
|
40058
|
+
each(base, function (prop) {
|
|
40059
|
+
if (!has$1(copy, prop)) { this$1$1.onDelete(state, prop); }
|
|
40060
|
+
});
|
|
40061
|
+
}
|
|
40062
|
+
}
|
|
40063
|
+
|
|
40064
|
+
if (this.onCopy) {
|
|
40065
|
+
this.onCopy(state);
|
|
40066
|
+
} // At this point, all descendants of `state.copy` have been finalized,
|
|
40067
|
+
// so we can be sure that `scope.canAutoFreeze` is accurate.
|
|
40068
|
+
|
|
40069
|
+
|
|
40070
|
+
if (this.autoFreeze && scope.canAutoFreeze) {
|
|
40071
|
+
Object.freeze(state.copy);
|
|
40072
|
+
}
|
|
40073
|
+
|
|
40074
|
+
if (path && scope.patches) {
|
|
40075
|
+
generatePatches(state, path, scope.patches, scope.inversePatches);
|
|
40076
|
+
}
|
|
40077
|
+
}
|
|
40078
|
+
|
|
40079
|
+
return state.copy;
|
|
40080
|
+
};
|
|
40081
|
+
/**
|
|
40082
|
+
* @internal
|
|
40083
|
+
* Finalize all drafts in the given state tree.
|
|
40084
|
+
*/
|
|
40085
|
+
|
|
40086
|
+
|
|
40087
|
+
Immer.prototype.finalizeTree = function finalizeTree (root, rootPath, scope) {
|
|
40088
|
+
var this$1$1 = this;
|
|
40089
|
+
|
|
40090
|
+
var state = root[DRAFT_STATE];
|
|
40091
|
+
|
|
40092
|
+
if (state) {
|
|
40093
|
+
if (!this.useProxies) {
|
|
40094
|
+
// Create the final copy, with added keys and without deleted keys.
|
|
40095
|
+
state.copy = shallowCopy(state.draft, true);
|
|
40096
|
+
}
|
|
40097
|
+
|
|
40098
|
+
root = state.copy;
|
|
40099
|
+
}
|
|
40100
|
+
|
|
40101
|
+
var needPatches = !!rootPath && !!scope.patches;
|
|
40102
|
+
|
|
40103
|
+
var finalizeProperty = function (prop, value, parent) {
|
|
40104
|
+
if (value === parent) {
|
|
40105
|
+
throw Error("Immer forbids circular references");
|
|
40106
|
+
} // In the `finalizeTree` method, only the `root` object may be a draft.
|
|
40107
|
+
|
|
40108
|
+
|
|
40109
|
+
var isDraftProp = !!state && parent === root;
|
|
40110
|
+
|
|
40111
|
+
if (isDraft(value)) {
|
|
40112
|
+
var path = isDraftProp && needPatches && !state.assigned[prop] ? rootPath.concat(prop) : null; // Drafts owned by `scope` are finalized here.
|
|
40113
|
+
|
|
40114
|
+
value = this$1$1.finalize(value, path, scope); // Drafts from another scope must prevent auto-freezing.
|
|
40115
|
+
|
|
40116
|
+
if (isDraft(value)) {
|
|
40117
|
+
scope.canAutoFreeze = false;
|
|
40118
|
+
} // Preserve non-enumerable properties.
|
|
40119
|
+
|
|
40120
|
+
|
|
40121
|
+
if (Array.isArray(parent) || isEnumerable(parent, prop)) {
|
|
40122
|
+
parent[prop] = value;
|
|
40123
|
+
} else {
|
|
40124
|
+
Object.defineProperty(parent, prop, {
|
|
40125
|
+
value: value
|
|
40126
|
+
});
|
|
40127
|
+
} // Unchanged drafts are never passed to the `onAssign` hook.
|
|
40128
|
+
|
|
40129
|
+
|
|
40130
|
+
if (isDraftProp && value === state.base[prop]) { return; }
|
|
40131
|
+
} // Unchanged draft properties are ignored.
|
|
40132
|
+
else if (isDraftProp && is(value, state.base[prop])) {
|
|
40133
|
+
return;
|
|
40134
|
+
} // Search new objects for unfinalized drafts. Frozen objects should never contain drafts.
|
|
40135
|
+
else if (isDraftable(value) && !Object.isFrozen(value)) {
|
|
40136
|
+
each(value, finalizeProperty);
|
|
40137
|
+
}
|
|
40138
|
+
|
|
40139
|
+
if (isDraftProp && this$1$1.onAssign) {
|
|
40140
|
+
this$1$1.onAssign(state, prop, value);
|
|
40141
|
+
}
|
|
40142
|
+
};
|
|
40143
|
+
|
|
40144
|
+
each(root, finalizeProperty);
|
|
40145
|
+
return root;
|
|
40146
|
+
};
|
|
40147
|
+
|
|
40148
|
+
var immer = new Immer();
|
|
40149
|
+
/**
|
|
40150
|
+
* The `produce` function takes a value and a "recipe function" (whose
|
|
40151
|
+
* return value often depends on the base state). The recipe function is
|
|
40152
|
+
* free to mutate its first argument however it wants. All mutations are
|
|
40153
|
+
* only ever applied to a __copy__ of the base state.
|
|
40154
|
+
*
|
|
40155
|
+
* Pass only a function to create a "curried producer" which relieves you
|
|
40156
|
+
* from passing the recipe function every time.
|
|
40157
|
+
*
|
|
40158
|
+
* Only plain objects and arrays are made mutable. All other objects are
|
|
40159
|
+
* considered uncopyable.
|
|
40160
|
+
*
|
|
40161
|
+
* Note: This function is __bound__ to its `Immer` instance.
|
|
40162
|
+
*
|
|
40163
|
+
* @param {any} base - the initial state
|
|
40164
|
+
* @param {Function} producer - function that receives a proxy of the base state as first argument and which can be freely modified
|
|
40165
|
+
* @param {Function} patchListener - optional function that will be called with all the patches produced here
|
|
40166
|
+
* @returns {any} a new state, or the initial state if nothing was modified
|
|
40167
|
+
*/
|
|
40168
|
+
|
|
40169
|
+
var produce = immer.produce;
|
|
40170
|
+
/**
|
|
40171
|
+
* Like `produce`, but `produceWithPatches` always returns a tuple
|
|
40172
|
+
* [nextState, patches, inversePatches] (instead of just the next state)
|
|
40173
|
+
*/
|
|
40174
|
+
|
|
40175
|
+
immer.produceWithPatches.bind(immer);
|
|
40176
|
+
/**
|
|
40177
|
+
* Pass true to automatically freeze all copies created by Immer.
|
|
40178
|
+
*
|
|
40179
|
+
* By default, auto-freezing is disabled in production.
|
|
40180
|
+
*/
|
|
40181
|
+
|
|
40182
|
+
immer.setAutoFreeze.bind(immer);
|
|
40183
|
+
/**
|
|
40184
|
+
* Pass true to use the ES2015 `Proxy` class when creating drafts, which is
|
|
40185
|
+
* always faster than using ES5 proxies.
|
|
40186
|
+
*
|
|
40187
|
+
* By default, feature detection is used, so calling this is rarely necessary.
|
|
40188
|
+
*/
|
|
40189
|
+
|
|
40190
|
+
immer.setUseProxies.bind(immer);
|
|
40191
|
+
/**
|
|
40192
|
+
* Apply an array of Immer patches to the first argument.
|
|
40193
|
+
*
|
|
40194
|
+
* This function is a producer, which means copy-on-write is in effect.
|
|
40195
|
+
*/
|
|
40196
|
+
|
|
40197
|
+
immer.applyPatches.bind(immer);
|
|
40198
|
+
/**
|
|
40199
|
+
* Create an Immer draft from the given base state, which may be a draft itself.
|
|
40200
|
+
* The draft can be modified until you finalize it with the `finishDraft` function.
|
|
40201
|
+
*/
|
|
40202
|
+
|
|
40203
|
+
immer.createDraft.bind(immer);
|
|
40204
|
+
/**
|
|
40205
|
+
* Finalize an Immer draft from a `createDraft` call, returning the base state
|
|
40206
|
+
* (if no changes were made) or a modified copy. The draft must *not* be
|
|
40207
|
+
* mutated afterwards.
|
|
40208
|
+
*
|
|
40209
|
+
* Pass a function as the 2nd argument to generate Immer patches based on the
|
|
40210
|
+
* changes that were made.
|
|
40211
|
+
*/
|
|
40212
|
+
|
|
40213
|
+
immer.finishDraft.bind(immer);
|
|
40214
|
+
|
|
40215
|
+
const createInitialState = formConfig => {
|
|
40216
|
+
let initialForm = {};
|
|
40217
|
+
const formConfigKeys = Object.keys(formConfig);
|
|
40218
|
+
for (let formKey of formConfigKeys) {
|
|
40219
|
+
initialForm[formKey] = {
|
|
40220
|
+
dirty: false,
|
|
40221
|
+
rawValue: formConfig[formKey].defaultValue || "",
|
|
40222
|
+
validators: formConfig[formKey].validators || [],
|
|
40223
|
+
constraints: formConfig[formKey].constraints || []
|
|
40224
|
+
};
|
|
40225
|
+
}
|
|
40226
|
+
// Because validators require the entire form we have to do a
|
|
40227
|
+
// second pass to add errors once the initial form has been
|
|
40228
|
+
// constructed
|
|
40229
|
+
for (let formKey of formConfigKeys) {
|
|
40230
|
+
let errors = computeErrors(formKey, initialForm);
|
|
40231
|
+
initialForm[formKey].errors = errors;
|
|
40232
|
+
initialForm[formKey].hasErrors = errors.length > 0;
|
|
40233
|
+
}
|
|
40234
|
+
return initialForm;
|
|
40235
|
+
};
|
|
40236
|
+
|
|
40237
|
+
const SET = "field/SET";
|
|
40238
|
+
const set$2 = fieldName => value => ({
|
|
40239
|
+
type: SET,
|
|
40240
|
+
payload: { fieldName, value }
|
|
40241
|
+
});
|
|
40242
|
+
|
|
40243
|
+
const CLEAR = "form/CLEAR";
|
|
40244
|
+
const clear = () => ({ type: CLEAR });
|
|
40245
|
+
|
|
40246
|
+
const ADD_VALIDATOR = "field/ADD_VALIDATOR";
|
|
40247
|
+
const addValidator = fieldName => validator => ({
|
|
40248
|
+
type: ADD_VALIDATOR,
|
|
40249
|
+
payload: { fieldName, validator }
|
|
40250
|
+
});
|
|
40251
|
+
|
|
40252
|
+
const createFormReducer = formConfig => (
|
|
40253
|
+
state = createInitialState(formConfig),
|
|
40254
|
+
action
|
|
40255
|
+
) => {
|
|
40256
|
+
switch (action.type) {
|
|
40257
|
+
case SET:
|
|
40258
|
+
const changedFieldName = action.payload.fieldName;
|
|
40259
|
+
const newRawValue = action.payload.value;
|
|
40260
|
+
|
|
40261
|
+
return produce(state, draftState => {
|
|
40262
|
+
let originalValue = draftState[changedFieldName].rawValue;
|
|
40263
|
+
draftState[changedFieldName].rawValue = newRawValue;
|
|
40264
|
+
if (computeConstraints(changedFieldName, draftState).length > 0) {
|
|
40265
|
+
// If the change violates constraints, revert the change
|
|
40266
|
+
draftState[changedFieldName].rawValue = originalValue;
|
|
40267
|
+
return draftState;
|
|
40268
|
+
}
|
|
40269
|
+
|
|
40270
|
+
const fields = Object.entries(draftState);
|
|
40271
|
+
for (let entry of fields) {
|
|
40272
|
+
let fieldName = entry[0];
|
|
40273
|
+
let field = entry[1];
|
|
40274
|
+
let errors = computeErrors(fieldName, draftState);
|
|
40275
|
+
let dirty = fieldName === changedFieldName ? true : field.dirty;
|
|
40276
|
+
draftState[fieldName].errors = errors;
|
|
40277
|
+
draftState[fieldName].dirty = dirty;
|
|
40278
|
+
draftState[fieldName].hasErrors = errors.length > 0;
|
|
40279
|
+
}
|
|
40280
|
+
});
|
|
40281
|
+
case CLEAR:
|
|
40282
|
+
return createInitialState(formConfig);
|
|
40283
|
+
case ADD_VALIDATOR:
|
|
40284
|
+
const fieldWithOverride = action.payload.fieldName;
|
|
40285
|
+
const newValidator = action.payload.validator;
|
|
40286
|
+
|
|
40287
|
+
return produce(state, draftState => {
|
|
40288
|
+
draftState[fieldWithOverride].validators.push(newValidator);
|
|
40289
|
+
const fields = Object.entries(draftState);
|
|
40290
|
+
for (let entry of fields) {
|
|
40291
|
+
let fieldName = entry[0];
|
|
40292
|
+
let field = entry[1];
|
|
40293
|
+
let errors = computeErrors(fieldName, draftState);
|
|
40294
|
+
let dirty = field.dirty;
|
|
40295
|
+
draftState[fieldName].errors = errors;
|
|
40296
|
+
draftState[fieldName].dirty = dirty;
|
|
40297
|
+
draftState[fieldName].hasErrors = errors.length > 0;
|
|
40298
|
+
}
|
|
40299
|
+
});
|
|
40300
|
+
default:
|
|
40301
|
+
return state;
|
|
40302
|
+
}
|
|
40303
|
+
};
|
|
40304
|
+
|
|
40305
|
+
const createMapDispatchToProps = formConfig => {
|
|
40306
|
+
// Do memo-ization
|
|
40307
|
+
let cachedDispatch;
|
|
40308
|
+
let cacheValue;
|
|
40309
|
+
return dispatch => {
|
|
40310
|
+
if (dispatch == cachedDispatch) {
|
|
40311
|
+
return cacheValue;
|
|
40312
|
+
}
|
|
40313
|
+
let dispatchObj = {};
|
|
40314
|
+
dispatchObj.fields = {};
|
|
40315
|
+
const keys = Object.keys(formConfig);
|
|
40316
|
+
for (let fieldName of keys) {
|
|
40317
|
+
dispatchObj.fields[fieldName] = {
|
|
40318
|
+
set: value => dispatch(set$2(fieldName)(value)),
|
|
40319
|
+
addValidator: validator => dispatch(addValidator(fieldName)(validator))
|
|
40320
|
+
};
|
|
40321
|
+
}
|
|
40322
|
+
dispatchObj.form = { clear: () => dispatch(clear()) };
|
|
40323
|
+
cachedDispatch = dispatch;
|
|
40324
|
+
cacheValue = { actions: dispatchObj };
|
|
40325
|
+
return cacheValue;
|
|
40326
|
+
};
|
|
40327
|
+
};
|
|
40328
|
+
|
|
40329
|
+
const mapStateToProps = state => ({ fields: state });
|
|
40330
|
+
|
|
40331
|
+
const createFormState = formConfig => ({
|
|
40332
|
+
reducer: createFormReducer(formConfig),
|
|
40333
|
+
mapDispatchToProps: createMapDispatchToProps(formConfig),
|
|
40334
|
+
mapStateToProps: mapStateToProps
|
|
40335
|
+
});
|
|
40336
|
+
|
|
40337
|
+
var AddressForm = function AddressForm(_ref) {
|
|
40338
|
+
var _zipErrorMessages;
|
|
40339
|
+
|
|
40340
|
+
var _ref$variant = _ref.variant,
|
|
40341
|
+
variant = _ref$variant === void 0 ? "default" : _ref$variant,
|
|
40342
|
+
fields = _ref.fields,
|
|
40343
|
+
actions = _ref.actions,
|
|
40344
|
+
clearOnDismount = _ref.clearOnDismount,
|
|
40345
|
+
showErrors = _ref.showErrors,
|
|
40346
|
+
_ref$handleSubmit = _ref.handleSubmit,
|
|
40347
|
+
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
40348
|
+
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
40349
|
+
saveToWallet = _ref.saveToWallet,
|
|
40350
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked;
|
|
40351
|
+
|
|
40352
|
+
if (clearOnDismount) {
|
|
40353
|
+
React.useEffect(function () {
|
|
40354
|
+
return function () {
|
|
40355
|
+
return actions.form.clear();
|
|
40356
|
+
};
|
|
40357
|
+
}, []);
|
|
40358
|
+
}
|
|
40359
|
+
|
|
40360
|
+
var street1ErrorMessages = _defineProperty({}, required.error, "Street is required");
|
|
40361
|
+
|
|
40362
|
+
var cityErrorMessages = _defineProperty({}, required.error, "City is required");
|
|
40363
|
+
|
|
40364
|
+
var zipErrorMessages = (_zipErrorMessages = {}, _defineProperty(_zipErrorMessages, required.error, "Zip code is required"), _defineProperty(_zipErrorMessages, hasLength.error, "Zip code must be 5 or 9 digits"), _zipErrorMessages);
|
|
40365
|
+
|
|
40366
|
+
var stateProvinceErrorMessages = _defineProperty({}, required.error, "State or Province is required");
|
|
40367
|
+
|
|
40368
|
+
var countryErrorMessages = _defineProperty({}, required.error, "Country is required");
|
|
40369
|
+
|
|
40370
|
+
var isUS = fields.country.rawValue === "US";
|
|
40371
|
+
return /*#__PURE__*/React__default.createElement(FormContainer$1, {
|
|
40372
|
+
variant: variant,
|
|
40373
|
+
role: "form",
|
|
40374
|
+
"aria-label": "Address"
|
|
40375
|
+
}, /*#__PURE__*/React__default.createElement(FormInputColumn, null, /*#__PURE__*/React__default.createElement(CountryDropdown, {
|
|
40376
|
+
labelTextWhenNoError: "Country",
|
|
40377
|
+
errorMessages: countryErrorMessages,
|
|
40378
|
+
field: fields.country,
|
|
40379
|
+
onChange: function onChange(value) {
|
|
40380
|
+
actions.fields.country.set(value); // temporary measure to not dirty fields until
|
|
40381
|
+
// we can write a reset function for fields
|
|
40382
|
+
|
|
40383
|
+
if (fields.stateProvince.rawValue) {
|
|
40384
|
+
actions.fields.stateProvince.set("");
|
|
40385
|
+
}
|
|
40386
|
+
|
|
40387
|
+
if (fields.zip.rawValue) {
|
|
40388
|
+
actions.fields.zip.set("");
|
|
39274
40389
|
}
|
|
39275
40390
|
},
|
|
39276
40391
|
showErrors: showErrors
|
|
@@ -42070,12 +43185,12 @@ LoginForm.mapDispatchToProps = mapDispatchToProps$5;
|
|
|
42070
43185
|
* This source code is licensed under the MIT license found in the
|
|
42071
43186
|
* LICENSE file in the root directory of this source tree.
|
|
42072
43187
|
*/
|
|
42073
|
-
var b$
|
|
42074
|
-
Symbol.for("react.suspense_list"):60120,r
|
|
42075
|
-
function z
|
|
42076
|
-
var Profiler=g
|
|
42077
|
-
var isMemo=function(a){return z
|
|
42078
|
-
var isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g
|
|
43188
|
+
var b$1="function"===typeof Symbol&&Symbol.for,c$1=b$1?Symbol.for("react.element"):60103,d=b$1?Symbol.for("react.portal"):60106,e=b$1?Symbol.for("react.fragment"):60107,f$6=b$1?Symbol.for("react.strict_mode"):60108,g=b$1?Symbol.for("react.profiler"):60114,h=b$1?Symbol.for("react.provider"):60109,k=b$1?Symbol.for("react.context"):60110,l=b$1?Symbol.for("react.async_mode"):60111,m=b$1?Symbol.for("react.concurrent_mode"):60111,n=b$1?Symbol.for("react.forward_ref"):60112,p=b$1?Symbol.for("react.suspense"):60113,q=b$1?
|
|
43189
|
+
Symbol.for("react.suspense_list"):60120,r=b$1?Symbol.for("react.memo"):60115,t=b$1?Symbol.for("react.lazy"):60116,v=b$1?Symbol.for("react.block"):60121,w=b$1?Symbol.for("react.fundamental"):60117,x=b$1?Symbol.for("react.responder"):60118,y=b$1?Symbol.for("react.scope"):60119;
|
|
43190
|
+
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c$1:switch(a=a.type,a){case l:case m:case e:case g:case f$6:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}var AsyncMode=l;var ConcurrentMode=m;var ContextConsumer=k;var ContextProvider=h;var Element$1=c$1;var ForwardRef=n;var Fragment=e;var Lazy=t;var Memo=r;var Portal=d;
|
|
43191
|
+
var Profiler=g;var StrictMode=f$6;var Suspense=p;var isAsyncMode=function(a){return A(a)||z(a)===l};var isConcurrentMode=A;var isContextConsumer=function(a){return z(a)===k};var isContextProvider=function(a){return z(a)===h};var isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c$1};var isForwardRef=function(a){return z(a)===n};var isFragment=function(a){return z(a)===e};var isLazy=function(a){return z(a)===t};
|
|
43192
|
+
var isMemo=function(a){return z(a)===r};var isPortal=function(a){return z(a)===d};var isProfiler=function(a){return z(a)===g};var isStrictMode=function(a){return z(a)===f$6};var isSuspense=function(a){return z(a)===p};
|
|
43193
|
+
var isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f$6||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};var typeOf=z;
|
|
42079
43194
|
|
|
42080
43195
|
var reactIs_production_min = {
|
|
42081
43196
|
AsyncMode: AsyncMode,
|
|
@@ -42446,14 +43561,14 @@ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
|
42446
43561
|
|
|
42447
43562
|
var ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
42448
43563
|
|
|
42449
|
-
var has$
|
|
43564
|
+
var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
42450
43565
|
|
|
42451
43566
|
var printWarning = function() {};
|
|
42452
43567
|
|
|
42453
43568
|
if (process.env.NODE_ENV !== 'production') {
|
|
42454
43569
|
var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
|
|
42455
43570
|
var loggedTypeFailures = {};
|
|
42456
|
-
var has$
|
|
43571
|
+
var has$3 = has$2;
|
|
42457
43572
|
|
|
42458
43573
|
printWarning = function(text) {
|
|
42459
43574
|
var message = 'Warning: ' + text;
|
|
@@ -42483,7 +43598,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
42483
43598
|
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
42484
43599
|
if (process.env.NODE_ENV !== 'production') {
|
|
42485
43600
|
for (var typeSpecName in typeSpecs) {
|
|
42486
|
-
if (has$
|
|
43601
|
+
if (has$3(typeSpecs, typeSpecName)) {
|
|
42487
43602
|
var error;
|
|
42488
43603
|
// Prop type validation may throw. In case they do, we don't want to
|
|
42489
43604
|
// fail the render phase where it didn't fail before. So we log it.
|
|
@@ -42882,7 +43997,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
42882
43997
|
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
42883
43998
|
}
|
|
42884
43999
|
for (var key in propValue) {
|
|
42885
|
-
if (has$
|
|
44000
|
+
if (has$2(propValue, key)) {
|
|
42886
44001
|
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
|
|
42887
44002
|
if (error instanceof Error) {
|
|
42888
44003
|
return error;
|
|
@@ -42919,7 +44034,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
42919
44034
|
if (checkerResult == null) {
|
|
42920
44035
|
return null;
|
|
42921
44036
|
}
|
|
42922
|
-
if (checkerResult.data && has$
|
|
44037
|
+
if (checkerResult.data && has$2(checkerResult.data, 'expectedType')) {
|
|
42923
44038
|
expectedTypes.push(checkerResult.data.expectedType);
|
|
42924
44039
|
}
|
|
42925
44040
|
}
|
|
@@ -42979,7 +44094,7 @@ var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
|
42979
44094
|
var allKeys = objectAssign({}, props[propName], shapeTypes);
|
|
42980
44095
|
for (var key in allKeys) {
|
|
42981
44096
|
var checker = shapeTypes[key];
|
|
42982
|
-
if (has$
|
|
44097
|
+
if (has$2(shapeTypes, key) && typeof checker !== 'function') {
|
|
42983
44098
|
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
42984
44099
|
}
|
|
42985
44100
|
if (!checker) {
|
|
@@ -43717,7 +44832,7 @@ var index_esm = /*#__PURE__*/Object.freeze({
|
|
|
43717
44832
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
43718
44833
|
*/
|
|
43719
44834
|
|
|
43720
|
-
function ownKeys$
|
|
44835
|
+
function ownKeys$3(object, enumerableOnly) {
|
|
43721
44836
|
var keys = Object.keys(object);
|
|
43722
44837
|
|
|
43723
44838
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -43733,9 +44848,9 @@ function ownKeys$2(object, enumerableOnly) {
|
|
|
43733
44848
|
function _objectSpread2$1(target) {
|
|
43734
44849
|
for (var i = 1; i < arguments.length; i++) {
|
|
43735
44850
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
43736
|
-
i % 2 ? ownKeys$
|
|
44851
|
+
i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) {
|
|
43737
44852
|
_defineProperty$1(target, key, source[key]);
|
|
43738
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$
|
|
44853
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) {
|
|
43739
44854
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
43740
44855
|
});
|
|
43741
44856
|
}
|
|
@@ -46703,7 +47818,24 @@ var createPartialAmountFormState = function createPartialAmountFormState(lineIte
|
|
|
46703
47818
|
var minimum = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
46704
47819
|
var blockPartialPaymentOverpay = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
46705
47820
|
var formConfig = lineItems.reduce(function (acc, item) {
|
|
46706
|
-
var validators =
|
|
47821
|
+
var validators = [required(), validateSum(numberGreaterThanOrEqualTo(minimum), lineItems.filter(function (lineItem) {
|
|
47822
|
+
return lineItem != item;
|
|
47823
|
+
}).reduce(function (acc, curr) {
|
|
47824
|
+
return [].concat(_toConsumableArray(acc), [curr.id]);
|
|
47825
|
+
}, []))];
|
|
47826
|
+
|
|
47827
|
+
if (!!maximum) {
|
|
47828
|
+
validators.push(validateSum(numberLessThanOrEqualTo(maximum), lineItems.filter(function (lineItem) {
|
|
47829
|
+
return lineItem != item;
|
|
47830
|
+
}).reduce(function (acc, curr) {
|
|
47831
|
+
return [].concat(_toConsumableArray(acc), [curr.id]);
|
|
47832
|
+
}, [])));
|
|
47833
|
+
}
|
|
47834
|
+
|
|
47835
|
+
if (blockPartialPaymentOverpay) {
|
|
47836
|
+
validators.push(numberLessThanOrEqualTo(item.amount));
|
|
47837
|
+
}
|
|
47838
|
+
|
|
46707
47839
|
return _objectSpread2(_objectSpread2({}, acc), {}, _defineProperty({}, item.id, {
|
|
46708
47840
|
validators: validators,
|
|
46709
47841
|
constraints: [onlyNaturals()],
|
|
@@ -46722,29 +47854,6 @@ var createPartialAmountFormState = function createPartialAmountFormState(lineIte
|
|
|
46722
47854
|
partialAmountFormMapDispatchToProps: mapDispatchToProps
|
|
46723
47855
|
};
|
|
46724
47856
|
};
|
|
46725
|
-
var createPartialAmountFormValidators = function createPartialAmountFormValidators(item, lineItems, maximum) {
|
|
46726
|
-
var minimum = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
46727
|
-
var blockPartialPaymentOverpay = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
46728
|
-
var validators = [required(), validateSum(numberGreaterThanOrEqualTo(minimum), lineItems.filter(function (lineItem) {
|
|
46729
|
-
return lineItem != item;
|
|
46730
|
-
}).reduce(function (acc, curr) {
|
|
46731
|
-
return [].concat(_toConsumableArray(acc), [curr.id]);
|
|
46732
|
-
}, []))];
|
|
46733
|
-
|
|
46734
|
-
if (!!maximum) {
|
|
46735
|
-
validators.push(validateSum(numberLessThanOrEqualTo(maximum), lineItems.filter(function (lineItem) {
|
|
46736
|
-
return lineItem != item;
|
|
46737
|
-
}).reduce(function (acc, curr) {
|
|
46738
|
-
return [].concat(_toConsumableArray(acc), [curr.id]);
|
|
46739
|
-
}, [])));
|
|
46740
|
-
}
|
|
46741
|
-
|
|
46742
|
-
if (blockPartialPaymentOverpay) {
|
|
46743
|
-
validators.push(numberLessThanOrEqualTo(item.amount));
|
|
46744
|
-
}
|
|
46745
|
-
|
|
46746
|
-
return validators;
|
|
46747
|
-
};
|
|
46748
47857
|
|
|
46749
47858
|
var arrowColor = WHITE;
|
|
46750
47859
|
var numberColor = MATISSE_BLUE;
|
|
@@ -47123,22 +48232,54 @@ var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
|
|
|
47123
48232
|
var LoadingDetails = function LoadingDetails() {
|
|
47124
48233
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
47125
48234
|
padding: "0",
|
|
47126
|
-
background: GRECIAN_GREY,
|
|
47127
|
-
borderRadius: "4px",
|
|
47128
48235
|
minHeight: "196px"
|
|
47129
|
-
}, /*#__PURE__*/React__default.createElement(Cover, {
|
|
47130
|
-
minHeight: "196px",
|
|
47131
|
-
singleChild: true,
|
|
47132
|
-
fillCenter: true
|
|
47133
|
-
}, /*#__PURE__*/React__default.createElement(Center, {
|
|
47134
|
-
intrinsic: true
|
|
47135
48236
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
47136
48237
|
padding: "0",
|
|
47137
|
-
extraStyles: "
|
|
48238
|
+
extraStyles: "position: absolute;\n height: 238px;\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;"
|
|
47138
48239
|
}, /*#__PURE__*/React__default.createElement(Spinner$2, {
|
|
47139
48240
|
size: "100",
|
|
47140
48241
|
centerSpinner: true
|
|
47141
|
-
}))
|
|
48242
|
+
})), /*#__PURE__*/React__default.createElement(Stack, {
|
|
48243
|
+
childGap: "16px"
|
|
48244
|
+
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48245
|
+
nowrap: true,
|
|
48246
|
+
justify: "space-between",
|
|
48247
|
+
align: "start"
|
|
48248
|
+
}, /*#__PURE__*/React__default.createElement(LoadingLine, {
|
|
48249
|
+
exactWidth: "110px",
|
|
48250
|
+
height: "27px"
|
|
48251
|
+
}), /*#__PURE__*/React__default.createElement(LoadingLine, {
|
|
48252
|
+
exactWidth: "60px",
|
|
48253
|
+
height: "27px"
|
|
48254
|
+
})), /*#__PURE__*/React__default.createElement(SolidDivider$1, null), /*#__PURE__*/React__default.createElement(Box, {
|
|
48255
|
+
padding: "0.5rem 0"
|
|
48256
|
+
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48257
|
+
direction: "row"
|
|
48258
|
+
}, /*#__PURE__*/React__default.createElement(LoadingLine, {
|
|
48259
|
+
exactWidth: "80px",
|
|
48260
|
+
height: "27px"
|
|
48261
|
+
}), /*#__PURE__*/React__default.createElement(LoadingLine, {
|
|
48262
|
+
exactWidth: "60px",
|
|
48263
|
+
height: "27px"
|
|
48264
|
+
})), /*#__PURE__*/React__default.createElement(Box, {
|
|
48265
|
+
padding: "4px 0"
|
|
48266
|
+
}), /*#__PURE__*/React__default.createElement(Stack, {
|
|
48267
|
+
direction: "row"
|
|
48268
|
+
}, /*#__PURE__*/React__default.createElement(LoadingLine, {
|
|
48269
|
+
exactWidth: "160px",
|
|
48270
|
+
height: "27px"
|
|
48271
|
+
}), /*#__PURE__*/React__default.createElement(LoadingLine, {
|
|
48272
|
+
exactWidth: "50px",
|
|
48273
|
+
height: "27px"
|
|
48274
|
+
}))), /*#__PURE__*/React__default.createElement(SolidDivider$1, null), /*#__PURE__*/React__default.createElement(Stack, {
|
|
48275
|
+
direction: "row"
|
|
48276
|
+
}, /*#__PURE__*/React__default.createElement(LoadingLine, {
|
|
48277
|
+
exactWidth: "100px",
|
|
48278
|
+
height: "30px"
|
|
48279
|
+
}), /*#__PURE__*/React__default.createElement(LoadingLine, {
|
|
48280
|
+
exactWidth: "70px",
|
|
48281
|
+
height: "30px"
|
|
48282
|
+
}))));
|
|
47142
48283
|
};
|
|
47143
48284
|
|
|
47144
48285
|
var ErrorDetails = function ErrorDetails() {
|
|
@@ -49584,7 +50725,6 @@ exports.XCircleIconSmall = XCircleIconSmall;
|
|
|
49584
50725
|
exports.cardRegistry = cardRegistry;
|
|
49585
50726
|
exports.constants = index$5;
|
|
49586
50727
|
exports.createPartialAmountFormState = createPartialAmountFormState;
|
|
49587
|
-
exports.createPartialAmountFormValidators = createPartialAmountFormValidators;
|
|
49588
50728
|
exports.util = index$4;
|
|
49589
50729
|
exports.withWindowSize = withWindowSize;
|
|
49590
50730
|
//# sourceMappingURL=index.cjs.js.map
|