@max-ts/components 1.4.2 → 1.4.4
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
CHANGED
|
@@ -52,145 +52,145 @@ var ln = {};
|
|
|
52
52
|
var $o;
|
|
53
53
|
function Kl() {
|
|
54
54
|
return $o || ($o = 1, process.env.NODE_ENV !== "production" && function() {
|
|
55
|
-
function e(
|
|
56
|
-
if (
|
|
57
|
-
if (typeof
|
|
58
|
-
return
|
|
59
|
-
if (typeof
|
|
60
|
-
switch (
|
|
61
|
-
case
|
|
55
|
+
function e(O) {
|
|
56
|
+
if (O == null) return null;
|
|
57
|
+
if (typeof O == "function")
|
|
58
|
+
return O.$$typeof === z ? null : O.displayName || O.name || null;
|
|
59
|
+
if (typeof O == "string") return O;
|
|
60
|
+
switch (O) {
|
|
61
|
+
case M:
|
|
62
62
|
return "Fragment";
|
|
63
63
|
case b:
|
|
64
64
|
return "Profiler";
|
|
65
|
-
case
|
|
65
|
+
case C:
|
|
66
66
|
return "StrictMode";
|
|
67
|
-
case
|
|
67
|
+
case E:
|
|
68
68
|
return "Suspense";
|
|
69
|
-
case
|
|
69
|
+
case S:
|
|
70
70
|
return "SuspenseList";
|
|
71
71
|
case T:
|
|
72
72
|
return "Activity";
|
|
73
73
|
}
|
|
74
|
-
if (typeof
|
|
75
|
-
switch (typeof
|
|
74
|
+
if (typeof O == "object")
|
|
75
|
+
switch (typeof O.tag == "number" && console.error(
|
|
76
76
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
77
|
-
),
|
|
78
|
-
case
|
|
77
|
+
), O.$$typeof) {
|
|
78
|
+
case k:
|
|
79
79
|
return "Portal";
|
|
80
80
|
case $:
|
|
81
|
-
return (
|
|
81
|
+
return (O.displayName || "Context") + ".Provider";
|
|
82
82
|
case m:
|
|
83
|
-
return (
|
|
84
|
-
case j:
|
|
85
|
-
var _ = E.render;
|
|
86
|
-
return E = E.displayName, E || (E = _.displayName || _.name || "", E = E !== "" ? "ForwardRef(" + E + ")" : "ForwardRef"), E;
|
|
87
|
-
case C:
|
|
88
|
-
return _ = E.displayName || null, _ !== null ? _ : e(E.type) || "Memo";
|
|
83
|
+
return (O._context.displayName || "Context") + ".Consumer";
|
|
89
84
|
case A:
|
|
90
|
-
_ =
|
|
85
|
+
var _ = O.render;
|
|
86
|
+
return O = O.displayName, O || (O = _.displayName || _.name || "", O = O !== "" ? "ForwardRef(" + O + ")" : "ForwardRef"), O;
|
|
87
|
+
case x:
|
|
88
|
+
return _ = O.displayName || null, _ !== null ? _ : e(O.type) || "Memo";
|
|
89
|
+
case j:
|
|
90
|
+
_ = O._payload, O = O._init;
|
|
91
91
|
try {
|
|
92
|
-
return e(
|
|
92
|
+
return e(O(_));
|
|
93
93
|
} catch {
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
return null;
|
|
97
97
|
}
|
|
98
|
-
function t(
|
|
99
|
-
return "" +
|
|
98
|
+
function t(O) {
|
|
99
|
+
return "" + O;
|
|
100
100
|
}
|
|
101
|
-
function n(
|
|
101
|
+
function n(O) {
|
|
102
102
|
try {
|
|
103
|
-
t(
|
|
103
|
+
t(O);
|
|
104
104
|
var _ = !1;
|
|
105
105
|
} catch {
|
|
106
106
|
_ = !0;
|
|
107
107
|
}
|
|
108
108
|
if (_) {
|
|
109
109
|
_ = console;
|
|
110
|
-
var H = _.error, G = typeof Symbol == "function" && Symbol.toStringTag &&
|
|
110
|
+
var H = _.error, G = typeof Symbol == "function" && Symbol.toStringTag && O[Symbol.toStringTag] || O.constructor.name || "Object";
|
|
111
111
|
return H.call(
|
|
112
112
|
_,
|
|
113
113
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
114
114
|
G
|
|
115
|
-
), t(
|
|
115
|
+
), t(O);
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
function r(
|
|
119
|
-
if (
|
|
120
|
-
if (typeof
|
|
118
|
+
function r(O) {
|
|
119
|
+
if (O === M) return "<>";
|
|
120
|
+
if (typeof O == "object" && O !== null && O.$$typeof === j)
|
|
121
121
|
return "<...>";
|
|
122
122
|
try {
|
|
123
|
-
var _ = e(
|
|
123
|
+
var _ = e(O);
|
|
124
124
|
return _ ? "<" + _ + ">" : "<...>";
|
|
125
125
|
} catch {
|
|
126
126
|
return "<...>";
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
function o() {
|
|
130
|
-
var
|
|
131
|
-
return
|
|
130
|
+
var O = L.A;
|
|
131
|
+
return O === null ? null : O.getOwner();
|
|
132
132
|
}
|
|
133
133
|
function a() {
|
|
134
134
|
return Error("react-stack-top-frame");
|
|
135
135
|
}
|
|
136
|
-
function i(
|
|
137
|
-
if (N.call(
|
|
138
|
-
var _ = Object.getOwnPropertyDescriptor(
|
|
136
|
+
function i(O) {
|
|
137
|
+
if (N.call(O, "key")) {
|
|
138
|
+
var _ = Object.getOwnPropertyDescriptor(O, "key").get;
|
|
139
139
|
if (_ && _.isReactWarning) return !1;
|
|
140
140
|
}
|
|
141
|
-
return
|
|
141
|
+
return O.key !== void 0;
|
|
142
142
|
}
|
|
143
|
-
function s(
|
|
143
|
+
function s(O, _) {
|
|
144
144
|
function H() {
|
|
145
145
|
Y || (Y = !0, console.error(
|
|
146
146
|
"%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)",
|
|
147
147
|
_
|
|
148
148
|
));
|
|
149
149
|
}
|
|
150
|
-
H.isReactWarning = !0, Object.defineProperty(
|
|
150
|
+
H.isReactWarning = !0, Object.defineProperty(O, "key", {
|
|
151
151
|
get: H,
|
|
152
152
|
configurable: !0
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
155
|
function c() {
|
|
156
|
-
var
|
|
157
|
-
return B[
|
|
156
|
+
var O = e(this.type);
|
|
157
|
+
return B[O] || (B[O] = !0, console.error(
|
|
158
158
|
"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."
|
|
159
|
-
)),
|
|
159
|
+
)), O = this.props.ref, O !== void 0 ? O : null;
|
|
160
160
|
}
|
|
161
|
-
function d(
|
|
162
|
-
return H = se.ref,
|
|
161
|
+
function d(O, _, H, G, le, se, re, we) {
|
|
162
|
+
return H = se.ref, O = {
|
|
163
163
|
$$typeof: v,
|
|
164
|
-
type:
|
|
164
|
+
type: O,
|
|
165
165
|
key: _,
|
|
166
166
|
props: se,
|
|
167
167
|
_owner: le
|
|
168
|
-
}, (H !== void 0 ? H : null) !== null ? Object.defineProperty(
|
|
168
|
+
}, (H !== void 0 ? H : null) !== null ? Object.defineProperty(O, "ref", {
|
|
169
169
|
enumerable: !1,
|
|
170
170
|
get: c
|
|
171
|
-
}) : Object.defineProperty(
|
|
171
|
+
}) : Object.defineProperty(O, "ref", { enumerable: !1, value: null }), O._store = {}, Object.defineProperty(O._store, "validated", {
|
|
172
172
|
configurable: !1,
|
|
173
173
|
enumerable: !1,
|
|
174
174
|
writable: !0,
|
|
175
175
|
value: 0
|
|
176
|
-
}), Object.defineProperty(
|
|
176
|
+
}), Object.defineProperty(O, "_debugInfo", {
|
|
177
177
|
configurable: !1,
|
|
178
178
|
enumerable: !1,
|
|
179
179
|
writable: !0,
|
|
180
180
|
value: null
|
|
181
|
-
}), Object.defineProperty(
|
|
181
|
+
}), Object.defineProperty(O, "_debugStack", {
|
|
182
182
|
configurable: !1,
|
|
183
183
|
enumerable: !1,
|
|
184
184
|
writable: !0,
|
|
185
185
|
value: re
|
|
186
|
-
}), Object.defineProperty(
|
|
186
|
+
}), Object.defineProperty(O, "_debugTask", {
|
|
187
187
|
configurable: !1,
|
|
188
188
|
enumerable: !1,
|
|
189
189
|
writable: !0,
|
|
190
190
|
value: we
|
|
191
|
-
}), Object.freeze && (Object.freeze(
|
|
191
|
+
}), Object.freeze && (Object.freeze(O.props), Object.freeze(O)), O;
|
|
192
192
|
}
|
|
193
|
-
function f(
|
|
193
|
+
function f(O, _, H, G, le, se, re, we) {
|
|
194
194
|
var ae = _.children;
|
|
195
195
|
if (ae !== void 0)
|
|
196
196
|
if (G)
|
|
@@ -204,7 +204,7 @@ function Kl() {
|
|
|
204
204
|
);
|
|
205
205
|
else u(ae);
|
|
206
206
|
if (N.call(_, "key")) {
|
|
207
|
-
ae = e(
|
|
207
|
+
ae = e(O);
|
|
208
208
|
var Se = Object.keys(_).filter(function(Ue) {
|
|
209
209
|
return Ue !== "key";
|
|
210
210
|
});
|
|
@@ -228,9 +228,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
228
228
|
} else H = _;
|
|
229
229
|
return ae && s(
|
|
230
230
|
H,
|
|
231
|
-
typeof
|
|
231
|
+
typeof O == "function" ? O.displayName || O.name || "Unknown" : O
|
|
232
232
|
), d(
|
|
233
|
-
|
|
233
|
+
O,
|
|
234
234
|
ae,
|
|
235
235
|
se,
|
|
236
236
|
le,
|
|
@@ -240,44 +240,44 @@ React keys must be passed directly to JSX without using spread:
|
|
|
240
240
|
we
|
|
241
241
|
);
|
|
242
242
|
}
|
|
243
|
-
function u(
|
|
244
|
-
typeof
|
|
243
|
+
function u(O) {
|
|
244
|
+
typeof O == "object" && O !== null && O.$$typeof === v && O._store && (O._store.validated = 1);
|
|
245
245
|
}
|
|
246
|
-
var p = g, v = Symbol.for("react.transitional.element"),
|
|
246
|
+
var p = g, v = Symbol.for("react.transitional.element"), k = Symbol.for("react.portal"), M = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), m = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), A = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), T = Symbol.for("react.activity"), z = Symbol.for("react.client.reference"), L = 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 = {
|
|
250
|
-
"react-stack-bottom-frame": function(
|
|
251
|
-
return
|
|
250
|
+
"react-stack-bottom-frame": function(O) {
|
|
251
|
+
return O();
|
|
252
252
|
}
|
|
253
253
|
};
|
|
254
254
|
var Y, B = {}, Z = p["react-stack-bottom-frame"].bind(
|
|
255
255
|
p,
|
|
256
256
|
a
|
|
257
257
|
)(), oe = U(r(a)), te = {};
|
|
258
|
-
ln.Fragment =
|
|
259
|
-
var se = 1e4 >
|
|
258
|
+
ln.Fragment = M, ln.jsx = function(O, _, H, G, le) {
|
|
259
|
+
var se = 1e4 > L.recentlyCreatedOwnerStacks++;
|
|
260
260
|
return f(
|
|
261
|
-
|
|
261
|
+
O,
|
|
262
262
|
_,
|
|
263
263
|
H,
|
|
264
264
|
!1,
|
|
265
265
|
G,
|
|
266
266
|
le,
|
|
267
267
|
se ? Error("react-stack-top-frame") : Z,
|
|
268
|
-
se ? U(r(
|
|
268
|
+
se ? U(r(O)) : oe
|
|
269
269
|
);
|
|
270
|
-
}, ln.jsxs = function(
|
|
271
|
-
var se = 1e4 >
|
|
270
|
+
}, ln.jsxs = function(O, _, H, G, le) {
|
|
271
|
+
var se = 1e4 > L.recentlyCreatedOwnerStacks++;
|
|
272
272
|
return f(
|
|
273
|
-
|
|
273
|
+
O,
|
|
274
274
|
_,
|
|
275
275
|
H,
|
|
276
276
|
!0,
|
|
277
277
|
G,
|
|
278
278
|
le,
|
|
279
279
|
se ? Error("react-stack-top-frame") : Z,
|
|
280
|
-
se ? U(r(
|
|
280
|
+
se ? U(r(O)) : oe
|
|
281
281
|
);
|
|
282
282
|
};
|
|
283
283
|
}()), ln;
|
|
@@ -1684,8 +1684,8 @@ const eu = ({
|
|
|
1684
1684
|
if (c)
|
|
1685
1685
|
r?.(!n, v);
|
|
1686
1686
|
else {
|
|
1687
|
-
const
|
|
1688
|
-
s(
|
|
1687
|
+
const k = !i;
|
|
1688
|
+
s(k), r?.(k, v);
|
|
1689
1689
|
}
|
|
1690
1690
|
}, p = typeof e == "string" ? au : Es;
|
|
1691
1691
|
return /* @__PURE__ */ l.jsxs("div", { ref: a, children: [
|
|
@@ -1711,24 +1711,24 @@ const eu = ({
|
|
|
1711
1711
|
isDisabled: r
|
|
1712
1712
|
}) => {
|
|
1713
1713
|
if ("actions" in e) {
|
|
1714
|
-
const { icon: v, disabled:
|
|
1714
|
+
const { icon: v, disabled: k, disabledReason: M, name: C, actions: b } = e;
|
|
1715
1715
|
return /* @__PURE__ */ l.jsx(
|
|
1716
1716
|
Te,
|
|
1717
1717
|
{
|
|
1718
|
-
title:
|
|
1718
|
+
title: M || C,
|
|
1719
1719
|
placement: n,
|
|
1720
|
-
withoutContainer: !(r ||
|
|
1720
|
+
withoutContainer: !(r || k),
|
|
1721
1721
|
children: /* @__PURE__ */ l.jsx(
|
|
1722
1722
|
Dn,
|
|
1723
1723
|
{
|
|
1724
1724
|
icon: v,
|
|
1725
1725
|
variant: "text",
|
|
1726
|
-
disabled: r ||
|
|
1726
|
+
disabled: r || k,
|
|
1727
1727
|
children: b.map(
|
|
1728
|
-
({ name: m, onClick: $, ...
|
|
1728
|
+
({ name: m, onClick: $, ...A }) => /* @__PURE__ */ At(
|
|
1729
1729
|
st,
|
|
1730
1730
|
{
|
|
1731
|
-
...
|
|
1731
|
+
...A,
|
|
1732
1732
|
key: m,
|
|
1733
1733
|
tooltipPlacement: n,
|
|
1734
1734
|
onClick: t($)
|
|
@@ -1739,7 +1739,7 @@ const eu = ({
|
|
|
1739
1739
|
}
|
|
1740
1740
|
)
|
|
1741
1741
|
},
|
|
1742
|
-
|
|
1742
|
+
C
|
|
1743
1743
|
);
|
|
1744
1744
|
}
|
|
1745
1745
|
const {
|
|
@@ -2111,15 +2111,15 @@ const yu = y(
|
|
|
2111
2111
|
isNested: u,
|
|
2112
2112
|
actions: p,
|
|
2113
2113
|
disabled: v,
|
|
2114
|
-
disabledReason:
|
|
2115
|
-
note:
|
|
2116
|
-
isBlockingOperation:
|
|
2114
|
+
disabledReason: k,
|
|
2115
|
+
note: M,
|
|
2116
|
+
isBlockingOperation: C,
|
|
2117
2117
|
...b
|
|
2118
2118
|
} = r;
|
|
2119
2119
|
return /* @__PURE__ */ l.jsx(
|
|
2120
2120
|
Te,
|
|
2121
2121
|
{
|
|
2122
|
-
title: v ?
|
|
2122
|
+
title: v ? k : M,
|
|
2123
2123
|
withoutContainer: !(t || v),
|
|
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: v, ...
|
|
2282
|
+
const { variant: p, color: v, ...k } = u;
|
|
2283
2283
|
return /* @__PURE__ */ l.jsx(
|
|
2284
2284
|
Pu,
|
|
2285
2285
|
{
|
|
2286
2286
|
variant: "text",
|
|
2287
2287
|
color: "primary",
|
|
2288
|
-
...
|
|
2288
|
+
...k
|
|
2289
2289
|
}
|
|
2290
2290
|
);
|
|
2291
2291
|
};
|
|
@@ -2760,15 +2760,15 @@ 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]), k = (M) => {
|
|
2764
2764
|
if (d) {
|
|
2765
|
-
const
|
|
2765
|
+
const C = M.target.value?.trim();
|
|
2766
2766
|
u.onChange?.({
|
|
2767
|
-
...
|
|
2768
|
-
target: { ...
|
|
2767
|
+
...M,
|
|
2768
|
+
target: { ...M.target, value: C }
|
|
2769
2769
|
});
|
|
2770
2770
|
}
|
|
2771
|
-
f?.(
|
|
2771
|
+
f?.(M);
|
|
2772
2772
|
};
|
|
2773
2773
|
return /* @__PURE__ */ l.jsx(
|
|
2774
2774
|
cl,
|
|
@@ -2787,7 +2787,7 @@ const Iu = {
|
|
|
2787
2787
|
maxLength: c,
|
|
2788
2788
|
...i
|
|
2789
2789
|
},
|
|
2790
|
-
onBlur:
|
|
2790
|
+
onBlur: k,
|
|
2791
2791
|
...u
|
|
2792
2792
|
}
|
|
2793
2793
|
);
|
|
@@ -2809,19 +2809,19 @@ const Iu = {
|
|
|
2809
2809
|
noOptionsText: c = "Нет данных",
|
|
2810
2810
|
onInputChange: d
|
|
2811
2811
|
}) => {
|
|
2812
|
-
const [f, u] = me(""), p = Zu(e), v = f.length >= 1,
|
|
2812
|
+
const [f, u] = me(""), p = Zu(e), v = f.length >= 1, k = o.length > 0, M = v || k || a || i, C = ve(
|
|
2813
2813
|
(m, $) => t ? t(m, $) : JSON.stringify(m) === JSON.stringify($),
|
|
2814
2814
|
[t]
|
|
2815
2815
|
);
|
|
2816
2816
|
return {
|
|
2817
2817
|
isValueEmpty: p,
|
|
2818
|
-
isPopperVisible:
|
|
2818
|
+
isPopperVisible: M,
|
|
2819
2819
|
autocompleteProps: {
|
|
2820
|
-
isOptionEqualToValue:
|
|
2820
|
+
isOptionEqualToValue: C,
|
|
2821
2821
|
autoHighlight: r ? !1 : n,
|
|
2822
2822
|
noOptionsText: i ? s : c,
|
|
2823
|
-
onInputChange: (m, $,
|
|
2824
|
-
d?.(m, $,
|
|
2823
|
+
onInputChange: (m, $, A) => {
|
|
2824
|
+
d?.(m, $, A), a || u($);
|
|
2825
2825
|
}
|
|
2826
2826
|
}
|
|
2827
2827
|
};
|
|
@@ -2837,20 +2837,20 @@ const Iu = {
|
|
|
2837
2837
|
multiple: u,
|
|
2838
2838
|
size: p = "medium",
|
|
2839
2839
|
placeholder: v = Xu,
|
|
2840
|
-
overflowOption:
|
|
2841
|
-
closeText:
|
|
2842
|
-
openText:
|
|
2840
|
+
overflowOption: k,
|
|
2841
|
+
closeText: M = "Закрыть",
|
|
2842
|
+
openText: C = "Открыть",
|
|
2843
2843
|
clearText: b = "Очистить",
|
|
2844
2844
|
loadingText: m = /* @__PURE__ */ l.jsx(Mn, { color: "primary" }),
|
|
2845
2845
|
isLoadedDataError: $,
|
|
2846
|
-
loadedDataError:
|
|
2847
|
-
noOptionsText:
|
|
2848
|
-
autoHighlight:
|
|
2849
|
-
renderInput:
|
|
2850
|
-
renderTags:
|
|
2846
|
+
loadedDataError: A,
|
|
2847
|
+
noOptionsText: E,
|
|
2848
|
+
autoHighlight: S,
|
|
2849
|
+
renderInput: x,
|
|
2850
|
+
renderTags: j,
|
|
2851
2851
|
renderOption: T,
|
|
2852
|
-
...
|
|
2853
|
-
} = e,
|
|
2852
|
+
...z
|
|
2853
|
+
} = e, L = ve(
|
|
2854
2854
|
(Y) => {
|
|
2855
2855
|
const B = {
|
|
2856
2856
|
...Y,
|
|
@@ -2863,11 +2863,11 @@ const Iu = {
|
|
|
2863
2863
|
helperText: d,
|
|
2864
2864
|
size: p
|
|
2865
2865
|
};
|
|
2866
|
-
return
|
|
2866
|
+
return x ? x(B) : /* @__PURE__ */ l.jsx(rn, { ...B });
|
|
2867
2867
|
},
|
|
2868
2868
|
[
|
|
2869
2869
|
t,
|
|
2870
|
-
|
|
2870
|
+
x,
|
|
2871
2871
|
f,
|
|
2872
2872
|
o,
|
|
2873
2873
|
v,
|
|
@@ -2891,27 +2891,27 @@ const Iu = {
|
|
|
2891
2891
|
Nt,
|
|
2892
2892
|
{
|
|
2893
2893
|
rowsCount: qu,
|
|
2894
|
-
...
|
|
2894
|
+
...k,
|
|
2895
2895
|
children: Y.key
|
|
2896
2896
|
}
|
|
2897
2897
|
));
|
|
2898
2898
|
},
|
|
2899
|
-
[u,
|
|
2899
|
+
[u, k, T]
|
|
2900
2900
|
), W = ve(
|
|
2901
|
-
(Y, B, Z) =>
|
|
2902
|
-
const
|
|
2901
|
+
(Y, B, Z) => j ? j(Y, B, Z) : Y.map((oe, te) => {
|
|
2902
|
+
const O = c?.(oe) || "";
|
|
2903
2903
|
return /* @__PURE__ */ At(
|
|
2904
2904
|
no,
|
|
2905
2905
|
{
|
|
2906
2906
|
deleteIcon: /* @__PURE__ */ l.jsx(Gt, {}),
|
|
2907
2907
|
color: "grey",
|
|
2908
|
-
label:
|
|
2908
|
+
label: O,
|
|
2909
2909
|
...B({ index: te }),
|
|
2910
|
-
key:
|
|
2910
|
+
key: O
|
|
2911
2911
|
}
|
|
2912
2912
|
);
|
|
2913
2913
|
}),
|
|
2914
|
-
[c,
|
|
2914
|
+
[c, j]
|
|
2915
2915
|
), U = ve(
|
|
2916
2916
|
(Y) => n ? /* @__PURE__ */ l.jsx(ul, { ...Y }) : null,
|
|
2917
2917
|
[n]
|
|
@@ -2919,11 +2919,11 @@ const Iu = {
|
|
|
2919
2919
|
return /* @__PURE__ */ l.jsx(
|
|
2920
2920
|
dl,
|
|
2921
2921
|
{
|
|
2922
|
-
...
|
|
2922
|
+
...z,
|
|
2923
2923
|
size: p,
|
|
2924
2924
|
clearText: b,
|
|
2925
|
-
closeText:
|
|
2926
|
-
openText:
|
|
2925
|
+
closeText: M,
|
|
2926
|
+
openText: C,
|
|
2927
2927
|
loadingText: m,
|
|
2928
2928
|
multiple: u,
|
|
2929
2929
|
disableCloseOnSelect: u,
|
|
@@ -2937,7 +2937,7 @@ const Iu = {
|
|
|
2937
2937
|
}
|
|
2938
2938
|
},
|
|
2939
2939
|
getOptionLabel: c,
|
|
2940
|
-
renderInput:
|
|
2940
|
+
renderInput: L,
|
|
2941
2941
|
renderTags: W,
|
|
2942
2942
|
renderOption: N,
|
|
2943
2943
|
...r
|
|
@@ -2953,33 +2953,33 @@ const Iu = {
|
|
|
2953
2953
|
onOpen: i,
|
|
2954
2954
|
onInputChange: s
|
|
2955
2955
|
}) => {
|
|
2956
|
-
const [c, d] = me(!1), [f, u] = me(!0), [p, v] = me(!0),
|
|
2957
|
-
Ra((
|
|
2958
|
-
|
|
2959
|
-
const
|
|
2960
|
-
|
|
2961
|
-
|
|
2956
|
+
const [c, d] = me(!1), [f, u] = me(!0), [p, v] = me(!0), k = Le(null), [M, C] = me([]), b = ve(
|
|
2957
|
+
Ra((E) => {
|
|
2958
|
+
k.current?.abort();
|
|
2959
|
+
const S = new AbortController();
|
|
2960
|
+
k.current = S, e(E, S?.signal).then((x) => {
|
|
2961
|
+
C(x), v(x.length === 0);
|
|
2962
2962
|
}).finally(() => {
|
|
2963
|
-
d(!1),
|
|
2963
|
+
d(!1), k.current = null;
|
|
2964
2964
|
});
|
|
2965
2965
|
}, t),
|
|
2966
2966
|
[e, t, a]
|
|
2967
2967
|
);
|
|
2968
2968
|
return {
|
|
2969
|
-
handleOpen: (
|
|
2969
|
+
handleOpen: (E) => {
|
|
2970
2970
|
if (f) {
|
|
2971
2971
|
u(!1);
|
|
2972
|
-
const
|
|
2973
|
-
(r || n === 0) && (d(!0), b(
|
|
2972
|
+
const S = r && o ? o(r) : "";
|
|
2973
|
+
(r || n === 0) && (d(!0), b(S));
|
|
2974
2974
|
}
|
|
2975
|
-
i?.(
|
|
2975
|
+
i?.(E);
|
|
2976
2976
|
},
|
|
2977
|
-
handleInputChange: (
|
|
2978
|
-
if (!
|
|
2979
|
-
return b && b.clear(), v(!1), d(!1),
|
|
2980
|
-
d(!0), f || b(
|
|
2977
|
+
handleInputChange: (E, S, x) => {
|
|
2978
|
+
if (!S || S.length < n)
|
|
2979
|
+
return b && b.clear(), v(!1), d(!1), C([]);
|
|
2980
|
+
d(!0), f || b(S), s?.(E, S, x);
|
|
2981
2981
|
},
|
|
2982
|
-
options:
|
|
2982
|
+
options: M,
|
|
2983
2983
|
isLoadingData: c,
|
|
2984
2984
|
emptyOptionsText: p ? a : td
|
|
2985
2985
|
};
|
|
@@ -2999,9 +2999,9 @@ const Iu = {
|
|
|
2999
2999
|
isSuccess: u,
|
|
3000
3000
|
isError: p,
|
|
3001
3001
|
isLoading: v,
|
|
3002
|
-
isFullWidth:
|
|
3003
|
-
onOpen:
|
|
3004
|
-
noOptionsText:
|
|
3002
|
+
isFullWidth: k,
|
|
3003
|
+
onOpen: M,
|
|
3004
|
+
noOptionsText: C,
|
|
3005
3005
|
onInputChange: b,
|
|
3006
3006
|
...m
|
|
3007
3007
|
} = e;
|
|
@@ -3010,7 +3010,7 @@ const Iu = {
|
|
|
3010
3010
|
{
|
|
3011
3011
|
options: t,
|
|
3012
3012
|
disabled: d,
|
|
3013
|
-
fullWidth:
|
|
3013
|
+
fullWidth: k,
|
|
3014
3014
|
loading: v || 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: v,
|
|
3349
|
-
...
|
|
3349
|
+
...k
|
|
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, { ...k, ...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: v = /* @__PURE__ */ l.jsx(Fe, { onClick: p, children: "Попробовать снова" })
|
|
3593
|
-
} = r,
|
|
3593
|
+
} = r, k = u.map((M) => /* @__PURE__ */ l.jsx(ye, { component: "p", children: M }, M));
|
|
3594
3594
|
return /* @__PURE__ */ l.jsx(
|
|
3595
3595
|
bn,
|
|
3596
3596
|
{
|
|
3597
3597
|
title: c,
|
|
3598
|
-
description:
|
|
3598
|
+
description: k,
|
|
3599
3599
|
imgAlt: d,
|
|
3600
3600
|
imgSrc: f,
|
|
3601
3601
|
Actions: v
|
|
@@ -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] = me(!1), u = n[e], { isDisabled: p, disabledReason: v } = o || {},
|
|
3835
|
+
const [d, f] = me(!1), u = n[e], { isDisabled: p, disabledReason: v } = o || {}, k = a && !!i?.find(($) => $[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: k,
|
|
3862
3862
|
disabled: p,
|
|
3863
3863
|
onChange: s(n)
|
|
3864
3864
|
}
|
|
@@ -3873,38 +3873,38 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
|
|
|
3873
3873
|
columns: u,
|
|
3874
3874
|
emptyCellValue: p,
|
|
3875
3875
|
selectedRows: v,
|
|
3876
|
-
activeRowId:
|
|
3877
|
-
keyId:
|
|
3878
|
-
onSelectRow:
|
|
3876
|
+
activeRowId: k,
|
|
3877
|
+
keyId: M,
|
|
3878
|
+
onSelectRow: C,
|
|
3879
3879
|
onRowClick: b,
|
|
3880
3880
|
// В этот rest-оператор попадают специфичные пропсы (атрибуты) virtuoso
|
|
3881
3881
|
// Необходимы для NewDataGridInfinite
|
|
3882
3882
|
...m
|
|
3883
|
-
} = e, { isDisabledLastCell: $ = !0, isNotSelectable:
|
|
3883
|
+
} = e, { isDisabledLastCell: $ = !0, isNotSelectable: A } = c || {}, E = () => !d || A ? null : d && !A && /* @__PURE__ */ l.jsx(
|
|
3884
3884
|
bf,
|
|
3885
3885
|
{
|
|
3886
3886
|
inert: a ? !0 : void 0,
|
|
3887
|
-
onClick: (
|
|
3887
|
+
onClick: (x) => x.stopPropagation(),
|
|
3888
3888
|
children: /* @__PURE__ */ l.jsx(or, { ...n, style: { padding: 0 } })
|
|
3889
3889
|
}
|
|
3890
|
-
),
|
|
3891
|
-
const
|
|
3892
|
-
return u?.map((
|
|
3893
|
-
const
|
|
3890
|
+
), S = ve(() => {
|
|
3891
|
+
const x = $ ? void 0 : [u.length - 1];
|
|
3892
|
+
return u?.map((j, T) => {
|
|
3893
|
+
const z = `${t}-${T}`, L = wf(
|
|
3894
3894
|
a,
|
|
3895
|
-
|
|
3895
|
+
x,
|
|
3896
3896
|
T
|
|
3897
3897
|
), N = !T;
|
|
3898
3898
|
return /* @__PURE__ */ l.jsx(
|
|
3899
3899
|
mf,
|
|
3900
3900
|
{
|
|
3901
3901
|
row: s,
|
|
3902
|
-
cell:
|
|
3902
|
+
cell: j,
|
|
3903
3903
|
emptyCellValue: p,
|
|
3904
|
-
startAdornment: N &&
|
|
3905
|
-
isDisabled:
|
|
3904
|
+
startAdornment: N && E(),
|
|
3905
|
+
isDisabled: L
|
|
3906
3906
|
},
|
|
3907
|
-
|
|
3907
|
+
z
|
|
3908
3908
|
);
|
|
3909
3909
|
});
|
|
3910
3910
|
}, [u, a]);
|
|
@@ -3914,7 +3914,7 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
|
|
|
3914
3914
|
$gridColumns: f,
|
|
3915
3915
|
[_r]: a,
|
|
3916
3916
|
...r,
|
|
3917
|
-
children:
|
|
3917
|
+
children: S()
|
|
3918
3918
|
}
|
|
3919
3919
|
) }) });
|
|
3920
3920
|
}, Cf = y("ul", {
|
|
@@ -3953,14 +3953,14 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
|
|
|
3953
3953
|
noDataPlaceholder: u,
|
|
3954
3954
|
onRetry: p,
|
|
3955
3955
|
...v
|
|
3956
|
-
} = e,
|
|
3956
|
+
} = e, k = Re(() => o.map(({ children: M, options: C, ...b }) => {
|
|
3957
3957
|
const m = b[f];
|
|
3958
3958
|
return /* @__PURE__ */ l.jsx(
|
|
3959
3959
|
kf,
|
|
3960
3960
|
{
|
|
3961
3961
|
row: b,
|
|
3962
3962
|
selectedRows: a,
|
|
3963
|
-
options:
|
|
3963
|
+
options: C,
|
|
3964
3964
|
keyId: f,
|
|
3965
3965
|
...v
|
|
3966
3966
|
},
|
|
@@ -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 ? k : 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 }, v) => {
|
|
4108
|
-
const
|
|
4108
|
+
const k = !v, M = () => !k || !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
|
{
|
|
@@ -4114,7 +4114,7 @@ const Of = y("div", {
|
|
|
4114
4114
|
label: f,
|
|
4115
4115
|
isSortable: u,
|
|
4116
4116
|
align: p,
|
|
4117
|
-
startAdornment:
|
|
4117
|
+
startAdornment: M(),
|
|
4118
4118
|
onSort: n
|
|
4119
4119
|
},
|
|
4120
4120
|
f
|
|
@@ -4208,18 +4208,18 @@ const Of = y("div", {
|
|
|
4208
4208
|
}, [n, o]);
|
|
4209
4209
|
const p = Hf(t), v = Re(() => f.filter(
|
|
4210
4210
|
(m) => !r.find(($) => $[e] === m[e])
|
|
4211
|
-
).length, [f, r, e]),
|
|
4211
|
+
).length, [f, r, e]), k = ve(() => n.length <= 1 ? t.map((m) => ({ ...m, sortable: !1 })) : t, [t, n]), M = o ? u.current : n, C = (m) => {
|
|
4212
4212
|
if (!i)
|
|
4213
4213
|
return;
|
|
4214
4214
|
if (m.target.checked) {
|
|
4215
|
-
const
|
|
4215
|
+
const A = Ul(
|
|
4216
4216
|
[...r, ...f],
|
|
4217
4217
|
ql(e)
|
|
4218
4218
|
);
|
|
4219
|
-
return i(
|
|
4219
|
+
return i(A);
|
|
4220
4220
|
}
|
|
4221
4221
|
const $ = r.filter(
|
|
4222
|
-
(
|
|
4222
|
+
(A) => !n.find((E) => E[e] === A[e])
|
|
4223
4223
|
);
|
|
4224
4224
|
i($);
|
|
4225
4225
|
}, b = ve(
|
|
@@ -4229,7 +4229,7 @@ const Of = y("div", {
|
|
|
4229
4229
|
return i([...r, m]);
|
|
4230
4230
|
i(
|
|
4231
4231
|
r.filter(
|
|
4232
|
-
(
|
|
4232
|
+
(A) => A[e] !== m[e]
|
|
4233
4233
|
)
|
|
4234
4234
|
);
|
|
4235
4235
|
}
|
|
@@ -4238,14 +4238,14 @@ const Of = y("div", {
|
|
|
4238
4238
|
);
|
|
4239
4239
|
return {
|
|
4240
4240
|
isDataGridDisabled: d,
|
|
4241
|
-
renderRows:
|
|
4241
|
+
renderRows: M,
|
|
4242
4242
|
headProps: {
|
|
4243
4243
|
rowsCount: f.length,
|
|
4244
4244
|
uncheckedRowsCount: v,
|
|
4245
4245
|
gridColumns: p,
|
|
4246
4246
|
isSelectable: c,
|
|
4247
|
-
columns:
|
|
4248
|
-
onSelectAllRows:
|
|
4247
|
+
columns: k(),
|
|
4248
|
+
onSelectAllRows: C
|
|
4249
4249
|
},
|
|
4250
4250
|
bodyProps: {
|
|
4251
4251
|
gridColumns: p,
|
|
@@ -4266,26 +4266,26 @@ const Of = y("div", {
|
|
|
4266
4266
|
minDisplayRows: u = ff,
|
|
4267
4267
|
errorMsg: p,
|
|
4268
4268
|
footer: v,
|
|
4269
|
-
noDataPlaceholder:
|
|
4270
|
-
isLoading:
|
|
4271
|
-
isError:
|
|
4269
|
+
noDataPlaceholder: k,
|
|
4270
|
+
isLoading: M,
|
|
4271
|
+
isError: C,
|
|
4272
4272
|
keyId: b,
|
|
4273
4273
|
activeRowId: m,
|
|
4274
4274
|
emptyCellValue: $ = i,
|
|
4275
|
-
className:
|
|
4276
|
-
onRowClick:
|
|
4277
|
-
onSort:
|
|
4278
|
-
noDataOptions:
|
|
4279
|
-
onRetry:
|
|
4280
|
-
} = e, T = t ? zf : ui,
|
|
4281
|
-
return /* @__PURE__ */ l.jsxs(Vf, { $maxHeight: f, className:
|
|
4275
|
+
className: A,
|
|
4276
|
+
onRowClick: E,
|
|
4277
|
+
onSort: S,
|
|
4278
|
+
noDataOptions: x,
|
|
4279
|
+
onRetry: j
|
|
4280
|
+
} = e, T = t ? zf : ui, z = ve(() => M ? null : k || /* @__PURE__ */ l.jsx(Lf, { ...x }), [k, x, M]);
|
|
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(
|
|
4284
4284
|
Nf,
|
|
4285
4285
|
{
|
|
4286
4286
|
...n,
|
|
4287
4287
|
sorting: d,
|
|
4288
|
-
onSort:
|
|
4288
|
+
onSort: S
|
|
4289
4289
|
}
|
|
4290
4290
|
),
|
|
4291
4291
|
/* @__PURE__ */ l.jsx(
|
|
@@ -4299,12 +4299,12 @@ const Of = y("div", {
|
|
|
4299
4299
|
rows: a,
|
|
4300
4300
|
columns: s,
|
|
4301
4301
|
emptyCellValue: $,
|
|
4302
|
-
isLoading:
|
|
4303
|
-
isError:
|
|
4302
|
+
isLoading: M,
|
|
4303
|
+
isError: C,
|
|
4304
4304
|
errorMsg: p,
|
|
4305
|
-
noDataPlaceholder:
|
|
4306
|
-
onRowClick:
|
|
4307
|
-
onRetry:
|
|
4305
|
+
noDataPlaceholder: z(),
|
|
4306
|
+
onRowClick: E,
|
|
4307
|
+
onRetry: j
|
|
4308
4308
|
}
|
|
4309
4309
|
)
|
|
4310
4310
|
] }),
|
|
@@ -4333,9 +4333,9 @@ const Of = y("div", {
|
|
|
4333
4333
|
disabledReason: u,
|
|
4334
4334
|
disabled: p,
|
|
4335
4335
|
loading: v,
|
|
4336
|
-
isBlockingOperation:
|
|
4337
|
-
loadingNote:
|
|
4338
|
-
onClick:
|
|
4336
|
+
isBlockingOperation: k,
|
|
4337
|
+
loadingNote: M,
|
|
4338
|
+
onClick: C,
|
|
4339
4339
|
...b
|
|
4340
4340
|
} = n, m = ($) => /* @__PURE__ */ l.jsx(
|
|
4341
4341
|
Te,
|
|
@@ -4363,10 +4363,10 @@ const Of = y("div", {
|
|
|
4363
4363
|
text: d,
|
|
4364
4364
|
confirmButtonProps: f,
|
|
4365
4365
|
actionComponent: ($) => m($),
|
|
4366
|
-
onConfirm: r(
|
|
4366
|
+
onConfirm: r(C)
|
|
4367
4367
|
}
|
|
4368
4368
|
) : m({
|
|
4369
|
-
onClick: r(
|
|
4369
|
+
onClick: r(C)
|
|
4370
4370
|
}) });
|
|
4371
4371
|
}, qf = ({
|
|
4372
4372
|
action: e,
|
|
@@ -4534,32 +4534,32 @@ const Of = y("div", {
|
|
|
4534
4534
|
getOptionLabel: n,
|
|
4535
4535
|
onChange: r
|
|
4536
4536
|
}) => {
|
|
4537
|
-
const [o, a] = me(1), i = Le(!1), s = Le(null), c = (p, v,
|
|
4538
|
-
const
|
|
4537
|
+
const [o, a] = me(1), i = Le(!1), s = Le(null), c = (p, v, k) => {
|
|
4538
|
+
const M = n(e[0]);
|
|
4539
4539
|
document.body.appendChild(p);
|
|
4540
|
-
let
|
|
4540
|
+
let C = 0, b = 0;
|
|
4541
4541
|
for (let m = 1; m < e.length; m += 1) {
|
|
4542
4542
|
const $ = p.firstChild?.cloneNode(
|
|
4543
4543
|
!0
|
|
4544
|
-
),
|
|
4545
|
-
if (!
|
|
4544
|
+
), A = n(e[m]), E = di($, M);
|
|
4545
|
+
if (!E)
|
|
4546
4546
|
throw new Error("Could not find text node");
|
|
4547
|
-
|
|
4548
|
-
const
|
|
4549
|
-
if (
|
|
4547
|
+
E.textContent = A, p.appendChild($);
|
|
4548
|
+
const x = $.getBoundingClientRect().width + k;
|
|
4549
|
+
if (C + x > v)
|
|
4550
4550
|
break;
|
|
4551
|
-
b += 1,
|
|
4551
|
+
b += 1, C += x;
|
|
4552
4552
|
}
|
|
4553
4553
|
return document.body.removeChild(p), b;
|
|
4554
4554
|
}, d = () => {
|
|
4555
4555
|
const p = s.current;
|
|
4556
4556
|
if (!p)
|
|
4557
4557
|
throw new Error("Tags container ref is not set");
|
|
4558
|
-
const v = window.getComputedStyle(p),
|
|
4558
|
+
const v = window.getComputedStyle(p), k = Number.parseInt(v.columnGap), M = p.firstElementChild?.getBoundingClientRect().width || 0, C = p.getBoundingClientRect().width - M, b = p.cloneNode(!0);
|
|
4559
4559
|
for (; b.lastElementChild && b.children.length > 1; )
|
|
4560
4560
|
b.removeChild(b.lastElementChild);
|
|
4561
4561
|
b.style.visibility = "hidden";
|
|
4562
|
-
const m = c(b,
|
|
4562
|
+
const m = c(b, C, k);
|
|
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, v) => {
|
|
4582
|
-
const
|
|
4583
|
-
return { label:
|
|
4582
|
+
const k = n(p), M = v === o - 1 && o <= e.length;
|
|
4583
|
+
return { label: k, shrinks: M, onDelete: () => {
|
|
4584
4584
|
const b = e?.filter((m) => typeof m == "string" ? m !== p : m[t] !== p[t]);
|
|
4585
4585
|
r(b?.length ? b : []);
|
|
4586
4586
|
} };
|
|
@@ -4674,16 +4674,16 @@ function up({
|
|
|
4674
4674
|
const [s, c] = me(
|
|
4675
4675
|
o || r || !1
|
|
4676
4676
|
), d = Le(null), f = () => c(!0), u = () => c(!1), p = () => {
|
|
4677
|
-
const
|
|
4677
|
+
const M = {
|
|
4678
4678
|
target: {
|
|
4679
4679
|
value: a ? [] : ""
|
|
4680
4680
|
}
|
|
4681
4681
|
};
|
|
4682
|
-
t?.call({},
|
|
4683
|
-
}, v = i && !(!e || Array.isArray(e) && e.length === 0 || typeof e == "string" && e.length === 0),
|
|
4682
|
+
t?.call({}, M);
|
|
4683
|
+
}, v = i && !(!e || Array.isArray(e) && e.length === 0 || typeof e == "string" && e.length === 0), k = !Ts.count(n);
|
|
4684
4684
|
return {
|
|
4685
4685
|
isOpened: s,
|
|
4686
|
-
isNoData:
|
|
4686
|
+
isNoData: k,
|
|
4687
4687
|
isShowingClearButton: v,
|
|
4688
4688
|
resetButtonRef: d,
|
|
4689
4689
|
openSelect: f,
|
|
@@ -4705,7 +4705,7 @@ const dp = ({ onClick: e, disabled: t, ref: n }) => /* @__PURE__ */ l.jsx(
|
|
|
4705
4705
|
);
|
|
4706
4706
|
function pi({
|
|
4707
4707
|
required: e,
|
|
4708
|
-
getOptionLabel: t = (
|
|
4708
|
+
getOptionLabel: t = (M) => String(M),
|
|
4709
4709
|
placeholder: n,
|
|
4710
4710
|
helperText: r,
|
|
4711
4711
|
loading: o,
|
|
@@ -4718,24 +4718,24 @@ function pi({
|
|
|
4718
4718
|
id: u,
|
|
4719
4719
|
onChange: p,
|
|
4720
4720
|
isShowClearButton: v,
|
|
4721
|
-
...
|
|
4721
|
+
...k
|
|
4722
4722
|
}) {
|
|
4723
4723
|
const {
|
|
4724
|
-
isOpened:
|
|
4725
|
-
isShowingClearButton:
|
|
4724
|
+
isOpened: M,
|
|
4725
|
+
isShowingClearButton: C,
|
|
4726
4726
|
isNoData: b,
|
|
4727
4727
|
onClearAll: m,
|
|
4728
4728
|
openSelect: $,
|
|
4729
|
-
closeSelect:
|
|
4730
|
-
resetButtonRef:
|
|
4729
|
+
closeSelect: A,
|
|
4730
|
+
resetButtonRef: E
|
|
4731
4731
|
} = up({
|
|
4732
|
-
...
|
|
4732
|
+
...k,
|
|
4733
4733
|
children: i,
|
|
4734
4734
|
onChange: p,
|
|
4735
4735
|
isShowClearButton: v
|
|
4736
|
-
}),
|
|
4737
|
-
if (Array.isArray(
|
|
4738
|
-
const
|
|
4736
|
+
}), S = (x) => {
|
|
4737
|
+
if (Array.isArray(x) && x.length) {
|
|
4738
|
+
const j = (T) => p?.(T ? {
|
|
4739
4739
|
target: {
|
|
4740
4740
|
value: T
|
|
4741
4741
|
}
|
|
@@ -4747,38 +4747,38 @@ function pi({
|
|
|
4747
4747
|
return /* @__PURE__ */ l.jsx(
|
|
4748
4748
|
op,
|
|
4749
4749
|
{
|
|
4750
|
-
data:
|
|
4750
|
+
data: x,
|
|
4751
4751
|
keyId: "value",
|
|
4752
4752
|
getOptionLabel: t,
|
|
4753
|
-
onChange:
|
|
4753
|
+
onChange: j,
|
|
4754
4754
|
onClick: $
|
|
4755
4755
|
}
|
|
4756
4756
|
);
|
|
4757
4757
|
}
|
|
4758
|
-
return (Array.isArray(
|
|
4758
|
+
return (Array.isArray(x) || typeof x == "string") && !x.length ? n : t(x);
|
|
4759
4759
|
};
|
|
4760
4760
|
return /* @__PURE__ */ l.jsxs(La, { error: c, fullWidth: f, children: [
|
|
4761
4761
|
d && /* @__PURE__ */ l.jsx(Cl, { htmlFor: u || d, required: e, children: d }),
|
|
4762
4762
|
/* @__PURE__ */ l.jsxs(
|
|
4763
4763
|
cp,
|
|
4764
4764
|
{
|
|
4765
|
-
...
|
|
4766
|
-
open:
|
|
4765
|
+
...k,
|
|
4766
|
+
open: M,
|
|
4767
4767
|
id: u || d,
|
|
4768
4768
|
disabled: s,
|
|
4769
4769
|
onOpen: $,
|
|
4770
|
-
onClose:
|
|
4771
|
-
renderValue:
|
|
4770
|
+
onClose: A,
|
|
4771
|
+
renderValue: S,
|
|
4772
4772
|
IconComponent: () => null,
|
|
4773
4773
|
displayEmpty: !0,
|
|
4774
4774
|
fullWidth: f,
|
|
4775
4775
|
onChange: p,
|
|
4776
4776
|
endAdornment: /* @__PURE__ */ l.jsxs(lp, { children: [
|
|
4777
|
-
|
|
4777
|
+
C && /* @__PURE__ */ l.jsx(
|
|
4778
4778
|
dp,
|
|
4779
4779
|
{
|
|
4780
4780
|
disabled: s,
|
|
4781
|
-
ref:
|
|
4781
|
+
ref: E,
|
|
4782
4782
|
onClick: m
|
|
4783
4783
|
}
|
|
4784
4784
|
),
|
|
@@ -4788,7 +4788,7 @@ function pi({
|
|
|
4788
4788
|
variant: "text",
|
|
4789
4789
|
disabled: s,
|
|
4790
4790
|
onClick: $,
|
|
4791
|
-
children:
|
|
4791
|
+
children: M ? /* @__PURE__ */ l.jsx(Ws, { size: 16 }) : /* @__PURE__ */ l.jsx(Gr, { size: 16 })
|
|
4792
4792
|
}
|
|
4793
4793
|
)
|
|
4794
4794
|
] }),
|
|
@@ -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((k) => /* @__PURE__ */ l.jsx(st, { value: k, children: k }, k))
|
|
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 v = gn(e.timeZone, e),
|
|
4982
|
-
|
|
4981
|
+
const v = gn(e.timeZone, e), k = c - v;
|
|
4982
|
+
k && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + k), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + k));
|
|
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 v = r.formatMonthDropdown(p, o),
|
|
6722
|
-
return { value:
|
|
6721
|
+
const v = r.formatMonthDropdown(p, o), k = d(p), M = t && p < a(t) || n && p > a(n) || !1;
|
|
6722
|
+
return { value: k, label: v, disabled: M };
|
|
6723
6723
|
});
|
|
6724
6724
|
}
|
|
6725
6725
|
function Dg(e, t = {}, n = {}) {
|
|
@@ -6746,11 +6746,11 @@ function Eg(e, t, n, r) {
|
|
|
6746
6746
|
let v = f;
|
|
6747
6747
|
for (; c(v, u) || d(v, u); )
|
|
6748
6748
|
p.push(v), v = i(v, 1);
|
|
6749
|
-
return p.map((
|
|
6750
|
-
const
|
|
6749
|
+
return p.map((k) => {
|
|
6750
|
+
const M = n.formatYearDropdown(k, r);
|
|
6751
6751
|
return {
|
|
6752
|
-
value: s(
|
|
6753
|
-
label:
|
|
6752
|
+
value: s(k),
|
|
6753
|
+
label: M,
|
|
6754
6754
|
disabled: !1
|
|
6755
6755
|
};
|
|
6756
6756
|
});
|
|
@@ -6803,63 +6803,63 @@ 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], v = u ? n[Ke.weeks_after_enter] : n[Ke.weeks_before_enter],
|
|
6807
|
-
if (
|
|
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], v = u ? n[Ke.weeks_after_enter] : n[Ke.weeks_before_enter], k = i.current, M = e.current.cloneNode(!0);
|
|
6807
|
+
if (M instanceof HTMLElement ? (gr(M).forEach(($) => {
|
|
6808
6808
|
if (!($ instanceof HTMLElement))
|
|
6809
6809
|
return;
|
|
6810
|
-
const
|
|
6811
|
-
|
|
6812
|
-
const
|
|
6813
|
-
|
|
6814
|
-
const
|
|
6815
|
-
|
|
6816
|
-
}), i.current =
|
|
6810
|
+
const A = Vg($);
|
|
6811
|
+
A && $.contains(A) && $.removeChild(A);
|
|
6812
|
+
const E = mr($);
|
|
6813
|
+
E && E.classList.remove(p);
|
|
6814
|
+
const S = yr($);
|
|
6815
|
+
S && S.classList.remove(v);
|
|
6816
|
+
}), i.current = M) : 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
|
|
6820
|
-
if (b && b.every((m) => m instanceof HTMLElement) &&
|
|
6819
|
+
const C = k instanceof HTMLElement ? gr(k) : [], b = gr(e.current);
|
|
6820
|
+
if (b && b.every((m) => m instanceof HTMLElement) && C && C.every((m) => m instanceof HTMLElement)) {
|
|
6821
6821
|
c.current = !0, e.current.style.isolation = "isolate";
|
|
6822
6822
|
const m = zg(e.current);
|
|
6823
|
-
m && (m.style.zIndex = "1"), b.forEach(($,
|
|
6824
|
-
const
|
|
6825
|
-
if (!
|
|
6823
|
+
m && (m.style.zIndex = "1"), b.forEach(($, A) => {
|
|
6824
|
+
const E = C[A];
|
|
6825
|
+
if (!E)
|
|
6826
6826
|
return;
|
|
6827
6827
|
$.style.position = "relative", $.style.overflow = "hidden";
|
|
6828
|
-
const
|
|
6829
|
-
|
|
6830
|
-
const
|
|
6831
|
-
|
|
6832
|
-
const
|
|
6833
|
-
c.current = !1, e.current && (e.current.style.isolation = ""), m && (m.style.zIndex = ""),
|
|
6828
|
+
const S = mr($);
|
|
6829
|
+
S && S.classList.add(p);
|
|
6830
|
+
const x = yr($);
|
|
6831
|
+
x && x.classList.add(v);
|
|
6832
|
+
const j = () => {
|
|
6833
|
+
c.current = !1, e.current && (e.current.style.isolation = ""), m && (m.style.zIndex = ""), S && S.classList.remove(p), x && x.classList.remove(v), $.style.position = "", $.style.overflow = "", $.contains(E) && $.removeChild(E);
|
|
6834
6834
|
};
|
|
6835
|
-
|
|
6836
|
-
const T = Hg(
|
|
6835
|
+
E.style.pointerEvents = "none", E.style.position = "absolute", E.style.overflow = "hidden", E.setAttribute("aria-hidden", "true");
|
|
6836
|
+
const T = Hg(E);
|
|
6837
6837
|
T && (T.style.opacity = "0");
|
|
6838
|
-
const
|
|
6839
|
-
|
|
6840
|
-
const
|
|
6841
|
-
|
|
6838
|
+
const z = mr(E);
|
|
6839
|
+
z && (z.classList.add(u ? n[Ke.caption_before_exit] : n[Ke.caption_after_exit]), z.addEventListener("animationend", j));
|
|
6840
|
+
const L = yr(E);
|
|
6841
|
+
L && L.classList.add(u ? n[Ke.weeks_before_exit] : n[Ke.weeks_after_exit]), $.insertBefore(E, $.firstChild);
|
|
6842
6842
|
});
|
|
6843
6843
|
}
|
|
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: v, endOfMonth:
|
|
6848
|
-
for (let
|
|
6849
|
-
const N = d(
|
|
6850
|
-
if (t &&
|
|
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: v, endOfMonth: k, endOfWeek: M, isAfter: C, startOfBroadcastWeek: b, startOfISOWeek: m, startOfWeek: $ } = r, A = c ? b(o, r) : i ? m(o) : $(o), E = c ? p(a, r) : i ? v(k(a)) : M(k(a)), S = f(E, A), x = u(a, o) + 1, j = [];
|
|
6848
|
+
for (let L = 0; L <= S; L++) {
|
|
6849
|
+
const N = d(A, L);
|
|
6850
|
+
if (t && C(N, t))
|
|
6851
6851
|
break;
|
|
6852
|
-
|
|
6852
|
+
j.push(N);
|
|
6853
6853
|
}
|
|
6854
|
-
const
|
|
6855
|
-
if (s &&
|
|
6856
|
-
const
|
|
6857
|
-
for (let N = 0; N <
|
|
6858
|
-
const W = d(
|
|
6859
|
-
|
|
6854
|
+
const z = (c ? 35 : 42) * x;
|
|
6855
|
+
if (s && j.length < z) {
|
|
6856
|
+
const L = z - j.length;
|
|
6857
|
+
for (let N = 0; N < L; N++) {
|
|
6858
|
+
const W = d(j[j.length - 1], 1);
|
|
6859
|
+
j.push(W);
|
|
6860
6860
|
}
|
|
6861
6861
|
}
|
|
6862
|
-
return
|
|
6862
|
+
return j;
|
|
6863
6863
|
}
|
|
6864
6864
|
function Ug(e) {
|
|
6865
6865
|
const t = [];
|
|
@@ -6911,29 +6911,29 @@ 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: v } = r,
|
|
6915
|
-
const b = n.broadcastCalendar ? u(
|
|
6916
|
-
if (n.fixedWeeks && $.length <
|
|
6917
|
-
const
|
|
6918
|
-
const T =
|
|
6919
|
-
return
|
|
6914
|
+
const { addDays: o, endOfBroadcastWeek: a, endOfISOWeek: i, endOfMonth: s, endOfWeek: c, getISOWeek: d, getWeek: f, startOfBroadcastWeek: u, startOfISOWeek: p, startOfWeek: v } = r, k = e.reduce((M, C) => {
|
|
6915
|
+
const b = n.broadcastCalendar ? u(C, r) : n.ISOWeek ? p(C) : v(C), m = n.broadcastCalendar ? a(C, r) : n.ISOWeek ? i(s(C)) : c(s(C)), $ = t.filter((x) => x >= b && x <= m), A = n.broadcastCalendar ? 35 : 42;
|
|
6916
|
+
if (n.fixedWeeks && $.length < A) {
|
|
6917
|
+
const x = t.filter((j) => {
|
|
6918
|
+
const T = A - $.length;
|
|
6919
|
+
return j > m && j <= o(m, T);
|
|
6920
6920
|
});
|
|
6921
|
-
$.push(...
|
|
6921
|
+
$.push(...x);
|
|
6922
6922
|
}
|
|
6923
|
-
const
|
|
6924
|
-
const T = n.ISOWeek ? d(
|
|
6925
|
-
return
|
|
6926
|
-
}, []),
|
|
6927
|
-
return
|
|
6923
|
+
const E = $.reduce((x, j) => {
|
|
6924
|
+
const T = n.ISOWeek ? d(j) : f(j), z = x.find((N) => N.weekNumber === T), L = new Ri(j, C, r);
|
|
6925
|
+
return z ? z.days.push(L) : x.push(new Qg(T, [L])), x;
|
|
6926
|
+
}, []), S = new Xg(C, E);
|
|
6927
|
+
return M.push(S), M;
|
|
6928
6928
|
}, []);
|
|
6929
|
-
return n.reverseMonths ?
|
|
6929
|
+
return n.reverseMonths ? k.reverse() : k;
|
|
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: v, fromMonth:
|
|
6934
|
-
!n &&
|
|
6935
|
-
const
|
|
6936
|
-
return n ? n = i(n) : p ? n = f(p, 0, 1) : !n &&
|
|
6933
|
+
const { startOfYear: o, startOfDay: a, startOfMonth: i, endOfMonth: s, addYears: c, endOfYear: d, newDate: f, today: u } = t, { fromYear: p, toYear: v, fromMonth: k, toMonth: M } = e;
|
|
6934
|
+
!n && k && (n = k), !n && p && (n = t.newDate(p, 0, 1)), !r && M && (r = M), !r && v && (r = f(v, 11, 31));
|
|
6935
|
+
const C = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
|
|
6936
|
+
return n ? n = i(n) : p ? n = f(p, 0, 1) : !n && C && (n = o(c(e.today ?? u(), -100))), r ? r = s(r) : v ? r = f(v, 11, 31) : !r && C && (r = d(e.today ?? u())), [
|
|
6937
6937
|
n && a(n),
|
|
6938
6938
|
r && a(r)
|
|
6939
6939
|
];
|
|
@@ -6971,14 +6971,14 @@ function nm(e, t) {
|
|
|
6971
6971
|
e.month ? i : void 0
|
|
6972
6972
|
);
|
|
6973
6973
|
it(() => {
|
|
6974
|
-
const
|
|
6975
|
-
c(
|
|
6974
|
+
const S = Ko(e, t);
|
|
6975
|
+
c(S);
|
|
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), v = Ug(u),
|
|
6978
|
-
if (
|
|
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), v = Ug(u), k = em(s, n, e, t), M = Kg(s, r, e, t), { disableNavigation: C, onMonthChange: b } = e, m = (S) => p.some((x) => x.days.some((j) => j.isEqualTo(S))), $ = (S) => {
|
|
6978
|
+
if (C)
|
|
6979
6979
|
return;
|
|
6980
|
-
let
|
|
6981
|
-
n &&
|
|
6980
|
+
let x = o(S);
|
|
6981
|
+
n && x < o(n) && (x = o(n)), r && x > o(r) && (x = o(r)), c(x), b?.(x);
|
|
6982
6982
|
};
|
|
6983
6983
|
return {
|
|
6984
6984
|
months: u,
|
|
@@ -6986,11 +6986,11 @@ function nm(e, t) {
|
|
|
6986
6986
|
days: v,
|
|
6987
6987
|
navStart: n,
|
|
6988
6988
|
navEnd: r,
|
|
6989
|
-
previousMonth:
|
|
6990
|
-
nextMonth:
|
|
6989
|
+
previousMonth: k,
|
|
6990
|
+
nextMonth: M,
|
|
6991
6991
|
goToMonth: $,
|
|
6992
|
-
goToDay: (
|
|
6993
|
-
m(
|
|
6992
|
+
goToDay: (S) => {
|
|
6993
|
+
m(S) || $(S.date);
|
|
6994
6994
|
}
|
|
6995
6995
|
};
|
|
6996
6996
|
}
|
|
@@ -7053,16 +7053,16 @@ 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: v, endOfISOWeek:
|
|
7057
|
-
let
|
|
7056
|
+
const { ISOWeek: s, broadcastCalendar: c } = a, { addDays: d, addMonths: f, addWeeks: u, addYears: p, endOfBroadcastWeek: v, endOfISOWeek: k, endOfWeek: M, max: C, min: b, startOfBroadcastWeek: m, startOfISOWeek: $, startOfWeek: A } = i;
|
|
7057
|
+
let S = {
|
|
7058
7058
|
day: d,
|
|
7059
7059
|
week: u,
|
|
7060
7060
|
month: f,
|
|
7061
7061
|
year: p,
|
|
7062
|
-
startOfWeek: (
|
|
7063
|
-
endOfWeek: (
|
|
7062
|
+
startOfWeek: (x) => c ? m(x, i) : s ? $(x) : A(x),
|
|
7063
|
+
endOfWeek: (x) => c ? v(x, i) : s ? k(x) : M(x)
|
|
7064
7064
|
}[e](n, t === "after" ? 1 : -1);
|
|
7065
|
-
return t === "before" && r ?
|
|
7065
|
+
return t === "before" && r ? S = C([r, S]) : t === "after" && o && (S = b([o, S])), S;
|
|
7066
7066
|
}
|
|
7067
7067
|
function Yi(e, t, n, r, o, a, i, s = 0) {
|
|
7068
7068
|
if (s > 365)
|
|
@@ -7082,22 +7082,22 @@ function Yi(e, t, n, r, o, a, i, s = 0) {
|
|
|
7082
7082
|
function am(e, t, n, r, o) {
|
|
7083
7083
|
const { autoFocus: a } = e, [i, s] = me(), c = rm(t.days, n, r || (() => !1), i), [d, f] = me(a ? c : void 0);
|
|
7084
7084
|
return {
|
|
7085
|
-
isFocusTarget: (
|
|
7085
|
+
isFocusTarget: (M) => !!c?.isEqualTo(M),
|
|
7086
7086
|
setFocused: f,
|
|
7087
7087
|
focused: d,
|
|
7088
7088
|
blur: () => {
|
|
7089
7089
|
s(d), f(void 0);
|
|
7090
7090
|
},
|
|
7091
|
-
moveFocus: (
|
|
7091
|
+
moveFocus: (M, C) => {
|
|
7092
7092
|
if (!d)
|
|
7093
7093
|
return;
|
|
7094
|
-
const b = Yi(
|
|
7094
|
+
const b = Yi(M, C, d, t.navStart, t.navEnd, e, o);
|
|
7095
7095
|
b && (t.goToDay(b), f(b));
|
|
7096
7096
|
}
|
|
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: v, 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: v, isAfter: k } = n, M = t.startMonth && u(t.startMonth), C = t.endMonth && v(t.endMonth), b = {
|
|
7101
7101
|
[De.focused]: [],
|
|
7102
7102
|
[De.outside]: [],
|
|
7103
7103
|
[De.disabled]: [],
|
|
@@ -7105,47 +7105,47 @@ function im(e, t, n) {
|
|
|
7105
7105
|
[De.today]: []
|
|
7106
7106
|
}, m = {};
|
|
7107
7107
|
for (const $ of e) {
|
|
7108
|
-
const { date:
|
|
7109
|
-
!s && !i &&
|
|
7110
|
-
|
|
7108
|
+
const { date: A, displayMonth: E } = $, S = !!(E && !f(A, E)), x = !!(M && p(A, M)), j = !!(C && k(A, C)), T = !!(r && $t(A, r, n)), z = !!(o && $t(A, o, n)) || x || j || // Broadcast calendar will show outside days as default
|
|
7109
|
+
!s && !i && S || s && i === !1 && S, L = d(A, c ?? n.today());
|
|
7110
|
+
S && b.outside.push($), T && b.disabled.push($), z && b.hidden.push($), L && b.today.push($), a && Object.keys(a).forEach((N) => {
|
|
7111
7111
|
const W = a?.[N];
|
|
7112
|
-
W && $t(
|
|
7112
|
+
W && $t(A, W, n) && (m[N] ? m[N].push($) : m[N] = [$]);
|
|
7113
7113
|
});
|
|
7114
7114
|
}
|
|
7115
7115
|
return ($) => {
|
|
7116
|
-
const
|
|
7116
|
+
const A = {
|
|
7117
7117
|
[De.focused]: !1,
|
|
7118
7118
|
[De.disabled]: !1,
|
|
7119
7119
|
[De.hidden]: !1,
|
|
7120
7120
|
[De.outside]: !1,
|
|
7121
7121
|
[De.today]: !1
|
|
7122
|
-
},
|
|
7123
|
-
for (const
|
|
7124
|
-
const
|
|
7125
|
-
|
|
7122
|
+
}, E = {};
|
|
7123
|
+
for (const S in b) {
|
|
7124
|
+
const x = b[S];
|
|
7125
|
+
A[S] = x.some((j) => j === $);
|
|
7126
7126
|
}
|
|
7127
|
-
for (const
|
|
7128
|
-
|
|
7127
|
+
for (const S in m)
|
|
7128
|
+
E[S] = m[S].some((x) => x === $);
|
|
7129
7129
|
return {
|
|
7130
|
-
...
|
|
7130
|
+
...A,
|
|
7131
7131
|
// custom modifiers should override all the previous ones
|
|
7132
|
-
...
|
|
7132
|
+
...E
|
|
7133
7133
|
};
|
|
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 = (v) => 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 = (v) => s?.some((k) => c(k, v)) ?? !1, { min: f, max: u } = e;
|
|
7138
7138
|
return {
|
|
7139
7139
|
selected: s,
|
|
7140
|
-
select: (v,
|
|
7141
|
-
let
|
|
7140
|
+
select: (v, k, M) => {
|
|
7141
|
+
let C = [...s ?? []];
|
|
7142
7142
|
if (d(v)) {
|
|
7143
7143
|
if (s?.length === f || r && s?.length === 1)
|
|
7144
7144
|
return;
|
|
7145
|
-
|
|
7145
|
+
C = s?.filter((b) => !c(b, v));
|
|
7146
7146
|
} else
|
|
7147
|
-
s?.length === u ?
|
|
7148
|
-
return o || i(
|
|
7147
|
+
s?.length === u ? C = [v] : C = [...C, v];
|
|
7148
|
+
return o || i(C), o?.(C, v, k, M), C;
|
|
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, v,
|
|
7219
|
-
const { min:
|
|
7220
|
-
return r && n && b?.from && b.to && um({ from: b.from, to: b.to }, n, t) && (b.from = p, b.to = void 0), i || c(b), i?.(b, p, v,
|
|
7218
|
+
select: (p, v, k) => {
|
|
7219
|
+
const { min: M, max: C } = e, b = p ? lm(p, d, M, C, a, t) : void 0;
|
|
7220
|
+
return r && n && b?.from && b.to && um({ from: b.from, to: b.to }, n, t) && (b.from = p, b.to = void 0), i || c(b), i?.(b, p, v, k), b;
|
|
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, v) => {
|
|
7230
|
-
let
|
|
7231
|
-
return !r && s && s && c(u, s) && (
|
|
7230
|
+
let k = u;
|
|
7231
|
+
return !r && s && s && c(u, s) && (k = void 0), o || i(k), o?.(k, u, p, v), k;
|
|
7232
7232
|
},
|
|
7233
7233
|
isSelected: (u) => s ? c(s, u) : !1
|
|
7234
7234
|
};
|
|
@@ -7279,13 +7279,13 @@ 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: v, onDayMouseLeave:
|
|
7283
|
-
Y && (Z(Y),
|
|
7284
|
-
}, [Y, Z,
|
|
7285
|
-
B && (Z(B),
|
|
7286
|
-
}, [Z, B,
|
|
7287
|
-
ce.preventDefault(), ce.stopPropagation(), re(Q),
|
|
7288
|
-
}, [
|
|
7282
|
+
]), { captionLayout: s, mode: c, onDayBlur: d, onDayClick: f, onDayFocus: u, onDayKeyDown: p, onDayMouseEnter: v, onDayMouseLeave: k, onNextClick: M, onPrevClick: C, showWeekNumber: b, styles: m } = e, { formatCaption: $, formatDay: A, formatMonthDropdown: E, formatWeekNumber: S, formatWeekNumberHeader: x, formatWeekdayName: j, formatYearDropdown: T } = n, z = nm(e, o), { days: L, months: N, navStart: W, navEnd: U, previousMonth: Y, nextMonth: B, goToMonth: Z } = z, oe = im(L, e, o), { isSelected: te, select: O, selected: _ } = pm(e, o) ?? {}, { blur: H, focused: G, isFocusTarget: le, moveFocus: se, setFocused: re } = am(e, z, 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 = ve(() => {
|
|
7283
|
+
Y && (Z(Y), C?.(Y));
|
|
7284
|
+
}, [Y, Z, C]), ie = ve(() => {
|
|
7285
|
+
B && (Z(B), M?.(B));
|
|
7286
|
+
}, [Z, B, M]), Ie = ve((Q, de) => (ce) => {
|
|
7287
|
+
ce.preventDefault(), ce.stopPropagation(), re(Q), O?.(Q.date, de, ce), f?.(Q.date, de, ce);
|
|
7288
|
+
}, [O, f, re]), ct = ve((Q, de) => (ce) => {
|
|
7289
7289
|
re(Q), u?.(Q.date, de, ce);
|
|
7290
7290
|
}, [u, re]), h = ve((Q, de) => (ce) => {
|
|
7291
7291
|
H(), d?.(Q.date, de, ce);
|
|
@@ -7309,8 +7309,8 @@ function hm(e) {
|
|
|
7309
7309
|
}, [se, p, e.dir]), D = ve((Q, de) => (ce) => {
|
|
7310
7310
|
v?.(Q.date, de, ce);
|
|
7311
7311
|
}, [v]), I = ve((Q, de) => (ce) => {
|
|
7312
|
-
|
|
7313
|
-
}, [
|
|
7312
|
+
k?.(Q.date, de, ce);
|
|
7313
|
+
}, [k]), F = ve((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 = ve((Q) => (de) => {
|
|
@@ -7329,7 +7329,7 @@ function hm(e) {
|
|
|
7329
7329
|
const nt = {
|
|
7330
7330
|
dayPickerProps: e,
|
|
7331
7331
|
selected: _,
|
|
7332
|
-
select:
|
|
7332
|
+
select: O,
|
|
7333
7333
|
isSelected: te,
|
|
7334
7334
|
months: N,
|
|
7335
7335
|
nextMonth: B,
|
|
@@ -7360,7 +7360,7 @@ function hm(e) {
|
|
|
7360
7360
|
g.createElement(t.MonthCaption, { "data-animated-caption": e.animate ? "true" : void 0, className: i[X.MonthCaption], style: m?.[X.MonthCaption], calendarMonth: Q, displayIndex: de }, s?.startsWith("dropdown") ? g.createElement(
|
|
7361
7361
|
t.DropdownNav,
|
|
7362
7362
|
{ className: i[X.Dropdowns], style: m?.[X.Dropdowns] },
|
|
7363
|
-
s === "dropdown" || s === "dropdown-months" ? g.createElement(t.MonthsDropdown, { className: i[X.MonthsDropdown], "aria-label": Ee(), classNames: i, components: t, disabled: !!e.disableNavigation, onChange: F(Q.date), options: ce, style: m?.[X.Dropdown], value: o.getMonth(Q.date) }) : g.createElement("span", null,
|
|
7363
|
+
s === "dropdown" || s === "dropdown-months" ? g.createElement(t.MonthsDropdown, { className: i[X.MonthsDropdown], "aria-label": Ee(), classNames: i, components: t, disabled: !!e.disableNavigation, onChange: F(Q.date), options: ce, style: m?.[X.Dropdown], value: o.getMonth(Q.date) }) : g.createElement("span", null, E(Q.date, o)),
|
|
7364
7364
|
s === "dropdown" || s === "dropdown-years" ? g.createElement(t.YearsDropdown, { className: i[X.YearsDropdown], "aria-label": J(o.options), classNames: i, components: t, disabled: !!e.disableNavigation, onChange: P(Q.date), options: qe, style: m?.[X.Dropdown], value: o.getYear(Q.date) }) : g.createElement("span", null, T(Q.date, o)),
|
|
7365
7365
|
g.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
7366
7366
|
border: 0,
|
|
@@ -7381,15 +7381,15 @@ function hm(e) {
|
|
|
7381
7381
|
!e.hideWeekdays && g.createElement(
|
|
7382
7382
|
t.Weekdays,
|
|
7383
7383
|
{ "data-animated-weekdays": e.animate ? "true" : void 0, className: i[X.Weekdays], style: m?.[X.Weekdays] },
|
|
7384
|
-
b && g.createElement(t.WeekNumberHeader, { "aria-label": q(o.options), className: i[X.WeekNumberHeader], style: m?.[X.WeekNumberHeader], scope: "col" },
|
|
7385
|
-
$e.map((He, ut) => g.createElement(t.Weekday, { "aria-label": lt(He, o.options, o), className: i[X.Weekday], key: ut, style: m?.[X.Weekday], scope: "col" },
|
|
7384
|
+
b && g.createElement(t.WeekNumberHeader, { "aria-label": q(o.options), className: i[X.WeekNumberHeader], style: m?.[X.WeekNumberHeader], scope: "col" }, x()),
|
|
7385
|
+
$e.map((He, ut) => g.createElement(t.Weekday, { "aria-label": lt(He, o.options, o), className: i[X.Weekday], key: ut, style: m?.[X.Weekday], scope: "col" }, j(He, o.options, o)))
|
|
7386
7386
|
),
|
|
7387
7387
|
g.createElement(t.Weeks, { "data-animated-weeks": e.animate ? "true" : void 0, className: i[X.Weeks], style: m?.[X.Weeks] }, Q.weeks.map((He, ut) => g.createElement(
|
|
7388
7388
|
t.Week,
|
|
7389
7389
|
{ className: i[X.Week], key: He.weekNumber, style: m?.[X.Week], week: He },
|
|
7390
7390
|
b && g.createElement(t.WeekNumber, { week: He, style: m?.[X.WeekNumber], "aria-label": Wt(He.weekNumber, {
|
|
7391
7391
|
locale: a
|
|
7392
|
-
}), className: i[X.WeekNumber], scope: "row", role: "rowheader" },
|
|
7392
|
+
}), className: i[X.WeekNumber], scope: "row", role: "rowheader" }, S(He.weekNumber)),
|
|
7393
7393
|
He.days.map((be) => {
|
|
7394
7394
|
const { date: rt } = be, fe = oe(be);
|
|
7395
7395
|
if (fe[De.focused] = !fe.hidden && !!G?.isEqualTo(be), fe[ht.selected] = te?.(rt) || fe.selected, ao(_)) {
|
|
@@ -7397,7 +7397,7 @@ function hm(e) {
|
|
|
7397
7397
|
fe[ht.range_start] = !!(Oe && Pe && o.isSameDay(rt, Oe)), fe[ht.range_end] = !!(Oe && Pe && o.isSameDay(rt, Pe)), fe[ht.range_middle] = St(_, rt, !0, o);
|
|
7398
7398
|
}
|
|
7399
7399
|
const Fn = Dg(fe, m, e.modifiersStyles), Nn = Hh(fe, i, e.modifiersClassNames), ee = !ke && !fe.hidden ? ae(rt, fe, o.options, o) : void 0;
|
|
7400
|
-
return g.createElement(t.Day, { key: `${o.format(rt, "yyyy-MM-dd")}_${o.format(be.displayMonth, "yyyy-MM")}`, day: be, modifiers: fe, className: Nn.join(" "), style: Fn, role: "gridcell", "aria-selected": fe.selected || void 0, "aria-label": ee, "data-day": o.format(rt, "yyyy-MM-dd"), "data-month": be.outside ? o.format(rt, "yyyy-MM") : void 0, "data-selected": fe.selected || void 0, "data-disabled": fe.disabled || void 0, "data-hidden": fe.hidden || void 0, "data-outside": be.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: be, modifiers: fe, disabled: fe.disabled || void 0, tabIndex: le(be) ? 0 : -1, "aria-label": we(rt, fe, o.options, o), onClick: Ie(be, fe), onBlur: h(be, fe), onFocus: ct(be, fe), onKeyDown: w(be, fe), onMouseEnter: D(be, fe), onMouseLeave: I(be, fe) },
|
|
7400
|
+
return g.createElement(t.Day, { key: `${o.format(rt, "yyyy-MM-dd")}_${o.format(be.displayMonth, "yyyy-MM")}`, day: be, modifiers: fe, className: Nn.join(" "), style: Fn, role: "gridcell", "aria-selected": fe.selected || void 0, "aria-label": ee, "data-day": o.format(rt, "yyyy-MM-dd"), "data-month": be.outside ? o.format(rt, "yyyy-MM") : void 0, "data-selected": fe.selected || void 0, "data-disabled": fe.disabled || void 0, "data-hidden": fe.hidden || void 0, "data-outside": be.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: be, modifiers: fe, disabled: fe.disabled || void 0, tabIndex: le(be) ? 0 : -1, "aria-label": we(rt, fe, o.options, o), onClick: Ie(be, fe), onBlur: h(be, fe), onFocus: ct(be, fe), onKeyDown: w(be, fe), onMouseEnter: D(be, fe), onMouseLeave: I(be, fe) }, A(rt, o.options, o)) : !fe.hidden && A(be.date, o.options, o));
|
|
7401
7401
|
})
|
|
7402
7402
|
)))
|
|
7403
7403
|
)
|
|
@@ -8438,42 +8438,42 @@ 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 }), v = p.value,
|
|
8442
|
-
Object.defineProperty(a, "value", la(la({}, m), {}, { set: function(
|
|
8443
|
-
var
|
|
8444
|
-
b.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 }), v = p.value, k = p.options, M = { value: v, options: k, fallbackOptions: k }, C = { id: -1, cachedId: -1 }, b = { value: "", selectionStart: 0, selectionEnd: 0 }, m = Object.getOwnPropertyDescriptor("_valueTracker" in a ? a : HTMLInputElement.prototype, "value");
|
|
8442
|
+
Object.defineProperty(a, "value", la(la({}, m), {}, { set: function(S) {
|
|
8443
|
+
var x;
|
|
8444
|
+
b.value = S, m == null || (x = m.set) === null || x === void 0 || x.call(a, S);
|
|
8445
8445
|
} })), a.value = v;
|
|
8446
8446
|
var $ = function() {
|
|
8447
|
-
var
|
|
8448
|
-
var
|
|
8449
|
-
b.selectionStart = (
|
|
8447
|
+
var S = function() {
|
|
8448
|
+
var x, j;
|
|
8449
|
+
b.selectionStart = (x = a.selectionStart) !== null && x !== void 0 ? x : 0, b.selectionEnd = (j = a.selectionEnd) !== null && j !== void 0 ? j : 0, C.id = window.setTimeout(S);
|
|
8450
8450
|
};
|
|
8451
|
-
|
|
8452
|
-
},
|
|
8453
|
-
window.clearTimeout(
|
|
8454
|
-
},
|
|
8451
|
+
C.id = window.setTimeout(S);
|
|
8452
|
+
}, A = function() {
|
|
8453
|
+
window.clearTimeout(C.id), C.id = -1, C.cachedId = -1;
|
|
8454
|
+
}, E = function(S) {
|
|
8455
8455
|
try {
|
|
8456
|
-
var
|
|
8457
|
-
if (
|
|
8458
|
-
|
|
8459
|
-
var T = a.value,
|
|
8460
|
-
if (
|
|
8456
|
+
var x, j;
|
|
8457
|
+
if (C.cachedId === C.id) throw new yn("The input selection has not been updated.");
|
|
8458
|
+
C.cachedId = C.id;
|
|
8459
|
+
var T = a.value, z = a.selectionStart, L = a.selectionEnd;
|
|
8460
|
+
if (z === null || L === null) throw new yn("The selection attributes have not been initialized.");
|
|
8461
8461
|
var N, W = b.value;
|
|
8462
|
-
if (
|
|
8462
|
+
if (S.inputType === void 0 && (b.selectionStart = 0, b.selectionEnd = W.length), z > b.selectionStart ? N = "insert" : z <= b.selectionStart && z < b.selectionEnd ? N = "deleteBackward" : z === b.selectionEnd && T.length < W.length && (N = "deleteForward"), N === void 0 || (N === "deleteBackward" || N === "deleteForward") && T.length > W.length) throw new yn("Input type detection error.");
|
|
8463
8463
|
var U = "", Y = b.selectionStart, B = b.selectionEnd;
|
|
8464
|
-
if (N === "insert") U = T.slice(b.selectionStart,
|
|
8464
|
+
if (N === "insert") U = T.slice(b.selectionStart, z);
|
|
8465
8465
|
else {
|
|
8466
8466
|
var Z = W.length - T.length;
|
|
8467
|
-
Y =
|
|
8467
|
+
Y = z, B = z + Z;
|
|
8468
8468
|
}
|
|
8469
|
-
|
|
8470
|
-
var oe =
|
|
8471
|
-
a.value = _.value, a.setSelectionRange(_.selectionStart, _.selectionEnd),
|
|
8469
|
+
M.value !== W ? M.options = M.fallbackOptions : M.fallbackOptions = M.options;
|
|
8470
|
+
var oe = M.options, te = r({ inputType: N, previousValue: W, previousOptions: oe, value: T, addedValue: U, changeStart: Y, changeEnd: B, selectionStart: z, selectionEnd: L }), O = te.options, _ = gy(te, my);
|
|
8471
|
+
a.value = _.value, a.setSelectionRange(_.selectionStart, _.selectionEnd), M.value = _.value, M.options = O, b.selectionStart = _.selectionStart, b.selectionEnd = _.selectionEnd, (x = a._valueTracker) === null || x === void 0 || (j = x.setValue) === null || j === void 0 || j.call(x, W);
|
|
8472
8472
|
} catch (H) {
|
|
8473
|
-
if (a.value = b.value, a.setSelectionRange(b.selectionStart, b.selectionEnd),
|
|
8473
|
+
if (a.value = b.value, a.setSelectionRange(b.selectionStart, b.selectionEnd), S.preventDefault(), S.stopPropagation(), H.name !== "SyntheticChangeError") throw H;
|
|
8474
8474
|
}
|
|
8475
8475
|
};
|
|
8476
|
-
document.activeElement === a && $(), a.addEventListener("focus", $), a.addEventListener("blur",
|
|
8476
|
+
document.activeElement === a && $(), a.addEventListener("focus", $), a.addEventListener("blur", A), a.addEventListener("input", E), o.set(a, { onFocus: $, onBlur: A, onInput: E });
|
|
8477
8477
|
} else process.env.NODE_ENV !== "production" && console.warn("Warn: The input element type does not match one of the types: ".concat(ua.join(", "), "."));
|
|
8478
8478
|
}, this.unregister = function(a) {
|
|
8479
8479
|
var i = o.get(a);
|
|
@@ -8500,15 +8500,15 @@ 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 v = p.initialValue,
|
|
8504
|
-
v.length >
|
|
8505
|
-
var
|
|
8506
|
-
return
|
|
8503
|
+
var v = p.initialValue, k = p.mask, M = p.replacement;
|
|
8504
|
+
v.length > k.length && console.error(vr(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(v, '".'), "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
|
+
var C = Object.keys(M).filter(function(E) {
|
|
8506
|
+
return E.length > 1;
|
|
8507
8507
|
});
|
|
8508
|
-
|
|
8509
|
-
for (var b =
|
|
8510
|
-
var
|
|
8511
|
-
if (!(b[$] === v[$] ||
|
|
8508
|
+
C.length > 0 && console.error(vr(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(C.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 b = k.slice(0, v.length), m = -1, $ = 0; $ < b.length; $++) {
|
|
8510
|
+
var A = Object.prototype.hasOwnProperty.call(M, b[$]);
|
|
8511
|
+
if (!(b[$] === v[$] || A && M[b[$]].test(v[$]))) {
|
|
8512
8512
|
m = $;
|
|
8513
8513
|
break;
|
|
8514
8514
|
}
|
|
@@ -8516,23 +8516,23 @@ var ts = function(e) {
|
|
|
8516
8516
|
m !== -1 && console.error(vr(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(v, '".'), "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, v = u.modify,
|
|
8520
|
-
if (
|
|
8521
|
-
|
|
8522
|
-
var
|
|
8523
|
-
|
|
8524
|
-
var
|
|
8525
|
-
if (
|
|
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, v = u.modify, k = iy(u, yy), M = k.mask, C = k.replacement, b = k.showMask, m = k.separate, $ = Ln(Ln({}, a === "insert" ? { inputType: a, data: c } : { inputType: a, data: null }), {}, { value: i, selectionStart: d, selectionEnd: f }), A = p?.($);
|
|
8520
|
+
if (A === !1) throw new yn("Custom tracking stop.");
|
|
8521
|
+
A === null ? c = "" : A !== !0 && A !== void 0 && (c = A);
|
|
8522
|
+
var E = v?.($);
|
|
8523
|
+
E?.mask !== void 0 && (M = E.mask), E?.replacement !== void 0 && (C = typeof E?.replacement == "string" ? on(E?.replacement) : E.replacement), E?.showMask !== void 0 && (b = E.showMask), E?.separate !== void 0 && (m = E.separate);
|
|
8524
|
+
var S = Wr(i, Ln({ end: d }, s)), x = Wr(i, Ln({ start: f }, s)), j = RegExp("[^".concat(Object.keys(C).join(""), "]"), "g"), T = M.replace(j, "");
|
|
8525
|
+
if (S && (S = mn(S, { replacementChars: T, replacement: C, separate: m }), T = T.slice(S.length)), c && (c = mn(c, { replacementChars: T, replacement: C, separate: !1 }), T = T.slice(c.length)), a === "insert" && c === "") throw new yn("The character does not match the key value of the `replacement` object.");
|
|
8526
8526
|
if (m) {
|
|
8527
|
-
var
|
|
8528
|
-
|
|
8527
|
+
var z = M.slice(d, f).replace(j, ""), L = z.length - c.length;
|
|
8528
|
+
L < 0 ? x = x.slice(-L) : L > 0 && (x = z.slice(-L) + x);
|
|
8529
8529
|
}
|
|
8530
|
-
|
|
8531
|
-
var N = Xi(
|
|
8532
|
-
var Y, B, Z, oe = U.inputType, te = U.value,
|
|
8530
|
+
x && (x = mn(x, { replacementChars: T, replacement: C, separate: m }));
|
|
8531
|
+
var N = Xi(S + c + x, { mask: M, replacement: C, separate: m, showMask: b }), W = function(U) {
|
|
8532
|
+
var Y, B, Z, oe = U.inputType, te = U.value, O = U.addedValue, _ = U.beforeChangeValue, H = U.mask, G = U.replacement, le = U.separate, se = Qi(te, { mask: H, replacement: G }).filter(function(Ee) {
|
|
8533
8533
|
var Ue = Ee.type;
|
|
8534
8534
|
return Ue === "input" || le && Ue === "replacement";
|
|
8535
|
-
}), re = (Y = se[_.length +
|
|
8535
|
+
}), re = (Y = se[_.length + O.length - 1]) === null || Y === void 0 ? void 0 : Y.index, we = (B = se[_.length - 1]) === null || B === void 0 ? void 0 : B.index, ae = (Z = se[_.length + O.length]) === null || Z === void 0 ? void 0 : Z.index;
|
|
8536
8536
|
if (oe === "insert") {
|
|
8537
8537
|
if (re !== void 0) return re + 1;
|
|
8538
8538
|
if (ae !== void 0) return ae;
|
|
@@ -8550,8 +8550,8 @@ var ts = function(e) {
|
|
|
8550
8550
|
return Object.prototype.hasOwnProperty.call(G, Ee);
|
|
8551
8551
|
});
|
|
8552
8552
|
return Se !== -1 ? Se : te.length;
|
|
8553
|
-
}({ inputType: a, value: N, addedValue: c, beforeChangeValue:
|
|
8554
|
-
return { value: N, selectionStart: W, selectionEnd: W, options: { mask:
|
|
8553
|
+
}({ inputType: a, value: N, addedValue: c, beforeChangeValue: S, mask: M, replacement: C, separate: m });
|
|
8554
|
+
return { value: N, selectionStart: W, selectionEnd: W, options: { mask: M, replacement: C, separate: m } };
|
|
8555
8555
|
} }])).format = function(o) {
|
|
8556
8556
|
return Zi(o, Zt(r));
|
|
8557
8557
|
}, n.formatToParts = function(o) {
|
|
@@ -8589,56 +8589,58 @@ const ns = ({ maskProps: e, ...t }) => {
|
|
|
8589
8589
|
className: d,
|
|
8590
8590
|
fullWidth: f,
|
|
8591
8591
|
size: u,
|
|
8592
|
-
|
|
8593
|
-
|
|
8594
|
-
|
|
8595
|
-
|
|
8596
|
-
|
|
8597
|
-
|
|
8598
|
-
|
|
8592
|
+
name: p,
|
|
8593
|
+
...v
|
|
8594
|
+
} = e, [k, M] = me(null), [C, b] = me(null), [m, $] = me(/* @__PURE__ */ new Date()), [A, E] = me(""), S = () => a && i ? "dropdown" : a ? "dropdown-months" : i ? "dropdown-years" : "label", x = (L) => {
|
|
8595
|
+
b(L.currentTarget);
|
|
8596
|
+
}, j = () => {
|
|
8597
|
+
b(null);
|
|
8598
|
+
}, T = (L) => {
|
|
8599
|
+
L ? (o?.(L), $(L), E(
|
|
8599
8600
|
L.toLocaleString("ru-RU", {
|
|
8600
8601
|
day: "2-digit",
|
|
8601
8602
|
month: "2-digit",
|
|
8602
8603
|
year: "numeric"
|
|
8603
8604
|
})
|
|
8604
|
-
)) : (
|
|
8605
|
-
},
|
|
8606
|
-
|
|
8607
|
-
const [
|
|
8608
|
-
if (Number.isNaN(
|
|
8609
|
-
|
|
8605
|
+
)) : (E(""), o?.(void 0)), j();
|
|
8606
|
+
}, z = (L) => {
|
|
8607
|
+
M(null), E(L.target.value);
|
|
8608
|
+
const [N, W, U] = L.target.value.split(".").map(Number);
|
|
8609
|
+
if (Number.isNaN(N) || Number.isNaN(W) || Number.isNaN(U) || N < 1 || N > 31 || W < 1 || W > 12 || U < 1e3) {
|
|
8610
|
+
M("Некорректная дата");
|
|
8610
8611
|
return;
|
|
8611
8612
|
}
|
|
8612
|
-
const
|
|
8613
|
-
o?.(
|
|
8613
|
+
const Y = new Date(U, W - 1, N);
|
|
8614
|
+
o?.(Y), $(Y);
|
|
8614
8615
|
};
|
|
8615
8616
|
return it(() => {
|
|
8616
|
-
r ? (
|
|
8617
|
+
r ? (E(
|
|
8617
8618
|
r.toLocaleString("ru-RU", {
|
|
8618
8619
|
day: "2-digit",
|
|
8619
8620
|
month: "2-digit",
|
|
8620
8621
|
year: "numeric"
|
|
8621
8622
|
})
|
|
8622
|
-
),
|
|
8623
|
+
), $(r)) : E("");
|
|
8623
8624
|
}, [r]), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
8624
8625
|
/* @__PURE__ */ l.jsx(
|
|
8625
8626
|
ns,
|
|
8626
8627
|
{
|
|
8627
|
-
value:
|
|
8628
|
-
onChange:
|
|
8628
|
+
value: A,
|
|
8629
|
+
onChange: z,
|
|
8629
8630
|
label: t,
|
|
8630
8631
|
disabled: n,
|
|
8631
8632
|
className: d,
|
|
8632
8633
|
fullWidth: f,
|
|
8633
8634
|
size: u,
|
|
8634
|
-
|
|
8635
|
+
name: p,
|
|
8636
|
+
endAdornment: /* @__PURE__ */ l.jsx(Ze, { variant: "text", onClick: x, children: /* @__PURE__ */ l.jsx(_a, {}) }),
|
|
8635
8637
|
maskProps: {
|
|
8636
8638
|
mask: "__.__.____",
|
|
8637
8639
|
replacement: { _: /\d/ },
|
|
8638
8640
|
showMask: !0
|
|
8639
8641
|
},
|
|
8640
8642
|
placeholder: "дд.мм.гггг",
|
|
8641
|
-
error: !!
|
|
8643
|
+
error: !!k || s,
|
|
8642
8644
|
helperText: s || c
|
|
8643
8645
|
}
|
|
8644
8646
|
),
|
|
@@ -8646,9 +8648,9 @@ const ns = ({ maskProps: e, ...t }) => {
|
|
|
8646
8648
|
ro,
|
|
8647
8649
|
{
|
|
8648
8650
|
title: "Заголовок",
|
|
8649
|
-
open: !!
|
|
8650
|
-
anchorEl:
|
|
8651
|
-
onClose:
|
|
8651
|
+
open: !!C,
|
|
8652
|
+
anchorEl: C,
|
|
8653
|
+
onClose: j,
|
|
8652
8654
|
anchorOrigin: {
|
|
8653
8655
|
vertical: "bottom",
|
|
8654
8656
|
horizontal: "right"
|
|
@@ -8660,13 +8662,13 @@ const ns = ({ maskProps: e, ...t }) => {
|
|
|
8660
8662
|
children: /* @__PURE__ */ l.jsx(by, { children: /* @__PURE__ */ l.jsx(
|
|
8661
8663
|
ty,
|
|
8662
8664
|
{
|
|
8663
|
-
month:
|
|
8664
|
-
onMonthChange:
|
|
8665
|
+
month: m,
|
|
8666
|
+
onMonthChange: $,
|
|
8665
8667
|
selected: r,
|
|
8666
|
-
onSelect:
|
|
8667
|
-
...
|
|
8668
|
+
onSelect: T,
|
|
8669
|
+
...v,
|
|
8668
8670
|
mode: "single",
|
|
8669
|
-
captionLayout:
|
|
8671
|
+
captionLayout: S()
|
|
8670
8672
|
}
|
|
8671
8673
|
) })
|
|
8672
8674
|
}
|
|
@@ -8884,13 +8886,13 @@ const Py = (e) => /* @__PURE__ */ l.jsx(Nt, { visibleLastSymbolsCount: 4, ...e }
|
|
|
8884
8886
|
}) => {
|
|
8885
8887
|
const a = ve(
|
|
8886
8888
|
(s, c) => {
|
|
8887
|
-
const { renderValue: d, color: f, canCopy: u, copyPosition: p, variant: v, copyText:
|
|
8889
|
+
const { renderValue: d, color: f, canCopy: u, copyPosition: p, variant: v, copyText: k } = c;
|
|
8888
8890
|
if (d)
|
|
8889
8891
|
return d(s, c);
|
|
8890
8892
|
if (v === "tag")
|
|
8891
8893
|
return /* @__PURE__ */ l.jsx(Ht.Value, { children: /* @__PURE__ */ l.jsx(no, { label: s, color: f, variant: "light" }) });
|
|
8892
8894
|
if (v === "guid") {
|
|
8893
|
-
const
|
|
8895
|
+
const M = Wy(u);
|
|
8894
8896
|
return /* @__PURE__ */ l.jsx(
|
|
8895
8897
|
Ny,
|
|
8896
8898
|
{
|
|
@@ -8898,8 +8900,8 @@ const Py = (e) => /* @__PURE__ */ l.jsx(Nt, { visibleLastSymbolsCount: 4, ...e }
|
|
|
8898
8900
|
$isCopy: u,
|
|
8899
8901
|
color: f,
|
|
8900
8902
|
copyPosition: p,
|
|
8901
|
-
copyText:
|
|
8902
|
-
children: /* @__PURE__ */ l.jsx(Py, { tooltipProps:
|
|
8903
|
+
copyText: k,
|
|
8904
|
+
children: /* @__PURE__ */ l.jsx(Py, { tooltipProps: M, children: s })
|
|
8903
8905
|
}
|
|
8904
8906
|
);
|
|
8905
8907
|
}
|
|
@@ -9127,37 +9129,37 @@ function s0({ containerRef: e, inputRef: t, pushPasswordManagerStrategy: n, isFo
|
|
|
9127
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(() => {
|
|
9128
9130
|
let p = e.current, v = t.current;
|
|
9129
9131
|
if (!p || !v || c || n === "none") return;
|
|
9130
|
-
let
|
|
9132
|
+
let k = p, M = k.getBoundingClientRect().left + k.offsetWidth, C = k.getBoundingClientRect().top + k.offsetHeight / 2, b = M - o0, m = C;
|
|
9131
9133
|
document.querySelectorAll(i0).length === 0 && document.elementFromPoint(b, m) === p || (a(!0), d(!0));
|
|
9132
9134
|
}, [e, t, c, n]);
|
|
9133
9135
|
return K.useEffect(() => {
|
|
9134
9136
|
let p = e.current;
|
|
9135
9137
|
if (!p || n === "none") return;
|
|
9136
9138
|
function v() {
|
|
9137
|
-
let
|
|
9138
|
-
s(
|
|
9139
|
+
let M = window.innerWidth - p.getBoundingClientRect().right;
|
|
9140
|
+
s(M >= is);
|
|
9139
9141
|
}
|
|
9140
9142
|
v();
|
|
9141
|
-
let
|
|
9143
|
+
let k = setInterval(v, 1e3);
|
|
9142
9144
|
return () => {
|
|
9143
|
-
clearInterval(
|
|
9145
|
+
clearInterval(k);
|
|
9144
9146
|
};
|
|
9145
9147
|
}, [e, n]), K.useEffect(() => {
|
|
9146
9148
|
let p = r || document.activeElement === t.current;
|
|
9147
9149
|
if (n === "none" || !p) return;
|
|
9148
|
-
let v = setTimeout(u, 0),
|
|
9150
|
+
let v = setTimeout(u, 0), k = setTimeout(u, 2e3), M = setTimeout(u, 5e3), C = setTimeout(() => {
|
|
9149
9151
|
d(!0);
|
|
9150
9152
|
}, 6e3);
|
|
9151
9153
|
return () => {
|
|
9152
|
-
clearTimeout(v), clearTimeout(
|
|
9154
|
+
clearTimeout(v), clearTimeout(k), clearTimeout(M), clearTimeout(C);
|
|
9153
9155
|
};
|
|
9154
9156
|
}, [t, r, n, u]), { hasPWMBadge: o, willPushPWMBadge: f, PWM_BADGE_SPACE_WIDTH: a0 };
|
|
9155
9157
|
}
|
|
9156
9158
|
var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
|
|
9157
|
-
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: v, noScriptCSSFallback:
|
|
9158
|
-
let [
|
|
9159
|
-
o?.(q),
|
|
9160
|
-
}, [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:
|
|
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: v, noScriptCSSFallback: k = c0, render: M, children: C } = n, b = t0(n, ["value", "onChange", "maxLength", "textAlign", "pattern", "placeholder", "inputMode", "onComplete", "pushPasswordManagerStrategy", "pasteTransformer", "containerClassName", "noScriptCSSFallback", "render", "children"]), m, $, A, E, S;
|
|
9160
|
+
let [x, j] = K.useState(typeof b.defaultValue == "string" ? b.defaultValue : ""), T = r ?? x, z = r0(T), L = K.useCallback((q) => {
|
|
9161
|
+
o?.(q), j(q);
|
|
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: L, isIOS: typeof window < "u" && (($ = (m = window?.CSS) == null ? void 0 : m.supports) == null ? void 0 : $.call(m, "-webkit-touch-callout", "none")) }), B = K.useRef({ prev: [(A = W.current) == null ? void 0 : A.selectionStart, (E = W.current) == null ? void 0 : E.selectionEnd, (S = W.current) == null ? void 0 : S.selectionDirection] });
|
|
9161
9163
|
K.useImperativeHandle(t, () => W.current, []), K.useEffect(() => {
|
|
9162
9164
|
let q = W.current, J = U.current;
|
|
9163
9165
|
if (!q || !J) return;
|
|
@@ -9189,7 +9191,7 @@ var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
|
|
|
9189
9191
|
let V = I !== -1 ? I : ie, ne = F !== -1 ? F : Ie, ue = P ?? ct;
|
|
9190
9192
|
H(V), le(ne), B.current.prev = [V, ne, ue];
|
|
9191
9193
|
}
|
|
9192
|
-
if (document.addEventListener("selectionchange", $e, { capture: !0 }), $e(), document.activeElement === q &&
|
|
9194
|
+
if (document.addEventListener("selectionchange", $e, { capture: !0 }), $e(), document.activeElement === q && O(!0), !document.getElementById("input-otp-style")) {
|
|
9193
9195
|
let ie = document.createElement("style");
|
|
9194
9196
|
if (ie.id = "input-otp-style", document.head.appendChild(ie), ie.sheet) {
|
|
9195
9197
|
let Ie = "background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";
|
|
@@ -9205,7 +9207,7 @@ var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
|
|
|
9205
9207
|
document.removeEventListener("selectionchange", $e, { capture: !0 }), Ne.disconnect();
|
|
9206
9208
|
};
|
|
9207
9209
|
}, []);
|
|
9208
|
-
let [Z, oe] = K.useState(!1), [te,
|
|
9210
|
+
let [Z, oe] = K.useState(!1), [te, O] = K.useState(!1), [_, H] = K.useState(null), [G, le] = K.useState(null);
|
|
9209
9211
|
K.useEffect(() => {
|
|
9210
9212
|
n0(() => {
|
|
9211
9213
|
var q, J, $e, ke;
|
|
@@ -9214,22 +9216,22 @@ var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
|
|
|
9214
9216
|
Ne !== null && ie !== null && (H(Ne), le(ie), B.current.prev = [Ne, ie, Ie]);
|
|
9215
9217
|
});
|
|
9216
9218
|
}, [T, te]), K.useEffect(() => {
|
|
9217
|
-
|
|
9218
|
-
}, [a, f,
|
|
9219
|
+
z !== void 0 && T !== z && z.length < a && T.length === a && f?.(T);
|
|
9220
|
+
}, [a, f, z, T]);
|
|
9219
9221
|
let se = s0({ containerRef: U, inputRef: W, pushPasswordManagerStrategy: u, isFocused: te }), re = K.useCallback((q) => {
|
|
9220
9222
|
let J = q.currentTarget.value.slice(0, a);
|
|
9221
9223
|
if (J.length > 0 && N && !N.test(J)) {
|
|
9222
9224
|
q.preventDefault();
|
|
9223
9225
|
return;
|
|
9224
9226
|
}
|
|
9225
|
-
typeof
|
|
9226
|
-
}, [a,
|
|
9227
|
+
typeof z == "string" && J.length < z.length && document.dispatchEvent(new Event("selectionchange")), L(J);
|
|
9228
|
+
}, [a, L, z, N]), we = K.useCallback(() => {
|
|
9227
9229
|
var q;
|
|
9228
9230
|
if (W.current) {
|
|
9229
9231
|
let J = Math.min(W.current.value.length, a - 1), $e = W.current.value.length;
|
|
9230
9232
|
(q = W.current) == null || q.setSelectionRange(J, $e), H(J), le($e);
|
|
9231
9233
|
}
|
|
9232
|
-
|
|
9234
|
+
O(!0);
|
|
9233
9235
|
}, [a]), ae = K.useCallback((q) => {
|
|
9234
9236
|
var J, $e;
|
|
9235
9237
|
let ke = W.current;
|
|
@@ -9238,10 +9240,10 @@ var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
|
|
|
9238
9240
|
q.preventDefault();
|
|
9239
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);
|
|
9240
9242
|
if (h.length > 0 && N && !N.test(h)) return;
|
|
9241
|
-
ke.value = h,
|
|
9243
|
+
ke.value = h, L(h);
|
|
9242
9244
|
let w = Math.min(h.length, a - 1), D = h.length;
|
|
9243
9245
|
ke.setSelectionRange(w, D), H(w), le(D);
|
|
9244
|
-
}, [a,
|
|
9246
|
+
}, [a, L, N, T]), Se = K.useMemo(() => ({ position: "relative", cursor: b.disabled ? "default" : "text", userSelect: "none", WebkitUserSelect: "none", pointerEvents: "none" }), [b.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: b.autoComplete || "one-time-code" }, b), { "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) => {
|
|
9245
9247
|
var J;
|
|
9246
9248
|
ae(q), (J = b.onPaste) == null || J.call(b, q);
|
|
9247
9249
|
}, onChange: re, onMouseOver: (q) => {
|
|
@@ -9255,13 +9257,13 @@ var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
|
|
|
9255
9257
|
we(), (J = b.onFocus) == null || J.call(b, q);
|
|
9256
9258
|
}, onBlur: (q) => {
|
|
9257
9259
|
var J;
|
|
9258
|
-
|
|
9260
|
+
O(!1), (J = b.onBlur) == null || J.call(b, q);
|
|
9259
9261
|
} })), [re, we, ae, d, Ee, a, G, _, b, N?.source, T]), lt = K.useMemo(() => ({ slots: Array.from({ length: a }).map((q, J) => {
|
|
9260
9262
|
var $e;
|
|
9261
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;
|
|
9262
9264
|
return { char: Ne, placeholderChar: ie, isActive: ke, hasFakeCaret: ke && Ne === null };
|
|
9263
|
-
}), isFocused: te, isHovering: !b.disabled && Z }), [te, Z, a, G, _, b.disabled, T]), Wt = K.useMemo(() =>
|
|
9264
|
-
return K.createElement(K.Fragment, null,
|
|
9265
|
+
}), isFocused: te, isHovering: !b.disabled && Z }), [te, Z, a, G, _, b.disabled, T]), Wt = K.useMemo(() => M ? M(lt) : K.createElement(l0.Provider, { value: lt }, C), [C, lt, M]);
|
|
9266
|
+
return K.createElement(K.Fragment, null, k !== null && K.createElement("noscript", null, K.createElement("style", null, k)), K.createElement("div", { ref: U, "data-input-otp-container": !0, style: Se, className: v }, Wt, K.createElement("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" } }, Ue)));
|
|
9265
9267
|
});
|
|
9266
9268
|
ss.displayName = "Input";
|
|
9267
9269
|
function dn(e, t) {
|
|
@@ -9672,36 +9674,36 @@ class _0 {
|
|
|
9672
9674
|
});
|
|
9673
9675
|
else if (N0(d) && !d.ok) {
|
|
9674
9676
|
a = !1;
|
|
9675
|
-
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, k = typeof u == "object" && !g.isValidElement(u) ? u : {
|
|
9676
9678
|
message: u
|
|
9677
9679
|
};
|
|
9678
9680
|
this.create({
|
|
9679
9681
|
id: r,
|
|
9680
9682
|
type: "error",
|
|
9681
9683
|
description: p,
|
|
9682
|
-
...
|
|
9684
|
+
...k
|
|
9683
9685
|
});
|
|
9684
9686
|
} else if (d instanceof Error) {
|
|
9685
9687
|
a = !1;
|
|
9686
|
-
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, k = typeof u == "object" && !g.isValidElement(u) ? u : {
|
|
9687
9689
|
message: u
|
|
9688
9690
|
};
|
|
9689
9691
|
this.create({
|
|
9690
9692
|
id: r,
|
|
9691
9693
|
type: "error",
|
|
9692
9694
|
description: p,
|
|
9693
|
-
...
|
|
9695
|
+
...k
|
|
9694
9696
|
});
|
|
9695
9697
|
} else if (n.success !== void 0) {
|
|
9696
9698
|
a = !1;
|
|
9697
|
-
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, k = typeof u == "object" && !g.isValidElement(u) ? u : {
|
|
9698
9700
|
message: u
|
|
9699
9701
|
};
|
|
9700
9702
|
this.create({
|
|
9701
9703
|
id: r,
|
|
9702
9704
|
type: "success",
|
|
9703
9705
|
description: p,
|
|
9704
|
-
...
|
|
9706
|
+
...k
|
|
9705
9707
|
});
|
|
9706
9708
|
}
|
|
9707
9709
|
}).catch(async (d) => {
|
|
@@ -9773,20 +9775,20 @@ function q0(e) {
|
|
|
9773
9775
|
}
|
|
9774
9776
|
const X0 = (e) => {
|
|
9775
9777
|
var t, n, r, o, a, i, s, c, d;
|
|
9776
|
-
const { invert: f, toast: u, unstyled: p, interacting: v, setHeights:
|
|
9777
|
-
|
|
9778
|
+
const { invert: f, toast: u, unstyled: p, interacting: v, setHeights: k, visibleToasts: M, heights: C, index: b, toasts: m, expanded: $, removeToast: A, defaultRichColors: E, closeButton: S, style: x, cancelButtonStyle: j, actionButtonStyle: T, className: z = "", descriptionClassName: L = "", duration: N, position: W, gap: U, expandByDefault: Y, classNames: B, icons: Z, closeButtonAriaLabel: oe = "Close toast" } = e, [te, O] = 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 = b === 0, ct = b + 1 <= M, h = u.type, w = u.dismissible !== !1, D = u.className || "", I = u.descriptionClassName || "", F = g.useMemo(() => C.findIndex((ee) => ee.toastId === u.id) || 0, [
|
|
9779
|
+
C,
|
|
9778
9780
|
u.id
|
|
9779
9781
|
]), P = g.useMemo(() => {
|
|
9780
9782
|
var ee;
|
|
9781
|
-
return (ee = u.closeButton) != null ? ee :
|
|
9783
|
+
return (ee = u.closeButton) != null ? ee : S;
|
|
9782
9784
|
}, [
|
|
9783
9785
|
u.closeButton,
|
|
9784
|
-
|
|
9786
|
+
S
|
|
9785
9787
|
]), V = g.useMemo(() => u.duration || N || ga, [
|
|
9786
9788
|
u.duration,
|
|
9787
9789
|
N
|
|
9788
|
-
]), ne = g.useRef(0), ue = g.useRef(0), Ce = g.useRef(0), nt = g.useRef(null), [Q, de] = W.split("-"), ce = g.useMemo(() =>
|
|
9789
|
-
|
|
9790
|
+
]), ne = g.useRef(0), ue = g.useRef(0), Ce = g.useRef(0), nt = g.useRef(null), [Q, de] = W.split("-"), ce = g.useMemo(() => C.reduce((ee, Oe, Pe) => Pe >= F ? ee : ee + Oe.height, 0), [
|
|
9791
|
+
C,
|
|
9790
9792
|
F
|
|
9791
9793
|
]), qe = A0(), He = u.invert || f, ut = h === "loading";
|
|
9792
9794
|
ue.current = g.useMemo(() => F * U + ce, [
|
|
@@ -9802,24 +9804,24 @@ const X0 = (e) => {
|
|
|
9802
9804
|
const ee = ie.current;
|
|
9803
9805
|
if (ee) {
|
|
9804
9806
|
const Oe = ee.getBoundingClientRect().height;
|
|
9805
|
-
return $e(Oe),
|
|
9807
|
+
return $e(Oe), k((Pe) => [
|
|
9806
9808
|
{
|
|
9807
9809
|
toastId: u.id,
|
|
9808
9810
|
height: Oe,
|
|
9809
9811
|
position: u.position
|
|
9810
9812
|
},
|
|
9811
9813
|
...Pe
|
|
9812
|
-
]), () =>
|
|
9814
|
+
]), () => k((Pe) => Pe.filter((Je) => Je.toastId !== u.id));
|
|
9813
9815
|
}
|
|
9814
9816
|
}, [
|
|
9815
|
-
|
|
9817
|
+
k,
|
|
9816
9818
|
u.id
|
|
9817
9819
|
]), g.useLayoutEffect(() => {
|
|
9818
9820
|
if (!G) return;
|
|
9819
9821
|
const ee = ie.current, Oe = ee.style.height;
|
|
9820
9822
|
ee.style.height = "auto";
|
|
9821
9823
|
const Pe = ee.getBoundingClientRect().height;
|
|
9822
|
-
ee.style.height = Oe, $e(Pe),
|
|
9824
|
+
ee.style.height = Oe, $e(Pe), k((Je) => Je.find((Be) => Be.toastId === u.id) ? Je.map((Be) => Be.toastId === u.id ? {
|
|
9823
9825
|
...Be,
|
|
9824
9826
|
height: Pe
|
|
9825
9827
|
} : Be) : [
|
|
@@ -9834,17 +9836,17 @@ const X0 = (e) => {
|
|
|
9834
9836
|
G,
|
|
9835
9837
|
u.title,
|
|
9836
9838
|
u.description,
|
|
9837
|
-
|
|
9839
|
+
k,
|
|
9838
9840
|
u.id
|
|
9839
9841
|
]);
|
|
9840
9842
|
const be = g.useCallback(() => {
|
|
9841
|
-
re(!0), q(ue.current),
|
|
9842
|
-
|
|
9843
|
+
re(!0), q(ue.current), k((ee) => ee.filter((Oe) => Oe.toastId !== u.id)), setTimeout(() => {
|
|
9844
|
+
A(u);
|
|
9843
9845
|
}, U0);
|
|
9844
9846
|
}, [
|
|
9845
9847
|
u,
|
|
9846
|
-
|
|
9847
|
-
|
|
9848
|
+
A,
|
|
9849
|
+
k,
|
|
9848
9850
|
ue
|
|
9849
9851
|
]);
|
|
9850
9852
|
g.useEffect(() => {
|
|
@@ -9893,9 +9895,9 @@ const X0 = (e) => {
|
|
|
9893
9895
|
return /* @__PURE__ */ g.createElement("li", {
|
|
9894
9896
|
tabIndex: 0,
|
|
9895
9897
|
ref: ie,
|
|
9896
|
-
className: gt(
|
|
9898
|
+
className: gt(z, D, B?.toast, u == null || (t = u.classNames) == null ? void 0 : t.toast, B?.default, B?.[h], u == null || (n = u.classNames) == null ? void 0 : n[h]),
|
|
9897
9899
|
"data-sonner-toast": "",
|
|
9898
|
-
"data-rich-colors": (Fn = u.richColors) != null ? Fn :
|
|
9900
|
+
"data-rich-colors": (Fn = u.richColors) != null ? Fn : E,
|
|
9899
9901
|
"data-styled": !(u.jsx || u.unstyled || p),
|
|
9900
9902
|
"data-mounted": G,
|
|
9901
9903
|
"data-promise": !!u.promise,
|
|
@@ -9919,11 +9921,11 @@ const X0 = (e) => {
|
|
|
9919
9921
|
"--z-index": m.length - b,
|
|
9920
9922
|
"--offset": `${se ? Wt : ue.current}px`,
|
|
9921
9923
|
"--initial-height": Y ? "auto" : `${J}px`,
|
|
9922
|
-
...
|
|
9924
|
+
...x,
|
|
9923
9925
|
...u.style
|
|
9924
9926
|
},
|
|
9925
9927
|
onDragEnd: () => {
|
|
9926
|
-
ae(!1),
|
|
9928
|
+
ae(!1), O(null), nt.current = null;
|
|
9927
9929
|
},
|
|
9928
9930
|
onPointerDown: (ee) => {
|
|
9929
9931
|
ut || !w || (Ne.current = /* @__PURE__ */ new Date(), q(ue.current), ee.target.setPointerCapture(ee.pointerId), ee.target.tagName !== "BUTTON" && (ae(!0), nt.current = {
|
|
@@ -9943,7 +9945,7 @@ const X0 = (e) => {
|
|
|
9943
9945
|
var dt, ft;
|
|
9944
9946
|
(dt = ie.current) == null || dt.style.setProperty("--swipe-amount-x", "0px"), (ft = ie.current) == null || ft.style.setProperty("--swipe-amount-y", "0px");
|
|
9945
9947
|
}
|
|
9946
|
-
lt(!1), ae(!1),
|
|
9948
|
+
lt(!1), ae(!1), O(null);
|
|
9947
9949
|
},
|
|
9948
9950
|
onPointerMove: (ee) => {
|
|
9949
9951
|
var Oe, Pe, Je;
|
|
@@ -9951,7 +9953,7 @@ const X0 = (e) => {
|
|
|
9951
9953
|
const Be = ee.clientY - nt.current.y, ot = ee.clientX - nt.current.x;
|
|
9952
9954
|
var In;
|
|
9953
9955
|
const dt = (In = e.swipeDirections) != null ? In : q0(W);
|
|
9954
|
-
!te && (Math.abs(ot) > 1 || Math.abs(Be) > 1) &&
|
|
9956
|
+
!te && (Math.abs(ot) > 1 || Math.abs(Be) > 1) && O(Math.abs(ot) > Math.abs(Be) ? "x" : "y");
|
|
9955
9957
|
let ft = {
|
|
9956
9958
|
x: 0,
|
|
9957
9959
|
y: 0
|
|
@@ -9994,11 +9996,11 @@ const X0 = (e) => {
|
|
|
9994
9996
|
className: gt(B?.title, u == null || (i = u.classNames) == null ? void 0 : i.title)
|
|
9995
9997
|
}, u.jsx ? u.jsx : typeof u.title == "function" ? u.title() : u.title), u.description ? /* @__PURE__ */ g.createElement("div", {
|
|
9996
9998
|
"data-description": "",
|
|
9997
|
-
className: gt(
|
|
9999
|
+
className: gt(L, I, B?.description, u == null || (s = u.classNames) == null ? void 0 : s.description)
|
|
9998
10000
|
}, typeof u.description == "function" ? u.description() : u.description) : null), /* @__PURE__ */ g.isValidElement(u.cancel) ? u.cancel : u.cancel && Vn(u.cancel) ? /* @__PURE__ */ g.createElement("button", {
|
|
9999
10001
|
"data-button": !0,
|
|
10000
10002
|
"data-cancel": !0,
|
|
10001
|
-
style: u.cancelButtonStyle ||
|
|
10003
|
+
style: u.cancelButtonStyle || j,
|
|
10002
10004
|
onClick: (ee) => {
|
|
10003
10005
|
Vn(u.cancel) && w && (u.cancel.onClick == null || u.cancel.onClick.call(u.cancel, ee), be());
|
|
10004
10006
|
},
|
|
@@ -10049,13 +10051,13 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
|
|
|
10049
10051
|
const { invert: r, position: o = "bottom-right", hotkey: a = [
|
|
10050
10052
|
"altKey",
|
|
10051
10053
|
"KeyT"
|
|
10052
|
-
], expand: i, closeButton: s, className: c, offset: d, mobileOffset: f, theme: u = "light", richColors: p, duration: v, style:
|
|
10054
|
+
], expand: i, closeButton: s, className: c, offset: d, mobileOffset: f, theme: u = "light", richColors: p, duration: v, style: k, visibleToasts: M = L0, toastOptions: C, dir: b = ma(), gap: m = Y0, icons: $, containerAriaLabel: A = "Notifications" } = t, [E, S] = g.useState([]), x = g.useMemo(() => Array.from(new Set([
|
|
10053
10055
|
o
|
|
10054
|
-
].concat(
|
|
10055
|
-
|
|
10056
|
+
].concat(E.filter((_) => _.position).map((_) => _.position)))), [
|
|
10057
|
+
E,
|
|
10056
10058
|
o
|
|
10057
|
-
]), [
|
|
10058
|
-
|
|
10059
|
+
]), [j, T] = g.useState([]), [z, L] = g.useState(!1), [N, W] = g.useState(!1), [U, Y] = g.useState(u !== "system" ? u : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), B = g.useRef(null), Z = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), oe = g.useRef(null), te = g.useRef(!1), O = g.useCallback((_) => {
|
|
10060
|
+
S((H) => {
|
|
10059
10061
|
var G;
|
|
10060
10062
|
return (G = H.find((le) => le.id === _.id)) != null && G.delete || Xe.dismiss(_.id), H.filter(({ id: le }) => le !== _.id);
|
|
10061
10063
|
});
|
|
@@ -10063,7 +10065,7 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
|
|
|
10063
10065
|
return g.useEffect(() => Xe.subscribe((_) => {
|
|
10064
10066
|
if (_.dismiss) {
|
|
10065
10067
|
requestAnimationFrame(() => {
|
|
10066
|
-
|
|
10068
|
+
S((H) => H.map((G) => G.id === _.id ? {
|
|
10067
10069
|
...G,
|
|
10068
10070
|
delete: !0
|
|
10069
10071
|
} : G));
|
|
@@ -10072,7 +10074,7 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
|
|
|
10072
10074
|
}
|
|
10073
10075
|
setTimeout(() => {
|
|
10074
10076
|
Zl.flushSync(() => {
|
|
10075
|
-
|
|
10077
|
+
S((H) => {
|
|
10076
10078
|
const G = H.findIndex((le) => le.id === _.id);
|
|
10077
10079
|
return G !== -1 ? [
|
|
10078
10080
|
...H.slice(0, G),
|
|
@@ -10089,7 +10091,7 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
|
|
|
10089
10091
|
});
|
|
10090
10092
|
});
|
|
10091
10093
|
}), [
|
|
10092
|
-
|
|
10094
|
+
E
|
|
10093
10095
|
]), g.useEffect(() => {
|
|
10094
10096
|
if (u !== "system") {
|
|
10095
10097
|
Y(u);
|
|
@@ -10113,17 +10115,17 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
|
|
|
10113
10115
|
}, [
|
|
10114
10116
|
u
|
|
10115
10117
|
]), g.useEffect(() => {
|
|
10116
|
-
|
|
10118
|
+
E.length <= 1 && L(!1);
|
|
10117
10119
|
}, [
|
|
10118
|
-
|
|
10120
|
+
E
|
|
10119
10121
|
]), g.useEffect(() => {
|
|
10120
10122
|
const _ = (H) => {
|
|
10121
10123
|
var G;
|
|
10122
10124
|
if (a.every((re) => H[re] || H.code === re)) {
|
|
10123
10125
|
var se;
|
|
10124
|
-
|
|
10126
|
+
L(!0), (se = B.current) == null || se.focus();
|
|
10125
10127
|
}
|
|
10126
|
-
H.code === "Escape" && (document.activeElement === B.current || (G = B.current) != null && G.contains(document.activeElement)) &&
|
|
10128
|
+
H.code === "Escape" && (document.activeElement === B.current || (G = B.current) != null && G.contains(document.activeElement)) && L(!1);
|
|
10127
10129
|
};
|
|
10128
10130
|
return document.addEventListener("keydown", _), () => document.removeEventListener("keydown", _);
|
|
10129
10131
|
}, [
|
|
@@ -10140,16 +10142,16 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
|
|
|
10140
10142
|
]), // Remove item from normal navigation flow, only available via hotkey
|
|
10141
10143
|
/* @__PURE__ */ g.createElement("section", {
|
|
10142
10144
|
ref: n,
|
|
10143
|
-
"aria-label": `${
|
|
10145
|
+
"aria-label": `${A} ${Z}`,
|
|
10144
10146
|
tabIndex: -1,
|
|
10145
10147
|
"aria-live": "polite",
|
|
10146
10148
|
"aria-relevant": "additions text",
|
|
10147
10149
|
"aria-atomic": "false",
|
|
10148
10150
|
suppressHydrationWarning: !0
|
|
10149
|
-
},
|
|
10151
|
+
}, x.map((_, H) => {
|
|
10150
10152
|
var G;
|
|
10151
10153
|
const [le, se] = _.split("-");
|
|
10152
|
-
return
|
|
10154
|
+
return E.length ? /* @__PURE__ */ g.createElement("ol", {
|
|
10153
10155
|
key: _,
|
|
10154
10156
|
dir: b === "auto" ? ma() : b,
|
|
10155
10157
|
tabIndex: -1,
|
|
@@ -10158,13 +10160,13 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
|
|
|
10158
10160
|
"data-sonner-toaster": !0,
|
|
10159
10161
|
"data-sonner-theme": U,
|
|
10160
10162
|
"data-y-position": le,
|
|
10161
|
-
"data-lifted":
|
|
10163
|
+
"data-lifted": z && E.length > 1 && !i,
|
|
10162
10164
|
"data-x-position": se,
|
|
10163
10165
|
style: {
|
|
10164
|
-
"--front-toast-height": `${((G =
|
|
10166
|
+
"--front-toast-height": `${((G = j[0]) == null ? void 0 : G.height) || 0}px`,
|
|
10165
10167
|
"--width": `${H0}px`,
|
|
10166
10168
|
"--gap": `${m}px`,
|
|
10167
|
-
...
|
|
10169
|
+
...k,
|
|
10168
10170
|
...Q0(d, f)
|
|
10169
10171
|
},
|
|
10170
10172
|
onBlur: (re) => {
|
|
@@ -10175,17 +10177,17 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
|
|
|
10175
10177
|
onFocus: (re) => {
|
|
10176
10178
|
re.target instanceof HTMLElement && re.target.dataset.dismissible === "false" || te.current || (te.current = !0, oe.current = re.relatedTarget);
|
|
10177
10179
|
},
|
|
10178
|
-
onMouseEnter: () =>
|
|
10179
|
-
onMouseMove: () =>
|
|
10180
|
+
onMouseEnter: () => L(!0),
|
|
10181
|
+
onMouseMove: () => L(!0),
|
|
10180
10182
|
onMouseLeave: () => {
|
|
10181
|
-
N ||
|
|
10183
|
+
N || L(!1);
|
|
10182
10184
|
},
|
|
10183
|
-
onDragEnd: () =>
|
|
10185
|
+
onDragEnd: () => L(!1),
|
|
10184
10186
|
onPointerDown: (re) => {
|
|
10185
10187
|
re.target instanceof HTMLElement && re.target.dataset.dismissible === "false" || W(!0);
|
|
10186
10188
|
},
|
|
10187
10189
|
onPointerUp: () => W(!1)
|
|
10188
|
-
},
|
|
10190
|
+
}, E.filter((re) => !re.position && H === 0 || re.position === _).map((re, we) => {
|
|
10189
10191
|
var ae, Se;
|
|
10190
10192
|
return /* @__PURE__ */ g.createElement(X0, {
|
|
10191
10193
|
key: re.id,
|
|
@@ -10193,27 +10195,27 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
|
|
|
10193
10195
|
index: we,
|
|
10194
10196
|
toast: re,
|
|
10195
10197
|
defaultRichColors: p,
|
|
10196
|
-
duration: (ae =
|
|
10197
|
-
className:
|
|
10198
|
-
descriptionClassName:
|
|
10198
|
+
duration: (ae = C?.duration) != null ? ae : v,
|
|
10199
|
+
className: C?.className,
|
|
10200
|
+
descriptionClassName: C?.descriptionClassName,
|
|
10199
10201
|
invert: r,
|
|
10200
|
-
visibleToasts:
|
|
10201
|
-
closeButton: (Se =
|
|
10202
|
+
visibleToasts: M,
|
|
10203
|
+
closeButton: (Se = C?.closeButton) != null ? Se : s,
|
|
10202
10204
|
interacting: N,
|
|
10203
10205
|
position: _,
|
|
10204
|
-
style:
|
|
10205
|
-
unstyled:
|
|
10206
|
-
classNames:
|
|
10207
|
-
cancelButtonStyle:
|
|
10208
|
-
actionButtonStyle:
|
|
10209
|
-
closeButtonAriaLabel:
|
|
10210
|
-
removeToast:
|
|
10211
|
-
toasts:
|
|
10212
|
-
heights:
|
|
10206
|
+
style: C?.style,
|
|
10207
|
+
unstyled: C?.unstyled,
|
|
10208
|
+
classNames: C?.classNames,
|
|
10209
|
+
cancelButtonStyle: C?.cancelButtonStyle,
|
|
10210
|
+
actionButtonStyle: C?.actionButtonStyle,
|
|
10211
|
+
closeButtonAriaLabel: C?.closeButtonAriaLabel,
|
|
10212
|
+
removeToast: O,
|
|
10213
|
+
toasts: E.filter((Ee) => Ee.position == re.position),
|
|
10214
|
+
heights: j.filter((Ee) => Ee.position == re.position),
|
|
10213
10215
|
setHeights: T,
|
|
10214
10216
|
expandByDefault: i,
|
|
10215
10217
|
gap: m,
|
|
10216
|
-
expanded:
|
|
10218
|
+
expanded: z,
|
|
10217
10219
|
swipeDirections: t.swipeDirections
|
|
10218
10220
|
});
|
|
10219
10221
|
})) : null;
|
|
@@ -10417,7 +10419,7 @@ lr.Footer = uv;
|
|
|
10417
10419
|
lr.Aside = av;
|
|
10418
10420
|
const cx = (e) => /* @__PURE__ */ l.jsx(_l, { ...e });
|
|
10419
10421
|
function wv({
|
|
10420
|
-
value: e
|
|
10422
|
+
value: e,
|
|
10421
10423
|
onSelect: t,
|
|
10422
10424
|
minDate: n,
|
|
10423
10425
|
maxDate: r,
|
|
@@ -10431,7 +10433,7 @@ function wv({
|
|
|
10431
10433
|
disabled: o
|
|
10432
10434
|
})
|
|
10433
10435
|
), i = (s) => {
|
|
10434
|
-
t?.(new Date(s.getFullYear(), e.getMonth(),
|
|
10436
|
+
t?.(new Date(s.getFullYear(), e.getMonth(), e.getDate()));
|
|
10435
10437
|
};
|
|
10436
10438
|
return /* @__PURE__ */ l.jsx(to, { variant: "light", name: e.getFullYear().toString(), children: a?.map(({ value: s, label: c, disabled: d }) => /* @__PURE__ */ l.jsx(
|
|
10437
10439
|
st,
|
|
@@ -10500,15 +10502,16 @@ const kv = [
|
|
|
10500
10502
|
min: f = new Date(2e3, 0, 1),
|
|
10501
10503
|
className: u,
|
|
10502
10504
|
size: p,
|
|
10503
|
-
fullWidth: v
|
|
10504
|
-
|
|
10505
|
-
|
|
10506
|
-
|
|
10507
|
-
|
|
10508
|
-
|
|
10509
|
-
|
|
10510
|
-
|
|
10511
|
-
|
|
10505
|
+
fullWidth: v,
|
|
10506
|
+
name: k
|
|
10507
|
+
} = e, M = /* @__PURE__ */ new Date(), [C, b] = me(null), m = (S) => {
|
|
10508
|
+
b(S.currentTarget);
|
|
10509
|
+
}, $ = () => {
|
|
10510
|
+
b(null);
|
|
10511
|
+
}, A = (S) => {
|
|
10512
|
+
const x = r?.getFullYear() || M.getFullYear(), j = new Date(x, S, r?.getDate() || 1);
|
|
10513
|
+
o?.(j), $();
|
|
10514
|
+
}, E = a === "month" ? r?.toLocaleDateString("ru-RU", {
|
|
10512
10515
|
month: "long",
|
|
10513
10516
|
year: "numeric"
|
|
10514
10517
|
}) : Mv(r);
|
|
@@ -10517,11 +10520,12 @@ const kv = [
|
|
|
10517
10520
|
rn,
|
|
10518
10521
|
{
|
|
10519
10522
|
label: t,
|
|
10520
|
-
value:
|
|
10523
|
+
value: E,
|
|
10521
10524
|
disabled: n,
|
|
10522
10525
|
size: p,
|
|
10523
10526
|
fullWidth: v,
|
|
10524
|
-
|
|
10527
|
+
name: k,
|
|
10528
|
+
endAdornment: /* @__PURE__ */ l.jsx(Ze, { disabled: n, variant: "text", onClick: m, children: /* @__PURE__ */ l.jsx(_a, {}) }),
|
|
10525
10529
|
placeholder: i,
|
|
10526
10530
|
error: s,
|
|
10527
10531
|
helperText: c,
|
|
@@ -10531,9 +10535,9 @@ const kv = [
|
|
|
10531
10535
|
/* @__PURE__ */ l.jsx(
|
|
10532
10536
|
ro,
|
|
10533
10537
|
{
|
|
10534
|
-
open: !!
|
|
10535
|
-
anchorEl:
|
|
10536
|
-
onClose:
|
|
10538
|
+
open: !!C,
|
|
10539
|
+
anchorEl: C,
|
|
10540
|
+
onClose: $,
|
|
10537
10541
|
anchorOrigin: {
|
|
10538
10542
|
vertical: "bottom",
|
|
10539
10543
|
horizontal: "right"
|
|
@@ -10546,32 +10550,34 @@ const kv = [
|
|
|
10546
10550
|
/* @__PURE__ */ l.jsx(
|
|
10547
10551
|
wv,
|
|
10548
10552
|
{
|
|
10549
|
-
value: r ||
|
|
10553
|
+
value: r || M,
|
|
10550
10554
|
onSelect: o,
|
|
10551
10555
|
minDate: f,
|
|
10552
10556
|
maxDate: d
|
|
10553
10557
|
}
|
|
10554
10558
|
),
|
|
10555
|
-
a === "month" ? /* @__PURE__ */ l.jsx(Sv, { children: kv.map((
|
|
10559
|
+
a === "month" ? /* @__PURE__ */ l.jsx(Sv, { children: kv.map((S, x) => /* @__PURE__ */ l.jsx(
|
|
10556
10560
|
Fe,
|
|
10557
10561
|
{
|
|
10558
10562
|
variant: "text",
|
|
10559
10563
|
size: "small",
|
|
10560
|
-
|
|
10561
|
-
|
|
10562
|
-
|
|
10564
|
+
disabled: f.getMonth() > x || d.getMonth() < x,
|
|
10565
|
+
onClick: () => A(x),
|
|
10566
|
+
selected: r?.getMonth() === x,
|
|
10567
|
+
children: S
|
|
10563
10568
|
},
|
|
10564
|
-
|
|
10565
|
-
)) }) : /* @__PURE__ */ l.jsx($v, { children: fs.map((
|
|
10569
|
+
S
|
|
10570
|
+
)) }) : /* @__PURE__ */ l.jsx($v, { children: fs.map((S, x) => /* @__PURE__ */ l.jsx(
|
|
10566
10571
|
Fe,
|
|
10567
10572
|
{
|
|
10568
10573
|
variant: "text",
|
|
10569
10574
|
size: "small",
|
|
10570
|
-
|
|
10571
|
-
|
|
10572
|
-
|
|
10575
|
+
disabled: f.getMonth() > x * 3 || d.getMonth() < x * 3,
|
|
10576
|
+
onClick: () => A(x * 3),
|
|
10577
|
+
selected: ps(r?.getMonth() || 0) === x,
|
|
10578
|
+
children: S
|
|
10573
10579
|
},
|
|
10574
|
-
|
|
10580
|
+
S
|
|
10575
10581
|
)) })
|
|
10576
10582
|
] })
|
|
10577
10583
|
}
|
|
@@ -10961,16 +10967,16 @@ function gx({
|
|
|
10961
10967
|
}) {
|
|
10962
10968
|
const [d, f] = me(e), [u, p] = me(t), v = (m, $) => {
|
|
10963
10969
|
Array.isArray($) && (f($[0]), p($[1]));
|
|
10964
|
-
},
|
|
10970
|
+
}, k = (m) => {
|
|
10965
10971
|
const { value: $ } = m.target;
|
|
10966
10972
|
Number.isNaN(+$) || f(+$);
|
|
10967
|
-
},
|
|
10973
|
+
}, M = (m) => {
|
|
10968
10974
|
const { value: $ } = m.target;
|
|
10969
10975
|
Number.isNaN(+$) || p(+$);
|
|
10970
|
-
},
|
|
10976
|
+
}, C = (m) => {
|
|
10971
10977
|
if (m.key === "Enter") {
|
|
10972
|
-
const $ = d >= e && d <= t ? d : e,
|
|
10973
|
-
n($,
|
|
10978
|
+
const $ = d >= e && d <= t ? d : e, A = u >= e && u <= t ? u : t;
|
|
10979
|
+
n($, A);
|
|
10974
10980
|
}
|
|
10975
10981
|
}, b = (m, $) => {
|
|
10976
10982
|
Array.isArray($) && n($[0], $[1]);
|
|
@@ -10987,8 +10993,8 @@ function gx({
|
|
|
10987
10993
|
type: "text",
|
|
10988
10994
|
name: "minVal",
|
|
10989
10995
|
value: d,
|
|
10990
|
-
onChange:
|
|
10991
|
-
onKeyDown:
|
|
10996
|
+
onChange: k,
|
|
10997
|
+
onKeyDown: C
|
|
10992
10998
|
}
|
|
10993
10999
|
),
|
|
10994
11000
|
/* @__PURE__ */ l.jsx(va, { children: "до" }),
|
|
@@ -10998,8 +11004,8 @@ function gx({
|
|
|
10998
11004
|
type: "text",
|
|
10999
11005
|
name: "minVal",
|
|
11000
11006
|
value: u,
|
|
11001
|
-
onChange:
|
|
11002
|
-
onKeyDown:
|
|
11007
|
+
onChange: M,
|
|
11008
|
+
onKeyDown: C
|
|
11003
11009
|
}
|
|
11004
11010
|
),
|
|
11005
11011
|
/* @__PURE__ */ l.jsx(Gv, { children: /* @__PURE__ */ l.jsx(
|
|
@@ -11054,7 +11060,7 @@ const Uv = y(zs)`
|
|
|
11054
11060
|
f(b.target.value), u.current && clearTimeout(u.current), u.current = setTimeout(() => {
|
|
11055
11061
|
n?.(b);
|
|
11056
11062
|
}, i);
|
|
11057
|
-
},
|
|
11063
|
+
}, k = () => {
|
|
11058
11064
|
f(""), p.current && (p.current.value = ""), u.current && clearTimeout(u.current);
|
|
11059
11065
|
const b = new InputEvent("input", {
|
|
11060
11066
|
bubbles: !0,
|
|
@@ -11064,23 +11070,23 @@ const Uv = y(zs)`
|
|
|
11064
11070
|
writable: !0,
|
|
11065
11071
|
value: p.current
|
|
11066
11072
|
}), n?.(b), p.current?.focus();
|
|
11067
|
-
},
|
|
11073
|
+
}, M = () => {
|
|
11068
11074
|
p.current?.focus();
|
|
11069
|
-
},
|
|
11075
|
+
}, C = !!d.length;
|
|
11070
11076
|
return /* @__PURE__ */ l.jsx(
|
|
11071
11077
|
Xv,
|
|
11072
11078
|
{
|
|
11073
11079
|
margin: e,
|
|
11074
11080
|
placeholder: t,
|
|
11075
|
-
startAdornment: /* @__PURE__ */ l.jsx(Uv, { onClick:
|
|
11081
|
+
startAdornment: /* @__PURE__ */ l.jsx(Uv, { onClick: M }),
|
|
11076
11082
|
disabled: r,
|
|
11077
11083
|
endAdornment: /* @__PURE__ */ l.jsx(
|
|
11078
11084
|
qv,
|
|
11079
11085
|
{
|
|
11080
11086
|
variant: "text",
|
|
11081
|
-
onClick:
|
|
11082
|
-
disabled: r || !
|
|
11083
|
-
$isActive:
|
|
11087
|
+
onClick: k,
|
|
11088
|
+
disabled: r || !C,
|
|
11089
|
+
$isActive: C,
|
|
11084
11090
|
children: /* @__PURE__ */ l.jsx(Qv, {})
|
|
11085
11091
|
}
|
|
11086
11092
|
),
|
|
@@ -11513,9 +11519,9 @@ function hb(e) {
|
|
|
11513
11519
|
enumerable: !0,
|
|
11514
11520
|
get: () => R(c.errors, n)
|
|
11515
11521
|
}
|
|
11516
|
-
}), [c, n]), p = g.useCallback((
|
|
11522
|
+
}), [c, n]), p = g.useCallback((C) => f.current.onChange({
|
|
11517
11523
|
target: {
|
|
11518
|
-
value: ms(
|
|
11524
|
+
value: ms(C),
|
|
11519
11525
|
name: n
|
|
11520
11526
|
},
|
|
11521
11527
|
type: Qn.CHANGE
|
|
@@ -11525,33 +11531,33 @@ function hb(e) {
|
|
|
11525
11531
|
name: n
|
|
11526
11532
|
},
|
|
11527
11533
|
type: Qn.BLUR
|
|
11528
|
-
}), [n, o._formValues]),
|
|
11534
|
+
}), [n, o._formValues]), k = g.useCallback((C) => {
|
|
11529
11535
|
const b = R(o._fields, n);
|
|
11530
|
-
b &&
|
|
11531
|
-
}, [o._fields, n]),
|
|
11536
|
+
b && C && (b._f.ref = C);
|
|
11537
|
+
}, [o._fields, n]), M = g.useMemo(() => ({
|
|
11532
11538
|
name: n,
|
|
11533
11539
|
value: s,
|
|
11534
11540
|
...et(r) || c.disabled ? { disabled: c.disabled || r } : {},
|
|
11535
11541
|
onChange: p,
|
|
11536
11542
|
onBlur: v,
|
|
11537
|
-
ref:
|
|
11538
|
-
}), [n, r, c.disabled, p, v,
|
|
11543
|
+
ref: k
|
|
11544
|
+
}), [n, r, c.disabled, p, v, k, s]);
|
|
11539
11545
|
return g.useEffect(() => {
|
|
11540
|
-
const
|
|
11546
|
+
const C = o._options.shouldUnregister || a;
|
|
11541
11547
|
o.register(n, {
|
|
11542
11548
|
...d.current.rules,
|
|
11543
11549
|
...et(d.current.disabled) ? { disabled: d.current.disabled } : {}
|
|
11544
11550
|
});
|
|
11545
11551
|
const b = (m, $) => {
|
|
11546
|
-
const
|
|
11547
|
-
|
|
11552
|
+
const A = R(o._fields, m);
|
|
11553
|
+
A && A._f && (A._f.mount = $);
|
|
11548
11554
|
};
|
|
11549
|
-
if (b(n, !0),
|
|
11555
|
+
if (b(n, !0), C) {
|
|
11550
11556
|
const m = Me(R(o._options.defaultValues, n));
|
|
11551
11557
|
pe(o._defaultValues, n, m), xe(R(o._formValues, n)) && pe(o._formValues, n, m);
|
|
11552
11558
|
}
|
|
11553
11559
|
return !i && o.register(n), () => {
|
|
11554
|
-
(i ?
|
|
11560
|
+
(i ? C && !o._state.action : C) ? o.unregister(n) : b(n, !1);
|
|
11555
11561
|
};
|
|
11556
11562
|
}, [n, o, i, a]), g.useEffect(() => {
|
|
11557
11563
|
o._setDisabledField({
|
|
@@ -11559,10 +11565,10 @@ function hb(e) {
|
|
|
11559
11565
|
name: n
|
|
11560
11566
|
});
|
|
11561
11567
|
}, [r, n, o]), g.useMemo(() => ({
|
|
11562
|
-
field:
|
|
11568
|
+
field: M,
|
|
11563
11569
|
formState: c,
|
|
11564
11570
|
fieldState: u
|
|
11565
|
-
}), [
|
|
11571
|
+
}), [M, c, u]);
|
|
11566
11572
|
}
|
|
11567
11573
|
const _n = (e) => e.render(hb(e));
|
|
11568
11574
|
var gb = (e, t, n, r, o) => t ? {
|
|
@@ -11765,29 +11771,29 @@ var Jt = (e) => je(e) && !Kn(e) ? e : {
|
|
|
11765
11771
|
value: e,
|
|
11766
11772
|
message: ""
|
|
11767
11773
|
}, Hr = async (e, t, n, r, o, a) => {
|
|
11768
|
-
const { ref: i, refs: s, required: c, maxLength: d, minLength: f, min: u, max: p, pattern: v, validate:
|
|
11769
|
-
if (!b || t.has(
|
|
11774
|
+
const { ref: i, refs: s, required: c, maxLength: d, minLength: f, min: u, max: p, pattern: v, validate: k, name: M, valueAsNumber: C, mount: b } = e._f, m = R(n, M);
|
|
11775
|
+
if (!b || t.has(M))
|
|
11770
11776
|
return {};
|
|
11771
|
-
const $ = s ? s[0] : i,
|
|
11777
|
+
const $ = s ? s[0] : i, A = (N) => {
|
|
11772
11778
|
o && $.reportValidity && ($.setCustomValidity(et(N) ? "" : N || ""), $.reportValidity());
|
|
11773
|
-
},
|
|
11779
|
+
}, E = {}, S = ho(i), x = Tn(i), j = S || x, T = (C || po(i)) && xe(i.value) && xe(m) || Zn(i) && i.value === "" || m === "" || Array.isArray(m) && !m.length, z = gb.bind(null, M, r, E), L = (N, W, U, Y = Ct.maxLength, B = Ct.minLength) => {
|
|
11774
11780
|
const Z = N ? W : U;
|
|
11775
|
-
|
|
11781
|
+
E[M] = {
|
|
11776
11782
|
type: N ? Y : B,
|
|
11777
11783
|
message: Z,
|
|
11778
11784
|
ref: i,
|
|
11779
|
-
...
|
|
11785
|
+
...z(N ? Y : B, Z)
|
|
11780
11786
|
};
|
|
11781
11787
|
};
|
|
11782
|
-
if (a ? !Array.isArray(m) || !m.length : c && (!
|
|
11788
|
+
if (a ? !Array.isArray(m) || !m.length : c && (!j && (T || Ge(m)) || et(m) && !m || x && !$s(s).isValid || S && !Ds(s).isValid)) {
|
|
11783
11789
|
const { value: N, message: W } = Yn(c) ? { value: !!c, message: c } : Jt(c);
|
|
11784
|
-
if (N && (
|
|
11790
|
+
if (N && (E[M] = {
|
|
11785
11791
|
type: Ct.required,
|
|
11786
11792
|
message: W,
|
|
11787
11793
|
ref: $,
|
|
11788
|
-
...
|
|
11794
|
+
...z(Ct.required, W)
|
|
11789
11795
|
}, !r))
|
|
11790
|
-
return
|
|
11796
|
+
return A(W), E;
|
|
11791
11797
|
}
|
|
11792
11798
|
if (!T && (!Ge(u) || !Ge(p))) {
|
|
11793
11799
|
let N, W;
|
|
@@ -11796,54 +11802,54 @@ var Jt = (e) => je(e) && !Kn(e) ? e : {
|
|
|
11796
11802
|
const B = i.valueAsNumber || m && +m;
|
|
11797
11803
|
Ge(U.value) || (N = B > U.value), Ge(Y.value) || (W = B < Y.value);
|
|
11798
11804
|
} else {
|
|
11799
|
-
const B = i.valueAsDate || new Date(m), Z = (
|
|
11805
|
+
const B = i.valueAsDate || new Date(m), Z = (O) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + O), oe = i.type == "time", te = i.type == "week";
|
|
11800
11806
|
wt(U.value) && m && (N = oe ? Z(m) > Z(U.value) : te ? m > U.value : B > new Date(U.value)), wt(Y.value) && m && (W = oe ? Z(m) < Z(Y.value) : te ? m < Y.value : B < new Date(Y.value));
|
|
11801
11807
|
}
|
|
11802
|
-
if ((N || W) && (
|
|
11803
|
-
return
|
|
11808
|
+
if ((N || W) && (L(!!N, U.message, Y.message, Ct.max, Ct.min), !r))
|
|
11809
|
+
return A(E[M].message), E;
|
|
11804
11810
|
}
|
|
11805
11811
|
if ((d || f) && !T && (wt(m) || a && Array.isArray(m))) {
|
|
11806
11812
|
const N = Jt(d), W = Jt(f), U = !Ge(N.value) && m.length > +N.value, Y = !Ge(W.value) && m.length < +W.value;
|
|
11807
|
-
if ((U || Y) && (
|
|
11808
|
-
return
|
|
11813
|
+
if ((U || Y) && (L(U, N.message, W.message), !r))
|
|
11814
|
+
return A(E[M].message), E;
|
|
11809
11815
|
}
|
|
11810
11816
|
if (v && !T && wt(m)) {
|
|
11811
11817
|
const { value: N, message: W } = Jt(v);
|
|
11812
|
-
if (Kn(N) && !m.match(N) && (
|
|
11818
|
+
if (Kn(N) && !m.match(N) && (E[M] = {
|
|
11813
11819
|
type: Ct.pattern,
|
|
11814
11820
|
message: W,
|
|
11815
11821
|
ref: i,
|
|
11816
|
-
...
|
|
11822
|
+
...z(Ct.pattern, W)
|
|
11817
11823
|
}, !r))
|
|
11818
|
-
return
|
|
11824
|
+
return A(W), E;
|
|
11819
11825
|
}
|
|
11820
|
-
if (
|
|
11821
|
-
if (pt(
|
|
11822
|
-
const N = await
|
|
11823
|
-
if (W && (
|
|
11826
|
+
if (k) {
|
|
11827
|
+
if (pt(k)) {
|
|
11828
|
+
const N = await k(m, n), W = Oa(N, $);
|
|
11829
|
+
if (W && (E[M] = {
|
|
11824
11830
|
...W,
|
|
11825
|
-
...
|
|
11831
|
+
...z(Ct.validate, W.message)
|
|
11826
11832
|
}, !r))
|
|
11827
|
-
return
|
|
11828
|
-
} else if (je(
|
|
11833
|
+
return A(W.message), E;
|
|
11834
|
+
} else if (je(k)) {
|
|
11829
11835
|
let N = {};
|
|
11830
|
-
for (const W in
|
|
11836
|
+
for (const W in k) {
|
|
11831
11837
|
if (!Ve(N) && !r)
|
|
11832
11838
|
break;
|
|
11833
|
-
const U = Oa(await
|
|
11839
|
+
const U = Oa(await k[W](m, n), $, W);
|
|
11834
11840
|
U && (N = {
|
|
11835
11841
|
...U,
|
|
11836
|
-
...
|
|
11837
|
-
},
|
|
11842
|
+
...z(W, U.message)
|
|
11843
|
+
}, A(U.message), r && (E[M] = N));
|
|
11838
11844
|
}
|
|
11839
|
-
if (!Ve(N) && (
|
|
11845
|
+
if (!Ve(N) && (E[M] = {
|
|
11840
11846
|
ref: $,
|
|
11841
11847
|
...N
|
|
11842
11848
|
}, !r))
|
|
11843
|
-
return
|
|
11849
|
+
return E;
|
|
11844
11850
|
}
|
|
11845
11851
|
}
|
|
11846
|
-
return
|
|
11852
|
+
return A(!0), E;
|
|
11847
11853
|
};
|
|
11848
11854
|
const Mb = {
|
|
11849
11855
|
mode: at.onSubmit,
|
|
@@ -11897,11 +11903,11 @@ function Db(e = {}) {
|
|
|
11897
11903
|
const p = {
|
|
11898
11904
|
array: wa(),
|
|
11899
11905
|
state: wa()
|
|
11900
|
-
}, v = en(t.mode),
|
|
11906
|
+
}, v = en(t.mode), k = en(t.reValidateMode), M = t.criteriaMode === at.all, C = (h) => (w) => {
|
|
11901
11907
|
clearTimeout(d), d = setTimeout(h, w);
|
|
11902
11908
|
}, b = async (h) => {
|
|
11903
11909
|
if (!t.disabled && (f.isValid || u.isValid || h)) {
|
|
11904
|
-
const w = t.resolver ? Ve((await T()).errors) : await
|
|
11910
|
+
const w = t.resolver ? Ve((await T()).errors) : await L(r, !0);
|
|
11905
11911
|
w !== n.isValid && p.state.next({
|
|
11906
11912
|
isValid: w
|
|
11907
11913
|
});
|
|
@@ -11936,22 +11942,22 @@ function Db(e = {}) {
|
|
|
11936
11942
|
});
|
|
11937
11943
|
} else
|
|
11938
11944
|
pe(a, h, w);
|
|
11939
|
-
},
|
|
11945
|
+
}, A = (h, w) => {
|
|
11940
11946
|
pe(n.errors, h, w), p.state.next({
|
|
11941
11947
|
errors: n.errors
|
|
11942
11948
|
});
|
|
11943
|
-
},
|
|
11949
|
+
}, E = (h) => {
|
|
11944
11950
|
n.errors = h, p.state.next({
|
|
11945
11951
|
errors: n.errors,
|
|
11946
11952
|
isValid: !1
|
|
11947
11953
|
});
|
|
11948
|
-
},
|
|
11954
|
+
}, S = (h, w, D, I) => {
|
|
11949
11955
|
const F = R(r, h);
|
|
11950
11956
|
if (F) {
|
|
11951
11957
|
const P = R(a, h, xe(D) ? R(o, h) : D);
|
|
11952
11958
|
xe(P) || I && I.defaultChecked || w ? pe(a, h, w ? P : $a(F._f)) : B(h, P), i.mount && b();
|
|
11953
11959
|
}
|
|
11954
|
-
},
|
|
11960
|
+
}, x = (h, w, D, I, F) => {
|
|
11955
11961
|
let P = !1, V = !1;
|
|
11956
11962
|
const ne = {
|
|
11957
11963
|
name: h
|
|
@@ -11969,9 +11975,9 @@ function Db(e = {}) {
|
|
|
11969
11975
|
P && F && p.state.next(ne);
|
|
11970
11976
|
}
|
|
11971
11977
|
return P ? ne : {};
|
|
11972
|
-
},
|
|
11978
|
+
}, j = (h, w, D, I) => {
|
|
11973
11979
|
const F = R(n.errors, h), P = (f.isValid || u.isValid) && et(w) && n.isValid !== w;
|
|
11974
|
-
if (t.delayError && D ? (c =
|
|
11980
|
+
if (t.delayError && D ? (c = C(() => 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) {
|
|
11975
11981
|
const V = {
|
|
11976
11982
|
...I,
|
|
11977
11983
|
...P && et(w) ? { isValid: w } : {},
|
|
@@ -11987,7 +11993,7 @@ function Db(e = {}) {
|
|
|
11987
11993
|
m(h, !0);
|
|
11988
11994
|
const w = await t.resolver(a, t.context, bb(h || s.mount, r, t.criteriaMode, t.shouldUseNativeValidation));
|
|
11989
11995
|
return m(h), w;
|
|
11990
|
-
},
|
|
11996
|
+
}, z = async (h) => {
|
|
11991
11997
|
const { errors: w } = await T(h);
|
|
11992
11998
|
if (h)
|
|
11993
11999
|
for (const D of h) {
|
|
@@ -11997,7 +12003,7 @@ function Db(e = {}) {
|
|
|
11997
12003
|
else
|
|
11998
12004
|
n.errors = w;
|
|
11999
12005
|
return w;
|
|
12000
|
-
},
|
|
12006
|
+
}, L = async (h, w, D = {
|
|
12001
12007
|
valid: !0
|
|
12002
12008
|
}) => {
|
|
12003
12009
|
for (const I in h) {
|
|
@@ -12007,12 +12013,12 @@ function Db(e = {}) {
|
|
|
12007
12013
|
if (P) {
|
|
12008
12014
|
const ne = s.array.has(P.name), ue = F._f && xb(F._f);
|
|
12009
12015
|
ue && f.validatingFields && m([I], !0);
|
|
12010
|
-
const Ce = await Hr(F, s.disabled, a,
|
|
12016
|
+
const Ce = await Hr(F, s.disabled, a, M, t.shouldUseNativeValidation && !w, ne);
|
|
12011
12017
|
if (ue && f.validatingFields && m([I]), Ce[P.name] && (D.valid = !1, w))
|
|
12012
12018
|
break;
|
|
12013
12019
|
!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));
|
|
12014
12020
|
}
|
|
12015
|
-
!Ve(V) && await
|
|
12021
|
+
!Ve(V) && await L(V, w, D);
|
|
12016
12022
|
}
|
|
12017
12023
|
}
|
|
12018
12024
|
return D.valid;
|
|
@@ -12034,7 +12040,7 @@ function Db(e = {}) {
|
|
|
12034
12040
|
values: Me(a)
|
|
12035
12041
|
})));
|
|
12036
12042
|
}
|
|
12037
|
-
(D.shouldDirty || D.shouldTouch) &&
|
|
12043
|
+
(D.shouldDirty || D.shouldTouch) && x(h, F, D.shouldTouch, D.shouldDirty, !0), D.shouldValidate && _(h);
|
|
12038
12044
|
}, Z = (h, w, D) => {
|
|
12039
12045
|
for (const I in w) {
|
|
12040
12046
|
const F = w[I], P = `${h}.${I}`, V = R(r, P);
|
|
@@ -12062,9 +12068,9 @@ function Db(e = {}) {
|
|
|
12062
12068
|
};
|
|
12063
12069
|
if (F) {
|
|
12064
12070
|
let V, ne;
|
|
12065
|
-
const ue = w.type ? $a(F._f) : ms(h), Ce = h.type === Qn.BLUR || h.type === Qn.FOCUS_OUT, nt = !wb(F._f) && !t.resolver && !R(n.errors, D) && !F._f.deps || Sb(Ce, R(n.touchedFields, D), n.isSubmitted,
|
|
12071
|
+
const ue = w.type ? $a(F._f) : ms(h), Ce = h.type === Qn.BLUR || h.type === Qn.FOCUS_OUT, nt = !wb(F._f) && !t.resolver && !R(n.errors, D) && !F._f.deps || Sb(Ce, R(n.touchedFields, D), n.isSubmitted, k, v), Q = zr(D, s, Ce);
|
|
12066
12072
|
pe(a, D, ue), Ce ? (F._f.onBlur && F._f.onBlur(h), c && c(0)) : F._f.onChange && F._f.onChange(h);
|
|
12067
|
-
const de =
|
|
12073
|
+
const de = x(D, ue, Ce), ce = !Ve(de) || Q;
|
|
12068
12074
|
if (!Ce && p.state.next({
|
|
12069
12075
|
name: D,
|
|
12070
12076
|
type: h.type,
|
|
@@ -12078,27 +12084,27 @@ function Db(e = {}) {
|
|
|
12078
12084
|
V = ut.error, D = ut.name, ne = Ve(qe);
|
|
12079
12085
|
}
|
|
12080
12086
|
} else
|
|
12081
|
-
m([D], !0), V = (await Hr(F, s.disabled, a,
|
|
12082
|
-
I && (F._f.deps && _(F._f.deps),
|
|
12087
|
+
m([D], !0), V = (await Hr(F, s.disabled, a, M, t.shouldUseNativeValidation))[D], m([D]), P(ue), I && (V ? ne = !1 : (f.isValid || u.isValid) && (ne = await L(r, !0)));
|
|
12088
|
+
I && (F._f.deps && _(F._f.deps), j(D, ne, V, de));
|
|
12083
12089
|
}
|
|
12084
|
-
},
|
|
12090
|
+
}, O = (h, w) => {
|
|
12085
12091
|
if (R(n.errors, w) && h.focus)
|
|
12086
12092
|
return h.focus(), 1;
|
|
12087
12093
|
}, _ = async (h, w = {}) => {
|
|
12088
12094
|
let D, I;
|
|
12089
12095
|
const F = Qe(h);
|
|
12090
12096
|
if (t.resolver) {
|
|
12091
|
-
const P = await
|
|
12097
|
+
const P = await z(xe(h) ? h : F);
|
|
12092
12098
|
D = Ve(P), I = h ? !F.some((V) => R(P, V)) : D;
|
|
12093
12099
|
} else h ? (I = (await Promise.all(F.map(async (P) => {
|
|
12094
12100
|
const V = R(r, P);
|
|
12095
|
-
return await
|
|
12096
|
-
}))).every(Boolean), !(!I && !n.isValid) && b()) : I = D = await
|
|
12101
|
+
return await L(V && V._f ? { [P]: V } : V);
|
|
12102
|
+
}))).every(Boolean), !(!I && !n.isValid) && b()) : I = D = await L(r);
|
|
12097
12103
|
return p.state.next({
|
|
12098
12104
|
...!wt(h) || (f.isValid || u.isValid) && D !== n.isValid ? {} : { name: h },
|
|
12099
12105
|
...t.resolver || !h ? { isValid: D } : {},
|
|
12100
12106
|
errors: n.errors
|
|
12101
|
-
}), w.shouldFocus && !I && nn(r,
|
|
12107
|
+
}), w.shouldFocus && !I && nn(r, O, h ? F : s.mount), I;
|
|
12102
12108
|
}, H = (h) => {
|
|
12103
12109
|
const w = {
|
|
12104
12110
|
...i.mount ? a : o
|
|
@@ -12166,7 +12172,7 @@ function Db(e = {}) {
|
|
|
12166
12172
|
}), s.mount.add(h), D ? Ee({
|
|
12167
12173
|
disabled: et(w.disabled) ? w.disabled : t.disabled,
|
|
12168
12174
|
name: h
|
|
12169
|
-
}) :
|
|
12175
|
+
}) : S(h, !0, w.value), {
|
|
12170
12176
|
...I ? { disabled: w.disabled || t.disabled } : {},
|
|
12171
12177
|
...t.progressive ? {
|
|
12172
12178
|
required: !!w.required,
|
|
@@ -12197,12 +12203,12 @@ function Db(e = {}) {
|
|
|
12197
12203
|
ref: { type: P.type, name: h }
|
|
12198
12204
|
} : { ref: P }
|
|
12199
12205
|
}
|
|
12200
|
-
}),
|
|
12206
|
+
}), S(h, !1, void 0, P);
|
|
12201
12207
|
} else
|
|
12202
12208
|
D = R(r, h, {}), D._f && (D._f.mount = !1), (t.shouldUnregister || w.shouldUnregister) && !(ys(s.array, h) && i.action) && s.unMount.add(h);
|
|
12203
12209
|
}
|
|
12204
12210
|
};
|
|
12205
|
-
}, lt = () => t.shouldFocusError && nn(r,
|
|
12211
|
+
}, lt = () => t.shouldFocusError && nn(r, O, s.mount), Wt = (h) => {
|
|
12206
12212
|
et(h) && (p.state.next({ disabled: h }), nn(r, (w, D) => {
|
|
12207
12213
|
const I = R(r, D);
|
|
12208
12214
|
I && (w.disabled = I._f.disabled || h, Array.isArray(I._f.refs) && I._f.refs.forEach((F) => {
|
|
@@ -12219,7 +12225,7 @@ function Db(e = {}) {
|
|
|
12219
12225
|
const { errors: P, values: V } = await T();
|
|
12220
12226
|
n.errors = P, F = V;
|
|
12221
12227
|
} else
|
|
12222
|
-
await
|
|
12228
|
+
await L(r);
|
|
12223
12229
|
if (s.disabled.size)
|
|
12224
12230
|
for (const P of s.disabled)
|
|
12225
12231
|
pe(F, P, void 0);
|
|
@@ -12321,7 +12327,7 @@ function Db(e = {}) {
|
|
|
12321
12327
|
_setValid: b,
|
|
12322
12328
|
_setFieldArray: $,
|
|
12323
12329
|
_setDisabledField: Ee,
|
|
12324
|
-
_setErrors:
|
|
12330
|
+
_setErrors: E,
|
|
12325
12331
|
_getFieldArray: Y,
|
|
12326
12332
|
_reset: $e,
|
|
12327
12333
|
_resetDefaultValues: () => pt(t.defaultValues) && t.defaultValues().then((h) => {
|
|
@@ -12422,100 +12428,100 @@ var Er = (e, t) => xe(t) ? [] : Ob(e, Qe(t).sort((n, r) => n - r)), jr = (e, t,
|
|
|
12422
12428
|
function Mx(e) {
|
|
12423
12429
|
const t = An(), { control: n = t.control, name: r, keyName: o = "id", shouldUnregister: a, rules: i } = e, [s, c] = g.useState(n._getFieldArray(r)), d = g.useRef(n._getFieldArray(r).map(jt)), f = g.useRef(s), u = g.useRef(r), p = g.useRef(!1);
|
|
12424
12430
|
u.current = r, f.current = s, n._names.array.add(r), i && n.register(r, i), g.useEffect(() => n._subjects.array.subscribe({
|
|
12425
|
-
next: ({ values:
|
|
12426
|
-
if (
|
|
12427
|
-
const
|
|
12428
|
-
Array.isArray(
|
|
12431
|
+
next: ({ values: S, name: x }) => {
|
|
12432
|
+
if (x === u.current || !x) {
|
|
12433
|
+
const j = R(S, u.current);
|
|
12434
|
+
Array.isArray(j) && (c(j), d.current = j.map(jt));
|
|
12429
12435
|
}
|
|
12430
12436
|
}
|
|
12431
12437
|
}).unsubscribe, [n]);
|
|
12432
|
-
const v = g.useCallback((
|
|
12433
|
-
p.current = !0, n._setFieldArray(r,
|
|
12434
|
-
}, [n, r]),
|
|
12435
|
-
const
|
|
12436
|
-
n._names.focus = Cr(r, T.length - 1,
|
|
12437
|
-
argA: $r(
|
|
12438
|
+
const v = g.useCallback((S) => {
|
|
12439
|
+
p.current = !0, n._setFieldArray(r, S);
|
|
12440
|
+
}, [n, r]), k = (S, x) => {
|
|
12441
|
+
const j = Qe(Me(S)), T = Sr(n._getFieldArray(r), j);
|
|
12442
|
+
n._names.focus = Cr(r, T.length - 1, x), d.current = Sr(d.current, j.map(jt)), v(T), c(T), n._setFieldArray(r, T, Sr, {
|
|
12443
|
+
argA: $r(S)
|
|
12438
12444
|
});
|
|
12439
|
-
},
|
|
12440
|
-
const
|
|
12441
|
-
n._names.focus = Cr(r, 0,
|
|
12442
|
-
argA: $r(
|
|
12445
|
+
}, M = (S, x) => {
|
|
12446
|
+
const j = Qe(Me(S)), T = Or(n._getFieldArray(r), j);
|
|
12447
|
+
n._names.focus = Cr(r, 0, x), d.current = Or(d.current, j.map(jt)), v(T), c(T), n._setFieldArray(r, T, Or, {
|
|
12448
|
+
argA: $r(S)
|
|
12443
12449
|
});
|
|
12444
|
-
},
|
|
12445
|
-
const
|
|
12446
|
-
d.current = Er(d.current,
|
|
12447
|
-
argA:
|
|
12450
|
+
}, C = (S) => {
|
|
12451
|
+
const x = Er(n._getFieldArray(r), S);
|
|
12452
|
+
d.current = Er(d.current, S), v(x), c(x), !Array.isArray(R(n._fields, r)) && pe(n._fields, r, void 0), n._setFieldArray(r, x, Er, {
|
|
12453
|
+
argA: S
|
|
12448
12454
|
});
|
|
12449
|
-
}, b = (
|
|
12450
|
-
const T = Qe(Me(
|
|
12451
|
-
n._names.focus = Cr(r,
|
|
12452
|
-
argA:
|
|
12453
|
-
argB: $r(
|
|
12455
|
+
}, b = (S, x, j) => {
|
|
12456
|
+
const T = Qe(Me(x)), z = Mr(n._getFieldArray(r), S, T);
|
|
12457
|
+
n._names.focus = Cr(r, S, j), d.current = Mr(d.current, S, T.map(jt)), v(z), c(z), n._setFieldArray(r, z, Mr, {
|
|
12458
|
+
argA: S,
|
|
12459
|
+
argB: $r(x)
|
|
12454
12460
|
});
|
|
12455
|
-
}, m = (
|
|
12456
|
-
const
|
|
12457
|
-
jr(
|
|
12458
|
-
argA:
|
|
12459
|
-
argB:
|
|
12461
|
+
}, m = (S, x) => {
|
|
12462
|
+
const j = n._getFieldArray(r);
|
|
12463
|
+
jr(j, S, x), jr(d.current, S, x), v(j), c(j), n._setFieldArray(r, j, jr, {
|
|
12464
|
+
argA: S,
|
|
12465
|
+
argB: x
|
|
12460
12466
|
}, !1);
|
|
12461
|
-
}, $ = (
|
|
12462
|
-
const
|
|
12463
|
-
Dr(
|
|
12464
|
-
argA:
|
|
12465
|
-
argB:
|
|
12467
|
+
}, $ = (S, x) => {
|
|
12468
|
+
const j = n._getFieldArray(r);
|
|
12469
|
+
Dr(j, S, x), Dr(d.current, S, x), v(j), c(j), n._setFieldArray(r, j, Dr, {
|
|
12470
|
+
argA: S,
|
|
12471
|
+
argB: x
|
|
12466
12472
|
}, !1);
|
|
12467
|
-
},
|
|
12468
|
-
const
|
|
12469
|
-
d.current = [...T].map((
|
|
12470
|
-
argA:
|
|
12471
|
-
argB:
|
|
12473
|
+
}, A = (S, x) => {
|
|
12474
|
+
const j = Me(x), T = Ea(n._getFieldArray(r), S, j);
|
|
12475
|
+
d.current = [...T].map((z, L) => !z || L === S ? jt() : d.current[L]), v(T), c([...T]), n._setFieldArray(r, T, Ea, {
|
|
12476
|
+
argA: S,
|
|
12477
|
+
argB: j
|
|
12472
12478
|
}, !0, !1);
|
|
12473
|
-
},
|
|
12474
|
-
const
|
|
12475
|
-
d.current =
|
|
12479
|
+
}, E = (S) => {
|
|
12480
|
+
const x = Qe(Me(S));
|
|
12481
|
+
d.current = x.map(jt), v([...x]), c([...x]), n._setFieldArray(r, [...x], (j) => j, {}, !0, !1);
|
|
12476
12482
|
};
|
|
12477
12483
|
return g.useEffect(() => {
|
|
12478
12484
|
if (n._state.action = !1, zr(r, n._names) && n._subjects.state.next({
|
|
12479
12485
|
...n._formState
|
|
12480
12486
|
}), p.current && (!en(n._options.mode).isOnSubmit || n._formState.isSubmitted) && !en(n._options.reValidateMode).isOnSubmit)
|
|
12481
12487
|
if (n._options.resolver)
|
|
12482
|
-
n._runSchema([r]).then((
|
|
12483
|
-
const
|
|
12484
|
-
(
|
|
12488
|
+
n._runSchema([r]).then((S) => {
|
|
12489
|
+
const x = R(S.errors, r), j = R(n._formState.errors, r);
|
|
12490
|
+
(j ? !x && j.type || x && (j.type !== x.type || j.message !== x.message) : x && x.type) && (x ? pe(n._formState.errors, r, x) : Ae(n._formState.errors, r), n._subjects.state.next({
|
|
12485
12491
|
errors: n._formState.errors
|
|
12486
12492
|
}));
|
|
12487
12493
|
});
|
|
12488
12494
|
else {
|
|
12489
|
-
const
|
|
12490
|
-
|
|
12491
|
-
errors: Os(n._formState.errors,
|
|
12495
|
+
const S = R(n._fields, r);
|
|
12496
|
+
S && S._f && !(en(n._options.reValidateMode).isOnSubmit && en(n._options.mode).isOnSubmit) && Hr(S, n._names.disabled, n._formValues, n._options.criteriaMode === at.all, n._options.shouldUseNativeValidation, !0).then((x) => !Ve(x) && n._subjects.state.next({
|
|
12497
|
+
errors: Os(n._formState.errors, x, r)
|
|
12492
12498
|
}));
|
|
12493
12499
|
}
|
|
12494
12500
|
n._subjects.state.next({
|
|
12495
12501
|
name: r,
|
|
12496
12502
|
values: Me(n._formValues)
|
|
12497
|
-
}), n._names.focus && nn(n._fields, (
|
|
12498
|
-
if (n._names.focus &&
|
|
12499
|
-
return
|
|
12503
|
+
}), n._names.focus && nn(n._fields, (S, x) => {
|
|
12504
|
+
if (n._names.focus && x.startsWith(n._names.focus) && S.focus)
|
|
12505
|
+
return S.focus(), 1;
|
|
12500
12506
|
}), n._names.focus = "", n._setValid(), p.current = !1;
|
|
12501
12507
|
}, [s, r, n]), g.useEffect(() => (!R(n._formValues, r) && n._setFieldArray(r), () => {
|
|
12502
|
-
const
|
|
12503
|
-
const T = R(n._fields,
|
|
12504
|
-
T && T._f && (T._f.mount =
|
|
12508
|
+
const S = (x, j) => {
|
|
12509
|
+
const T = R(n._fields, x);
|
|
12510
|
+
T && T._f && (T._f.mount = j);
|
|
12505
12511
|
};
|
|
12506
|
-
n._options.shouldUnregister || a ? n.unregister(r) :
|
|
12512
|
+
n._options.shouldUnregister || a ? n.unregister(r) : S(r, !1);
|
|
12507
12513
|
}), [r, n, o, a]), {
|
|
12508
12514
|
swap: g.useCallback(m, [v, r, n]),
|
|
12509
12515
|
move: g.useCallback($, [v, r, n]),
|
|
12510
|
-
prepend: g.useCallback(
|
|
12511
|
-
append: g.useCallback(
|
|
12512
|
-
remove: g.useCallback(
|
|
12516
|
+
prepend: g.useCallback(M, [v, r, n]),
|
|
12517
|
+
append: g.useCallback(k, [v, r, n]),
|
|
12518
|
+
remove: g.useCallback(C, [v, r, n]),
|
|
12513
12519
|
insert: g.useCallback(b, [v, r, n]),
|
|
12514
|
-
update: g.useCallback(
|
|
12515
|
-
replace: g.useCallback(
|
|
12516
|
-
fields: g.useMemo(() => s.map((
|
|
12517
|
-
...
|
|
12518
|
-
[o]: d.current[
|
|
12520
|
+
update: g.useCallback(A, [v, r, n]),
|
|
12521
|
+
replace: g.useCallback(E, [v, r, n]),
|
|
12522
|
+
fields: g.useMemo(() => s.map((S, x) => ({
|
|
12523
|
+
...S,
|
|
12524
|
+
[o]: d.current[x] || jt()
|
|
12519
12525
|
})), [s, o])
|
|
12520
12526
|
};
|
|
12521
12527
|
}
|