@wix/form-public 0.23.0 → 0.25.0
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 +900 -904
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +544 -579
- package/dist/index.css.map +1 -1
- package/dist/index.js +801 -805
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React31 = require('react');
|
|
4
4
|
var ReactDOM = require('react-dom');
|
|
5
5
|
var camelCase = require('lodash.camelcase');
|
|
6
6
|
var mapKeys = require('lodash.mapkeys');
|
|
@@ -26,7 +26,7 @@ function _interopNamespace(e) {
|
|
|
26
26
|
return Object.freeze(n);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var React31__namespace = /*#__PURE__*/_interopNamespace(React31);
|
|
30
30
|
var ReactDOM__default = /*#__PURE__*/_interopDefault(ReactDOM);
|
|
31
31
|
var camelCase__default = /*#__PURE__*/_interopDefault(camelCase);
|
|
32
32
|
var mapKeys__default = /*#__PURE__*/_interopDefault(mapKeys);
|
|
@@ -2030,15 +2030,15 @@ var init_typeof = __esm({
|
|
|
2030
2030
|
});
|
|
2031
2031
|
|
|
2032
2032
|
// ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
2033
|
-
function toPrimitive(
|
|
2034
|
-
if ("object" != _typeof(
|
|
2035
|
-
var
|
|
2036
|
-
if (void 0 !==
|
|
2037
|
-
var
|
|
2038
|
-
if ("object" != _typeof(
|
|
2033
|
+
function toPrimitive(t, r) {
|
|
2034
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
2035
|
+
var e = t[Symbol.toPrimitive];
|
|
2036
|
+
if (void 0 !== e) {
|
|
2037
|
+
var i = e.call(t, r);
|
|
2038
|
+
if ("object" != _typeof(i)) return i;
|
|
2039
2039
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2040
2040
|
}
|
|
2041
|
-
return (String )(
|
|
2041
|
+
return (String )(t);
|
|
2042
2042
|
}
|
|
2043
2043
|
var init_toPrimitive = __esm({
|
|
2044
2044
|
"../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js"() {
|
|
@@ -2047,9 +2047,9 @@ var init_toPrimitive = __esm({
|
|
|
2047
2047
|
});
|
|
2048
2048
|
|
|
2049
2049
|
// ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
2050
|
-
function toPropertyKey(
|
|
2051
|
-
var
|
|
2052
|
-
return "symbol" == _typeof(
|
|
2050
|
+
function toPropertyKey(t) {
|
|
2051
|
+
var i = toPrimitive(t, "string");
|
|
2052
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
2053
2053
|
}
|
|
2054
2054
|
var init_toPropertyKey = __esm({
|
|
2055
2055
|
"../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js"() {
|
|
@@ -2059,13 +2059,13 @@ var init_toPropertyKey = __esm({
|
|
|
2059
2059
|
});
|
|
2060
2060
|
|
|
2061
2061
|
// ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
2062
|
-
function _defineProperty(
|
|
2063
|
-
return (r = toPropertyKey(r)) in
|
|
2064
|
-
value:
|
|
2062
|
+
function _defineProperty(e, r, t) {
|
|
2063
|
+
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
2064
|
+
value: t,
|
|
2065
2065
|
enumerable: true,
|
|
2066
2066
|
configurable: true,
|
|
2067
2067
|
writable: true
|
|
2068
|
-
}) :
|
|
2068
|
+
}) : e[r] = t, e;
|
|
2069
2069
|
}
|
|
2070
2070
|
var init_defineProperty = __esm({
|
|
2071
2071
|
"../../node_modules/@babel/runtime/helpers/esm/defineProperty.js"() {
|
|
@@ -2074,16 +2074,16 @@ var init_defineProperty = __esm({
|
|
|
2074
2074
|
});
|
|
2075
2075
|
|
|
2076
2076
|
// ../../node_modules/@babel/runtime/helpers/esm/objectSpread.js
|
|
2077
|
-
function _objectSpread(
|
|
2077
|
+
function _objectSpread(e) {
|
|
2078
2078
|
for (var r = 1; r < arguments.length; r++) {
|
|
2079
|
-
var
|
|
2080
|
-
"function" == typeof Object.getOwnPropertySymbols && o.push.apply(o, Object.getOwnPropertySymbols(
|
|
2081
|
-
return Object.getOwnPropertyDescriptor(
|
|
2079
|
+
var t = null != arguments[r] ? Object(arguments[r]) : {}, o = Object.keys(t);
|
|
2080
|
+
"function" == typeof Object.getOwnPropertySymbols && o.push.apply(o, Object.getOwnPropertySymbols(t).filter(function(e2) {
|
|
2081
|
+
return Object.getOwnPropertyDescriptor(t, e2).enumerable;
|
|
2082
2082
|
})), o.forEach(function(r2) {
|
|
2083
|
-
_defineProperty(
|
|
2083
|
+
_defineProperty(e, r2, t[r2]);
|
|
2084
2084
|
});
|
|
2085
2085
|
}
|
|
2086
|
-
return
|
|
2086
|
+
return e;
|
|
2087
2087
|
}
|
|
2088
2088
|
var init_objectSpread = __esm({
|
|
2089
2089
|
"../../node_modules/@babel/runtime/helpers/esm/objectSpread.js"() {
|
|
@@ -2101,16 +2101,16 @@ var init_classCallCheck = __esm({
|
|
|
2101
2101
|
});
|
|
2102
2102
|
|
|
2103
2103
|
// ../../node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
2104
|
-
function _defineProperties(
|
|
2105
|
-
for (var
|
|
2106
|
-
var o = r[
|
|
2107
|
-
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(
|
|
2104
|
+
function _defineProperties(e, r) {
|
|
2105
|
+
for (var t = 0; t < r.length; t++) {
|
|
2106
|
+
var o = r[t];
|
|
2107
|
+
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, toPropertyKey(o.key), o);
|
|
2108
2108
|
}
|
|
2109
2109
|
}
|
|
2110
|
-
function _createClass(
|
|
2111
|
-
return r && _defineProperties(
|
|
2110
|
+
function _createClass(e, r, t) {
|
|
2111
|
+
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
2112
2112
|
writable: false
|
|
2113
|
-
}),
|
|
2113
|
+
}), e;
|
|
2114
2114
|
}
|
|
2115
2115
|
var init_createClass = __esm({
|
|
2116
2116
|
"../../node_modules/@babel/runtime/helpers/esm/createClass.js"() {
|
|
@@ -2119,9 +2119,9 @@ var init_createClass = __esm({
|
|
|
2119
2119
|
});
|
|
2120
2120
|
|
|
2121
2121
|
// ../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
|
|
2122
|
-
function _assertThisInitialized(
|
|
2123
|
-
if (void 0 ===
|
|
2124
|
-
return
|
|
2122
|
+
function _assertThisInitialized(e) {
|
|
2123
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2124
|
+
return e;
|
|
2125
2125
|
}
|
|
2126
2126
|
var init_assertThisInitialized = __esm({
|
|
2127
2127
|
"../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"() {
|
|
@@ -2129,10 +2129,10 @@ var init_assertThisInitialized = __esm({
|
|
|
2129
2129
|
});
|
|
2130
2130
|
|
|
2131
2131
|
// ../../node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
|
|
2132
|
-
function _possibleConstructorReturn(
|
|
2133
|
-
if (
|
|
2134
|
-
if (void 0 !==
|
|
2135
|
-
return _assertThisInitialized(
|
|
2132
|
+
function _possibleConstructorReturn(t, e) {
|
|
2133
|
+
if (e && ("object" == _typeof(e) || "function" == typeof e)) return e;
|
|
2134
|
+
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
2135
|
+
return _assertThisInitialized(t);
|
|
2136
2136
|
}
|
|
2137
2137
|
var init_possibleConstructorReturn = __esm({
|
|
2138
2138
|
"../../node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"() {
|
|
@@ -2142,10 +2142,10 @@ var init_possibleConstructorReturn = __esm({
|
|
|
2142
2142
|
});
|
|
2143
2143
|
|
|
2144
2144
|
// ../../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
|
|
2145
|
-
function _getPrototypeOf(
|
|
2146
|
-
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(
|
|
2147
|
-
return
|
|
2148
|
-
}, _getPrototypeOf(
|
|
2145
|
+
function _getPrototypeOf(t) {
|
|
2146
|
+
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t2) {
|
|
2147
|
+
return t2.__proto__ || Object.getPrototypeOf(t2);
|
|
2148
|
+
}, _getPrototypeOf(t);
|
|
2149
2149
|
}
|
|
2150
2150
|
var init_getPrototypeOf = __esm({
|
|
2151
2151
|
"../../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"() {
|
|
@@ -2153,10 +2153,10 @@ var init_getPrototypeOf = __esm({
|
|
|
2153
2153
|
});
|
|
2154
2154
|
|
|
2155
2155
|
// ../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
2156
|
-
function _setPrototypeOf(
|
|
2157
|
-
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(
|
|
2158
|
-
return
|
|
2159
|
-
}, _setPrototypeOf(
|
|
2156
|
+
function _setPrototypeOf(t, e) {
|
|
2157
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) {
|
|
2158
|
+
return t2.__proto__ = e2, t2;
|
|
2159
|
+
}, _setPrototypeOf(t, e);
|
|
2160
2160
|
}
|
|
2161
2161
|
var init_setPrototypeOf = __esm({
|
|
2162
2162
|
"../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js"() {
|
|
@@ -2164,17 +2164,17 @@ var init_setPrototypeOf = __esm({
|
|
|
2164
2164
|
});
|
|
2165
2165
|
|
|
2166
2166
|
// ../../node_modules/@babel/runtime/helpers/esm/inherits.js
|
|
2167
|
-
function _inherits(
|
|
2168
|
-
if ("function" != typeof
|
|
2169
|
-
|
|
2167
|
+
function _inherits(t, e) {
|
|
2168
|
+
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
|
|
2169
|
+
t.prototype = Object.create(e && e.prototype, {
|
|
2170
2170
|
constructor: {
|
|
2171
|
-
value:
|
|
2171
|
+
value: t,
|
|
2172
2172
|
writable: true,
|
|
2173
2173
|
configurable: true
|
|
2174
2174
|
}
|
|
2175
|
-
}), Object.defineProperty(
|
|
2175
|
+
}), Object.defineProperty(t, "prototype", {
|
|
2176
2176
|
writable: false
|
|
2177
|
-
}),
|
|
2177
|
+
}), e && _setPrototypeOf(t, e);
|
|
2178
2178
|
}
|
|
2179
2179
|
var init_inherits = __esm({
|
|
2180
2180
|
"../../node_modules/@babel/runtime/helpers/esm/inherits.js"() {
|
|
@@ -2198,9 +2198,9 @@ function makeString(object) {
|
|
|
2198
2198
|
if (object == null) return "";
|
|
2199
2199
|
return "" + object;
|
|
2200
2200
|
}
|
|
2201
|
-
function copy(a, s,
|
|
2201
|
+
function copy(a, s, t) {
|
|
2202
2202
|
a.forEach(function(m) {
|
|
2203
|
-
if (s[m])
|
|
2203
|
+
if (s[m]) t[m] = s[m];
|
|
2204
2204
|
});
|
|
2205
2205
|
}
|
|
2206
2206
|
function getLastOfPath(object, path, Empty) {
|
|
@@ -2827,8 +2827,8 @@ var init_i18next = __esm({
|
|
|
2827
2827
|
var lngs = [];
|
|
2828
2828
|
var fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, options.lng || this.language);
|
|
2829
2829
|
if (this.options.saveMissingTo === "fallback" && fallbackLngs && fallbackLngs[0]) {
|
|
2830
|
-
for (var
|
|
2831
|
-
lngs.push(fallbackLngs[
|
|
2830
|
+
for (var i = 0; i < fallbackLngs.length; i++) {
|
|
2831
|
+
lngs.push(fallbackLngs[i]);
|
|
2832
2832
|
}
|
|
2833
2833
|
} else if (this.options.saveMissingTo === "all") {
|
|
2834
2834
|
lngs = this.languageUtils.toResolveHierarchy(options.lng || this.language);
|
|
@@ -3499,8 +3499,8 @@ var init_i18next = __esm({
|
|
|
3499
3499
|
try {
|
|
3500
3500
|
clonedOptions = JSON.parse(optionsString);
|
|
3501
3501
|
if (inheritedOptions) clonedOptions = _objectSpread({}, inheritedOptions, clonedOptions);
|
|
3502
|
-
} catch (
|
|
3503
|
-
this.logger.warn("failed parsing options string in nesting for key ".concat(key),
|
|
3502
|
+
} catch (e) {
|
|
3503
|
+
this.logger.warn("failed parsing options string in nesting for key ".concat(key), e);
|
|
3504
3504
|
return "".concat(key).concat(sep).concat(optionsString);
|
|
3505
3505
|
}
|
|
3506
3506
|
delete clonedOptions.defaultValue;
|
|
@@ -3848,13 +3848,13 @@ var init_i18next = __esm({
|
|
|
3848
3848
|
});
|
|
3849
3849
|
var deferred = defer();
|
|
3850
3850
|
var load = function load2() {
|
|
3851
|
-
var finish = function finish2(err,
|
|
3851
|
+
var finish = function finish2(err, t) {
|
|
3852
3852
|
if (_this2.isInitialized) _this2.logger.warn("init: i18next is already initialized. You should call init just once!");
|
|
3853
3853
|
_this2.isInitialized = true;
|
|
3854
3854
|
if (!_this2.options.isClone) _this2.logger.log("initialized", _this2.options);
|
|
3855
3855
|
_this2.emit("initialized", _this2.options);
|
|
3856
|
-
deferred.resolve(
|
|
3857
|
-
callback(err,
|
|
3856
|
+
deferred.resolve(t);
|
|
3857
|
+
callback(err, t);
|
|
3858
3858
|
};
|
|
3859
3859
|
if (_this2.languages && _this2.options.compatibilityAPI !== "v1" && !_this2.isInitialized) return finish(null, _this2.t.bind(_this2));
|
|
3860
3860
|
_this2.changeLanguage(_this2.options.lng, finish);
|
|
@@ -4017,7 +4017,7 @@ var init_i18next = __esm({
|
|
|
4017
4017
|
}
|
|
4018
4018
|
}, {
|
|
4019
4019
|
key: "t",
|
|
4020
|
-
value: function
|
|
4020
|
+
value: function t() {
|
|
4021
4021
|
var _this$translator;
|
|
4022
4022
|
return this.translator && (_this$translator = this.translator).translate.apply(_this$translator, arguments);
|
|
4023
4023
|
}
|
|
@@ -4175,15 +4175,15 @@ var require_typeof = __commonJS({
|
|
|
4175
4175
|
var require_toPrimitive = __commonJS({
|
|
4176
4176
|
"../../node_modules/@babel/runtime/helpers/toPrimitive.js"(exports, module) {
|
|
4177
4177
|
var _typeof8 = require_typeof()["default"];
|
|
4178
|
-
function toPrimitive2(
|
|
4179
|
-
if ("object" != _typeof8(
|
|
4180
|
-
var
|
|
4181
|
-
if (void 0 !==
|
|
4182
|
-
var
|
|
4183
|
-
if ("object" != _typeof8(
|
|
4178
|
+
function toPrimitive2(t, r) {
|
|
4179
|
+
if ("object" != _typeof8(t) || !t) return t;
|
|
4180
|
+
var e = t[Symbol.toPrimitive];
|
|
4181
|
+
if (void 0 !== e) {
|
|
4182
|
+
var i = e.call(t, r || "default");
|
|
4183
|
+
if ("object" != _typeof8(i)) return i;
|
|
4184
4184
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
4185
4185
|
}
|
|
4186
|
-
return ("string" === r ? String : Number)(
|
|
4186
|
+
return ("string" === r ? String : Number)(t);
|
|
4187
4187
|
}
|
|
4188
4188
|
module.exports = toPrimitive2, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4189
4189
|
}
|
|
@@ -4194,9 +4194,9 @@ var require_toPropertyKey = __commonJS({
|
|
|
4194
4194
|
"../../node_modules/@babel/runtime/helpers/toPropertyKey.js"(exports, module) {
|
|
4195
4195
|
var _typeof8 = require_typeof()["default"];
|
|
4196
4196
|
var toPrimitive2 = require_toPrimitive();
|
|
4197
|
-
function toPropertyKey2(
|
|
4198
|
-
var
|
|
4199
|
-
return "symbol" == _typeof8(
|
|
4197
|
+
function toPropertyKey2(t) {
|
|
4198
|
+
var i = toPrimitive2(t, "string");
|
|
4199
|
+
return "symbol" == _typeof8(i) ? i : i + "";
|
|
4200
4200
|
}
|
|
4201
4201
|
module.exports = toPropertyKey2, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4202
4202
|
}
|
|
@@ -4206,13 +4206,13 @@ var require_toPropertyKey = __commonJS({
|
|
|
4206
4206
|
var require_defineProperty = __commonJS({
|
|
4207
4207
|
"../../node_modules/@babel/runtime/helpers/defineProperty.js"(exports, module) {
|
|
4208
4208
|
var toPropertyKey2 = require_toPropertyKey();
|
|
4209
|
-
function _defineProperty7(
|
|
4210
|
-
return (r = toPropertyKey2(r)) in
|
|
4211
|
-
value:
|
|
4209
|
+
function _defineProperty7(e, r, t) {
|
|
4210
|
+
return (r = toPropertyKey2(r)) in e ? Object.defineProperty(e, r, {
|
|
4211
|
+
value: t,
|
|
4212
4212
|
enumerable: true,
|
|
4213
4213
|
configurable: true,
|
|
4214
4214
|
writable: true
|
|
4215
|
-
}) :
|
|
4215
|
+
}) : e[r] = t, e;
|
|
4216
4216
|
}
|
|
4217
4217
|
module.exports = _defineProperty7, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4218
4218
|
}
|
|
@@ -4233,8 +4233,8 @@ var require_classnames = __commonJS({
|
|
|
4233
4233
|
var hasOwn2 = {}.hasOwnProperty;
|
|
4234
4234
|
function classNames6() {
|
|
4235
4235
|
var classes = "";
|
|
4236
|
-
for (var
|
|
4237
|
-
var arg = arguments[
|
|
4236
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
4237
|
+
var arg = arguments[i];
|
|
4238
4238
|
if (arg) {
|
|
4239
4239
|
classes = appendClass(classes, parseValue(arg));
|
|
4240
4240
|
}
|
|
@@ -4287,7 +4287,7 @@ var require_classnames = __commonJS({
|
|
|
4287
4287
|
var RicosViewerContext;
|
|
4288
4288
|
var init_ViewerContext = __esm({
|
|
4289
4289
|
"../../node_modules/@wix/ricos/dist/es/ricos-context/viewer/ViewerContext.js"() {
|
|
4290
|
-
RicosViewerContext =
|
|
4290
|
+
RicosViewerContext = React31__namespace.default.createContext(null);
|
|
4291
4291
|
}
|
|
4292
4292
|
});
|
|
4293
4293
|
|
|
@@ -4304,7 +4304,7 @@ var require_react_is_production_min = __commonJS({
|
|
|
4304
4304
|
var b = "function" === typeof Symbol && Symbol.for;
|
|
4305
4305
|
var c = b ? Symbol.for("react.element") : 60103;
|
|
4306
4306
|
var d = b ? Symbol.for("react.portal") : 60106;
|
|
4307
|
-
var
|
|
4307
|
+
var e = b ? Symbol.for("react.fragment") : 60107;
|
|
4308
4308
|
var f = b ? Symbol.for("react.strict_mode") : 60108;
|
|
4309
4309
|
var g = b ? Symbol.for("react.profiler") : 60114;
|
|
4310
4310
|
var h = b ? Symbol.for("react.provider") : 60109;
|
|
@@ -4315,7 +4315,7 @@ var require_react_is_production_min = __commonJS({
|
|
|
4315
4315
|
var p = b ? Symbol.for("react.suspense") : 60113;
|
|
4316
4316
|
var q = b ? Symbol.for("react.suspense_list") : 60120;
|
|
4317
4317
|
var r = b ? Symbol.for("react.memo") : 60115;
|
|
4318
|
-
var
|
|
4318
|
+
var t = b ? Symbol.for("react.lazy") : 60116;
|
|
4319
4319
|
var v = b ? Symbol.for("react.block") : 60121;
|
|
4320
4320
|
var w = b ? Symbol.for("react.fundamental") : 60117;
|
|
4321
4321
|
var x = b ? Symbol.for("react.responder") : 60118;
|
|
@@ -4328,7 +4328,7 @@ var require_react_is_production_min = __commonJS({
|
|
|
4328
4328
|
switch (a = a.type, a) {
|
|
4329
4329
|
case l:
|
|
4330
4330
|
case m:
|
|
4331
|
-
case
|
|
4331
|
+
case e:
|
|
4332
4332
|
case g:
|
|
4333
4333
|
case f:
|
|
4334
4334
|
case p:
|
|
@@ -4337,7 +4337,7 @@ var require_react_is_production_min = __commonJS({
|
|
|
4337
4337
|
switch (a = a && a.$$typeof, a) {
|
|
4338
4338
|
case k:
|
|
4339
4339
|
case n:
|
|
4340
|
-
case
|
|
4340
|
+
case t:
|
|
4341
4341
|
case r:
|
|
4342
4342
|
case h:
|
|
4343
4343
|
return a;
|
|
@@ -4359,8 +4359,8 @@ var require_react_is_production_min = __commonJS({
|
|
|
4359
4359
|
exports.ContextProvider = h;
|
|
4360
4360
|
exports.Element = c;
|
|
4361
4361
|
exports.ForwardRef = n;
|
|
4362
|
-
exports.Fragment =
|
|
4363
|
-
exports.Lazy =
|
|
4362
|
+
exports.Fragment = e;
|
|
4363
|
+
exports.Lazy = t;
|
|
4364
4364
|
exports.Memo = r;
|
|
4365
4365
|
exports.Portal = d;
|
|
4366
4366
|
exports.Profiler = g;
|
|
@@ -4383,10 +4383,10 @@ var require_react_is_production_min = __commonJS({
|
|
|
4383
4383
|
return z(a) === n;
|
|
4384
4384
|
};
|
|
4385
4385
|
exports.isFragment = function(a) {
|
|
4386
|
-
return z(a) ===
|
|
4386
|
+
return z(a) === e;
|
|
4387
4387
|
};
|
|
4388
4388
|
exports.isLazy = function(a) {
|
|
4389
|
-
return z(a) ===
|
|
4389
|
+
return z(a) === t;
|
|
4390
4390
|
};
|
|
4391
4391
|
exports.isMemo = function(a) {
|
|
4392
4392
|
return z(a) === r;
|
|
@@ -4404,7 +4404,7 @@ var require_react_is_production_min = __commonJS({
|
|
|
4404
4404
|
return z(a) === p;
|
|
4405
4405
|
};
|
|
4406
4406
|
exports.isValidElementType = function(a) {
|
|
4407
|
-
return "string" === typeof a || "function" === typeof a || a ===
|
|
4407
|
+
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);
|
|
4408
4408
|
};
|
|
4409
4409
|
exports.typeOf = z;
|
|
4410
4410
|
}
|
|
@@ -4597,8 +4597,8 @@ var require_object_assign = __commonJS({
|
|
|
4597
4597
|
return false;
|
|
4598
4598
|
}
|
|
4599
4599
|
var test2 = {};
|
|
4600
|
-
for (var
|
|
4601
|
-
test2["_" + String.fromCharCode(
|
|
4600
|
+
for (var i = 0; i < 10; i++) {
|
|
4601
|
+
test2["_" + String.fromCharCode(i)] = i;
|
|
4602
4602
|
}
|
|
4603
4603
|
var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
|
|
4604
4604
|
return test2[n];
|
|
@@ -4631,9 +4631,9 @@ var require_object_assign = __commonJS({
|
|
|
4631
4631
|
}
|
|
4632
4632
|
if (getOwnPropertySymbols2) {
|
|
4633
4633
|
symbols = getOwnPropertySymbols2(from);
|
|
4634
|
-
for (var
|
|
4635
|
-
if (propIsEnumerable.call(from, symbols[
|
|
4636
|
-
to[symbols[
|
|
4634
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
4635
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
4636
|
+
to[symbols[i]] = from[symbols[i]];
|
|
4637
4637
|
}
|
|
4638
4638
|
}
|
|
4639
4639
|
}
|
|
@@ -4863,8 +4863,8 @@ var require_factoryWithTypeCheckers = __commonJS({
|
|
|
4863
4863
|
var propType = getPropType(propValue);
|
|
4864
4864
|
return new PropTypeError("Invalid " + location2 + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
|
|
4865
4865
|
}
|
|
4866
|
-
for (var
|
|
4867
|
-
var error2 = typeChecker(propValue,
|
|
4866
|
+
for (var i = 0; i < propValue.length; i++) {
|
|
4867
|
+
var error2 = typeChecker(propValue, i, componentName, location2, propFullName + "[" + i + "]", ReactPropTypesSecret);
|
|
4868
4868
|
if (error2 instanceof Error) {
|
|
4869
4869
|
return error2;
|
|
4870
4870
|
}
|
|
@@ -4921,8 +4921,8 @@ var require_factoryWithTypeCheckers = __commonJS({
|
|
|
4921
4921
|
}
|
|
4922
4922
|
function validate2(props, propName, componentName, location2, propFullName) {
|
|
4923
4923
|
var propValue = props[propName];
|
|
4924
|
-
for (var
|
|
4925
|
-
if (is(propValue, expectedValues[
|
|
4924
|
+
for (var i = 0; i < expectedValues.length; i++) {
|
|
4925
|
+
if (is(propValue, expectedValues[i])) {
|
|
4926
4926
|
return null;
|
|
4927
4927
|
}
|
|
4928
4928
|
}
|
|
@@ -4964,19 +4964,19 @@ var require_factoryWithTypeCheckers = __commonJS({
|
|
|
4964
4964
|
process.env.NODE_ENV !== "production" ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
|
|
4965
4965
|
return emptyFunctionThatReturnsNull;
|
|
4966
4966
|
}
|
|
4967
|
-
for (var
|
|
4968
|
-
var checker = arrayOfTypeCheckers[
|
|
4967
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
4968
|
+
var checker = arrayOfTypeCheckers[i];
|
|
4969
4969
|
if (typeof checker !== "function") {
|
|
4970
4970
|
printWarning(
|
|
4971
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " +
|
|
4971
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."
|
|
4972
4972
|
);
|
|
4973
4973
|
return emptyFunctionThatReturnsNull;
|
|
4974
4974
|
}
|
|
4975
4975
|
}
|
|
4976
4976
|
function validate2(props, propName, componentName, location2, propFullName) {
|
|
4977
4977
|
var expectedTypes = [];
|
|
4978
|
-
for (var
|
|
4979
|
-
var checker2 = arrayOfTypeCheckers[
|
|
4978
|
+
for (var i2 = 0; i2 < arrayOfTypeCheckers.length; i2++) {
|
|
4979
|
+
var checker2 = arrayOfTypeCheckers[i2];
|
|
4980
4980
|
var checkerResult = checker2(props, propName, componentName, location2, propFullName, ReactPropTypesSecret);
|
|
4981
4981
|
if (checkerResult == null) {
|
|
4982
4982
|
return null;
|
|
@@ -5238,9 +5238,9 @@ var require_extends = __commonJS({
|
|
|
5238
5238
|
"../../node_modules/@babel/runtime/helpers/extends.js"(exports, module) {
|
|
5239
5239
|
function _extends6() {
|
|
5240
5240
|
return module.exports = _extends6 = Object.assign ? Object.assign.bind() : function(n) {
|
|
5241
|
-
for (var
|
|
5242
|
-
var
|
|
5243
|
-
for (var r in
|
|
5241
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
5242
|
+
var t = arguments[e];
|
|
5243
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
5244
5244
|
}
|
|
5245
5245
|
return n;
|
|
5246
5246
|
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends6.apply(null, arguments);
|
|
@@ -5250,14 +5250,14 @@ var require_extends = __commonJS({
|
|
|
5250
5250
|
});
|
|
5251
5251
|
|
|
5252
5252
|
// ../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
|
5253
|
-
function _objectWithoutPropertiesLoose(r,
|
|
5253
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
5254
5254
|
if (null == r) return {};
|
|
5255
|
-
var
|
|
5255
|
+
var t = {};
|
|
5256
5256
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
5257
|
-
if (-1 !==
|
|
5258
|
-
|
|
5257
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
5258
|
+
t[n] = r[n];
|
|
5259
5259
|
}
|
|
5260
|
-
return
|
|
5260
|
+
return t;
|
|
5261
5261
|
}
|
|
5262
5262
|
var init_objectWithoutPropertiesLoose = __esm({
|
|
5263
5263
|
"../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js"() {
|
|
@@ -5265,8 +5265,8 @@ var init_objectWithoutPropertiesLoose = __esm({
|
|
|
5265
5265
|
});
|
|
5266
5266
|
|
|
5267
5267
|
// ../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
|
|
5268
|
-
function _inheritsLoose(
|
|
5269
|
-
|
|
5268
|
+
function _inheritsLoose(t, o) {
|
|
5269
|
+
t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
|
|
5270
5270
|
}
|
|
5271
5271
|
var init_inheritsLoose = __esm({
|
|
5272
5272
|
"../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js"() {
|
|
@@ -5311,7 +5311,7 @@ var init_PropTypes = __esm({
|
|
|
5311
5311
|
var TransitionGroupContext_default;
|
|
5312
5312
|
var init_TransitionGroupContext = __esm({
|
|
5313
5313
|
"../../node_modules/react-transition-group/esm/TransitionGroupContext.js"() {
|
|
5314
|
-
TransitionGroupContext_default =
|
|
5314
|
+
TransitionGroupContext_default = React31__namespace.default.createContext(null);
|
|
5315
5315
|
}
|
|
5316
5316
|
});
|
|
5317
5317
|
|
|
@@ -5543,13 +5543,13 @@ var init_Transition = __esm({
|
|
|
5543
5543
|
var _this$props = this.props, children = _this$props.children; _this$props.in; _this$props.mountOnEnter; _this$props.unmountOnExit; _this$props.appear; _this$props.enter; _this$props.exit; _this$props.timeout; _this$props.addEndListener; _this$props.onEnter; _this$props.onEntering; _this$props.onEntered; _this$props.onExit; _this$props.onExiting; _this$props.onExited; _this$props.nodeRef; var childProps = _objectWithoutPropertiesLoose(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
|
|
5544
5544
|
return (
|
|
5545
5545
|
// allows for nested Transitions
|
|
5546
|
-
/* @__PURE__ */
|
|
5546
|
+
/* @__PURE__ */ React31__namespace.default.createElement(TransitionGroupContext_default.Provider, {
|
|
5547
5547
|
value: null
|
|
5548
|
-
}, typeof children === "function" ? children(status, childProps) :
|
|
5548
|
+
}, typeof children === "function" ? children(status, childProps) : React31__namespace.default.cloneElement(React31__namespace.default.Children.only(children), childProps))
|
|
5549
5549
|
);
|
|
5550
5550
|
};
|
|
5551
5551
|
return Transition2;
|
|
5552
|
-
})(
|
|
5552
|
+
})(React31__namespace.default.Component);
|
|
5553
5553
|
Transition.contextType = TransitionGroupContext_default;
|
|
5554
5554
|
Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
5555
5555
|
/**
|
|
@@ -6726,10 +6726,10 @@ var require_code = __commonJS({
|
|
|
6726
6726
|
exports.nil = new _Code("");
|
|
6727
6727
|
function _23(strs, ...args) {
|
|
6728
6728
|
const code = [strs[0]];
|
|
6729
|
-
let
|
|
6730
|
-
while (
|
|
6731
|
-
addCodeArg(code, args[
|
|
6732
|
-
code.push(strs[++
|
|
6729
|
+
let i = 0;
|
|
6730
|
+
while (i < args.length) {
|
|
6731
|
+
addCodeArg(code, args[i]);
|
|
6732
|
+
code.push(strs[++i]);
|
|
6733
6733
|
}
|
|
6734
6734
|
return new _Code(code);
|
|
6735
6735
|
}
|
|
@@ -6737,11 +6737,11 @@ var require_code = __commonJS({
|
|
|
6737
6737
|
var plus = new _Code("+");
|
|
6738
6738
|
function str(strs, ...args) {
|
|
6739
6739
|
const expr = [safeStringify(strs[0])];
|
|
6740
|
-
let
|
|
6741
|
-
while (
|
|
6740
|
+
let i = 0;
|
|
6741
|
+
while (i < args.length) {
|
|
6742
6742
|
expr.push(plus);
|
|
6743
|
-
addCodeArg(expr, args[
|
|
6744
|
-
expr.push(plus, safeStringify(strs[++
|
|
6743
|
+
addCodeArg(expr, args[i]);
|
|
6744
|
+
expr.push(plus, safeStringify(strs[++i]));
|
|
6745
6745
|
}
|
|
6746
6746
|
optimize(expr);
|
|
6747
6747
|
return new _Code(expr);
|
|
@@ -6757,17 +6757,17 @@ var require_code = __commonJS({
|
|
|
6757
6757
|
}
|
|
6758
6758
|
exports.addCodeArg = addCodeArg;
|
|
6759
6759
|
function optimize(expr) {
|
|
6760
|
-
let
|
|
6761
|
-
while (
|
|
6762
|
-
if (expr[
|
|
6763
|
-
const res = mergeExprItems(expr[
|
|
6760
|
+
let i = 1;
|
|
6761
|
+
while (i < expr.length - 1) {
|
|
6762
|
+
if (expr[i] === plus) {
|
|
6763
|
+
const res = mergeExprItems(expr[i - 1], expr[i + 1]);
|
|
6764
6764
|
if (res !== void 0) {
|
|
6765
|
-
expr.splice(
|
|
6765
|
+
expr.splice(i - 1, 3, res);
|
|
6766
6766
|
continue;
|
|
6767
6767
|
}
|
|
6768
|
-
expr[
|
|
6768
|
+
expr[i++] = "+";
|
|
6769
6769
|
}
|
|
6770
|
-
|
|
6770
|
+
i++;
|
|
6771
6771
|
}
|
|
6772
6772
|
}
|
|
6773
6773
|
function mergeExprItems(a, b) {
|
|
@@ -7145,27 +7145,27 @@ var require_codegen = __commonJS({
|
|
|
7145
7145
|
}
|
|
7146
7146
|
optimizeNodes() {
|
|
7147
7147
|
const { nodes } = this;
|
|
7148
|
-
let
|
|
7149
|
-
while (
|
|
7150
|
-
const n = nodes[
|
|
7148
|
+
let i = nodes.length;
|
|
7149
|
+
while (i--) {
|
|
7150
|
+
const n = nodes[i].optimizeNodes();
|
|
7151
7151
|
if (Array.isArray(n))
|
|
7152
|
-
nodes.splice(
|
|
7152
|
+
nodes.splice(i, 1, ...n);
|
|
7153
7153
|
else if (n)
|
|
7154
|
-
nodes[
|
|
7154
|
+
nodes[i] = n;
|
|
7155
7155
|
else
|
|
7156
|
-
nodes.splice(
|
|
7156
|
+
nodes.splice(i, 1);
|
|
7157
7157
|
}
|
|
7158
7158
|
return nodes.length > 0 ? this : void 0;
|
|
7159
7159
|
}
|
|
7160
7160
|
optimizeNames(names, constants) {
|
|
7161
7161
|
const { nodes } = this;
|
|
7162
|
-
let
|
|
7163
|
-
while (
|
|
7164
|
-
const n = nodes[
|
|
7162
|
+
let i = nodes.length;
|
|
7163
|
+
while (i--) {
|
|
7164
|
+
const n = nodes[i];
|
|
7165
7165
|
if (n.optimizeNames(names, constants))
|
|
7166
7166
|
continue;
|
|
7167
7167
|
subtractNames(names, n.names);
|
|
7168
|
-
nodes.splice(
|
|
7168
|
+
nodes.splice(i, 1);
|
|
7169
7169
|
}
|
|
7170
7170
|
return nodes.length > 0 ? this : void 0;
|
|
7171
7171
|
}
|
|
@@ -7199,17 +7199,17 @@ var require_codegen = __commonJS({
|
|
|
7199
7199
|
const cond = this.condition;
|
|
7200
7200
|
if (cond === true)
|
|
7201
7201
|
return this.nodes;
|
|
7202
|
-
let
|
|
7203
|
-
if (
|
|
7204
|
-
const ns =
|
|
7205
|
-
|
|
7202
|
+
let e = this.else;
|
|
7203
|
+
if (e) {
|
|
7204
|
+
const ns = e.optimizeNodes();
|
|
7205
|
+
e = this.else = Array.isArray(ns) ? new Else(ns) : ns;
|
|
7206
7206
|
}
|
|
7207
|
-
if (
|
|
7207
|
+
if (e) {
|
|
7208
7208
|
if (cond === false)
|
|
7209
|
-
return
|
|
7209
|
+
return e instanceof _If ? e : e.nodes;
|
|
7210
7210
|
if (this.nodes.length)
|
|
7211
7211
|
return this;
|
|
7212
|
-
return new _If(not(cond),
|
|
7212
|
+
return new _If(not(cond), e instanceof _If ? [e] : e.nodes);
|
|
7213
7213
|
}
|
|
7214
7214
|
if (cond === false || !this.nodes.length)
|
|
7215
7215
|
return void 0;
|
|
@@ -7492,8 +7492,8 @@ var require_codegen = __commonJS({
|
|
|
7492
7492
|
const name = this._scope.toName(nameOrPrefix);
|
|
7493
7493
|
if (this.opts.es5) {
|
|
7494
7494
|
const arr2 = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable);
|
|
7495
|
-
return this.forRange("_i", 0, (0, code_1._)`${arr2}.length`, (
|
|
7496
|
-
this.var(name, (0, code_1._)`${arr2}[${
|
|
7495
|
+
return this.forRange("_i", 0, (0, code_1._)`${arr2}.length`, (i) => {
|
|
7496
|
+
this.var(name, (0, code_1._)`${arr2}[${i}]`);
|
|
7497
7497
|
forBody(name);
|
|
7498
7498
|
});
|
|
7499
7499
|
}
|
|
@@ -7653,8 +7653,8 @@ var require_codegen = __commonJS({
|
|
|
7653
7653
|
delete names[n.str];
|
|
7654
7654
|
return c;
|
|
7655
7655
|
}
|
|
7656
|
-
function canOptimize(
|
|
7657
|
-
return
|
|
7656
|
+
function canOptimize(e) {
|
|
7657
|
+
return e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== void 0);
|
|
7658
7658
|
}
|
|
7659
7659
|
}
|
|
7660
7660
|
function subtractNames(names, from) {
|
|
@@ -7932,8 +7932,8 @@ var require_errors = __commonJS({
|
|
|
7932
7932
|
if (errsCount === void 0)
|
|
7933
7933
|
throw new Error("ajv implementation error");
|
|
7934
7934
|
const err = gen.name("err");
|
|
7935
|
-
gen.forRange("i", errsCount, names_1.default.errors, (
|
|
7936
|
-
gen.const(err, (0, codegen_1._)`${names_1.default.vErrors}[${
|
|
7935
|
+
gen.forRange("i", errsCount, names_1.default.errors, (i) => {
|
|
7936
|
+
gen.const(err, (0, codegen_1._)`${names_1.default.vErrors}[${i}]`);
|
|
7937
7937
|
gen.if((0, codegen_1._)`${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._)`${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath)));
|
|
7938
7938
|
gen.assign((0, codegen_1._)`${err}.schemaPath`, (0, codegen_1.str)`${it.errSchemaPath}/${keyword}`);
|
|
7939
7939
|
if (it.opts.verbose) {
|
|
@@ -8167,7 +8167,7 @@ var require_dataType = __commonJS({
|
|
|
8167
8167
|
exports.coerceAndCheckDataType = coerceAndCheckDataType;
|
|
8168
8168
|
var COERCIBLE = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]);
|
|
8169
8169
|
function coerceToTypes(types, coerceTypes) {
|
|
8170
|
-
return coerceTypes ? types.filter((
|
|
8170
|
+
return coerceTypes ? types.filter((t) => COERCIBLE.has(t) || coerceTypes === "array" && t === "array") : [];
|
|
8171
8171
|
}
|
|
8172
8172
|
function coerceData(it, types, coerceTo) {
|
|
8173
8173
|
const { gen, data, opts } = it;
|
|
@@ -8177,9 +8177,9 @@ var require_dataType = __commonJS({
|
|
|
8177
8177
|
gen.if((0, codegen_1._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0, codegen_1._)`${data}[0]`).assign(dataType, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data)));
|
|
8178
8178
|
}
|
|
8179
8179
|
gen.if((0, codegen_1._)`${coerced} !== undefined`);
|
|
8180
|
-
for (const
|
|
8181
|
-
if (COERCIBLE.has(
|
|
8182
|
-
coerceSpecificType(
|
|
8180
|
+
for (const t of coerceTo) {
|
|
8181
|
+
if (COERCIBLE.has(t) || t === "array" && opts.coerceTypes === "array") {
|
|
8182
|
+
coerceSpecificType(t);
|
|
8183
8183
|
}
|
|
8184
8184
|
}
|
|
8185
8185
|
gen.else();
|
|
@@ -8189,8 +8189,8 @@ var require_dataType = __commonJS({
|
|
|
8189
8189
|
gen.assign(data, coerced);
|
|
8190
8190
|
assignParentData(it, coerced);
|
|
8191
8191
|
});
|
|
8192
|
-
function coerceSpecificType(
|
|
8193
|
-
switch (
|
|
8192
|
+
function coerceSpecificType(t) {
|
|
8193
|
+
switch (t) {
|
|
8194
8194
|
case "string":
|
|
8195
8195
|
gen.elseIf((0, codegen_1._)`${dataType} == "number" || ${dataType} == "boolean"`).assign(coerced, (0, codegen_1._)`"" + ${data}`).elseIf((0, codegen_1._)`${data} === null`).assign(coerced, (0, codegen_1._)`""`);
|
|
8196
8196
|
return;
|
|
@@ -8262,8 +8262,8 @@ var require_dataType = __commonJS({
|
|
|
8262
8262
|
}
|
|
8263
8263
|
if (types.number)
|
|
8264
8264
|
delete types.integer;
|
|
8265
|
-
for (const
|
|
8266
|
-
cond = (0, codegen_1.and)(cond, checkDataType(
|
|
8265
|
+
for (const t in types)
|
|
8266
|
+
cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct));
|
|
8267
8267
|
return cond;
|
|
8268
8268
|
}
|
|
8269
8269
|
exports.checkDataTypes = checkDataTypes;
|
|
@@ -8308,7 +8308,7 @@ var require_defaults = __commonJS({
|
|
|
8308
8308
|
assignDefault(it, key, properties[key].default);
|
|
8309
8309
|
}
|
|
8310
8310
|
} else if (ty === "array" && Array.isArray(items)) {
|
|
8311
|
-
items.forEach((sch,
|
|
8311
|
+
items.forEach((sch, i) => assignDefault(it, i, sch.default));
|
|
8312
8312
|
}
|
|
8313
8313
|
}
|
|
8314
8314
|
exports.assignDefaults = assignDefaults;
|
|
@@ -8425,10 +8425,10 @@ var require_code2 = __commonJS({
|
|
|
8425
8425
|
return valid;
|
|
8426
8426
|
function validateItems(notValid) {
|
|
8427
8427
|
const len = gen.const("len", (0, codegen_1._)`${data}.length`);
|
|
8428
|
-
gen.forRange("i", 0, len, (
|
|
8428
|
+
gen.forRange("i", 0, len, (i) => {
|
|
8429
8429
|
cxt.subschema({
|
|
8430
8430
|
keyword,
|
|
8431
|
-
dataProp:
|
|
8431
|
+
dataProp: i,
|
|
8432
8432
|
dataPropType: util_1.Type.Num
|
|
8433
8433
|
}, valid);
|
|
8434
8434
|
gen.if((0, codegen_1.not)(valid), notValid);
|
|
@@ -8445,10 +8445,10 @@ var require_code2 = __commonJS({
|
|
|
8445
8445
|
return;
|
|
8446
8446
|
const valid = gen.let("valid", false);
|
|
8447
8447
|
const schValid = gen.name("_valid");
|
|
8448
|
-
gen.block(() => schema.forEach((_sch,
|
|
8448
|
+
gen.block(() => schema.forEach((_sch, i) => {
|
|
8449
8449
|
const schCxt = cxt.subschema({
|
|
8450
8450
|
keyword,
|
|
8451
|
-
schemaProp:
|
|
8451
|
+
schemaProp: i,
|
|
8452
8452
|
compositeRule: true
|
|
8453
8453
|
}, schValid);
|
|
8454
8454
|
gen.assign(valid, (0, codegen_1._)`${valid} || ${schValid}`);
|
|
@@ -8512,7 +8512,7 @@ var require_keyword = __commonJS({
|
|
|
8512
8512
|
}
|
|
8513
8513
|
function validateAsync() {
|
|
8514
8514
|
const ruleErrs = gen.let("ruleErrs", null);
|
|
8515
|
-
gen.try(() => assignValid((0, codegen_1._)`await `), (
|
|
8515
|
+
gen.try(() => assignValid((0, codegen_1._)`await `), (e) => gen.assign(valid, false).if((0, codegen_1._)`${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._)`${e}.errors`), () => gen.throw(e)));
|
|
8516
8516
|
return ruleErrs;
|
|
8517
8517
|
}
|
|
8518
8518
|
function validateSync() {
|
|
@@ -8668,12 +8668,12 @@ var require_fast_deep_equal = __commonJS({
|
|
|
8668
8668
|
if (a === b) return true;
|
|
8669
8669
|
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
8670
8670
|
if (a.constructor !== b.constructor) return false;
|
|
8671
|
-
var length,
|
|
8671
|
+
var length, i, keys2;
|
|
8672
8672
|
if (Array.isArray(a)) {
|
|
8673
8673
|
length = a.length;
|
|
8674
8674
|
if (length != b.length) return false;
|
|
8675
|
-
for (
|
|
8676
|
-
if (!equal(a[
|
|
8675
|
+
for (i = length; i-- !== 0; )
|
|
8676
|
+
if (!equal(a[i], b[i])) return false;
|
|
8677
8677
|
return true;
|
|
8678
8678
|
}
|
|
8679
8679
|
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
@@ -8682,10 +8682,10 @@ var require_fast_deep_equal = __commonJS({
|
|
|
8682
8682
|
keys2 = Object.keys(a);
|
|
8683
8683
|
length = keys2.length;
|
|
8684
8684
|
if (length !== Object.keys(b).length) return false;
|
|
8685
|
-
for (
|
|
8686
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys2[
|
|
8687
|
-
for (
|
|
8688
|
-
var key = keys2[
|
|
8685
|
+
for (i = length; i-- !== 0; )
|
|
8686
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys2[i])) return false;
|
|
8687
|
+
for (i = length; i-- !== 0; ) {
|
|
8688
|
+
var key = keys2[i];
|
|
8689
8689
|
if (!equal(a[key], b[key])) return false;
|
|
8690
8690
|
}
|
|
8691
8691
|
return true;
|
|
@@ -8761,8 +8761,8 @@ var require_json_schema_traverse = __commonJS({
|
|
|
8761
8761
|
var sch = schema[key];
|
|
8762
8762
|
if (Array.isArray(sch)) {
|
|
8763
8763
|
if (key in traverse.arrayKeywords) {
|
|
8764
|
-
for (var
|
|
8765
|
-
_traverse(opts, pre, post, sch[
|
|
8764
|
+
for (var i = 0; i < sch.length; i++)
|
|
8765
|
+
_traverse(opts, pre, post, sch[i], jsonPtr + "/" + key + "/" + i, rootSchema, jsonPtr, key, schema, i);
|
|
8766
8766
|
}
|
|
8767
8767
|
} else if (key in traverse.propsKeywords) {
|
|
8768
8768
|
if (sch && typeof sch == "object") {
|
|
@@ -9170,9 +9170,9 @@ var require_validate = __commonJS({
|
|
|
9170
9170
|
it.dataTypes = types;
|
|
9171
9171
|
return;
|
|
9172
9172
|
}
|
|
9173
|
-
types.forEach((
|
|
9174
|
-
if (!includesType(it.dataTypes,
|
|
9175
|
-
strictTypesError(it, `type "${
|
|
9173
|
+
types.forEach((t) => {
|
|
9174
|
+
if (!includesType(it.dataTypes, t)) {
|
|
9175
|
+
strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`);
|
|
9176
9176
|
}
|
|
9177
9177
|
});
|
|
9178
9178
|
narrowSchemaTypes(it, types);
|
|
@@ -9188,7 +9188,7 @@ var require_validate = __commonJS({
|
|
|
9188
9188
|
const rule = rules[keyword];
|
|
9189
9189
|
if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it.schema, rule)) {
|
|
9190
9190
|
const { type } = rule.definition;
|
|
9191
|
-
if (type.length && !type.some((
|
|
9191
|
+
if (type.length && !type.some((t) => hasApplicableType(ts, t))) {
|
|
9192
9192
|
strictTypesError(it, `missing type "${type.join(",")}" for keyword "${keyword}"`);
|
|
9193
9193
|
}
|
|
9194
9194
|
}
|
|
@@ -9197,15 +9197,15 @@ var require_validate = __commonJS({
|
|
|
9197
9197
|
function hasApplicableType(schTs, kwdT) {
|
|
9198
9198
|
return schTs.includes(kwdT) || kwdT === "number" && schTs.includes("integer");
|
|
9199
9199
|
}
|
|
9200
|
-
function includesType(ts,
|
|
9201
|
-
return ts.includes(
|
|
9200
|
+
function includesType(ts, t) {
|
|
9201
|
+
return ts.includes(t) || t === "integer" && ts.includes("number");
|
|
9202
9202
|
}
|
|
9203
9203
|
function narrowSchemaTypes(it, withTypes) {
|
|
9204
9204
|
const ts = [];
|
|
9205
|
-
for (const
|
|
9206
|
-
if (includesType(withTypes,
|
|
9207
|
-
ts.push(
|
|
9208
|
-
else if (withTypes.includes("integer") &&
|
|
9205
|
+
for (const t of it.dataTypes) {
|
|
9206
|
+
if (includesType(withTypes, t))
|
|
9207
|
+
ts.push(t);
|
|
9208
|
+
else if (withTypes.includes("integer") && t === "number")
|
|
9209
9209
|
ts.push("integer");
|
|
9210
9210
|
}
|
|
9211
9211
|
it.dataTypes = ts;
|
|
@@ -9580,12 +9580,12 @@ var require_compile = __commonJS({
|
|
|
9580
9580
|
}
|
|
9581
9581
|
sch.validate = validate2;
|
|
9582
9582
|
return sch;
|
|
9583
|
-
} catch (
|
|
9583
|
+
} catch (e) {
|
|
9584
9584
|
delete sch.validate;
|
|
9585
9585
|
delete sch.validateName;
|
|
9586
9586
|
if (sourceCode)
|
|
9587
9587
|
this.logger.error("Error compiling schema, function code:", sourceCode);
|
|
9588
|
-
throw
|
|
9588
|
+
throw e;
|
|
9589
9589
|
} finally {
|
|
9590
9590
|
this._compilations.delete(sch);
|
|
9591
9591
|
}
|
|
@@ -9724,24 +9724,24 @@ var require_utils = __commonJS({
|
|
|
9724
9724
|
function stringArrayToHexStripped(input) {
|
|
9725
9725
|
let acc = "";
|
|
9726
9726
|
let code = 0;
|
|
9727
|
-
let
|
|
9728
|
-
for (
|
|
9729
|
-
code = input[
|
|
9727
|
+
let i = 0;
|
|
9728
|
+
for (i = 0; i < input.length; i++) {
|
|
9729
|
+
code = input[i].charCodeAt(0);
|
|
9730
9730
|
if (code === 48) {
|
|
9731
9731
|
continue;
|
|
9732
9732
|
}
|
|
9733
9733
|
if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) {
|
|
9734
9734
|
return "";
|
|
9735
9735
|
}
|
|
9736
|
-
acc += input[
|
|
9736
|
+
acc += input[i];
|
|
9737
9737
|
break;
|
|
9738
9738
|
}
|
|
9739
|
-
for (
|
|
9740
|
-
code = input[
|
|
9739
|
+
for (i += 1; i < input.length; i++) {
|
|
9740
|
+
code = input[i].charCodeAt(0);
|
|
9741
9741
|
if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) {
|
|
9742
9742
|
return "";
|
|
9743
9743
|
}
|
|
9744
|
-
acc += input[
|
|
9744
|
+
acc += input[i];
|
|
9745
9745
|
}
|
|
9746
9746
|
return acc;
|
|
9747
9747
|
}
|
|
@@ -9771,8 +9771,8 @@ var require_utils = __commonJS({
|
|
|
9771
9771
|
let endipv6Encountered = false;
|
|
9772
9772
|
let endIpv6 = false;
|
|
9773
9773
|
let consume = consumeHextets;
|
|
9774
|
-
for (let
|
|
9775
|
-
const cursor = input[
|
|
9774
|
+
for (let i = 0; i < input.length; i++) {
|
|
9775
|
+
const cursor = input[i];
|
|
9776
9776
|
if (cursor === "[" || cursor === "]") {
|
|
9777
9777
|
continue;
|
|
9778
9778
|
}
|
|
@@ -9787,7 +9787,7 @@ var require_utils = __commonJS({
|
|
|
9787
9787
|
output2.error = true;
|
|
9788
9788
|
break;
|
|
9789
9789
|
}
|
|
9790
|
-
if (
|
|
9790
|
+
if (i > 0 && input[i - 1] === ":") {
|
|
9791
9791
|
endipv6Encountered = true;
|
|
9792
9792
|
}
|
|
9793
9793
|
address.push(":");
|
|
@@ -9833,8 +9833,8 @@ var require_utils = __commonJS({
|
|
|
9833
9833
|
}
|
|
9834
9834
|
function findToken(str, token) {
|
|
9835
9835
|
let ind = 0;
|
|
9836
|
-
for (let
|
|
9837
|
-
if (str[
|
|
9836
|
+
for (let i = 0; i < str.length; i++) {
|
|
9837
|
+
if (str[i] === token) ind++;
|
|
9838
9838
|
}
|
|
9839
9839
|
return ind;
|
|
9840
9840
|
}
|
|
@@ -10391,8 +10391,8 @@ var require_fast_uri = __commonJS({
|
|
|
10391
10391
|
if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
10392
10392
|
try {
|
|
10393
10393
|
parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
|
|
10394
|
-
} catch (
|
|
10395
|
-
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " +
|
|
10394
|
+
} catch (e) {
|
|
10395
|
+
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
10396
10396
|
}
|
|
10397
10397
|
}
|
|
10398
10398
|
}
|
|
@@ -10636,11 +10636,11 @@ var require_core = __commonJS({
|
|
|
10636
10636
|
async function _compileAsync(sch) {
|
|
10637
10637
|
try {
|
|
10638
10638
|
return this._compileSchemaEnv(sch);
|
|
10639
|
-
} catch (
|
|
10640
|
-
if (!(
|
|
10641
|
-
throw
|
|
10642
|
-
checkLoaded.call(this,
|
|
10643
|
-
await loadMissingSchema.call(this,
|
|
10639
|
+
} catch (e) {
|
|
10640
|
+
if (!(e instanceof ref_error_1.default))
|
|
10641
|
+
throw e;
|
|
10642
|
+
checkLoaded.call(this, e);
|
|
10643
|
+
await loadMissingSchema.call(this, e.missingSchema);
|
|
10644
10644
|
return _compileAsync.call(this, sch);
|
|
10645
10645
|
}
|
|
10646
10646
|
}
|
|
@@ -10807,7 +10807,7 @@ var require_core = __commonJS({
|
|
|
10807
10807
|
type: (0, dataType_1.getJSONTypes)(def.type),
|
|
10808
10808
|
schemaType: (0, dataType_1.getJSONTypes)(def.schemaType)
|
|
10809
10809
|
};
|
|
10810
|
-
(0, util_1.eachItem)(keyword, definition.type.length === 0 ? (k) => addRule.call(this, k, definition) : (k) => definition.type.forEach((
|
|
10810
|
+
(0, util_1.eachItem)(keyword, definition.type.length === 0 ? (k) => addRule.call(this, k, definition) : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t)));
|
|
10811
10811
|
return this;
|
|
10812
10812
|
}
|
|
10813
10813
|
getKeyword(keyword) {
|
|
@@ -10820,9 +10820,9 @@ var require_core = __commonJS({
|
|
|
10820
10820
|
delete RULES.keywords[keyword];
|
|
10821
10821
|
delete RULES.all[keyword];
|
|
10822
10822
|
for (const group of RULES.rules) {
|
|
10823
|
-
const
|
|
10824
|
-
if (
|
|
10825
|
-
group.rules.splice(
|
|
10823
|
+
const i = group.rules.findIndex((rule) => rule.keyword === keyword);
|
|
10824
|
+
if (i >= 0)
|
|
10825
|
+
group.rules.splice(i, 1);
|
|
10826
10826
|
}
|
|
10827
10827
|
return this;
|
|
10828
10828
|
}
|
|
@@ -10836,7 +10836,7 @@ var require_core = __commonJS({
|
|
|
10836
10836
|
errorsText(errors = this.errors, { separator = ", ", dataVar = "data" } = {}) {
|
|
10837
10837
|
if (!errors || errors.length === 0)
|
|
10838
10838
|
return "No errors";
|
|
10839
|
-
return errors.map((
|
|
10839
|
+
return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text, msg) => text + separator + msg);
|
|
10840
10840
|
}
|
|
10841
10841
|
$dataMetaSchema(metaSchema, keywordsJsonPointers) {
|
|
10842
10842
|
const rules = this.RULES.all;
|
|
@@ -11006,7 +11006,7 @@ var require_core = __commonJS({
|
|
|
11006
11006
|
if (dataType && post)
|
|
11007
11007
|
throw new Error('keyword with "post" flag cannot have "type"');
|
|
11008
11008
|
const { RULES } = this;
|
|
11009
|
-
let ruleGroup = post ? RULES.post : RULES.rules.find(({ type:
|
|
11009
|
+
let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType);
|
|
11010
11010
|
if (!ruleGroup) {
|
|
11011
11011
|
ruleGroup = { type: dataType, rules: [] };
|
|
11012
11012
|
RULES.rules.push(ruleGroup);
|
|
@@ -11030,9 +11030,9 @@ var require_core = __commonJS({
|
|
|
11030
11030
|
(_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach((kwd) => this.addKeyword(kwd));
|
|
11031
11031
|
}
|
|
11032
11032
|
function addBeforeRule(ruleGroup, rule, before) {
|
|
11033
|
-
const
|
|
11034
|
-
if (
|
|
11035
|
-
ruleGroup.rules.splice(
|
|
11033
|
+
const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);
|
|
11034
|
+
if (i >= 0) {
|
|
11035
|
+
ruleGroup.rules.splice(i, 0, rule);
|
|
11036
11036
|
} else {
|
|
11037
11037
|
ruleGroup.rules.push(rule);
|
|
11038
11038
|
this.logger.warn(`rule ${before} is not defined`);
|
|
@@ -11142,9 +11142,9 @@ var require_ref = __commonJS({
|
|
|
11142
11142
|
addEvaluatedFrom(v);
|
|
11143
11143
|
if (!allErrors)
|
|
11144
11144
|
gen.assign(valid, true);
|
|
11145
|
-
}, (
|
|
11146
|
-
gen.if((0, codegen_1._)`!(${
|
|
11147
|
-
addErrorsFrom(
|
|
11145
|
+
}, (e) => {
|
|
11146
|
+
gen.if((0, codegen_1._)`!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e));
|
|
11147
|
+
addErrorsFrom(e);
|
|
11148
11148
|
if (!allErrors)
|
|
11149
11149
|
gen.assign(valid, false);
|
|
11150
11150
|
});
|
|
@@ -11507,8 +11507,8 @@ var require_uniqueItems = __commonJS({
|
|
|
11507
11507
|
var util_1 = require_util();
|
|
11508
11508
|
var equal_1 = require_equal();
|
|
11509
11509
|
var error2 = {
|
|
11510
|
-
message: ({ params: { i
|
|
11511
|
-
params: ({ params: { i
|
|
11510
|
+
message: ({ params: { i, j } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,
|
|
11511
|
+
params: ({ params: { i, j } }) => (0, codegen_1._)`{i: ${i}, j: ${j}}`
|
|
11512
11512
|
};
|
|
11513
11513
|
var def = {
|
|
11514
11514
|
keyword: "uniqueItems",
|
|
@@ -11525,21 +11525,21 @@ var require_uniqueItems = __commonJS({
|
|
|
11525
11525
|
cxt.block$data(valid, validateUniqueItems, (0, codegen_1._)`${schemaCode} === false`);
|
|
11526
11526
|
cxt.ok(valid);
|
|
11527
11527
|
function validateUniqueItems() {
|
|
11528
|
-
const
|
|
11528
|
+
const i = gen.let("i", (0, codegen_1._)`${data}.length`);
|
|
11529
11529
|
const j = gen.let("j");
|
|
11530
|
-
cxt.setParams({ i
|
|
11530
|
+
cxt.setParams({ i, j });
|
|
11531
11531
|
gen.assign(valid, true);
|
|
11532
|
-
gen.if((0, codegen_1._)`${
|
|
11532
|
+
gen.if((0, codegen_1._)`${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j));
|
|
11533
11533
|
}
|
|
11534
11534
|
function canOptimize() {
|
|
11535
|
-
return itemTypes.length > 0 && !itemTypes.some((
|
|
11535
|
+
return itemTypes.length > 0 && !itemTypes.some((t) => t === "object" || t === "array");
|
|
11536
11536
|
}
|
|
11537
|
-
function loopN(
|
|
11537
|
+
function loopN(i, j) {
|
|
11538
11538
|
const item = gen.name("item");
|
|
11539
11539
|
const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong);
|
|
11540
11540
|
const indices = gen.const("indices", (0, codegen_1._)`{}`);
|
|
11541
|
-
gen.for((0, codegen_1._)`;${
|
|
11542
|
-
gen.let(item, (0, codegen_1._)`${data}[${
|
|
11541
|
+
gen.for((0, codegen_1._)`;${i}--;`, () => {
|
|
11542
|
+
gen.let(item, (0, codegen_1._)`${data}[${i}]`);
|
|
11543
11543
|
gen.if(wrongType, (0, codegen_1._)`continue`);
|
|
11544
11544
|
if (itemTypes.length > 1)
|
|
11545
11545
|
gen.if((0, codegen_1._)`typeof ${item} == "string"`, (0, codegen_1._)`${item} += "_"`);
|
|
@@ -11547,13 +11547,13 @@ var require_uniqueItems = __commonJS({
|
|
|
11547
11547
|
gen.assign(j, (0, codegen_1._)`${indices}[${item}]`);
|
|
11548
11548
|
cxt.error();
|
|
11549
11549
|
gen.assign(valid, false).break();
|
|
11550
|
-
}).code((0, codegen_1._)`${indices}[${item}] = ${
|
|
11550
|
+
}).code((0, codegen_1._)`${indices}[${item}] = ${i}`);
|
|
11551
11551
|
});
|
|
11552
11552
|
}
|
|
11553
|
-
function loopN2(
|
|
11553
|
+
function loopN2(i, j) {
|
|
11554
11554
|
const eql = (0, util_1.useFunc)(gen, equal_1.default);
|
|
11555
11555
|
const outer = gen.name("outer");
|
|
11556
|
-
gen.label(outer).for((0, codegen_1._)`;${
|
|
11556
|
+
gen.label(outer).for((0, codegen_1._)`;${i}--;`, () => gen.for((0, codegen_1._)`${j} = ${i}; ${j}--;`, () => gen.if((0, codegen_1._)`${eql}(${data}[${i}], ${data}[${j}])`, () => {
|
|
11557
11557
|
cxt.error();
|
|
11558
11558
|
gen.assign(valid, false).break(outer);
|
|
11559
11559
|
})));
|
|
@@ -11623,16 +11623,16 @@ var require_enum = __commonJS({
|
|
|
11623
11623
|
if (!Array.isArray(schema))
|
|
11624
11624
|
throw new Error("ajv implementation error");
|
|
11625
11625
|
const vSchema = gen.const("vSchema", schemaCode);
|
|
11626
|
-
valid = (0, codegen_1.or)(...schema.map((_x,
|
|
11626
|
+
valid = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i)));
|
|
11627
11627
|
}
|
|
11628
11628
|
cxt.pass(valid);
|
|
11629
11629
|
function loopEnum() {
|
|
11630
11630
|
gen.assign(valid, false);
|
|
11631
11631
|
gen.forOf("v", schemaCode, (v) => gen.if((0, codegen_1._)`${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break()));
|
|
11632
11632
|
}
|
|
11633
|
-
function equalCode(vSchema,
|
|
11634
|
-
const sch = schema[
|
|
11635
|
-
return typeof sch === "object" && sch !== null ? (0, codegen_1._)`${getEql()}(${data}, ${vSchema}[${
|
|
11633
|
+
function equalCode(vSchema, i) {
|
|
11634
|
+
const sch = schema[i];
|
|
11635
|
+
return typeof sch === "object" && sch !== null ? (0, codegen_1._)`${getEql()}(${data}, ${vSchema}[${i}])` : (0, codegen_1._)`${data} === ${sch}`;
|
|
11636
11636
|
}
|
|
11637
11637
|
}
|
|
11638
11638
|
};
|
|
@@ -11717,8 +11717,8 @@ var require_additionalItems = __commonJS({
|
|
|
11717
11717
|
cxt.ok(valid);
|
|
11718
11718
|
}
|
|
11719
11719
|
function validateItems(valid) {
|
|
11720
|
-
gen.forRange("i", items.length, len, (
|
|
11721
|
-
cxt.subschema({ keyword, dataProp:
|
|
11720
|
+
gen.forRange("i", items.length, len, (i) => {
|
|
11721
|
+
cxt.subschema({ keyword, dataProp: i, dataPropType: util_1.Type.Num }, valid);
|
|
11722
11722
|
if (!it.allErrors)
|
|
11723
11723
|
gen.if((0, codegen_1.not)(valid), () => gen.break());
|
|
11724
11724
|
});
|
|
@@ -11760,13 +11760,13 @@ var require_items = __commonJS({
|
|
|
11760
11760
|
}
|
|
11761
11761
|
const valid = gen.name("valid");
|
|
11762
11762
|
const len = gen.const("len", (0, codegen_1._)`${data}.length`);
|
|
11763
|
-
schArr.forEach((sch,
|
|
11763
|
+
schArr.forEach((sch, i) => {
|
|
11764
11764
|
if ((0, util_1.alwaysValidSchema)(it, sch))
|
|
11765
11765
|
return;
|
|
11766
|
-
gen.if((0, codegen_1._)`${len} > ${
|
|
11766
|
+
gen.if((0, codegen_1._)`${len} > ${i}`, () => cxt.subschema({
|
|
11767
11767
|
keyword,
|
|
11768
|
-
schemaProp:
|
|
11769
|
-
dataProp:
|
|
11768
|
+
schemaProp: i,
|
|
11769
|
+
dataProp: i
|
|
11770
11770
|
}, valid));
|
|
11771
11771
|
cxt.ok(valid);
|
|
11772
11772
|
});
|
|
@@ -11900,10 +11900,10 @@ var require_contains = __commonJS({
|
|
|
11900
11900
|
validateItems(schValid, () => gen.if(schValid, () => checkLimits(count)));
|
|
11901
11901
|
}
|
|
11902
11902
|
function validateItems(_valid, block) {
|
|
11903
|
-
gen.forRange("i", 0, len, (
|
|
11903
|
+
gen.forRange("i", 0, len, (i) => {
|
|
11904
11904
|
cxt.subschema({
|
|
11905
11905
|
keyword: "contains",
|
|
11906
|
-
dataProp:
|
|
11906
|
+
dataProp: i,
|
|
11907
11907
|
dataPropType: util_1.Type.Num,
|
|
11908
11908
|
compositeRule: true
|
|
11909
11909
|
}, _valid);
|
|
@@ -12373,23 +12373,23 @@ var require_oneOf = __commonJS({
|
|
|
12373
12373
|
gen.block(validateOneOf);
|
|
12374
12374
|
cxt.result(valid, () => cxt.reset(), () => cxt.error(true));
|
|
12375
12375
|
function validateOneOf() {
|
|
12376
|
-
schArr.forEach((sch,
|
|
12376
|
+
schArr.forEach((sch, i) => {
|
|
12377
12377
|
let schCxt;
|
|
12378
12378
|
if ((0, util_1.alwaysValidSchema)(it, sch)) {
|
|
12379
12379
|
gen.var(schValid, true);
|
|
12380
12380
|
} else {
|
|
12381
12381
|
schCxt = cxt.subschema({
|
|
12382
12382
|
keyword: "oneOf",
|
|
12383
|
-
schemaProp:
|
|
12383
|
+
schemaProp: i,
|
|
12384
12384
|
compositeRule: true
|
|
12385
12385
|
}, schValid);
|
|
12386
12386
|
}
|
|
12387
|
-
if (
|
|
12388
|
-
gen.if((0, codegen_1._)`${schValid} && ${valid}`).assign(valid, false).assign(passing, (0, codegen_1._)`[${passing}, ${
|
|
12387
|
+
if (i > 0) {
|
|
12388
|
+
gen.if((0, codegen_1._)`${schValid} && ${valid}`).assign(valid, false).assign(passing, (0, codegen_1._)`[${passing}, ${i}]`).else();
|
|
12389
12389
|
}
|
|
12390
12390
|
gen.if(schValid, () => {
|
|
12391
12391
|
gen.assign(valid, true);
|
|
12392
|
-
gen.assign(passing,
|
|
12392
|
+
gen.assign(passing, i);
|
|
12393
12393
|
if (schCxt)
|
|
12394
12394
|
cxt.mergeEvaluated(schCxt, codegen_1.Name);
|
|
12395
12395
|
});
|
|
@@ -12414,10 +12414,10 @@ var require_allOf = __commonJS({
|
|
|
12414
12414
|
if (!Array.isArray(schema))
|
|
12415
12415
|
throw new Error("ajv implementation error");
|
|
12416
12416
|
const valid = gen.name("valid");
|
|
12417
|
-
schema.forEach((sch,
|
|
12417
|
+
schema.forEach((sch, i) => {
|
|
12418
12418
|
if ((0, util_1.alwaysValidSchema)(it, sch))
|
|
12419
12419
|
return;
|
|
12420
|
-
const schCxt = cxt.subschema({ keyword: "allOf", schemaProp:
|
|
12420
|
+
const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i }, valid);
|
|
12421
12421
|
cxt.ok(valid);
|
|
12422
12422
|
cxt.mergeEvaluated(schCxt);
|
|
12423
12423
|
});
|
|
@@ -12771,8 +12771,8 @@ var require_discriminator = __commonJS({
|
|
|
12771
12771
|
const oneOfMapping = {};
|
|
12772
12772
|
const topRequired = hasRequired(parentSchema);
|
|
12773
12773
|
let tagRequired = true;
|
|
12774
|
-
for (let
|
|
12775
|
-
let sch = oneOf[
|
|
12774
|
+
for (let i = 0; i < oneOf.length; i++) {
|
|
12775
|
+
let sch = oneOf[i];
|
|
12776
12776
|
if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {
|
|
12777
12777
|
const ref = sch.$ref;
|
|
12778
12778
|
sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref);
|
|
@@ -12786,7 +12786,7 @@ var require_discriminator = __commonJS({
|
|
|
12786
12786
|
throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`);
|
|
12787
12787
|
}
|
|
12788
12788
|
tagRequired = tagRequired && (topRequired || hasRequired(sch));
|
|
12789
|
-
addMappings(propSch,
|
|
12789
|
+
addMappings(propSch, i);
|
|
12790
12790
|
}
|
|
12791
12791
|
if (!tagRequired)
|
|
12792
12792
|
throw new Error(`discriminator: "${tagName}" must be required`);
|
|
@@ -12794,22 +12794,22 @@ var require_discriminator = __commonJS({
|
|
|
12794
12794
|
function hasRequired({ required }) {
|
|
12795
12795
|
return Array.isArray(required) && required.includes(tagName);
|
|
12796
12796
|
}
|
|
12797
|
-
function addMappings(sch,
|
|
12797
|
+
function addMappings(sch, i) {
|
|
12798
12798
|
if (sch.const) {
|
|
12799
|
-
addMapping(sch.const,
|
|
12799
|
+
addMapping(sch.const, i);
|
|
12800
12800
|
} else if (sch.enum) {
|
|
12801
12801
|
for (const tagValue of sch.enum) {
|
|
12802
|
-
addMapping(tagValue,
|
|
12802
|
+
addMapping(tagValue, i);
|
|
12803
12803
|
}
|
|
12804
12804
|
} else {
|
|
12805
12805
|
throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`);
|
|
12806
12806
|
}
|
|
12807
12807
|
}
|
|
12808
|
-
function addMapping(tagValue,
|
|
12808
|
+
function addMapping(tagValue, i) {
|
|
12809
12809
|
if (typeof tagValue != "string" || tagValue in oneOfMapping) {
|
|
12810
12810
|
throw new Error(`discriminator: "${tagName}" values must be unique strings`);
|
|
12811
12811
|
}
|
|
12812
|
-
oneOfMapping[tagValue] =
|
|
12812
|
+
oneOfMapping[tagValue] = i;
|
|
12813
12813
|
}
|
|
12814
12814
|
}
|
|
12815
12815
|
}
|
|
@@ -13256,7 +13256,7 @@ var require_formats = __commonJS({
|
|
|
13256
13256
|
try {
|
|
13257
13257
|
new RegExp(str);
|
|
13258
13258
|
return true;
|
|
13259
|
-
} catch (
|
|
13259
|
+
} catch (e) {
|
|
13260
13260
|
return false;
|
|
13261
13261
|
}
|
|
13262
13262
|
}
|
|
@@ -13905,9 +13905,9 @@ function semver_compare_default(a, b) {
|
|
|
13905
13905
|
b = b.split("-");
|
|
13906
13906
|
var pa = a[0].split(".");
|
|
13907
13907
|
var pb = b[0].split(".");
|
|
13908
|
-
for (var
|
|
13909
|
-
var na = Number(pa[
|
|
13910
|
-
var nb = Number(pb[
|
|
13908
|
+
for (var i = 0; i < 3; i++) {
|
|
13909
|
+
var na = Number(pa[i]);
|
|
13910
|
+
var nb = Number(pb[i]);
|
|
13911
13911
|
if (na > nb) return 1;
|
|
13912
13912
|
if (nb > na) return -1;
|
|
13913
13913
|
if (!isNaN(na) && isNaN(nb)) return 1;
|
|
@@ -13946,28 +13946,28 @@ function _typeof2(o) {
|
|
|
13946
13946
|
function _classCallCheck2(a, n) {
|
|
13947
13947
|
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
13948
13948
|
}
|
|
13949
|
-
function _defineProperties2(
|
|
13950
|
-
for (var
|
|
13951
|
-
var o = r[
|
|
13952
|
-
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(
|
|
13949
|
+
function _defineProperties2(e, r) {
|
|
13950
|
+
for (var t = 0; t < r.length; t++) {
|
|
13951
|
+
var o = r[t];
|
|
13952
|
+
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
13953
13953
|
}
|
|
13954
13954
|
}
|
|
13955
|
-
function _createClass2(
|
|
13956
|
-
return r && _defineProperties2(
|
|
13955
|
+
function _createClass2(e, r, t) {
|
|
13956
|
+
return r && _defineProperties2(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e;
|
|
13957
13957
|
}
|
|
13958
|
-
function _toPropertyKey(
|
|
13959
|
-
var
|
|
13960
|
-
return "symbol" == _typeof2(
|
|
13958
|
+
function _toPropertyKey(t) {
|
|
13959
|
+
var i = _toPrimitive(t, "string");
|
|
13960
|
+
return "symbol" == _typeof2(i) ? i : i + "";
|
|
13961
13961
|
}
|
|
13962
|
-
function _toPrimitive(
|
|
13963
|
-
if ("object" != _typeof2(
|
|
13964
|
-
var
|
|
13965
|
-
if (void 0 !==
|
|
13966
|
-
var
|
|
13967
|
-
if ("object" != _typeof2(
|
|
13962
|
+
function _toPrimitive(t, r) {
|
|
13963
|
+
if ("object" != _typeof2(t) || !t) return t;
|
|
13964
|
+
var e = t[Symbol.toPrimitive];
|
|
13965
|
+
if (void 0 !== e) {
|
|
13966
|
+
var i = e.call(t, r);
|
|
13967
|
+
if ("object" != _typeof2(i)) return i;
|
|
13968
13968
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
13969
13969
|
}
|
|
13970
|
-
return (String )(
|
|
13970
|
+
return (String )(t);
|
|
13971
13971
|
}
|
|
13972
13972
|
function getType(types, type) {
|
|
13973
13973
|
switch (type) {
|
|
@@ -14573,11 +14573,11 @@ var init_matchesEntirely = __esm({
|
|
|
14573
14573
|
});
|
|
14574
14574
|
|
|
14575
14575
|
// ../../node_modules/libphonenumber-js/es6/helpers/getNumberType.js
|
|
14576
|
-
function _createForOfIteratorHelperLoose2(r,
|
|
14577
|
-
var
|
|
14578
|
-
if (
|
|
14579
|
-
if (Array.isArray(r) || (
|
|
14580
|
-
|
|
14576
|
+
function _createForOfIteratorHelperLoose2(r, e) {
|
|
14577
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
14578
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
14579
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray2(r)) || e) {
|
|
14580
|
+
t && (r = t);
|
|
14581
14581
|
var o = 0;
|
|
14582
14582
|
return function() {
|
|
14583
14583
|
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
@@ -14588,13 +14588,13 @@ function _createForOfIteratorHelperLoose2(r, e2) {
|
|
|
14588
14588
|
function _unsupportedIterableToArray2(r, a) {
|
|
14589
14589
|
if (r) {
|
|
14590
14590
|
if ("string" == typeof r) return _arrayLikeToArray2(r, a);
|
|
14591
|
-
var
|
|
14592
|
-
return "Object" ===
|
|
14591
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
14592
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray2(r, a) : void 0;
|
|
14593
14593
|
}
|
|
14594
14594
|
}
|
|
14595
14595
|
function _arrayLikeToArray2(r, a) {
|
|
14596
14596
|
(null == a || a > r.length) && (a = r.length);
|
|
14597
|
-
for (var
|
|
14597
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
14598
14598
|
return n;
|
|
14599
14599
|
}
|
|
14600
14600
|
function getNumberType(input, options, metadata) {
|
|
@@ -14901,18 +14901,18 @@ function extractCountryCallingCode(number, country, callingCode, metadata) {
|
|
|
14901
14901
|
return {};
|
|
14902
14902
|
}
|
|
14903
14903
|
metadata = new Metadata(metadata);
|
|
14904
|
-
var
|
|
14905
|
-
while (
|
|
14906
|
-
var _countryCallingCode = number.slice(1,
|
|
14904
|
+
var i = 2;
|
|
14905
|
+
while (i - 1 <= MAX_LENGTH_COUNTRY_CODE && i <= number.length) {
|
|
14906
|
+
var _countryCallingCode = number.slice(1, i);
|
|
14907
14907
|
if (metadata.hasCallingCode(_countryCallingCode)) {
|
|
14908
14908
|
metadata.selectNumberingPlan(_countryCallingCode);
|
|
14909
14909
|
return {
|
|
14910
14910
|
countryCallingCodeSource: isNumberWithIddPrefix ? "FROM_NUMBER_WITH_IDD" : "FROM_NUMBER_WITH_PLUS_SIGN",
|
|
14911
14911
|
countryCallingCode: _countryCallingCode,
|
|
14912
|
-
number: number.slice(
|
|
14912
|
+
number: number.slice(i)
|
|
14913
14913
|
};
|
|
14914
14914
|
}
|
|
14915
|
-
|
|
14915
|
+
i++;
|
|
14916
14916
|
}
|
|
14917
14917
|
return {};
|
|
14918
14918
|
}
|
|
@@ -15069,11 +15069,11 @@ function _typeof3(o) {
|
|
|
15069
15069
|
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
|
15070
15070
|
}, _typeof3(o);
|
|
15071
15071
|
}
|
|
15072
|
-
function _createForOfIteratorHelperLoose3(r,
|
|
15073
|
-
var
|
|
15074
|
-
if (
|
|
15075
|
-
if (Array.isArray(r) || (
|
|
15076
|
-
|
|
15072
|
+
function _createForOfIteratorHelperLoose3(r, e) {
|
|
15073
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
15074
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
15075
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray3(r)) || e) {
|
|
15076
|
+
t && (r = t);
|
|
15077
15077
|
var o = 0;
|
|
15078
15078
|
return function() {
|
|
15079
15079
|
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
@@ -15084,52 +15084,52 @@ function _createForOfIteratorHelperLoose3(r, e2) {
|
|
|
15084
15084
|
function _unsupportedIterableToArray3(r, a) {
|
|
15085
15085
|
if (r) {
|
|
15086
15086
|
if ("string" == typeof r) return _arrayLikeToArray3(r, a);
|
|
15087
|
-
var
|
|
15088
|
-
return "Object" ===
|
|
15087
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
15088
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray3(r, a) : void 0;
|
|
15089
15089
|
}
|
|
15090
15090
|
}
|
|
15091
15091
|
function _arrayLikeToArray3(r, a) {
|
|
15092
15092
|
(null == a || a > r.length) && (a = r.length);
|
|
15093
|
-
for (var
|
|
15093
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
15094
15094
|
return n;
|
|
15095
15095
|
}
|
|
15096
|
-
function ownKeys(
|
|
15097
|
-
var
|
|
15096
|
+
function ownKeys(e, r) {
|
|
15097
|
+
var t = Object.keys(e);
|
|
15098
15098
|
if (Object.getOwnPropertySymbols) {
|
|
15099
|
-
var o = Object.getOwnPropertySymbols(
|
|
15099
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
15100
15100
|
r && (o = o.filter(function(r2) {
|
|
15101
|
-
return Object.getOwnPropertyDescriptor(
|
|
15102
|
-
})),
|
|
15101
|
+
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
15102
|
+
})), t.push.apply(t, o);
|
|
15103
15103
|
}
|
|
15104
|
-
return
|
|
15104
|
+
return t;
|
|
15105
15105
|
}
|
|
15106
|
-
function _objectSpread2(
|
|
15106
|
+
function _objectSpread2(e) {
|
|
15107
15107
|
for (var r = 1; r < arguments.length; r++) {
|
|
15108
|
-
var
|
|
15109
|
-
r % 2 ? ownKeys(Object(
|
|
15110
|
-
_defineProperty2(
|
|
15111
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
15112
|
-
Object.defineProperty(
|
|
15108
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
15109
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
|
|
15110
|
+
_defineProperty2(e, r2, t[r2]);
|
|
15111
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
|
|
15112
|
+
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
15113
15113
|
});
|
|
15114
15114
|
}
|
|
15115
|
-
return
|
|
15115
|
+
return e;
|
|
15116
15116
|
}
|
|
15117
|
-
function _defineProperty2(
|
|
15118
|
-
return (r = _toPropertyKey2(r)) in
|
|
15117
|
+
function _defineProperty2(e, r, t) {
|
|
15118
|
+
return (r = _toPropertyKey2(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e;
|
|
15119
15119
|
}
|
|
15120
|
-
function _toPropertyKey2(
|
|
15121
|
-
var
|
|
15122
|
-
return "symbol" == _typeof3(
|
|
15120
|
+
function _toPropertyKey2(t) {
|
|
15121
|
+
var i = _toPrimitive2(t, "string");
|
|
15122
|
+
return "symbol" == _typeof3(i) ? i : i + "";
|
|
15123
15123
|
}
|
|
15124
|
-
function _toPrimitive2(
|
|
15125
|
-
if ("object" != _typeof3(
|
|
15126
|
-
var
|
|
15127
|
-
if (void 0 !==
|
|
15128
|
-
var
|
|
15129
|
-
if ("object" != _typeof3(
|
|
15124
|
+
function _toPrimitive2(t, r) {
|
|
15125
|
+
if ("object" != _typeof3(t) || !t) return t;
|
|
15126
|
+
var e = t[Symbol.toPrimitive];
|
|
15127
|
+
if (void 0 !== e) {
|
|
15128
|
+
var i = e.call(t, r);
|
|
15129
|
+
if ("object" != _typeof3(i)) return i;
|
|
15130
15130
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
15131
15131
|
}
|
|
15132
|
-
return ("string" === r ? String : Number)(
|
|
15132
|
+
return ("string" === r ? String : Number)(t);
|
|
15133
15133
|
}
|
|
15134
15134
|
function formatNumber(input, format, options, metadata) {
|
|
15135
15135
|
if (options) {
|
|
@@ -15249,55 +15249,55 @@ function _typeof4(o) {
|
|
|
15249
15249
|
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
|
15250
15250
|
}, _typeof4(o);
|
|
15251
15251
|
}
|
|
15252
|
-
function ownKeys2(
|
|
15253
|
-
var
|
|
15252
|
+
function ownKeys2(e, r) {
|
|
15253
|
+
var t = Object.keys(e);
|
|
15254
15254
|
if (Object.getOwnPropertySymbols) {
|
|
15255
|
-
var o = Object.getOwnPropertySymbols(
|
|
15255
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
15256
15256
|
r && (o = o.filter(function(r2) {
|
|
15257
|
-
return Object.getOwnPropertyDescriptor(
|
|
15258
|
-
})),
|
|
15257
|
+
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
15258
|
+
})), t.push.apply(t, o);
|
|
15259
15259
|
}
|
|
15260
|
-
return
|
|
15260
|
+
return t;
|
|
15261
15261
|
}
|
|
15262
|
-
function _objectSpread3(
|
|
15262
|
+
function _objectSpread3(e) {
|
|
15263
15263
|
for (var r = 1; r < arguments.length; r++) {
|
|
15264
|
-
var
|
|
15265
|
-
r % 2 ? ownKeys2(Object(
|
|
15266
|
-
_defineProperty3(
|
|
15267
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
15268
|
-
Object.defineProperty(
|
|
15264
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
15265
|
+
r % 2 ? ownKeys2(Object(t), true).forEach(function(r2) {
|
|
15266
|
+
_defineProperty3(e, r2, t[r2]);
|
|
15267
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys2(Object(t)).forEach(function(r2) {
|
|
15268
|
+
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
15269
15269
|
});
|
|
15270
15270
|
}
|
|
15271
|
-
return
|
|
15271
|
+
return e;
|
|
15272
15272
|
}
|
|
15273
|
-
function _defineProperty3(
|
|
15274
|
-
return (r = _toPropertyKey3(r)) in
|
|
15273
|
+
function _defineProperty3(e, r, t) {
|
|
15274
|
+
return (r = _toPropertyKey3(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e;
|
|
15275
15275
|
}
|
|
15276
15276
|
function _classCallCheck3(a, n) {
|
|
15277
15277
|
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
15278
15278
|
}
|
|
15279
|
-
function _defineProperties3(
|
|
15280
|
-
for (var
|
|
15281
|
-
var o = r[
|
|
15282
|
-
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(
|
|
15279
|
+
function _defineProperties3(e, r) {
|
|
15280
|
+
for (var t = 0; t < r.length; t++) {
|
|
15281
|
+
var o = r[t];
|
|
15282
|
+
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey3(o.key), o);
|
|
15283
15283
|
}
|
|
15284
15284
|
}
|
|
15285
|
-
function _createClass3(
|
|
15286
|
-
return r && _defineProperties3(
|
|
15285
|
+
function _createClass3(e, r, t) {
|
|
15286
|
+
return r && _defineProperties3(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e;
|
|
15287
15287
|
}
|
|
15288
|
-
function _toPropertyKey3(
|
|
15289
|
-
var
|
|
15290
|
-
return "symbol" == _typeof4(
|
|
15288
|
+
function _toPropertyKey3(t) {
|
|
15289
|
+
var i = _toPrimitive3(t, "string");
|
|
15290
|
+
return "symbol" == _typeof4(i) ? i : i + "";
|
|
15291
15291
|
}
|
|
15292
|
-
function _toPrimitive3(
|
|
15293
|
-
if ("object" != _typeof4(
|
|
15294
|
-
var
|
|
15295
|
-
if (void 0 !==
|
|
15296
|
-
var
|
|
15297
|
-
if ("object" != _typeof4(
|
|
15292
|
+
function _toPrimitive3(t, r) {
|
|
15293
|
+
if ("object" != _typeof4(t) || !t) return t;
|
|
15294
|
+
var e = t[Symbol.toPrimitive];
|
|
15295
|
+
if (void 0 !== e) {
|
|
15296
|
+
var i = e.call(t, r);
|
|
15297
|
+
if ("object" != _typeof4(i)) return i;
|
|
15298
15298
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
15299
15299
|
}
|
|
15300
|
-
return (String )(
|
|
15300
|
+
return (String )(t);
|
|
15301
15301
|
}
|
|
15302
15302
|
function getCountryAndCountryCallingCode(countryOrCountryCallingCode, metadataJson) {
|
|
15303
15303
|
var country;
|
|
@@ -15474,76 +15474,76 @@ function _typeof5(o) {
|
|
|
15474
15474
|
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
|
15475
15475
|
}, _typeof5(o);
|
|
15476
15476
|
}
|
|
15477
|
-
function _createClass4(
|
|
15478
|
-
return Object.defineProperty(
|
|
15477
|
+
function _createClass4(e, r, t) {
|
|
15478
|
+
return Object.defineProperty(e, "prototype", { writable: false }), e;
|
|
15479
15479
|
}
|
|
15480
15480
|
function _classCallCheck4(a, n) {
|
|
15481
15481
|
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
15482
15482
|
}
|
|
15483
|
-
function _callSuper(
|
|
15484
|
-
return o = _getPrototypeOf2(o), _possibleConstructorReturn2(
|
|
15483
|
+
function _callSuper(t, o, e) {
|
|
15484
|
+
return o = _getPrototypeOf2(o), _possibleConstructorReturn2(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf2(t).constructor) : o.apply(t, e));
|
|
15485
15485
|
}
|
|
15486
|
-
function _possibleConstructorReturn2(
|
|
15487
|
-
if (
|
|
15488
|
-
if (void 0 !==
|
|
15489
|
-
return _assertThisInitialized2(
|
|
15486
|
+
function _possibleConstructorReturn2(t, e) {
|
|
15487
|
+
if (e && ("object" == _typeof5(e) || "function" == typeof e)) return e;
|
|
15488
|
+
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
15489
|
+
return _assertThisInitialized2(t);
|
|
15490
15490
|
}
|
|
15491
|
-
function _assertThisInitialized2(
|
|
15492
|
-
if (void 0 ===
|
|
15493
|
-
return
|
|
15491
|
+
function _assertThisInitialized2(e) {
|
|
15492
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
15493
|
+
return e;
|
|
15494
15494
|
}
|
|
15495
|
-
function _inherits2(
|
|
15496
|
-
if ("function" != typeof
|
|
15497
|
-
|
|
15495
|
+
function _inherits2(t, e) {
|
|
15496
|
+
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
|
|
15497
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: true, configurable: true } }), Object.defineProperty(t, "prototype", { writable: false }), e && _setPrototypeOf2(t, e);
|
|
15498
15498
|
}
|
|
15499
|
-
function _wrapNativeSuper(
|
|
15499
|
+
function _wrapNativeSuper(t) {
|
|
15500
15500
|
var r = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0;
|
|
15501
|
-
return _wrapNativeSuper = function _wrapNativeSuper2(
|
|
15502
|
-
if (null ===
|
|
15503
|
-
if ("function" != typeof
|
|
15501
|
+
return _wrapNativeSuper = function _wrapNativeSuper2(t2) {
|
|
15502
|
+
if (null === t2 || !_isNativeFunction(t2)) return t2;
|
|
15503
|
+
if ("function" != typeof t2) throw new TypeError("Super expression must either be null or a function");
|
|
15504
15504
|
if (void 0 !== r) {
|
|
15505
|
-
if (r.has(
|
|
15506
|
-
r.set(
|
|
15505
|
+
if (r.has(t2)) return r.get(t2);
|
|
15506
|
+
r.set(t2, Wrapper);
|
|
15507
15507
|
}
|
|
15508
15508
|
function Wrapper() {
|
|
15509
|
-
return _construct(
|
|
15509
|
+
return _construct(t2, arguments, _getPrototypeOf2(this).constructor);
|
|
15510
15510
|
}
|
|
15511
|
-
return Wrapper.prototype = Object.create(
|
|
15512
|
-
}, _wrapNativeSuper(
|
|
15511
|
+
return Wrapper.prototype = Object.create(t2.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }), _setPrototypeOf2(Wrapper, t2);
|
|
15512
|
+
}, _wrapNativeSuper(t);
|
|
15513
15513
|
}
|
|
15514
|
-
function _construct(
|
|
15514
|
+
function _construct(t, e, r) {
|
|
15515
15515
|
if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
|
|
15516
15516
|
var o = [null];
|
|
15517
|
-
o.push.apply(o,
|
|
15518
|
-
var p = new (
|
|
15517
|
+
o.push.apply(o, e);
|
|
15518
|
+
var p = new (t.bind.apply(t, o))();
|
|
15519
15519
|
return r && _setPrototypeOf2(p, r.prototype), p;
|
|
15520
15520
|
}
|
|
15521
15521
|
function _isNativeReflectConstruct() {
|
|
15522
15522
|
try {
|
|
15523
|
-
var
|
|
15523
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
15524
15524
|
}));
|
|
15525
|
-
} catch (
|
|
15525
|
+
} catch (t2) {
|
|
15526
15526
|
}
|
|
15527
15527
|
return (_isNativeReflectConstruct = function _isNativeReflectConstruct2() {
|
|
15528
|
-
return !!
|
|
15528
|
+
return !!t;
|
|
15529
15529
|
})();
|
|
15530
15530
|
}
|
|
15531
|
-
function _isNativeFunction(
|
|
15531
|
+
function _isNativeFunction(t) {
|
|
15532
15532
|
try {
|
|
15533
|
-
return -1 !== Function.toString.call(
|
|
15533
|
+
return -1 !== Function.toString.call(t).indexOf("[native code]");
|
|
15534
15534
|
} catch (n) {
|
|
15535
|
-
return "function" == typeof
|
|
15535
|
+
return "function" == typeof t;
|
|
15536
15536
|
}
|
|
15537
15537
|
}
|
|
15538
|
-
function _setPrototypeOf2(
|
|
15539
|
-
return _setPrototypeOf2 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(
|
|
15540
|
-
return
|
|
15541
|
-
}, _setPrototypeOf2(
|
|
15538
|
+
function _setPrototypeOf2(t, e) {
|
|
15539
|
+
return _setPrototypeOf2 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) {
|
|
15540
|
+
return t2.__proto__ = e2, t2;
|
|
15541
|
+
}, _setPrototypeOf2(t, e);
|
|
15542
15542
|
}
|
|
15543
|
-
function _getPrototypeOf2(
|
|
15544
|
-
return _getPrototypeOf2 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(
|
|
15545
|
-
return
|
|
15546
|
-
}, _getPrototypeOf2(
|
|
15543
|
+
function _getPrototypeOf2(t) {
|
|
15544
|
+
return _getPrototypeOf2 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t2) {
|
|
15545
|
+
return t2.__proto__ || Object.getPrototypeOf(t2);
|
|
15546
|
+
}, _getPrototypeOf2(t);
|
|
15547
15547
|
}
|
|
15548
15548
|
var ParseError;
|
|
15549
15549
|
var init_ParseError = __esm({
|
|
@@ -15571,15 +15571,15 @@ function extractExtension(number) {
|
|
|
15571
15571
|
}
|
|
15572
15572
|
var numberWithoutExtension = number.slice(0, start);
|
|
15573
15573
|
var matches = number.match(EXTN_PATTERN);
|
|
15574
|
-
var
|
|
15575
|
-
while (
|
|
15576
|
-
if (matches[
|
|
15574
|
+
var i = 1;
|
|
15575
|
+
while (i < matches.length) {
|
|
15576
|
+
if (matches[i]) {
|
|
15577
15577
|
return {
|
|
15578
15578
|
number: numberWithoutExtension,
|
|
15579
|
-
ext: matches[
|
|
15579
|
+
ext: matches[i]
|
|
15580
15580
|
};
|
|
15581
15581
|
}
|
|
15582
|
-
|
|
15582
|
+
i++;
|
|
15583
15583
|
}
|
|
15584
15584
|
}
|
|
15585
15585
|
var EXTN_PATTERN;
|
|
@@ -15673,11 +15673,11 @@ var init_parseDigits = __esm({
|
|
|
15673
15673
|
});
|
|
15674
15674
|
|
|
15675
15675
|
// ../../node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js
|
|
15676
|
-
function _createForOfIteratorHelperLoose4(r,
|
|
15677
|
-
var
|
|
15678
|
-
if (
|
|
15679
|
-
if (Array.isArray(r) || (
|
|
15680
|
-
|
|
15676
|
+
function _createForOfIteratorHelperLoose4(r, e) {
|
|
15677
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
15678
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
15679
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray4(r)) || e) {
|
|
15680
|
+
t && (r = t);
|
|
15681
15681
|
var o = 0;
|
|
15682
15682
|
return function() {
|
|
15683
15683
|
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
@@ -15688,13 +15688,13 @@ function _createForOfIteratorHelperLoose4(r, e2) {
|
|
|
15688
15688
|
function _unsupportedIterableToArray4(r, a) {
|
|
15689
15689
|
if (r) {
|
|
15690
15690
|
if ("string" == typeof r) return _arrayLikeToArray4(r, a);
|
|
15691
|
-
var
|
|
15692
|
-
return "Object" ===
|
|
15691
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
15692
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray4(r, a) : void 0;
|
|
15693
15693
|
}
|
|
15694
15694
|
}
|
|
15695
15695
|
function _arrayLikeToArray4(r, a) {
|
|
15696
15696
|
(null == a || a > r.length) && (a = r.length);
|
|
15697
|
-
for (var
|
|
15697
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
15698
15698
|
return n;
|
|
15699
15699
|
}
|
|
15700
15700
|
function parseIncompletePhoneNumber(string) {
|
|
@@ -15721,11 +15721,11 @@ var init_parseIncompletePhoneNumber = __esm({
|
|
|
15721
15721
|
});
|
|
15722
15722
|
|
|
15723
15723
|
// ../../node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js
|
|
15724
|
-
function _createForOfIteratorHelperLoose5(r,
|
|
15725
|
-
var
|
|
15726
|
-
if (
|
|
15727
|
-
if (Array.isArray(r) || (
|
|
15728
|
-
|
|
15724
|
+
function _createForOfIteratorHelperLoose5(r, e) {
|
|
15725
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
15726
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
15727
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray5(r)) || e) {
|
|
15728
|
+
t && (r = t);
|
|
15729
15729
|
var o = 0;
|
|
15730
15730
|
return function() {
|
|
15731
15731
|
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
@@ -15736,13 +15736,13 @@ function _createForOfIteratorHelperLoose5(r, e2) {
|
|
|
15736
15736
|
function _unsupportedIterableToArray5(r, a) {
|
|
15737
15737
|
if (r) {
|
|
15738
15738
|
if ("string" == typeof r) return _arrayLikeToArray5(r, a);
|
|
15739
|
-
var
|
|
15740
|
-
return "Object" ===
|
|
15739
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
15740
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray5(r, a) : void 0;
|
|
15741
15741
|
}
|
|
15742
15742
|
}
|
|
15743
15743
|
function _arrayLikeToArray5(r, a) {
|
|
15744
15744
|
(null == a || a > r.length) && (a = r.length);
|
|
15745
|
-
for (var
|
|
15745
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
15746
15746
|
return n;
|
|
15747
15747
|
}
|
|
15748
15748
|
function getCountryByNationalNumber(nationalPhoneNumber, _ref) {
|
|
@@ -16082,43 +16082,43 @@ function _typeof6(o) {
|
|
|
16082
16082
|
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
|
16083
16083
|
}, _typeof6(o);
|
|
16084
16084
|
}
|
|
16085
|
-
function ownKeys3(
|
|
16086
|
-
var
|
|
16085
|
+
function ownKeys3(e, r) {
|
|
16086
|
+
var t = Object.keys(e);
|
|
16087
16087
|
if (Object.getOwnPropertySymbols) {
|
|
16088
|
-
var o = Object.getOwnPropertySymbols(
|
|
16088
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
16089
16089
|
r && (o = o.filter(function(r2) {
|
|
16090
|
-
return Object.getOwnPropertyDescriptor(
|
|
16091
|
-
})),
|
|
16090
|
+
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
16091
|
+
})), t.push.apply(t, o);
|
|
16092
16092
|
}
|
|
16093
|
-
return
|
|
16093
|
+
return t;
|
|
16094
16094
|
}
|
|
16095
|
-
function _objectSpread4(
|
|
16095
|
+
function _objectSpread4(e) {
|
|
16096
16096
|
for (var r = 1; r < arguments.length; r++) {
|
|
16097
|
-
var
|
|
16098
|
-
r % 2 ? ownKeys3(Object(
|
|
16099
|
-
_defineProperty4(
|
|
16100
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
16101
|
-
Object.defineProperty(
|
|
16097
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
16098
|
+
r % 2 ? ownKeys3(Object(t), true).forEach(function(r2) {
|
|
16099
|
+
_defineProperty4(e, r2, t[r2]);
|
|
16100
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys3(Object(t)).forEach(function(r2) {
|
|
16101
|
+
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
16102
16102
|
});
|
|
16103
16103
|
}
|
|
16104
|
-
return
|
|
16104
|
+
return e;
|
|
16105
16105
|
}
|
|
16106
|
-
function _defineProperty4(
|
|
16107
|
-
return (r = _toPropertyKey5(r)) in
|
|
16106
|
+
function _defineProperty4(e, r, t) {
|
|
16107
|
+
return (r = _toPropertyKey5(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e;
|
|
16108
16108
|
}
|
|
16109
|
-
function _toPropertyKey5(
|
|
16110
|
-
var
|
|
16111
|
-
return "symbol" == _typeof6(
|
|
16109
|
+
function _toPropertyKey5(t) {
|
|
16110
|
+
var i = _toPrimitive5(t, "string");
|
|
16111
|
+
return "symbol" == _typeof6(i) ? i : i + "";
|
|
16112
16112
|
}
|
|
16113
|
-
function _toPrimitive5(
|
|
16114
|
-
if ("object" != _typeof6(
|
|
16115
|
-
var
|
|
16116
|
-
if (void 0 !==
|
|
16117
|
-
var
|
|
16118
|
-
if ("object" != _typeof6(
|
|
16113
|
+
function _toPrimitive5(t, r) {
|
|
16114
|
+
if ("object" != _typeof6(t) || !t) return t;
|
|
16115
|
+
var e = t[Symbol.toPrimitive];
|
|
16116
|
+
if (void 0 !== e) {
|
|
16117
|
+
var i = e.call(t, r);
|
|
16118
|
+
if ("object" != _typeof6(i)) return i;
|
|
16119
16119
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
16120
16120
|
}
|
|
16121
|
-
return ("string" === r ? String : Number)(
|
|
16121
|
+
return ("string" === r ? String : Number)(t);
|
|
16122
16122
|
}
|
|
16123
16123
|
function parsePhoneNumberWithError(text, options, metadata) {
|
|
16124
16124
|
return parse2(text, _objectSpread4(_objectSpread4({}, options), {}, {
|
|
@@ -16140,46 +16140,46 @@ function _typeof7(o) {
|
|
|
16140
16140
|
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
|
16141
16141
|
}, _typeof7(o);
|
|
16142
16142
|
}
|
|
16143
|
-
function ownKeys4(
|
|
16144
|
-
var
|
|
16143
|
+
function ownKeys4(e, r) {
|
|
16144
|
+
var t = Object.keys(e);
|
|
16145
16145
|
if (Object.getOwnPropertySymbols) {
|
|
16146
|
-
var o = Object.getOwnPropertySymbols(
|
|
16146
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
16147
16147
|
r && (o = o.filter(function(r2) {
|
|
16148
|
-
return Object.getOwnPropertyDescriptor(
|
|
16149
|
-
})),
|
|
16148
|
+
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
16149
|
+
})), t.push.apply(t, o);
|
|
16150
16150
|
}
|
|
16151
|
-
return
|
|
16151
|
+
return t;
|
|
16152
16152
|
}
|
|
16153
|
-
function _objectSpread5(
|
|
16153
|
+
function _objectSpread5(e) {
|
|
16154
16154
|
for (var r = 1; r < arguments.length; r++) {
|
|
16155
|
-
var
|
|
16156
|
-
r % 2 ? ownKeys4(Object(
|
|
16157
|
-
_defineProperty5(
|
|
16158
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
16159
|
-
Object.defineProperty(
|
|
16155
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
16156
|
+
r % 2 ? ownKeys4(Object(t), true).forEach(function(r2) {
|
|
16157
|
+
_defineProperty5(e, r2, t[r2]);
|
|
16158
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys4(Object(t)).forEach(function(r2) {
|
|
16159
|
+
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
16160
16160
|
});
|
|
16161
16161
|
}
|
|
16162
|
-
return
|
|
16162
|
+
return e;
|
|
16163
16163
|
}
|
|
16164
|
-
function _defineProperty5(
|
|
16165
|
-
return (r = _toPropertyKey6(r)) in
|
|
16164
|
+
function _defineProperty5(e, r, t) {
|
|
16165
|
+
return (r = _toPropertyKey6(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e;
|
|
16166
16166
|
}
|
|
16167
|
-
function _toPropertyKey6(
|
|
16168
|
-
var
|
|
16169
|
-
return "symbol" == _typeof7(
|
|
16167
|
+
function _toPropertyKey6(t) {
|
|
16168
|
+
var i = _toPrimitive6(t, "string");
|
|
16169
|
+
return "symbol" == _typeof7(i) ? i : i + "";
|
|
16170
16170
|
}
|
|
16171
|
-
function _toPrimitive6(
|
|
16172
|
-
if ("object" != _typeof7(
|
|
16173
|
-
var
|
|
16174
|
-
if (void 0 !==
|
|
16175
|
-
var
|
|
16176
|
-
if ("object" != _typeof7(
|
|
16171
|
+
function _toPrimitive6(t, r) {
|
|
16172
|
+
if ("object" != _typeof7(t) || !t) return t;
|
|
16173
|
+
var e = t[Symbol.toPrimitive];
|
|
16174
|
+
if (void 0 !== e) {
|
|
16175
|
+
var i = e.call(t, r);
|
|
16176
|
+
if ("object" != _typeof7(i)) return i;
|
|
16177
16177
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
16178
16178
|
}
|
|
16179
|
-
return ("string" === r ? String : Number)(
|
|
16179
|
+
return ("string" === r ? String : Number)(t);
|
|
16180
16180
|
}
|
|
16181
|
-
function _slicedToArray(r,
|
|
16182
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r,
|
|
16181
|
+
function _slicedToArray(r, e) {
|
|
16182
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray6(r, e) || _nonIterableRest();
|
|
16183
16183
|
}
|
|
16184
16184
|
function _nonIterableRest() {
|
|
16185
16185
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
@@ -16187,26 +16187,26 @@ function _nonIterableRest() {
|
|
|
16187
16187
|
function _unsupportedIterableToArray6(r, a) {
|
|
16188
16188
|
if (r) {
|
|
16189
16189
|
if ("string" == typeof r) return _arrayLikeToArray6(r, a);
|
|
16190
|
-
var
|
|
16191
|
-
return "Object" ===
|
|
16190
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
16191
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray6(r, a) : void 0;
|
|
16192
16192
|
}
|
|
16193
16193
|
}
|
|
16194
16194
|
function _arrayLikeToArray6(r, a) {
|
|
16195
16195
|
(null == a || a > r.length) && (a = r.length);
|
|
16196
|
-
for (var
|
|
16196
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
16197
16197
|
return n;
|
|
16198
16198
|
}
|
|
16199
16199
|
function _iterableToArrayLimit(r, l) {
|
|
16200
|
-
var
|
|
16201
|
-
if (null !=
|
|
16202
|
-
var
|
|
16200
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
16201
|
+
if (null != t) {
|
|
16202
|
+
var e, n, i, u, a = [], f = true, o = false;
|
|
16203
16203
|
try {
|
|
16204
|
-
if (
|
|
16204
|
+
if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true) ;
|
|
16205
16205
|
} catch (r2) {
|
|
16206
16206
|
o = true, n = r2;
|
|
16207
16207
|
} finally {
|
|
16208
16208
|
try {
|
|
16209
|
-
if (!f && null !=
|
|
16209
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
16210
16210
|
} finally {
|
|
16211
16211
|
if (o) throw n;
|
|
16212
16212
|
}
|
|
@@ -16344,9 +16344,9 @@ function validatePhoneNumber(data, lenientPhoneValidation) {
|
|
|
16344
16344
|
} else {
|
|
16345
16345
|
return void 0;
|
|
16346
16346
|
}
|
|
16347
|
-
} catch (
|
|
16348
|
-
if (
|
|
16349
|
-
return phoneValidationErrorMessages(
|
|
16347
|
+
} catch (e) {
|
|
16348
|
+
if (e instanceof ParseError) {
|
|
16349
|
+
return phoneValidationErrorMessages(e, data);
|
|
16350
16350
|
} else {
|
|
16351
16351
|
return {
|
|
16352
16352
|
keyword: "format",
|
|
@@ -16376,8 +16376,8 @@ function compileAllowedCountryCodesValidation(schema) {
|
|
|
16376
16376
|
};
|
|
16377
16377
|
return validate2;
|
|
16378
16378
|
}
|
|
16379
|
-
function phoneValidationErrorMessages(
|
|
16380
|
-
switch (
|
|
16379
|
+
function phoneValidationErrorMessages(e, data) {
|
|
16380
|
+
switch (e.message) {
|
|
16381
16381
|
case "INVALID_COUNTRY":
|
|
16382
16382
|
return {
|
|
16383
16383
|
keyword: "countryCode",
|
|
@@ -16494,8 +16494,8 @@ var require_dist2 = __commonJS({
|
|
|
16494
16494
|
}
|
|
16495
16495
|
if (items) {
|
|
16496
16496
|
errors.items = {};
|
|
16497
|
-
for (let
|
|
16498
|
-
errors.items[
|
|
16497
|
+
for (let i = 0; i < items.length; i++)
|
|
16498
|
+
errors.items[i] = [];
|
|
16499
16499
|
}
|
|
16500
16500
|
return errors;
|
|
16501
16501
|
}
|
|
@@ -16751,11 +16751,11 @@ var require_uniqueItemProperties = __commonJS({
|
|
|
16751
16751
|
hash[p] = true;
|
|
16752
16752
|
}
|
|
16753
16753
|
} else {
|
|
16754
|
-
for (let
|
|
16755
|
-
const x = data[
|
|
16754
|
+
for (let i = data.length; i--; ) {
|
|
16755
|
+
const x = data[i];
|
|
16756
16756
|
if (!x || typeof x != "object")
|
|
16757
16757
|
continue;
|
|
16758
|
-
for (let j =
|
|
16758
|
+
for (let j = i; j--; ) {
|
|
16759
16759
|
const y = data[j];
|
|
16760
16760
|
if (y && typeof y == "object" && equal(x[key], y[key]))
|
|
16761
16761
|
return false;
|
|
@@ -16776,8 +16776,8 @@ var require_uniqueItemProperties = __commonJS({
|
|
|
16776
16776
|
function getScalarKeys(keys2, schema) {
|
|
16777
16777
|
return keys2.map((key) => {
|
|
16778
16778
|
var _a, _b, _c;
|
|
16779
|
-
const
|
|
16780
|
-
return Array.isArray(
|
|
16779
|
+
const t = (_c = (_b = (_a = schema.items) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b[key]) === null || _c === void 0 ? void 0 : _c.type;
|
|
16780
|
+
return Array.isArray(t) ? !t.includes("object") && !t.includes("array") : SCALAR_TYPES.includes(t);
|
|
16781
16781
|
});
|
|
16782
16782
|
}
|
|
16783
16783
|
module.exports = getDef;
|
|
@@ -16902,99 +16902,99 @@ var init_form_schema_mapper = __esm({
|
|
|
16902
16902
|
// ../../node_modules/dayjs/dayjs.min.js
|
|
16903
16903
|
var require_dayjs_min = __commonJS({
|
|
16904
16904
|
"../../node_modules/dayjs/dayjs.min.js"(exports, module) {
|
|
16905
|
-
!(function(
|
|
16906
|
-
"object" == typeof exports && "undefined" != typeof module ? module.exports =
|
|
16905
|
+
!(function(t, e) {
|
|
16906
|
+
"object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e();
|
|
16907
16907
|
})(exports, (function() {
|
|
16908
|
-
var
|
|
16909
|
-
var
|
|
16910
|
-
return "[" +
|
|
16911
|
-
} }, m = function(
|
|
16912
|
-
var r2 = String(
|
|
16913
|
-
return !r2 || r2.length >=
|
|
16914
|
-
}, v = { s: m, z: function(
|
|
16915
|
-
var
|
|
16916
|
-
return (
|
|
16917
|
-
}, m: function
|
|
16918
|
-
if (
|
|
16919
|
-
var r2 = 12 * (n2.year() -
|
|
16920
|
-
return +(-(r2 + (n2 -
|
|
16921
|
-
}, a: function(
|
|
16922
|
-
return
|
|
16923
|
-
}, p: function(
|
|
16924
|
-
return { M: c, y: h, w: o, d: a, D: d, h: u, m: s, s:
|
|
16925
|
-
}, u: function(
|
|
16926
|
-
return void 0 ===
|
|
16908
|
+
var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) {
|
|
16909
|
+
var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
|
|
16910
|
+
return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
|
|
16911
|
+
} }, m = function(t2, e2, n2) {
|
|
16912
|
+
var r2 = String(t2);
|
|
16913
|
+
return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2;
|
|
16914
|
+
}, v = { s: m, z: function(t2) {
|
|
16915
|
+
var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
|
|
16916
|
+
return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
|
|
16917
|
+
}, m: function t2(e2, n2) {
|
|
16918
|
+
if (e2.date() < n2.date()) return -t2(n2, e2);
|
|
16919
|
+
var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, c), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), c);
|
|
16920
|
+
return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
|
|
16921
|
+
}, a: function(t2) {
|
|
16922
|
+
return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
|
|
16923
|
+
}, p: function(t2) {
|
|
16924
|
+
return { M: c, y: h, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: f }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
|
|
16925
|
+
}, u: function(t2) {
|
|
16926
|
+
return void 0 === t2;
|
|
16927
16927
|
} }, g = "en", D = {};
|
|
16928
16928
|
D[g] = M;
|
|
16929
|
-
var p = "$isDayjsObject", S = function(
|
|
16930
|
-
return
|
|
16931
|
-
}, w = function
|
|
16932
|
-
var
|
|
16933
|
-
if (!
|
|
16934
|
-
if ("string" == typeof
|
|
16935
|
-
var s2 =
|
|
16936
|
-
D[s2] && (
|
|
16937
|
-
var u2 =
|
|
16938
|
-
if (!
|
|
16929
|
+
var p = "$isDayjsObject", S = function(t2) {
|
|
16930
|
+
return t2 instanceof _23 || !(!t2 || !t2[p]);
|
|
16931
|
+
}, w = function t2(e2, n2, r2) {
|
|
16932
|
+
var i2;
|
|
16933
|
+
if (!e2) return g;
|
|
16934
|
+
if ("string" == typeof e2) {
|
|
16935
|
+
var s2 = e2.toLowerCase();
|
|
16936
|
+
D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2);
|
|
16937
|
+
var u2 = e2.split("-");
|
|
16938
|
+
if (!i2 && u2.length > 1) return t2(u2[0]);
|
|
16939
16939
|
} else {
|
|
16940
|
-
var a2 =
|
|
16941
|
-
D[a2] =
|
|
16942
|
-
}
|
|
16943
|
-
return !r2 &&
|
|
16944
|
-
}, O = function(
|
|
16945
|
-
if (S(
|
|
16946
|
-
var n2 = "object" == typeof
|
|
16947
|
-
return n2.date =
|
|
16940
|
+
var a2 = e2.name;
|
|
16941
|
+
D[a2] = e2, i2 = a2;
|
|
16942
|
+
}
|
|
16943
|
+
return !r2 && i2 && (g = i2), i2 || !r2 && g;
|
|
16944
|
+
}, O = function(t2, e2) {
|
|
16945
|
+
if (S(t2)) return t2.clone();
|
|
16946
|
+
var n2 = "object" == typeof e2 ? e2 : {};
|
|
16947
|
+
return n2.date = t2, n2.args = arguments, new _23(n2);
|
|
16948
16948
|
}, b = v;
|
|
16949
|
-
b.l = w, b.i = S, b.w = function(
|
|
16950
|
-
return O(
|
|
16949
|
+
b.l = w, b.i = S, b.w = function(t2, e2) {
|
|
16950
|
+
return O(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
|
|
16951
16951
|
};
|
|
16952
16952
|
var _23 = (function() {
|
|
16953
|
-
function M2(
|
|
16954
|
-
this.$L = w(
|
|
16953
|
+
function M2(t2) {
|
|
16954
|
+
this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p] = true;
|
|
16955
16955
|
}
|
|
16956
16956
|
var m2 = M2.prototype;
|
|
16957
|
-
return m2.parse = function(
|
|
16958
|
-
this.$d = (function(
|
|
16959
|
-
var
|
|
16960
|
-
if (null ===
|
|
16961
|
-
if (b.u(
|
|
16962
|
-
if (
|
|
16963
|
-
if ("string" == typeof
|
|
16964
|
-
var r2 =
|
|
16957
|
+
return m2.parse = function(t2) {
|
|
16958
|
+
this.$d = (function(t3) {
|
|
16959
|
+
var e2 = t3.date, n2 = t3.utc;
|
|
16960
|
+
if (null === e2) return /* @__PURE__ */ new Date(NaN);
|
|
16961
|
+
if (b.u(e2)) return /* @__PURE__ */ new Date();
|
|
16962
|
+
if (e2 instanceof Date) return new Date(e2);
|
|
16963
|
+
if ("string" == typeof e2 && !/Z$/i.test(e2)) {
|
|
16964
|
+
var r2 = e2.match($);
|
|
16965
16965
|
if (r2) {
|
|
16966
|
-
var
|
|
16967
|
-
return n2 ? new Date(Date.UTC(r2[1],
|
|
16966
|
+
var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3);
|
|
16967
|
+
return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2);
|
|
16968
16968
|
}
|
|
16969
16969
|
}
|
|
16970
|
-
return new Date(
|
|
16971
|
-
})(
|
|
16970
|
+
return new Date(e2);
|
|
16971
|
+
})(t2), this.init();
|
|
16972
16972
|
}, m2.init = function() {
|
|
16973
|
-
var
|
|
16974
|
-
this.$y =
|
|
16973
|
+
var t2 = this.$d;
|
|
16974
|
+
this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
|
|
16975
16975
|
}, m2.$utils = function() {
|
|
16976
16976
|
return b;
|
|
16977
16977
|
}, m2.isValid = function() {
|
|
16978
16978
|
return !(this.$d.toString() === l);
|
|
16979
|
-
}, m2.isSame = function(
|
|
16980
|
-
var n2 = O(
|
|
16981
|
-
return this.startOf(
|
|
16982
|
-
}, m2.isAfter = function(
|
|
16983
|
-
return O(
|
|
16984
|
-
}, m2.isBefore = function(
|
|
16985
|
-
return this.endOf(
|
|
16986
|
-
}, m2.$g = function(
|
|
16987
|
-
return b.u(
|
|
16979
|
+
}, m2.isSame = function(t2, e2) {
|
|
16980
|
+
var n2 = O(t2);
|
|
16981
|
+
return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
|
|
16982
|
+
}, m2.isAfter = function(t2, e2) {
|
|
16983
|
+
return O(t2) < this.startOf(e2);
|
|
16984
|
+
}, m2.isBefore = function(t2, e2) {
|
|
16985
|
+
return this.endOf(e2) < O(t2);
|
|
16986
|
+
}, m2.$g = function(t2, e2, n2) {
|
|
16987
|
+
return b.u(t2) ? this[e2] : this.set(n2, t2);
|
|
16988
16988
|
}, m2.unix = function() {
|
|
16989
16989
|
return Math.floor(this.valueOf() / 1e3);
|
|
16990
16990
|
}, m2.valueOf = function() {
|
|
16991
16991
|
return this.$d.getTime();
|
|
16992
|
-
}, m2.startOf = function(
|
|
16993
|
-
var n2 = this, r2 = !!b.u(
|
|
16994
|
-
var
|
|
16995
|
-
return r2 ?
|
|
16996
|
-
}, $2 = function(
|
|
16997
|
-
return b.w(n2.toDate()[
|
|
16992
|
+
}, m2.startOf = function(t2, e2) {
|
|
16993
|
+
var n2 = this, r2 = !!b.u(e2) || e2, f2 = b.p(t2), l2 = function(t3, e3) {
|
|
16994
|
+
var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
|
|
16995
|
+
return r2 ? i2 : i2.endOf(a);
|
|
16996
|
+
}, $2 = function(t3, e3) {
|
|
16997
|
+
return b.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
|
|
16998
16998
|
}, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
|
|
16999
16999
|
switch (f2) {
|
|
17000
17000
|
case h:
|
|
@@ -17011,57 +17011,57 @@ var require_dayjs_min = __commonJS({
|
|
|
17011
17011
|
return $2(v2 + "Minutes", 1);
|
|
17012
17012
|
case s:
|
|
17013
17013
|
return $2(v2 + "Seconds", 2);
|
|
17014
|
-
case
|
|
17014
|
+
case i:
|
|
17015
17015
|
return $2(v2 + "Milliseconds", 3);
|
|
17016
17016
|
default:
|
|
17017
17017
|
return this.clone();
|
|
17018
17018
|
}
|
|
17019
|
-
}, m2.endOf = function(
|
|
17020
|
-
return this.startOf(
|
|
17021
|
-
}, m2.$set = function(
|
|
17022
|
-
var n2, o2 = b.p(
|
|
17019
|
+
}, m2.endOf = function(t2) {
|
|
17020
|
+
return this.startOf(t2, false);
|
|
17021
|
+
}, m2.$set = function(t2, e2) {
|
|
17022
|
+
var n2, o2 = b.p(t2), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
|
|
17023
17023
|
if (o2 === c || o2 === h) {
|
|
17024
17024
|
var y2 = this.clone().set(d, 1);
|
|
17025
17025
|
y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
|
|
17026
17026
|
} else l2 && this.$d[l2]($2);
|
|
17027
17027
|
return this.init(), this;
|
|
17028
|
-
}, m2.set = function(
|
|
17029
|
-
return this.clone().$set(
|
|
17030
|
-
}, m2.get = function(
|
|
17031
|
-
return this[b.p(
|
|
17028
|
+
}, m2.set = function(t2, e2) {
|
|
17029
|
+
return this.clone().$set(t2, e2);
|
|
17030
|
+
}, m2.get = function(t2) {
|
|
17031
|
+
return this[b.p(t2)]();
|
|
17032
17032
|
}, m2.add = function(r2, f2) {
|
|
17033
17033
|
var d2, l2 = this;
|
|
17034
17034
|
r2 = Number(r2);
|
|
17035
|
-
var $2 = b.p(f2), y2 = function(
|
|
17036
|
-
var
|
|
17037
|
-
return b.w(
|
|
17035
|
+
var $2 = b.p(f2), y2 = function(t2) {
|
|
17036
|
+
var e2 = O(l2);
|
|
17037
|
+
return b.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
|
|
17038
17038
|
};
|
|
17039
17039
|
if ($2 === c) return this.set(c, this.$M + r2);
|
|
17040
17040
|
if ($2 === h) return this.set(h, this.$y + r2);
|
|
17041
17041
|
if ($2 === a) return y2(1);
|
|
17042
17042
|
if ($2 === o) return y2(7);
|
|
17043
|
-
var M3 = (d2 = {}, d2[s] =
|
|
17043
|
+
var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
|
|
17044
17044
|
return b.w(m3, this);
|
|
17045
|
-
}, m2.subtract = function(
|
|
17046
|
-
return this.add(-1 *
|
|
17047
|
-
}, m2.format = function(
|
|
17048
|
-
var
|
|
17045
|
+
}, m2.subtract = function(t2, e2) {
|
|
17046
|
+
return this.add(-1 * t2, e2);
|
|
17047
|
+
}, m2.format = function(t2) {
|
|
17048
|
+
var e2 = this, n2 = this.$locale();
|
|
17049
17049
|
if (!this.isValid()) return n2.invalidDate || l;
|
|
17050
|
-
var r2 =
|
|
17051
|
-
return
|
|
17052
|
-
}, d2 = function(
|
|
17053
|
-
return b.s(s2 % 12 || 12,
|
|
17054
|
-
}, $2 = f2 || function(
|
|
17055
|
-
var r3 =
|
|
17050
|
+
var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = function(t3, n3, i3, s3) {
|
|
17051
|
+
return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
|
|
17052
|
+
}, d2 = function(t3) {
|
|
17053
|
+
return b.s(s2 % 12 || 12, t3, "0");
|
|
17054
|
+
}, $2 = f2 || function(t3, e3, n3) {
|
|
17055
|
+
var r3 = t3 < 12 ? "AM" : "PM";
|
|
17056
17056
|
return n3 ? r3.toLowerCase() : r3;
|
|
17057
17057
|
};
|
|
17058
|
-
return r2.replace(y, (function(
|
|
17059
|
-
return r3 || (function(
|
|
17060
|
-
switch (
|
|
17058
|
+
return r2.replace(y, (function(t3, r3) {
|
|
17059
|
+
return r3 || (function(t4) {
|
|
17060
|
+
switch (t4) {
|
|
17061
17061
|
case "YY":
|
|
17062
|
-
return String(
|
|
17062
|
+
return String(e2.$y).slice(-2);
|
|
17063
17063
|
case "YYYY":
|
|
17064
|
-
return b.s(
|
|
17064
|
+
return b.s(e2.$y, 4, "0");
|
|
17065
17065
|
case "M":
|
|
17066
17066
|
return a2 + 1;
|
|
17067
17067
|
case "MM":
|
|
@@ -17071,17 +17071,17 @@ var require_dayjs_min = __commonJS({
|
|
|
17071
17071
|
case "MMMM":
|
|
17072
17072
|
return h2(c2, a2);
|
|
17073
17073
|
case "D":
|
|
17074
|
-
return
|
|
17074
|
+
return e2.$D;
|
|
17075
17075
|
case "DD":
|
|
17076
|
-
return b.s(
|
|
17076
|
+
return b.s(e2.$D, 2, "0");
|
|
17077
17077
|
case "d":
|
|
17078
|
-
return String(
|
|
17078
|
+
return String(e2.$W);
|
|
17079
17079
|
case "dd":
|
|
17080
|
-
return h2(n2.weekdaysMin,
|
|
17080
|
+
return h2(n2.weekdaysMin, e2.$W, o2, 2);
|
|
17081
17081
|
case "ddd":
|
|
17082
|
-
return h2(n2.weekdaysShort,
|
|
17082
|
+
return h2(n2.weekdaysShort, e2.$W, o2, 3);
|
|
17083
17083
|
case "dddd":
|
|
17084
|
-
return o2[
|
|
17084
|
+
return o2[e2.$W];
|
|
17085
17085
|
case "H":
|
|
17086
17086
|
return String(s2);
|
|
17087
17087
|
case "HH":
|
|
@@ -17099,21 +17099,21 @@ var require_dayjs_min = __commonJS({
|
|
|
17099
17099
|
case "mm":
|
|
17100
17100
|
return b.s(u2, 2, "0");
|
|
17101
17101
|
case "s":
|
|
17102
|
-
return String(
|
|
17102
|
+
return String(e2.$s);
|
|
17103
17103
|
case "ss":
|
|
17104
|
-
return b.s(
|
|
17104
|
+
return b.s(e2.$s, 2, "0");
|
|
17105
17105
|
case "SSS":
|
|
17106
|
-
return b.s(
|
|
17106
|
+
return b.s(e2.$ms, 3, "0");
|
|
17107
17107
|
case "Z":
|
|
17108
|
-
return
|
|
17108
|
+
return i2;
|
|
17109
17109
|
}
|
|
17110
17110
|
return null;
|
|
17111
|
-
})(
|
|
17111
|
+
})(t3) || i2.replace(":", "");
|
|
17112
17112
|
}));
|
|
17113
17113
|
}, m2.utcOffset = function() {
|
|
17114
17114
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
17115
17115
|
}, m2.diff = function(r2, d2, l2) {
|
|
17116
|
-
var $2, y2 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) *
|
|
17116
|
+
var $2, y2 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
|
|
17117
17117
|
return b.m(y2, m3);
|
|
17118
17118
|
};
|
|
17119
17119
|
switch (M3) {
|
|
@@ -17136,10 +17136,10 @@ var require_dayjs_min = __commonJS({
|
|
|
17136
17136
|
$2 = g2 / n;
|
|
17137
17137
|
break;
|
|
17138
17138
|
case s:
|
|
17139
|
-
$2 = g2 /
|
|
17139
|
+
$2 = g2 / e;
|
|
17140
17140
|
break;
|
|
17141
|
-
case
|
|
17142
|
-
$2 = g2 /
|
|
17141
|
+
case i:
|
|
17142
|
+
$2 = g2 / t;
|
|
17143
17143
|
break;
|
|
17144
17144
|
default:
|
|
17145
17145
|
$2 = g2;
|
|
@@ -17149,9 +17149,9 @@ var require_dayjs_min = __commonJS({
|
|
|
17149
17149
|
return this.endOf(c).$D;
|
|
17150
17150
|
}, m2.$locale = function() {
|
|
17151
17151
|
return D[this.$L];
|
|
17152
|
-
}, m2.locale = function(
|
|
17153
|
-
if (!
|
|
17154
|
-
var n2 = this.clone(), r2 = w(
|
|
17152
|
+
}, m2.locale = function(t2, e2) {
|
|
17153
|
+
if (!t2) return this.$L;
|
|
17154
|
+
var n2 = this.clone(), r2 = w(t2, e2, true);
|
|
17155
17155
|
return r2 && (n2.$L = r2), n2;
|
|
17156
17156
|
}, m2.clone = function() {
|
|
17157
17157
|
return b.w(this.$d, this);
|
|
@@ -17165,14 +17165,14 @@ var require_dayjs_min = __commonJS({
|
|
|
17165
17165
|
return this.$d.toUTCString();
|
|
17166
17166
|
}, M2;
|
|
17167
17167
|
})(), k = _23.prototype;
|
|
17168
|
-
return O.prototype = k, [["$ms", r], ["$s",
|
|
17169
|
-
k[
|
|
17170
|
-
return this.$g(
|
|
17168
|
+
return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach((function(t2) {
|
|
17169
|
+
k[t2[1]] = function(e2) {
|
|
17170
|
+
return this.$g(e2, t2[0], t2[1]);
|
|
17171
17171
|
};
|
|
17172
|
-
})), O.extend = function(
|
|
17173
|
-
return
|
|
17174
|
-
}, O.locale = w, O.isDayjs = S, O.unix = function(
|
|
17175
|
-
return O(1e3 *
|
|
17172
|
+
})), O.extend = function(t2, e2) {
|
|
17173
|
+
return t2.$i || (t2(e2, _23, O), t2.$i = true), O;
|
|
17174
|
+
}, O.locale = w, O.isDayjs = S, O.unix = function(t2) {
|
|
17175
|
+
return O(1e3 * t2);
|
|
17176
17176
|
}, O.en = D[g], O.Ls = D, O.p = {}, O;
|
|
17177
17177
|
}));
|
|
17178
17178
|
}
|
|
@@ -17181,41 +17181,41 @@ var require_dayjs_min = __commonJS({
|
|
|
17181
17181
|
// ../../node_modules/dayjs/plugin/utc.js
|
|
17182
17182
|
var require_utc = __commonJS({
|
|
17183
17183
|
"../../node_modules/dayjs/plugin/utc.js"(exports, module) {
|
|
17184
|
-
!(function(
|
|
17185
|
-
"object" == typeof exports && "undefined" != typeof module ? module.exports =
|
|
17184
|
+
!(function(t, i) {
|
|
17185
|
+
"object" == typeof exports && "undefined" != typeof module ? module.exports = i() : "function" == typeof define && define.amd ? define(i) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs_plugin_utc = i();
|
|
17186
17186
|
})(exports, (function() {
|
|
17187
|
-
var
|
|
17187
|
+
var t = "minute", i = /[+-]\d\d(?::?\d\d)?/g, e = /([+-]|\d\d)/g;
|
|
17188
17188
|
return function(s, f, n) {
|
|
17189
17189
|
var u = f.prototype;
|
|
17190
|
-
n.utc = function(
|
|
17191
|
-
var
|
|
17192
|
-
return new f(
|
|
17193
|
-
}, u.utc = function(
|
|
17194
|
-
var
|
|
17195
|
-
return
|
|
17190
|
+
n.utc = function(t2) {
|
|
17191
|
+
var i2 = { date: t2, utc: true, args: arguments };
|
|
17192
|
+
return new f(i2);
|
|
17193
|
+
}, u.utc = function(i2) {
|
|
17194
|
+
var e2 = n(this.toDate(), { locale: this.$L, utc: true });
|
|
17195
|
+
return i2 ? e2.add(this.utcOffset(), t) : e2;
|
|
17196
17196
|
}, u.local = function() {
|
|
17197
17197
|
return n(this.toDate(), { locale: this.$L, utc: false });
|
|
17198
17198
|
};
|
|
17199
17199
|
var r = u.parse;
|
|
17200
|
-
u.parse = function(
|
|
17201
|
-
|
|
17200
|
+
u.parse = function(t2) {
|
|
17201
|
+
t2.utc && (this.$u = true), this.$utils().u(t2.$offset) || (this.$offset = t2.$offset), r.call(this, t2);
|
|
17202
17202
|
};
|
|
17203
17203
|
var o = u.init;
|
|
17204
17204
|
u.init = function() {
|
|
17205
17205
|
if (this.$u) {
|
|
17206
|
-
var
|
|
17207
|
-
this.$y =
|
|
17206
|
+
var t2 = this.$d;
|
|
17207
|
+
this.$y = t2.getUTCFullYear(), this.$M = t2.getUTCMonth(), this.$D = t2.getUTCDate(), this.$W = t2.getUTCDay(), this.$H = t2.getUTCHours(), this.$m = t2.getUTCMinutes(), this.$s = t2.getUTCSeconds(), this.$ms = t2.getUTCMilliseconds();
|
|
17208
17208
|
} else o.call(this);
|
|
17209
17209
|
};
|
|
17210
17210
|
var a = u.utcOffset;
|
|
17211
17211
|
u.utcOffset = function(s2, f2) {
|
|
17212
17212
|
var n2 = this.$utils().u;
|
|
17213
17213
|
if (n2(s2)) return this.$u ? 0 : n2(this.$offset) ? a.call(this) : this.$offset;
|
|
17214
|
-
if ("string" == typeof s2 && (s2 = (function(
|
|
17215
|
-
void 0 ===
|
|
17216
|
-
var s3 =
|
|
17214
|
+
if ("string" == typeof s2 && (s2 = (function(t2) {
|
|
17215
|
+
void 0 === t2 && (t2 = "");
|
|
17216
|
+
var s3 = t2.match(i);
|
|
17217
17217
|
if (!s3) return null;
|
|
17218
|
-
var f3 = ("" + s3[0]).match(
|
|
17218
|
+
var f3 = ("" + s3[0]).match(e) || ["-", 0, 0], n3 = f3[0], u3 = 60 * +f3[1] + +f3[2];
|
|
17219
17219
|
return 0 === u3 ? 0 : "+" === n3 ? u3 : -u3;
|
|
17220
17220
|
})(s2), null === s2)) return this;
|
|
17221
17221
|
var u2 = Math.abs(s2) <= 16 ? 60 * s2 : s2;
|
|
@@ -17223,15 +17223,15 @@ var require_utc = __commonJS({
|
|
|
17223
17223
|
var r2 = this.clone();
|
|
17224
17224
|
if (f2) return r2.$offset = u2, r2.$u = false, r2;
|
|
17225
17225
|
var o2 = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
17226
|
-
return (r2 = this.local().add(u2 + o2,
|
|
17226
|
+
return (r2 = this.local().add(u2 + o2, t)).$offset = u2, r2.$x.$localOffset = o2, r2;
|
|
17227
17227
|
};
|
|
17228
17228
|
var h = u.format;
|
|
17229
|
-
u.format = function(
|
|
17230
|
-
var
|
|
17231
|
-
return h.call(this,
|
|
17229
|
+
u.format = function(t2) {
|
|
17230
|
+
var i2 = t2 || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
17231
|
+
return h.call(this, i2);
|
|
17232
17232
|
}, u.valueOf = function() {
|
|
17233
|
-
var
|
|
17234
|
-
return this.$d.valueOf() - 6e4 *
|
|
17233
|
+
var t2 = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
17234
|
+
return this.$d.valueOf() - 6e4 * t2;
|
|
17235
17235
|
}, u.isUTC = function() {
|
|
17236
17236
|
return !!this.$u;
|
|
17237
17237
|
}, u.toISOString = function() {
|
|
@@ -17240,14 +17240,14 @@ var require_utc = __commonJS({
|
|
|
17240
17240
|
return this.toDate().toUTCString();
|
|
17241
17241
|
};
|
|
17242
17242
|
var l = u.toDate;
|
|
17243
|
-
u.toDate = function(
|
|
17244
|
-
return "s" ===
|
|
17243
|
+
u.toDate = function(t2) {
|
|
17244
|
+
return "s" === t2 && this.$offset ? n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : l.call(this);
|
|
17245
17245
|
};
|
|
17246
17246
|
var c = u.diff;
|
|
17247
|
-
u.diff = function(
|
|
17248
|
-
if (
|
|
17249
|
-
var s2 = this.local(), f2 = n(
|
|
17250
|
-
return c.call(s2, f2,
|
|
17247
|
+
u.diff = function(t2, i2, e2) {
|
|
17248
|
+
if (t2 && this.$u === t2.$u) return c.call(this, t2, i2, e2);
|
|
17249
|
+
var s2 = this.local(), f2 = n(t2).local();
|
|
17250
|
+
return c.call(s2, f2, i2, e2);
|
|
17251
17251
|
};
|
|
17252
17252
|
};
|
|
17253
17253
|
}));
|
|
@@ -17549,8 +17549,8 @@ function mapToStaticDate(value, currentDate) {
|
|
|
17549
17549
|
return setDate(amount, unit);
|
|
17550
17550
|
}
|
|
17551
17551
|
return void 0;
|
|
17552
|
-
} catch (
|
|
17553
|
-
console.error(`Failed to parse format ${value}`,
|
|
17552
|
+
} catch (e) {
|
|
17553
|
+
console.error(`Failed to parse format ${value}`, e);
|
|
17554
17554
|
return void 0;
|
|
17555
17555
|
}
|
|
17556
17556
|
}
|
|
@@ -19943,14 +19943,14 @@ var require_src2 = __commonJS({
|
|
|
19943
19943
|
return;
|
|
19944
19944
|
}
|
|
19945
19945
|
var len = parts.length;
|
|
19946
|
-
for (var
|
|
19947
|
-
var key = parts[
|
|
19948
|
-
if (
|
|
19946
|
+
for (var i = 0; i < len; i++) {
|
|
19947
|
+
var key = parts[i];
|
|
19948
|
+
if (i === len - 1) {
|
|
19949
19949
|
obj[key] = value;
|
|
19950
19950
|
return;
|
|
19951
19951
|
}
|
|
19952
19952
|
if (key === "*" && (0, ts_util_is_1.isArray)(obj)) {
|
|
19953
|
-
var remaining = parts.slice(
|
|
19953
|
+
var remaining = parts.slice(i + 1).join(".");
|
|
19954
19954
|
for (var _i = 0, obj_1 = obj; _i < obj_1.length; _i++) {
|
|
19955
19955
|
var item = obj_1[_i];
|
|
19956
19956
|
set2(item, remaining, value);
|
|
@@ -19978,9 +19978,9 @@ var require_src2 = __commonJS({
|
|
|
19978
19978
|
return;
|
|
19979
19979
|
}
|
|
19980
19980
|
var len = parts.length;
|
|
19981
|
-
for (var
|
|
19982
|
-
var key = parts[
|
|
19983
|
-
if (
|
|
19981
|
+
for (var i = 0; i < len; i++) {
|
|
19982
|
+
var key = parts[i];
|
|
19983
|
+
if (i === len - 1) {
|
|
19984
19984
|
return delete obj[key];
|
|
19985
19985
|
}
|
|
19986
19986
|
obj = obj[key];
|
|
@@ -20162,9 +20162,9 @@ var require_default_operators = __commonJS({
|
|
|
20162
20162
|
var require_engine = __commonJS({
|
|
20163
20163
|
"../../node_modules/js-rules-engine/dist/engine.js"(exports) {
|
|
20164
20164
|
var __spreadArrays4 = exports && exports.__spreadArrays || function() {
|
|
20165
|
-
for (var s = 0,
|
|
20166
|
-
for (var r = Array(s), k = 0,
|
|
20167
|
-
for (var a = arguments[
|
|
20165
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
20166
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
20167
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
20168
20168
|
r[k] = a[j];
|
|
20169
20169
|
return r;
|
|
20170
20170
|
};
|
|
@@ -20372,12 +20372,12 @@ var require_dist5 = __commonJS({
|
|
|
20372
20372
|
// ../../node_modules/dayjs/plugin/isSameOrAfter.js
|
|
20373
20373
|
var require_isSameOrAfter = __commonJS({
|
|
20374
20374
|
"../../node_modules/dayjs/plugin/isSameOrAfter.js"(exports, module) {
|
|
20375
|
-
!(function(
|
|
20376
|
-
"object" == typeof exports && "undefined" != typeof module ? module.exports =
|
|
20375
|
+
!(function(e, t) {
|
|
20376
|
+
"object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_isSameOrAfter = t();
|
|
20377
20377
|
})(exports, (function() {
|
|
20378
|
-
return function(
|
|
20379
|
-
|
|
20380
|
-
return this.isSame(
|
|
20378
|
+
return function(e, t) {
|
|
20379
|
+
t.prototype.isSameOrAfter = function(e2, t2) {
|
|
20380
|
+
return this.isSame(e2, t2) || this.isAfter(e2, t2);
|
|
20381
20381
|
};
|
|
20382
20382
|
};
|
|
20383
20383
|
}));
|
|
@@ -20387,12 +20387,12 @@ var require_isSameOrAfter = __commonJS({
|
|
|
20387
20387
|
// ../../node_modules/dayjs/plugin/isSameOrBefore.js
|
|
20388
20388
|
var require_isSameOrBefore = __commonJS({
|
|
20389
20389
|
"../../node_modules/dayjs/plugin/isSameOrBefore.js"(exports, module) {
|
|
20390
|
-
!(function(
|
|
20391
|
-
"object" == typeof exports && "undefined" != typeof module ? module.exports =
|
|
20390
|
+
!(function(e, i) {
|
|
20391
|
+
"object" == typeof exports && "undefined" != typeof module ? module.exports = i() : "function" == typeof define && define.amd ? define(i) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_isSameOrBefore = i();
|
|
20392
20392
|
})(exports, (function() {
|
|
20393
|
-
return function(
|
|
20394
|
-
|
|
20395
|
-
return this.isSame(
|
|
20393
|
+
return function(e, i) {
|
|
20394
|
+
i.prototype.isSameOrBefore = function(e2, i2) {
|
|
20395
|
+
return this.isSame(e2, i2) || this.isBefore(e2, i2);
|
|
20396
20396
|
};
|
|
20397
20397
|
};
|
|
20398
20398
|
}));
|
|
@@ -20538,8 +20538,7 @@ var EMPTY_VALUE = null;
|
|
|
20538
20538
|
|
|
20539
20539
|
// ../form-fields/dist/esm/constants/experiments.js
|
|
20540
20540
|
var EXPERIMENTS = {
|
|
20541
|
-
USE_FIELDS_V2: "specs.forms.UseFieldsV2"
|
|
20542
|
-
SUBMIT_STATUS_MESSAGE_VIEWER: "specs.forms.SubmitStatusMessageViewer"};
|
|
20541
|
+
USE_FIELDS_V2: "specs.forms.UseFieldsV2"};
|
|
20543
20542
|
|
|
20544
20543
|
// ../form-fields/dist/esm/constants/breakpoints.js
|
|
20545
20544
|
var Breakpoint = /* @__PURE__ */ (function(Breakpoint2) {
|
|
@@ -20548,49 +20547,49 @@ var Breakpoint = /* @__PURE__ */ (function(Breakpoint2) {
|
|
|
20548
20547
|
return Breakpoint2;
|
|
20549
20548
|
})({});
|
|
20550
20549
|
var DEFAULT_BREAKPOINT = Breakpoint.LARGE;
|
|
20551
|
-
var FieldValidationContext = /* @__PURE__ */
|
|
20552
|
-
var useFieldValidation = () =>
|
|
20550
|
+
var FieldValidationContext = /* @__PURE__ */ React31.createContext(null);
|
|
20551
|
+
var useFieldValidation = () => React31.useContext(FieldValidationContext) || {};
|
|
20553
20552
|
var FORM_STATUS = {
|
|
20554
20553
|
BUSY: "BUSY",
|
|
20555
20554
|
READY: "READY"
|
|
20556
20555
|
};
|
|
20557
|
-
var FormStatusContext = /* @__PURE__ */
|
|
20556
|
+
var FormStatusContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
20558
20557
|
var FormStatusProvider = (_ref) => {
|
|
20559
20558
|
let {
|
|
20560
20559
|
children,
|
|
20561
20560
|
onStatusChange
|
|
20562
20561
|
} = _ref;
|
|
20563
|
-
const previousFormStatus =
|
|
20564
|
-
const [fieldStatusByTarget, setFieldStatusByTarget] =
|
|
20565
|
-
const setFormStatus =
|
|
20562
|
+
const previousFormStatus = React31.useRef(FORM_STATUS.READY);
|
|
20563
|
+
const [fieldStatusByTarget, setFieldStatusByTarget] = React31.useState({});
|
|
20564
|
+
const setFormStatus = React31.useCallback((target, status) => {
|
|
20566
20565
|
setFieldStatusByTarget((previous) => ({
|
|
20567
20566
|
...previous,
|
|
20568
20567
|
[target]: status
|
|
20569
20568
|
}));
|
|
20570
20569
|
}, []);
|
|
20571
|
-
const currentFormStatus =
|
|
20570
|
+
const currentFormStatus = React31.useMemo(() => {
|
|
20572
20571
|
const isFormBusy = Object.values(fieldStatusByTarget).some((status) => status === FORM_STATUS.BUSY);
|
|
20573
20572
|
return isFormBusy ? FORM_STATUS.BUSY : FORM_STATUS.READY;
|
|
20574
20573
|
}, [fieldStatusByTarget]);
|
|
20575
|
-
|
|
20574
|
+
React31.useEffect(() => {
|
|
20576
20575
|
if (previousFormStatus.current !== currentFormStatus) {
|
|
20577
20576
|
previousFormStatus.current = currentFormStatus;
|
|
20578
20577
|
onStatusChange == null || onStatusChange(currentFormStatus);
|
|
20579
20578
|
}
|
|
20580
20579
|
}, [currentFormStatus, onStatusChange]);
|
|
20581
|
-
const contextValue =
|
|
20580
|
+
const contextValue = React31.useMemo(() => {
|
|
20582
20581
|
return {
|
|
20583
20582
|
formStatus: currentFormStatus,
|
|
20584
20583
|
setFormStatus
|
|
20585
20584
|
};
|
|
20586
20585
|
}, [currentFormStatus, setFormStatus]);
|
|
20587
|
-
return /* @__PURE__ */
|
|
20586
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(FormStatusContext.Provider, {
|
|
20588
20587
|
value: contextValue
|
|
20589
20588
|
}, children);
|
|
20590
20589
|
};
|
|
20591
|
-
var WixRicosViewerContext = /* @__PURE__ */
|
|
20590
|
+
var WixRicosViewerContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
20592
20591
|
function useWixRicosViewer() {
|
|
20593
|
-
const context =
|
|
20592
|
+
const context = React31.useContext(WixRicosViewerContext);
|
|
20594
20593
|
if (context === void 0) {
|
|
20595
20594
|
throw new Error("useWixRicosViewer must be used within a WixRicosViewerContext.Provider");
|
|
20596
20595
|
}
|
|
@@ -20646,22 +20645,22 @@ var ANCHOR_LINK = "anchor-link";
|
|
|
20646
20645
|
|
|
20647
20646
|
// ../../node_modules/@wix/ricos/dist/es/plugin-link/statics/link-viewer-scss.js
|
|
20648
20647
|
var link_viewer_default = {
|
|
20649
|
-
"link": "
|
|
20650
|
-
"linkInViewer": "
|
|
20648
|
+
"link": "FQtO1",
|
|
20649
|
+
"linkInViewer": "rdZDZ"};
|
|
20651
20650
|
|
|
20652
20651
|
// ../../node_modules/@wix/ricos/dist/es/plugin-link/nodeViewDecorators/anchor.js
|
|
20653
20652
|
var decorator = (anchorDecoration, element) => {
|
|
20654
20653
|
const { anchor } = anchorDecoration.anchorData;
|
|
20655
|
-
return /* @__PURE__ */
|
|
20654
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(
|
|
20656
20655
|
"a",
|
|
20657
20656
|
{
|
|
20658
20657
|
key: `anchor-${element?.key}`,
|
|
20659
20658
|
target: "_self",
|
|
20660
20659
|
href: `#viewer-${anchor}`,
|
|
20661
20660
|
className: (0, import_classnames.default)(link_viewer_default.link, link_viewer_default.linkInViewer),
|
|
20662
|
-
onClick: (
|
|
20663
|
-
|
|
20664
|
-
|
|
20661
|
+
onClick: (e) => {
|
|
20662
|
+
e.stopPropagation();
|
|
20663
|
+
e.preventDefault();
|
|
20665
20664
|
const anchorString = `viewer-${anchor}`;
|
|
20666
20665
|
const element2 = document.getElementById(anchorString);
|
|
20667
20666
|
addAnchorTagToUrl(anchorString);
|
|
@@ -20695,7 +20694,7 @@ var LINK_TYPE = "LINK";
|
|
|
20695
20694
|
|
|
20696
20695
|
// ../../node_modules/@wix/ricos/dist/es/plugin-link/nodeViewDecorators/link.js
|
|
20697
20696
|
var decorator2 = (element, linkDecoration, contextualData, node) => {
|
|
20698
|
-
const { baseUrl } =
|
|
20697
|
+
const { baseUrl } = React31.useContext(RicosViewerContext);
|
|
20699
20698
|
const link = linkDecoration.linkData?.link;
|
|
20700
20699
|
const target = link?.target || contextualData.anchorTarget;
|
|
20701
20700
|
const rel = link?.rel || {};
|
|
@@ -20710,7 +20709,7 @@ var decorator2 = (element, linkDecoration, contextualData, node) => {
|
|
|
20710
20709
|
type: Node_Type.TEXT,
|
|
20711
20710
|
textData: node.textData
|
|
20712
20711
|
});
|
|
20713
|
-
return /* @__PURE__ */
|
|
20712
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(
|
|
20714
20713
|
"a",
|
|
20715
20714
|
{
|
|
20716
20715
|
key: `link=${element.key}`,
|
|
@@ -20753,9 +20752,9 @@ var pluginLink = (config) => {
|
|
|
20753
20752
|
|
|
20754
20753
|
// ../form-fields/dist/esm/ui/ricos-viewer/ricos-viewer.js
|
|
20755
20754
|
var import_classnames3 = __toESM(require_classnames());
|
|
20756
|
-
var ConfigContext = /* @__PURE__ */
|
|
20755
|
+
var ConfigContext = /* @__PURE__ */ React31.createContext(null);
|
|
20757
20756
|
function useConfig() {
|
|
20758
|
-
const context =
|
|
20757
|
+
const context = React31.useContext(ConfigContext);
|
|
20759
20758
|
if (context === void 0) {
|
|
20760
20759
|
throw new Error("useConfig must be used within a ConfigContext.Provider");
|
|
20761
20760
|
}
|
|
@@ -20769,7 +20768,7 @@ var htmlAttributesPlugin = (_23) => ({
|
|
|
20769
20768
|
type: "",
|
|
20770
20769
|
nodeViewDecorators: [htmlAttributesDecorator],
|
|
20771
20770
|
nodeViewRenderers: {
|
|
20772
|
-
[Node_Type.EXTERNAL]: (__) => /* @__PURE__ */
|
|
20771
|
+
[Node_Type.EXTERNAL]: (__) => /* @__PURE__ */ React31__namespace.default.createElement(React31__namespace.default.Fragment, null)
|
|
20773
20772
|
}
|
|
20774
20773
|
});
|
|
20775
20774
|
var htmlAttributesDecorator = {
|
|
@@ -20780,13 +20779,13 @@ var htmlAttributesDecorator = {
|
|
|
20780
20779
|
node
|
|
20781
20780
|
} = _ref;
|
|
20782
20781
|
if (((_node$textData = node.textData) == null ? void 0 : _node$textData.text) == null) {
|
|
20783
|
-
return /* @__PURE__ */
|
|
20782
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(React31__namespace.default.Fragment, null);
|
|
20784
20783
|
}
|
|
20785
20784
|
const props = Object.fromEntries(Object.entries(((_node$externalData = node.externalData) == null ? void 0 : _node$externalData.fields) ?? []).map((_ref2) => {
|
|
20786
20785
|
let [k, v] = _ref2;
|
|
20787
20786
|
return [k, v.stringValue];
|
|
20788
20787
|
}));
|
|
20789
|
-
return /* @__PURE__ */
|
|
20788
|
+
return /* @__PURE__ */ React31__namespace.default.createElement("span", props, (_node$textData2 = node.textData) == null ? void 0 : _node$textData2.text);
|
|
20790
20789
|
}
|
|
20791
20790
|
};
|
|
20792
20791
|
|
|
@@ -20805,10 +20804,10 @@ var RicosViewer = (_ref) => {
|
|
|
20805
20804
|
if (!content) {
|
|
20806
20805
|
return null;
|
|
20807
20806
|
}
|
|
20808
|
-
return /* @__PURE__ */
|
|
20807
|
+
return /* @__PURE__ */ React31__namespace.default.createElement("div", {
|
|
20809
20808
|
className: (0, import_classnames3.default)(ricos_viewer_module_default.container, className),
|
|
20810
20809
|
"data-hook": dataHook
|
|
20811
|
-
}, /* @__PURE__ */
|
|
20810
|
+
}, /* @__PURE__ */ React31__namespace.default.createElement(WixRicosViewer, {
|
|
20812
20811
|
biSettings: {
|
|
20813
20812
|
consumer: "Forms",
|
|
20814
20813
|
platform: "Livesite",
|
|
@@ -20822,9 +20821,9 @@ var RicosViewer = (_ref) => {
|
|
|
20822
20821
|
locale
|
|
20823
20822
|
}));
|
|
20824
20823
|
};
|
|
20825
|
-
var ricos_viewer_default = /* @__PURE__ */
|
|
20824
|
+
var ricos_viewer_default = /* @__PURE__ */ React31__namespace.default.memo(RicosViewer);
|
|
20826
20825
|
function useRicosTheme(customTheme) {
|
|
20827
|
-
return
|
|
20826
|
+
return React31.useMemo(() => ({
|
|
20828
20827
|
palette: {
|
|
20829
20828
|
type: "rgb",
|
|
20830
20829
|
bgColor: "var(--wix-forms-formInputBackgroundColor)",
|
|
@@ -20834,7 +20833,7 @@ function useRicosTheme(customTheme) {
|
|
|
20834
20833
|
...customTheme
|
|
20835
20834
|
}), [customTheme]);
|
|
20836
20835
|
}
|
|
20837
|
-
var UniqueFieldSuffixContext = /* @__PURE__ */
|
|
20836
|
+
var UniqueFieldSuffixContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
20838
20837
|
var UniqueFieldSuffixContextProvider = (_ref) => {
|
|
20839
20838
|
let {
|
|
20840
20839
|
parentId = "id",
|
|
@@ -20844,28 +20843,28 @@ var UniqueFieldSuffixContextProvider = (_ref) => {
|
|
|
20844
20843
|
compId = "comp"
|
|
20845
20844
|
} = useConfig();
|
|
20846
20845
|
const uniqueId = `${compId}-${parentId.split("-").at(0)}`;
|
|
20847
|
-
return /* @__PURE__ */
|
|
20846
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(UniqueFieldSuffixContext.Provider, {
|
|
20848
20847
|
value: uniqueId
|
|
20849
20848
|
}, children);
|
|
20850
20849
|
};
|
|
20851
|
-
var FocusedFieldContext = /* @__PURE__ */
|
|
20850
|
+
var FocusedFieldContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
20852
20851
|
var FocusedFieldProvider = (_ref) => {
|
|
20853
20852
|
let {
|
|
20854
20853
|
children
|
|
20855
20854
|
} = _ref;
|
|
20856
|
-
const [focusedFieldId, setFocusedFieldId] =
|
|
20857
|
-
const contextValue =
|
|
20855
|
+
const [focusedFieldId, setFocusedFieldId] = React31__namespace.default.useState(void 0);
|
|
20856
|
+
const contextValue = React31.useMemo(() => {
|
|
20858
20857
|
return {
|
|
20859
20858
|
focusedFieldId,
|
|
20860
20859
|
setFocusedFieldId
|
|
20861
20860
|
};
|
|
20862
20861
|
}, [focusedFieldId, setFocusedFieldId]);
|
|
20863
|
-
return /* @__PURE__ */
|
|
20862
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(FocusedFieldContext.Provider, {
|
|
20864
20863
|
value: contextValue
|
|
20865
20864
|
}, children);
|
|
20866
20865
|
};
|
|
20867
20866
|
function useFocusedField() {
|
|
20868
|
-
const context =
|
|
20867
|
+
const context = React31.useContext(FocusedFieldContext);
|
|
20869
20868
|
if (context === void 0) {
|
|
20870
20869
|
throw new Error("useFocusedField must be used within a FocusedFieldProvider");
|
|
20871
20870
|
}
|
|
@@ -20873,14 +20872,14 @@ function useFocusedField() {
|
|
|
20873
20872
|
}
|
|
20874
20873
|
|
|
20875
20874
|
// ../form-fields/dist/esm/contexts/events-context.js
|
|
20876
|
-
var EventsContext = /* @__PURE__ */
|
|
20875
|
+
var EventsContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
20877
20876
|
var EventsProvider = (_ref) => {
|
|
20878
20877
|
let {
|
|
20879
20878
|
children
|
|
20880
20879
|
} = _ref;
|
|
20881
|
-
const [submitSuccessCounter, setSubmitSuccessCounter] =
|
|
20882
|
-
const [submittedValues, setSubmittedValues] =
|
|
20883
|
-
const value =
|
|
20880
|
+
const [submitSuccessCounter, setSubmitSuccessCounter] = React31.useState(0);
|
|
20881
|
+
const [submittedValues, setSubmittedValues] = React31.useState({});
|
|
20882
|
+
const value = React31.useMemo(() => ({
|
|
20884
20883
|
submitSuccessCounter,
|
|
20885
20884
|
submittedValues,
|
|
20886
20885
|
fireSubmitSuccess: (values) => {
|
|
@@ -20888,12 +20887,12 @@ var EventsProvider = (_ref) => {
|
|
|
20888
20887
|
setSubmittedValues(values || {});
|
|
20889
20888
|
}
|
|
20890
20889
|
}), [submitSuccessCounter, submittedValues]);
|
|
20891
|
-
return /* @__PURE__ */
|
|
20890
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(EventsContext.Provider, {
|
|
20892
20891
|
value
|
|
20893
20892
|
}, children);
|
|
20894
20893
|
};
|
|
20895
20894
|
var useEvents = () => {
|
|
20896
|
-
const context =
|
|
20895
|
+
const context = React31.useContext(EventsContext);
|
|
20897
20896
|
if (context === void 0) {
|
|
20898
20897
|
throw new Error("useEvents must be used within a EventsProvider");
|
|
20899
20898
|
}
|
|
@@ -20905,13 +20904,13 @@ var useSubmitSuccessTrigger = () => {
|
|
|
20905
20904
|
} = useEvents();
|
|
20906
20905
|
return fireSubmitSuccess;
|
|
20907
20906
|
};
|
|
20908
|
-
var ScrollContext = /* @__PURE__ */
|
|
20907
|
+
var ScrollContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
20909
20908
|
var ScrollProvider = (_ref) => {
|
|
20910
20909
|
let {
|
|
20911
20910
|
children
|
|
20912
20911
|
} = _ref;
|
|
20913
|
-
const scrollViewRef =
|
|
20914
|
-
const value =
|
|
20912
|
+
const scrollViewRef = React31.useRef(null);
|
|
20913
|
+
const value = React31.useMemo(() => ({
|
|
20915
20914
|
scrollTo: (element) => {
|
|
20916
20915
|
if (element && scrollViewRef.current) {
|
|
20917
20916
|
const {
|
|
@@ -20929,14 +20928,14 @@ var ScrollProvider = (_ref) => {
|
|
|
20929
20928
|
}
|
|
20930
20929
|
}
|
|
20931
20930
|
}), []);
|
|
20932
|
-
return /* @__PURE__ */
|
|
20931
|
+
return /* @__PURE__ */ React31__namespace.default.createElement("div", {
|
|
20933
20932
|
ref: scrollViewRef
|
|
20934
|
-
}, /* @__PURE__ */
|
|
20933
|
+
}, /* @__PURE__ */ React31__namespace.default.createElement(ScrollContext.Provider, {
|
|
20935
20934
|
value
|
|
20936
20935
|
}, children));
|
|
20937
20936
|
};
|
|
20938
20937
|
function useScroll() {
|
|
20939
|
-
const context =
|
|
20938
|
+
const context = React31.useContext(ScrollContext);
|
|
20940
20939
|
if (context === void 0) {
|
|
20941
20940
|
throw new Error("useScroll must be used within a ScrollProvider");
|
|
20942
20941
|
}
|
|
@@ -21018,13 +21017,13 @@ var __extends = /* @__PURE__ */ (function() {
|
|
|
21018
21017
|
};
|
|
21019
21018
|
})();
|
|
21020
21019
|
var __assign = function() {
|
|
21021
|
-
__assign = Object.assign || function(
|
|
21022
|
-
for (var s,
|
|
21023
|
-
s = arguments[
|
|
21020
|
+
__assign = Object.assign || function(t) {
|
|
21021
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
21022
|
+
s = arguments[i];
|
|
21024
21023
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21025
|
-
|
|
21024
|
+
t[p] = s[p];
|
|
21026
21025
|
}
|
|
21027
|
-
return
|
|
21026
|
+
return t;
|
|
21028
21027
|
};
|
|
21029
21028
|
return __assign.apply(this, arguments);
|
|
21030
21029
|
};
|
|
@@ -21081,13 +21080,13 @@ var SyntaxError = (
|
|
|
21081
21080
|
}
|
|
21082
21081
|
function describeExpected(expected1) {
|
|
21083
21082
|
var descriptions = expected1.map(describeExpectation);
|
|
21084
|
-
var
|
|
21083
|
+
var i;
|
|
21085
21084
|
var j;
|
|
21086
21085
|
descriptions.sort();
|
|
21087
21086
|
if (descriptions.length > 0) {
|
|
21088
|
-
for (
|
|
21089
|
-
if (descriptions[
|
|
21090
|
-
descriptions[j] = descriptions[
|
|
21087
|
+
for (i = 1, j = 1; i < descriptions.length; i++) {
|
|
21088
|
+
if (descriptions[i - 1] !== descriptions[i]) {
|
|
21089
|
+
descriptions[j] = descriptions[i];
|
|
21091
21090
|
j++;
|
|
21092
21091
|
}
|
|
21093
21092
|
}
|
|
@@ -23368,9 +23367,9 @@ var pegParse = peg$parse;
|
|
|
23368
23367
|
|
|
23369
23368
|
// ../../node_modules/intl-messageformat-parser/lib/normalize.js
|
|
23370
23369
|
var __spreadArrays = function() {
|
|
23371
|
-
for (var s = 0,
|
|
23372
|
-
for (var r = Array(s), k = 0,
|
|
23373
|
-
for (var a = arguments[
|
|
23370
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
23371
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
23372
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
23374
23373
|
r[k] = a[j];
|
|
23375
23374
|
return r;
|
|
23376
23375
|
};
|
|
@@ -23385,10 +23384,10 @@ function normalizeHashtagInPlural(els) {
|
|
|
23385
23384
|
var opt = el.options[id];
|
|
23386
23385
|
var matchingLiteralElIndex = -1;
|
|
23387
23386
|
var literalEl = void 0;
|
|
23388
|
-
for (var
|
|
23389
|
-
var el_1 = opt.value[
|
|
23387
|
+
for (var i = 0; i < opt.value.length; i++) {
|
|
23388
|
+
var el_1 = opt.value[i];
|
|
23390
23389
|
if (isLiteralElement(el_1) && PLURAL_HASHTAG_REGEX.test(el_1.value)) {
|
|
23391
|
-
matchingLiteralElIndex =
|
|
23390
|
+
matchingLiteralElIndex = i;
|
|
23392
23391
|
literalEl = el_1;
|
|
23393
23392
|
break;
|
|
23394
23393
|
}
|
|
@@ -23405,13 +23404,13 @@ function normalizeHashtagInPlural(els) {
|
|
|
23405
23404
|
|
|
23406
23405
|
// ../../node_modules/intl-messageformat-parser/lib/skeleton.js
|
|
23407
23406
|
var __assign2 = function() {
|
|
23408
|
-
__assign2 = Object.assign || function(
|
|
23409
|
-
for (var s,
|
|
23410
|
-
s = arguments[
|
|
23407
|
+
__assign2 = Object.assign || function(t) {
|
|
23408
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
23409
|
+
s = arguments[i];
|
|
23411
23410
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
23412
|
-
|
|
23411
|
+
t[p] = s[p];
|
|
23413
23412
|
}
|
|
23414
|
-
return
|
|
23413
|
+
return t;
|
|
23415
23414
|
};
|
|
23416
23415
|
return __assign2.apply(this, arguments);
|
|
23417
23416
|
};
|
|
@@ -23701,9 +23700,9 @@ function parse(input, opts) {
|
|
|
23701
23700
|
|
|
23702
23701
|
// ../../node_modules/intl-format-cache/lib/index.js
|
|
23703
23702
|
var __spreadArrays2 = function() {
|
|
23704
|
-
for (var s = 0,
|
|
23705
|
-
for (var r = Array(s), k = 0,
|
|
23706
|
-
for (var a = arguments[
|
|
23703
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
23704
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
23705
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
23707
23706
|
r[k] = a[j];
|
|
23708
23707
|
return r;
|
|
23709
23708
|
};
|
|
@@ -23760,9 +23759,9 @@ var __extends2 = /* @__PURE__ */ (function() {
|
|
|
23760
23759
|
};
|
|
23761
23760
|
})();
|
|
23762
23761
|
var __spreadArrays3 = function() {
|
|
23763
|
-
for (var s = 0,
|
|
23764
|
-
for (var r = Array(s), k = 0,
|
|
23765
|
-
for (var a = arguments[
|
|
23762
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
23763
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
23764
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
23766
23765
|
r[k] = a[j];
|
|
23767
23766
|
return r;
|
|
23768
23767
|
};
|
|
@@ -24005,13 +24004,13 @@ function formatHTMLMessage(els, locales, formatters, formats, values, originalMe
|
|
|
24005
24004
|
|
|
24006
24005
|
// ../../node_modules/@wix/wix-i18n-config/node_modules/intl-messageformat/lib/core.js
|
|
24007
24006
|
var __assign3 = function() {
|
|
24008
|
-
__assign3 = Object.assign || function(
|
|
24009
|
-
for (var s,
|
|
24010
|
-
s = arguments[
|
|
24007
|
+
__assign3 = Object.assign || function(t) {
|
|
24008
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
24009
|
+
s = arguments[i];
|
|
24011
24010
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
24012
|
-
|
|
24011
|
+
t[p] = s[p];
|
|
24013
24012
|
}
|
|
24014
|
-
return
|
|
24013
|
+
return t;
|
|
24015
24014
|
};
|
|
24016
24015
|
return __assign3.apply(this, arguments);
|
|
24017
24016
|
};
|
|
@@ -24352,9 +24351,9 @@ function initI18n({ icuOptions = {}, ...options }) {
|
|
|
24352
24351
|
}
|
|
24353
24352
|
|
|
24354
24353
|
// ../form-fields/dist/esm/contexts/translation-context.js
|
|
24355
|
-
var TranslationContext = /* @__PURE__ */
|
|
24354
|
+
var TranslationContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
24356
24355
|
function useTranslation() {
|
|
24357
|
-
const context =
|
|
24356
|
+
const context = React31.useContext(TranslationContext);
|
|
24358
24357
|
if (context === void 0) {
|
|
24359
24358
|
throw new Error("useTranslation must be used within a TranslationProvider");
|
|
24360
24359
|
}
|
|
@@ -24365,10 +24364,10 @@ function useTranslation() {
|
|
|
24365
24364
|
function generateUUID() {
|
|
24366
24365
|
let uuid = "";
|
|
24367
24366
|
const hexValues = "0123456789abcdef";
|
|
24368
|
-
for (let
|
|
24369
|
-
if (
|
|
24367
|
+
for (let i = 0; i < 36; i++) {
|
|
24368
|
+
if (i === 8 || i === 13 || i === 18 || i === 23) {
|
|
24370
24369
|
uuid += "-";
|
|
24371
|
-
} else if (
|
|
24370
|
+
} else if (i === 14) {
|
|
24372
24371
|
uuid += "4";
|
|
24373
24372
|
} else {
|
|
24374
24373
|
uuid += hexValues.charAt(Math.floor(Math.random() * hexValues.length));
|
|
@@ -24376,18 +24375,18 @@ function generateUUID() {
|
|
|
24376
24375
|
}
|
|
24377
24376
|
return uuid;
|
|
24378
24377
|
}
|
|
24379
|
-
var ExperimentsContext = /* @__PURE__ */
|
|
24378
|
+
var ExperimentsContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
24380
24379
|
var useExperiments = () => {
|
|
24381
|
-
const experiments =
|
|
24380
|
+
const experiments = React31.useContext(ExperimentsContext) || {};
|
|
24382
24381
|
return {
|
|
24383
24382
|
experiments,
|
|
24384
24383
|
isExperimentEnabled: (spec) => experiments[spec] === true || experiments[spec] === "true" || false
|
|
24385
24384
|
};
|
|
24386
24385
|
};
|
|
24387
|
-
var HttpClientContext = /* @__PURE__ */
|
|
24388
|
-
var FormContext = /* @__PURE__ */
|
|
24386
|
+
var HttpClientContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
24387
|
+
var FormContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
24389
24388
|
function useForm() {
|
|
24390
|
-
const context =
|
|
24389
|
+
const context = React31.useContext(FormContext);
|
|
24391
24390
|
if (context === void 0) {
|
|
24392
24391
|
throw new Error("useForm must be used within a FormProvider");
|
|
24393
24392
|
}
|
|
@@ -24395,9 +24394,9 @@ function useForm() {
|
|
|
24395
24394
|
}
|
|
24396
24395
|
|
|
24397
24396
|
// ../form-fields/dist/esm/contexts/panorama-context.js
|
|
24398
|
-
var PanoramaContext = /* @__PURE__ */
|
|
24397
|
+
var PanoramaContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
24399
24398
|
function usePanorama() {
|
|
24400
|
-
const context =
|
|
24399
|
+
const context = React31.useContext(PanoramaContext);
|
|
24401
24400
|
if (context === void 0) {
|
|
24402
24401
|
throw new Error("usePanorama must be used within a PanoramaProvider");
|
|
24403
24402
|
}
|
|
@@ -24416,37 +24415,37 @@ function usePanorama() {
|
|
|
24416
24415
|
})
|
|
24417
24416
|
};
|
|
24418
24417
|
}
|
|
24419
|
-
var BiContext = /* @__PURE__ */
|
|
24418
|
+
var BiContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
24420
24419
|
function useBi() {
|
|
24421
|
-
const context =
|
|
24420
|
+
const context = React31.useContext(BiContext);
|
|
24422
24421
|
if (context === void 0) {
|
|
24423
24422
|
throw new Error("useBi must be used within a BiProvider");
|
|
24424
24423
|
}
|
|
24425
24424
|
return context;
|
|
24426
24425
|
}
|
|
24427
|
-
var ForcedStateContext = /* @__PURE__ */
|
|
24426
|
+
var ForcedStateContext = /* @__PURE__ */ React31.createContext([]);
|
|
24428
24427
|
var FALLBACK = {};
|
|
24429
|
-
var ExternalDataContext = /* @__PURE__ */
|
|
24428
|
+
var ExternalDataContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
24430
24429
|
var ExternalDataProvider = (_ref) => {
|
|
24431
24430
|
let {
|
|
24432
24431
|
children,
|
|
24433
24432
|
externalData
|
|
24434
24433
|
} = _ref;
|
|
24435
|
-
return /* @__PURE__ */
|
|
24434
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(ExternalDataContext.Provider, {
|
|
24436
24435
|
value: externalData ?? FALLBACK
|
|
24437
24436
|
}, children);
|
|
24438
24437
|
};
|
|
24439
24438
|
function useExternalData() {
|
|
24440
|
-
const context =
|
|
24439
|
+
const context = React31.useContext(ExternalDataContext);
|
|
24441
24440
|
if (context === void 0) {
|
|
24442
24441
|
throw new Error("useExternalData must be used within a ExternalDataProvider");
|
|
24443
24442
|
}
|
|
24444
24443
|
return context;
|
|
24445
24444
|
}
|
|
24446
|
-
var FieldActionsContext = /* @__PURE__ */
|
|
24447
|
-
var FormFieldsContext = /* @__PURE__ */
|
|
24445
|
+
var FieldActionsContext = /* @__PURE__ */ React31.createContext({});
|
|
24446
|
+
var FormFieldsContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
24448
24447
|
function useFormFields() {
|
|
24449
|
-
const context =
|
|
24448
|
+
const context = React31.useContext(FormFieldsContext);
|
|
24450
24449
|
if (context === void 0) {
|
|
24451
24450
|
throw new Error("useFormFields must be used within a FormFieldsProvider");
|
|
24452
24451
|
}
|
|
@@ -24498,7 +24497,7 @@ var InputField = (_ref) => {
|
|
|
24498
24497
|
} = useFieldValidation();
|
|
24499
24498
|
const form = useForm();
|
|
24500
24499
|
const fieldValue = values[field.target];
|
|
24501
|
-
const errorsByTarget =
|
|
24500
|
+
const errorsByTarget = React31.useMemo(() => groupErrorsByTarget(errors), [errors]);
|
|
24502
24501
|
const fieldErrors = errorsByTarget == null ? void 0 : errorsByTarget[field.target];
|
|
24503
24502
|
const fieldError = fieldErrors == null ? void 0 : fieldErrors[0];
|
|
24504
24503
|
const {
|
|
@@ -24525,7 +24524,7 @@ var InputField = (_ref) => {
|
|
|
24525
24524
|
field_target: field == null ? void 0 : field.target
|
|
24526
24525
|
}));
|
|
24527
24526
|
};
|
|
24528
|
-
const handleChange =
|
|
24527
|
+
const handleChange = React31.useCallback((value) => {
|
|
24529
24528
|
if (fieldError) {
|
|
24530
24529
|
validateFields2([{
|
|
24531
24530
|
value,
|
|
@@ -24541,7 +24540,7 @@ var InputField = (_ref) => {
|
|
|
24541
24540
|
if (!FieldComponent) {
|
|
24542
24541
|
return null;
|
|
24543
24542
|
}
|
|
24544
|
-
return /* @__PURE__ */
|
|
24543
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(FieldComponent, (0, import_extends.default)({}, field.properties, {
|
|
24545
24544
|
onChange: handleChange,
|
|
24546
24545
|
onBlur: _onBlur,
|
|
24547
24546
|
onFocus: _onFocus,
|
|
@@ -24577,7 +24576,7 @@ var ReadOnlyField = (_ref) => {
|
|
|
24577
24576
|
if (!FieldComponent) {
|
|
24578
24577
|
return null;
|
|
24579
24578
|
}
|
|
24580
|
-
return /* @__PURE__ */
|
|
24579
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(FieldComponent, (0, import_extends2.default)({}, field.properties, {
|
|
24581
24580
|
id: field.id,
|
|
24582
24581
|
externalData,
|
|
24583
24582
|
fieldType: field.fieldType,
|
|
@@ -24602,14 +24601,14 @@ var NestedFormField = (_ref) => {
|
|
|
24602
24601
|
const externalData = useExternalData();
|
|
24603
24602
|
const form = useForm();
|
|
24604
24603
|
const fieldValue = values[field.target];
|
|
24605
|
-
const errorsByTarget =
|
|
24604
|
+
const errorsByTarget = React31.useMemo(() => groupErrorsByTarget(errors), [errors]);
|
|
24606
24605
|
const fieldErrors = errorsByTarget == null ? void 0 : errorsByTarget[field.target];
|
|
24607
24606
|
const fieldError = fieldErrors == null ? void 0 : fieldErrors[0];
|
|
24608
24607
|
const {
|
|
24609
24608
|
requiredIndicator,
|
|
24610
24609
|
requiredIndicatorPlacement
|
|
24611
24610
|
} = form.requiredIndicatorProperties || {};
|
|
24612
|
-
const handleChange =
|
|
24611
|
+
const handleChange = React31.useCallback((value) => {
|
|
24613
24612
|
if (!value) {
|
|
24614
24613
|
value = null;
|
|
24615
24614
|
}
|
|
@@ -24619,7 +24618,7 @@ var NestedFormField = (_ref) => {
|
|
|
24619
24618
|
if (!FieldComponent) {
|
|
24620
24619
|
return null;
|
|
24621
24620
|
}
|
|
24622
|
-
return /* @__PURE__ */
|
|
24621
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(FieldComponent, (0, import_extends3.default)({}, field.properties, {
|
|
24623
24622
|
onChange: handleChange,
|
|
24624
24623
|
error: fieldError,
|
|
24625
24624
|
errors: fieldErrors,
|
|
@@ -24649,18 +24648,18 @@ var FormField = (_ref) => {
|
|
|
24649
24648
|
...rest
|
|
24650
24649
|
} = _ref;
|
|
24651
24650
|
if (!isMultilineAddressField(field) && isNestedFormField(field)) {
|
|
24652
|
-
return /* @__PURE__ */
|
|
24651
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(NestedFormField, (0, import_extends4.default)({}, rest, {
|
|
24653
24652
|
field,
|
|
24654
24653
|
FieldLayout
|
|
24655
24654
|
}));
|
|
24656
24655
|
}
|
|
24657
24656
|
if (isInputField2(field)) {
|
|
24658
|
-
return /* @__PURE__ */
|
|
24657
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(InputField, (0, import_extends4.default)({}, rest, {
|
|
24659
24658
|
field,
|
|
24660
24659
|
FieldLayout
|
|
24661
24660
|
}));
|
|
24662
24661
|
}
|
|
24663
|
-
return /* @__PURE__ */
|
|
24662
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(ReadOnlyField, (0, import_extends4.default)({}, rest, {
|
|
24664
24663
|
field,
|
|
24665
24664
|
FieldLayout
|
|
24666
24665
|
}));
|
|
@@ -24676,7 +24675,7 @@ var createFormFields = (_ref) => {
|
|
|
24676
24675
|
FieldLayout
|
|
24677
24676
|
} = _ref;
|
|
24678
24677
|
return form.fields.map((formField) => {
|
|
24679
|
-
const component = /* @__PURE__ */
|
|
24678
|
+
const component = /* @__PURE__ */ React31__namespace.default.createElement(FormField, {
|
|
24680
24679
|
key: formField.id,
|
|
24681
24680
|
field: formField,
|
|
24682
24681
|
values,
|
|
@@ -24711,19 +24710,19 @@ var Focusable = (_ref) => {
|
|
|
24711
24710
|
children,
|
|
24712
24711
|
fieldId
|
|
24713
24712
|
} = _ref;
|
|
24714
|
-
const viewRef =
|
|
24713
|
+
const viewRef = React31.useRef(null);
|
|
24715
24714
|
const {
|
|
24716
24715
|
scrollTo
|
|
24717
24716
|
} = useScroll();
|
|
24718
24717
|
const {
|
|
24719
24718
|
focusedFieldId
|
|
24720
24719
|
} = useFocusedField();
|
|
24721
|
-
|
|
24720
|
+
React31.useEffect(() => {
|
|
24722
24721
|
if (viewRef.current && fieldId === focusedFieldId) {
|
|
24723
24722
|
scrollTo(viewRef.current);
|
|
24724
24723
|
}
|
|
24725
24724
|
}, [scrollTo, fieldId, focusedFieldId]);
|
|
24726
|
-
return /* @__PURE__ */
|
|
24725
|
+
return /* @__PURE__ */ React31__namespace.default.createElement("div", {
|
|
24727
24726
|
ref: viewRef
|
|
24728
24727
|
}, children);
|
|
24729
24728
|
};
|
|
@@ -24746,17 +24745,17 @@ var Grid = (_ref) => {
|
|
|
24746
24745
|
enableAnimations
|
|
24747
24746
|
} = useConfig();
|
|
24748
24747
|
const reactElementsByRow = getReactElementsByRow(items);
|
|
24749
|
-
return /* @__PURE__ */
|
|
24748
|
+
return /* @__PURE__ */ React31__namespace.default.createElement("div", {
|
|
24750
24749
|
className: grid_module_default.container,
|
|
24751
24750
|
dir: isRTL ? "rtl" : ""
|
|
24752
24751
|
}, reactElementsByRow.map((elements, index) => {
|
|
24753
24752
|
var _elements$;
|
|
24754
24753
|
const fieldId = (_elements$ = elements[0]) == null || (_elements$ = _elements$.props) == null || (_elements$ = _elements$.field) == null ? void 0 : _elements$.id;
|
|
24755
24754
|
const key = isMobile && fieldId || index;
|
|
24756
|
-
return /* @__PURE__ */
|
|
24755
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(Focusable, {
|
|
24757
24756
|
key: fieldId,
|
|
24758
24757
|
fieldId
|
|
24759
|
-
}, /* @__PURE__ */
|
|
24758
|
+
}, /* @__PURE__ */ React31__namespace.default.createElement("div", {
|
|
24760
24759
|
key,
|
|
24761
24760
|
style: getGridStyle({
|
|
24762
24761
|
layout
|
|
@@ -24770,7 +24769,7 @@ var Grid = (_ref) => {
|
|
|
24770
24769
|
function getReactElementsByRow(items) {
|
|
24771
24770
|
const reactElementsByRow = items.reduce((result2, item) => {
|
|
24772
24771
|
const row = item.layout.row;
|
|
24773
|
-
const element = /* @__PURE__ */
|
|
24772
|
+
const element = /* @__PURE__ */ React31__namespace.default.cloneElement(item.component, {
|
|
24774
24773
|
key: item.id
|
|
24775
24774
|
});
|
|
24776
24775
|
if (result2[row]) {
|
|
@@ -24782,14 +24781,14 @@ function getReactElementsByRow(items) {
|
|
|
24782
24781
|
}, []);
|
|
24783
24782
|
return reactElementsByRow;
|
|
24784
24783
|
}
|
|
24785
|
-
var FormViewContext = /* @__PURE__ */
|
|
24784
|
+
var FormViewContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
24786
24785
|
function useFieldView(fieldId) {
|
|
24787
24786
|
const context = useFormView();
|
|
24788
24787
|
const fieldView = context.fields.find((field) => field.id === fieldId);
|
|
24789
24788
|
return fieldView;
|
|
24790
24789
|
}
|
|
24791
24790
|
function useFormView() {
|
|
24792
|
-
const context =
|
|
24791
|
+
const context = React31.useContext(FormViewContext);
|
|
24793
24792
|
if (context === void 0) {
|
|
24794
24793
|
throw new Error("useFormView must be used within a FormViewProvider");
|
|
24795
24794
|
}
|
|
@@ -24826,7 +24825,7 @@ var DefaultFieldLayout = (_ref) => {
|
|
|
24826
24825
|
const gridColumn = `${layout.column + 1} / span ${layout.width}`;
|
|
24827
24826
|
const [labelRow, inputRow] = rows.map((currentRow) => `${currentRow} / span 1`);
|
|
24828
24827
|
if ("children" in rest) {
|
|
24829
|
-
return /* @__PURE__ */
|
|
24828
|
+
return /* @__PURE__ */ React31__namespace.default.createElement("div", (0, import_extends5.default)({
|
|
24830
24829
|
style: {
|
|
24831
24830
|
gridRow,
|
|
24832
24831
|
gridColumn
|
|
@@ -24838,13 +24837,13 @@ var DefaultFieldLayout = (_ref) => {
|
|
|
24838
24837
|
renderInput,
|
|
24839
24838
|
renderDescription
|
|
24840
24839
|
} = rest;
|
|
24841
|
-
return /* @__PURE__ */
|
|
24840
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(React31__namespace.default.Fragment, null, /* @__PURE__ */ React31__namespace.default.createElement("div", {
|
|
24842
24841
|
style: {
|
|
24843
24842
|
gridRow: labelRow,
|
|
24844
24843
|
gridColumn
|
|
24845
24844
|
},
|
|
24846
24845
|
className: default_field_layout_module_default.label
|
|
24847
|
-
}, renderLabel()), /* @__PURE__ */
|
|
24846
|
+
}, renderLabel()), /* @__PURE__ */ React31__namespace.default.createElement("div", (0, import_extends5.default)({
|
|
24848
24847
|
style: {
|
|
24849
24848
|
gridRow: inputRow,
|
|
24850
24849
|
gridColumn
|
|
@@ -24870,18 +24869,18 @@ var FormRoot = (_ref) => {
|
|
|
24870
24869
|
errors,
|
|
24871
24870
|
FieldLayout: DefaultFieldLayout
|
|
24872
24871
|
});
|
|
24873
|
-
return /* @__PURE__ */
|
|
24872
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(Grid, {
|
|
24874
24873
|
isRTL,
|
|
24875
24874
|
items: formFields,
|
|
24876
24875
|
layout: form.grid
|
|
24877
24876
|
});
|
|
24878
24877
|
};
|
|
24879
24878
|
var Form = (props) => {
|
|
24880
|
-
return /* @__PURE__ */
|
|
24879
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(FormViewContext.Provider, {
|
|
24881
24880
|
value: props.form
|
|
24882
|
-
}, /* @__PURE__ */
|
|
24881
|
+
}, /* @__PURE__ */ React31__namespace.default.createElement(UniqueFieldSuffixContextProvider, {
|
|
24883
24882
|
parentId: props.form.parentId
|
|
24884
|
-
}, /* @__PURE__ */
|
|
24883
|
+
}, /* @__PURE__ */ React31__namespace.default.createElement(FormRoot, props)));
|
|
24885
24884
|
};
|
|
24886
24885
|
|
|
24887
24886
|
// ../form-fields/dist/esm/utils/sort-fields.js
|
|
@@ -26863,19 +26862,19 @@ var initialState = {
|
|
|
26863
26862
|
getCountryAddressForm: () => void 0,
|
|
26864
26863
|
addressTemplates: void 0
|
|
26865
26864
|
};
|
|
26866
|
-
var AddressFormsContext = /* @__PURE__ */
|
|
26865
|
+
var AddressFormsContext = /* @__PURE__ */ React31.createContext(initialState);
|
|
26867
26866
|
var getAddressForm = (templates, country) => {
|
|
26868
26867
|
var _templates$find, _templates$find2;
|
|
26869
26868
|
return (templates == null || (_templates$find = templates.find((template) => template.country === country)) == null ? void 0 : _templates$find.template) || (templates == null || (_templates$find2 = templates.find((template) => template.country === "COMMON")) == null ? void 0 : _templates$find2.template);
|
|
26870
26869
|
};
|
|
26871
26870
|
function useAddressForms() {
|
|
26872
|
-
const context =
|
|
26871
|
+
const context = React31.useContext(AddressFormsContext);
|
|
26873
26872
|
if (context === void 0) {
|
|
26874
26873
|
throw new Error("useAddressForms must be used within a AddressFormsContext");
|
|
26875
26874
|
}
|
|
26876
26875
|
return context;
|
|
26877
26876
|
}
|
|
26878
|
-
var FieldInitialDataContext = /* @__PURE__ */
|
|
26877
|
+
var FieldInitialDataContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
26879
26878
|
|
|
26880
26879
|
// ../form-fields/dist/esm/fields/vat-id/vat-id-validation.js
|
|
26881
26880
|
init_esm2();
|
|
@@ -26903,12 +26902,12 @@ function isCpfValid(modelValue) {
|
|
|
26903
26902
|
if (!modelValue || CPF_BLACKLIST.includes(modelValue)) {
|
|
26904
26903
|
return false;
|
|
26905
26904
|
}
|
|
26906
|
-
let
|
|
26905
|
+
let i, v1 = 0, v2;
|
|
26907
26906
|
const chars = modelValue.replace(/\D/g, "").split("");
|
|
26908
26907
|
if (chars.length === 11) {
|
|
26909
26908
|
const factors = [10, 9, 8, 7, 6, 5, 4, 3, 2];
|
|
26910
|
-
for (
|
|
26911
|
-
v1 += factors[
|
|
26909
|
+
for (i = 0; i < factors.length; ++i) {
|
|
26910
|
+
v1 += factors[i] * parseInt(chars[i], 10);
|
|
26912
26911
|
}
|
|
26913
26912
|
v1 = 11 - v1 % 11;
|
|
26914
26913
|
if (v1 >= 10) {
|
|
@@ -26918,8 +26917,8 @@ function isCpfValid(modelValue) {
|
|
|
26918
26917
|
return false;
|
|
26919
26918
|
}
|
|
26920
26919
|
v2 = 2 * v1;
|
|
26921
|
-
for (
|
|
26922
|
-
v2 += (factors[
|
|
26920
|
+
for (i = 0; i < factors.length; ++i) {
|
|
26921
|
+
v2 += (factors[i] + 1) * parseInt(chars[i], 10);
|
|
26923
26922
|
}
|
|
26924
26923
|
v2 = 11 - v2 % 11;
|
|
26925
26924
|
if (v2 >= 10) {
|
|
@@ -27965,8 +27964,8 @@ function evaluateOverrideConditionFactory(dateFactory = () => /* @__PURE__ */ ne
|
|
|
27965
27964
|
try {
|
|
27966
27965
|
const rule = getRule(override.condition);
|
|
27967
27966
|
return rule.evaluate(submission);
|
|
27968
|
-
} catch (
|
|
27969
|
-
console.error(
|
|
27967
|
+
} catch (e) {
|
|
27968
|
+
console.error(e);
|
|
27970
27969
|
return false;
|
|
27971
27970
|
}
|
|
27972
27971
|
}
|
|
@@ -28507,7 +28506,7 @@ function clearFieldsWhenHiddenByRule(form, overrides, currentValues, newValues,
|
|
|
28507
28506
|
const fieldCount = (form.fields ?? []).length;
|
|
28508
28507
|
const clearedTargets = [];
|
|
28509
28508
|
let currentForm = applyAllOverrides(form, currentValues, overrides);
|
|
28510
|
-
for (let
|
|
28509
|
+
for (let i = 0; i < fieldCount; i++) {
|
|
28511
28510
|
const newForm = applyAllOverrides(form, newValues, overrides);
|
|
28512
28511
|
const newHiddenTargets = findHiddenTargets(newForm);
|
|
28513
28512
|
const currentHiddenTargets = findHiddenTargets(currentForm);
|
|
@@ -28869,8 +28868,8 @@ function acceptOnlyValidPayments({ field, fieldValue }) {
|
|
|
28869
28868
|
|
|
28870
28869
|
// ../form-viewer/dist/esm/components/form/use-form-values.js
|
|
28871
28870
|
var useFormValues = (form, values, onChange, config) => {
|
|
28872
|
-
const normalizedValues =
|
|
28873
|
-
|
|
28871
|
+
const normalizedValues = React31.useMemo(() => normalizeValues(form, fillEmptyValues(form, values), true, config), [form, values, config]);
|
|
28872
|
+
React31.useEffect(() => {
|
|
28874
28873
|
const hasAnyValueChanged = !deepEqual(normalizedValues, values);
|
|
28875
28874
|
if (hasAnyValueChanged) {
|
|
28876
28875
|
onChange?.(normalizedValues);
|
|
@@ -28882,7 +28881,7 @@ var useFormView2 = (form, stepId, breakpoint) => {
|
|
|
28882
28881
|
const { isMobile } = useConfig();
|
|
28883
28882
|
const experiments = useExperiments();
|
|
28884
28883
|
const useFieldsV2 = experiments.isExperimentEnabled(EXPERIMENTS.USE_FIELDS_V2);
|
|
28885
|
-
return
|
|
28884
|
+
return React31.useMemo(() => {
|
|
28886
28885
|
return (form?.steps || []).filter((step) => !stepId || stepId === step.id).map((step) => {
|
|
28887
28886
|
return createFormView({
|
|
28888
28887
|
form,
|
|
@@ -28895,7 +28894,7 @@ var useFormView2 = (form, stepId, breakpoint) => {
|
|
|
28895
28894
|
}, [form, stepId, isMobile, breakpoint, useFieldsV2]);
|
|
28896
28895
|
};
|
|
28897
28896
|
var useReportFieldEdit = (form) => {
|
|
28898
|
-
const lastChangedFields =
|
|
28897
|
+
const lastChangedFields = React31.useRef([]);
|
|
28899
28898
|
const bi = useBi();
|
|
28900
28899
|
return (changedValues) => {
|
|
28901
28900
|
const changedFieldTargets = Object.keys(changedValues);
|
|
@@ -28915,7 +28914,7 @@ var useReportFieldEdit = (form) => {
|
|
|
28915
28914
|
};
|
|
28916
28915
|
var useScrollToFirstError = ({ form, handleStepChange, currentStepId }) => {
|
|
28917
28916
|
const { setFocusedFieldId } = useFocusedField();
|
|
28918
|
-
const scrollToFirstError =
|
|
28917
|
+
const scrollToFirstError = React31.useCallback((errors) => {
|
|
28919
28918
|
const sortedFieldsInStep = getSortedFields(form, {
|
|
28920
28919
|
stepId: currentStepId
|
|
28921
28920
|
});
|
|
@@ -28924,7 +28923,7 @@ var useScrollToFirstError = ({ form, handleStepChange, currentStepId }) => {
|
|
|
28924
28923
|
});
|
|
28925
28924
|
setFocusedFieldId(fieldWithError?.id);
|
|
28926
28925
|
}, [currentStepId, form, setFocusedFieldId]);
|
|
28927
|
-
const handleScrollToFirstError =
|
|
28926
|
+
const handleScrollToFirstError = React31.useCallback((errors) => {
|
|
28928
28927
|
const sortedFields = getSortedFields(form);
|
|
28929
28928
|
const field = sortedFields?.find((_field) => {
|
|
28930
28929
|
return errors.some((error2) => _field.target === error2.errorPath.split("/")[0]);
|
|
@@ -28999,12 +28998,12 @@ var getCheckoutMessage = (text) => {
|
|
|
28999
28998
|
}
|
|
29000
28999
|
};
|
|
29001
29000
|
};
|
|
29002
|
-
var SubmitStatusContext =
|
|
29001
|
+
var SubmitStatusContext = React31.createContext(void 0);
|
|
29003
29002
|
var SubmitStatusProvider = ({ children }) => {
|
|
29004
|
-
const [submitSuccessMessage, setSubmitSuccessMessage] =
|
|
29005
|
-
const [submitFailureCode, setSubmitFailureCode] =
|
|
29006
|
-
const [submitFailureMessage, setSubmitFailureMessage] =
|
|
29007
|
-
const value =
|
|
29003
|
+
const [submitSuccessMessage, setSubmitSuccessMessage] = React31.useState();
|
|
29004
|
+
const [submitFailureCode, setSubmitFailureCode] = React31.useState();
|
|
29005
|
+
const [submitFailureMessage, setSubmitFailureMessage] = React31.useState();
|
|
29006
|
+
const value = React31.useMemo(() => ({
|
|
29008
29007
|
submitSuccessMessage,
|
|
29009
29008
|
submitFailureCode,
|
|
29010
29009
|
submitFailureMessage,
|
|
@@ -29012,10 +29011,10 @@ var SubmitStatusProvider = ({ children }) => {
|
|
|
29012
29011
|
setSubmitFailureCode,
|
|
29013
29012
|
setSubmitFailureMessage
|
|
29014
29013
|
}), [submitSuccessMessage, submitFailureCode, submitFailureMessage]);
|
|
29015
|
-
return
|
|
29014
|
+
return React31__namespace.default.createElement(SubmitStatusContext.Provider, { value }, children);
|
|
29016
29015
|
};
|
|
29017
29016
|
var useSubmitStatus = () => {
|
|
29018
|
-
const context =
|
|
29017
|
+
const context = React31.useContext(SubmitStatusContext);
|
|
29019
29018
|
if (context === void 0) {
|
|
29020
29019
|
throw new Error("useSubmitStatus must be used within a SubmitStatusProvider");
|
|
29021
29020
|
}
|
|
@@ -29038,21 +29037,19 @@ var BiFormSubmissionStatus;
|
|
|
29038
29037
|
})(BiFormSubmissionStatus || (BiFormSubmissionStatus = {}));
|
|
29039
29038
|
var useSubmit = ({ validateAndScrollToError, submitAction, onSubmit, onSubmitSuccess, onSubmitFailure, resetFormValues, values, submitSettings, handleStepChange, navigateToCheckout, onValidate, handleScrollToFirstError }) => {
|
|
29040
29039
|
const { setSubmitSuccessMessage, setSubmitFailureCode, setSubmitFailureMessage } = useSubmitStatus();
|
|
29041
|
-
const {
|
|
29042
|
-
const useSubmitStatusMessageViewer = isExperimentEnabled(EXPERIMENTS.SUBMIT_STATUS_MESSAGE_VIEWER);
|
|
29043
|
-
const { t: t2 } = useTranslation();
|
|
29040
|
+
const { t } = useTranslation();
|
|
29044
29041
|
const { report } = useBi();
|
|
29045
29042
|
const fireSubmitSuccess = useSubmitSuccessTrigger();
|
|
29046
29043
|
const panorama = usePanorama();
|
|
29047
|
-
const reportSubmitFormBi =
|
|
29044
|
+
const reportSubmitFormBi = React31.useCallback(({ status, id }) => report(submitFormClick({
|
|
29048
29045
|
submission_status: status,
|
|
29049
29046
|
submission_id: id ?? void 0
|
|
29050
29047
|
})), [report]);
|
|
29051
|
-
const handleSubmitSuccess =
|
|
29048
|
+
const handleSubmitSuccess = React31.useCallback((submission) => {
|
|
29052
29049
|
const action = submitSettings?.submitSuccessAction;
|
|
29053
29050
|
const checkoutId = submission?.orderDetails?.checkoutId;
|
|
29054
29051
|
if (checkoutId && navigateToCheckout) {
|
|
29055
|
-
setSubmitSuccessMessage(getCheckoutMessage(
|
|
29052
|
+
setSubmitSuccessMessage(getCheckoutMessage(t("submit.checkout.message")));
|
|
29056
29053
|
navigateToCheckout(checkoutId);
|
|
29057
29054
|
} else if (action === SubmitSuccessAction.THANK_YOU_MESSAGE) {
|
|
29058
29055
|
setSubmitSuccessMessage(submitSettings?.thankYouMessageOptions?.richContent);
|
|
@@ -29070,7 +29067,7 @@ var useSubmit = ({ validateAndScrollToError, submitAction, onSubmit, onSubmitSuc
|
|
|
29070
29067
|
setSubmitFailureCode(void 0);
|
|
29071
29068
|
setSubmitFailureMessage(void 0);
|
|
29072
29069
|
}, [
|
|
29073
|
-
|
|
29070
|
+
t,
|
|
29074
29071
|
submitSettings,
|
|
29075
29072
|
handleStepChange,
|
|
29076
29073
|
navigateToCheckout,
|
|
@@ -29078,12 +29075,12 @@ var useSubmit = ({ validateAndScrollToError, submitAction, onSubmit, onSubmitSuc
|
|
|
29078
29075
|
setSubmitFailureCode,
|
|
29079
29076
|
setSubmitFailureMessage
|
|
29080
29077
|
]);
|
|
29081
|
-
const handleSubmitFailure =
|
|
29078
|
+
const handleSubmitFailure = React31.useCallback((error2) => {
|
|
29082
29079
|
const err = getErrorCode(error2);
|
|
29083
29080
|
setSubmitFailureCode(err);
|
|
29084
29081
|
setSubmitSuccessMessage(void 0);
|
|
29085
29082
|
}, [setSubmitFailureCode, setSubmitSuccessMessage]);
|
|
29086
|
-
const handleCustomErrorMessages =
|
|
29083
|
+
const handleCustomErrorMessages = React31.useCallback((error2) => {
|
|
29087
29084
|
const errors = getErrorList(error2);
|
|
29088
29085
|
const formCustomErrorMessage = getFormCustomErrorMessage(errors);
|
|
29089
29086
|
if (formCustomErrorMessage) {
|
|
@@ -29095,7 +29092,7 @@ var useSubmit = ({ validateAndScrollToError, submitAction, onSubmit, onSubmitSuc
|
|
|
29095
29092
|
handleScrollToFirstError?.(fieldCustomErrorMessages);
|
|
29096
29093
|
}
|
|
29097
29094
|
}, [setSubmitFailureMessage, onValidate, handleScrollToFirstError]);
|
|
29098
|
-
const submitForm =
|
|
29095
|
+
const submitForm = React31.useCallback(async () => {
|
|
29099
29096
|
const errors = await validateAndScrollToError(values);
|
|
29100
29097
|
onSubmit?.();
|
|
29101
29098
|
reportSubmitFormBi({ status: BiFormSubmissionStatus.INIT });
|
|
@@ -29111,7 +29108,7 @@ var useSubmit = ({ validateAndScrollToError, submitAction, onSubmit, onSubmitSuc
|
|
|
29111
29108
|
onSubmitFailure?.(error2);
|
|
29112
29109
|
reportSubmitFormBi({ status: BiFormSubmissionStatus.FAILURE });
|
|
29113
29110
|
handleCustomErrorMessages(error2);
|
|
29114
|
-
|
|
29111
|
+
handleSubmitFailure(error2);
|
|
29115
29112
|
throw error2;
|
|
29116
29113
|
}
|
|
29117
29114
|
if (response) {
|
|
@@ -29122,7 +29119,7 @@ var useSubmit = ({ validateAndScrollToError, submitAction, onSubmit, onSubmitSuc
|
|
|
29122
29119
|
});
|
|
29123
29120
|
panorama?.transaction(INTERACTIONS.SUBMIT_FORM).finish();
|
|
29124
29121
|
fireSubmitSuccess({ ...values });
|
|
29125
|
-
|
|
29122
|
+
handleSubmitSuccess(response);
|
|
29126
29123
|
resetFormValues?.();
|
|
29127
29124
|
}
|
|
29128
29125
|
return response;
|
|
@@ -29135,7 +29132,6 @@ var useSubmit = ({ validateAndScrollToError, submitAction, onSubmit, onSubmitSuc
|
|
|
29135
29132
|
submitAction,
|
|
29136
29133
|
onSubmitFailure,
|
|
29137
29134
|
handleCustomErrorMessages,
|
|
29138
|
-
useSubmitStatusMessageViewer,
|
|
29139
29135
|
handleSubmitFailure,
|
|
29140
29136
|
onSubmitSuccess,
|
|
29141
29137
|
fireSubmitSuccess,
|
|
@@ -29172,7 +29168,7 @@ var reportErrorChanges = ({ bi, existingErrors, newErrors, form }) => {
|
|
|
29172
29168
|
var useValidation = ({ form, errorsRef, setErrors, validationMode }) => {
|
|
29173
29169
|
const { addressTemplates } = useAddressForms();
|
|
29174
29170
|
const externalData = useExternalData();
|
|
29175
|
-
const validateFields2 =
|
|
29171
|
+
const validateFields2 = React31.useCallback(async (newValues) => {
|
|
29176
29172
|
const result2 = await validate(form, newValues, addressTemplates, validationMode);
|
|
29177
29173
|
const _errors = result2?.errors || [];
|
|
29178
29174
|
const additionalErrors = runAdditionalValidation({
|
|
@@ -29184,7 +29180,7 @@ var useValidation = ({ form, errorsRef, setErrors, validationMode }) => {
|
|
|
29184
29180
|
setErrors(allErrors);
|
|
29185
29181
|
return allErrors;
|
|
29186
29182
|
}, [form, setErrors, addressTemplates, externalData, validationMode]);
|
|
29187
|
-
const handleFieldValidation =
|
|
29183
|
+
const handleFieldValidation = React31.useCallback(async (fieldsToValidate) => {
|
|
29188
29184
|
const fieldErrors = await getFieldErrors(fieldsToValidate, form, addressTemplates, externalData, validationMode);
|
|
29189
29185
|
const otherErrors = (errorsRef.current ?? []).filter((error2) => {
|
|
29190
29186
|
return !findErrorByNormalizedPath(fieldsToValidate, error2.errorPath);
|
|
@@ -29200,7 +29196,7 @@ var useValidation = ({ form, errorsRef, setErrors, validationMode }) => {
|
|
|
29200
29196
|
externalData,
|
|
29201
29197
|
validationMode
|
|
29202
29198
|
]);
|
|
29203
|
-
const validateStep =
|
|
29199
|
+
const validateStep = React31.useCallback(async (stepId, newValues) => {
|
|
29204
29200
|
const items = form?.steps?.find((step) => step.id === stepId)?.layout?.large?.items || [];
|
|
29205
29201
|
const validationErrors = await Promise.all(items.map(async (item) => {
|
|
29206
29202
|
const field = form?.fields?.find((_field) => _field.id === item.fieldId);
|
|
@@ -29236,26 +29232,26 @@ var SubmitThankYouMessage = ({ messageText }) => {
|
|
|
29236
29232
|
if (!messageText) {
|
|
29237
29233
|
return null;
|
|
29238
29234
|
}
|
|
29239
|
-
return
|
|
29235
|
+
return React31__namespace.default.createElement(ricos_viewer_default, { dataHook: DATA_HOOKS.SUBMIT_THANK_YOU_MESSAGE, content: messageText, customTheme, className: submit_status_message_module_default.thankYouMessage });
|
|
29240
29236
|
};
|
|
29241
|
-
var
|
|
29242
|
-
|
|
29243
|
-
var
|
|
29237
|
+
var Error2 = ({ size, ...props }) => /* @__PURE__ */ React31__namespace.createElement("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: size || "24", height: size || "24", ...props }, /* @__PURE__ */ React31__namespace.createElement("path", { fillRule: "evenodd", d: "M11.5,3 C16.187,3 20,6.813 20,11.5 C20,16.187 16.187,20 11.5,20 C6.813,20 3,16.187 3,11.5 C3,6.813 6.813,3 11.5,3 Z M11.5,4 C7.364,4 4,7.364 4,11.5 C4,15.636 7.364,19 11.5,19 C15.636,19 19,15.636 19,11.5 C19,7.364 15.636,4 11.5,4 Z M12,14 L12,15 L11,15 L11,14 L12,14 Z M12,8 L12,13 L11,13 L11,8 L12,8 Z" }));
|
|
29238
|
+
Error2.displayName = "Error";
|
|
29239
|
+
var Error_default = Error2;
|
|
29244
29240
|
|
|
29245
29241
|
// ../form-viewer/dist/esm/components/submit-status-message/submit-error-message.js
|
|
29246
29242
|
var ERROR_MESSAGE_KEY = "submit.failed.message";
|
|
29247
29243
|
var SubmitErrorMessage = ({ errorMessageCode, errorMessage }) => {
|
|
29248
|
-
const { t
|
|
29244
|
+
const { t, i18n: i18n2 } = useTranslation();
|
|
29249
29245
|
if (!errorMessageCode && !errorMessage) {
|
|
29250
29246
|
return null;
|
|
29251
29247
|
}
|
|
29252
29248
|
const errorMessageKeyByCode = `${ERROR_MESSAGE_KEY}.${errorMessageCode}`;
|
|
29253
29249
|
const errorMessageKey = i18n2.exists(`${TRANSLATIONS_NAMESPACE}:${errorMessageKeyByCode}`) ? errorMessageKeyByCode : ERROR_MESSAGE_KEY;
|
|
29254
|
-
return
|
|
29250
|
+
return React31__namespace.default.createElement(
|
|
29255
29251
|
"div",
|
|
29256
29252
|
{ className: submit_status_message_module_default.errorMessage, "data-hook": DATA_HOOKS.SUBMIT_ERROR_MESSAGE },
|
|
29257
|
-
|
|
29258
|
-
errorMessage ||
|
|
29253
|
+
React31__namespace.default.createElement(Error_default, { className: submit_status_message_module_default.errorIcon, "aria-hidden": "true" }),
|
|
29254
|
+
errorMessage || t(errorMessageKey)
|
|
29259
29255
|
);
|
|
29260
29256
|
};
|
|
29261
29257
|
|
|
@@ -29274,8 +29270,8 @@ var transitionStyles = {
|
|
|
29274
29270
|
exited: { opacity: 0 }
|
|
29275
29271
|
};
|
|
29276
29272
|
var FadeOut = ({ visible, children }) => {
|
|
29277
|
-
const nodeRef =
|
|
29278
|
-
return
|
|
29273
|
+
const nodeRef = React31.useRef(null);
|
|
29274
|
+
return React31__namespace.default.createElement(Transition_default, { nodeRef, in: visible, timeout: DURATION }, (state) => React31__namespace.default.createElement("div", { ref: nodeRef, style: {
|
|
29279
29275
|
...defaultStyle,
|
|
29280
29276
|
...transitionStyles[state]
|
|
29281
29277
|
} }, [ENTERING, ENTERED, EXITING].includes(state) ? children : null));
|
|
@@ -29284,24 +29280,24 @@ var FadeOut = ({ visible, children }) => {
|
|
|
29284
29280
|
// ../form-viewer/dist/esm/components/submit-status-message/submit-status-message.js
|
|
29285
29281
|
var SubmitStatusMessage = () => {
|
|
29286
29282
|
const { submitSuccessMessage, submitFailureCode, submitFailureMessage } = useSubmitStatus();
|
|
29287
|
-
return
|
|
29283
|
+
return React31__namespace.default.createElement(
|
|
29288
29284
|
"div",
|
|
29289
29285
|
{ role: "region", "aria-live": "polite" },
|
|
29290
|
-
|
|
29286
|
+
React31__namespace.default.createElement(
|
|
29291
29287
|
FadeOut,
|
|
29292
29288
|
{ visible: !!submitSuccessMessage },
|
|
29293
|
-
|
|
29289
|
+
React31__namespace.default.createElement(SubmitThankYouMessage, { messageText: submitSuccessMessage })
|
|
29294
29290
|
),
|
|
29295
|
-
|
|
29291
|
+
React31__namespace.default.createElement(SubmitErrorMessage, { errorMessageCode: submitFailureCode, errorMessage: submitFailureMessage })
|
|
29296
29292
|
);
|
|
29297
29293
|
};
|
|
29298
29294
|
var StepTitleA11y = ({ index = 0, total = 0 }) => {
|
|
29299
|
-
const { t
|
|
29300
|
-
const stepTitleA11y =
|
|
29295
|
+
const { t } = useTranslation();
|
|
29296
|
+
const stepTitleA11y = t("form.a11y.step.index.title", {
|
|
29301
29297
|
index: index + 1,
|
|
29302
29298
|
total
|
|
29303
29299
|
});
|
|
29304
|
-
return total > 1 ?
|
|
29300
|
+
return total > 1 ? React31__namespace.default.createElement("span", { "aria-label": stepTitleA11y, "aria-live": "polite" }) : null;
|
|
29305
29301
|
};
|
|
29306
29302
|
|
|
29307
29303
|
// ../form-viewer/dist/esm/components/form/form-root.js
|
|
@@ -29328,13 +29324,13 @@ var FormRoot2 = ({
|
|
|
29328
29324
|
onStatusChange,
|
|
29329
29325
|
validationMode
|
|
29330
29326
|
}) => {
|
|
29331
|
-
const formWithOverrides =
|
|
29327
|
+
const formWithOverrides = React31.useMemo(() => applyAllOverrides(unprocessedForm, unprocessedValues, overrides), [unprocessedForm, unprocessedValues, overrides]);
|
|
29332
29328
|
const formId = formWithOverrides.id;
|
|
29333
29329
|
const { setFocusedFieldId } = useFocusedField();
|
|
29334
29330
|
const normalizedValues = useFormValues(formWithOverrides, unprocessedValues, onChange, config);
|
|
29335
|
-
const valuesRef =
|
|
29331
|
+
const valuesRef = React31.useRef(normalizedValues);
|
|
29336
29332
|
valuesRef.current = normalizedValues;
|
|
29337
|
-
const errorsRef =
|
|
29333
|
+
const errorsRef = React31.useRef(errors);
|
|
29338
29334
|
errorsRef.current = errors;
|
|
29339
29335
|
const bi = useBi();
|
|
29340
29336
|
const reportFieldEdit = useReportFieldEdit(formWithOverrides);
|
|
@@ -29363,7 +29359,7 @@ var FormRoot2 = ({
|
|
|
29363
29359
|
});
|
|
29364
29360
|
onValidate(newErrors);
|
|
29365
29361
|
};
|
|
29366
|
-
|
|
29362
|
+
React31.useEffect(() => {
|
|
29367
29363
|
bi.report(formView({ mode: readOnly ? "preview" : "live_site" }));
|
|
29368
29364
|
}, []);
|
|
29369
29365
|
const formViews = useFormView2(formWithOverrides, stepId, breakpoint);
|
|
@@ -29374,7 +29370,7 @@ var FormRoot2 = ({
|
|
|
29374
29370
|
setErrors: _onValidate,
|
|
29375
29371
|
validationMode
|
|
29376
29372
|
});
|
|
29377
|
-
const handleStepChange =
|
|
29373
|
+
const handleStepChange = React31.useCallback((step) => {
|
|
29378
29374
|
const newStepId = formWithOverrides.steps?.[step]?.id;
|
|
29379
29375
|
if (newStepId) {
|
|
29380
29376
|
const firstFieldInStep = getSortedFields(formWithOverrides, {
|
|
@@ -29389,17 +29385,17 @@ var FormRoot2 = ({
|
|
|
29389
29385
|
handleStepChange,
|
|
29390
29386
|
currentStepId: stepId
|
|
29391
29387
|
});
|
|
29392
|
-
const resetFormValues =
|
|
29388
|
+
const resetFormValues = React31.useCallback(() => {
|
|
29393
29389
|
onChange(fillEmptyValues(formWithOverrides, {}));
|
|
29394
29390
|
}, [formWithOverrides, onChange]);
|
|
29395
|
-
const validateAndScrollToError =
|
|
29391
|
+
const validateAndScrollToError = React31.useCallback(async (values) => {
|
|
29396
29392
|
const validationErrors = await validateFields2(values);
|
|
29397
29393
|
if (validationErrors && validationErrors.length) {
|
|
29398
29394
|
handleScrollToFirstError(validationErrors);
|
|
29399
29395
|
}
|
|
29400
29396
|
return validationErrors;
|
|
29401
29397
|
}, [validateFields2, handleScrollToFirstError]);
|
|
29402
|
-
const submitAction =
|
|
29398
|
+
const submitAction = React31.useCallback(async (values) => {
|
|
29403
29399
|
const response = await actions?.submitForm?.(formId, values);
|
|
29404
29400
|
return response?.submission;
|
|
29405
29401
|
}, [actions, formId]);
|
|
@@ -29417,7 +29413,7 @@ var FormRoot2 = ({
|
|
|
29417
29413
|
onValidate: _onValidate,
|
|
29418
29414
|
handleScrollToFirstError
|
|
29419
29415
|
});
|
|
29420
|
-
|
|
29416
|
+
React31.useImperativeHandle(forwardedRef, () => ({
|
|
29421
29417
|
submit: submitForm,
|
|
29422
29418
|
validate: async () => {
|
|
29423
29419
|
const validationErrors = await validateFields2(normalizedValues);
|
|
@@ -29436,9 +29432,9 @@ var FormRoot2 = ({
|
|
|
29436
29432
|
scrollToFirstError
|
|
29437
29433
|
]);
|
|
29438
29434
|
const currentStep = getStepIndex(stepId, formWithOverrides.steps);
|
|
29439
|
-
const setNextStep =
|
|
29440
|
-
const setPreviousStep =
|
|
29441
|
-
const fieldActions =
|
|
29435
|
+
const setNextStep = React31.useCallback(() => handleStepChange(currentStep + 1), [currentStep, handleStepChange]);
|
|
29436
|
+
const setPreviousStep = React31.useCallback(() => handleStepChange(currentStep - 1), [currentStep, handleStepChange]);
|
|
29437
|
+
const fieldActions = React31.useMemo(() => actions ? {
|
|
29442
29438
|
actions: { ...actions, submitForm, setNextStep, setPreviousStep },
|
|
29443
29439
|
formId,
|
|
29444
29440
|
inProgress
|
|
@@ -29446,23 +29442,23 @@ var FormRoot2 = ({
|
|
|
29446
29442
|
if (!formViews?.length || !currentView) {
|
|
29447
29443
|
return null;
|
|
29448
29444
|
}
|
|
29449
|
-
return
|
|
29445
|
+
return React31__namespace.default.createElement(
|
|
29450
29446
|
FieldValidationContext.Provider,
|
|
29451
29447
|
{ value: {
|
|
29452
29448
|
validateFields: handleFieldValidation
|
|
29453
29449
|
} },
|
|
29454
|
-
|
|
29450
|
+
React31__namespace.default.createElement(
|
|
29455
29451
|
FieldActionsContext.Provider,
|
|
29456
29452
|
{ value: fieldActions },
|
|
29457
|
-
|
|
29453
|
+
React31__namespace.default.createElement(
|
|
29458
29454
|
FormStatusProvider,
|
|
29459
29455
|
{ onStatusChange },
|
|
29460
|
-
|
|
29456
|
+
React31__namespace.default.createElement(
|
|
29461
29457
|
"div",
|
|
29462
29458
|
{ "data-hook": DATA_HOOKS.FORM_ROOT },
|
|
29463
|
-
|
|
29464
|
-
|
|
29465
|
-
|
|
29459
|
+
React31__namespace.default.createElement(Form, { form: currentView, values: normalizedValues, onFieldChange, errors, dataHook: DATA_HOOKS.FORM_ROOT }),
|
|
29460
|
+
React31__namespace.default.createElement(StepTitleA11y, { total: formWithOverrides.steps?.length, index: currentStep }),
|
|
29461
|
+
React31__namespace.default.createElement(SubmitStatusMessage, null)
|
|
29466
29462
|
)
|
|
29467
29463
|
)
|
|
29468
29464
|
)
|
|
@@ -29475,8 +29471,8 @@ var dummyBi = {
|
|
|
29475
29471
|
updateDefaults: () => dummyBi
|
|
29476
29472
|
};
|
|
29477
29473
|
var useFormBi = (form, bi, biFormFillSessionId) => {
|
|
29478
|
-
const formEditSessionId =
|
|
29479
|
-
return
|
|
29474
|
+
const formEditSessionId = React31.useMemo(generateUUID, []);
|
|
29475
|
+
return React31.useMemo(() => {
|
|
29480
29476
|
if (!bi) {
|
|
29481
29477
|
return dummyBi;
|
|
29482
29478
|
}
|
|
@@ -29506,12 +29502,12 @@ var useFormBi = (form, bi, biFormFillSessionId) => {
|
|
|
29506
29502
|
|
|
29507
29503
|
// ../form-viewer/dist/esm/components/root/form-viewer-provider.js
|
|
29508
29504
|
var FormViewerProvider = ({ i18n: i18n2, bi, biFormFillSessionId, form, isMobile, isEditor, isComposer, isRTL, compId, locale, regionalFormat, externalData, fields, forcedState, instance, children, httpClient, panorama, experiments, translationNamespace, currency, userData, WixRicosViewer, addressTemplates, atlasBaseUrl, fieldInitialData, enableAnimations }) => {
|
|
29509
|
-
const translations =
|
|
29505
|
+
const translations = React31.useMemo(() => ({
|
|
29510
29506
|
t: i18n2.getFixedT(locale, translationNamespace),
|
|
29511
29507
|
i18n: i18n2
|
|
29512
29508
|
}), [locale, i18n2, translationNamespace]);
|
|
29513
29509
|
const formBi = useFormBi(form, bi, biFormFillSessionId);
|
|
29514
|
-
const config =
|
|
29510
|
+
const config = React31.useMemo(() => ({
|
|
29515
29511
|
locale,
|
|
29516
29512
|
regionalFormat,
|
|
29517
29513
|
instance,
|
|
@@ -29538,59 +29534,59 @@ var FormViewerProvider = ({ i18n: i18n2, bi, biFormFillSessionId, form, isMobile
|
|
|
29538
29534
|
isRTL,
|
|
29539
29535
|
enableAnimations
|
|
29540
29536
|
]);
|
|
29541
|
-
const forcedViewState =
|
|
29542
|
-
return
|
|
29537
|
+
const forcedViewState = React31.useMemo(() => forcedState ?? [], [forcedState]);
|
|
29538
|
+
return React31__namespace.default.createElement(
|
|
29543
29539
|
FormFieldsContext.Provider,
|
|
29544
29540
|
{ value: fields },
|
|
29545
|
-
|
|
29541
|
+
React31__namespace.default.createElement(
|
|
29546
29542
|
HttpClientContext.Provider,
|
|
29547
29543
|
{ value: { httpClient } },
|
|
29548
|
-
|
|
29544
|
+
React31__namespace.default.createElement(
|
|
29549
29545
|
PanoramaContext.Provider,
|
|
29550
29546
|
{ value: { panorama } },
|
|
29551
|
-
|
|
29547
|
+
React31__namespace.default.createElement(
|
|
29552
29548
|
TranslationContext.Provider,
|
|
29553
29549
|
{ value: translations },
|
|
29554
|
-
|
|
29550
|
+
React31__namespace.default.createElement(
|
|
29555
29551
|
ScrollProvider,
|
|
29556
29552
|
null,
|
|
29557
|
-
|
|
29553
|
+
React31__namespace.default.createElement(
|
|
29558
29554
|
FocusedFieldProvider,
|
|
29559
29555
|
null,
|
|
29560
|
-
|
|
29556
|
+
React31__namespace.default.createElement(
|
|
29561
29557
|
FieldInitialDataContext.Provider,
|
|
29562
29558
|
{ value: fieldInitialData },
|
|
29563
|
-
|
|
29559
|
+
React31__namespace.default.createElement(
|
|
29564
29560
|
BiContext.Provider,
|
|
29565
29561
|
{ value: formBi },
|
|
29566
|
-
|
|
29562
|
+
React31__namespace.default.createElement(
|
|
29567
29563
|
ExternalDataProvider,
|
|
29568
29564
|
{ externalData },
|
|
29569
|
-
|
|
29565
|
+
React31__namespace.default.createElement(
|
|
29570
29566
|
ConfigContext.Provider,
|
|
29571
29567
|
{ value: config },
|
|
29572
|
-
|
|
29568
|
+
React31__namespace.default.createElement(
|
|
29573
29569
|
ForcedStateContext.Provider,
|
|
29574
29570
|
{ value: forcedViewState },
|
|
29575
|
-
|
|
29571
|
+
React31__namespace.default.createElement(
|
|
29576
29572
|
FormContext.Provider,
|
|
29577
29573
|
{ value: form },
|
|
29578
|
-
|
|
29574
|
+
React31__namespace.default.createElement(
|
|
29579
29575
|
AddressFormsContext.Provider,
|
|
29580
29576
|
{ value: {
|
|
29581
29577
|
getCountryAddressForm: (country) => getAddressForm(addressTemplates, country),
|
|
29582
29578
|
addressTemplates
|
|
29583
29579
|
} },
|
|
29584
|
-
|
|
29580
|
+
React31__namespace.default.createElement(
|
|
29585
29581
|
ExperimentsContext.Provider,
|
|
29586
29582
|
{ value: experiments },
|
|
29587
|
-
|
|
29583
|
+
React31__namespace.default.createElement(
|
|
29588
29584
|
EventsProvider,
|
|
29589
29585
|
null,
|
|
29590
|
-
|
|
29586
|
+
React31__namespace.default.createElement(
|
|
29591
29587
|
WixRicosViewerContext.Provider,
|
|
29592
29588
|
{ value: WixRicosViewer },
|
|
29593
|
-
|
|
29589
|
+
React31__namespace.default.createElement(SubmitStatusProvider, null, children)
|
|
29594
29590
|
)
|
|
29595
29591
|
)
|
|
29596
29592
|
)
|
|
@@ -29629,17 +29625,17 @@ var DisabledFormOverlay = ({ content, isEditor }) => {
|
|
|
29629
29625
|
if (isEditor || !content) {
|
|
29630
29626
|
return null;
|
|
29631
29627
|
}
|
|
29632
|
-
return
|
|
29628
|
+
return React31__namespace.default.createElement(ricos_viewer_default, { content, className: disabled_form_overlay_module_default.disabledFormOverlay, customTheme });
|
|
29633
29629
|
};
|
|
29634
29630
|
|
|
29635
29631
|
// ../form-viewer/dist/esm/components/root/form-viewer-static.js
|
|
29636
|
-
var FormViewerStatic =
|
|
29632
|
+
var FormViewerStatic = React31.forwardRef(({ form, i18n: i18n2, isMobile, isRTL, config = null, readOnly = false, externalData, bi, biFormFillSessionId, translations, localeDataset, forcedState, httpClient, panorama, experiments, currency, fields, WixRicosViewer, breakpoint = Breakpoint.LARGE, allowFormDisable = true, fieldInitialData, enableAnimations, ...rest }, forwardedRef) => {
|
|
29637
29633
|
const { locale = "en", regionalFormat = "en", userData } = config || {};
|
|
29638
|
-
|
|
29634
|
+
React31.useState(() => {
|
|
29639
29635
|
translations && i18n2.addResources(locale, TRANSLATIONS_NAMESPACE, translations);
|
|
29640
29636
|
localeDataset && i18n2.addResources(locale, TRANSLATIONS_NAMESPACE, localeDataset);
|
|
29641
29637
|
});
|
|
29642
|
-
const formWithValidSteps =
|
|
29638
|
+
const formWithValidSteps = React31.useMemo(() => ({
|
|
29643
29639
|
...form,
|
|
29644
29640
|
steps: form?.steps?.filter((step) => step.layout?.large?.items?.length) || []
|
|
29645
29641
|
}), [form]);
|
|
@@ -29647,23 +29643,23 @@ var FormViewerStatic = React30.forwardRef(({ form, i18n: i18n2, isMobile, isRTL,
|
|
|
29647
29643
|
return null;
|
|
29648
29644
|
}
|
|
29649
29645
|
const isDisabled = allowFormDisable && formWithValidSteps.properties?.disabled;
|
|
29650
|
-
return
|
|
29651
|
-
|
|
29646
|
+
return React31__namespace.default.createElement(
|
|
29647
|
+
React31__namespace.default.StrictMode,
|
|
29652
29648
|
null,
|
|
29653
|
-
|
|
29649
|
+
React31__namespace.default.createElement(
|
|
29654
29650
|
FormViewerProvider,
|
|
29655
29651
|
{ httpClient, i18n: i18n2, bi, panorama, biFormFillSessionId, form: formWithValidSteps, locale, regionalFormat, isRTL, isMobile, isEditor: config?.isEditor, isComposer: config?.isComposer, externalData, fields, forcedState, instance: config?.instance, experiments, translationNamespace: TRANSLATIONS_NAMESPACE, currency, userData, WixRicosViewer, addressTemplates: config?.addressTemplates, atlasBaseUrl: config?.atlasBaseUrl, fieldInitialData, compId: config?.compId, enableAnimations },
|
|
29656
|
-
|
|
29652
|
+
React31__namespace.default.createElement(
|
|
29657
29653
|
"form",
|
|
29658
29654
|
{ "aria-label": formWithValidSteps.properties?.name ?? "", id: `form-${formWithValidSteps.id}`, "data-hook": `form-${formWithValidSteps.id}`, className: (0, import_classnames5.default)({
|
|
29659
29655
|
[form_viewer_static_module_default.readOnly]: readOnly,
|
|
29660
29656
|
[form_viewer_static_module_default.disabled]: isDisabled && !config?.isEditor
|
|
29661
|
-
}), onSubmit: (
|
|
29662
|
-
isDisabled &&
|
|
29663
|
-
|
|
29657
|
+
}), onSubmit: (e) => e.preventDefault() },
|
|
29658
|
+
isDisabled && React31__namespace.default.createElement(DisabledFormOverlay, { content: formWithValidSteps.disabledFormMessage, isEditor: config?.isEditor }),
|
|
29659
|
+
React31__namespace.default.createElement(
|
|
29664
29660
|
"fieldset",
|
|
29665
29661
|
{ className: form_viewer_static_module_default.fieldsetReset, disabled: readOnly || isDisabled },
|
|
29666
|
-
|
|
29662
|
+
React31__namespace.default.createElement(FormRoot2, { form: formWithValidSteps, forwardedRef, config, breakpoint, ...rest })
|
|
29667
29663
|
)
|
|
29668
29664
|
)
|
|
29669
29665
|
)
|
|
@@ -30044,11 +30040,11 @@ var Form2 = ({
|
|
|
30044
30040
|
}
|
|
30045
30041
|
};
|
|
30046
30042
|
const i18n2 = initI18n({ locale: siteConfig.locale.languageCode });
|
|
30047
|
-
const mappedFieldProps =
|
|
30043
|
+
const mappedFieldProps = React31.useMemo(
|
|
30048
30044
|
() => mapFieldProps(fields, FIELD_PROP_MAP),
|
|
30049
30045
|
[fields]
|
|
30050
30046
|
);
|
|
30051
|
-
const mappedFieldTypes =
|
|
30047
|
+
const mappedFieldTypes = React31.useMemo(
|
|
30052
30048
|
() => mapFieldTypes(mappedFieldProps, FIELD_TYPE_MAP),
|
|
30053
30049
|
[mappedFieldProps]
|
|
30054
30050
|
);
|