@wix/form-public 0.24.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 +897 -897
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +544 -579
- package/dist/index.css.map +1 -1
- package/dist/index.js +798 -798
- 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
|
}));
|
|
@@ -20547,49 +20547,49 @@ var Breakpoint = /* @__PURE__ */ (function(Breakpoint2) {
|
|
|
20547
20547
|
return Breakpoint2;
|
|
20548
20548
|
})({});
|
|
20549
20549
|
var DEFAULT_BREAKPOINT = Breakpoint.LARGE;
|
|
20550
|
-
var FieldValidationContext = /* @__PURE__ */
|
|
20551
|
-
var useFieldValidation = () =>
|
|
20550
|
+
var FieldValidationContext = /* @__PURE__ */ React31.createContext(null);
|
|
20551
|
+
var useFieldValidation = () => React31.useContext(FieldValidationContext) || {};
|
|
20552
20552
|
var FORM_STATUS = {
|
|
20553
20553
|
BUSY: "BUSY",
|
|
20554
20554
|
READY: "READY"
|
|
20555
20555
|
};
|
|
20556
|
-
var FormStatusContext = /* @__PURE__ */
|
|
20556
|
+
var FormStatusContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
20557
20557
|
var FormStatusProvider = (_ref) => {
|
|
20558
20558
|
let {
|
|
20559
20559
|
children,
|
|
20560
20560
|
onStatusChange
|
|
20561
20561
|
} = _ref;
|
|
20562
|
-
const previousFormStatus =
|
|
20563
|
-
const [fieldStatusByTarget, setFieldStatusByTarget] =
|
|
20564
|
-
const setFormStatus =
|
|
20562
|
+
const previousFormStatus = React31.useRef(FORM_STATUS.READY);
|
|
20563
|
+
const [fieldStatusByTarget, setFieldStatusByTarget] = React31.useState({});
|
|
20564
|
+
const setFormStatus = React31.useCallback((target, status) => {
|
|
20565
20565
|
setFieldStatusByTarget((previous) => ({
|
|
20566
20566
|
...previous,
|
|
20567
20567
|
[target]: status
|
|
20568
20568
|
}));
|
|
20569
20569
|
}, []);
|
|
20570
|
-
const currentFormStatus =
|
|
20570
|
+
const currentFormStatus = React31.useMemo(() => {
|
|
20571
20571
|
const isFormBusy = Object.values(fieldStatusByTarget).some((status) => status === FORM_STATUS.BUSY);
|
|
20572
20572
|
return isFormBusy ? FORM_STATUS.BUSY : FORM_STATUS.READY;
|
|
20573
20573
|
}, [fieldStatusByTarget]);
|
|
20574
|
-
|
|
20574
|
+
React31.useEffect(() => {
|
|
20575
20575
|
if (previousFormStatus.current !== currentFormStatus) {
|
|
20576
20576
|
previousFormStatus.current = currentFormStatus;
|
|
20577
20577
|
onStatusChange == null || onStatusChange(currentFormStatus);
|
|
20578
20578
|
}
|
|
20579
20579
|
}, [currentFormStatus, onStatusChange]);
|
|
20580
|
-
const contextValue =
|
|
20580
|
+
const contextValue = React31.useMemo(() => {
|
|
20581
20581
|
return {
|
|
20582
20582
|
formStatus: currentFormStatus,
|
|
20583
20583
|
setFormStatus
|
|
20584
20584
|
};
|
|
20585
20585
|
}, [currentFormStatus, setFormStatus]);
|
|
20586
|
-
return /* @__PURE__ */
|
|
20586
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(FormStatusContext.Provider, {
|
|
20587
20587
|
value: contextValue
|
|
20588
20588
|
}, children);
|
|
20589
20589
|
};
|
|
20590
|
-
var WixRicosViewerContext = /* @__PURE__ */
|
|
20590
|
+
var WixRicosViewerContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
20591
20591
|
function useWixRicosViewer() {
|
|
20592
|
-
const context =
|
|
20592
|
+
const context = React31.useContext(WixRicosViewerContext);
|
|
20593
20593
|
if (context === void 0) {
|
|
20594
20594
|
throw new Error("useWixRicosViewer must be used within a WixRicosViewerContext.Provider");
|
|
20595
20595
|
}
|
|
@@ -20645,22 +20645,22 @@ var ANCHOR_LINK = "anchor-link";
|
|
|
20645
20645
|
|
|
20646
20646
|
// ../../node_modules/@wix/ricos/dist/es/plugin-link/statics/link-viewer-scss.js
|
|
20647
20647
|
var link_viewer_default = {
|
|
20648
|
-
"link": "
|
|
20649
|
-
"linkInViewer": "
|
|
20648
|
+
"link": "FQtO1",
|
|
20649
|
+
"linkInViewer": "rdZDZ"};
|
|
20650
20650
|
|
|
20651
20651
|
// ../../node_modules/@wix/ricos/dist/es/plugin-link/nodeViewDecorators/anchor.js
|
|
20652
20652
|
var decorator = (anchorDecoration, element) => {
|
|
20653
20653
|
const { anchor } = anchorDecoration.anchorData;
|
|
20654
|
-
return /* @__PURE__ */
|
|
20654
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(
|
|
20655
20655
|
"a",
|
|
20656
20656
|
{
|
|
20657
20657
|
key: `anchor-${element?.key}`,
|
|
20658
20658
|
target: "_self",
|
|
20659
20659
|
href: `#viewer-${anchor}`,
|
|
20660
20660
|
className: (0, import_classnames.default)(link_viewer_default.link, link_viewer_default.linkInViewer),
|
|
20661
|
-
onClick: (
|
|
20662
|
-
|
|
20663
|
-
|
|
20661
|
+
onClick: (e) => {
|
|
20662
|
+
e.stopPropagation();
|
|
20663
|
+
e.preventDefault();
|
|
20664
20664
|
const anchorString = `viewer-${anchor}`;
|
|
20665
20665
|
const element2 = document.getElementById(anchorString);
|
|
20666
20666
|
addAnchorTagToUrl(anchorString);
|
|
@@ -20694,7 +20694,7 @@ var LINK_TYPE = "LINK";
|
|
|
20694
20694
|
|
|
20695
20695
|
// ../../node_modules/@wix/ricos/dist/es/plugin-link/nodeViewDecorators/link.js
|
|
20696
20696
|
var decorator2 = (element, linkDecoration, contextualData, node) => {
|
|
20697
|
-
const { baseUrl } =
|
|
20697
|
+
const { baseUrl } = React31.useContext(RicosViewerContext);
|
|
20698
20698
|
const link = linkDecoration.linkData?.link;
|
|
20699
20699
|
const target = link?.target || contextualData.anchorTarget;
|
|
20700
20700
|
const rel = link?.rel || {};
|
|
@@ -20709,7 +20709,7 @@ var decorator2 = (element, linkDecoration, contextualData, node) => {
|
|
|
20709
20709
|
type: Node_Type.TEXT,
|
|
20710
20710
|
textData: node.textData
|
|
20711
20711
|
});
|
|
20712
|
-
return /* @__PURE__ */
|
|
20712
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(
|
|
20713
20713
|
"a",
|
|
20714
20714
|
{
|
|
20715
20715
|
key: `link=${element.key}`,
|
|
@@ -20752,9 +20752,9 @@ var pluginLink = (config) => {
|
|
|
20752
20752
|
|
|
20753
20753
|
// ../form-fields/dist/esm/ui/ricos-viewer/ricos-viewer.js
|
|
20754
20754
|
var import_classnames3 = __toESM(require_classnames());
|
|
20755
|
-
var ConfigContext = /* @__PURE__ */
|
|
20755
|
+
var ConfigContext = /* @__PURE__ */ React31.createContext(null);
|
|
20756
20756
|
function useConfig() {
|
|
20757
|
-
const context =
|
|
20757
|
+
const context = React31.useContext(ConfigContext);
|
|
20758
20758
|
if (context === void 0) {
|
|
20759
20759
|
throw new Error("useConfig must be used within a ConfigContext.Provider");
|
|
20760
20760
|
}
|
|
@@ -20768,7 +20768,7 @@ var htmlAttributesPlugin = (_23) => ({
|
|
|
20768
20768
|
type: "",
|
|
20769
20769
|
nodeViewDecorators: [htmlAttributesDecorator],
|
|
20770
20770
|
nodeViewRenderers: {
|
|
20771
|
-
[Node_Type.EXTERNAL]: (__) => /* @__PURE__ */
|
|
20771
|
+
[Node_Type.EXTERNAL]: (__) => /* @__PURE__ */ React31__namespace.default.createElement(React31__namespace.default.Fragment, null)
|
|
20772
20772
|
}
|
|
20773
20773
|
});
|
|
20774
20774
|
var htmlAttributesDecorator = {
|
|
@@ -20779,13 +20779,13 @@ var htmlAttributesDecorator = {
|
|
|
20779
20779
|
node
|
|
20780
20780
|
} = _ref;
|
|
20781
20781
|
if (((_node$textData = node.textData) == null ? void 0 : _node$textData.text) == null) {
|
|
20782
|
-
return /* @__PURE__ */
|
|
20782
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(React31__namespace.default.Fragment, null);
|
|
20783
20783
|
}
|
|
20784
20784
|
const props = Object.fromEntries(Object.entries(((_node$externalData = node.externalData) == null ? void 0 : _node$externalData.fields) ?? []).map((_ref2) => {
|
|
20785
20785
|
let [k, v] = _ref2;
|
|
20786
20786
|
return [k, v.stringValue];
|
|
20787
20787
|
}));
|
|
20788
|
-
return /* @__PURE__ */
|
|
20788
|
+
return /* @__PURE__ */ React31__namespace.default.createElement("span", props, (_node$textData2 = node.textData) == null ? void 0 : _node$textData2.text);
|
|
20789
20789
|
}
|
|
20790
20790
|
};
|
|
20791
20791
|
|
|
@@ -20804,10 +20804,10 @@ var RicosViewer = (_ref) => {
|
|
|
20804
20804
|
if (!content) {
|
|
20805
20805
|
return null;
|
|
20806
20806
|
}
|
|
20807
|
-
return /* @__PURE__ */
|
|
20807
|
+
return /* @__PURE__ */ React31__namespace.default.createElement("div", {
|
|
20808
20808
|
className: (0, import_classnames3.default)(ricos_viewer_module_default.container, className),
|
|
20809
20809
|
"data-hook": dataHook
|
|
20810
|
-
}, /* @__PURE__ */
|
|
20810
|
+
}, /* @__PURE__ */ React31__namespace.default.createElement(WixRicosViewer, {
|
|
20811
20811
|
biSettings: {
|
|
20812
20812
|
consumer: "Forms",
|
|
20813
20813
|
platform: "Livesite",
|
|
@@ -20821,9 +20821,9 @@ var RicosViewer = (_ref) => {
|
|
|
20821
20821
|
locale
|
|
20822
20822
|
}));
|
|
20823
20823
|
};
|
|
20824
|
-
var ricos_viewer_default = /* @__PURE__ */
|
|
20824
|
+
var ricos_viewer_default = /* @__PURE__ */ React31__namespace.default.memo(RicosViewer);
|
|
20825
20825
|
function useRicosTheme(customTheme) {
|
|
20826
|
-
return
|
|
20826
|
+
return React31.useMemo(() => ({
|
|
20827
20827
|
palette: {
|
|
20828
20828
|
type: "rgb",
|
|
20829
20829
|
bgColor: "var(--wix-forms-formInputBackgroundColor)",
|
|
@@ -20833,7 +20833,7 @@ function useRicosTheme(customTheme) {
|
|
|
20833
20833
|
...customTheme
|
|
20834
20834
|
}), [customTheme]);
|
|
20835
20835
|
}
|
|
20836
|
-
var UniqueFieldSuffixContext = /* @__PURE__ */
|
|
20836
|
+
var UniqueFieldSuffixContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
20837
20837
|
var UniqueFieldSuffixContextProvider = (_ref) => {
|
|
20838
20838
|
let {
|
|
20839
20839
|
parentId = "id",
|
|
@@ -20843,28 +20843,28 @@ var UniqueFieldSuffixContextProvider = (_ref) => {
|
|
|
20843
20843
|
compId = "comp"
|
|
20844
20844
|
} = useConfig();
|
|
20845
20845
|
const uniqueId = `${compId}-${parentId.split("-").at(0)}`;
|
|
20846
|
-
return /* @__PURE__ */
|
|
20846
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(UniqueFieldSuffixContext.Provider, {
|
|
20847
20847
|
value: uniqueId
|
|
20848
20848
|
}, children);
|
|
20849
20849
|
};
|
|
20850
|
-
var FocusedFieldContext = /* @__PURE__ */
|
|
20850
|
+
var FocusedFieldContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
20851
20851
|
var FocusedFieldProvider = (_ref) => {
|
|
20852
20852
|
let {
|
|
20853
20853
|
children
|
|
20854
20854
|
} = _ref;
|
|
20855
|
-
const [focusedFieldId, setFocusedFieldId] =
|
|
20856
|
-
const contextValue =
|
|
20855
|
+
const [focusedFieldId, setFocusedFieldId] = React31__namespace.default.useState(void 0);
|
|
20856
|
+
const contextValue = React31.useMemo(() => {
|
|
20857
20857
|
return {
|
|
20858
20858
|
focusedFieldId,
|
|
20859
20859
|
setFocusedFieldId
|
|
20860
20860
|
};
|
|
20861
20861
|
}, [focusedFieldId, setFocusedFieldId]);
|
|
20862
|
-
return /* @__PURE__ */
|
|
20862
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(FocusedFieldContext.Provider, {
|
|
20863
20863
|
value: contextValue
|
|
20864
20864
|
}, children);
|
|
20865
20865
|
};
|
|
20866
20866
|
function useFocusedField() {
|
|
20867
|
-
const context =
|
|
20867
|
+
const context = React31.useContext(FocusedFieldContext);
|
|
20868
20868
|
if (context === void 0) {
|
|
20869
20869
|
throw new Error("useFocusedField must be used within a FocusedFieldProvider");
|
|
20870
20870
|
}
|
|
@@ -20872,14 +20872,14 @@ function useFocusedField() {
|
|
|
20872
20872
|
}
|
|
20873
20873
|
|
|
20874
20874
|
// ../form-fields/dist/esm/contexts/events-context.js
|
|
20875
|
-
var EventsContext = /* @__PURE__ */
|
|
20875
|
+
var EventsContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
20876
20876
|
var EventsProvider = (_ref) => {
|
|
20877
20877
|
let {
|
|
20878
20878
|
children
|
|
20879
20879
|
} = _ref;
|
|
20880
|
-
const [submitSuccessCounter, setSubmitSuccessCounter] =
|
|
20881
|
-
const [submittedValues, setSubmittedValues] =
|
|
20882
|
-
const value =
|
|
20880
|
+
const [submitSuccessCounter, setSubmitSuccessCounter] = React31.useState(0);
|
|
20881
|
+
const [submittedValues, setSubmittedValues] = React31.useState({});
|
|
20882
|
+
const value = React31.useMemo(() => ({
|
|
20883
20883
|
submitSuccessCounter,
|
|
20884
20884
|
submittedValues,
|
|
20885
20885
|
fireSubmitSuccess: (values) => {
|
|
@@ -20887,12 +20887,12 @@ var EventsProvider = (_ref) => {
|
|
|
20887
20887
|
setSubmittedValues(values || {});
|
|
20888
20888
|
}
|
|
20889
20889
|
}), [submitSuccessCounter, submittedValues]);
|
|
20890
|
-
return /* @__PURE__ */
|
|
20890
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(EventsContext.Provider, {
|
|
20891
20891
|
value
|
|
20892
20892
|
}, children);
|
|
20893
20893
|
};
|
|
20894
20894
|
var useEvents = () => {
|
|
20895
|
-
const context =
|
|
20895
|
+
const context = React31.useContext(EventsContext);
|
|
20896
20896
|
if (context === void 0) {
|
|
20897
20897
|
throw new Error("useEvents must be used within a EventsProvider");
|
|
20898
20898
|
}
|
|
@@ -20904,13 +20904,13 @@ var useSubmitSuccessTrigger = () => {
|
|
|
20904
20904
|
} = useEvents();
|
|
20905
20905
|
return fireSubmitSuccess;
|
|
20906
20906
|
};
|
|
20907
|
-
var ScrollContext = /* @__PURE__ */
|
|
20907
|
+
var ScrollContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
20908
20908
|
var ScrollProvider = (_ref) => {
|
|
20909
20909
|
let {
|
|
20910
20910
|
children
|
|
20911
20911
|
} = _ref;
|
|
20912
|
-
const scrollViewRef =
|
|
20913
|
-
const value =
|
|
20912
|
+
const scrollViewRef = React31.useRef(null);
|
|
20913
|
+
const value = React31.useMemo(() => ({
|
|
20914
20914
|
scrollTo: (element) => {
|
|
20915
20915
|
if (element && scrollViewRef.current) {
|
|
20916
20916
|
const {
|
|
@@ -20928,14 +20928,14 @@ var ScrollProvider = (_ref) => {
|
|
|
20928
20928
|
}
|
|
20929
20929
|
}
|
|
20930
20930
|
}), []);
|
|
20931
|
-
return /* @__PURE__ */
|
|
20931
|
+
return /* @__PURE__ */ React31__namespace.default.createElement("div", {
|
|
20932
20932
|
ref: scrollViewRef
|
|
20933
|
-
}, /* @__PURE__ */
|
|
20933
|
+
}, /* @__PURE__ */ React31__namespace.default.createElement(ScrollContext.Provider, {
|
|
20934
20934
|
value
|
|
20935
20935
|
}, children));
|
|
20936
20936
|
};
|
|
20937
20937
|
function useScroll() {
|
|
20938
|
-
const context =
|
|
20938
|
+
const context = React31.useContext(ScrollContext);
|
|
20939
20939
|
if (context === void 0) {
|
|
20940
20940
|
throw new Error("useScroll must be used within a ScrollProvider");
|
|
20941
20941
|
}
|
|
@@ -21017,13 +21017,13 @@ var __extends = /* @__PURE__ */ (function() {
|
|
|
21017
21017
|
};
|
|
21018
21018
|
})();
|
|
21019
21019
|
var __assign = function() {
|
|
21020
|
-
__assign = Object.assign || function(
|
|
21021
|
-
for (var s,
|
|
21022
|
-
s = arguments[
|
|
21020
|
+
__assign = Object.assign || function(t) {
|
|
21021
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
21022
|
+
s = arguments[i];
|
|
21023
21023
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21024
|
-
|
|
21024
|
+
t[p] = s[p];
|
|
21025
21025
|
}
|
|
21026
|
-
return
|
|
21026
|
+
return t;
|
|
21027
21027
|
};
|
|
21028
21028
|
return __assign.apply(this, arguments);
|
|
21029
21029
|
};
|
|
@@ -21080,13 +21080,13 @@ var SyntaxError = (
|
|
|
21080
21080
|
}
|
|
21081
21081
|
function describeExpected(expected1) {
|
|
21082
21082
|
var descriptions = expected1.map(describeExpectation);
|
|
21083
|
-
var
|
|
21083
|
+
var i;
|
|
21084
21084
|
var j;
|
|
21085
21085
|
descriptions.sort();
|
|
21086
21086
|
if (descriptions.length > 0) {
|
|
21087
|
-
for (
|
|
21088
|
-
if (descriptions[
|
|
21089
|
-
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];
|
|
21090
21090
|
j++;
|
|
21091
21091
|
}
|
|
21092
21092
|
}
|
|
@@ -23367,9 +23367,9 @@ var pegParse = peg$parse;
|
|
|
23367
23367
|
|
|
23368
23368
|
// ../../node_modules/intl-messageformat-parser/lib/normalize.js
|
|
23369
23369
|
var __spreadArrays = function() {
|
|
23370
|
-
for (var s = 0,
|
|
23371
|
-
for (var r = Array(s), k = 0,
|
|
23372
|
-
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++)
|
|
23373
23373
|
r[k] = a[j];
|
|
23374
23374
|
return r;
|
|
23375
23375
|
};
|
|
@@ -23384,10 +23384,10 @@ function normalizeHashtagInPlural(els) {
|
|
|
23384
23384
|
var opt = el.options[id];
|
|
23385
23385
|
var matchingLiteralElIndex = -1;
|
|
23386
23386
|
var literalEl = void 0;
|
|
23387
|
-
for (var
|
|
23388
|
-
var el_1 = opt.value[
|
|
23387
|
+
for (var i = 0; i < opt.value.length; i++) {
|
|
23388
|
+
var el_1 = opt.value[i];
|
|
23389
23389
|
if (isLiteralElement(el_1) && PLURAL_HASHTAG_REGEX.test(el_1.value)) {
|
|
23390
|
-
matchingLiteralElIndex =
|
|
23390
|
+
matchingLiteralElIndex = i;
|
|
23391
23391
|
literalEl = el_1;
|
|
23392
23392
|
break;
|
|
23393
23393
|
}
|
|
@@ -23404,13 +23404,13 @@ function normalizeHashtagInPlural(els) {
|
|
|
23404
23404
|
|
|
23405
23405
|
// ../../node_modules/intl-messageformat-parser/lib/skeleton.js
|
|
23406
23406
|
var __assign2 = function() {
|
|
23407
|
-
__assign2 = Object.assign || function(
|
|
23408
|
-
for (var s,
|
|
23409
|
-
s = arguments[
|
|
23407
|
+
__assign2 = Object.assign || function(t) {
|
|
23408
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
23409
|
+
s = arguments[i];
|
|
23410
23410
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
23411
|
-
|
|
23411
|
+
t[p] = s[p];
|
|
23412
23412
|
}
|
|
23413
|
-
return
|
|
23413
|
+
return t;
|
|
23414
23414
|
};
|
|
23415
23415
|
return __assign2.apply(this, arguments);
|
|
23416
23416
|
};
|
|
@@ -23700,9 +23700,9 @@ function parse(input, opts) {
|
|
|
23700
23700
|
|
|
23701
23701
|
// ../../node_modules/intl-format-cache/lib/index.js
|
|
23702
23702
|
var __spreadArrays2 = function() {
|
|
23703
|
-
for (var s = 0,
|
|
23704
|
-
for (var r = Array(s), k = 0,
|
|
23705
|
-
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++)
|
|
23706
23706
|
r[k] = a[j];
|
|
23707
23707
|
return r;
|
|
23708
23708
|
};
|
|
@@ -23759,9 +23759,9 @@ var __extends2 = /* @__PURE__ */ (function() {
|
|
|
23759
23759
|
};
|
|
23760
23760
|
})();
|
|
23761
23761
|
var __spreadArrays3 = function() {
|
|
23762
|
-
for (var s = 0,
|
|
23763
|
-
for (var r = Array(s), k = 0,
|
|
23764
|
-
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++)
|
|
23765
23765
|
r[k] = a[j];
|
|
23766
23766
|
return r;
|
|
23767
23767
|
};
|
|
@@ -24004,13 +24004,13 @@ function formatHTMLMessage(els, locales, formatters, formats, values, originalMe
|
|
|
24004
24004
|
|
|
24005
24005
|
// ../../node_modules/@wix/wix-i18n-config/node_modules/intl-messageformat/lib/core.js
|
|
24006
24006
|
var __assign3 = function() {
|
|
24007
|
-
__assign3 = Object.assign || function(
|
|
24008
|
-
for (var s,
|
|
24009
|
-
s = arguments[
|
|
24007
|
+
__assign3 = Object.assign || function(t) {
|
|
24008
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
24009
|
+
s = arguments[i];
|
|
24010
24010
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
24011
|
-
|
|
24011
|
+
t[p] = s[p];
|
|
24012
24012
|
}
|
|
24013
|
-
return
|
|
24013
|
+
return t;
|
|
24014
24014
|
};
|
|
24015
24015
|
return __assign3.apply(this, arguments);
|
|
24016
24016
|
};
|
|
@@ -24351,9 +24351,9 @@ function initI18n({ icuOptions = {}, ...options }) {
|
|
|
24351
24351
|
}
|
|
24352
24352
|
|
|
24353
24353
|
// ../form-fields/dist/esm/contexts/translation-context.js
|
|
24354
|
-
var TranslationContext = /* @__PURE__ */
|
|
24354
|
+
var TranslationContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
24355
24355
|
function useTranslation() {
|
|
24356
|
-
const context =
|
|
24356
|
+
const context = React31.useContext(TranslationContext);
|
|
24357
24357
|
if (context === void 0) {
|
|
24358
24358
|
throw new Error("useTranslation must be used within a TranslationProvider");
|
|
24359
24359
|
}
|
|
@@ -24364,10 +24364,10 @@ function useTranslation() {
|
|
|
24364
24364
|
function generateUUID() {
|
|
24365
24365
|
let uuid = "";
|
|
24366
24366
|
const hexValues = "0123456789abcdef";
|
|
24367
|
-
for (let
|
|
24368
|
-
if (
|
|
24367
|
+
for (let i = 0; i < 36; i++) {
|
|
24368
|
+
if (i === 8 || i === 13 || i === 18 || i === 23) {
|
|
24369
24369
|
uuid += "-";
|
|
24370
|
-
} else if (
|
|
24370
|
+
} else if (i === 14) {
|
|
24371
24371
|
uuid += "4";
|
|
24372
24372
|
} else {
|
|
24373
24373
|
uuid += hexValues.charAt(Math.floor(Math.random() * hexValues.length));
|
|
@@ -24375,18 +24375,18 @@ function generateUUID() {
|
|
|
24375
24375
|
}
|
|
24376
24376
|
return uuid;
|
|
24377
24377
|
}
|
|
24378
|
-
var ExperimentsContext = /* @__PURE__ */
|
|
24378
|
+
var ExperimentsContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
24379
24379
|
var useExperiments = () => {
|
|
24380
|
-
const experiments =
|
|
24380
|
+
const experiments = React31.useContext(ExperimentsContext) || {};
|
|
24381
24381
|
return {
|
|
24382
24382
|
experiments,
|
|
24383
24383
|
isExperimentEnabled: (spec) => experiments[spec] === true || experiments[spec] === "true" || false
|
|
24384
24384
|
};
|
|
24385
24385
|
};
|
|
24386
|
-
var HttpClientContext = /* @__PURE__ */
|
|
24387
|
-
var FormContext = /* @__PURE__ */
|
|
24386
|
+
var HttpClientContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
24387
|
+
var FormContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
24388
24388
|
function useForm() {
|
|
24389
|
-
const context =
|
|
24389
|
+
const context = React31.useContext(FormContext);
|
|
24390
24390
|
if (context === void 0) {
|
|
24391
24391
|
throw new Error("useForm must be used within a FormProvider");
|
|
24392
24392
|
}
|
|
@@ -24394,9 +24394,9 @@ function useForm() {
|
|
|
24394
24394
|
}
|
|
24395
24395
|
|
|
24396
24396
|
// ../form-fields/dist/esm/contexts/panorama-context.js
|
|
24397
|
-
var PanoramaContext = /* @__PURE__ */
|
|
24397
|
+
var PanoramaContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
24398
24398
|
function usePanorama() {
|
|
24399
|
-
const context =
|
|
24399
|
+
const context = React31.useContext(PanoramaContext);
|
|
24400
24400
|
if (context === void 0) {
|
|
24401
24401
|
throw new Error("usePanorama must be used within a PanoramaProvider");
|
|
24402
24402
|
}
|
|
@@ -24415,37 +24415,37 @@ function usePanorama() {
|
|
|
24415
24415
|
})
|
|
24416
24416
|
};
|
|
24417
24417
|
}
|
|
24418
|
-
var BiContext = /* @__PURE__ */
|
|
24418
|
+
var BiContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
24419
24419
|
function useBi() {
|
|
24420
|
-
const context =
|
|
24420
|
+
const context = React31.useContext(BiContext);
|
|
24421
24421
|
if (context === void 0) {
|
|
24422
24422
|
throw new Error("useBi must be used within a BiProvider");
|
|
24423
24423
|
}
|
|
24424
24424
|
return context;
|
|
24425
24425
|
}
|
|
24426
|
-
var ForcedStateContext = /* @__PURE__ */
|
|
24426
|
+
var ForcedStateContext = /* @__PURE__ */ React31.createContext([]);
|
|
24427
24427
|
var FALLBACK = {};
|
|
24428
|
-
var ExternalDataContext = /* @__PURE__ */
|
|
24428
|
+
var ExternalDataContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
24429
24429
|
var ExternalDataProvider = (_ref) => {
|
|
24430
24430
|
let {
|
|
24431
24431
|
children,
|
|
24432
24432
|
externalData
|
|
24433
24433
|
} = _ref;
|
|
24434
|
-
return /* @__PURE__ */
|
|
24434
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(ExternalDataContext.Provider, {
|
|
24435
24435
|
value: externalData ?? FALLBACK
|
|
24436
24436
|
}, children);
|
|
24437
24437
|
};
|
|
24438
24438
|
function useExternalData() {
|
|
24439
|
-
const context =
|
|
24439
|
+
const context = React31.useContext(ExternalDataContext);
|
|
24440
24440
|
if (context === void 0) {
|
|
24441
24441
|
throw new Error("useExternalData must be used within a ExternalDataProvider");
|
|
24442
24442
|
}
|
|
24443
24443
|
return context;
|
|
24444
24444
|
}
|
|
24445
|
-
var FieldActionsContext = /* @__PURE__ */
|
|
24446
|
-
var FormFieldsContext = /* @__PURE__ */
|
|
24445
|
+
var FieldActionsContext = /* @__PURE__ */ React31.createContext({});
|
|
24446
|
+
var FormFieldsContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
24447
24447
|
function useFormFields() {
|
|
24448
|
-
const context =
|
|
24448
|
+
const context = React31.useContext(FormFieldsContext);
|
|
24449
24449
|
if (context === void 0) {
|
|
24450
24450
|
throw new Error("useFormFields must be used within a FormFieldsProvider");
|
|
24451
24451
|
}
|
|
@@ -24497,7 +24497,7 @@ var InputField = (_ref) => {
|
|
|
24497
24497
|
} = useFieldValidation();
|
|
24498
24498
|
const form = useForm();
|
|
24499
24499
|
const fieldValue = values[field.target];
|
|
24500
|
-
const errorsByTarget =
|
|
24500
|
+
const errorsByTarget = React31.useMemo(() => groupErrorsByTarget(errors), [errors]);
|
|
24501
24501
|
const fieldErrors = errorsByTarget == null ? void 0 : errorsByTarget[field.target];
|
|
24502
24502
|
const fieldError = fieldErrors == null ? void 0 : fieldErrors[0];
|
|
24503
24503
|
const {
|
|
@@ -24524,7 +24524,7 @@ var InputField = (_ref) => {
|
|
|
24524
24524
|
field_target: field == null ? void 0 : field.target
|
|
24525
24525
|
}));
|
|
24526
24526
|
};
|
|
24527
|
-
const handleChange =
|
|
24527
|
+
const handleChange = React31.useCallback((value) => {
|
|
24528
24528
|
if (fieldError) {
|
|
24529
24529
|
validateFields2([{
|
|
24530
24530
|
value,
|
|
@@ -24540,7 +24540,7 @@ var InputField = (_ref) => {
|
|
|
24540
24540
|
if (!FieldComponent) {
|
|
24541
24541
|
return null;
|
|
24542
24542
|
}
|
|
24543
|
-
return /* @__PURE__ */
|
|
24543
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(FieldComponent, (0, import_extends.default)({}, field.properties, {
|
|
24544
24544
|
onChange: handleChange,
|
|
24545
24545
|
onBlur: _onBlur,
|
|
24546
24546
|
onFocus: _onFocus,
|
|
@@ -24576,7 +24576,7 @@ var ReadOnlyField = (_ref) => {
|
|
|
24576
24576
|
if (!FieldComponent) {
|
|
24577
24577
|
return null;
|
|
24578
24578
|
}
|
|
24579
|
-
return /* @__PURE__ */
|
|
24579
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(FieldComponent, (0, import_extends2.default)({}, field.properties, {
|
|
24580
24580
|
id: field.id,
|
|
24581
24581
|
externalData,
|
|
24582
24582
|
fieldType: field.fieldType,
|
|
@@ -24601,14 +24601,14 @@ var NestedFormField = (_ref) => {
|
|
|
24601
24601
|
const externalData = useExternalData();
|
|
24602
24602
|
const form = useForm();
|
|
24603
24603
|
const fieldValue = values[field.target];
|
|
24604
|
-
const errorsByTarget =
|
|
24604
|
+
const errorsByTarget = React31.useMemo(() => groupErrorsByTarget(errors), [errors]);
|
|
24605
24605
|
const fieldErrors = errorsByTarget == null ? void 0 : errorsByTarget[field.target];
|
|
24606
24606
|
const fieldError = fieldErrors == null ? void 0 : fieldErrors[0];
|
|
24607
24607
|
const {
|
|
24608
24608
|
requiredIndicator,
|
|
24609
24609
|
requiredIndicatorPlacement
|
|
24610
24610
|
} = form.requiredIndicatorProperties || {};
|
|
24611
|
-
const handleChange =
|
|
24611
|
+
const handleChange = React31.useCallback((value) => {
|
|
24612
24612
|
if (!value) {
|
|
24613
24613
|
value = null;
|
|
24614
24614
|
}
|
|
@@ -24618,7 +24618,7 @@ var NestedFormField = (_ref) => {
|
|
|
24618
24618
|
if (!FieldComponent) {
|
|
24619
24619
|
return null;
|
|
24620
24620
|
}
|
|
24621
|
-
return /* @__PURE__ */
|
|
24621
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(FieldComponent, (0, import_extends3.default)({}, field.properties, {
|
|
24622
24622
|
onChange: handleChange,
|
|
24623
24623
|
error: fieldError,
|
|
24624
24624
|
errors: fieldErrors,
|
|
@@ -24648,18 +24648,18 @@ var FormField = (_ref) => {
|
|
|
24648
24648
|
...rest
|
|
24649
24649
|
} = _ref;
|
|
24650
24650
|
if (!isMultilineAddressField(field) && isNestedFormField(field)) {
|
|
24651
|
-
return /* @__PURE__ */
|
|
24651
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(NestedFormField, (0, import_extends4.default)({}, rest, {
|
|
24652
24652
|
field,
|
|
24653
24653
|
FieldLayout
|
|
24654
24654
|
}));
|
|
24655
24655
|
}
|
|
24656
24656
|
if (isInputField2(field)) {
|
|
24657
|
-
return /* @__PURE__ */
|
|
24657
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(InputField, (0, import_extends4.default)({}, rest, {
|
|
24658
24658
|
field,
|
|
24659
24659
|
FieldLayout
|
|
24660
24660
|
}));
|
|
24661
24661
|
}
|
|
24662
|
-
return /* @__PURE__ */
|
|
24662
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(ReadOnlyField, (0, import_extends4.default)({}, rest, {
|
|
24663
24663
|
field,
|
|
24664
24664
|
FieldLayout
|
|
24665
24665
|
}));
|
|
@@ -24675,7 +24675,7 @@ var createFormFields = (_ref) => {
|
|
|
24675
24675
|
FieldLayout
|
|
24676
24676
|
} = _ref;
|
|
24677
24677
|
return form.fields.map((formField) => {
|
|
24678
|
-
const component = /* @__PURE__ */
|
|
24678
|
+
const component = /* @__PURE__ */ React31__namespace.default.createElement(FormField, {
|
|
24679
24679
|
key: formField.id,
|
|
24680
24680
|
field: formField,
|
|
24681
24681
|
values,
|
|
@@ -24710,19 +24710,19 @@ var Focusable = (_ref) => {
|
|
|
24710
24710
|
children,
|
|
24711
24711
|
fieldId
|
|
24712
24712
|
} = _ref;
|
|
24713
|
-
const viewRef =
|
|
24713
|
+
const viewRef = React31.useRef(null);
|
|
24714
24714
|
const {
|
|
24715
24715
|
scrollTo
|
|
24716
24716
|
} = useScroll();
|
|
24717
24717
|
const {
|
|
24718
24718
|
focusedFieldId
|
|
24719
24719
|
} = useFocusedField();
|
|
24720
|
-
|
|
24720
|
+
React31.useEffect(() => {
|
|
24721
24721
|
if (viewRef.current && fieldId === focusedFieldId) {
|
|
24722
24722
|
scrollTo(viewRef.current);
|
|
24723
24723
|
}
|
|
24724
24724
|
}, [scrollTo, fieldId, focusedFieldId]);
|
|
24725
|
-
return /* @__PURE__ */
|
|
24725
|
+
return /* @__PURE__ */ React31__namespace.default.createElement("div", {
|
|
24726
24726
|
ref: viewRef
|
|
24727
24727
|
}, children);
|
|
24728
24728
|
};
|
|
@@ -24745,17 +24745,17 @@ var Grid = (_ref) => {
|
|
|
24745
24745
|
enableAnimations
|
|
24746
24746
|
} = useConfig();
|
|
24747
24747
|
const reactElementsByRow = getReactElementsByRow(items);
|
|
24748
|
-
return /* @__PURE__ */
|
|
24748
|
+
return /* @__PURE__ */ React31__namespace.default.createElement("div", {
|
|
24749
24749
|
className: grid_module_default.container,
|
|
24750
24750
|
dir: isRTL ? "rtl" : ""
|
|
24751
24751
|
}, reactElementsByRow.map((elements, index) => {
|
|
24752
24752
|
var _elements$;
|
|
24753
24753
|
const fieldId = (_elements$ = elements[0]) == null || (_elements$ = _elements$.props) == null || (_elements$ = _elements$.field) == null ? void 0 : _elements$.id;
|
|
24754
24754
|
const key = isMobile && fieldId || index;
|
|
24755
|
-
return /* @__PURE__ */
|
|
24755
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(Focusable, {
|
|
24756
24756
|
key: fieldId,
|
|
24757
24757
|
fieldId
|
|
24758
|
-
}, /* @__PURE__ */
|
|
24758
|
+
}, /* @__PURE__ */ React31__namespace.default.createElement("div", {
|
|
24759
24759
|
key,
|
|
24760
24760
|
style: getGridStyle({
|
|
24761
24761
|
layout
|
|
@@ -24769,7 +24769,7 @@ var Grid = (_ref) => {
|
|
|
24769
24769
|
function getReactElementsByRow(items) {
|
|
24770
24770
|
const reactElementsByRow = items.reduce((result2, item) => {
|
|
24771
24771
|
const row = item.layout.row;
|
|
24772
|
-
const element = /* @__PURE__ */
|
|
24772
|
+
const element = /* @__PURE__ */ React31__namespace.default.cloneElement(item.component, {
|
|
24773
24773
|
key: item.id
|
|
24774
24774
|
});
|
|
24775
24775
|
if (result2[row]) {
|
|
@@ -24781,14 +24781,14 @@ function getReactElementsByRow(items) {
|
|
|
24781
24781
|
}, []);
|
|
24782
24782
|
return reactElementsByRow;
|
|
24783
24783
|
}
|
|
24784
|
-
var FormViewContext = /* @__PURE__ */
|
|
24784
|
+
var FormViewContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
24785
24785
|
function useFieldView(fieldId) {
|
|
24786
24786
|
const context = useFormView();
|
|
24787
24787
|
const fieldView = context.fields.find((field) => field.id === fieldId);
|
|
24788
24788
|
return fieldView;
|
|
24789
24789
|
}
|
|
24790
24790
|
function useFormView() {
|
|
24791
|
-
const context =
|
|
24791
|
+
const context = React31.useContext(FormViewContext);
|
|
24792
24792
|
if (context === void 0) {
|
|
24793
24793
|
throw new Error("useFormView must be used within a FormViewProvider");
|
|
24794
24794
|
}
|
|
@@ -24825,7 +24825,7 @@ var DefaultFieldLayout = (_ref) => {
|
|
|
24825
24825
|
const gridColumn = `${layout.column + 1} / span ${layout.width}`;
|
|
24826
24826
|
const [labelRow, inputRow] = rows.map((currentRow) => `${currentRow} / span 1`);
|
|
24827
24827
|
if ("children" in rest) {
|
|
24828
|
-
return /* @__PURE__ */
|
|
24828
|
+
return /* @__PURE__ */ React31__namespace.default.createElement("div", (0, import_extends5.default)({
|
|
24829
24829
|
style: {
|
|
24830
24830
|
gridRow,
|
|
24831
24831
|
gridColumn
|
|
@@ -24837,13 +24837,13 @@ var DefaultFieldLayout = (_ref) => {
|
|
|
24837
24837
|
renderInput,
|
|
24838
24838
|
renderDescription
|
|
24839
24839
|
} = rest;
|
|
24840
|
-
return /* @__PURE__ */
|
|
24840
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(React31__namespace.default.Fragment, null, /* @__PURE__ */ React31__namespace.default.createElement("div", {
|
|
24841
24841
|
style: {
|
|
24842
24842
|
gridRow: labelRow,
|
|
24843
24843
|
gridColumn
|
|
24844
24844
|
},
|
|
24845
24845
|
className: default_field_layout_module_default.label
|
|
24846
|
-
}, renderLabel()), /* @__PURE__ */
|
|
24846
|
+
}, renderLabel()), /* @__PURE__ */ React31__namespace.default.createElement("div", (0, import_extends5.default)({
|
|
24847
24847
|
style: {
|
|
24848
24848
|
gridRow: inputRow,
|
|
24849
24849
|
gridColumn
|
|
@@ -24869,18 +24869,18 @@ var FormRoot = (_ref) => {
|
|
|
24869
24869
|
errors,
|
|
24870
24870
|
FieldLayout: DefaultFieldLayout
|
|
24871
24871
|
});
|
|
24872
|
-
return /* @__PURE__ */
|
|
24872
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(Grid, {
|
|
24873
24873
|
isRTL,
|
|
24874
24874
|
items: formFields,
|
|
24875
24875
|
layout: form.grid
|
|
24876
24876
|
});
|
|
24877
24877
|
};
|
|
24878
24878
|
var Form = (props) => {
|
|
24879
|
-
return /* @__PURE__ */
|
|
24879
|
+
return /* @__PURE__ */ React31__namespace.default.createElement(FormViewContext.Provider, {
|
|
24880
24880
|
value: props.form
|
|
24881
|
-
}, /* @__PURE__ */
|
|
24881
|
+
}, /* @__PURE__ */ React31__namespace.default.createElement(UniqueFieldSuffixContextProvider, {
|
|
24882
24882
|
parentId: props.form.parentId
|
|
24883
|
-
}, /* @__PURE__ */
|
|
24883
|
+
}, /* @__PURE__ */ React31__namespace.default.createElement(FormRoot, props)));
|
|
24884
24884
|
};
|
|
24885
24885
|
|
|
24886
24886
|
// ../form-fields/dist/esm/utils/sort-fields.js
|
|
@@ -26862,19 +26862,19 @@ var initialState = {
|
|
|
26862
26862
|
getCountryAddressForm: () => void 0,
|
|
26863
26863
|
addressTemplates: void 0
|
|
26864
26864
|
};
|
|
26865
|
-
var AddressFormsContext = /* @__PURE__ */
|
|
26865
|
+
var AddressFormsContext = /* @__PURE__ */ React31.createContext(initialState);
|
|
26866
26866
|
var getAddressForm = (templates, country) => {
|
|
26867
26867
|
var _templates$find, _templates$find2;
|
|
26868
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);
|
|
26869
26869
|
};
|
|
26870
26870
|
function useAddressForms() {
|
|
26871
|
-
const context =
|
|
26871
|
+
const context = React31.useContext(AddressFormsContext);
|
|
26872
26872
|
if (context === void 0) {
|
|
26873
26873
|
throw new Error("useAddressForms must be used within a AddressFormsContext");
|
|
26874
26874
|
}
|
|
26875
26875
|
return context;
|
|
26876
26876
|
}
|
|
26877
|
-
var FieldInitialDataContext = /* @__PURE__ */
|
|
26877
|
+
var FieldInitialDataContext = /* @__PURE__ */ React31.createContext(void 0);
|
|
26878
26878
|
|
|
26879
26879
|
// ../form-fields/dist/esm/fields/vat-id/vat-id-validation.js
|
|
26880
26880
|
init_esm2();
|
|
@@ -26902,12 +26902,12 @@ function isCpfValid(modelValue) {
|
|
|
26902
26902
|
if (!modelValue || CPF_BLACKLIST.includes(modelValue)) {
|
|
26903
26903
|
return false;
|
|
26904
26904
|
}
|
|
26905
|
-
let
|
|
26905
|
+
let i, v1 = 0, v2;
|
|
26906
26906
|
const chars = modelValue.replace(/\D/g, "").split("");
|
|
26907
26907
|
if (chars.length === 11) {
|
|
26908
26908
|
const factors = [10, 9, 8, 7, 6, 5, 4, 3, 2];
|
|
26909
|
-
for (
|
|
26910
|
-
v1 += factors[
|
|
26909
|
+
for (i = 0; i < factors.length; ++i) {
|
|
26910
|
+
v1 += factors[i] * parseInt(chars[i], 10);
|
|
26911
26911
|
}
|
|
26912
26912
|
v1 = 11 - v1 % 11;
|
|
26913
26913
|
if (v1 >= 10) {
|
|
@@ -26917,8 +26917,8 @@ function isCpfValid(modelValue) {
|
|
|
26917
26917
|
return false;
|
|
26918
26918
|
}
|
|
26919
26919
|
v2 = 2 * v1;
|
|
26920
|
-
for (
|
|
26921
|
-
v2 += (factors[
|
|
26920
|
+
for (i = 0; i < factors.length; ++i) {
|
|
26921
|
+
v2 += (factors[i] + 1) * parseInt(chars[i], 10);
|
|
26922
26922
|
}
|
|
26923
26923
|
v2 = 11 - v2 % 11;
|
|
26924
26924
|
if (v2 >= 10) {
|
|
@@ -27964,8 +27964,8 @@ function evaluateOverrideConditionFactory(dateFactory = () => /* @__PURE__ */ ne
|
|
|
27964
27964
|
try {
|
|
27965
27965
|
const rule = getRule(override.condition);
|
|
27966
27966
|
return rule.evaluate(submission);
|
|
27967
|
-
} catch (
|
|
27968
|
-
console.error(
|
|
27967
|
+
} catch (e) {
|
|
27968
|
+
console.error(e);
|
|
27969
27969
|
return false;
|
|
27970
27970
|
}
|
|
27971
27971
|
}
|
|
@@ -28506,7 +28506,7 @@ function clearFieldsWhenHiddenByRule(form, overrides, currentValues, newValues,
|
|
|
28506
28506
|
const fieldCount = (form.fields ?? []).length;
|
|
28507
28507
|
const clearedTargets = [];
|
|
28508
28508
|
let currentForm = applyAllOverrides(form, currentValues, overrides);
|
|
28509
|
-
for (let
|
|
28509
|
+
for (let i = 0; i < fieldCount; i++) {
|
|
28510
28510
|
const newForm = applyAllOverrides(form, newValues, overrides);
|
|
28511
28511
|
const newHiddenTargets = findHiddenTargets(newForm);
|
|
28512
28512
|
const currentHiddenTargets = findHiddenTargets(currentForm);
|
|
@@ -28868,8 +28868,8 @@ function acceptOnlyValidPayments({ field, fieldValue }) {
|
|
|
28868
28868
|
|
|
28869
28869
|
// ../form-viewer/dist/esm/components/form/use-form-values.js
|
|
28870
28870
|
var useFormValues = (form, values, onChange, config) => {
|
|
28871
|
-
const normalizedValues =
|
|
28872
|
-
|
|
28871
|
+
const normalizedValues = React31.useMemo(() => normalizeValues(form, fillEmptyValues(form, values), true, config), [form, values, config]);
|
|
28872
|
+
React31.useEffect(() => {
|
|
28873
28873
|
const hasAnyValueChanged = !deepEqual(normalizedValues, values);
|
|
28874
28874
|
if (hasAnyValueChanged) {
|
|
28875
28875
|
onChange?.(normalizedValues);
|
|
@@ -28881,7 +28881,7 @@ var useFormView2 = (form, stepId, breakpoint) => {
|
|
|
28881
28881
|
const { isMobile } = useConfig();
|
|
28882
28882
|
const experiments = useExperiments();
|
|
28883
28883
|
const useFieldsV2 = experiments.isExperimentEnabled(EXPERIMENTS.USE_FIELDS_V2);
|
|
28884
|
-
return
|
|
28884
|
+
return React31.useMemo(() => {
|
|
28885
28885
|
return (form?.steps || []).filter((step) => !stepId || stepId === step.id).map((step) => {
|
|
28886
28886
|
return createFormView({
|
|
28887
28887
|
form,
|
|
@@ -28894,7 +28894,7 @@ var useFormView2 = (form, stepId, breakpoint) => {
|
|
|
28894
28894
|
}, [form, stepId, isMobile, breakpoint, useFieldsV2]);
|
|
28895
28895
|
};
|
|
28896
28896
|
var useReportFieldEdit = (form) => {
|
|
28897
|
-
const lastChangedFields =
|
|
28897
|
+
const lastChangedFields = React31.useRef([]);
|
|
28898
28898
|
const bi = useBi();
|
|
28899
28899
|
return (changedValues) => {
|
|
28900
28900
|
const changedFieldTargets = Object.keys(changedValues);
|
|
@@ -28914,7 +28914,7 @@ var useReportFieldEdit = (form) => {
|
|
|
28914
28914
|
};
|
|
28915
28915
|
var useScrollToFirstError = ({ form, handleStepChange, currentStepId }) => {
|
|
28916
28916
|
const { setFocusedFieldId } = useFocusedField();
|
|
28917
|
-
const scrollToFirstError =
|
|
28917
|
+
const scrollToFirstError = React31.useCallback((errors) => {
|
|
28918
28918
|
const sortedFieldsInStep = getSortedFields(form, {
|
|
28919
28919
|
stepId: currentStepId
|
|
28920
28920
|
});
|
|
@@ -28923,7 +28923,7 @@ var useScrollToFirstError = ({ form, handleStepChange, currentStepId }) => {
|
|
|
28923
28923
|
});
|
|
28924
28924
|
setFocusedFieldId(fieldWithError?.id);
|
|
28925
28925
|
}, [currentStepId, form, setFocusedFieldId]);
|
|
28926
|
-
const handleScrollToFirstError =
|
|
28926
|
+
const handleScrollToFirstError = React31.useCallback((errors) => {
|
|
28927
28927
|
const sortedFields = getSortedFields(form);
|
|
28928
28928
|
const field = sortedFields?.find((_field) => {
|
|
28929
28929
|
return errors.some((error2) => _field.target === error2.errorPath.split("/")[0]);
|
|
@@ -28998,12 +28998,12 @@ var getCheckoutMessage = (text) => {
|
|
|
28998
28998
|
}
|
|
28999
28999
|
};
|
|
29000
29000
|
};
|
|
29001
|
-
var SubmitStatusContext =
|
|
29001
|
+
var SubmitStatusContext = React31.createContext(void 0);
|
|
29002
29002
|
var SubmitStatusProvider = ({ children }) => {
|
|
29003
|
-
const [submitSuccessMessage, setSubmitSuccessMessage] =
|
|
29004
|
-
const [submitFailureCode, setSubmitFailureCode] =
|
|
29005
|
-
const [submitFailureMessage, setSubmitFailureMessage] =
|
|
29006
|
-
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(() => ({
|
|
29007
29007
|
submitSuccessMessage,
|
|
29008
29008
|
submitFailureCode,
|
|
29009
29009
|
submitFailureMessage,
|
|
@@ -29011,10 +29011,10 @@ var SubmitStatusProvider = ({ children }) => {
|
|
|
29011
29011
|
setSubmitFailureCode,
|
|
29012
29012
|
setSubmitFailureMessage
|
|
29013
29013
|
}), [submitSuccessMessage, submitFailureCode, submitFailureMessage]);
|
|
29014
|
-
return
|
|
29014
|
+
return React31__namespace.default.createElement(SubmitStatusContext.Provider, { value }, children);
|
|
29015
29015
|
};
|
|
29016
29016
|
var useSubmitStatus = () => {
|
|
29017
|
-
const context =
|
|
29017
|
+
const context = React31.useContext(SubmitStatusContext);
|
|
29018
29018
|
if (context === void 0) {
|
|
29019
29019
|
throw new Error("useSubmitStatus must be used within a SubmitStatusProvider");
|
|
29020
29020
|
}
|
|
@@ -29037,19 +29037,19 @@ var BiFormSubmissionStatus;
|
|
|
29037
29037
|
})(BiFormSubmissionStatus || (BiFormSubmissionStatus = {}));
|
|
29038
29038
|
var useSubmit = ({ validateAndScrollToError, submitAction, onSubmit, onSubmitSuccess, onSubmitFailure, resetFormValues, values, submitSettings, handleStepChange, navigateToCheckout, onValidate, handleScrollToFirstError }) => {
|
|
29039
29039
|
const { setSubmitSuccessMessage, setSubmitFailureCode, setSubmitFailureMessage } = useSubmitStatus();
|
|
29040
|
-
const { t
|
|
29040
|
+
const { t } = useTranslation();
|
|
29041
29041
|
const { report } = useBi();
|
|
29042
29042
|
const fireSubmitSuccess = useSubmitSuccessTrigger();
|
|
29043
29043
|
const panorama = usePanorama();
|
|
29044
|
-
const reportSubmitFormBi =
|
|
29044
|
+
const reportSubmitFormBi = React31.useCallback(({ status, id }) => report(submitFormClick({
|
|
29045
29045
|
submission_status: status,
|
|
29046
29046
|
submission_id: id ?? void 0
|
|
29047
29047
|
})), [report]);
|
|
29048
|
-
const handleSubmitSuccess =
|
|
29048
|
+
const handleSubmitSuccess = React31.useCallback((submission) => {
|
|
29049
29049
|
const action = submitSettings?.submitSuccessAction;
|
|
29050
29050
|
const checkoutId = submission?.orderDetails?.checkoutId;
|
|
29051
29051
|
if (checkoutId && navigateToCheckout) {
|
|
29052
|
-
setSubmitSuccessMessage(getCheckoutMessage(
|
|
29052
|
+
setSubmitSuccessMessage(getCheckoutMessage(t("submit.checkout.message")));
|
|
29053
29053
|
navigateToCheckout(checkoutId);
|
|
29054
29054
|
} else if (action === SubmitSuccessAction.THANK_YOU_MESSAGE) {
|
|
29055
29055
|
setSubmitSuccessMessage(submitSettings?.thankYouMessageOptions?.richContent);
|
|
@@ -29067,7 +29067,7 @@ var useSubmit = ({ validateAndScrollToError, submitAction, onSubmit, onSubmitSuc
|
|
|
29067
29067
|
setSubmitFailureCode(void 0);
|
|
29068
29068
|
setSubmitFailureMessage(void 0);
|
|
29069
29069
|
}, [
|
|
29070
|
-
|
|
29070
|
+
t,
|
|
29071
29071
|
submitSettings,
|
|
29072
29072
|
handleStepChange,
|
|
29073
29073
|
navigateToCheckout,
|
|
@@ -29075,12 +29075,12 @@ var useSubmit = ({ validateAndScrollToError, submitAction, onSubmit, onSubmitSuc
|
|
|
29075
29075
|
setSubmitFailureCode,
|
|
29076
29076
|
setSubmitFailureMessage
|
|
29077
29077
|
]);
|
|
29078
|
-
const handleSubmitFailure =
|
|
29078
|
+
const handleSubmitFailure = React31.useCallback((error2) => {
|
|
29079
29079
|
const err = getErrorCode(error2);
|
|
29080
29080
|
setSubmitFailureCode(err);
|
|
29081
29081
|
setSubmitSuccessMessage(void 0);
|
|
29082
29082
|
}, [setSubmitFailureCode, setSubmitSuccessMessage]);
|
|
29083
|
-
const handleCustomErrorMessages =
|
|
29083
|
+
const handleCustomErrorMessages = React31.useCallback((error2) => {
|
|
29084
29084
|
const errors = getErrorList(error2);
|
|
29085
29085
|
const formCustomErrorMessage = getFormCustomErrorMessage(errors);
|
|
29086
29086
|
if (formCustomErrorMessage) {
|
|
@@ -29092,7 +29092,7 @@ var useSubmit = ({ validateAndScrollToError, submitAction, onSubmit, onSubmitSuc
|
|
|
29092
29092
|
handleScrollToFirstError?.(fieldCustomErrorMessages);
|
|
29093
29093
|
}
|
|
29094
29094
|
}, [setSubmitFailureMessage, onValidate, handleScrollToFirstError]);
|
|
29095
|
-
const submitForm =
|
|
29095
|
+
const submitForm = React31.useCallback(async () => {
|
|
29096
29096
|
const errors = await validateAndScrollToError(values);
|
|
29097
29097
|
onSubmit?.();
|
|
29098
29098
|
reportSubmitFormBi({ status: BiFormSubmissionStatus.INIT });
|
|
@@ -29168,7 +29168,7 @@ var reportErrorChanges = ({ bi, existingErrors, newErrors, form }) => {
|
|
|
29168
29168
|
var useValidation = ({ form, errorsRef, setErrors, validationMode }) => {
|
|
29169
29169
|
const { addressTemplates } = useAddressForms();
|
|
29170
29170
|
const externalData = useExternalData();
|
|
29171
|
-
const validateFields2 =
|
|
29171
|
+
const validateFields2 = React31.useCallback(async (newValues) => {
|
|
29172
29172
|
const result2 = await validate(form, newValues, addressTemplates, validationMode);
|
|
29173
29173
|
const _errors = result2?.errors || [];
|
|
29174
29174
|
const additionalErrors = runAdditionalValidation({
|
|
@@ -29180,7 +29180,7 @@ var useValidation = ({ form, errorsRef, setErrors, validationMode }) => {
|
|
|
29180
29180
|
setErrors(allErrors);
|
|
29181
29181
|
return allErrors;
|
|
29182
29182
|
}, [form, setErrors, addressTemplates, externalData, validationMode]);
|
|
29183
|
-
const handleFieldValidation =
|
|
29183
|
+
const handleFieldValidation = React31.useCallback(async (fieldsToValidate) => {
|
|
29184
29184
|
const fieldErrors = await getFieldErrors(fieldsToValidate, form, addressTemplates, externalData, validationMode);
|
|
29185
29185
|
const otherErrors = (errorsRef.current ?? []).filter((error2) => {
|
|
29186
29186
|
return !findErrorByNormalizedPath(fieldsToValidate, error2.errorPath);
|
|
@@ -29196,7 +29196,7 @@ var useValidation = ({ form, errorsRef, setErrors, validationMode }) => {
|
|
|
29196
29196
|
externalData,
|
|
29197
29197
|
validationMode
|
|
29198
29198
|
]);
|
|
29199
|
-
const validateStep =
|
|
29199
|
+
const validateStep = React31.useCallback(async (stepId, newValues) => {
|
|
29200
29200
|
const items = form?.steps?.find((step) => step.id === stepId)?.layout?.large?.items || [];
|
|
29201
29201
|
const validationErrors = await Promise.all(items.map(async (item) => {
|
|
29202
29202
|
const field = form?.fields?.find((_field) => _field.id === item.fieldId);
|
|
@@ -29232,26 +29232,26 @@ var SubmitThankYouMessage = ({ messageText }) => {
|
|
|
29232
29232
|
if (!messageText) {
|
|
29233
29233
|
return null;
|
|
29234
29234
|
}
|
|
29235
|
-
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 });
|
|
29236
29236
|
};
|
|
29237
|
-
var
|
|
29238
|
-
|
|
29239
|
-
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;
|
|
29240
29240
|
|
|
29241
29241
|
// ../form-viewer/dist/esm/components/submit-status-message/submit-error-message.js
|
|
29242
29242
|
var ERROR_MESSAGE_KEY = "submit.failed.message";
|
|
29243
29243
|
var SubmitErrorMessage = ({ errorMessageCode, errorMessage }) => {
|
|
29244
|
-
const { t
|
|
29244
|
+
const { t, i18n: i18n2 } = useTranslation();
|
|
29245
29245
|
if (!errorMessageCode && !errorMessage) {
|
|
29246
29246
|
return null;
|
|
29247
29247
|
}
|
|
29248
29248
|
const errorMessageKeyByCode = `${ERROR_MESSAGE_KEY}.${errorMessageCode}`;
|
|
29249
29249
|
const errorMessageKey = i18n2.exists(`${TRANSLATIONS_NAMESPACE}:${errorMessageKeyByCode}`) ? errorMessageKeyByCode : ERROR_MESSAGE_KEY;
|
|
29250
|
-
return
|
|
29250
|
+
return React31__namespace.default.createElement(
|
|
29251
29251
|
"div",
|
|
29252
29252
|
{ className: submit_status_message_module_default.errorMessage, "data-hook": DATA_HOOKS.SUBMIT_ERROR_MESSAGE },
|
|
29253
|
-
|
|
29254
|
-
errorMessage ||
|
|
29253
|
+
React31__namespace.default.createElement(Error_default, { className: submit_status_message_module_default.errorIcon, "aria-hidden": "true" }),
|
|
29254
|
+
errorMessage || t(errorMessageKey)
|
|
29255
29255
|
);
|
|
29256
29256
|
};
|
|
29257
29257
|
|
|
@@ -29270,8 +29270,8 @@ var transitionStyles = {
|
|
|
29270
29270
|
exited: { opacity: 0 }
|
|
29271
29271
|
};
|
|
29272
29272
|
var FadeOut = ({ visible, children }) => {
|
|
29273
|
-
const nodeRef =
|
|
29274
|
-
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: {
|
|
29275
29275
|
...defaultStyle,
|
|
29276
29276
|
...transitionStyles[state]
|
|
29277
29277
|
} }, [ENTERING, ENTERED, EXITING].includes(state) ? children : null));
|
|
@@ -29280,24 +29280,24 @@ var FadeOut = ({ visible, children }) => {
|
|
|
29280
29280
|
// ../form-viewer/dist/esm/components/submit-status-message/submit-status-message.js
|
|
29281
29281
|
var SubmitStatusMessage = () => {
|
|
29282
29282
|
const { submitSuccessMessage, submitFailureCode, submitFailureMessage } = useSubmitStatus();
|
|
29283
|
-
return
|
|
29283
|
+
return React31__namespace.default.createElement(
|
|
29284
29284
|
"div",
|
|
29285
29285
|
{ role: "region", "aria-live": "polite" },
|
|
29286
|
-
|
|
29286
|
+
React31__namespace.default.createElement(
|
|
29287
29287
|
FadeOut,
|
|
29288
29288
|
{ visible: !!submitSuccessMessage },
|
|
29289
|
-
|
|
29289
|
+
React31__namespace.default.createElement(SubmitThankYouMessage, { messageText: submitSuccessMessage })
|
|
29290
29290
|
),
|
|
29291
|
-
|
|
29291
|
+
React31__namespace.default.createElement(SubmitErrorMessage, { errorMessageCode: submitFailureCode, errorMessage: submitFailureMessage })
|
|
29292
29292
|
);
|
|
29293
29293
|
};
|
|
29294
29294
|
var StepTitleA11y = ({ index = 0, total = 0 }) => {
|
|
29295
|
-
const { t
|
|
29296
|
-
const stepTitleA11y =
|
|
29295
|
+
const { t } = useTranslation();
|
|
29296
|
+
const stepTitleA11y = t("form.a11y.step.index.title", {
|
|
29297
29297
|
index: index + 1,
|
|
29298
29298
|
total
|
|
29299
29299
|
});
|
|
29300
|
-
return total > 1 ?
|
|
29300
|
+
return total > 1 ? React31__namespace.default.createElement("span", { "aria-label": stepTitleA11y, "aria-live": "polite" }) : null;
|
|
29301
29301
|
};
|
|
29302
29302
|
|
|
29303
29303
|
// ../form-viewer/dist/esm/components/form/form-root.js
|
|
@@ -29324,13 +29324,13 @@ var FormRoot2 = ({
|
|
|
29324
29324
|
onStatusChange,
|
|
29325
29325
|
validationMode
|
|
29326
29326
|
}) => {
|
|
29327
|
-
const formWithOverrides =
|
|
29327
|
+
const formWithOverrides = React31.useMemo(() => applyAllOverrides(unprocessedForm, unprocessedValues, overrides), [unprocessedForm, unprocessedValues, overrides]);
|
|
29328
29328
|
const formId = formWithOverrides.id;
|
|
29329
29329
|
const { setFocusedFieldId } = useFocusedField();
|
|
29330
29330
|
const normalizedValues = useFormValues(formWithOverrides, unprocessedValues, onChange, config);
|
|
29331
|
-
const valuesRef =
|
|
29331
|
+
const valuesRef = React31.useRef(normalizedValues);
|
|
29332
29332
|
valuesRef.current = normalizedValues;
|
|
29333
|
-
const errorsRef =
|
|
29333
|
+
const errorsRef = React31.useRef(errors);
|
|
29334
29334
|
errorsRef.current = errors;
|
|
29335
29335
|
const bi = useBi();
|
|
29336
29336
|
const reportFieldEdit = useReportFieldEdit(formWithOverrides);
|
|
@@ -29359,7 +29359,7 @@ var FormRoot2 = ({
|
|
|
29359
29359
|
});
|
|
29360
29360
|
onValidate(newErrors);
|
|
29361
29361
|
};
|
|
29362
|
-
|
|
29362
|
+
React31.useEffect(() => {
|
|
29363
29363
|
bi.report(formView({ mode: readOnly ? "preview" : "live_site" }));
|
|
29364
29364
|
}, []);
|
|
29365
29365
|
const formViews = useFormView2(formWithOverrides, stepId, breakpoint);
|
|
@@ -29370,7 +29370,7 @@ var FormRoot2 = ({
|
|
|
29370
29370
|
setErrors: _onValidate,
|
|
29371
29371
|
validationMode
|
|
29372
29372
|
});
|
|
29373
|
-
const handleStepChange =
|
|
29373
|
+
const handleStepChange = React31.useCallback((step) => {
|
|
29374
29374
|
const newStepId = formWithOverrides.steps?.[step]?.id;
|
|
29375
29375
|
if (newStepId) {
|
|
29376
29376
|
const firstFieldInStep = getSortedFields(formWithOverrides, {
|
|
@@ -29385,17 +29385,17 @@ var FormRoot2 = ({
|
|
|
29385
29385
|
handleStepChange,
|
|
29386
29386
|
currentStepId: stepId
|
|
29387
29387
|
});
|
|
29388
|
-
const resetFormValues =
|
|
29388
|
+
const resetFormValues = React31.useCallback(() => {
|
|
29389
29389
|
onChange(fillEmptyValues(formWithOverrides, {}));
|
|
29390
29390
|
}, [formWithOverrides, onChange]);
|
|
29391
|
-
const validateAndScrollToError =
|
|
29391
|
+
const validateAndScrollToError = React31.useCallback(async (values) => {
|
|
29392
29392
|
const validationErrors = await validateFields2(values);
|
|
29393
29393
|
if (validationErrors && validationErrors.length) {
|
|
29394
29394
|
handleScrollToFirstError(validationErrors);
|
|
29395
29395
|
}
|
|
29396
29396
|
return validationErrors;
|
|
29397
29397
|
}, [validateFields2, handleScrollToFirstError]);
|
|
29398
|
-
const submitAction =
|
|
29398
|
+
const submitAction = React31.useCallback(async (values) => {
|
|
29399
29399
|
const response = await actions?.submitForm?.(formId, values);
|
|
29400
29400
|
return response?.submission;
|
|
29401
29401
|
}, [actions, formId]);
|
|
@@ -29413,7 +29413,7 @@ var FormRoot2 = ({
|
|
|
29413
29413
|
onValidate: _onValidate,
|
|
29414
29414
|
handleScrollToFirstError
|
|
29415
29415
|
});
|
|
29416
|
-
|
|
29416
|
+
React31.useImperativeHandle(forwardedRef, () => ({
|
|
29417
29417
|
submit: submitForm,
|
|
29418
29418
|
validate: async () => {
|
|
29419
29419
|
const validationErrors = await validateFields2(normalizedValues);
|
|
@@ -29432,9 +29432,9 @@ var FormRoot2 = ({
|
|
|
29432
29432
|
scrollToFirstError
|
|
29433
29433
|
]);
|
|
29434
29434
|
const currentStep = getStepIndex(stepId, formWithOverrides.steps);
|
|
29435
|
-
const setNextStep =
|
|
29436
|
-
const setPreviousStep =
|
|
29437
|
-
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 ? {
|
|
29438
29438
|
actions: { ...actions, submitForm, setNextStep, setPreviousStep },
|
|
29439
29439
|
formId,
|
|
29440
29440
|
inProgress
|
|
@@ -29442,23 +29442,23 @@ var FormRoot2 = ({
|
|
|
29442
29442
|
if (!formViews?.length || !currentView) {
|
|
29443
29443
|
return null;
|
|
29444
29444
|
}
|
|
29445
|
-
return
|
|
29445
|
+
return React31__namespace.default.createElement(
|
|
29446
29446
|
FieldValidationContext.Provider,
|
|
29447
29447
|
{ value: {
|
|
29448
29448
|
validateFields: handleFieldValidation
|
|
29449
29449
|
} },
|
|
29450
|
-
|
|
29450
|
+
React31__namespace.default.createElement(
|
|
29451
29451
|
FieldActionsContext.Provider,
|
|
29452
29452
|
{ value: fieldActions },
|
|
29453
|
-
|
|
29453
|
+
React31__namespace.default.createElement(
|
|
29454
29454
|
FormStatusProvider,
|
|
29455
29455
|
{ onStatusChange },
|
|
29456
|
-
|
|
29456
|
+
React31__namespace.default.createElement(
|
|
29457
29457
|
"div",
|
|
29458
29458
|
{ "data-hook": DATA_HOOKS.FORM_ROOT },
|
|
29459
|
-
|
|
29460
|
-
|
|
29461
|
-
|
|
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)
|
|
29462
29462
|
)
|
|
29463
29463
|
)
|
|
29464
29464
|
)
|
|
@@ -29471,8 +29471,8 @@ var dummyBi = {
|
|
|
29471
29471
|
updateDefaults: () => dummyBi
|
|
29472
29472
|
};
|
|
29473
29473
|
var useFormBi = (form, bi, biFormFillSessionId) => {
|
|
29474
|
-
const formEditSessionId =
|
|
29475
|
-
return
|
|
29474
|
+
const formEditSessionId = React31.useMemo(generateUUID, []);
|
|
29475
|
+
return React31.useMemo(() => {
|
|
29476
29476
|
if (!bi) {
|
|
29477
29477
|
return dummyBi;
|
|
29478
29478
|
}
|
|
@@ -29502,12 +29502,12 @@ var useFormBi = (form, bi, biFormFillSessionId) => {
|
|
|
29502
29502
|
|
|
29503
29503
|
// ../form-viewer/dist/esm/components/root/form-viewer-provider.js
|
|
29504
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 }) => {
|
|
29505
|
-
const translations =
|
|
29505
|
+
const translations = React31.useMemo(() => ({
|
|
29506
29506
|
t: i18n2.getFixedT(locale, translationNamespace),
|
|
29507
29507
|
i18n: i18n2
|
|
29508
29508
|
}), [locale, i18n2, translationNamespace]);
|
|
29509
29509
|
const formBi = useFormBi(form, bi, biFormFillSessionId);
|
|
29510
|
-
const config =
|
|
29510
|
+
const config = React31.useMemo(() => ({
|
|
29511
29511
|
locale,
|
|
29512
29512
|
regionalFormat,
|
|
29513
29513
|
instance,
|
|
@@ -29534,59 +29534,59 @@ var FormViewerProvider = ({ i18n: i18n2, bi, biFormFillSessionId, form, isMobile
|
|
|
29534
29534
|
isRTL,
|
|
29535
29535
|
enableAnimations
|
|
29536
29536
|
]);
|
|
29537
|
-
const forcedViewState =
|
|
29538
|
-
return
|
|
29537
|
+
const forcedViewState = React31.useMemo(() => forcedState ?? [], [forcedState]);
|
|
29538
|
+
return React31__namespace.default.createElement(
|
|
29539
29539
|
FormFieldsContext.Provider,
|
|
29540
29540
|
{ value: fields },
|
|
29541
|
-
|
|
29541
|
+
React31__namespace.default.createElement(
|
|
29542
29542
|
HttpClientContext.Provider,
|
|
29543
29543
|
{ value: { httpClient } },
|
|
29544
|
-
|
|
29544
|
+
React31__namespace.default.createElement(
|
|
29545
29545
|
PanoramaContext.Provider,
|
|
29546
29546
|
{ value: { panorama } },
|
|
29547
|
-
|
|
29547
|
+
React31__namespace.default.createElement(
|
|
29548
29548
|
TranslationContext.Provider,
|
|
29549
29549
|
{ value: translations },
|
|
29550
|
-
|
|
29550
|
+
React31__namespace.default.createElement(
|
|
29551
29551
|
ScrollProvider,
|
|
29552
29552
|
null,
|
|
29553
|
-
|
|
29553
|
+
React31__namespace.default.createElement(
|
|
29554
29554
|
FocusedFieldProvider,
|
|
29555
29555
|
null,
|
|
29556
|
-
|
|
29556
|
+
React31__namespace.default.createElement(
|
|
29557
29557
|
FieldInitialDataContext.Provider,
|
|
29558
29558
|
{ value: fieldInitialData },
|
|
29559
|
-
|
|
29559
|
+
React31__namespace.default.createElement(
|
|
29560
29560
|
BiContext.Provider,
|
|
29561
29561
|
{ value: formBi },
|
|
29562
|
-
|
|
29562
|
+
React31__namespace.default.createElement(
|
|
29563
29563
|
ExternalDataProvider,
|
|
29564
29564
|
{ externalData },
|
|
29565
|
-
|
|
29565
|
+
React31__namespace.default.createElement(
|
|
29566
29566
|
ConfigContext.Provider,
|
|
29567
29567
|
{ value: config },
|
|
29568
|
-
|
|
29568
|
+
React31__namespace.default.createElement(
|
|
29569
29569
|
ForcedStateContext.Provider,
|
|
29570
29570
|
{ value: forcedViewState },
|
|
29571
|
-
|
|
29571
|
+
React31__namespace.default.createElement(
|
|
29572
29572
|
FormContext.Provider,
|
|
29573
29573
|
{ value: form },
|
|
29574
|
-
|
|
29574
|
+
React31__namespace.default.createElement(
|
|
29575
29575
|
AddressFormsContext.Provider,
|
|
29576
29576
|
{ value: {
|
|
29577
29577
|
getCountryAddressForm: (country) => getAddressForm(addressTemplates, country),
|
|
29578
29578
|
addressTemplates
|
|
29579
29579
|
} },
|
|
29580
|
-
|
|
29580
|
+
React31__namespace.default.createElement(
|
|
29581
29581
|
ExperimentsContext.Provider,
|
|
29582
29582
|
{ value: experiments },
|
|
29583
|
-
|
|
29583
|
+
React31__namespace.default.createElement(
|
|
29584
29584
|
EventsProvider,
|
|
29585
29585
|
null,
|
|
29586
|
-
|
|
29586
|
+
React31__namespace.default.createElement(
|
|
29587
29587
|
WixRicosViewerContext.Provider,
|
|
29588
29588
|
{ value: WixRicosViewer },
|
|
29589
|
-
|
|
29589
|
+
React31__namespace.default.createElement(SubmitStatusProvider, null, children)
|
|
29590
29590
|
)
|
|
29591
29591
|
)
|
|
29592
29592
|
)
|
|
@@ -29625,17 +29625,17 @@ var DisabledFormOverlay = ({ content, isEditor }) => {
|
|
|
29625
29625
|
if (isEditor || !content) {
|
|
29626
29626
|
return null;
|
|
29627
29627
|
}
|
|
29628
|
-
return
|
|
29628
|
+
return React31__namespace.default.createElement(ricos_viewer_default, { content, className: disabled_form_overlay_module_default.disabledFormOverlay, customTheme });
|
|
29629
29629
|
};
|
|
29630
29630
|
|
|
29631
29631
|
// ../form-viewer/dist/esm/components/root/form-viewer-static.js
|
|
29632
|
-
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) => {
|
|
29633
29633
|
const { locale = "en", regionalFormat = "en", userData } = config || {};
|
|
29634
|
-
|
|
29634
|
+
React31.useState(() => {
|
|
29635
29635
|
translations && i18n2.addResources(locale, TRANSLATIONS_NAMESPACE, translations);
|
|
29636
29636
|
localeDataset && i18n2.addResources(locale, TRANSLATIONS_NAMESPACE, localeDataset);
|
|
29637
29637
|
});
|
|
29638
|
-
const formWithValidSteps =
|
|
29638
|
+
const formWithValidSteps = React31.useMemo(() => ({
|
|
29639
29639
|
...form,
|
|
29640
29640
|
steps: form?.steps?.filter((step) => step.layout?.large?.items?.length) || []
|
|
29641
29641
|
}), [form]);
|
|
@@ -29643,23 +29643,23 @@ var FormViewerStatic = React30.forwardRef(({ form, i18n: i18n2, isMobile, isRTL,
|
|
|
29643
29643
|
return null;
|
|
29644
29644
|
}
|
|
29645
29645
|
const isDisabled = allowFormDisable && formWithValidSteps.properties?.disabled;
|
|
29646
|
-
return
|
|
29647
|
-
|
|
29646
|
+
return React31__namespace.default.createElement(
|
|
29647
|
+
React31__namespace.default.StrictMode,
|
|
29648
29648
|
null,
|
|
29649
|
-
|
|
29649
|
+
React31__namespace.default.createElement(
|
|
29650
29650
|
FormViewerProvider,
|
|
29651
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 },
|
|
29652
|
-
|
|
29652
|
+
React31__namespace.default.createElement(
|
|
29653
29653
|
"form",
|
|
29654
29654
|
{ "aria-label": formWithValidSteps.properties?.name ?? "", id: `form-${formWithValidSteps.id}`, "data-hook": `form-${formWithValidSteps.id}`, className: (0, import_classnames5.default)({
|
|
29655
29655
|
[form_viewer_static_module_default.readOnly]: readOnly,
|
|
29656
29656
|
[form_viewer_static_module_default.disabled]: isDisabled && !config?.isEditor
|
|
29657
|
-
}), onSubmit: (
|
|
29658
|
-
isDisabled &&
|
|
29659
|
-
|
|
29657
|
+
}), onSubmit: (e) => e.preventDefault() },
|
|
29658
|
+
isDisabled && React31__namespace.default.createElement(DisabledFormOverlay, { content: formWithValidSteps.disabledFormMessage, isEditor: config?.isEditor }),
|
|
29659
|
+
React31__namespace.default.createElement(
|
|
29660
29660
|
"fieldset",
|
|
29661
29661
|
{ className: form_viewer_static_module_default.fieldsetReset, disabled: readOnly || isDisabled },
|
|
29662
|
-
|
|
29662
|
+
React31__namespace.default.createElement(FormRoot2, { form: formWithValidSteps, forwardedRef, config, breakpoint, ...rest })
|
|
29663
29663
|
)
|
|
29664
29664
|
)
|
|
29665
29665
|
)
|
|
@@ -30040,11 +30040,11 @@ var Form2 = ({
|
|
|
30040
30040
|
}
|
|
30041
30041
|
};
|
|
30042
30042
|
const i18n2 = initI18n({ locale: siteConfig.locale.languageCode });
|
|
30043
|
-
const mappedFieldProps =
|
|
30043
|
+
const mappedFieldProps = React31.useMemo(
|
|
30044
30044
|
() => mapFieldProps(fields, FIELD_PROP_MAP),
|
|
30045
30045
|
[fields]
|
|
30046
30046
|
);
|
|
30047
|
-
const mappedFieldTypes =
|
|
30047
|
+
const mappedFieldTypes = React31.useMemo(
|
|
30048
30048
|
() => mapFieldTypes(mappedFieldProps, FIELD_TYPE_MAP),
|
|
30049
30049
|
[mappedFieldProps]
|
|
30050
30050
|
);
|