@thecb/components 8.4.8-beta.0 → 8.4.8-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +549 -1436
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +549 -1436
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/solid-divider/SolidDivider.js +4 -4
- package/src/components/molecules/radio-section/RadioSection.js +113 -121
package/dist/index.cjs.js
CHANGED
|
@@ -203,63 +203,6 @@ function _nonIterableRest() {
|
|
|
203
203
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
207
|
-
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
208
|
-
|
|
209
|
-
if (!it) {
|
|
210
|
-
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
211
|
-
if (it) o = it;
|
|
212
|
-
var i = 0;
|
|
213
|
-
|
|
214
|
-
var F = function () {};
|
|
215
|
-
|
|
216
|
-
return {
|
|
217
|
-
s: F,
|
|
218
|
-
n: function () {
|
|
219
|
-
if (i >= o.length) return {
|
|
220
|
-
done: true
|
|
221
|
-
};
|
|
222
|
-
return {
|
|
223
|
-
done: false,
|
|
224
|
-
value: o[i++]
|
|
225
|
-
};
|
|
226
|
-
},
|
|
227
|
-
e: function (e) {
|
|
228
|
-
throw e;
|
|
229
|
-
},
|
|
230
|
-
f: F
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
var normalCompletion = true,
|
|
238
|
-
didErr = false,
|
|
239
|
-
err;
|
|
240
|
-
return {
|
|
241
|
-
s: function () {
|
|
242
|
-
it = it.call(o);
|
|
243
|
-
},
|
|
244
|
-
n: function () {
|
|
245
|
-
var step = it.next();
|
|
246
|
-
normalCompletion = step.done;
|
|
247
|
-
return step;
|
|
248
|
-
},
|
|
249
|
-
e: function (e) {
|
|
250
|
-
didErr = true;
|
|
251
|
-
err = e;
|
|
252
|
-
},
|
|
253
|
-
f: function () {
|
|
254
|
-
try {
|
|
255
|
-
if (!normalCompletion && it.return != null) it.return();
|
|
256
|
-
} finally {
|
|
257
|
-
if (didErr) throw err;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
|
|
263
206
|
/*! *****************************************************************************
|
|
264
207
|
Copyright (c) Microsoft Corporation.
|
|
265
208
|
|
|
@@ -19073,14 +19016,12 @@ function _extends$1() {
|
|
|
19073
19016
|
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
19074
19017
|
for (var i = 1; i < arguments.length; i++) {
|
|
19075
19018
|
var source = arguments[i];
|
|
19076
|
-
|
|
19077
19019
|
for (var key in source) {
|
|
19078
19020
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
19079
19021
|
target[key] = source[key];
|
|
19080
19022
|
}
|
|
19081
19023
|
}
|
|
19082
19024
|
}
|
|
19083
|
-
|
|
19084
19025
|
return target;
|
|
19085
19026
|
};
|
|
19086
19027
|
return _extends$1.apply(this, arguments);
|
|
@@ -19090,7 +19031,6 @@ function _assertThisInitialized(self) {
|
|
|
19090
19031
|
if (self === void 0) {
|
|
19091
19032
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
19092
19033
|
}
|
|
19093
|
-
|
|
19094
19034
|
return self;
|
|
19095
19035
|
}
|
|
19096
19036
|
|
|
@@ -19123,7 +19063,6 @@ function _isNativeReflectConstruct() {
|
|
|
19123
19063
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
19124
19064
|
if (Reflect.construct.sham) return false;
|
|
19125
19065
|
if (typeof Proxy === "function") return true;
|
|
19126
|
-
|
|
19127
19066
|
try {
|
|
19128
19067
|
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
19129
19068
|
return true;
|
|
@@ -19145,30 +19084,23 @@ function _construct(Parent, args, Class) {
|
|
|
19145
19084
|
return instance;
|
|
19146
19085
|
};
|
|
19147
19086
|
}
|
|
19148
|
-
|
|
19149
19087
|
return _construct.apply(null, arguments);
|
|
19150
19088
|
}
|
|
19151
19089
|
|
|
19152
19090
|
function _wrapNativeSuper(Class) {
|
|
19153
19091
|
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
19154
|
-
|
|
19155
19092
|
_wrapNativeSuper = function _wrapNativeSuper(Class) {
|
|
19156
19093
|
if (Class === null || !_isNativeFunction(Class)) return Class;
|
|
19157
|
-
|
|
19158
19094
|
if (typeof Class !== "function") {
|
|
19159
19095
|
throw new TypeError("Super expression must either be null or a function");
|
|
19160
19096
|
}
|
|
19161
|
-
|
|
19162
19097
|
if (typeof _cache !== "undefined") {
|
|
19163
19098
|
if (_cache.has(Class)) return _cache.get(Class);
|
|
19164
|
-
|
|
19165
19099
|
_cache.set(Class, Wrapper);
|
|
19166
19100
|
}
|
|
19167
|
-
|
|
19168
19101
|
function Wrapper() {
|
|
19169
19102
|
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
|
|
19170
19103
|
}
|
|
19171
|
-
|
|
19172
19104
|
Wrapper.prototype = Object.create(Class.prototype, {
|
|
19173
19105
|
constructor: {
|
|
19174
19106
|
value: Wrapper,
|
|
@@ -19179,7 +19111,6 @@ function _wrapNativeSuper(Class) {
|
|
|
19179
19111
|
});
|
|
19180
19112
|
return _setPrototypeOf(Wrapper, Class);
|
|
19181
19113
|
};
|
|
19182
|
-
|
|
19183
19114
|
return _wrapNativeSuper(Class);
|
|
19184
19115
|
}
|
|
19185
19116
|
|
|
@@ -22529,26 +22460,19 @@ var FunctionPrototype = Function.prototype;
|
|
|
22529
22460
|
var call$1 = FunctionPrototype.call;
|
|
22530
22461
|
var uncurryThisWithBind = functionBindNative && FunctionPrototype.bind.bind(call$1, call$1);
|
|
22531
22462
|
|
|
22532
|
-
var
|
|
22533
|
-
return
|
|
22463
|
+
var functionUncurryThis = functionBindNative ? uncurryThisWithBind : function (fn) {
|
|
22464
|
+
return function () {
|
|
22534
22465
|
return call$1.apply(fn, arguments);
|
|
22535
22466
|
};
|
|
22536
22467
|
};
|
|
22537
22468
|
|
|
22538
|
-
var toString$2 =
|
|
22539
|
-
var stringSlice =
|
|
22469
|
+
var toString$2 = functionUncurryThis({}.toString);
|
|
22470
|
+
var stringSlice = functionUncurryThis(''.slice);
|
|
22540
22471
|
|
|
22541
22472
|
var classofRaw = function (it) {
|
|
22542
22473
|
return stringSlice(toString$2(it), 8, -1);
|
|
22543
22474
|
};
|
|
22544
22475
|
|
|
22545
|
-
var functionUncurryThis = function (fn) {
|
|
22546
|
-
// Nashorn bug:
|
|
22547
|
-
// https://github.com/zloirock/core-js/issues/1128
|
|
22548
|
-
// https://github.com/zloirock/core-js/issues/1130
|
|
22549
|
-
if (classofRaw(fn) === 'Function') return functionUncurryThisRaw(fn);
|
|
22550
|
-
};
|
|
22551
|
-
|
|
22552
22476
|
var $Object = Object;
|
|
22553
22477
|
var split = functionUncurryThis(''.split);
|
|
22554
22478
|
|
|
@@ -22587,6 +22511,7 @@ var toIndexedObject = function (it) {
|
|
|
22587
22511
|
var documentAll = typeof document == 'object' && document.all;
|
|
22588
22512
|
|
|
22589
22513
|
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
22514
|
+
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
22590
22515
|
var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;
|
|
22591
22516
|
|
|
22592
22517
|
var documentAll_1 = {
|
|
@@ -22622,7 +22547,7 @@ var getBuiltIn = function (namespace, method) {
|
|
|
22622
22547
|
|
|
22623
22548
|
var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
|
|
22624
22549
|
|
|
22625
|
-
var engineUserAgent =
|
|
22550
|
+
var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
|
|
22626
22551
|
|
|
22627
22552
|
var process$1 = global_1.process;
|
|
22628
22553
|
var Deno = global_1.Deno;
|
|
@@ -22736,10 +22661,10 @@ var shared = createCommonjsModule(function (module) {
|
|
|
22736
22661
|
(module.exports = function (key, value) {
|
|
22737
22662
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
22738
22663
|
})('versions', []).push({
|
|
22739
|
-
version: '3.
|
|
22664
|
+
version: '3.29.0',
|
|
22740
22665
|
mode: 'global',
|
|
22741
|
-
copyright: '© 2014-
|
|
22742
|
-
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',
|
|
22743
22668
|
source: 'https://github.com/zloirock/core-js'
|
|
22744
22669
|
});
|
|
22745
22670
|
});
|
|
@@ -22769,21 +22694,15 @@ var uid = function (key) {
|
|
|
22769
22694
|
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
|
|
22770
22695
|
};
|
|
22771
22696
|
|
|
22772
|
-
var WellKnownSymbolsStore = shared('wks');
|
|
22773
22697
|
var Symbol$1 = global_1.Symbol;
|
|
22774
|
-
var
|
|
22775
|
-
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;
|
|
22776
22700
|
|
|
22777
22701
|
var wellKnownSymbol = function (name) {
|
|
22778
|
-
if (!hasOwnProperty_1(WellKnownSymbolsStore, name)
|
|
22779
|
-
|
|
22780
|
-
|
|
22781
|
-
|
|
22782
|
-
} else if (useSymbolAsUid && symbolFor) {
|
|
22783
|
-
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
22784
|
-
} else {
|
|
22785
|
-
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
22786
|
-
}
|
|
22702
|
+
if (!hasOwnProperty_1(WellKnownSymbolsStore, name)) {
|
|
22703
|
+
WellKnownSymbolsStore[name] = symbolConstructorDetection && hasOwnProperty_1(Symbol$1, name)
|
|
22704
|
+
? Symbol$1[name]
|
|
22705
|
+
: createWellKnownSymbol('Symbol.' + name);
|
|
22787
22706
|
} return WellKnownSymbolsStore[name];
|
|
22788
22707
|
};
|
|
22789
22708
|
|
|
@@ -23022,8 +22941,12 @@ var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
|
23022
22941
|
|
|
23023
22942
|
var enforceInternalState = internalState.enforce;
|
|
23024
22943
|
var getInternalState = internalState.get;
|
|
22944
|
+
var $String = String;
|
|
23025
22945
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
23026
22946
|
var defineProperty = Object.defineProperty;
|
|
22947
|
+
var stringSlice = functionUncurryThis(''.slice);
|
|
22948
|
+
var replace = functionUncurryThis(''.replace);
|
|
22949
|
+
var join = functionUncurryThis([].join);
|
|
23027
22950
|
|
|
23028
22951
|
var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
|
|
23029
22952
|
return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
@@ -23032,8 +22955,8 @@ var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
|
|
|
23032
22955
|
var TEMPLATE = String(String).split('String');
|
|
23033
22956
|
|
|
23034
22957
|
var makeBuiltIn = module.exports = function (value, name, options) {
|
|
23035
|
-
if (String(name)
|
|
23036
|
-
name = '[' + String(name)
|
|
22958
|
+
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
|
|
22959
|
+
name = '[' + replace($String(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
23037
22960
|
}
|
|
23038
22961
|
if (options && options.getter) name = 'get ' + name;
|
|
23039
22962
|
if (options && options.setter) name = 'set ' + name;
|
|
@@ -23052,7 +22975,7 @@ var makeBuiltIn = module.exports = function (value, name, options) {
|
|
|
23052
22975
|
} catch (error) { /* empty */ }
|
|
23053
22976
|
var state = enforceInternalState(value);
|
|
23054
22977
|
if (!hasOwnProperty_1(state, 'source')) {
|
|
23055
|
-
state.source =
|
|
22978
|
+
state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
|
|
23056
22979
|
} return value;
|
|
23057
22980
|
};
|
|
23058
22981
|
|
|
@@ -23508,6 +23431,12 @@ addToUnscopables('at');
|
|
|
23508
23431
|
// eslint-disable-next-line es/no-typed-arrays -- safe
|
|
23509
23432
|
var arrayBufferBasicDetection = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
|
|
23510
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
|
+
};
|
|
23439
|
+
|
|
23511
23440
|
var correctPrototypeGetter = !fails(function () {
|
|
23512
23441
|
function F() { /* empty */ }
|
|
23513
23442
|
F.prototype.constructor = null;
|
|
@@ -23531,6 +23460,13 @@ var objectGetPrototypeOf = correctPrototypeGetter ? $Object$4.getPrototypeOf : f
|
|
|
23531
23460
|
} return object instanceof $Object$4 ? ObjectPrototype : null;
|
|
23532
23461
|
};
|
|
23533
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
|
+
|
|
23534
23470
|
var $String$3 = String;
|
|
23535
23471
|
var $TypeError$6 = TypeError;
|
|
23536
23472
|
|
|
@@ -23553,8 +23489,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
23553
23489
|
var test = {};
|
|
23554
23490
|
var setter;
|
|
23555
23491
|
try {
|
|
23556
|
-
|
|
23557
|
-
setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
23492
|
+
setter = functionUncurryThisAccessor(Object.prototype, '__proto__', 'set');
|
|
23558
23493
|
setter(test, []);
|
|
23559
23494
|
CORRECT_SETTER = test instanceof Array;
|
|
23560
23495
|
} catch (error) { /* empty */ }
|
|
@@ -23567,14 +23502,6 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
23567
23502
|
};
|
|
23568
23503
|
}() : undefined);
|
|
23569
23504
|
|
|
23570
|
-
var defineProperty$2 = objectDefineProperty.f;
|
|
23571
|
-
|
|
23572
|
-
|
|
23573
|
-
|
|
23574
|
-
|
|
23575
|
-
|
|
23576
|
-
|
|
23577
|
-
|
|
23578
23505
|
var enforceInternalState = internalState.enforce;
|
|
23579
23506
|
var getInternalState = internalState.get;
|
|
23580
23507
|
var Int8Array = global_1.Int8Array;
|
|
@@ -23725,9 +23652,12 @@ if (NATIVE_ARRAY_BUFFER_VIEWS && objectGetPrototypeOf(Uint8ClampedArrayPrototype
|
|
|
23725
23652
|
|
|
23726
23653
|
if (descriptors && !hasOwnProperty_1(TypedArrayPrototype, TO_STRING_TAG$2)) {
|
|
23727
23654
|
TYPED_ARRAY_TAG_REQUIRED = true;
|
|
23728
|
-
|
|
23729
|
-
|
|
23730
|
-
|
|
23655
|
+
defineBuiltInAccessor(TypedArrayPrototype, TO_STRING_TAG$2, {
|
|
23656
|
+
configurable: true,
|
|
23657
|
+
get: function () {
|
|
23658
|
+
return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
|
|
23659
|
+
}
|
|
23660
|
+
});
|
|
23731
23661
|
for (NAME in TypedArrayConstructorsList) if (global_1[NAME]) {
|
|
23732
23662
|
createNonEnumerableProperty(global_1[NAME], TYPED_ARRAY_TAG, NAME);
|
|
23733
23663
|
}
|
|
@@ -27420,14 +27350,16 @@ var fallbackValues$x = {
|
|
|
27420
27350
|
};
|
|
27421
27351
|
|
|
27422
27352
|
var SolidDivider = function SolidDivider(_ref) {
|
|
27423
|
-
var
|
|
27353
|
+
var borderColor = _ref.borderColor,
|
|
27354
|
+
borderSize = _ref.borderSize,
|
|
27355
|
+
themeValues = _ref.themeValues;
|
|
27424
27356
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
27425
27357
|
padding: "0",
|
|
27426
27358
|
minWidth: "100%",
|
|
27427
27359
|
minHeight: "1px",
|
|
27428
|
-
borderColor: themeValues.borderColor,
|
|
27429
|
-
borderSize: themeValues.borderSize,
|
|
27430
|
-
borderWidthOverride: "0px 0px ".concat(themeValues.borderSize, " 0px")
|
|
27360
|
+
borderColor: borderColor || themeValues.borderColor,
|
|
27361
|
+
borderSize: borderSize || themeValues.borderSize,
|
|
27362
|
+
borderWidthOverride: "0px 0px ".concat(borderSize || themeValues.borderSize, " 0px")
|
|
27431
27363
|
});
|
|
27432
27364
|
};
|
|
27433
27365
|
|
|
@@ -38628,624 +38560,49 @@ var TableHeading_styled = styled__default.th.withConfig({
|
|
|
38628
38560
|
return extraStyles;
|
|
38629
38561
|
});
|
|
38630
38562
|
|
|
38631
|
-
|
|
38632
|
-
|
|
38633
|
-
|
|
38634
|
-
|
|
38635
|
-
}
|
|
38636
|
-
|
|
38637
|
-
return value === "" ? emptyCase : validatorFn.apply(void 0, [value].concat(rest));
|
|
38638
|
-
};
|
|
38639
|
-
};
|
|
38563
|
+
const validatorToPredicate = (validatorFn, emptyCase) => (
|
|
38564
|
+
value,
|
|
38565
|
+
...rest
|
|
38566
|
+
) => (value === "" ? emptyCase : validatorFn(value, ...rest));
|
|
38640
38567
|
|
|
38641
38568
|
var commonjsGlobal$1 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
38642
38569
|
|
|
38643
|
-
|
|
38644
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
38645
|
-
}
|
|
38646
|
-
|
|
38647
|
-
var dayjs_min = {
|
|
38648
|
-
exports: {}
|
|
38649
|
-
};
|
|
38570
|
+
var dayjs_min = {exports: {}};
|
|
38650
38571
|
|
|
38651
38572
|
(function (module, exports) {
|
|
38652
|
-
|
|
38653
|
-
|
|
38654
|
-
}(commonjsGlobal$1, function () {
|
|
38655
|
-
var t = 1e3,
|
|
38656
|
-
e = 6e4,
|
|
38657
|
-
n = 36e5,
|
|
38658
|
-
r = "millisecond",
|
|
38659
|
-
i = "second",
|
|
38660
|
-
s = "minute",
|
|
38661
|
-
u = "hour",
|
|
38662
|
-
a = "day",
|
|
38663
|
-
o = "week",
|
|
38664
|
-
f = "month",
|
|
38665
|
-
h = "quarter",
|
|
38666
|
-
c = "year",
|
|
38667
|
-
d = "date",
|
|
38668
|
-
$ = "Invalid Date",
|
|
38669
|
-
l = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,
|
|
38670
|
-
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,
|
|
38671
|
-
M = {
|
|
38672
|
-
name: "en",
|
|
38673
|
-
weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
|
|
38674
|
-
months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_")
|
|
38675
|
-
},
|
|
38676
|
-
m = function m(t, e, n) {
|
|
38677
|
-
var r = String(t);
|
|
38678
|
-
return !r || r.length >= e ? t : "" + Array(e + 1 - r.length).join(n) + t;
|
|
38679
|
-
},
|
|
38680
|
-
g = {
|
|
38681
|
-
s: m,
|
|
38682
|
-
z: function z(t) {
|
|
38683
|
-
var e = -t.utcOffset(),
|
|
38684
|
-
n = Math.abs(e),
|
|
38685
|
-
r = Math.floor(n / 60),
|
|
38686
|
-
i = n % 60;
|
|
38687
|
-
return (e <= 0 ? "+" : "-") + m(r, 2, "0") + ":" + m(i, 2, "0");
|
|
38688
|
-
},
|
|
38689
|
-
m: function t(e, n) {
|
|
38690
|
-
if (e.date() < n.date()) return -t(n, e);
|
|
38691
|
-
var r = 12 * (n.year() - e.year()) + (n.month() - e.month()),
|
|
38692
|
-
i = e.clone().add(r, f),
|
|
38693
|
-
s = n - i < 0,
|
|
38694
|
-
u = e.clone().add(r + (s ? -1 : 1), f);
|
|
38695
|
-
return +(-(r + (n - i) / (s ? i - u : u - i)) || 0);
|
|
38696
|
-
},
|
|
38697
|
-
a: function a(t) {
|
|
38698
|
-
return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);
|
|
38699
|
-
},
|
|
38700
|
-
p: function p(t) {
|
|
38701
|
-
return {
|
|
38702
|
-
M: f,
|
|
38703
|
-
y: c,
|
|
38704
|
-
w: o,
|
|
38705
|
-
d: a,
|
|
38706
|
-
D: d,
|
|
38707
|
-
h: u,
|
|
38708
|
-
m: s,
|
|
38709
|
-
s: i,
|
|
38710
|
-
ms: r,
|
|
38711
|
-
Q: h
|
|
38712
|
-
}[t] || String(t || "").toLowerCase().replace(/s$/, "");
|
|
38713
|
-
},
|
|
38714
|
-
u: function u(t) {
|
|
38715
|
-
return void 0 === t;
|
|
38716
|
-
}
|
|
38717
|
-
},
|
|
38718
|
-
D = "en",
|
|
38719
|
-
v = {};
|
|
38720
|
-
|
|
38721
|
-
v[D] = M;
|
|
38722
|
-
|
|
38723
|
-
var p = function p(t) {
|
|
38724
|
-
return t instanceof _;
|
|
38725
|
-
},
|
|
38726
|
-
S = function S(t, e, n) {
|
|
38727
|
-
var r;
|
|
38728
|
-
if (!t) return D;
|
|
38729
|
-
if ("string" == typeof t) v[t] && (r = t), e && (v[t] = e, r = t);else {
|
|
38730
|
-
var i = t.name;
|
|
38731
|
-
v[i] = t, r = i;
|
|
38732
|
-
}
|
|
38733
|
-
return !n && r && (D = r), r || !n && D;
|
|
38734
|
-
},
|
|
38735
|
-
w = function w(t, e) {
|
|
38736
|
-
if (p(t)) return t.clone();
|
|
38737
|
-
var n = "object" == _typeof(e) ? e : {};
|
|
38738
|
-
return n.date = t, n.args = arguments, new _(n);
|
|
38739
|
-
},
|
|
38740
|
-
O = g;
|
|
38741
|
-
|
|
38742
|
-
O.l = S, O.i = p, O.w = function (t, e) {
|
|
38743
|
-
return w(t, {
|
|
38744
|
-
locale: e.$L,
|
|
38745
|
-
utc: e.$u,
|
|
38746
|
-
x: e.$x,
|
|
38747
|
-
$offset: e.$offset
|
|
38748
|
-
});
|
|
38749
|
-
};
|
|
38750
|
-
|
|
38751
|
-
var _ = function () {
|
|
38752
|
-
function M(t) {
|
|
38753
|
-
this.$L = S(t.locale, null, !0), this.parse(t);
|
|
38754
|
-
}
|
|
38755
|
-
|
|
38756
|
-
var m = M.prototype;
|
|
38757
|
-
return m.parse = function (t) {
|
|
38758
|
-
this.$d = function (t) {
|
|
38759
|
-
var e = t.date,
|
|
38760
|
-
n = t.utc;
|
|
38761
|
-
if (null === e) return new Date(NaN);
|
|
38762
|
-
if (O.u(e)) return new Date();
|
|
38763
|
-
if (e instanceof Date) return new Date(e);
|
|
38764
|
-
|
|
38765
|
-
if ("string" == typeof e && !/Z$/i.test(e)) {
|
|
38766
|
-
var r = e.match(l);
|
|
38767
|
-
|
|
38768
|
-
if (r) {
|
|
38769
|
-
var i = r[2] - 1 || 0,
|
|
38770
|
-
s = (r[7] || "0").substring(0, 3);
|
|
38771
|
-
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);
|
|
38772
|
-
}
|
|
38773
|
-
}
|
|
38774
|
-
|
|
38775
|
-
return new Date(e);
|
|
38776
|
-
}(t), this.$x = t.x || {}, this.init();
|
|
38777
|
-
}, m.init = function () {
|
|
38778
|
-
var t = this.$d;
|
|
38779
|
-
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();
|
|
38780
|
-
}, m.$utils = function () {
|
|
38781
|
-
return O;
|
|
38782
|
-
}, m.isValid = function () {
|
|
38783
|
-
return !(this.$d.toString() === $);
|
|
38784
|
-
}, m.isSame = function (t, e) {
|
|
38785
|
-
var n = w(t);
|
|
38786
|
-
return this.startOf(e) <= n && n <= this.endOf(e);
|
|
38787
|
-
}, m.isAfter = function (t, e) {
|
|
38788
|
-
return w(t) < this.startOf(e);
|
|
38789
|
-
}, m.isBefore = function (t, e) {
|
|
38790
|
-
return this.endOf(e) < w(t);
|
|
38791
|
-
}, m.$g = function (t, e, n) {
|
|
38792
|
-
return O.u(t) ? this[e] : this.set(n, t);
|
|
38793
|
-
}, m.unix = function () {
|
|
38794
|
-
return Math.floor(this.valueOf() / 1e3);
|
|
38795
|
-
}, m.valueOf = function () {
|
|
38796
|
-
return this.$d.getTime();
|
|
38797
|
-
}, m.startOf = function (t, e) {
|
|
38798
|
-
var n = this,
|
|
38799
|
-
r = !!O.u(e) || e,
|
|
38800
|
-
h = O.p(t),
|
|
38801
|
-
$ = function $(t, e) {
|
|
38802
|
-
var i = O.w(n.$u ? Date.UTC(n.$y, e, t) : new Date(n.$y, e, t), n);
|
|
38803
|
-
return r ? i : i.endOf(a);
|
|
38804
|
-
},
|
|
38805
|
-
l = function l(t, e) {
|
|
38806
|
-
return O.w(n.toDate()[t].apply(n.toDate("s"), (r ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e)), n);
|
|
38807
|
-
},
|
|
38808
|
-
y = this.$W,
|
|
38809
|
-
M = this.$M,
|
|
38810
|
-
m = this.$D,
|
|
38811
|
-
g = "set" + (this.$u ? "UTC" : "");
|
|
38573
|
+
!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}));
|
|
38574
|
+
}(dayjs_min));
|
|
38812
38575
|
|
|
38813
|
-
|
|
38814
|
-
case c:
|
|
38815
|
-
return r ? $(1, 0) : $(31, 11);
|
|
38576
|
+
var dayjs = dayjs_min.exports;
|
|
38816
38577
|
|
|
38817
|
-
|
|
38818
|
-
return r ? $(1, M) : $(0, M + 1);
|
|
38819
|
-
|
|
38820
|
-
case o:
|
|
38821
|
-
var D = this.$locale().weekStart || 0,
|
|
38822
|
-
v = (y < D ? y + 7 : y) - D;
|
|
38823
|
-
return $(r ? m - v : m + (6 - v), M);
|
|
38824
|
-
|
|
38825
|
-
case a:
|
|
38826
|
-
case d:
|
|
38827
|
-
return l(g + "Hours", 0);
|
|
38828
|
-
|
|
38829
|
-
case u:
|
|
38830
|
-
return l(g + "Minutes", 1);
|
|
38831
|
-
|
|
38832
|
-
case s:
|
|
38833
|
-
return l(g + "Seconds", 2);
|
|
38834
|
-
|
|
38835
|
-
case i:
|
|
38836
|
-
return l(g + "Milliseconds", 3);
|
|
38837
|
-
|
|
38838
|
-
default:
|
|
38839
|
-
return this.clone();
|
|
38840
|
-
}
|
|
38841
|
-
}, m.endOf = function (t) {
|
|
38842
|
-
return this.startOf(t, !1);
|
|
38843
|
-
}, m.$set = function (t, e) {
|
|
38844
|
-
var n,
|
|
38845
|
-
o = O.p(t),
|
|
38846
|
-
h = "set" + (this.$u ? "UTC" : ""),
|
|
38847
|
-
$ = (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],
|
|
38848
|
-
l = o === a ? this.$D + (e - this.$W) : e;
|
|
38849
|
-
|
|
38850
|
-
if (o === f || o === c) {
|
|
38851
|
-
var y = this.clone().set(d, 1);
|
|
38852
|
-
y.$d[$](l), y.init(), this.$d = y.set(d, Math.min(this.$D, y.daysInMonth())).$d;
|
|
38853
|
-
} else $ && this.$d[$](l);
|
|
38854
|
-
|
|
38855
|
-
return this.init(), this;
|
|
38856
|
-
}, m.set = function (t, e) {
|
|
38857
|
-
return this.clone().$set(t, e);
|
|
38858
|
-
}, m.get = function (t) {
|
|
38859
|
-
return this[O.p(t)]();
|
|
38860
|
-
}, m.add = function (r, h) {
|
|
38861
|
-
var d,
|
|
38862
|
-
$ = this;
|
|
38863
|
-
r = Number(r);
|
|
38864
|
-
|
|
38865
|
-
var l = O.p(h),
|
|
38866
|
-
y = function y(t) {
|
|
38867
|
-
var e = w($);
|
|
38868
|
-
return O.w(e.date(e.date() + Math.round(t * r)), $);
|
|
38869
|
-
};
|
|
38870
|
-
|
|
38871
|
-
if (l === f) return this.set(f, this.$M + r);
|
|
38872
|
-
if (l === c) return this.set(c, this.$y + r);
|
|
38873
|
-
if (l === a) return y(1);
|
|
38874
|
-
if (l === o) return y(7);
|
|
38875
|
-
var M = (d = {}, d[s] = e, d[u] = n, d[i] = t, d)[l] || 1,
|
|
38876
|
-
m = this.$d.getTime() + r * M;
|
|
38877
|
-
return O.w(m, this);
|
|
38878
|
-
}, m.subtract = function (t, e) {
|
|
38879
|
-
return this.add(-1 * t, e);
|
|
38880
|
-
}, m.format = function (t) {
|
|
38881
|
-
var e = this,
|
|
38882
|
-
n = this.$locale();
|
|
38883
|
-
if (!this.isValid()) return n.invalidDate || $;
|
|
38884
|
-
|
|
38885
|
-
var r = t || "YYYY-MM-DDTHH:mm:ssZ",
|
|
38886
|
-
i = O.z(this),
|
|
38887
|
-
s = this.$H,
|
|
38888
|
-
u = this.$m,
|
|
38889
|
-
a = this.$M,
|
|
38890
|
-
o = n.weekdays,
|
|
38891
|
-
f = n.months,
|
|
38892
|
-
h = function h(t, n, i, s) {
|
|
38893
|
-
return t && (t[n] || t(e, r)) || i[n].substr(0, s);
|
|
38894
|
-
},
|
|
38895
|
-
c = function c(t) {
|
|
38896
|
-
return O.s(s % 12 || 12, t, "0");
|
|
38897
|
-
},
|
|
38898
|
-
d = n.meridiem || function (t, e, n) {
|
|
38899
|
-
var r = t < 12 ? "AM" : "PM";
|
|
38900
|
-
return n ? r.toLowerCase() : r;
|
|
38901
|
-
},
|
|
38902
|
-
l = {
|
|
38903
|
-
YY: String(this.$y).slice(-2),
|
|
38904
|
-
YYYY: this.$y,
|
|
38905
|
-
M: a + 1,
|
|
38906
|
-
MM: O.s(a + 1, 2, "0"),
|
|
38907
|
-
MMM: h(n.monthsShort, a, f, 3),
|
|
38908
|
-
MMMM: h(f, a),
|
|
38909
|
-
D: this.$D,
|
|
38910
|
-
DD: O.s(this.$D, 2, "0"),
|
|
38911
|
-
d: String(this.$W),
|
|
38912
|
-
dd: h(n.weekdaysMin, this.$W, o, 2),
|
|
38913
|
-
ddd: h(n.weekdaysShort, this.$W, o, 3),
|
|
38914
|
-
dddd: o[this.$W],
|
|
38915
|
-
H: String(s),
|
|
38916
|
-
HH: O.s(s, 2, "0"),
|
|
38917
|
-
h: c(1),
|
|
38918
|
-
hh: c(2),
|
|
38919
|
-
a: d(s, u, !0),
|
|
38920
|
-
A: d(s, u, !1),
|
|
38921
|
-
m: String(u),
|
|
38922
|
-
mm: O.s(u, 2, "0"),
|
|
38923
|
-
s: String(this.$s),
|
|
38924
|
-
ss: O.s(this.$s, 2, "0"),
|
|
38925
|
-
SSS: O.s(this.$ms, 3, "0"),
|
|
38926
|
-
Z: i
|
|
38927
|
-
};
|
|
38928
|
-
|
|
38929
|
-
return r.replace(y, function (t, e) {
|
|
38930
|
-
return e || l[t] || i.replace(":", "");
|
|
38931
|
-
});
|
|
38932
|
-
}, m.utcOffset = function () {
|
|
38933
|
-
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
38934
|
-
}, m.diff = function (r, d, $) {
|
|
38935
|
-
var l,
|
|
38936
|
-
y = O.p(d),
|
|
38937
|
-
M = w(r),
|
|
38938
|
-
m = (M.utcOffset() - this.utcOffset()) * e,
|
|
38939
|
-
g = this - M,
|
|
38940
|
-
D = O.m(this, M);
|
|
38941
|
-
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);
|
|
38942
|
-
}, m.daysInMonth = function () {
|
|
38943
|
-
return this.endOf(f).$D;
|
|
38944
|
-
}, m.$locale = function () {
|
|
38945
|
-
return v[this.$L];
|
|
38946
|
-
}, m.locale = function (t, e) {
|
|
38947
|
-
if (!t) return this.$L;
|
|
38948
|
-
var n = this.clone(),
|
|
38949
|
-
r = S(t, e, !0);
|
|
38950
|
-
return r && (n.$L = r), n;
|
|
38951
|
-
}, m.clone = function () {
|
|
38952
|
-
return O.w(this.$d, this);
|
|
38953
|
-
}, m.toDate = function () {
|
|
38954
|
-
return new Date(this.valueOf());
|
|
38955
|
-
}, m.toJSON = function () {
|
|
38956
|
-
return this.isValid() ? this.toISOString() : null;
|
|
38957
|
-
}, m.toISOString = function () {
|
|
38958
|
-
return this.$d.toISOString();
|
|
38959
|
-
}, m.toString = function () {
|
|
38960
|
-
return this.$d.toUTCString();
|
|
38961
|
-
}, M;
|
|
38962
|
-
}(),
|
|
38963
|
-
b = _.prototype;
|
|
38964
|
-
|
|
38965
|
-
return w.prototype = b, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", f], ["$y", c], ["$D", d]].forEach(function (t) {
|
|
38966
|
-
b[t[1]] = function (e) {
|
|
38967
|
-
return this.$g(e, t[0], t[1]);
|
|
38968
|
-
};
|
|
38969
|
-
}), w.extend = function (t, e) {
|
|
38970
|
-
return t.$i || (t(e, _, w), t.$i = !0), w;
|
|
38971
|
-
}, w.locale = S, w.isDayjs = p, w.unix = function (t) {
|
|
38972
|
-
return w(1e3 * t);
|
|
38973
|
-
}, w.en = v[D], w.Ls = v, w.p = {}, w;
|
|
38974
|
-
});
|
|
38975
|
-
})(dayjs_min);
|
|
38976
|
-
|
|
38977
|
-
var dayjs_minExports = dayjs_min.exports;
|
|
38978
|
-
var dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
|
|
38979
|
-
var customParseFormat$1 = {
|
|
38980
|
-
exports: {}
|
|
38981
|
-
};
|
|
38578
|
+
var customParseFormat$1 = {exports: {}};
|
|
38982
38579
|
|
|
38983
38580
|
(function (module, exports) {
|
|
38984
|
-
|
|
38985
|
-
|
|
38986
|
-
}(commonjsGlobal$1, function () {
|
|
38987
|
-
var t = {
|
|
38988
|
-
LTS: "h:mm:ss A",
|
|
38989
|
-
LT: "h:mm A",
|
|
38990
|
-
L: "MM/DD/YYYY",
|
|
38991
|
-
LL: "MMMM D, YYYY",
|
|
38992
|
-
LLL: "MMMM D, YYYY h:mm A",
|
|
38993
|
-
LLLL: "dddd, MMMM D, YYYY h:mm A"
|
|
38994
|
-
},
|
|
38995
|
-
e = /(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,
|
|
38996
|
-
n = /\d\d/,
|
|
38997
|
-
r = /\d\d?/,
|
|
38998
|
-
i = /\d*[^\s\d-_:/()]+/,
|
|
38999
|
-
o = {},
|
|
39000
|
-
s = function s(t) {
|
|
39001
|
-
return (t = +t) + (t > 68 ? 1900 : 2e3);
|
|
39002
|
-
};
|
|
38581
|
+
!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);};}}));
|
|
38582
|
+
}(customParseFormat$1));
|
|
39003
38583
|
|
|
39004
|
-
|
|
39005
|
-
return function (e) {
|
|
39006
|
-
this[t] = +e;
|
|
39007
|
-
};
|
|
39008
|
-
},
|
|
39009
|
-
f = [/[+-]\d\d:?(\d\d)?|Z/, function (t) {
|
|
39010
|
-
(this.zone || (this.zone = {})).offset = function (t) {
|
|
39011
|
-
if (!t) return 0;
|
|
39012
|
-
if ("Z" === t) return 0;
|
|
39013
|
-
var e = t.match(/([+-]|\d\d)/g),
|
|
39014
|
-
n = 60 * e[1] + (+e[2] || 0);
|
|
39015
|
-
return 0 === n ? 0 : "+" === e[0] ? -n : n;
|
|
39016
|
-
}(t);
|
|
39017
|
-
}],
|
|
39018
|
-
u = function u(t) {
|
|
39019
|
-
var e = o[t];
|
|
39020
|
-
return e && (e.indexOf ? e : e.s.concat(e.f));
|
|
39021
|
-
},
|
|
39022
|
-
h = function h(t, e) {
|
|
39023
|
-
var n,
|
|
39024
|
-
r = o.meridiem;
|
|
39025
|
-
|
|
39026
|
-
if (r) {
|
|
39027
|
-
for (var i = 1; i <= 24; i += 1) {
|
|
39028
|
-
if (t.indexOf(r(i, 0, e)) > -1) {
|
|
39029
|
-
n = i > 12;
|
|
39030
|
-
break;
|
|
39031
|
-
}
|
|
39032
|
-
}
|
|
39033
|
-
} else n = t === (e ? "pm" : "PM");
|
|
38584
|
+
var customParseFormat = customParseFormat$1.exports;
|
|
39034
38585
|
|
|
39035
|
-
|
|
39036
|
-
},
|
|
39037
|
-
d = {
|
|
39038
|
-
A: [i, function (t) {
|
|
39039
|
-
this.afternoon = h(t, !1);
|
|
39040
|
-
}],
|
|
39041
|
-
a: [i, function (t) {
|
|
39042
|
-
this.afternoon = h(t, !0);
|
|
39043
|
-
}],
|
|
39044
|
-
S: [/\d/, function (t) {
|
|
39045
|
-
this.milliseconds = 100 * +t;
|
|
39046
|
-
}],
|
|
39047
|
-
SS: [n, function (t) {
|
|
39048
|
-
this.milliseconds = 10 * +t;
|
|
39049
|
-
}],
|
|
39050
|
-
SSS: [/\d{3}/, function (t) {
|
|
39051
|
-
this.milliseconds = +t;
|
|
39052
|
-
}],
|
|
39053
|
-
s: [r, a("seconds")],
|
|
39054
|
-
ss: [r, a("seconds")],
|
|
39055
|
-
m: [r, a("minutes")],
|
|
39056
|
-
mm: [r, a("minutes")],
|
|
39057
|
-
H: [r, a("hours")],
|
|
39058
|
-
h: [r, a("hours")],
|
|
39059
|
-
HH: [r, a("hours")],
|
|
39060
|
-
hh: [r, a("hours")],
|
|
39061
|
-
D: [r, a("day")],
|
|
39062
|
-
DD: [n, a("day")],
|
|
39063
|
-
Do: [i, function (t) {
|
|
39064
|
-
var e = o.ordinal,
|
|
39065
|
-
n = t.match(/\d+/);
|
|
39066
|
-
if (this.day = n[0], e) for (var r = 1; r <= 31; r += 1) {
|
|
39067
|
-
e(r).replace(/\[|\]/g, "") === t && (this.day = r);
|
|
39068
|
-
}
|
|
39069
|
-
}],
|
|
39070
|
-
M: [r, a("month")],
|
|
39071
|
-
MM: [n, a("month")],
|
|
39072
|
-
MMM: [i, function (t) {
|
|
39073
|
-
var e = u("months"),
|
|
39074
|
-
n = (u("monthsShort") || e.map(function (t) {
|
|
39075
|
-
return t.substr(0, 3);
|
|
39076
|
-
})).indexOf(t) + 1;
|
|
39077
|
-
if (n < 1) throw new Error();
|
|
39078
|
-
this.month = n % 12 || n;
|
|
39079
|
-
}],
|
|
39080
|
-
MMMM: [i, function (t) {
|
|
39081
|
-
var e = u("months").indexOf(t) + 1;
|
|
39082
|
-
if (e < 1) throw new Error();
|
|
39083
|
-
this.month = e % 12 || e;
|
|
39084
|
-
}],
|
|
39085
|
-
Y: [/[+-]?\d+/, a("year")],
|
|
39086
|
-
YY: [n, function (t) {
|
|
39087
|
-
this.year = s(t);
|
|
39088
|
-
}],
|
|
39089
|
-
YYYY: [/\d{4}/, a("year")],
|
|
39090
|
-
Z: f,
|
|
39091
|
-
ZZ: f
|
|
39092
|
-
};
|
|
38586
|
+
var isSameOrBefore$1 = {exports: {}};
|
|
39093
38587
|
|
|
39094
|
-
|
|
39095
|
-
|
|
39096
|
-
|
|
39097
|
-
|
|
39098
|
-
for (var s = (n = r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function (e, n, r) {
|
|
39099
|
-
var o = r && r.toUpperCase();
|
|
39100
|
-
return n || i[r] || t[r] || i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function (t, e, n) {
|
|
39101
|
-
return e || n.slice(1);
|
|
39102
|
-
});
|
|
39103
|
-
})).match(e), a = s.length, f = 0; f < a; f += 1) {
|
|
39104
|
-
var u = s[f],
|
|
39105
|
-
h = d[u],
|
|
39106
|
-
c = h && h[0],
|
|
39107
|
-
l = h && h[1];
|
|
39108
|
-
s[f] = l ? {
|
|
39109
|
-
regex: c,
|
|
39110
|
-
parser: l
|
|
39111
|
-
} : u.replace(/^\[|\]$/g, "");
|
|
39112
|
-
}
|
|
39113
|
-
|
|
39114
|
-
return function (t) {
|
|
39115
|
-
for (var e = {}, n = 0, r = 0; n < a; n += 1) {
|
|
39116
|
-
var i = s[n];
|
|
39117
|
-
if ("string" == typeof i) r += i.length;else {
|
|
39118
|
-
var o = i.regex,
|
|
39119
|
-
f = i.parser,
|
|
39120
|
-
u = t.substr(r),
|
|
39121
|
-
h = o.exec(u)[0];
|
|
39122
|
-
f.call(e, h), t = t.replace(h, "");
|
|
39123
|
-
}
|
|
39124
|
-
}
|
|
39125
|
-
|
|
39126
|
-
return function (t) {
|
|
39127
|
-
var e = t.afternoon;
|
|
39128
|
-
|
|
39129
|
-
if (void 0 !== e) {
|
|
39130
|
-
var n = t.hours;
|
|
39131
|
-
e ? n < 12 && (t.hours += 12) : 12 === n && (t.hours = 0), delete t.afternoon;
|
|
39132
|
-
}
|
|
39133
|
-
}(e), e;
|
|
39134
|
-
};
|
|
39135
|
-
}
|
|
39136
|
-
|
|
39137
|
-
return function (t, e, n) {
|
|
39138
|
-
n.p.customParseFormat = !0, t && t.parseTwoDigitYear && (s = t.parseTwoDigitYear);
|
|
39139
|
-
var r = e.prototype,
|
|
39140
|
-
i = r.parse;
|
|
39141
|
-
|
|
39142
|
-
r.parse = function (t) {
|
|
39143
|
-
var e = t.date,
|
|
39144
|
-
r = t.utc,
|
|
39145
|
-
s = t.args;
|
|
39146
|
-
this.$u = r;
|
|
39147
|
-
var a = s[1];
|
|
39148
|
-
|
|
39149
|
-
if ("string" == typeof a) {
|
|
39150
|
-
var f = !0 === s[2],
|
|
39151
|
-
u = !0 === s[3],
|
|
39152
|
-
h = f || u,
|
|
39153
|
-
d = s[2];
|
|
39154
|
-
u && (d = s[2]), o = this.$locale(), !f && d && (o = n.Ls[d]), this.$d = function (t, e, n) {
|
|
39155
|
-
try {
|
|
39156
|
-
if (["x", "X"].indexOf(e) > -1) return new Date(("X" === e ? 1e3 : 1) * t);
|
|
39157
|
-
var r = c(e)(t),
|
|
39158
|
-
i = r.year,
|
|
39159
|
-
o = r.month,
|
|
39160
|
-
s = r.day,
|
|
39161
|
-
a = r.hours,
|
|
39162
|
-
f = r.minutes,
|
|
39163
|
-
u = r.seconds,
|
|
39164
|
-
h = r.milliseconds,
|
|
39165
|
-
d = r.zone,
|
|
39166
|
-
l = new Date(),
|
|
39167
|
-
m = s || (i || o ? 1 : l.getDate()),
|
|
39168
|
-
M = i || l.getFullYear(),
|
|
39169
|
-
Y = 0;
|
|
39170
|
-
i && !o || (Y = o > 0 ? o - 1 : l.getMonth());
|
|
39171
|
-
var p = a || 0,
|
|
39172
|
-
v = f || 0,
|
|
39173
|
-
D = u || 0,
|
|
39174
|
-
g = h || 0;
|
|
39175
|
-
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);
|
|
39176
|
-
} catch (t) {
|
|
39177
|
-
return new Date("");
|
|
39178
|
-
}
|
|
39179
|
-
}(e, a, r), this.init(), d && !0 !== d && (this.$L = this.locale(d).$L), h && e != this.format(a) && (this.$d = new Date("")), o = {};
|
|
39180
|
-
} else if (a instanceof Array) for (var l = a.length, m = 1; m <= l; m += 1) {
|
|
39181
|
-
s[1] = a[m - 1];
|
|
39182
|
-
var M = n.apply(this, s);
|
|
39183
|
-
|
|
39184
|
-
if (M.isValid()) {
|
|
39185
|
-
this.$d = M.$d, this.$L = M.$L, this.init();
|
|
39186
|
-
break;
|
|
39187
|
-
}
|
|
38588
|
+
(function (module, exports) {
|
|
38589
|
+
!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)};}}));
|
|
38590
|
+
}(isSameOrBefore$1));
|
|
39188
38591
|
|
|
39189
|
-
|
|
39190
|
-
} else i.call(this, t);
|
|
39191
|
-
};
|
|
39192
|
-
};
|
|
39193
|
-
});
|
|
39194
|
-
})(customParseFormat$1);
|
|
38592
|
+
var isSameOrBefore = isSameOrBefore$1.exports;
|
|
39195
38593
|
|
|
39196
|
-
var
|
|
39197
|
-
var customParseFormat = /*@__PURE__*/getDefaultExportFromCjs(customParseFormatExports);
|
|
39198
|
-
var isSameOrBefore$1 = {
|
|
39199
|
-
exports: {}
|
|
39200
|
-
};
|
|
38594
|
+
var isSameOrAfter$1 = {exports: {}};
|
|
39201
38595
|
|
|
39202
38596
|
(function (module, exports) {
|
|
39203
|
-
|
|
39204
|
-
|
|
39205
|
-
}(commonjsGlobal$1, function () {
|
|
39206
|
-
return function (e, i) {
|
|
39207
|
-
i.prototype.isSameOrBefore = function (e, i) {
|
|
39208
|
-
return this.isSame(e, i) || this.isBefore(e, i);
|
|
39209
|
-
};
|
|
39210
|
-
};
|
|
39211
|
-
});
|
|
39212
|
-
})(isSameOrBefore$1);
|
|
38597
|
+
!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)};}}));
|
|
38598
|
+
}(isSameOrAfter$1));
|
|
39213
38599
|
|
|
39214
|
-
var
|
|
39215
|
-
var isSameOrBefore = /*@__PURE__*/getDefaultExportFromCjs(isSameOrBeforeExports);
|
|
39216
|
-
var isSameOrAfter$1 = {
|
|
39217
|
-
exports: {}
|
|
39218
|
-
};
|
|
39219
|
-
|
|
39220
|
-
(function (module, exports) {
|
|
39221
|
-
!function (e, t) {
|
|
39222
|
-
module.exports = t();
|
|
39223
|
-
}(commonjsGlobal$1, function () {
|
|
39224
|
-
return function (e, t) {
|
|
39225
|
-
t.prototype.isSameOrAfter = function (e, t) {
|
|
39226
|
-
return this.isSame(e, t) || this.isAfter(e, t);
|
|
39227
|
-
};
|
|
39228
|
-
};
|
|
39229
|
-
});
|
|
39230
|
-
})(isSameOrAfter$1);
|
|
38600
|
+
var isSameOrAfter = isSameOrAfter$1.exports;
|
|
39231
38601
|
|
|
39232
|
-
var isSameOrAfterExports = isSameOrAfter$1.exports;
|
|
39233
|
-
var isSameOrAfter = /*@__PURE__*/getDefaultExportFromCjs(isSameOrAfterExports);
|
|
39234
38602
|
/* eslint-disable no-unused-vars */
|
|
39235
38603
|
|
|
39236
|
-
|
|
39237
|
-
|
|
39238
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
39239
|
-
args[_key2] = arguments[_key2];
|
|
39240
|
-
}
|
|
39241
|
-
|
|
39242
|
-
return {
|
|
39243
|
-
type: type,
|
|
39244
|
-
args: args,
|
|
39245
|
-
error: error
|
|
39246
|
-
};
|
|
39247
|
-
};
|
|
39248
|
-
|
|
38604
|
+
const createValidator = (type, error) => {
|
|
38605
|
+
let validator = (...args) => ({ type, args, error });
|
|
39249
38606
|
validator.error = error;
|
|
39250
38607
|
return validator;
|
|
39251
38608
|
};
|
|
@@ -39253,38 +38610,30 @@ var createValidator = function createValidator(type, error) {
|
|
|
39253
38610
|
dayjs.extend(customParseFormat);
|
|
39254
38611
|
dayjs.extend(isSameOrBefore);
|
|
39255
38612
|
dayjs.extend(isSameOrAfter);
|
|
39256
|
-
var validatorFns = {};
|
|
39257
|
-
var INCLUDED_IN = "validator/INCLUDED_IN";
|
|
39258
|
-
var INCLUDED_IN_ERROR = "error/INCLUDED_IN";
|
|
39259
|
-
var includedIn = createValidator(INCLUDED_IN, INCLUDED_IN_ERROR);
|
|
39260
38613
|
|
|
39261
|
-
validatorFns
|
|
39262
|
-
return Array.isArray(args[0]) ? args[0].includes(value) : args[0] === value;
|
|
39263
|
-
};
|
|
39264
|
-
|
|
39265
|
-
var REQUIRED = "validator/REQUIRED";
|
|
39266
|
-
var REQUIRED_ERROR = "error/REQUIRED";
|
|
39267
|
-
var required = createValidator(REQUIRED, REQUIRED_ERROR);
|
|
38614
|
+
let validatorFns = {};
|
|
39268
38615
|
|
|
39269
|
-
|
|
39270
|
-
|
|
39271
|
-
|
|
38616
|
+
const INCLUDED_IN = "validator/INCLUDED_IN";
|
|
38617
|
+
const INCLUDED_IN_ERROR = "error/INCLUDED_IN";
|
|
38618
|
+
const includedIn = createValidator(INCLUDED_IN, INCLUDED_IN_ERROR);
|
|
38619
|
+
validatorFns[INCLUDED_IN] = (value, args, form) =>
|
|
38620
|
+
Array.isArray(args[0]) ? args[0].includes(value) : args[0] === value;
|
|
39272
38621
|
|
|
39273
|
-
|
|
39274
|
-
|
|
39275
|
-
|
|
38622
|
+
const REQUIRED = "validator/REQUIRED";
|
|
38623
|
+
const REQUIRED_ERROR = "error/REQUIRED";
|
|
38624
|
+
const required = createValidator(REQUIRED, REQUIRED_ERROR);
|
|
38625
|
+
validatorFns[REQUIRED] = (value, args, form) => value !== "";
|
|
39276
38626
|
|
|
39277
|
-
|
|
39278
|
-
|
|
39279
|
-
|
|
38627
|
+
const ONLY_INTEGERS = "validator/ONLY_INTEGERS";
|
|
38628
|
+
const ONLY_INTEGERS_ERROR = "error/ONLY_INTEGERS";
|
|
38629
|
+
const onlyIntegers = createValidator(ONLY_INTEGERS, ONLY_INTEGERS_ERROR);
|
|
38630
|
+
validatorFns[ONLY_INTEGERS] = (value, args, form) => /^(-?\d+)?$/.test(value);
|
|
39280
38631
|
|
|
39281
|
-
|
|
39282
|
-
|
|
39283
|
-
|
|
38632
|
+
const ONLY_NATURALS = "validator/ONLY_NATURALS";
|
|
38633
|
+
const ONLY_NATURALS_ERROR = "error/ONLY_NATURALS";
|
|
38634
|
+
const onlyNaturals = createValidator(ONLY_NATURALS, ONLY_NATURALS_ERROR);
|
|
38635
|
+
validatorFns[ONLY_NATURALS] = (value, args, form) => /^(\d+)?$/.test(value);
|
|
39284
38636
|
|
|
39285
|
-
validatorFns[ONLY_NATURALS] = function (value, args, form) {
|
|
39286
|
-
return /^(\d+)?$/.test(value);
|
|
39287
|
-
};
|
|
39288
38637
|
/*
|
|
39289
38638
|
07/22: experimental expiration date constraint
|
|
39290
38639
|
should allow entry of expiration date using "/" character
|
|
@@ -39294,464 +38643,439 @@ not tested as validation function
|
|
|
39294
38643
|
to validate exp date instead use combo of:
|
|
39295
38644
|
required(), hasLength(), isValidMonth(), dateAfterToday()
|
|
39296
38645
|
*/
|
|
39297
|
-
|
|
39298
|
-
|
|
39299
|
-
|
|
39300
|
-
|
|
39301
|
-
|
|
39302
|
-
|
|
39303
|
-
validatorFns[ONLY_EXPIRATION_DATE] =
|
|
39304
|
-
|
|
39305
|
-
|
|
39306
|
-
|
|
39307
|
-
|
|
39308
|
-
|
|
39309
|
-
|
|
39310
|
-
|
|
39311
|
-
|
|
38646
|
+
const ONLY_EXPIRATION_DATE = "validator/ONLY_EXPIRATION_DATE";
|
|
38647
|
+
const ONLY_EXPIRATION_DATE_ERROR = "error/ONLY_EXPIRATION_DATE";
|
|
38648
|
+
const onlyExpirationDate = createValidator(
|
|
38649
|
+
ONLY_EXPIRATION_DATE,
|
|
38650
|
+
ONLY_EXPIRATION_DATE_ERROR
|
|
38651
|
+
);
|
|
38652
|
+
validatorFns[ONLY_EXPIRATION_DATE] = (value, args, form) =>
|
|
38653
|
+
/^(\d?\d?\/?\d?\d?)?$/.test(value);
|
|
38654
|
+
|
|
38655
|
+
const NUMBER_LESS_THAN = "validator/NUMBER_LESS_THAN";
|
|
38656
|
+
const NUMBER_LESS_THAN_ERROR = "error/NUMBER_LESS_THAN";
|
|
38657
|
+
const numberLessThan = createValidator(
|
|
38658
|
+
NUMBER_LESS_THAN,
|
|
38659
|
+
NUMBER_LESS_THAN_ERROR
|
|
38660
|
+
);
|
|
38661
|
+
validatorFns[NUMBER_LESS_THAN] = (value, args, form) => {
|
|
39312
38662
|
if (value === "") {
|
|
39313
38663
|
return true;
|
|
39314
38664
|
}
|
|
39315
|
-
|
|
39316
38665
|
return Number(value) < args[0];
|
|
39317
38666
|
};
|
|
39318
38667
|
|
|
39319
|
-
|
|
39320
|
-
|
|
39321
|
-
|
|
39322
|
-
|
|
39323
|
-
|
|
38668
|
+
const NUMBER_LESS_THAN_OR_EQUAL_TO =
|
|
38669
|
+
"validator/NUMBER_LESS_THAN_OR_EQUAL_TO";
|
|
38670
|
+
const NUMBER_LESS_THAN_OR_EQUAL_TO_ERROR =
|
|
38671
|
+
"error/NUMBER_LESS_THAN_OR_EQUAL_TO";
|
|
38672
|
+
const numberLessThanOrEqualTo = createValidator(
|
|
38673
|
+
NUMBER_LESS_THAN_OR_EQUAL_TO,
|
|
38674
|
+
NUMBER_LESS_THAN_OR_EQUAL_TO_ERROR
|
|
38675
|
+
);
|
|
38676
|
+
validatorFns[NUMBER_LESS_THAN_OR_EQUAL_TO] = (value, args, form) => {
|
|
39324
38677
|
if (value === "") {
|
|
39325
38678
|
return true;
|
|
39326
38679
|
}
|
|
39327
|
-
|
|
39328
38680
|
return Number(value) <= args[0];
|
|
39329
38681
|
};
|
|
39330
38682
|
|
|
39331
|
-
|
|
39332
|
-
|
|
39333
|
-
|
|
39334
|
-
|
|
39335
|
-
|
|
38683
|
+
const NUMBER_GREATER_THAN = "validator/NUMBER_GREATER_THAN";
|
|
38684
|
+
const NUMBER_GREATER_THAN_ERROR = "error/NUMBER_GREATER_THAN";
|
|
38685
|
+
const numberGreaterThan = createValidator(
|
|
38686
|
+
NUMBER_GREATER_THAN,
|
|
38687
|
+
NUMBER_GREATER_THAN_ERROR
|
|
38688
|
+
);
|
|
38689
|
+
validatorFns[NUMBER_GREATER_THAN] = (value, args, form) => {
|
|
39336
38690
|
if (value === "") {
|
|
39337
38691
|
return true;
|
|
39338
38692
|
}
|
|
39339
|
-
|
|
39340
38693
|
return Number(value) > args[0];
|
|
39341
38694
|
};
|
|
39342
38695
|
|
|
39343
|
-
|
|
39344
|
-
|
|
39345
|
-
|
|
39346
|
-
|
|
39347
|
-
|
|
38696
|
+
const NUMBER_GREATER_THAN_OR_EQUAL_TO =
|
|
38697
|
+
"validator/NUMBER_GREATER_THAN_OR_EQUAL_TO";
|
|
38698
|
+
const NUMBER_GREATER_THAN_OR_EQUAL_TO_ERROR =
|
|
38699
|
+
"error/NUMBER_GREATER_THAN_OR_EQUAL_TO";
|
|
38700
|
+
const numberGreaterThanOrEqualTo = createValidator(
|
|
38701
|
+
NUMBER_GREATER_THAN_OR_EQUAL_TO,
|
|
38702
|
+
NUMBER_GREATER_THAN_OR_EQUAL_TO_ERROR
|
|
38703
|
+
);
|
|
38704
|
+
validatorFns[NUMBER_GREATER_THAN_OR_EQUAL_TO] = (value, args, form) => {
|
|
39348
38705
|
if (value === "") {
|
|
39349
38706
|
return true;
|
|
39350
38707
|
}
|
|
39351
|
-
|
|
39352
38708
|
return Number(value) >= args[0];
|
|
39353
38709
|
};
|
|
39354
38710
|
|
|
39355
|
-
|
|
39356
|
-
|
|
39357
|
-
|
|
39358
|
-
|
|
39359
|
-
|
|
39360
|
-
var dependentField = form[args[0]];
|
|
39361
|
-
|
|
38711
|
+
const MATCHES_FIELD = "validator/MATCHES_FIELD";
|
|
38712
|
+
const MATCHES_FIELD_ERROR$1 = "error/MATCHES_FIELD";
|
|
38713
|
+
const matchesField = createValidator(MATCHES_FIELD, MATCHES_FIELD_ERROR$1);
|
|
38714
|
+
validatorFns[MATCHES_FIELD] = (value, args, form) => {
|
|
38715
|
+
const dependentField = form[args[0]];
|
|
39362
38716
|
if (dependentField === undefined) {
|
|
39363
|
-
throw new Error(
|
|
38717
|
+
throw new Error(
|
|
38718
|
+
`${args[0]} was passed to matchesField, but that field does not exist in the form`
|
|
38719
|
+
);
|
|
39364
38720
|
}
|
|
39365
|
-
|
|
39366
|
-
var dependentFieldValue = dependentField.rawValue;
|
|
38721
|
+
const dependentFieldValue = dependentField.rawValue;
|
|
39367
38722
|
return value === dependentFieldValue;
|
|
39368
38723
|
};
|
|
39369
38724
|
|
|
39370
|
-
|
|
39371
|
-
|
|
39372
|
-
|
|
39373
|
-
|
|
39374
|
-
|
|
39375
|
-
|
|
39376
|
-
|
|
39377
|
-
|
|
39378
|
-
|
|
39379
|
-
|
|
39380
|
-
|
|
39381
|
-
|
|
39382
|
-
|
|
39383
|
-
|
|
39384
|
-
|
|
38725
|
+
const validateWhenErrorMessage = type =>
|
|
38726
|
+
`${type} was passed to validateWhen, but that validator type does not exist.
|
|
38727
|
+
Please check that you are only calling validator creator functions exported from
|
|
38728
|
+
redux-freeform in your form config and that you didn't forget to
|
|
38729
|
+
invoke the validator creator (you cannot pass the functions themselves to
|
|
38730
|
+
createFormState). Also make sure you aren't passing validateWhen() to validateWhen
|
|
38731
|
+
as the primary validator.`;
|
|
38732
|
+
|
|
38733
|
+
const VALIDATE_WHEN = "validator/VALIDATE_WHEN";
|
|
38734
|
+
const VALIDATE_WHEN_ERROR = "error/VALIDATE_WHEN";
|
|
38735
|
+
const validateWhen = (
|
|
38736
|
+
dependentValidator,
|
|
38737
|
+
primaryValidator,
|
|
38738
|
+
optionalFieldName
|
|
38739
|
+
) => ({
|
|
38740
|
+
type: VALIDATE_WHEN,
|
|
38741
|
+
args: [dependentValidator, primaryValidator, optionalFieldName],
|
|
38742
|
+
error: dependentValidator.error
|
|
38743
|
+
});
|
|
39385
38744
|
validateWhen.error = VALIDATE_WHEN_ERROR;
|
|
39386
|
-
|
|
39387
|
-
|
|
39388
|
-
|
|
39389
|
-
|
|
39390
|
-
|
|
39391
|
-
|
|
39392
|
-
|
|
39393
|
-
|
|
39394
|
-
|
|
39395
|
-
if (primaryValidator.type === undefined || typeof validatorFns[primaryValidator.type] !== "function") {
|
|
38745
|
+
validatorFns[VALIDATE_WHEN] = (value, args, form) => {
|
|
38746
|
+
const [dependentValidator, primaryValidator, optionalFieldName] = args;
|
|
38747
|
+
const dependsOnOtherField = typeof optionalFieldName === "string";
|
|
38748
|
+
|
|
38749
|
+
if (
|
|
38750
|
+
primaryValidator.type === undefined ||
|
|
38751
|
+
typeof validatorFns[primaryValidator.type] !== "function"
|
|
38752
|
+
) {
|
|
39396
38753
|
throw new Error(validateWhenErrorMessage(primaryValidator.type));
|
|
39397
38754
|
}
|
|
39398
|
-
|
|
39399
38755
|
if (dependsOnOtherField && form[optionalFieldName] === undefined) {
|
|
39400
|
-
throw new Error(
|
|
38756
|
+
throw new Error(
|
|
38757
|
+
`${args[2]} was passed to matchesField, but that field does not exist in the form`
|
|
38758
|
+
);
|
|
39401
38759
|
}
|
|
39402
38760
|
|
|
39403
|
-
|
|
39404
|
-
|
|
39405
|
-
|
|
39406
|
-
|
|
39407
|
-
|
|
39408
|
-
|
|
39409
|
-
|
|
39410
|
-
|
|
39411
|
-
|
|
39412
|
-
|
|
39413
|
-
|
|
39414
|
-
|
|
39415
|
-
|
|
39416
|
-
|
|
39417
|
-
|
|
39418
|
-
|
|
39419
|
-
|
|
39420
|
-
|
|
39421
|
-
|
|
39422
|
-
|
|
39423
|
-
|
|
38761
|
+
const primaryPredicate = validatorToPredicate(
|
|
38762
|
+
validatorFns[primaryValidator.type],
|
|
38763
|
+
false
|
|
38764
|
+
);
|
|
38765
|
+
const primaryValue = dependsOnOtherField
|
|
38766
|
+
? form[optionalFieldName].rawValue
|
|
38767
|
+
: value;
|
|
38768
|
+
const primaryPredicatePassed = primaryPredicate(
|
|
38769
|
+
primaryValue,
|
|
38770
|
+
primaryValidator.args,
|
|
38771
|
+
form
|
|
38772
|
+
);
|
|
38773
|
+
|
|
38774
|
+
return primaryPredicatePassed
|
|
38775
|
+
? validatorFns[dependentValidator.type](
|
|
38776
|
+
value,
|
|
38777
|
+
dependentValidator.args,
|
|
38778
|
+
form
|
|
38779
|
+
)
|
|
38780
|
+
: true;
|
|
38781
|
+
};
|
|
38782
|
+
|
|
38783
|
+
const validateSumErrorMessage = type =>
|
|
38784
|
+
`${type} was passed to validateSum, but that validator type does not exist.
|
|
38785
|
+
Please check that you are only calling validator creator functions exported from
|
|
38786
|
+
redux-freeform in your form config and that you didn't forget to
|
|
38787
|
+
invoke the validator creator (you cannot pass the functions themselves to
|
|
38788
|
+
createFormState).`;
|
|
38789
|
+
const VALIDATE_SUM = "validator/VALIDATE_SUM";
|
|
38790
|
+
const VALIDATE_SUM_ERROR = "error/VALIDATE_SUM";
|
|
38791
|
+
const validateSum = (validator, fieldNamesArray) => ({
|
|
38792
|
+
type: VALIDATE_SUM,
|
|
38793
|
+
args: [validator, fieldNamesArray],
|
|
38794
|
+
error: validator.error
|
|
38795
|
+
});
|
|
39424
38796
|
validateSum.error = VALIDATE_SUM_ERROR;
|
|
38797
|
+
validatorFns[VALIDATE_SUM] = (value, args, form) => {
|
|
38798
|
+
const [validator, fieldNamesArray] = args;
|
|
39425
38799
|
|
|
39426
|
-
|
|
39427
|
-
|
|
39428
|
-
|
|
39429
|
-
|
|
39430
|
-
|
|
39431
|
-
if (validator.type === undefined || typeof validatorFns[validator.type] !== "function") {
|
|
38800
|
+
if (
|
|
38801
|
+
validator.type === undefined ||
|
|
38802
|
+
typeof validatorFns[validator.type] !== "function"
|
|
38803
|
+
) {
|
|
39432
38804
|
throw new Error(validateSumErrorMessage(validator.type));
|
|
39433
38805
|
}
|
|
39434
38806
|
|
|
39435
|
-
|
|
39436
|
-
|
|
39437
|
-
|
|
39438
|
-
|
|
39439
|
-
|
|
39440
|
-
var fieldName = _step.value;
|
|
39441
|
-
|
|
39442
|
-
if (form[fieldName] === undefined) {
|
|
39443
|
-
throw new Error("".concat(fieldName, " was passed to matchesField, but that field does not exist in the form"));
|
|
39444
|
-
}
|
|
38807
|
+
for (const fieldName of fieldNamesArray) {
|
|
38808
|
+
if (form[fieldName] === undefined) {
|
|
38809
|
+
throw new Error(
|
|
38810
|
+
`${fieldName} was passed to matchesField, but that field does not exist in the form`
|
|
38811
|
+
);
|
|
39445
38812
|
}
|
|
39446
|
-
} catch (err) {
|
|
39447
|
-
_iterator.e(err);
|
|
39448
|
-
} finally {
|
|
39449
|
-
_iterator.f();
|
|
39450
38813
|
}
|
|
39451
38814
|
|
|
39452
|
-
|
|
39453
|
-
|
|
39454
|
-
|
|
38815
|
+
const sum = fieldNamesArray.reduce(
|
|
38816
|
+
(acc, curr) => acc + Number(form[curr].rawValue),
|
|
38817
|
+
Number(value)
|
|
38818
|
+
);
|
|
38819
|
+
|
|
39455
38820
|
return validatorFns[validator.type](sum, validator.args, form);
|
|
39456
38821
|
};
|
|
39457
38822
|
|
|
39458
|
-
|
|
39459
|
-
|
|
39460
|
-
|
|
39461
|
-
|
|
39462
|
-
validatorFns[HAS_LENGTH] = function (value, args, form) {
|
|
38823
|
+
const HAS_LENGTH = "validator/HAS_LENGTH";
|
|
38824
|
+
const HAS_LENGTH_ERROR = "error/HAS_LENGTH";
|
|
38825
|
+
const hasLength = createValidator(HAS_LENGTH, HAS_LENGTH_ERROR);
|
|
38826
|
+
validatorFns[HAS_LENGTH] = (value, args, form) => {
|
|
39463
38827
|
if (value === "") {
|
|
39464
38828
|
return true;
|
|
39465
38829
|
}
|
|
39466
|
-
|
|
39467
|
-
|
|
39468
|
-
var max = args[1];
|
|
39469
|
-
|
|
38830
|
+
const min = args[0];
|
|
38831
|
+
const max = args[1];
|
|
39470
38832
|
if (max == undefined || min == undefined) {
|
|
39471
|
-
throw new Error(
|
|
38833
|
+
throw new Error(
|
|
38834
|
+
"Max and min need to be defined for hasLength, both or one of them is undefined"
|
|
38835
|
+
);
|
|
39472
38836
|
}
|
|
39473
|
-
|
|
39474
38837
|
if (max < min) {
|
|
39475
|
-
throw new Error(
|
|
38838
|
+
throw new Error(
|
|
38839
|
+
"hasLength validator was passed a min greater than the max"
|
|
38840
|
+
);
|
|
39476
38841
|
}
|
|
39477
|
-
|
|
39478
|
-
var valueLength = value.length;
|
|
38842
|
+
const valueLength = value.length;
|
|
39479
38843
|
return max >= valueLength && valueLength >= min;
|
|
39480
38844
|
};
|
|
39481
38845
|
|
|
39482
|
-
|
|
39483
|
-
|
|
39484
|
-
|
|
39485
|
-
|
|
39486
|
-
|
|
38846
|
+
const DATE_BEFORE_TODAY = "validator/DATE_BEFORE_TODAY";
|
|
38847
|
+
const DATE_BEFORE_TODAY_ERROR = "error/DATE_BEFORE_TODAY";
|
|
38848
|
+
const dateBeforeToday = createValidator(
|
|
38849
|
+
DATE_BEFORE_TODAY,
|
|
38850
|
+
DATE_BEFORE_TODAY_ERROR
|
|
38851
|
+
);
|
|
38852
|
+
validatorFns[DATE_BEFORE_TODAY] = (value, args, form) => {
|
|
39487
38853
|
if (value === "") {
|
|
39488
38854
|
return true;
|
|
39489
38855
|
}
|
|
39490
|
-
|
|
39491
|
-
|
|
39492
|
-
|
|
39493
|
-
var inclusive = args[2] || false;
|
|
38856
|
+
const dateFormat = args[0];
|
|
38857
|
+
const unit = args[1];
|
|
38858
|
+
const inclusive = args[2] || false;
|
|
39494
38859
|
|
|
39495
38860
|
if (dateFormat == undefined || unit == undefined) {
|
|
39496
|
-
throw new Error(
|
|
38861
|
+
throw new Error(
|
|
38862
|
+
"Date format and unit need to be defined for dateBeforeToday, one or both are undefined"
|
|
38863
|
+
);
|
|
39497
38864
|
}
|
|
39498
|
-
|
|
39499
|
-
|
|
39500
|
-
var dateValue = dayjs(value, dateFormat);
|
|
38865
|
+
const now = dayjs();
|
|
38866
|
+
const dateValue = dayjs(value, dateFormat);
|
|
39501
38867
|
|
|
39502
38868
|
if (inclusive === true) {
|
|
39503
38869
|
return dateValue.isSameOrBefore(now, unit);
|
|
39504
38870
|
}
|
|
39505
|
-
|
|
39506
38871
|
return dateValue.isBefore(now, unit);
|
|
39507
38872
|
};
|
|
39508
38873
|
|
|
39509
|
-
|
|
39510
|
-
|
|
39511
|
-
|
|
39512
|
-
|
|
39513
|
-
|
|
38874
|
+
const DATE_AFTER_TODAY = "validator/DATE_AFTER_TODAY";
|
|
38875
|
+
const DATE_AFTER_TODAY_ERROR = "error/DATE_AFTER_TODAY";
|
|
38876
|
+
const dateAfterToday = createValidator(
|
|
38877
|
+
DATE_AFTER_TODAY,
|
|
38878
|
+
DATE_AFTER_TODAY_ERROR
|
|
38879
|
+
);
|
|
38880
|
+
validatorFns[DATE_AFTER_TODAY] = (value, args, form) => {
|
|
39514
38881
|
if (value === "") {
|
|
39515
38882
|
return true;
|
|
39516
38883
|
}
|
|
39517
|
-
|
|
39518
|
-
|
|
39519
|
-
|
|
39520
|
-
var inclusive = args[2] || false;
|
|
38884
|
+
const dateFormat = args[0];
|
|
38885
|
+
const unit = args[1];
|
|
38886
|
+
const inclusive = args[2] || false;
|
|
39521
38887
|
|
|
39522
38888
|
if (dateFormat == undefined || unit == undefined) {
|
|
39523
|
-
throw new Error(
|
|
38889
|
+
throw new Error(
|
|
38890
|
+
"Date format and unit need to be defined for dateAfterToday, one or both are undefined"
|
|
38891
|
+
);
|
|
39524
38892
|
}
|
|
39525
|
-
|
|
39526
|
-
|
|
39527
|
-
var dateValue = dayjs(value, dateFormat);
|
|
38893
|
+
const now = dayjs();
|
|
38894
|
+
const dateValue = dayjs(value, dateFormat);
|
|
39528
38895
|
|
|
39529
38896
|
if (inclusive === true) {
|
|
39530
38897
|
return dateValue.isSameOrAfter(now, unit);
|
|
39531
38898
|
}
|
|
39532
|
-
|
|
39533
38899
|
return dateValue.isAfter(now, unit);
|
|
39534
38900
|
};
|
|
39535
38901
|
|
|
39536
|
-
|
|
39537
|
-
|
|
39538
|
-
|
|
39539
|
-
|
|
39540
|
-
|
|
38902
|
+
const IS_VALID_MONTH = "validator/IS_VALID_MONTH";
|
|
38903
|
+
const IS_VALID_MONTH_ERROR = "error/IS_VALID_MONTH";
|
|
38904
|
+
const isValidMonth = createValidator(
|
|
38905
|
+
IS_VALID_MONTH,
|
|
38906
|
+
IS_VALID_MONTH_ERROR
|
|
38907
|
+
);
|
|
38908
|
+
validatorFns[IS_VALID_MONTH] = (value, args, form) => {
|
|
39541
38909
|
if (value === "") {
|
|
39542
38910
|
return true;
|
|
39543
|
-
}
|
|
38911
|
+
}
|
|
38912
|
+
// Function takes one argument representing the character position
|
|
39544
38913
|
// In a date string to identify where the month is
|
|
39545
38914
|
// Eg "10/21/2021" - start position is 0
|
|
39546
38915
|
// Or "18/03/1990" - start position is 3
|
|
39547
38916
|
// Only works with two digit months (01, 02, 03, etc)
|
|
39548
|
-
|
|
39549
|
-
|
|
39550
|
-
|
|
39551
|
-
var monthEndPosition = monthStartPosition + 2;
|
|
39552
|
-
|
|
39553
|
-
if (isNaN(monthStartPosition)) {
|
|
38917
|
+
const monthStartPosition = parseInt(args[0]);
|
|
38918
|
+
const monthEndPosition = monthStartPosition + 2;
|
|
38919
|
+
if (monthStartPosition === NaN) {
|
|
39554
38920
|
throw new Error("Month start position has to be a valid integer string");
|
|
39555
38921
|
}
|
|
39556
|
-
|
|
39557
|
-
|
|
39558
|
-
|
|
39559
|
-
if (isNaN(month)) {
|
|
38922
|
+
const month = parseInt(value.slice(monthStartPosition, monthEndPosition));
|
|
38923
|
+
if (month === NaN) {
|
|
39560
38924
|
return false;
|
|
39561
38925
|
}
|
|
39562
|
-
|
|
39563
38926
|
return month >= 1 && month <= 12;
|
|
39564
38927
|
};
|
|
39565
38928
|
|
|
39566
|
-
|
|
39567
|
-
|
|
39568
|
-
|
|
39569
|
-
|
|
39570
|
-
validatorFns[MATCHES_REGEX] = function (value, args, form) {
|
|
38929
|
+
const MATCHES_REGEX = "validator/MATCHES_REGEX";
|
|
38930
|
+
const MATCHES_REGEX_ERROR = "error/MATCHES_REGEX";
|
|
38931
|
+
const matchesRegex = createValidator(MATCHES_REGEX, MATCHES_REGEX_ERROR);
|
|
38932
|
+
validatorFns[MATCHES_REGEX] = (value, args, form) => {
|
|
39571
38933
|
if (value === "") {
|
|
39572
38934
|
return true;
|
|
39573
38935
|
}
|
|
39574
|
-
|
|
39575
38936
|
return new RegExp(args[0]).test(value); // new RexExp never throws an error, no matter the input
|
|
39576
|
-
};
|
|
39577
|
-
|
|
39578
|
-
|
|
39579
|
-
var IS_ROUTING_NUMBER = "validator/IS_ROUTING_NUMBER";
|
|
39580
|
-
var IS_ROUTING_NUMBER_ERROR = "error/IS_ROUTING_NUMBER";
|
|
39581
|
-
var isRoutingNumber = createValidator(IS_ROUTING_NUMBER, IS_ROUTING_NUMBER_ERROR);
|
|
38937
|
+
};
|
|
39582
38938
|
|
|
39583
|
-
|
|
38939
|
+
// based on http://www.brainjar.com/js/validation/
|
|
38940
|
+
const IS_ROUTING_NUMBER = "validator/IS_ROUTING_NUMBER";
|
|
38941
|
+
const IS_ROUTING_NUMBER_ERROR = "error/IS_ROUTING_NUMBER";
|
|
38942
|
+
const isRoutingNumber = createValidator(
|
|
38943
|
+
IS_ROUTING_NUMBER,
|
|
38944
|
+
IS_ROUTING_NUMBER_ERROR
|
|
38945
|
+
);
|
|
38946
|
+
validatorFns[IS_ROUTING_NUMBER] = (value, args, form) => {
|
|
39584
38947
|
if (value === "") {
|
|
39585
38948
|
return true;
|
|
39586
38949
|
}
|
|
39587
|
-
|
|
39588
38950
|
if (value.length != 9) {
|
|
39589
38951
|
return false;
|
|
39590
38952
|
}
|
|
39591
|
-
|
|
39592
|
-
|
|
39593
|
-
|
|
39594
|
-
|
|
39595
|
-
|
|
39596
|
-
|
|
39597
|
-
|
|
39598
|
-
|
|
39599
|
-
|
|
39600
|
-
|
|
39601
|
-
|
|
39602
|
-
|
|
39603
|
-
|
|
39604
|
-
}
|
|
39605
|
-
}, 0);
|
|
38953
|
+
const sum = value
|
|
38954
|
+
.split("")
|
|
38955
|
+
.map(ch => parseInt(ch))
|
|
38956
|
+
.reduce((acc, cur, idx) => {
|
|
38957
|
+
switch (idx % 3) {
|
|
38958
|
+
case 0:
|
|
38959
|
+
return acc + 3 * cur;
|
|
38960
|
+
case 1:
|
|
38961
|
+
return acc + 7 * cur;
|
|
38962
|
+
case 2:
|
|
38963
|
+
return acc + 1 * cur;
|
|
38964
|
+
}
|
|
38965
|
+
}, 0);
|
|
39606
38966
|
return sum != 0 && sum % 10 == 0;
|
|
39607
38967
|
};
|
|
39608
38968
|
|
|
39609
|
-
|
|
39610
|
-
|
|
39611
|
-
|
|
39612
|
-
|
|
39613
|
-
validatorFns[HAS_NUMBER] = function (value, args, form) {
|
|
38969
|
+
const HAS_NUMBER = "validator/HAS_NUMBER";
|
|
38970
|
+
const HAS_NUMBER_ERROR$1 = "error/HAS_NUMBER";
|
|
38971
|
+
const hasNumber = createValidator(HAS_NUMBER, HAS_NUMBER_ERROR$1);
|
|
38972
|
+
validatorFns[HAS_NUMBER] = (value, args, form) => {
|
|
39614
38973
|
if (value === "") {
|
|
39615
38974
|
return true;
|
|
39616
38975
|
}
|
|
39617
|
-
|
|
39618
38976
|
return new RegExp(/[0-9]/).test(value);
|
|
39619
38977
|
};
|
|
39620
38978
|
|
|
39621
|
-
|
|
39622
|
-
|
|
39623
|
-
|
|
39624
|
-
|
|
39625
|
-
|
|
38979
|
+
const HAS_LOWERCASE_LETTER = "validator/HAS_LOWERCASE_LETTER";
|
|
38980
|
+
const HAS_LOWERCASE_LETTER_ERROR$1 = "error/HAS_LOWERCASE_LETTER";
|
|
38981
|
+
const hasLowercaseLetter = createValidator(
|
|
38982
|
+
HAS_LOWERCASE_LETTER,
|
|
38983
|
+
HAS_LOWERCASE_LETTER_ERROR$1
|
|
38984
|
+
);
|
|
38985
|
+
validatorFns[HAS_LOWERCASE_LETTER] = (value, args, form) => {
|
|
39626
38986
|
if (value === "") {
|
|
39627
38987
|
return true;
|
|
39628
38988
|
}
|
|
39629
|
-
|
|
39630
38989
|
return new RegExp(/[a-z]/).test(value);
|
|
39631
38990
|
};
|
|
39632
38991
|
|
|
39633
|
-
|
|
39634
|
-
|
|
39635
|
-
|
|
39636
|
-
|
|
39637
|
-
|
|
38992
|
+
const HAS_UPPERCASE_LETTER = "validator/HAS_UPPERCASE_LETTER";
|
|
38993
|
+
const HAS_UPPERCASE_LETTER_ERROR$1 = "error/HAS_UPPERCASE_LETTER";
|
|
38994
|
+
const hasUppercaseLetter = createValidator(
|
|
38995
|
+
HAS_UPPERCASE_LETTER,
|
|
38996
|
+
HAS_UPPERCASE_LETTER_ERROR$1
|
|
38997
|
+
);
|
|
38998
|
+
validatorFns[HAS_UPPERCASE_LETTER] = (value, args, form) => {
|
|
39638
38999
|
if (value === "") {
|
|
39639
39000
|
return true;
|
|
39640
39001
|
}
|
|
39641
|
-
|
|
39642
39002
|
return new RegExp(/[A-Z]/).test(value);
|
|
39643
39003
|
};
|
|
39644
39004
|
|
|
39645
|
-
|
|
39646
|
-
|
|
39647
|
-
|
|
39648
|
-
|
|
39649
|
-
|
|
39005
|
+
const HAS_SPECIAL_CHARACTER = "validator/HAS_SPECIAL_CHARACTER";
|
|
39006
|
+
const HAS_SPECIAL_CHARACTER_ERROR$1 = "error/HAS_SPECIAL_CHARACTER";
|
|
39007
|
+
const hasSpecialCharacter = createValidator(
|
|
39008
|
+
HAS_SPECIAL_CHARACTER,
|
|
39009
|
+
HAS_SPECIAL_CHARACTER_ERROR$1
|
|
39010
|
+
);
|
|
39011
|
+
validatorFns[HAS_SPECIAL_CHARACTER] = (value, args, form) => {
|
|
39650
39012
|
if (value === "") {
|
|
39651
39013
|
return true;
|
|
39652
39014
|
}
|
|
39653
|
-
|
|
39654
39015
|
return new RegExp(/[!@#$%^&*.?]/).test(value);
|
|
39655
39016
|
};
|
|
39656
39017
|
|
|
39657
|
-
|
|
39658
|
-
|
|
39659
|
-
|
|
39660
|
-
|
|
39661
|
-
|
|
39018
|
+
const IS_PROBABLY_EMAIL = "validator/IS_PROBABLY_EMAIL";
|
|
39019
|
+
const IS_PROBABLY_EMAIL_ERROR = "error/IS_PROBABLY_EMAIL";
|
|
39020
|
+
const isProbablyEmail = createValidator(
|
|
39021
|
+
IS_PROBABLY_EMAIL,
|
|
39022
|
+
IS_PROBABLY_EMAIL_ERROR
|
|
39023
|
+
);
|
|
39024
|
+
validatorFns[IS_PROBABLY_EMAIL] = (value, args, form) => {
|
|
39662
39025
|
if (value === "") {
|
|
39663
39026
|
return true;
|
|
39664
39027
|
}
|
|
39665
|
-
|
|
39666
39028
|
return new RegExp(/^\S+@\S+\.\S+$/).test(value);
|
|
39667
39029
|
};
|
|
39668
39030
|
|
|
39669
|
-
|
|
39670
|
-
|
|
39671
|
-
|
|
39672
|
-
|
|
39673
|
-
|
|
39674
|
-
|
|
39031
|
+
const runValidatorErrorMessage = type =>
|
|
39032
|
+
`${type} was passed to runValidator, but that validator type does not exist.
|
|
39033
|
+
Please check that you are only calling validator creator functions exported from
|
|
39034
|
+
redux-freeform in your form config and that you didn't forget to
|
|
39035
|
+
invoke the validator creator (you cannot pass the functions themselves to
|
|
39036
|
+
createFormState)`;
|
|
39675
39037
|
|
|
39038
|
+
const runValidator = (validator, value, form) => {
|
|
39039
|
+
const validatorFn = validatorFns[validator.type];
|
|
39676
39040
|
if (validatorFn === undefined) {
|
|
39677
39041
|
throw new Error(runValidatorErrorMessage(validator.type));
|
|
39678
39042
|
}
|
|
39679
|
-
|
|
39680
39043
|
return validatorFn(value, validator.args, form) ? null : validator.error;
|
|
39681
39044
|
};
|
|
39682
39045
|
|
|
39683
|
-
|
|
39684
|
-
return validators
|
|
39685
|
-
|
|
39686
|
-
|
|
39687
|
-
return x !== null;
|
|
39688
|
-
});
|
|
39689
|
-
};
|
|
39690
|
-
|
|
39691
|
-
var computeConstraints = function computeConstraints(fieldName, form) {
|
|
39692
|
-
var constraints = form[fieldName].constraints;
|
|
39693
|
-
return runFormValidators(fieldName, form, constraints);
|
|
39694
|
-
};
|
|
39695
|
-
|
|
39696
|
-
var computeErrors = function computeErrors(fieldName, form) {
|
|
39697
|
-
var validators = form[fieldName].validators;
|
|
39698
|
-
return runFormValidators(fieldName, form, validators);
|
|
39046
|
+
const _computeErrors = (fieldName, form, validators) => {
|
|
39047
|
+
return validators
|
|
39048
|
+
.map(v => runValidator(v, form[fieldName].rawValue, form))
|
|
39049
|
+
.filter(x => x !== null);
|
|
39699
39050
|
};
|
|
39700
39051
|
|
|
39701
|
-
|
|
39702
|
-
|
|
39703
|
-
|
|
39704
|
-
for (var _i = 0, _fields = fields; _i < _fields.length; _i++) {
|
|
39705
|
-
var entry = _fields[_i];
|
|
39706
|
-
var fieldName = entry[0];
|
|
39707
|
-
var errors = computeErrors(fieldName, formState);
|
|
39708
|
-
formState[fieldName].errors = errors;
|
|
39709
|
-
formState[fieldName].hasErrors = errors.length > 0;
|
|
39710
|
-
}
|
|
39052
|
+
const computeConstraints = (fieldName, form) => {
|
|
39053
|
+
const constraints = form[fieldName].constraints;
|
|
39054
|
+
return _computeErrors(fieldName, form, constraints);
|
|
39711
39055
|
};
|
|
39712
39056
|
|
|
39713
|
-
|
|
39714
|
-
|
|
39715
|
-
|
|
39716
|
-
for (var _i2 = 0, _fields2 = fields; _i2 < _fields2.length; _i2++) {
|
|
39717
|
-
var entry = _fields2[_i2];
|
|
39718
|
-
var fieldName = entry[0];
|
|
39719
|
-
var field = entry[1];
|
|
39720
|
-
var dirty = fieldName === changedFieldName ? true : field.dirty;
|
|
39721
|
-
formState[fieldName].dirty = dirty;
|
|
39722
|
-
}
|
|
39057
|
+
const computeErrors = (fieldName, form) => {
|
|
39058
|
+
const validators = form[fieldName].validators;
|
|
39059
|
+
return _computeErrors(fieldName, form, validators);
|
|
39723
39060
|
};
|
|
39724
39061
|
|
|
39725
39062
|
var obj;
|
|
39726
|
-
var NOTHING = typeof Symbol !== "undefined" ? Symbol("immer-nothing") : (obj = {}, obj["immer-nothing"] = true, obj);
|
|
39727
|
-
var DRAFTABLE = typeof Symbol !== "undefined" && Symbol
|
|
39728
|
-
var DRAFT_STATE = typeof Symbol !== "undefined" && Symbol
|
|
39729
|
-
|
|
39063
|
+
var NOTHING = typeof Symbol !== "undefined" ? Symbol("immer-nothing") : ( obj = {}, obj["immer-nothing"] = true, obj );
|
|
39064
|
+
var DRAFTABLE = typeof Symbol !== "undefined" && Symbol.for ? Symbol.for("immer-draftable") : "__$immer_draftable";
|
|
39065
|
+
var DRAFT_STATE = typeof Symbol !== "undefined" && Symbol.for ? Symbol.for("immer-state") : "__$immer_state";
|
|
39730
39066
|
function isDraft(value) {
|
|
39731
39067
|
return !!value && !!value[DRAFT_STATE];
|
|
39732
39068
|
}
|
|
39733
|
-
|
|
39734
39069
|
function isDraftable(value) {
|
|
39735
|
-
if (!value) {
|
|
39736
|
-
return false;
|
|
39737
|
-
}
|
|
39738
|
-
|
|
39070
|
+
if (!value) { return false; }
|
|
39739
39071
|
return isPlainObject(value) || !!value[DRAFTABLE] || !!value.constructor[DRAFTABLE];
|
|
39740
39072
|
}
|
|
39741
|
-
|
|
39742
39073
|
function isPlainObject(value) {
|
|
39743
|
-
if (!value ||
|
|
39744
|
-
|
|
39745
|
-
}
|
|
39746
|
-
|
|
39747
|
-
if (Array.isArray(value)) {
|
|
39748
|
-
return true;
|
|
39749
|
-
}
|
|
39750
|
-
|
|
39074
|
+
if (!value || typeof value !== "object") { return false; }
|
|
39075
|
+
if (Array.isArray(value)) { return true; }
|
|
39751
39076
|
var proto = Object.getPrototypeOf(value);
|
|
39752
39077
|
return !proto || proto === Object.prototype;
|
|
39753
39078
|
}
|
|
39754
|
-
|
|
39755
39079
|
var assign = Object.assign || function assign(target, value) {
|
|
39756
39080
|
for (var key in value) {
|
|
39757
39081
|
if (has$1(value, key)) {
|
|
@@ -39761,18 +39085,11 @@ var assign = Object.assign || function assign(target, value) {
|
|
|
39761
39085
|
|
|
39762
39086
|
return target;
|
|
39763
39087
|
};
|
|
39764
|
-
|
|
39765
|
-
var ownKeys$2 = typeof Reflect !== "undefined" && Reflect.ownKeys ? Reflect.ownKeys : typeof Object.getOwnPropertySymbols !== "undefined" ? function (obj) {
|
|
39766
|
-
return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj));
|
|
39767
|
-
} : Object.getOwnPropertyNames;
|
|
39768
|
-
|
|
39088
|
+
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;
|
|
39769
39089
|
function shallowCopy(base, invokeGetters) {
|
|
39770
|
-
if (invokeGetters === void 0) invokeGetters = false;
|
|
39771
|
-
|
|
39772
|
-
if (Array.isArray(base)) {
|
|
39773
|
-
return base.slice();
|
|
39774
|
-
}
|
|
39090
|
+
if ( invokeGetters === void 0 ) invokeGetters = false;
|
|
39775
39091
|
|
|
39092
|
+
if (Array.isArray(base)) { return base.slice(); }
|
|
39776
39093
|
var clone = Object.create(Object.getPrototypeOf(base));
|
|
39777
39094
|
ownKeys$2(base).forEach(function (key) {
|
|
39778
39095
|
if (key === DRAFT_STATE) {
|
|
@@ -39802,28 +39119,20 @@ function shallowCopy(base, invokeGetters) {
|
|
|
39802
39119
|
});
|
|
39803
39120
|
return clone;
|
|
39804
39121
|
}
|
|
39805
|
-
|
|
39806
39122
|
function each(value, cb) {
|
|
39807
39123
|
if (Array.isArray(value)) {
|
|
39808
|
-
for (var i = 0; i < value.length; i++) {
|
|
39809
|
-
cb(i, value[i], value);
|
|
39810
|
-
}
|
|
39124
|
+
for (var i = 0; i < value.length; i++) { cb(i, value[i], value); }
|
|
39811
39125
|
} else {
|
|
39812
|
-
ownKeys$2(value).forEach(function (key) {
|
|
39813
|
-
return cb(key, value[key], value);
|
|
39814
|
-
});
|
|
39126
|
+
ownKeys$2(value).forEach(function (key) { return cb(key, value[key], value); });
|
|
39815
39127
|
}
|
|
39816
39128
|
}
|
|
39817
|
-
|
|
39818
39129
|
function isEnumerable(base, prop) {
|
|
39819
39130
|
var desc = Object.getOwnPropertyDescriptor(base, prop);
|
|
39820
39131
|
return !!desc && desc.enumerable;
|
|
39821
39132
|
}
|
|
39822
|
-
|
|
39823
39133
|
function has$1(thing, prop) {
|
|
39824
39134
|
return Object.prototype.hasOwnProperty.call(thing, prop);
|
|
39825
39135
|
}
|
|
39826
|
-
|
|
39827
39136
|
function is(x, y) {
|
|
39828
39137
|
// From: https://github.com/facebook/fbjs/blob/c69904a511b900266935168223063dd8772dfc40/packages/fbjs/src/core/shallowEqual.js
|
|
39829
39138
|
if (x === y) {
|
|
@@ -39832,26 +39141,17 @@ function is(x, y) {
|
|
|
39832
39141
|
return x !== x && y !== y;
|
|
39833
39142
|
}
|
|
39834
39143
|
}
|
|
39835
|
-
|
|
39836
39144
|
function clone(obj) {
|
|
39837
|
-
if (!isDraftable(obj)) {
|
|
39838
|
-
|
|
39839
|
-
}
|
|
39840
|
-
|
|
39841
|
-
if (Array.isArray(obj)) {
|
|
39842
|
-
return obj.map(clone);
|
|
39843
|
-
}
|
|
39844
|
-
|
|
39145
|
+
if (!isDraftable(obj)) { return obj; }
|
|
39146
|
+
if (Array.isArray(obj)) { return obj.map(clone); }
|
|
39845
39147
|
var cloned = Object.create(Object.getPrototypeOf(obj));
|
|
39846
39148
|
|
|
39847
|
-
for (var key in obj) {
|
|
39848
|
-
cloned[key] = clone(obj[key]);
|
|
39849
|
-
}
|
|
39149
|
+
for (var key in obj) { cloned[key] = clone(obj[key]); }
|
|
39850
39150
|
|
|
39851
39151
|
return cloned;
|
|
39852
39152
|
}
|
|
39853
|
-
/** Each scope represents a `produce` call. */
|
|
39854
39153
|
|
|
39154
|
+
/** Each scope represents a `produce` call. */
|
|
39855
39155
|
|
|
39856
39156
|
var ImmerScope = function ImmerScope(parent) {
|
|
39857
39157
|
this.drafts = [];
|
|
@@ -39863,7 +39163,7 @@ var ImmerScope = function ImmerScope(parent) {
|
|
|
39863
39163
|
this.patches = null;
|
|
39864
39164
|
};
|
|
39865
39165
|
|
|
39866
|
-
ImmerScope.prototype.usePatches = function usePatches(patchListener) {
|
|
39166
|
+
ImmerScope.prototype.usePatches = function usePatches (patchListener) {
|
|
39867
39167
|
if (patchListener) {
|
|
39868
39168
|
this.patches = [];
|
|
39869
39169
|
this.inversePatches = [];
|
|
@@ -39871,18 +39171,17 @@ ImmerScope.prototype.usePatches = function usePatches(patchListener) {
|
|
|
39871
39171
|
}
|
|
39872
39172
|
};
|
|
39873
39173
|
|
|
39874
|
-
ImmerScope.prototype.revoke = function revoke$1() {
|
|
39174
|
+
ImmerScope.prototype.revoke = function revoke$1 () {
|
|
39875
39175
|
this.leave();
|
|
39876
39176
|
this.drafts.forEach(revoke);
|
|
39877
39177
|
this.drafts = null; // Make draft-related methods throw.
|
|
39878
39178
|
};
|
|
39879
39179
|
|
|
39880
|
-
ImmerScope.prototype.leave = function leave() {
|
|
39180
|
+
ImmerScope.prototype.leave = function leave () {
|
|
39881
39181
|
if (this === ImmerScope.current) {
|
|
39882
39182
|
ImmerScope.current = this.parent;
|
|
39883
39183
|
}
|
|
39884
39184
|
};
|
|
39885
|
-
|
|
39886
39185
|
ImmerScope.current = null;
|
|
39887
39186
|
|
|
39888
39187
|
ImmerScope.enter = function () {
|
|
@@ -39891,11 +39190,11 @@ ImmerScope.enter = function () {
|
|
|
39891
39190
|
|
|
39892
39191
|
function revoke(draft) {
|
|
39893
39192
|
draft[DRAFT_STATE].revoke();
|
|
39894
|
-
}
|
|
39193
|
+
}
|
|
39895
39194
|
|
|
39195
|
+
// but share them all instead
|
|
39896
39196
|
|
|
39897
39197
|
var descriptors$1 = {};
|
|
39898
|
-
|
|
39899
39198
|
function willFinalize(scope, result, isReplaced) {
|
|
39900
39199
|
scope.drafts.forEach(function (draft) {
|
|
39901
39200
|
draft[DRAFT_STATE].finalizing = true;
|
|
@@ -39910,10 +39209,9 @@ function willFinalize(scope, result, isReplaced) {
|
|
|
39910
39209
|
markChangesSweep(scope.drafts);
|
|
39911
39210
|
} // When a child draft is returned, look for changes.
|
|
39912
39211
|
else if (isDraft(result) && result[DRAFT_STATE].scope === scope) {
|
|
39913
|
-
|
|
39914
|
-
|
|
39212
|
+
markChangesSweep(scope.drafts);
|
|
39213
|
+
}
|
|
39915
39214
|
}
|
|
39916
|
-
|
|
39917
39215
|
function createProxy(base, parent) {
|
|
39918
39216
|
var isArray = Array.isArray(base);
|
|
39919
39217
|
var draft = clonePotentialDraft(base);
|
|
@@ -39967,11 +39265,7 @@ function peek(draft, prop) {
|
|
|
39967
39265
|
function get$1(state, prop) {
|
|
39968
39266
|
assertUnrevoked(state);
|
|
39969
39267
|
var value = peek(source(state), prop);
|
|
39970
|
-
|
|
39971
|
-
if (state.finalizing) {
|
|
39972
|
-
return value;
|
|
39973
|
-
} // Create a draft if the value is unmodified.
|
|
39974
|
-
|
|
39268
|
+
if (state.finalizing) { return value; } // Create a draft if the value is unmodified.
|
|
39975
39269
|
|
|
39976
39270
|
if (value === peek(state.base, prop) && isDraftable(value)) {
|
|
39977
39271
|
prepareCopy(state);
|
|
@@ -39986,10 +39280,7 @@ function set$1(state, prop, value) {
|
|
|
39986
39280
|
state.assigned[prop] = true;
|
|
39987
39281
|
|
|
39988
39282
|
if (!state.modified) {
|
|
39989
|
-
if (is(value, peek(source(state), prop))) {
|
|
39990
|
-
return;
|
|
39991
|
-
}
|
|
39992
|
-
|
|
39283
|
+
if (is(value, peek(source(state), prop))) { return; }
|
|
39993
39284
|
markChanged(state);
|
|
39994
39285
|
prepareCopy(state);
|
|
39995
39286
|
}
|
|
@@ -40000,17 +39291,12 @@ function set$1(state, prop, value) {
|
|
|
40000
39291
|
function markChanged(state) {
|
|
40001
39292
|
if (!state.modified) {
|
|
40002
39293
|
state.modified = true;
|
|
40003
|
-
|
|
40004
|
-
if (state.parent) {
|
|
40005
|
-
markChanged(state.parent);
|
|
40006
|
-
}
|
|
39294
|
+
if (state.parent) { markChanged(state.parent); }
|
|
40007
39295
|
}
|
|
40008
39296
|
}
|
|
40009
39297
|
|
|
40010
39298
|
function prepareCopy(state) {
|
|
40011
|
-
if (!state.copy) {
|
|
40012
|
-
state.copy = clonePotentialDraft(state.base);
|
|
40013
|
-
}
|
|
39299
|
+
if (!state.copy) { state.copy = clonePotentialDraft(state.base); }
|
|
40014
39300
|
}
|
|
40015
39301
|
|
|
40016
39302
|
function clonePotentialDraft(base) {
|
|
@@ -40035,12 +39321,15 @@ function proxyProperty(draft, prop, enumerable) {
|
|
|
40035
39321
|
descriptors$1[prop] = desc = {
|
|
40036
39322
|
configurable: true,
|
|
40037
39323
|
enumerable: enumerable,
|
|
39324
|
+
|
|
40038
39325
|
get: function get$1$1() {
|
|
40039
39326
|
return get$1(this[DRAFT_STATE], prop);
|
|
40040
39327
|
},
|
|
39328
|
+
|
|
40041
39329
|
set: function set$1$1(value) {
|
|
40042
39330
|
set$1(this[DRAFT_STATE], prop, value);
|
|
40043
39331
|
}
|
|
39332
|
+
|
|
40044
39333
|
};
|
|
40045
39334
|
}
|
|
40046
39335
|
|
|
@@ -40048,9 +39337,7 @@ function proxyProperty(draft, prop, enumerable) {
|
|
|
40048
39337
|
}
|
|
40049
39338
|
|
|
40050
39339
|
function assertUnrevoked(state) {
|
|
40051
|
-
if (state.revoked === true) {
|
|
40052
|
-
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)));
|
|
40053
|
-
}
|
|
39340
|
+
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))); }
|
|
40054
39341
|
} // This looks expensive, but only proxies are visited, and only objects without known changes are scanned.
|
|
40055
39342
|
|
|
40056
39343
|
|
|
@@ -40064,27 +39351,16 @@ function markChangesSweep(drafts) {
|
|
|
40064
39351
|
|
|
40065
39352
|
if (!state.modified) {
|
|
40066
39353
|
if (Array.isArray(state.base)) {
|
|
40067
|
-
if (hasArrayChanges(state)) {
|
|
40068
|
-
|
|
40069
|
-
}
|
|
40070
|
-
} else if (hasObjectChanges(state)) {
|
|
40071
|
-
markChanged(state);
|
|
40072
|
-
}
|
|
39354
|
+
if (hasArrayChanges(state)) { markChanged(state); }
|
|
39355
|
+
} else if (hasObjectChanges(state)) { markChanged(state); }
|
|
40073
39356
|
}
|
|
40074
39357
|
}
|
|
40075
39358
|
}
|
|
40076
39359
|
|
|
40077
39360
|
function markChangesRecursively(object) {
|
|
40078
|
-
if (!object ||
|
|
40079
|
-
return;
|
|
40080
|
-
}
|
|
40081
|
-
|
|
39361
|
+
if (!object || typeof object !== "object") { return; }
|
|
40082
39362
|
var state = object[DRAFT_STATE];
|
|
40083
|
-
|
|
40084
|
-
if (!state) {
|
|
40085
|
-
return;
|
|
40086
|
-
}
|
|
40087
|
-
|
|
39363
|
+
if (!state) { return; }
|
|
40088
39364
|
var base = state.base;
|
|
40089
39365
|
var draft = state.draft;
|
|
40090
39366
|
var assigned = state.assigned;
|
|
@@ -40114,20 +39390,14 @@ function markChangesRecursively(object) {
|
|
|
40114
39390
|
assigned.length = true;
|
|
40115
39391
|
|
|
40116
39392
|
if (draft.length < base.length) {
|
|
40117
|
-
for (var i = draft.length; i < base.length; i++) {
|
|
40118
|
-
assigned[i] = false;
|
|
40119
|
-
}
|
|
39393
|
+
for (var i = draft.length; i < base.length; i++) { assigned[i] = false; }
|
|
40120
39394
|
} else {
|
|
40121
|
-
for (var i$1 = base.length; i$1 < draft.length; i$1++) {
|
|
40122
|
-
assigned[i$1] = true;
|
|
40123
|
-
}
|
|
39395
|
+
for (var i$1 = base.length; i$1 < draft.length; i$1++) { assigned[i$1] = true; }
|
|
40124
39396
|
}
|
|
40125
39397
|
|
|
40126
39398
|
for (var i$2 = 0; i$2 < draft.length; i$2++) {
|
|
40127
39399
|
// Only untouched indices trigger recursion.
|
|
40128
|
-
if (assigned[i$2] === undefined) {
|
|
40129
|
-
markChangesRecursively(draft[i$2]);
|
|
40130
|
-
}
|
|
39400
|
+
if (assigned[i$2] === undefined) { markChangesRecursively(draft[i$2]); }
|
|
40131
39401
|
}
|
|
40132
39402
|
}
|
|
40133
39403
|
}
|
|
@@ -40148,13 +39418,13 @@ function hasObjectChanges(state) {
|
|
|
40148
39418
|
} // Once a base key is deleted, future changes go undetected, because its
|
|
40149
39419
|
// descriptor is erased. This branch detects any missed changes.
|
|
40150
39420
|
else {
|
|
40151
|
-
|
|
40152
|
-
|
|
39421
|
+
var value = draft[key];
|
|
39422
|
+
var state$1 = value && value[DRAFT_STATE];
|
|
40153
39423
|
|
|
40154
|
-
|
|
40155
|
-
|
|
39424
|
+
if (state$1 ? state$1.base !== baseValue : !is(value, baseValue)) {
|
|
39425
|
+
return true;
|
|
39426
|
+
}
|
|
40156
39427
|
}
|
|
40157
|
-
}
|
|
40158
39428
|
} // At this point, no keys were added or changed.
|
|
40159
39429
|
// Compare key count to determine if keys were deleted.
|
|
40160
39430
|
|
|
@@ -40164,10 +39434,7 @@ function hasObjectChanges(state) {
|
|
|
40164
39434
|
|
|
40165
39435
|
function hasArrayChanges(state) {
|
|
40166
39436
|
var draft = state.draft;
|
|
40167
|
-
|
|
40168
|
-
if (draft.length !== state.base.length) {
|
|
40169
|
-
return true;
|
|
40170
|
-
} // See #116
|
|
39437
|
+
if (draft.length !== state.base.length) { return true; } // See #116
|
|
40171
39438
|
// If we first shorten the length, our array interceptors will be removed.
|
|
40172
39439
|
// If after that new items are added, result in the same original length,
|
|
40173
39440
|
// those last items will have no intercepting property.
|
|
@@ -40175,13 +39442,9 @@ function hasArrayChanges(state) {
|
|
|
40175
39442
|
// N.B.: splice, unshift, etc only shift values around, but not prop descriptors, so we only have to check
|
|
40176
39443
|
// the last one
|
|
40177
39444
|
|
|
40178
|
-
|
|
40179
39445
|
var descriptor = Object.getOwnPropertyDescriptor(draft, draft.length - 1); // descriptor can be null, but only for newly created sparse arrays, eg. new Array(10)
|
|
40180
39446
|
|
|
40181
|
-
if (descriptor && !descriptor.get) {
|
|
40182
|
-
return true;
|
|
40183
|
-
} // For all other cases, we don't have to compare, as they would have been picked up by the index setters
|
|
40184
|
-
|
|
39447
|
+
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
|
|
40185
39448
|
|
|
40186
39449
|
return false;
|
|
40187
39450
|
}
|
|
@@ -40195,12 +39458,11 @@ function createHiddenProperty(target, prop, value) {
|
|
|
40195
39458
|
}
|
|
40196
39459
|
|
|
40197
39460
|
var legacyProxy = /*#__PURE__*/Object.freeze({
|
|
40198
|
-
|
|
40199
|
-
|
|
39461
|
+
willFinalize: willFinalize,
|
|
39462
|
+
createProxy: createProxy
|
|
40200
39463
|
});
|
|
40201
39464
|
|
|
40202
39465
|
function willFinalize$1() {}
|
|
40203
|
-
|
|
40204
39466
|
function createProxy$1(base, parent) {
|
|
40205
39467
|
var scope = parent ? parent.scope : ImmerScope.current;
|
|
40206
39468
|
var state = {
|
|
@@ -40235,27 +39497,33 @@ function createProxy$1(base, parent) {
|
|
|
40235
39497
|
scope.drafts.push(proxy);
|
|
40236
39498
|
return proxy;
|
|
40237
39499
|
}
|
|
40238
|
-
|
|
40239
39500
|
var objectTraps = {
|
|
40240
39501
|
get: get$1$1,
|
|
39502
|
+
|
|
40241
39503
|
has: function has(target, prop) {
|
|
40242
39504
|
return prop in source$1(target);
|
|
40243
39505
|
},
|
|
39506
|
+
|
|
40244
39507
|
ownKeys: function ownKeys(target) {
|
|
40245
39508
|
return Reflect.ownKeys(source$1(target));
|
|
40246
39509
|
},
|
|
39510
|
+
|
|
40247
39511
|
set: set$1$1,
|
|
40248
39512
|
deleteProperty: deleteProperty,
|
|
40249
39513
|
getOwnPropertyDescriptor: getOwnPropertyDescriptor$2,
|
|
39514
|
+
|
|
40250
39515
|
defineProperty: function defineProperty() {
|
|
40251
39516
|
throw new Error("Object.defineProperty() cannot be used on an Immer draft"); // prettier-ignore
|
|
40252
39517
|
},
|
|
39518
|
+
|
|
40253
39519
|
getPrototypeOf: function getPrototypeOf(target) {
|
|
40254
39520
|
return Object.getPrototypeOf(target.base);
|
|
40255
39521
|
},
|
|
39522
|
+
|
|
40256
39523
|
setPrototypeOf: function setPrototypeOf() {
|
|
40257
39524
|
throw new Error("Object.setPrototypeOf() cannot be used on an Immer draft"); // prettier-ignore
|
|
40258
39525
|
}
|
|
39526
|
+
|
|
40259
39527
|
};
|
|
40260
39528
|
var arrayTraps = {};
|
|
40261
39529
|
each(objectTraps, function (key, fn) {
|
|
@@ -40294,10 +39562,7 @@ function peek$1(draft, prop) {
|
|
|
40294
39562
|
}
|
|
40295
39563
|
|
|
40296
39564
|
function get$1$1(state, prop) {
|
|
40297
|
-
if (prop === DRAFT_STATE) {
|
|
40298
|
-
return state;
|
|
40299
|
-
}
|
|
40300
|
-
|
|
39565
|
+
if (prop === DRAFT_STATE) { return state; }
|
|
40301
39566
|
var drafts = state.drafts; // Check for existing draft in unmodified state.
|
|
40302
39567
|
|
|
40303
39568
|
if (!state.modified && has$1(drafts, prop)) {
|
|
@@ -40313,10 +39578,7 @@ function get$1$1(state, prop) {
|
|
|
40313
39578
|
|
|
40314
39579
|
if (state.modified) {
|
|
40315
39580
|
// Assigned values are never drafted. This catches any drafts we created, too.
|
|
40316
|
-
if (value !== peek$1(state.base, prop)) {
|
|
40317
|
-
return value;
|
|
40318
|
-
} // Store drafts on the copy (when one exists).
|
|
40319
|
-
|
|
39581
|
+
if (value !== peek$1(state.base, prop)) { return value; } // Store drafts on the copy (when one exists).
|
|
40320
39582
|
|
|
40321
39583
|
drafts = state.copy;
|
|
40322
39584
|
}
|
|
@@ -40331,11 +39593,7 @@ function set$1$1(state, prop, value) {
|
|
|
40331
39593
|
// values may be drafts, but falsy values are never drafts.
|
|
40332
39594
|
|
|
40333
39595
|
var isUnchanged = value ? is(baseValue, value) || value === state.drafts[prop] : is(baseValue, value) && prop in state.base;
|
|
40334
|
-
|
|
40335
|
-
if (isUnchanged) {
|
|
40336
|
-
return true;
|
|
40337
|
-
}
|
|
40338
|
-
|
|
39596
|
+
if (isUnchanged) { return true; }
|
|
40339
39597
|
markChanged$1(state);
|
|
40340
39598
|
}
|
|
40341
39599
|
|
|
@@ -40354,10 +39612,7 @@ function deleteProperty(state, prop) {
|
|
|
40354
39612
|
delete state.assigned[prop];
|
|
40355
39613
|
}
|
|
40356
39614
|
|
|
40357
|
-
if (state.copy) {
|
|
40358
|
-
delete state.copy[prop];
|
|
40359
|
-
}
|
|
40360
|
-
|
|
39615
|
+
if (state.copy) { delete state.copy[prop]; }
|
|
40361
39616
|
return true;
|
|
40362
39617
|
} // Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
|
40363
39618
|
// the same guarantee in ES5 mode.
|
|
@@ -40380,16 +39635,13 @@ function markChanged$1(state) {
|
|
|
40380
39635
|
state.modified = true;
|
|
40381
39636
|
state.copy = assign(shallowCopy(state.base), state.drafts);
|
|
40382
39637
|
state.drafts = null;
|
|
40383
|
-
|
|
40384
|
-
if (state.parent) {
|
|
40385
|
-
markChanged$1(state.parent);
|
|
40386
|
-
}
|
|
39638
|
+
if (state.parent) { markChanged$1(state.parent); }
|
|
40387
39639
|
}
|
|
40388
39640
|
}
|
|
40389
39641
|
|
|
40390
39642
|
var modernProxy = /*#__PURE__*/Object.freeze({
|
|
40391
|
-
|
|
40392
|
-
|
|
39643
|
+
willFinalize: willFinalize$1,
|
|
39644
|
+
createProxy: createProxy$1
|
|
40393
39645
|
});
|
|
40394
39646
|
|
|
40395
39647
|
function generatePatches(state, basePath, patches, inversePatches) {
|
|
@@ -40398,13 +39650,14 @@ function generatePatches(state, basePath, patches, inversePatches) {
|
|
|
40398
39650
|
|
|
40399
39651
|
function generateArrayPatches(state, basePath, patches, inversePatches) {
|
|
40400
39652
|
var assign, assign$1;
|
|
39653
|
+
|
|
40401
39654
|
var base = state.base;
|
|
40402
39655
|
var copy = state.copy;
|
|
40403
39656
|
var assigned = state.assigned; // Reduce complexity by ensuring `base` is never longer.
|
|
40404
39657
|
|
|
40405
39658
|
if (copy.length < base.length) {
|
|
40406
|
-
assign = [copy, base], base = assign[0], copy = assign[1];
|
|
40407
|
-
assign$1 = [inversePatches, patches], patches = assign$1[0], inversePatches = assign$1[1];
|
|
39659
|
+
(assign = [copy, base], base = assign[0], copy = assign[1]);
|
|
39660
|
+
(assign$1 = [inversePatches, patches], patches = assign$1[0], inversePatches = assign$1[1]);
|
|
40408
39661
|
}
|
|
40409
39662
|
|
|
40410
39663
|
var delta = copy.length - base.length; // Find the first replaced index.
|
|
@@ -40462,11 +39715,7 @@ function generateObjectPatches(state, basePath, patches, inversePatches) {
|
|
|
40462
39715
|
var origValue = base[key];
|
|
40463
39716
|
var value = copy[key];
|
|
40464
39717
|
var op = !assignedValue ? "remove" : key in base ? "replace" : "add";
|
|
40465
|
-
|
|
40466
|
-
if (origValue === value && op === "replace") {
|
|
40467
|
-
return;
|
|
40468
|
-
}
|
|
40469
|
-
|
|
39718
|
+
if (origValue === value && op === "replace") { return; }
|
|
40470
39719
|
var path = basePath.concat(key);
|
|
40471
39720
|
patches.push(op === "remove" ? {
|
|
40472
39721
|
op: op,
|
|
@@ -40491,26 +39740,20 @@ function generateObjectPatches(state, basePath, patches, inversePatches) {
|
|
|
40491
39740
|
});
|
|
40492
39741
|
}
|
|
40493
39742
|
|
|
40494
|
-
var applyPatches = function
|
|
39743
|
+
var applyPatches = function (draft, patches) {
|
|
40495
39744
|
for (var i$1 = 0, list = patches; i$1 < list.length; i$1 += 1) {
|
|
40496
39745
|
var patch = list[i$1];
|
|
39746
|
+
|
|
40497
39747
|
var path = patch.path;
|
|
40498
39748
|
var op = patch.op;
|
|
40499
39749
|
var value = clone(patch.value); // used to clone patch to ensure original patch is not modified, see #411
|
|
40500
39750
|
|
|
40501
|
-
if (!path.length) {
|
|
40502
|
-
throw new Error("Illegal state");
|
|
40503
|
-
}
|
|
40504
|
-
|
|
39751
|
+
if (!path.length) { throw new Error("Illegal state"); }
|
|
40505
39752
|
var base = draft;
|
|
40506
39753
|
|
|
40507
39754
|
for (var i = 0; i < path.length - 1; i++) {
|
|
40508
39755
|
base = base[path[i]];
|
|
40509
|
-
|
|
40510
|
-
if (!base || _typeof(base) !== "object") {
|
|
40511
|
-
throw new Error("Cannot apply patch, path doesn't resolve: " + path.join("/"));
|
|
40512
|
-
} // prettier-ignore
|
|
40513
|
-
|
|
39756
|
+
if (!base || typeof base !== "object") { throw new Error("Cannot apply patch, path doesn't resolve: " + path.join("/")); } // prettier-ignore
|
|
40514
39757
|
}
|
|
40515
39758
|
|
|
40516
39759
|
var key = path[path.length - 1];
|
|
@@ -40559,33 +39802,27 @@ var configDefaults = {
|
|
|
40559
39802
|
onDelete: null,
|
|
40560
39803
|
onCopy: null
|
|
40561
39804
|
};
|
|
40562
|
-
|
|
40563
39805
|
var Immer = function Immer(config) {
|
|
40564
39806
|
assign(this, configDefaults, config);
|
|
40565
39807
|
this.setUseProxies(this.useProxies);
|
|
40566
39808
|
this.produce = this.produce.bind(this);
|
|
40567
39809
|
};
|
|
40568
39810
|
|
|
40569
|
-
Immer.prototype.produce = function produce(base, recipe, patchListener) {
|
|
40570
|
-
|
|
39811
|
+
Immer.prototype.produce = function produce (base, recipe, patchListener) {
|
|
39812
|
+
var this$1$1 = this;
|
|
40571
39813
|
|
|
39814
|
+
// curried invocation
|
|
40572
39815
|
if (typeof base === "function" && typeof recipe !== "function") {
|
|
40573
39816
|
var defaultBase = recipe;
|
|
40574
39817
|
recipe = base;
|
|
40575
39818
|
var self = this;
|
|
40576
39819
|
return function curriedProduce(base) {
|
|
40577
|
-
|
|
40578
|
-
|
|
40579
|
-
|
|
40580
|
-
|
|
39820
|
+
var this$1$1 = this;
|
|
39821
|
+
if ( base === void 0 ) base = defaultBase;
|
|
39822
|
+
var args = [], len = arguments.length - 1;
|
|
39823
|
+
while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
|
|
40581
39824
|
|
|
40582
|
-
|
|
40583
|
-
args[len] = arguments[len + 1];
|
|
40584
|
-
}
|
|
40585
|
-
|
|
40586
|
-
return self.produce(base, function (draft) {
|
|
40587
|
-
return recipe.call.apply(recipe, [this$1$1, draft].concat(args));
|
|
40588
|
-
}); // prettier-ignore
|
|
39825
|
+
return self.produce(base, function (draft) { return recipe.call.apply(recipe, [ this$1$1, draft ].concat( args )); }); // prettier-ignore
|
|
40589
39826
|
};
|
|
40590
39827
|
} // prettier-ignore
|
|
40591
39828
|
|
|
@@ -40611,11 +39848,7 @@ Immer.prototype.produce = function produce(base, recipe, patchListener) {
|
|
|
40611
39848
|
hasError = false;
|
|
40612
39849
|
} finally {
|
|
40613
39850
|
// finally instead of catch + rethrow better preserves original stack
|
|
40614
|
-
if (hasError) {
|
|
40615
|
-
scope.revoke();
|
|
40616
|
-
} else {
|
|
40617
|
-
scope.leave();
|
|
40618
|
-
}
|
|
39851
|
+
if (hasError) { scope.revoke(); }else { scope.leave(); }
|
|
40619
39852
|
}
|
|
40620
39853
|
|
|
40621
39854
|
if (result instanceof Promise) {
|
|
@@ -40632,38 +39865,25 @@ Immer.prototype.produce = function produce(base, recipe, patchListener) {
|
|
|
40632
39865
|
return this.processResult(result, scope);
|
|
40633
39866
|
} else {
|
|
40634
39867
|
result = recipe(base);
|
|
40635
|
-
|
|
40636
|
-
if (result === undefined) {
|
|
40637
|
-
return base;
|
|
40638
|
-
}
|
|
40639
|
-
|
|
39868
|
+
if (result === undefined) { return base; }
|
|
40640
39869
|
return result !== NOTHING ? result : undefined;
|
|
40641
39870
|
}
|
|
40642
39871
|
};
|
|
40643
39872
|
|
|
40644
|
-
Immer.prototype.produceWithPatches = function produceWithPatches(arg1, arg2, arg3) {
|
|
40645
|
-
|
|
39873
|
+
Immer.prototype.produceWithPatches = function produceWithPatches (arg1, arg2, arg3) {
|
|
39874
|
+
var this$1$1 = this;
|
|
40646
39875
|
|
|
40647
39876
|
if (typeof arg1 === "function") {
|
|
40648
39877
|
return function (state) {
|
|
40649
|
-
|
|
40650
|
-
|
|
39878
|
+
var args = [], len = arguments.length - 1;
|
|
39879
|
+
while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
|
|
40651
39880
|
|
|
40652
|
-
|
|
40653
|
-
|
|
40654
|
-
}
|
|
40655
|
-
|
|
40656
|
-
return this$1$1.produceWithPatches(state, function (draft) {
|
|
40657
|
-
return arg1.apply(void 0, [draft].concat(args));
|
|
40658
|
-
});
|
|
40659
|
-
};
|
|
39881
|
+
return this$1$1.produceWithPatches(state, function (draft) { return arg1.apply(void 0, [ draft ].concat( args )); });
|
|
39882
|
+
};
|
|
40660
39883
|
} // non-curried form
|
|
40661
39884
|
|
|
40662
39885
|
|
|
40663
|
-
if (arg3) {
|
|
40664
|
-
throw new Error("A patch listener cannot be passed to produceWithPatches");
|
|
40665
|
-
}
|
|
40666
|
-
|
|
39886
|
+
if (arg3) { throw new Error("A patch listener cannot be passed to produceWithPatches"); }
|
|
40667
39887
|
var patches, inversePatches;
|
|
40668
39888
|
var nextState = this.produce(arg1, arg2, function (p, ip) {
|
|
40669
39889
|
patches = p;
|
|
@@ -40672,7 +39892,7 @@ Immer.prototype.produceWithPatches = function produceWithPatches(arg1, arg2, arg
|
|
|
40672
39892
|
return [nextState, patches, inversePatches];
|
|
40673
39893
|
};
|
|
40674
39894
|
|
|
40675
|
-
Immer.prototype.createDraft = function createDraft(base) {
|
|
39895
|
+
Immer.prototype.createDraft = function createDraft (base) {
|
|
40676
39896
|
if (!isDraftable(base)) {
|
|
40677
39897
|
throw new Error("First argument to `createDraft` must be a plain object, an array, or an immerable object"); // prettier-ignore
|
|
40678
39898
|
}
|
|
@@ -40684,7 +39904,7 @@ Immer.prototype.createDraft = function createDraft(base) {
|
|
|
40684
39904
|
return proxy;
|
|
40685
39905
|
};
|
|
40686
39906
|
|
|
40687
|
-
Immer.prototype.finishDraft = function finishDraft(draft, patchListener) {
|
|
39907
|
+
Immer.prototype.finishDraft = function finishDraft (draft, patchListener) {
|
|
40688
39908
|
var state = draft && draft[DRAFT_STATE];
|
|
40689
39909
|
|
|
40690
39910
|
if (!state || !state.isManual) {
|
|
@@ -40700,16 +39920,16 @@ Immer.prototype.finishDraft = function finishDraft(draft, patchListener) {
|
|
|
40700
39920
|
return this.processResult(undefined, scope);
|
|
40701
39921
|
};
|
|
40702
39922
|
|
|
40703
|
-
Immer.prototype.setAutoFreeze = function setAutoFreeze(value) {
|
|
39923
|
+
Immer.prototype.setAutoFreeze = function setAutoFreeze (value) {
|
|
40704
39924
|
this.autoFreeze = value;
|
|
40705
39925
|
};
|
|
40706
39926
|
|
|
40707
|
-
Immer.prototype.setUseProxies = function setUseProxies(value) {
|
|
39927
|
+
Immer.prototype.setUseProxies = function setUseProxies (value) {
|
|
40708
39928
|
this.useProxies = value;
|
|
40709
39929
|
assign(this, value ? modernProxy : legacyProxy);
|
|
40710
39930
|
};
|
|
40711
39931
|
|
|
40712
|
-
Immer.prototype.applyPatches = function applyPatches$1(base, patches) {
|
|
39932
|
+
Immer.prototype.applyPatches = function applyPatches$1 (base, patches) {
|
|
40713
39933
|
// If a patch replaces the entire state, take that replacement as base
|
|
40714
39934
|
// before applying patches
|
|
40715
39935
|
var i;
|
|
@@ -40729,14 +39949,12 @@ Immer.prototype.applyPatches = function applyPatches$1(base, patches) {
|
|
|
40729
39949
|
} // Otherwise, produce a copy of the base state.
|
|
40730
39950
|
|
|
40731
39951
|
|
|
40732
|
-
return this.produce(base, function (draft) {
|
|
40733
|
-
return applyPatches(draft, patches.slice(i + 1));
|
|
40734
|
-
});
|
|
39952
|
+
return this.produce(base, function (draft) { return applyPatches(draft, patches.slice(i + 1)); });
|
|
40735
39953
|
};
|
|
40736
39954
|
/** @internal */
|
|
40737
39955
|
|
|
40738
39956
|
|
|
40739
|
-
Immer.prototype.processResult = function processResult(result, scope) {
|
|
39957
|
+
Immer.prototype.processResult = function processResult (result, scope) {
|
|
40740
39958
|
var baseDraft = scope.drafts[0];
|
|
40741
39959
|
var isReplaced = result !== undefined && result !== baseDraft;
|
|
40742
39960
|
this.willFinalize(scope, result, isReplaced);
|
|
@@ -40784,15 +40002,13 @@ Immer.prototype.processResult = function processResult(result, scope) {
|
|
|
40784
40002
|
*/
|
|
40785
40003
|
|
|
40786
40004
|
|
|
40787
|
-
Immer.prototype.finalize = function finalize(draft, path, scope) {
|
|
40788
|
-
|
|
40005
|
+
Immer.prototype.finalize = function finalize (draft, path, scope) {
|
|
40006
|
+
var this$1$1 = this;
|
|
40007
|
+
|
|
40789
40008
|
var state = draft[DRAFT_STATE];
|
|
40790
40009
|
|
|
40791
40010
|
if (!state) {
|
|
40792
|
-
if (Object.isFrozen(draft)) {
|
|
40793
|
-
return draft;
|
|
40794
|
-
}
|
|
40795
|
-
|
|
40011
|
+
if (Object.isFrozen(draft)) { return draft; }
|
|
40796
40012
|
return this.finalizeTree(draft, null, scope);
|
|
40797
40013
|
} // Never finalize drafts owned by another scope.
|
|
40798
40014
|
|
|
@@ -40815,17 +40031,13 @@ Immer.prototype.finalize = function finalize(draft, path, scope) {
|
|
|
40815
40031
|
var assigned = state.assigned;
|
|
40816
40032
|
|
|
40817
40033
|
for (var prop in assigned) {
|
|
40818
|
-
if (!assigned[prop]) {
|
|
40819
|
-
this.onDelete(state, prop);
|
|
40820
|
-
}
|
|
40034
|
+
if (!assigned[prop]) { this.onDelete(state, prop); }
|
|
40821
40035
|
}
|
|
40822
40036
|
} else {
|
|
40823
40037
|
var base = state.base;
|
|
40824
|
-
|
|
40038
|
+
var copy = state.copy;
|
|
40825
40039
|
each(base, function (prop) {
|
|
40826
|
-
if (!has$1(copy, prop)) {
|
|
40827
|
-
this$1$1.onDelete(state, prop);
|
|
40828
|
-
}
|
|
40040
|
+
if (!has$1(copy, prop)) { this$1$1.onDelete(state, prop); }
|
|
40829
40041
|
});
|
|
40830
40042
|
}
|
|
40831
40043
|
}
|
|
@@ -40853,8 +40065,9 @@ Immer.prototype.finalize = function finalize(draft, path, scope) {
|
|
|
40853
40065
|
*/
|
|
40854
40066
|
|
|
40855
40067
|
|
|
40856
|
-
Immer.prototype.finalizeTree = function finalizeTree(root, rootPath, scope) {
|
|
40857
|
-
|
|
40068
|
+
Immer.prototype.finalizeTree = function finalizeTree (root, rootPath, scope) {
|
|
40069
|
+
var this$1$1 = this;
|
|
40070
|
+
|
|
40858
40071
|
var state = root[DRAFT_STATE];
|
|
40859
40072
|
|
|
40860
40073
|
if (state) {
|
|
@@ -40868,7 +40081,7 @@ Immer.prototype.finalizeTree = function finalizeTree(root, rootPath, scope) {
|
|
|
40868
40081
|
|
|
40869
40082
|
var needPatches = !!rootPath && !!scope.patches;
|
|
40870
40083
|
|
|
40871
|
-
var finalizeProperty = function
|
|
40084
|
+
var finalizeProperty = function (prop, value, parent) {
|
|
40872
40085
|
if (value === parent) {
|
|
40873
40086
|
throw Error("Immer forbids circular references");
|
|
40874
40087
|
} // In the `finalizeTree` method, only the `root` object may be a draft.
|
|
@@ -40895,16 +40108,14 @@ Immer.prototype.finalizeTree = function finalizeTree(root, rootPath, scope) {
|
|
|
40895
40108
|
} // Unchanged drafts are never passed to the `onAssign` hook.
|
|
40896
40109
|
|
|
40897
40110
|
|
|
40898
|
-
if (isDraftProp && value === state.base[prop]) {
|
|
40899
|
-
return;
|
|
40900
|
-
}
|
|
40111
|
+
if (isDraftProp && value === state.base[prop]) { return; }
|
|
40901
40112
|
} // Unchanged draft properties are ignored.
|
|
40902
40113
|
else if (isDraftProp && is(value, state.base[prop])) {
|
|
40903
|
-
|
|
40904
|
-
|
|
40905
|
-
|
|
40906
|
-
|
|
40907
|
-
|
|
40114
|
+
return;
|
|
40115
|
+
} // Search new objects for unfinalized drafts. Frozen objects should never contain drafts.
|
|
40116
|
+
else if (isDraftable(value) && !Object.isFrozen(value)) {
|
|
40117
|
+
each(value, finalizeProperty);
|
|
40118
|
+
}
|
|
40908
40119
|
|
|
40909
40120
|
if (isDraftProp && this$1$1.onAssign) {
|
|
40910
40121
|
this$1$1.onAssign(state, prop, value);
|
|
@@ -40982,223 +40193,127 @@ immer.createDraft.bind(immer);
|
|
|
40982
40193
|
|
|
40983
40194
|
immer.finishDraft.bind(immer);
|
|
40984
40195
|
|
|
40985
|
-
|
|
40986
|
-
|
|
40987
|
-
|
|
40988
|
-
|
|
40989
|
-
for (var _i3 = 0, _formConfigKeys = formConfigKeys; _i3 < _formConfigKeys.length; _i3++) {
|
|
40990
|
-
var formKey = _formConfigKeys[_i3];
|
|
40196
|
+
const createInitialState = formConfig => {
|
|
40197
|
+
let initialForm = {};
|
|
40198
|
+
const formConfigKeys = Object.keys(formConfig);
|
|
40199
|
+
for (let formKey of formConfigKeys) {
|
|
40991
40200
|
initialForm[formKey] = {
|
|
40992
40201
|
dirty: false,
|
|
40993
40202
|
rawValue: formConfig[formKey].defaultValue || "",
|
|
40994
40203
|
validators: formConfig[formKey].validators || [],
|
|
40995
40204
|
constraints: formConfig[formKey].constraints || []
|
|
40996
40205
|
};
|
|
40997
|
-
}
|
|
40206
|
+
}
|
|
40207
|
+
// Because validators require the entire form we have to do a
|
|
40998
40208
|
// second pass to add errors once the initial form has been
|
|
40999
40209
|
// constructed
|
|
41000
|
-
|
|
41001
|
-
|
|
41002
|
-
|
|
41003
|
-
|
|
41004
|
-
var errors = computeErrors(_formKey, initialForm);
|
|
41005
|
-
initialForm[_formKey].errors = errors;
|
|
41006
|
-
initialForm[_formKey].hasErrors = errors.length > 0;
|
|
40210
|
+
for (let formKey of formConfigKeys) {
|
|
40211
|
+
let errors = computeErrors(formKey, initialForm);
|
|
40212
|
+
initialForm[formKey].errors = errors;
|
|
40213
|
+
initialForm[formKey].hasErrors = errors.length > 0;
|
|
41007
40214
|
}
|
|
41008
|
-
|
|
41009
40215
|
return initialForm;
|
|
41010
40216
|
};
|
|
41011
40217
|
|
|
41012
|
-
|
|
41013
|
-
|
|
41014
|
-
|
|
41015
|
-
|
|
41016
|
-
|
|
41017
|
-
type: SET,
|
|
41018
|
-
payload: {
|
|
41019
|
-
fieldName: fieldName,
|
|
41020
|
-
value: value
|
|
41021
|
-
}
|
|
41022
|
-
};
|
|
41023
|
-
};
|
|
41024
|
-
};
|
|
41025
|
-
|
|
41026
|
-
var CLEAR = "form/CLEAR";
|
|
41027
|
-
|
|
41028
|
-
var _clear = function clear() {
|
|
41029
|
-
return {
|
|
41030
|
-
type: CLEAR
|
|
41031
|
-
};
|
|
41032
|
-
};
|
|
41033
|
-
|
|
41034
|
-
var ADD_VALIDATOR = "field/ADD_VALIDATOR";
|
|
41035
|
-
|
|
41036
|
-
var _addValidator = function addValidator(fieldName) {
|
|
41037
|
-
return function (validator) {
|
|
41038
|
-
return {
|
|
41039
|
-
type: ADD_VALIDATOR,
|
|
41040
|
-
payload: {
|
|
41041
|
-
fieldName: fieldName,
|
|
41042
|
-
validator: validator
|
|
41043
|
-
}
|
|
41044
|
-
};
|
|
41045
|
-
};
|
|
41046
|
-
};
|
|
41047
|
-
|
|
41048
|
-
var REMOVE_VALIDATOR = "field/REMOVE_VALIDATOR";
|
|
41049
|
-
|
|
41050
|
-
var _removeValidator = function removeValidator(fieldName) {
|
|
41051
|
-
return function (validator) {
|
|
41052
|
-
return {
|
|
41053
|
-
type: REMOVE_VALIDATOR,
|
|
41054
|
-
payload: {
|
|
41055
|
-
fieldName: fieldName,
|
|
41056
|
-
validator: validator
|
|
41057
|
-
}
|
|
41058
|
-
};
|
|
41059
|
-
};
|
|
41060
|
-
};
|
|
41061
|
-
|
|
41062
|
-
var CLEAR_FIELD_VALIDATORS = "field/CLEAR_FIELD_VALIDATORS";
|
|
41063
|
-
|
|
41064
|
-
var clearFieldValidators = function clearFieldValidators(fieldName) {
|
|
41065
|
-
return function () {
|
|
41066
|
-
return {
|
|
41067
|
-
type: CLEAR_FIELD_VALIDATORS,
|
|
41068
|
-
payload: {
|
|
41069
|
-
fieldName: fieldName
|
|
41070
|
-
}
|
|
41071
|
-
};
|
|
41072
|
-
};
|
|
41073
|
-
};
|
|
40218
|
+
const SET = "field/SET";
|
|
40219
|
+
const set$2 = fieldName => value => ({
|
|
40220
|
+
type: SET,
|
|
40221
|
+
payload: { fieldName, value }
|
|
40222
|
+
});
|
|
41074
40223
|
|
|
41075
|
-
|
|
41076
|
-
|
|
41077
|
-
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : createInitialState(formConfig);
|
|
41078
|
-
var action = arguments.length > 1 ? arguments[1] : undefined;
|
|
40224
|
+
const CLEAR = "form/CLEAR";
|
|
40225
|
+
const clear = () => ({ type: CLEAR });
|
|
41079
40226
|
|
|
41080
|
-
|
|
41081
|
-
|
|
41082
|
-
|
|
41083
|
-
|
|
41084
|
-
|
|
41085
|
-
return produce(state, function (draftState) {
|
|
41086
|
-
var originalValue = draftState[changedFieldName].rawValue;
|
|
41087
|
-
draftState[changedFieldName].rawValue = newRawValue;
|
|
41088
|
-
|
|
41089
|
-
if (computeConstraints(changedFieldName, draftState).length > 0) {
|
|
41090
|
-
// If the change violates constraints, revert the change
|
|
41091
|
-
draftState[changedFieldName].rawValue = originalValue;
|
|
41092
|
-
return draftState;
|
|
41093
|
-
}
|
|
40227
|
+
const ADD_VALIDATOR = "field/ADD_VALIDATOR";
|
|
40228
|
+
const addValidator = fieldName => validator => ({
|
|
40229
|
+
type: ADD_VALIDATOR,
|
|
40230
|
+
payload: { fieldName, validator }
|
|
40231
|
+
});
|
|
41094
40232
|
|
|
41095
|
-
|
|
41096
|
-
|
|
41097
|
-
|
|
40233
|
+
const createFormReducer = formConfig => (
|
|
40234
|
+
state = createInitialState(formConfig),
|
|
40235
|
+
action
|
|
40236
|
+
) => {
|
|
40237
|
+
switch (action.type) {
|
|
40238
|
+
case SET:
|
|
40239
|
+
const changedFieldName = action.payload.fieldName;
|
|
40240
|
+
const newRawValue = action.payload.value;
|
|
40241
|
+
|
|
40242
|
+
return produce(state, draftState => {
|
|
40243
|
+
let originalValue = draftState[changedFieldName].rawValue;
|
|
40244
|
+
draftState[changedFieldName].rawValue = newRawValue;
|
|
40245
|
+
if (computeConstraints(changedFieldName, draftState).length > 0) {
|
|
40246
|
+
// If the change violates constraints, revert the change
|
|
40247
|
+
draftState[changedFieldName].rawValue = originalValue;
|
|
40248
|
+
return draftState;
|
|
41098
40249
|
}
|
|
41099
40250
|
|
|
41100
|
-
|
|
41101
|
-
|
|
41102
|
-
|
|
41103
|
-
|
|
41104
|
-
|
|
41105
|
-
|
|
41106
|
-
|
|
41107
|
-
|
|
41108
|
-
|
|
41109
|
-
computeErrorEntries(draftState);
|
|
41110
|
-
});
|
|
40251
|
+
const fields = Object.entries(draftState);
|
|
40252
|
+
for (let entry of fields) {
|
|
40253
|
+
let fieldName = entry[0];
|
|
40254
|
+
let field = entry[1];
|
|
40255
|
+
let errors = computeErrors(fieldName, draftState);
|
|
40256
|
+
let dirty = fieldName === changedFieldName ? true : field.dirty;
|
|
40257
|
+
draftState[fieldName].errors = errors;
|
|
40258
|
+
draftState[fieldName].dirty = dirty;
|
|
40259
|
+
draftState[fieldName].hasErrors = errors.length > 0;
|
|
41111
40260
|
}
|
|
41112
|
-
|
|
41113
|
-
|
|
41114
|
-
|
|
41115
|
-
|
|
41116
|
-
|
|
41117
|
-
|
|
41118
|
-
|
|
41119
|
-
|
|
41120
|
-
|
|
41121
|
-
|
|
41122
|
-
|
|
41123
|
-
|
|
41124
|
-
|
|
41125
|
-
|
|
41126
|
-
|
|
41127
|
-
|
|
41128
|
-
|
|
41129
|
-
|
|
41130
|
-
draftState[fieldToClear].validators = [];
|
|
41131
|
-
computeErrorEntries(draftState);
|
|
41132
|
-
});
|
|
40261
|
+
});
|
|
40262
|
+
case CLEAR:
|
|
40263
|
+
return createInitialState(formConfig);
|
|
40264
|
+
case ADD_VALIDATOR:
|
|
40265
|
+
const fieldWithOverride = action.payload.fieldName;
|
|
40266
|
+
const newValidator = action.payload.validator;
|
|
40267
|
+
|
|
40268
|
+
return produce(state, draftState => {
|
|
40269
|
+
draftState[fieldWithOverride].validators.push(newValidator);
|
|
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 = field.dirty;
|
|
40276
|
+
draftState[fieldName].errors = errors;
|
|
40277
|
+
draftState[fieldName].dirty = dirty;
|
|
40278
|
+
draftState[fieldName].hasErrors = errors.length > 0;
|
|
41133
40279
|
}
|
|
41134
|
-
|
|
41135
|
-
|
|
41136
|
-
|
|
41137
|
-
|
|
41138
|
-
};
|
|
40280
|
+
});
|
|
40281
|
+
default:
|
|
40282
|
+
return state;
|
|
40283
|
+
}
|
|
41139
40284
|
};
|
|
41140
40285
|
|
|
41141
|
-
|
|
40286
|
+
const createMapDispatchToProps = formConfig => {
|
|
41142
40287
|
// Do memo-ization
|
|
41143
|
-
|
|
41144
|
-
|
|
41145
|
-
return
|
|
40288
|
+
let cachedDispatch;
|
|
40289
|
+
let cacheValue;
|
|
40290
|
+
return dispatch => {
|
|
41146
40291
|
if (dispatch == cachedDispatch) {
|
|
41147
40292
|
return cacheValue;
|
|
41148
40293
|
}
|
|
41149
|
-
|
|
41150
|
-
var dispatchObj = {};
|
|
40294
|
+
let dispatchObj = {};
|
|
41151
40295
|
dispatchObj.fields = {};
|
|
41152
|
-
|
|
41153
|
-
|
|
41154
|
-
var _loop = function _loop() {
|
|
41155
|
-
var fieldName = _keys[_i5];
|
|
40296
|
+
const keys = Object.keys(formConfig);
|
|
40297
|
+
for (let fieldName of keys) {
|
|
41156
40298
|
dispatchObj.fields[fieldName] = {
|
|
41157
|
-
set:
|
|
41158
|
-
|
|
41159
|
-
},
|
|
41160
|
-
addValidator: function addValidator(validator) {
|
|
41161
|
-
return dispatch(_addValidator(fieldName)(validator));
|
|
41162
|
-
},
|
|
41163
|
-
removeValidator: function removeValidator(validator) {
|
|
41164
|
-
return dispatch(_removeValidator(fieldName)(validator));
|
|
41165
|
-
},
|
|
41166
|
-
clear: function clear() {
|
|
41167
|
-
return dispatch(clearFieldValidators(fieldName)());
|
|
41168
|
-
}
|
|
40299
|
+
set: value => dispatch(set$2(fieldName)(value)),
|
|
40300
|
+
addValidator: validator => dispatch(addValidator(fieldName)(validator))
|
|
41169
40301
|
};
|
|
41170
|
-
};
|
|
41171
|
-
|
|
41172
|
-
for (var _i5 = 0, _keys = keys; _i5 < _keys.length; _i5++) {
|
|
41173
|
-
_loop();
|
|
41174
40302
|
}
|
|
41175
|
-
|
|
41176
|
-
dispatchObj.form = {
|
|
41177
|
-
clear: function clear() {
|
|
41178
|
-
return dispatch(_clear());
|
|
41179
|
-
}
|
|
41180
|
-
};
|
|
40303
|
+
dispatchObj.form = { clear: () => dispatch(clear()) };
|
|
41181
40304
|
cachedDispatch = dispatch;
|
|
41182
|
-
cacheValue = {
|
|
41183
|
-
actions: dispatchObj
|
|
41184
|
-
};
|
|
40305
|
+
cacheValue = { actions: dispatchObj };
|
|
41185
40306
|
return cacheValue;
|
|
41186
40307
|
};
|
|
41187
40308
|
};
|
|
41188
40309
|
|
|
41189
|
-
|
|
41190
|
-
return {
|
|
41191
|
-
fields: state
|
|
41192
|
-
};
|
|
41193
|
-
};
|
|
40310
|
+
const mapStateToProps = state => ({ fields: state });
|
|
41194
40311
|
|
|
41195
|
-
|
|
41196
|
-
|
|
41197
|
-
|
|
41198
|
-
|
|
41199
|
-
|
|
41200
|
-
};
|
|
41201
|
-
};
|
|
40312
|
+
const createFormState = formConfig => ({
|
|
40313
|
+
reducer: createFormReducer(formConfig),
|
|
40314
|
+
mapDispatchToProps: createMapDispatchToProps(formConfig),
|
|
40315
|
+
mapStateToProps: mapStateToProps
|
|
40316
|
+
});
|
|
41202
40317
|
|
|
41203
40318
|
var AddressForm = function AddressForm(_ref) {
|
|
41204
40319
|
var _zipErrorMessages;
|
|
@@ -50318,8 +49433,6 @@ var fallbackValues$Q = {
|
|
|
50318
49433
|
dataQa: string,
|
|
50319
49434
|
content: <React Component(s)> e.g.: <Box><Stack>cool content stuff</Stack></Box> (any collection of components will work),
|
|
50320
49435
|
rightTitleContent: <React Component(s)> (rendered on the very right of the title section, use to supplement "rightIcons" with text, as in expired CC status, or render other custom content)
|
|
50321
|
-
contentOverride: <React Component(s)> (Replace the radio section and the containers with different content,
|
|
50322
|
-
intended for inserting a divider bar or other non-interactive css)
|
|
50323
49436
|
}
|
|
50324
49437
|
|
|
50325
49438
|
Also takes an "openSection" which should equal the id of the section that should be open
|
|
@@ -50408,7 +49521,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
50408
49521
|
}, sections.filter(function (section) {
|
|
50409
49522
|
return !section.hidden;
|
|
50410
49523
|
}).map(function (section) {
|
|
50411
|
-
return
|
|
49524
|
+
return /*#__PURE__*/React__default.createElement(Motion, {
|
|
50412
49525
|
tabIndex: section.hideRadioButton || section.disabled ? "-1" : "0",
|
|
50413
49526
|
onKeyDown: function onKeyDown(e) {
|
|
50414
49527
|
return !section.disabled && handleKeyDown(section.id, e);
|