solid-hook-form 1.4.1 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -1,141 +1,1407 @@
1
- import { createSignal as d, createContext as H, createComponent as T, useContext as q } from "solid-js";
2
- const S = (e) => {
3
- const n = e.target;
4
- return n instanceof HTMLSelectElement ? n.value : n instanceof HTMLInputElement && n.type === "checkbox" ? n.checked : n instanceof HTMLInputElement && n.type === "file" ? [...n.files || []] : n.value;
5
- }, y = (e, n) => {
6
- if (e instanceof HTMLSelectElement) {
7
- e.value = n;
1
+ import { createSignal as _e, createContext as Qe, createComponent as Ke, useContext as Xe } from "solid-js";
2
+ const Ze = (n) => {
3
+ const s = n.target;
4
+ return s instanceof HTMLSelectElement ? s.value : s instanceof HTMLInputElement && s.type === "checkbox" ? s.checked : s instanceof HTMLInputElement && s.type === "file" ? [...s.files || []] : s.value;
5
+ }, ge = (n, s) => {
6
+ if (n instanceof HTMLSelectElement) {
7
+ n.value = s;
8
8
  return;
9
9
  }
10
- if (e instanceof HTMLInputElement && e.type === "checkbox") {
11
- e.checked = n;
10
+ if (n instanceof HTMLInputElement && n.type === "checkbox") {
11
+ n.checked = s;
12
12
  return;
13
13
  }
14
- e instanceof HTMLInputElement && e.type === "file" || (e.value = n);
15
- }, p = (e) => e instanceof RegExp || typeof e == "string" || typeof e == "number" ? e : e.value, g = (e) => typeof e == "string" ? e : typeof e.message == "string" ? e.message : "", N = (e, n, r = {}) => {
16
- const i = e[n];
17
- if (r.required && !i)
18
- return { type: "required", message: g(r.required) };
19
- if (r.min && Number(i) < Number(p(r.min)))
20
- return { type: "min", message: g(r.min) };
21
- if (r.max && Number(i) > Number(p(r.max)))
22
- return { type: "max", message: g(r.max) };
23
- if (r.minLength && i.length < p(r.minLength))
24
- return { type: "minLength", message: g(r.minLength) };
25
- if (r.maxLength && i.length > p(r.maxLength))
26
- return { type: "maxLength", message: g(r.maxLength) };
27
- if (r.pattern && !p(r.pattern).test(i))
28
- return { type: "pattern", message: g(r.pattern) };
29
- if (r.validate) {
30
- const c = r.validate(i, e);
31
- if (c === !1)
14
+ n instanceof HTMLInputElement && n.type === "file" || (n.value = s);
15
+ };
16
+ function Je(n) {
17
+ return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
18
+ }
19
+ var ye = { exports: {} }, l = {};
20
+ /**
21
+ * @license React
22
+ * react.production.js
23
+ *
24
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
25
+ *
26
+ * This source code is licensed under the MIT license found in the
27
+ * LICENSE file in the root directory of this source tree.
28
+ */
29
+ var Me;
30
+ function et() {
31
+ if (Me) return l;
32
+ Me = 1;
33
+ var n = Symbol.for("react.transitional.element"), s = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), N = Symbol.for("react.consumer"), M = Symbol.for("react.context"), P = Symbol.for("react.forward_ref"), j = Symbol.for("react.suspense"), L = Symbol.for("react.memo"), U = Symbol.for("react.lazy"), G = Symbol.iterator;
34
+ function Z(t) {
35
+ return t === null || typeof t != "object" ? null : (t = G && t[G] || t["@@iterator"], typeof t == "function" ? t : null);
36
+ }
37
+ var B = {
38
+ isMounted: function() {
39
+ return !1;
40
+ },
41
+ enqueueForceUpdate: function() {
42
+ },
43
+ enqueueReplaceState: function() {
44
+ },
45
+ enqueueSetState: function() {
46
+ }
47
+ }, V = Object.assign, Q = {};
48
+ function H(t, o, f) {
49
+ this.props = t, this.context = o, this.refs = Q, this.updater = f || B;
50
+ }
51
+ H.prototype.isReactComponent = {}, H.prototype.setState = function(t, o) {
52
+ if (typeof t != "object" && typeof t != "function" && t != null)
53
+ throw Error(
54
+ "takes an object of state variables to update or a function which returns an object of state variables."
55
+ );
56
+ this.updater.enqueueSetState(this, t, o, "setState");
57
+ }, H.prototype.forceUpdate = function(t) {
58
+ this.updater.enqueueForceUpdate(this, t, "forceUpdate");
59
+ };
60
+ function W() {
61
+ }
62
+ W.prototype = H.prototype;
63
+ function K(t, o, f) {
64
+ this.props = t, this.context = o, this.refs = Q, this.updater = f || B;
65
+ }
66
+ var I = K.prototype = new W();
67
+ I.constructor = K, V(I, H.prototype), I.isPureReactComponent = !0;
68
+ var J = Array.isArray, R = { H: null, A: null, T: null, S: null, V: null }, z = Object.prototype.hasOwnProperty;
69
+ function X(t, o, f, c, g, S) {
70
+ return f = S.ref, {
71
+ $$typeof: n,
72
+ type: t,
73
+ key: o,
74
+ ref: f !== void 0 ? f : null,
75
+ props: S
76
+ };
77
+ }
78
+ function Y(t, o) {
79
+ return X(
80
+ t.type,
81
+ o,
82
+ void 0,
83
+ void 0,
84
+ void 0,
85
+ t.props
86
+ );
87
+ }
88
+ function F(t) {
89
+ return typeof t == "object" && t !== null && t.$$typeof === n;
90
+ }
91
+ function ae(t) {
92
+ var o = { "=": "=0", ":": "=2" };
93
+ return "$" + t.replace(/[=:]/g, function(f) {
94
+ return o[f];
95
+ });
96
+ }
97
+ var C = /\/+/g;
98
+ function p(t, o) {
99
+ return typeof t == "object" && t !== null && t.key != null ? ae("" + t.key) : o.toString(36);
100
+ }
101
+ function O() {
102
+ }
103
+ function T(t) {
104
+ switch (t.status) {
105
+ case "fulfilled":
106
+ return t.value;
107
+ case "rejected":
108
+ throw t.reason;
109
+ default:
110
+ switch (typeof t.status == "string" ? t.then(O, O) : (t.status = "pending", t.then(
111
+ function(o) {
112
+ t.status === "pending" && (t.status = "fulfilled", t.value = o);
113
+ },
114
+ function(o) {
115
+ t.status === "pending" && (t.status = "rejected", t.reason = o);
116
+ }
117
+ )), t.status) {
118
+ case "fulfilled":
119
+ return t.value;
120
+ case "rejected":
121
+ throw t.reason;
122
+ }
123
+ }
124
+ throw t;
125
+ }
126
+ function k(t, o, f, c, g) {
127
+ var S = typeof t;
128
+ (S === "undefined" || S === "boolean") && (t = null);
129
+ var m = !1;
130
+ if (t === null) m = !0;
131
+ else
132
+ switch (S) {
133
+ case "bigint":
134
+ case "string":
135
+ case "number":
136
+ m = !0;
137
+ break;
138
+ case "object":
139
+ switch (t.$$typeof) {
140
+ case n:
141
+ case s:
142
+ m = !0;
143
+ break;
144
+ case U:
145
+ return m = t._init, k(
146
+ m(t._payload),
147
+ o,
148
+ f,
149
+ c,
150
+ g
151
+ );
152
+ }
153
+ }
154
+ if (m)
155
+ return g = g(t), m = c === "" ? "." + p(t, 0) : c, J(g) ? (f = "", m != null && (f = m.replace(C, "$&/") + "/"), k(g, o, f, "", function(te) {
156
+ return te;
157
+ })) : g != null && (F(g) && (g = Y(
158
+ g,
159
+ f + (g.key == null || t && t.key === g.key ? "" : ("" + g.key).replace(
160
+ C,
161
+ "$&/"
162
+ ) + "/") + m
163
+ )), o.push(g)), 1;
164
+ m = 0;
165
+ var q = c === "" ? "." : c + ":";
166
+ if (J(t))
167
+ for (var A = 0; A < t.length; A++)
168
+ c = t[A], S = q + p(c, A), m += k(
169
+ c,
170
+ o,
171
+ f,
172
+ S,
173
+ g
174
+ );
175
+ else if (A = Z(t), typeof A == "function")
176
+ for (t = A.call(t), A = 0; !(c = t.next()).done; )
177
+ c = c.value, S = q + p(c, A++), m += k(
178
+ c,
179
+ o,
180
+ f,
181
+ S,
182
+ g
183
+ );
184
+ else if (S === "object") {
185
+ if (typeof t.then == "function")
186
+ return k(
187
+ T(t),
188
+ o,
189
+ f,
190
+ c,
191
+ g
192
+ );
193
+ throw o = String(t), Error(
194
+ "Objects are not valid as a React child (found: " + (o === "[object Object]" ? "object with keys {" + Object.keys(t).join(", ") + "}" : o) + "). If you meant to render a collection of children, use an array instead."
195
+ );
196
+ }
197
+ return m;
198
+ }
199
+ function $(t, o, f) {
200
+ if (t == null) return t;
201
+ var c = [], g = 0;
202
+ return k(t, c, "", "", function(S) {
203
+ return o.call(f, S, g++);
204
+ }), c;
205
+ }
206
+ function oe(t) {
207
+ if (t._status === -1) {
208
+ var o = t._result;
209
+ o = o(), o.then(
210
+ function(f) {
211
+ (t._status === 0 || t._status === -1) && (t._status = 1, t._result = f);
212
+ },
213
+ function(f) {
214
+ (t._status === 0 || t._status === -1) && (t._status = 2, t._result = f);
215
+ }
216
+ ), t._status === -1 && (t._status = 0, t._result = o);
217
+ }
218
+ if (t._status === 1) return t._result.default;
219
+ throw t._result;
220
+ }
221
+ var ee = typeof reportError == "function" ? reportError : function(t) {
222
+ if (typeof window == "object" && typeof window.ErrorEvent == "function") {
223
+ var o = new window.ErrorEvent("error", {
224
+ bubbles: !0,
225
+ cancelable: !0,
226
+ message: typeof t == "object" && t !== null && typeof t.message == "string" ? String(t.message) : String(t),
227
+ error: t
228
+ });
229
+ if (!window.dispatchEvent(o)) return;
230
+ } else if (typeof process == "object" && typeof process.emit == "function") {
231
+ process.emit("uncaughtException", t);
232
+ return;
233
+ }
234
+ console.error(t);
235
+ };
236
+ function ce() {
237
+ }
238
+ return l.Children = {
239
+ map: $,
240
+ forEach: function(t, o, f) {
241
+ $(
242
+ t,
243
+ function() {
244
+ o.apply(this, arguments);
245
+ },
246
+ f
247
+ );
248
+ },
249
+ count: function(t) {
250
+ var o = 0;
251
+ return $(t, function() {
252
+ o++;
253
+ }), o;
254
+ },
255
+ toArray: function(t) {
256
+ return $(t, function(o) {
257
+ return o;
258
+ }) || [];
259
+ },
260
+ only: function(t) {
261
+ if (!F(t))
262
+ throw Error(
263
+ "React.Children.only expected to receive a single React element child."
264
+ );
265
+ return t;
266
+ }
267
+ }, l.Component = H, l.Fragment = _, l.Profiler = w, l.PureComponent = K, l.StrictMode = E, l.Suspense = j, l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = R, l.__COMPILER_RUNTIME = {
268
+ __proto__: null,
269
+ c: function(t) {
270
+ return R.H.useMemoCache(t);
271
+ }
272
+ }, l.cache = function(t) {
273
+ return function() {
274
+ return t.apply(null, arguments);
275
+ };
276
+ }, l.cloneElement = function(t, o, f) {
277
+ if (t == null)
278
+ throw Error(
279
+ "The argument must be a React element, but you passed " + t + "."
280
+ );
281
+ var c = V({}, t.props), g = t.key, S = void 0;
282
+ if (o != null)
283
+ for (m in o.ref !== void 0 && (S = void 0), o.key !== void 0 && (g = "" + o.key), o)
284
+ !z.call(o, m) || m === "key" || m === "__self" || m === "__source" || m === "ref" && o.ref === void 0 || (c[m] = o[m]);
285
+ var m = arguments.length - 2;
286
+ if (m === 1) c.children = f;
287
+ else if (1 < m) {
288
+ for (var q = Array(m), A = 0; A < m; A++)
289
+ q[A] = arguments[A + 2];
290
+ c.children = q;
291
+ }
292
+ return X(t.type, g, void 0, void 0, S, c);
293
+ }, l.createContext = function(t) {
294
+ return t = {
295
+ $$typeof: M,
296
+ _currentValue: t,
297
+ _currentValue2: t,
298
+ _threadCount: 0,
299
+ Provider: null,
300
+ Consumer: null
301
+ }, t.Provider = t, t.Consumer = {
302
+ $$typeof: N,
303
+ _context: t
304
+ }, t;
305
+ }, l.createElement = function(t, o, f) {
306
+ var c, g = {}, S = null;
307
+ if (o != null)
308
+ for (c in o.key !== void 0 && (S = "" + o.key), o)
309
+ z.call(o, c) && c !== "key" && c !== "__self" && c !== "__source" && (g[c] = o[c]);
310
+ var m = arguments.length - 2;
311
+ if (m === 1) g.children = f;
312
+ else if (1 < m) {
313
+ for (var q = Array(m), A = 0; A < m; A++)
314
+ q[A] = arguments[A + 2];
315
+ g.children = q;
316
+ }
317
+ if (t && t.defaultProps)
318
+ for (c in m = t.defaultProps, m)
319
+ g[c] === void 0 && (g[c] = m[c]);
320
+ return X(t, S, void 0, void 0, null, g);
321
+ }, l.createRef = function() {
322
+ return { current: null };
323
+ }, l.forwardRef = function(t) {
324
+ return { $$typeof: P, render: t };
325
+ }, l.isValidElement = F, l.lazy = function(t) {
326
+ return {
327
+ $$typeof: U,
328
+ _payload: { _status: -1, _result: t },
329
+ _init: oe
330
+ };
331
+ }, l.memo = function(t, o) {
332
+ return {
333
+ $$typeof: L,
334
+ type: t,
335
+ compare: o === void 0 ? null : o
336
+ };
337
+ }, l.startTransition = function(t) {
338
+ var o = R.T, f = {};
339
+ R.T = f;
340
+ try {
341
+ var c = t(), g = R.S;
342
+ g !== null && g(f, c), typeof c == "object" && c !== null && typeof c.then == "function" && c.then(ce, ee);
343
+ } catch (S) {
344
+ ee(S);
345
+ } finally {
346
+ R.T = o;
347
+ }
348
+ }, l.unstable_useCacheRefresh = function() {
349
+ return R.H.useCacheRefresh();
350
+ }, l.use = function(t) {
351
+ return R.H.use(t);
352
+ }, l.useActionState = function(t, o, f) {
353
+ return R.H.useActionState(t, o, f);
354
+ }, l.useCallback = function(t, o) {
355
+ return R.H.useCallback(t, o);
356
+ }, l.useContext = function(t) {
357
+ return R.H.useContext(t);
358
+ }, l.useDebugValue = function() {
359
+ }, l.useDeferredValue = function(t, o) {
360
+ return R.H.useDeferredValue(t, o);
361
+ }, l.useEffect = function(t, o, f) {
362
+ var c = R.H;
363
+ if (typeof f == "function")
364
+ throw Error(
365
+ "useEffect CRUD overload is not enabled in this build of React."
366
+ );
367
+ return c.useEffect(t, o);
368
+ }, l.useId = function() {
369
+ return R.H.useId();
370
+ }, l.useImperativeHandle = function(t, o, f) {
371
+ return R.H.useImperativeHandle(t, o, f);
372
+ }, l.useInsertionEffect = function(t, o) {
373
+ return R.H.useInsertionEffect(t, o);
374
+ }, l.useLayoutEffect = function(t, o) {
375
+ return R.H.useLayoutEffect(t, o);
376
+ }, l.useMemo = function(t, o) {
377
+ return R.H.useMemo(t, o);
378
+ }, l.useOptimistic = function(t, o) {
379
+ return R.H.useOptimistic(t, o);
380
+ }, l.useReducer = function(t, o, f) {
381
+ return R.H.useReducer(t, o, f);
382
+ }, l.useRef = function(t) {
383
+ return R.H.useRef(t);
384
+ }, l.useState = function(t) {
385
+ return R.H.useState(t);
386
+ }, l.useSyncExternalStore = function(t, o, f) {
387
+ return R.H.useSyncExternalStore(
388
+ t,
389
+ o,
390
+ f
391
+ );
392
+ }, l.useTransition = function() {
393
+ return R.H.useTransition();
394
+ }, l.version = "19.1.0", l;
395
+ }
396
+ var se = { exports: {} };
397
+ /**
398
+ * @license React
399
+ * react.development.js
400
+ *
401
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
402
+ *
403
+ * This source code is licensed under the MIT license found in the
404
+ * LICENSE file in the root directory of this source tree.
405
+ */
406
+ se.exports;
407
+ var $e;
408
+ function tt() {
409
+ return $e || ($e = 1, function(n, s) {
410
+ process.env.NODE_ENV !== "production" && function() {
411
+ function _(e, r) {
412
+ Object.defineProperty(N.prototype, e, {
413
+ get: function() {
414
+ console.warn(
415
+ "%s(...) is deprecated in plain JavaScript React classes. %s",
416
+ r[0],
417
+ r[1]
418
+ );
419
+ }
420
+ });
421
+ }
422
+ function E(e) {
423
+ return e === null || typeof e != "object" ? null : (e = Ee && e[Ee] || e["@@iterator"], typeof e == "function" ? e : null);
424
+ }
425
+ function w(e, r) {
426
+ e = (e = e.constructor) && (e.displayName || e.name) || "ReactClass";
427
+ var u = e + "." + r;
428
+ we[u] || (console.error(
429
+ "Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",
430
+ r,
431
+ e
432
+ ), we[u] = !0);
433
+ }
434
+ function N(e, r, u) {
435
+ this.props = e, this.context = r, this.refs = he, this.updater = u || Re;
436
+ }
437
+ function M() {
438
+ }
439
+ function P(e, r, u) {
440
+ this.props = e, this.context = r, this.refs = he, this.updater = u || Re;
441
+ }
442
+ function j(e) {
443
+ return "" + e;
444
+ }
445
+ function L(e) {
446
+ try {
447
+ j(e);
448
+ var r = !1;
449
+ } catch {
450
+ r = !0;
451
+ }
452
+ if (r) {
453
+ r = console;
454
+ var u = r.error, i = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
455
+ return u.call(
456
+ r,
457
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
458
+ i
459
+ ), j(e);
460
+ }
461
+ }
462
+ function U(e) {
463
+ if (e == null) return null;
464
+ if (typeof e == "function")
465
+ return e.$$typeof === ze ? null : e.displayName || e.name || null;
466
+ if (typeof e == "string") return e;
467
+ switch (e) {
468
+ case t:
469
+ return "Fragment";
470
+ case f:
471
+ return "Profiler";
472
+ case o:
473
+ return "StrictMode";
474
+ case m:
475
+ return "Suspense";
476
+ case q:
477
+ return "SuspenseList";
478
+ case We:
479
+ return "Activity";
480
+ }
481
+ if (typeof e == "object")
482
+ switch (typeof e.tag == "number" && console.error(
483
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
484
+ ), e.$$typeof) {
485
+ case ce:
486
+ return "Portal";
487
+ case g:
488
+ return (e.displayName || "Context") + ".Provider";
489
+ case c:
490
+ return (e._context.displayName || "Context") + ".Consumer";
491
+ case S:
492
+ var r = e.render;
493
+ return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
494
+ case A:
495
+ return r = e.displayName || null, r !== null ? r : U(e.type) || "Memo";
496
+ case te:
497
+ r = e._payload, e = e._init;
498
+ try {
499
+ return U(e(r));
500
+ } catch {
501
+ }
502
+ }
503
+ return null;
504
+ }
505
+ function G(e) {
506
+ if (e === t) return "<>";
507
+ if (typeof e == "object" && e !== null && e.$$typeof === te)
508
+ return "<...>";
509
+ try {
510
+ var r = U(e);
511
+ return r ? "<" + r + ">" : "<...>";
512
+ } catch {
513
+ return "<...>";
514
+ }
515
+ }
516
+ function Z() {
517
+ var e = h.A;
518
+ return e === null ? null : e.getOwner();
519
+ }
520
+ function B() {
521
+ return Error("react-stack-top-frame");
522
+ }
523
+ function V(e) {
524
+ if (le.call(e, "key")) {
525
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
526
+ if (r && r.isReactWarning) return !1;
527
+ }
528
+ return e.key !== void 0;
529
+ }
530
+ function Q(e, r) {
531
+ function u() {
532
+ Ce || (Ce = !0, console.error(
533
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
534
+ r
535
+ ));
536
+ }
537
+ u.isReactWarning = !0, Object.defineProperty(e, "key", {
538
+ get: u,
539
+ configurable: !0
540
+ });
541
+ }
542
+ function H() {
543
+ var e = U(this.type);
544
+ return Ae[e] || (Ae[e] = !0, console.error(
545
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
546
+ )), e = this.props.ref, e !== void 0 ? e : null;
547
+ }
548
+ function W(e, r, u, i, a, v, d, b) {
549
+ return u = v.ref, e = {
550
+ $$typeof: ee,
551
+ type: e,
552
+ key: r,
553
+ props: v,
554
+ _owner: a
555
+ }, (u !== void 0 ? u : null) !== null ? Object.defineProperty(e, "ref", {
556
+ enumerable: !1,
557
+ get: H
558
+ }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
559
+ configurable: !1,
560
+ enumerable: !1,
561
+ writable: !0,
562
+ value: 0
563
+ }), Object.defineProperty(e, "_debugInfo", {
564
+ configurable: !1,
565
+ enumerable: !1,
566
+ writable: !0,
567
+ value: null
568
+ }), Object.defineProperty(e, "_debugStack", {
569
+ configurable: !1,
570
+ enumerable: !1,
571
+ writable: !0,
572
+ value: d
573
+ }), Object.defineProperty(e, "_debugTask", {
574
+ configurable: !1,
575
+ enumerable: !1,
576
+ writable: !0,
577
+ value: b
578
+ }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
579
+ }
580
+ function K(e, r) {
581
+ return r = W(
582
+ e.type,
583
+ r,
584
+ void 0,
585
+ void 0,
586
+ e._owner,
587
+ e.props,
588
+ e._debugStack,
589
+ e._debugTask
590
+ ), e._store && (r._store.validated = e._store.validated), r;
591
+ }
592
+ function I(e) {
593
+ return typeof e == "object" && e !== null && e.$$typeof === ee;
594
+ }
595
+ function J(e) {
596
+ var r = { "=": "=0", ":": "=2" };
597
+ return "$" + e.replace(/[=:]/g, function(u) {
598
+ return r[u];
599
+ });
600
+ }
601
+ function R(e, r) {
602
+ return typeof e == "object" && e !== null && e.key != null ? (L(e.key), J("" + e.key)) : r.toString(36);
603
+ }
604
+ function z() {
605
+ }
606
+ function X(e) {
607
+ switch (e.status) {
608
+ case "fulfilled":
609
+ return e.value;
610
+ case "rejected":
611
+ throw e.reason;
612
+ default:
613
+ switch (typeof e.status == "string" ? e.then(z, z) : (e.status = "pending", e.then(
614
+ function(r) {
615
+ e.status === "pending" && (e.status = "fulfilled", e.value = r);
616
+ },
617
+ function(r) {
618
+ e.status === "pending" && (e.status = "rejected", e.reason = r);
619
+ }
620
+ )), e.status) {
621
+ case "fulfilled":
622
+ return e.value;
623
+ case "rejected":
624
+ throw e.reason;
625
+ }
626
+ }
627
+ throw e;
628
+ }
629
+ function Y(e, r, u, i, a) {
630
+ var v = typeof e;
631
+ (v === "undefined" || v === "boolean") && (e = null);
632
+ var d = !1;
633
+ if (e === null) d = !0;
634
+ else
635
+ switch (v) {
636
+ case "bigint":
637
+ case "string":
638
+ case "number":
639
+ d = !0;
640
+ break;
641
+ case "object":
642
+ switch (e.$$typeof) {
643
+ case ee:
644
+ case ce:
645
+ d = !0;
646
+ break;
647
+ case te:
648
+ return d = e._init, Y(
649
+ d(e._payload),
650
+ r,
651
+ u,
652
+ i,
653
+ a
654
+ );
655
+ }
656
+ }
657
+ if (d) {
658
+ d = e, a = a(d);
659
+ var b = i === "" ? "." + R(d, 0) : i;
660
+ return be(a) ? (u = "", b != null && (u = b.replace(Pe, "$&/") + "/"), Y(a, r, u, "", function(x) {
661
+ return x;
662
+ })) : a != null && (I(a) && (a.key != null && (d && d.key === a.key || L(a.key)), u = K(
663
+ a,
664
+ u + (a.key == null || d && d.key === a.key ? "" : ("" + a.key).replace(
665
+ Pe,
666
+ "$&/"
667
+ ) + "/") + b
668
+ ), i !== "" && d != null && I(d) && d.key == null && d._store && !d._store.validated && (u._store.validated = 2), a = u), r.push(a)), 1;
669
+ }
670
+ if (d = 0, b = i === "" ? "." : i + ":", be(e))
671
+ for (var y = 0; y < e.length; y++)
672
+ i = e[y], v = b + R(i, y), d += Y(
673
+ i,
674
+ r,
675
+ u,
676
+ v,
677
+ a
678
+ );
679
+ else if (y = E(e), typeof y == "function")
680
+ for (y === e.entries && (ke || console.warn(
681
+ "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
682
+ ), ke = !0), e = y.call(e), y = 0; !(i = e.next()).done; )
683
+ i = i.value, v = b + R(i, y++), d += Y(
684
+ i,
685
+ r,
686
+ u,
687
+ v,
688
+ a
689
+ );
690
+ else if (v === "object") {
691
+ if (typeof e.then == "function")
692
+ return Y(
693
+ X(e),
694
+ r,
695
+ u,
696
+ i,
697
+ a
698
+ );
699
+ throw r = String(e), Error(
700
+ "Objects are not valid as a React child (found: " + (r === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : r) + "). If you meant to render a collection of children, use an array instead."
701
+ );
702
+ }
703
+ return d;
704
+ }
705
+ function F(e, r, u) {
706
+ if (e == null) return e;
707
+ var i = [], a = 0;
708
+ return Y(e, i, "", "", function(v) {
709
+ return r.call(u, v, a++);
710
+ }), i;
711
+ }
712
+ function ae(e) {
713
+ if (e._status === -1) {
714
+ var r = e._result;
715
+ r = r(), r.then(
716
+ function(u) {
717
+ (e._status === 0 || e._status === -1) && (e._status = 1, e._result = u);
718
+ },
719
+ function(u) {
720
+ (e._status === 0 || e._status === -1) && (e._status = 2, e._result = u);
721
+ }
722
+ ), e._status === -1 && (e._status = 0, e._result = r);
723
+ }
724
+ if (e._status === 1)
725
+ return r = e._result, r === void 0 && console.error(
726
+ `lazy: Expected the result of a dynamic import() call. Instead received: %s
727
+
728
+ Your code should look like:
729
+ const MyComponent = lazy(() => import('./MyComponent'))
730
+
731
+ Did you accidentally put curly braces around the import?`,
732
+ r
733
+ ), "default" in r || console.error(
734
+ `lazy: Expected the result of a dynamic import() call. Instead received: %s
735
+
736
+ Your code should look like:
737
+ const MyComponent = lazy(() => import('./MyComponent'))`,
738
+ r
739
+ ), r.default;
740
+ throw e._result;
741
+ }
742
+ function C() {
743
+ var e = h.H;
744
+ return e === null && console.error(
745
+ `Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
746
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
747
+ 2. You might be breaking the Rules of Hooks
748
+ 3. You might have more than one copy of React in the same app
749
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
750
+ ), e;
751
+ }
752
+ function p() {
753
+ }
754
+ function O(e) {
755
+ if (pe === null)
756
+ try {
757
+ var r = ("require" + Math.random()).slice(0, 7);
758
+ pe = (n && n[r]).call(
759
+ n,
760
+ "timers"
761
+ ).setImmediate;
762
+ } catch {
763
+ pe = function(i) {
764
+ Ne === !1 && (Ne = !0, typeof MessageChannel > "u" && console.error(
765
+ "This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."
766
+ ));
767
+ var a = new MessageChannel();
768
+ a.port1.onmessage = i, a.port2.postMessage(void 0);
769
+ };
770
+ }
771
+ return pe(e);
772
+ }
773
+ function T(e) {
774
+ return 1 < e.length && typeof AggregateError == "function" ? new AggregateError(e) : e[0];
775
+ }
776
+ function k(e, r) {
777
+ r !== de - 1 && console.error(
778
+ "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
779
+ ), de = r;
780
+ }
781
+ function $(e, r, u) {
782
+ var i = h.actQueue;
783
+ if (i !== null)
784
+ if (i.length !== 0)
785
+ try {
786
+ oe(i), O(function() {
787
+ return $(e, r, u);
788
+ });
789
+ return;
790
+ } catch (a) {
791
+ h.thrownErrors.push(a);
792
+ }
793
+ else h.actQueue = null;
794
+ 0 < h.thrownErrors.length ? (i = T(h.thrownErrors), h.thrownErrors.length = 0, u(i)) : r(e);
795
+ }
796
+ function oe(e) {
797
+ if (!ve) {
798
+ ve = !0;
799
+ var r = 0;
800
+ try {
801
+ for (; r < e.length; r++) {
802
+ var u = e[r];
803
+ do {
804
+ h.didUsePromise = !1;
805
+ var i = u(!1);
806
+ if (i !== null) {
807
+ if (h.didUsePromise) {
808
+ e[r] = u, e.splice(0, r);
809
+ return;
810
+ }
811
+ u = i;
812
+ } else break;
813
+ } while (!0);
814
+ }
815
+ e.length = 0;
816
+ } catch (a) {
817
+ e.splice(0, r + 1), h.thrownErrors.push(a);
818
+ } finally {
819
+ ve = !1;
820
+ }
821
+ }
822
+ }
823
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
824
+ var ee = Symbol.for("react.transitional.element"), ce = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), c = Symbol.for("react.consumer"), g = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), q = Symbol.for("react.suspense_list"), A = Symbol.for("react.memo"), te = Symbol.for("react.lazy"), We = Symbol.for("react.activity"), Ee = Symbol.iterator, we = {}, Re = {
825
+ isMounted: function() {
826
+ return !1;
827
+ },
828
+ enqueueForceUpdate: function(e) {
829
+ w(e, "forceUpdate");
830
+ },
831
+ enqueueReplaceState: function(e) {
832
+ w(e, "replaceState");
833
+ },
834
+ enqueueSetState: function(e) {
835
+ w(e, "setState");
836
+ }
837
+ }, Te = Object.assign, he = {};
838
+ Object.freeze(he), N.prototype.isReactComponent = {}, N.prototype.setState = function(e, r) {
839
+ if (typeof e != "object" && typeof e != "function" && e != null)
840
+ throw Error(
841
+ "takes an object of state variables to update or a function which returns an object of state variables."
842
+ );
843
+ this.updater.enqueueSetState(this, e, r, "setState");
844
+ }, N.prototype.forceUpdate = function(e) {
845
+ this.updater.enqueueForceUpdate(this, e, "forceUpdate");
846
+ };
847
+ var D = {
848
+ isMounted: [
849
+ "isMounted",
850
+ "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
851
+ ],
852
+ replaceState: [
853
+ "replaceState",
854
+ "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
855
+ ]
856
+ }, fe;
857
+ for (fe in D)
858
+ D.hasOwnProperty(fe) && _(fe, D[fe]);
859
+ M.prototype = N.prototype, D = P.prototype = new M(), D.constructor = P, Te(D, N.prototype), D.isPureReactComponent = !0;
860
+ var be = Array.isArray, ze = Symbol.for("react.client.reference"), h = {
861
+ H: null,
862
+ A: null,
863
+ T: null,
864
+ S: null,
865
+ V: null,
866
+ actQueue: null,
867
+ isBatchingLegacy: !1,
868
+ didScheduleLegacyUpdate: !1,
869
+ didUsePromise: !1,
870
+ thrownErrors: [],
871
+ getCurrentStack: null,
872
+ recentlyCreatedOwnerStacks: 0
873
+ }, le = Object.prototype.hasOwnProperty, Oe = console.createTask ? console.createTask : function() {
874
+ return null;
875
+ };
876
+ D = {
877
+ "react-stack-bottom-frame": function(e) {
878
+ return e();
879
+ }
880
+ };
881
+ var Ce, Se, Ae = {}, xe = D["react-stack-bottom-frame"].bind(D, B)(), Ge = Oe(G(B)), ke = !1, Pe = /\/+/g, je = typeof reportError == "function" ? reportError : function(e) {
882
+ if (typeof window == "object" && typeof window.ErrorEvent == "function") {
883
+ var r = new window.ErrorEvent("error", {
884
+ bubbles: !0,
885
+ cancelable: !0,
886
+ message: typeof e == "object" && e !== null && typeof e.message == "string" ? String(e.message) : String(e),
887
+ error: e
888
+ });
889
+ if (!window.dispatchEvent(r)) return;
890
+ } else if (typeof process == "object" && typeof process.emit == "function") {
891
+ process.emit("uncaughtException", e);
892
+ return;
893
+ }
894
+ console.error(e);
895
+ }, Ne = !1, pe = null, de = 0, me = !1, ve = !1, Le = typeof queueMicrotask == "function" ? function(e) {
896
+ queueMicrotask(function() {
897
+ return queueMicrotask(e);
898
+ });
899
+ } : O;
900
+ D = Object.freeze({
901
+ __proto__: null,
902
+ c: function(e) {
903
+ return C().useMemoCache(e);
904
+ }
905
+ }), s.Children = {
906
+ map: F,
907
+ forEach: function(e, r, u) {
908
+ F(
909
+ e,
910
+ function() {
911
+ r.apply(this, arguments);
912
+ },
913
+ u
914
+ );
915
+ },
916
+ count: function(e) {
917
+ var r = 0;
918
+ return F(e, function() {
919
+ r++;
920
+ }), r;
921
+ },
922
+ toArray: function(e) {
923
+ return F(e, function(r) {
924
+ return r;
925
+ }) || [];
926
+ },
927
+ only: function(e) {
928
+ if (!I(e))
929
+ throw Error(
930
+ "React.Children.only expected to receive a single React element child."
931
+ );
932
+ return e;
933
+ }
934
+ }, s.Component = N, s.Fragment = t, s.Profiler = f, s.PureComponent = P, s.StrictMode = o, s.Suspense = m, s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = h, s.__COMPILER_RUNTIME = D, s.act = function(e) {
935
+ var r = h.actQueue, u = de;
936
+ de++;
937
+ var i = h.actQueue = r !== null ? r : [], a = !1;
938
+ try {
939
+ var v = e();
940
+ } catch (y) {
941
+ h.thrownErrors.push(y);
942
+ }
943
+ if (0 < h.thrownErrors.length)
944
+ throw k(r, u), e = T(h.thrownErrors), h.thrownErrors.length = 0, e;
945
+ if (v !== null && typeof v == "object" && typeof v.then == "function") {
946
+ var d = v;
947
+ return Le(function() {
948
+ a || me || (me = !0, console.error(
949
+ "You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"
950
+ ));
951
+ }), {
952
+ then: function(y, x) {
953
+ a = !0, d.then(
954
+ function(re) {
955
+ if (k(r, u), u === 0) {
956
+ try {
957
+ oe(i), O(function() {
958
+ return $(
959
+ re,
960
+ y,
961
+ x
962
+ );
963
+ });
964
+ } catch (Ve) {
965
+ h.thrownErrors.push(Ve);
966
+ }
967
+ if (0 < h.thrownErrors.length) {
968
+ var Be = T(
969
+ h.thrownErrors
970
+ );
971
+ h.thrownErrors.length = 0, x(Be);
972
+ }
973
+ } else y(re);
974
+ },
975
+ function(re) {
976
+ k(r, u), 0 < h.thrownErrors.length && (re = T(
977
+ h.thrownErrors
978
+ ), h.thrownErrors.length = 0), x(re);
979
+ }
980
+ );
981
+ }
982
+ };
983
+ }
984
+ var b = v;
985
+ if (k(r, u), u === 0 && (oe(i), i.length !== 0 && Le(function() {
986
+ a || me || (me = !0, console.error(
987
+ "A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"
988
+ ));
989
+ }), h.actQueue = null), 0 < h.thrownErrors.length)
990
+ throw e = T(h.thrownErrors), h.thrownErrors.length = 0, e;
991
+ return {
992
+ then: function(y, x) {
993
+ a = !0, u === 0 ? (h.actQueue = i, O(function() {
994
+ return $(
995
+ b,
996
+ y,
997
+ x
998
+ );
999
+ })) : y(b);
1000
+ }
1001
+ };
1002
+ }, s.cache = function(e) {
1003
+ return function() {
1004
+ return e.apply(null, arguments);
1005
+ };
1006
+ }, s.captureOwnerStack = function() {
1007
+ var e = h.getCurrentStack;
1008
+ return e === null ? null : e();
1009
+ }, s.cloneElement = function(e, r, u) {
1010
+ if (e == null)
1011
+ throw Error(
1012
+ "The argument must be a React element, but you passed " + e + "."
1013
+ );
1014
+ var i = Te({}, e.props), a = e.key, v = e._owner;
1015
+ if (r != null) {
1016
+ var d;
1017
+ e: {
1018
+ if (le.call(r, "ref") && (d = Object.getOwnPropertyDescriptor(
1019
+ r,
1020
+ "ref"
1021
+ ).get) && d.isReactWarning) {
1022
+ d = !1;
1023
+ break e;
1024
+ }
1025
+ d = r.ref !== void 0;
1026
+ }
1027
+ d && (v = Z()), V(r) && (L(r.key), a = "" + r.key);
1028
+ for (b in r)
1029
+ !le.call(r, b) || b === "key" || b === "__self" || b === "__source" || b === "ref" && r.ref === void 0 || (i[b] = r[b]);
1030
+ }
1031
+ var b = arguments.length - 2;
1032
+ if (b === 1) i.children = u;
1033
+ else if (1 < b) {
1034
+ d = Array(b);
1035
+ for (var y = 0; y < b; y++)
1036
+ d[y] = arguments[y + 2];
1037
+ i.children = d;
1038
+ }
1039
+ for (i = W(
1040
+ e.type,
1041
+ a,
1042
+ void 0,
1043
+ void 0,
1044
+ v,
1045
+ i,
1046
+ e._debugStack,
1047
+ e._debugTask
1048
+ ), a = 2; a < arguments.length; a++)
1049
+ v = arguments[a], I(v) && v._store && (v._store.validated = 1);
1050
+ return i;
1051
+ }, s.createContext = function(e) {
1052
+ return e = {
1053
+ $$typeof: g,
1054
+ _currentValue: e,
1055
+ _currentValue2: e,
1056
+ _threadCount: 0,
1057
+ Provider: null,
1058
+ Consumer: null
1059
+ }, e.Provider = e, e.Consumer = {
1060
+ $$typeof: c,
1061
+ _context: e
1062
+ }, e._currentRenderer = null, e._currentRenderer2 = null, e;
1063
+ }, s.createElement = function(e, r, u) {
1064
+ for (var i = 2; i < arguments.length; i++) {
1065
+ var a = arguments[i];
1066
+ I(a) && a._store && (a._store.validated = 1);
1067
+ }
1068
+ if (i = {}, a = null, r != null)
1069
+ for (y in Se || !("__self" in r) || "key" in r || (Se = !0, console.warn(
1070
+ "Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
1071
+ )), V(r) && (L(r.key), a = "" + r.key), r)
1072
+ le.call(r, y) && y !== "key" && y !== "__self" && y !== "__source" && (i[y] = r[y]);
1073
+ var v = arguments.length - 2;
1074
+ if (v === 1) i.children = u;
1075
+ else if (1 < v) {
1076
+ for (var d = Array(v), b = 0; b < v; b++)
1077
+ d[b] = arguments[b + 2];
1078
+ Object.freeze && Object.freeze(d), i.children = d;
1079
+ }
1080
+ if (e && e.defaultProps)
1081
+ for (y in v = e.defaultProps, v)
1082
+ i[y] === void 0 && (i[y] = v[y]);
1083
+ a && Q(
1084
+ i,
1085
+ typeof e == "function" ? e.displayName || e.name || "Unknown" : e
1086
+ );
1087
+ var y = 1e4 > h.recentlyCreatedOwnerStacks++;
1088
+ return W(
1089
+ e,
1090
+ a,
1091
+ void 0,
1092
+ void 0,
1093
+ Z(),
1094
+ i,
1095
+ y ? Error("react-stack-top-frame") : xe,
1096
+ y ? Oe(G(e)) : Ge
1097
+ );
1098
+ }, s.createRef = function() {
1099
+ var e = { current: null };
1100
+ return Object.seal(e), e;
1101
+ }, s.forwardRef = function(e) {
1102
+ e != null && e.$$typeof === A ? console.error(
1103
+ "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
1104
+ ) : typeof e != "function" ? console.error(
1105
+ "forwardRef requires a render function but was given %s.",
1106
+ e === null ? "null" : typeof e
1107
+ ) : e.length !== 0 && e.length !== 2 && console.error(
1108
+ "forwardRef render functions accept exactly two parameters: props and ref. %s",
1109
+ e.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."
1110
+ ), e != null && e.defaultProps != null && console.error(
1111
+ "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
1112
+ );
1113
+ var r = { $$typeof: S, render: e }, u;
1114
+ return Object.defineProperty(r, "displayName", {
1115
+ enumerable: !1,
1116
+ configurable: !0,
1117
+ get: function() {
1118
+ return u;
1119
+ },
1120
+ set: function(i) {
1121
+ u = i, e.name || e.displayName || (Object.defineProperty(e, "name", { value: i }), e.displayName = i);
1122
+ }
1123
+ }), r;
1124
+ }, s.isValidElement = I, s.lazy = function(e) {
1125
+ return {
1126
+ $$typeof: te,
1127
+ _payload: { _status: -1, _result: e },
1128
+ _init: ae
1129
+ };
1130
+ }, s.memo = function(e, r) {
1131
+ e == null && console.error(
1132
+ "memo: The first argument must be a component. Instead received: %s",
1133
+ e === null ? "null" : typeof e
1134
+ ), r = {
1135
+ $$typeof: A,
1136
+ type: e,
1137
+ compare: r === void 0 ? null : r
1138
+ };
1139
+ var u;
1140
+ return Object.defineProperty(r, "displayName", {
1141
+ enumerable: !1,
1142
+ configurable: !0,
1143
+ get: function() {
1144
+ return u;
1145
+ },
1146
+ set: function(i) {
1147
+ u = i, e.name || e.displayName || (Object.defineProperty(e, "name", { value: i }), e.displayName = i);
1148
+ }
1149
+ }), r;
1150
+ }, s.startTransition = function(e) {
1151
+ var r = h.T, u = {};
1152
+ h.T = u, u._updatedFibers = /* @__PURE__ */ new Set();
1153
+ try {
1154
+ var i = e(), a = h.S;
1155
+ a !== null && a(u, i), typeof i == "object" && i !== null && typeof i.then == "function" && i.then(p, je);
1156
+ } catch (v) {
1157
+ je(v);
1158
+ } finally {
1159
+ r === null && u._updatedFibers && (e = u._updatedFibers.size, u._updatedFibers.clear(), 10 < e && console.warn(
1160
+ "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
1161
+ )), h.T = r;
1162
+ }
1163
+ }, s.unstable_useCacheRefresh = function() {
1164
+ return C().useCacheRefresh();
1165
+ }, s.use = function(e) {
1166
+ return C().use(e);
1167
+ }, s.useActionState = function(e, r, u) {
1168
+ return C().useActionState(
1169
+ e,
1170
+ r,
1171
+ u
1172
+ );
1173
+ }, s.useCallback = function(e, r) {
1174
+ return C().useCallback(e, r);
1175
+ }, s.useContext = function(e) {
1176
+ var r = C();
1177
+ return e.$$typeof === c && console.error(
1178
+ "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
1179
+ ), r.useContext(e);
1180
+ }, s.useDebugValue = function(e, r) {
1181
+ return C().useDebugValue(e, r);
1182
+ }, s.useDeferredValue = function(e, r) {
1183
+ return C().useDeferredValue(e, r);
1184
+ }, s.useEffect = function(e, r, u) {
1185
+ e == null && console.warn(
1186
+ "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1187
+ );
1188
+ var i = C();
1189
+ if (typeof u == "function")
1190
+ throw Error(
1191
+ "useEffect CRUD overload is not enabled in this build of React."
1192
+ );
1193
+ return i.useEffect(e, r);
1194
+ }, s.useId = function() {
1195
+ return C().useId();
1196
+ }, s.useImperativeHandle = function(e, r, u) {
1197
+ return C().useImperativeHandle(e, r, u);
1198
+ }, s.useInsertionEffect = function(e, r) {
1199
+ return e == null && console.warn(
1200
+ "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1201
+ ), C().useInsertionEffect(e, r);
1202
+ }, s.useLayoutEffect = function(e, r) {
1203
+ return e == null && console.warn(
1204
+ "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1205
+ ), C().useLayoutEffect(e, r);
1206
+ }, s.useMemo = function(e, r) {
1207
+ return C().useMemo(e, r);
1208
+ }, s.useOptimistic = function(e, r) {
1209
+ return C().useOptimistic(e, r);
1210
+ }, s.useReducer = function(e, r, u) {
1211
+ return C().useReducer(e, r, u);
1212
+ }, s.useRef = function(e) {
1213
+ return C().useRef(e);
1214
+ }, s.useState = function(e) {
1215
+ return C().useState(e);
1216
+ }, s.useSyncExternalStore = function(e, r, u) {
1217
+ return C().useSyncExternalStore(
1218
+ e,
1219
+ r,
1220
+ u
1221
+ );
1222
+ }, s.useTransition = function() {
1223
+ return C().useTransition();
1224
+ }, s.version = "19.1.0", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1225
+ }();
1226
+ }(se, se.exports)), se.exports;
1227
+ }
1228
+ var Ie;
1229
+ function rt() {
1230
+ return Ie || (Ie = 1, process.env.NODE_ENV === "production" ? ye.exports = et() : ye.exports = tt()), ye.exports;
1231
+ }
1232
+ var nt = rt();
1233
+ const ot = /* @__PURE__ */ Je(nt);
1234
+ var ut = (n) => n instanceof Date, Ye = (n) => n == null;
1235
+ const st = (n) => typeof n == "object";
1236
+ var Ue = (n) => !Ye(n) && !Array.isArray(n) && st(n) && !ut(n), qe = (n) => Array.isArray(n) ? n.filter(Boolean) : [], De = (n) => n === void 0, ie = (n, s, _) => {
1237
+ if (!s || !Ue(n))
1238
+ return _;
1239
+ const E = qe(s.split(/[,[\].]+?/)).reduce((w, N) => Ye(w) ? w : w[N], n);
1240
+ return De(E) || E === n ? De(n[s]) ? _ : n[s] : E;
1241
+ }, it = (n) => /^\w*$/.test(n), at = (n) => qe(n.replace(/["|']|\]/g, "").split(/\.|\[/)), He = (n, s, _) => {
1242
+ let E = -1;
1243
+ const w = it(s) ? [s] : at(s), N = w.length, M = N - 1;
1244
+ for (; ++E < N; ) {
1245
+ const P = w[E];
1246
+ let j = _;
1247
+ if (E !== M) {
1248
+ const L = n[P];
1249
+ j = Ue(L) || Array.isArray(L) ? L : isNaN(+w[E + 1]) ? {} : [];
1250
+ }
1251
+ if (P === "__proto__" || P === "constructor" || P === "prototype")
1252
+ return;
1253
+ n[P] = j, n = n[P];
1254
+ }
1255
+ };
1256
+ ot.createContext(null);
1257
+ const ue = (n) => n instanceof RegExp || typeof n == "string" || typeof n == "number" ? n : n.value, ne = (n) => typeof n == "string" ? n : typeof n.message == "string" ? n.message : "", ct = (n, s, _ = {}) => {
1258
+ const E = ie(n, s);
1259
+ if (_.required && !E)
1260
+ return { type: "required", message: ne(_.required) };
1261
+ if (_.min && Number(E) < Number(ue(_.min)))
1262
+ return { type: "min", message: ne(_.min) };
1263
+ if (_.max && Number(E) > Number(ue(_.max)))
1264
+ return { type: "max", message: ne(_.max) };
1265
+ if (_.minLength && E.length < ue(_.minLength))
1266
+ return { type: "minLength", message: ne(_.minLength) };
1267
+ if (_.maxLength && E.length > ue(_.maxLength))
1268
+ return { type: "maxLength", message: ne(_.maxLength) };
1269
+ if (_.pattern && !ue(_.pattern).test(E))
1270
+ return { type: "pattern", message: ne(_.pattern) };
1271
+ if (_.validate) {
1272
+ const w = _.validate(E, n);
1273
+ if (w === !1)
32
1274
  return { type: "validate" };
33
- if (typeof c == "string")
34
- return { type: "validate", message: c };
1275
+ if (typeof w == "string")
1276
+ return { type: "validate", message: w };
35
1277
  }
36
- }, j = () => {
37
- const [e, n] = d({});
1278
+ }, ft = () => {
1279
+ const [n, s] = _e({});
38
1280
  return {
39
- errors: e,
40
- appendError: (a, f) => {
41
- n((m) => ({ ...m, [a]: f }));
1281
+ errors: n,
1282
+ appendError: (M, P) => {
1283
+ s((j) => ({ ...j, [M]: P }));
42
1284
  },
43
- removeError: (a) => {
44
- n((f) => {
45
- const m = { ...f };
46
- return delete m[a], m;
1285
+ removeError: (M) => {
1286
+ s((P) => {
1287
+ const j = { ...P };
1288
+ return delete j[M], j;
47
1289
  });
48
1290
  },
49
1291
  resetErrors: () => {
50
- n({});
1292
+ s({});
1293
+ },
1294
+ getError: (M) => ie(n(), M)
1295
+ };
1296
+ }, lt = () => {
1297
+ const n = {};
1298
+ return { rules: n, addRule: (E, w) => {
1299
+ n[E] = {
1300
+ required: w.required,
1301
+ min: w.min,
1302
+ max: w.max,
1303
+ minLength: w.minLength,
1304
+ maxLength: w.maxLength,
1305
+ pattern: w.pattern,
1306
+ validate: w.validate
1307
+ };
1308
+ }, getRule: (E) => n[E] };
1309
+ }, pt = () => {
1310
+ const n = {};
1311
+ return {
1312
+ fields: n,
1313
+ getField: (E) => n[E],
1314
+ setField: (E, w) => {
1315
+ n[E] = w;
51
1316
  }
52
1317
  };
53
- }, A = ({
54
- defaultValues: e,
55
- mode: n = "onInput"
1318
+ }, mt = ({
1319
+ defaultValues: n,
1320
+ mode: s = "onInput"
56
1321
  }) => {
57
- const r = {}, i = {}, [c, a] = d(e), { errors: f, appendError: m, removeError: F, resetErrors: b } = j(), [l, h] = d(!0), C = (t, o) => {
58
- const s = r[t];
59
- s && (o.ref = s), m(t, o);
60
- }, I = (t) => {
61
- F(t);
62
- }, E = (t) => {
63
- const o = i[t], s = N(c(), t, o);
64
- s ? C(t, s) : I(t), h(!Object.keys(f()).length);
65
- }, k = () => {
66
- Object.keys(c()).forEach((t) => {
67
- E(t);
1322
+ const { fields: _, getField: E, setField: w } = pt(), { rules: N, addRule: M, getRule: P } = lt(), [j, L] = _e(n), { errors: U, appendError: G, removeError: Z, resetErrors: B, getError: V } = ft(), [Q, H] = _e(!0), W = (p, O) => {
1323
+ const T = E(p);
1324
+ T && (O.ref = T), G(p, O);
1325
+ }, K = (p) => {
1326
+ Z(p);
1327
+ }, I = (p) => {
1328
+ const O = P(p), T = ct(j(), p, O);
1329
+ T ? W(p, T) : K(p), H(!Object.keys(U()).length);
1330
+ }, J = () => {
1331
+ Object.keys(N).forEach((p) => {
1332
+ I(p);
68
1333
  });
69
- }, V = () => {
70
- var o;
71
- const t = Object.keys(r);
72
- for (const s of t) {
73
- const u = f()[s];
74
- if (u) {
75
- (o = u.ref) == null || o.focus();
1334
+ }, R = () => {
1335
+ var O;
1336
+ const p = Object.keys(_);
1337
+ for (const T of p) {
1338
+ const k = V(T);
1339
+ if (k) {
1340
+ (O = k.ref) == null || O.focus();
76
1341
  break;
77
1342
  }
78
1343
  }
79
- }, v = (t, o) => {
80
- const s = S(t);
81
- a((u) => ({ ...u, [o]: s })), E(o);
82
- }, M = (t, o = {}) => (i[t] = {
83
- required: o.required,
84
- min: o.min,
85
- max: o.max,
86
- minLength: o.minLength,
87
- maxLength: o.maxLength,
88
- pattern: o.pattern,
89
- validate: o.validate
90
- }, {
91
- name: t,
92
- // value: values()[name],
93
- onInput(s) {
94
- n === "onInput" && v(s, t);
1344
+ }, z = (p, O) => {
1345
+ const T = Ze(p);
1346
+ L((k) => {
1347
+ const $ = { ...k };
1348
+ return He($, O, T), $;
1349
+ }), I(O);
1350
+ }, X = (p, O = {}) => (M(p, O), {
1351
+ name: p,
1352
+ // value: get(values(), name),
1353
+ onInput(T) {
1354
+ s === "onInput" && z(T, p);
95
1355
  },
96
- onChange(s) {
97
- (n === "onChange" || n === "onInput") && v(s, t);
1356
+ onChange(T) {
1357
+ (s === "onChange" || s === "onInput") && z(T, p);
98
1358
  },
99
- ref(s) {
100
- r[t] || (r[t] = s, s && y(s, c()[t]));
1359
+ ref(T) {
1360
+ E(p) || (w(p, T), T && ge(T, ie(j(), p)));
101
1361
  }
102
- }), x = (t) => t ? c()[t] : c();
1362
+ }), Y = (p) => p ? ie(j(), p) : j();
103
1363
  return {
104
- values: c,
105
- errors: f,
106
- isValid: l,
107
- register: M,
108
- getValues: x,
109
- setValue: (t, o) => {
110
- a((u) => ({ ...u, [t]: o }));
111
- const s = r[t];
112
- s && y(s, o);
1364
+ values: j,
1365
+ errors: U,
1366
+ isValid: Q,
1367
+ register: X,
1368
+ getValues: Y,
1369
+ setValue: (p, O) => {
1370
+ L((k) => {
1371
+ const $ = { ...k };
1372
+ return He($, p, O), $;
1373
+ });
1374
+ const T = E(p);
1375
+ T && ge(T, O);
113
1376
  },
114
- onSubmit: (t) => (o) => {
115
- o.preventDefault(), k(), l() && t(x()), V();
1377
+ onSubmit: (p) => (O) => {
1378
+ O.preventDefault(), J(), Q() && p(Y()), R();
116
1379
  },
117
- reset: (t = {}) => {
118
- a(() => ({
119
- ...e,
120
- ...t
121
- })), b(), h(!0);
1380
+ reset: (p = {}) => {
1381
+ const O = {
1382
+ ...structuredClone(n),
1383
+ ...p
1384
+ };
1385
+ L(() => O), B(), H(!0), Object.entries(_).forEach(([T, k]) => {
1386
+ k && ge(k, ie(O, T));
1387
+ });
122
1388
  }
123
1389
  };
124
- }, L = H(), D = (e) => T(L.Provider, {
1390
+ }, Fe = Qe(), yt = (n) => Ke(Fe.Provider, {
125
1391
  get value() {
126
- return e.form;
1392
+ return n.form;
127
1393
  },
128
1394
  get children() {
129
- return e.children;
1395
+ return n.children;
130
1396
  }
131
- }), z = () => {
132
- const e = q(L);
133
- if (!e)
1397
+ }), ht = () => {
1398
+ const n = Xe(Fe);
1399
+ if (!n)
134
1400
  throw new Error("useFormContext: cannot find a FormProvider");
135
- return e;
1401
+ return n;
136
1402
  };
137
1403
  export {
138
- D as FormProvider,
139
- A as useForm,
140
- z as useFormContext
1404
+ yt as FormProvider,
1405
+ mt as useForm,
1406
+ ht as useFormContext
141
1407
  };