@orderingstack/front-components-product-configurator 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/MenuItemsDispatcher/MenuItemsDispatcher.d.ts +2 -7
- package/dist/components/MenuItemsDispatcher/MenuItemsDispatcher.d.ts.map +1 -1
- package/dist/components/MenuItemsDispatcher/useMenuItemsDispatcher.d.ts +1 -0
- package/dist/components/MenuItemsDispatcher/useMenuItemsDispatcher.d.ts.map +1 -1
- package/dist/components/MenuOptions/MenuOptions.d.ts.map +1 -1
- package/dist/components/MenuOptions/useMenuOptions.d.ts +1 -0
- package/dist/components/MenuOptions/useMenuOptions.d.ts.map +1 -1
- package/dist/components/MenuProduct/MenuProduct.d.ts.map +1 -1
- package/dist/components/MenuProduct/useMenuProduct.d.ts +2 -1
- package/dist/components/MenuProduct/useMenuProduct.d.ts.map +1 -1
- package/dist/components/ProductConfigurator/ProductConfiguratorNew.d.ts +1 -1
- package/dist/components/ProductConfigurator/ProductConfiguratorNew.d.ts.map +1 -1
- package/dist/components/ProductConfigurator/useProductConfigurator.d.ts +3 -1
- package/dist/components/ProductConfigurator/useProductConfigurator.d.ts.map +1 -1
- package/dist/index.cjs.js +6 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +692 -150
- package/dist/index.es.js.map +1 -1
- package/dist/state/validate.d.ts +1 -0
- package/dist/state/validate.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -11
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/countPrice.d.ts +2 -1
- package/dist/utils/countPrice.d.ts.map +1 -1
- package/dist/utils/filter.d.ts +1 -1
- package/dist/utils/filter.d.ts.map +1 -1
- package/dist/utils/getProduct.d.ts +2 -1
- package/dist/utils/getProduct.d.ts.map +1 -1
- package/dist/utils/getSelCtxCntFromSelectedState.d.ts +1 -1
- package/dist/utils/getSelCtxCntFromSelectedState.d.ts.map +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/validate.d.ts +1 -0
- package/dist/utils/validate.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -145,7 +145,7 @@ function _toArray$1(arr2) {
|
|
|
145
145
|
return _arrayWithHoles$1(arr2) || _iterableToArray$1(arr2) || _unsupportedIterableToArray$1(arr2) || _nonIterableRest$1();
|
|
146
146
|
}
|
|
147
147
|
function ownKeys$2(object, enumerableOnly) {
|
|
148
|
-
var
|
|
148
|
+
var keys2 = Object.keys(object);
|
|
149
149
|
if (Object.getOwnPropertySymbols) {
|
|
150
150
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
151
151
|
if (enumerableOnly) {
|
|
@@ -153,9 +153,9 @@ function ownKeys$2(object, enumerableOnly) {
|
|
|
153
153
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
keys2.push.apply(keys2, symbols);
|
|
157
157
|
}
|
|
158
|
-
return
|
|
158
|
+
return keys2;
|
|
159
159
|
}
|
|
160
160
|
function _objectSpread$2(target) {
|
|
161
161
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
@@ -452,7 +452,7 @@ function looksLikeObjectPath(key, nsSeparator, keySeparator) {
|
|
|
452
452
|
return matched;
|
|
453
453
|
}
|
|
454
454
|
function ownKeys$1$1(object, enumerableOnly) {
|
|
455
|
-
var
|
|
455
|
+
var keys2 = Object.keys(object);
|
|
456
456
|
if (Object.getOwnPropertySymbols) {
|
|
457
457
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
458
458
|
if (enumerableOnly) {
|
|
@@ -460,9 +460,9 @@ function ownKeys$1$1(object, enumerableOnly) {
|
|
|
460
460
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
461
461
|
});
|
|
462
462
|
}
|
|
463
|
-
|
|
463
|
+
keys2.push.apply(keys2, symbols);
|
|
464
464
|
}
|
|
465
|
-
return
|
|
465
|
+
return keys2;
|
|
466
466
|
}
|
|
467
467
|
function _objectSpread$1$1(target) {
|
|
468
468
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
@@ -730,7 +730,7 @@ var postProcessor = {
|
|
|
730
730
|
}
|
|
731
731
|
};
|
|
732
732
|
function ownKeys$2$1(object, enumerableOnly) {
|
|
733
|
-
var
|
|
733
|
+
var keys2 = Object.keys(object);
|
|
734
734
|
if (Object.getOwnPropertySymbols) {
|
|
735
735
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
736
736
|
if (enumerableOnly) {
|
|
@@ -738,9 +738,9 @@ function ownKeys$2$1(object, enumerableOnly) {
|
|
|
738
738
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
739
739
|
});
|
|
740
740
|
}
|
|
741
|
-
|
|
741
|
+
keys2.push.apply(keys2, symbols);
|
|
742
742
|
}
|
|
743
|
-
return
|
|
743
|
+
return keys2;
|
|
744
744
|
}
|
|
745
745
|
function _objectSpread$2$1(target) {
|
|
746
746
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
@@ -857,20 +857,20 @@ var Translator = function(_EventEmitter) {
|
|
|
857
857
|
}
|
|
858
858
|
}, {
|
|
859
859
|
key: "translate",
|
|
860
|
-
value: function translate(
|
|
860
|
+
value: function translate(keys2, options, lastKey) {
|
|
861
861
|
var _this2 = this;
|
|
862
862
|
if (_typeof$1(options) !== "object" && this.options.overloadTranslationOptionHandler) {
|
|
863
863
|
options = this.options.overloadTranslationOptionHandler(arguments);
|
|
864
864
|
}
|
|
865
865
|
if (!options)
|
|
866
866
|
options = {};
|
|
867
|
-
if (
|
|
867
|
+
if (keys2 === void 0 || keys2 === null)
|
|
868
868
|
return "";
|
|
869
|
-
if (!Array.isArray(
|
|
870
|
-
|
|
869
|
+
if (!Array.isArray(keys2))
|
|
870
|
+
keys2 = [String(keys2)];
|
|
871
871
|
var returnDetails = options.returnDetails !== void 0 ? options.returnDetails : this.options.returnDetails;
|
|
872
872
|
var keySeparator = options.keySeparator !== void 0 ? options.keySeparator : this.options.keySeparator;
|
|
873
|
-
var _this$extractFromKey = this.extractFromKey(
|
|
873
|
+
var _this$extractFromKey = this.extractFromKey(keys2[keys2.length - 1], options), key = _this$extractFromKey.key, namespaces = _this$extractFromKey.namespaces;
|
|
874
874
|
var namespace = namespaces[namespaces.length - 1];
|
|
875
875
|
var lng = options.lng || this.language;
|
|
876
876
|
var appendNamespaceToCIMode = options.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
@@ -889,7 +889,7 @@ var Translator = function(_EventEmitter) {
|
|
|
889
889
|
}
|
|
890
890
|
return key;
|
|
891
891
|
}
|
|
892
|
-
var resolved = this.resolve(
|
|
892
|
+
var resolved = this.resolve(keys2, options);
|
|
893
893
|
var res = resolved && resolved.res;
|
|
894
894
|
var resUsedKey = resolved && resolved.usedKey || key;
|
|
895
895
|
var resExactUsedKey = resolved && resolved.exactUsedKey || key;
|
|
@@ -932,7 +932,7 @@ var Translator = function(_EventEmitter) {
|
|
|
932
932
|
} else if (handleAsObjectInI18nFormat && typeof joinArrays === "string" && resType === "[object Array]") {
|
|
933
933
|
res = res.join(joinArrays);
|
|
934
934
|
if (res)
|
|
935
|
-
res = this.extendTranslation(res,
|
|
935
|
+
res = this.extendTranslation(res, keys2, options, lastKey);
|
|
936
936
|
} else {
|
|
937
937
|
var usedDefault = false;
|
|
938
938
|
var usedKey = false;
|
|
@@ -992,7 +992,7 @@ var Translator = function(_EventEmitter) {
|
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
994
|
}
|
|
995
|
-
res = this.extendTranslation(res,
|
|
995
|
+
res = this.extendTranslation(res, keys2, options, resolved, lastKey);
|
|
996
996
|
if (usedKey && res === key && this.options.appendNamespaceToMissingKey)
|
|
997
997
|
res = "".concat(namespace, ":").concat(key);
|
|
998
998
|
if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) {
|
|
@@ -1063,7 +1063,7 @@ var Translator = function(_EventEmitter) {
|
|
|
1063
1063
|
}
|
|
1064
1064
|
}, {
|
|
1065
1065
|
key: "resolve",
|
|
1066
|
-
value: function resolve(
|
|
1066
|
+
value: function resolve(keys2) {
|
|
1067
1067
|
var _this4 = this;
|
|
1068
1068
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1069
1069
|
var found;
|
|
@@ -1071,9 +1071,9 @@ var Translator = function(_EventEmitter) {
|
|
|
1071
1071
|
var exactUsedKey;
|
|
1072
1072
|
var usedLng;
|
|
1073
1073
|
var usedNS;
|
|
1074
|
-
if (typeof
|
|
1075
|
-
|
|
1076
|
-
|
|
1074
|
+
if (typeof keys2 === "string")
|
|
1075
|
+
keys2 = [keys2];
|
|
1076
|
+
keys2.forEach(function(k2) {
|
|
1077
1077
|
if (_this4.isValidLookup(found))
|
|
1078
1078
|
return;
|
|
1079
1079
|
var extracted = _this4.extractFromKey(k2, options);
|
|
@@ -1631,7 +1631,7 @@ var PluralResolver = function() {
|
|
|
1631
1631
|
return PluralResolver2;
|
|
1632
1632
|
}();
|
|
1633
1633
|
function ownKeys$3(object, enumerableOnly) {
|
|
1634
|
-
var
|
|
1634
|
+
var keys2 = Object.keys(object);
|
|
1635
1635
|
if (Object.getOwnPropertySymbols) {
|
|
1636
1636
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
1637
1637
|
if (enumerableOnly) {
|
|
@@ -1639,9 +1639,9 @@ function ownKeys$3(object, enumerableOnly) {
|
|
|
1639
1639
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
1640
1640
|
});
|
|
1641
1641
|
}
|
|
1642
|
-
|
|
1642
|
+
keys2.push.apply(keys2, symbols);
|
|
1643
1643
|
}
|
|
1644
|
-
return
|
|
1644
|
+
return keys2;
|
|
1645
1645
|
}
|
|
1646
1646
|
function _objectSpread$3(target) {
|
|
1647
1647
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
@@ -1857,7 +1857,7 @@ var Interpolator = function() {
|
|
|
1857
1857
|
return Interpolator2;
|
|
1858
1858
|
}();
|
|
1859
1859
|
function ownKeys$4(object, enumerableOnly) {
|
|
1860
|
-
var
|
|
1860
|
+
var keys2 = Object.keys(object);
|
|
1861
1861
|
if (Object.getOwnPropertySymbols) {
|
|
1862
1862
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
1863
1863
|
if (enumerableOnly) {
|
|
@@ -1865,9 +1865,9 @@ function ownKeys$4(object, enumerableOnly) {
|
|
|
1865
1865
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
1866
1866
|
});
|
|
1867
1867
|
}
|
|
1868
|
-
|
|
1868
|
+
keys2.push.apply(keys2, symbols);
|
|
1869
1869
|
}
|
|
1870
|
-
return
|
|
1870
|
+
return keys2;
|
|
1871
1871
|
}
|
|
1872
1872
|
function _objectSpread$4(target) {
|
|
1873
1873
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
@@ -2023,7 +2023,7 @@ var Formatter = function() {
|
|
|
2023
2023
|
return Formatter2;
|
|
2024
2024
|
}();
|
|
2025
2025
|
function ownKeys$5(object, enumerableOnly) {
|
|
2026
|
-
var
|
|
2026
|
+
var keys2 = Object.keys(object);
|
|
2027
2027
|
if (Object.getOwnPropertySymbols) {
|
|
2028
2028
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
2029
2029
|
if (enumerableOnly) {
|
|
@@ -2031,9 +2031,9 @@ function ownKeys$5(object, enumerableOnly) {
|
|
|
2031
2031
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
2032
2032
|
});
|
|
2033
2033
|
}
|
|
2034
|
-
|
|
2034
|
+
keys2.push.apply(keys2, symbols);
|
|
2035
2035
|
}
|
|
2036
|
-
return
|
|
2036
|
+
return keys2;
|
|
2037
2037
|
}
|
|
2038
2038
|
function _objectSpread$5(target) {
|
|
2039
2039
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
@@ -2397,7 +2397,7 @@ function transformOptions(options) {
|
|
|
2397
2397
|
return options;
|
|
2398
2398
|
}
|
|
2399
2399
|
function ownKeys$6(object, enumerableOnly) {
|
|
2400
|
-
var
|
|
2400
|
+
var keys2 = Object.keys(object);
|
|
2401
2401
|
if (Object.getOwnPropertySymbols) {
|
|
2402
2402
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
2403
2403
|
if (enumerableOnly) {
|
|
@@ -2405,9 +2405,9 @@ function ownKeys$6(object, enumerableOnly) {
|
|
|
2405
2405
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
2406
2406
|
});
|
|
2407
2407
|
}
|
|
2408
|
-
|
|
2408
|
+
keys2.push.apply(keys2, symbols);
|
|
2409
2409
|
}
|
|
2410
|
-
return
|
|
2410
|
+
return keys2;
|
|
2411
2411
|
}
|
|
2412
2412
|
function _objectSpread$6(target) {
|
|
2413
2413
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
@@ -4761,12 +4761,12 @@ var root = freeGlobal$1 || freeSelf || Function("return this")();
|
|
|
4761
4761
|
var root$1 = root;
|
|
4762
4762
|
var Symbol$1 = root$1.Symbol;
|
|
4763
4763
|
var Symbol$2 = Symbol$1;
|
|
4764
|
-
var objectProto$
|
|
4765
|
-
var hasOwnProperty$
|
|
4766
|
-
var nativeObjectToString$1 = objectProto$
|
|
4764
|
+
var objectProto$c = Object.prototype;
|
|
4765
|
+
var hasOwnProperty$a = objectProto$c.hasOwnProperty;
|
|
4766
|
+
var nativeObjectToString$1 = objectProto$c.toString;
|
|
4767
4767
|
var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
|
|
4768
4768
|
function getRawTag(value) {
|
|
4769
|
-
var isOwn = hasOwnProperty$
|
|
4769
|
+
var isOwn = hasOwnProperty$a.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
4770
4770
|
try {
|
|
4771
4771
|
value[symToStringTag$1] = void 0;
|
|
4772
4772
|
var unmasked = true;
|
|
@@ -4782,8 +4782,8 @@ function getRawTag(value) {
|
|
|
4782
4782
|
}
|
|
4783
4783
|
return result;
|
|
4784
4784
|
}
|
|
4785
|
-
var objectProto$
|
|
4786
|
-
var nativeObjectToString = objectProto$
|
|
4785
|
+
var objectProto$b = Object.prototype;
|
|
4786
|
+
var nativeObjectToString = objectProto$b.toString;
|
|
4787
4787
|
function objectToString(value) {
|
|
4788
4788
|
return nativeObjectToString.call(value);
|
|
4789
4789
|
}
|
|
@@ -4798,9 +4798,9 @@ function baseGetTag(value) {
|
|
|
4798
4798
|
function isObjectLike(value) {
|
|
4799
4799
|
return value != null && typeof value == "object";
|
|
4800
4800
|
}
|
|
4801
|
-
var symbolTag = "[object Symbol]";
|
|
4801
|
+
var symbolTag$1 = "[object Symbol]";
|
|
4802
4802
|
function isSymbol(value) {
|
|
4803
|
-
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
|
4803
|
+
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$1;
|
|
4804
4804
|
}
|
|
4805
4805
|
var isArray = Array.isArray;
|
|
4806
4806
|
var isArray$1 = isArray;
|
|
@@ -4888,11 +4888,11 @@ function toSource(func) {
|
|
|
4888
4888
|
}
|
|
4889
4889
|
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
4890
4890
|
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
4891
|
-
var funcProto = Function.prototype, objectProto$
|
|
4891
|
+
var funcProto = Function.prototype, objectProto$a = Object.prototype;
|
|
4892
4892
|
var funcToString = funcProto.toString;
|
|
4893
|
-
var hasOwnProperty$
|
|
4893
|
+
var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
|
|
4894
4894
|
var reIsNative = RegExp(
|
|
4895
|
-
"^" + funcToString.call(hasOwnProperty$
|
|
4895
|
+
"^" + funcToString.call(hasOwnProperty$9).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
4896
4896
|
);
|
|
4897
4897
|
function baseIsNative(value) {
|
|
4898
4898
|
if (!isObject(value) || isMasked(value)) {
|
|
@@ -4910,6 +4910,16 @@ function getNative(object, key) {
|
|
|
4910
4910
|
}
|
|
4911
4911
|
var WeakMap = getNative(root$1, "WeakMap");
|
|
4912
4912
|
var WeakMap$1 = WeakMap;
|
|
4913
|
+
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
4914
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
4915
|
+
function isIndex(value, length) {
|
|
4916
|
+
var type = typeof value;
|
|
4917
|
+
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
4918
|
+
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
4919
|
+
}
|
|
4920
|
+
function eq(value, other) {
|
|
4921
|
+
return value === other || value !== value && other !== other;
|
|
4922
|
+
}
|
|
4913
4923
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
4914
4924
|
function isLength(value) {
|
|
4915
4925
|
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
@@ -4917,22 +4927,29 @@ function isLength(value) {
|
|
|
4917
4927
|
function isArrayLike(value) {
|
|
4918
4928
|
return value != null && isLength(value.length) && !isFunction(value);
|
|
4919
4929
|
}
|
|
4920
|
-
var objectProto$
|
|
4930
|
+
var objectProto$9 = Object.prototype;
|
|
4921
4931
|
function isPrototype(value) {
|
|
4922
|
-
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$
|
|
4932
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$9;
|
|
4923
4933
|
return value === proto;
|
|
4924
4934
|
}
|
|
4925
|
-
|
|
4935
|
+
function baseTimes(n2, iteratee) {
|
|
4936
|
+
var index = -1, result = Array(n2);
|
|
4937
|
+
while (++index < n2) {
|
|
4938
|
+
result[index] = iteratee(index);
|
|
4939
|
+
}
|
|
4940
|
+
return result;
|
|
4941
|
+
}
|
|
4942
|
+
var argsTag$2 = "[object Arguments]";
|
|
4926
4943
|
function baseIsArguments(value) {
|
|
4927
|
-
return isObjectLike(value) && baseGetTag(value) == argsTag$
|
|
4944
|
+
return isObjectLike(value) && baseGetTag(value) == argsTag$2;
|
|
4928
4945
|
}
|
|
4929
|
-
var objectProto$
|
|
4930
|
-
var hasOwnProperty$
|
|
4931
|
-
var propertyIsEnumerable = objectProto$
|
|
4946
|
+
var objectProto$8 = Object.prototype;
|
|
4947
|
+
var hasOwnProperty$8 = objectProto$8.hasOwnProperty;
|
|
4948
|
+
var propertyIsEnumerable$1 = objectProto$8.propertyIsEnumerable;
|
|
4932
4949
|
var isArguments = baseIsArguments(function() {
|
|
4933
4950
|
return arguments;
|
|
4934
4951
|
}()) ? baseIsArguments : function(value) {
|
|
4935
|
-
return isObjectLike(value) && hasOwnProperty$
|
|
4952
|
+
return isObjectLike(value) && hasOwnProperty$8.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
4936
4953
|
};
|
|
4937
4954
|
var isArguments$1 = isArguments;
|
|
4938
4955
|
function stubFalse() {
|
|
@@ -4945,11 +4962,11 @@ var Buffer = moduleExports$1 ? root$1.Buffer : void 0;
|
|
|
4945
4962
|
var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0;
|
|
4946
4963
|
var isBuffer = nativeIsBuffer || stubFalse;
|
|
4947
4964
|
var isBuffer$1 = isBuffer;
|
|
4948
|
-
var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", mapTag$
|
|
4949
|
-
var arrayBufferTag = "[object ArrayBuffer]", dataViewTag$
|
|
4965
|
+
var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", mapTag$3 = "[object Map]", numberTag$1 = "[object Number]", objectTag$2 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$3 = "[object Set]", stringTag$1 = "[object String]", weakMapTag$1 = "[object WeakMap]";
|
|
4966
|
+
var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
|
|
4950
4967
|
var typedArrayTags = {};
|
|
4951
4968
|
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
|
4952
|
-
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag$
|
|
4969
|
+
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$1] = typedArrayTags[dataViewTag$2] = typedArrayTags[dateTag$1] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag] = typedArrayTags[mapTag$3] = typedArrayTags[numberTag$1] = typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$1] = typedArrayTags[setTag$3] = typedArrayTags[stringTag$1] = typedArrayTags[weakMapTag$1] = false;
|
|
4953
4970
|
function baseIsTypedArray(value) {
|
|
4954
4971
|
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
4955
4972
|
}
|
|
@@ -4976,6 +4993,17 @@ var nodeUtil$1 = nodeUtil;
|
|
|
4976
4993
|
var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
|
|
4977
4994
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
4978
4995
|
var isTypedArray$1 = isTypedArray;
|
|
4996
|
+
var objectProto$7 = Object.prototype;
|
|
4997
|
+
var hasOwnProperty$7 = objectProto$7.hasOwnProperty;
|
|
4998
|
+
function arrayLikeKeys(value, inherited) {
|
|
4999
|
+
var isArr = isArray$1(value), isArg = !isArr && isArguments$1(value), isBuff = !isArr && !isArg && isBuffer$1(value), isType = !isArr && !isArg && !isBuff && isTypedArray$1(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
|
|
5000
|
+
for (var key in value) {
|
|
5001
|
+
if ((inherited || hasOwnProperty$7.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
|
|
5002
|
+
result.push(key);
|
|
5003
|
+
}
|
|
5004
|
+
}
|
|
5005
|
+
return result;
|
|
5006
|
+
}
|
|
4979
5007
|
function overArg(func, transform) {
|
|
4980
5008
|
return function(arg) {
|
|
4981
5009
|
return func(transform(arg));
|
|
@@ -4983,45 +5011,281 @@ function overArg(func, transform) {
|
|
|
4983
5011
|
}
|
|
4984
5012
|
var nativeKeys = overArg(Object.keys, Object);
|
|
4985
5013
|
var nativeKeys$1 = nativeKeys;
|
|
4986
|
-
var objectProto$
|
|
4987
|
-
var hasOwnProperty$
|
|
5014
|
+
var objectProto$6 = Object.prototype;
|
|
5015
|
+
var hasOwnProperty$6 = objectProto$6.hasOwnProperty;
|
|
4988
5016
|
function baseKeys(object) {
|
|
4989
5017
|
if (!isPrototype(object)) {
|
|
4990
5018
|
return nativeKeys$1(object);
|
|
4991
5019
|
}
|
|
4992
5020
|
var result = [];
|
|
4993
5021
|
for (var key in Object(object)) {
|
|
4994
|
-
if (hasOwnProperty$
|
|
5022
|
+
if (hasOwnProperty$6.call(object, key) && key != "constructor") {
|
|
4995
5023
|
result.push(key);
|
|
4996
5024
|
}
|
|
4997
5025
|
}
|
|
4998
5026
|
return result;
|
|
4999
5027
|
}
|
|
5028
|
+
function keys(object) {
|
|
5029
|
+
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
5030
|
+
}
|
|
5031
|
+
var nativeCreate = getNative(Object, "create");
|
|
5032
|
+
var nativeCreate$1 = nativeCreate;
|
|
5033
|
+
function hashClear() {
|
|
5034
|
+
this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {};
|
|
5035
|
+
this.size = 0;
|
|
5036
|
+
}
|
|
5037
|
+
function hashDelete(key) {
|
|
5038
|
+
var result = this.has(key) && delete this.__data__[key];
|
|
5039
|
+
this.size -= result ? 1 : 0;
|
|
5040
|
+
return result;
|
|
5041
|
+
}
|
|
5042
|
+
var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
|
|
5043
|
+
var objectProto$5 = Object.prototype;
|
|
5044
|
+
var hasOwnProperty$5 = objectProto$5.hasOwnProperty;
|
|
5045
|
+
function hashGet(key) {
|
|
5046
|
+
var data = this.__data__;
|
|
5047
|
+
if (nativeCreate$1) {
|
|
5048
|
+
var result = data[key];
|
|
5049
|
+
return result === HASH_UNDEFINED$2 ? void 0 : result;
|
|
5050
|
+
}
|
|
5051
|
+
return hasOwnProperty$5.call(data, key) ? data[key] : void 0;
|
|
5052
|
+
}
|
|
5053
|
+
var objectProto$4 = Object.prototype;
|
|
5054
|
+
var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
|
|
5055
|
+
function hashHas(key) {
|
|
5056
|
+
var data = this.__data__;
|
|
5057
|
+
return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$4.call(data, key);
|
|
5058
|
+
}
|
|
5059
|
+
var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
|
|
5060
|
+
function hashSet(key, value) {
|
|
5061
|
+
var data = this.__data__;
|
|
5062
|
+
this.size += this.has(key) ? 0 : 1;
|
|
5063
|
+
data[key] = nativeCreate$1 && value === void 0 ? HASH_UNDEFINED$1 : value;
|
|
5064
|
+
return this;
|
|
5065
|
+
}
|
|
5066
|
+
function Hash(entries) {
|
|
5067
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
5068
|
+
this.clear();
|
|
5069
|
+
while (++index < length) {
|
|
5070
|
+
var entry = entries[index];
|
|
5071
|
+
this.set(entry[0], entry[1]);
|
|
5072
|
+
}
|
|
5073
|
+
}
|
|
5074
|
+
Hash.prototype.clear = hashClear;
|
|
5075
|
+
Hash.prototype["delete"] = hashDelete;
|
|
5076
|
+
Hash.prototype.get = hashGet;
|
|
5077
|
+
Hash.prototype.has = hashHas;
|
|
5078
|
+
Hash.prototype.set = hashSet;
|
|
5079
|
+
function listCacheClear() {
|
|
5080
|
+
this.__data__ = [];
|
|
5081
|
+
this.size = 0;
|
|
5082
|
+
}
|
|
5083
|
+
function assocIndexOf(array, key) {
|
|
5084
|
+
var length = array.length;
|
|
5085
|
+
while (length--) {
|
|
5086
|
+
if (eq(array[length][0], key)) {
|
|
5087
|
+
return length;
|
|
5088
|
+
}
|
|
5089
|
+
}
|
|
5090
|
+
return -1;
|
|
5091
|
+
}
|
|
5092
|
+
var arrayProto = Array.prototype;
|
|
5093
|
+
var splice = arrayProto.splice;
|
|
5094
|
+
function listCacheDelete(key) {
|
|
5095
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
5096
|
+
if (index < 0) {
|
|
5097
|
+
return false;
|
|
5098
|
+
}
|
|
5099
|
+
var lastIndex = data.length - 1;
|
|
5100
|
+
if (index == lastIndex) {
|
|
5101
|
+
data.pop();
|
|
5102
|
+
} else {
|
|
5103
|
+
splice.call(data, index, 1);
|
|
5104
|
+
}
|
|
5105
|
+
--this.size;
|
|
5106
|
+
return true;
|
|
5107
|
+
}
|
|
5108
|
+
function listCacheGet(key) {
|
|
5109
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
5110
|
+
return index < 0 ? void 0 : data[index][1];
|
|
5111
|
+
}
|
|
5112
|
+
function listCacheHas(key) {
|
|
5113
|
+
return assocIndexOf(this.__data__, key) > -1;
|
|
5114
|
+
}
|
|
5115
|
+
function listCacheSet(key, value) {
|
|
5116
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
5117
|
+
if (index < 0) {
|
|
5118
|
+
++this.size;
|
|
5119
|
+
data.push([key, value]);
|
|
5120
|
+
} else {
|
|
5121
|
+
data[index][1] = value;
|
|
5122
|
+
}
|
|
5123
|
+
return this;
|
|
5124
|
+
}
|
|
5125
|
+
function ListCache(entries) {
|
|
5126
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
5127
|
+
this.clear();
|
|
5128
|
+
while (++index < length) {
|
|
5129
|
+
var entry = entries[index];
|
|
5130
|
+
this.set(entry[0], entry[1]);
|
|
5131
|
+
}
|
|
5132
|
+
}
|
|
5133
|
+
ListCache.prototype.clear = listCacheClear;
|
|
5134
|
+
ListCache.prototype["delete"] = listCacheDelete;
|
|
5135
|
+
ListCache.prototype.get = listCacheGet;
|
|
5136
|
+
ListCache.prototype.has = listCacheHas;
|
|
5137
|
+
ListCache.prototype.set = listCacheSet;
|
|
5000
5138
|
var Map$1 = getNative(root$1, "Map");
|
|
5001
5139
|
var Map$2 = Map$1;
|
|
5140
|
+
function mapCacheClear() {
|
|
5141
|
+
this.size = 0;
|
|
5142
|
+
this.__data__ = {
|
|
5143
|
+
"hash": new Hash(),
|
|
5144
|
+
"map": new (Map$2 || ListCache)(),
|
|
5145
|
+
"string": new Hash()
|
|
5146
|
+
};
|
|
5147
|
+
}
|
|
5148
|
+
function isKeyable(value) {
|
|
5149
|
+
var type = typeof value;
|
|
5150
|
+
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
5151
|
+
}
|
|
5152
|
+
function getMapData(map, key) {
|
|
5153
|
+
var data = map.__data__;
|
|
5154
|
+
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
5155
|
+
}
|
|
5156
|
+
function mapCacheDelete(key) {
|
|
5157
|
+
var result = getMapData(this, key)["delete"](key);
|
|
5158
|
+
this.size -= result ? 1 : 0;
|
|
5159
|
+
return result;
|
|
5160
|
+
}
|
|
5161
|
+
function mapCacheGet(key) {
|
|
5162
|
+
return getMapData(this, key).get(key);
|
|
5163
|
+
}
|
|
5164
|
+
function mapCacheHas(key) {
|
|
5165
|
+
return getMapData(this, key).has(key);
|
|
5166
|
+
}
|
|
5167
|
+
function mapCacheSet(key, value) {
|
|
5168
|
+
var data = getMapData(this, key), size = data.size;
|
|
5169
|
+
data.set(key, value);
|
|
5170
|
+
this.size += data.size == size ? 0 : 1;
|
|
5171
|
+
return this;
|
|
5172
|
+
}
|
|
5173
|
+
function MapCache(entries) {
|
|
5174
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
5175
|
+
this.clear();
|
|
5176
|
+
while (++index < length) {
|
|
5177
|
+
var entry = entries[index];
|
|
5178
|
+
this.set(entry[0], entry[1]);
|
|
5179
|
+
}
|
|
5180
|
+
}
|
|
5181
|
+
MapCache.prototype.clear = mapCacheClear;
|
|
5182
|
+
MapCache.prototype["delete"] = mapCacheDelete;
|
|
5183
|
+
MapCache.prototype.get = mapCacheGet;
|
|
5184
|
+
MapCache.prototype.has = mapCacheHas;
|
|
5185
|
+
MapCache.prototype.set = mapCacheSet;
|
|
5186
|
+
function arrayPush(array, values) {
|
|
5187
|
+
var index = -1, length = values.length, offset = array.length;
|
|
5188
|
+
while (++index < length) {
|
|
5189
|
+
array[offset + index] = values[index];
|
|
5190
|
+
}
|
|
5191
|
+
return array;
|
|
5192
|
+
}
|
|
5193
|
+
function stackClear() {
|
|
5194
|
+
this.__data__ = new ListCache();
|
|
5195
|
+
this.size = 0;
|
|
5196
|
+
}
|
|
5197
|
+
function stackDelete(key) {
|
|
5198
|
+
var data = this.__data__, result = data["delete"](key);
|
|
5199
|
+
this.size = data.size;
|
|
5200
|
+
return result;
|
|
5201
|
+
}
|
|
5202
|
+
function stackGet(key) {
|
|
5203
|
+
return this.__data__.get(key);
|
|
5204
|
+
}
|
|
5205
|
+
function stackHas(key) {
|
|
5206
|
+
return this.__data__.has(key);
|
|
5207
|
+
}
|
|
5208
|
+
var LARGE_ARRAY_SIZE = 200;
|
|
5209
|
+
function stackSet(key, value) {
|
|
5210
|
+
var data = this.__data__;
|
|
5211
|
+
if (data instanceof ListCache) {
|
|
5212
|
+
var pairs = data.__data__;
|
|
5213
|
+
if (!Map$2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
5214
|
+
pairs.push([key, value]);
|
|
5215
|
+
this.size = ++data.size;
|
|
5216
|
+
return this;
|
|
5217
|
+
}
|
|
5218
|
+
data = this.__data__ = new MapCache(pairs);
|
|
5219
|
+
}
|
|
5220
|
+
data.set(key, value);
|
|
5221
|
+
this.size = data.size;
|
|
5222
|
+
return this;
|
|
5223
|
+
}
|
|
5224
|
+
function Stack(entries) {
|
|
5225
|
+
var data = this.__data__ = new ListCache(entries);
|
|
5226
|
+
this.size = data.size;
|
|
5227
|
+
}
|
|
5228
|
+
Stack.prototype.clear = stackClear;
|
|
5229
|
+
Stack.prototype["delete"] = stackDelete;
|
|
5230
|
+
Stack.prototype.get = stackGet;
|
|
5231
|
+
Stack.prototype.has = stackHas;
|
|
5232
|
+
Stack.prototype.set = stackSet;
|
|
5233
|
+
function arrayFilter(array, predicate) {
|
|
5234
|
+
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
5235
|
+
while (++index < length) {
|
|
5236
|
+
var value = array[index];
|
|
5237
|
+
if (predicate(value, index, array)) {
|
|
5238
|
+
result[resIndex++] = value;
|
|
5239
|
+
}
|
|
5240
|
+
}
|
|
5241
|
+
return result;
|
|
5242
|
+
}
|
|
5243
|
+
function stubArray() {
|
|
5244
|
+
return [];
|
|
5245
|
+
}
|
|
5246
|
+
var objectProto$3 = Object.prototype;
|
|
5247
|
+
var propertyIsEnumerable = objectProto$3.propertyIsEnumerable;
|
|
5248
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
5249
|
+
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
|
5250
|
+
if (object == null) {
|
|
5251
|
+
return [];
|
|
5252
|
+
}
|
|
5253
|
+
object = Object(object);
|
|
5254
|
+
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
5255
|
+
return propertyIsEnumerable.call(object, symbol);
|
|
5256
|
+
});
|
|
5257
|
+
};
|
|
5258
|
+
var getSymbols$1 = getSymbols;
|
|
5259
|
+
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
5260
|
+
var result = keysFunc(object);
|
|
5261
|
+
return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
5262
|
+
}
|
|
5263
|
+
function getAllKeys(object) {
|
|
5264
|
+
return baseGetAllKeys(object, keys, getSymbols$1);
|
|
5265
|
+
}
|
|
5002
5266
|
var DataView = getNative(root$1, "DataView");
|
|
5003
5267
|
var DataView$1 = DataView;
|
|
5004
5268
|
var Promise$1 = getNative(root$1, "Promise");
|
|
5005
5269
|
var Promise$2 = Promise$1;
|
|
5006
5270
|
var Set$1 = getNative(root$1, "Set");
|
|
5007
5271
|
var Set$2 = Set$1;
|
|
5008
|
-
var mapTag$
|
|
5009
|
-
var dataViewTag = "[object DataView]";
|
|
5272
|
+
var mapTag$2 = "[object Map]", objectTag$1 = "[object Object]", promiseTag = "[object Promise]", setTag$2 = "[object Set]", weakMapTag = "[object WeakMap]";
|
|
5273
|
+
var dataViewTag$1 = "[object DataView]";
|
|
5010
5274
|
var dataViewCtorString = toSource(DataView$1), mapCtorString = toSource(Map$2), promiseCtorString = toSource(Promise$2), setCtorString = toSource(Set$2), weakMapCtorString = toSource(WeakMap$1);
|
|
5011
5275
|
var getTag = baseGetTag;
|
|
5012
|
-
if (DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag || Map$2 && getTag(new Map$2()) != mapTag$
|
|
5276
|
+
if (DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$1 || Map$2 && getTag(new Map$2()) != mapTag$2 || Promise$2 && getTag(Promise$2.resolve()) != promiseTag || Set$2 && getTag(new Set$2()) != setTag$2 || WeakMap$1 && getTag(new WeakMap$1()) != weakMapTag) {
|
|
5013
5277
|
getTag = function(value) {
|
|
5014
|
-
var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
|
|
5278
|
+
var result = baseGetTag(value), Ctor = result == objectTag$1 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
|
|
5015
5279
|
if (ctorString) {
|
|
5016
5280
|
switch (ctorString) {
|
|
5017
5281
|
case dataViewCtorString:
|
|
5018
|
-
return dataViewTag;
|
|
5282
|
+
return dataViewTag$1;
|
|
5019
5283
|
case mapCtorString:
|
|
5020
|
-
return mapTag$
|
|
5284
|
+
return mapTag$2;
|
|
5021
5285
|
case promiseCtorString:
|
|
5022
5286
|
return promiseTag;
|
|
5023
5287
|
case setCtorString:
|
|
5024
|
-
return setTag$
|
|
5288
|
+
return setTag$2;
|
|
5025
5289
|
case weakMapCtorString:
|
|
5026
5290
|
return weakMapTag;
|
|
5027
5291
|
}
|
|
@@ -5030,6 +5294,234 @@ if (DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag || M
|
|
|
5030
5294
|
};
|
|
5031
5295
|
}
|
|
5032
5296
|
var getTag$1 = getTag;
|
|
5297
|
+
var Uint8Array = root$1.Uint8Array;
|
|
5298
|
+
var Uint8Array$1 = Uint8Array;
|
|
5299
|
+
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
5300
|
+
function setCacheAdd(value) {
|
|
5301
|
+
this.__data__.set(value, HASH_UNDEFINED);
|
|
5302
|
+
return this;
|
|
5303
|
+
}
|
|
5304
|
+
function setCacheHas(value) {
|
|
5305
|
+
return this.__data__.has(value);
|
|
5306
|
+
}
|
|
5307
|
+
function SetCache(values) {
|
|
5308
|
+
var index = -1, length = values == null ? 0 : values.length;
|
|
5309
|
+
this.__data__ = new MapCache();
|
|
5310
|
+
while (++index < length) {
|
|
5311
|
+
this.add(values[index]);
|
|
5312
|
+
}
|
|
5313
|
+
}
|
|
5314
|
+
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
5315
|
+
SetCache.prototype.has = setCacheHas;
|
|
5316
|
+
function arraySome(array, predicate) {
|
|
5317
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
5318
|
+
while (++index < length) {
|
|
5319
|
+
if (predicate(array[index], index, array)) {
|
|
5320
|
+
return true;
|
|
5321
|
+
}
|
|
5322
|
+
}
|
|
5323
|
+
return false;
|
|
5324
|
+
}
|
|
5325
|
+
function cacheHas(cache, key) {
|
|
5326
|
+
return cache.has(key);
|
|
5327
|
+
}
|
|
5328
|
+
var COMPARE_PARTIAL_FLAG$3 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
|
|
5329
|
+
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|
5330
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, arrLength = array.length, othLength = other.length;
|
|
5331
|
+
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
|
5332
|
+
return false;
|
|
5333
|
+
}
|
|
5334
|
+
var arrStacked = stack.get(array);
|
|
5335
|
+
var othStacked = stack.get(other);
|
|
5336
|
+
if (arrStacked && othStacked) {
|
|
5337
|
+
return arrStacked == other && othStacked == array;
|
|
5338
|
+
}
|
|
5339
|
+
var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$1 ? new SetCache() : void 0;
|
|
5340
|
+
stack.set(array, other);
|
|
5341
|
+
stack.set(other, array);
|
|
5342
|
+
while (++index < arrLength) {
|
|
5343
|
+
var arrValue = array[index], othValue = other[index];
|
|
5344
|
+
if (customizer) {
|
|
5345
|
+
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
|
|
5346
|
+
}
|
|
5347
|
+
if (compared !== void 0) {
|
|
5348
|
+
if (compared) {
|
|
5349
|
+
continue;
|
|
5350
|
+
}
|
|
5351
|
+
result = false;
|
|
5352
|
+
break;
|
|
5353
|
+
}
|
|
5354
|
+
if (seen) {
|
|
5355
|
+
if (!arraySome(other, function(othValue2, othIndex) {
|
|
5356
|
+
if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
|
|
5357
|
+
return seen.push(othIndex);
|
|
5358
|
+
}
|
|
5359
|
+
})) {
|
|
5360
|
+
result = false;
|
|
5361
|
+
break;
|
|
5362
|
+
}
|
|
5363
|
+
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|
5364
|
+
result = false;
|
|
5365
|
+
break;
|
|
5366
|
+
}
|
|
5367
|
+
}
|
|
5368
|
+
stack["delete"](array);
|
|
5369
|
+
stack["delete"](other);
|
|
5370
|
+
return result;
|
|
5371
|
+
}
|
|
5372
|
+
function mapToArray(map) {
|
|
5373
|
+
var index = -1, result = Array(map.size);
|
|
5374
|
+
map.forEach(function(value, key) {
|
|
5375
|
+
result[++index] = [key, value];
|
|
5376
|
+
});
|
|
5377
|
+
return result;
|
|
5378
|
+
}
|
|
5379
|
+
function setToArray(set2) {
|
|
5380
|
+
var index = -1, result = Array(set2.size);
|
|
5381
|
+
set2.forEach(function(value) {
|
|
5382
|
+
result[++index] = value;
|
|
5383
|
+
});
|
|
5384
|
+
return result;
|
|
5385
|
+
}
|
|
5386
|
+
var COMPARE_PARTIAL_FLAG$2 = 1, COMPARE_UNORDERED_FLAG = 2;
|
|
5387
|
+
var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag$1 = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag$1 = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]";
|
|
5388
|
+
var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
|
|
5389
|
+
var symbolProto = Symbol$2 ? Symbol$2.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
|
|
5390
|
+
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
5391
|
+
switch (tag) {
|
|
5392
|
+
case dataViewTag:
|
|
5393
|
+
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
|
|
5394
|
+
return false;
|
|
5395
|
+
}
|
|
5396
|
+
object = object.buffer;
|
|
5397
|
+
other = other.buffer;
|
|
5398
|
+
case arrayBufferTag:
|
|
5399
|
+
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) {
|
|
5400
|
+
return false;
|
|
5401
|
+
}
|
|
5402
|
+
return true;
|
|
5403
|
+
case boolTag:
|
|
5404
|
+
case dateTag:
|
|
5405
|
+
case numberTag:
|
|
5406
|
+
return eq(+object, +other);
|
|
5407
|
+
case errorTag:
|
|
5408
|
+
return object.name == other.name && object.message == other.message;
|
|
5409
|
+
case regexpTag:
|
|
5410
|
+
case stringTag:
|
|
5411
|
+
return object == other + "";
|
|
5412
|
+
case mapTag$1:
|
|
5413
|
+
var convert = mapToArray;
|
|
5414
|
+
case setTag$1:
|
|
5415
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
|
|
5416
|
+
convert || (convert = setToArray);
|
|
5417
|
+
if (object.size != other.size && !isPartial) {
|
|
5418
|
+
return false;
|
|
5419
|
+
}
|
|
5420
|
+
var stacked = stack.get(object);
|
|
5421
|
+
if (stacked) {
|
|
5422
|
+
return stacked == other;
|
|
5423
|
+
}
|
|
5424
|
+
bitmask |= COMPARE_UNORDERED_FLAG;
|
|
5425
|
+
stack.set(object, other);
|
|
5426
|
+
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
|
5427
|
+
stack["delete"](object);
|
|
5428
|
+
return result;
|
|
5429
|
+
case symbolTag:
|
|
5430
|
+
if (symbolValueOf) {
|
|
5431
|
+
return symbolValueOf.call(object) == symbolValueOf.call(other);
|
|
5432
|
+
}
|
|
5433
|
+
}
|
|
5434
|
+
return false;
|
|
5435
|
+
}
|
|
5436
|
+
var COMPARE_PARTIAL_FLAG$1 = 1;
|
|
5437
|
+
var objectProto$2 = Object.prototype;
|
|
5438
|
+
var hasOwnProperty$3 = objectProto$2.hasOwnProperty;
|
|
5439
|
+
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|
5440
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
|
|
5441
|
+
if (objLength != othLength && !isPartial) {
|
|
5442
|
+
return false;
|
|
5443
|
+
}
|
|
5444
|
+
var index = objLength;
|
|
5445
|
+
while (index--) {
|
|
5446
|
+
var key = objProps[index];
|
|
5447
|
+
if (!(isPartial ? key in other : hasOwnProperty$3.call(other, key))) {
|
|
5448
|
+
return false;
|
|
5449
|
+
}
|
|
5450
|
+
}
|
|
5451
|
+
var objStacked = stack.get(object);
|
|
5452
|
+
var othStacked = stack.get(other);
|
|
5453
|
+
if (objStacked && othStacked) {
|
|
5454
|
+
return objStacked == other && othStacked == object;
|
|
5455
|
+
}
|
|
5456
|
+
var result = true;
|
|
5457
|
+
stack.set(object, other);
|
|
5458
|
+
stack.set(other, object);
|
|
5459
|
+
var skipCtor = isPartial;
|
|
5460
|
+
while (++index < objLength) {
|
|
5461
|
+
key = objProps[index];
|
|
5462
|
+
var objValue = object[key], othValue = other[key];
|
|
5463
|
+
if (customizer) {
|
|
5464
|
+
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
|
|
5465
|
+
}
|
|
5466
|
+
if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
|
|
5467
|
+
result = false;
|
|
5468
|
+
break;
|
|
5469
|
+
}
|
|
5470
|
+
skipCtor || (skipCtor = key == "constructor");
|
|
5471
|
+
}
|
|
5472
|
+
if (result && !skipCtor) {
|
|
5473
|
+
var objCtor = object.constructor, othCtor = other.constructor;
|
|
5474
|
+
if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
|
|
5475
|
+
result = false;
|
|
5476
|
+
}
|
|
5477
|
+
}
|
|
5478
|
+
stack["delete"](object);
|
|
5479
|
+
stack["delete"](other);
|
|
5480
|
+
return result;
|
|
5481
|
+
}
|
|
5482
|
+
var COMPARE_PARTIAL_FLAG = 1;
|
|
5483
|
+
var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
|
|
5484
|
+
var objectProto$1 = Object.prototype;
|
|
5485
|
+
var hasOwnProperty$2 = objectProto$1.hasOwnProperty;
|
|
5486
|
+
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
5487
|
+
var objIsArr = isArray$1(object), othIsArr = isArray$1(other), objTag = objIsArr ? arrayTag : getTag$1(object), othTag = othIsArr ? arrayTag : getTag$1(other);
|
|
5488
|
+
objTag = objTag == argsTag ? objectTag : objTag;
|
|
5489
|
+
othTag = othTag == argsTag ? objectTag : othTag;
|
|
5490
|
+
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
|
|
5491
|
+
if (isSameTag && isBuffer$1(object)) {
|
|
5492
|
+
if (!isBuffer$1(other)) {
|
|
5493
|
+
return false;
|
|
5494
|
+
}
|
|
5495
|
+
objIsArr = true;
|
|
5496
|
+
objIsObj = false;
|
|
5497
|
+
}
|
|
5498
|
+
if (isSameTag && !objIsObj) {
|
|
5499
|
+
stack || (stack = new Stack());
|
|
5500
|
+
return objIsArr || isTypedArray$1(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
5501
|
+
}
|
|
5502
|
+
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
|
5503
|
+
var objIsWrapped = objIsObj && hasOwnProperty$2.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$2.call(other, "__wrapped__");
|
|
5504
|
+
if (objIsWrapped || othIsWrapped) {
|
|
5505
|
+
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
|
|
5506
|
+
stack || (stack = new Stack());
|
|
5507
|
+
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
5508
|
+
}
|
|
5509
|
+
}
|
|
5510
|
+
if (!isSameTag) {
|
|
5511
|
+
return false;
|
|
5512
|
+
}
|
|
5513
|
+
stack || (stack = new Stack());
|
|
5514
|
+
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
|
5515
|
+
}
|
|
5516
|
+
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
|
5517
|
+
if (value === other) {
|
|
5518
|
+
return true;
|
|
5519
|
+
}
|
|
5520
|
+
if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
|
|
5521
|
+
return value !== value && other !== other;
|
|
5522
|
+
}
|
|
5523
|
+
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
|
5524
|
+
}
|
|
5033
5525
|
var nativeMax = Math.max, nativeMin = Math.min;
|
|
5034
5526
|
function baseInRange(number, start, end) {
|
|
5035
5527
|
return number >= nativeMin(start, end) && number < nativeMax(start, end);
|
|
@@ -5069,6 +5561,9 @@ function isEmpty(value) {
|
|
|
5069
5561
|
}
|
|
5070
5562
|
return true;
|
|
5071
5563
|
}
|
|
5564
|
+
function isEqual(value, other) {
|
|
5565
|
+
return baseIsEqual(value, other);
|
|
5566
|
+
}
|
|
5072
5567
|
const isInputEnabled = (item, validationMap) => {
|
|
5073
5568
|
var _a;
|
|
5074
5569
|
const { selCtx } = item;
|
|
@@ -5143,6 +5638,7 @@ const getItemQtyFromSelectedState = (item, actualSelectedState) => {
|
|
|
5143
5638
|
const createValidationSlice = (set2, get2) => ({
|
|
5144
5639
|
validationMap: {},
|
|
5145
5640
|
isOnSubmitted: false,
|
|
5641
|
+
currency: "z\u0142",
|
|
5146
5642
|
refreshFormDt: "",
|
|
5147
5643
|
setInitialValidate: () => {
|
|
5148
5644
|
set2(() => ({
|
|
@@ -5212,6 +5708,12 @@ const createValidationSlice = (set2, get2) => ({
|
|
|
5212
5708
|
console.log("isOnSubmitted");
|
|
5213
5709
|
set2(() => ({ isOnSubmitted: true }));
|
|
5214
5710
|
},
|
|
5711
|
+
getValidationMap: () => {
|
|
5712
|
+
return get2().validationMap;
|
|
5713
|
+
},
|
|
5714
|
+
setCurrency: (currency) => {
|
|
5715
|
+
set2(() => ({ currency }));
|
|
5716
|
+
},
|
|
5215
5717
|
refreshForm: () => {
|
|
5216
5718
|
set2(() => ({ refreshFormDt: `${new Date()}` }));
|
|
5217
5719
|
}
|
|
@@ -5249,11 +5751,13 @@ function useProductConfigurator(product) {
|
|
|
5249
5751
|
const setInitialValidate = useStore((state) => state.setInitialValidate);
|
|
5250
5752
|
const resetExpandedItems = useStore((state) => state.resetExpanded);
|
|
5251
5753
|
const filter = useStore((state) => state.filter);
|
|
5754
|
+
const setCurrency = useStore((state) => state.setCurrency);
|
|
5252
5755
|
const setIsOnSubmittedOnTrue = useStore(
|
|
5253
5756
|
(state) => state.setIsOnSubmittedOnTrue
|
|
5254
5757
|
);
|
|
5255
5758
|
useStore((state) => state.refreshFormDt);
|
|
5256
5759
|
const getInvalidSelCtxArray = useStore((state) => state.getInvalidSelCtxArray);
|
|
5760
|
+
const getValidationMap = useStore((state) => state.getValidationMap);
|
|
5257
5761
|
const increaseProductQuantity = () => {
|
|
5258
5762
|
setProductQuantity((productQuantity2) => productQuantity2 + 1);
|
|
5259
5763
|
};
|
|
@@ -5272,9 +5776,11 @@ function useProductConfigurator(product) {
|
|
|
5272
5776
|
encodedProduct,
|
|
5273
5777
|
initSelected,
|
|
5274
5778
|
filter,
|
|
5779
|
+
setCurrency,
|
|
5275
5780
|
setIsOnSubmittedOnTrue,
|
|
5276
5781
|
getInvalidSelCtxArray,
|
|
5277
5782
|
productQuantity,
|
|
5783
|
+
getValidationMap,
|
|
5278
5784
|
increaseProductQuantity,
|
|
5279
5785
|
decreaseProductQuantity
|
|
5280
5786
|
};
|
|
@@ -5284,18 +5790,19 @@ var EPaymentStatus;
|
|
|
5284
5790
|
EPaymentStatus2["UNINITIALIZED"] = "UNINITIALIZED";
|
|
5285
5791
|
EPaymentStatus2["PROCESSING"] = "PROCESSING";
|
|
5286
5792
|
EPaymentStatus2["PAID"] = "PAID";
|
|
5793
|
+
EPaymentStatus2["FAILED"] = "FAILED";
|
|
5287
5794
|
EPaymentStatus2["PRINTING_RECEIPT"] = "PRINTING_RECEIPT";
|
|
5288
5795
|
EPaymentStatus2["PRINTING_RECEIPT_SUCCESS"] = "PRINTING_RECEIPT_SUCCESS";
|
|
5289
5796
|
EPaymentStatus2["SENDING_RECEIPT"] = "SENDING_RECEIPT";
|
|
5290
5797
|
EPaymentStatus2["SENDING_RECEIPT_SUCCESS"] = "SENDING_RECEIPT_SUCCESS";
|
|
5291
5798
|
EPaymentStatus2["ERROR"] = "ERROR";
|
|
5292
5799
|
})(EPaymentStatus || (EPaymentStatus = {}));
|
|
5293
|
-
var
|
|
5294
|
-
(function(
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
})(
|
|
5800
|
+
var ECouponViewType;
|
|
5801
|
+
(function(ECouponViewType2) {
|
|
5802
|
+
ECouponViewType2["CAROUSEL"] = "carousel";
|
|
5803
|
+
ECouponViewType2["NORMAL"] = "normal";
|
|
5804
|
+
ECouponViewType2["IMAGE"] = "image";
|
|
5805
|
+
})(ECouponViewType || (ECouponViewType = {}));
|
|
5299
5806
|
var EProductKind;
|
|
5300
5807
|
(function(EProductKind2) {
|
|
5301
5808
|
EProductKind2["GROUP"] = "3e/group";
|
|
@@ -5312,50 +5819,50 @@ var EProductKindBucket;
|
|
|
5312
5819
|
EProductKindBucket2["GROUP"] = "group";
|
|
5313
5820
|
EProductKindBucket2["PRODUCT"] = "product";
|
|
5314
5821
|
})(EProductKindBucket || (EProductKindBucket = {}));
|
|
5315
|
-
var
|
|
5316
|
-
(function(
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
})(
|
|
5334
|
-
var
|
|
5335
|
-
(function(
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
})(
|
|
5346
|
-
var
|
|
5347
|
-
(function(
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
})(
|
|
5822
|
+
var EOrderType;
|
|
5823
|
+
(function(EOrderType2) {
|
|
5824
|
+
EOrderType2["TAKE_AWAY"] = "TAKE_AWAY";
|
|
5825
|
+
EOrderType2["DELIVERY"] = "DELIVERY";
|
|
5826
|
+
EOrderType2["DINE_IN"] = "DINE_IN";
|
|
5827
|
+
EOrderType2["DINE_IN_OPEN"] = "DINE_IN_OPEN";
|
|
5828
|
+
EOrderType2["GLOVO_DELIVERY"] = "GLOVO_DELIVERY";
|
|
5829
|
+
EOrderType2["GLOVO_TAKE_AWAY"] = "GLOVO_TAKE_AWAY";
|
|
5830
|
+
EOrderType2["JUSTEAT_DELIVERY"] = "JUSTEAT_DELIVERY";
|
|
5831
|
+
EOrderType2["JUSTEAT_TAKE_AWAY"] = "JUSTEAT_TAKE_AWAY";
|
|
5832
|
+
EOrderType2["UBER_DELIVERY"] = "UBER_DELIVERY";
|
|
5833
|
+
EOrderType2["UBER_TAKE_AWAY"] = "UBER_TAKE_AWAY";
|
|
5834
|
+
EOrderType2["UBER_DINE_IN"] = "UBER_DINE_IN";
|
|
5835
|
+
EOrderType2["BOLT_DELIVERY"] = "BOLT_DELIVERY";
|
|
5836
|
+
EOrderType2["BOLT_TAKE_AWAY"] = "BOLT_TAKE_AWAY";
|
|
5837
|
+
EOrderType2["WOLT_DELIVERY"] = "WOLT_DELIVERY";
|
|
5838
|
+
EOrderType2["WOLT_TAKE_AWAY"] = "WOLT_TAKE_AWAY";
|
|
5839
|
+
EOrderType2["WOLT_DINE_IN"] = "WOLT_DINE_IN";
|
|
5840
|
+
})(EOrderType || (EOrderType = {}));
|
|
5841
|
+
var EOrderStatus;
|
|
5842
|
+
(function(EOrderStatus2) {
|
|
5843
|
+
EOrderStatus2["NEW"] = "NEW";
|
|
5844
|
+
EOrderStatus2["COMPLETED"] = "COMPLETED";
|
|
5845
|
+
EOrderStatus2["VERIFIED"] = "VERIFIED";
|
|
5846
|
+
EOrderStatus2["DELIVER"] = "DELIVER";
|
|
5847
|
+
EOrderStatus2["DELIVERED"] = "DELIVERED";
|
|
5848
|
+
EOrderStatus2["CLOSED"] = "CLOSED";
|
|
5849
|
+
EOrderStatus2["ABANDONED"] = "ABANDONED";
|
|
5850
|
+
EOrderStatus2["CANCELLED"] = "CANCELLED";
|
|
5851
|
+
EOrderStatus2["PICKED"] = "PICKED";
|
|
5852
|
+
})(EOrderStatus || (EOrderStatus = {}));
|
|
5853
|
+
var EOrderPaymentType;
|
|
5854
|
+
(function(EOrderPaymentType2) {
|
|
5855
|
+
EOrderPaymentType2["CASH"] = "CASH";
|
|
5856
|
+
EOrderPaymentType2["CARD"] = "CARD";
|
|
5857
|
+
EOrderPaymentType2["COD"] = "COD";
|
|
5858
|
+
EOrderPaymentType2["TERMINAL"] = "TERMINAL";
|
|
5859
|
+
EOrderPaymentType2["EPAYMENT"] = "EPAYMENT";
|
|
5860
|
+
EOrderPaymentType2["COUPON"] = "COUPON";
|
|
5861
|
+
EOrderPaymentType2["WALLET"] = "WALLET";
|
|
5862
|
+
EOrderPaymentType2["PREAUTHORIZED"] = "PREAUTHORIZED";
|
|
5863
|
+
EOrderPaymentType2["RETURN"] = "RETURN";
|
|
5864
|
+
EOrderPaymentType2["EXTERNAL"] = "EXTERNAL";
|
|
5865
|
+
})(EOrderPaymentType || (EOrderPaymentType = {}));
|
|
5359
5866
|
var OrderSource;
|
|
5360
5867
|
(function(OrderSource2) {
|
|
5361
5868
|
OrderSource2["KIOSK"] = "KIOSK";
|
|
@@ -5367,21 +5874,21 @@ var OrderSource;
|
|
|
5367
5874
|
OrderSource2["UBER"] = "UBER";
|
|
5368
5875
|
OrderSource2["BOLT"] = "BOLT";
|
|
5369
5876
|
})(OrderSource || (OrderSource = {}));
|
|
5370
|
-
var
|
|
5371
|
-
(function(
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
})(
|
|
5380
|
-
var
|
|
5381
|
-
(function(
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
})(
|
|
5877
|
+
var EOrderLineStatus;
|
|
5878
|
+
(function(EOrderLineStatus2) {
|
|
5879
|
+
EOrderLineStatus2["NEW"] = "NEW";
|
|
5880
|
+
EOrderLineStatus2["TECHNICAL"] = "TECHNICAL";
|
|
5881
|
+
EOrderLineStatus2["CONFIRMED"] = "CONFIRMED";
|
|
5882
|
+
EOrderLineStatus2["PROCESSING"] = "PROCESSING";
|
|
5883
|
+
EOrderLineStatus2["PROCESSED"] = "PROCESSED";
|
|
5884
|
+
EOrderLineStatus2["VOID"] = "VOID";
|
|
5885
|
+
EOrderLineStatus2["WASTE"] = "WASTE";
|
|
5886
|
+
})(EOrderLineStatus || (EOrderLineStatus = {}));
|
|
5887
|
+
var EOrderProductKind;
|
|
5888
|
+
(function(EOrderProductKind2) {
|
|
5889
|
+
EOrderProductKind2["GROUP"] = "group";
|
|
5890
|
+
EOrderProductKind2["PRODUCT"] = "product";
|
|
5891
|
+
})(EOrderProductKind || (EOrderProductKind = {}));
|
|
5385
5892
|
var EChannelName;
|
|
5386
5893
|
(function(EChannelName2) {
|
|
5387
5894
|
EChannelName2["DINE_IN"] = "DINE_IN";
|
|
@@ -5448,6 +5955,7 @@ function useMenuOptions(product, nestedLvl, parentKind, parentSelCtx) {
|
|
|
5448
5955
|
const { selCtx, attrs = {} } = product;
|
|
5449
5956
|
const stateFilter = useStore((state) => state.filter);
|
|
5450
5957
|
const initialSelected = useStore((state) => state.initialSelected);
|
|
5958
|
+
const currency = useStore((state) => state.currency);
|
|
5451
5959
|
const { setValue, getValues } = useFormContext();
|
|
5452
5960
|
const { selected = {} } = getValues();
|
|
5453
5961
|
const isFilterValidated = validateProductFilter(product, stateFilter);
|
|
@@ -5476,7 +5984,14 @@ function useMenuOptions(product, nestedLvl, parentKind, parentSelCtx) {
|
|
|
5476
5984
|
unselectProductsInForm(productsToUnselect, setValue);
|
|
5477
5985
|
selectProductsInForm(productsToSelect, setValue, initialSelected);
|
|
5478
5986
|
}, [stateFilter]);
|
|
5479
|
-
return {
|
|
5987
|
+
return {
|
|
5988
|
+
isFilterValidated,
|
|
5989
|
+
selected,
|
|
5990
|
+
isOnSubmitted,
|
|
5991
|
+
selCnt,
|
|
5992
|
+
qtyCnt,
|
|
5993
|
+
currency
|
|
5994
|
+
};
|
|
5480
5995
|
}
|
|
5481
5996
|
var jsxRuntime = { exports: {} };
|
|
5482
5997
|
var reactJsxRuntime_production_min = {};
|
|
@@ -6237,7 +6752,7 @@ var unescape = function unescape2(text) {
|
|
|
6237
6752
|
return text.replace(matchHtmlEntity, unescapeHtmlEntity);
|
|
6238
6753
|
};
|
|
6239
6754
|
function ownKeys$1(object, enumerableOnly) {
|
|
6240
|
-
var
|
|
6755
|
+
var keys2 = Object.keys(object);
|
|
6241
6756
|
if (Object.getOwnPropertySymbols) {
|
|
6242
6757
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
6243
6758
|
if (enumerableOnly) {
|
|
@@ -6245,9 +6760,9 @@ function ownKeys$1(object, enumerableOnly) {
|
|
|
6245
6760
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
6246
6761
|
});
|
|
6247
6762
|
}
|
|
6248
|
-
|
|
6763
|
+
keys2.push.apply(keys2, symbols);
|
|
6249
6764
|
}
|
|
6250
|
-
return
|
|
6765
|
+
return keys2;
|
|
6251
6766
|
}
|
|
6252
6767
|
function _objectSpread$1(target) {
|
|
6253
6768
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
@@ -6425,7 +6940,7 @@ function _slicedToArray(arr2, i2) {
|
|
|
6425
6940
|
return _arrayWithHoles$1(arr2) || _iterableToArrayLimit(arr2, i2) || _unsupportedIterableToArray$1(arr2, i2) || _nonIterableRest$1();
|
|
6426
6941
|
}
|
|
6427
6942
|
function ownKeys(object, enumerableOnly) {
|
|
6428
|
-
var
|
|
6943
|
+
var keys2 = Object.keys(object);
|
|
6429
6944
|
if (Object.getOwnPropertySymbols) {
|
|
6430
6945
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
6431
6946
|
if (enumerableOnly) {
|
|
@@ -6433,9 +6948,9 @@ function ownKeys(object, enumerableOnly) {
|
|
|
6433
6948
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
6434
6949
|
});
|
|
6435
6950
|
}
|
|
6436
|
-
|
|
6951
|
+
keys2.push.apply(keys2, symbols);
|
|
6437
6952
|
}
|
|
6438
|
-
return
|
|
6953
|
+
return keys2;
|
|
6439
6954
|
}
|
|
6440
6955
|
function _objectSpread(target) {
|
|
6441
6956
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
@@ -7168,7 +7683,8 @@ const MenuOptions = (props) => {
|
|
|
7168
7683
|
selected,
|
|
7169
7684
|
isOnSubmitted,
|
|
7170
7685
|
selCnt,
|
|
7171
|
-
qtyCnt
|
|
7686
|
+
qtyCnt,
|
|
7687
|
+
currency
|
|
7172
7688
|
} = useMenuOptions(optionsItem, nestedLvl, parentKind, parentSelCtx);
|
|
7173
7689
|
const {
|
|
7174
7690
|
MenuOptionsUI
|
|
@@ -7186,7 +7702,8 @@ const MenuOptions = (props) => {
|
|
|
7186
7702
|
selected,
|
|
7187
7703
|
isOnSubmitted,
|
|
7188
7704
|
actualQtyCnt: qtyCnt,
|
|
7189
|
-
actualSelCnt: selCnt
|
|
7705
|
+
actualSelCnt: selCnt,
|
|
7706
|
+
currency
|
|
7190
7707
|
};
|
|
7191
7708
|
if (MenuOptionsUI) {
|
|
7192
7709
|
return /* @__PURE__ */ jsx(MenuOptionsUI, {
|
|
@@ -7433,6 +7950,7 @@ function useMenuProduct(product, parentAttrs) {
|
|
|
7433
7950
|
useEmitFilter(product);
|
|
7434
7951
|
const { isInputEnabled: isInputEnabled2, isInputCounterIncrementEnabled: isInputCounterIncrementEnabled2 } = useValidate();
|
|
7435
7952
|
const refreshForm = useStore((state) => state.refreshForm);
|
|
7953
|
+
const currency = useStore((state) => state.currency);
|
|
7436
7954
|
const { watch, getValues, setValue, register } = useFormContext();
|
|
7437
7955
|
const value = watch(`selected.${selCtx}.${id}`);
|
|
7438
7956
|
const { selected = {} } = getValues();
|
|
@@ -7482,7 +8000,8 @@ function useMenuProduct(product, parentAttrs) {
|
|
|
7482
8000
|
counterValue: valueNumber,
|
|
7483
8001
|
handleOnInputChange,
|
|
7484
8002
|
inputId: `${selCtx}.${id}`,
|
|
7485
|
-
radioInputValue: id
|
|
8003
|
+
radioInputValue: id,
|
|
8004
|
+
currency
|
|
7486
8005
|
};
|
|
7487
8006
|
}
|
|
7488
8007
|
const MenuProduct = (props) => {
|
|
@@ -7504,7 +8023,8 @@ const MenuProduct = (props) => {
|
|
|
7504
8023
|
isCheckboxEnabled,
|
|
7505
8024
|
counterValue,
|
|
7506
8025
|
handleCounterIncrementQty,
|
|
7507
|
-
handleCounterDecrementQty
|
|
8026
|
+
handleCounterDecrementQty,
|
|
8027
|
+
currency
|
|
7508
8028
|
} = useMenuProduct(product, parentAttrs);
|
|
7509
8029
|
const {
|
|
7510
8030
|
MenuProductUI
|
|
@@ -7524,7 +8044,8 @@ const MenuProduct = (props) => {
|
|
|
7524
8044
|
isCheckboxEnabled,
|
|
7525
8045
|
counterValue,
|
|
7526
8046
|
handleCounterIncrementQty,
|
|
7527
|
-
handleCounterDecrementQty
|
|
8047
|
+
handleCounterDecrementQty,
|
|
8048
|
+
currency
|
|
7528
8049
|
};
|
|
7529
8050
|
const MenuItemsDispatcherWrapper = /* @__PURE__ */ jsx(MenuItemsDispatcher, {
|
|
7530
8051
|
productItems: product.items,
|
|
@@ -7735,6 +8256,7 @@ const DisplayState = () => {
|
|
|
7735
8256
|
const selected = watch("selected");
|
|
7736
8257
|
const validationMap = useStore((state) => state.validationMap);
|
|
7737
8258
|
console.log({
|
|
8259
|
+
selected,
|
|
7738
8260
|
validationMap
|
|
7739
8261
|
});
|
|
7740
8262
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -9079,7 +9601,9 @@ function ProductConfigurator(props) {
|
|
|
9079
9601
|
handleAddToCart,
|
|
9080
9602
|
handleGoBack,
|
|
9081
9603
|
isOpen,
|
|
9082
|
-
handleClose
|
|
9604
|
+
handleClose,
|
|
9605
|
+
currency,
|
|
9606
|
+
showDebugState = false
|
|
9083
9607
|
} = props;
|
|
9084
9608
|
const {
|
|
9085
9609
|
price
|
|
@@ -9091,12 +9615,24 @@ function ProductConfigurator(props) {
|
|
|
9091
9615
|
productQuantity,
|
|
9092
9616
|
setIsOnSubmittedOnTrue,
|
|
9093
9617
|
getInvalidSelCtxArray,
|
|
9618
|
+
getValidationMap,
|
|
9094
9619
|
increaseProductQuantity,
|
|
9095
|
-
decreaseProductQuantity
|
|
9620
|
+
decreaseProductQuantity,
|
|
9621
|
+
setCurrency
|
|
9096
9622
|
} = useProductConfigurator(product);
|
|
9623
|
+
const [validationMap, setValidationMap] = useState(getValidationMap());
|
|
9097
9624
|
useEffect(() => {
|
|
9098
9625
|
instance.changeLanguage(lang);
|
|
9099
9626
|
}, [lang]);
|
|
9627
|
+
useEffect(() => {
|
|
9628
|
+
setCurrency(currency);
|
|
9629
|
+
}, [currency]);
|
|
9630
|
+
useEffect(() => {
|
|
9631
|
+
const validationMapNew = getValidationMap();
|
|
9632
|
+
if (!isEqual(validationMapNew, validationMap)) {
|
|
9633
|
+
setValidationMap(validationMapNew);
|
|
9634
|
+
}
|
|
9635
|
+
});
|
|
9100
9636
|
const methods = useForm({
|
|
9101
9637
|
defaultValues: {
|
|
9102
9638
|
selected: initSelected
|
|
@@ -9106,7 +9642,7 @@ function ProductConfigurator(props) {
|
|
|
9106
9642
|
handleSubmit,
|
|
9107
9643
|
getValues
|
|
9108
9644
|
} = methods;
|
|
9109
|
-
const countedProductPrice = (parseFloat(price || "0") + countPrice(getValues("selected"), product)).toFixed(2);
|
|
9645
|
+
const countedProductPrice = Number((parseFloat(price || "0") + countPrice(getValues("selected"), product)).toFixed(2));
|
|
9110
9646
|
const onSubmit = () => {
|
|
9111
9647
|
console.log("onSubmit");
|
|
9112
9648
|
setIsOnSubmittedOnTrue();
|
|
@@ -9134,19 +9670,25 @@ function ProductConfigurator(props) {
|
|
|
9134
9670
|
value: props.components,
|
|
9135
9671
|
children: /* @__PURE__ */ jsx(FormProvider, {
|
|
9136
9672
|
...methods,
|
|
9137
|
-
children: /* @__PURE__ */
|
|
9673
|
+
children: /* @__PURE__ */ jsxs("form", {
|
|
9138
9674
|
onSubmit: handleSubmit(onSubmit),
|
|
9139
|
-
children: /* @__PURE__ */ jsx(
|
|
9675
|
+
children: [showDebugState && /* @__PURE__ */ jsx("div", {
|
|
9676
|
+
className: "hidden",
|
|
9677
|
+
children: /* @__PURE__ */ jsx(DisplayState, {})
|
|
9678
|
+
}), /* @__PURE__ */ jsx(MenuProductRoot, {
|
|
9140
9679
|
product: encodedProduct,
|
|
9141
9680
|
productQuantity,
|
|
9681
|
+
validationMap,
|
|
9142
9682
|
isOpen,
|
|
9143
9683
|
handleClose,
|
|
9144
9684
|
handleGoBack,
|
|
9145
9685
|
handleOnSubmit,
|
|
9146
|
-
countedProductPrice
|
|
9686
|
+
countedProductPrice,
|
|
9687
|
+
countedProductTotalPrice: countedProductPrice * productQuantity,
|
|
9147
9688
|
increaseProductQuantity,
|
|
9148
|
-
decreaseProductQuantity
|
|
9149
|
-
|
|
9689
|
+
decreaseProductQuantity,
|
|
9690
|
+
currency
|
|
9691
|
+
})]
|
|
9150
9692
|
})
|
|
9151
9693
|
})
|
|
9152
9694
|
})
|