stone-kit 0.0.460 → 0.0.462
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/{SortSelect-jmFctU4n.js → SortSelect-CMtsppe9.js} +46 -48
- package/dist/components/FormModal/ui/ModalForm.d.ts +2 -1
- package/dist/components/FormModal/ui/ModalForm.js +2346 -793
- package/dist/components/SortSelect/index.js +1 -1
- package/dist/components/SortSelect/ui/SortSelect.js +3 -5
- package/dist/components/TabSwitcher/index.js +1 -1
- package/dist/components/TabSwitcher/ui/TabSwitcher.js +3 -5
- package/dist/components/ZoomControls/ui/ZoomControls.js +4 -6
- package/dist/main.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index-D4uptQ6W.js +0 -1559
|
@@ -1,84 +1,1636 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { Button as
|
|
8
|
-
import { NewIcon as
|
|
9
|
-
import { phoneReg as
|
|
10
|
-
import { CheckBox as
|
|
11
|
-
import { TextArea as
|
|
12
|
-
import { useClientWidth as
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
import { jsx as ye, jsxs as Ve } from "react/jsx-runtime";
|
|
2
|
+
import { g as _r, c as kr } from "../../../index-rKuIKazb.js";
|
|
3
|
+
import we from "react";
|
|
4
|
+
import { r as rr, M as Sr } from "../../../Modal-C48pfGFo.js";
|
|
5
|
+
import { Flex as Pr } from "../../Flex/ui/Flex.js";
|
|
6
|
+
import { Input as st } from "../../Input/ui/Input.js";
|
|
7
|
+
import { Button as Tt } from "../../Button/ui/Button.js";
|
|
8
|
+
import { NewIcon as Rt } from "../../NewIcon/ui/NewIcon.js";
|
|
9
|
+
import { phoneReg as xr, nameReg as wr, emailReg as Or } from "../utils/reg.js";
|
|
10
|
+
import { CheckBox as Vt } from "../../CheckBox/CheckBox.js";
|
|
11
|
+
import { TextArea as Cr } from "../../TextArea/TextArea.js";
|
|
12
|
+
import { useClientWidth as Ar } from "../../../shared/useClientWidth.js";
|
|
13
|
+
var Et = { exports: {} }, ot = { exports: {} }, He = { exports: {} }, Xe = { exports: {} }, se = {};
|
|
14
|
+
/** @license React v16.13.1
|
|
15
|
+
* react-is.production.min.js
|
|
16
|
+
*
|
|
17
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the MIT license found in the
|
|
20
|
+
* LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/
|
|
22
|
+
var Ft;
|
|
23
|
+
function Tr() {
|
|
24
|
+
if (Ft)
|
|
25
|
+
return se;
|
|
26
|
+
Ft = 1;
|
|
27
|
+
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, l = e ? Symbol.for("react.fragment") : 60107, f = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, P = e ? Symbol.for("react.provider") : 60109, k = e ? Symbol.for("react.context") : 60110, X = e ? Symbol.for("react.async_mode") : 60111, H = e ? Symbol.for("react.concurrent_mode") : 60111, L = e ? Symbol.for("react.forward_ref") : 60112, D = e ? Symbol.for("react.suspense") : 60113, ie = e ? Symbol.for("react.suspense_list") : 60120, te = e ? Symbol.for("react.memo") : 60115, ne = e ? Symbol.for("react.lazy") : 60116, Q = e ? Symbol.for("react.block") : 60121, K = e ? Symbol.for("react.fundamental") : 60117, ue = e ? Symbol.for("react.responder") : 60118, Z = e ? Symbol.for("react.scope") : 60119;
|
|
28
|
+
function J(o) {
|
|
29
|
+
if (typeof o == "object" && o !== null) {
|
|
30
|
+
var E = o.$$typeof;
|
|
31
|
+
switch (E) {
|
|
32
|
+
case r:
|
|
33
|
+
switch (o = o.type, o) {
|
|
34
|
+
case X:
|
|
35
|
+
case H:
|
|
36
|
+
case l:
|
|
37
|
+
case i:
|
|
38
|
+
case f:
|
|
39
|
+
case D:
|
|
40
|
+
return o;
|
|
41
|
+
default:
|
|
42
|
+
switch (o = o && o.$$typeof, o) {
|
|
43
|
+
case k:
|
|
44
|
+
case L:
|
|
45
|
+
case ne:
|
|
46
|
+
case te:
|
|
47
|
+
case P:
|
|
48
|
+
return o;
|
|
49
|
+
default:
|
|
50
|
+
return E;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
case t:
|
|
54
|
+
return E;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function ee(o) {
|
|
59
|
+
return J(o) === H;
|
|
60
|
+
}
|
|
61
|
+
return se.AsyncMode = X, se.ConcurrentMode = H, se.ContextConsumer = k, se.ContextProvider = P, se.Element = r, se.ForwardRef = L, se.Fragment = l, se.Lazy = ne, se.Memo = te, se.Portal = t, se.Profiler = i, se.StrictMode = f, se.Suspense = D, se.isAsyncMode = function(o) {
|
|
62
|
+
return ee(o) || J(o) === X;
|
|
63
|
+
}, se.isConcurrentMode = ee, se.isContextConsumer = function(o) {
|
|
64
|
+
return J(o) === k;
|
|
65
|
+
}, se.isContextProvider = function(o) {
|
|
66
|
+
return J(o) === P;
|
|
67
|
+
}, se.isElement = function(o) {
|
|
68
|
+
return typeof o == "object" && o !== null && o.$$typeof === r;
|
|
69
|
+
}, se.isForwardRef = function(o) {
|
|
70
|
+
return J(o) === L;
|
|
71
|
+
}, se.isFragment = function(o) {
|
|
72
|
+
return J(o) === l;
|
|
73
|
+
}, se.isLazy = function(o) {
|
|
74
|
+
return J(o) === ne;
|
|
75
|
+
}, se.isMemo = function(o) {
|
|
76
|
+
return J(o) === te;
|
|
77
|
+
}, se.isPortal = function(o) {
|
|
78
|
+
return J(o) === t;
|
|
79
|
+
}, se.isProfiler = function(o) {
|
|
80
|
+
return J(o) === i;
|
|
81
|
+
}, se.isStrictMode = function(o) {
|
|
82
|
+
return J(o) === f;
|
|
83
|
+
}, se.isSuspense = function(o) {
|
|
84
|
+
return J(o) === D;
|
|
85
|
+
}, se.isValidElementType = function(o) {
|
|
86
|
+
return typeof o == "string" || typeof o == "function" || o === l || o === H || o === i || o === f || o === D || o === ie || typeof o == "object" && o !== null && (o.$$typeof === ne || o.$$typeof === te || o.$$typeof === P || o.$$typeof === k || o.$$typeof === L || o.$$typeof === K || o.$$typeof === ue || o.$$typeof === Z || o.$$typeof === Q);
|
|
87
|
+
}, se.typeOf = J, se;
|
|
88
|
+
}
|
|
89
|
+
var oe = {};
|
|
90
|
+
/** @license React v16.13.1
|
|
91
|
+
* react-is.development.js
|
|
92
|
+
*
|
|
93
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
94
|
+
*
|
|
95
|
+
* This source code is licensed under the MIT license found in the
|
|
96
|
+
* LICENSE file in the root directory of this source tree.
|
|
97
|
+
*/
|
|
98
|
+
var Dt;
|
|
99
|
+
function Rr() {
|
|
100
|
+
return Dt || (Dt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
101
|
+
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, l = e ? Symbol.for("react.fragment") : 60107, f = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, P = e ? Symbol.for("react.provider") : 60109, k = e ? Symbol.for("react.context") : 60110, X = e ? Symbol.for("react.async_mode") : 60111, H = e ? Symbol.for("react.concurrent_mode") : 60111, L = e ? Symbol.for("react.forward_ref") : 60112, D = e ? Symbol.for("react.suspense") : 60113, ie = e ? Symbol.for("react.suspense_list") : 60120, te = e ? Symbol.for("react.memo") : 60115, ne = e ? Symbol.for("react.lazy") : 60116, Q = e ? Symbol.for("react.block") : 60121, K = e ? Symbol.for("react.fundamental") : 60117, ue = e ? Symbol.for("react.responder") : 60118, Z = e ? Symbol.for("react.scope") : 60119;
|
|
102
|
+
function J(h) {
|
|
103
|
+
return typeof h == "string" || typeof h == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
104
|
+
h === l || h === H || h === i || h === f || h === D || h === ie || typeof h == "object" && h !== null && (h.$$typeof === ne || h.$$typeof === te || h.$$typeof === P || h.$$typeof === k || h.$$typeof === L || h.$$typeof === K || h.$$typeof === ue || h.$$typeof === Z || h.$$typeof === Q);
|
|
105
|
+
}
|
|
106
|
+
function ee(h) {
|
|
107
|
+
if (typeof h == "object" && h !== null) {
|
|
108
|
+
var I = h.$$typeof;
|
|
109
|
+
switch (I) {
|
|
110
|
+
case r:
|
|
111
|
+
var N = h.type;
|
|
112
|
+
switch (N) {
|
|
113
|
+
case X:
|
|
114
|
+
case H:
|
|
115
|
+
case l:
|
|
116
|
+
case i:
|
|
117
|
+
case f:
|
|
118
|
+
case D:
|
|
119
|
+
return N;
|
|
120
|
+
default:
|
|
121
|
+
var $ = N && N.$$typeof;
|
|
122
|
+
switch ($) {
|
|
123
|
+
case k:
|
|
124
|
+
case L:
|
|
125
|
+
case ne:
|
|
126
|
+
case te:
|
|
127
|
+
case P:
|
|
128
|
+
return $;
|
|
129
|
+
default:
|
|
130
|
+
return I;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
case t:
|
|
134
|
+
return I;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
var o = X, E = H, b = k, m = P, S = r, V = L, W = l, O = ne, B = te, U = t, M = i, A = f, Y = D, G = !1;
|
|
139
|
+
function le(h) {
|
|
140
|
+
return G || (G = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), g(h) || ee(h) === X;
|
|
141
|
+
}
|
|
142
|
+
function g(h) {
|
|
143
|
+
return ee(h) === H;
|
|
144
|
+
}
|
|
145
|
+
function _(h) {
|
|
146
|
+
return ee(h) === k;
|
|
147
|
+
}
|
|
148
|
+
function v(h) {
|
|
149
|
+
return ee(h) === P;
|
|
150
|
+
}
|
|
151
|
+
function u(h) {
|
|
152
|
+
return typeof h == "object" && h !== null && h.$$typeof === r;
|
|
153
|
+
}
|
|
154
|
+
function a(h) {
|
|
155
|
+
return ee(h) === L;
|
|
156
|
+
}
|
|
157
|
+
function c(h) {
|
|
158
|
+
return ee(h) === l;
|
|
159
|
+
}
|
|
160
|
+
function y(h) {
|
|
161
|
+
return ee(h) === ne;
|
|
162
|
+
}
|
|
163
|
+
function p(h) {
|
|
164
|
+
return ee(h) === te;
|
|
165
|
+
}
|
|
166
|
+
function F(h) {
|
|
167
|
+
return ee(h) === t;
|
|
168
|
+
}
|
|
169
|
+
function C(h) {
|
|
170
|
+
return ee(h) === i;
|
|
171
|
+
}
|
|
172
|
+
function T(h) {
|
|
173
|
+
return ee(h) === f;
|
|
174
|
+
}
|
|
175
|
+
function z(h) {
|
|
176
|
+
return ee(h) === D;
|
|
177
|
+
}
|
|
178
|
+
oe.AsyncMode = o, oe.ConcurrentMode = E, oe.ContextConsumer = b, oe.ContextProvider = m, oe.Element = S, oe.ForwardRef = V, oe.Fragment = W, oe.Lazy = O, oe.Memo = B, oe.Portal = U, oe.Profiler = M, oe.StrictMode = A, oe.Suspense = Y, oe.isAsyncMode = le, oe.isConcurrentMode = g, oe.isContextConsumer = _, oe.isContextProvider = v, oe.isElement = u, oe.isForwardRef = a, oe.isFragment = c, oe.isLazy = y, oe.isMemo = p, oe.isPortal = F, oe.isProfiler = C, oe.isStrictMode = T, oe.isSuspense = z, oe.isValidElementType = J, oe.typeOf = ee;
|
|
179
|
+
}()), oe;
|
|
180
|
+
}
|
|
181
|
+
var Mt;
|
|
182
|
+
function nr() {
|
|
183
|
+
return Mt || (Mt = 1, process.env.NODE_ENV === "production" ? Xe.exports = Tr() : Xe.exports = Rr()), Xe.exports;
|
|
184
|
+
}
|
|
185
|
+
/*
|
|
186
|
+
object-assign
|
|
187
|
+
(c) Sindre Sorhus
|
|
188
|
+
@license MIT
|
|
189
|
+
*/
|
|
190
|
+
var ut, Lt;
|
|
191
|
+
function Vr() {
|
|
192
|
+
if (Lt)
|
|
193
|
+
return ut;
|
|
194
|
+
Lt = 1;
|
|
195
|
+
var e = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
|
|
196
|
+
function l(i) {
|
|
197
|
+
if (i == null)
|
|
198
|
+
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
199
|
+
return Object(i);
|
|
200
|
+
}
|
|
201
|
+
function f() {
|
|
202
|
+
try {
|
|
203
|
+
if (!Object.assign)
|
|
204
|
+
return !1;
|
|
205
|
+
var i = new String("abc");
|
|
206
|
+
if (i[5] = "de", Object.getOwnPropertyNames(i)[0] === "5")
|
|
207
|
+
return !1;
|
|
208
|
+
for (var P = {}, k = 0; k < 10; k++)
|
|
209
|
+
P["_" + String.fromCharCode(k)] = k;
|
|
210
|
+
var X = Object.getOwnPropertyNames(P).map(function(L) {
|
|
211
|
+
return P[L];
|
|
212
|
+
});
|
|
213
|
+
if (X.join("") !== "0123456789")
|
|
214
|
+
return !1;
|
|
215
|
+
var H = {};
|
|
216
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(L) {
|
|
217
|
+
H[L] = L;
|
|
218
|
+
}), Object.keys(Object.assign({}, H)).join("") === "abcdefghijklmnopqrst";
|
|
219
|
+
} catch {
|
|
220
|
+
return !1;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return ut = f() ? Object.assign : function(i, P) {
|
|
224
|
+
for (var k, X = l(i), H, L = 1; L < arguments.length; L++) {
|
|
225
|
+
k = Object(arguments[L]);
|
|
226
|
+
for (var D in k)
|
|
227
|
+
r.call(k, D) && (X[D] = k[D]);
|
|
228
|
+
if (e) {
|
|
229
|
+
H = e(k);
|
|
230
|
+
for (var ie = 0; ie < H.length; ie++)
|
|
231
|
+
t.call(k, H[ie]) && (X[H[ie]] = k[H[ie]]);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
return X;
|
|
235
|
+
}, ut;
|
|
236
|
+
}
|
|
237
|
+
var lt, It;
|
|
238
|
+
function _t() {
|
|
239
|
+
if (It)
|
|
240
|
+
return lt;
|
|
241
|
+
It = 1;
|
|
242
|
+
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
243
|
+
return lt = e, lt;
|
|
244
|
+
}
|
|
245
|
+
var ct, jt;
|
|
246
|
+
function ir() {
|
|
247
|
+
return jt || (jt = 1, ct = Function.call.bind(Object.prototype.hasOwnProperty)), ct;
|
|
248
|
+
}
|
|
249
|
+
var ft, Bt;
|
|
250
|
+
function Fr() {
|
|
251
|
+
if (Bt)
|
|
252
|
+
return ft;
|
|
253
|
+
Bt = 1;
|
|
254
|
+
var e = function() {
|
|
255
|
+
};
|
|
256
|
+
if (process.env.NODE_ENV !== "production") {
|
|
257
|
+
var r = _t(), t = {}, l = ir();
|
|
258
|
+
e = function(i) {
|
|
259
|
+
var P = "Warning: " + i;
|
|
260
|
+
typeof console < "u" && console.error(P);
|
|
261
|
+
try {
|
|
262
|
+
throw new Error(P);
|
|
263
|
+
} catch {
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
function f(i, P, k, X, H) {
|
|
268
|
+
if (process.env.NODE_ENV !== "production") {
|
|
269
|
+
for (var L in i)
|
|
270
|
+
if (l(i, L)) {
|
|
271
|
+
var D;
|
|
272
|
+
try {
|
|
273
|
+
if (typeof i[L] != "function") {
|
|
274
|
+
var ie = Error(
|
|
275
|
+
(X || "React class") + ": " + k + " type `" + L + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[L] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
276
|
+
);
|
|
277
|
+
throw ie.name = "Invariant Violation", ie;
|
|
278
|
+
}
|
|
279
|
+
D = i[L](P, L, X, k, null, r);
|
|
280
|
+
} catch (ne) {
|
|
281
|
+
D = ne;
|
|
282
|
+
}
|
|
283
|
+
if (D && !(D instanceof Error) && e(
|
|
284
|
+
(X || "React class") + ": type specification of " + k + " `" + L + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof D + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
285
|
+
), D instanceof Error && !(D.message in t)) {
|
|
286
|
+
t[D.message] = !0;
|
|
287
|
+
var te = H ? H() : "";
|
|
288
|
+
e(
|
|
289
|
+
"Failed " + k + " type: " + D.message + (te ?? "")
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
return f.resetWarningCache = function() {
|
|
296
|
+
process.env.NODE_ENV !== "production" && (t = {});
|
|
297
|
+
}, ft = f, ft;
|
|
298
|
+
}
|
|
299
|
+
var dt, Nt;
|
|
300
|
+
function Dr() {
|
|
301
|
+
if (Nt)
|
|
302
|
+
return dt;
|
|
303
|
+
Nt = 1;
|
|
304
|
+
var e = nr(), r = Vr(), t = _t(), l = ir(), f = Fr(), i = function() {
|
|
305
|
+
};
|
|
306
|
+
process.env.NODE_ENV !== "production" && (i = function(k) {
|
|
307
|
+
var X = "Warning: " + k;
|
|
308
|
+
typeof console < "u" && console.error(X);
|
|
309
|
+
try {
|
|
310
|
+
throw new Error(X);
|
|
311
|
+
} catch {
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
function P() {
|
|
315
|
+
return null;
|
|
316
|
+
}
|
|
317
|
+
return dt = function(k, X) {
|
|
318
|
+
var H = typeof Symbol == "function" && Symbol.iterator, L = "@@iterator";
|
|
319
|
+
function D(g) {
|
|
320
|
+
var _ = g && (H && g[H] || g[L]);
|
|
321
|
+
if (typeof _ == "function")
|
|
322
|
+
return _;
|
|
323
|
+
}
|
|
324
|
+
var ie = "<<anonymous>>", te = {
|
|
325
|
+
array: ue("array"),
|
|
326
|
+
bigint: ue("bigint"),
|
|
327
|
+
bool: ue("boolean"),
|
|
328
|
+
func: ue("function"),
|
|
329
|
+
number: ue("number"),
|
|
330
|
+
object: ue("object"),
|
|
331
|
+
string: ue("string"),
|
|
332
|
+
symbol: ue("symbol"),
|
|
333
|
+
any: Z(),
|
|
334
|
+
arrayOf: J,
|
|
335
|
+
element: ee(),
|
|
336
|
+
elementType: o(),
|
|
337
|
+
instanceOf: E,
|
|
338
|
+
node: V(),
|
|
339
|
+
objectOf: m,
|
|
340
|
+
oneOf: b,
|
|
341
|
+
oneOfType: S,
|
|
342
|
+
shape: O,
|
|
343
|
+
exact: B
|
|
344
|
+
};
|
|
345
|
+
function ne(g, _) {
|
|
346
|
+
return g === _ ? g !== 0 || 1 / g === 1 / _ : g !== g && _ !== _;
|
|
347
|
+
}
|
|
348
|
+
function Q(g, _) {
|
|
349
|
+
this.message = g, this.data = _ && typeof _ == "object" ? _ : {}, this.stack = "";
|
|
350
|
+
}
|
|
351
|
+
Q.prototype = Error.prototype;
|
|
352
|
+
function K(g) {
|
|
353
|
+
if (process.env.NODE_ENV !== "production")
|
|
354
|
+
var _ = {}, v = 0;
|
|
355
|
+
function u(c, y, p, F, C, T, z) {
|
|
356
|
+
if (F = F || ie, T = T || p, z !== t) {
|
|
357
|
+
if (X) {
|
|
358
|
+
var h = new Error(
|
|
359
|
+
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
360
|
+
);
|
|
361
|
+
throw h.name = "Invariant Violation", h;
|
|
362
|
+
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
363
|
+
var I = F + ":" + p;
|
|
364
|
+
!_[I] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
365
|
+
v < 3 && (i(
|
|
366
|
+
"You are manually calling a React.PropTypes validation function for the `" + T + "` prop on `" + F + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
367
|
+
), _[I] = !0, v++);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
return y[p] == null ? c ? y[p] === null ? new Q("The " + C + " `" + T + "` is marked as required " + ("in `" + F + "`, but its value is `null`.")) : new Q("The " + C + " `" + T + "` is marked as required in " + ("`" + F + "`, but its value is `undefined`.")) : null : g(y, p, F, C, T);
|
|
371
|
+
}
|
|
372
|
+
var a = u.bind(null, !1);
|
|
373
|
+
return a.isRequired = u.bind(null, !0), a;
|
|
374
|
+
}
|
|
375
|
+
function ue(g) {
|
|
376
|
+
function _(v, u, a, c, y, p) {
|
|
377
|
+
var F = v[u], C = A(F);
|
|
378
|
+
if (C !== g) {
|
|
379
|
+
var T = Y(F);
|
|
380
|
+
return new Q(
|
|
381
|
+
"Invalid " + c + " `" + y + "` of type " + ("`" + T + "` supplied to `" + a + "`, expected ") + ("`" + g + "`."),
|
|
382
|
+
{ expectedType: g }
|
|
383
|
+
);
|
|
384
|
+
}
|
|
385
|
+
return null;
|
|
386
|
+
}
|
|
387
|
+
return K(_);
|
|
388
|
+
}
|
|
389
|
+
function Z() {
|
|
390
|
+
return K(P);
|
|
391
|
+
}
|
|
392
|
+
function J(g) {
|
|
393
|
+
function _(v, u, a, c, y) {
|
|
394
|
+
if (typeof g != "function")
|
|
395
|
+
return new Q("Property `" + y + "` of component `" + a + "` has invalid PropType notation inside arrayOf.");
|
|
396
|
+
var p = v[u];
|
|
397
|
+
if (!Array.isArray(p)) {
|
|
398
|
+
var F = A(p);
|
|
399
|
+
return new Q("Invalid " + c + " `" + y + "` of type " + ("`" + F + "` supplied to `" + a + "`, expected an array."));
|
|
400
|
+
}
|
|
401
|
+
for (var C = 0; C < p.length; C++) {
|
|
402
|
+
var T = g(p, C, a, c, y + "[" + C + "]", t);
|
|
403
|
+
if (T instanceof Error)
|
|
404
|
+
return T;
|
|
405
|
+
}
|
|
406
|
+
return null;
|
|
407
|
+
}
|
|
408
|
+
return K(_);
|
|
409
|
+
}
|
|
410
|
+
function ee() {
|
|
411
|
+
function g(_, v, u, a, c) {
|
|
412
|
+
var y = _[v];
|
|
413
|
+
if (!k(y)) {
|
|
414
|
+
var p = A(y);
|
|
415
|
+
return new Q("Invalid " + a + " `" + c + "` of type " + ("`" + p + "` supplied to `" + u + "`, expected a single ReactElement."));
|
|
416
|
+
}
|
|
417
|
+
return null;
|
|
418
|
+
}
|
|
419
|
+
return K(g);
|
|
420
|
+
}
|
|
421
|
+
function o() {
|
|
422
|
+
function g(_, v, u, a, c) {
|
|
423
|
+
var y = _[v];
|
|
424
|
+
if (!e.isValidElementType(y)) {
|
|
425
|
+
var p = A(y);
|
|
426
|
+
return new Q("Invalid " + a + " `" + c + "` of type " + ("`" + p + "` supplied to `" + u + "`, expected a single ReactElement type."));
|
|
427
|
+
}
|
|
428
|
+
return null;
|
|
429
|
+
}
|
|
430
|
+
return K(g);
|
|
431
|
+
}
|
|
432
|
+
function E(g) {
|
|
433
|
+
function _(v, u, a, c, y) {
|
|
434
|
+
if (!(v[u] instanceof g)) {
|
|
435
|
+
var p = g.name || ie, F = le(v[u]);
|
|
436
|
+
return new Q("Invalid " + c + " `" + y + "` of type " + ("`" + F + "` supplied to `" + a + "`, expected ") + ("instance of `" + p + "`."));
|
|
437
|
+
}
|
|
438
|
+
return null;
|
|
439
|
+
}
|
|
440
|
+
return K(_);
|
|
441
|
+
}
|
|
442
|
+
function b(g) {
|
|
443
|
+
if (!Array.isArray(g))
|
|
444
|
+
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
|
|
445
|
+
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
446
|
+
) : i("Invalid argument supplied to oneOf, expected an array.")), P;
|
|
447
|
+
function _(v, u, a, c, y) {
|
|
448
|
+
for (var p = v[u], F = 0; F < g.length; F++)
|
|
449
|
+
if (ne(p, g[F]))
|
|
450
|
+
return null;
|
|
451
|
+
var C = JSON.stringify(g, function(z, h) {
|
|
452
|
+
var I = Y(h);
|
|
453
|
+
return I === "symbol" ? String(h) : h;
|
|
454
|
+
});
|
|
455
|
+
return new Q("Invalid " + c + " `" + y + "` of value `" + String(p) + "` " + ("supplied to `" + a + "`, expected one of " + C + "."));
|
|
456
|
+
}
|
|
457
|
+
return K(_);
|
|
458
|
+
}
|
|
459
|
+
function m(g) {
|
|
460
|
+
function _(v, u, a, c, y) {
|
|
461
|
+
if (typeof g != "function")
|
|
462
|
+
return new Q("Property `" + y + "` of component `" + a + "` has invalid PropType notation inside objectOf.");
|
|
463
|
+
var p = v[u], F = A(p);
|
|
464
|
+
if (F !== "object")
|
|
465
|
+
return new Q("Invalid " + c + " `" + y + "` of type " + ("`" + F + "` supplied to `" + a + "`, expected an object."));
|
|
466
|
+
for (var C in p)
|
|
467
|
+
if (l(p, C)) {
|
|
468
|
+
var T = g(p, C, a, c, y + "." + C, t);
|
|
469
|
+
if (T instanceof Error)
|
|
470
|
+
return T;
|
|
471
|
+
}
|
|
472
|
+
return null;
|
|
473
|
+
}
|
|
474
|
+
return K(_);
|
|
475
|
+
}
|
|
476
|
+
function S(g) {
|
|
477
|
+
if (!Array.isArray(g))
|
|
478
|
+
return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), P;
|
|
479
|
+
for (var _ = 0; _ < g.length; _++) {
|
|
480
|
+
var v = g[_];
|
|
481
|
+
if (typeof v != "function")
|
|
482
|
+
return i(
|
|
483
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + G(v) + " at index " + _ + "."
|
|
484
|
+
), P;
|
|
485
|
+
}
|
|
486
|
+
function u(a, c, y, p, F) {
|
|
487
|
+
for (var C = [], T = 0; T < g.length; T++) {
|
|
488
|
+
var z = g[T], h = z(a, c, y, p, F, t);
|
|
489
|
+
if (h == null)
|
|
490
|
+
return null;
|
|
491
|
+
h.data && l(h.data, "expectedType") && C.push(h.data.expectedType);
|
|
492
|
+
}
|
|
493
|
+
var I = C.length > 0 ? ", expected one of type [" + C.join(", ") + "]" : "";
|
|
494
|
+
return new Q("Invalid " + p + " `" + F + "` supplied to " + ("`" + y + "`" + I + "."));
|
|
495
|
+
}
|
|
496
|
+
return K(u);
|
|
497
|
+
}
|
|
498
|
+
function V() {
|
|
499
|
+
function g(_, v, u, a, c) {
|
|
500
|
+
return U(_[v]) ? null : new Q("Invalid " + a + " `" + c + "` supplied to " + ("`" + u + "`, expected a ReactNode."));
|
|
501
|
+
}
|
|
502
|
+
return K(g);
|
|
503
|
+
}
|
|
504
|
+
function W(g, _, v, u, a) {
|
|
505
|
+
return new Q(
|
|
506
|
+
(g || "React class") + ": " + _ + " type `" + v + "." + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + a + "`."
|
|
507
|
+
);
|
|
508
|
+
}
|
|
509
|
+
function O(g) {
|
|
510
|
+
function _(v, u, a, c, y) {
|
|
511
|
+
var p = v[u], F = A(p);
|
|
512
|
+
if (F !== "object")
|
|
513
|
+
return new Q("Invalid " + c + " `" + y + "` of type `" + F + "` " + ("supplied to `" + a + "`, expected `object`."));
|
|
514
|
+
for (var C in g) {
|
|
515
|
+
var T = g[C];
|
|
516
|
+
if (typeof T != "function")
|
|
517
|
+
return W(a, c, y, C, Y(T));
|
|
518
|
+
var z = T(p, C, a, c, y + "." + C, t);
|
|
519
|
+
if (z)
|
|
520
|
+
return z;
|
|
521
|
+
}
|
|
522
|
+
return null;
|
|
523
|
+
}
|
|
524
|
+
return K(_);
|
|
525
|
+
}
|
|
526
|
+
function B(g) {
|
|
527
|
+
function _(v, u, a, c, y) {
|
|
528
|
+
var p = v[u], F = A(p);
|
|
529
|
+
if (F !== "object")
|
|
530
|
+
return new Q("Invalid " + c + " `" + y + "` of type `" + F + "` " + ("supplied to `" + a + "`, expected `object`."));
|
|
531
|
+
var C = r({}, v[u], g);
|
|
532
|
+
for (var T in C) {
|
|
533
|
+
var z = g[T];
|
|
534
|
+
if (l(g, T) && typeof z != "function")
|
|
535
|
+
return W(a, c, y, T, Y(z));
|
|
536
|
+
if (!z)
|
|
537
|
+
return new Q(
|
|
538
|
+
"Invalid " + c + " `" + y + "` key `" + T + "` supplied to `" + a + "`.\nBad object: " + JSON.stringify(v[u], null, " ") + `
|
|
539
|
+
Valid keys: ` + JSON.stringify(Object.keys(g), null, " ")
|
|
540
|
+
);
|
|
541
|
+
var h = z(p, T, a, c, y + "." + T, t);
|
|
542
|
+
if (h)
|
|
543
|
+
return h;
|
|
544
|
+
}
|
|
545
|
+
return null;
|
|
546
|
+
}
|
|
547
|
+
return K(_);
|
|
548
|
+
}
|
|
549
|
+
function U(g) {
|
|
550
|
+
switch (typeof g) {
|
|
551
|
+
case "number":
|
|
552
|
+
case "string":
|
|
553
|
+
case "undefined":
|
|
554
|
+
return !0;
|
|
555
|
+
case "boolean":
|
|
556
|
+
return !g;
|
|
557
|
+
case "object":
|
|
558
|
+
if (Array.isArray(g))
|
|
559
|
+
return g.every(U);
|
|
560
|
+
if (g === null || k(g))
|
|
561
|
+
return !0;
|
|
562
|
+
var _ = D(g);
|
|
563
|
+
if (_) {
|
|
564
|
+
var v = _.call(g), u;
|
|
565
|
+
if (_ !== g.entries) {
|
|
566
|
+
for (; !(u = v.next()).done; )
|
|
567
|
+
if (!U(u.value))
|
|
568
|
+
return !1;
|
|
569
|
+
} else
|
|
570
|
+
for (; !(u = v.next()).done; ) {
|
|
571
|
+
var a = u.value;
|
|
572
|
+
if (a && !U(a[1]))
|
|
573
|
+
return !1;
|
|
574
|
+
}
|
|
575
|
+
} else
|
|
576
|
+
return !1;
|
|
577
|
+
return !0;
|
|
578
|
+
default:
|
|
579
|
+
return !1;
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
function M(g, _) {
|
|
583
|
+
return g === "symbol" ? !0 : _ ? _["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && _ instanceof Symbol : !1;
|
|
584
|
+
}
|
|
585
|
+
function A(g) {
|
|
586
|
+
var _ = typeof g;
|
|
587
|
+
return Array.isArray(g) ? "array" : g instanceof RegExp ? "object" : M(_, g) ? "symbol" : _;
|
|
588
|
+
}
|
|
589
|
+
function Y(g) {
|
|
590
|
+
if (typeof g > "u" || g === null)
|
|
591
|
+
return "" + g;
|
|
592
|
+
var _ = A(g);
|
|
593
|
+
if (_ === "object") {
|
|
594
|
+
if (g instanceof Date)
|
|
595
|
+
return "date";
|
|
596
|
+
if (g instanceof RegExp)
|
|
597
|
+
return "regexp";
|
|
598
|
+
}
|
|
599
|
+
return _;
|
|
600
|
+
}
|
|
601
|
+
function G(g) {
|
|
602
|
+
var _ = Y(g);
|
|
603
|
+
switch (_) {
|
|
604
|
+
case "array":
|
|
605
|
+
case "object":
|
|
606
|
+
return "an " + _;
|
|
607
|
+
case "boolean":
|
|
608
|
+
case "date":
|
|
609
|
+
case "regexp":
|
|
610
|
+
return "a " + _;
|
|
611
|
+
default:
|
|
612
|
+
return _;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
function le(g) {
|
|
616
|
+
return !g.constructor || !g.constructor.name ? ie : g.constructor.name;
|
|
617
|
+
}
|
|
618
|
+
return te.checkPropTypes = f, te.resetWarningCache = f.resetWarningCache, te.PropTypes = te, te;
|
|
619
|
+
}, dt;
|
|
620
|
+
}
|
|
621
|
+
var vt, qt;
|
|
622
|
+
function Mr() {
|
|
623
|
+
if (qt)
|
|
624
|
+
return vt;
|
|
625
|
+
qt = 1;
|
|
626
|
+
var e = _t();
|
|
627
|
+
function r() {
|
|
628
|
+
}
|
|
629
|
+
function t() {
|
|
630
|
+
}
|
|
631
|
+
return t.resetWarningCache = r, vt = function() {
|
|
632
|
+
function l(P, k, X, H, L, D) {
|
|
633
|
+
if (D !== e) {
|
|
634
|
+
var ie = new Error(
|
|
635
|
+
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
636
|
+
);
|
|
637
|
+
throw ie.name = "Invariant Violation", ie;
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
l.isRequired = l;
|
|
641
|
+
function f() {
|
|
642
|
+
return l;
|
|
643
|
+
}
|
|
644
|
+
var i = {
|
|
645
|
+
array: l,
|
|
646
|
+
bigint: l,
|
|
647
|
+
bool: l,
|
|
648
|
+
func: l,
|
|
649
|
+
number: l,
|
|
650
|
+
object: l,
|
|
651
|
+
string: l,
|
|
652
|
+
symbol: l,
|
|
653
|
+
any: l,
|
|
654
|
+
arrayOf: f,
|
|
655
|
+
element: l,
|
|
656
|
+
elementType: l,
|
|
657
|
+
instanceOf: f,
|
|
658
|
+
node: l,
|
|
659
|
+
objectOf: f,
|
|
660
|
+
oneOf: f,
|
|
661
|
+
oneOfType: f,
|
|
662
|
+
shape: f,
|
|
663
|
+
exact: f,
|
|
664
|
+
checkPropTypes: t,
|
|
665
|
+
resetWarningCache: r
|
|
666
|
+
};
|
|
667
|
+
return i.PropTypes = i, i;
|
|
668
|
+
}, vt;
|
|
669
|
+
}
|
|
670
|
+
var $t;
|
|
671
|
+
function ar() {
|
|
672
|
+
if ($t)
|
|
673
|
+
return He.exports;
|
|
674
|
+
if ($t = 1, process.env.NODE_ENV !== "production") {
|
|
675
|
+
var e = nr(), r = !0;
|
|
676
|
+
He.exports = Dr()(e.isElement, r);
|
|
677
|
+
} else
|
|
678
|
+
He.exports = Mr()();
|
|
679
|
+
return He.exports;
|
|
680
|
+
}
|
|
681
|
+
var ht, Ut;
|
|
682
|
+
function sr() {
|
|
683
|
+
if (Ut)
|
|
684
|
+
return ht;
|
|
685
|
+
Ut = 1;
|
|
686
|
+
var e = function(r, t, l, f, i, P, k, X) {
|
|
687
|
+
if (process.env.NODE_ENV !== "production" && t === void 0)
|
|
688
|
+
throw new Error("invariant requires an error message argument");
|
|
689
|
+
if (!r) {
|
|
690
|
+
var H;
|
|
691
|
+
if (t === void 0)
|
|
692
|
+
H = new Error(
|
|
693
|
+
"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
|
|
694
|
+
);
|
|
695
|
+
else {
|
|
696
|
+
var L = [l, f, i, P, k, X], D = 0;
|
|
697
|
+
H = new Error(
|
|
698
|
+
t.replace(/%s/g, function() {
|
|
699
|
+
return L[D++];
|
|
700
|
+
})
|
|
701
|
+
), H.name = "Invariant Violation";
|
|
702
|
+
}
|
|
703
|
+
throw H.framesToPop = 1, H;
|
|
704
|
+
}
|
|
705
|
+
};
|
|
706
|
+
return ht = e, ht;
|
|
707
|
+
}
|
|
708
|
+
var gt, Wt;
|
|
709
|
+
function or() {
|
|
710
|
+
if (Wt)
|
|
711
|
+
return gt;
|
|
712
|
+
Wt = 1;
|
|
713
|
+
var e = process.env.NODE_ENV !== "production", r = function() {
|
|
714
|
+
};
|
|
715
|
+
if (e) {
|
|
716
|
+
var t = function(f, i) {
|
|
717
|
+
var P = arguments.length;
|
|
718
|
+
i = new Array(P > 1 ? P - 1 : 0);
|
|
719
|
+
for (var k = 1; k < P; k++)
|
|
720
|
+
i[k - 1] = arguments[k];
|
|
721
|
+
var X = 0, H = "Warning: " + f.replace(/%s/g, function() {
|
|
722
|
+
return i[X++];
|
|
723
|
+
});
|
|
724
|
+
typeof console < "u" && console.error(H);
|
|
725
|
+
try {
|
|
726
|
+
throw new Error(H);
|
|
727
|
+
} catch {
|
|
728
|
+
}
|
|
729
|
+
};
|
|
730
|
+
r = function(l, f, i) {
|
|
731
|
+
var P = arguments.length;
|
|
732
|
+
i = new Array(P > 2 ? P - 2 : 0);
|
|
733
|
+
for (var k = 2; k < P; k++)
|
|
734
|
+
i[k - 2] = arguments[k];
|
|
735
|
+
if (f === void 0)
|
|
736
|
+
throw new Error(
|
|
737
|
+
"`warning(condition, format, ...args)` requires a warning message argument"
|
|
738
|
+
);
|
|
739
|
+
l || t.apply(null, [f].concat(i));
|
|
740
|
+
};
|
|
741
|
+
}
|
|
742
|
+
return gt = r, gt;
|
|
743
|
+
}
|
|
744
|
+
var Yt;
|
|
745
|
+
function Lr() {
|
|
746
|
+
if (Yt)
|
|
747
|
+
return ot.exports;
|
|
748
|
+
Yt = 1;
|
|
749
|
+
function e(o) {
|
|
750
|
+
return o && typeof o == "object" && "default" in o ? o.default : o;
|
|
751
|
+
}
|
|
752
|
+
var r = we, t = e(r), l = rr;
|
|
753
|
+
ar();
|
|
754
|
+
var f = e(sr());
|
|
755
|
+
function i() {
|
|
756
|
+
return (i = Object.assign || function(o) {
|
|
757
|
+
for (var E = 1; E < arguments.length; E++) {
|
|
758
|
+
var b = arguments[E];
|
|
759
|
+
for (var m in b)
|
|
760
|
+
Object.prototype.hasOwnProperty.call(b, m) && (o[m] = b[m]);
|
|
761
|
+
}
|
|
762
|
+
return o;
|
|
763
|
+
}).apply(this, arguments);
|
|
764
|
+
}
|
|
765
|
+
function P(o, E) {
|
|
766
|
+
o.prototype = Object.create(E.prototype), o.prototype.constructor = o, function(b, m) {
|
|
767
|
+
for (var S = Object.getOwnPropertyNames(m), V = 0; V < S.length; V++) {
|
|
768
|
+
var W = S[V], O = Object.getOwnPropertyDescriptor(m, W);
|
|
769
|
+
O && O.configurable && b[W] === void 0 && Object.defineProperty(b, W, O);
|
|
770
|
+
}
|
|
771
|
+
}(o, E);
|
|
772
|
+
}
|
|
773
|
+
function k(o, E) {
|
|
774
|
+
if (o == null)
|
|
775
|
+
return {};
|
|
776
|
+
var b, m, S = {}, V = Object.keys(o);
|
|
777
|
+
for (m = 0; m < V.length; m++)
|
|
778
|
+
b = V[m], E.indexOf(b) >= 0 || (S[b] = o[b]);
|
|
779
|
+
return S;
|
|
780
|
+
}
|
|
781
|
+
function X(o) {
|
|
782
|
+
return requestAnimationFrame(o);
|
|
783
|
+
}
|
|
784
|
+
function H(o) {
|
|
785
|
+
cancelAnimationFrame(o);
|
|
786
|
+
}
|
|
787
|
+
function L(o) {
|
|
788
|
+
var E = o.ownerDocument;
|
|
789
|
+
return E.hasFocus() && E.activeElement === o;
|
|
790
|
+
}
|
|
791
|
+
function D(o) {
|
|
792
|
+
return o == null ? void 0 : o.ownerDocument;
|
|
793
|
+
}
|
|
794
|
+
function ie(o) {
|
|
795
|
+
var E = function(b) {
|
|
796
|
+
var m;
|
|
797
|
+
return (m = D(b)) == null ? void 0 : m.defaultView;
|
|
798
|
+
}(o);
|
|
799
|
+
return !!E && o instanceof E.HTMLElement;
|
|
800
|
+
}
|
|
801
|
+
function te(o) {
|
|
802
|
+
return r.useCallback(function() {
|
|
803
|
+
var E = o.current, b = typeof window < "u" && ie(E);
|
|
804
|
+
if (!E || !b)
|
|
805
|
+
return null;
|
|
806
|
+
if (E.nodeName !== "INPUT" && (E = E.querySelector("input")), !E)
|
|
807
|
+
throw new Error("react-input-mask: inputComponent doesn't contain input node");
|
|
808
|
+
return E;
|
|
809
|
+
}, [o]);
|
|
810
|
+
}
|
|
811
|
+
function ne(o, E) {
|
|
812
|
+
var b, m, S, V, W = r.useRef({ start: null, end: null }), O = te(o), B = r.useCallback(function() {
|
|
813
|
+
return function(g) {
|
|
814
|
+
var _ = g.selectionStart, v = g.selectionEnd;
|
|
815
|
+
return { start: _, end: v, length: v - _ };
|
|
816
|
+
}(O());
|
|
817
|
+
}, [O]), U = r.useCallback(function() {
|
|
818
|
+
return W.current;
|
|
819
|
+
}, []), M = r.useCallback(function(g) {
|
|
820
|
+
var _ = O();
|
|
821
|
+
_ && L(_) && (function(v, u, a) {
|
|
822
|
+
a === void 0 && (a = u), v.setSelectionRange(u, a);
|
|
823
|
+
}(_, g.start, g.end), W.current = B());
|
|
824
|
+
}, [O, B]), A = r.useCallback(function() {
|
|
825
|
+
W.current = B();
|
|
826
|
+
}, [B]), Y = (b = A, m = r.useRef(null), S = r.useCallback(function() {
|
|
827
|
+
m.current === null && function g() {
|
|
828
|
+
b(), m.current = X(g);
|
|
829
|
+
}();
|
|
830
|
+
}, [b]), V = r.useCallback(function() {
|
|
831
|
+
H(m.current), m.current = null;
|
|
832
|
+
}, []), r.useEffect(function() {
|
|
833
|
+
m.current && (V(), S());
|
|
834
|
+
}, [S, V]), r.useEffect(H, []), [S, V]), G = Y[0], le = Y[1];
|
|
835
|
+
return r.useLayoutEffect(function() {
|
|
836
|
+
if (E) {
|
|
837
|
+
var g = O();
|
|
838
|
+
return g.addEventListener("focus", G), g.addEventListener("blur", le), L(g) && G(), function() {
|
|
839
|
+
g.removeEventListener("focus", G), g.removeEventListener("blur", le), le();
|
|
840
|
+
};
|
|
841
|
+
}
|
|
842
|
+
}), { getSelection: B, getLastSelection: U, setSelection: M };
|
|
843
|
+
}
|
|
844
|
+
function Q(o, E) {
|
|
845
|
+
var b = r.useRef(), m = ne(b, E), S = m.getSelection, V = m.getLastSelection, W = m.setSelection, O = function(A, Y) {
|
|
846
|
+
var G = te(A), le = r.useRef(Y);
|
|
847
|
+
return { getValue: r.useCallback(function() {
|
|
848
|
+
return G().value;
|
|
849
|
+
}, [G]), getLastValue: r.useCallback(function() {
|
|
850
|
+
return le.current;
|
|
851
|
+
}, []), setValue: r.useCallback(function(g) {
|
|
852
|
+
le.current = g;
|
|
853
|
+
var _ = G();
|
|
854
|
+
_ && (_.value = g);
|
|
855
|
+
}, [G]) };
|
|
856
|
+
}(b, o), B = O.getValue, U = O.getLastValue, M = O.setValue;
|
|
857
|
+
return { inputRef: b, getInputState: function() {
|
|
858
|
+
return { value: B(), selection: S() };
|
|
859
|
+
}, getLastInputState: function() {
|
|
860
|
+
return { value: U(), selection: V() };
|
|
861
|
+
}, setInputState: function(A) {
|
|
862
|
+
var Y = A.value, G = A.selection;
|
|
863
|
+
M(Y), W(G);
|
|
864
|
+
} };
|
|
865
|
+
}
|
|
866
|
+
or();
|
|
867
|
+
var K = ["disabled", "onBlur", "onChange", "onFocus", "onMouseDown", "readOnly", "value"], ue = { 9: /[0-9]/, a: /[A-Za-z]/, "*": /[A-Za-z0-9]/ }, Z = function(o) {
|
|
868
|
+
var E = this;
|
|
869
|
+
this.isCharacterAllowedAtPosition = function(b, m) {
|
|
870
|
+
var S = E.maskOptions.maskPlaceholder;
|
|
871
|
+
return !!E.isCharacterFillingPosition(b, m) || !!S && S[m] === b;
|
|
872
|
+
}, this.isCharacterFillingPosition = function(b, m) {
|
|
873
|
+
var S = E.maskOptions.mask;
|
|
874
|
+
if (!b || m >= S.length)
|
|
875
|
+
return !1;
|
|
876
|
+
if (!E.isPositionEditable(m))
|
|
877
|
+
return S[m] === b;
|
|
878
|
+
var V = S[m];
|
|
879
|
+
return new RegExp(V).test(b);
|
|
880
|
+
}, this.isPositionEditable = function(b) {
|
|
881
|
+
var m = E.maskOptions, S = m.mask, V = m.permanents;
|
|
882
|
+
return b < S.length && V.indexOf(b) === -1;
|
|
883
|
+
}, this.isValueEmpty = function(b) {
|
|
884
|
+
return b.split("").every(function(m, S) {
|
|
885
|
+
return !E.isPositionEditable(S) || !E.isCharacterFillingPosition(m, S);
|
|
886
|
+
});
|
|
887
|
+
}, this.isValueFilled = function(b) {
|
|
888
|
+
return E.getFilledLength(b) === E.maskOptions.lastEditablePosition + 1;
|
|
889
|
+
}, this.getDefaultSelectionForValue = function(b) {
|
|
890
|
+
var m = E.getFilledLength(b), S = E.getRightEditablePosition(m);
|
|
891
|
+
return { start: S, end: S };
|
|
892
|
+
}, this.getFilledLength = function(b) {
|
|
893
|
+
return function(m, S) {
|
|
894
|
+
for (var V = m.length - 1; V >= 0; V--)
|
|
895
|
+
if (S(m[V], V))
|
|
896
|
+
return V;
|
|
897
|
+
return -1;
|
|
898
|
+
}(b.split(""), function(m, S) {
|
|
899
|
+
return E.isPositionEditable(S) && E.isCharacterFillingPosition(m, S);
|
|
900
|
+
}) + 1;
|
|
901
|
+
}, this.getStringFillingLengthAtPosition = function(b, m) {
|
|
902
|
+
return b.split("").reduce(function(S, V) {
|
|
903
|
+
return E.insertCharacterAtPosition(S, V, S.length);
|
|
904
|
+
}, function(S, V) {
|
|
905
|
+
V === void 0 && (V = 1);
|
|
906
|
+
for (var W = "", O = 0; O < V; O++)
|
|
907
|
+
W += S;
|
|
908
|
+
return W;
|
|
909
|
+
}(" ", m)).length - m;
|
|
910
|
+
}, this.getLeftEditablePosition = function(b) {
|
|
911
|
+
for (var m = b; m >= 0; m--)
|
|
912
|
+
if (E.isPositionEditable(m))
|
|
913
|
+
return m;
|
|
914
|
+
return null;
|
|
915
|
+
}, this.getRightEditablePosition = function(b) {
|
|
916
|
+
for (var m = E.maskOptions.mask, S = b; S < m.length; S++)
|
|
917
|
+
if (E.isPositionEditable(S))
|
|
918
|
+
return S;
|
|
919
|
+
return null;
|
|
920
|
+
}, this.formatValue = function(b) {
|
|
921
|
+
var m = E.maskOptions, S = m.maskPlaceholder, V = m.mask;
|
|
922
|
+
if (!S) {
|
|
923
|
+
for (b = E.insertStringAtPosition("", b, 0); b.length < V.length && !E.isPositionEditable(b.length); )
|
|
924
|
+
b += V[b.length];
|
|
925
|
+
return b;
|
|
926
|
+
}
|
|
927
|
+
return E.insertStringAtPosition(S, b, 0);
|
|
928
|
+
}, this.clearRange = function(b, m, S) {
|
|
929
|
+
if (!S)
|
|
930
|
+
return b;
|
|
931
|
+
var V = m + S, W = E.maskOptions, O = W.maskPlaceholder, B = W.mask, U = b.split("").map(function(M, A) {
|
|
932
|
+
var Y = E.isPositionEditable(A);
|
|
933
|
+
return !O && A >= V && !Y ? "" : A < m || A >= V ? M : Y ? O ? O[A] : "" : B[A];
|
|
934
|
+
}).join("");
|
|
935
|
+
return E.formatValue(U);
|
|
936
|
+
}, this.insertCharacterAtPosition = function(b, m, S) {
|
|
937
|
+
var V = E.maskOptions, W = V.mask, O = V.maskPlaceholder;
|
|
938
|
+
if (S >= W.length)
|
|
939
|
+
return b;
|
|
940
|
+
var B = E.isCharacterAllowedAtPosition(m, S), U = E.isPositionEditable(S), M = E.getRightEditablePosition(S), A = O && M ? m === O[M] : null, Y = b.slice(0, S);
|
|
941
|
+
return !B && U || (b = Y + (B ? m : W[S])), B || U || A || (b = E.insertCharacterAtPosition(b, m, S + 1)), b;
|
|
942
|
+
}, this.insertStringAtPosition = function(b, m, S) {
|
|
943
|
+
var V = E.maskOptions, W = V.mask, O = V.maskPlaceholder;
|
|
944
|
+
if (!m || S >= W.length)
|
|
945
|
+
return b;
|
|
946
|
+
var B = m.split(""), U = E.isValueFilled(b) || !!O, M = b.slice(S);
|
|
947
|
+
return b = B.reduce(function(A, Y) {
|
|
948
|
+
return E.insertCharacterAtPosition(A, Y, A.length);
|
|
949
|
+
}, b.slice(0, S)), U ? b += M.slice(b.length - S) : E.isValueFilled(b) ? b += W.slice(b.length).join("") : b = M.split("").filter(function(A, Y) {
|
|
950
|
+
return E.isPositionEditable(S + Y);
|
|
951
|
+
}).reduce(function(A, Y) {
|
|
952
|
+
var G = E.getRightEditablePosition(A.length);
|
|
953
|
+
return G === null ? A : (E.isPositionEditable(A.length) || (A += W.slice(A.length, G).join("")), E.insertCharacterAtPosition(A, Y, A.length));
|
|
954
|
+
}, b), b;
|
|
955
|
+
}, this.processChange = function(b, m) {
|
|
956
|
+
var S = E.maskOptions, V = S.mask, W = S.prefix, O = S.lastEditablePosition, B = b.value, U = b.selection, M = m.value, A = m.selection, Y = B, G = "", le = 0, g = 0, _ = Math.min(A.start, U.start);
|
|
957
|
+
return U.end > A.start ? (G = Y.slice(A.start, U.end), g = (le = E.getStringFillingLengthAtPosition(G, _)) ? A.length : 0) : Y.length < M.length && (g = M.length - Y.length), Y = M, g && (g === 1 && !A.length && (_ = A.start === U.start ? E.getRightEditablePosition(U.start) : E.getLeftEditablePosition(U.start)), Y = E.clearRange(Y, _, g)), Y = E.insertStringAtPosition(Y, G, _), (_ += le) >= V.length ? _ = V.length : _ < W.length && !le ? _ = W.length : _ >= W.length && _ < O && le && (_ = E.getRightEditablePosition(_)), { value: Y = E.formatValue(Y), enteredString: G, selection: { start: _, end: _ } };
|
|
958
|
+
}, this.maskOptions = function(b) {
|
|
959
|
+
var m = b.mask, S = b.maskPlaceholder, V = [];
|
|
960
|
+
if (!m)
|
|
961
|
+
return { maskPlaceholder: null, mask: null, prefix: null, lastEditablePosition: null, permanents: [] };
|
|
962
|
+
if (typeof m == "string") {
|
|
963
|
+
var W = !1, O = "";
|
|
964
|
+
m.split("").forEach(function(M) {
|
|
965
|
+
W || M !== "\\" ? (!W && ue[M] || V.push(O.length), O += M, W = !1) : W = !0;
|
|
966
|
+
}), m = O.split("").map(function(M, A) {
|
|
967
|
+
return V.indexOf(A) === -1 ? ue[M] : M;
|
|
968
|
+
});
|
|
969
|
+
} else
|
|
970
|
+
m.forEach(function(M, A) {
|
|
971
|
+
typeof M == "string" && V.push(A);
|
|
972
|
+
});
|
|
973
|
+
S && (S = S.length === 1 ? m.map(function(M, A) {
|
|
974
|
+
return V.indexOf(A) !== -1 ? M : S;
|
|
975
|
+
}) : S.split(""), V.forEach(function(M) {
|
|
976
|
+
S[M] = m[M];
|
|
977
|
+
}), S = S.join(""));
|
|
978
|
+
for (var B = V.filter(function(M, A) {
|
|
979
|
+
return M === A;
|
|
980
|
+
}).map(function(M) {
|
|
981
|
+
return m[M];
|
|
982
|
+
}).join(""), U = m.length - 1; V.indexOf(U) !== -1; )
|
|
983
|
+
U--;
|
|
984
|
+
return { maskPlaceholder: S, prefix: B, mask: m, lastEditablePosition: U, permanents: V };
|
|
985
|
+
}(o);
|
|
986
|
+
}, J = function(o) {
|
|
987
|
+
function E() {
|
|
988
|
+
return o.apply(this, arguments) || this;
|
|
989
|
+
}
|
|
990
|
+
return P(E, o), E.prototype.render = function() {
|
|
991
|
+
var b = this.props, m = b.children, S = k(b, ["children"]);
|
|
992
|
+
return t.cloneElement(m, S);
|
|
993
|
+
}, E;
|
|
994
|
+
}(t.Component), ee = r.forwardRef(function(o, E) {
|
|
995
|
+
var b = o.alwaysShowMask, m = o.children, S = o.mask, V = o.maskPlaceholder, W = o.beforeMaskedStateChange, O = k(o, ["alwaysShowMask", "children", "mask", "maskPlaceholder", "beforeMaskedStateChange"]);
|
|
996
|
+
(function(h) {
|
|
997
|
+
var I = h.mask, N = h.maskPlaceholder;
|
|
998
|
+
I && N && N.length !== 1 && N.length !== I.length && f(!1);
|
|
999
|
+
})(o);
|
|
1000
|
+
var B, U, M = new Z({ mask: S, maskPlaceholder: V }), A = !!S, Y = !O.disabled && !O.readOnly, G = o.value !== null && o.value !== void 0, le = (B = A, U = r.useRef(), r.useEffect(function() {
|
|
1001
|
+
U.current = B;
|
|
1002
|
+
}), U.current), g = Q(function(h) {
|
|
1003
|
+
return "" + h;
|
|
1004
|
+
}((G ? o.value : o.defaultValue) || ""), A), _ = g.inputRef, v = g.getInputState, u = g.setInputState, a = g.getLastInputState, c = te(_);
|
|
1005
|
+
if (A && G) {
|
|
1006
|
+
var y = c(), p = y && L(y) || b || o.value ? M.formatValue(o.value) : o.value;
|
|
1007
|
+
W && (p = W({ nextState: { value: p, selection: { start: null, end: null } } }).value), u(i({}, a(), { value: p }));
|
|
1008
|
+
}
|
|
1009
|
+
var F = a(), C = F.selection, T = F.value;
|
|
1010
|
+
r.useLayoutEffect(function() {
|
|
1011
|
+
if (A) {
|
|
1012
|
+
var h = L(c()), I = C, N = v(), $ = i({}, N);
|
|
1013
|
+
if (!G) {
|
|
1014
|
+
var ae = N.value, he = M.formatValue(ae), n = M.isValueEmpty(he);
|
|
1015
|
+
!n || h || b ? $.value = he : n && !h && ($.value = "");
|
|
1016
|
+
}
|
|
1017
|
+
h && !le ? $.selection = M.getDefaultSelectionForValue($.value) : G && h && I && I.start !== null && I.end !== null && ($.selection = I), W && ($ = W({ currentState: N, nextState: $ })), u($);
|
|
1018
|
+
}
|
|
1019
|
+
});
|
|
1020
|
+
var z = i({}, O, { onFocus: function(h) {
|
|
1021
|
+
_.current = h.target;
|
|
1022
|
+
var I = v().value;
|
|
1023
|
+
if (A && !M.isValueFilled(I)) {
|
|
1024
|
+
var N = M.formatValue(I), $ = M.getDefaultSelectionForValue(N), ae = { value: N, selection: $ };
|
|
1025
|
+
W && (N = (ae = W({ currentState: v(), nextState: ae })).value, $ = ae.selection), u(ae), N !== I && o.onChange && o.onChange(h), X(function() {
|
|
1026
|
+
u(a());
|
|
1027
|
+
});
|
|
1028
|
+
}
|
|
1029
|
+
o.onFocus && o.onFocus(h);
|
|
1030
|
+
}, onBlur: function(h) {
|
|
1031
|
+
var I = v().value, N = a().value;
|
|
1032
|
+
if (A && !b && M.isValueEmpty(N)) {
|
|
1033
|
+
var $ = "", ae = { value: $, selection: { start: null, end: null } };
|
|
1034
|
+
W && ($ = (ae = W({ currentState: v(), nextState: ae })).value), u(ae), $ !== I && o.onChange && o.onChange(h);
|
|
1035
|
+
}
|
|
1036
|
+
o.onBlur && o.onBlur(h);
|
|
1037
|
+
}, onChange: A && Y ? function(h) {
|
|
1038
|
+
var I = v(), N = a(), $ = M.processChange(I, N);
|
|
1039
|
+
W && ($ = W({ currentState: I, previousState: N, nextState: $ })), u($), o.onChange && o.onChange(h);
|
|
1040
|
+
} : o.onChange, onMouseDown: A && Y ? function(h) {
|
|
1041
|
+
var I = c(), N = v().value, $ = D(I);
|
|
1042
|
+
if (!L(I) && !M.isValueFilled(N)) {
|
|
1043
|
+
var ae = h.clientX, he = h.clientY, n = (/* @__PURE__ */ new Date()).getTime();
|
|
1044
|
+
$.addEventListener("mouseup", function s(d) {
|
|
1045
|
+
if ($.removeEventListener("mouseup", s), L(I)) {
|
|
1046
|
+
var R = Math.abs(d.clientX - ae), w = Math.abs(d.clientY - he), x = Math.max(R, w), q = (/* @__PURE__ */ new Date()).getTime() - n;
|
|
1047
|
+
if (x <= 10 && q <= 200 || x <= 5 && q <= 300) {
|
|
1048
|
+
var re = a(), fe = i({}, re, { selection: M.getDefaultSelectionForValue(re.value) });
|
|
1049
|
+
u(fe);
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
});
|
|
1053
|
+
}
|
|
1054
|
+
o.onMouseDown && o.onMouseDown(h);
|
|
1055
|
+
} : o.onMouseDown, ref: function(h) {
|
|
1056
|
+
_.current = l.findDOMNode(h), /* @__PURE__ */ function(I) {
|
|
1057
|
+
return typeof I == "function";
|
|
1058
|
+
}(E) ? E(h) : E !== null && typeof E == "object" && (E.current = h);
|
|
1059
|
+
}, value: A && G ? T : o.value });
|
|
1060
|
+
return m ? (function(h, I) {
|
|
1061
|
+
K.filter(function(N) {
|
|
1062
|
+
return I.props[N] != null && I.props[N] !== h[N];
|
|
1063
|
+
}).length && f(!1);
|
|
1064
|
+
}(o, m), t.createElement(J, z, m)) : t.createElement("input", z);
|
|
1065
|
+
});
|
|
1066
|
+
return ee.displayName = "InputMask", ee.defaultProps = { alwaysShowMask: !1, maskPlaceholder: "_" }, ot.exports = ee, ot.exports;
|
|
1067
|
+
}
|
|
1068
|
+
var yt, zt;
|
|
1069
|
+
function Ir() {
|
|
1070
|
+
if (zt)
|
|
1071
|
+
return yt;
|
|
1072
|
+
zt = 1;
|
|
1073
|
+
function e(v) {
|
|
1074
|
+
return v && typeof v == "object" && "default" in v ? v.default : v;
|
|
1075
|
+
}
|
|
1076
|
+
var r = we, t = e(r), l = rr, f = e(ar()), i = e(sr()), P = e(or());
|
|
1077
|
+
function k(v, u) {
|
|
1078
|
+
for (var a = Object.getOwnPropertyNames(u), c = 0; c < a.length; c++) {
|
|
1079
|
+
var y = a[c], p = Object.getOwnPropertyDescriptor(u, y);
|
|
1080
|
+
p && p.configurable && v[y] === void 0 && Object.defineProperty(v, y, p);
|
|
1081
|
+
}
|
|
1082
|
+
return v;
|
|
1083
|
+
}
|
|
1084
|
+
function X() {
|
|
1085
|
+
return X = Object.assign || function(v) {
|
|
1086
|
+
for (var u = 1; u < arguments.length; u++) {
|
|
1087
|
+
var a = arguments[u];
|
|
1088
|
+
for (var c in a)
|
|
1089
|
+
Object.prototype.hasOwnProperty.call(a, c) && (v[c] = a[c]);
|
|
1090
|
+
}
|
|
1091
|
+
return v;
|
|
1092
|
+
}, X.apply(this, arguments);
|
|
1093
|
+
}
|
|
1094
|
+
function H(v, u) {
|
|
1095
|
+
v.prototype = Object.create(u.prototype), v.prototype.constructor = v, k(v, u);
|
|
1096
|
+
}
|
|
1097
|
+
function L(v, u) {
|
|
1098
|
+
if (v == null)
|
|
1099
|
+
return {};
|
|
1100
|
+
var a = {}, c = Object.keys(v), y, p;
|
|
1101
|
+
for (p = 0; p < c.length; p++)
|
|
1102
|
+
y = c[p], !(u.indexOf(y) >= 0) && (a[y] = v[y]);
|
|
1103
|
+
return a;
|
|
1104
|
+
}
|
|
1105
|
+
function D(v) {
|
|
1106
|
+
return requestAnimationFrame(v);
|
|
1107
|
+
}
|
|
1108
|
+
function ie(v) {
|
|
1109
|
+
cancelAnimationFrame(v);
|
|
1110
|
+
}
|
|
1111
|
+
function te(v, u, a) {
|
|
1112
|
+
a === void 0 && (a = u), v.setSelectionRange(u, a);
|
|
1113
|
+
}
|
|
1114
|
+
function ne(v) {
|
|
1115
|
+
var u = v.selectionStart, a = v.selectionEnd;
|
|
1116
|
+
return {
|
|
1117
|
+
start: u,
|
|
1118
|
+
end: a,
|
|
1119
|
+
length: a - u
|
|
1120
|
+
};
|
|
1121
|
+
}
|
|
1122
|
+
function Q(v) {
|
|
1123
|
+
var u = v.ownerDocument;
|
|
1124
|
+
return u.hasFocus() && u.activeElement === v;
|
|
1125
|
+
}
|
|
1126
|
+
function K(v) {
|
|
1127
|
+
return v == null ? void 0 : v.ownerDocument;
|
|
1128
|
+
}
|
|
1129
|
+
function ue(v) {
|
|
1130
|
+
var u;
|
|
1131
|
+
return (u = K(v)) == null ? void 0 : u.defaultView;
|
|
1132
|
+
}
|
|
1133
|
+
function Z(v) {
|
|
1134
|
+
var u = ue(v);
|
|
1135
|
+
return !!u && v instanceof u.HTMLElement;
|
|
1136
|
+
}
|
|
1137
|
+
function J(v) {
|
|
1138
|
+
return typeof v == "function";
|
|
1139
|
+
}
|
|
1140
|
+
function ee(v, u) {
|
|
1141
|
+
for (var a = v.length - 1; a >= 0; a--) {
|
|
1142
|
+
var c = v[a];
|
|
1143
|
+
if (u(c, a))
|
|
1144
|
+
return a;
|
|
1145
|
+
}
|
|
1146
|
+
return -1;
|
|
1147
|
+
}
|
|
1148
|
+
function o(v, u) {
|
|
1149
|
+
u === void 0 && (u = 1);
|
|
1150
|
+
for (var a = "", c = 0; c < u; c++)
|
|
1151
|
+
a += v;
|
|
1152
|
+
return a;
|
|
1153
|
+
}
|
|
1154
|
+
function E(v) {
|
|
1155
|
+
return "" + v;
|
|
1156
|
+
}
|
|
1157
|
+
function b(v) {
|
|
1158
|
+
return r.useCallback(function() {
|
|
1159
|
+
var u = v.current, a = typeof window < "u" && Z(u);
|
|
1160
|
+
if (!u || !a)
|
|
1161
|
+
return null;
|
|
1162
|
+
if (u.nodeName !== "INPUT" && (u = u.querySelector("input")), !u)
|
|
1163
|
+
throw new Error("react-input-mask: inputComponent doesn't contain input node");
|
|
1164
|
+
return u;
|
|
1165
|
+
}, [v]);
|
|
1166
|
+
}
|
|
1167
|
+
function m(v) {
|
|
1168
|
+
var u = r.useRef(null), a = r.useCallback(function() {
|
|
1169
|
+
if (u.current !== null)
|
|
1170
|
+
return;
|
|
1171
|
+
function y() {
|
|
1172
|
+
v(), u.current = D(y);
|
|
1173
|
+
}
|
|
1174
|
+
y();
|
|
1175
|
+
}, [v]), c = r.useCallback(function() {
|
|
1176
|
+
ie(u.current), u.current = null;
|
|
1177
|
+
}, []);
|
|
1178
|
+
return r.useEffect(function() {
|
|
1179
|
+
u.current && (c(), a());
|
|
1180
|
+
}, [a, c]), r.useEffect(ie, []), [a, c];
|
|
1181
|
+
}
|
|
1182
|
+
function S(v, u) {
|
|
1183
|
+
var a = r.useRef({
|
|
1184
|
+
start: null,
|
|
1185
|
+
end: null
|
|
1186
|
+
}), c = b(v), y = r.useCallback(function() {
|
|
1187
|
+
var I = c();
|
|
1188
|
+
return ne(I);
|
|
1189
|
+
}, [c]), p = r.useCallback(function() {
|
|
1190
|
+
return a.current;
|
|
1191
|
+
}, []), F = r.useCallback(function(I) {
|
|
1192
|
+
var N = c();
|
|
1193
|
+
!N || !Q(N) || (te(N, I.start, I.end), a.current = y());
|
|
1194
|
+
}, [c, y]), C = r.useCallback(function() {
|
|
1195
|
+
a.current = y();
|
|
1196
|
+
}, [y]), T = m(C), z = T[0], h = T[1];
|
|
1197
|
+
return r.useLayoutEffect(function() {
|
|
1198
|
+
if (u) {
|
|
1199
|
+
var I = c();
|
|
1200
|
+
return I.addEventListener("focus", z), I.addEventListener("blur", h), Q(I) && z(), function() {
|
|
1201
|
+
I.removeEventListener("focus", z), I.removeEventListener("blur", h), h();
|
|
1202
|
+
};
|
|
1203
|
+
}
|
|
1204
|
+
}), {
|
|
1205
|
+
getSelection: y,
|
|
1206
|
+
getLastSelection: p,
|
|
1207
|
+
setSelection: F
|
|
1208
|
+
};
|
|
1209
|
+
}
|
|
1210
|
+
function V(v, u) {
|
|
1211
|
+
var a = b(v), c = r.useRef(u), y = r.useCallback(function() {
|
|
1212
|
+
var C = a();
|
|
1213
|
+
return C.value;
|
|
1214
|
+
}, [a]), p = r.useCallback(function() {
|
|
1215
|
+
return c.current;
|
|
1216
|
+
}, []), F = r.useCallback(function(C) {
|
|
1217
|
+
c.current = C;
|
|
1218
|
+
var T = a();
|
|
1219
|
+
T && (T.value = C);
|
|
1220
|
+
}, [a]);
|
|
1221
|
+
return {
|
|
1222
|
+
getValue: y,
|
|
1223
|
+
getLastValue: p,
|
|
1224
|
+
setValue: F
|
|
1225
|
+
};
|
|
1226
|
+
}
|
|
1227
|
+
function W(v, u) {
|
|
1228
|
+
var a = r.useRef(), c = S(a, u), y = c.getSelection, p = c.getLastSelection, F = c.setSelection, C = V(a, v), T = C.getValue, z = C.getLastValue, h = C.setValue;
|
|
1229
|
+
function I() {
|
|
1230
|
+
return {
|
|
1231
|
+
value: z(),
|
|
1232
|
+
selection: p()
|
|
1233
|
+
};
|
|
1234
|
+
}
|
|
1235
|
+
function N() {
|
|
1236
|
+
return {
|
|
1237
|
+
value: T(),
|
|
1238
|
+
selection: y()
|
|
1239
|
+
};
|
|
1240
|
+
}
|
|
1241
|
+
function $(ae) {
|
|
1242
|
+
var he = ae.value, n = ae.selection;
|
|
1243
|
+
h(he), F(n);
|
|
1244
|
+
}
|
|
1245
|
+
return {
|
|
1246
|
+
inputRef: a,
|
|
1247
|
+
getInputState: N,
|
|
1248
|
+
getLastInputState: I,
|
|
1249
|
+
setInputState: $
|
|
1250
|
+
};
|
|
1251
|
+
}
|
|
1252
|
+
function O(v) {
|
|
1253
|
+
var u = r.useRef();
|
|
1254
|
+
return r.useEffect(function() {
|
|
1255
|
+
u.current = v;
|
|
1256
|
+
}), u.current;
|
|
1257
|
+
}
|
|
1258
|
+
var B = ["disabled", "onBlur", "onChange", "onFocus", "onMouseDown", "readOnly", "value"], U = {
|
|
1259
|
+
9: /[0-9]/,
|
|
1260
|
+
a: /[A-Za-z]/,
|
|
1261
|
+
"*": /[A-Za-z0-9]/
|
|
1262
|
+
};
|
|
1263
|
+
function M(v) {
|
|
1264
|
+
process.env.NODE_ENV !== "production" && P(!v.maxLength || !v.mask, "react-input-mask: maxLength property shouldn't be passed to the masked input. It breaks masking and unnecessary because length is limited by the mask length.");
|
|
1265
|
+
}
|
|
1266
|
+
function A(v) {
|
|
1267
|
+
var u = v.mask, a = v.maskPlaceholder;
|
|
1268
|
+
!u || !a || a.length === 1 || a.length === u.length || (process.env.NODE_ENV !== "production" ? i(!1, `react-input-mask: maskPlaceholder should either be a single character or have the same length as the mask:
|
|
1269
|
+
` + ("mask: " + u + `
|
|
1270
|
+
`) + ("maskPlaceholder: " + a)) : i(!1));
|
|
1271
|
+
}
|
|
1272
|
+
function Y(v, u) {
|
|
1273
|
+
var a = B.filter(function(c) {
|
|
1274
|
+
return u.props[c] != null && u.props[c] !== v[c];
|
|
1275
|
+
});
|
|
1276
|
+
a.length && (process.env.NODE_ENV !== "production" ? i(!1, "react-input-mask: the following props should be passed to the InputMask component, not to children: " + a.join(",")) : i(!1));
|
|
1277
|
+
}
|
|
1278
|
+
function G(v) {
|
|
1279
|
+
var u = v.mask, a = v.maskPlaceholder, c = [];
|
|
1280
|
+
if (!u)
|
|
1281
|
+
return {
|
|
1282
|
+
maskPlaceholder: null,
|
|
1283
|
+
mask: null,
|
|
1284
|
+
prefix: null,
|
|
1285
|
+
lastEditablePosition: null,
|
|
1286
|
+
permanents: []
|
|
1287
|
+
};
|
|
1288
|
+
if (typeof u == "string") {
|
|
1289
|
+
var y = !1, p = "";
|
|
1290
|
+
u.split("").forEach(function(T) {
|
|
1291
|
+
!y && T === "\\" ? y = !0 : ((y || !U[T]) && c.push(p.length), p += T, y = !1);
|
|
1292
|
+
}), u = p.split("").map(function(T, z) {
|
|
1293
|
+
return c.indexOf(z) === -1 ? U[T] : T;
|
|
1294
|
+
});
|
|
1295
|
+
} else
|
|
1296
|
+
u.forEach(function(T, z) {
|
|
1297
|
+
typeof T == "string" && c.push(z);
|
|
1298
|
+
});
|
|
1299
|
+
a && (a.length === 1 ? a = u.map(function(T, z) {
|
|
1300
|
+
return c.indexOf(z) !== -1 ? T : a;
|
|
1301
|
+
}) : a = a.split(""), c.forEach(function(T) {
|
|
1302
|
+
a[T] = u[T];
|
|
1303
|
+
}), a = a.join(""));
|
|
1304
|
+
for (var F = c.filter(function(T, z) {
|
|
1305
|
+
return T === z;
|
|
1306
|
+
}).map(function(T) {
|
|
1307
|
+
return u[T];
|
|
1308
|
+
}).join(""), C = u.length - 1; c.indexOf(C) !== -1; )
|
|
1309
|
+
C--;
|
|
1310
|
+
return {
|
|
1311
|
+
maskPlaceholder: a,
|
|
1312
|
+
prefix: F,
|
|
1313
|
+
mask: u,
|
|
1314
|
+
lastEditablePosition: C,
|
|
1315
|
+
permanents: c
|
|
1316
|
+
};
|
|
1317
|
+
}
|
|
1318
|
+
var le = function(u) {
|
|
1319
|
+
var a = this;
|
|
1320
|
+
this.isCharacterAllowedAtPosition = function(c, y) {
|
|
1321
|
+
var p = a.maskOptions.maskPlaceholder;
|
|
1322
|
+
return a.isCharacterFillingPosition(c, y) ? !0 : p ? p[y] === c : !1;
|
|
1323
|
+
}, this.isCharacterFillingPosition = function(c, y) {
|
|
1324
|
+
var p = a.maskOptions.mask;
|
|
1325
|
+
if (!c || y >= p.length)
|
|
1326
|
+
return !1;
|
|
1327
|
+
if (!a.isPositionEditable(y))
|
|
1328
|
+
return p[y] === c;
|
|
1329
|
+
var F = p[y];
|
|
1330
|
+
return new RegExp(F).test(c);
|
|
1331
|
+
}, this.isPositionEditable = function(c) {
|
|
1332
|
+
var y = a.maskOptions, p = y.mask, F = y.permanents;
|
|
1333
|
+
return c < p.length && F.indexOf(c) === -1;
|
|
1334
|
+
}, this.isValueEmpty = function(c) {
|
|
1335
|
+
return c.split("").every(function(y, p) {
|
|
1336
|
+
return !a.isPositionEditable(p) || !a.isCharacterFillingPosition(y, p);
|
|
1337
|
+
});
|
|
1338
|
+
}, this.isValueFilled = function(c) {
|
|
1339
|
+
return a.getFilledLength(c) === a.maskOptions.lastEditablePosition + 1;
|
|
1340
|
+
}, this.getDefaultSelectionForValue = function(c) {
|
|
1341
|
+
var y = a.getFilledLength(c), p = a.getRightEditablePosition(y);
|
|
1342
|
+
return {
|
|
1343
|
+
start: p,
|
|
1344
|
+
end: p
|
|
1345
|
+
};
|
|
1346
|
+
}, this.getFilledLength = function(c) {
|
|
1347
|
+
var y = c.split(""), p = ee(y, function(F, C) {
|
|
1348
|
+
return a.isPositionEditable(C) && a.isCharacterFillingPosition(F, C);
|
|
1349
|
+
});
|
|
1350
|
+
return p + 1;
|
|
1351
|
+
}, this.getStringFillingLengthAtPosition = function(c, y) {
|
|
1352
|
+
var p = c.split(""), F = p.reduce(function(C, T) {
|
|
1353
|
+
return a.insertCharacterAtPosition(C, T, C.length);
|
|
1354
|
+
}, o(" ", y));
|
|
1355
|
+
return F.length - y;
|
|
1356
|
+
}, this.getLeftEditablePosition = function(c) {
|
|
1357
|
+
for (var y = c; y >= 0; y--)
|
|
1358
|
+
if (a.isPositionEditable(y))
|
|
1359
|
+
return y;
|
|
1360
|
+
return null;
|
|
1361
|
+
}, this.getRightEditablePosition = function(c) {
|
|
1362
|
+
for (var y = a.maskOptions.mask, p = c; p < y.length; p++)
|
|
1363
|
+
if (a.isPositionEditable(p))
|
|
1364
|
+
return p;
|
|
1365
|
+
return null;
|
|
1366
|
+
}, this.formatValue = function(c) {
|
|
1367
|
+
var y = a.maskOptions, p = y.maskPlaceholder, F = y.mask;
|
|
1368
|
+
if (!p) {
|
|
1369
|
+
for (c = a.insertStringAtPosition("", c, 0); c.length < F.length && !a.isPositionEditable(c.length); )
|
|
1370
|
+
c += F[c.length];
|
|
1371
|
+
return c;
|
|
1372
|
+
}
|
|
1373
|
+
return a.insertStringAtPosition(p, c, 0);
|
|
1374
|
+
}, this.clearRange = function(c, y, p) {
|
|
1375
|
+
if (!p)
|
|
1376
|
+
return c;
|
|
1377
|
+
var F = y + p, C = a.maskOptions, T = C.maskPlaceholder, z = C.mask, h = c.split("").map(function(I, N) {
|
|
1378
|
+
var $ = a.isPositionEditable(N);
|
|
1379
|
+
return !T && N >= F && !$ ? "" : N < y || N >= F ? I : $ ? T ? T[N] : "" : z[N];
|
|
1380
|
+
}).join("");
|
|
1381
|
+
return a.formatValue(h);
|
|
1382
|
+
}, this.insertCharacterAtPosition = function(c, y, p) {
|
|
1383
|
+
var F = a.maskOptions, C = F.mask, T = F.maskPlaceholder;
|
|
1384
|
+
if (p >= C.length)
|
|
1385
|
+
return c;
|
|
1386
|
+
var z = a.isCharacterAllowedAtPosition(y, p), h = a.isPositionEditable(p), I = a.getRightEditablePosition(p), N = T && I ? y === T[I] : null, $ = c.slice(0, p);
|
|
1387
|
+
if (z || !h) {
|
|
1388
|
+
var ae = z ? y : C[p];
|
|
1389
|
+
c = $ + ae;
|
|
1390
|
+
}
|
|
1391
|
+
return !z && !h && !N && (c = a.insertCharacterAtPosition(c, y, p + 1)), c;
|
|
1392
|
+
}, this.insertStringAtPosition = function(c, y, p) {
|
|
1393
|
+
var F = a.maskOptions, C = F.mask, T = F.maskPlaceholder;
|
|
1394
|
+
if (!y || p >= C.length)
|
|
1395
|
+
return c;
|
|
1396
|
+
var z = y.split(""), h = a.isValueFilled(c) || !!T, I = c.slice(p);
|
|
1397
|
+
if (c = z.reduce(function($, ae) {
|
|
1398
|
+
return a.insertCharacterAtPosition($, ae, $.length);
|
|
1399
|
+
}, c.slice(0, p)), h)
|
|
1400
|
+
c += I.slice(c.length - p);
|
|
1401
|
+
else if (a.isValueFilled(c))
|
|
1402
|
+
c += C.slice(c.length).join("");
|
|
1403
|
+
else {
|
|
1404
|
+
var N = I.split("").filter(function($, ae) {
|
|
1405
|
+
return a.isPositionEditable(p + ae);
|
|
1406
|
+
});
|
|
1407
|
+
c = N.reduce(function($, ae) {
|
|
1408
|
+
var he = a.getRightEditablePosition($.length);
|
|
1409
|
+
return he === null ? $ : (a.isPositionEditable($.length) || ($ += C.slice($.length, he).join("")), a.insertCharacterAtPosition($, ae, $.length));
|
|
1410
|
+
}, c);
|
|
1411
|
+
}
|
|
1412
|
+
return c;
|
|
1413
|
+
}, this.processChange = function(c, y) {
|
|
1414
|
+
var p = a.maskOptions, F = p.mask, C = p.prefix, T = p.lastEditablePosition, z = c.value, h = c.selection, I = y.value, N = y.selection, $ = z, ae = "", he = 0, n = 0, s = Math.min(N.start, h.start);
|
|
1415
|
+
if (h.end > N.start ? (ae = $.slice(N.start, h.end), he = a.getStringFillingLengthAtPosition(ae, s), he ? n = N.length : n = 0) : $.length < I.length && (n = I.length - $.length), $ = I, n) {
|
|
1416
|
+
if (n === 1 && !N.length) {
|
|
1417
|
+
var d = N.start === h.start;
|
|
1418
|
+
s = d ? a.getRightEditablePosition(h.start) : a.getLeftEditablePosition(h.start);
|
|
1419
|
+
}
|
|
1420
|
+
$ = a.clearRange($, s, n);
|
|
1421
|
+
}
|
|
1422
|
+
return $ = a.insertStringAtPosition($, ae, s), s += he, s >= F.length ? s = F.length : s < C.length && !he ? s = C.length : s >= C.length && s < T && he && (s = a.getRightEditablePosition(s)), $ = a.formatValue($), {
|
|
1423
|
+
value: $,
|
|
1424
|
+
enteredString: ae,
|
|
1425
|
+
selection: {
|
|
1426
|
+
start: s,
|
|
1427
|
+
end: s
|
|
1428
|
+
}
|
|
1429
|
+
};
|
|
1430
|
+
}, this.maskOptions = G(u);
|
|
1431
|
+
}, g = /* @__PURE__ */ function(v) {
|
|
1432
|
+
H(u, v);
|
|
1433
|
+
function u() {
|
|
1434
|
+
return v.apply(this, arguments) || this;
|
|
1435
|
+
}
|
|
1436
|
+
var a = u.prototype;
|
|
1437
|
+
return a.render = function() {
|
|
1438
|
+
var y = this.props, p = y.children, F = L(y, ["children"]);
|
|
1439
|
+
return t.cloneElement(p, F);
|
|
1440
|
+
}, u;
|
|
1441
|
+
}(t.Component), _ = r.forwardRef(function(u, a) {
|
|
1442
|
+
var c = u.alwaysShowMask, y = u.children, p = u.mask, F = u.maskPlaceholder, C = u.beforeMaskedStateChange, T = L(u, ["alwaysShowMask", "children", "mask", "maskPlaceholder", "beforeMaskedStateChange"]);
|
|
1443
|
+
M(u), A(u);
|
|
1444
|
+
var z = new le({
|
|
1445
|
+
mask: p,
|
|
1446
|
+
maskPlaceholder: F
|
|
1447
|
+
}), h = !!p, I = !T.disabled && !T.readOnly, N = u.value !== null && u.value !== void 0, $ = O(h), ae = E((N ? u.value : u.defaultValue) || ""), he = W(ae, h), n = he.inputRef, s = he.getInputState, d = he.setInputState, R = he.getLastInputState, w = b(n);
|
|
1448
|
+
function x(be) {
|
|
1449
|
+
var de = s(), _e = R(), ke = z.processChange(de, _e);
|
|
1450
|
+
C && (ke = C({
|
|
1451
|
+
currentState: de,
|
|
1452
|
+
previousState: _e,
|
|
1453
|
+
nextState: ke
|
|
1454
|
+
})), d(ke), u.onChange && u.onChange(be);
|
|
1455
|
+
}
|
|
1456
|
+
function q(be) {
|
|
1457
|
+
n.current = be.target;
|
|
1458
|
+
var de = s().value;
|
|
1459
|
+
if (h && !z.isValueFilled(de)) {
|
|
1460
|
+
var _e = z.formatValue(de), ke = z.getDefaultSelectionForValue(_e), ve = {
|
|
1461
|
+
value: _e,
|
|
1462
|
+
selection: ke
|
|
1463
|
+
};
|
|
1464
|
+
C && (ve = C({
|
|
1465
|
+
currentState: s(),
|
|
1466
|
+
nextState: ve
|
|
1467
|
+
}), _e = ve.value, ke = ve.selection), d(ve), _e !== de && u.onChange && u.onChange(be), D(function() {
|
|
1468
|
+
d(R());
|
|
1469
|
+
});
|
|
1470
|
+
}
|
|
1471
|
+
u.onFocus && u.onFocus(be);
|
|
1472
|
+
}
|
|
1473
|
+
function re(be) {
|
|
1474
|
+
var de = s().value, _e = R().value;
|
|
1475
|
+
if (h && !c && z.isValueEmpty(_e)) {
|
|
1476
|
+
var ke = "", ve = {
|
|
1477
|
+
value: ke,
|
|
1478
|
+
selection: {
|
|
1479
|
+
start: null,
|
|
1480
|
+
end: null
|
|
1481
|
+
}
|
|
1482
|
+
};
|
|
1483
|
+
C && (ve = C({
|
|
1484
|
+
currentState: s(),
|
|
1485
|
+
nextState: ve
|
|
1486
|
+
}), ke = ve.value), d(ve), ke !== de && u.onChange && u.onChange(be);
|
|
1487
|
+
}
|
|
1488
|
+
u.onBlur && u.onBlur(be);
|
|
1489
|
+
}
|
|
1490
|
+
function fe(be) {
|
|
1491
|
+
var de = w(), _e = s(), ke = _e.value, ve = K(de);
|
|
1492
|
+
if (!Q(de) && !z.isValueFilled(ke)) {
|
|
1493
|
+
var it = be.clientX, Ye = be.clientY, ze = (/* @__PURE__ */ new Date()).getTime(), at = function yr(wt) {
|
|
1494
|
+
if (ve.removeEventListener("mouseup", yr), !!Q(de)) {
|
|
1495
|
+
var pr = Math.abs(wt.clientX - it), mr = Math.abs(wt.clientY - Ye), Ot = Math.max(pr, mr), Ct = (/* @__PURE__ */ new Date()).getTime() - ze;
|
|
1496
|
+
if (Ot <= 10 && Ct <= 200 || Ot <= 5 && Ct <= 300) {
|
|
1497
|
+
var At = R(), br = z.getDefaultSelectionForValue(At.value), Er = X({}, At, {
|
|
1498
|
+
selection: br
|
|
1499
|
+
});
|
|
1500
|
+
d(Er);
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1503
|
+
};
|
|
1504
|
+
ve.addEventListener("mouseup", at);
|
|
1505
|
+
}
|
|
1506
|
+
u.onMouseDown && u.onMouseDown(be);
|
|
1507
|
+
}
|
|
1508
|
+
if (h && N) {
|
|
1509
|
+
var Ee = w(), Re = Ee && Q(Ee), Be = Re || c || u.value ? z.formatValue(u.value) : u.value;
|
|
1510
|
+
C && (Be = C({
|
|
1511
|
+
nextState: {
|
|
1512
|
+
value: Be,
|
|
1513
|
+
selection: {
|
|
1514
|
+
start: null,
|
|
1515
|
+
end: null
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
}).value), d(X({}, R(), {
|
|
1519
|
+
value: Be
|
|
1520
|
+
}));
|
|
1521
|
+
}
|
|
1522
|
+
var Le = R(), Ne = Le.selection, nt = Le.value;
|
|
1523
|
+
r.useLayoutEffect(function() {
|
|
1524
|
+
if (h) {
|
|
1525
|
+
var be = w(), de = Q(be), _e = Ne, ke = s(), ve = X({}, ke);
|
|
1526
|
+
if (!N) {
|
|
1527
|
+
var it = ke.value, Ye = z.formatValue(it), ze = z.isValueEmpty(Ye), at = !ze || de || c;
|
|
1528
|
+
at ? ve.value = Ye : ze && !de && (ve.value = "");
|
|
1529
|
+
}
|
|
1530
|
+
de && !$ ? ve.selection = z.getDefaultSelectionForValue(ve.value) : N && de && _e && _e.start !== null && _e.end !== null && (ve.selection = _e), C && (ve = C({
|
|
1531
|
+
currentState: ke,
|
|
1532
|
+
nextState: ve
|
|
1533
|
+
})), d(ve);
|
|
1534
|
+
}
|
|
1535
|
+
});
|
|
1536
|
+
var qe = X({}, T, {
|
|
1537
|
+
onFocus: q,
|
|
1538
|
+
onBlur: re,
|
|
1539
|
+
onChange: h && I ? x : u.onChange,
|
|
1540
|
+
onMouseDown: h && I ? fe : u.onMouseDown,
|
|
1541
|
+
ref: function(de) {
|
|
1542
|
+
n.current = l.findDOMNode(de), J(a) ? a(de) : a !== null && typeof a == "object" && (a.current = de);
|
|
1543
|
+
},
|
|
1544
|
+
value: h && N ? nt : u.value
|
|
1545
|
+
});
|
|
1546
|
+
return y ? (Y(u, y), t.createElement(g, qe, y)) : t.createElement("input", qe);
|
|
1547
|
+
});
|
|
1548
|
+
return _.displayName = "InputMask", _.defaultProps = {
|
|
1549
|
+
alwaysShowMask: !1,
|
|
1550
|
+
maskPlaceholder: "_"
|
|
1551
|
+
}, _.propTypes = {
|
|
1552
|
+
alwaysShowMask: f.bool,
|
|
1553
|
+
beforeMaskedStateChange: f.func,
|
|
1554
|
+
children: f.element,
|
|
1555
|
+
mask: f.oneOfType([f.string, f.arrayOf(f.oneOfType([f.string, f.instanceOf(RegExp)]))]),
|
|
1556
|
+
maskPlaceholder: f.string,
|
|
1557
|
+
onFocus: f.func,
|
|
1558
|
+
onBlur: f.func,
|
|
1559
|
+
onChange: f.func,
|
|
1560
|
+
onMouseDown: f.func
|
|
1561
|
+
}, yt = _, yt;
|
|
1562
|
+
}
|
|
1563
|
+
process.env.NODE_ENV === "production" ? Et.exports = Lr() : Et.exports = Ir();
|
|
1564
|
+
var jr = Et.exports;
|
|
1565
|
+
const Br = /* @__PURE__ */ _r(jr), Nr = "_btn_7n08v_1", qr = "_modal_7n08v_9", $r = "_modalBody_7n08v_16", Ur = "_root_7n08v_21", Wr = "_title_7n08v_34", Yr = "_description_7n08v_41", zr = "_inputWrapper_7n08v_48", Hr = "_linkPolicy_7n08v_55", Xr = "_telegramLink_7n08v_60", Zr = "_telegramWrapper_7n08v_65", Kr = "_telegram_7n08v_60", Jr = "_orText_7n08v_88", Se = {
|
|
1566
|
+
btn: Nr,
|
|
1567
|
+
modal: qr,
|
|
1568
|
+
modalBody: $r,
|
|
1569
|
+
root: Ur,
|
|
1570
|
+
title: Wr,
|
|
1571
|
+
description: Yr,
|
|
1572
|
+
inputWrapper: zr,
|
|
1573
|
+
linkPolicy: Hr,
|
|
1574
|
+
telegramLink: Xr,
|
|
1575
|
+
telegramWrapper: Zr,
|
|
1576
|
+
telegram: Kr,
|
|
1577
|
+
orText: Jr
|
|
26
1578
|
};
|
|
27
|
-
var
|
|
28
|
-
const
|
|
29
|
-
var
|
|
30
|
-
const
|
|
31
|
-
return
|
|
32
|
-
},
|
|
33
|
-
function
|
|
34
|
-
let
|
|
35
|
-
const
|
|
1579
|
+
var We = (e) => e.type === "checkbox", je = (e) => e instanceof Date, Pe = (e) => e == null;
|
|
1580
|
+
const ur = (e) => typeof e == "object";
|
|
1581
|
+
var me = (e) => !Pe(e) && !Array.isArray(e) && ur(e) && !je(e), Gr = (e) => me(e) && e.target ? We(e.target) ? e.target.checked : e.target.value : e, Qr = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, en = (e, r) => e.has(Qr(r)), tn = (e) => {
|
|
1582
|
+
const r = e.constructor && e.constructor.prototype;
|
|
1583
|
+
return me(r) && r.hasOwnProperty("isPrototypeOf");
|
|
1584
|
+
}, kt = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
|
|
1585
|
+
function Oe(e) {
|
|
1586
|
+
let r;
|
|
1587
|
+
const t = Array.isArray(e);
|
|
36
1588
|
if (e instanceof Date)
|
|
37
|
-
|
|
1589
|
+
r = new Date(e);
|
|
38
1590
|
else if (e instanceof Set)
|
|
39
|
-
|
|
40
|
-
else if (!(
|
|
41
|
-
if (
|
|
42
|
-
|
|
1591
|
+
r = new Set(e);
|
|
1592
|
+
else if (!(kt && (e instanceof Blob || e instanceof FileList)) && (t || me(e)))
|
|
1593
|
+
if (r = t ? [] : {}, !t && !tn(e))
|
|
1594
|
+
r = e;
|
|
43
1595
|
else
|
|
44
|
-
for (const
|
|
45
|
-
e.hasOwnProperty(
|
|
1596
|
+
for (const l in e)
|
|
1597
|
+
e.hasOwnProperty(l) && (r[l] = Oe(e[l]));
|
|
46
1598
|
else
|
|
47
1599
|
return e;
|
|
48
|
-
return
|
|
1600
|
+
return r;
|
|
49
1601
|
}
|
|
50
|
-
var
|
|
51
|
-
if (!
|
|
52
|
-
return
|
|
53
|
-
const
|
|
54
|
-
return
|
|
55
|
-
},
|
|
56
|
-
let
|
|
57
|
-
const
|
|
58
|
-
for (; ++
|
|
59
|
-
const
|
|
60
|
-
let
|
|
61
|
-
if (
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
if (
|
|
1602
|
+
var rt = (e) => Array.isArray(e) ? e.filter(Boolean) : [], ge = (e) => e === void 0, j = (e, r, t) => {
|
|
1603
|
+
if (!r || !me(e))
|
|
1604
|
+
return t;
|
|
1605
|
+
const l = rt(r.split(/[,[\].]+?/)).reduce((f, i) => Pe(f) ? f : f[i], e);
|
|
1606
|
+
return ge(l) || l === e ? ge(e[r]) ? t : e[r] : l;
|
|
1607
|
+
}, Fe = (e) => typeof e == "boolean", St = (e) => /^\w*$/.test(e), lr = (e) => rt(e.replace(/["|']|\]/g, "").split(/\.|\[/)), ce = (e, r, t) => {
|
|
1608
|
+
let l = -1;
|
|
1609
|
+
const f = St(r) ? [r] : lr(r), i = f.length, P = i - 1;
|
|
1610
|
+
for (; ++l < i; ) {
|
|
1611
|
+
const k = f[l];
|
|
1612
|
+
let X = t;
|
|
1613
|
+
if (l !== P) {
|
|
1614
|
+
const H = e[k];
|
|
1615
|
+
X = me(H) || Array.isArray(H) ? H : isNaN(+f[l + 1]) ? {} : [];
|
|
1616
|
+
}
|
|
1617
|
+
if (k === "__proto__")
|
|
66
1618
|
return;
|
|
67
|
-
e[
|
|
1619
|
+
e[k] = X, e = e[k];
|
|
68
1620
|
}
|
|
69
1621
|
return e;
|
|
70
1622
|
};
|
|
71
|
-
const
|
|
1623
|
+
const Ht = {
|
|
72
1624
|
BLUR: "blur",
|
|
73
1625
|
FOCUS_OUT: "focusout",
|
|
74
1626
|
CHANGE: "change"
|
|
75
|
-
},
|
|
1627
|
+
}, Ce = {
|
|
76
1628
|
onBlur: "onBlur",
|
|
77
1629
|
onChange: "onChange",
|
|
78
1630
|
onSubmit: "onSubmit",
|
|
79
1631
|
onTouched: "onTouched",
|
|
80
1632
|
all: "all"
|
|
81
|
-
},
|
|
1633
|
+
}, Te = {
|
|
82
1634
|
max: "max",
|
|
83
1635
|
min: "min",
|
|
84
1636
|
maxLength: "maxLength",
|
|
@@ -87,323 +1639,323 @@ const Qe = {
|
|
|
87
1639
|
required: "required",
|
|
88
1640
|
validate: "validate"
|
|
89
1641
|
};
|
|
90
|
-
|
|
91
|
-
var
|
|
92
|
-
const
|
|
93
|
-
defaultValues:
|
|
1642
|
+
we.createContext(null);
|
|
1643
|
+
var rn = (e, r, t, l = !0) => {
|
|
1644
|
+
const f = {
|
|
1645
|
+
defaultValues: r._defaultValues
|
|
94
1646
|
};
|
|
95
|
-
for (const
|
|
96
|
-
Object.defineProperty(
|
|
1647
|
+
for (const i in e)
|
|
1648
|
+
Object.defineProperty(f, i, {
|
|
97
1649
|
get: () => {
|
|
98
|
-
const
|
|
99
|
-
return
|
|
1650
|
+
const P = i;
|
|
1651
|
+
return r._proxyFormState[P] !== Ce.all && (r._proxyFormState[P] = !l || Ce.all), e[P];
|
|
100
1652
|
}
|
|
101
1653
|
});
|
|
102
|
-
return
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
const { name:
|
|
106
|
-
return
|
|
107
|
-
},
|
|
108
|
-
function
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
const
|
|
112
|
-
next:
|
|
1654
|
+
return f;
|
|
1655
|
+
}, xe = (e) => me(e) && !Object.keys(e).length, nn = (e, r, t, l) => {
|
|
1656
|
+
t(e);
|
|
1657
|
+
const { name: f, ...i } = e;
|
|
1658
|
+
return xe(i) || Object.keys(i).length >= Object.keys(r).length || Object.keys(i).find((P) => r[P] === Ce.all);
|
|
1659
|
+
}, Ke = (e) => Array.isArray(e) ? e : [e];
|
|
1660
|
+
function an(e) {
|
|
1661
|
+
const r = we.useRef(e);
|
|
1662
|
+
r.current = e, we.useEffect(() => {
|
|
1663
|
+
const t = !e.disabled && r.current.subject && r.current.subject.subscribe({
|
|
1664
|
+
next: r.current.next
|
|
113
1665
|
});
|
|
114
1666
|
return () => {
|
|
115
|
-
|
|
1667
|
+
t && t.unsubscribe();
|
|
116
1668
|
};
|
|
117
1669
|
}, [e.disabled]);
|
|
118
1670
|
}
|
|
119
|
-
var
|
|
120
|
-
...
|
|
1671
|
+
var Ae = (e) => typeof e == "string", sn = (e, r, t, l, f) => Ae(e) ? (l && r.watch.add(e), j(t, e, f)) : Array.isArray(e) ? e.map((i) => (l && r.watch.add(i), j(t, i))) : (l && (r.watchAll = !0), t), on = (e, r, t, l, f) => r ? {
|
|
1672
|
+
...t[e],
|
|
121
1673
|
types: {
|
|
122
|
-
...
|
|
123
|
-
[
|
|
1674
|
+
...t[e] && t[e].types ? t[e].types : {},
|
|
1675
|
+
[l]: f || !0
|
|
124
1676
|
}
|
|
125
|
-
} : {},
|
|
126
|
-
isOnSubmit: !e || e ===
|
|
127
|
-
isOnBlur: e ===
|
|
128
|
-
isOnChange: e ===
|
|
129
|
-
isOnAll: e ===
|
|
130
|
-
isOnTouch: e ===
|
|
131
|
-
}),
|
|
132
|
-
const
|
|
133
|
-
for (const
|
|
134
|
-
const
|
|
135
|
-
if (
|
|
136
|
-
const { _f:
|
|
137
|
-
if (
|
|
138
|
-
if (
|
|
1677
|
+
} : {}, Xt = (e) => ({
|
|
1678
|
+
isOnSubmit: !e || e === Ce.onSubmit,
|
|
1679
|
+
isOnBlur: e === Ce.onBlur,
|
|
1680
|
+
isOnChange: e === Ce.onChange,
|
|
1681
|
+
isOnAll: e === Ce.all,
|
|
1682
|
+
isOnTouch: e === Ce.onTouched
|
|
1683
|
+
}), Zt = (e, r, t) => !t && (r.watchAll || r.watch.has(e) || [...r.watch].some((l) => e.startsWith(l) && /^\.\w+/.test(e.slice(l.length))));
|
|
1684
|
+
const Ue = (e, r, t, l) => {
|
|
1685
|
+
for (const f of t || Object.keys(e)) {
|
|
1686
|
+
const i = j(e, f);
|
|
1687
|
+
if (i) {
|
|
1688
|
+
const { _f: P, ...k } = i;
|
|
1689
|
+
if (P) {
|
|
1690
|
+
if (P.refs && P.refs[0] && r(P.refs[0], f) && !l)
|
|
139
1691
|
break;
|
|
140
|
-
if (
|
|
1692
|
+
if (P.ref && r(P.ref, P.name) && !l)
|
|
141
1693
|
break;
|
|
142
|
-
|
|
1694
|
+
Ue(k, r);
|
|
143
1695
|
} else
|
|
144
|
-
|
|
1696
|
+
me(k) && Ue(k, r);
|
|
145
1697
|
}
|
|
146
1698
|
}
|
|
147
1699
|
};
|
|
148
|
-
var
|
|
149
|
-
const
|
|
150
|
-
return
|
|
151
|
-
},
|
|
152
|
-
if (!
|
|
1700
|
+
var un = (e, r, t) => {
|
|
1701
|
+
const l = Ke(j(e, t));
|
|
1702
|
+
return ce(l, "root", r[t]), ce(e, t, l), e;
|
|
1703
|
+
}, Pt = (e) => e.type === "file", De = (e) => typeof e == "function", Ge = (e) => {
|
|
1704
|
+
if (!kt)
|
|
153
1705
|
return !1;
|
|
154
|
-
const
|
|
155
|
-
return e instanceof (
|
|
156
|
-
},
|
|
157
|
-
const
|
|
1706
|
+
const r = e ? e.ownerDocument : 0;
|
|
1707
|
+
return e instanceof (r && r.defaultView ? r.defaultView.HTMLElement : HTMLElement);
|
|
1708
|
+
}, Je = (e) => Ae(e), xt = (e) => e.type === "radio", Qe = (e) => e instanceof RegExp;
|
|
1709
|
+
const Kt = {
|
|
158
1710
|
value: !1,
|
|
159
1711
|
isValid: !1
|
|
160
|
-
},
|
|
161
|
-
var
|
|
1712
|
+
}, Jt = { value: !0, isValid: !0 };
|
|
1713
|
+
var cr = (e) => {
|
|
162
1714
|
if (Array.isArray(e)) {
|
|
163
1715
|
if (e.length > 1) {
|
|
164
|
-
const
|
|
165
|
-
return { value:
|
|
1716
|
+
const r = e.filter((t) => t && t.checked && !t.disabled).map((t) => t.value);
|
|
1717
|
+
return { value: r, isValid: !!r.length };
|
|
166
1718
|
}
|
|
167
1719
|
return e[0].checked && !e[0].disabled ? (
|
|
168
1720
|
// @ts-expect-error expected to work in the browser
|
|
169
|
-
e[0].attributes && !
|
|
170
|
-
) :
|
|
1721
|
+
e[0].attributes && !ge(e[0].attributes.value) ? ge(e[0].value) || e[0].value === "" ? Jt : { value: e[0].value, isValid: !0 } : Jt
|
|
1722
|
+
) : Kt;
|
|
171
1723
|
}
|
|
172
|
-
return
|
|
1724
|
+
return Kt;
|
|
173
1725
|
};
|
|
174
|
-
const
|
|
1726
|
+
const Gt = {
|
|
175
1727
|
isValid: !1,
|
|
176
1728
|
value: null
|
|
177
1729
|
};
|
|
178
|
-
var
|
|
1730
|
+
var fr = (e) => Array.isArray(e) ? e.reduce((r, t) => t && t.checked && !t.disabled ? {
|
|
179
1731
|
isValid: !0,
|
|
180
|
-
value:
|
|
181
|
-
} :
|
|
182
|
-
function
|
|
183
|
-
if (
|
|
1732
|
+
value: t.value
|
|
1733
|
+
} : r, Gt) : Gt;
|
|
1734
|
+
function Qt(e, r, t = "validate") {
|
|
1735
|
+
if (Je(e) || Array.isArray(e) && e.every(Je) || Fe(e) && !e)
|
|
184
1736
|
return {
|
|
185
|
-
type:
|
|
186
|
-
message:
|
|
187
|
-
ref:
|
|
1737
|
+
type: t,
|
|
1738
|
+
message: Je(e) ? e : "",
|
|
1739
|
+
ref: r
|
|
188
1740
|
};
|
|
189
1741
|
}
|
|
190
|
-
var
|
|
1742
|
+
var Ie = (e) => me(e) && !Qe(e) ? e : {
|
|
191
1743
|
value: e,
|
|
192
1744
|
message: ""
|
|
193
|
-
},
|
|
194
|
-
const { ref:
|
|
195
|
-
if (!
|
|
1745
|
+
}, er = async (e, r, t, l, f) => {
|
|
1746
|
+
const { ref: i, refs: P, required: k, maxLength: X, minLength: H, min: L, max: D, pattern: ie, validate: te, name: ne, valueAsNumber: Q, mount: K, disabled: ue } = e._f, Z = j(r, ne);
|
|
1747
|
+
if (!K || ue)
|
|
196
1748
|
return {};
|
|
197
|
-
const
|
|
198
|
-
|
|
199
|
-
},
|
|
200
|
-
const
|
|
201
|
-
|
|
202
|
-
type:
|
|
203
|
-
message:
|
|
204
|
-
ref:
|
|
205
|
-
...
|
|
1749
|
+
const J = P ? P[0] : i, ee = (O) => {
|
|
1750
|
+
l && J.reportValidity && (J.setCustomValidity(Fe(O) ? "" : O || ""), J.reportValidity());
|
|
1751
|
+
}, o = {}, E = xt(i), b = We(i), m = E || b, S = (Q || Pt(i)) && ge(i.value) && ge(Z) || Ge(i) && i.value === "" || Z === "" || Array.isArray(Z) && !Z.length, V = on.bind(null, ne, t, o), W = (O, B, U, M = Te.maxLength, A = Te.minLength) => {
|
|
1752
|
+
const Y = O ? B : U;
|
|
1753
|
+
o[ne] = {
|
|
1754
|
+
type: O ? M : A,
|
|
1755
|
+
message: Y,
|
|
1756
|
+
ref: i,
|
|
1757
|
+
...V(O ? M : A, Y)
|
|
206
1758
|
};
|
|
207
1759
|
};
|
|
208
|
-
if (
|
|
209
|
-
const { value:
|
|
210
|
-
if (
|
|
211
|
-
type:
|
|
212
|
-
message:
|
|
213
|
-
ref:
|
|
214
|
-
...
|
|
215
|
-
}, !
|
|
216
|
-
return
|
|
1760
|
+
if (f ? !Array.isArray(Z) || !Z.length : k && (!m && (S || Pe(Z)) || Fe(Z) && !Z || b && !cr(P).isValid || E && !fr(P).isValid)) {
|
|
1761
|
+
const { value: O, message: B } = Je(k) ? { value: !!k, message: k } : Ie(k);
|
|
1762
|
+
if (O && (o[ne] = {
|
|
1763
|
+
type: Te.required,
|
|
1764
|
+
message: B,
|
|
1765
|
+
ref: J,
|
|
1766
|
+
...V(Te.required, B)
|
|
1767
|
+
}, !t))
|
|
1768
|
+
return ee(B), o;
|
|
217
1769
|
}
|
|
218
|
-
if (!
|
|
219
|
-
let
|
|
220
|
-
const
|
|
221
|
-
if (!
|
|
222
|
-
const
|
|
223
|
-
|
|
1770
|
+
if (!S && (!Pe(L) || !Pe(D))) {
|
|
1771
|
+
let O, B;
|
|
1772
|
+
const U = Ie(D), M = Ie(L);
|
|
1773
|
+
if (!Pe(Z) && !isNaN(Z)) {
|
|
1774
|
+
const A = i.valueAsNumber || Z && +Z;
|
|
1775
|
+
Pe(U.value) || (O = A > U.value), Pe(M.value) || (B = A < M.value);
|
|
224
1776
|
} else {
|
|
225
|
-
const
|
|
226
|
-
|
|
1777
|
+
const A = i.valueAsDate || new Date(Z), Y = (g) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + g), G = i.type == "time", le = i.type == "week";
|
|
1778
|
+
Ae(U.value) && Z && (O = G ? Y(Z) > Y(U.value) : le ? Z > U.value : A > new Date(U.value)), Ae(M.value) && Z && (B = G ? Y(Z) < Y(M.value) : le ? Z < M.value : A < new Date(M.value));
|
|
227
1779
|
}
|
|
228
|
-
if ((
|
|
229
|
-
return
|
|
1780
|
+
if ((O || B) && (W(!!O, U.message, M.message, Te.max, Te.min), !t))
|
|
1781
|
+
return ee(o[ne].message), o;
|
|
230
1782
|
}
|
|
231
|
-
if ((
|
|
232
|
-
const
|
|
233
|
-
if ((
|
|
234
|
-
return
|
|
1783
|
+
if ((X || H) && !S && (Ae(Z) || f && Array.isArray(Z))) {
|
|
1784
|
+
const O = Ie(X), B = Ie(H), U = !Pe(O.value) && Z.length > +O.value, M = !Pe(B.value) && Z.length < +B.value;
|
|
1785
|
+
if ((U || M) && (W(U, O.message, B.message), !t))
|
|
1786
|
+
return ee(o[ne].message), o;
|
|
235
1787
|
}
|
|
236
|
-
if (
|
|
237
|
-
const { value:
|
|
238
|
-
if (
|
|
239
|
-
type:
|
|
240
|
-
message:
|
|
241
|
-
ref:
|
|
242
|
-
...
|
|
243
|
-
}, !
|
|
244
|
-
return
|
|
1788
|
+
if (ie && !S && Ae(Z)) {
|
|
1789
|
+
const { value: O, message: B } = Ie(ie);
|
|
1790
|
+
if (Qe(O) && !Z.match(O) && (o[ne] = {
|
|
1791
|
+
type: Te.pattern,
|
|
1792
|
+
message: B,
|
|
1793
|
+
ref: i,
|
|
1794
|
+
...V(Te.pattern, B)
|
|
1795
|
+
}, !t))
|
|
1796
|
+
return ee(B), o;
|
|
245
1797
|
}
|
|
246
|
-
if (
|
|
247
|
-
if (
|
|
248
|
-
const
|
|
249
|
-
if (
|
|
250
|
-
...
|
|
251
|
-
...
|
|
252
|
-
}, !
|
|
253
|
-
return
|
|
254
|
-
} else if (
|
|
255
|
-
let
|
|
256
|
-
for (const
|
|
257
|
-
if (!
|
|
1798
|
+
if (te) {
|
|
1799
|
+
if (De(te)) {
|
|
1800
|
+
const O = await te(Z, r), B = Qt(O, J);
|
|
1801
|
+
if (B && (o[ne] = {
|
|
1802
|
+
...B,
|
|
1803
|
+
...V(Te.validate, B.message)
|
|
1804
|
+
}, !t))
|
|
1805
|
+
return ee(B.message), o;
|
|
1806
|
+
} else if (me(te)) {
|
|
1807
|
+
let O = {};
|
|
1808
|
+
for (const B in te) {
|
|
1809
|
+
if (!xe(O) && !t)
|
|
258
1810
|
break;
|
|
259
|
-
const
|
|
260
|
-
|
|
261
|
-
...
|
|
262
|
-
...
|
|
263
|
-
},
|
|
1811
|
+
const U = Qt(await te[B](Z, r), J, B);
|
|
1812
|
+
U && (O = {
|
|
1813
|
+
...U,
|
|
1814
|
+
...V(B, U.message)
|
|
1815
|
+
}, ee(U.message), t && (o[ne] = O));
|
|
264
1816
|
}
|
|
265
|
-
if (!
|
|
266
|
-
ref:
|
|
267
|
-
...
|
|
268
|
-
}, !
|
|
269
|
-
return
|
|
1817
|
+
if (!xe(O) && (o[ne] = {
|
|
1818
|
+
ref: J,
|
|
1819
|
+
...O
|
|
1820
|
+
}, !t))
|
|
1821
|
+
return o;
|
|
270
1822
|
}
|
|
271
1823
|
}
|
|
272
|
-
return
|
|
1824
|
+
return ee(!0), o;
|
|
273
1825
|
};
|
|
274
|
-
function
|
|
275
|
-
const
|
|
276
|
-
let
|
|
277
|
-
for (;
|
|
278
|
-
e =
|
|
1826
|
+
function ln(e, r) {
|
|
1827
|
+
const t = r.slice(0, -1).length;
|
|
1828
|
+
let l = 0;
|
|
1829
|
+
for (; l < t; )
|
|
1830
|
+
e = ge(e) ? l++ : e[r[l++]];
|
|
279
1831
|
return e;
|
|
280
1832
|
}
|
|
281
|
-
function
|
|
282
|
-
for (const
|
|
283
|
-
if (e.hasOwnProperty(
|
|
1833
|
+
function cn(e) {
|
|
1834
|
+
for (const r in e)
|
|
1835
|
+
if (e.hasOwnProperty(r) && !ge(e[r]))
|
|
284
1836
|
return !1;
|
|
285
1837
|
return !0;
|
|
286
1838
|
}
|
|
287
|
-
function
|
|
288
|
-
const
|
|
289
|
-
return
|
|
1839
|
+
function pe(e, r) {
|
|
1840
|
+
const t = Array.isArray(r) ? r : St(r) ? [r] : lr(r), l = t.length === 1 ? e : ln(e, t), f = t.length - 1, i = t[f];
|
|
1841
|
+
return l && delete l[i], f !== 0 && (me(l) && xe(l) || Array.isArray(l) && cn(l)) && pe(e, t.slice(0, -1)), e;
|
|
290
1842
|
}
|
|
291
|
-
var
|
|
1843
|
+
var pt = () => {
|
|
292
1844
|
let e = [];
|
|
293
1845
|
return {
|
|
294
1846
|
get observers() {
|
|
295
1847
|
return e;
|
|
296
1848
|
},
|
|
297
|
-
next: (
|
|
298
|
-
for (const
|
|
299
|
-
|
|
1849
|
+
next: (f) => {
|
|
1850
|
+
for (const i of e)
|
|
1851
|
+
i.next && i.next(f);
|
|
300
1852
|
},
|
|
301
|
-
subscribe: (
|
|
1853
|
+
subscribe: (f) => (e.push(f), {
|
|
302
1854
|
unsubscribe: () => {
|
|
303
|
-
e = e.filter((
|
|
1855
|
+
e = e.filter((i) => i !== f);
|
|
304
1856
|
}
|
|
305
1857
|
}),
|
|
306
1858
|
unsubscribe: () => {
|
|
307
1859
|
e = [];
|
|
308
1860
|
}
|
|
309
1861
|
};
|
|
310
|
-
},
|
|
311
|
-
function
|
|
312
|
-
if (
|
|
313
|
-
return e ===
|
|
314
|
-
if (
|
|
315
|
-
return e.getTime() ===
|
|
316
|
-
const
|
|
317
|
-
if (
|
|
1862
|
+
}, et = (e) => Pe(e) || !ur(e);
|
|
1863
|
+
function Me(e, r) {
|
|
1864
|
+
if (et(e) || et(r))
|
|
1865
|
+
return e === r;
|
|
1866
|
+
if (je(e) && je(r))
|
|
1867
|
+
return e.getTime() === r.getTime();
|
|
1868
|
+
const t = Object.keys(e), l = Object.keys(r);
|
|
1869
|
+
if (t.length !== l.length)
|
|
318
1870
|
return !1;
|
|
319
|
-
for (const
|
|
320
|
-
const
|
|
321
|
-
if (!
|
|
1871
|
+
for (const f of t) {
|
|
1872
|
+
const i = e[f];
|
|
1873
|
+
if (!l.includes(f))
|
|
322
1874
|
return !1;
|
|
323
|
-
if (
|
|
324
|
-
const
|
|
325
|
-
if (
|
|
1875
|
+
if (f !== "ref") {
|
|
1876
|
+
const P = r[f];
|
|
1877
|
+
if (je(i) && je(P) || me(i) && me(P) || Array.isArray(i) && Array.isArray(P) ? !Me(i, P) : i !== P)
|
|
326
1878
|
return !1;
|
|
327
1879
|
}
|
|
328
1880
|
}
|
|
329
1881
|
return !0;
|
|
330
1882
|
}
|
|
331
|
-
var
|
|
332
|
-
for (const
|
|
333
|
-
if (
|
|
1883
|
+
var dr = (e) => e.type === "select-multiple", fn = (e) => xt(e) || We(e), mt = (e) => Ge(e) && e.isConnected, vr = (e) => {
|
|
1884
|
+
for (const r in e)
|
|
1885
|
+
if (De(e[r]))
|
|
334
1886
|
return !0;
|
|
335
1887
|
return !1;
|
|
336
1888
|
};
|
|
337
|
-
function
|
|
338
|
-
const
|
|
339
|
-
if (
|
|
340
|
-
for (const
|
|
341
|
-
Array.isArray(e[
|
|
342
|
-
return s;
|
|
343
|
-
}
|
|
344
|
-
function dt(e, s, r) {
|
|
345
|
-
const n = Array.isArray(e);
|
|
346
|
-
if (E(e) || n)
|
|
347
|
-
for (const o in e)
|
|
348
|
-
Array.isArray(e[o]) || E(e[o]) && !ct(e[o]) ? k(s) || Fe(r[o]) ? r[o] = Array.isArray(e[o]) ? pe(e[o], []) : { ...pe(e[o]) } : dt(e[o], M(s) ? {} : s[o], r[o]) : r[o] = !ie(e[o], s[o]);
|
|
1889
|
+
function tt(e, r = {}) {
|
|
1890
|
+
const t = Array.isArray(e);
|
|
1891
|
+
if (me(e) || t)
|
|
1892
|
+
for (const l in e)
|
|
1893
|
+
Array.isArray(e[l]) || me(e[l]) && !vr(e[l]) ? (r[l] = Array.isArray(e[l]) ? [] : {}, tt(e[l], r[l])) : Pe(e[l]) || (r[l] = !0);
|
|
349
1894
|
return r;
|
|
350
1895
|
}
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
1896
|
+
function hr(e, r, t) {
|
|
1897
|
+
const l = Array.isArray(e);
|
|
1898
|
+
if (me(e) || l)
|
|
1899
|
+
for (const f in e)
|
|
1900
|
+
Array.isArray(e[f]) || me(e[f]) && !vr(e[f]) ? ge(r) || et(t[f]) ? t[f] = Array.isArray(e[f]) ? tt(e[f], []) : { ...tt(e[f]) } : hr(e[f], Pe(r) ? {} : r[f], t[f]) : t[f] = !Me(e[f], r[f]);
|
|
1901
|
+
return t;
|
|
356
1902
|
}
|
|
357
|
-
var
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
1903
|
+
var Ze = (e, r) => hr(e, r, tt(r)), gr = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: l }) => ge(e) ? e : r ? e === "" ? NaN : e && +e : t && Ae(e) ? new Date(e) : l ? l(e) : e;
|
|
1904
|
+
function bt(e) {
|
|
1905
|
+
const r = e.ref;
|
|
1906
|
+
if (!(e.refs ? e.refs.every((t) => t.disabled) : r.disabled))
|
|
1907
|
+
return Pt(r) ? r.files : xt(r) ? fr(e.refs).value : dr(r) ? [...r.selectedOptions].map(({ value: t }) => t) : We(r) ? cr(e.refs).value : gr(ge(r.value) ? e.ref.value : r.value, e);
|
|
1908
|
+
}
|
|
1909
|
+
var dn = (e, r, t, l) => {
|
|
1910
|
+
const f = {};
|
|
1911
|
+
for (const i of e) {
|
|
1912
|
+
const P = j(r, i);
|
|
1913
|
+
P && ce(f, i, P._f);
|
|
362
1914
|
}
|
|
363
1915
|
return {
|
|
364
|
-
criteriaMode:
|
|
1916
|
+
criteriaMode: t,
|
|
365
1917
|
names: [...e],
|
|
366
|
-
fields:
|
|
367
|
-
shouldUseNativeValidation:
|
|
1918
|
+
fields: f,
|
|
1919
|
+
shouldUseNativeValidation: l
|
|
368
1920
|
};
|
|
369
|
-
},
|
|
370
|
-
function
|
|
371
|
-
const
|
|
372
|
-
if (
|
|
1921
|
+
}, $e = (e) => ge(e) ? e : Qe(e) ? e.source : me(e) ? Qe(e.value) ? e.value.source : e.value : e, vn = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate);
|
|
1922
|
+
function tr(e, r, t) {
|
|
1923
|
+
const l = j(e, t);
|
|
1924
|
+
if (l || St(t))
|
|
373
1925
|
return {
|
|
374
|
-
error:
|
|
375
|
-
name:
|
|
1926
|
+
error: l,
|
|
1927
|
+
name: t
|
|
376
1928
|
};
|
|
377
|
-
const
|
|
378
|
-
for (;
|
|
379
|
-
const
|
|
380
|
-
if (
|
|
381
|
-
return { name:
|
|
382
|
-
if (
|
|
1929
|
+
const f = t.split(".");
|
|
1930
|
+
for (; f.length; ) {
|
|
1931
|
+
const i = f.join("."), P = j(r, i), k = j(e, i);
|
|
1932
|
+
if (P && !Array.isArray(P) && t !== i)
|
|
1933
|
+
return { name: t };
|
|
1934
|
+
if (k && k.type)
|
|
383
1935
|
return {
|
|
384
|
-
name:
|
|
385
|
-
error:
|
|
1936
|
+
name: i,
|
|
1937
|
+
error: k
|
|
386
1938
|
};
|
|
387
|
-
|
|
1939
|
+
f.pop();
|
|
388
1940
|
}
|
|
389
1941
|
return {
|
|
390
|
-
name:
|
|
1942
|
+
name: t
|
|
391
1943
|
};
|
|
392
1944
|
}
|
|
393
|
-
var
|
|
394
|
-
const
|
|
395
|
-
mode:
|
|
396
|
-
reValidateMode:
|
|
1945
|
+
var hn = (e, r, t, l, f) => f.isOnAll ? !1 : !t && f.isOnTouch ? !(r || e) : (t ? l.isOnBlur : f.isOnBlur) ? !e : (t ? l.isOnChange : f.isOnChange) ? e : !0, gn = (e, r) => !rt(j(e, r)).length && pe(e, r);
|
|
1946
|
+
const yn = {
|
|
1947
|
+
mode: Ce.onSubmit,
|
|
1948
|
+
reValidateMode: Ce.onChange,
|
|
397
1949
|
shouldFocusError: !0
|
|
398
1950
|
};
|
|
399
|
-
function
|
|
400
|
-
let
|
|
401
|
-
...
|
|
1951
|
+
function pn(e = {}) {
|
|
1952
|
+
let r = {
|
|
1953
|
+
...yn,
|
|
402
1954
|
...e
|
|
403
|
-
},
|
|
1955
|
+
}, t = {
|
|
404
1956
|
submitCount: 0,
|
|
405
1957
|
isDirty: !1,
|
|
406
|
-
isLoading:
|
|
1958
|
+
isLoading: De(r.defaultValues),
|
|
407
1959
|
isValidating: !1,
|
|
408
1960
|
isSubmitted: !1,
|
|
409
1961
|
isSubmitting: !1,
|
|
@@ -412,19 +1964,19 @@ function ir(e = {}) {
|
|
|
412
1964
|
touchedFields: {},
|
|
413
1965
|
dirtyFields: {},
|
|
414
1966
|
validatingFields: {},
|
|
415
|
-
errors:
|
|
416
|
-
disabled:
|
|
417
|
-
},
|
|
1967
|
+
errors: r.errors || {},
|
|
1968
|
+
disabled: r.disabled || !1
|
|
1969
|
+
}, l = {}, f = me(r.defaultValues) || me(r.values) ? Oe(r.defaultValues || r.values) || {} : {}, i = r.shouldUnregister ? {} : Oe(f), P = {
|
|
418
1970
|
action: !1,
|
|
419
1971
|
mount: !1,
|
|
420
1972
|
watch: !1
|
|
421
|
-
},
|
|
1973
|
+
}, k = {
|
|
422
1974
|
mount: /* @__PURE__ */ new Set(),
|
|
423
1975
|
unMount: /* @__PURE__ */ new Set(),
|
|
424
1976
|
array: /* @__PURE__ */ new Set(),
|
|
425
1977
|
watch: /* @__PURE__ */ new Set()
|
|
426
|
-
},
|
|
427
|
-
const
|
|
1978
|
+
}, X, H = 0;
|
|
1979
|
+
const L = {
|
|
428
1980
|
isDirty: !1,
|
|
429
1981
|
dirtyFields: !1,
|
|
430
1982
|
validatingFields: !1,
|
|
@@ -432,484 +1984,484 @@ function ir(e = {}) {
|
|
|
432
1984
|
isValidating: !1,
|
|
433
1985
|
isValid: !1,
|
|
434
1986
|
errors: !1
|
|
435
|
-
},
|
|
436
|
-
values:
|
|
437
|
-
array:
|
|
438
|
-
state:
|
|
439
|
-
},
|
|
440
|
-
clearTimeout(
|
|
441
|
-
},
|
|
442
|
-
if (
|
|
443
|
-
const
|
|
444
|
-
|
|
445
|
-
isValid:
|
|
1987
|
+
}, D = {
|
|
1988
|
+
values: pt(),
|
|
1989
|
+
array: pt(),
|
|
1990
|
+
state: pt()
|
|
1991
|
+
}, ie = Xt(r.mode), te = Xt(r.reValidateMode), ne = r.criteriaMode === Ce.all, Q = (n) => (s) => {
|
|
1992
|
+
clearTimeout(H), H = setTimeout(n, s);
|
|
1993
|
+
}, K = async (n) => {
|
|
1994
|
+
if (L.isValid || n) {
|
|
1995
|
+
const s = r.resolver ? xe((await m()).errors) : await V(l, !0);
|
|
1996
|
+
s !== t.isValid && D.state.next({
|
|
1997
|
+
isValid: s
|
|
446
1998
|
});
|
|
447
1999
|
}
|
|
448
|
-
},
|
|
449
|
-
(
|
|
450
|
-
|
|
451
|
-
}),
|
|
452
|
-
validatingFields:
|
|
453
|
-
isValidating: !
|
|
2000
|
+
}, ue = (n, s) => {
|
|
2001
|
+
(L.isValidating || L.validatingFields) && ((n || Array.from(k.mount)).forEach((d) => {
|
|
2002
|
+
d && (s ? ce(t.validatingFields, d, s) : pe(t.validatingFields, d));
|
|
2003
|
+
}), D.state.next({
|
|
2004
|
+
validatingFields: t.validatingFields,
|
|
2005
|
+
isValidating: !xe(t.validatingFields)
|
|
454
2006
|
}));
|
|
455
|
-
},
|
|
456
|
-
if (
|
|
457
|
-
if (
|
|
458
|
-
const
|
|
459
|
-
|
|
2007
|
+
}, Z = (n, s = [], d, R, w = !0, x = !0) => {
|
|
2008
|
+
if (R && d) {
|
|
2009
|
+
if (P.action = !0, x && Array.isArray(j(l, n))) {
|
|
2010
|
+
const q = d(j(l, n), R.argA, R.argB);
|
|
2011
|
+
w && ce(l, n, q);
|
|
460
2012
|
}
|
|
461
|
-
if (
|
|
462
|
-
const
|
|
463
|
-
|
|
2013
|
+
if (x && Array.isArray(j(t.errors, n))) {
|
|
2014
|
+
const q = d(j(t.errors, n), R.argA, R.argB);
|
|
2015
|
+
w && ce(t.errors, n, q), gn(t.errors, n);
|
|
464
2016
|
}
|
|
465
|
-
if (
|
|
466
|
-
const
|
|
467
|
-
|
|
2017
|
+
if (L.touchedFields && x && Array.isArray(j(t.touchedFields, n))) {
|
|
2018
|
+
const q = d(j(t.touchedFields, n), R.argA, R.argB);
|
|
2019
|
+
w && ce(t.touchedFields, n, q);
|
|
468
2020
|
}
|
|
469
|
-
|
|
470
|
-
name:
|
|
471
|
-
isDirty:
|
|
472
|
-
dirtyFields:
|
|
473
|
-
errors:
|
|
474
|
-
isValid:
|
|
2021
|
+
L.dirtyFields && (t.dirtyFields = Ze(f, i)), D.state.next({
|
|
2022
|
+
name: n,
|
|
2023
|
+
isDirty: O(n, s),
|
|
2024
|
+
dirtyFields: t.dirtyFields,
|
|
2025
|
+
errors: t.errors,
|
|
2026
|
+
isValid: t.isValid
|
|
475
2027
|
});
|
|
476
2028
|
} else
|
|
477
|
-
|
|
478
|
-
},
|
|
479
|
-
|
|
480
|
-
errors:
|
|
2029
|
+
ce(i, n, s);
|
|
2030
|
+
}, J = (n, s) => {
|
|
2031
|
+
ce(t.errors, n, s), D.state.next({
|
|
2032
|
+
errors: t.errors
|
|
481
2033
|
});
|
|
482
|
-
},
|
|
483
|
-
|
|
484
|
-
errors:
|
|
2034
|
+
}, ee = (n) => {
|
|
2035
|
+
t.errors = n, D.state.next({
|
|
2036
|
+
errors: t.errors,
|
|
485
2037
|
isValid: !1
|
|
486
2038
|
});
|
|
487
|
-
},
|
|
488
|
-
const
|
|
489
|
-
if (
|
|
490
|
-
const
|
|
491
|
-
|
|
492
|
-
}
|
|
493
|
-
},
|
|
494
|
-
let
|
|
495
|
-
const
|
|
496
|
-
name:
|
|
497
|
-
},
|
|
498
|
-
if (!
|
|
499
|
-
|
|
500
|
-
const
|
|
501
|
-
|
|
502
|
-
}
|
|
503
|
-
if (
|
|
504
|
-
const
|
|
505
|
-
|
|
506
|
-
}
|
|
507
|
-
return
|
|
508
|
-
},
|
|
509
|
-
const
|
|
510
|
-
if (e.delayError &&
|
|
511
|
-
const
|
|
512
|
-
...
|
|
513
|
-
...
|
|
514
|
-
errors:
|
|
515
|
-
name:
|
|
2039
|
+
}, o = (n, s, d, R) => {
|
|
2040
|
+
const w = j(l, n);
|
|
2041
|
+
if (w) {
|
|
2042
|
+
const x = j(i, n, ge(d) ? j(f, n) : d);
|
|
2043
|
+
ge(x) || R && R.defaultChecked || s ? ce(i, n, s ? x : bt(w._f)) : M(n, x), P.mount && K();
|
|
2044
|
+
}
|
|
2045
|
+
}, E = (n, s, d, R, w) => {
|
|
2046
|
+
let x = !1, q = !1;
|
|
2047
|
+
const re = {
|
|
2048
|
+
name: n
|
|
2049
|
+
}, fe = !!(j(l, n) && j(l, n)._f && j(l, n)._f.disabled);
|
|
2050
|
+
if (!d || R) {
|
|
2051
|
+
L.isDirty && (q = t.isDirty, t.isDirty = re.isDirty = O(), x = q !== re.isDirty);
|
|
2052
|
+
const Ee = fe || Me(j(f, n), s);
|
|
2053
|
+
q = !!(!fe && j(t.dirtyFields, n)), Ee || fe ? pe(t.dirtyFields, n) : ce(t.dirtyFields, n, !0), re.dirtyFields = t.dirtyFields, x = x || L.dirtyFields && q !== !Ee;
|
|
2054
|
+
}
|
|
2055
|
+
if (d) {
|
|
2056
|
+
const Ee = j(t.touchedFields, n);
|
|
2057
|
+
Ee || (ce(t.touchedFields, n, d), re.touchedFields = t.touchedFields, x = x || L.touchedFields && Ee !== d);
|
|
2058
|
+
}
|
|
2059
|
+
return x && w && D.state.next(re), x ? re : {};
|
|
2060
|
+
}, b = (n, s, d, R) => {
|
|
2061
|
+
const w = j(t.errors, n), x = L.isValid && Fe(s) && t.isValid !== s;
|
|
2062
|
+
if (e.delayError && d ? (X = Q(() => J(n, d)), X(e.delayError)) : (clearTimeout(H), X = null, d ? ce(t.errors, n, d) : pe(t.errors, n)), (d ? !Me(w, d) : w) || !xe(R) || x) {
|
|
2063
|
+
const q = {
|
|
2064
|
+
...R,
|
|
2065
|
+
...x && Fe(s) ? { isValid: s } : {},
|
|
2066
|
+
errors: t.errors,
|
|
2067
|
+
name: n
|
|
516
2068
|
};
|
|
517
|
-
|
|
518
|
-
...
|
|
519
|
-
...
|
|
520
|
-
},
|
|
521
|
-
}
|
|
522
|
-
},
|
|
523
|
-
|
|
524
|
-
const
|
|
525
|
-
return
|
|
526
|
-
},
|
|
527
|
-
const { errors:
|
|
528
|
-
if (
|
|
529
|
-
for (const
|
|
530
|
-
const
|
|
531
|
-
|
|
2069
|
+
t = {
|
|
2070
|
+
...t,
|
|
2071
|
+
...q
|
|
2072
|
+
}, D.state.next(q);
|
|
2073
|
+
}
|
|
2074
|
+
}, m = async (n) => {
|
|
2075
|
+
ue(n, !0);
|
|
2076
|
+
const s = await r.resolver(i, r.context, dn(n || k.mount, l, r.criteriaMode, r.shouldUseNativeValidation));
|
|
2077
|
+
return ue(n), s;
|
|
2078
|
+
}, S = async (n) => {
|
|
2079
|
+
const { errors: s } = await m(n);
|
|
2080
|
+
if (n)
|
|
2081
|
+
for (const d of n) {
|
|
2082
|
+
const R = j(s, d);
|
|
2083
|
+
R ? ce(t.errors, d, R) : pe(t.errors, d);
|
|
532
2084
|
}
|
|
533
2085
|
else
|
|
534
|
-
|
|
535
|
-
return
|
|
536
|
-
},
|
|
2086
|
+
t.errors = s;
|
|
2087
|
+
return s;
|
|
2088
|
+
}, V = async (n, s, d = {
|
|
537
2089
|
valid: !0
|
|
538
2090
|
}) => {
|
|
539
|
-
for (const
|
|
540
|
-
const
|
|
541
|
-
if (
|
|
542
|
-
const { _f:
|
|
543
|
-
if (
|
|
544
|
-
const
|
|
545
|
-
|
|
546
|
-
const
|
|
547
|
-
if (
|
|
2091
|
+
for (const R in n) {
|
|
2092
|
+
const w = n[R];
|
|
2093
|
+
if (w) {
|
|
2094
|
+
const { _f: x, ...q } = w;
|
|
2095
|
+
if (x) {
|
|
2096
|
+
const re = k.array.has(x.name);
|
|
2097
|
+
ue([R], !0);
|
|
2098
|
+
const fe = await er(w, i, ne, r.shouldUseNativeValidation && !s, re);
|
|
2099
|
+
if (ue([R]), fe[x.name] && (d.valid = !1, s))
|
|
548
2100
|
break;
|
|
549
|
-
!
|
|
2101
|
+
!s && (j(fe, x.name) ? re ? un(t.errors, fe, x.name) : ce(t.errors, x.name, fe[x.name]) : pe(t.errors, x.name));
|
|
550
2102
|
}
|
|
551
|
-
!
|
|
2103
|
+
!xe(q) && await V(q, s, d);
|
|
552
2104
|
}
|
|
553
2105
|
}
|
|
554
|
-
return
|
|
555
|
-
},
|
|
556
|
-
for (const
|
|
557
|
-
const
|
|
558
|
-
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
},
|
|
562
|
-
...
|
|
563
|
-
},
|
|
564
|
-
const
|
|
565
|
-
let
|
|
566
|
-
if (
|
|
567
|
-
const
|
|
568
|
-
|
|
569
|
-
name:
|
|
570
|
-
values: { ...
|
|
2106
|
+
return d.valid;
|
|
2107
|
+
}, W = () => {
|
|
2108
|
+
for (const n of k.unMount) {
|
|
2109
|
+
const s = j(l, n);
|
|
2110
|
+
s && (s._f.refs ? s._f.refs.every((d) => !mt(d)) : !mt(s._f.ref)) && y(n);
|
|
2111
|
+
}
|
|
2112
|
+
k.unMount = /* @__PURE__ */ new Set();
|
|
2113
|
+
}, O = (n, s) => (n && s && ce(i, n, s), !Me(_(), f)), B = (n, s, d) => sn(n, k, {
|
|
2114
|
+
...P.mount ? i : ge(s) ? f : Ae(n) ? { [n]: s } : s
|
|
2115
|
+
}, d, s), U = (n) => rt(j(P.mount ? i : f, n, e.shouldUnregister ? j(f, n, []) : [])), M = (n, s, d = {}) => {
|
|
2116
|
+
const R = j(l, n);
|
|
2117
|
+
let w = s;
|
|
2118
|
+
if (R) {
|
|
2119
|
+
const x = R._f;
|
|
2120
|
+
x && (!x.disabled && ce(i, n, gr(s, x)), w = Ge(x.ref) && Pe(s) ? "" : s, dr(x.ref) ? [...x.ref.options].forEach((q) => q.selected = w.includes(q.value)) : x.refs ? We(x.ref) ? x.refs.length > 1 ? x.refs.forEach((q) => (!q.defaultChecked || !q.disabled) && (q.checked = Array.isArray(w) ? !!w.find((re) => re === q.value) : w === q.value)) : x.refs[0] && (x.refs[0].checked = !!w) : x.refs.forEach((q) => q.checked = q.value === w) : Pt(x.ref) ? x.ref.value = "" : (x.ref.value = w, x.ref.type || D.values.next({
|
|
2121
|
+
name: n,
|
|
2122
|
+
values: { ...i }
|
|
571
2123
|
})));
|
|
572
2124
|
}
|
|
573
|
-
(
|
|
574
|
-
},
|
|
575
|
-
for (const
|
|
576
|
-
const
|
|
577
|
-
(
|
|
578
|
-
}
|
|
579
|
-
},
|
|
580
|
-
const
|
|
581
|
-
|
|
582
|
-
name:
|
|
583
|
-
values: { ...
|
|
584
|
-
}), (
|
|
585
|
-
name:
|
|
586
|
-
dirtyFields:
|
|
587
|
-
isDirty:
|
|
588
|
-
})) :
|
|
589
|
-
name:
|
|
590
|
-
values: { ...
|
|
2125
|
+
(d.shouldDirty || d.shouldTouch) && E(n, w, d.shouldTouch, d.shouldDirty, !0), d.shouldValidate && g(n);
|
|
2126
|
+
}, A = (n, s, d) => {
|
|
2127
|
+
for (const R in s) {
|
|
2128
|
+
const w = s[R], x = `${n}.${R}`, q = j(l, x);
|
|
2129
|
+
(k.array.has(n) || !et(w) || q && !q._f) && !je(w) ? A(x, w, d) : M(x, w, d);
|
|
2130
|
+
}
|
|
2131
|
+
}, Y = (n, s, d = {}) => {
|
|
2132
|
+
const R = j(l, n), w = k.array.has(n), x = Oe(s);
|
|
2133
|
+
ce(i, n, x), w ? (D.array.next({
|
|
2134
|
+
name: n,
|
|
2135
|
+
values: { ...i }
|
|
2136
|
+
}), (L.isDirty || L.dirtyFields) && d.shouldDirty && D.state.next({
|
|
2137
|
+
name: n,
|
|
2138
|
+
dirtyFields: Ze(f, i),
|
|
2139
|
+
isDirty: O(n, x)
|
|
2140
|
+
})) : R && !R._f && !Pe(x) ? A(n, x, d) : M(n, x, d), Zt(n, k) && D.state.next({ ...t }), D.values.next({
|
|
2141
|
+
name: P.mount ? n : void 0,
|
|
2142
|
+
values: { ...i }
|
|
591
2143
|
});
|
|
592
|
-
},
|
|
593
|
-
|
|
594
|
-
const
|
|
595
|
-
let
|
|
596
|
-
const
|
|
597
|
-
|
|
2144
|
+
}, G = async (n) => {
|
|
2145
|
+
P.mount = !0;
|
|
2146
|
+
const s = n.target;
|
|
2147
|
+
let d = s.name, R = !0;
|
|
2148
|
+
const w = j(l, d), x = () => s.type ? bt(w._f) : Gr(n), q = (re) => {
|
|
2149
|
+
R = Number.isNaN(re) || re === j(i, d, re);
|
|
598
2150
|
};
|
|
599
|
-
if (
|
|
600
|
-
let
|
|
601
|
-
const
|
|
602
|
-
|
|
603
|
-
const
|
|
604
|
-
if (!
|
|
605
|
-
name:
|
|
606
|
-
type:
|
|
607
|
-
values: { ...
|
|
608
|
-
}),
|
|
609
|
-
return
|
|
610
|
-
if (!
|
|
611
|
-
const { errors:
|
|
612
|
-
if (
|
|
613
|
-
const
|
|
614
|
-
|
|
2151
|
+
if (w) {
|
|
2152
|
+
let re, fe;
|
|
2153
|
+
const Ee = x(), Re = n.type === Ht.BLUR || n.type === Ht.FOCUS_OUT, Be = !vn(w._f) && !r.resolver && !j(t.errors, d) && !w._f.deps || hn(Re, j(t.touchedFields, d), t.isSubmitted, te, ie), Le = Zt(d, k, Re);
|
|
2154
|
+
ce(i, d, Ee), Re ? (w._f.onBlur && w._f.onBlur(n), X && X(0)) : w._f.onChange && w._f.onChange(n);
|
|
2155
|
+
const Ne = E(d, Ee, Re, !1), nt = !xe(Ne) || Le;
|
|
2156
|
+
if (!Re && D.values.next({
|
|
2157
|
+
name: d,
|
|
2158
|
+
type: n.type,
|
|
2159
|
+
values: { ...i }
|
|
2160
|
+
}), Be)
|
|
2161
|
+
return L.isValid && K(), nt && D.state.next({ name: d, ...Le ? {} : Ne });
|
|
2162
|
+
if (!Re && Le && D.state.next({ ...t }), r.resolver) {
|
|
2163
|
+
const { errors: qe } = await m([d]);
|
|
2164
|
+
if (q(Ee), R) {
|
|
2165
|
+
const be = tr(t.errors, l, d), de = tr(qe, l, be.name || d);
|
|
2166
|
+
re = de.error, d = de.name, fe = xe(qe);
|
|
615
2167
|
}
|
|
616
2168
|
} else
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
}
|
|
620
|
-
},
|
|
621
|
-
if (
|
|
622
|
-
return
|
|
623
|
-
},
|
|
624
|
-
let
|
|
625
|
-
const
|
|
626
|
-
if (
|
|
627
|
-
const
|
|
628
|
-
|
|
2169
|
+
ue([d], !0), re = (await er(w, i, ne, r.shouldUseNativeValidation))[d], ue([d]), q(Ee), R && (re ? fe = !1 : L.isValid && (fe = await V(l, !0)));
|
|
2170
|
+
R && (w._f.deps && g(w._f.deps), b(d, fe, re, Ne));
|
|
2171
|
+
}
|
|
2172
|
+
}, le = (n, s) => {
|
|
2173
|
+
if (j(t.errors, s) && n.focus)
|
|
2174
|
+
return n.focus(), 1;
|
|
2175
|
+
}, g = async (n, s = {}) => {
|
|
2176
|
+
let d, R;
|
|
2177
|
+
const w = Ke(n);
|
|
2178
|
+
if (r.resolver) {
|
|
2179
|
+
const x = await S(ge(n) ? n : w);
|
|
2180
|
+
d = xe(x), R = n ? !w.some((q) => j(x, q)) : d;
|
|
629
2181
|
} else
|
|
630
|
-
|
|
631
|
-
const
|
|
632
|
-
return await
|
|
633
|
-
}))).every(Boolean), !(!
|
|
634
|
-
return
|
|
635
|
-
...!
|
|
636
|
-
...
|
|
637
|
-
errors:
|
|
638
|
-
}),
|
|
639
|
-
},
|
|
640
|
-
const
|
|
641
|
-
...
|
|
2182
|
+
n ? (R = (await Promise.all(w.map(async (x) => {
|
|
2183
|
+
const q = j(l, x);
|
|
2184
|
+
return await V(q && q._f ? { [x]: q } : q);
|
|
2185
|
+
}))).every(Boolean), !(!R && !t.isValid) && K()) : R = d = await V(l);
|
|
2186
|
+
return D.state.next({
|
|
2187
|
+
...!Ae(n) || L.isValid && d !== t.isValid ? {} : { name: n },
|
|
2188
|
+
...r.resolver || !n ? { isValid: d } : {},
|
|
2189
|
+
errors: t.errors
|
|
2190
|
+
}), s.shouldFocus && !R && Ue(l, le, n ? w : k.mount), R;
|
|
2191
|
+
}, _ = (n) => {
|
|
2192
|
+
const s = {
|
|
2193
|
+
...P.mount ? i : f
|
|
642
2194
|
};
|
|
643
|
-
return
|
|
644
|
-
},
|
|
645
|
-
invalid: !!
|
|
646
|
-
isDirty: !!
|
|
647
|
-
error:
|
|
648
|
-
isValidating: !!
|
|
649
|
-
isTouched: !!
|
|
650
|
-
}),
|
|
651
|
-
|
|
652
|
-
errors:
|
|
2195
|
+
return ge(n) ? s : Ae(n) ? j(s, n) : n.map((d) => j(s, d));
|
|
2196
|
+
}, v = (n, s) => ({
|
|
2197
|
+
invalid: !!j((s || t).errors, n),
|
|
2198
|
+
isDirty: !!j((s || t).dirtyFields, n),
|
|
2199
|
+
error: j((s || t).errors, n),
|
|
2200
|
+
isValidating: !!j(t.validatingFields, n),
|
|
2201
|
+
isTouched: !!j((s || t).touchedFields, n)
|
|
2202
|
+
}), u = (n) => {
|
|
2203
|
+
n && Ke(n).forEach((s) => pe(t.errors, s)), D.state.next({
|
|
2204
|
+
errors: n ? t.errors : {}
|
|
653
2205
|
});
|
|
654
|
-
},
|
|
655
|
-
const
|
|
656
|
-
|
|
657
|
-
...
|
|
658
|
-
...
|
|
659
|
-
ref:
|
|
660
|
-
}),
|
|
661
|
-
name:
|
|
662
|
-
errors:
|
|
2206
|
+
}, a = (n, s, d) => {
|
|
2207
|
+
const R = (j(l, n, { _f: {} })._f || {}).ref, w = j(t.errors, n) || {}, { ref: x, message: q, type: re, ...fe } = w;
|
|
2208
|
+
ce(t.errors, n, {
|
|
2209
|
+
...fe,
|
|
2210
|
+
...s,
|
|
2211
|
+
ref: R
|
|
2212
|
+
}), D.state.next({
|
|
2213
|
+
name: n,
|
|
2214
|
+
errors: t.errors,
|
|
663
2215
|
isValid: !1
|
|
664
|
-
}),
|
|
665
|
-
},
|
|
666
|
-
next: (
|
|
667
|
-
}) :
|
|
668
|
-
for (const
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
values: { ...
|
|
672
|
-
}),
|
|
673
|
-
...
|
|
674
|
-
...
|
|
675
|
-
}), !
|
|
676
|
-
},
|
|
677
|
-
if (
|
|
678
|
-
const
|
|
679
|
-
|
|
680
|
-
}
|
|
681
|
-
},
|
|
682
|
-
let
|
|
683
|
-
const
|
|
684
|
-
return
|
|
685
|
-
...
|
|
2216
|
+
}), d && d.shouldFocus && R && R.focus && R.focus();
|
|
2217
|
+
}, c = (n, s) => De(n) ? D.values.subscribe({
|
|
2218
|
+
next: (d) => n(B(void 0, s), d)
|
|
2219
|
+
}) : B(n, s, !0), y = (n, s = {}) => {
|
|
2220
|
+
for (const d of n ? Ke(n) : k.mount)
|
|
2221
|
+
k.mount.delete(d), k.array.delete(d), s.keepValue || (pe(l, d), pe(i, d)), !s.keepError && pe(t.errors, d), !s.keepDirty && pe(t.dirtyFields, d), !s.keepTouched && pe(t.touchedFields, d), !s.keepIsValidating && pe(t.validatingFields, d), !r.shouldUnregister && !s.keepDefaultValue && pe(f, d);
|
|
2222
|
+
D.values.next({
|
|
2223
|
+
values: { ...i }
|
|
2224
|
+
}), D.state.next({
|
|
2225
|
+
...t,
|
|
2226
|
+
...s.keepDirty ? { isDirty: O() } : {}
|
|
2227
|
+
}), !s.keepIsValid && K();
|
|
2228
|
+
}, p = ({ disabled: n, name: s, field: d, fields: R, value: w }) => {
|
|
2229
|
+
if (Fe(n) && P.mount || n) {
|
|
2230
|
+
const x = n ? void 0 : ge(w) ? bt(d ? d._f : j(R, s)._f) : w;
|
|
2231
|
+
ce(i, s, x), E(s, x, !1, !1, !0);
|
|
2232
|
+
}
|
|
2233
|
+
}, F = (n, s = {}) => {
|
|
2234
|
+
let d = j(l, n);
|
|
2235
|
+
const R = Fe(s.disabled);
|
|
2236
|
+
return ce(l, n, {
|
|
2237
|
+
...d || {},
|
|
686
2238
|
_f: {
|
|
687
|
-
...
|
|
688
|
-
name:
|
|
2239
|
+
...d && d._f ? d._f : { ref: { name: n } },
|
|
2240
|
+
name: n,
|
|
689
2241
|
mount: !0,
|
|
690
|
-
...
|
|
2242
|
+
...s
|
|
691
2243
|
}
|
|
692
|
-
}),
|
|
693
|
-
field:
|
|
694
|
-
disabled:
|
|
695
|
-
name:
|
|
696
|
-
value:
|
|
697
|
-
}) :
|
|
698
|
-
...
|
|
699
|
-
...
|
|
700
|
-
required: !!
|
|
701
|
-
min:
|
|
702
|
-
max:
|
|
703
|
-
minLength:
|
|
704
|
-
maxLength:
|
|
705
|
-
pattern:
|
|
2244
|
+
}), k.mount.add(n), d ? p({
|
|
2245
|
+
field: d,
|
|
2246
|
+
disabled: s.disabled,
|
|
2247
|
+
name: n,
|
|
2248
|
+
value: s.value
|
|
2249
|
+
}) : o(n, !0, s.value), {
|
|
2250
|
+
...R ? { disabled: s.disabled } : {},
|
|
2251
|
+
...r.progressive ? {
|
|
2252
|
+
required: !!s.required,
|
|
2253
|
+
min: $e(s.min),
|
|
2254
|
+
max: $e(s.max),
|
|
2255
|
+
minLength: $e(s.minLength),
|
|
2256
|
+
maxLength: $e(s.maxLength),
|
|
2257
|
+
pattern: $e(s.pattern)
|
|
706
2258
|
} : {},
|
|
707
|
-
name:
|
|
708
|
-
onChange:
|
|
709
|
-
onBlur:
|
|
710
|
-
ref: (
|
|
711
|
-
if (
|
|
712
|
-
|
|
713
|
-
const
|
|
714
|
-
if (
|
|
2259
|
+
name: n,
|
|
2260
|
+
onChange: G,
|
|
2261
|
+
onBlur: G,
|
|
2262
|
+
ref: (w) => {
|
|
2263
|
+
if (w) {
|
|
2264
|
+
F(n, s), d = j(l, n);
|
|
2265
|
+
const x = ge(w.value) && w.querySelectorAll && w.querySelectorAll("input,select,textarea")[0] || w, q = fn(x), re = d._f.refs || [];
|
|
2266
|
+
if (q ? re.find((fe) => fe === x) : x === d._f.ref)
|
|
715
2267
|
return;
|
|
716
|
-
|
|
2268
|
+
ce(l, n, {
|
|
717
2269
|
_f: {
|
|
718
|
-
...
|
|
719
|
-
...
|
|
2270
|
+
...d._f,
|
|
2271
|
+
...q ? {
|
|
720
2272
|
refs: [
|
|
721
|
-
...
|
|
722
|
-
|
|
723
|
-
...Array.isArray(f
|
|
2273
|
+
...re.filter(mt),
|
|
2274
|
+
x,
|
|
2275
|
+
...Array.isArray(j(f, n)) ? [{}] : []
|
|
724
2276
|
],
|
|
725
|
-
ref: { type:
|
|
726
|
-
} : { ref:
|
|
2277
|
+
ref: { type: x.type, name: n }
|
|
2278
|
+
} : { ref: x }
|
|
727
2279
|
}
|
|
728
|
-
}),
|
|
2280
|
+
}), o(n, !1, void 0, x);
|
|
729
2281
|
} else
|
|
730
|
-
|
|
2282
|
+
d = j(l, n, {}), d._f && (d._f.mount = !1), (r.shouldUnregister || s.shouldUnregister) && !(en(k.array, n) && P.action) && k.unMount.add(n);
|
|
731
2283
|
}
|
|
732
2284
|
};
|
|
733
|
-
},
|
|
734
|
-
|
|
735
|
-
const
|
|
736
|
-
|
|
737
|
-
|
|
2285
|
+
}, C = () => r.shouldFocusError && Ue(l, le, k.mount), T = (n) => {
|
|
2286
|
+
Fe(n) && (D.state.next({ disabled: n }), Ue(l, (s, d) => {
|
|
2287
|
+
const R = j(l, d);
|
|
2288
|
+
R && (s.disabled = R._f.disabled || n, Array.isArray(R._f.refs) && R._f.refs.forEach((w) => {
|
|
2289
|
+
w.disabled = R._f.disabled || n;
|
|
738
2290
|
}));
|
|
739
2291
|
}, 0, !1));
|
|
740
|
-
},
|
|
741
|
-
let
|
|
742
|
-
|
|
743
|
-
let
|
|
744
|
-
if (
|
|
2292
|
+
}, z = (n, s) => async (d) => {
|
|
2293
|
+
let R;
|
|
2294
|
+
d && (d.preventDefault && d.preventDefault(), d.persist && d.persist());
|
|
2295
|
+
let w = Oe(i);
|
|
2296
|
+
if (D.state.next({
|
|
745
2297
|
isSubmitting: !0
|
|
746
|
-
}),
|
|
747
|
-
const { errors:
|
|
748
|
-
|
|
2298
|
+
}), r.resolver) {
|
|
2299
|
+
const { errors: x, values: q } = await m();
|
|
2300
|
+
t.errors = x, w = q;
|
|
749
2301
|
} else
|
|
750
|
-
await
|
|
751
|
-
if (
|
|
752
|
-
|
|
2302
|
+
await V(l);
|
|
2303
|
+
if (pe(t.errors, "root"), xe(t.errors)) {
|
|
2304
|
+
D.state.next({
|
|
753
2305
|
errors: {}
|
|
754
2306
|
});
|
|
755
2307
|
try {
|
|
756
|
-
await
|
|
757
|
-
} catch (
|
|
758
|
-
|
|
2308
|
+
await n(w, d);
|
|
2309
|
+
} catch (x) {
|
|
2310
|
+
R = x;
|
|
759
2311
|
}
|
|
760
2312
|
} else
|
|
761
|
-
|
|
762
|
-
if (
|
|
2313
|
+
s && await s({ ...t.errors }, d), C(), setTimeout(C);
|
|
2314
|
+
if (D.state.next({
|
|
763
2315
|
isSubmitted: !0,
|
|
764
2316
|
isSubmitting: !1,
|
|
765
|
-
isSubmitSuccessful:
|
|
766
|
-
submitCount:
|
|
767
|
-
errors:
|
|
768
|
-
}),
|
|
769
|
-
throw
|
|
770
|
-
},
|
|
771
|
-
|
|
772
|
-
},
|
|
773
|
-
const
|
|
774
|
-
if (
|
|
775
|
-
if (
|
|
776
|
-
for (const
|
|
777
|
-
|
|
2317
|
+
isSubmitSuccessful: xe(t.errors) && !R,
|
|
2318
|
+
submitCount: t.submitCount + 1,
|
|
2319
|
+
errors: t.errors
|
|
2320
|
+
}), R)
|
|
2321
|
+
throw R;
|
|
2322
|
+
}, h = (n, s = {}) => {
|
|
2323
|
+
j(l, n) && (ge(s.defaultValue) ? Y(n, Oe(j(f, n))) : (Y(n, s.defaultValue), ce(f, n, Oe(s.defaultValue))), s.keepTouched || pe(t.touchedFields, n), s.keepDirty || (pe(t.dirtyFields, n), t.isDirty = s.defaultValue ? O(n, Oe(j(f, n))) : O()), s.keepError || (pe(t.errors, n), L.isValid && K()), D.state.next({ ...t }));
|
|
2324
|
+
}, I = (n, s = {}) => {
|
|
2325
|
+
const d = n ? Oe(n) : f, R = Oe(d), w = xe(n), x = w ? f : R;
|
|
2326
|
+
if (s.keepDefaultValues || (f = d), !s.keepValues) {
|
|
2327
|
+
if (s.keepDirtyValues)
|
|
2328
|
+
for (const q of k.mount)
|
|
2329
|
+
j(t.dirtyFields, q) ? ce(x, q, j(i, q)) : Y(q, j(x, q));
|
|
778
2330
|
else {
|
|
779
|
-
if (
|
|
780
|
-
for (const
|
|
781
|
-
const
|
|
782
|
-
if (
|
|
783
|
-
const
|
|
784
|
-
if (
|
|
785
|
-
const
|
|
786
|
-
if (
|
|
787
|
-
|
|
2331
|
+
if (kt && ge(n))
|
|
2332
|
+
for (const q of k.mount) {
|
|
2333
|
+
const re = j(l, q);
|
|
2334
|
+
if (re && re._f) {
|
|
2335
|
+
const fe = Array.isArray(re._f.refs) ? re._f.refs[0] : re._f.ref;
|
|
2336
|
+
if (Ge(fe)) {
|
|
2337
|
+
const Ee = fe.closest("form");
|
|
2338
|
+
if (Ee) {
|
|
2339
|
+
Ee.reset();
|
|
788
2340
|
break;
|
|
789
2341
|
}
|
|
790
2342
|
}
|
|
791
2343
|
}
|
|
792
2344
|
}
|
|
793
|
-
|
|
2345
|
+
l = {};
|
|
794
2346
|
}
|
|
795
|
-
|
|
796
|
-
values: { ...
|
|
797
|
-
}),
|
|
798
|
-
values: { ...
|
|
2347
|
+
i = e.shouldUnregister ? s.keepDefaultValues ? Oe(f) : {} : Oe(x), D.array.next({
|
|
2348
|
+
values: { ...x }
|
|
2349
|
+
}), D.values.next({
|
|
2350
|
+
values: { ...x }
|
|
799
2351
|
});
|
|
800
2352
|
}
|
|
801
|
-
|
|
802
|
-
mount:
|
|
2353
|
+
k = {
|
|
2354
|
+
mount: s.keepDirtyValues ? k.mount : /* @__PURE__ */ new Set(),
|
|
803
2355
|
unMount: /* @__PURE__ */ new Set(),
|
|
804
2356
|
array: /* @__PURE__ */ new Set(),
|
|
805
2357
|
watch: /* @__PURE__ */ new Set(),
|
|
806
2358
|
watchAll: !1,
|
|
807
2359
|
focus: ""
|
|
808
|
-
},
|
|
809
|
-
submitCount:
|
|
810
|
-
isDirty:
|
|
811
|
-
isSubmitted:
|
|
812
|
-
dirtyFields:
|
|
813
|
-
touchedFields:
|
|
814
|
-
errors:
|
|
815
|
-
isSubmitSuccessful:
|
|
2360
|
+
}, P.mount = !L.isValid || !!s.keepIsValid || !!s.keepDirtyValues, P.watch = !!e.shouldUnregister, D.state.next({
|
|
2361
|
+
submitCount: s.keepSubmitCount ? t.submitCount : 0,
|
|
2362
|
+
isDirty: w ? !1 : s.keepDirty ? t.isDirty : !!(s.keepDefaultValues && !Me(n, f)),
|
|
2363
|
+
isSubmitted: s.keepIsSubmitted ? t.isSubmitted : !1,
|
|
2364
|
+
dirtyFields: w ? {} : s.keepDirtyValues ? s.keepDefaultValues && i ? Ze(f, i) : t.dirtyFields : s.keepDefaultValues && n ? Ze(f, n) : s.keepDirty ? t.dirtyFields : {},
|
|
2365
|
+
touchedFields: s.keepTouched ? t.touchedFields : {},
|
|
2366
|
+
errors: s.keepErrors ? t.errors : {},
|
|
2367
|
+
isSubmitSuccessful: s.keepIsSubmitSuccessful ? t.isSubmitSuccessful : !1,
|
|
816
2368
|
isSubmitting: !1
|
|
817
2369
|
});
|
|
818
|
-
},
|
|
2370
|
+
}, N = (n, s) => I(De(n) ? n(i) : n, s);
|
|
819
2371
|
return {
|
|
820
2372
|
control: {
|
|
821
|
-
register:
|
|
822
|
-
unregister:
|
|
823
|
-
getFieldState:
|
|
824
|
-
handleSubmit:
|
|
825
|
-
setError:
|
|
826
|
-
_executeSchema:
|
|
827
|
-
_getWatch:
|
|
828
|
-
_getDirty:
|
|
829
|
-
_updateValid:
|
|
830
|
-
_removeUnmounted:
|
|
831
|
-
_updateFieldArray:
|
|
832
|
-
_updateDisabledField:
|
|
833
|
-
_getFieldArray:
|
|
834
|
-
_reset:
|
|
835
|
-
_resetDefaultValues: () =>
|
|
836
|
-
|
|
2373
|
+
register: F,
|
|
2374
|
+
unregister: y,
|
|
2375
|
+
getFieldState: v,
|
|
2376
|
+
handleSubmit: z,
|
|
2377
|
+
setError: a,
|
|
2378
|
+
_executeSchema: m,
|
|
2379
|
+
_getWatch: B,
|
|
2380
|
+
_getDirty: O,
|
|
2381
|
+
_updateValid: K,
|
|
2382
|
+
_removeUnmounted: W,
|
|
2383
|
+
_updateFieldArray: Z,
|
|
2384
|
+
_updateDisabledField: p,
|
|
2385
|
+
_getFieldArray: U,
|
|
2386
|
+
_reset: I,
|
|
2387
|
+
_resetDefaultValues: () => De(r.defaultValues) && r.defaultValues().then((n) => {
|
|
2388
|
+
N(n, r.resetOptions), D.state.next({
|
|
837
2389
|
isLoading: !1
|
|
838
2390
|
});
|
|
839
2391
|
}),
|
|
840
|
-
_updateFormState: (
|
|
841
|
-
|
|
842
|
-
...
|
|
843
|
-
...
|
|
2392
|
+
_updateFormState: (n) => {
|
|
2393
|
+
t = {
|
|
2394
|
+
...t,
|
|
2395
|
+
...n
|
|
844
2396
|
};
|
|
845
2397
|
},
|
|
846
|
-
_disableForm:
|
|
847
|
-
_subjects:
|
|
848
|
-
_proxyFormState:
|
|
849
|
-
_setErrors:
|
|
2398
|
+
_disableForm: T,
|
|
2399
|
+
_subjects: D,
|
|
2400
|
+
_proxyFormState: L,
|
|
2401
|
+
_setErrors: ee,
|
|
850
2402
|
get _fields() {
|
|
851
|
-
return
|
|
2403
|
+
return l;
|
|
852
2404
|
},
|
|
853
2405
|
get _formValues() {
|
|
854
|
-
return
|
|
2406
|
+
return i;
|
|
855
2407
|
},
|
|
856
2408
|
get _state() {
|
|
857
|
-
return
|
|
2409
|
+
return P;
|
|
858
2410
|
},
|
|
859
|
-
set _state(
|
|
860
|
-
|
|
2411
|
+
set _state(n) {
|
|
2412
|
+
P = n;
|
|
861
2413
|
},
|
|
862
2414
|
get _defaultValues() {
|
|
863
|
-
return
|
|
2415
|
+
return f;
|
|
864
2416
|
},
|
|
865
2417
|
get _names() {
|
|
866
|
-
return
|
|
2418
|
+
return k;
|
|
867
2419
|
},
|
|
868
|
-
set _names(
|
|
869
|
-
|
|
2420
|
+
set _names(n) {
|
|
2421
|
+
k = n;
|
|
870
2422
|
},
|
|
871
2423
|
get _formState() {
|
|
872
|
-
return
|
|
2424
|
+
return t;
|
|
873
2425
|
},
|
|
874
|
-
set _formState(
|
|
875
|
-
|
|
2426
|
+
set _formState(n) {
|
|
2427
|
+
t = n;
|
|
876
2428
|
},
|
|
877
2429
|
get _options() {
|
|
878
|
-
return
|
|
2430
|
+
return r;
|
|
879
2431
|
},
|
|
880
|
-
set _options(
|
|
881
|
-
|
|
882
|
-
...
|
|
883
|
-
...
|
|
2432
|
+
set _options(n) {
|
|
2433
|
+
r = {
|
|
2434
|
+
...r,
|
|
2435
|
+
...n
|
|
884
2436
|
};
|
|
885
2437
|
}
|
|
886
2438
|
},
|
|
887
|
-
trigger:
|
|
888
|
-
register:
|
|
889
|
-
handleSubmit:
|
|
890
|
-
watch:
|
|
891
|
-
setValue:
|
|
892
|
-
getValues:
|
|
893
|
-
reset:
|
|
894
|
-
resetField:
|
|
895
|
-
clearErrors:
|
|
896
|
-
unregister:
|
|
897
|
-
setError:
|
|
898
|
-
setFocus: (
|
|
899
|
-
const
|
|
900
|
-
if (
|
|
901
|
-
const
|
|
902
|
-
|
|
2439
|
+
trigger: g,
|
|
2440
|
+
register: F,
|
|
2441
|
+
handleSubmit: z,
|
|
2442
|
+
watch: c,
|
|
2443
|
+
setValue: Y,
|
|
2444
|
+
getValues: _,
|
|
2445
|
+
reset: N,
|
|
2446
|
+
resetField: h,
|
|
2447
|
+
clearErrors: u,
|
|
2448
|
+
unregister: y,
|
|
2449
|
+
setError: a,
|
|
2450
|
+
setFocus: (n, s = {}) => {
|
|
2451
|
+
const d = j(l, n), R = d && d._f;
|
|
2452
|
+
if (R) {
|
|
2453
|
+
const w = R.refs ? R.refs[0] : R.ref;
|
|
2454
|
+
w.focus && (w.focus(), s.shouldSelect && w.select());
|
|
903
2455
|
}
|
|
904
2456
|
},
|
|
905
|
-
getFieldState:
|
|
2457
|
+
getFieldState: v
|
|
906
2458
|
};
|
|
907
2459
|
}
|
|
908
|
-
function
|
|
909
|
-
const
|
|
2460
|
+
function mn(e = {}) {
|
|
2461
|
+
const r = we.useRef(), t = we.useRef(), [l, f] = we.useState({
|
|
910
2462
|
isDirty: !1,
|
|
911
2463
|
isValidating: !1,
|
|
912
|
-
isLoading:
|
|
2464
|
+
isLoading: De(e.defaultValues),
|
|
913
2465
|
isSubmitted: !1,
|
|
914
2466
|
isSubmitting: !1,
|
|
915
2467
|
isSubmitSuccessful: !1,
|
|
@@ -920,205 +2472,206 @@ function lr(e = {}) {
|
|
|
920
2472
|
validatingFields: {},
|
|
921
2473
|
errors: e.errors || {},
|
|
922
2474
|
disabled: e.disabled || !1,
|
|
923
|
-
defaultValues:
|
|
2475
|
+
defaultValues: De(e.defaultValues) ? void 0 : e.defaultValues
|
|
924
2476
|
});
|
|
925
|
-
|
|
926
|
-
...
|
|
927
|
-
formState:
|
|
2477
|
+
r.current || (r.current = {
|
|
2478
|
+
...pn(e),
|
|
2479
|
+
formState: l
|
|
928
2480
|
});
|
|
929
|
-
const
|
|
930
|
-
return
|
|
931
|
-
subject:
|
|
932
|
-
next: (
|
|
933
|
-
|
|
934
|
-
}
|
|
935
|
-
}),
|
|
936
|
-
if (
|
|
937
|
-
const
|
|
938
|
-
|
|
939
|
-
isDirty:
|
|
2481
|
+
const i = r.current.control;
|
|
2482
|
+
return i._options = e, an({
|
|
2483
|
+
subject: i._subjects.state,
|
|
2484
|
+
next: (P) => {
|
|
2485
|
+
nn(P, i._proxyFormState, i._updateFormState) && f({ ...i._formState });
|
|
2486
|
+
}
|
|
2487
|
+
}), we.useEffect(() => i._disableForm(e.disabled), [i, e.disabled]), we.useEffect(() => {
|
|
2488
|
+
if (i._proxyFormState.isDirty) {
|
|
2489
|
+
const P = i._getDirty();
|
|
2490
|
+
P !== l.isDirty && i._subjects.state.next({
|
|
2491
|
+
isDirty: P
|
|
940
2492
|
});
|
|
941
2493
|
}
|
|
942
|
-
}, [
|
|
943
|
-
e.values && !
|
|
944
|
-
}, [e.values,
|
|
945
|
-
e.errors &&
|
|
946
|
-
}, [e.errors,
|
|
947
|
-
|
|
948
|
-
}),
|
|
949
|
-
e.shouldUnregister &&
|
|
950
|
-
values:
|
|
2494
|
+
}, [i, l.isDirty]), we.useEffect(() => {
|
|
2495
|
+
e.values && !Me(e.values, t.current) ? (i._reset(e.values, i._options.resetOptions), t.current = e.values, f((P) => ({ ...P }))) : i._resetDefaultValues();
|
|
2496
|
+
}, [e.values, i]), we.useEffect(() => {
|
|
2497
|
+
e.errors && i._setErrors(e.errors);
|
|
2498
|
+
}, [e.errors, i]), we.useEffect(() => {
|
|
2499
|
+
i._state.mount || (i._updateValid(), i._state.mount = !0), i._state.watch && (i._state.watch = !1, i._subjects.state.next({ ...i._formState })), i._removeUnmounted();
|
|
2500
|
+
}), we.useEffect(() => {
|
|
2501
|
+
e.shouldUnregister && i._subjects.values.next({
|
|
2502
|
+
values: i._getWatch()
|
|
951
2503
|
});
|
|
952
|
-
}, [e.shouldUnregister,
|
|
2504
|
+
}, [e.shouldUnregister, i]), r.current.formState = rn(l, i), r.current;
|
|
953
2505
|
}
|
|
954
|
-
const
|
|
2506
|
+
const bn = kr.bind(Se), En = "Я принимаю условия Политики обработки и защиты персональных данных, даю согласия на обработку персональных данных", Fn = ({
|
|
955
2507
|
isFormOpen: e,
|
|
956
|
-
setIsFormOpen:
|
|
957
|
-
isNews:
|
|
958
|
-
title:
|
|
959
|
-
isEmail:
|
|
960
|
-
isPhone:
|
|
961
|
-
isTextArea:
|
|
962
|
-
telegramLink:
|
|
963
|
-
isRequiredPhone:
|
|
964
|
-
isRequiredEmail:
|
|
965
|
-
isRequiredPhoneOrEmail:
|
|
966
|
-
textAreaPlaceholder:
|
|
967
|
-
subTitle:
|
|
968
|
-
submitHandler:
|
|
969
|
-
modalWidth:
|
|
970
|
-
rowsTextArea:
|
|
971
|
-
advCheckBox:
|
|
972
|
-
isAdvCheckBox:
|
|
2508
|
+
setIsFormOpen: r,
|
|
2509
|
+
isNews: t,
|
|
2510
|
+
title: l,
|
|
2511
|
+
isEmail: f,
|
|
2512
|
+
isPhone: i,
|
|
2513
|
+
isTextArea: P,
|
|
2514
|
+
telegramLink: k = "https://t.me/stone_developer",
|
|
2515
|
+
isRequiredPhone: X = !0,
|
|
2516
|
+
isRequiredEmail: H = !1,
|
|
2517
|
+
isRequiredPhoneOrEmail: L,
|
|
2518
|
+
textAreaPlaceholder: D,
|
|
2519
|
+
subTitle: ie,
|
|
2520
|
+
submitHandler: te,
|
|
2521
|
+
modalWidth: ne = "442px",
|
|
2522
|
+
rowsTextArea: Q = 2,
|
|
2523
|
+
advCheckBox: K = { text: En, isRequired: !0 },
|
|
2524
|
+
isAdvCheckBox: ue,
|
|
2525
|
+
addTitleClassName: Z
|
|
973
2526
|
}) => {
|
|
974
2527
|
const {
|
|
975
|
-
register:
|
|
976
|
-
handleSubmit:
|
|
977
|
-
trigger:
|
|
978
|
-
reset:
|
|
979
|
-
watch:
|
|
980
|
-
formState: { errors:
|
|
981
|
-
} =
|
|
982
|
-
required:
|
|
983
|
-
pattern: { value:
|
|
984
|
-
onBlur: () =>
|
|
985
|
-
}), { isMobile:
|
|
986
|
-
G
|
|
2528
|
+
register: J,
|
|
2529
|
+
handleSubmit: ee,
|
|
2530
|
+
trigger: o,
|
|
2531
|
+
reset: E,
|
|
2532
|
+
watch: b,
|
|
2533
|
+
formState: { errors: m }
|
|
2534
|
+
} = mn(), S = !!b("email"), { onChange: V, onBlur: W, ...O } = J("phone", {
|
|
2535
|
+
required: H || X || L && !S,
|
|
2536
|
+
pattern: { value: xr, message: "" },
|
|
2537
|
+
onBlur: () => o("phone")
|
|
2538
|
+
}), { isMobile: B, currentClientWidth: U } = Ar(), M = b("personalCheckBox"), A = b("advCheckBox"), Y = (G) => {
|
|
2539
|
+
te(G), E();
|
|
987
2540
|
};
|
|
988
|
-
return
|
|
989
|
-
|
|
2541
|
+
return U ? /* @__PURE__ */ ye(
|
|
2542
|
+
Sr,
|
|
990
2543
|
{
|
|
991
2544
|
isOpen: e,
|
|
992
|
-
emitIsOpen: () =>
|
|
993
|
-
additionalClass:
|
|
2545
|
+
emitIsOpen: () => r(!1),
|
|
2546
|
+
additionalClass: Se.modal,
|
|
994
2547
|
opacity: 0.7,
|
|
995
2548
|
isTransparentBack: !0,
|
|
996
|
-
additionalClassModalBody:
|
|
997
|
-
children: /* @__PURE__ */
|
|
2549
|
+
additionalClassModalBody: Se.modalBody,
|
|
2550
|
+
children: /* @__PURE__ */ Ve(
|
|
998
2551
|
"div",
|
|
999
2552
|
{
|
|
1000
|
-
className:
|
|
1001
|
-
style: { width:
|
|
2553
|
+
className: Se.root,
|
|
2554
|
+
style: { width: B ? "100%" : ne },
|
|
1002
2555
|
children: [
|
|
1003
|
-
/* @__PURE__ */
|
|
2556
|
+
/* @__PURE__ */ ye(
|
|
1004
2557
|
"div",
|
|
1005
2558
|
{
|
|
1006
|
-
className:
|
|
1007
|
-
dangerouslySetInnerHTML: { __html:
|
|
2559
|
+
className: bn(Se.title, Z),
|
|
2560
|
+
dangerouslySetInnerHTML: { __html: l ?? "Оставить обращение" }
|
|
1008
2561
|
}
|
|
1009
2562
|
),
|
|
1010
|
-
|
|
1011
|
-
/* @__PURE__ */
|
|
2563
|
+
t && /* @__PURE__ */ Ve("div", { className: Se.telegramWrapper, children: [
|
|
2564
|
+
/* @__PURE__ */ ye(
|
|
1012
2565
|
"a",
|
|
1013
2566
|
{
|
|
1014
|
-
className:
|
|
1015
|
-
href:
|
|
2567
|
+
className: Se.telegramLink,
|
|
2568
|
+
href: k,
|
|
1016
2569
|
target: "_blank",
|
|
1017
|
-
children: /* @__PURE__ */
|
|
1018
|
-
/* @__PURE__ */
|
|
1019
|
-
/* @__PURE__ */
|
|
2570
|
+
children: /* @__PURE__ */ Ve("div", { className: Se.telegram, children: [
|
|
2571
|
+
/* @__PURE__ */ ye("div", { children: "Подписаться в Telegram" }),
|
|
2572
|
+
/* @__PURE__ */ ye(Rt, { name: "telegram" })
|
|
1020
2573
|
] })
|
|
1021
2574
|
}
|
|
1022
2575
|
),
|
|
1023
|
-
/* @__PURE__ */
|
|
2576
|
+
/* @__PURE__ */ ye("div", { className: Se.orText, children: "или" })
|
|
1024
2577
|
] }),
|
|
1025
|
-
!
|
|
2578
|
+
!t && /* @__PURE__ */ ye(
|
|
1026
2579
|
"div",
|
|
1027
2580
|
{
|
|
1028
|
-
className:
|
|
2581
|
+
className: Se.description,
|
|
1029
2582
|
dangerouslySetInnerHTML: {
|
|
1030
|
-
__html:
|
|
2583
|
+
__html: ie && !t ? "Оставьте номер телефона для получения консультации" : `${/* @__PURE__ */ ye("div", { children: "привет" })}`
|
|
1031
2584
|
}
|
|
1032
2585
|
}
|
|
1033
2586
|
),
|
|
1034
|
-
/* @__PURE__ */
|
|
1035
|
-
/* @__PURE__ */
|
|
1036
|
-
/* @__PURE__ */
|
|
1037
|
-
|
|
2587
|
+
/* @__PURE__ */ Ve("form", { onSubmit: ee(Y), children: [
|
|
2588
|
+
/* @__PURE__ */ Ve(Pr, { className: Se.inputWrapper, children: [
|
|
2589
|
+
/* @__PURE__ */ ye(
|
|
2590
|
+
st,
|
|
1038
2591
|
{
|
|
1039
2592
|
width: "full",
|
|
1040
2593
|
size_s: "small",
|
|
1041
2594
|
variant: "light",
|
|
1042
2595
|
placeholder: "Введите имя",
|
|
1043
2596
|
"data-testid": "modal_name",
|
|
1044
|
-
...
|
|
1045
|
-
error: !!
|
|
2597
|
+
...J("name", { required: !0, pattern: wr }),
|
|
2598
|
+
error: !!m.name
|
|
1046
2599
|
}
|
|
1047
2600
|
),
|
|
1048
|
-
|
|
1049
|
-
|
|
2601
|
+
i && /* @__PURE__ */ ye(
|
|
2602
|
+
Br,
|
|
1050
2603
|
{
|
|
1051
2604
|
inputMode: "numeric",
|
|
1052
2605
|
name: "phone",
|
|
1053
2606
|
mask: "+7 (999) 999-99-99",
|
|
1054
|
-
onChange:
|
|
2607
|
+
onChange: V,
|
|
1055
2608
|
placeholder: "+7 (- - -) - - - - - - -",
|
|
1056
|
-
onBlur:
|
|
1057
|
-
children: /* @__PURE__ */
|
|
1058
|
-
|
|
2609
|
+
onBlur: W,
|
|
2610
|
+
children: /* @__PURE__ */ ye(
|
|
2611
|
+
st,
|
|
1059
2612
|
{
|
|
1060
2613
|
width: "full",
|
|
1061
2614
|
"data-testid": "phone_modal",
|
|
1062
2615
|
type: "tel",
|
|
1063
2616
|
size_s: "small",
|
|
1064
2617
|
variant: "light",
|
|
1065
|
-
...
|
|
1066
|
-
...
|
|
1067
|
-
error: !!
|
|
2618
|
+
...O,
|
|
2619
|
+
...J("phone"),
|
|
2620
|
+
error: !!m.phone
|
|
1068
2621
|
}
|
|
1069
2622
|
)
|
|
1070
2623
|
}
|
|
1071
2624
|
),
|
|
1072
|
-
|
|
1073
|
-
|
|
2625
|
+
f && /* @__PURE__ */ ye(
|
|
2626
|
+
st,
|
|
1074
2627
|
{
|
|
1075
2628
|
width: "full",
|
|
1076
2629
|
size_s: "small",
|
|
1077
2630
|
variant: "light",
|
|
1078
2631
|
placeholder: "Введите email",
|
|
1079
2632
|
"data-testid": "modal_email",
|
|
1080
|
-
...
|
|
1081
|
-
required:
|
|
1082
|
-
pattern:
|
|
2633
|
+
...J("email", {
|
|
2634
|
+
required: H || L && !S,
|
|
2635
|
+
pattern: Or
|
|
1083
2636
|
}),
|
|
1084
|
-
error: !!
|
|
2637
|
+
error: !!m.email
|
|
1085
2638
|
}
|
|
1086
2639
|
),
|
|
1087
|
-
|
|
1088
|
-
|
|
2640
|
+
P && /* @__PURE__ */ ye(
|
|
2641
|
+
Cr,
|
|
1089
2642
|
{
|
|
1090
2643
|
"data-testid": "modal_textarea",
|
|
1091
|
-
placeholder:
|
|
1092
|
-
rows:
|
|
2644
|
+
placeholder: D,
|
|
2645
|
+
rows: Q,
|
|
1093
2646
|
width: "full",
|
|
1094
|
-
...
|
|
2647
|
+
...J("textarea")
|
|
1095
2648
|
}
|
|
1096
2649
|
),
|
|
1097
|
-
|
|
1098
|
-
|
|
2650
|
+
K && !t && ue && /* @__PURE__ */ ye(
|
|
2651
|
+
Vt,
|
|
1099
2652
|
{
|
|
1100
2653
|
"data-testid": "modal_advCheckBox",
|
|
1101
|
-
isChecked:
|
|
1102
|
-
error: !!
|
|
1103
|
-
text:
|
|
1104
|
-
...
|
|
2654
|
+
isChecked: A,
|
|
2655
|
+
error: !!m.advCheckBox,
|
|
2656
|
+
text: K.text,
|
|
2657
|
+
...J("advCheckBox", { required: K == null ? void 0 : K.isRequired })
|
|
1105
2658
|
}
|
|
1106
2659
|
),
|
|
1107
|
-
/* @__PURE__ */
|
|
1108
|
-
|
|
2660
|
+
/* @__PURE__ */ Ve(
|
|
2661
|
+
Vt,
|
|
1109
2662
|
{
|
|
1110
2663
|
"data-testid": "modal_personalCheckBox",
|
|
1111
|
-
isChecked:
|
|
1112
|
-
error: !!
|
|
1113
|
-
...
|
|
2664
|
+
isChecked: M,
|
|
2665
|
+
error: !!m.personalCheckBox,
|
|
2666
|
+
...J("personalCheckBox", { required: !t }),
|
|
1114
2667
|
children: [
|
|
1115
|
-
|
|
2668
|
+
t && /* @__PURE__ */ Ve("div", { children: [
|
|
1116
2669
|
"Согласен(-на)",
|
|
1117
2670
|
" ",
|
|
1118
|
-
/* @__PURE__ */
|
|
2671
|
+
/* @__PURE__ */ ye(
|
|
1119
2672
|
"a",
|
|
1120
2673
|
{
|
|
1121
|
-
className:
|
|
2674
|
+
className: Se.linkPolicy,
|
|
1122
2675
|
href: "/documents/soglasie-na-rassylki",
|
|
1123
2676
|
children: "получать новости, информацию по сделке и рекламу"
|
|
1124
2677
|
}
|
|
@@ -1126,13 +2679,13 @@ const ar = "Я принимаю условия Политики обработк
|
|
|
1126
2679
|
" ",
|
|
1127
2680
|
"от Stone"
|
|
1128
2681
|
] }),
|
|
1129
|
-
!
|
|
2682
|
+
!t && /* @__PURE__ */ Ve("div", { children: [
|
|
1130
2683
|
"Я принимаю условия",
|
|
1131
2684
|
" ",
|
|
1132
|
-
/* @__PURE__ */
|
|
2685
|
+
/* @__PURE__ */ ye(
|
|
1133
2686
|
"a",
|
|
1134
2687
|
{
|
|
1135
|
-
className:
|
|
2688
|
+
className: Se.linkPolicy,
|
|
1136
2689
|
href: "/documents/docs",
|
|
1137
2690
|
children: "Политики обработки и защиты персональных данных"
|
|
1138
2691
|
}
|
|
@@ -1142,8 +2695,8 @@ const ar = "Я принимаю условия Политики обработк
|
|
|
1142
2695
|
]
|
|
1143
2696
|
}
|
|
1144
2697
|
),
|
|
1145
|
-
/* @__PURE__ */
|
|
1146
|
-
|
|
2698
|
+
/* @__PURE__ */ ye(
|
|
2699
|
+
Tt,
|
|
1147
2700
|
{
|
|
1148
2701
|
"data-testid": "modal_submit",
|
|
1149
2702
|
variant: "blue",
|
|
@@ -1151,23 +2704,23 @@ const ar = "Я принимаю условия Политики обработк
|
|
|
1151
2704
|
type: "submit",
|
|
1152
2705
|
size: "large",
|
|
1153
2706
|
as: "button",
|
|
1154
|
-
additionalClass:
|
|
1155
|
-
disabled: !!
|
|
2707
|
+
additionalClass: Se.modalBtn,
|
|
2708
|
+
disabled: !!m.name || !!m.phone && X || !!m.email && H || !!m.advCheckBox && (K == null ? void 0 : K.isRequired) || !!m.personalCheckBox && !t,
|
|
1156
2709
|
children: "Отправить запрос"
|
|
1157
2710
|
}
|
|
1158
2711
|
)
|
|
1159
2712
|
] }),
|
|
1160
|
-
/* @__PURE__ */
|
|
1161
|
-
|
|
2713
|
+
/* @__PURE__ */ ye(
|
|
2714
|
+
Tt,
|
|
1162
2715
|
{
|
|
1163
|
-
additionalClass:
|
|
1164
|
-
onClick: () =>
|
|
2716
|
+
additionalClass: Se.btn,
|
|
2717
|
+
onClick: () => r(!1),
|
|
1165
2718
|
as: "button",
|
|
1166
2719
|
variant: "gray",
|
|
1167
2720
|
type: "button",
|
|
1168
2721
|
size: "small",
|
|
1169
|
-
children: /* @__PURE__ */
|
|
1170
|
-
|
|
2722
|
+
children: /* @__PURE__ */ ye(
|
|
2723
|
+
Rt,
|
|
1171
2724
|
{
|
|
1172
2725
|
name: "close",
|
|
1173
2726
|
size: "16",
|
|
@@ -1184,5 +2737,5 @@ const ar = "Я принимаю условия Политики обработк
|
|
|
1184
2737
|
) : null;
|
|
1185
2738
|
};
|
|
1186
2739
|
export {
|
|
1187
|
-
|
|
2740
|
+
Fn as ModalForm
|
|
1188
2741
|
};
|