@max-ts/components 1.4.6 → 1.4.7
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/lib/index.mjs +250 -250
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -75,7 +75,7 @@ function Kl() {
|
|
|
75
75
|
switch (typeof E.tag == "number" && console.error(
|
|
76
76
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
77
77
|
), E.$$typeof) {
|
|
78
|
-
case
|
|
78
|
+
case x:
|
|
79
79
|
return "Portal";
|
|
80
80
|
case S:
|
|
81
81
|
return (E.displayName || "Context") + ".Provider";
|
|
@@ -243,7 +243,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
243
243
|
function u(E) {
|
|
244
244
|
typeof E == "object" && E !== null && E.$$typeof === b && E._store && (E._store.validated = 1);
|
|
245
245
|
}
|
|
246
|
-
var p = g, b = Symbol.for("react.transitional.element"),
|
|
246
|
+
var p = g, b = Symbol.for("react.transitional.element"), x = Symbol.for("react.portal"), $ = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), m = Symbol.for("react.consumer"), S = Symbol.for("react.context"), A = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), M = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), T = Symbol.for("react.activity"), V = Symbol.for("react.client.reference"), B = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, N = Object.prototype.hasOwnProperty, W = Array.isArray, U = console.createTask ? console.createTask : function() {
|
|
247
247
|
return null;
|
|
248
248
|
};
|
|
249
249
|
p = {
|
|
@@ -1684,8 +1684,8 @@ const eu = ({
|
|
|
1684
1684
|
if (c)
|
|
1685
1685
|
r?.(!n, b);
|
|
1686
1686
|
else {
|
|
1687
|
-
const
|
|
1688
|
-
s(
|
|
1687
|
+
const x = !i;
|
|
1688
|
+
s(x), r?.(x, b);
|
|
1689
1689
|
}
|
|
1690
1690
|
}, p = typeof e == "string" ? au : Es;
|
|
1691
1691
|
return /* @__PURE__ */ l.jsxs("div", { ref: a, children: [
|
|
@@ -1711,19 +1711,19 @@ const eu = ({
|
|
|
1711
1711
|
isDisabled: r
|
|
1712
1712
|
}) => {
|
|
1713
1713
|
if ("actions" in e) {
|
|
1714
|
-
const { icon: b, disabled:
|
|
1714
|
+
const { icon: b, disabled: x, disabledReason: $, name: k, actions: v } = e;
|
|
1715
1715
|
return /* @__PURE__ */ l.jsx(
|
|
1716
1716
|
Te,
|
|
1717
1717
|
{
|
|
1718
1718
|
title: $ || k,
|
|
1719
1719
|
placement: n,
|
|
1720
|
-
withoutContainer: !(r ||
|
|
1720
|
+
withoutContainer: !(r || x),
|
|
1721
1721
|
children: /* @__PURE__ */ l.jsx(
|
|
1722
1722
|
Dn,
|
|
1723
1723
|
{
|
|
1724
1724
|
icon: b,
|
|
1725
1725
|
variant: "text",
|
|
1726
|
-
disabled: r ||
|
|
1726
|
+
disabled: r || x,
|
|
1727
1727
|
children: v.map(
|
|
1728
1728
|
({ name: m, onClick: S, ...A }) => /* @__PURE__ */ At(
|
|
1729
1729
|
st,
|
|
@@ -2111,7 +2111,7 @@ const yu = y(
|
|
|
2111
2111
|
isNested: u,
|
|
2112
2112
|
actions: p,
|
|
2113
2113
|
disabled: b,
|
|
2114
|
-
disabledReason:
|
|
2114
|
+
disabledReason: x,
|
|
2115
2115
|
note: $,
|
|
2116
2116
|
isBlockingOperation: k,
|
|
2117
2117
|
...v
|
|
@@ -2119,7 +2119,7 @@ const yu = y(
|
|
|
2119
2119
|
return /* @__PURE__ */ l.jsx(
|
|
2120
2120
|
Te,
|
|
2121
2121
|
{
|
|
2122
|
-
title: b ?
|
|
2122
|
+
title: b ? x : $,
|
|
2123
2123
|
withoutContainer: !(t || b),
|
|
2124
2124
|
children: /* @__PURE__ */ l.jsx(
|
|
2125
2125
|
Cu,
|
|
@@ -2279,13 +2279,13 @@ const yu = y(
|
|
|
2279
2279
|
...i
|
|
2280
2280
|
}) => {
|
|
2281
2281
|
const { severity: s = "info", slots: c, ...d } = i, f = (u) => {
|
|
2282
|
-
const { variant: p, color: b, ...
|
|
2282
|
+
const { variant: p, color: b, ...x } = u;
|
|
2283
2283
|
return /* @__PURE__ */ l.jsx(
|
|
2284
2284
|
Pu,
|
|
2285
2285
|
{
|
|
2286
2286
|
variant: "text",
|
|
2287
2287
|
color: "primary",
|
|
2288
|
-
...
|
|
2288
|
+
...x
|
|
2289
2289
|
}
|
|
2290
2290
|
);
|
|
2291
2291
|
};
|
|
@@ -2760,7 +2760,7 @@ const Iu = {
|
|
|
2760
2760
|
return /* @__PURE__ */ l.jsx(Ar, { error: !0, children: n });
|
|
2761
2761
|
if (n)
|
|
2762
2762
|
return n;
|
|
2763
|
-
}, [n, e, t]),
|
|
2763
|
+
}, [n, e, t]), x = ($) => {
|
|
2764
2764
|
if (d) {
|
|
2765
2765
|
const k = $.target.value?.trim();
|
|
2766
2766
|
u.onChange?.({
|
|
@@ -2787,7 +2787,7 @@ const Iu = {
|
|
|
2787
2787
|
maxLength: c,
|
|
2788
2788
|
...i
|
|
2789
2789
|
},
|
|
2790
|
-
onBlur:
|
|
2790
|
+
onBlur: x,
|
|
2791
2791
|
...u
|
|
2792
2792
|
}
|
|
2793
2793
|
);
|
|
@@ -2809,7 +2809,7 @@ const Iu = {
|
|
|
2809
2809
|
noOptionsText: c = "Нет данных",
|
|
2810
2810
|
onInputChange: d
|
|
2811
2811
|
}) => {
|
|
2812
|
-
const [f, u] = ge(""), p = Zu(e), b = f.length >= 1,
|
|
2812
|
+
const [f, u] = ge(""), p = Zu(e), b = f.length >= 1, x = o.length > 0, $ = b || x || a || i, k = be(
|
|
2813
2813
|
(m, S) => t ? t(m, S) : JSON.stringify(m) === JSON.stringify(S),
|
|
2814
2814
|
[t]
|
|
2815
2815
|
);
|
|
@@ -2837,7 +2837,7 @@ const Iu = {
|
|
|
2837
2837
|
multiple: u,
|
|
2838
2838
|
size: p = "medium",
|
|
2839
2839
|
placeholder: b = Xu,
|
|
2840
|
-
overflowOption:
|
|
2840
|
+
overflowOption: x,
|
|
2841
2841
|
closeText: $ = "Закрыть",
|
|
2842
2842
|
openText: k = "Открыть",
|
|
2843
2843
|
clearText: v = "Очистить",
|
|
@@ -2891,12 +2891,12 @@ const Iu = {
|
|
|
2891
2891
|
Nt,
|
|
2892
2892
|
{
|
|
2893
2893
|
rowsCount: qu,
|
|
2894
|
-
...
|
|
2894
|
+
...x,
|
|
2895
2895
|
children: Y.key
|
|
2896
2896
|
}
|
|
2897
2897
|
));
|
|
2898
2898
|
},
|
|
2899
|
-
[u,
|
|
2899
|
+
[u, x, T]
|
|
2900
2900
|
), W = be(
|
|
2901
2901
|
(Y, L, Z) => j ? j(Y, L, Z) : Y.map((oe, te) => {
|
|
2902
2902
|
const E = c?.(oe) || "";
|
|
@@ -2953,14 +2953,14 @@ const Iu = {
|
|
|
2953
2953
|
onOpen: i,
|
|
2954
2954
|
onInputChange: s
|
|
2955
2955
|
}) => {
|
|
2956
|
-
const [c, d] = ge(!1), [f, u] = ge(!0), [p, b] = ge(!0),
|
|
2956
|
+
const [c, d] = ge(!1), [f, u] = ge(!0), [p, b] = ge(!0), x = Le(null), [$, k] = ge([]), v = be(
|
|
2957
2957
|
Ra((O) => {
|
|
2958
|
-
|
|
2958
|
+
x.current?.abort();
|
|
2959
2959
|
const M = new AbortController();
|
|
2960
|
-
|
|
2960
|
+
x.current = M, e(O, M?.signal).then((C) => {
|
|
2961
2961
|
k(C), b(C.length === 0);
|
|
2962
2962
|
}).finally(() => {
|
|
2963
|
-
d(!1),
|
|
2963
|
+
d(!1), x.current = null;
|
|
2964
2964
|
});
|
|
2965
2965
|
}, t),
|
|
2966
2966
|
[e, t, a]
|
|
@@ -2999,7 +2999,7 @@ const Iu = {
|
|
|
2999
2999
|
isSuccess: u,
|
|
3000
3000
|
isError: p,
|
|
3001
3001
|
isLoading: b,
|
|
3002
|
-
isFullWidth:
|
|
3002
|
+
isFullWidth: x,
|
|
3003
3003
|
onOpen: $,
|
|
3004
3004
|
noOptionsText: k,
|
|
3005
3005
|
onInputChange: v,
|
|
@@ -3010,7 +3010,7 @@ const Iu = {
|
|
|
3010
3010
|
{
|
|
3011
3011
|
options: t,
|
|
3012
3012
|
disabled: d,
|
|
3013
|
-
fullWidth:
|
|
3013
|
+
fullWidth: x,
|
|
3014
3014
|
loading: b || n,
|
|
3015
3015
|
onOpen: r,
|
|
3016
3016
|
error: p,
|
|
@@ -3346,12 +3346,12 @@ const Iu = {
|
|
|
3346
3346
|
text: u,
|
|
3347
3347
|
variant: p,
|
|
3348
3348
|
onClick: b,
|
|
3349
|
-
...
|
|
3349
|
+
...x
|
|
3350
3350
|
} = i.cancel || {};
|
|
3351
3351
|
return /* @__PURE__ */ l.jsxs(Sd, { title: o, open: r, onClose: s, ...c, children: [
|
|
3352
3352
|
a && /* @__PURE__ */ l.jsx(Od, { children: /* @__PURE__ */ l.jsx(jd, { children: a }) }),
|
|
3353
3353
|
/* @__PURE__ */ l.jsxs(Md, { children: [
|
|
3354
|
-
t && /* @__PURE__ */ l.jsx(Td, { ...
|
|
3354
|
+
t && /* @__PURE__ */ l.jsx(Td, { ...x, ...n, children: u }),
|
|
3355
3355
|
/* @__PURE__ */ l.jsx(Fe, { ...f, children: d })
|
|
3356
3356
|
] })
|
|
3357
3357
|
] });
|
|
@@ -3590,12 +3590,12 @@ const qd = y("div")`
|
|
|
3590
3590
|
errorList: u,
|
|
3591
3591
|
onRetry: p,
|
|
3592
3592
|
actions: b = /* @__PURE__ */ l.jsx(Fe, { onClick: p, children: "Попробовать снова" })
|
|
3593
|
-
} = r,
|
|
3593
|
+
} = r, x = u.map(($) => /* @__PURE__ */ l.jsx(ye, { component: "p", children: $ }, $));
|
|
3594
3594
|
return /* @__PURE__ */ l.jsx(
|
|
3595
3595
|
vn,
|
|
3596
3596
|
{
|
|
3597
3597
|
title: c,
|
|
3598
|
-
description:
|
|
3598
|
+
description: x,
|
|
3599
3599
|
imgAlt: d,
|
|
3600
3600
|
imgSrc: f,
|
|
3601
3601
|
Actions: b
|
|
@@ -3832,7 +3832,7 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
|
|
|
3832
3832
|
onSelectRow: s,
|
|
3833
3833
|
onRowClick: c
|
|
3834
3834
|
}) => {
|
|
3835
|
-
const [d, f] = ge(!1), u = n[e], { isDisabled: p, disabledReason: b } = o || {},
|
|
3835
|
+
const [d, f] = ge(!1), u = n[e], { isDisabled: p, disabledReason: b } = o || {}, x = a && !!i?.find((S) => S[e] === u);
|
|
3836
3836
|
return {
|
|
3837
3837
|
rowId: u,
|
|
3838
3838
|
disabled: p,
|
|
@@ -3858,7 +3858,7 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
|
|
|
3858
3858
|
onClose: () => f(!1)
|
|
3859
3859
|
},
|
|
3860
3860
|
checkboxProps: {
|
|
3861
|
-
checked:
|
|
3861
|
+
checked: x,
|
|
3862
3862
|
disabled: p,
|
|
3863
3863
|
onChange: s(n)
|
|
3864
3864
|
}
|
|
@@ -3873,7 +3873,7 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
|
|
|
3873
3873
|
columns: u,
|
|
3874
3874
|
emptyCellValue: p,
|
|
3875
3875
|
selectedRows: b,
|
|
3876
|
-
activeRowId:
|
|
3876
|
+
activeRowId: x,
|
|
3877
3877
|
keyId: $,
|
|
3878
3878
|
onSelectRow: k,
|
|
3879
3879
|
onRowClick: v,
|
|
@@ -3953,7 +3953,7 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
|
|
|
3953
3953
|
noDataPlaceholder: u,
|
|
3954
3954
|
onRetry: p,
|
|
3955
3955
|
...b
|
|
3956
|
-
} = e,
|
|
3956
|
+
} = e, x = Re(() => o.map(({ children: $, options: k, ...v }) => {
|
|
3957
3957
|
const m = v[f];
|
|
3958
3958
|
return /* @__PURE__ */ l.jsx(
|
|
3959
3959
|
kf,
|
|
@@ -3977,7 +3977,7 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
|
|
|
3977
3977
|
imgSrc: t.defaultErrorImgSrc,
|
|
3978
3978
|
onRetry: p
|
|
3979
3979
|
},
|
|
3980
|
-
children: o.length ?
|
|
3980
|
+
children: o.length ? x : u
|
|
3981
3981
|
}
|
|
3982
3982
|
) });
|
|
3983
3983
|
}, Mf = y("footer", {
|
|
@@ -4105,7 +4105,7 @@ const Of = y("div", {
|
|
|
4105
4105
|
};
|
|
4106
4106
|
}, Nf = (e) => {
|
|
4107
4107
|
const { checkboxProps: t, handleSort: n } = Ff(e), { columns: r, gridColumns: o, isSelectable: a, sorting: i, onSelectAllRows: s } = e, c = Re(() => r.map(({ field: d, label: f, sortable: u, align: p }, b) => {
|
|
4108
|
-
const
|
|
4108
|
+
const x = !b, $ = () => !x || !a ? null : /* @__PURE__ */ l.jsx(_f, { children: /* @__PURE__ */ l.jsx(or, { ...t, onChange: s }) });
|
|
4109
4109
|
return /* @__PURE__ */ l.jsx(
|
|
4110
4110
|
Pf,
|
|
4111
4111
|
{
|
|
@@ -4208,7 +4208,7 @@ const Of = y("div", {
|
|
|
4208
4208
|
}, [n, o]);
|
|
4209
4209
|
const p = Hf(t), b = Re(() => f.filter(
|
|
4210
4210
|
(m) => !r.find((S) => S[e] === m[e])
|
|
4211
|
-
).length, [f, r, e]),
|
|
4211
|
+
).length, [f, r, e]), x = be(() => n.length <= 1 ? t.map((m) => ({ ...m, sortable: !1 })) : t, [t, n]), $ = o ? u.current : n, k = (m) => {
|
|
4212
4212
|
if (!i)
|
|
4213
4213
|
return;
|
|
4214
4214
|
if (m.target.checked) {
|
|
@@ -4244,7 +4244,7 @@ const Of = y("div", {
|
|
|
4244
4244
|
uncheckedRowsCount: b,
|
|
4245
4245
|
gridColumns: p,
|
|
4246
4246
|
isSelectable: c,
|
|
4247
|
-
columns:
|
|
4247
|
+
columns: x(),
|
|
4248
4248
|
onSelectAllRows: k
|
|
4249
4249
|
},
|
|
4250
4250
|
bodyProps: {
|
|
@@ -4266,7 +4266,7 @@ const Of = y("div", {
|
|
|
4266
4266
|
minDisplayRows: u = ff,
|
|
4267
4267
|
errorMsg: p,
|
|
4268
4268
|
footer: b,
|
|
4269
|
-
noDataPlaceholder:
|
|
4269
|
+
noDataPlaceholder: x,
|
|
4270
4270
|
isLoading: $,
|
|
4271
4271
|
isError: k,
|
|
4272
4272
|
keyId: v,
|
|
@@ -4277,7 +4277,7 @@ const Of = y("div", {
|
|
|
4277
4277
|
onSort: M,
|
|
4278
4278
|
noDataOptions: C,
|
|
4279
4279
|
onRetry: j
|
|
4280
|
-
} = e, T = t ? zf : ui, V = be(() => $ ? null :
|
|
4280
|
+
} = e, T = t ? zf : ui, V = be(() => $ ? null : x || /* @__PURE__ */ l.jsx(Lf, { ...C }), [x, C, $]);
|
|
4281
4281
|
return /* @__PURE__ */ l.jsxs(Vf, { $maxHeight: f, className: A, children: [
|
|
4282
4282
|
/* @__PURE__ */ l.jsxs(T, { inert: t ? !0 : void 0, children: [
|
|
4283
4283
|
/* @__PURE__ */ l.jsx(
|
|
@@ -4333,7 +4333,7 @@ const Of = y("div", {
|
|
|
4333
4333
|
disabledReason: u,
|
|
4334
4334
|
disabled: p,
|
|
4335
4335
|
loading: b,
|
|
4336
|
-
isBlockingOperation:
|
|
4336
|
+
isBlockingOperation: x,
|
|
4337
4337
|
loadingNote: $,
|
|
4338
4338
|
onClick: k,
|
|
4339
4339
|
...v
|
|
@@ -4534,7 +4534,7 @@ const Of = y("div", {
|
|
|
4534
4534
|
getOptionLabel: n,
|
|
4535
4535
|
onChange: r
|
|
4536
4536
|
}) => {
|
|
4537
|
-
const [o, a] = ge(1), i = Le(!1), s = Le(null), c = (p, b,
|
|
4537
|
+
const [o, a] = ge(1), i = Le(!1), s = Le(null), c = (p, b, x) => {
|
|
4538
4538
|
const $ = n(e[0]);
|
|
4539
4539
|
document.body.appendChild(p);
|
|
4540
4540
|
let k = 0, v = 0;
|
|
@@ -4545,7 +4545,7 @@ const Of = y("div", {
|
|
|
4545
4545
|
if (!O)
|
|
4546
4546
|
throw new Error("Could not find text node");
|
|
4547
4547
|
O.textContent = A, p.appendChild(S);
|
|
4548
|
-
const C = S.getBoundingClientRect().width +
|
|
4548
|
+
const C = S.getBoundingClientRect().width + x;
|
|
4549
4549
|
if (k + C > b)
|
|
4550
4550
|
break;
|
|
4551
4551
|
v += 1, k += C;
|
|
@@ -4555,11 +4555,11 @@ const Of = y("div", {
|
|
|
4555
4555
|
const p = s.current;
|
|
4556
4556
|
if (!p)
|
|
4557
4557
|
throw new Error("Tags container ref is not set");
|
|
4558
|
-
const b = window.getComputedStyle(p),
|
|
4558
|
+
const b = window.getComputedStyle(p), x = Number.parseInt(b.columnGap), $ = p.firstElementChild?.getBoundingClientRect().width || 0, k = p.getBoundingClientRect().width - $, v = p.cloneNode(!0);
|
|
4559
4559
|
for (; v.lastElementChild && v.children.length > 1; )
|
|
4560
4560
|
v.removeChild(v.lastElementChild);
|
|
4561
4561
|
v.style.visibility = "hidden";
|
|
4562
|
-
const m = c(v, k,
|
|
4562
|
+
const m = c(v, k, x);
|
|
4563
4563
|
a(1 + m);
|
|
4564
4564
|
};
|
|
4565
4565
|
Yr(() => {
|
|
@@ -4579,8 +4579,8 @@ const Of = y("div", {
|
|
|
4579
4579
|
return p.observe(s.current), () => p.disconnect();
|
|
4580
4580
|
}, [e]);
|
|
4581
4581
|
const f = (p, b) => {
|
|
4582
|
-
const
|
|
4583
|
-
return { label:
|
|
4582
|
+
const x = n(p), $ = b === o - 1 && o <= e.length;
|
|
4583
|
+
return { label: x, shrinks: $, onDelete: () => {
|
|
4584
4584
|
const v = e?.filter((m) => typeof m == "string" ? m !== p : m[t] !== p[t]);
|
|
4585
4585
|
r(v?.length ? v : []);
|
|
4586
4586
|
} };
|
|
@@ -4680,10 +4680,10 @@ function up({
|
|
|
4680
4680
|
}
|
|
4681
4681
|
};
|
|
4682
4682
|
t?.call({}, $);
|
|
4683
|
-
}, b = i && !(!e || Array.isArray(e) && e.length === 0 || typeof e == "string" && e.length === 0),
|
|
4683
|
+
}, b = i && !(!e || Array.isArray(e) && e.length === 0 || typeof e == "string" && e.length === 0), x = !Ts.count(n);
|
|
4684
4684
|
return {
|
|
4685
4685
|
isOpened: s,
|
|
4686
|
-
isNoData:
|
|
4686
|
+
isNoData: x,
|
|
4687
4687
|
isShowingClearButton: b,
|
|
4688
4688
|
resetButtonRef: d,
|
|
4689
4689
|
openSelect: f,
|
|
@@ -4718,7 +4718,7 @@ function pi({
|
|
|
4718
4718
|
id: u,
|
|
4719
4719
|
onChange: p,
|
|
4720
4720
|
isShowClearButton: b,
|
|
4721
|
-
...
|
|
4721
|
+
...x
|
|
4722
4722
|
}) {
|
|
4723
4723
|
const {
|
|
4724
4724
|
isOpened: $,
|
|
@@ -4729,7 +4729,7 @@ function pi({
|
|
|
4729
4729
|
closeSelect: A,
|
|
4730
4730
|
resetButtonRef: O
|
|
4731
4731
|
} = up({
|
|
4732
|
-
...
|
|
4732
|
+
...x,
|
|
4733
4733
|
children: i,
|
|
4734
4734
|
onChange: p,
|
|
4735
4735
|
isShowClearButton: b
|
|
@@ -4762,7 +4762,7 @@ function pi({
|
|
|
4762
4762
|
/* @__PURE__ */ l.jsxs(
|
|
4763
4763
|
cp,
|
|
4764
4764
|
{
|
|
4765
|
-
...
|
|
4765
|
+
...x,
|
|
4766
4766
|
open: $,
|
|
4767
4767
|
id: u || d,
|
|
4768
4768
|
disabled: s,
|
|
@@ -4869,7 +4869,7 @@ const hi = 20, fp = [20, 50, 100], pp = y("div")`
|
|
|
4869
4869
|
disabled: u,
|
|
4870
4870
|
isShowClearButton: !1,
|
|
4871
4871
|
onChange: o,
|
|
4872
|
-
children: d.map((
|
|
4872
|
+
children: d.map((x) => /* @__PURE__ */ l.jsx(st, { value: x, children: x }, x))
|
|
4873
4873
|
}
|
|
4874
4874
|
)
|
|
4875
4875
|
] }),
|
|
@@ -4978,8 +4978,8 @@ function gi(e) {
|
|
|
4978
4978
|
const c = gn(e.timeZone, e), f = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - c, u = c !== t, p = f - s;
|
|
4979
4979
|
if (u && p) {
|
|
4980
4980
|
Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + p);
|
|
4981
|
-
const b = gn(e.timeZone, e),
|
|
4982
|
-
|
|
4981
|
+
const b = gn(e.timeZone, e), x = c - b;
|
|
4982
|
+
x && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + x), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + x));
|
|
4983
4983
|
}
|
|
4984
4984
|
}
|
|
4985
4985
|
class Pt extends xt {
|
|
@@ -6718,8 +6718,8 @@ function Mg(e, t, n, r, o) {
|
|
|
6718
6718
|
start: i(e),
|
|
6719
6719
|
end: s(e)
|
|
6720
6720
|
}).map((p) => {
|
|
6721
|
-
const b = r.formatMonthDropdown(p, o),
|
|
6722
|
-
return { value:
|
|
6721
|
+
const b = r.formatMonthDropdown(p, o), x = d(p), $ = t && p < a(t) || n && p > a(n) || !1;
|
|
6722
|
+
return { value: x, label: b, disabled: $ };
|
|
6723
6723
|
});
|
|
6724
6724
|
}
|
|
6725
6725
|
function Dg(e, t = {}, n = {}) {
|
|
@@ -6746,10 +6746,10 @@ function Eg(e, t, n, r) {
|
|
|
6746
6746
|
let b = f;
|
|
6747
6747
|
for (; c(b, u) || d(b, u); )
|
|
6748
6748
|
p.push(b), b = i(b, 1);
|
|
6749
|
-
return p.map((
|
|
6750
|
-
const $ = n.formatYearDropdown(
|
|
6749
|
+
return p.map((x) => {
|
|
6750
|
+
const $ = n.formatYearDropdown(x, r);
|
|
6751
6751
|
return {
|
|
6752
|
-
value: s(
|
|
6752
|
+
value: s(x),
|
|
6753
6753
|
label: $,
|
|
6754
6754
|
disabled: !1
|
|
6755
6755
|
};
|
|
@@ -6803,7 +6803,7 @@ function Yg(e, t, { classNames: n, months: r, focused: o, dateLib: a }) {
|
|
|
6803
6803
|
!(e.current instanceof HTMLElement) || // validation required for the animation to work as expected
|
|
6804
6804
|
r.length === 0 || d.length === 0 || r.length !== d.length)
|
|
6805
6805
|
return;
|
|
6806
|
-
const f = a.isSameMonth(r[0].date, d[0].date), u = a.isAfter(r[0].date, d[0].date), p = u ? n[Ke.caption_after_enter] : n[Ke.caption_before_enter], b = u ? n[Ke.weeks_after_enter] : n[Ke.weeks_before_enter],
|
|
6806
|
+
const f = a.isSameMonth(r[0].date, d[0].date), u = a.isAfter(r[0].date, d[0].date), p = u ? n[Ke.caption_after_enter] : n[Ke.caption_before_enter], b = u ? n[Ke.weeks_after_enter] : n[Ke.weeks_before_enter], x = i.current, $ = e.current.cloneNode(!0);
|
|
6807
6807
|
if ($ instanceof HTMLElement ? (gr($).forEach((S) => {
|
|
6808
6808
|
if (!(S instanceof HTMLElement))
|
|
6809
6809
|
return;
|
|
@@ -6816,7 +6816,7 @@ function Yg(e, t, { classNames: n, months: r, focused: o, dateLib: a }) {
|
|
|
6816
6816
|
}), i.current = $) : i.current = null, c.current || f || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
|
|
6817
6817
|
o)
|
|
6818
6818
|
return;
|
|
6819
|
-
const k =
|
|
6819
|
+
const k = x instanceof HTMLElement ? gr(x) : [], v = gr(e.current);
|
|
6820
6820
|
if (v && v.every((m) => m instanceof HTMLElement) && k && k.every((m) => m instanceof HTMLElement)) {
|
|
6821
6821
|
c.current = !0, e.current.style.isolation = "isolate";
|
|
6822
6822
|
const m = zg(e.current);
|
|
@@ -6844,7 +6844,7 @@ function Yg(e, t, { classNames: n, months: r, focused: o, dateLib: a }) {
|
|
|
6844
6844
|
});
|
|
6845
6845
|
}
|
|
6846
6846
|
function Gg(e, t, n, r) {
|
|
6847
|
-
const o = e[0], a = e[e.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: c } = n ?? {}, { addDays: d, differenceInCalendarDays: f, differenceInCalendarMonths: u, endOfBroadcastWeek: p, endOfISOWeek: b, endOfMonth:
|
|
6847
|
+
const o = e[0], a = e[e.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: c } = n ?? {}, { addDays: d, differenceInCalendarDays: f, differenceInCalendarMonths: u, endOfBroadcastWeek: p, endOfISOWeek: b, endOfMonth: x, endOfWeek: $, isAfter: k, startOfBroadcastWeek: v, startOfISOWeek: m, startOfWeek: S } = r, A = c ? v(o, r) : i ? m(o) : S(o), O = c ? p(a, r) : i ? b(x(a)) : $(x(a)), M = f(O, A), C = u(a, o) + 1, j = [];
|
|
6848
6848
|
for (let B = 0; B <= M; B++) {
|
|
6849
6849
|
const N = d(A, B);
|
|
6850
6850
|
if (t && k(N, t))
|
|
@@ -6911,7 +6911,7 @@ class Qg {
|
|
|
6911
6911
|
}
|
|
6912
6912
|
}
|
|
6913
6913
|
function Zg(e, t, n, r) {
|
|
6914
|
-
const { addDays: o, endOfBroadcastWeek: a, endOfISOWeek: i, endOfMonth: s, endOfWeek: c, getISOWeek: d, getWeek: f, startOfBroadcastWeek: u, startOfISOWeek: p, startOfWeek: b } = r,
|
|
6914
|
+
const { addDays: o, endOfBroadcastWeek: a, endOfISOWeek: i, endOfMonth: s, endOfWeek: c, getISOWeek: d, getWeek: f, startOfBroadcastWeek: u, startOfISOWeek: p, startOfWeek: b } = r, x = e.reduce(($, k) => {
|
|
6915
6915
|
const v = n.broadcastCalendar ? u(k, r) : n.ISOWeek ? p(k) : b(k), m = n.broadcastCalendar ? a(k, r) : n.ISOWeek ? i(s(k)) : c(s(k)), S = t.filter((C) => C >= v && C <= m), A = n.broadcastCalendar ? 35 : 42;
|
|
6916
6916
|
if (n.fixedWeeks && S.length < A) {
|
|
6917
6917
|
const C = t.filter((j) => {
|
|
@@ -6926,12 +6926,12 @@ function Zg(e, t, n, r) {
|
|
|
6926
6926
|
}, []), M = new Xg(k, O);
|
|
6927
6927
|
return $.push(M), $;
|
|
6928
6928
|
}, []);
|
|
6929
|
-
return n.reverseMonths ?
|
|
6929
|
+
return n.reverseMonths ? x.reverse() : x;
|
|
6930
6930
|
}
|
|
6931
6931
|
function Jg(e, t) {
|
|
6932
6932
|
let { startMonth: n, endMonth: r } = e;
|
|
6933
|
-
const { startOfYear: o, startOfDay: a, startOfMonth: i, endOfMonth: s, addYears: c, endOfYear: d, newDate: f, today: u } = t, { fromYear: p, toYear: b, fromMonth:
|
|
6934
|
-
!n &&
|
|
6933
|
+
const { startOfYear: o, startOfDay: a, startOfMonth: i, endOfMonth: s, addYears: c, endOfYear: d, newDate: f, today: u } = t, { fromYear: p, toYear: b, fromMonth: x, toMonth: $ } = e;
|
|
6934
|
+
!n && x && (n = x), !n && p && (n = t.newDate(p, 0, 1)), !r && $ && (r = $), !r && b && (r = f(b, 11, 31));
|
|
6935
6935
|
const k = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
|
|
6936
6936
|
return n ? n = i(n) : p ? n = f(p, 0, 1) : !n && k && (n = o(c(e.today ?? u(), -100))), r ? r = s(r) : b ? r = f(b, 11, 31) : !r && k && (r = d(e.today ?? u())), [
|
|
6937
6937
|
n && a(n),
|
|
@@ -6974,7 +6974,7 @@ function nm(e, t) {
|
|
|
6974
6974
|
const M = Ko(e, t);
|
|
6975
6975
|
c(M);
|
|
6976
6976
|
}, [e.timeZone]);
|
|
6977
|
-
const d = qg(s, r, e, t), f = Gg(d, e.endMonth ? a(e.endMonth) : void 0, e, t), u = Zg(d, f, e, t), p = tm(u), b = Ug(u),
|
|
6977
|
+
const d = qg(s, r, e, t), f = Gg(d, e.endMonth ? a(e.endMonth) : void 0, e, t), u = Zg(d, f, e, t), p = tm(u), b = Ug(u), x = em(s, n, e, t), $ = Kg(s, r, e, t), { disableNavigation: k, onMonthChange: v } = e, m = (M) => p.some((C) => C.days.some((j) => j.isEqualTo(M))), S = (M) => {
|
|
6978
6978
|
if (k)
|
|
6979
6979
|
return;
|
|
6980
6980
|
let C = o(M);
|
|
@@ -6986,7 +6986,7 @@ function nm(e, t) {
|
|
|
6986
6986
|
days: b,
|
|
6987
6987
|
navStart: n,
|
|
6988
6988
|
navEnd: r,
|
|
6989
|
-
previousMonth:
|
|
6989
|
+
previousMonth: x,
|
|
6990
6990
|
nextMonth: $,
|
|
6991
6991
|
goToMonth: S,
|
|
6992
6992
|
goToDay: (M) => {
|
|
@@ -7053,14 +7053,14 @@ function $t(e, t, n = Ot) {
|
|
|
7053
7053
|
});
|
|
7054
7054
|
}
|
|
7055
7055
|
function om(e, t, n, r, o, a, i) {
|
|
7056
|
-
const { ISOWeek: s, broadcastCalendar: c } = a, { addDays: d, addMonths: f, addWeeks: u, addYears: p, endOfBroadcastWeek: b, endOfISOWeek:
|
|
7056
|
+
const { ISOWeek: s, broadcastCalendar: c } = a, { addDays: d, addMonths: f, addWeeks: u, addYears: p, endOfBroadcastWeek: b, endOfISOWeek: x, endOfWeek: $, max: k, min: v, startOfBroadcastWeek: m, startOfISOWeek: S, startOfWeek: A } = i;
|
|
7057
7057
|
let M = {
|
|
7058
7058
|
day: d,
|
|
7059
7059
|
week: u,
|
|
7060
7060
|
month: f,
|
|
7061
7061
|
year: p,
|
|
7062
7062
|
startOfWeek: (C) => c ? m(C, i) : s ? S(C) : A(C),
|
|
7063
|
-
endOfWeek: (C) => c ? b(C, i) : s ?
|
|
7063
|
+
endOfWeek: (C) => c ? b(C, i) : s ? x(C) : $(C)
|
|
7064
7064
|
}[e](n, t === "after" ? 1 : -1);
|
|
7065
7065
|
return t === "before" && r ? M = k([r, M]) : t === "after" && o && (M = v([o, M])), M;
|
|
7066
7066
|
}
|
|
@@ -7097,7 +7097,7 @@ function am(e, t, n, r, o) {
|
|
|
7097
7097
|
};
|
|
7098
7098
|
}
|
|
7099
7099
|
function im(e, t, n) {
|
|
7100
|
-
const { disabled: r, hidden: o, modifiers: a, showOutsideDays: i, broadcastCalendar: s, today: c } = t, { isSameDay: d, isSameMonth: f, startOfMonth: u, isBefore: p, endOfMonth: b, isAfter:
|
|
7100
|
+
const { disabled: r, hidden: o, modifiers: a, showOutsideDays: i, broadcastCalendar: s, today: c } = t, { isSameDay: d, isSameMonth: f, startOfMonth: u, isBefore: p, endOfMonth: b, isAfter: x } = n, $ = t.startMonth && u(t.startMonth), k = t.endMonth && b(t.endMonth), v = {
|
|
7101
7101
|
[De.focused]: [],
|
|
7102
7102
|
[De.outside]: [],
|
|
7103
7103
|
[De.disabled]: [],
|
|
@@ -7105,7 +7105,7 @@ function im(e, t, n) {
|
|
|
7105
7105
|
[De.today]: []
|
|
7106
7106
|
}, m = {};
|
|
7107
7107
|
for (const S of e) {
|
|
7108
|
-
const { date: A, displayMonth: O } = S, M = !!(O && !f(A, O)), C = !!($ && p(A, $)), j = !!(k &&
|
|
7108
|
+
const { date: A, displayMonth: O } = S, M = !!(O && !f(A, O)), C = !!($ && p(A, $)), j = !!(k && x(A, k)), T = !!(r && $t(A, r, n)), V = !!(o && $t(A, o, n)) || C || j || // Broadcast calendar will show outside days as default
|
|
7109
7109
|
!s && !i && M || s && i === !1 && M, B = d(A, c ?? n.today());
|
|
7110
7110
|
M && v.outside.push(S), T && v.disabled.push(S), V && v.hidden.push(S), B && v.today.push(S), a && Object.keys(a).forEach((N) => {
|
|
7111
7111
|
const W = a?.[N];
|
|
@@ -7134,10 +7134,10 @@ function im(e, t, n) {
|
|
|
7134
7134
|
};
|
|
7135
7135
|
}
|
|
7136
7136
|
function sm(e, t) {
|
|
7137
|
-
const { selected: n, required: r, onSelect: o } = e, [a, i] = sr(n, o ? n : void 0), s = o ? n : a, { isSameDay: c } = t, d = (b) => s?.some((
|
|
7137
|
+
const { selected: n, required: r, onSelect: o } = e, [a, i] = sr(n, o ? n : void 0), s = o ? n : a, { isSameDay: c } = t, d = (b) => s?.some((x) => c(x, b)) ?? !1, { min: f, max: u } = e;
|
|
7138
7138
|
return {
|
|
7139
7139
|
selected: s,
|
|
7140
|
-
select: (b,
|
|
7140
|
+
select: (b, x, $) => {
|
|
7141
7141
|
let k = [...s ?? []];
|
|
7142
7142
|
if (d(b)) {
|
|
7143
7143
|
if (s?.length === f || r && s?.length === 1)
|
|
@@ -7145,7 +7145,7 @@ function sm(e, t) {
|
|
|
7145
7145
|
k = s?.filter((v) => !c(v, b));
|
|
7146
7146
|
} else
|
|
7147
7147
|
s?.length === u ? k = [b] : k = [...k, b];
|
|
7148
|
-
return o || i(k), o?.(k, b,
|
|
7148
|
+
return o || i(k), o?.(k, b, x, $), k;
|
|
7149
7149
|
},
|
|
7150
7150
|
isSelected: d
|
|
7151
7151
|
};
|
|
@@ -7215,9 +7215,9 @@ function dm(e, t) {
|
|
|
7215
7215
|
const { disabled: n, excludeDisabled: r, selected: o, required: a, onSelect: i } = e, [s, c] = sr(o, i ? o : void 0), d = i ? o : s;
|
|
7216
7216
|
return {
|
|
7217
7217
|
selected: d,
|
|
7218
|
-
select: (p, b,
|
|
7218
|
+
select: (p, b, x) => {
|
|
7219
7219
|
const { min: $, max: k } = e, v = p ? lm(p, d, $, k, a, t) : void 0;
|
|
7220
|
-
return r && n && v?.from && v.to && um({ from: v.from, to: v.to }, n, t) && (v.from = p, v.to = void 0), i || c(v), i?.(v, p, b,
|
|
7220
|
+
return r && n && v?.from && v.to && um({ from: v.from, to: v.to }, n, t) && (v.from = p, v.to = void 0), i || c(v), i?.(v, p, b, x), v;
|
|
7221
7221
|
},
|
|
7222
7222
|
isSelected: (p) => d && St(d, p, !1, t)
|
|
7223
7223
|
};
|
|
@@ -7227,8 +7227,8 @@ function fm(e, t) {
|
|
|
7227
7227
|
return {
|
|
7228
7228
|
selected: s,
|
|
7229
7229
|
select: (u, p, b) => {
|
|
7230
|
-
let
|
|
7231
|
-
return !r && s && s && c(u, s) && (
|
|
7230
|
+
let x = u;
|
|
7231
|
+
return !r && s && s && c(u, s) && (x = void 0), o || i(x), o?.(x, u, p, b), x;
|
|
7232
7232
|
},
|
|
7233
7233
|
isSelected: (u) => s ? c(s, u) : !1
|
|
7234
7234
|
};
|
|
@@ -7279,7 +7279,7 @@ function hm(e) {
|
|
|
7279
7279
|
e.formatters,
|
|
7280
7280
|
e.labels,
|
|
7281
7281
|
e.classNames
|
|
7282
|
-
]), { captionLayout: s, mode: c, onDayBlur: d, onDayClick: f, onDayFocus: u, onDayKeyDown: p, onDayMouseEnter: b, onDayMouseLeave:
|
|
7282
|
+
]), { captionLayout: s, mode: c, onDayBlur: d, onDayClick: f, onDayFocus: u, onDayKeyDown: p, onDayMouseEnter: b, onDayMouseLeave: x, onNextClick: $, onPrevClick: k, showWeekNumber: v, styles: m } = e, { formatCaption: S, formatDay: A, formatMonthDropdown: O, formatWeekNumber: M, formatWeekNumberHeader: C, formatWeekdayName: j, formatYearDropdown: T } = n, V = nm(e, o), { days: B, months: N, navStart: W, navEnd: U, previousMonth: Y, nextMonth: L, goToMonth: Z } = V, oe = im(B, e, o), { isSelected: te, select: E, selected: _ } = pm(e, o) ?? {}, { blur: H, focused: G, isFocusTarget: le, moveFocus: se, setFocused: re } = am(e, V, oe, te ?? (() => !1), o), { labelDayButton: we, labelGridcell: ae, labelGrid: Se, labelMonthDropdown: Ee, labelNav: Ue, labelWeekday: lt, labelWeekNumber: Wt, labelWeekNumberHeader: q, labelYearDropdown: J } = r, $e = Re(() => Og(o, e.ISOWeek), [o, e.ISOWeek]), ke = c !== void 0 || f !== void 0, Ne = be(() => {
|
|
7283
7283
|
Y && (Z(Y), k?.(Y));
|
|
7284
7284
|
}, [Y, Z, k]), ie = be(() => {
|
|
7285
7285
|
L && (Z(L), $?.(L));
|
|
@@ -7289,7 +7289,7 @@ function hm(e) {
|
|
|
7289
7289
|
re(Q), u?.(Q.date, de, ce);
|
|
7290
7290
|
}, [u, re]), h = be((Q, de) => (ce) => {
|
|
7291
7291
|
H(), d?.(Q.date, de, ce);
|
|
7292
|
-
}, [H, d]),
|
|
7292
|
+
}, [H, d]), w = be((Q, de) => (ce) => {
|
|
7293
7293
|
const qe = {
|
|
7294
7294
|
ArrowLeft: ["day", e.dir === "rtl" ? "after" : "before"],
|
|
7295
7295
|
ArrowRight: ["day", e.dir === "rtl" ? "before" : "after"],
|
|
@@ -7309,8 +7309,8 @@ function hm(e) {
|
|
|
7309
7309
|
}, [se, p, e.dir]), D = be((Q, de) => (ce) => {
|
|
7310
7310
|
b?.(Q.date, de, ce);
|
|
7311
7311
|
}, [b]), I = be((Q, de) => (ce) => {
|
|
7312
|
-
|
|
7313
|
-
}, [
|
|
7312
|
+
x?.(Q.date, de, ce);
|
|
7313
|
+
}, [x]), F = be((Q) => (de) => {
|
|
7314
7314
|
const ce = Number(de.target.value), qe = o.setMonth(o.startOfMonth(Q), ce);
|
|
7315
7315
|
Z(qe);
|
|
7316
7316
|
}, [o, Z]), P = be((Q) => (de) => {
|
|
@@ -7397,7 +7397,7 @@ function hm(e) {
|
|
|
7397
7397
|
fe[ht.range_start] = !!(Oe && Pe && o.isSameDay(ot, Oe)), fe[ht.range_end] = !!(Oe && Pe && o.isSameDay(ot, Pe)), fe[ht.range_middle] = St(_, ot, !0, o);
|
|
7398
7398
|
}
|
|
7399
7399
|
const Fn = Dg(fe, m, e.modifiersStyles), Nn = Hh(fe, i, e.modifiersClassNames), ee = !ke && !fe.hidden ? ae(ot, fe, o.options, o) : void 0;
|
|
7400
|
-
return g.createElement(t.Day, { key: `${o.format(ot, "yyyy-MM-dd")}_${o.format(ve.displayMonth, "yyyy-MM")}`, day: ve, modifiers: fe, className: Nn.join(" "), style: Fn, role: "gridcell", "aria-selected": fe.selected || void 0, "aria-label": ee, "data-day": o.format(ot, "yyyy-MM-dd"), "data-month": ve.outside ? o.format(ot, "yyyy-MM") : void 0, "data-selected": fe.selected || void 0, "data-disabled": fe.disabled || void 0, "data-hidden": fe.hidden || void 0, "data-outside": ve.outside || void 0, "data-focused": fe.focused || void 0, "data-today": fe.today || void 0 }, !fe.hidden && ke ? g.createElement(t.DayButton, { className: i[X.DayButton], style: m?.[X.DayButton], type: "button", day: ve, modifiers: fe, disabled: fe.disabled || void 0, tabIndex: le(ve) ? 0 : -1, "aria-label": we(ot, fe, o.options, o), onClick: Ie(ve, fe), onBlur: h(ve, fe), onFocus: ct(ve, fe), onKeyDown:
|
|
7400
|
+
return g.createElement(t.Day, { key: `${o.format(ot, "yyyy-MM-dd")}_${o.format(ve.displayMonth, "yyyy-MM")}`, day: ve, modifiers: fe, className: Nn.join(" "), style: Fn, role: "gridcell", "aria-selected": fe.selected || void 0, "aria-label": ee, "data-day": o.format(ot, "yyyy-MM-dd"), "data-month": ve.outside ? o.format(ot, "yyyy-MM") : void 0, "data-selected": fe.selected || void 0, "data-disabled": fe.disabled || void 0, "data-hidden": fe.hidden || void 0, "data-outside": ve.outside || void 0, "data-focused": fe.focused || void 0, "data-today": fe.today || void 0 }, !fe.hidden && ke ? g.createElement(t.DayButton, { className: i[X.DayButton], style: m?.[X.DayButton], type: "button", day: ve, modifiers: fe, disabled: fe.disabled || void 0, tabIndex: le(ve) ? 0 : -1, "aria-label": we(ot, fe, o.options, o), onClick: Ie(ve, fe), onBlur: h(ve, fe), onFocus: ct(ve, fe), onKeyDown: w(ve, fe), onMouseEnter: D(ve, fe), onMouseLeave: I(ve, fe) }, A(ot, o.options, o)) : !fe.hidden && A(ve.date, o.options, o));
|
|
7401
7401
|
})
|
|
7402
7402
|
)))
|
|
7403
7403
|
)
|
|
@@ -8438,7 +8438,7 @@ var yn = function(e) {
|
|
|
8438
8438
|
this.register = function(a) {
|
|
8439
8439
|
var i;
|
|
8440
8440
|
if (ua.includes(a.type)) {
|
|
8441
|
-
var s = (i = a._wrapperState) !== null && i !== void 0 ? i : {}, c = s.initialValue, d = c === void 0 ? "" : c, f = s.controlled, u = f !== void 0 && f, p = n({ initialValue: a.value || d, controlled: u }), b = p.value,
|
|
8441
|
+
var s = (i = a._wrapperState) !== null && i !== void 0 ? i : {}, c = s.initialValue, d = c === void 0 ? "" : c, f = s.controlled, u = f !== void 0 && f, p = n({ initialValue: a.value || d, controlled: u }), b = p.value, x = p.options, $ = { value: b, options: x, fallbackOptions: x }, k = { id: -1, cachedId: -1 }, v = { value: "", selectionStart: 0, selectionEnd: 0 }, m = Object.getOwnPropertyDescriptor("_valueTracker" in a ? a : HTMLInputElement.prototype, "value");
|
|
8442
8442
|
Object.defineProperty(a, "value", la(la({}, m), {}, { set: function(M) {
|
|
8443
8443
|
var C;
|
|
8444
8444
|
v.value = M, m == null || (C = m.set) === null || C === void 0 || C.call(a, M);
|
|
@@ -8500,13 +8500,13 @@ var ts = function(e) {
|
|
|
8500
8500
|
return ry(this, t), (n = ny(this, t, [{ init: function(o) {
|
|
8501
8501
|
var a = o.initialValue, i = o.controlled, s = Zt(r), c = s.mask, d = s.replacement, f = s.separate, u = s.showMask;
|
|
8502
8502
|
return a = i || a ? a : u ? c : "", process.env.NODE_ENV !== "production" && function(p) {
|
|
8503
|
-
var b = p.initialValue,
|
|
8504
|
-
b.length >
|
|
8503
|
+
var b = p.initialValue, x = p.mask, $ = p.replacement;
|
|
8504
|
+
b.length > x.length && console.error(br(Error)("The initialized value of the `value` or `defaultValue` property is longer than the value specified in the `mask` property. Check the correctness of the initialized value in the specified property.", 'Invalid value: "'.concat(b, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
|
|
8505
8505
|
var k = Object.keys($).filter(function(O) {
|
|
8506
8506
|
return O.length > 1;
|
|
8507
8507
|
});
|
|
8508
8508
|
k.length > 0 && console.error(br(Error)("Object keys in the `replacement` property are longer than one character. Replacement keys must be one character long. Check the correctness of the value in the specified property.", "Invalid keys: ".concat(k.join(", "), "."), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
|
|
8509
|
-
for (var v =
|
|
8509
|
+
for (var v = x.slice(0, b.length), m = -1, S = 0; S < v.length; S++) {
|
|
8510
8510
|
var A = Object.prototype.hasOwnProperty.call($, v[S]);
|
|
8511
8511
|
if (!(v[S] === b[S] || A && $[v[S]].test(b[S]))) {
|
|
8512
8512
|
m = S;
|
|
@@ -8516,7 +8516,7 @@ var ts = function(e) {
|
|
|
8516
8516
|
m !== -1 && console.error(br(Error)("An invalid character was found in the initialized property value `value` or `defaultValue` (index: ".concat(m, "). Check the correctness of the initialized value in the specified property."), 'Invalid value: "'.concat(b, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
|
|
8517
8517
|
}({ initialValue: a, mask: c, replacement: d }), { value: a, options: { mask: c, replacement: d, separate: f } };
|
|
8518
8518
|
}, tracking: function(o) {
|
|
8519
|
-
var a = o.inputType, i = o.previousValue, s = o.previousOptions, c = o.addedValue, d = o.changeStart, f = o.changeEnd, u = Zt(r), p = u.track, b = u.modify,
|
|
8519
|
+
var a = o.inputType, i = o.previousValue, s = o.previousOptions, c = o.addedValue, d = o.changeStart, f = o.changeEnd, u = Zt(r), p = u.track, b = u.modify, x = iy(u, yy), $ = x.mask, k = x.replacement, v = x.showMask, m = x.separate, S = Ln(Ln({}, a === "insert" ? { inputType: a, data: c } : { inputType: a, data: null }), {}, { value: i, selectionStart: d, selectionEnd: f }), A = p?.(S);
|
|
8520
8520
|
if (A === !1) throw new yn("Custom tracking stop.");
|
|
8521
8521
|
A === null ? c = "" : A !== !0 && A !== void 0 && (c = A);
|
|
8522
8522
|
var O = b?.(S);
|
|
@@ -8591,7 +8591,7 @@ const ns = ({ maskProps: e, ...t }) => {
|
|
|
8591
8591
|
size: u,
|
|
8592
8592
|
name: p,
|
|
8593
8593
|
...b
|
|
8594
|
-
} = e, [
|
|
8594
|
+
} = e, [x, $] = ge(null), [k, v] = ge(null), [m, S] = ge(/* @__PURE__ */ new Date()), [A, O] = ge(""), M = () => a && i ? "dropdown" : a ? "dropdown-months" : i ? "dropdown-years" : "label", C = (B) => {
|
|
8595
8595
|
v(B.currentTarget);
|
|
8596
8596
|
}, j = () => {
|
|
8597
8597
|
v(null);
|
|
@@ -8640,8 +8640,8 @@ const ns = ({ maskProps: e, ...t }) => {
|
|
|
8640
8640
|
showMask: !0
|
|
8641
8641
|
},
|
|
8642
8642
|
placeholder: "дд.мм.гггг",
|
|
8643
|
-
error: !!
|
|
8644
|
-
helperText:
|
|
8643
|
+
error: !!x || s,
|
|
8644
|
+
helperText: x || c
|
|
8645
8645
|
}
|
|
8646
8646
|
),
|
|
8647
8647
|
/* @__PURE__ */ l.jsx(
|
|
@@ -8886,7 +8886,7 @@ const Py = (e) => /* @__PURE__ */ l.jsx(Nt, { visibleLastSymbolsCount: 4, ...e }
|
|
|
8886
8886
|
}) => {
|
|
8887
8887
|
const a = be(
|
|
8888
8888
|
(s, c) => {
|
|
8889
|
-
const { renderValue: d, color: f, canCopy: u, copyPosition: p, variant: b, copyText:
|
|
8889
|
+
const { renderValue: d, color: f, canCopy: u, copyPosition: p, variant: b, copyText: x } = c;
|
|
8890
8890
|
if (d)
|
|
8891
8891
|
return d(s, c);
|
|
8892
8892
|
if (b === "tag")
|
|
@@ -8900,7 +8900,7 @@ const Py = (e) => /* @__PURE__ */ l.jsx(Nt, { visibleLastSymbolsCount: 4, ...e }
|
|
|
8900
8900
|
$isCopy: u,
|
|
8901
8901
|
color: f,
|
|
8902
8902
|
copyPosition: p,
|
|
8903
|
-
copyText:
|
|
8903
|
+
copyText: x,
|
|
8904
8904
|
children: /* @__PURE__ */ l.jsx(Py, { tooltipProps: $, children: s })
|
|
8905
8905
|
}
|
|
8906
8906
|
);
|
|
@@ -9129,7 +9129,7 @@ function s0({ containerRef: e, inputRef: t, pushPasswordManagerStrategy: n, isFo
|
|
|
9129
9129
|
let [o, a] = K.useState(!1), [i, s] = K.useState(!1), [c, d] = K.useState(!1), f = K.useMemo(() => n === "none" ? !1 : (n === "increase-width" || n === "experimental-no-flickering") && o && i, [o, i, n]), u = K.useCallback(() => {
|
|
9130
9130
|
let p = e.current, b = t.current;
|
|
9131
9131
|
if (!p || !b || c || n === "none") return;
|
|
9132
|
-
let
|
|
9132
|
+
let x = p, $ = x.getBoundingClientRect().left + x.offsetWidth, k = x.getBoundingClientRect().top + x.offsetHeight / 2, v = $ - o0, m = k;
|
|
9133
9133
|
document.querySelectorAll(i0).length === 0 && document.elementFromPoint(v, m) === p || (a(!0), d(!0));
|
|
9134
9134
|
}, [e, t, c, n]);
|
|
9135
9135
|
return K.useEffect(() => {
|
|
@@ -9140,23 +9140,23 @@ function s0({ containerRef: e, inputRef: t, pushPasswordManagerStrategy: n, isFo
|
|
|
9140
9140
|
s($ >= is);
|
|
9141
9141
|
}
|
|
9142
9142
|
b();
|
|
9143
|
-
let
|
|
9143
|
+
let x = setInterval(b, 1e3);
|
|
9144
9144
|
return () => {
|
|
9145
|
-
clearInterval(
|
|
9145
|
+
clearInterval(x);
|
|
9146
9146
|
};
|
|
9147
9147
|
}, [e, n]), K.useEffect(() => {
|
|
9148
9148
|
let p = r || document.activeElement === t.current;
|
|
9149
9149
|
if (n === "none" || !p) return;
|
|
9150
|
-
let b = setTimeout(u, 0),
|
|
9150
|
+
let b = setTimeout(u, 0), x = setTimeout(u, 2e3), $ = setTimeout(u, 5e3), k = setTimeout(() => {
|
|
9151
9151
|
d(!0);
|
|
9152
9152
|
}, 6e3);
|
|
9153
9153
|
return () => {
|
|
9154
|
-
clearTimeout(b), clearTimeout(
|
|
9154
|
+
clearTimeout(b), clearTimeout(x), clearTimeout($), clearTimeout(k);
|
|
9155
9155
|
};
|
|
9156
9156
|
}, [t, r, n, u]), { hasPWMBadge: o, willPushPWMBadge: f, PWM_BADGE_SPACE_WIDTH: a0 };
|
|
9157
9157
|
}
|
|
9158
9158
|
var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
|
|
9159
|
-
var n = e, { value: r, onChange: o, maxLength: a, textAlign: i = "left", pattern: s, placeholder: c, inputMode: d = "numeric", onComplete: f, pushPasswordManagerStrategy: u = "increase-width", pasteTransformer: p, containerClassName: b, noScriptCSSFallback:
|
|
9159
|
+
var n = e, { value: r, onChange: o, maxLength: a, textAlign: i = "left", pattern: s, placeholder: c, inputMode: d = "numeric", onComplete: f, pushPasswordManagerStrategy: u = "increase-width", pasteTransformer: p, containerClassName: b, noScriptCSSFallback: x = c0, render: $, children: k } = n, v = t0(n, ["value", "onChange", "maxLength", "textAlign", "pattern", "placeholder", "inputMode", "onComplete", "pushPasswordManagerStrategy", "pasteTransformer", "containerClassName", "noScriptCSSFallback", "render", "children"]), m, S, A, O, M;
|
|
9160
9160
|
let [C, j] = K.useState(typeof v.defaultValue == "string" ? v.defaultValue : ""), T = r ?? C, V = r0(T), B = K.useCallback((q) => {
|
|
9161
9161
|
o?.(q), j(q);
|
|
9162
9162
|
}, [o]), N = K.useMemo(() => s ? typeof s == "string" ? new RegExp(s) : s : null, [s]), W = K.useRef(null), U = K.useRef(null), Y = K.useRef({ value: T, onChange: B, isIOS: typeof window < "u" && ((S = (m = window?.CSS) == null ? void 0 : m.supports) == null ? void 0 : S.call(m, "-webkit-touch-callout", "none")) }), L = K.useRef({ prev: [(A = W.current) == null ? void 0 : A.selectionStart, (O = W.current) == null ? void 0 : O.selectionEnd, (M = W.current) == null ? void 0 : M.selectionDirection] });
|
|
@@ -9169,14 +9169,14 @@ var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
|
|
|
9169
9169
|
H(null), le(null);
|
|
9170
9170
|
return;
|
|
9171
9171
|
}
|
|
9172
|
-
let ie = q.selectionStart, Ie = q.selectionEnd, ct = q.selectionDirection, h = q.maxLength,
|
|
9173
|
-
if (
|
|
9174
|
-
let Ce = ie === Ie, rt = ie ===
|
|
9172
|
+
let ie = q.selectionStart, Ie = q.selectionEnd, ct = q.selectionDirection, h = q.maxLength, w = q.value, D = L.current.prev, I = -1, F = -1, P;
|
|
9173
|
+
if (w.length !== 0 && ie !== null && Ie !== null) {
|
|
9174
|
+
let Ce = ie === Ie, rt = ie === w.length && w.length < h;
|
|
9175
9175
|
if (Ce && !rt) {
|
|
9176
9176
|
let Q = ie;
|
|
9177
9177
|
if (Q === 0) I = 0, F = 1, P = "forward";
|
|
9178
9178
|
else if (Q === h) I = Q - 1, F = Q, P = "backward";
|
|
9179
|
-
else if (h > 1 &&
|
|
9179
|
+
else if (h > 1 && w.length > 1) {
|
|
9180
9180
|
let de = 0;
|
|
9181
9181
|
if (D[0] !== null && D[1] !== null) {
|
|
9182
9182
|
P = Q < D[1] ? "backward" : "forward";
|
|
@@ -9241,8 +9241,8 @@ var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
|
|
|
9241
9241
|
let Ie = (J = W.current) == null ? void 0 : J.selectionStart, ct = ($e = W.current) == null ? void 0 : $e.selectionEnd, h = (Ie !== ct ? T.slice(0, Ie) + ie + T.slice(ct) : T.slice(0, Ie) + ie + T.slice(Ie)).slice(0, a);
|
|
9242
9242
|
if (h.length > 0 && N && !N.test(h)) return;
|
|
9243
9243
|
ke.value = h, B(h);
|
|
9244
|
-
let
|
|
9245
|
-
ke.setSelectionRange(
|
|
9244
|
+
let w = Math.min(h.length, a - 1), D = h.length;
|
|
9245
|
+
ke.setSelectionRange(w, D), H(w), le(D);
|
|
9246
9246
|
}, [a, B, N, T]), Se = K.useMemo(() => ({ position: "relative", cursor: v.disabled ? "default" : "text", userSelect: "none", WebkitUserSelect: "none", pointerEvents: "none" }), [v.disabled]), Ee = K.useMemo(() => ({ position: "absolute", inset: 0, width: se.willPushPWMBadge ? `calc(100% + ${se.PWM_BADGE_SPACE_WIDTH})` : "100%", clipPath: se.willPushPWMBadge ? `inset(0 ${se.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0, height: "100%", display: "flex", textAlign: i, opacity: "1", color: "transparent", pointerEvents: "all", background: "transparent", caretColor: "transparent", border: "0 solid transparent", outline: "0 solid transparent", boxShadow: "none", lineHeight: "1", letterSpacing: "-.5em", fontSize: "var(--root-height)", fontFamily: "monospace", fontVariantNumeric: "tabular-nums" }), [se.PWM_BADGE_SPACE_WIDTH, se.willPushPWMBadge, i]), Ue = K.useMemo(() => K.createElement("input", e0(Ky({ autoComplete: v.autoComplete || "one-time-code" }, v), { "data-input-otp": !0, "data-input-otp-placeholder-shown": T.length === 0 || void 0, "data-input-otp-mss": _, "data-input-otp-mse": G, inputMode: d, pattern: N?.source, "aria-placeholder": c, style: Ee, maxLength: a, value: T, ref: W, onPaste: (q) => {
|
|
9247
9247
|
var J;
|
|
9248
9248
|
ae(q), (J = v.onPaste) == null || J.call(v, q);
|
|
@@ -9263,7 +9263,7 @@ var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
|
|
|
9263
9263
|
let ke = te && _ !== null && G !== null && (_ === G && J === _ || J >= _ && J < G), Ne = T[J] !== void 0 ? T[J] : null, ie = T[0] !== void 0 ? null : ($e = c?.[J]) != null ? $e : null;
|
|
9264
9264
|
return { char: Ne, placeholderChar: ie, isActive: ke, hasFakeCaret: ke && Ne === null };
|
|
9265
9265
|
}), isFocused: te, isHovering: !v.disabled && Z }), [te, Z, a, G, _, v.disabled, T]), Wt = K.useMemo(() => $ ? $(lt) : K.createElement(l0.Provider, { value: lt }, k), [k, lt, $]);
|
|
9266
|
-
return K.createElement(K.Fragment, null,
|
|
9266
|
+
return K.createElement(K.Fragment, null, x !== null && K.createElement("noscript", null, K.createElement("style", null, x)), K.createElement("div", { ref: U, "data-input-otp-container": !0, style: Se, className: b }, Wt, K.createElement("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" } }, Ue)));
|
|
9267
9267
|
});
|
|
9268
9268
|
ss.displayName = "Input";
|
|
9269
9269
|
function dn(e, t) {
|
|
@@ -9674,36 +9674,36 @@ class _0 {
|
|
|
9674
9674
|
});
|
|
9675
9675
|
else if (N0(d) && !d.ok) {
|
|
9676
9676
|
a = !1;
|
|
9677
|
-
const u = typeof n.error == "function" ? await n.error(`HTTP error! status: ${d.status}`) : n.error, p = typeof n.description == "function" ? await n.description(`HTTP error! status: ${d.status}`) : n.description,
|
|
9677
|
+
const u = typeof n.error == "function" ? await n.error(`HTTP error! status: ${d.status}`) : n.error, p = typeof n.description == "function" ? await n.description(`HTTP error! status: ${d.status}`) : n.description, x = typeof u == "object" && !g.isValidElement(u) ? u : {
|
|
9678
9678
|
message: u
|
|
9679
9679
|
};
|
|
9680
9680
|
this.create({
|
|
9681
9681
|
id: r,
|
|
9682
9682
|
type: "error",
|
|
9683
9683
|
description: p,
|
|
9684
|
-
...
|
|
9684
|
+
...x
|
|
9685
9685
|
});
|
|
9686
9686
|
} else if (d instanceof Error) {
|
|
9687
9687
|
a = !1;
|
|
9688
|
-
const u = typeof n.error == "function" ? await n.error(d) : n.error, p = typeof n.description == "function" ? await n.description(d) : n.description,
|
|
9688
|
+
const u = typeof n.error == "function" ? await n.error(d) : n.error, p = typeof n.description == "function" ? await n.description(d) : n.description, x = typeof u == "object" && !g.isValidElement(u) ? u : {
|
|
9689
9689
|
message: u
|
|
9690
9690
|
};
|
|
9691
9691
|
this.create({
|
|
9692
9692
|
id: r,
|
|
9693
9693
|
type: "error",
|
|
9694
9694
|
description: p,
|
|
9695
|
-
...
|
|
9695
|
+
...x
|
|
9696
9696
|
});
|
|
9697
9697
|
} else if (n.success !== void 0) {
|
|
9698
9698
|
a = !1;
|
|
9699
|
-
const u = typeof n.success == "function" ? await n.success(d) : n.success, p = typeof n.description == "function" ? await n.description(d) : n.description,
|
|
9699
|
+
const u = typeof n.success == "function" ? await n.success(d) : n.success, p = typeof n.description == "function" ? await n.description(d) : n.description, x = typeof u == "object" && !g.isValidElement(u) ? u : {
|
|
9700
9700
|
message: u
|
|
9701
9701
|
};
|
|
9702
9702
|
this.create({
|
|
9703
9703
|
id: r,
|
|
9704
9704
|
type: "success",
|
|
9705
9705
|
description: p,
|
|
9706
|
-
...
|
|
9706
|
+
...x
|
|
9707
9707
|
});
|
|
9708
9708
|
}
|
|
9709
9709
|
}).catch(async (d) => {
|
|
@@ -9775,7 +9775,7 @@ function q0(e) {
|
|
|
9775
9775
|
}
|
|
9776
9776
|
const X0 = (e) => {
|
|
9777
9777
|
var t, n, r, o, a, i, s, c, d;
|
|
9778
|
-
const { invert: f, toast: u, unstyled: p, interacting: b, setHeights:
|
|
9778
|
+
const { invert: f, toast: u, unstyled: p, interacting: b, setHeights: x, visibleToasts: $, heights: k, index: v, toasts: m, expanded: S, removeToast: A, defaultRichColors: O, closeButton: M, style: C, cancelButtonStyle: j, actionButtonStyle: T, className: V = "", descriptionClassName: B = "", duration: N, position: W, gap: U, expandByDefault: Y, classNames: L, icons: Z, closeButtonAriaLabel: oe = "Close toast" } = e, [te, E] = g.useState(null), [_, H] = g.useState(null), [G, le] = g.useState(!1), [se, re] = g.useState(!1), [we, ae] = g.useState(!1), [Se, Ee] = g.useState(!1), [Ue, lt] = g.useState(!1), [Wt, q] = g.useState(0), [J, $e] = g.useState(0), ke = g.useRef(u.duration || N || ga), Ne = g.useRef(null), ie = g.useRef(null), Ie = v === 0, ct = v + 1 <= $, h = u.type, w = u.dismissible !== !1, D = u.className || "", I = u.descriptionClassName || "", F = g.useMemo(() => k.findIndex((ee) => ee.toastId === u.id) || 0, [
|
|
9779
9779
|
k,
|
|
9780
9780
|
u.id
|
|
9781
9781
|
]), P = g.useMemo(() => {
|
|
@@ -9804,24 +9804,24 @@ const X0 = (e) => {
|
|
|
9804
9804
|
const ee = ie.current;
|
|
9805
9805
|
if (ee) {
|
|
9806
9806
|
const Oe = ee.getBoundingClientRect().height;
|
|
9807
|
-
return $e(Oe),
|
|
9807
|
+
return $e(Oe), x((Pe) => [
|
|
9808
9808
|
{
|
|
9809
9809
|
toastId: u.id,
|
|
9810
9810
|
height: Oe,
|
|
9811
9811
|
position: u.position
|
|
9812
9812
|
},
|
|
9813
9813
|
...Pe
|
|
9814
|
-
]), () =>
|
|
9814
|
+
]), () => x((Pe) => Pe.filter((Je) => Je.toastId !== u.id));
|
|
9815
9815
|
}
|
|
9816
9816
|
}, [
|
|
9817
|
-
|
|
9817
|
+
x,
|
|
9818
9818
|
u.id
|
|
9819
9819
|
]), g.useLayoutEffect(() => {
|
|
9820
9820
|
if (!G) return;
|
|
9821
9821
|
const ee = ie.current, Oe = ee.style.height;
|
|
9822
9822
|
ee.style.height = "auto";
|
|
9823
9823
|
const Pe = ee.getBoundingClientRect().height;
|
|
9824
|
-
ee.style.height = Oe, $e(Pe),
|
|
9824
|
+
ee.style.height = Oe, $e(Pe), x((Je) => Je.find((Be) => Be.toastId === u.id) ? Je.map((Be) => Be.toastId === u.id ? {
|
|
9825
9825
|
...Be,
|
|
9826
9826
|
height: Pe
|
|
9827
9827
|
} : Be) : [
|
|
@@ -9836,17 +9836,17 @@ const X0 = (e) => {
|
|
|
9836
9836
|
G,
|
|
9837
9837
|
u.title,
|
|
9838
9838
|
u.description,
|
|
9839
|
-
|
|
9839
|
+
x,
|
|
9840
9840
|
u.id
|
|
9841
9841
|
]);
|
|
9842
9842
|
const ve = g.useCallback(() => {
|
|
9843
|
-
re(!0), q(ue.current),
|
|
9843
|
+
re(!0), q(ue.current), x((ee) => ee.filter((Oe) => Oe.toastId !== u.id)), setTimeout(() => {
|
|
9844
9844
|
A(u);
|
|
9845
9845
|
}, U0);
|
|
9846
9846
|
}, [
|
|
9847
9847
|
u,
|
|
9848
9848
|
A,
|
|
9849
|
-
|
|
9849
|
+
x,
|
|
9850
9850
|
ue
|
|
9851
9851
|
]);
|
|
9852
9852
|
g.useEffect(() => {
|
|
@@ -9909,7 +9909,7 @@ const X0 = (e) => {
|
|
|
9909
9909
|
"data-index": v,
|
|
9910
9910
|
"data-front": Ie,
|
|
9911
9911
|
"data-swiping": we,
|
|
9912
|
-
"data-dismissible":
|
|
9912
|
+
"data-dismissible": w,
|
|
9913
9913
|
"data-type": h,
|
|
9914
9914
|
"data-invert": He,
|
|
9915
9915
|
"data-swipe-out": Se,
|
|
@@ -9928,14 +9928,14 @@ const X0 = (e) => {
|
|
|
9928
9928
|
ae(!1), E(null), rt.current = null;
|
|
9929
9929
|
},
|
|
9930
9930
|
onPointerDown: (ee) => {
|
|
9931
|
-
ut || !
|
|
9931
|
+
ut || !w || (Ne.current = /* @__PURE__ */ new Date(), q(ue.current), ee.target.setPointerCapture(ee.pointerId), ee.target.tagName !== "BUTTON" && (ae(!0), rt.current = {
|
|
9932
9932
|
x: ee.clientX,
|
|
9933
9933
|
y: ee.clientY
|
|
9934
9934
|
}));
|
|
9935
9935
|
},
|
|
9936
9936
|
onPointerUp: () => {
|
|
9937
9937
|
var ee, Oe, Pe;
|
|
9938
|
-
if (Se || !
|
|
9938
|
+
if (Se || !w) return;
|
|
9939
9939
|
rt.current = null;
|
|
9940
9940
|
const Je = Number(((ee = ie.current) == null ? void 0 : ee.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), Wn = Number(((Oe = ie.current) == null ? void 0 : Oe.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), Be = (/* @__PURE__ */ new Date()).getTime() - ((Pe = Ne.current) == null ? void 0 : Pe.getTime()), at = te === "x" ? Je : Wn, In = Math.abs(at) / Be;
|
|
9941
9941
|
if (Math.abs(at) >= G0 || In > 0.11) {
|
|
@@ -9949,7 +9949,7 @@ const X0 = (e) => {
|
|
|
9949
9949
|
},
|
|
9950
9950
|
onPointerMove: (ee) => {
|
|
9951
9951
|
var Oe, Pe, Je;
|
|
9952
|
-
if (!rt.current || !
|
|
9952
|
+
if (!rt.current || !w || ((Oe = window.getSelection()) == null ? void 0 : Oe.toString().length) > 0) return;
|
|
9953
9953
|
const Be = ee.clientY - rt.current.y, at = ee.clientX - rt.current.x;
|
|
9954
9954
|
var In;
|
|
9955
9955
|
const dt = (In = e.swipeDirections) != null ? In : q0(W);
|
|
@@ -9980,7 +9980,7 @@ const X0 = (e) => {
|
|
|
9980
9980
|
"aria-label": oe,
|
|
9981
9981
|
"data-disabled": ut,
|
|
9982
9982
|
"data-close-button": !0,
|
|
9983
|
-
onClick: ut || !
|
|
9983
|
+
onClick: ut || !w ? () => {
|
|
9984
9984
|
} : () => {
|
|
9985
9985
|
ve(), u.onDismiss == null || u.onDismiss.call(u, u);
|
|
9986
9986
|
},
|
|
@@ -10002,7 +10002,7 @@ const X0 = (e) => {
|
|
|
10002
10002
|
"data-cancel": !0,
|
|
10003
10003
|
style: u.cancelButtonStyle || j,
|
|
10004
10004
|
onClick: (ee) => {
|
|
10005
|
-
Vn(u.cancel) &&
|
|
10005
|
+
Vn(u.cancel) && w && (u.cancel.onClick == null || u.cancel.onClick.call(u.cancel, ee), ve());
|
|
10006
10006
|
},
|
|
10007
10007
|
className: gt(L?.cancelButton, u == null || (c = u.classNames) == null ? void 0 : c.cancelButton)
|
|
10008
10008
|
}, u.cancel.label) : null, /* @__PURE__ */ g.isValidElement(u.action) ? u.action : u.action && Vn(u.action) ? /* @__PURE__ */ g.createElement("button", {
|
|
@@ -10051,7 +10051,7 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
|
|
|
10051
10051
|
const { invert: r, position: o = "bottom-right", hotkey: a = [
|
|
10052
10052
|
"altKey",
|
|
10053
10053
|
"KeyT"
|
|
10054
|
-
], expand: i, closeButton: s, className: c, offset: d, mobileOffset: f, theme: u = "light", richColors: p, duration: b, style:
|
|
10054
|
+
], expand: i, closeButton: s, className: c, offset: d, mobileOffset: f, theme: u = "light", richColors: p, duration: b, style: x, visibleToasts: $ = L0, toastOptions: k, dir: v = ma(), gap: m = Y0, icons: S, containerAriaLabel: A = "Notifications" } = t, [O, M] = g.useState([]), C = g.useMemo(() => Array.from(new Set([
|
|
10055
10055
|
o
|
|
10056
10056
|
].concat(O.filter((_) => _.position).map((_) => _.position)))), [
|
|
10057
10057
|
O,
|
|
@@ -10166,7 +10166,7 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
|
|
|
10166
10166
|
"--front-toast-height": `${((G = j[0]) == null ? void 0 : G.height) || 0}px`,
|
|
10167
10167
|
"--width": `${H0}px`,
|
|
10168
10168
|
"--gap": `${m}px`,
|
|
10169
|
-
...
|
|
10169
|
+
...x,
|
|
10170
10170
|
...Q0(d, f)
|
|
10171
10171
|
},
|
|
10172
10172
|
onBlur: (re) => {
|
|
@@ -10505,7 +10505,7 @@ const kb = [
|
|
|
10505
10505
|
className: u,
|
|
10506
10506
|
size: p,
|
|
10507
10507
|
fullWidth: b,
|
|
10508
|
-
name:
|
|
10508
|
+
name: x
|
|
10509
10509
|
} = e, $ = /* @__PURE__ */ new Date(), [k, v] = ge(null), [m, S] = ge($.getFullYear()), A = (j) => {
|
|
10510
10510
|
v(j.currentTarget);
|
|
10511
10511
|
}, O = () => {
|
|
@@ -10527,7 +10527,7 @@ const kb = [
|
|
|
10527
10527
|
disabled: n,
|
|
10528
10528
|
size: p,
|
|
10529
10529
|
fullWidth: b,
|
|
10530
|
-
name:
|
|
10530
|
+
name: x,
|
|
10531
10531
|
endAdornment: /* @__PURE__ */ l.jsx(Ze, { disabled: n, variant: "text", onClick: A, children: /* @__PURE__ */ l.jsx(_a, {}) }),
|
|
10532
10532
|
placeholder: i,
|
|
10533
10533
|
error: s,
|
|
@@ -10976,7 +10976,7 @@ function gx({
|
|
|
10976
10976
|
}) {
|
|
10977
10977
|
const [d, f] = ge(e), [u, p] = ge(t), b = (m, S) => {
|
|
10978
10978
|
Array.isArray(S) && (f(S[0]), p(S[1]));
|
|
10979
|
-
},
|
|
10979
|
+
}, x = (m) => {
|
|
10980
10980
|
const { value: S } = m.target;
|
|
10981
10981
|
Number.isNaN(+S) || f(+S);
|
|
10982
10982
|
}, $ = (m) => {
|
|
@@ -11002,7 +11002,7 @@ function gx({
|
|
|
11002
11002
|
type: "text",
|
|
11003
11003
|
name: "minVal",
|
|
11004
11004
|
value: d,
|
|
11005
|
-
onChange:
|
|
11005
|
+
onChange: x,
|
|
11006
11006
|
onKeyDown: k
|
|
11007
11007
|
}
|
|
11008
11008
|
),
|
|
@@ -11069,7 +11069,7 @@ const Ub = y(zs)`
|
|
|
11069
11069
|
f(v.target.value), u.current && clearTimeout(u.current), u.current = setTimeout(() => {
|
|
11070
11070
|
n?.(v);
|
|
11071
11071
|
}, i);
|
|
11072
|
-
},
|
|
11072
|
+
}, x = () => {
|
|
11073
11073
|
f(""), p.current && (p.current.value = ""), u.current && clearTimeout(u.current);
|
|
11074
11074
|
const v = new InputEvent("input", {
|
|
11075
11075
|
bubbles: !0,
|
|
@@ -11093,7 +11093,7 @@ const Ub = y(zs)`
|
|
|
11093
11093
|
qb,
|
|
11094
11094
|
{
|
|
11095
11095
|
variant: "text",
|
|
11096
|
-
onClick:
|
|
11096
|
+
onClick: x,
|
|
11097
11097
|
disabled: r || !k,
|
|
11098
11098
|
$isActive: k,
|
|
11099
11099
|
children: /* @__PURE__ */ l.jsx(Qb, {})
|
|
@@ -11540,7 +11540,7 @@ function hv(e) {
|
|
|
11540
11540
|
name: n
|
|
11541
11541
|
},
|
|
11542
11542
|
type: Qn.BLUR
|
|
11543
|
-
}), [n, o._formValues]),
|
|
11543
|
+
}), [n, o._formValues]), x = g.useCallback((k) => {
|
|
11544
11544
|
const v = R(o._fields, n);
|
|
11545
11545
|
v && k && (v._f.ref = k);
|
|
11546
11546
|
}, [o._fields, n]), $ = g.useMemo(() => ({
|
|
@@ -11549,8 +11549,8 @@ function hv(e) {
|
|
|
11549
11549
|
...et(r) || c.disabled ? { disabled: c.disabled || r } : {},
|
|
11550
11550
|
onChange: p,
|
|
11551
11551
|
onBlur: b,
|
|
11552
|
-
ref:
|
|
11553
|
-
}), [n, r, c.disabled, p, b,
|
|
11552
|
+
ref: x
|
|
11553
|
+
}), [n, r, c.disabled, p, b, x, s]);
|
|
11554
11554
|
return g.useEffect(() => {
|
|
11555
11555
|
const k = o._options.shouldUnregister || a;
|
|
11556
11556
|
o.register(n, {
|
|
@@ -11780,7 +11780,7 @@ var Jt = (e) => je(e) && !Kn(e) ? e : {
|
|
|
11780
11780
|
value: e,
|
|
11781
11781
|
message: ""
|
|
11782
11782
|
}, Hr = async (e, t, n, r, o, a) => {
|
|
11783
|
-
const { ref: i, refs: s, required: c, maxLength: d, minLength: f, min: u, max: p, pattern: b, validate:
|
|
11783
|
+
const { ref: i, refs: s, required: c, maxLength: d, minLength: f, min: u, max: p, pattern: b, validate: x, name: $, valueAsNumber: k, mount: v } = e._f, m = R(n, $);
|
|
11784
11784
|
if (!v || t.has($))
|
|
11785
11785
|
return {};
|
|
11786
11786
|
const S = s ? s[0] : i, A = (N) => {
|
|
@@ -11832,20 +11832,20 @@ var Jt = (e) => je(e) && !Kn(e) ? e : {
|
|
|
11832
11832
|
}, !r))
|
|
11833
11833
|
return A(W), O;
|
|
11834
11834
|
}
|
|
11835
|
-
if (
|
|
11836
|
-
if (pt(
|
|
11837
|
-
const N = await
|
|
11835
|
+
if (x) {
|
|
11836
|
+
if (pt(x)) {
|
|
11837
|
+
const N = await x(m, n), W = Oa(N, S);
|
|
11838
11838
|
if (W && (O[$] = {
|
|
11839
11839
|
...W,
|
|
11840
11840
|
...V(Ct.validate, W.message)
|
|
11841
11841
|
}, !r))
|
|
11842
11842
|
return A(W.message), O;
|
|
11843
|
-
} else if (je(
|
|
11843
|
+
} else if (je(x)) {
|
|
11844
11844
|
let N = {};
|
|
11845
|
-
for (const W in
|
|
11845
|
+
for (const W in x) {
|
|
11846
11846
|
if (!Ve(N) && !r)
|
|
11847
11847
|
break;
|
|
11848
|
-
const U = Oa(await
|
|
11848
|
+
const U = Oa(await x[W](m, n), S, W);
|
|
11849
11849
|
U && (N = {
|
|
11850
11850
|
...U,
|
|
11851
11851
|
...V(W, U.message)
|
|
@@ -11912,23 +11912,23 @@ function Dv(e = {}) {
|
|
|
11912
11912
|
const p = {
|
|
11913
11913
|
array: wa(),
|
|
11914
11914
|
state: wa()
|
|
11915
|
-
}, b = en(t.mode),
|
|
11916
|
-
clearTimeout(d), d = setTimeout(h,
|
|
11915
|
+
}, b = en(t.mode), x = en(t.reValidateMode), $ = t.criteriaMode === it.all, k = (h) => (w) => {
|
|
11916
|
+
clearTimeout(d), d = setTimeout(h, w);
|
|
11917
11917
|
}, v = async (h) => {
|
|
11918
11918
|
if (!t.disabled && (f.isValid || u.isValid || h)) {
|
|
11919
|
-
const
|
|
11920
|
-
|
|
11921
|
-
isValid:
|
|
11919
|
+
const w = t.resolver ? Ve((await T()).errors) : await B(r, !0);
|
|
11920
|
+
w !== n.isValid && p.state.next({
|
|
11921
|
+
isValid: w
|
|
11922
11922
|
});
|
|
11923
11923
|
}
|
|
11924
|
-
}, m = (h,
|
|
11924
|
+
}, m = (h, w) => {
|
|
11925
11925
|
!t.disabled && (f.isValidating || f.validatingFields || u.isValidating || u.validatingFields) && ((h || Array.from(s.mount)).forEach((D) => {
|
|
11926
|
-
D && (
|
|
11926
|
+
D && (w ? pe(n.validatingFields, D, w) : Ae(n.validatingFields, D));
|
|
11927
11927
|
}), p.state.next({
|
|
11928
11928
|
validatingFields: n.validatingFields,
|
|
11929
11929
|
isValidating: !Ve(n.validatingFields)
|
|
11930
11930
|
}));
|
|
11931
|
-
}, S = (h,
|
|
11931
|
+
}, S = (h, w = [], D, I, F = !0, P = !0) => {
|
|
11932
11932
|
if (I && D && !t.disabled) {
|
|
11933
11933
|
if (i.action = !0, P && Array.isArray(R(r, h))) {
|
|
11934
11934
|
const z = D(R(r, h), I.argA, I.argB);
|
|
@@ -11944,15 +11944,15 @@ function Dv(e = {}) {
|
|
|
11944
11944
|
}
|
|
11945
11945
|
(f.dirtyFields || u.dirtyFields) && (n.dirtyFields = fn(o, a)), p.state.next({
|
|
11946
11946
|
name: h,
|
|
11947
|
-
isDirty: W(h,
|
|
11947
|
+
isDirty: W(h, w),
|
|
11948
11948
|
dirtyFields: n.dirtyFields,
|
|
11949
11949
|
errors: n.errors,
|
|
11950
11950
|
isValid: n.isValid
|
|
11951
11951
|
});
|
|
11952
11952
|
} else
|
|
11953
|
-
pe(a, h,
|
|
11954
|
-
}, A = (h,
|
|
11955
|
-
pe(n.errors, h,
|
|
11953
|
+
pe(a, h, w);
|
|
11954
|
+
}, A = (h, w) => {
|
|
11955
|
+
pe(n.errors, h, w), p.state.next({
|
|
11956
11956
|
errors: n.errors
|
|
11957
11957
|
});
|
|
11958
11958
|
}, O = (h) => {
|
|
@@ -11960,13 +11960,13 @@ function Dv(e = {}) {
|
|
|
11960
11960
|
errors: n.errors,
|
|
11961
11961
|
isValid: !1
|
|
11962
11962
|
});
|
|
11963
|
-
}, M = (h,
|
|
11963
|
+
}, M = (h, w, D, I) => {
|
|
11964
11964
|
const F = R(r, h);
|
|
11965
11965
|
if (F) {
|
|
11966
11966
|
const P = R(a, h, xe(D) ? R(o, h) : D);
|
|
11967
|
-
xe(P) || I && I.defaultChecked ||
|
|
11967
|
+
xe(P) || I && I.defaultChecked || w ? pe(a, h, w ? P : $a(F._f)) : L(h, P), i.mount && v();
|
|
11968
11968
|
}
|
|
11969
|
-
}, C = (h,
|
|
11969
|
+
}, C = (h, w, D, I, F) => {
|
|
11970
11970
|
let P = !1, z = !1;
|
|
11971
11971
|
const ne = {
|
|
11972
11972
|
name: h
|
|
@@ -11974,7 +11974,7 @@ function Dv(e = {}) {
|
|
|
11974
11974
|
if (!t.disabled) {
|
|
11975
11975
|
if (!D || I) {
|
|
11976
11976
|
(f.isDirty || u.isDirty) && (z = n.isDirty, n.isDirty = ne.isDirty = W(), P = z !== ne.isDirty);
|
|
11977
|
-
const ue = Tt(R(o, h),
|
|
11977
|
+
const ue = Tt(R(o, h), w);
|
|
11978
11978
|
z = !!R(n.dirtyFields, h), ue ? Ae(n.dirtyFields, h) : pe(n.dirtyFields, h, !0), ne.dirtyFields = n.dirtyFields, P = P || (f.dirtyFields || u.dirtyFields) && z !== !ue;
|
|
11979
11979
|
}
|
|
11980
11980
|
if (D) {
|
|
@@ -11984,12 +11984,12 @@ function Dv(e = {}) {
|
|
|
11984
11984
|
P && F && p.state.next(ne);
|
|
11985
11985
|
}
|
|
11986
11986
|
return P ? ne : {};
|
|
11987
|
-
}, j = (h,
|
|
11988
|
-
const F = R(n.errors, h), P = (f.isValid || u.isValid) && et(
|
|
11987
|
+
}, j = (h, w, D, I) => {
|
|
11988
|
+
const F = R(n.errors, h), P = (f.isValid || u.isValid) && et(w) && n.isValid !== w;
|
|
11989
11989
|
if (t.delayError && D ? (c = k(() => A(h, D)), c(t.delayError)) : (clearTimeout(d), c = null, D ? pe(n.errors, h, D) : Ae(n.errors, h)), (D ? !Tt(F, D) : F) || !Ve(I) || P) {
|
|
11990
11990
|
const z = {
|
|
11991
11991
|
...I,
|
|
11992
|
-
...P && et(
|
|
11992
|
+
...P && et(w) ? { isValid: w } : {},
|
|
11993
11993
|
errors: n.errors,
|
|
11994
11994
|
name: h
|
|
11995
11995
|
};
|
|
@@ -12000,19 +12000,19 @@ function Dv(e = {}) {
|
|
|
12000
12000
|
}
|
|
12001
12001
|
}, T = async (h) => {
|
|
12002
12002
|
m(h, !0);
|
|
12003
|
-
const
|
|
12004
|
-
return m(h),
|
|
12003
|
+
const w = await t.resolver(a, t.context, vv(h || s.mount, r, t.criteriaMode, t.shouldUseNativeValidation));
|
|
12004
|
+
return m(h), w;
|
|
12005
12005
|
}, V = async (h) => {
|
|
12006
|
-
const { errors:
|
|
12006
|
+
const { errors: w } = await T(h);
|
|
12007
12007
|
if (h)
|
|
12008
12008
|
for (const D of h) {
|
|
12009
|
-
const I = R(
|
|
12009
|
+
const I = R(w, D);
|
|
12010
12010
|
I ? pe(n.errors, D, I) : Ae(n.errors, D);
|
|
12011
12011
|
}
|
|
12012
12012
|
else
|
|
12013
|
-
n.errors =
|
|
12014
|
-
return
|
|
12015
|
-
}, B = async (h,
|
|
12013
|
+
n.errors = w;
|
|
12014
|
+
return w;
|
|
12015
|
+
}, B = async (h, w, D = {
|
|
12016
12016
|
valid: !0
|
|
12017
12017
|
}) => {
|
|
12018
12018
|
for (const I in h) {
|
|
@@ -12022,41 +12022,41 @@ function Dv(e = {}) {
|
|
|
12022
12022
|
if (P) {
|
|
12023
12023
|
const ne = s.array.has(P.name), ue = F._f && xv(F._f);
|
|
12024
12024
|
ue && f.validatingFields && m([I], !0);
|
|
12025
|
-
const Ce = await Hr(F, s.disabled, a, $, t.shouldUseNativeValidation && !
|
|
12026
|
-
if (ue && f.validatingFields && m([I]), Ce[P.name] && (D.valid = !1,
|
|
12025
|
+
const Ce = await Hr(F, s.disabled, a, $, t.shouldUseNativeValidation && !w, ne);
|
|
12026
|
+
if (ue && f.validatingFields && m([I]), Ce[P.name] && (D.valid = !1, w))
|
|
12027
12027
|
break;
|
|
12028
|
-
!
|
|
12028
|
+
!w && (R(Ce, P.name) ? ne ? Os(n.errors, Ce, P.name) : pe(n.errors, P.name, Ce[P.name]) : Ae(n.errors, P.name));
|
|
12029
12029
|
}
|
|
12030
|
-
!Ve(z) && await B(z,
|
|
12030
|
+
!Ve(z) && await B(z, w, D);
|
|
12031
12031
|
}
|
|
12032
12032
|
}
|
|
12033
12033
|
return D.valid;
|
|
12034
12034
|
}, N = () => {
|
|
12035
12035
|
for (const h of s.unMount) {
|
|
12036
|
-
const
|
|
12037
|
-
|
|
12036
|
+
const w = R(r, h);
|
|
12037
|
+
w && (w._f.refs ? w._f.refs.every((D) => !kr(D)) : !kr(w._f.ref)) && Se(h);
|
|
12038
12038
|
}
|
|
12039
12039
|
s.unMount = /* @__PURE__ */ new Set();
|
|
12040
|
-
}, W = (h,
|
|
12041
|
-
...i.mount ? a : xe(
|
|
12042
|
-
}, D,
|
|
12040
|
+
}, W = (h, w) => !t.disabled && (h && w && pe(a, h, w), !Tt(H(), o)), U = (h, w, D) => ws(h, s, {
|
|
12041
|
+
...i.mount ? a : xe(w) ? o : wt(h) ? { [h]: w } : w
|
|
12042
|
+
}, D, w), Y = (h) => Pn(R(i.mount ? a : o, h, t.shouldUnregister ? R(o, h, []) : [])), L = (h, w, D = {}) => {
|
|
12043
12043
|
const I = R(r, h);
|
|
12044
|
-
let F =
|
|
12044
|
+
let F = w;
|
|
12045
12045
|
if (I) {
|
|
12046
12046
|
const P = I._f;
|
|
12047
|
-
P && (!P.disabled && pe(a, h, Ms(
|
|
12047
|
+
P && (!P.disabled && pe(a, h, Ms(w, P)), F = Zn(P.ref) && Ge(w) ? "" : w, ks(P.ref) ? [...P.ref.options].forEach((z) => z.selected = F.includes(z.value)) : P.refs ? Tn(P.ref) ? P.refs.length > 1 ? P.refs.forEach((z) => (!z.defaultChecked || !z.disabled) && (z.checked = Array.isArray(F) ? !!F.find((ne) => ne === z.value) : F === z.value)) : P.refs[0] && (P.refs[0].checked = !!F) : P.refs.forEach((z) => z.checked = z.value === F) : po(P.ref) ? P.ref.value = "" : (P.ref.value = F, P.ref.type || p.state.next({
|
|
12048
12048
|
name: h,
|
|
12049
12049
|
values: Me(a)
|
|
12050
12050
|
})));
|
|
12051
12051
|
}
|
|
12052
12052
|
(D.shouldDirty || D.shouldTouch) && C(h, F, D.shouldTouch, D.shouldDirty, !0), D.shouldValidate && _(h);
|
|
12053
|
-
}, Z = (h,
|
|
12054
|
-
for (const I in
|
|
12055
|
-
const F =
|
|
12053
|
+
}, Z = (h, w, D) => {
|
|
12054
|
+
for (const I in w) {
|
|
12055
|
+
const F = w[I], P = `${h}.${I}`, z = R(r, P);
|
|
12056
12056
|
(s.array.has(h) || je(F) || z && !z._f) && !zt(F) ? Z(P, F, D) : L(P, F, D);
|
|
12057
12057
|
}
|
|
12058
|
-
}, oe = (h,
|
|
12059
|
-
const I = R(r, h), F = s.array.has(h), P = Me(
|
|
12058
|
+
}, oe = (h, w, D = {}) => {
|
|
12059
|
+
const I = R(r, h), F = s.array.has(h), P = Me(w);
|
|
12060
12060
|
pe(a, h, P), F ? (p.array.next({
|
|
12061
12061
|
name: h,
|
|
12062
12062
|
values: Me(a)
|
|
@@ -12070,14 +12070,14 @@ function Dv(e = {}) {
|
|
|
12070
12070
|
});
|
|
12071
12071
|
}, te = async (h) => {
|
|
12072
12072
|
i.mount = !0;
|
|
12073
|
-
const
|
|
12074
|
-
let D =
|
|
12073
|
+
const w = h.target;
|
|
12074
|
+
let D = w.name, I = !0;
|
|
12075
12075
|
const F = R(r, D), P = (z) => {
|
|
12076
12076
|
I = Number.isNaN(z) || zt(z) && isNaN(z.getTime()) || Tt(z, R(a, D, z));
|
|
12077
12077
|
};
|
|
12078
12078
|
if (F) {
|
|
12079
12079
|
let z, ne;
|
|
12080
|
-
const ue =
|
|
12080
|
+
const ue = w.type ? $a(F._f) : ms(h), Ce = h.type === Qn.BLUR || h.type === Qn.FOCUS_OUT, rt = !wv(F._f) && !t.resolver && !R(n.errors, D) && !F._f.deps || Sv(Ce, R(n.touchedFields, D), n.isSubmitted, x, b), Q = zr(D, s, Ce);
|
|
12081
12081
|
pe(a, D, ue), Ce ? (F._f.onBlur && F._f.onBlur(h), c && c(0)) : F._f.onChange && F._f.onChange(h);
|
|
12082
12082
|
const de = C(D, ue, Ce), ce = !Ve(de) || Q;
|
|
12083
12083
|
if (!Ce && p.state.next({
|
|
@@ -12096,10 +12096,10 @@ function Dv(e = {}) {
|
|
|
12096
12096
|
m([D], !0), z = (await Hr(F, s.disabled, a, $, t.shouldUseNativeValidation))[D], m([D]), P(ue), I && (z ? ne = !1 : (f.isValid || u.isValid) && (ne = await B(r, !0)));
|
|
12097
12097
|
I && (F._f.deps && _(F._f.deps), j(D, ne, z, de));
|
|
12098
12098
|
}
|
|
12099
|
-
}, E = (h,
|
|
12100
|
-
if (R(n.errors,
|
|
12099
|
+
}, E = (h, w) => {
|
|
12100
|
+
if (R(n.errors, w) && h.focus)
|
|
12101
12101
|
return h.focus(), 1;
|
|
12102
|
-
}, _ = async (h,
|
|
12102
|
+
}, _ = async (h, w = {}) => {
|
|
12103
12103
|
let D, I;
|
|
12104
12104
|
const F = Qe(h);
|
|
12105
12105
|
if (t.resolver) {
|
|
@@ -12113,41 +12113,41 @@ function Dv(e = {}) {
|
|
|
12113
12113
|
...!wt(h) || (f.isValid || u.isValid) && D !== n.isValid ? {} : { name: h },
|
|
12114
12114
|
...t.resolver || !h ? { isValid: D } : {},
|
|
12115
12115
|
errors: n.errors
|
|
12116
|
-
}),
|
|
12116
|
+
}), w.shouldFocus && !I && nn(r, E, h ? F : s.mount), I;
|
|
12117
12117
|
}, H = (h) => {
|
|
12118
|
-
const
|
|
12118
|
+
const w = {
|
|
12119
12119
|
...i.mount ? a : o
|
|
12120
12120
|
};
|
|
12121
|
-
return xe(h) ?
|
|
12122
|
-
}, G = (h,
|
|
12123
|
-
invalid: !!R((
|
|
12124
|
-
isDirty: !!R((
|
|
12125
|
-
error: R((
|
|
12121
|
+
return xe(h) ? w : wt(h) ? R(w, h) : h.map((D) => R(w, D));
|
|
12122
|
+
}, G = (h, w) => ({
|
|
12123
|
+
invalid: !!R((w || n).errors, h),
|
|
12124
|
+
isDirty: !!R((w || n).dirtyFields, h),
|
|
12125
|
+
error: R((w || n).errors, h),
|
|
12126
12126
|
isValidating: !!R(n.validatingFields, h),
|
|
12127
|
-
isTouched: !!R((
|
|
12127
|
+
isTouched: !!R((w || n).touchedFields, h)
|
|
12128
12128
|
}), le = (h) => {
|
|
12129
|
-
h && Qe(h).forEach((
|
|
12129
|
+
h && Qe(h).forEach((w) => Ae(n.errors, w)), p.state.next({
|
|
12130
12130
|
errors: h ? n.errors : {}
|
|
12131
12131
|
});
|
|
12132
|
-
}, se = (h,
|
|
12132
|
+
}, se = (h, w, D) => {
|
|
12133
12133
|
const I = (R(r, h, { _f: {} })._f || {}).ref, F = R(n.errors, h) || {}, { ref: P, message: z, type: ne, ...ue } = F;
|
|
12134
12134
|
pe(n.errors, h, {
|
|
12135
12135
|
...ue,
|
|
12136
|
-
...
|
|
12136
|
+
...w,
|
|
12137
12137
|
ref: I
|
|
12138
12138
|
}), p.state.next({
|
|
12139
12139
|
name: h,
|
|
12140
12140
|
errors: n.errors,
|
|
12141
12141
|
isValid: !1
|
|
12142
12142
|
}), D && D.shouldFocus && I && I.focus && I.focus();
|
|
12143
|
-
}, re = (h,
|
|
12144
|
-
next: (D) => h(U(void 0,
|
|
12145
|
-
}) : U(h,
|
|
12146
|
-
next: (
|
|
12147
|
-
Cv(h.name,
|
|
12143
|
+
}, re = (h, w) => pt(h) ? p.state.subscribe({
|
|
12144
|
+
next: (D) => h(U(void 0, w), D)
|
|
12145
|
+
}) : U(h, w, !0), we = (h) => p.state.subscribe({
|
|
12146
|
+
next: (w) => {
|
|
12147
|
+
Cv(h.name, w.name, h.exact) && kv(w, h.formState || f, ie, h.reRenderRoot) && h.callback({
|
|
12148
12148
|
values: { ...a },
|
|
12149
12149
|
...n,
|
|
12150
|
-
...
|
|
12150
|
+
...w
|
|
12151
12151
|
});
|
|
12152
12152
|
}
|
|
12153
12153
|
}).unsubscribe, ae = (h) => (i.mount = !0, u = {
|
|
@@ -12156,47 +12156,47 @@ function Dv(e = {}) {
|
|
|
12156
12156
|
}, we({
|
|
12157
12157
|
...h,
|
|
12158
12158
|
formState: u
|
|
12159
|
-
})), Se = (h,
|
|
12159
|
+
})), Se = (h, w = {}) => {
|
|
12160
12160
|
for (const D of h ? Qe(h) : s.mount)
|
|
12161
|
-
s.mount.delete(D), s.array.delete(D),
|
|
12161
|
+
s.mount.delete(D), s.array.delete(D), w.keepValue || (Ae(r, D), Ae(a, D)), !w.keepError && Ae(n.errors, D), !w.keepDirty && Ae(n.dirtyFields, D), !w.keepTouched && Ae(n.touchedFields, D), !w.keepIsValidating && Ae(n.validatingFields, D), !t.shouldUnregister && !w.keepDefaultValue && Ae(o, D);
|
|
12162
12162
|
p.state.next({
|
|
12163
12163
|
values: Me(a)
|
|
12164
12164
|
}), p.state.next({
|
|
12165
12165
|
...n,
|
|
12166
|
-
...
|
|
12167
|
-
}), !
|
|
12168
|
-
}, Ee = ({ disabled: h, name:
|
|
12169
|
-
(et(h) && i.mount || h || s.disabled.has(
|
|
12170
|
-
}, Ue = (h,
|
|
12166
|
+
...w.keepDirty ? { isDirty: W() } : {}
|
|
12167
|
+
}), !w.keepIsValid && v();
|
|
12168
|
+
}, Ee = ({ disabled: h, name: w }) => {
|
|
12169
|
+
(et(h) && i.mount || h || s.disabled.has(w)) && (h ? s.disabled.add(w) : s.disabled.delete(w));
|
|
12170
|
+
}, Ue = (h, w = {}) => {
|
|
12171
12171
|
let D = R(r, h);
|
|
12172
|
-
const I = et(
|
|
12172
|
+
const I = et(w.disabled) || et(t.disabled);
|
|
12173
12173
|
return pe(r, h, {
|
|
12174
12174
|
...D || {},
|
|
12175
12175
|
_f: {
|
|
12176
12176
|
...D && D._f ? D._f : { ref: { name: h } },
|
|
12177
12177
|
name: h,
|
|
12178
12178
|
mount: !0,
|
|
12179
|
-
...
|
|
12179
|
+
...w
|
|
12180
12180
|
}
|
|
12181
12181
|
}), s.mount.add(h), D ? Ee({
|
|
12182
|
-
disabled: et(
|
|
12182
|
+
disabled: et(w.disabled) ? w.disabled : t.disabled,
|
|
12183
12183
|
name: h
|
|
12184
|
-
}) : M(h, !0,
|
|
12185
|
-
...I ? { disabled:
|
|
12184
|
+
}) : M(h, !0, w.value), {
|
|
12185
|
+
...I ? { disabled: w.disabled || t.disabled } : {},
|
|
12186
12186
|
...t.progressive ? {
|
|
12187
|
-
required: !!
|
|
12188
|
-
min: pn(
|
|
12189
|
-
max: pn(
|
|
12190
|
-
minLength: pn(
|
|
12191
|
-
maxLength: pn(
|
|
12192
|
-
pattern: pn(
|
|
12187
|
+
required: !!w.required,
|
|
12188
|
+
min: pn(w.min),
|
|
12189
|
+
max: pn(w.max),
|
|
12190
|
+
minLength: pn(w.minLength),
|
|
12191
|
+
maxLength: pn(w.maxLength),
|
|
12192
|
+
pattern: pn(w.pattern)
|
|
12193
12193
|
} : {},
|
|
12194
12194
|
name: h,
|
|
12195
12195
|
onChange: te,
|
|
12196
12196
|
onBlur: te,
|
|
12197
12197
|
ref: (F) => {
|
|
12198
12198
|
if (F) {
|
|
12199
|
-
Ue(h,
|
|
12199
|
+
Ue(h, w), D = R(r, h);
|
|
12200
12200
|
const P = xe(F.value) && F.querySelectorAll && F.querySelectorAll("input,select,textarea")[0] || F, z = mv(P), ne = D._f.refs || [];
|
|
12201
12201
|
if (z ? ne.find((ue) => ue === P) : P === D._f.ref)
|
|
12202
12202
|
return;
|
|
@@ -12214,17 +12214,17 @@ function Dv(e = {}) {
|
|
|
12214
12214
|
}
|
|
12215
12215
|
}), M(h, !1, void 0, P);
|
|
12216
12216
|
} else
|
|
12217
|
-
D = R(r, h, {}), D._f && (D._f.mount = !1), (t.shouldUnregister ||
|
|
12217
|
+
D = R(r, h, {}), D._f && (D._f.mount = !1), (t.shouldUnregister || w.shouldUnregister) && !(ys(s.array, h) && i.action) && s.unMount.add(h);
|
|
12218
12218
|
}
|
|
12219
12219
|
};
|
|
12220
12220
|
}, lt = () => t.shouldFocusError && nn(r, E, s.mount), Wt = (h) => {
|
|
12221
|
-
et(h) && (p.state.next({ disabled: h }), nn(r, (
|
|
12221
|
+
et(h) && (p.state.next({ disabled: h }), nn(r, (w, D) => {
|
|
12222
12222
|
const I = R(r, D);
|
|
12223
|
-
I && (
|
|
12223
|
+
I && (w.disabled = I._f.disabled || h, Array.isArray(I._f.refs) && I._f.refs.forEach((F) => {
|
|
12224
12224
|
F.disabled = I._f.disabled || h;
|
|
12225
12225
|
}));
|
|
12226
12226
|
}, 0, !1));
|
|
12227
|
-
}, q = (h,
|
|
12227
|
+
}, q = (h, w) => async (D) => {
|
|
12228
12228
|
let I;
|
|
12229
12229
|
D && (D.preventDefault && D.preventDefault(), D.persist && D.persist());
|
|
12230
12230
|
let F = Me(a);
|
|
@@ -12248,7 +12248,7 @@ function Dv(e = {}) {
|
|
|
12248
12248
|
I = P;
|
|
12249
12249
|
}
|
|
12250
12250
|
} else
|
|
12251
|
-
|
|
12251
|
+
w && await w({ ...n.errors }, D), lt(), setTimeout(lt);
|
|
12252
12252
|
if (p.state.next({
|
|
12253
12253
|
isSubmitted: !0,
|
|
12254
12254
|
isSubmitting: !1,
|
|
@@ -12257,12 +12257,12 @@ function Dv(e = {}) {
|
|
|
12257
12257
|
errors: n.errors
|
|
12258
12258
|
}), I)
|
|
12259
12259
|
throw I;
|
|
12260
|
-
}, J = (h,
|
|
12261
|
-
R(r, h) && (xe(
|
|
12262
|
-
}, $e = (h,
|
|
12260
|
+
}, J = (h, w = {}) => {
|
|
12261
|
+
R(r, h) && (xe(w.defaultValue) ? oe(h, Me(R(o, h))) : (oe(h, w.defaultValue), pe(o, h, Me(w.defaultValue))), w.keepTouched || Ae(n.touchedFields, h), w.keepDirty || (Ae(n.dirtyFields, h), n.isDirty = w.defaultValue ? W(h, Me(R(o, h))) : W()), w.keepError || (Ae(n.errors, h), f.isValid && v()), p.state.next({ ...n }));
|
|
12262
|
+
}, $e = (h, w = {}) => {
|
|
12263
12263
|
const D = h ? Me(h) : o, I = Me(D), F = Ve(h), P = F ? o : I;
|
|
12264
|
-
if (
|
|
12265
|
-
if (
|
|
12264
|
+
if (w.keepDefaultValues || (o = D), !w.keepValues) {
|
|
12265
|
+
if (w.keepDirtyValues) {
|
|
12266
12266
|
const z = /* @__PURE__ */ new Set([
|
|
12267
12267
|
...s.mount,
|
|
12268
12268
|
...Object.keys(fn(o, a))
|
|
@@ -12294,28 +12294,28 @@ function Dv(e = {}) {
|
|
|
12294
12294
|
});
|
|
12295
12295
|
}
|
|
12296
12296
|
s = {
|
|
12297
|
-
mount:
|
|
12297
|
+
mount: w.keepDirtyValues ? s.mount : /* @__PURE__ */ new Set(),
|
|
12298
12298
|
unMount: /* @__PURE__ */ new Set(),
|
|
12299
12299
|
array: /* @__PURE__ */ new Set(),
|
|
12300
12300
|
disabled: /* @__PURE__ */ new Set(),
|
|
12301
12301
|
watch: /* @__PURE__ */ new Set(),
|
|
12302
12302
|
watchAll: !1,
|
|
12303
12303
|
focus: ""
|
|
12304
|
-
}, i.mount = !f.isValid || !!
|
|
12305
|
-
submitCount:
|
|
12306
|
-
isDirty: F ? !1 :
|
|
12307
|
-
isSubmitted:
|
|
12308
|
-
dirtyFields: F ? {} :
|
|
12309
|
-
touchedFields:
|
|
12310
|
-
errors:
|
|
12311
|
-
isSubmitSuccessful:
|
|
12304
|
+
}, i.mount = !f.isValid || !!w.keepIsValid || !!w.keepDirtyValues, i.watch = !!t.shouldUnregister, p.state.next({
|
|
12305
|
+
submitCount: w.keepSubmitCount ? n.submitCount : 0,
|
|
12306
|
+
isDirty: F ? !1 : w.keepDirty ? n.isDirty : !!(w.keepDefaultValues && !Tt(h, o)),
|
|
12307
|
+
isSubmitted: w.keepIsSubmitted ? n.isSubmitted : !1,
|
|
12308
|
+
dirtyFields: F ? {} : w.keepDirtyValues ? w.keepDefaultValues && a ? fn(o, a) : n.dirtyFields : w.keepDefaultValues && h ? fn(o, h) : w.keepDirty ? n.dirtyFields : {},
|
|
12309
|
+
touchedFields: w.keepTouched ? n.touchedFields : {},
|
|
12310
|
+
errors: w.keepErrors ? n.errors : {},
|
|
12311
|
+
isSubmitSuccessful: w.keepIsSubmitSuccessful ? n.isSubmitSuccessful : !1,
|
|
12312
12312
|
isSubmitting: !1
|
|
12313
12313
|
});
|
|
12314
|
-
}, ke = (h,
|
|
12314
|
+
}, ke = (h, w) => $e(pt(h) ? h(a) : h, w), Ne = (h, w = {}) => {
|
|
12315
12315
|
const D = R(r, h), I = D && D._f;
|
|
12316
12316
|
if (I) {
|
|
12317
12317
|
const F = I.refs ? I.refs[0] : I.ref;
|
|
12318
|
-
F.focus && (F.focus(),
|
|
12318
|
+
F.focus && (F.focus(), w.shouldSelect && pt(F.select) && F.select());
|
|
12319
12319
|
}
|
|
12320
12320
|
}, ie = (h) => {
|
|
12321
12321
|
n = {
|
|
@@ -12446,7 +12446,7 @@ function Mx(e) {
|
|
|
12446
12446
|
}).unsubscribe, [n]);
|
|
12447
12447
|
const b = g.useCallback((M) => {
|
|
12448
12448
|
p.current = !0, n._setFieldArray(r, M);
|
|
12449
|
-
}, [n, r]),
|
|
12449
|
+
}, [n, r]), x = (M, C) => {
|
|
12450
12450
|
const j = Qe(Me(M)), T = Sr(n._getFieldArray(r), j);
|
|
12451
12451
|
n._names.focus = Cr(r, T.length - 1, C), d.current = Sr(d.current, j.map(jt)), b(T), c(T), n._setFieldArray(r, T, Sr, {
|
|
12452
12452
|
argA: $r(M)
|
|
@@ -12523,7 +12523,7 @@ function Mx(e) {
|
|
|
12523
12523
|
swap: g.useCallback(m, [b, r, n]),
|
|
12524
12524
|
move: g.useCallback(S, [b, r, n]),
|
|
12525
12525
|
prepend: g.useCallback($, [b, r, n]),
|
|
12526
|
-
append: g.useCallback(
|
|
12526
|
+
append: g.useCallback(x, [b, r, n]),
|
|
12527
12527
|
remove: g.useCallback(k, [b, r, n]),
|
|
12528
12528
|
insert: g.useCallback(v, [b, r, n]),
|
|
12529
12529
|
update: g.useCallback(A, [b, r, n]),
|