@pnkx-lib/ui 1.1.16 → 1.1.18

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.
@@ -1,5 +1,5 @@
1
1
  import * as be from "react";
2
- import T, { createContext as Er, useContext as Cr, useEffect as Ar } from "react";
2
+ import T, { createContext as Cr, useContext as Er, useEffect as Ar } from "react";
3
3
  import { Typography as Tr } from "antd";
4
4
  var Wn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
5
5
  function kr(e) {
@@ -58,9 +58,9 @@ function Rr() {
58
58
  switch (f) {
59
59
  case R:
60
60
  return "Fragment";
61
- case M:
61
+ case j:
62
62
  return "Profiler";
63
- case W:
63
+ case M:
64
64
  return "StrictMode";
65
65
  case P:
66
66
  return "Suspense";
@@ -79,7 +79,7 @@ function Rr() {
79
79
  return (f.displayName || "Context") + ".Provider";
80
80
  case w:
81
81
  return (f._context.displayName || "Context") + ".Consumer";
82
- case U:
82
+ case B:
83
83
  var S = f.render;
84
84
  return f = f.displayName, f || (f = S.displayName || S.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
85
85
  case me:
@@ -105,11 +105,11 @@ function Rr() {
105
105
  }
106
106
  if (S) {
107
107
  S = console;
108
- var V = S.error, j = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
108
+ var V = S.error, L = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
109
109
  return V.call(
110
110
  S,
111
111
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
112
- j
112
+ L
113
113
  ), r(f);
114
114
  }
115
115
  }
@@ -132,7 +132,7 @@ function Rr() {
132
132
  return Error("react-stack-top-frame");
133
133
  }
134
134
  function l(f) {
135
- if (C.call(f, "key")) {
135
+ if (E.call(f, "key")) {
136
136
  var S = Object.getOwnPropertyDescriptor(f, "key").get;
137
137
  if (S && S.isReactWarning) return !1;
138
138
  }
@@ -140,7 +140,7 @@ function Rr() {
140
140
  }
141
141
  function c(f, S) {
142
142
  function V() {
143
- B || (B = !0, console.error(
143
+ $ || ($ = !0, console.error(
144
144
  "%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)",
145
145
  S
146
146
  ));
@@ -156,7 +156,7 @@ function Rr() {
156
156
  "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."
157
157
  )), f = this.props.ref, f !== void 0 ? f : null;
158
158
  }
159
- function v(f, S, V, j, oe, te, Te, we) {
159
+ function v(f, S, V, L, oe, te, Te, we) {
160
160
  return V = te.ref, f = {
161
161
  $$typeof: K,
162
162
  type: f,
@@ -188,48 +188,48 @@ function Rr() {
188
188
  value: we
189
189
  }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
190
190
  }
191
- function _(f, S, V, j, oe, te, Te, we) {
192
- var I = S.children;
193
- if (I !== void 0)
194
- if (j)
195
- if (E(I)) {
196
- for (j = 0; j < I.length; j++)
197
- x(I[j]);
198
- Object.freeze && Object.freeze(I);
191
+ function _(f, S, V, L, oe, te, Te, we) {
192
+ var H = S.children;
193
+ if (H !== void 0)
194
+ if (L)
195
+ if (C(H)) {
196
+ for (L = 0; L < H.length; L++)
197
+ x(H[L]);
198
+ Object.freeze && Object.freeze(H);
199
199
  } else
200
200
  console.error(
201
201
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
202
202
  );
203
- else x(I);
204
- if (C.call(S, "key")) {
205
- I = e(f);
203
+ else x(H);
204
+ if (E.call(S, "key")) {
205
+ H = e(f);
206
206
  var le = Object.keys(S).filter(function(ke) {
207
207
  return ke !== "key";
208
208
  });
209
- j = 0 < le.length ? "{key: someKey, " + le.join(": ..., ") + ": ...}" : "{key: someKey}", he[I + j] || (le = 0 < le.length ? "{" + le.join(": ..., ") + ": ...}" : "{}", console.error(
209
+ L = 0 < le.length ? "{key: someKey, " + le.join(": ..., ") + ": ...}" : "{key: someKey}", he[H + L] || (le = 0 < le.length ? "{" + le.join(": ..., ") + ": ...}" : "{}", console.error(
210
210
  `A props object containing a "key" prop is being spread into JSX:
211
211
  let props = %s;
212
212
  <%s {...props} />
213
213
  React keys must be passed directly to JSX without using spread:
214
214
  let props = %s;
215
215
  <%s key={someKey} {...props} />`,
216
- j,
217
- I,
216
+ L,
217
+ H,
218
218
  le,
219
- I
220
- ), he[I + j] = !0);
219
+ H
220
+ ), he[H + L] = !0);
221
221
  }
222
- if (I = null, V !== void 0 && (t(V), I = "" + V), l(S) && (t(S.key), I = "" + S.key), "key" in S) {
222
+ if (H = null, V !== void 0 && (t(V), H = "" + V), l(S) && (t(S.key), H = "" + S.key), "key" in S) {
223
223
  V = {};
224
224
  for (var Se in S)
225
225
  Se !== "key" && (V[Se] = S[Se]);
226
226
  } else V = S;
227
- return I && c(
227
+ return H && c(
228
228
  V,
229
229
  typeof f == "function" ? f.displayName || f.name || "Unknown" : f
230
230
  ), v(
231
231
  f,
232
- I,
232
+ H,
233
233
  te,
234
234
  oe,
235
235
  s(),
@@ -241,7 +241,7 @@ React keys must be passed directly to JSX without using spread:
241
241
  function x(f) {
242
242
  typeof f == "object" && f !== null && f.$$typeof === K && f._store && (f._store.validated = 1);
243
243
  }
244
- var p = T, K = Symbol.for("react.transitional.element"), Y = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), W = Symbol.for("react.strict_mode"), M = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), z = Symbol.for("react.context"), U = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), ye = Symbol.for("react.suspense_list"), me = Symbol.for("react.memo"), xe = Symbol.for("react.lazy"), ne = Symbol.for("react.activity"), fe = Symbol.for("react.client.reference"), Z = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, C = Object.prototype.hasOwnProperty, E = Array.isArray, F = console.createTask ? console.createTask : function() {
244
+ var p = T, K = Symbol.for("react.transitional.element"), Y = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), M = Symbol.for("react.strict_mode"), j = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), z = Symbol.for("react.context"), B = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), ye = Symbol.for("react.suspense_list"), me = Symbol.for("react.memo"), xe = Symbol.for("react.lazy"), ne = Symbol.for("react.activity"), fe = Symbol.for("react.client.reference"), Z = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, E = Object.prototype.hasOwnProperty, C = Array.isArray, F = console.createTask ? console.createTask : function() {
245
245
  return null;
246
246
  };
247
247
  p = {
@@ -249,30 +249,30 @@ React keys must be passed directly to JSX without using spread:
249
249
  return f();
250
250
  }
251
251
  };
252
- var B, G = {}, ee = p["react-stack-bottom-frame"].bind(
252
+ var $, G = {}, ee = p["react-stack-bottom-frame"].bind(
253
253
  p,
254
254
  i
255
255
  )(), se = F(n(i)), he = {};
256
- Re.Fragment = R, Re.jsx = function(f, S, V, j, oe) {
256
+ Re.Fragment = R, Re.jsx = function(f, S, V, L, oe) {
257
257
  var te = 1e4 > Z.recentlyCreatedOwnerStacks++;
258
258
  return _(
259
259
  f,
260
260
  S,
261
261
  V,
262
262
  !1,
263
- j,
263
+ L,
264
264
  oe,
265
265
  te ? Error("react-stack-top-frame") : ee,
266
266
  te ? F(n(f)) : se
267
267
  );
268
- }, Re.jsxs = function(f, S, V, j, oe) {
268
+ }, Re.jsxs = function(f, S, V, L, oe) {
269
269
  var te = 1e4 > Z.recentlyCreatedOwnerStacks++;
270
270
  return _(
271
271
  f,
272
272
  S,
273
273
  V,
274
274
  !0,
275
- j,
275
+ L,
276
276
  oe,
277
277
  te ? Error("react-stack-top-frame") : ee,
278
278
  te ? F(n(f)) : se
@@ -306,7 +306,7 @@ var D = (e) => !X(e) && !Array.isArray(e) && zt(e) && !ve(e), Gt = (e) => D(e) &
306
306
  const r = e.constructor && e.constructor.prototype;
307
307
  return D(r) && r.hasOwnProperty("isPrototypeOf");
308
308
  }, st = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
309
- function $(e) {
309
+ function W(e) {
310
310
  let r;
311
311
  const t = Array.isArray(e), n = typeof FileList < "u" ? e instanceof FileList : !1;
312
312
  if (e instanceof Date)
@@ -318,7 +318,7 @@ function $(e) {
318
318
  r = e;
319
319
  else
320
320
  for (const s in e)
321
- e.hasOwnProperty(s) && (r[s] = $(e[s]));
321
+ e.hasOwnProperty(s) && (r[s] = W(e[s]));
322
322
  else
323
323
  return e;
324
324
  return r;
@@ -448,9 +448,9 @@ function Ur(e) {
448
448
  enumerable: !0,
449
449
  get: () => y(h.errors, t)
450
450
  }
451
- }), [h, t]), p = T.useCallback((W) => _.current.onChange({
451
+ }), [h, t]), p = T.useCallback((M) => _.current.onChange({
452
452
  target: {
453
- value: Gt(W),
453
+ value: Gt(M),
454
454
  name: t
455
455
  },
456
456
  type: Ue.CHANGE
@@ -460,9 +460,14 @@ function Ur(e) {
460
460
  name: t
461
461
  },
462
462
  type: Ue.BLUR
463
- }), [t, s._formValues]), Y = T.useCallback((W) => {
464
- const M = y(s._fields, t);
465
- M && W && (M._f.ref = W);
463
+ }), [t, s._formValues]), Y = T.useCallback((M) => {
464
+ const j = y(s._fields, t);
465
+ j && M && (j._f.ref = {
466
+ focus: () => M.focus(),
467
+ select: () => M.select(),
468
+ setCustomValidity: (w) => M.setCustomValidity(w),
469
+ reportValidity: () => M.reportValidity()
470
+ });
466
471
  }, [s._fields, t]), R = T.useMemo(() => ({
467
472
  name: t,
468
473
  value: c,
@@ -472,21 +477,21 @@ function Ur(e) {
472
477
  ref: Y
473
478
  }), [t, n, h.disabled, p, K, Y, c]);
474
479
  return T.useEffect(() => {
475
- const W = s._options.shouldUnregister || i;
480
+ const M = s._options.shouldUnregister || i;
476
481
  s.register(t, {
477
482
  ...v.current.rules,
478
483
  ...re(v.current.disabled) ? { disabled: v.current.disabled } : {}
479
484
  });
480
- const M = (w, z) => {
481
- const U = y(s._fields, w);
482
- U && U._f && (U._f.mount = z);
485
+ const j = (w, z) => {
486
+ const B = y(s._fields, w);
487
+ B && B._f && (B._f.mount = z);
483
488
  };
484
- if (M(t, !0), W) {
485
- const w = $(y(s._options.defaultValues, t));
489
+ if (j(t, !0), M) {
490
+ const w = W(y(s._options.defaultValues, t));
486
491
  k(s._defaultValues, t, w), O(y(s._formValues, t)) && k(s._formValues, t, w);
487
492
  }
488
493
  return !l && s.register(t), () => {
489
- (l ? W && !s._state.action : W) ? s.unregister(t) : M(t, !1);
494
+ (l ? M && !s._state.action : M) ? s.unregister(t) : j(t, !1);
490
495
  };
491
496
  }, [t, s, l, i]), T.useEffect(() => {
492
497
  s._setDisabledField({
@@ -506,7 +511,7 @@ var Br = (e, r, t, n, s) => r ? {
506
511
  ...t[e] && t[e].types ? t[e].types : {},
507
512
  [n]: s || !0
508
513
  }
509
- } : {}, Pe = (e) => Array.isArray(e) ? e : [e], Et = () => {
514
+ } : {}, Pe = (e) => Array.isArray(e) ? e : [e], Ct = () => {
510
515
  let e = [];
511
516
  return {
512
517
  get observers() {
@@ -565,9 +570,9 @@ function qr(e) {
565
570
  return !1;
566
571
  return !0;
567
572
  }
568
- function L(e, r) {
573
+ function I(e, r) {
569
574
  const t = Array.isArray(r) ? r : it(r) ? [r] : Qt(r), n = t.length === 1 ? e : Wr(e, t), s = t.length - 1, i = t[s];
570
- return n && delete n[i], s !== 0 && (D(n) && Q(n) || Array.isArray(n) && qr(n)) && L(e, t.slice(0, -1)), e;
575
+ return n && delete n[i], s !== 0 && (D(n) && Q(n) || Array.isArray(n) && qr(n)) && I(e, t.slice(0, -1)), e;
571
576
  }
572
577
  var er = (e) => {
573
578
  for (const r in e)
@@ -590,7 +595,7 @@ function tr(e, r, t) {
590
595
  return t;
591
596
  }
592
597
  var Fe = (e, r) => tr(e, r, $e(r));
593
- const Ct = {
598
+ const Et = {
594
599
  value: !1,
595
600
  isValid: !1
596
601
  }, At = { value: !0, isValid: !0 };
@@ -603,9 +608,9 @@ var rr = (e) => {
603
608
  return e[0].checked && !e[0].disabled ? (
604
609
  // @ts-expect-error expected to work in the browser
605
610
  e[0].attributes && !O(e[0].attributes.value) ? O(e[0].value) || e[0].value === "" ? At : { value: e[0].value, isValid: !0 } : At
606
- ) : Ct;
611
+ ) : Et;
607
612
  }
608
- return Ct;
613
+ return Et;
609
614
  }, nr = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: n }) => O(e) ? e : r ? e === "" ? NaN : e && +e : t && ue(e) ? new Date(e) : n ? n(e) : e;
610
615
  const Tt = {
611
616
  isValid: !1,
@@ -684,7 +689,7 @@ var Jr = (e, r, t, n) => {
684
689
  t(e);
685
690
  const { name: s, ...i } = e;
686
691
  return Q(i) || Object.keys(i).length >= Object.keys(r).length || Object.keys(i).find((l) => r[l] === (!n || ie.all));
687
- }, Qr = (e, r, t) => !e || !r || e === r || Pe(e).some((n) => n && (t ? n === r : n.startsWith(r) || r.startsWith(n))), Xr = (e, r, t, n, s) => s.isOnAll ? !1 : !t && s.isOnTouch ? !(r || e) : (t ? n.isOnBlur : s.isOnBlur) ? !e : (t ? n.isOnChange : s.isOnChange) ? e : !0, Kr = (e, r) => !qe(y(e, r)).length && L(e, r), Zr = (e, r, t) => {
692
+ }, Qr = (e, r, t) => !e || !r || e === r || Pe(e).some((n) => n && (t ? n === r : n.startsWith(r) || r.startsWith(n))), Xr = (e, r, t, n, s) => s.isOnAll ? !1 : !t && s.isOnTouch ? !(r || e) : (t ? n.isOnBlur : s.isOnBlur) ? !e : (t ? n.isOnChange : s.isOnChange) ? e : !0, Kr = (e, r) => !qe(y(e, r)).length && I(e, r), Zr = (e, r, t) => {
688
693
  const n = Pe(y(e, t));
689
694
  return k(n, "root", r[t]), k(e, t, n), e;
690
695
  }, He = (e) => ue(e);
@@ -696,89 +701,89 @@ function Dt(e, r, t = "validate") {
696
701
  ref: r
697
702
  };
698
703
  }
699
- var Ee = (e) => D(e) && !We(e) ? e : {
704
+ var Ce = (e) => D(e) && !We(e) ? e : {
700
705
  value: e,
701
706
  message: ""
702
707
  }, Pt = async (e, r, t, n, s, i) => {
703
- const { ref: l, refs: c, required: h, maxLength: v, minLength: _, min: x, max: p, pattern: K, validate: Y, name: R, valueAsNumber: W, mount: M } = e._f, w = y(t, R);
704
- if (!M || r.has(R))
708
+ const { ref: l, refs: c, required: h, maxLength: v, minLength: _, min: x, max: p, pattern: K, validate: Y, name: R, valueAsNumber: M, mount: j } = e._f, w = y(t, R);
709
+ if (!j || r.has(R))
705
710
  return {};
706
- const z = c ? c[0] : l, U = (C) => {
707
- s && z.reportValidity && (z.setCustomValidity(re(C) ? "" : C || ""), z.reportValidity());
708
- }, P = {}, ye = ut(l), me = je(l), xe = ye || me, ne = (W || lt(l)) && O(l.value) && O(w) || Be(l) && l.value === "" || w === "" || Array.isArray(w) && !w.length, fe = Br.bind(null, R, n, P), Z = (C, E, F, B = de.maxLength, G = de.minLength) => {
709
- const ee = C ? E : F;
711
+ const z = c ? c[0] : l, B = (E) => {
712
+ s && z.reportValidity && (z.setCustomValidity(re(E) ? "" : E || ""), z.reportValidity());
713
+ }, P = {}, ye = ut(l), me = je(l), xe = ye || me, ne = (M || lt(l)) && O(l.value) && O(w) || Be(l) && l.value === "" || w === "" || Array.isArray(w) && !w.length, fe = Br.bind(null, R, n, P), Z = (E, C, F, $ = de.maxLength, G = de.minLength) => {
714
+ const ee = E ? C : F;
710
715
  P[R] = {
711
- type: C ? B : G,
716
+ type: E ? $ : G,
712
717
  message: ee,
713
718
  ref: l,
714
- ...fe(C ? B : G, ee)
719
+ ...fe(E ? $ : G, ee)
715
720
  };
716
721
  };
717
722
  if (i ? !Array.isArray(w) || !w.length : h && (!xe && (ne || X(w)) || re(w) && !w || me && !rr(c).isValid || ye && !sr(c).isValid)) {
718
- const { value: C, message: E } = He(h) ? { value: !!h, message: h } : Ee(h);
719
- if (C && (P[R] = {
723
+ const { value: E, message: C } = He(h) ? { value: !!h, message: h } : Ce(h);
724
+ if (E && (P[R] = {
720
725
  type: de.required,
721
- message: E,
726
+ message: C,
722
727
  ref: z,
723
- ...fe(de.required, E)
728
+ ...fe(de.required, C)
724
729
  }, !n))
725
- return U(E), P;
730
+ return B(C), P;
726
731
  }
727
732
  if (!ne && (!X(x) || !X(p))) {
728
- let C, E;
729
- const F = Ee(p), B = Ee(x);
733
+ let E, C;
734
+ const F = Ce(p), $ = Ce(x);
730
735
  if (!X(w) && !isNaN(w)) {
731
736
  const G = l.valueAsNumber || w && +w;
732
- X(F.value) || (C = G > F.value), X(B.value) || (E = G < B.value);
737
+ X(F.value) || (E = G > F.value), X($.value) || (C = G < $.value);
733
738
  } else {
734
739
  const G = l.valueAsDate || new Date(w), ee = (f) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + f), se = l.type == "time", he = l.type == "week";
735
- ue(F.value) && w && (C = se ? ee(w) > ee(F.value) : he ? w > F.value : G > new Date(F.value)), ue(B.value) && w && (E = se ? ee(w) < ee(B.value) : he ? w < B.value : G < new Date(B.value));
740
+ ue(F.value) && w && (E = se ? ee(w) > ee(F.value) : he ? w > F.value : G > new Date(F.value)), ue($.value) && w && (C = se ? ee(w) < ee($.value) : he ? w < $.value : G < new Date($.value));
736
741
  }
737
- if ((C || E) && (Z(!!C, F.message, B.message, de.max, de.min), !n))
738
- return U(P[R].message), P;
742
+ if ((E || C) && (Z(!!E, F.message, $.message, de.max, de.min), !n))
743
+ return B(P[R].message), P;
739
744
  }
740
745
  if ((v || _) && !ne && (ue(w) || i && Array.isArray(w))) {
741
- const C = Ee(v), E = Ee(_), F = !X(C.value) && w.length > +C.value, B = !X(E.value) && w.length < +E.value;
742
- if ((F || B) && (Z(F, C.message, E.message), !n))
743
- return U(P[R].message), P;
746
+ const E = Ce(v), C = Ce(_), F = !X(E.value) && w.length > +E.value, $ = !X(C.value) && w.length < +C.value;
747
+ if ((F || $) && (Z(F, E.message, C.message), !n))
748
+ return B(P[R].message), P;
744
749
  }
745
750
  if (K && !ne && ue(w)) {
746
- const { value: C, message: E } = Ee(K);
747
- if (We(C) && !w.match(C) && (P[R] = {
751
+ const { value: E, message: C } = Ce(K);
752
+ if (We(E) && !w.match(E) && (P[R] = {
748
753
  type: de.pattern,
749
- message: E,
754
+ message: C,
750
755
  ref: l,
751
- ...fe(de.pattern, E)
756
+ ...fe(de.pattern, C)
752
757
  }, !n))
753
- return U(E), P;
758
+ return B(C), P;
754
759
  }
755
760
  if (Y) {
756
761
  if (ae(Y)) {
757
- const C = await Y(w, t), E = Dt(C, z);
758
- if (E && (P[R] = {
759
- ...E,
760
- ...fe(de.validate, E.message)
762
+ const E = await Y(w, t), C = Dt(E, z);
763
+ if (C && (P[R] = {
764
+ ...C,
765
+ ...fe(de.validate, C.message)
761
766
  }, !n))
762
- return U(E.message), P;
767
+ return B(C.message), P;
763
768
  } else if (D(Y)) {
764
- let C = {};
765
- for (const E in Y) {
766
- if (!Q(C) && !n)
769
+ let E = {};
770
+ for (const C in Y) {
771
+ if (!Q(E) && !n)
767
772
  break;
768
- const F = Dt(await Y[E](w, t), z, E);
769
- F && (C = {
773
+ const F = Dt(await Y[C](w, t), z, C);
774
+ F && (E = {
770
775
  ...F,
771
- ...fe(E, F.message)
772
- }, U(F.message), n && (P[R] = C));
776
+ ...fe(C, F.message)
777
+ }, B(F.message), n && (P[R] = E));
773
778
  }
774
- if (!Q(C) && (P[R] = {
779
+ if (!Q(E) && (P[R] = {
775
780
  ref: z,
776
- ...C
781
+ ...E
777
782
  }, !n))
778
783
  return P;
779
784
  }
780
785
  }
781
- return U(!0), P;
786
+ return B(!0), P;
782
787
  };
783
788
  const en = {
784
789
  mode: ie.onSubmit,
@@ -806,7 +811,7 @@ function tn(e = {}) {
806
811
  disabled: r.disabled || !1
807
812
  };
808
813
  const n = {};
809
- let s = D(r.defaultValues) || D(r.values) ? $(r.defaultValues || r.values) || {} : {}, i = r.shouldUnregister ? {} : $(s), l = {
814
+ let s = D(r.defaultValues) || D(r.values) ? W(r.defaultValues || r.values) || {} : {}, i = r.shouldUnregister ? {} : W(s), l = {
810
815
  action: !1,
811
816
  mount: !1,
812
817
  watch: !1
@@ -830,11 +835,11 @@ function tn(e = {}) {
830
835
  ..._
831
836
  };
832
837
  const p = {
833
- array: Et(),
834
- state: Et()
835
- }, K = Vt(r.mode), Y = Vt(r.reValidateMode), R = r.criteriaMode === ie.all, W = (a) => (o) => {
838
+ array: Ct(),
839
+ state: Ct()
840
+ }, K = Vt(r.mode), Y = Vt(r.reValidateMode), R = r.criteriaMode === ie.all, M = (a) => (o) => {
836
841
  clearTimeout(v), v = setTimeout(a, o);
837
- }, M = async (a) => {
842
+ }, j = async (a) => {
838
843
  if (!r.disabled && (_.isValid || x.isValid || a)) {
839
844
  const o = r.resolver ? Q((await ne()).errors) : await Z(n, !0);
840
845
  o !== t.isValid && p.state.next({
@@ -843,7 +848,7 @@ function tn(e = {}) {
843
848
  }
844
849
  }, w = (a, o) => {
845
850
  !r.disabled && (_.isValidating || _.validatingFields || x.isValidating || x.validatingFields) && ((a || Array.from(c.mount)).forEach((u) => {
846
- u && (o ? k(t.validatingFields, u, o) : L(t.validatingFields, u));
851
+ u && (o ? k(t.validatingFields, u, o) : I(t.validatingFields, u));
847
852
  }), p.state.next({
848
853
  validatingFields: t.validatingFields,
849
854
  isValidating: !Q(t.validatingFields)
@@ -864,14 +869,14 @@ function tn(e = {}) {
864
869
  }
865
870
  (_.dirtyFields || x.dirtyFields) && (t.dirtyFields = Fe(s, i)), p.state.next({
866
871
  name: a,
867
- isDirty: E(a, o),
872
+ isDirty: C(a, o),
868
873
  dirtyFields: t.dirtyFields,
869
874
  errors: t.errors,
870
875
  isValid: t.isValid
871
876
  });
872
877
  } else
873
878
  k(i, a, o);
874
- }, U = (a, o) => {
879
+ }, B = (a, o) => {
875
880
  k(t.errors, a, o), p.state.next({
876
881
  errors: t.errors
877
882
  });
@@ -884,7 +889,7 @@ function tn(e = {}) {
884
889
  const g = y(n, a);
885
890
  if (g) {
886
891
  const d = y(i, a, O(u) ? y(s, a) : u);
887
- O(d) || m && m.defaultChecked || o ? k(i, a, o ? d : kt(g._f)) : G(a, d), l.mount && M();
892
+ O(d) || m && m.defaultChecked || o ? k(i, a, o ? d : kt(g._f)) : G(a, d), l.mount && j();
888
893
  }
889
894
  }, me = (a, o, u, m, g) => {
890
895
  let d = !1, b = !1;
@@ -893,9 +898,9 @@ function tn(e = {}) {
893
898
  };
894
899
  if (!r.disabled) {
895
900
  if (!u || m) {
896
- (_.isDirty || x.isDirty) && (b = t.isDirty, t.isDirty = A.isDirty = E(), d = b !== A.isDirty);
901
+ (_.isDirty || x.isDirty) && (b = t.isDirty, t.isDirty = A.isDirty = C(), d = b !== A.isDirty);
897
902
  const N = ge(y(s, a), o);
898
- b = !!y(t.dirtyFields, a), N ? L(t.dirtyFields, a) : k(t.dirtyFields, a, !0), A.dirtyFields = t.dirtyFields, d = d || (_.dirtyFields || x.dirtyFields) && b !== !N;
903
+ b = !!y(t.dirtyFields, a), N ? I(t.dirtyFields, a) : k(t.dirtyFields, a, !0), A.dirtyFields = t.dirtyFields, d = d || (_.dirtyFields || x.dirtyFields) && b !== !N;
899
904
  }
900
905
  if (u) {
901
906
  const N = y(t.touchedFields, a);
@@ -906,7 +911,7 @@ function tn(e = {}) {
906
911
  return d ? A : {};
907
912
  }, xe = (a, o, u, m) => {
908
913
  const g = y(t.errors, a), d = (_.isValid || x.isValid) && re(o) && t.isValid !== o;
909
- if (r.delayError && u ? (h = W(() => U(a, u)), h(r.delayError)) : (clearTimeout(v), h = null, u ? k(t.errors, a, u) : L(t.errors, a)), (u ? !ge(g, u) : g) || !Q(m) || d) {
914
+ if (r.delayError && u ? (h = M(() => B(a, u)), h(r.delayError)) : (clearTimeout(v), h = null, u ? k(t.errors, a, u) : I(t.errors, a)), (u ? !ge(g, u) : g) || !Q(m) || d) {
910
915
  const b = {
911
916
  ...m,
912
917
  ...d && re(o) ? { isValid: o } : {},
@@ -927,7 +932,7 @@ function tn(e = {}) {
927
932
  if (a)
928
933
  for (const u of a) {
929
934
  const m = y(o, u);
930
- m ? k(t.errors, u, m) : L(t.errors, u);
935
+ m ? k(t.errors, u, m) : I(t.errors, u);
931
936
  }
932
937
  else
933
938
  t.errors = o;
@@ -945,28 +950,28 @@ function tn(e = {}) {
945
950
  const q = await Pt(g, c.disabled, i, R, r.shouldUseNativeValidation && !o, A);
946
951
  if (N && _.validatingFields && w([m]), q[d.name] && (u.valid = !1, o))
947
952
  break;
948
- !o && (y(q, d.name) ? A ? Zr(t.errors, q, d.name) : k(t.errors, d.name, q[d.name]) : L(t.errors, d.name));
953
+ !o && (y(q, d.name) ? A ? Zr(t.errors, q, d.name) : k(t.errors, d.name, q[d.name]) : I(t.errors, d.name));
949
954
  }
950
955
  !Q(b) && await Z(b, o, u);
951
956
  }
952
957
  }
953
958
  return u.valid;
954
- }, C = () => {
959
+ }, E = () => {
955
960
  for (const a of c.unMount) {
956
961
  const o = y(n, a);
957
962
  o && (o._f.refs ? o._f.refs.every((u) => !Je(u)) : !Je(o._f.ref)) && le(a);
958
963
  }
959
964
  c.unMount = /* @__PURE__ */ new Set();
960
- }, E = (a, o) => !r.disabled && (a && o && k(i, a, o), !ge(V(), s)), F = (a, o, u) => Kt(a, c, {
965
+ }, C = (a, o) => !r.disabled && (a && o && k(i, a, o), !ge(V(), s)), F = (a, o, u) => Kt(a, c, {
961
966
  ...l.mount ? i : O(o) ? s : ue(a) ? { [a]: o } : o
962
- }, u, o), B = (a) => qe(y(l.mount ? i : s, a, r.shouldUnregister ? y(s, a, []) : [])), G = (a, o, u = {}) => {
967
+ }, u, o), $ = (a) => qe(y(l.mount ? i : s, a, r.shouldUnregister ? y(s, a, []) : [])), G = (a, o, u = {}) => {
963
968
  const m = y(n, a);
964
969
  let g = o;
965
970
  if (m) {
966
971
  const d = m._f;
967
972
  d && (!d.disabled && k(i, a, nr(o, d)), g = Be(d.ref) && X(o) ? "" : o, Zt(d.ref) ? [...d.ref.options].forEach((b) => b.selected = g.includes(b.value)) : d.refs ? je(d.ref) ? d.refs.length > 1 ? d.refs.forEach((b) => (!b.defaultChecked || !b.disabled) && (b.checked = Array.isArray(g) ? !!g.find((A) => A === b.value) : g === b.value)) : d.refs[0] && (d.refs[0].checked = !!g) : d.refs.forEach((b) => b.checked = b.value === g) : lt(d.ref) ? d.ref.value = "" : (d.ref.value = g, d.ref.type || p.state.next({
968
973
  name: a,
969
- values: $(i)
974
+ values: W(i)
970
975
  })));
971
976
  }
972
977
  (u.shouldDirty || u.shouldTouch) && me(a, g, u.shouldTouch, u.shouldDirty, !0), u.shouldValidate && S(a);
@@ -976,17 +981,17 @@ function tn(e = {}) {
976
981
  (c.array.has(a) || D(g) || b && !b._f) && !ve(g) ? ee(d, g, u) : G(d, g, u);
977
982
  }
978
983
  }, se = (a, o, u = {}) => {
979
- const m = y(n, a), g = c.array.has(a), d = $(o);
984
+ const m = y(n, a), g = c.array.has(a), d = W(o);
980
985
  k(i, a, d), g ? (p.array.next({
981
986
  name: a,
982
- values: $(i)
987
+ values: W(i)
983
988
  }), (_.isDirty || _.dirtyFields || x.isDirty || x.dirtyFields) && u.shouldDirty && p.state.next({
984
989
  name: a,
985
990
  dirtyFields: Fe(s, i),
986
- isDirty: E(a, d)
991
+ isDirty: C(a, d)
987
992
  })) : m && !m._f && !X(d) ? ee(a, d, u) : G(a, d, u), Ft(a, c) && p.state.next({ ...t }), p.state.next({
988
993
  name: l.mount ? a : void 0,
989
- values: $(i)
994
+ values: W(i)
990
995
  });
991
996
  }, he = async (a) => {
992
997
  l.mount = !0;
@@ -1003,9 +1008,9 @@ function tn(e = {}) {
1003
1008
  if (!q && p.state.next({
1004
1009
  name: u,
1005
1010
  type: a.type,
1006
- values: $(i)
1011
+ values: W(i)
1007
1012
  }), xr)
1008
- return (_.isValid || x.isValid) && (r.mode === "onBlur" ? q && M() : q || M()), wr && p.state.next({ name: u, ...ze ? {} : Ge });
1013
+ return (_.isValid || x.isValid) && (r.mode === "onBlur" ? q && j() : q || j()), wr && p.state.next({ name: u, ...ze ? {} : Ge });
1009
1014
  if (!q && ze && p.state.next({ ...t }), r.resolver) {
1010
1015
  const { errors: _t } = await ne([u]);
1011
1016
  if (d(N), m) {
@@ -1028,7 +1033,7 @@ function tn(e = {}) {
1028
1033
  } else a ? (m = (await Promise.all(g.map(async (d) => {
1029
1034
  const b = y(n, d);
1030
1035
  return await Z(b && b._f ? { [d]: b } : b);
1031
- }))).every(Boolean), !(!m && !t.isValid) && M()) : m = u = await Z(n);
1036
+ }))).every(Boolean), !(!m && !t.isValid) && j()) : m = u = await Z(n);
1032
1037
  return p.state.next({
1033
1038
  ...!ue(a) || (_.isValid || x.isValid) && u !== t.isValid ? {} : { name: a },
1034
1039
  ...r.resolver || !a ? { isValid: u } : {},
@@ -1039,14 +1044,14 @@ function tn(e = {}) {
1039
1044
  ...l.mount ? i : s
1040
1045
  };
1041
1046
  return O(a) ? o : ue(a) ? y(o, a) : a.map((u) => y(o, u));
1042
- }, j = (a, o) => ({
1047
+ }, L = (a, o) => ({
1043
1048
  invalid: !!y((o || t).errors, a),
1044
1049
  isDirty: !!y((o || t).dirtyFields, a),
1045
1050
  error: y((o || t).errors, a),
1046
1051
  isValidating: !!y(t.validatingFields, a),
1047
1052
  isTouched: !!y((o || t).touchedFields, a)
1048
1053
  }), oe = (a) => {
1049
- a && Pe(a).forEach((o) => L(t.errors, o)), p.state.next({
1054
+ a && Pe(a).forEach((o) => I(t.errors, o)), p.state.next({
1050
1055
  errors: a ? t.errors : {}
1051
1056
  });
1052
1057
  }, te = (a, o, u) => {
@@ -1070,7 +1075,7 @@ function tn(e = {}) {
1070
1075
  ...o
1071
1076
  });
1072
1077
  }
1073
- }).unsubscribe, I = (a) => (l.mount = !0, x = {
1078
+ }).unsubscribe, H = (a) => (l.mount = !0, x = {
1074
1079
  ...x,
1075
1080
  ...a.formState
1076
1081
  }, we({
@@ -1078,13 +1083,13 @@ function tn(e = {}) {
1078
1083
  formState: x
1079
1084
  })), le = (a, o = {}) => {
1080
1085
  for (const u of a ? Pe(a) : c.mount)
1081
- c.mount.delete(u), c.array.delete(u), o.keepValue || (L(n, u), L(i, u)), !o.keepError && L(t.errors, u), !o.keepDirty && L(t.dirtyFields, u), !o.keepTouched && L(t.touchedFields, u), !o.keepIsValidating && L(t.validatingFields, u), !r.shouldUnregister && !o.keepDefaultValue && L(s, u);
1086
+ c.mount.delete(u), c.array.delete(u), o.keepValue || (I(n, u), I(i, u)), !o.keepError && I(t.errors, u), !o.keepDirty && I(t.dirtyFields, u), !o.keepTouched && I(t.touchedFields, u), !o.keepIsValidating && I(t.validatingFields, u), !r.shouldUnregister && !o.keepDefaultValue && I(s, u);
1082
1087
  p.state.next({
1083
- values: $(i)
1088
+ values: W(i)
1084
1089
  }), p.state.next({
1085
1090
  ...t,
1086
- ...o.keepDirty ? { isDirty: E() } : {}
1087
- }), !o.keepIsValid && M();
1091
+ ...o.keepDirty ? { isDirty: C() } : {}
1092
+ }), !o.keepIsValid && j();
1088
1093
  }, Se = ({ disabled: a, name: o }) => {
1089
1094
  (re(a) && l.mount || a || c.disabled.has(o)) && (a ? c.disabled.add(o) : c.disabled.delete(o));
1090
1095
  }, ke = (a, o = {}) => {
@@ -1147,7 +1152,7 @@ function tn(e = {}) {
1147
1152
  }, yt = (a, o) => async (u) => {
1148
1153
  let m;
1149
1154
  u && (u.preventDefault && u.preventDefault(), u.persist && u.persist());
1150
- let g = $(i);
1155
+ let g = W(i);
1151
1156
  if (p.state.next({
1152
1157
  isSubmitting: !0
1153
1158
  }), r.resolver) {
@@ -1158,7 +1163,7 @@ function tn(e = {}) {
1158
1163
  if (c.disabled.size)
1159
1164
  for (const d of c.disabled)
1160
1165
  k(g, d, void 0);
1161
- if (L(t.errors, "root"), Q(t.errors)) {
1166
+ if (I(t.errors, "root"), Q(t.errors)) {
1162
1167
  p.state.next({
1163
1168
  errors: {}
1164
1169
  });
@@ -1178,9 +1183,9 @@ function tn(e = {}) {
1178
1183
  }), m)
1179
1184
  throw m;
1180
1185
  }, vr = (a, o = {}) => {
1181
- y(n, a) && (O(o.defaultValue) ? se(a, $(y(s, a))) : (se(a, o.defaultValue), k(s, a, $(o.defaultValue))), o.keepTouched || L(t.touchedFields, a), o.keepDirty || (L(t.dirtyFields, a), t.isDirty = o.defaultValue ? E(a, $(y(s, a))) : E()), o.keepError || (L(t.errors, a), _.isValid && M()), p.state.next({ ...t }));
1186
+ y(n, a) && (O(o.defaultValue) ? se(a, W(y(s, a))) : (se(a, o.defaultValue), k(s, a, W(o.defaultValue))), o.keepTouched || I(t.touchedFields, a), o.keepDirty || (I(t.dirtyFields, a), t.isDirty = o.defaultValue ? C(a, W(y(s, a))) : C()), o.keepError || (I(t.errors, a), _.isValid && j()), p.state.next({ ...t }));
1182
1187
  }, mt = (a, o = {}) => {
1183
- const u = a ? $(a) : s, m = $(u), g = Q(a), d = g ? s : m;
1188
+ const u = a ? W(a) : s, m = W(u), g = Q(a), d = g ? s : m;
1184
1189
  if (o.keepDefaultValues || (s = u), !o.keepValues) {
1185
1190
  if (o.keepDirtyValues) {
1186
1191
  const b = /* @__PURE__ */ new Set([
@@ -1207,7 +1212,7 @@ function tn(e = {}) {
1207
1212
  for (const b of c.mount)
1208
1213
  se(b, y(d, b));
1209
1214
  }
1210
- i = $(d), p.array.next({
1215
+ i = W(d), p.array.next({
1211
1216
  values: { ...d }
1212
1217
  }), p.state.next({
1213
1218
  values: { ...d }
@@ -1246,25 +1251,25 @@ function tn(e = {}) {
1246
1251
  control: {
1247
1252
  register: ke,
1248
1253
  unregister: le,
1249
- getFieldState: j,
1254
+ getFieldState: L,
1250
1255
  handleSubmit: yt,
1251
1256
  setError: te,
1252
1257
  _subscribe: we,
1253
1258
  _runSchema: ne,
1254
1259
  _getWatch: F,
1255
- _getDirty: E,
1256
- _setValid: M,
1260
+ _getDirty: C,
1261
+ _setValid: j,
1257
1262
  _setFieldArray: z,
1258
1263
  _setDisabledField: Se,
1259
1264
  _setErrors: P,
1260
- _getFieldArray: B,
1265
+ _getFieldArray: $,
1261
1266
  _reset: mt,
1262
1267
  _resetDefaultValues: () => ae(r.defaultValues) && r.defaultValues().then((a) => {
1263
1268
  bt(a, r.resetOptions), p.state.next({
1264
1269
  isLoading: !1
1265
1270
  });
1266
1271
  }),
1267
- _removeUnmounted: C,
1272
+ _removeUnmounted: E,
1268
1273
  _disableForm: br,
1269
1274
  _subjects: p,
1270
1275
  _proxyFormState: _,
@@ -1302,7 +1307,7 @@ function tn(e = {}) {
1302
1307
  };
1303
1308
  }
1304
1309
  },
1305
- subscribe: I,
1310
+ subscribe: H,
1306
1311
  trigger: S,
1307
1312
  register: ke,
1308
1313
  handleSubmit: yt,
@@ -1315,7 +1320,7 @@ function tn(e = {}) {
1315
1320
  unregister: le,
1316
1321
  setError: te,
1317
1322
  setFocus: _r,
1318
- getFieldState: j
1323
+ getFieldState: L
1319
1324
  };
1320
1325
  return {
1321
1326
  ...vt,
@@ -1374,7 +1379,7 @@ function Gn(e = {}) {
1374
1379
  i._state.mount || (i._setValid(), i._state.mount = !0), i._state.watch && (i._state.watch = !1, i._subjects.state.next({ ...i._formState })), i._removeUnmounted();
1375
1380
  }), r.current.formState = Xt(n, i), r.current;
1376
1381
  }
1377
- var ir = /* @__PURE__ */ Er({});
1382
+ var ir = /* @__PURE__ */ Cr({});
1378
1383
  function Ze() {
1379
1384
  return Ze = Object.assign ? Object.assign.bind() : function(e) {
1380
1385
  for (var r = 1; r < arguments.length; r++) {
@@ -1512,7 +1517,7 @@ function cn() {
1512
1517
  }(Qe)), Qe.exports;
1513
1518
  }
1514
1519
  var fn = cn();
1515
- const dn = /* @__PURE__ */ kr(fn), H = Math.round;
1520
+ const dn = /* @__PURE__ */ kr(fn), U = Math.round;
1516
1521
  function Xe(e, r) {
1517
1522
  const t = e.replace(/^[^(]*\((.*)/, "$1").replace(/\).*/, "").match(/\d*\.?\d+%?/g) || [], n = t.map((s) => parseFloat(s));
1518
1523
  for (let s = 0; s < 3; s += 1)
@@ -1524,7 +1529,7 @@ function De(e, r) {
1524
1529
  const t = r || 255;
1525
1530
  return e > t ? t : e < 0 ? 0 : e;
1526
1531
  }
1527
- class Ce {
1532
+ class Ee {
1528
1533
  constructor(r) {
1529
1534
  J(this, "isValid", !0), J(this, "r", 0), J(this, "g", 0), J(this, "b", 0), J(this, "a", 1), J(this, "_h", void 0), J(this, "_s", void 0), J(this, "_l", void 0), J(this, "_v", void 0), J(this, "_max", void 0), J(this, "_min", void 0), J(this, "_brightness", void 0);
1530
1535
  function t(n) {
@@ -1536,7 +1541,7 @@ class Ce {
1536
1541
  };
1537
1542
  const n = r.trim();
1538
1543
  /^#?[A-F\d]{3,8}$/i.test(n) ? this.fromHexString(n) : s("rgb") ? this.fromRgbString(n) : s("hsl") ? this.fromHslString(n) : (s("hsv") || s("hsb")) && this.fromHsvString(n);
1539
- } else if (r instanceof Ce)
1544
+ } else if (r instanceof Ee)
1540
1545
  this.r = r.r, this.g = r.g, this.b = r.b, this.a = r.a, this._h = r._h, this._s = r._s, this._l = r._l, this._v = r._v;
1541
1546
  else if (t("rgb"))
1542
1547
  this.r = De(r.r), this.g = De(r.g), this.b = De(r.b), this.a = typeof r.a == "number" ? De(r.a, 1) : 1;
@@ -1580,7 +1585,7 @@ class Ce {
1580
1585
  getHue() {
1581
1586
  if (typeof this._h > "u") {
1582
1587
  const r = this.getMax() - this.getMin();
1583
- r === 0 ? this._h = 0 : this._h = H(60 * (this.r === this.getMax() ? (this.g - this.b) / r + (this.g < this.b ? 6 : 0) : this.g === this.getMax() ? (this.b - this.r) / r + 2 : (this.r - this.g) / r + 4));
1588
+ r === 0 ? this._h = 0 : this._h = U(60 * (this.r === this.getMax() ? (this.g - this.b) / r + (this.g < this.b ? 6 : 0) : this.g === this.getMax() ? (this.b - this.r) / r + 2 : (this.r - this.g) / r + 4));
1584
1589
  }
1585
1590
  return this._h;
1586
1591
  }
@@ -1632,10 +1637,10 @@ class Ce {
1632
1637
  */
1633
1638
  mix(r, t = 50) {
1634
1639
  const n = this._c(r), s = t / 100, i = (c) => (n[c] - this[c]) * s + this[c], l = {
1635
- r: H(i("r")),
1636
- g: H(i("g")),
1637
- b: H(i("b")),
1638
- a: H(i("a") * 100) / 100
1640
+ r: U(i("r")),
1641
+ g: U(i("g")),
1642
+ b: U(i("b")),
1643
+ a: U(i("a") * 100) / 100
1639
1644
  };
1640
1645
  return this._c(l);
1641
1646
  }
@@ -1664,7 +1669,7 @@ class Ce {
1664
1669
  }, r);
1665
1670
  }
1666
1671
  onBackground(r) {
1667
- const t = this._c(r), n = this.a + t.a * (1 - this.a), s = (i) => H((this[i] * this.a + t[i] * t.a * (1 - this.a)) / n);
1672
+ const t = this._c(r), n = this.a + t.a * (1 - this.a), s = (i) => U((this[i] * this.a + t[i] * t.a * (1 - this.a)) / n);
1668
1673
  return this._c({
1669
1674
  r: s("r"),
1670
1675
  g: s("g"),
@@ -1695,7 +1700,7 @@ class Ce {
1695
1700
  r += n.length === 2 ? n : "0" + n;
1696
1701
  const s = (this.b || 0).toString(16);
1697
1702
  if (r += s.length === 2 ? s : "0" + s, typeof this.a == "number" && this.a >= 0 && this.a < 1) {
1698
- const i = H(this.a * 255).toString(16);
1703
+ const i = U(this.a * 255).toString(16);
1699
1704
  r += i.length === 2 ? i : "0" + i;
1700
1705
  }
1701
1706
  return r;
@@ -1711,7 +1716,7 @@ class Ce {
1711
1716
  }
1712
1717
  /** CSS support color pattern */
1713
1718
  toHslString() {
1714
- const r = this.getHue(), t = H(this.getSaturation() * 100), n = H(this.getLightness() * 100);
1719
+ const r = this.getHue(), t = U(this.getSaturation() * 100), n = U(this.getLightness() * 100);
1715
1720
  return this.a !== 1 ? `hsla(${r},${t}%,${n}%,${this.a})` : `hsl(${r},${t}%,${n}%)`;
1716
1721
  }
1717
1722
  /** Same as toHsb */
@@ -1766,14 +1771,14 @@ class Ce {
1766
1771
  a: s
1767
1772
  }) {
1768
1773
  if (this._h = r % 360, this._s = t, this._l = n, this.a = typeof s == "number" ? s : 1, t <= 0) {
1769
- const p = H(n * 255);
1774
+ const p = U(n * 255);
1770
1775
  this.r = p, this.g = p, this.b = p;
1771
1776
  }
1772
1777
  let i = 0, l = 0, c = 0;
1773
1778
  const h = r / 60, v = (1 - Math.abs(2 * n - 1)) * t, _ = v * (1 - Math.abs(h % 2 - 1));
1774
1779
  h >= 0 && h < 1 ? (i = v, l = _) : h >= 1 && h < 2 ? (i = _, l = v) : h >= 2 && h < 3 ? (l = v, c = _) : h >= 3 && h < 4 ? (l = _, c = v) : h >= 4 && h < 5 ? (i = _, c = v) : h >= 5 && h < 6 && (i = v, c = _);
1775
1780
  const x = n - v / 2;
1776
- this.r = H((i + x) * 255), this.g = H((l + x) * 255), this.b = H((c + x) * 255);
1781
+ this.r = U((i + x) * 255), this.g = U((l + x) * 255), this.b = U((c + x) * 255);
1777
1782
  }
1778
1783
  fromHsv({
1779
1784
  h: r,
@@ -1782,10 +1787,10 @@ class Ce {
1782
1787
  a: s
1783
1788
  }) {
1784
1789
  this._h = r % 360, this._s = t, this._v = n, this.a = typeof s == "number" ? s : 1;
1785
- const i = H(n * 255);
1790
+ const i = U(n * 255);
1786
1791
  if (this.r = i, this.g = i, this.b = i, t <= 0)
1787
1792
  return;
1788
- const l = r / 60, c = Math.floor(l), h = l - c, v = H(n * (1 - t) * 255), _ = H(n * (1 - t * h) * 255), x = H(n * (1 - t * (1 - h)) * 255);
1793
+ const l = r / 60, c = Math.floor(l), h = l - c, v = U(n * (1 - t) * 255), _ = U(n * (1 - t * h) * 255), x = U(n * (1 - t * (1 - h)) * 255);
1789
1794
  switch (c) {
1790
1795
  case 0:
1791
1796
  this.g = x, this.b = v;
@@ -1829,7 +1834,7 @@ class Ce {
1829
1834
  fromRgbString(r) {
1830
1835
  const t = Xe(r, (n, s) => (
1831
1836
  // Convert percentage to number. e.g. 50% -> 128
1832
- s.includes("%") ? H(n / 100 * 255) : n
1837
+ s.includes("%") ? U(n / 100 * 255) : n
1833
1838
  ));
1834
1839
  this.r = t[0], this.g = t[1], this.b = t[2], this.a = t[3];
1835
1840
  }
@@ -1880,8 +1885,8 @@ function Ut(e, r, t) {
1880
1885
  return t ? n = e.v + gn * r : n = e.v - yn * r, n = Math.max(0, Math.min(1, n)), Math.round(n * 100) / 100;
1881
1886
  }
1882
1887
  function bn(e) {
1883
- for (var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = [], n = new Ce(e), s = n.toHsv(), i = lr; i > 0; i -= 1) {
1884
- var l = new Ce({
1888
+ for (var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = [], n = new Ee(e), s = n.toHsv(), i = lr; i > 0; i -= 1) {
1889
+ var l = new Ee({
1885
1890
  h: It(s, i, !0),
1886
1891
  s: Ht(s, i, !0),
1887
1892
  v: Ut(s, i, !0)
@@ -1890,7 +1895,7 @@ function bn(e) {
1890
1895
  }
1891
1896
  t.push(n);
1892
1897
  for (var c = 1; c <= ur; c += 1) {
1893
- var h = new Ce({
1898
+ var h = new Ee({
1894
1899
  h: It(s, c),
1895
1900
  s: Ht(s, c),
1896
1901
  v: Ut(s, c)
@@ -1899,7 +1904,7 @@ function bn(e) {
1899
1904
  }
1900
1905
  return r.theme === "dark" ? mn.map(function(v) {
1901
1906
  var _ = v.index, x = v.amount;
1902
- return new Ce(r.backgroundColor || "#141414").mix(t[_], x).toHexString();
1907
+ return new Ee(r.backgroundColor || "#141414").mix(t[_], x).toHexString();
1903
1908
  }) : t.map(function(v) {
1904
1909
  return v.toHexString();
1905
1910
  });
@@ -1997,7 +2002,7 @@ function Sn(e, r) {
1997
2002
  tt.set(e, s), e.removeChild(n);
1998
2003
  }
1999
2004
  }
2000
- function En(e, r) {
2005
+ function Cn(e, r) {
2001
2006
  var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = ct(t), s = ft(n), i = ce(ce({}, t), {}, {
2002
2007
  styles: s
2003
2008
  });
@@ -2018,11 +2023,11 @@ function dr(e) {
2018
2023
  var r;
2019
2024
  return e == null || (r = e.getRootNode) === null || r === void 0 ? void 0 : r.call(e);
2020
2025
  }
2021
- function Cn(e) {
2026
+ function En(e) {
2022
2027
  return dr(e) instanceof ShadowRoot;
2023
2028
  }
2024
2029
  function An(e) {
2025
- return Cn(e) ? dr(e) : null;
2030
+ return En(e) ? dr(e) : null;
2026
2031
  }
2027
2032
  var rt = {}, dt = [], Tn = function(r) {
2028
2033
  dt.push(r);
@@ -2156,12 +2161,12 @@ var Pn = `
2156
2161
  }
2157
2162
  }
2158
2163
  `, Nn = function(r) {
2159
- var t = Cr(ir), n = t.csp, s = t.prefixCls, i = t.layer, l = Pn;
2164
+ var t = Er(ir), n = t.csp, s = t.prefixCls, i = t.layer, l = Pn;
2160
2165
  s && (l = l.replace(/anticon/g, s)), i && (l = "@layer ".concat(i, ` {
2161
2166
  `).concat(l, `
2162
2167
  }`)), Ar(function() {
2163
2168
  var c = r.current, h = An(c);
2164
- En(l, "@ant-design-icons", {
2169
+ Cn(l, "@ant-design-icons", {
2165
2170
  prepend: !i,
2166
2171
  csp: n,
2167
2172
  attachTo: h
@@ -2221,10 +2226,10 @@ mr(et.primary);
2221
2226
  var ht = /* @__PURE__ */ be.forwardRef(function(e, r) {
2222
2227
  var t = e.className, n = e.icon, s = e.spin, i = e.rotate, l = e.tabIndex, c = e.onClick, h = e.twoToneColor, v = or(e, Hn), _ = be.useContext(ir), x = _.prefixCls, p = x === void 0 ? "anticon" : x, K = _.rootClassName, Y = dn(K, p, J(J({}, "".concat(p, "-").concat(n.name), !!n.name), "".concat(p, "-spin"), !!s || n.name === "loading"), t), R = l;
2223
2228
  R === void 0 && c && (R = -1);
2224
- var W = i ? {
2229
+ var M = i ? {
2225
2230
  msTransform: "rotate(".concat(i, "deg)"),
2226
2231
  transform: "rotate(".concat(i, "deg)")
2227
- } : void 0, M = yr(h), w = ar(M, 2), z = w[0], U = w[1];
2232
+ } : void 0, j = yr(h), w = ar(j, 2), z = w[0], B = w[1];
2228
2233
  return /* @__PURE__ */ be.createElement("span", Ze({
2229
2234
  role: "img",
2230
2235
  "aria-label": n.name
@@ -2236,8 +2241,8 @@ var ht = /* @__PURE__ */ be.forwardRef(function(e, r) {
2236
2241
  }), /* @__PURE__ */ be.createElement(Ae, {
2237
2242
  icon: n,
2238
2243
  primaryColor: z,
2239
- secondaryColor: U,
2240
- style: W
2244
+ secondaryColor: B,
2245
+ style: M
2241
2246
  }));
2242
2247
  });
2243
2248
  ht.displayName = "AntdIcon";