sixseconds-modules 1.6.147 → 1.6.151

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -15,7 +15,6 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
15
15
  const jsxRuntime = require("react/jsx-runtime");
16
16
  const material = require("@mui/material");
17
17
  const React = require("react");
18
- const react = require("@emotion/react");
19
18
  const axios = require("axios");
20
19
  const Cookies = require("js-cookie");
21
20
  const MenuIcon = require("@mui/icons-material/Menu");
@@ -391,8 +390,8 @@ deepmerge.all = function deepmergeAll(array2, options) {
391
390
  if (!Array.isArray(array2)) {
392
391
  throw new Error("first argument should be an array");
393
392
  }
394
- return array2.reduce(function(prev2, next2) {
395
- return deepmerge(prev2, next2, options);
393
+ return array2.reduce(function(prev, next) {
394
+ return deepmerge(prev, next, options);
396
395
  }, {});
397
396
  };
398
397
  var deepmerge_1 = deepmerge;
@@ -467,10 +466,10 @@ function eq(value, other) {
467
466
  return value === other || value !== value && other !== other;
468
467
  }
469
468
  function assocIndexOf(array2, key) {
470
- var length2 = array2.length;
471
- while (length2--) {
472
- if (eq(array2[length2][0], key)) {
473
- return length2;
469
+ var length = array2.length;
470
+ while (length--) {
471
+ if (eq(array2[length][0], key)) {
472
+ return length;
474
473
  }
475
474
  }
476
475
  return -1;
@@ -509,9 +508,9 @@ function listCacheSet(key, value) {
509
508
  return this;
510
509
  }
511
510
  function ListCache(entries) {
512
- var index = -1, length2 = entries == null ? 0 : entries.length;
511
+ var index = -1, length = entries == null ? 0 : entries.length;
513
512
  this.clear();
514
- while (++index < length2) {
513
+ while (++index < length) {
515
514
  var entry = entries[index];
516
515
  this.set(entry[0], entry[1]);
517
516
  }
@@ -549,10 +548,10 @@ function isFunction$2(value) {
549
548
  return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
550
549
  }
551
550
  var coreJsData = root["__core-js_shared__"];
552
- var maskSrcKey = (function() {
551
+ var maskSrcKey = function() {
553
552
  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
554
553
  return uid ? "Symbol(src)_1." + uid : "";
555
- })();
554
+ }();
556
555
  function isMasked(func) {
557
556
  return !!maskSrcKey && maskSrcKey in func;
558
557
  }
@@ -629,9 +628,9 @@ function hashSet(key, value) {
629
628
  return this;
630
629
  }
631
630
  function Hash(entries) {
632
- var index = -1, length2 = entries == null ? 0 : entries.length;
631
+ var index = -1, length = entries == null ? 0 : entries.length;
633
632
  this.clear();
634
- while (++index < length2) {
633
+ while (++index < length) {
635
634
  var entry = entries[index];
636
635
  this.set(entry[0], entry[1]);
637
636
  }
@@ -675,9 +674,9 @@ function mapCacheSet(key, value) {
675
674
  return this;
676
675
  }
677
676
  function MapCache(entries) {
678
- var index = -1, length2 = entries == null ? 0 : entries.length;
677
+ var index = -1, length = entries == null ? 0 : entries.length;
679
678
  this.clear();
680
- while (++index < length2) {
679
+ while (++index < length) {
681
680
  var entry = entries[index];
682
681
  this.set(entry[0], entry[1]);
683
682
  }
@@ -713,22 +712,22 @@ Stack.prototype.get = stackGet;
713
712
  Stack.prototype.has = stackHas;
714
713
  Stack.prototype.set = stackSet;
715
714
  function arrayEach(array2, iteratee) {
716
- var index = -1, length2 = array2 == null ? 0 : array2.length;
717
- while (++index < length2) {
715
+ var index = -1, length = array2 == null ? 0 : array2.length;
716
+ while (++index < length) {
718
717
  if (iteratee(array2[index], index, array2) === false) {
719
718
  break;
720
719
  }
721
720
  }
722
721
  return array2;
723
722
  }
724
- var defineProperty = (function() {
723
+ var defineProperty = function() {
725
724
  try {
726
725
  var func = getNative(Object, "defineProperty");
727
726
  func({}, "", {});
728
727
  return func;
729
728
  } catch (e) {
730
729
  }
731
- })();
730
+ }();
732
731
  function baseAssignValue(object2, key, value) {
733
732
  if (key == "__proto__" && defineProperty) {
734
733
  defineProperty(object2, key, {
@@ -752,8 +751,8 @@ function assignValue(object2, key, value) {
752
751
  function copyObject(source, props, object2, customizer) {
753
752
  var isNew = !object2;
754
753
  object2 || (object2 = {});
755
- var index = -1, length2 = props.length;
756
- while (++index < length2) {
754
+ var index = -1, length = props.length;
755
+ while (++index < length) {
757
756
  var key = props[index];
758
757
  var newValue = void 0;
759
758
  if (newValue === void 0) {
@@ -781,9 +780,9 @@ function baseIsArguments(value) {
781
780
  var objectProto$6 = Object.prototype;
782
781
  var hasOwnProperty$4 = objectProto$6.hasOwnProperty;
783
782
  var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
784
- var isArguments = baseIsArguments(/* @__PURE__ */ (function() {
783
+ var isArguments = baseIsArguments(/* @__PURE__ */ function() {
785
784
  return arguments;
786
- })()) ? baseIsArguments : function(value) {
785
+ }()) ? baseIsArguments : function(value) {
787
786
  return isObjectLike(value) && hasOwnProperty$4.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
788
787
  };
789
788
  var isArray$1 = Array.isArray;
@@ -798,10 +797,10 @@ var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : void 0;
798
797
  var isBuffer = nativeIsBuffer || stubFalse;
799
798
  var MAX_SAFE_INTEGER$1 = 9007199254740991;
800
799
  var reIsUint = /^(?:0|[1-9]\d*)$/;
801
- function isIndex(value, length2) {
800
+ function isIndex(value, length) {
802
801
  var type = typeof value;
803
- length2 = length2 == null ? MAX_SAFE_INTEGER$1 : length2;
804
- return !!length2 && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length2);
802
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
803
+ return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
805
804
  }
806
805
  var MAX_SAFE_INTEGER = 9007199254740991;
807
806
  function isLength(value) {
@@ -824,7 +823,7 @@ var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType &
824
823
  var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
825
824
  var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
826
825
  var freeProcess = moduleExports$1 && freeGlobal.process;
827
- var nodeUtil = (function() {
826
+ var nodeUtil = function() {
828
827
  try {
829
828
  var types = freeModule$1 && freeModule$1.require && freeModule$1.require("util").types;
830
829
  if (types) {
@@ -833,19 +832,19 @@ var nodeUtil = (function() {
833
832
  return freeProcess && freeProcess.binding && freeProcess.binding("util");
834
833
  } catch (e) {
835
834
  }
836
- })();
835
+ }();
837
836
  var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
838
837
  var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
839
838
  var objectProto$5 = Object.prototype;
840
839
  var hasOwnProperty$3 = objectProto$5.hasOwnProperty;
841
840
  function arrayLikeKeys(value, inherited) {
842
- var isArr = isArray$1(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length2 = result.length;
841
+ var isArr = isArray$1(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
843
842
  for (var key in value) {
844
843
  if ((inherited || hasOwnProperty$3.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
845
844
  (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
846
845
  isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
847
846
  isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
848
- isIndex(key, length2)))) {
847
+ isIndex(key, length)))) {
849
848
  result.push(key);
850
849
  }
851
850
  }
@@ -917,21 +916,21 @@ function cloneBuffer(buffer, isDeep) {
917
916
  if (isDeep) {
918
917
  return buffer.slice();
919
918
  }
920
- var length2 = buffer.length, result = allocUnsafe ? allocUnsafe(length2) : new buffer.constructor(length2);
919
+ var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
921
920
  buffer.copy(result);
922
921
  return result;
923
922
  }
924
923
  function copyArray(source, array2) {
925
- var index = -1, length2 = source.length;
926
- array2 || (array2 = Array(length2));
927
- while (++index < length2) {
924
+ var index = -1, length = source.length;
925
+ array2 || (array2 = Array(length));
926
+ while (++index < length) {
928
927
  array2[index] = source[index];
929
928
  }
930
929
  return array2;
931
930
  }
932
931
  function arrayFilter(array2, predicate) {
933
- var index = -1, length2 = array2 == null ? 0 : array2.length, resIndex = 0, result = [];
934
- while (++index < length2) {
932
+ var index = -1, length = array2 == null ? 0 : array2.length, resIndex = 0, result = [];
933
+ while (++index < length) {
935
934
  var value = array2[index];
936
935
  if (predicate(value, index, array2)) {
937
936
  result[resIndex++] = value;
@@ -958,8 +957,8 @@ function copySymbols(source, object2) {
958
957
  return copyObject(source, getSymbols(source), object2);
959
958
  }
960
959
  function arrayPush(array2, values) {
961
- var index = -1, length2 = values.length, offset2 = array2.length;
962
- while (++index < length2) {
960
+ var index = -1, length = values.length, offset2 = array2.length;
961
+ while (++index < length) {
963
962
  array2[offset2 + index] = values[index];
964
963
  }
965
964
  return array2;
@@ -1017,8 +1016,8 @@ if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$2 || Map
1017
1016
  var objectProto = Object.prototype;
1018
1017
  var hasOwnProperty = objectProto.hasOwnProperty;
1019
1018
  function initCloneArray(array2) {
1020
- var length2 = array2.length, result = new array2.constructor(length2);
1021
- if (length2 && typeof array2[0] == "string" && hasOwnProperty.call(array2, "index")) {
1019
+ var length = array2.length, result = new array2.constructor(length);
1020
+ if (length && typeof array2[0] == "string" && hasOwnProperty.call(array2, "index")) {
1022
1021
  result.index = array2.index;
1023
1022
  result.input = array2.input;
1024
1023
  }
@@ -1084,7 +1083,7 @@ function initCloneByTag(object2, tag, isDeep) {
1084
1083
  }
1085
1084
  }
1086
1085
  var objectCreate = Object.create;
1087
- var baseCreate = /* @__PURE__ */ (function() {
1086
+ var baseCreate = /* @__PURE__ */ function() {
1088
1087
  function object2() {
1089
1088
  }
1090
1089
  return function(proto2) {
@@ -1099,7 +1098,7 @@ var baseCreate = /* @__PURE__ */ (function() {
1099
1098
  object2.prototype = void 0;
1100
1099
  return result;
1101
1100
  };
1102
- })();
1101
+ }();
1103
1102
  function initCloneObject(object2) {
1104
1103
  return typeof object2.constructor == "function" && !isPrototype(object2) ? baseCreate(getPrototype(object2)) : {};
1105
1104
  }
@@ -1197,11 +1196,11 @@ function requireReactFastCompare() {
1197
1196
  function equal(a, b) {
1198
1197
  if (a === b) return true;
1199
1198
  if (a && b && typeof a == "object" && typeof b == "object") {
1200
- var arrA = isArray2(a), arrB = isArray2(b), i, length2, key;
1199
+ var arrA = isArray2(a), arrB = isArray2(b), i, length, key;
1201
1200
  if (arrA && arrB) {
1202
- length2 = a.length;
1203
- if (length2 != b.length) return false;
1204
- for (i = length2; i-- !== 0; )
1201
+ length = a.length;
1202
+ if (length != b.length) return false;
1203
+ for (i = length; i-- !== 0; )
1205
1204
  if (!equal(a[i], b[i])) return false;
1206
1205
  return true;
1207
1206
  }
@@ -1213,14 +1212,14 @@ function requireReactFastCompare() {
1213
1212
  if (regexpA != regexpB) return false;
1214
1213
  if (regexpA && regexpB) return a.toString() == b.toString();
1215
1214
  var keys2 = keyList(a);
1216
- length2 = keys2.length;
1217
- if (length2 !== keyList(b).length)
1215
+ length = keys2.length;
1216
+ if (length !== keyList(b).length)
1218
1217
  return false;
1219
- for (i = length2; i-- !== 0; )
1218
+ for (i = length; i-- !== 0; )
1220
1219
  if (!hasProp.call(b, keys2[i])) return false;
1221
1220
  if (hasElementType && a instanceof Element && b instanceof Element)
1222
1221
  return a === b;
1223
- for (i = length2; i-- !== 0; ) {
1222
+ for (i = length; i-- !== 0; ) {
1224
1223
  key = keys2[i];
1225
1224
  if (key === "_owner" && a.$$typeof) {
1226
1225
  continue;
@@ -1265,8 +1264,8 @@ function clone$2(value) {
1265
1264
  return baseClone(value, CLONE_SYMBOLS_FLAG);
1266
1265
  }
1267
1266
  function arrayMap(array2, iteratee) {
1268
- var index = -1, length2 = array2 == null ? 0 : array2.length, result = Array(length2);
1269
- while (++index < length2) {
1267
+ var index = -1, length = array2 == null ? 0 : array2.length, result = Array(length);
1268
+ while (++index < length) {
1270
1269
  result[index] = iteratee(array2[index], index, array2);
1271
1270
  }
1272
1271
  return result;
@@ -1311,8 +1310,8 @@ var stringToPath = memoizeCapped(function(string2) {
1311
1310
  if (string2.charCodeAt(0) === 46) {
1312
1311
  result.push("");
1313
1312
  }
1314
- string2.replace(rePropName, function(match5, number2, quote, subString) {
1315
- result.push(quote ? subString.replace(reEscapeChar, "$1") : number2 || match5);
1313
+ string2.replace(rePropName, function(match, number2, quote, subString) {
1314
+ result.push(quote ? subString.replace(reEscapeChar, "$1") : number2 || match);
1316
1315
  });
1317
1316
  return result;
1318
1317
  });
@@ -1361,7 +1360,7 @@ function requireReactIs_production_min() {
1361
1360
  if (hasRequiredReactIs_production_min) return reactIs_production_min;
1362
1361
  hasRequiredReactIs_production_min = 1;
1363
1362
  var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119;
1364
- function z(a) {
1363
+ function z2(a) {
1365
1364
  if ("object" === typeof a && null !== a) {
1366
1365
  var u = a.$$typeof;
1367
1366
  switch (u) {
@@ -1392,7 +1391,7 @@ function requireReactIs_production_min() {
1392
1391
  }
1393
1392
  }
1394
1393
  function A(a) {
1395
- return z(a) === m;
1394
+ return z2(a) === m;
1396
1395
  }
1397
1396
  reactIs_production_min.AsyncMode = l;
1398
1397
  reactIs_production_min.ConcurrentMode = m;
@@ -1408,46 +1407,46 @@ function requireReactIs_production_min() {
1408
1407
  reactIs_production_min.StrictMode = f;
1409
1408
  reactIs_production_min.Suspense = p;
1410
1409
  reactIs_production_min.isAsyncMode = function(a) {
1411
- return A(a) || z(a) === l;
1410
+ return A(a) || z2(a) === l;
1412
1411
  };
1413
1412
  reactIs_production_min.isConcurrentMode = A;
1414
1413
  reactIs_production_min.isContextConsumer = function(a) {
1415
- return z(a) === k;
1414
+ return z2(a) === k;
1416
1415
  };
1417
1416
  reactIs_production_min.isContextProvider = function(a) {
1418
- return z(a) === h;
1417
+ return z2(a) === h;
1419
1418
  };
1420
1419
  reactIs_production_min.isElement = function(a) {
1421
1420
  return "object" === typeof a && null !== a && a.$$typeof === c;
1422
1421
  };
1423
1422
  reactIs_production_min.isForwardRef = function(a) {
1424
- return z(a) === n;
1423
+ return z2(a) === n;
1425
1424
  };
1426
1425
  reactIs_production_min.isFragment = function(a) {
1427
- return z(a) === e;
1426
+ return z2(a) === e;
1428
1427
  };
1429
1428
  reactIs_production_min.isLazy = function(a) {
1430
- return z(a) === t;
1429
+ return z2(a) === t;
1431
1430
  };
1432
1431
  reactIs_production_min.isMemo = function(a) {
1433
- return z(a) === r;
1432
+ return z2(a) === r;
1434
1433
  };
1435
1434
  reactIs_production_min.isPortal = function(a) {
1436
- return z(a) === d;
1435
+ return z2(a) === d;
1437
1436
  };
1438
1437
  reactIs_production_min.isProfiler = function(a) {
1439
- return z(a) === g;
1438
+ return z2(a) === g;
1440
1439
  };
1441
1440
  reactIs_production_min.isStrictMode = function(a) {
1442
- return z(a) === f;
1441
+ return z2(a) === f;
1443
1442
  };
1444
1443
  reactIs_production_min.isSuspense = function(a) {
1445
- return z(a) === p;
1444
+ return z2(a) === p;
1446
1445
  };
1447
1446
  reactIs_production_min.isValidElementType = function(a) {
1448
1447
  return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
1449
1448
  };
1450
- reactIs_production_min.typeOf = z;
1449
+ reactIs_production_min.typeOf = z2;
1451
1450
  return reactIs_production_min;
1452
1451
  }
1453
1452
  var reactIs_development = {};
@@ -1938,9 +1937,9 @@ function useFormik(_ref) {
1938
1937
  });
1939
1938
  var state = stateRef.current;
1940
1939
  var dispatch = React.useCallback(function(action) {
1941
- var prev2 = stateRef.current;
1942
- stateRef.current = formikReducer(prev2, action);
1943
- if (prev2 !== stateRef.current) setIteration(function(x) {
1940
+ var prev = stateRef.current;
1941
+ stateRef.current = formikReducer(prev, action);
1942
+ if (prev !== stateRef.current) setIteration(function(x) {
1944
1943
  return x + 1;
1945
1944
  });
1946
1945
  }, []);
@@ -1995,14 +1994,14 @@ function useFormik(_ref) {
1995
1994
  return runSingleFieldLevelValidation(f, getIn$1(values, f));
1996
1995
  }) : [Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];
1997
1996
  return Promise.all(fieldValidations).then(function(fieldErrorsList) {
1998
- return fieldErrorsList.reduce(function(prev2, curr, index) {
1997
+ return fieldErrorsList.reduce(function(prev, curr, index) {
1999
1998
  if (curr === "DO_NOT_DELETE_YOU_WILL_BE_FIRED") {
2000
- return prev2;
1999
+ return prev;
2001
2000
  }
2002
2001
  if (curr) {
2003
- prev2 = setIn(prev2, fieldKeysWithValidation[index], curr);
2002
+ prev = setIn(prev, fieldKeysWithValidation[index], curr);
2004
2003
  }
2005
- return prev2;
2004
+ return prev;
2006
2005
  }, {});
2007
2006
  });
2008
2007
  }, [runSingleFieldLevelValidation]);
@@ -2213,16 +2212,15 @@ function useFormik(_ref) {
2213
2212
  });
2214
2213
  }, []);
2215
2214
  var setFieldValue = useEventCallback(function(field, value, shouldValidate) {
2216
- var resolvedValue = isFunction$1(value) ? value(getIn$1(state.values, field)) : value;
2217
2215
  dispatch({
2218
2216
  type: "SET_FIELD_VALUE",
2219
2217
  payload: {
2220
2218
  field,
2221
- value: resolvedValue
2219
+ value
2222
2220
  }
2223
2221
  });
2224
2222
  var willValidate = shouldValidate === void 0 ? validateOnChange : shouldValidate;
2225
- return willValidate ? validateFormWithHighPriority(setIn(state.values, field, resolvedValue)) : Promise.resolve();
2223
+ return willValidate ? validateFormWithHighPriority(setIn(state.values, field, value)) : Promise.resolve();
2226
2224
  });
2227
2225
  var executeChange = React.useCallback(function(eventOrTextValue, maybePath) {
2228
2226
  var field = maybePath;
@@ -2677,8 +2675,7 @@ function createEnv(opts) {
2677
2675
  }
2678
2676
  var util;
2679
2677
  (function(util2) {
2680
- util2.assertEqual = (_) => {
2681
- };
2678
+ util2.assertEqual = (val) => val;
2682
2679
  function assertIs(_arg) {
2683
2680
  }
2684
2681
  util2.assertIs = assertIs;
@@ -2722,7 +2719,7 @@ var util;
2722
2719
  }
2723
2720
  return void 0;
2724
2721
  };
2725
- util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
2722
+ util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && isFinite(val) && Math.floor(val) === val;
2726
2723
  function joinValues(array2, separator = " | ") {
2727
2724
  return array2.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
2728
2725
  }
@@ -2774,7 +2771,7 @@ const getParsedType = (data) => {
2774
2771
  case "string":
2775
2772
  return ZodParsedType.string;
2776
2773
  case "number":
2777
- return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
2774
+ return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
2778
2775
  case "boolean":
2779
2776
  return ZodParsedType.boolean;
2780
2777
  case "function":
@@ -2825,6 +2822,10 @@ const ZodIssueCode = util.arrayToEnum([
2825
2822
  "not_multiple_of",
2826
2823
  "not_finite"
2827
2824
  ]);
2825
+ const quotelessJson = (obj) => {
2826
+ const json = JSON.stringify(obj, null, 2);
2827
+ return json.replace(/"([^"]+)":/g, "$1:");
2828
+ };
2828
2829
  class ZodError extends Error {
2829
2830
  get errors() {
2830
2831
  return this.issues;
@@ -2902,9 +2903,8 @@ class ZodError extends Error {
2902
2903
  const formErrors = [];
2903
2904
  for (const sub of this.issues) {
2904
2905
  if (sub.path.length > 0) {
2905
- const firstEl = sub.path[0];
2906
- fieldErrors[firstEl] = fieldErrors[firstEl] || [];
2907
- fieldErrors[firstEl].push(mapper(sub));
2906
+ fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
2907
+ fieldErrors[sub.path[0]].push(mapper(sub));
2908
2908
  } else {
2909
2909
  formErrors.push(mapper(sub));
2910
2910
  }
@@ -2980,8 +2980,6 @@ const errorMap = (issue, _ctx) => {
2980
2980
  message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
2981
2981
  else if (issue.type === "number")
2982
2982
  message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
2983
- else if (issue.type === "bigint")
2984
- message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
2985
2983
  else if (issue.type === "date")
2986
2984
  message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;
2987
2985
  else
@@ -3020,6 +3018,9 @@ const errorMap = (issue, _ctx) => {
3020
3018
  return { message };
3021
3019
  };
3022
3020
  let overrideErrorMap = errorMap;
3021
+ function setErrorMap(map2) {
3022
+ overrideErrorMap = map2;
3023
+ }
3023
3024
  function getErrorMap() {
3024
3025
  return overrideErrorMap;
3025
3026
  }
@@ -3048,6 +3049,7 @@ const makeIssue = (params) => {
3048
3049
  message: errorMessage
3049
3050
  };
3050
3051
  };
3052
+ const EMPTY_PATH = [];
3051
3053
  function addIssueToContext(ctx, issueData) {
3052
3054
  const overrideMap = getErrorMap();
3053
3055
  const issue = makeIssue({
@@ -3130,11 +3132,24 @@ const isAborted = (x) => x.status === "aborted";
3130
3132
  const isDirty = (x) => x.status === "dirty";
3131
3133
  const isValid$3 = (x) => x.status === "valid";
3132
3134
  const isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
3135
+ function __classPrivateFieldGet(receiver, state, kind, f) {
3136
+ if (typeof state === "function" ? receiver !== state || true : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
3137
+ return state.get(receiver);
3138
+ }
3139
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
3140
+ if (typeof state === "function" ? receiver !== state || true : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
3141
+ return state.set(receiver, value), value;
3142
+ }
3143
+ typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
3144
+ var e = new Error(message);
3145
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
3146
+ };
3133
3147
  var errorUtil;
3134
3148
  (function(errorUtil2) {
3135
3149
  errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
3136
- errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
3150
+ errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
3137
3151
  })(errorUtil || (errorUtil = {}));
3152
+ var _ZodEnum_cache, _ZodNativeEnum_cache;
3138
3153
  class ParseInputLazyPath {
3139
3154
  constructor(parent, value, path, key) {
3140
3155
  this._cachedPath = [];
@@ -3145,7 +3160,7 @@ class ParseInputLazyPath {
3145
3160
  }
3146
3161
  get path() {
3147
3162
  if (!this._cachedPath.length) {
3148
- if (Array.isArray(this._key)) {
3163
+ if (this._key instanceof Array) {
3149
3164
  this._cachedPath.push(...this._path, ...this._key);
3150
3165
  } else {
3151
3166
  this._cachedPath.push(...this._path, this._key);
@@ -3183,16 +3198,17 @@ function processCreateParams(params) {
3183
3198
  if (errorMap2)
3184
3199
  return { errorMap: errorMap2, description };
3185
3200
  const customMap = (iss, ctx) => {
3201
+ var _a, _b;
3186
3202
  const { message } = params;
3187
3203
  if (iss.code === "invalid_enum_value") {
3188
- return { message: message ?? ctx.defaultError };
3204
+ return { message: message !== null && message !== void 0 ? message : ctx.defaultError };
3189
3205
  }
3190
3206
  if (typeof ctx.data === "undefined") {
3191
- return { message: message ?? required_error ?? ctx.defaultError };
3207
+ return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };
3192
3208
  }
3193
3209
  if (iss.code !== "invalid_type")
3194
3210
  return { message: ctx.defaultError };
3195
- return { message: message ?? invalid_type_error ?? ctx.defaultError };
3211
+ return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };
3196
3212
  };
3197
3213
  return { errorMap: customMap, description };
3198
3214
  }
@@ -3244,13 +3260,14 @@ class ZodType {
3244
3260
  throw result.error;
3245
3261
  }
3246
3262
  safeParse(data, params) {
3263
+ var _a;
3247
3264
  const ctx = {
3248
3265
  common: {
3249
3266
  issues: [],
3250
- async: params?.async ?? false,
3251
- contextualErrorMap: params?.errorMap
3267
+ async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,
3268
+ contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap
3252
3269
  },
3253
- path: params?.path || [],
3270
+ path: (params === null || params === void 0 ? void 0 : params.path) || [],
3254
3271
  schemaErrorMap: this._def.errorMap,
3255
3272
  parent: null,
3256
3273
  data,
@@ -3260,6 +3277,7 @@ class ZodType {
3260
3277
  return handleResult(ctx, result);
3261
3278
  }
3262
3279
  "~validate"(data) {
3280
+ var _a, _b;
3263
3281
  const ctx = {
3264
3282
  common: {
3265
3283
  issues: [],
@@ -3280,7 +3298,7 @@ class ZodType {
3280
3298
  issues: ctx.common.issues
3281
3299
  };
3282
3300
  } catch (err) {
3283
- if (err?.message?.toLowerCase()?.includes("encountered")) {
3301
+ if ((_b = (_a = err === null || err === void 0 ? void 0 : err.message) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes("encountered")) {
3284
3302
  this["~standard"].async = true;
3285
3303
  }
3286
3304
  ctx.common = {
@@ -3305,10 +3323,10 @@ class ZodType {
3305
3323
  const ctx = {
3306
3324
  common: {
3307
3325
  issues: [],
3308
- contextualErrorMap: params?.errorMap,
3326
+ contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,
3309
3327
  async: true
3310
3328
  },
3311
- path: params?.path || [],
3329
+ path: (params === null || params === void 0 ? void 0 : params.path) || [],
3312
3330
  schemaErrorMap: this._def.errorMap,
3313
3331
  parent: null,
3314
3332
  data,
@@ -3533,20 +3551,16 @@ function isValidJWT(jwt, alg) {
3533
3551
  return false;
3534
3552
  try {
3535
3553
  const [header] = jwt.split(".");
3536
- if (!header)
3537
- return false;
3538
3554
  const base64 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "=");
3539
3555
  const decoded = JSON.parse(atob(base64));
3540
3556
  if (typeof decoded !== "object" || decoded === null)
3541
3557
  return false;
3542
- if ("typ" in decoded && decoded?.typ !== "JWT")
3543
- return false;
3544
- if (!decoded.alg)
3558
+ if (!decoded.typ || !decoded.alg)
3545
3559
  return false;
3546
3560
  if (alg && decoded.alg !== alg)
3547
3561
  return false;
3548
3562
  return true;
3549
- } catch {
3563
+ } catch (_a) {
3550
3564
  return false;
3551
3565
  }
3552
3566
  }
@@ -3705,7 +3719,7 @@ class ZodString extends ZodType {
3705
3719
  } else if (check.kind === "url") {
3706
3720
  try {
3707
3721
  new URL(input.data);
3708
- } catch {
3722
+ } catch (_a) {
3709
3723
  ctx = this._getOrReturnCtx(input, ctx);
3710
3724
  addIssueToContext(ctx, {
3711
3725
  validation: "url",
@@ -3917,6 +3931,7 @@ class ZodString extends ZodType {
3917
3931
  return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) });
3918
3932
  }
3919
3933
  datetime(options) {
3934
+ var _a, _b;
3920
3935
  if (typeof options === "string") {
3921
3936
  return this._addCheck({
3922
3937
  kind: "datetime",
@@ -3928,10 +3943,10 @@ class ZodString extends ZodType {
3928
3943
  }
3929
3944
  return this._addCheck({
3930
3945
  kind: "datetime",
3931
- precision: typeof options?.precision === "undefined" ? null : options?.precision,
3932
- offset: options?.offset ?? false,
3933
- local: options?.local ?? false,
3934
- ...errorUtil.errToObj(options?.message)
3946
+ precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
3947
+ offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,
3948
+ local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false,
3949
+ ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
3935
3950
  });
3936
3951
  }
3937
3952
  date(message) {
@@ -3947,8 +3962,8 @@ class ZodString extends ZodType {
3947
3962
  }
3948
3963
  return this._addCheck({
3949
3964
  kind: "time",
3950
- precision: typeof options?.precision === "undefined" ? null : options?.precision,
3951
- ...errorUtil.errToObj(options?.message)
3965
+ precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
3966
+ ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
3952
3967
  });
3953
3968
  }
3954
3969
  duration(message) {
@@ -3965,8 +3980,8 @@ class ZodString extends ZodType {
3965
3980
  return this._addCheck({
3966
3981
  kind: "includes",
3967
3982
  value,
3968
- position: options?.position,
3969
- ...errorUtil.errToObj(options?.message)
3983
+ position: options === null || options === void 0 ? void 0 : options.position,
3984
+ ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
3970
3985
  });
3971
3986
  }
3972
3987
  startsWith(value, message) {
@@ -4098,10 +4113,11 @@ class ZodString extends ZodType {
4098
4113
  }
4099
4114
  }
4100
4115
  ZodString.create = (params) => {
4116
+ var _a;
4101
4117
  return new ZodString({
4102
4118
  checks: [],
4103
4119
  typeName: ZodFirstPartyTypeKind.ZodString,
4104
- coerce: params?.coerce ?? false,
4120
+ coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
4105
4121
  ...processCreateParams(params)
4106
4122
  });
4107
4123
  };
@@ -4109,9 +4125,9 @@ function floatSafeRemainder(val, step) {
4109
4125
  const valDecCount = (val.toString().split(".")[1] || "").length;
4110
4126
  const stepDecCount = (step.toString().split(".")[1] || "").length;
4111
4127
  const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
4112
- const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
4113
- const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
4114
- return valInt % stepInt / 10 ** decCount;
4128
+ const valInt = parseInt(val.toFixed(decCount).replace(".", ""));
4129
+ const stepInt = parseInt(step.toFixed(decCount).replace(".", ""));
4130
+ return valInt % stepInt / Math.pow(10, decCount);
4115
4131
  }
4116
4132
  class ZodNumber extends ZodType {
4117
4133
  constructor() {
@@ -4321,8 +4337,7 @@ class ZodNumber extends ZodType {
4321
4337
  return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value));
4322
4338
  }
4323
4339
  get isFinite() {
4324
- let max2 = null;
4325
- let min2 = null;
4340
+ let max2 = null, min2 = null;
4326
4341
  for (const ch of this._def.checks) {
4327
4342
  if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
4328
4343
  return true;
@@ -4341,7 +4356,7 @@ ZodNumber.create = (params) => {
4341
4356
  return new ZodNumber({
4342
4357
  checks: [],
4343
4358
  typeName: ZodFirstPartyTypeKind.ZodNumber,
4344
- coerce: params?.coerce || false,
4359
+ coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
4345
4360
  ...processCreateParams(params)
4346
4361
  });
4347
4362
  };
@@ -4355,7 +4370,7 @@ class ZodBigInt extends ZodType {
4355
4370
  if (this._def.coerce) {
4356
4371
  try {
4357
4372
  input.data = BigInt(input.data);
4358
- } catch {
4373
+ } catch (_a) {
4359
4374
  return this._getInvalidInput(input);
4360
4375
  }
4361
4376
  }
@@ -4510,10 +4525,11 @@ class ZodBigInt extends ZodType {
4510
4525
  }
4511
4526
  }
4512
4527
  ZodBigInt.create = (params) => {
4528
+ var _a;
4513
4529
  return new ZodBigInt({
4514
4530
  checks: [],
4515
4531
  typeName: ZodFirstPartyTypeKind.ZodBigInt,
4516
- coerce: params?.coerce ?? false,
4532
+ coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
4517
4533
  ...processCreateParams(params)
4518
4534
  });
4519
4535
  };
@@ -4538,7 +4554,7 @@ class ZodBoolean extends ZodType {
4538
4554
  ZodBoolean.create = (params) => {
4539
4555
  return new ZodBoolean({
4540
4556
  typeName: ZodFirstPartyTypeKind.ZodBoolean,
4541
- coerce: params?.coerce || false,
4557
+ coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
4542
4558
  ...processCreateParams(params)
4543
4559
  });
4544
4560
  };
@@ -4557,7 +4573,7 @@ class ZodDate extends ZodType {
4557
4573
  });
4558
4574
  return INVALID;
4559
4575
  }
4560
- if (Number.isNaN(input.data.getTime())) {
4576
+ if (isNaN(input.data.getTime())) {
4561
4577
  const ctx2 = this._getOrReturnCtx(input);
4562
4578
  addIssueToContext(ctx2, {
4563
4579
  code: ZodIssueCode.invalid_date
@@ -4646,7 +4662,7 @@ class ZodDate extends ZodType {
4646
4662
  ZodDate.create = (params) => {
4647
4663
  return new ZodDate({
4648
4664
  checks: [],
4649
- coerce: params?.coerce || false,
4665
+ coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
4650
4666
  typeName: ZodFirstPartyTypeKind.ZodDate,
4651
4667
  ...processCreateParams(params)
4652
4668
  });
@@ -4921,8 +4937,7 @@ class ZodObject extends ZodType {
4921
4937
  return this._cached;
4922
4938
  const shape = this._def.shape();
4923
4939
  const keys2 = util.objectKeys(shape);
4924
- this._cached = { shape, keys: keys2 };
4925
- return this._cached;
4940
+ return this._cached = { shape, keys: keys2 };
4926
4941
  }
4927
4942
  _parse(input) {
4928
4943
  const parsedType = this._getType(input);
@@ -5020,10 +5035,11 @@ class ZodObject extends ZodType {
5020
5035
  unknownKeys: "strict",
5021
5036
  ...message !== void 0 ? {
5022
5037
  errorMap: (issue, ctx) => {
5023
- const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;
5038
+ var _a, _b, _c, _d;
5039
+ const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;
5024
5040
  if (issue.code === "unrecognized_keys")
5025
5041
  return {
5026
- message: errorUtil.errToObj(message).message ?? defaultError
5042
+ message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError
5027
5043
  };
5028
5044
  return {
5029
5045
  message: defaultError
@@ -5154,11 +5170,11 @@ class ZodObject extends ZodType {
5154
5170
  }
5155
5171
  pick(mask) {
5156
5172
  const shape = {};
5157
- for (const key of util.objectKeys(mask)) {
5173
+ util.objectKeys(mask).forEach((key) => {
5158
5174
  if (mask[key] && this.shape[key]) {
5159
5175
  shape[key] = this.shape[key];
5160
5176
  }
5161
- }
5177
+ });
5162
5178
  return new ZodObject({
5163
5179
  ...this._def,
5164
5180
  shape: () => shape
@@ -5166,11 +5182,11 @@ class ZodObject extends ZodType {
5166
5182
  }
5167
5183
  omit(mask) {
5168
5184
  const shape = {};
5169
- for (const key of util.objectKeys(this.shape)) {
5185
+ util.objectKeys(this.shape).forEach((key) => {
5170
5186
  if (!mask[key]) {
5171
5187
  shape[key] = this.shape[key];
5172
5188
  }
5173
- }
5189
+ });
5174
5190
  return new ZodObject({
5175
5191
  ...this._def,
5176
5192
  shape: () => shape
@@ -5184,14 +5200,14 @@ class ZodObject extends ZodType {
5184
5200
  }
5185
5201
  partial(mask) {
5186
5202
  const newShape = {};
5187
- for (const key of util.objectKeys(this.shape)) {
5203
+ util.objectKeys(this.shape).forEach((key) => {
5188
5204
  const fieldSchema = this.shape[key];
5189
5205
  if (mask && !mask[key]) {
5190
5206
  newShape[key] = fieldSchema;
5191
5207
  } else {
5192
5208
  newShape[key] = fieldSchema.optional();
5193
5209
  }
5194
- }
5210
+ });
5195
5211
  return new ZodObject({
5196
5212
  ...this._def,
5197
5213
  shape: () => newShape
@@ -5199,7 +5215,7 @@ class ZodObject extends ZodType {
5199
5215
  }
5200
5216
  required(mask) {
5201
5217
  const newShape = {};
5202
- for (const key of util.objectKeys(this.shape)) {
5218
+ util.objectKeys(this.shape).forEach((key) => {
5203
5219
  if (mask && !mask[key]) {
5204
5220
  newShape[key] = this.shape[key];
5205
5221
  } else {
@@ -5210,7 +5226,7 @@ class ZodObject extends ZodType {
5210
5226
  }
5211
5227
  newShape[key] = newField;
5212
5228
  }
5213
- }
5229
+ });
5214
5230
  return new ZodObject({
5215
5231
  ...this._def,
5216
5232
  shape: () => newShape
@@ -5338,6 +5354,113 @@ ZodUnion.create = (types, params) => {
5338
5354
  ...processCreateParams(params)
5339
5355
  });
5340
5356
  };
5357
+ const getDiscriminator = (type) => {
5358
+ if (type instanceof ZodLazy) {
5359
+ return getDiscriminator(type.schema);
5360
+ } else if (type instanceof ZodEffects) {
5361
+ return getDiscriminator(type.innerType());
5362
+ } else if (type instanceof ZodLiteral) {
5363
+ return [type.value];
5364
+ } else if (type instanceof ZodEnum) {
5365
+ return type.options;
5366
+ } else if (type instanceof ZodNativeEnum) {
5367
+ return util.objectValues(type.enum);
5368
+ } else if (type instanceof ZodDefault) {
5369
+ return getDiscriminator(type._def.innerType);
5370
+ } else if (type instanceof ZodUndefined) {
5371
+ return [void 0];
5372
+ } else if (type instanceof ZodNull) {
5373
+ return [null];
5374
+ } else if (type instanceof ZodOptional) {
5375
+ return [void 0, ...getDiscriminator(type.unwrap())];
5376
+ } else if (type instanceof ZodNullable) {
5377
+ return [null, ...getDiscriminator(type.unwrap())];
5378
+ } else if (type instanceof ZodBranded) {
5379
+ return getDiscriminator(type.unwrap());
5380
+ } else if (type instanceof ZodReadonly) {
5381
+ return getDiscriminator(type.unwrap());
5382
+ } else if (type instanceof ZodCatch) {
5383
+ return getDiscriminator(type._def.innerType);
5384
+ } else {
5385
+ return [];
5386
+ }
5387
+ };
5388
+ class ZodDiscriminatedUnion extends ZodType {
5389
+ _parse(input) {
5390
+ const { ctx } = this._processInputParams(input);
5391
+ if (ctx.parsedType !== ZodParsedType.object) {
5392
+ addIssueToContext(ctx, {
5393
+ code: ZodIssueCode.invalid_type,
5394
+ expected: ZodParsedType.object,
5395
+ received: ctx.parsedType
5396
+ });
5397
+ return INVALID;
5398
+ }
5399
+ const discriminator = this.discriminator;
5400
+ const discriminatorValue = ctx.data[discriminator];
5401
+ const option = this.optionsMap.get(discriminatorValue);
5402
+ if (!option) {
5403
+ addIssueToContext(ctx, {
5404
+ code: ZodIssueCode.invalid_union_discriminator,
5405
+ options: Array.from(this.optionsMap.keys()),
5406
+ path: [discriminator]
5407
+ });
5408
+ return INVALID;
5409
+ }
5410
+ if (ctx.common.async) {
5411
+ return option._parseAsync({
5412
+ data: ctx.data,
5413
+ path: ctx.path,
5414
+ parent: ctx
5415
+ });
5416
+ } else {
5417
+ return option._parseSync({
5418
+ data: ctx.data,
5419
+ path: ctx.path,
5420
+ parent: ctx
5421
+ });
5422
+ }
5423
+ }
5424
+ get discriminator() {
5425
+ return this._def.discriminator;
5426
+ }
5427
+ get options() {
5428
+ return this._def.options;
5429
+ }
5430
+ get optionsMap() {
5431
+ return this._def.optionsMap;
5432
+ }
5433
+ /**
5434
+ * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.
5435
+ * However, it only allows a union of objects, all of which need to share a discriminator property. This property must
5436
+ * have a different value for each object in the union.
5437
+ * @param discriminator the name of the discriminator property
5438
+ * @param types an array of object schemas
5439
+ * @param params
5440
+ */
5441
+ static create(discriminator, options, params) {
5442
+ const optionsMap = /* @__PURE__ */ new Map();
5443
+ for (const type of options) {
5444
+ const discriminatorValues = getDiscriminator(type.shape[discriminator]);
5445
+ if (!discriminatorValues.length) {
5446
+ throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`);
5447
+ }
5448
+ for (const value of discriminatorValues) {
5449
+ if (optionsMap.has(value)) {
5450
+ throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);
5451
+ }
5452
+ optionsMap.set(value, type);
5453
+ }
5454
+ }
5455
+ return new ZodDiscriminatedUnion({
5456
+ typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,
5457
+ discriminator,
5458
+ options,
5459
+ optionsMap,
5460
+ ...processCreateParams(params)
5461
+ });
5462
+ }
5463
+ }
5341
5464
  function mergeValues(a, b) {
5342
5465
  const aType = getParsedType(a);
5343
5466
  const bType = getParsedType(b);
@@ -5496,6 +5619,59 @@ ZodTuple.create = (schemas, params) => {
5496
5619
  ...processCreateParams(params)
5497
5620
  });
5498
5621
  };
5622
+ class ZodRecord extends ZodType {
5623
+ get keySchema() {
5624
+ return this._def.keyType;
5625
+ }
5626
+ get valueSchema() {
5627
+ return this._def.valueType;
5628
+ }
5629
+ _parse(input) {
5630
+ const { status, ctx } = this._processInputParams(input);
5631
+ if (ctx.parsedType !== ZodParsedType.object) {
5632
+ addIssueToContext(ctx, {
5633
+ code: ZodIssueCode.invalid_type,
5634
+ expected: ZodParsedType.object,
5635
+ received: ctx.parsedType
5636
+ });
5637
+ return INVALID;
5638
+ }
5639
+ const pairs = [];
5640
+ const keyType = this._def.keyType;
5641
+ const valueType = this._def.valueType;
5642
+ for (const key in ctx.data) {
5643
+ pairs.push({
5644
+ key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),
5645
+ value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),
5646
+ alwaysSet: key in ctx.data
5647
+ });
5648
+ }
5649
+ if (ctx.common.async) {
5650
+ return ParseStatus.mergeObjectAsync(status, pairs);
5651
+ } else {
5652
+ return ParseStatus.mergeObjectSync(status, pairs);
5653
+ }
5654
+ }
5655
+ get element() {
5656
+ return this._def.valueType;
5657
+ }
5658
+ static create(first, second, third) {
5659
+ if (second instanceof ZodType) {
5660
+ return new ZodRecord({
5661
+ keyType: first,
5662
+ valueType: second,
5663
+ typeName: ZodFirstPartyTypeKind.ZodRecord,
5664
+ ...processCreateParams(third)
5665
+ });
5666
+ }
5667
+ return new ZodRecord({
5668
+ keyType: ZodString.create(),
5669
+ valueType: first,
5670
+ typeName: ZodFirstPartyTypeKind.ZodRecord,
5671
+ ...processCreateParams(second)
5672
+ });
5673
+ }
5674
+ }
5499
5675
  class ZodMap extends ZodType {
5500
5676
  get keySchema() {
5501
5677
  return this._def.keyType;
@@ -5647,6 +5823,121 @@ ZodSet.create = (valueType, params) => {
5647
5823
  ...processCreateParams(params)
5648
5824
  });
5649
5825
  };
5826
+ class ZodFunction extends ZodType {
5827
+ constructor() {
5828
+ super(...arguments);
5829
+ this.validate = this.implement;
5830
+ }
5831
+ _parse(input) {
5832
+ const { ctx } = this._processInputParams(input);
5833
+ if (ctx.parsedType !== ZodParsedType.function) {
5834
+ addIssueToContext(ctx, {
5835
+ code: ZodIssueCode.invalid_type,
5836
+ expected: ZodParsedType.function,
5837
+ received: ctx.parsedType
5838
+ });
5839
+ return INVALID;
5840
+ }
5841
+ function makeArgsIssue(args, error) {
5842
+ return makeIssue({
5843
+ data: args,
5844
+ path: ctx.path,
5845
+ errorMaps: [
5846
+ ctx.common.contextualErrorMap,
5847
+ ctx.schemaErrorMap,
5848
+ getErrorMap(),
5849
+ errorMap
5850
+ ].filter((x) => !!x),
5851
+ issueData: {
5852
+ code: ZodIssueCode.invalid_arguments,
5853
+ argumentsError: error
5854
+ }
5855
+ });
5856
+ }
5857
+ function makeReturnsIssue(returns, error) {
5858
+ return makeIssue({
5859
+ data: returns,
5860
+ path: ctx.path,
5861
+ errorMaps: [
5862
+ ctx.common.contextualErrorMap,
5863
+ ctx.schemaErrorMap,
5864
+ getErrorMap(),
5865
+ errorMap
5866
+ ].filter((x) => !!x),
5867
+ issueData: {
5868
+ code: ZodIssueCode.invalid_return_type,
5869
+ returnTypeError: error
5870
+ }
5871
+ });
5872
+ }
5873
+ const params = { errorMap: ctx.common.contextualErrorMap };
5874
+ const fn = ctx.data;
5875
+ if (this._def.returns instanceof ZodPromise) {
5876
+ const me = this;
5877
+ return OK(async function(...args) {
5878
+ const error = new ZodError([]);
5879
+ const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {
5880
+ error.addIssue(makeArgsIssue(args, e));
5881
+ throw error;
5882
+ });
5883
+ const result = await Reflect.apply(fn, this, parsedArgs);
5884
+ const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
5885
+ error.addIssue(makeReturnsIssue(result, e));
5886
+ throw error;
5887
+ });
5888
+ return parsedReturns;
5889
+ });
5890
+ } else {
5891
+ const me = this;
5892
+ return OK(function(...args) {
5893
+ const parsedArgs = me._def.args.safeParse(args, params);
5894
+ if (!parsedArgs.success) {
5895
+ throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
5896
+ }
5897
+ const result = Reflect.apply(fn, this, parsedArgs.data);
5898
+ const parsedReturns = me._def.returns.safeParse(result, params);
5899
+ if (!parsedReturns.success) {
5900
+ throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
5901
+ }
5902
+ return parsedReturns.data;
5903
+ });
5904
+ }
5905
+ }
5906
+ parameters() {
5907
+ return this._def.args;
5908
+ }
5909
+ returnType() {
5910
+ return this._def.returns;
5911
+ }
5912
+ args(...items) {
5913
+ return new ZodFunction({
5914
+ ...this._def,
5915
+ args: ZodTuple.create(items).rest(ZodUnknown.create())
5916
+ });
5917
+ }
5918
+ returns(returnType) {
5919
+ return new ZodFunction({
5920
+ ...this._def,
5921
+ returns: returnType
5922
+ });
5923
+ }
5924
+ implement(func) {
5925
+ const validatedFunc = this.parse(func);
5926
+ return validatedFunc;
5927
+ }
5928
+ strictImplement(func) {
5929
+ const validatedFunc = this.parse(func);
5930
+ return validatedFunc;
5931
+ }
5932
+ static create(args, returns, params) {
5933
+ return new ZodFunction({
5934
+ args: args ? args : ZodTuple.create([]).rest(ZodUnknown.create()),
5935
+ returns: returns || ZodUnknown.create(),
5936
+ typeName: ZodFirstPartyTypeKind.ZodFunction,
5937
+ ...processCreateParams(params)
5938
+ });
5939
+ }
5940
+ }
5650
5941
  class ZodLazy extends ZodType {
5651
5942
  get schema() {
5652
5943
  return this._def.getter();
@@ -5696,6 +5987,10 @@ function createZodEnum(values, params) {
5696
5987
  });
5697
5988
  }
5698
5989
  class ZodEnum extends ZodType {
5990
+ constructor() {
5991
+ super(...arguments);
5992
+ _ZodEnum_cache.set(this, void 0);
5993
+ }
5699
5994
  _parse(input) {
5700
5995
  if (typeof input.data !== "string") {
5701
5996
  const ctx = this._getOrReturnCtx(input);
@@ -5707,10 +6002,10 @@ class ZodEnum extends ZodType {
5707
6002
  });
5708
6003
  return INVALID;
5709
6004
  }
5710
- if (!this._cache) {
5711
- this._cache = new Set(this._def.values);
6005
+ if (!__classPrivateFieldGet(this, _ZodEnum_cache)) {
6006
+ __classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values));
5712
6007
  }
5713
- if (!this._cache.has(input.data)) {
6008
+ if (!__classPrivateFieldGet(this, _ZodEnum_cache).has(input.data)) {
5714
6009
  const ctx = this._getOrReturnCtx(input);
5715
6010
  const expectedValues = this._def.values;
5716
6011
  addIssueToContext(ctx, {
@@ -5759,8 +6054,13 @@ class ZodEnum extends ZodType {
5759
6054
  });
5760
6055
  }
5761
6056
  }
6057
+ _ZodEnum_cache = /* @__PURE__ */ new WeakMap();
5762
6058
  ZodEnum.create = createZodEnum;
5763
6059
  class ZodNativeEnum extends ZodType {
6060
+ constructor() {
6061
+ super(...arguments);
6062
+ _ZodNativeEnum_cache.set(this, void 0);
6063
+ }
5764
6064
  _parse(input) {
5765
6065
  const nativeEnumValues = util.getValidEnumValues(this._def.values);
5766
6066
  const ctx = this._getOrReturnCtx(input);
@@ -5773,10 +6073,10 @@ class ZodNativeEnum extends ZodType {
5773
6073
  });
5774
6074
  return INVALID;
5775
6075
  }
5776
- if (!this._cache) {
5777
- this._cache = new Set(util.getValidEnumValues(this._def.values));
6076
+ if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache)) {
6077
+ __classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)));
5778
6078
  }
5779
- if (!this._cache.has(input.data)) {
6079
+ if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache).has(input.data)) {
5780
6080
  const expectedValues = util.objectValues(nativeEnumValues);
5781
6081
  addIssueToContext(ctx, {
5782
6082
  received: ctx.data,
@@ -5791,6 +6091,7 @@ class ZodNativeEnum extends ZodType {
5791
6091
  return this._def.values;
5792
6092
  }
5793
6093
  }
6094
+ _ZodNativeEnum_cache = /* @__PURE__ */ new WeakMap();
5794
6095
  ZodNativeEnum.create = (values, params) => {
5795
6096
  return new ZodNativeEnum({
5796
6097
  values,
@@ -5931,7 +6232,7 @@ class ZodEffects extends ZodType {
5931
6232
  parent: ctx
5932
6233
  });
5933
6234
  if (!isValid$3(base))
5934
- return INVALID;
6235
+ return base;
5935
6236
  const result = effect.transform(base.value, checkCtx);
5936
6237
  if (result instanceof Promise) {
5937
6238
  throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);
@@ -5940,11 +6241,8 @@ class ZodEffects extends ZodType {
5940
6241
  } else {
5941
6242
  return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {
5942
6243
  if (!isValid$3(base))
5943
- return INVALID;
5944
- return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
5945
- status: status.value,
5946
- value: result
5947
- }));
6244
+ return base;
6245
+ return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));
5948
6246
  });
5949
6247
  }
5950
6248
  }
@@ -6104,6 +6402,7 @@ ZodNaN.create = (params) => {
6104
6402
  ...processCreateParams(params)
6105
6403
  });
6106
6404
  };
6405
+ const BRAND = Symbol("zod_brand");
6107
6406
  class ZodBranded extends ZodType {
6108
6407
  _parse(input) {
6109
6408
  const { ctx } = this._processInputParams(input);
@@ -6195,6 +6494,38 @@ ZodReadonly.create = (type, params) => {
6195
6494
  ...processCreateParams(params)
6196
6495
  });
6197
6496
  };
6497
+ function cleanParams(params, data) {
6498
+ const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
6499
+ const p2 = typeof p === "string" ? { message: p } : p;
6500
+ return p2;
6501
+ }
6502
+ function custom(check, _params = {}, fatal) {
6503
+ if (check)
6504
+ return ZodAny.create().superRefine((data, ctx) => {
6505
+ var _a, _b;
6506
+ const r = check(data);
6507
+ if (r instanceof Promise) {
6508
+ return r.then((r2) => {
6509
+ var _a2, _b2;
6510
+ if (!r2) {
6511
+ const params = cleanParams(_params, data);
6512
+ const _fatal = (_b2 = (_a2 = params.fatal) !== null && _a2 !== void 0 ? _a2 : fatal) !== null && _b2 !== void 0 ? _b2 : true;
6513
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
6514
+ }
6515
+ });
6516
+ }
6517
+ if (!r) {
6518
+ const params = cleanParams(_params, data);
6519
+ const _fatal = (_b = (_a = params.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
6520
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
6521
+ }
6522
+ return;
6523
+ });
6524
+ return ZodAny.create();
6525
+ }
6526
+ const late = {
6527
+ object: ZodObject.lazycreate
6528
+ };
6198
6529
  var ZodFirstPartyTypeKind;
6199
6530
  (function(ZodFirstPartyTypeKind2) {
6200
6531
  ZodFirstPartyTypeKind2["ZodString"] = "ZodString";
@@ -6234,20 +6565,177 @@ var ZodFirstPartyTypeKind;
6234
6565
  ZodFirstPartyTypeKind2["ZodPipeline"] = "ZodPipeline";
6235
6566
  ZodFirstPartyTypeKind2["ZodReadonly"] = "ZodReadonly";
6236
6567
  })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
6568
+ const instanceOfType = (cls, params = {
6569
+ message: `Input not instance of ${cls.name}`
6570
+ }) => custom((data) => data instanceof cls, params);
6237
6571
  const stringType = ZodString.create;
6238
- ZodNever.create;
6239
- ZodArray.create;
6240
- ZodUnion.create;
6241
- ZodIntersection.create;
6242
- ZodTuple.create;
6243
- ZodEnum.create;
6244
- ZodPromise.create;
6245
- ZodOptional.create;
6246
- ZodNullable.create;
6572
+ const numberType = ZodNumber.create;
6573
+ const nanType = ZodNaN.create;
6574
+ const bigIntType = ZodBigInt.create;
6575
+ const booleanType = ZodBoolean.create;
6576
+ const dateType = ZodDate.create;
6577
+ const symbolType = ZodSymbol.create;
6578
+ const undefinedType = ZodUndefined.create;
6579
+ const nullType = ZodNull.create;
6580
+ const anyType = ZodAny.create;
6581
+ const unknownType = ZodUnknown.create;
6582
+ const neverType = ZodNever.create;
6583
+ const voidType = ZodVoid.create;
6584
+ const arrayType = ZodArray.create;
6585
+ const objectType = ZodObject.create;
6586
+ const strictObjectType = ZodObject.strictCreate;
6587
+ const unionType = ZodUnion.create;
6588
+ const discriminatedUnionType = ZodDiscriminatedUnion.create;
6589
+ const intersectionType = ZodIntersection.create;
6590
+ const tupleType = ZodTuple.create;
6591
+ const recordType = ZodRecord.create;
6592
+ const mapType = ZodMap.create;
6593
+ const setType = ZodSet.create;
6594
+ const functionType = ZodFunction.create;
6595
+ const lazyType = ZodLazy.create;
6596
+ const literalType = ZodLiteral.create;
6597
+ const enumType = ZodEnum.create;
6598
+ const nativeEnumType = ZodNativeEnum.create;
6599
+ const promiseType = ZodPromise.create;
6600
+ const effectsType = ZodEffects.create;
6601
+ const optionalType = ZodOptional.create;
6602
+ const nullableType = ZodNullable.create;
6603
+ const preprocessType = ZodEffects.createWithPreprocess;
6604
+ const pipelineType = ZodPipeline.create;
6605
+ const ostring = () => stringType().optional();
6606
+ const onumber = () => numberType().optional();
6607
+ const oboolean = () => booleanType().optional();
6608
+ const coerce = {
6609
+ string: (arg) => ZodString.create({ ...arg, coerce: true }),
6610
+ number: (arg) => ZodNumber.create({ ...arg, coerce: true }),
6611
+ boolean: (arg) => ZodBoolean.create({
6612
+ ...arg,
6613
+ coerce: true
6614
+ }),
6615
+ bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }),
6616
+ date: (arg) => ZodDate.create({ ...arg, coerce: true })
6617
+ };
6618
+ const NEVER = INVALID;
6619
+ var z = /* @__PURE__ */ Object.freeze({
6620
+ __proto__: null,
6621
+ defaultErrorMap: errorMap,
6622
+ setErrorMap,
6623
+ getErrorMap,
6624
+ makeIssue,
6625
+ EMPTY_PATH,
6626
+ addIssueToContext,
6627
+ ParseStatus,
6628
+ INVALID,
6629
+ DIRTY,
6630
+ OK,
6631
+ isAborted,
6632
+ isDirty,
6633
+ isValid: isValid$3,
6634
+ isAsync,
6635
+ get util() {
6636
+ return util;
6637
+ },
6638
+ get objectUtil() {
6639
+ return objectUtil;
6640
+ },
6641
+ ZodParsedType,
6642
+ getParsedType,
6643
+ ZodType,
6644
+ datetimeRegex,
6645
+ ZodString,
6646
+ ZodNumber,
6647
+ ZodBigInt,
6648
+ ZodBoolean,
6649
+ ZodDate,
6650
+ ZodSymbol,
6651
+ ZodUndefined,
6652
+ ZodNull,
6653
+ ZodAny,
6654
+ ZodUnknown,
6655
+ ZodNever,
6656
+ ZodVoid,
6657
+ ZodArray,
6658
+ ZodObject,
6659
+ ZodUnion,
6660
+ ZodDiscriminatedUnion,
6661
+ ZodIntersection,
6662
+ ZodTuple,
6663
+ ZodRecord,
6664
+ ZodMap,
6665
+ ZodSet,
6666
+ ZodFunction,
6667
+ ZodLazy,
6668
+ ZodLiteral,
6669
+ ZodEnum,
6670
+ ZodNativeEnum,
6671
+ ZodPromise,
6672
+ ZodEffects,
6673
+ ZodTransformer: ZodEffects,
6674
+ ZodOptional,
6675
+ ZodNullable,
6676
+ ZodDefault,
6677
+ ZodCatch,
6678
+ ZodNaN,
6679
+ BRAND,
6680
+ ZodBranded,
6681
+ ZodPipeline,
6682
+ ZodReadonly,
6683
+ custom,
6684
+ Schema: ZodType,
6685
+ ZodSchema: ZodType,
6686
+ late,
6687
+ get ZodFirstPartyTypeKind() {
6688
+ return ZodFirstPartyTypeKind;
6689
+ },
6690
+ coerce,
6691
+ any: anyType,
6692
+ array: arrayType,
6693
+ bigint: bigIntType,
6694
+ boolean: booleanType,
6695
+ date: dateType,
6696
+ discriminatedUnion: discriminatedUnionType,
6697
+ effect: effectsType,
6698
+ "enum": enumType,
6699
+ "function": functionType,
6700
+ "instanceof": instanceOfType,
6701
+ intersection: intersectionType,
6702
+ lazy: lazyType,
6703
+ literal: literalType,
6704
+ map: mapType,
6705
+ nan: nanType,
6706
+ nativeEnum: nativeEnumType,
6707
+ never: neverType,
6708
+ "null": nullType,
6709
+ nullable: nullableType,
6710
+ number: numberType,
6711
+ object: objectType,
6712
+ oboolean,
6713
+ onumber,
6714
+ optional: optionalType,
6715
+ ostring,
6716
+ pipeline: pipelineType,
6717
+ preprocess: preprocessType,
6718
+ promise: promiseType,
6719
+ record: recordType,
6720
+ set: setType,
6721
+ strictObject: strictObjectType,
6722
+ string: stringType,
6723
+ symbol: symbolType,
6724
+ transformer: effectsType,
6725
+ tuple: tupleType,
6726
+ "undefined": undefinedType,
6727
+ union: unionType,
6728
+ unknown: unknownType,
6729
+ "void": voidType,
6730
+ NEVER,
6731
+ ZodIssueCode,
6732
+ quotelessJson,
6733
+ ZodError
6734
+ });
6247
6735
  const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "development", "PROD": true, "SSR": false, "VITE_MODULES_CARDS_ADMIN_FRONTEND_BASE_URL": "https://dev-sso.6seconds.org", "VITE_MODULES_CARDS_HOME_FRONTEND_BASE_URL": "https://dev-sso.6seconds.org", "VITE_MODULES_CERT_FRONTEND_BASE_URL": "https://dev-sso.6seconds.org", "VITE_MODULES_ENV": "dev", "VITE_MODULES_EVENTS_FRONTEND_BASE_URL": "https://dev-sso.6seconds.org", "VITE_MODULES_SSO_BACKEND_BASE_URL": "https://dev-ssoapi.6seconds.org", "VITE_MODULES_SSO_FRONTEND_BASE_URL": "https://dev-sso.6seconds.org", "VITE_MODULES_TOOLS_FRONTEND_BASE_URL": "https://dev-sso.6seconds.org" };
6248
6736
  const env = createEnv({
6249
6737
  client: {
6250
- VITE_MODULES_ENV: stringType()
6738
+ VITE_MODULES_ENV: z.string()
6251
6739
  },
6252
6740
  runtimeEnv: __vite_import_meta_env__
6253
6741
  });
@@ -6793,8 +7281,8 @@ function removeFormattingTokens(input) {
6793
7281
  return input.replace(/\\/g, "");
6794
7282
  }
6795
7283
  function makeFormatFunction(format2) {
6796
- var array2 = format2.match(formattingTokens), i, length2;
6797
- for (i = 0, length2 = array2.length; i < length2; i++) {
7284
+ var array2 = format2.match(formattingTokens), i, length;
7285
+ for (i = 0, length = array2.length; i < length; i++) {
6798
7286
  if (formatTokenFunctions[array2[i]]) {
6799
7287
  array2[i] = formatTokenFunctions[array2[i]];
6800
7288
  } else {
@@ -6803,7 +7291,7 @@ function makeFormatFunction(format2) {
6803
7291
  }
6804
7292
  return function(mom) {
6805
7293
  var output = "", i2;
6806
- for (i2 = 0; i2 < length2; i2++) {
7294
+ for (i2 = 0; i2 < length; i2++) {
6807
7295
  output += isFunction2(array2[i2]) ? array2[i2].call(mom, format2) : array2[i2];
6808
7296
  }
6809
7297
  return output;
@@ -7941,18 +8429,18 @@ function normalizeLocale(key) {
7941
8429
  return key ? key.toLowerCase().replace("_", "-") : key;
7942
8430
  }
7943
8431
  function chooseLocale(names) {
7944
- var i = 0, j, next2, locale2, split;
8432
+ var i = 0, j, next, locale2, split;
7945
8433
  while (i < names.length) {
7946
8434
  split = normalizeLocale(names[i]).split("-");
7947
8435
  j = split.length;
7948
- next2 = normalizeLocale(names[i + 1]);
7949
- next2 = next2 ? next2.split("-") : null;
8436
+ next = normalizeLocale(names[i + 1]);
8437
+ next = next ? next.split("-") : null;
7950
8438
  while (j > 0) {
7951
8439
  locale2 = loadLocale(split.slice(0, j).join("-"));
7952
8440
  if (locale2) {
7953
8441
  return locale2;
7954
8442
  }
7955
- if (next2 && next2.length >= j && commonPrefix(split, next2) >= j - 1) {
8443
+ if (next && next.length >= j && commonPrefix(split, next) >= j - 1) {
7956
8444
  break;
7957
8445
  }
7958
8446
  j--;
@@ -8147,11 +8635,11 @@ var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\
8147
8635
  PST: -8 * 60
8148
8636
  };
8149
8637
  function configFromISO(config) {
8150
- var i, l, string2 = config._i, match5 = extendedIsoRegex.exec(string2) || basicIsoRegex.exec(string2), allowTime, dateFormat, timeFormat, tzFormat, isoDatesLen = isoDates.length, isoTimesLen = isoTimes.length;
8151
- if (match5) {
8638
+ var i, l, string2 = config._i, match = extendedIsoRegex.exec(string2) || basicIsoRegex.exec(string2), allowTime, dateFormat, timeFormat, tzFormat, isoDatesLen = isoDates.length, isoTimesLen = isoTimes.length;
8639
+ if (match) {
8152
8640
  getParsingFlags(config).iso = true;
8153
8641
  for (i = 0, l = isoDatesLen; i < l; i++) {
8154
- if (isoDates[i][1].exec(match5[1])) {
8642
+ if (isoDates[i][1].exec(match[1])) {
8155
8643
  dateFormat = isoDates[i][0];
8156
8644
  allowTime = isoDates[i][2] !== false;
8157
8645
  break;
@@ -8161,10 +8649,10 @@ function configFromISO(config) {
8161
8649
  config._isValid = false;
8162
8650
  return;
8163
8651
  }
8164
- if (match5[3]) {
8652
+ if (match[3]) {
8165
8653
  for (i = 0, l = isoTimesLen; i < l; i++) {
8166
- if (isoTimes[i][1].exec(match5[3])) {
8167
- timeFormat = (match5[2] || " ") + isoTimes[i][0];
8654
+ if (isoTimes[i][1].exec(match[3])) {
8655
+ timeFormat = (match[2] || " ") + isoTimes[i][0];
8168
8656
  break;
8169
8657
  }
8170
8658
  }
@@ -8177,8 +8665,8 @@ function configFromISO(config) {
8177
8665
  config._isValid = false;
8178
8666
  return;
8179
8667
  }
8180
- if (match5[4]) {
8181
- if (tzRegex.exec(match5[4])) {
8668
+ if (match[4]) {
8669
+ if (tzRegex.exec(match[4])) {
8182
8670
  tzFormat = "Z";
8183
8671
  } else {
8184
8672
  config._isValid = false;
@@ -8242,21 +8730,21 @@ function calculateOffset(obsOffset, militaryOffset, numOffset) {
8242
8730
  }
8243
8731
  }
8244
8732
  function configFromRFC2822(config) {
8245
- var match5 = rfc2822.exec(preprocessRFC2822(config._i)), parsedArray;
8246
- if (match5) {
8733
+ var match = rfc2822.exec(preprocessRFC2822(config._i)), parsedArray;
8734
+ if (match) {
8247
8735
  parsedArray = extractFromRFC2822Strings(
8248
- match5[4],
8249
- match5[3],
8250
- match5[2],
8251
- match5[5],
8252
- match5[6],
8253
- match5[7]
8736
+ match[4],
8737
+ match[3],
8738
+ match[2],
8739
+ match[5],
8740
+ match[6],
8741
+ match[7]
8254
8742
  );
8255
- if (!checkWeekday(match5[1], parsedArray, config)) {
8743
+ if (!checkWeekday(match[1], parsedArray, config)) {
8256
8744
  return;
8257
8745
  }
8258
8746
  config._a = parsedArray;
8259
- config._tzm = calculateOffset(match5[8], match5[9], match5[10]);
8747
+ config._tzm = calculateOffset(match[8], match[9], match[10]);
8260
8748
  config._d = createUTCDate.apply(null, config._a);
8261
8749
  config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
8262
8750
  getParsingFlags(config).rfc2822 = true;
@@ -8891,7 +9379,7 @@ function isUtc() {
8891
9379
  }
8892
9380
  var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
8893
9381
  function createDuration(input, key) {
8894
- var duration = input, match5 = null, sign2, ret, diffRes;
9382
+ var duration = input, match = null, sign2, ret, diffRes;
8895
9383
  if (isDuration(input)) {
8896
9384
  duration = {
8897
9385
  ms: input._milliseconds,
@@ -8905,27 +9393,27 @@ function createDuration(input, key) {
8905
9393
  } else {
8906
9394
  duration.milliseconds = +input;
8907
9395
  }
8908
- } else if (match5 = aspNetRegex.exec(input)) {
8909
- sign2 = match5[1] === "-" ? -1 : 1;
9396
+ } else if (match = aspNetRegex.exec(input)) {
9397
+ sign2 = match[1] === "-" ? -1 : 1;
8910
9398
  duration = {
8911
9399
  y: 0,
8912
- d: toInt(match5[DATE]) * sign2,
8913
- h: toInt(match5[HOUR]) * sign2,
8914
- m: toInt(match5[MINUTE]) * sign2,
8915
- s: toInt(match5[SECOND]) * sign2,
8916
- ms: toInt(absRound(match5[MILLISECOND] * 1e3)) * sign2
9400
+ d: toInt(match[DATE]) * sign2,
9401
+ h: toInt(match[HOUR]) * sign2,
9402
+ m: toInt(match[MINUTE]) * sign2,
9403
+ s: toInt(match[SECOND]) * sign2,
9404
+ ms: toInt(absRound(match[MILLISECOND] * 1e3)) * sign2
8917
9405
  // the millisecond decimal point is included in the match
8918
9406
  };
8919
- } else if (match5 = isoRegex.exec(input)) {
8920
- sign2 = match5[1] === "-" ? -1 : 1;
9407
+ } else if (match = isoRegex.exec(input)) {
9408
+ sign2 = match[1] === "-" ? -1 : 1;
8921
9409
  duration = {
8922
- y: parseIso(match5[2], sign2),
8923
- M: parseIso(match5[3], sign2),
8924
- w: parseIso(match5[4], sign2),
8925
- d: parseIso(match5[5], sign2),
8926
- h: parseIso(match5[6], sign2),
8927
- m: parseIso(match5[7], sign2),
8928
- s: parseIso(match5[8], sign2)
9410
+ y: parseIso(match[2], sign2),
9411
+ M: parseIso(match[3], sign2),
9412
+ w: parseIso(match[4], sign2),
9413
+ d: parseIso(match[5], sign2),
9414
+ h: parseIso(match[6], sign2),
9415
+ m: parseIso(match[7], sign2),
9416
+ s: parseIso(match[8], sign2)
8929
9417
  };
8930
9418
  } else if (duration == null) {
8931
9419
  duration = {};
@@ -9245,16 +9733,16 @@ function inspect() {
9245
9733
  if (!this.isValid()) {
9246
9734
  return "moment.invalid(/* " + this._i + " */)";
9247
9735
  }
9248
- var func = "moment", zone = "", prefix2, year, datetime, suffix;
9736
+ var func = "moment", zone = "", prefix, year, datetime, suffix;
9249
9737
  if (!this.isLocal()) {
9250
9738
  func = this.utcOffset() === 0 ? "moment.utc" : "moment.parseZone";
9251
9739
  zone = "Z";
9252
9740
  }
9253
- prefix2 = "[" + func + '("]';
9741
+ prefix = "[" + func + '("]';
9254
9742
  year = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY";
9255
9743
  datetime = "-MM-DD[T]HH:mm:ss.SSS";
9256
9744
  suffix = zone + '[")]';
9257
- return this.format(prefix2 + year + datetime + suffix);
9745
+ return this.format(prefix + year + datetime + suffix);
9258
9746
  }
9259
9747
  function format(inputString) {
9260
9748
  if (!inputString) {
@@ -9263,7 +9751,7 @@ function format(inputString) {
9263
9751
  var output = formatMoment(this, inputString);
9264
9752
  return this.localeData().postformat(output);
9265
9753
  }
9266
- function from$1(time, withoutSuffix) {
9754
+ function from(time, withoutSuffix) {
9267
9755
  if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {
9268
9756
  return createDuration({ to: this, from: time }).locale(this.locale()).humanize(!withoutSuffix);
9269
9757
  } else {
@@ -9530,12 +10018,12 @@ addRegexToken("yyyy", matchUnsigned);
9530
10018
  addRegexToken("yo", matchEraYearOrdinal);
9531
10019
  addParseToken(["y", "yy", "yyy", "yyyy"], YEAR);
9532
10020
  addParseToken(["yo"], function(input, array2, config, token2) {
9533
- var match5;
10021
+ var match;
9534
10022
  if (config._locale._eraYearOrdinalRegex) {
9535
- match5 = input.match(config._locale._eraYearOrdinalRegex);
10023
+ match = input.match(config._locale._eraYearOrdinalRegex);
9536
10024
  }
9537
10025
  if (config._locale.eraYearOrdinalParse) {
9538
- array2[YEAR] = config._locale.eraYearOrdinalParse(input, match5);
10026
+ array2[YEAR] = config._locale.eraYearOrdinalParse(input, match);
9539
10027
  } else {
9540
10028
  array2[YEAR] = parseInt(input, 10);
9541
10029
  }
@@ -9854,15 +10342,15 @@ addFormatToken(0, ["SSSSSSSSS", 9], 0, function() {
9854
10342
  addRegexToken("S", match1to3, match1);
9855
10343
  addRegexToken("SS", match1to3, match2);
9856
10344
  addRegexToken("SSS", match1to3, match3);
9857
- var token$1, getSetMillisecond;
9858
- for (token$1 = "SSSS"; token$1.length <= 9; token$1 += "S") {
9859
- addRegexToken(token$1, matchUnsigned);
10345
+ var token, getSetMillisecond;
10346
+ for (token = "SSSS"; token.length <= 9; token += "S") {
10347
+ addRegexToken(token, matchUnsigned);
9860
10348
  }
9861
10349
  function parseMs(input, array2) {
9862
10350
  array2[MILLISECOND] = toInt(("0." + input) * 1e3);
9863
10351
  }
9864
- for (token$1 = "S"; token$1.length <= 9; token$1 += "S") {
9865
- addParseToken(token$1, parseMs);
10352
+ for (token = "S"; token.length <= 9; token += "S") {
10353
+ addParseToken(token, parseMs);
9866
10354
  }
9867
10355
  getSetMillisecond = makeGetSet("Milliseconds", false);
9868
10356
  addFormatToken("z", 0, 0, "zoneAbbr");
@@ -9880,7 +10368,7 @@ proto.clone = clone$1;
9880
10368
  proto.diff = diff;
9881
10369
  proto.endOf = endOf;
9882
10370
  proto.format = format;
9883
- proto.from = from$1;
10371
+ proto.from = from;
9884
10372
  proto.fromNow = fromNow;
9885
10373
  proto.to = to;
9886
10374
  proto.toNow = toNow;
@@ -10111,7 +10599,7 @@ hooks.langData = deprecate(
10111
10599
  getLocale
10112
10600
  );
10113
10601
  var mathAbs = Math.abs;
10114
- function abs$1() {
10602
+ function abs() {
10115
10603
  var data = this._data;
10116
10604
  this._milliseconds = mathAbs(this._milliseconds);
10117
10605
  this._days = mathAbs(this._days);
@@ -10313,7 +10801,7 @@ function humanize(argWithSuffix, argThresholds) {
10313
10801
  }
10314
10802
  return locale2.postformat(output);
10315
10803
  }
10316
- var abs$1$1 = Math.abs;
10804
+ var abs$1 = Math.abs;
10317
10805
  function sign(x) {
10318
10806
  return (x > 0) - (x < 0) || +x;
10319
10807
  }
@@ -10321,7 +10809,7 @@ function toISOString$1() {
10321
10809
  if (!this.isValid()) {
10322
10810
  return this.localeData().invalidDate();
10323
10811
  }
10324
- var seconds2 = abs$1$1(this._milliseconds) / 1e3, days2 = abs$1$1(this._days), months2 = abs$1$1(this._months), minutes2, hours2, years2, s, total = this.asSeconds(), totalSign, ymSign, daysSign, hmsSign;
10812
+ var seconds2 = abs$1(this._milliseconds) / 1e3, days2 = abs$1(this._days), months2 = abs$1(this._months), minutes2, hours2, years2, s, total = this.asSeconds(), totalSign, ymSign, daysSign, hmsSign;
10325
10813
  if (!total) {
10326
10814
  return "P0D";
10327
10815
  }
@@ -10340,7 +10828,7 @@ function toISOString$1() {
10340
10828
  }
10341
10829
  var proto$2 = Duration.prototype;
10342
10830
  proto$2.isValid = isValid$1;
10343
- proto$2.abs = abs$1;
10831
+ proto$2.abs = abs;
10344
10832
  proto$2.add = add$1;
10345
10833
  proto$2.subtract = subtract$1;
10346
10834
  proto$2.as = as;
@@ -10553,7 +11041,7 @@ function requireTinyCase() {
10553
11041
  const upperFirst = (str) => str[0].toUpperCase() + str.slice(1);
10554
11042
  const join = (str, d) => words(str).join(d).toLowerCase();
10555
11043
  const camelCase = (str) => words(str).reduce(
10556
- (acc, next2) => `${acc}${!acc ? next2.toLowerCase() : next2[0].toUpperCase() + next2.slice(1).toLowerCase()}`,
11044
+ (acc, next) => `${acc}${!acc ? next.toLowerCase() : next[0].toUpperCase() + next.slice(1).toLowerCase()}`,
10557
11045
  ""
10558
11046
  );
10559
11047
  const pascalCase = (str) => upperFirst(camelCase(str));
@@ -10594,32 +11082,32 @@ function requireToposort() {
10594
11082
  if (!visited[i]) visit(nodes[i], i, /* @__PURE__ */ new Set());
10595
11083
  }
10596
11084
  return sorted;
10597
- function visit(node2, i2, predecessors) {
10598
- if (predecessors.has(node2)) {
11085
+ function visit(node, i2, predecessors) {
11086
+ if (predecessors.has(node)) {
10599
11087
  var nodeRep;
10600
11088
  try {
10601
- nodeRep = ", node was:" + JSON.stringify(node2);
11089
+ nodeRep = ", node was:" + JSON.stringify(node);
10602
11090
  } catch (e) {
10603
11091
  nodeRep = "";
10604
11092
  }
10605
11093
  throw new Error("Cyclic dependency" + nodeRep);
10606
11094
  }
10607
- if (!nodesHash.has(node2)) {
10608
- throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: " + JSON.stringify(node2));
11095
+ if (!nodesHash.has(node)) {
11096
+ throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: " + JSON.stringify(node));
10609
11097
  }
10610
11098
  if (visited[i2]) return;
10611
11099
  visited[i2] = true;
10612
- var outgoing = outgoingEdges.get(node2) || /* @__PURE__ */ new Set();
11100
+ var outgoing = outgoingEdges.get(node) || /* @__PURE__ */ new Set();
10613
11101
  outgoing = Array.from(outgoing);
10614
11102
  if (i2 = outgoing.length) {
10615
- predecessors.add(node2);
11103
+ predecessors.add(node);
10616
11104
  do {
10617
11105
  var child = outgoing[--i2];
10618
11106
  visit(child, nodesHash.get(child), predecessors);
10619
11107
  } while (i2);
10620
- predecessors.delete(node2);
11108
+ predecessors.delete(node);
10621
11109
  }
10622
- sorted[--cursor] = node2;
11110
+ sorted[--cursor] = node;
10623
11111
  }
10624
11112
  }
10625
11113
  function uniqueNodes(arr) {
@@ -10900,8 +11388,8 @@ class Reference {
10900
11388
  this.isContext = this.key[0] === prefixes.context;
10901
11389
  this.isValue = this.key[0] === prefixes.value;
10902
11390
  this.isSibling = !this.isContext && !this.isValue;
10903
- let prefix2 = this.isContext ? prefixes.context : this.isValue ? prefixes.value : "";
10904
- this.path = this.key.slice(prefix2.length);
11391
+ let prefix = this.isContext ? prefixes.context : this.isValue ? prefixes.value : "";
11392
+ this.path = this.key.slice(prefix.length);
10905
11393
  this.getter = this.path && propertyExprExports.getter(this.path, true);
10906
11394
  this.map = options.map;
10907
11395
  }
@@ -10946,7 +11434,7 @@ function createValidation(config) {
10946
11434
  options,
10947
11435
  originalValue,
10948
11436
  schema
10949
- }, panic, next2) {
11437
+ }, panic, next) {
10950
11438
  const {
10951
11439
  name,
10952
11440
  test,
@@ -10960,34 +11448,31 @@ function createValidation(config) {
10960
11448
  abortEarly = schema.spec.abortEarly,
10961
11449
  disableStackTrace = schema.spec.disableStackTrace
10962
11450
  } = options;
10963
- const resolveOptions = {
10964
- value,
10965
- parent,
10966
- context
10967
- };
11451
+ function resolve(item) {
11452
+ return Reference.isRef(item) ? item.getValue(value, parent, context) : item;
11453
+ }
10968
11454
  function createError(overrides = {}) {
10969
- const nextParams = resolveParams(Object.assign({
11455
+ const nextParams = Object.assign({
10970
11456
  value,
10971
11457
  originalValue,
10972
11458
  label: schema.spec.label,
10973
11459
  path: overrides.path || path,
10974
11460
  spec: schema.spec,
10975
11461
  disableStackTrace: overrides.disableStackTrace || disableStackTrace
10976
- }, params, overrides.params), resolveOptions);
11462
+ }, params, overrides.params);
11463
+ for (const key of Object.keys(nextParams)) nextParams[key] = resolve(nextParams[key]);
10977
11464
  const error = new ValidationError(ValidationError.formatError(overrides.message || message, nextParams), value, nextParams.path, overrides.type || name, nextParams.disableStackTrace);
10978
11465
  error.params = nextParams;
10979
11466
  return error;
10980
11467
  }
10981
- const invalid = abortEarly ? panic : next2;
11468
+ const invalid = abortEarly ? panic : next;
10982
11469
  let ctx = {
10983
11470
  path,
10984
11471
  parent,
10985
11472
  type: name,
10986
11473
  from: options.from,
10987
11474
  createError,
10988
- resolve(item) {
10989
- return resolveMaybeRef(item, resolveOptions);
10990
- },
11475
+ resolve,
10991
11476
  options,
10992
11477
  originalValue,
10993
11478
  schema
@@ -10995,7 +11480,7 @@ function createValidation(config) {
10995
11480
  const handleResult2 = (validOrError) => {
10996
11481
  if (ValidationError.isError(validOrError)) invalid(validOrError);
10997
11482
  else if (!validOrError) invalid(createError());
10998
- else next2(null);
11483
+ else next(null);
10999
11484
  };
11000
11485
  const handleError = (err) => {
11001
11486
  if (ValidationError.isError(err)) invalid(err);
@@ -11024,16 +11509,6 @@ function createValidation(config) {
11024
11509
  validate.OPTIONS = config;
11025
11510
  return validate;
11026
11511
  }
11027
- function resolveParams(params, options) {
11028
- if (!params) return params;
11029
- for (const key of Object.keys(params)) {
11030
- params[key] = resolveMaybeRef(params[key], options);
11031
- }
11032
- return params;
11033
- }
11034
- function resolveMaybeRef(item, options) {
11035
- return Reference.isRef(item) ? item.getValue(options.value, options.parent, options.context) : item;
11036
- }
11037
11512
  function getIn(schema, path, value, context = value) {
11038
11513
  let parent, lastPart, lastPartDebug;
11039
11514
  if (!path) return {
@@ -11093,105 +11568,42 @@ class ReferenceSet extends Set {
11093
11568
  return new ReferenceSet(this.values());
11094
11569
  }
11095
11570
  merge(newItems, removeItems) {
11096
- const next2 = this.clone();
11097
- newItems.forEach((value) => next2.add(value));
11098
- removeItems.forEach((value) => next2.delete(value));
11099
- return next2;
11571
+ const next = this.clone();
11572
+ newItems.forEach((value) => next.add(value));
11573
+ removeItems.forEach((value) => next.delete(value));
11574
+ return next;
11100
11575
  }
11101
11576
  }
11102
11577
  function clone(src, seen = /* @__PURE__ */ new Map()) {
11103
11578
  if (isSchema(src) || !src || typeof src !== "object") return src;
11104
11579
  if (seen.has(src)) return seen.get(src);
11105
- let copy2;
11580
+ let copy;
11106
11581
  if (src instanceof Date) {
11107
- copy2 = new Date(src.getTime());
11108
- seen.set(src, copy2);
11582
+ copy = new Date(src.getTime());
11583
+ seen.set(src, copy);
11109
11584
  } else if (src instanceof RegExp) {
11110
- copy2 = new RegExp(src);
11111
- seen.set(src, copy2);
11585
+ copy = new RegExp(src);
11586
+ seen.set(src, copy);
11112
11587
  } else if (Array.isArray(src)) {
11113
- copy2 = new Array(src.length);
11114
- seen.set(src, copy2);
11115
- for (let i = 0; i < src.length; i++) copy2[i] = clone(src[i], seen);
11588
+ copy = new Array(src.length);
11589
+ seen.set(src, copy);
11590
+ for (let i = 0; i < src.length; i++) copy[i] = clone(src[i], seen);
11116
11591
  } else if (src instanceof Map) {
11117
- copy2 = /* @__PURE__ */ new Map();
11118
- seen.set(src, copy2);
11119
- for (const [k, v] of src.entries()) copy2.set(k, clone(v, seen));
11592
+ copy = /* @__PURE__ */ new Map();
11593
+ seen.set(src, copy);
11594
+ for (const [k, v] of src.entries()) copy.set(k, clone(v, seen));
11120
11595
  } else if (src instanceof Set) {
11121
- copy2 = /* @__PURE__ */ new Set();
11122
- seen.set(src, copy2);
11123
- for (const v of src) copy2.add(clone(v, seen));
11596
+ copy = /* @__PURE__ */ new Set();
11597
+ seen.set(src, copy);
11598
+ for (const v of src) copy.add(clone(v, seen));
11124
11599
  } else if (src instanceof Object) {
11125
- copy2 = {};
11126
- seen.set(src, copy2);
11127
- for (const [k, v] of Object.entries(src)) copy2[k] = clone(v, seen);
11600
+ copy = {};
11601
+ seen.set(src, copy);
11602
+ for (const [k, v] of Object.entries(src)) copy[k] = clone(v, seen);
11128
11603
  } else {
11129
11604
  throw Error(`Unable to clone ${src}`);
11130
11605
  }
11131
- return copy2;
11132
- }
11133
- function createStandardPath(path) {
11134
- if (!(path != null && path.length)) {
11135
- return void 0;
11136
- }
11137
- const segments = [];
11138
- let currentSegment = "";
11139
- let inBrackets = false;
11140
- let inQuotes = false;
11141
- for (let i = 0; i < path.length; i++) {
11142
- const char2 = path[i];
11143
- if (char2 === "[" && !inQuotes) {
11144
- if (currentSegment) {
11145
- segments.push(...currentSegment.split(".").filter(Boolean));
11146
- currentSegment = "";
11147
- }
11148
- inBrackets = true;
11149
- continue;
11150
- }
11151
- if (char2 === "]" && !inQuotes) {
11152
- if (currentSegment) {
11153
- if (/^\d+$/.test(currentSegment)) {
11154
- segments.push(currentSegment);
11155
- } else {
11156
- segments.push(currentSegment.replace(/^"|"$/g, ""));
11157
- }
11158
- currentSegment = "";
11159
- }
11160
- inBrackets = false;
11161
- continue;
11162
- }
11163
- if (char2 === '"') {
11164
- inQuotes = !inQuotes;
11165
- continue;
11166
- }
11167
- if (char2 === "." && !inBrackets && !inQuotes) {
11168
- if (currentSegment) {
11169
- segments.push(currentSegment);
11170
- currentSegment = "";
11171
- }
11172
- continue;
11173
- }
11174
- currentSegment += char2;
11175
- }
11176
- if (currentSegment) {
11177
- segments.push(...currentSegment.split(".").filter(Boolean));
11178
- }
11179
- return segments;
11180
- }
11181
- function createStandardIssues(error, parentPath) {
11182
- const path = parentPath ? `${parentPath}.${error.path}` : error.path;
11183
- return error.errors.map((err) => ({
11184
- message: err,
11185
- path: createStandardPath(path)
11186
- }));
11187
- }
11188
- function issuesFromValidationError(error, parentPath) {
11189
- var _error$inner;
11190
- if (!((_error$inner = error.inner) != null && _error$inner.length) && error.errors.length) {
11191
- return createStandardIssues(error, parentPath);
11192
- }
11193
- const path = parentPath ? `${parentPath}.${error.path}` : error.path;
11194
- return error.inner.flatMap((err) => issuesFromValidationError(err, path));
11606
+ return copy;
11195
11607
  }
11196
11608
  class Schema {
11197
11609
  constructor(options) {
@@ -11237,30 +11649,30 @@ class Schema {
11237
11649
  if (spec) Object.assign(this.spec, spec);
11238
11650
  return this;
11239
11651
  }
11240
- const next2 = Object.create(Object.getPrototypeOf(this));
11241
- next2.type = this.type;
11242
- next2._typeCheck = this._typeCheck;
11243
- next2._whitelist = this._whitelist.clone();
11244
- next2._blacklist = this._blacklist.clone();
11245
- next2.internalTests = Object.assign({}, this.internalTests);
11246
- next2.exclusiveTests = Object.assign({}, this.exclusiveTests);
11247
- next2.deps = [...this.deps];
11248
- next2.conditions = [...this.conditions];
11249
- next2.tests = [...this.tests];
11250
- next2.transforms = [...this.transforms];
11251
- next2.spec = clone(Object.assign({}, this.spec, spec));
11252
- return next2;
11652
+ const next = Object.create(Object.getPrototypeOf(this));
11653
+ next.type = this.type;
11654
+ next._typeCheck = this._typeCheck;
11655
+ next._whitelist = this._whitelist.clone();
11656
+ next._blacklist = this._blacklist.clone();
11657
+ next.internalTests = Object.assign({}, this.internalTests);
11658
+ next.exclusiveTests = Object.assign({}, this.exclusiveTests);
11659
+ next.deps = [...this.deps];
11660
+ next.conditions = [...this.conditions];
11661
+ next.tests = [...this.tests];
11662
+ next.transforms = [...this.transforms];
11663
+ next.spec = clone(Object.assign({}, this.spec, spec));
11664
+ return next;
11253
11665
  }
11254
11666
  label(label) {
11255
- let next2 = this.clone();
11256
- next2.spec.label = label;
11257
- return next2;
11667
+ let next = this.clone();
11668
+ next.spec.label = label;
11669
+ return next;
11258
11670
  }
11259
11671
  meta(...args) {
11260
11672
  if (args.length === 0) return this.spec.meta;
11261
- let next2 = this.clone();
11262
- next2.spec.meta = Object.assign(next2.spec.meta || {}, args[0]);
11263
- return next2;
11673
+ let next = this.clone();
11674
+ next.spec.meta = Object.assign(next.spec.meta || {}, args[0]);
11675
+ return next;
11264
11676
  }
11265
11677
  withMutation(fn) {
11266
11678
  let before = this._mutate;
@@ -11281,9 +11693,9 @@ class Schema {
11281
11693
  combined._blacklist = base._blacklist.merge(schema._blacklist, schema._whitelist);
11282
11694
  combined.tests = base.tests;
11283
11695
  combined.exclusiveTests = base.exclusiveTests;
11284
- combined.withMutation((next2) => {
11696
+ combined.withMutation((next) => {
11285
11697
  schema.tests.forEach((fn) => {
11286
- next2.test(fn.OPTIONS);
11698
+ next.test(fn.OPTIONS);
11287
11699
  });
11288
11700
  });
11289
11701
  combined.transforms = [...base.transforms, ...combined.transforms];
@@ -11322,11 +11734,9 @@ class Schema {
11322
11734
  * Run the configured transform pipeline over an input value.
11323
11735
  */
11324
11736
  cast(value, options = {}) {
11325
- let resolvedSchema = this.resolve(Object.assign({}, options, {
11737
+ let resolvedSchema = this.resolve(Object.assign({
11326
11738
  value
11327
- // parent: options.parent,
11328
- // context: options.context,
11329
- }));
11739
+ }, options));
11330
11740
  let allowOptionality = options.assert === "ignore-optionality";
11331
11741
  let result = resolvedSchema._cast(value, options);
11332
11742
  if (options.assert !== false && !resolvedSchema.isType(result)) {
@@ -11343,13 +11753,13 @@ attempted value: ${formattedValue}
11343
11753
  return result;
11344
11754
  }
11345
11755
  _cast(rawValue, options) {
11346
- let value = rawValue === void 0 ? rawValue : this.transforms.reduce((prevValue, fn) => fn.call(this, prevValue, rawValue, this, options), rawValue);
11756
+ let value = rawValue === void 0 ? rawValue : this.transforms.reduce((prevValue, fn) => fn.call(this, prevValue, rawValue, this), rawValue);
11347
11757
  if (value === void 0) {
11348
11758
  value = this.getDefault(options);
11349
11759
  }
11350
11760
  return value;
11351
11761
  }
11352
- _validate(_value, options = {}, panic, next2) {
11762
+ _validate(_value, options = {}, panic, next) {
11353
11763
  let {
11354
11764
  path,
11355
11765
  originalValue = _value,
@@ -11373,7 +11783,7 @@ attempted value: ${formattedValue}
11373
11783
  tests: initialTests
11374
11784
  }, panic, (initialErrors) => {
11375
11785
  if (initialErrors.length) {
11376
- return next2(initialErrors, value);
11786
+ return next(initialErrors, value);
11377
11787
  }
11378
11788
  this.runTests({
11379
11789
  path,
@@ -11381,14 +11791,14 @@ attempted value: ${formattedValue}
11381
11791
  originalValue,
11382
11792
  options,
11383
11793
  tests: this.tests
11384
- }, panic, next2);
11794
+ }, panic, next);
11385
11795
  });
11386
11796
  }
11387
11797
  /**
11388
11798
  * Executes a set of validations, either schema, produced Tests or a nested
11389
11799
  * schema validate result.
11390
11800
  */
11391
- runTests(runOptions, panic, next2) {
11801
+ runTests(runOptions, panic, next) {
11392
11802
  let fired = false;
11393
11803
  let {
11394
11804
  tests,
@@ -11405,7 +11815,7 @@ attempted value: ${formattedValue}
11405
11815
  let nextOnce = (arg) => {
11406
11816
  if (fired) return;
11407
11817
  fired = true;
11408
- next2(arg, value);
11818
+ next(arg, value);
11409
11819
  };
11410
11820
  let count = tests.length;
11411
11821
  let nestedErrors = [];
@@ -11458,7 +11868,7 @@ attempted value: ${formattedValue}
11458
11868
  [isIndex2 ? "index" : "key"]: k,
11459
11869
  path: isIndex2 || k.includes(".") ? `${parentPath || ""}[${isIndex2 ? k : `"${k}"`}]` : (parentPath ? `${parentPath}.` : "") + key
11460
11870
  });
11461
- return (_, panic, next2) => this.resolve(testOptions)._validate(value, testOptions, panic, next2);
11871
+ return (_, panic, next) => this.resolve(testOptions)._validate(value, testOptions, panic, next);
11462
11872
  }
11463
11873
  validate(value, options) {
11464
11874
  var _options$disableStack2;
@@ -11522,10 +11932,10 @@ attempted value: ${formattedValue}
11522
11932
  if (arguments.length === 0) {
11523
11933
  return this._getDefault();
11524
11934
  }
11525
- let next2 = this.clone({
11935
+ let next = this.clone({
11526
11936
  default: def
11527
11937
  });
11528
- return next2;
11938
+ return next;
11529
11939
  }
11530
11940
  strict(isStrict = true) {
11531
11941
  return this.clone({
@@ -11533,30 +11943,30 @@ attempted value: ${formattedValue}
11533
11943
  });
11534
11944
  }
11535
11945
  nullability(nullable, message) {
11536
- const next2 = this.clone({
11946
+ const next = this.clone({
11537
11947
  nullable
11538
11948
  });
11539
- next2.internalTests.nullable = createValidation({
11949
+ next.internalTests.nullable = createValidation({
11540
11950
  message,
11541
11951
  name: "nullable",
11542
11952
  test(value) {
11543
11953
  return value === null ? this.schema.spec.nullable : true;
11544
11954
  }
11545
11955
  });
11546
- return next2;
11956
+ return next;
11547
11957
  }
11548
11958
  optionality(optional, message) {
11549
- const next2 = this.clone({
11959
+ const next = this.clone({
11550
11960
  optional
11551
11961
  });
11552
- next2.internalTests.optionality = createValidation({
11962
+ next.internalTests.optionality = createValidation({
11553
11963
  message,
11554
11964
  name: "optionality",
11555
11965
  test(value) {
11556
11966
  return value === void 0 ? this.schema.spec.optional : true;
11557
11967
  }
11558
11968
  });
11559
- return next2;
11969
+ return next;
11560
11970
  }
11561
11971
  optional() {
11562
11972
  return this.optionality(true);
@@ -11571,15 +11981,15 @@ attempted value: ${formattedValue}
11571
11981
  return this.nullability(false, message);
11572
11982
  }
11573
11983
  required(message = mixed.required) {
11574
- return this.clone().withMutation((next2) => next2.nonNullable(message).defined(message));
11984
+ return this.clone().withMutation((next) => next.nonNullable(message).defined(message));
11575
11985
  }
11576
11986
  notRequired() {
11577
- return this.clone().withMutation((next2) => next2.nullable().optional());
11987
+ return this.clone().withMutation((next) => next.nullable().optional());
11578
11988
  }
11579
11989
  transform(fn) {
11580
- let next2 = this.clone();
11581
- next2.transforms.push(fn);
11582
- return next2;
11990
+ let next = this.clone();
11991
+ next.transforms.push(fn);
11992
+ return next;
11583
11993
  }
11584
11994
  /**
11585
11995
  * Adds a test function to the schema's queue of tests.
@@ -11618,39 +12028,39 @@ attempted value: ${formattedValue}
11618
12028
  }
11619
12029
  if (opts.message === void 0) opts.message = mixed.default;
11620
12030
  if (typeof opts.test !== "function") throw new TypeError("`test` is a required parameters");
11621
- let next2 = this.clone();
12031
+ let next = this.clone();
11622
12032
  let validate = createValidation(opts);
11623
- let isExclusive = opts.exclusive || opts.name && next2.exclusiveTests[opts.name] === true;
12033
+ let isExclusive = opts.exclusive || opts.name && next.exclusiveTests[opts.name] === true;
11624
12034
  if (opts.exclusive) {
11625
12035
  if (!opts.name) throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");
11626
12036
  }
11627
- if (opts.name) next2.exclusiveTests[opts.name] = !!opts.exclusive;
11628
- next2.tests = next2.tests.filter((fn) => {
12037
+ if (opts.name) next.exclusiveTests[opts.name] = !!opts.exclusive;
12038
+ next.tests = next.tests.filter((fn) => {
11629
12039
  if (fn.OPTIONS.name === opts.name) {
11630
12040
  if (isExclusive) return false;
11631
12041
  if (fn.OPTIONS.test === validate.OPTIONS.test) return false;
11632
12042
  }
11633
12043
  return true;
11634
12044
  });
11635
- next2.tests.push(validate);
11636
- return next2;
12045
+ next.tests.push(validate);
12046
+ return next;
11637
12047
  }
11638
12048
  when(keys2, options) {
11639
12049
  if (!Array.isArray(keys2) && typeof keys2 !== "string") {
11640
12050
  options = keys2;
11641
12051
  keys2 = ".";
11642
12052
  }
11643
- let next2 = this.clone();
12053
+ let next = this.clone();
11644
12054
  let deps = toArray(keys2).map((key) => new Reference(key));
11645
12055
  deps.forEach((dep) => {
11646
- if (dep.isSibling) next2.deps.push(dep.key);
12056
+ if (dep.isSibling) next.deps.push(dep.key);
11647
12057
  });
11648
- next2.conditions.push(typeof options === "function" ? new Condition(deps, options) : Condition.fromOptions(deps, options));
11649
- return next2;
12058
+ next.conditions.push(typeof options === "function" ? new Condition(deps, options) : Condition.fromOptions(deps, options));
12059
+ return next;
11650
12060
  }
11651
12061
  typeError(message) {
11652
- let next2 = this.clone();
11653
- next2.internalTests.typeError = createValidation({
12062
+ let next = this.clone();
12063
+ next.internalTests.typeError = createValidation({
11654
12064
  message,
11655
12065
  name: "typeError",
11656
12066
  skipAbsent: true,
@@ -11663,15 +12073,15 @@ attempted value: ${formattedValue}
11663
12073
  return true;
11664
12074
  }
11665
12075
  });
11666
- return next2;
12076
+ return next;
11667
12077
  }
11668
12078
  oneOf(enums, message = mixed.oneOf) {
11669
- let next2 = this.clone();
12079
+ let next = this.clone();
11670
12080
  enums.forEach((val) => {
11671
- next2._whitelist.add(val);
11672
- next2._blacklist.delete(val);
12081
+ next._whitelist.add(val);
12082
+ next._blacklist.delete(val);
11673
12083
  });
11674
- next2.internalTests.whiteList = createValidation({
12084
+ next.internalTests.whiteList = createValidation({
11675
12085
  message,
11676
12086
  name: "oneOf",
11677
12087
  skipAbsent: true,
@@ -11686,15 +12096,15 @@ attempted value: ${formattedValue}
11686
12096
  });
11687
12097
  }
11688
12098
  });
11689
- return next2;
12099
+ return next;
11690
12100
  }
11691
12101
  notOneOf(enums, message = mixed.notOneOf) {
11692
- let next2 = this.clone();
12102
+ let next = this.clone();
11693
12103
  enums.forEach((val) => {
11694
- next2._blacklist.add(val);
11695
- next2._whitelist.delete(val);
12104
+ next._blacklist.add(val);
12105
+ next._whitelist.delete(val);
11696
12106
  });
11697
- next2.internalTests.blacklist = createValidation({
12107
+ next.internalTests.blacklist = createValidation({
11698
12108
  message,
11699
12109
  name: "notOneOf",
11700
12110
  test(value) {
@@ -11709,12 +12119,12 @@ attempted value: ${formattedValue}
11709
12119
  return true;
11710
12120
  }
11711
12121
  });
11712
- return next2;
12122
+ return next;
11713
12123
  }
11714
12124
  strip(strip = true) {
11715
- let next2 = this.clone();
11716
- next2.spec.strip = strip;
11717
- return next2;
12125
+ let next = this.clone();
12126
+ next.spec.strip = strip;
12127
+ return next;
11718
12128
  }
11719
12129
  /**
11720
12130
  * Return a serialized description of the schema including validations, flags, types etc.
@@ -11722,57 +12132,29 @@ attempted value: ${formattedValue}
11722
12132
  * @param options Provide any needed context for resolving runtime schema alterations (lazy, when conditions, etc).
11723
12133
  */
11724
12134
  describe(options) {
11725
- const next2 = (options ? this.resolve(options) : this).clone();
12135
+ const next = (options ? this.resolve(options) : this).clone();
11726
12136
  const {
11727
12137
  label,
11728
12138
  meta,
11729
12139
  optional,
11730
12140
  nullable
11731
- } = next2.spec;
12141
+ } = next.spec;
11732
12142
  const description = {
11733
12143
  meta,
11734
12144
  label,
11735
12145
  optional,
11736
12146
  nullable,
11737
- default: next2.getDefault(options),
11738
- type: next2.type,
11739
- oneOf: next2._whitelist.describe(),
11740
- notOneOf: next2._blacklist.describe(),
11741
- tests: next2.tests.filter((n, idx, list) => list.findIndex((c) => c.OPTIONS.name === n.OPTIONS.name) === idx).map((fn) => {
11742
- const params = fn.OPTIONS.params && options ? resolveParams(Object.assign({}, fn.OPTIONS.params), options) : fn.OPTIONS.params;
11743
- return {
11744
- name: fn.OPTIONS.name,
11745
- params
11746
- };
11747
- })
12147
+ default: next.getDefault(options),
12148
+ type: next.type,
12149
+ oneOf: next._whitelist.describe(),
12150
+ notOneOf: next._blacklist.describe(),
12151
+ tests: next.tests.map((fn) => ({
12152
+ name: fn.OPTIONS.name,
12153
+ params: fn.OPTIONS.params
12154
+ })).filter((n, idx, list) => list.findIndex((c) => c.name === n.name) === idx)
11748
12155
  };
11749
12156
  return description;
11750
12157
  }
11751
- get ["~standard"]() {
11752
- const schema = this;
11753
- const standard = {
11754
- version: 1,
11755
- vendor: "yup",
11756
- async validate(value) {
11757
- try {
11758
- const result = await schema.validate(value, {
11759
- abortEarly: false
11760
- });
11761
- return {
11762
- value: result
11763
- };
11764
- } catch (err) {
11765
- if (err instanceof ValidationError) {
11766
- return {
11767
- issues: issuesFromValidationError(err)
11768
- };
11769
- }
11770
- throw err;
11771
- }
11772
- }
11773
- };
11774
- return standard;
11775
- }
11776
12158
  }
11777
12159
  Schema.prototype.__isYupSchema__ = true;
11778
12160
  for (const method of ["validate", "validateSync"]) Schema.prototype[`${method}At`] = function(path, value, options = {}) {
@@ -11871,8 +12253,8 @@ class StringSchema extends Schema {
11871
12253
  }
11872
12254
  });
11873
12255
  this.withMutation(() => {
11874
- this.transform((value, _raw) => {
11875
- if (!this.spec.coerce || this.isType(value)) return value;
12256
+ this.transform((value, _raw, ctx) => {
12257
+ if (!ctx.spec.coerce || ctx.isType(value)) return value;
11876
12258
  if (Array.isArray(value)) return value;
11877
12259
  const strValue = value != null && value.toString ? value.toString() : value;
11878
12260
  if (strValue === objStringTag) return value;
@@ -11894,17 +12276,17 @@ class StringSchema extends Schema {
11894
12276
  return schema;
11895
12277
  });
11896
12278
  }
11897
- length(length2, message = string.length) {
12279
+ length(length, message = string.length) {
11898
12280
  return this.test({
11899
12281
  message,
11900
12282
  name: "length",
11901
12283
  exclusive: true,
11902
12284
  params: {
11903
- length: length2
12285
+ length
11904
12286
  },
11905
12287
  skipAbsent: true,
11906
12288
  test(value) {
11907
- return value.length === this.resolve(length2);
12289
+ return value.length === this.resolve(length);
11908
12290
  }
11909
12291
  });
11910
12292
  }
@@ -12074,15 +12456,15 @@ class NumberSchema extends Schema {
12074
12456
  }
12075
12457
  });
12076
12458
  this.withMutation(() => {
12077
- this.transform((value, _raw) => {
12078
- if (!this.spec.coerce) return value;
12459
+ this.transform((value, _raw, ctx) => {
12460
+ if (!ctx.spec.coerce) return value;
12079
12461
  let parsed = value;
12080
12462
  if (typeof parsed === "string") {
12081
12463
  parsed = parsed.replace(/\s/g, "");
12082
12464
  if (parsed === "") return NaN;
12083
12465
  parsed = +parsed;
12084
12466
  }
12085
- if (this.isType(parsed) || parsed === null) return parsed;
12467
+ if (ctx.isType(parsed) || parsed === null) return parsed;
12086
12468
  return parseFloat(parsed);
12087
12469
  });
12088
12470
  });
@@ -12181,8 +12563,8 @@ class DateSchema extends Schema {
12181
12563
  }
12182
12564
  });
12183
12565
  this.withMutation(() => {
12184
- this.transform((value, _raw) => {
12185
- if (!this.spec.coerce || this.isType(value) || value === null) return value;
12566
+ this.transform((value, _raw, ctx) => {
12567
+ if (!ctx.spec.coerce || ctx.isType(value) || value === null) return value;
12186
12568
  value = parseIsoDate(value);
12187
12569
  return !isNaN(value) ? new Date(value) : DateSchema.INVALID_DATE;
12188
12570
  });
@@ -12236,9 +12618,9 @@ function sortFields(fields, excludedEdges = []) {
12236
12618
  let nodes = /* @__PURE__ */ new Set();
12237
12619
  let excludes = new Set(excludedEdges.map(([a, b]) => `${a}-${b}`));
12238
12620
  function addNode(depPath, key) {
12239
- let node2 = propertyExprExports.split(depPath)[0];
12240
- nodes.add(node2);
12241
- if (!excludes.has(`${key}-${node2}`)) edges.push([key, node2]);
12621
+ let node = propertyExprExports.split(depPath)[0];
12622
+ nodes.add(node);
12623
+ if (!excludes.has(`${key}-${node}`)) edges.push([key, node]);
12242
12624
  }
12243
12625
  for (const key of Object.keys(fields)) {
12244
12626
  let value = fields[key];
@@ -12264,7 +12646,7 @@ function sortByKeyOrder(keys2) {
12264
12646
  return findIndex(keys2, a) - findIndex(keys2, b);
12265
12647
  };
12266
12648
  }
12267
- const parseJson = (value, _, schema) => {
12649
+ const parseJson = (value, _, ctx) => {
12268
12650
  if (typeof value !== "string") {
12269
12651
  return value;
12270
12652
  }
@@ -12273,7 +12655,7 @@ const parseJson = (value, _, schema) => {
12273
12655
  parsed = JSON.parse(value);
12274
12656
  } catch (err) {
12275
12657
  }
12276
- return schema.isType(parsed) ? parsed : value;
12658
+ return ctx.isType(parsed) ? parsed : value;
12277
12659
  };
12278
12660
  function deepPartial(schema) {
12279
12661
  if ("fields" in schema) {
@@ -12349,9 +12731,9 @@ class ObjectSchema extends Schema {
12349
12731
  for (const prop of props) {
12350
12732
  let field = fields[prop];
12351
12733
  let exists = prop in value;
12352
- let inputValue = value[prop];
12353
12734
  if (field) {
12354
12735
  let fieldValue;
12736
+ let inputValue = value[prop];
12355
12737
  innerOptions.path = (options.path ? `${options.path}.` : "") + prop;
12356
12738
  field = field.resolve({
12357
12739
  value: inputValue,
@@ -12364,20 +12746,23 @@ class ObjectSchema extends Schema {
12364
12746
  isChanged = isChanged || prop in value;
12365
12747
  continue;
12366
12748
  }
12367
- fieldValue = !options.__validating || !strict ? field.cast(inputValue, innerOptions) : inputValue;
12749
+ fieldValue = !options.__validating || !strict ? (
12750
+ // TODO: use _cast, this is double resolving
12751
+ field.cast(value[prop], innerOptions)
12752
+ ) : value[prop];
12368
12753
  if (fieldValue !== void 0) {
12369
12754
  intermediateValue[prop] = fieldValue;
12370
12755
  }
12371
12756
  } else if (exists && !strip) {
12372
- intermediateValue[prop] = inputValue;
12757
+ intermediateValue[prop] = value[prop];
12373
12758
  }
12374
- if (exists !== prop in intermediateValue || intermediateValue[prop] !== inputValue) {
12759
+ if (exists !== prop in intermediateValue || intermediateValue[prop] !== value[prop]) {
12375
12760
  isChanged = true;
12376
12761
  }
12377
12762
  }
12378
12763
  return isChanged ? intermediateValue : value;
12379
12764
  }
12380
- _validate(_value, options = {}, panic, next2) {
12765
+ _validate(_value, options = {}, panic, next) {
12381
12766
  let {
12382
12767
  from: from2 = [],
12383
12768
  originalValue = _value,
@@ -12391,7 +12776,7 @@ class ObjectSchema extends Schema {
12391
12776
  options.originalValue = originalValue;
12392
12777
  super._validate(_value, options, panic, (objectErrors, value) => {
12393
12778
  if (!recursive || !isObject2(value)) {
12394
- next2(objectErrors, value);
12779
+ next(objectErrors, value);
12395
12780
  return;
12396
12781
  }
12397
12782
  originalValue = originalValue || value;
@@ -12415,26 +12800,26 @@ class ObjectSchema extends Schema {
12415
12800
  originalValue,
12416
12801
  options
12417
12802
  }, panic, (fieldErrors) => {
12418
- next2(fieldErrors.sort(this._sortErrors).concat(objectErrors), value);
12803
+ next(fieldErrors.sort(this._sortErrors).concat(objectErrors), value);
12419
12804
  });
12420
12805
  });
12421
12806
  }
12422
12807
  clone(spec) {
12423
- const next2 = super.clone(spec);
12424
- next2.fields = Object.assign({}, this.fields);
12425
- next2._nodes = this._nodes;
12426
- next2._excludedEdges = this._excludedEdges;
12427
- next2._sortErrors = this._sortErrors;
12428
- return next2;
12808
+ const next = super.clone(spec);
12809
+ next.fields = Object.assign({}, this.fields);
12810
+ next._nodes = this._nodes;
12811
+ next._excludedEdges = this._excludedEdges;
12812
+ next._sortErrors = this._sortErrors;
12813
+ return next;
12429
12814
  }
12430
12815
  concat(schema) {
12431
- let next2 = super.concat(schema);
12432
- let nextFields = next2.fields;
12816
+ let next = super.concat(schema);
12817
+ let nextFields = next.fields;
12433
12818
  for (let [field, schemaOrRef] of Object.entries(this.fields)) {
12434
12819
  const target = nextFields[field];
12435
12820
  nextFields[field] = target === void 0 ? schemaOrRef : target;
12436
12821
  }
12437
- return next2.withMutation((s) => (
12822
+ return next.withMutation((s) => (
12438
12823
  // XXX: excludes here is wrong
12439
12824
  s.setFields(nextFields, [...this._excludedEdges, ...schema._excludedEdges])
12440
12825
  ));
@@ -12462,21 +12847,21 @@ class ObjectSchema extends Schema {
12462
12847
  return dft;
12463
12848
  }
12464
12849
  setFields(shape, excludedEdges) {
12465
- let next2 = this.clone();
12466
- next2.fields = shape;
12467
- next2._nodes = sortFields(shape, excludedEdges);
12468
- next2._sortErrors = sortByKeyOrder(Object.keys(shape));
12469
- if (excludedEdges) next2._excludedEdges = excludedEdges;
12470
- return next2;
12850
+ let next = this.clone();
12851
+ next.fields = shape;
12852
+ next._nodes = sortFields(shape, excludedEdges);
12853
+ next._sortErrors = sortByKeyOrder(Object.keys(shape));
12854
+ if (excludedEdges) next._excludedEdges = excludedEdges;
12855
+ return next;
12471
12856
  }
12472
12857
  shape(additions, excludes = []) {
12473
- return this.clone().withMutation((next2) => {
12474
- let edges = next2._excludedEdges;
12858
+ return this.clone().withMutation((next) => {
12859
+ let edges = next._excludedEdges;
12475
12860
  if (excludes.length) {
12476
12861
  if (!Array.isArray(excludes[0])) excludes = [excludes];
12477
- edges = [...next2._excludedEdges, ...excludes];
12862
+ edges = [...next._excludedEdges, ...excludes];
12478
12863
  }
12479
- return next2.setFields(Object.assign(next2.fields, additions), edges);
12864
+ return next.setFields(Object.assign(next.fields, additions), edges);
12480
12865
  });
12481
12866
  }
12482
12867
  partial() {
@@ -12487,8 +12872,8 @@ class ObjectSchema extends Schema {
12487
12872
  return this.setFields(partial);
12488
12873
  }
12489
12874
  deepPartial() {
12490
- const next2 = deepPartial(this);
12491
- return next2;
12875
+ const next = deepPartial(this);
12876
+ return next;
12492
12877
  }
12493
12878
  pick(keys2) {
12494
12879
  const picked = {};
@@ -12551,7 +12936,7 @@ class ObjectSchema extends Schema {
12551
12936
  message = noAllow;
12552
12937
  noAllow = true;
12553
12938
  }
12554
- let next2 = this.test({
12939
+ let next = this.test({
12555
12940
  name: "noUnknown",
12556
12941
  exclusive: true,
12557
12942
  message,
@@ -12565,8 +12950,8 @@ class ObjectSchema extends Schema {
12565
12950
  });
12566
12951
  }
12567
12952
  });
12568
- next2.spec.noUnknown = noAllow;
12569
- return next2;
12953
+ next.spec.noUnknown = noAllow;
12954
+ return next;
12570
12955
  }
12571
12956
  unknown(allow = true, message = object.noUnknown) {
12572
12957
  return this.noUnknown(!allow, message);
@@ -12589,10 +12974,10 @@ class ObjectSchema extends Schema {
12589
12974
  return this.transformKeys((key) => tinyCaseExports.snakeCase(key).toUpperCase());
12590
12975
  }
12591
12976
  describe(options) {
12592
- const next2 = (options ? this.resolve(options) : this).clone();
12977
+ const next = (options ? this.resolve(options) : this).clone();
12593
12978
  const base = super.describe(options);
12594
12979
  base.fields = {};
12595
- for (const [key, value] of Object.entries(next2.fields)) {
12980
+ for (const [key, value] of Object.entries(next.fields)) {
12596
12981
  var _innerOptions2;
12597
12982
  let innerOptions = options;
12598
12983
  if ((_innerOptions2 = innerOptions) != null && _innerOptions2.value) {
@@ -12705,8 +13090,8 @@ function requireDist() {
12705
13090
  dist.default = urlcat2;
12706
13091
  function urlcatImpl(pathTemplate, params, baseUrl) {
12707
13092
  var _a = path(pathTemplate, params), renderedPath = _a.renderedPath, remainingParams = _a.remainingParams;
12708
- var cleanParams = removeNullOrUndef(remainingParams);
12709
- var renderedQuery = query(cleanParams);
13093
+ var cleanParams2 = removeNullOrUndef(remainingParams);
13094
+ var renderedQuery = query(cleanParams2);
12710
13095
  var pathAndQuery = join(renderedPath, "?", renderedQuery);
12711
13096
  return baseUrl ? join(baseUrl, "/", pathAndQuery) : pathAndQuery;
12712
13097
  }
@@ -13345,13 +13730,13 @@ function ViewProfileDialog({ userData, setInitialState, isOpen }) {
13345
13730
  material.Dialog,
13346
13731
  {
13347
13732
  fullWidth: false,
13348
- sx: { "& .MuiPaper-root": { maxWidth: "800px", borderRadius: "12px", p: 2 } },
13733
+ sx: { "& .MuiPaper-root": { maxWidth: "800px", borderRadius: "12px" } },
13349
13734
  onClose: () => handleCloseUtil(setInitialState),
13350
13735
  open: isOpen,
13351
13736
  "aria-labelledby": "draggable-dialog-title",
13352
13737
  children: [
13353
13738
  /* @__PURE__ */ jsxRuntime.jsxs(ProfileStyled, { children: [
13354
- /* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { textAlign: "right", padding: "10px 10px" }, children: /* @__PURE__ */ jsxRuntime.jsx(
13739
+ /* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { textAlign: "right", padding: "10px 10px 0px 0px" }, children: /* @__PURE__ */ jsxRuntime.jsx(
13355
13740
  material.IconButton,
13356
13741
  {
13357
13742
  onClick: () => setInitialState((p) => ({ ...p, toggles: { ...p.toggles, viewProfile: false } })),
@@ -13360,7 +13745,7 @@ function ViewProfileDialog({ userData, setInitialState, isOpen }) {
13360
13745
  children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, {})
13361
13746
  }
13362
13747
  ) }),
13363
- /* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { p: 2, paddingLeft: "35px" }, children: /* @__PURE__ */ jsxRuntime.jsxs(material.Grid, { container: true, spacing: 2, children: [
13748
+ /* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { p: 2 }, children: /* @__PURE__ */ jsxRuntime.jsxs(material.Grid, { container: true, spacing: 2, children: [
13364
13749
  /* @__PURE__ */ jsxRuntime.jsxs(material.Grid, { item: true, xs: 12, lg: 5, children: [
13365
13750
  /* @__PURE__ */ jsxRuntime.jsx(material.Box, { children: /* @__PURE__ */ jsxRuntime.jsx(
13366
13751
  material.Avatar,
@@ -13531,7 +13916,7 @@ function ChangePasswordDialog({ isOpen, email, t: t2, setInitialState }) {
13531
13916
  onClose: () => handleCloseUtil(setInitialState),
13532
13917
  open: isOpen,
13533
13918
  "aria-labelledby": "draggable-dialog-title",
13534
- children: /* @__PURE__ */ jsxRuntime.jsx("form", { onSubmit: formik.handleSubmit, children: /* @__PURE__ */ jsxRuntime.jsx(ChangePasswordStyled, { children: /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx: { p: { xs: 2, lg: 4 } }, children: [
13919
+ children: /* @__PURE__ */ jsxRuntime.jsx("form", { onSubmit: formik.handleSubmit, children: /* @__PURE__ */ jsxRuntime.jsx(ChangePasswordStyled, { children: /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx: { pr: { xs: 0, lg: 8 }, p: 2 }, children: [
13535
13920
  /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "h6", sx: { display: "flex", alignItems: "center" }, className: "Heading", children: "Change Password" }),
13536
13921
  /* @__PURE__ */ jsxRuntime.jsx(
13537
13922
  material.Box,
@@ -13543,7 +13928,7 @@ function ChangePasswordDialog({ isOpen, email, t: t2, setInitialState }) {
13543
13928
  mt: 2
13544
13929
  },
13545
13930
  children: /* @__PURE__ */ jsxRuntime.jsxs(material.Grid, { container: true, spacing: 2, children: [
13546
- /* @__PURE__ */ jsxRuntime.jsxs(material.Grid, { item: true, xs: 12, md: 6, sx: { paddingLeft: "16px" }, children: [
13931
+ /* @__PURE__ */ jsxRuntime.jsxs(material.Grid, { item: true, xs: 12, lg: 6, children: [
13547
13932
  /* @__PURE__ */ jsxRuntime.jsx(
13548
13933
  LabeledInput,
13549
13934
  {
@@ -13551,13 +13936,12 @@ function ChangePasswordDialog({ isOpen, email, t: t2, setInitialState }) {
13551
13936
  label: t2("New password"),
13552
13937
  fullWidth: true,
13553
13938
  size: "small",
13554
- ...formik.getFieldProps("newPassword"),
13555
- sx: { width: { md: "93%", lg: "93%", xs: "99%" } }
13939
+ ...formik.getFieldProps("newPassword")
13556
13940
  }
13557
13941
  ),
13558
13942
  /* @__PURE__ */ jsxRuntime.jsx(ErrorMessage, { formik, fieldName: "newPassword" })
13559
13943
  ] }),
13560
- /* @__PURE__ */ jsxRuntime.jsxs(material.Grid, { item: true, xs: 12, md: 6, sx: { paddingLeft: { md: "0", lg: "0", xs: "16px" } }, children: [
13944
+ /* @__PURE__ */ jsxRuntime.jsxs(material.Grid, { item: true, xs: 12, lg: 6, children: [
13561
13945
  /* @__PURE__ */ jsxRuntime.jsx(
13562
13946
  LabeledInput,
13563
13947
  {
@@ -13565,8 +13949,7 @@ function ChangePasswordDialog({ isOpen, email, t: t2, setInitialState }) {
13565
13949
  label: t2("Confirm new password"),
13566
13950
  fullWidth: true,
13567
13951
  size: "small",
13568
- ...formik.getFieldProps("passwordConfirmation"),
13569
- sx: { width: { md: "99%", lg: "99%", xs: "99%" } }
13952
+ ...formik.getFieldProps("passwordConfirmation")
13570
13953
  }
13571
13954
  ),
13572
13955
  /* @__PURE__ */ jsxRuntime.jsx(ErrorMessage, { formik, fieldName: "passwordConfirmation" })
@@ -13576,7 +13959,7 @@ function ChangePasswordDialog({ isOpen, email, t: t2, setInitialState }) {
13576
13959
  {
13577
13960
  isLoading: formik.isSubmitting,
13578
13961
  className: "invite",
13579
- sx: { width: "auto !important", marginTop: "20px", marginLeft: "16px" },
13962
+ sx: { width: "auto !important" },
13580
13963
  type: "submit",
13581
13964
  disabled: formik.isSubmitting,
13582
13965
  btnTitle: t2("Change Password")
@@ -13888,7 +14271,7 @@ function parseThreshold(scrollThreshold) {
13888
14271
  }
13889
14272
  var InfiniteScroll = (
13890
14273
  /** @class */
13891
- (function(_super) {
14274
+ function(_super) {
13892
14275
  __extends(InfiniteScroll2, _super);
13893
14276
  function InfiniteScroll2(props) {
13894
14277
  var _this = _super.call(this, props) || this;
@@ -14103,7 +14486,7 @@ var InfiniteScroll = (
14103
14486
  );
14104
14487
  };
14105
14488
  return InfiniteScroll2;
14106
- })(React.Component)
14489
+ }(React.Component)
14107
14490
  );
14108
14491
  const Notification = ({ setInitialState, notificationAccessApps, initialState, t: t2 }) => {
14109
14492
  const [notifications, setNotifications] = React.useState([]);
@@ -14147,8 +14530,8 @@ const Notification = ({ setInitialState, notificationAccessApps, initialState, t
14147
14530
  return;
14148
14531
  }
14149
14532
  const newNotifications = pager?.data?.map((itm) => transformNotifications(itm));
14150
- setNotifications((prev2) => [...prev2, ...newNotifications]);
14151
- setPage((prev2) => prev2 + 1);
14533
+ setNotifications((prev) => [...prev, ...newNotifications]);
14534
+ setPage((prev) => prev + 1);
14152
14535
  }
14153
14536
  };
14154
14537
  return /* @__PURE__ */ jsxRuntime.jsx(material.ClickAwayListener, { onClickAway: () => handleCloseUtil(setInitialState), children: /* @__PURE__ */ jsxRuntime.jsxs(
@@ -14515,7 +14898,7 @@ const UserProfile = ({ t: t2, userData, setInitialState, extraMenuOptions, route
14515
14898
  ] }) })
14516
14899
  ] });
14517
14900
  };
14518
- const Header$1 = ({
14901
+ const Header = ({
14519
14902
  router,
14520
14903
  frontCustomComponent,
14521
14904
  endCustomComponents,
@@ -15121,804 +15504,6 @@ const PreviousLoginBanner = ({ t: t2, router, sx }) => {
15121
15504
  }
15122
15505
  );
15123
15506
  };
15124
- function sheetForTag(tag) {
15125
- if (tag.sheet) {
15126
- return tag.sheet;
15127
- }
15128
- for (var i = 0; i < document.styleSheets.length; i++) {
15129
- if (document.styleSheets[i].ownerNode === tag) {
15130
- return document.styleSheets[i];
15131
- }
15132
- }
15133
- return void 0;
15134
- }
15135
- function createStyleElement(options) {
15136
- var tag = document.createElement("style");
15137
- tag.setAttribute("data-emotion", options.key);
15138
- if (options.nonce !== void 0) {
15139
- tag.setAttribute("nonce", options.nonce);
15140
- }
15141
- tag.appendChild(document.createTextNode(""));
15142
- tag.setAttribute("data-s", "");
15143
- return tag;
15144
- }
15145
- var StyleSheet = /* @__PURE__ */ (function() {
15146
- function StyleSheet2(options) {
15147
- var _this = this;
15148
- this._insertTag = function(tag) {
15149
- var before;
15150
- if (_this.tags.length === 0) {
15151
- if (_this.insertionPoint) {
15152
- before = _this.insertionPoint.nextSibling;
15153
- } else if (_this.prepend) {
15154
- before = _this.container.firstChild;
15155
- } else {
15156
- before = _this.before;
15157
- }
15158
- } else {
15159
- before = _this.tags[_this.tags.length - 1].nextSibling;
15160
- }
15161
- _this.container.insertBefore(tag, before);
15162
- _this.tags.push(tag);
15163
- };
15164
- this.isSpeedy = options.speedy === void 0 ? true : options.speedy;
15165
- this.tags = [];
15166
- this.ctr = 0;
15167
- this.nonce = options.nonce;
15168
- this.key = options.key;
15169
- this.container = options.container;
15170
- this.prepend = options.prepend;
15171
- this.insertionPoint = options.insertionPoint;
15172
- this.before = null;
15173
- }
15174
- var _proto = StyleSheet2.prototype;
15175
- _proto.hydrate = function hydrate(nodes) {
15176
- nodes.forEach(this._insertTag);
15177
- };
15178
- _proto.insert = function insert(rule) {
15179
- if (this.ctr % (this.isSpeedy ? 65e3 : 1) === 0) {
15180
- this._insertTag(createStyleElement(this));
15181
- }
15182
- var tag = this.tags[this.tags.length - 1];
15183
- if (this.isSpeedy) {
15184
- var sheet = sheetForTag(tag);
15185
- try {
15186
- sheet.insertRule(rule, sheet.cssRules.length);
15187
- } catch (e) {
15188
- }
15189
- } else {
15190
- tag.appendChild(document.createTextNode(rule));
15191
- }
15192
- this.ctr++;
15193
- };
15194
- _proto.flush = function flush() {
15195
- this.tags.forEach(function(tag) {
15196
- var _tag$parentNode;
15197
- return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);
15198
- });
15199
- this.tags = [];
15200
- this.ctr = 0;
15201
- };
15202
- return StyleSheet2;
15203
- })();
15204
- var MS = "-ms-";
15205
- var MOZ = "-moz-";
15206
- var WEBKIT = "-webkit-";
15207
- var COMMENT = "comm";
15208
- var RULESET = "rule";
15209
- var DECLARATION = "decl";
15210
- var IMPORT = "@import";
15211
- var KEYFRAMES = "@keyframes";
15212
- var LAYER = "@layer";
15213
- var abs = Math.abs;
15214
- var from = String.fromCharCode;
15215
- var assign = Object.assign;
15216
- function hash(value, length2) {
15217
- return charat(value, 0) ^ 45 ? (((length2 << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
15218
- }
15219
- function trim(value) {
15220
- return value.trim();
15221
- }
15222
- function match(value, pattern) {
15223
- return (value = pattern.exec(value)) ? value[0] : value;
15224
- }
15225
- function replace(value, pattern, replacement) {
15226
- return value.replace(pattern, replacement);
15227
- }
15228
- function indexof(value, search) {
15229
- return value.indexOf(search);
15230
- }
15231
- function charat(value, index) {
15232
- return value.charCodeAt(index) | 0;
15233
- }
15234
- function substr(value, begin, end) {
15235
- return value.slice(begin, end);
15236
- }
15237
- function strlen(value) {
15238
- return value.length;
15239
- }
15240
- function sizeof(value) {
15241
- return value.length;
15242
- }
15243
- function append(value, array2) {
15244
- return array2.push(value), value;
15245
- }
15246
- function combine(array2, callback) {
15247
- return array2.map(callback).join("");
15248
- }
15249
- var line = 1;
15250
- var column = 1;
15251
- var length = 0;
15252
- var position = 0;
15253
- var character = 0;
15254
- var characters = "";
15255
- function node(value, root2, parent, type, props, children, length2) {
15256
- return { value, root: root2, parent, type, props, children, line, column, length: length2, return: "" };
15257
- }
15258
- function copy(root2, props) {
15259
- return assign(node("", null, null, "", null, null, 0), root2, { length: -root2.length }, props);
15260
- }
15261
- function char() {
15262
- return character;
15263
- }
15264
- function prev() {
15265
- character = position > 0 ? charat(characters, --position) : 0;
15266
- if (column--, character === 10)
15267
- column = 1, line--;
15268
- return character;
15269
- }
15270
- function next() {
15271
- character = position < length ? charat(characters, position++) : 0;
15272
- if (column++, character === 10)
15273
- column = 1, line++;
15274
- return character;
15275
- }
15276
- function peek() {
15277
- return charat(characters, position);
15278
- }
15279
- function caret() {
15280
- return position;
15281
- }
15282
- function slice(begin, end) {
15283
- return substr(characters, begin, end);
15284
- }
15285
- function token(type) {
15286
- switch (type) {
15287
- // \0 \t \n \r \s whitespace token
15288
- case 0:
15289
- case 9:
15290
- case 10:
15291
- case 13:
15292
- case 32:
15293
- return 5;
15294
- // ! + , / > @ ~ isolate token
15295
- case 33:
15296
- case 43:
15297
- case 44:
15298
- case 47:
15299
- case 62:
15300
- case 64:
15301
- case 126:
15302
- // ; { } breakpoint token
15303
- case 59:
15304
- case 123:
15305
- case 125:
15306
- return 4;
15307
- // : accompanied token
15308
- case 58:
15309
- return 3;
15310
- // " ' ( [ opening delimit token
15311
- case 34:
15312
- case 39:
15313
- case 40:
15314
- case 91:
15315
- return 2;
15316
- // ) ] closing delimit token
15317
- case 41:
15318
- case 93:
15319
- return 1;
15320
- }
15321
- return 0;
15322
- }
15323
- function alloc(value) {
15324
- return line = column = 1, length = strlen(characters = value), position = 0, [];
15325
- }
15326
- function dealloc(value) {
15327
- return characters = "", value;
15328
- }
15329
- function delimit(type) {
15330
- return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
15331
- }
15332
- function whitespace(type) {
15333
- while (character = peek())
15334
- if (character < 33)
15335
- next();
15336
- else
15337
- break;
15338
- return token(type) > 2 || token(character) > 3 ? "" : " ";
15339
- }
15340
- function escaping(index, count) {
15341
- while (--count && next())
15342
- if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97)
15343
- break;
15344
- return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));
15345
- }
15346
- function delimiter(type) {
15347
- while (next())
15348
- switch (character) {
15349
- // ] ) " '
15350
- case type:
15351
- return position;
15352
- // " '
15353
- case 34:
15354
- case 39:
15355
- if (type !== 34 && type !== 39)
15356
- delimiter(character);
15357
- break;
15358
- // (
15359
- case 40:
15360
- if (type === 41)
15361
- delimiter(type);
15362
- break;
15363
- // \
15364
- case 92:
15365
- next();
15366
- break;
15367
- }
15368
- return position;
15369
- }
15370
- function commenter(type, index) {
15371
- while (next())
15372
- if (type + character === 47 + 10)
15373
- break;
15374
- else if (type + character === 42 + 42 && peek() === 47)
15375
- break;
15376
- return "/*" + slice(index, position - 1) + "*" + from(type === 47 ? type : next());
15377
- }
15378
- function identifier(index) {
15379
- while (!token(peek()))
15380
- next();
15381
- return slice(index, position);
15382
- }
15383
- function compile(value) {
15384
- return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
15385
- }
15386
- function parse(value, root2, parent, rule, rules, rulesets, pseudo, points, declarations) {
15387
- var index = 0;
15388
- var offset2 = 0;
15389
- var length2 = pseudo;
15390
- var atrule = 0;
15391
- var property = 0;
15392
- var previous = 0;
15393
- var variable = 1;
15394
- var scanning = 1;
15395
- var ampersand = 1;
15396
- var character2 = 0;
15397
- var type = "";
15398
- var props = rules;
15399
- var children = rulesets;
15400
- var reference = rule;
15401
- var characters2 = type;
15402
- while (scanning)
15403
- switch (previous = character2, character2 = next()) {
15404
- // (
15405
- case 40:
15406
- if (previous != 108 && charat(characters2, length2 - 1) == 58) {
15407
- if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f") != -1)
15408
- ampersand = -1;
15409
- break;
15410
- }
15411
- // " ' [
15412
- case 34:
15413
- case 39:
15414
- case 91:
15415
- characters2 += delimit(character2);
15416
- break;
15417
- // \t \n \r \s
15418
- case 9:
15419
- case 10:
15420
- case 13:
15421
- case 32:
15422
- characters2 += whitespace(previous);
15423
- break;
15424
- // \
15425
- case 92:
15426
- characters2 += escaping(caret() - 1, 7);
15427
- continue;
15428
- // /
15429
- case 47:
15430
- switch (peek()) {
15431
- case 42:
15432
- case 47:
15433
- append(comment(commenter(next(), caret()), root2, parent), declarations);
15434
- break;
15435
- default:
15436
- characters2 += "/";
15437
- }
15438
- break;
15439
- // {
15440
- case 123 * variable:
15441
- points[index++] = strlen(characters2) * ampersand;
15442
- // } ; \0
15443
- case 125 * variable:
15444
- case 59:
15445
- case 0:
15446
- switch (character2) {
15447
- // \0 }
15448
- case 0:
15449
- case 125:
15450
- scanning = 0;
15451
- // ;
15452
- case 59 + offset2:
15453
- if (ampersand == -1) characters2 = replace(characters2, /\f/g, "");
15454
- if (property > 0 && strlen(characters2) - length2)
15455
- append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2), declarations);
15456
- break;
15457
- // @ ;
15458
- case 59:
15459
- characters2 += ";";
15460
- // { rule/at-rule
15461
- default:
15462
- append(reference = ruleset(characters2, root2, parent, index, offset2, rules, points, type, props = [], children = [], length2), rulesets);
15463
- if (character2 === 123)
15464
- if (offset2 === 0)
15465
- parse(characters2, root2, reference, reference, props, rulesets, length2, points, children);
15466
- else
15467
- switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
15468
- // d l m s
15469
- case 100:
15470
- case 108:
15471
- case 109:
15472
- case 115:
15473
- parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length2), children), rules, children, length2, points, rule ? props : children);
15474
- break;
15475
- default:
15476
- parse(characters2, reference, reference, reference, [""], children, 0, points, children);
15477
- }
15478
- }
15479
- index = offset2 = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
15480
- break;
15481
- // :
15482
- case 58:
15483
- length2 = 1 + strlen(characters2), property = previous;
15484
- default:
15485
- if (variable < 1) {
15486
- if (character2 == 123)
15487
- --variable;
15488
- else if (character2 == 125 && variable++ == 0 && prev() == 125)
15489
- continue;
15490
- }
15491
- switch (characters2 += from(character2), character2 * variable) {
15492
- // &
15493
- case 38:
15494
- ampersand = offset2 > 0 ? 1 : (characters2 += "\f", -1);
15495
- break;
15496
- // ,
15497
- case 44:
15498
- points[index++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
15499
- break;
15500
- // @
15501
- case 64:
15502
- if (peek() === 45)
15503
- characters2 += delimit(next());
15504
- atrule = peek(), offset2 = length2 = strlen(type = characters2 += identifier(caret())), character2++;
15505
- break;
15506
- // -
15507
- case 45:
15508
- if (previous === 45 && strlen(characters2) == 2)
15509
- variable = 0;
15510
- }
15511
- }
15512
- return rulesets;
15513
- }
15514
- function ruleset(value, root2, parent, index, offset2, rules, points, type, props, children, length2) {
15515
- var post = offset2 - 1;
15516
- var rule = offset2 === 0 ? rules : [""];
15517
- var size = sizeof(rule);
15518
- for (var i = 0, j = 0, k = 0; i < index; ++i)
15519
- for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)
15520
- if (z = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x])))
15521
- props[k++] = z;
15522
- return node(value, root2, parent, offset2 === 0 ? RULESET : type, props, children, length2);
15523
- }
15524
- function comment(value, root2, parent) {
15525
- return node(value, root2, parent, COMMENT, from(char()), substr(value, 2, -2), 0);
15526
- }
15527
- function declaration(value, root2, parent, length2) {
15528
- return node(value, root2, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2);
15529
- }
15530
- function serialize(children, callback) {
15531
- var output = "";
15532
- var length2 = sizeof(children);
15533
- for (var i = 0; i < length2; i++)
15534
- output += callback(children[i], i, children, callback) || "";
15535
- return output;
15536
- }
15537
- function stringify(element, index, children, callback) {
15538
- switch (element.type) {
15539
- case LAYER:
15540
- if (element.children.length) break;
15541
- case IMPORT:
15542
- case DECLARATION:
15543
- return element.return = element.return || element.value;
15544
- case COMMENT:
15545
- return "";
15546
- case KEYFRAMES:
15547
- return element.return = element.value + "{" + serialize(element.children, callback) + "}";
15548
- case RULESET:
15549
- element.value = element.props.join(",");
15550
- }
15551
- return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
15552
- }
15553
- function middleware(collection) {
15554
- var length2 = sizeof(collection);
15555
- return function(element, index, children, callback) {
15556
- var output = "";
15557
- for (var i = 0; i < length2; i++)
15558
- output += collection[i](element, index, children, callback) || "";
15559
- return output;
15560
- };
15561
- }
15562
- function rulesheet(callback) {
15563
- return function(element) {
15564
- if (!element.root) {
15565
- if (element = element.return)
15566
- callback(element);
15567
- }
15568
- };
15569
- }
15570
- var identifierWithPointTracking = function identifierWithPointTracking2(begin, points, index) {
15571
- var previous = 0;
15572
- var character2 = 0;
15573
- while (true) {
15574
- previous = character2;
15575
- character2 = peek();
15576
- if (previous === 38 && character2 === 12) {
15577
- points[index] = 1;
15578
- }
15579
- if (token(character2)) {
15580
- break;
15581
- }
15582
- next();
15583
- }
15584
- return slice(begin, position);
15585
- };
15586
- var toRules = function toRules2(parsed, points) {
15587
- var index = -1;
15588
- var character2 = 44;
15589
- do {
15590
- switch (token(character2)) {
15591
- case 0:
15592
- if (character2 === 38 && peek() === 12) {
15593
- points[index] = 1;
15594
- }
15595
- parsed[index] += identifierWithPointTracking(position - 1, points, index);
15596
- break;
15597
- case 2:
15598
- parsed[index] += delimit(character2);
15599
- break;
15600
- case 4:
15601
- if (character2 === 44) {
15602
- parsed[++index] = peek() === 58 ? "&\f" : "";
15603
- points[index] = parsed[index].length;
15604
- break;
15605
- }
15606
- // fallthrough
15607
- default:
15608
- parsed[index] += from(character2);
15609
- }
15610
- } while (character2 = next());
15611
- return parsed;
15612
- };
15613
- var getRules = function getRules2(value, points) {
15614
- return dealloc(toRules(alloc(value), points));
15615
- };
15616
- var fixedElements = /* @__PURE__ */ new WeakMap();
15617
- var compat = function compat2(element) {
15618
- if (element.type !== "rule" || !element.parent || // positive .length indicates that this rule contains pseudo
15619
- // negative .length indicates that this rule has been already prefixed
15620
- element.length < 1) {
15621
- return;
15622
- }
15623
- var value = element.value;
15624
- var parent = element.parent;
15625
- var isImplicitRule = element.column === parent.column && element.line === parent.line;
15626
- while (parent.type !== "rule") {
15627
- parent = parent.parent;
15628
- if (!parent) return;
15629
- }
15630
- if (element.props.length === 1 && value.charCodeAt(0) !== 58 && !fixedElements.get(parent)) {
15631
- return;
15632
- }
15633
- if (isImplicitRule) {
15634
- return;
15635
- }
15636
- fixedElements.set(element, true);
15637
- var points = [];
15638
- var rules = getRules(value, points);
15639
- var parentRules = parent.props;
15640
- for (var i = 0, k = 0; i < rules.length; i++) {
15641
- for (var j = 0; j < parentRules.length; j++, k++) {
15642
- element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
15643
- }
15644
- }
15645
- };
15646
- var removeLabel = function removeLabel2(element) {
15647
- if (element.type === "decl") {
15648
- var value = element.value;
15649
- if (
15650
- // charcode for l
15651
- value.charCodeAt(0) === 108 && // charcode for b
15652
- value.charCodeAt(2) === 98
15653
- ) {
15654
- element["return"] = "";
15655
- element.value = "";
15656
- }
15657
- }
15658
- };
15659
- function prefix(value, length2) {
15660
- switch (hash(value, length2)) {
15661
- // color-adjust
15662
- case 5103:
15663
- return WEBKIT + "print-" + value + value;
15664
- // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
15665
- case 5737:
15666
- case 4201:
15667
- case 3177:
15668
- case 3433:
15669
- case 1641:
15670
- case 4457:
15671
- case 2921:
15672
- // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
15673
- case 5572:
15674
- case 6356:
15675
- case 5844:
15676
- case 3191:
15677
- case 6645:
15678
- case 3005:
15679
- // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
15680
- case 6391:
15681
- case 5879:
15682
- case 5623:
15683
- case 6135:
15684
- case 4599:
15685
- case 4855:
15686
- // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
15687
- case 4215:
15688
- case 6389:
15689
- case 5109:
15690
- case 5365:
15691
- case 5621:
15692
- case 3829:
15693
- return WEBKIT + value + value;
15694
- // appearance, user-select, transform, hyphens, text-size-adjust
15695
- case 5349:
15696
- case 4246:
15697
- case 4810:
15698
- case 6968:
15699
- case 2756:
15700
- return WEBKIT + value + MOZ + value + MS + value + value;
15701
- // flex, flex-direction
15702
- case 6828:
15703
- case 4268:
15704
- return WEBKIT + value + MS + value + value;
15705
- // order
15706
- case 6165:
15707
- return WEBKIT + value + MS + "flex-" + value + value;
15708
- // align-items
15709
- case 5187:
15710
- return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + "box-$1$2" + MS + "flex-$1$2") + value;
15711
- // align-self
15712
- case 5443:
15713
- return WEBKIT + value + MS + "flex-item-" + replace(value, /flex-|-self/, "") + value;
15714
- // align-content
15715
- case 4675:
15716
- return WEBKIT + value + MS + "flex-line-pack" + replace(value, /align-content|flex-|-self/, "") + value;
15717
- // flex-shrink
15718
- case 5548:
15719
- return WEBKIT + value + MS + replace(value, "shrink", "negative") + value;
15720
- // flex-basis
15721
- case 5292:
15722
- return WEBKIT + value + MS + replace(value, "basis", "preferred-size") + value;
15723
- // flex-grow
15724
- case 6060:
15725
- return WEBKIT + "box-" + replace(value, "-grow", "") + WEBKIT + value + MS + replace(value, "grow", "positive") + value;
15726
- // transition
15727
- case 4554:
15728
- return WEBKIT + replace(value, /([^-])(transform)/g, "$1" + WEBKIT + "$2") + value;
15729
- // cursor
15730
- case 6187:
15731
- return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + "$1"), /(image-set)/, WEBKIT + "$1"), value, "") + value;
15732
- // background, background-image
15733
- case 5495:
15734
- case 3959:
15735
- return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1");
15736
- // justify-content
15737
- case 4968:
15738
- return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + WEBKIT + value + value;
15739
- // (margin|padding)-inline-(start|end)
15740
- case 4095:
15741
- case 3583:
15742
- case 4068:
15743
- case 2532:
15744
- return replace(value, /(.+)-inline(.+)/, WEBKIT + "$1$2") + value;
15745
- // (min|max)?(width|height|inline-size|block-size)
15746
- case 8116:
15747
- case 7059:
15748
- case 5753:
15749
- case 5535:
15750
- case 5445:
15751
- case 5701:
15752
- case 4933:
15753
- case 4677:
15754
- case 5533:
15755
- case 5789:
15756
- case 5021:
15757
- case 4765:
15758
- if (strlen(value) - 1 - length2 > 6) switch (charat(value, length2 + 1)) {
15759
- // (m)ax-content, (m)in-content
15760
- case 109:
15761
- if (charat(value, length2 + 4) !== 45) break;
15762
- // (f)ill-available, (f)it-content
15763
- case 102:
15764
- return replace(value, /(.+:)(.+)-([^]+)/, "$1" + WEBKIT + "$2-$3$1" + MOZ + (charat(value, length2 + 3) == 108 ? "$3" : "$2-$3")) + value;
15765
- // (s)tretch
15766
- case 115:
15767
- return ~indexof(value, "stretch") ? prefix(replace(value, "stretch", "fill-available"), length2) + value : value;
15768
- }
15769
- break;
15770
- // position: sticky
15771
- case 4949:
15772
- if (charat(value, length2 + 1) !== 115) break;
15773
- // display: (flex|inline-flex)
15774
- case 6444:
15775
- switch (charat(value, strlen(value) - 3 - (~indexof(value, "!important") && 10))) {
15776
- // stic(k)y
15777
- case 107:
15778
- return replace(value, ":", ":" + WEBKIT) + value;
15779
- // (inline-)?fl(e)x
15780
- case 101:
15781
- return replace(value, /(.+:)([^;!]+)(;|!.+)?/, "$1" + WEBKIT + (charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + WEBKIT + "$2$3$1" + MS + "$2box$3") + value;
15782
- }
15783
- break;
15784
- // writing-mode
15785
- case 5936:
15786
- switch (charat(value, length2 + 11)) {
15787
- // vertical-l(r)
15788
- case 114:
15789
- return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value;
15790
- // vertical-r(l)
15791
- case 108:
15792
- return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value;
15793
- // horizontal(-)tb
15794
- case 45:
15795
- return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value;
15796
- }
15797
- return WEBKIT + value + MS + value + value;
15798
- }
15799
- return value;
15800
- }
15801
- var prefixer = function prefixer2(element, index, children, callback) {
15802
- if (element.length > -1) {
15803
- if (!element["return"]) switch (element.type) {
15804
- case DECLARATION:
15805
- element["return"] = prefix(element.value, element.length);
15806
- break;
15807
- case KEYFRAMES:
15808
- return serialize([copy(element, {
15809
- value: replace(element.value, "@", "@" + WEBKIT)
15810
- })], callback);
15811
- case RULESET:
15812
- if (element.length) return combine(element.props, function(value) {
15813
- switch (match(value, /(::plac\w+|:read-\w+)/)) {
15814
- // :read-(only|write)
15815
- case ":read-only":
15816
- case ":read-write":
15817
- return serialize([copy(element, {
15818
- props: [replace(value, /:(read-\w+)/, ":" + MOZ + "$1")]
15819
- })], callback);
15820
- // :placeholder
15821
- case "::placeholder":
15822
- return serialize([copy(element, {
15823
- props: [replace(value, /:(plac\w+)/, ":" + WEBKIT + "input-$1")]
15824
- }), copy(element, {
15825
- props: [replace(value, /:(plac\w+)/, ":" + MOZ + "$1")]
15826
- }), copy(element, {
15827
- props: [replace(value, /:(plac\w+)/, MS + "input-$1")]
15828
- })], callback);
15829
- }
15830
- return "";
15831
- });
15832
- }
15833
- }
15834
- };
15835
- var defaultStylisPlugins = [prefixer];
15836
- var createCache = function createCache2(options) {
15837
- var key = options.key;
15838
- if (key === "css") {
15839
- var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])");
15840
- Array.prototype.forEach.call(ssrStyles, function(node2) {
15841
- var dataEmotionAttribute = node2.getAttribute("data-emotion");
15842
- if (dataEmotionAttribute.indexOf(" ") === -1) {
15843
- return;
15844
- }
15845
- document.head.appendChild(node2);
15846
- node2.setAttribute("data-s", "");
15847
- });
15848
- }
15849
- var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
15850
- var inserted = {};
15851
- var container;
15852
- var nodesToHydrate = [];
15853
- {
15854
- container = options.container || document.head;
15855
- Array.prototype.forEach.call(
15856
- // this means we will ignore elements which don't have a space in them which
15857
- // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
15858
- document.querySelectorAll('style[data-emotion^="' + key + ' "]'),
15859
- function(node2) {
15860
- var attrib = node2.getAttribute("data-emotion").split(" ");
15861
- for (var i = 1; i < attrib.length; i++) {
15862
- inserted[attrib[i]] = true;
15863
- }
15864
- nodesToHydrate.push(node2);
15865
- }
15866
- );
15867
- }
15868
- var _insert;
15869
- var omnipresentPlugins = [compat, removeLabel];
15870
- {
15871
- var currentSheet;
15872
- var finalizingPlugins = [stringify, rulesheet(function(rule) {
15873
- currentSheet.insert(rule);
15874
- })];
15875
- var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
15876
- var stylis = function stylis2(styles) {
15877
- return serialize(compile(styles), serializer);
15878
- };
15879
- _insert = function insert(selector, serialized, sheet, shouldCache) {
15880
- currentSheet = sheet;
15881
- stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
15882
- if (shouldCache) {
15883
- cache.inserted[serialized.name] = true;
15884
- }
15885
- };
15886
- }
15887
- var cache = {
15888
- key,
15889
- sheet: new StyleSheet({
15890
- key,
15891
- container,
15892
- nonce: options.nonce,
15893
- speedy: options.speedy,
15894
- prepend: options.prepend,
15895
- insertionPoint: options.insertionPoint
15896
- }),
15897
- nonce: options.nonce,
15898
- inserted,
15899
- registered: {},
15900
- insert: _insert
15901
- };
15902
- cache.sheet.hydrate(nodesToHydrate);
15903
- return cache;
15904
- };
15905
- material.unstable_ClassNameGenerator.configure((componentName) => `sixseconds-modules-${componentName}`);
15906
- function MuiProvider({ children }) {
15907
- const [cache, setCache] = React.useState(null);
15908
- React.useEffect(() => {
15909
- if (typeof window !== "undefined") {
15910
- const emotionCache = createCache({
15911
- key: "sixseconds",
15912
- prepend: false
15913
- });
15914
- setCache(emotionCache);
15915
- }
15916
- }, []);
15917
- if (!cache) {
15918
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
15919
- }
15920
- return /* @__PURE__ */ jsxRuntime.jsx(react.CacheProvider, { value: cache, children });
15921
- }
15922
15507
  const App = () => {
15923
15508
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
15924
15509
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -16074,9 +15659,6 @@ const App = () => {
16074
15659
  /* @__PURE__ */ jsxRuntime.jsx(PreviousLoginBanner, { t: (s) => s })
16075
15660
  ] });
16076
15661
  };
16077
- function Header(props) {
16078
- return /* @__PURE__ */ jsxRuntime.jsx(MuiProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(Header$1, { ...props }) });
16079
- }
16080
15662
  exports.CookiesUtil = CookiesUtil;
16081
15663
  exports.DangerDialog = DangerDialog;
16082
15664
  exports.FILTER_DATE_FORMAT = FILTER_DATE_FORMAT;