@sito/dashboard-app 0.0.42 → 0.0.44
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/README.md +2 -2
- package/dist/components/{Navbar → Clock}/Clock.d.ts +4 -0
- package/dist/components/Clock/Clock.stories.d.ts +12 -0
- package/dist/components/Clock/index.d.ts +1 -0
- package/dist/components/Navbar/Navbar.stories.d.ts +0 -2
- package/dist/components/Navbar/types.d.ts +0 -1
- package/dist/dashboard-app.cjs +1 -1
- package/dist/dashboard-app.js +1325 -1312
- package/dist/hooks/actions/types.d.ts +6 -2
- package/dist/main.css +1 -1
- package/package.json +1 -1
package/dist/dashboard-app.js
CHANGED
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var me = (e, t, s) =>
|
|
1
|
+
var ws = Object.defineProperty;
|
|
2
|
+
var _s = (e, t, s) => t in e ? ws(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
|
+
var me = (e, t, s) => _s(e, typeof t != "symbol" ? t + "" : t, s);
|
|
4
4
|
import "./main.css";
|
|
5
|
-
import { State as
|
|
5
|
+
import { State as Ss, inputStateClassName as Cs, labelStateClassName as Es, helperTextStateClassName as ks, useTranslation as V, Button as we, Loading as xe, TextInput as Ns, FileInput as As, Actions as xs, ActionsDropdown as Ts, useTableOptions as Fs, Badge as $s, IconButton as Ls, Action as Ds } from "@sito/dashboard";
|
|
6
6
|
export * from "@sito/dashboard";
|
|
7
|
-
import { Action as
|
|
8
|
-
import { jsxs as
|
|
7
|
+
import { Action as Ri, Actions as Ui, ActionsDropdown as qi, Button as Hi } from "@sito/dashboard";
|
|
8
|
+
import { jsxs as F, jsx as g, Fragment as Ve } from "react/jsx-runtime";
|
|
9
9
|
import { FontAwesomeIcon as ce } from "@fortawesome/react-fontawesome";
|
|
10
|
-
import
|
|
11
|
-
import { faEyeSlash as
|
|
10
|
+
import ne, { forwardRef as Rt, useState as Z, useCallback as D, useEffect as fe, useReducer as Ut, useRef as Ie, createContext as Pe, useContext as Oe, useMemo as Ae, useLayoutEffect as Vs } from "react";
|
|
11
|
+
import { faEyeSlash as Is, faEye as Ps, faClose as qt, faTrash as Os, faRotateLeft as Ht, faPencil as Ms, faCircleNotch as Bt, faCloudArrowDown as Rs, faCloudUpload as Us, faArrowLeft as qs, faAdd as St, faFilter as Hs, faBars as Bs, faSearch as Ks, faArrowUp as Qs, faCircleCheck as js, faWarning as Ws } from "@fortawesome/free-solid-svg-icons";
|
|
12
12
|
import { createPortal as Kt } from "react-dom";
|
|
13
|
-
import { QueryClient as
|
|
14
|
-
import { faSadTear as
|
|
15
|
-
const Ct = (e) => e == null ? !1 : `${e}`.length > 0,
|
|
13
|
+
import { QueryClient as Gs, QueryClientProvider as Js, useMutation as Me, useQuery as zs } from "@tanstack/react-query";
|
|
14
|
+
import { faSadTear as Ys } from "@fortawesome/free-regular-svg-icons";
|
|
15
|
+
const Ct = (e) => e == null ? !1 : `${e}`.length > 0, ti = Rt(function(e, t) {
|
|
16
16
|
const {
|
|
17
17
|
value: s,
|
|
18
|
-
defaultValue:
|
|
19
|
-
onChange:
|
|
20
|
-
state:
|
|
21
|
-
name:
|
|
18
|
+
defaultValue: r,
|
|
19
|
+
onChange: n,
|
|
20
|
+
state: i = Ss.default,
|
|
21
|
+
name: a = "",
|
|
22
22
|
id: c = "",
|
|
23
|
-
label:
|
|
24
|
-
disabled:
|
|
25
|
-
required:
|
|
26
|
-
containerClassName:
|
|
23
|
+
label: l = "",
|
|
24
|
+
disabled: h = !1,
|
|
25
|
+
required: y = !1,
|
|
26
|
+
containerClassName: m = "",
|
|
27
27
|
inputClassName: f = "",
|
|
28
28
|
labelClassName: p = "",
|
|
29
29
|
helperText: _ = "",
|
|
30
30
|
helperTextClassName: C = "",
|
|
31
31
|
...k
|
|
32
|
-
} = e, B = s !== void 0, [N, $] =
|
|
33
|
-
() => Ct(
|
|
32
|
+
} = e, B = s !== void 0, [N, $] = Z(
|
|
33
|
+
() => Ct(r)
|
|
34
34
|
), x = B ? Ct(s) : N, A = (I) => {
|
|
35
|
-
B || $(I.currentTarget.value.length > 0),
|
|
35
|
+
B || $(I.currentTarget.value.length > 0), n == null || n(I);
|
|
36
36
|
};
|
|
37
|
-
return /* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ F("div", { className: `form-paragraph-container group ${m}`, children: [
|
|
38
38
|
/* @__PURE__ */ g(
|
|
39
39
|
"textarea",
|
|
40
40
|
{
|
|
41
41
|
ref: t,
|
|
42
|
-
name:
|
|
42
|
+
name: a,
|
|
43
43
|
id: c,
|
|
44
|
-
className: `text-input text-area form-paragraph-textarea peer ${
|
|
45
|
-
required:
|
|
46
|
-
defaultValue:
|
|
44
|
+
className: `text-input text-area form-paragraph-textarea peer ${Cs(i)} ${x ? "has-value" : ""} ${k.placeholder ? "has-placeholder" : ""} ${f}`,
|
|
45
|
+
required: y,
|
|
46
|
+
defaultValue: r,
|
|
47
47
|
...B ? { value: s } : {},
|
|
48
48
|
onChange: A,
|
|
49
|
-
disabled:
|
|
49
|
+
disabled: h,
|
|
50
50
|
...k
|
|
51
51
|
}
|
|
52
52
|
),
|
|
53
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ F(
|
|
54
54
|
"label",
|
|
55
55
|
{
|
|
56
56
|
htmlFor: c,
|
|
57
|
-
className: `text-input-label ${
|
|
57
|
+
className: `text-input-label ${Es(i)} ${p}`,
|
|
58
58
|
children: [
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
l,
|
|
60
|
+
y ? " *" : ""
|
|
61
61
|
]
|
|
62
62
|
}
|
|
63
63
|
),
|
|
64
64
|
!!_ && /* @__PURE__ */ g(
|
|
65
65
|
"p",
|
|
66
66
|
{
|
|
67
|
-
className: `text-input-helper-text ${
|
|
67
|
+
className: `text-input-helper-text ${ks(i)} ${C}`,
|
|
68
68
|
children: _
|
|
69
69
|
}
|
|
70
70
|
)
|
|
71
71
|
] });
|
|
72
|
-
}),
|
|
72
|
+
}), si = (e) => {
|
|
73
73
|
const { t } = V(), {
|
|
74
74
|
children: s,
|
|
75
|
-
handleSubmit:
|
|
76
|
-
onSubmit:
|
|
77
|
-
isLoading:
|
|
78
|
-
buttonEnd:
|
|
75
|
+
handleSubmit: r,
|
|
76
|
+
onSubmit: n,
|
|
77
|
+
isLoading: i = !1,
|
|
78
|
+
buttonEnd: a = !0,
|
|
79
79
|
reset: c
|
|
80
80
|
} = e;
|
|
81
|
-
return /* @__PURE__ */
|
|
81
|
+
return /* @__PURE__ */ F("form", { className: "form-container", onSubmit: r(n), children: [
|
|
82
82
|
s,
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ F("div", { className: `form-actions ${a ? "end" : ""}`, children: [
|
|
84
|
+
/* @__PURE__ */ F(
|
|
85
85
|
we,
|
|
86
86
|
{
|
|
87
87
|
type: "submit",
|
|
88
88
|
color: "primary",
|
|
89
89
|
variant: "submit",
|
|
90
|
-
disabled:
|
|
90
|
+
disabled: i,
|
|
91
91
|
name: t("_accessibility:buttons.submit"),
|
|
92
92
|
"aria-label": t("_accessibility:ariaLabels.submit"),
|
|
93
93
|
children: [
|
|
94
|
-
|
|
94
|
+
i ? /* @__PURE__ */ g(xe, { color: "stroke-base", loaderClass: "!w-6 mt-1", strokeWidth: "6" }) : null,
|
|
95
95
|
t("_accessibility:buttons.submit")
|
|
96
96
|
]
|
|
97
97
|
}
|
|
@@ -109,81 +109,81 @@ const Ct = (e) => e == null ? !1 : `${e}`.length > 0, nn = Ut(function(e, t) {
|
|
|
109
109
|
)
|
|
110
110
|
] })
|
|
111
111
|
] });
|
|
112
|
-
},
|
|
113
|
-
const { t: s } = V(), [
|
|
114
|
-
return /* @__PURE__ */ g(
|
|
112
|
+
}, ri = Rt(function(e, t) {
|
|
113
|
+
const { t: s } = V(), [r, n] = Z(!1);
|
|
114
|
+
return /* @__PURE__ */ g(Ns, { ...e, type: r ? "text" : "password", ref: t, children: /* @__PURE__ */ g(
|
|
115
115
|
Se,
|
|
116
116
|
{
|
|
117
117
|
type: "button",
|
|
118
118
|
tabIndex: -1,
|
|
119
119
|
"aria-label": s(
|
|
120
|
-
|
|
120
|
+
r ? "_accessibility:ariaLabels.hidePassword" : "_accessibility:ariaLabels.showPassword"
|
|
121
121
|
),
|
|
122
122
|
className: "password-icon",
|
|
123
|
-
onClick: () =>
|
|
124
|
-
icon:
|
|
123
|
+
onClick: () => n(!r),
|
|
124
|
+
icon: r ? Is : Ps
|
|
125
125
|
}
|
|
126
126
|
) });
|
|
127
127
|
}), at = (e) => {
|
|
128
128
|
const { t } = V(), {
|
|
129
129
|
title: s,
|
|
130
|
-
children:
|
|
131
|
-
handleClose:
|
|
132
|
-
open:
|
|
133
|
-
containerClassName:
|
|
130
|
+
children: r,
|
|
131
|
+
handleClose: n,
|
|
132
|
+
open: i = !1,
|
|
133
|
+
containerClassName: a = "",
|
|
134
134
|
className: c = "",
|
|
135
|
-
animationClass:
|
|
136
|
-
} = e,
|
|
137
|
-
(
|
|
138
|
-
|
|
135
|
+
animationClass: l = "appear"
|
|
136
|
+
} = e, h = D(
|
|
137
|
+
(m) => {
|
|
138
|
+
m.key === "Escape" && i && n();
|
|
139
139
|
},
|
|
140
|
-
[
|
|
140
|
+
[i, n]
|
|
141
141
|
);
|
|
142
|
-
|
|
143
|
-
window.removeEventListener("keydown",
|
|
144
|
-
}), [
|
|
145
|
-
const
|
|
146
|
-
(
|
|
147
|
-
|
|
142
|
+
fe(() => (window.addEventListener("keydown", h), () => {
|
|
143
|
+
window.removeEventListener("keydown", h);
|
|
144
|
+
}), [h]);
|
|
145
|
+
const y = D(
|
|
146
|
+
(m) => {
|
|
147
|
+
m.target === m.currentTarget && n();
|
|
148
148
|
},
|
|
149
|
-
[
|
|
149
|
+
[n]
|
|
150
150
|
);
|
|
151
|
-
return
|
|
152
|
-
const
|
|
151
|
+
return fe(() => {
|
|
152
|
+
const m = (f) => {
|
|
153
153
|
f ? document.body.style.overflow = "hidden" : document.body.style.overflow = "auto";
|
|
154
154
|
};
|
|
155
|
-
return
|
|
156
|
-
|
|
155
|
+
return m(i), () => {
|
|
156
|
+
m(!1);
|
|
157
157
|
};
|
|
158
|
-
}, [
|
|
158
|
+
}, [i]), Kt(
|
|
159
159
|
/* @__PURE__ */ g(
|
|
160
160
|
"div",
|
|
161
161
|
{
|
|
162
162
|
"aria-label": t("_accessibility:ariaLabels.closeDialog"),
|
|
163
|
-
"aria-hidden": !
|
|
164
|
-
onClick:
|
|
165
|
-
className: `dialog-backdrop animated ${
|
|
166
|
-
children: /* @__PURE__ */
|
|
163
|
+
"aria-hidden": !i,
|
|
164
|
+
onClick: y,
|
|
165
|
+
className: `dialog-backdrop animated ${i ? `opened ${l}` : "closed"} ${a}`,
|
|
166
|
+
children: /* @__PURE__ */ F(
|
|
167
167
|
"div",
|
|
168
168
|
{
|
|
169
|
-
className: `dialog elevated animated ${
|
|
169
|
+
className: `dialog elevated animated ${i ? `opened ${l}` : "closed"} ${c}`,
|
|
170
170
|
children: [
|
|
171
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ F("div", { className: "dialog-header", children: [
|
|
172
172
|
/* @__PURE__ */ g("h3", { className: "dialog-title", children: s }),
|
|
173
173
|
/* @__PURE__ */ g(
|
|
174
174
|
Se,
|
|
175
175
|
{
|
|
176
|
-
icon:
|
|
177
|
-
disabled: !
|
|
178
|
-
"aria-disabled": !
|
|
179
|
-
onClick:
|
|
176
|
+
icon: qt,
|
|
177
|
+
disabled: !i,
|
|
178
|
+
"aria-disabled": !i,
|
|
179
|
+
onClick: n,
|
|
180
180
|
className: "icon-button dialog-close-btn",
|
|
181
181
|
name: t("_accessibility:buttons.closeDialog"),
|
|
182
182
|
"aria-label": t("_accessibility:ariaLabels.closeDialog")
|
|
183
183
|
}
|
|
184
184
|
)
|
|
185
185
|
] }),
|
|
186
|
-
|
|
186
|
+
r
|
|
187
187
|
]
|
|
188
188
|
}
|
|
189
189
|
)
|
|
@@ -195,37 +195,37 @@ const Ct = (e) => e == null ? !1 : `${e}`.length > 0, nn = Ut(function(e, t) {
|
|
|
195
195
|
const {
|
|
196
196
|
primaryText: t,
|
|
197
197
|
cancelText: s,
|
|
198
|
-
onPrimaryClick:
|
|
199
|
-
onCancel:
|
|
200
|
-
isLoading:
|
|
201
|
-
disabled:
|
|
198
|
+
onPrimaryClick: r,
|
|
199
|
+
onCancel: n,
|
|
200
|
+
isLoading: i = !1,
|
|
201
|
+
disabled: a = !1,
|
|
202
202
|
primaryType: c = "submit",
|
|
203
|
-
containerClassName:
|
|
204
|
-
primaryClassName:
|
|
205
|
-
alignEnd:
|
|
206
|
-
primaryName:
|
|
203
|
+
containerClassName: l = "",
|
|
204
|
+
primaryClassName: h = "",
|
|
205
|
+
alignEnd: y = !1,
|
|
206
|
+
primaryName: m,
|
|
207
207
|
primaryAriaLabel: f,
|
|
208
208
|
cancelName: p,
|
|
209
209
|
cancelAriaLabel: _
|
|
210
210
|
} = e;
|
|
211
|
-
return /* @__PURE__ */
|
|
211
|
+
return /* @__PURE__ */ F(
|
|
212
212
|
"div",
|
|
213
213
|
{
|
|
214
|
-
className: `dialog-actions ${
|
|
214
|
+
className: `dialog-actions ${y ? "end" : ""} ${l}`,
|
|
215
215
|
children: [
|
|
216
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ F(
|
|
217
217
|
we,
|
|
218
218
|
{
|
|
219
219
|
type: c,
|
|
220
220
|
color: "primary",
|
|
221
221
|
variant: "submit",
|
|
222
|
-
className:
|
|
223
|
-
disabled:
|
|
224
|
-
onClick:
|
|
225
|
-
name:
|
|
222
|
+
className: h,
|
|
223
|
+
disabled: a,
|
|
224
|
+
onClick: r,
|
|
225
|
+
name: m,
|
|
226
226
|
"aria-label": f,
|
|
227
227
|
children: [
|
|
228
|
-
|
|
228
|
+
i ? /* @__PURE__ */ g(xe, { color: "stroke-base", loaderClass: "!w-6 mt-1", strokeWidth: "6" }) : null,
|
|
229
229
|
t
|
|
230
230
|
]
|
|
231
231
|
}
|
|
@@ -235,8 +235,8 @@ const Ct = (e) => e == null ? !1 : `${e}`.length > 0, nn = Ut(function(e, t) {
|
|
|
235
235
|
{
|
|
236
236
|
type: "button",
|
|
237
237
|
variant: "outlined",
|
|
238
|
-
disabled:
|
|
239
|
-
onClick:
|
|
238
|
+
disabled: a,
|
|
239
|
+
onClick: n,
|
|
240
240
|
name: p,
|
|
241
241
|
"aria-label": _,
|
|
242
242
|
children: s
|
|
@@ -245,17 +245,17 @@ const Ct = (e) => e == null ? !1 : `${e}`.length > 0, nn = Ut(function(e, t) {
|
|
|
245
245
|
]
|
|
246
246
|
}
|
|
247
247
|
);
|
|
248
|
-
},
|
|
248
|
+
}, ii = (e) => {
|
|
249
249
|
const { t } = V(), {
|
|
250
250
|
children: s,
|
|
251
|
-
handleSubmit:
|
|
252
|
-
onSubmit:
|
|
253
|
-
handleClose:
|
|
254
|
-
isLoading:
|
|
251
|
+
handleSubmit: r,
|
|
252
|
+
onSubmit: n,
|
|
253
|
+
handleClose: i,
|
|
254
|
+
isLoading: a = !1,
|
|
255
255
|
buttonEnd: c = !0,
|
|
256
|
-
...
|
|
256
|
+
...l
|
|
257
257
|
} = e;
|
|
258
|
-
return /* @__PURE__ */ g(at, { ...
|
|
258
|
+
return /* @__PURE__ */ g(at, { ...l, handleClose: i, children: /* @__PURE__ */ F("form", { onSubmit: r(n), children: [
|
|
259
259
|
/* @__PURE__ */ g("div", { className: "form-container", children: s }),
|
|
260
260
|
/* @__PURE__ */ g(
|
|
261
261
|
ot,
|
|
@@ -263,9 +263,9 @@ const Ct = (e) => e == null ? !1 : `${e}`.length > 0, nn = Ut(function(e, t) {
|
|
|
263
263
|
primaryType: "submit",
|
|
264
264
|
primaryText: t("_accessibility:buttons.submit"),
|
|
265
265
|
cancelText: t("_accessibility:buttons.cancel"),
|
|
266
|
-
onCancel:
|
|
267
|
-
isLoading:
|
|
268
|
-
disabled:
|
|
266
|
+
onCancel: i,
|
|
267
|
+
isLoading: a,
|
|
268
|
+
disabled: a,
|
|
269
269
|
primaryClassName: "dialog-form-primary",
|
|
270
270
|
alignEnd: c,
|
|
271
271
|
primaryName: t("_accessibility:buttons.submit"),
|
|
@@ -275,25 +275,25 @@ const Ct = (e) => e == null ? !1 : `${e}`.length > 0, nn = Ut(function(e, t) {
|
|
|
275
275
|
}
|
|
276
276
|
)
|
|
277
277
|
] }) });
|
|
278
|
-
},
|
|
278
|
+
}, ni = (e) => {
|
|
279
279
|
const { t } = V(), {
|
|
280
280
|
children: s,
|
|
281
|
-
handleSubmit:
|
|
282
|
-
handleClose:
|
|
283
|
-
isLoading:
|
|
284
|
-
...
|
|
281
|
+
handleSubmit: r,
|
|
282
|
+
handleClose: n,
|
|
283
|
+
isLoading: i = !1,
|
|
284
|
+
...a
|
|
285
285
|
} = e;
|
|
286
|
-
return /* @__PURE__ */
|
|
286
|
+
return /* @__PURE__ */ F(at, { ...a, handleClose: n, children: [
|
|
287
287
|
s,
|
|
288
288
|
/* @__PURE__ */ g(
|
|
289
289
|
ot,
|
|
290
290
|
{
|
|
291
291
|
primaryText: t("_accessibility:buttons.ok"),
|
|
292
292
|
cancelText: t("_accessibility:buttons.cancel"),
|
|
293
|
-
onPrimaryClick:
|
|
294
|
-
onCancel:
|
|
295
|
-
isLoading:
|
|
296
|
-
disabled:
|
|
293
|
+
onPrimaryClick: r,
|
|
294
|
+
onCancel: n,
|
|
295
|
+
isLoading: i,
|
|
296
|
+
disabled: i,
|
|
297
297
|
primaryType: "button",
|
|
298
298
|
containerClassName: "mt-5",
|
|
299
299
|
primaryName: t("_accessibility:buttons.ok"),
|
|
@@ -304,34 +304,34 @@ const Ct = (e) => e == null ? !1 : `${e}`.length > 0, nn = Ut(function(e, t) {
|
|
|
304
304
|
)
|
|
305
305
|
] });
|
|
306
306
|
};
|
|
307
|
-
function
|
|
308
|
-
const { message: t, className: s = "" } = e, { t:
|
|
309
|
-
return /* @__PURE__ */ g("p", { className: `import-error-message ${s}`, children: t ??
|
|
307
|
+
function Xs(e) {
|
|
308
|
+
const { message: t, className: s = "" } = e, { t: r } = V();
|
|
309
|
+
return /* @__PURE__ */ g("p", { className: `import-error-message ${s}`, children: t ?? r("_messages:errors.parseFile", {
|
|
310
310
|
defaultValue: "Failed to process file"
|
|
311
311
|
}) });
|
|
312
312
|
}
|
|
313
|
-
function
|
|
314
|
-
const { message: t, className: s = "" } = e, { t:
|
|
315
|
-
return /* @__PURE__ */
|
|
313
|
+
function Zs(e) {
|
|
314
|
+
const { message: t, className: s = "" } = e, { t: r } = V();
|
|
315
|
+
return /* @__PURE__ */ F("div", { className: `import-loading ${s}`, children: [
|
|
316
316
|
/* @__PURE__ */ g(xe, { loaderClass: "w-5 h-5", className: "!w-auto" }),
|
|
317
|
-
/* @__PURE__ */ g("span", { children: t ??
|
|
317
|
+
/* @__PURE__ */ g("span", { children: t ?? r("_messages:loading.processingFile", {
|
|
318
318
|
defaultValue: "Processing file..."
|
|
319
319
|
}) })
|
|
320
320
|
] });
|
|
321
321
|
}
|
|
322
|
-
function
|
|
323
|
-
const { items: t, max: s = 5, className:
|
|
322
|
+
function er(e) {
|
|
323
|
+
const { items: t, max: s = 5, className: r = "" } = e, { t: n } = V();
|
|
324
324
|
if (!t || t.length === 0) return null;
|
|
325
|
-
const
|
|
326
|
-
return /* @__PURE__ */
|
|
327
|
-
/* @__PURE__ */ g("p", { className: "import-preview-count", children:
|
|
325
|
+
const i = t.slice(0, s);
|
|
326
|
+
return /* @__PURE__ */ F("div", { className: `import-preview ${r}`, children: [
|
|
327
|
+
/* @__PURE__ */ g("p", { className: "import-preview-count", children: n("_pages:common.actions.import.previewCount", {
|
|
328
328
|
count: t.length,
|
|
329
329
|
defaultValue: `Preview: ${t.length} items`
|
|
330
330
|
}) }),
|
|
331
|
-
/* @__PURE__ */ g("pre", { className: "import-preview-content", children: JSON.stringify(
|
|
331
|
+
/* @__PURE__ */ g("pre", { className: "import-preview-content", children: JSON.stringify(i, null, 2) })
|
|
332
332
|
] });
|
|
333
333
|
}
|
|
334
|
-
const
|
|
334
|
+
const Qt = () => ({
|
|
335
335
|
file: null,
|
|
336
336
|
previewItems: null,
|
|
337
337
|
parseError: null,
|
|
@@ -339,7 +339,7 @@ const jt = () => ({
|
|
|
339
339
|
overrideExisting: !1,
|
|
340
340
|
inputKey: 0
|
|
341
341
|
});
|
|
342
|
-
function
|
|
342
|
+
function tr(e, t) {
|
|
343
343
|
switch (t.type) {
|
|
344
344
|
case "SET_FILE":
|
|
345
345
|
return { ...e, file: t.file, previewItems: null, parseError: null, processing: !1 };
|
|
@@ -352,28 +352,28 @@ function sr(e, t) {
|
|
|
352
352
|
case "SET_OVERRIDE":
|
|
353
353
|
return { ...e, overrideExisting: t.value };
|
|
354
354
|
case "RESET":
|
|
355
|
-
return { ...
|
|
355
|
+
return { ...Qt(), inputKey: e.inputKey + 1 };
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
|
-
const
|
|
358
|
+
const ai = (e) => {
|
|
359
359
|
const { t } = V(), {
|
|
360
360
|
children: s,
|
|
361
|
-
handleSubmit:
|
|
362
|
-
handleClose:
|
|
363
|
-
isLoading:
|
|
364
|
-
fileProcessor:
|
|
361
|
+
handleSubmit: r,
|
|
362
|
+
handleClose: n,
|
|
363
|
+
isLoading: i = !1,
|
|
364
|
+
fileProcessor: a,
|
|
365
365
|
onFileProcessed: c,
|
|
366
|
-
onOverrideChange:
|
|
367
|
-
open:
|
|
368
|
-
...
|
|
369
|
-
} = e, [
|
|
370
|
-
|
|
366
|
+
onOverrideChange: l,
|
|
367
|
+
open: h,
|
|
368
|
+
...y
|
|
369
|
+
} = e, [m, f] = Ut(tr, Qt()), { file: p, previewItems: _, parseError: C, processing: k, overrideExisting: B, inputKey: N } = m, $ = Ie(c), x = Ie(a);
|
|
370
|
+
fe(() => {
|
|
371
371
|
$.current = c;
|
|
372
|
-
}, [c]),
|
|
373
|
-
x.current =
|
|
374
|
-
}, [
|
|
375
|
-
|
|
376
|
-
}, [
|
|
372
|
+
}, [c]), fe(() => {
|
|
373
|
+
x.current = a;
|
|
374
|
+
}, [a]), fe(() => {
|
|
375
|
+
h || f({ type: "RESET" });
|
|
376
|
+
}, [h]);
|
|
377
377
|
const A = D(async (I, M) => {
|
|
378
378
|
var se;
|
|
379
379
|
if (x.current) {
|
|
@@ -388,9 +388,9 @@ const un = (e) => {
|
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
390
|
}, []);
|
|
391
|
-
return /* @__PURE__ */
|
|
391
|
+
return /* @__PURE__ */ F(at, { ...y, open: h, handleClose: n, children: [
|
|
392
392
|
/* @__PURE__ */ g(
|
|
393
|
-
|
|
393
|
+
As,
|
|
394
394
|
{
|
|
395
395
|
onClear: () => {
|
|
396
396
|
var I;
|
|
@@ -409,7 +409,7 @@ const un = (e) => {
|
|
|
409
409
|
},
|
|
410
410
|
N
|
|
411
411
|
),
|
|
412
|
-
/* @__PURE__ */
|
|
412
|
+
/* @__PURE__ */ F("label", { className: "import-override-label", children: [
|
|
413
413
|
/* @__PURE__ */ g(
|
|
414
414
|
"input",
|
|
415
415
|
{
|
|
@@ -417,7 +417,7 @@ const un = (e) => {
|
|
|
417
417
|
checked: B,
|
|
418
418
|
onChange: (I) => {
|
|
419
419
|
const M = I.target.checked;
|
|
420
|
-
f({ type: "SET_OVERRIDE", value: M }),
|
|
420
|
+
f({ type: "SET_OVERRIDE", value: M }), l == null || l(M), p && A(p, M);
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
),
|
|
@@ -425,9 +425,9 @@ const un = (e) => {
|
|
|
425
425
|
defaultValue: "Override existing items"
|
|
426
426
|
}) })
|
|
427
427
|
] }),
|
|
428
|
-
/* @__PURE__ */ g(
|
|
429
|
-
k && /* @__PURE__ */ g(
|
|
430
|
-
!!_ && _.length > 0 && /* @__PURE__ */ g(
|
|
428
|
+
/* @__PURE__ */ g(Xs, { message: C }),
|
|
429
|
+
k && /* @__PURE__ */ g(Zs, {}),
|
|
430
|
+
!!_ && _.length > 0 && /* @__PURE__ */ g(er, { items: _ }),
|
|
431
431
|
s,
|
|
432
432
|
/* @__PURE__ */ g(
|
|
433
433
|
ot,
|
|
@@ -435,10 +435,10 @@ const un = (e) => {
|
|
|
435
435
|
primaryText: t("_accessibility:buttons.ok"),
|
|
436
436
|
cancelText: t("_accessibility:buttons.cancel"),
|
|
437
437
|
onPrimaryClick: () => {
|
|
438
|
-
(!
|
|
438
|
+
(!a || !!_ && _.length > 0) && r();
|
|
439
439
|
},
|
|
440
|
-
onCancel:
|
|
441
|
-
isLoading:
|
|
440
|
+
onCancel: n,
|
|
441
|
+
isLoading: i,
|
|
442
442
|
primaryType: "button",
|
|
443
443
|
containerClassName: "import-dialog-actions",
|
|
444
444
|
primaryName: t("_accessibility:buttons.ok"),
|
|
@@ -450,122 +450,122 @@ const un = (e) => {
|
|
|
450
450
|
] });
|
|
451
451
|
};
|
|
452
452
|
var J = /* @__PURE__ */ ((e) => (e[e.success = 0] = "success", e[e.error = 1] = "error", e[e.warning = 2] = "warning", e[e.info = 3] = "info", e))(J || {}), te = /* @__PURE__ */ ((e) => (e.GET = "GET", e.POST = "POST", e.PUT = "PUT", e.PATCH = "PATCH", e.DELETE = "DELETE", e))(te || {});
|
|
453
|
-
async function Te(e, t = "GET", s,
|
|
454
|
-
const
|
|
453
|
+
async function Te(e, t = "GET", s, r) {
|
|
454
|
+
const n = {
|
|
455
455
|
...s ? { "Content-Type": "application/json" } : {},
|
|
456
|
-
...
|
|
456
|
+
...r
|
|
457
457
|
};
|
|
458
458
|
try {
|
|
459
|
-
const
|
|
459
|
+
const i = await fetch(e, {
|
|
460
460
|
method: t,
|
|
461
|
-
headers:
|
|
461
|
+
headers: n,
|
|
462
462
|
...s ? { body: JSON.stringify(s) } : {}
|
|
463
|
-
}),
|
|
463
|
+
}), a = await i.text();
|
|
464
464
|
let c = null;
|
|
465
465
|
try {
|
|
466
|
-
c =
|
|
466
|
+
c = a ? JSON.parse(a) : null;
|
|
467
467
|
} catch {
|
|
468
468
|
c = null;
|
|
469
469
|
}
|
|
470
|
-
if (!
|
|
471
|
-
const
|
|
470
|
+
if (!i.ok) {
|
|
471
|
+
const l = typeof c == "object" && c !== null ? c.message ?? c.error ?? a : a || i.statusText;
|
|
472
472
|
return {
|
|
473
473
|
data: null,
|
|
474
|
-
status:
|
|
474
|
+
status: i.status,
|
|
475
475
|
error: {
|
|
476
|
-
status:
|
|
477
|
-
message:
|
|
476
|
+
status: i.status,
|
|
477
|
+
message: l || "Unknown error occurred"
|
|
478
478
|
}
|
|
479
479
|
};
|
|
480
480
|
}
|
|
481
481
|
return {
|
|
482
|
-
data:
|
|
483
|
-
status:
|
|
482
|
+
data: i.status !== 204 && c !== null ? c : null,
|
|
483
|
+
status: i.status,
|
|
484
484
|
error: null
|
|
485
485
|
};
|
|
486
|
-
} catch (
|
|
486
|
+
} catch (i) {
|
|
487
487
|
return {
|
|
488
488
|
data: null,
|
|
489
489
|
status: 500,
|
|
490
490
|
error: {
|
|
491
491
|
status: 500,
|
|
492
|
-
message:
|
|
492
|
+
message: i instanceof Error ? i.message : "Unknown error occurred"
|
|
493
493
|
}
|
|
494
494
|
};
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function sr(e, t) {
|
|
498
498
|
if (t) {
|
|
499
|
-
const s = Object.entries(t).filter(([,
|
|
500
|
-
([
|
|
499
|
+
const s = Object.entries(t).filter(([, r]) => r != null).map(
|
|
500
|
+
([r, n]) => `${encodeURIComponent(r)}=${encodeURIComponent(String(n))}`
|
|
501
501
|
).join("&");
|
|
502
502
|
return s ? `${e}?${s}` : e;
|
|
503
503
|
}
|
|
504
504
|
return e;
|
|
505
505
|
}
|
|
506
|
-
const
|
|
507
|
-
const
|
|
506
|
+
const jt = (e, t, s) => {
|
|
507
|
+
const r = [];
|
|
508
508
|
if (t) {
|
|
509
|
-
const { sortingBy:
|
|
510
|
-
|
|
511
|
-
`sort=${String(
|
|
512
|
-
`order=${
|
|
513
|
-
`page=${
|
|
509
|
+
const { sortingBy: n, sortingOrder: i, currentPage: a, pageSize: c } = t;
|
|
510
|
+
r.push(
|
|
511
|
+
`sort=${String(n)}`,
|
|
512
|
+
`order=${i}`,
|
|
513
|
+
`page=${a}`,
|
|
514
514
|
`pageSize=${c}`
|
|
515
515
|
);
|
|
516
516
|
}
|
|
517
517
|
if (s) {
|
|
518
|
-
const
|
|
519
|
-
([,
|
|
520
|
-
).flatMap(([
|
|
521
|
-
if (Array.isArray(
|
|
522
|
-
return
|
|
523
|
-
if (typeof
|
|
518
|
+
const n = Object.entries(s).filter(
|
|
519
|
+
([, i]) => i != null && i !== ""
|
|
520
|
+
).flatMap(([i, a]) => {
|
|
521
|
+
if (Array.isArray(a))
|
|
522
|
+
return a.map((c) => `${i}==${encodeURIComponent((c == null ? void 0 : c.id) ?? c)}`);
|
|
523
|
+
if (typeof a == "object" && a !== null && "start" in a && "end" in a) {
|
|
524
524
|
const c = [];
|
|
525
|
-
return
|
|
525
|
+
return a.start != null && a.start !== "" && c.push(`${i}>=${encodeURIComponent(a.start)}`), a.end != null && a.end !== "" && c.push(`${i}<=${encodeURIComponent(a.end)}`), c;
|
|
526
526
|
}
|
|
527
|
-
return typeof
|
|
527
|
+
return typeof a == "object" && a !== null ? `${i}==${encodeURIComponent(a.id ?? "")}` : `${i}==${encodeURIComponent(a)}`;
|
|
528
528
|
});
|
|
529
|
-
|
|
529
|
+
n.length > 0 && r.push(`filters=${n.join(",")}`);
|
|
530
530
|
}
|
|
531
|
-
return
|
|
531
|
+
return r.length ? `${e}?${r.join("&")}` : e;
|
|
532
532
|
};
|
|
533
|
-
class
|
|
533
|
+
class Wt {
|
|
534
534
|
/**
|
|
535
535
|
* @param baseUrl the base url of the server
|
|
536
536
|
* @param userKey the local storage user key
|
|
537
537
|
* @param secured if the api client requires token
|
|
538
538
|
* @param tokenAcquirer custom token acquirer
|
|
539
539
|
*/
|
|
540
|
-
constructor(t, s = "user",
|
|
540
|
+
constructor(t, s = "user", r = !0, n) {
|
|
541
541
|
me(this, "baseUrl");
|
|
542
542
|
me(this, "userKey");
|
|
543
543
|
me(this, "secured");
|
|
544
544
|
me(this, "tokenAcquirer");
|
|
545
|
-
this.baseUrl = t, this.secured =
|
|
545
|
+
this.baseUrl = t, this.secured = r, this.userKey = s, this.tokenAcquirer = n ?? this.defaultTokenAcquirer;
|
|
546
546
|
}
|
|
547
547
|
defaultTokenAcquirer(t) {
|
|
548
548
|
if (t) return { credentials: "include" };
|
|
549
|
-
const s =
|
|
549
|
+
const s = Gt(this.userKey);
|
|
550
550
|
if (s && s.length)
|
|
551
551
|
return { Authorization: `Bearer ${s}` };
|
|
552
552
|
}
|
|
553
|
-
async doQuery(t, s = te.GET,
|
|
554
|
-
const
|
|
553
|
+
async doQuery(t, s = te.GET, r, n) {
|
|
554
|
+
const i = this.secured ? this.tokenAcquirer() : {}, { data: a, status: c, error: l } = await Te(
|
|
555
555
|
`${this.baseUrl}${t}`,
|
|
556
556
|
s,
|
|
557
|
-
|
|
557
|
+
r,
|
|
558
558
|
{
|
|
559
|
-
...
|
|
560
|
-
...
|
|
559
|
+
...i,
|
|
560
|
+
...n ?? {}
|
|
561
561
|
}
|
|
562
562
|
);
|
|
563
|
-
if (
|
|
564
|
-
throw
|
|
563
|
+
if (l || c < 200 || c >= 300)
|
|
564
|
+
throw l ?? {
|
|
565
565
|
status: c,
|
|
566
566
|
message: String(c)
|
|
567
567
|
};
|
|
568
|
-
return
|
|
568
|
+
return a;
|
|
569
569
|
}
|
|
570
570
|
/**
|
|
571
571
|
* @description Get all objects
|
|
@@ -573,15 +573,15 @@ class Gt {
|
|
|
573
573
|
* @param query - query parameters
|
|
574
574
|
* @returns Result list
|
|
575
575
|
*/
|
|
576
|
-
async get(t, s,
|
|
577
|
-
const
|
|
578
|
-
`${this.baseUrl}${
|
|
576
|
+
async get(t, s, r) {
|
|
577
|
+
const n = jt(t, s, r), i = this.secured ? this.tokenAcquirer() : void 0, { data: a, error: c } = await Te(
|
|
578
|
+
`${this.baseUrl}${n}`,
|
|
579
579
|
te.GET,
|
|
580
580
|
null,
|
|
581
|
-
|
|
581
|
+
i
|
|
582
582
|
);
|
|
583
583
|
if (c) throw c;
|
|
584
|
-
return
|
|
584
|
+
return a;
|
|
585
585
|
}
|
|
586
586
|
/**
|
|
587
587
|
* @description Get entity by id
|
|
@@ -590,18 +590,18 @@ class Gt {
|
|
|
590
590
|
* @returns updated entity
|
|
591
591
|
*/
|
|
592
592
|
async patch(t, s) {
|
|
593
|
-
const
|
|
593
|
+
const r = this.secured ? this.tokenAcquirer() : void 0, { error: n, data: i, status: a } = await Te(
|
|
594
594
|
`${this.baseUrl}${t}`,
|
|
595
595
|
te.PATCH,
|
|
596
596
|
s,
|
|
597
|
-
|
|
597
|
+
r
|
|
598
598
|
);
|
|
599
|
-
if (
|
|
600
|
-
throw
|
|
601
|
-
status:
|
|
599
|
+
if (n || !i)
|
|
600
|
+
throw n ?? {
|
|
601
|
+
status: a,
|
|
602
602
|
message: "Unknown error"
|
|
603
603
|
};
|
|
604
|
-
return
|
|
604
|
+
return i;
|
|
605
605
|
}
|
|
606
606
|
/**
|
|
607
607
|
* @param endpoint - backend endpoint
|
|
@@ -609,18 +609,18 @@ class Gt {
|
|
|
609
609
|
* @returns delete result
|
|
610
610
|
*/
|
|
611
611
|
async delete(t, s) {
|
|
612
|
-
const
|
|
612
|
+
const r = this.secured ? this.tokenAcquirer() : void 0, { error: n, data: i, status: a } = await Te(
|
|
613
613
|
`${this.baseUrl}${t}`,
|
|
614
614
|
te.DELETE,
|
|
615
615
|
s,
|
|
616
|
-
|
|
616
|
+
r
|
|
617
617
|
);
|
|
618
|
-
if (
|
|
619
|
-
throw
|
|
620
|
-
status:
|
|
618
|
+
if (n || !i)
|
|
619
|
+
throw n ?? {
|
|
620
|
+
status: a,
|
|
621
621
|
message: "Unknown error"
|
|
622
622
|
};
|
|
623
|
-
return
|
|
623
|
+
return i;
|
|
624
624
|
}
|
|
625
625
|
/**
|
|
626
626
|
*
|
|
@@ -629,31 +629,31 @@ class Gt {
|
|
|
629
629
|
* @returns inserted item
|
|
630
630
|
*/
|
|
631
631
|
async post(t, s) {
|
|
632
|
-
const
|
|
632
|
+
const r = this.secured ? this.tokenAcquirer() : void 0, { error: n, data: i, status: a } = await Te(
|
|
633
633
|
`${this.baseUrl}${t}`,
|
|
634
634
|
te.POST,
|
|
635
635
|
s,
|
|
636
|
-
|
|
636
|
+
r
|
|
637
637
|
);
|
|
638
|
-
if (
|
|
639
|
-
throw
|
|
640
|
-
status:
|
|
638
|
+
if (n || !i)
|
|
639
|
+
throw n ?? {
|
|
640
|
+
status: a,
|
|
641
641
|
message: "Unknown error"
|
|
642
642
|
};
|
|
643
|
-
return
|
|
643
|
+
return i;
|
|
644
644
|
}
|
|
645
645
|
}
|
|
646
|
-
class
|
|
646
|
+
class rr {
|
|
647
647
|
constructor(t, s = "user") {
|
|
648
648
|
me(this, "api");
|
|
649
|
-
this.api = new
|
|
649
|
+
this.api = new Wt(t, s, !1);
|
|
650
650
|
}
|
|
651
651
|
async login(t) {
|
|
652
|
-
const s = "auth/sign-in",
|
|
652
|
+
const s = "auth/sign-in", r = t;
|
|
653
653
|
return await this.api.doQuery(
|
|
654
654
|
s,
|
|
655
655
|
te.POST,
|
|
656
|
-
|
|
656
|
+
r
|
|
657
657
|
);
|
|
658
658
|
}
|
|
659
659
|
async logout() {
|
|
@@ -672,10 +672,10 @@ class nr {
|
|
|
672
672
|
});
|
|
673
673
|
}
|
|
674
674
|
}
|
|
675
|
-
class
|
|
675
|
+
class oi {
|
|
676
676
|
constructor(t, s) {
|
|
677
677
|
me(this, "auth");
|
|
678
|
-
this.auth = new
|
|
678
|
+
this.auth = new rr(t, s);
|
|
679
679
|
}
|
|
680
680
|
/**
|
|
681
681
|
* @returns auth
|
|
@@ -684,17 +684,17 @@ class dn {
|
|
|
684
684
|
return this.auth;
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
|
-
class
|
|
687
|
+
class ci {
|
|
688
688
|
/**
|
|
689
689
|
*
|
|
690
690
|
* @param table
|
|
691
691
|
* @param secured to see if the api client requires jwt protection
|
|
692
692
|
*/
|
|
693
|
-
constructor(t, s,
|
|
693
|
+
constructor(t, s, r = "user", n = !0) {
|
|
694
694
|
me(this, "table");
|
|
695
695
|
me(this, "secured");
|
|
696
696
|
me(this, "api");
|
|
697
|
-
this.table = t, this.secured =
|
|
697
|
+
this.table = t, this.secured = n, this.api = new Wt(s, r, n);
|
|
698
698
|
}
|
|
699
699
|
/**
|
|
700
700
|
*
|
|
@@ -742,7 +742,7 @@ class fn {
|
|
|
742
742
|
* @returns - List of elements
|
|
743
743
|
*/
|
|
744
744
|
async export(t) {
|
|
745
|
-
const s =
|
|
745
|
+
const s = jt(
|
|
746
746
|
`${this.table}/export`,
|
|
747
747
|
void 0,
|
|
748
748
|
t
|
|
@@ -768,7 +768,7 @@ class fn {
|
|
|
768
768
|
*/
|
|
769
769
|
async commonGet(t) {
|
|
770
770
|
return await this.api.doQuery(
|
|
771
|
-
|
|
771
|
+
sr(`${this.table}/common`, t),
|
|
772
772
|
te.GET
|
|
773
773
|
);
|
|
774
774
|
}
|
|
@@ -787,13 +787,13 @@ class fn {
|
|
|
787
787
|
return await this.api.patch(`${this.table}/restore`, t);
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
|
-
function
|
|
790
|
+
function li(e) {
|
|
791
791
|
return Object.keys(e).filter((t) => isNaN(Number(t))).map((t) => ({
|
|
792
792
|
key: t,
|
|
793
793
|
value: e[t]
|
|
794
794
|
}));
|
|
795
795
|
}
|
|
796
|
-
const
|
|
796
|
+
const Gt = (e, t = "") => {
|
|
797
797
|
const s = localStorage.getItem(e) ?? void 0;
|
|
798
798
|
if (s && t.length)
|
|
799
799
|
switch (t) {
|
|
@@ -811,7 +811,7 @@ const Jt = (e, t = "") => {
|
|
|
811
811
|
e,
|
|
812
812
|
typeof t == "object" ? JSON.stringify(t) : t
|
|
813
813
|
), kt = (e) => localStorage.removeItem(e);
|
|
814
|
-
function
|
|
814
|
+
function ui(e) {
|
|
815
815
|
const t = e ? new Date(e) : /* @__PURE__ */ new Date(), s = {
|
|
816
816
|
weekday: "long",
|
|
817
817
|
// martes
|
|
@@ -833,15 +833,15 @@ function Nt(e) {
|
|
|
833
833
|
s
|
|
834
834
|
);
|
|
835
835
|
}
|
|
836
|
-
function
|
|
837
|
-
const t = e ? new Date(e) : /* @__PURE__ */ new Date(), s = String(t.getDate()).padStart(2, "0"),
|
|
838
|
-
return `${s}/${
|
|
836
|
+
function di(e) {
|
|
837
|
+
const t = e ? new Date(e) : /* @__PURE__ */ new Date(), s = String(t.getDate()).padStart(2, "0"), r = String(t.getMonth() + 1).padStart(2, "0"), n = String(t.getFullYear()).slice(-2), i = String(t.getHours()).padStart(2, "0"), a = String(t.getMinutes()).padStart(2, "0");
|
|
838
|
+
return `${s}/${r}/${n} ${i}:${a}`;
|
|
839
839
|
}
|
|
840
|
-
function
|
|
841
|
-
const t = e ? new Date(e) : /* @__PURE__ */ new Date(), s = t.getFullYear(),
|
|
842
|
-
return `${s}-${
|
|
840
|
+
function fi(e) {
|
|
841
|
+
const t = e ? new Date(e) : /* @__PURE__ */ new Date(), s = t.getFullYear(), r = String(t.getMonth() + 1).padStart(2, "0"), n = String(t.getDate()).padStart(2, "0"), i = String(t.getHours()).padStart(2, "0"), a = String(t.getMinutes()).padStart(2, "0");
|
|
842
|
+
return `${s}-${r}-${n}T${i}:${a}`;
|
|
843
843
|
}
|
|
844
|
-
const
|
|
844
|
+
const ir = () => {
|
|
845
845
|
var s;
|
|
846
846
|
const e = navigator, t = ((s = e == null ? void 0 : e.userAgentData) == null ? void 0 : s.platform) || (e == null ? void 0 : e.platform) || "";
|
|
847
847
|
return /Mac|iPhone|iPod|iPad/i.test(t);
|
|
@@ -858,52 +858,52 @@ function Je(e) {
|
|
|
858
858
|
const t = e;
|
|
859
859
|
return typeof (t == null ? void 0 : t.status) == "number" && typeof (t == null ? void 0 : t.message) == "string";
|
|
860
860
|
}
|
|
861
|
-
function
|
|
862
|
-
return e != null && e.errors ? e.errors.map(([s,
|
|
861
|
+
function mi(e, t) {
|
|
862
|
+
return e != null && e.errors ? e.errors.map(([s, r]) => t(s, r)) : [];
|
|
863
863
|
}
|
|
864
|
-
const
|
|
865
|
-
function
|
|
866
|
-
const { children: t } = e, s = Ie(0), [
|
|
867
|
-
(
|
|
864
|
+
const Jt = Pe({});
|
|
865
|
+
function hi(e) {
|
|
866
|
+
const { children: t } = e, s = Ie(0), [r, n] = Ut(
|
|
867
|
+
(m, f) => {
|
|
868
868
|
const { type: p, items: _, id: C } = f;
|
|
869
869
|
switch (p) {
|
|
870
870
|
case "set":
|
|
871
871
|
return _ ?? [];
|
|
872
872
|
case "remove":
|
|
873
|
-
return C !== void 0 ?
|
|
873
|
+
return C !== void 0 ? m.filter((k) => k.id !== C) : [];
|
|
874
874
|
}
|
|
875
|
-
return
|
|
875
|
+
return m;
|
|
876
876
|
},
|
|
877
877
|
[],
|
|
878
878
|
() => []
|
|
879
|
-
),
|
|
879
|
+
), i = (m) => m.map((f) => ({ ...f, id: s.current++ })), a = (m) => n({
|
|
880
880
|
type: "set",
|
|
881
|
-
items:
|
|
882
|
-
}), c = (
|
|
881
|
+
items: i([{ ...m, type: J.error }])
|
|
882
|
+
}), c = (m) => n({ type: "set", items: i([{ ...m }]) }), l = (m) => n({ type: "set", items: i(m) }), h = (m) => n({
|
|
883
883
|
type: "set",
|
|
884
|
-
items:
|
|
885
|
-
}),
|
|
884
|
+
items: i([{ ...m, type: J.success }])
|
|
885
|
+
}), y = (m) => n({ type: "remove", id: m });
|
|
886
886
|
return /* @__PURE__ */ g(
|
|
887
|
-
|
|
887
|
+
Jt.Provider,
|
|
888
888
|
{
|
|
889
889
|
value: {
|
|
890
|
-
notification:
|
|
891
|
-
removeNotification:
|
|
892
|
-
showErrorNotification:
|
|
890
|
+
notification: r,
|
|
891
|
+
removeNotification: y,
|
|
892
|
+
showErrorNotification: a,
|
|
893
893
|
showNotification: c,
|
|
894
|
-
showSuccessNotification:
|
|
895
|
-
showStackNotifications:
|
|
894
|
+
showSuccessNotification: h,
|
|
895
|
+
showStackNotifications: l
|
|
896
896
|
},
|
|
897
897
|
children: t
|
|
898
898
|
}
|
|
899
899
|
);
|
|
900
900
|
}
|
|
901
901
|
const ke = () => {
|
|
902
|
-
const e = Oe(
|
|
902
|
+
const e = Oe(Jt);
|
|
903
903
|
if (e === void 0)
|
|
904
904
|
throw new Error("NotificationContext must be used within a Provider");
|
|
905
905
|
return e;
|
|
906
|
-
}, pe = new
|
|
906
|
+
}, pe = new Gs({
|
|
907
907
|
defaultOptions: {
|
|
908
908
|
queries: {
|
|
909
909
|
refetchInterval: !1,
|
|
@@ -915,121 +915,121 @@ const ke = () => {
|
|
|
915
915
|
// default: true
|
|
916
916
|
}
|
|
917
917
|
}
|
|
918
|
-
}),
|
|
918
|
+
}), zt = Pe(
|
|
919
919
|
void 0
|
|
920
|
-
),
|
|
920
|
+
), yi = (e) => {
|
|
921
921
|
const { children: t, manager: s } = e;
|
|
922
|
-
return /* @__PURE__ */ g(
|
|
923
|
-
},
|
|
924
|
-
const e = Oe(
|
|
922
|
+
return /* @__PURE__ */ g(zt.Provider, { value: { client: s }, children: /* @__PURE__ */ g(Js, { client: pe, children: t }) });
|
|
923
|
+
}, nr = () => {
|
|
924
|
+
const e = Oe(zt);
|
|
925
925
|
if (!e)
|
|
926
926
|
throw new Error("managerContext must be used within a Provider");
|
|
927
927
|
return e.client;
|
|
928
|
-
},
|
|
928
|
+
}, Yt = Pe(
|
|
929
929
|
void 0
|
|
930
|
-
),
|
|
931
|
-
const { children: t, guestMode: s = "guest_mode", user:
|
|
930
|
+
), gi = (e) => {
|
|
931
|
+
const { children: t, guestMode: s = "guest_mode", user: r = "user" } = e, n = nr(), [i, a] = Z({}), c = D(() => !!Gt(s, "boolean") && i.token === void 0, [i.token, s]), l = D((p) => {
|
|
932
932
|
Et(s, p);
|
|
933
|
-
}, [s]),
|
|
934
|
-
p && (
|
|
935
|
-
}, [s,
|
|
933
|
+
}, [s]), h = D((p) => {
|
|
934
|
+
p && (a(p), kt(s), Et(r, p.token));
|
|
935
|
+
}, [s, r]), y = D(async () => {
|
|
936
936
|
try {
|
|
937
|
-
await
|
|
937
|
+
await n.Auth.logout();
|
|
938
938
|
} catch (p) {
|
|
939
939
|
console.error(p);
|
|
940
940
|
}
|
|
941
|
-
|
|
942
|
-
}, [
|
|
941
|
+
a({}), kt(r);
|
|
942
|
+
}, [n.Auth, r]), m = D(async () => {
|
|
943
943
|
try {
|
|
944
|
-
const p = await
|
|
945
|
-
|
|
944
|
+
const p = await n.Auth.getSession();
|
|
945
|
+
h(p);
|
|
946
946
|
} catch (p) {
|
|
947
|
-
console.error(p),
|
|
947
|
+
console.error(p), y();
|
|
948
948
|
}
|
|
949
|
-
}, [
|
|
950
|
-
account:
|
|
951
|
-
logUser:
|
|
952
|
-
logoutUser:
|
|
953
|
-
logUserFromLocal:
|
|
949
|
+
}, [h, y, n.Auth]), f = {
|
|
950
|
+
account: i,
|
|
951
|
+
logUser: h,
|
|
952
|
+
logoutUser: y,
|
|
953
|
+
logUserFromLocal: m,
|
|
954
954
|
isInGuestMode: c,
|
|
955
|
-
setGuestMode:
|
|
955
|
+
setGuestMode: l
|
|
956
956
|
};
|
|
957
|
-
return /* @__PURE__ */ g(
|
|
958
|
-
},
|
|
959
|
-
const e = Oe(
|
|
957
|
+
return /* @__PURE__ */ g(Yt.Provider, { value: f, children: t });
|
|
958
|
+
}, Xt = () => {
|
|
959
|
+
const e = Oe(Yt);
|
|
960
960
|
if (!e)
|
|
961
961
|
throw new Error("authContext must be used within a Provider");
|
|
962
962
|
return e;
|
|
963
|
-
},
|
|
964
|
-
const { children: t, location: s, navigate:
|
|
963
|
+
}, Zt = Pe({}), pi = (e) => {
|
|
964
|
+
const { children: t, location: s, navigate: r, linkComponent: n, searchComponent: i } = e;
|
|
965
965
|
return /* @__PURE__ */ g(
|
|
966
|
-
|
|
966
|
+
Zt.Provider,
|
|
967
967
|
{
|
|
968
|
-
value: { location: s, navigate:
|
|
968
|
+
value: { location: s, navigate: r, linkComponent: n, searchComponent: i },
|
|
969
969
|
children: t
|
|
970
970
|
}
|
|
971
971
|
);
|
|
972
972
|
}, Re = () => {
|
|
973
|
-
const e = Oe(
|
|
973
|
+
const e = Oe(Zt);
|
|
974
974
|
if (e === void 0 || Object.keys(e).length === 0)
|
|
975
975
|
throw new Error(
|
|
976
976
|
"Config provider has not been set. This step is required and cannot be skipped."
|
|
977
977
|
);
|
|
978
978
|
return e;
|
|
979
|
-
},
|
|
980
|
-
const { children: t } = e, [s,
|
|
981
|
-
(
|
|
982
|
-
...
|
|
983
|
-
[
|
|
979
|
+
}, es = Pe({}), bi = (e) => {
|
|
980
|
+
const { children: t } = e, [s, r] = Z({}), n = D(
|
|
981
|
+
(l, h) => r((y) => ({
|
|
982
|
+
...y,
|
|
983
|
+
[l]: [...y[l] ?? [], h]
|
|
984
984
|
})),
|
|
985
985
|
[]
|
|
986
|
-
),
|
|
987
|
-
(
|
|
988
|
-
...
|
|
989
|
-
[
|
|
986
|
+
), i = D(
|
|
987
|
+
(l, h) => r((y) => ({
|
|
988
|
+
...y,
|
|
989
|
+
[l]: (y[l] ?? []).filter((m, f) => f !== h)
|
|
990
990
|
})),
|
|
991
991
|
[]
|
|
992
|
-
),
|
|
993
|
-
|
|
994
|
-
...
|
|
995
|
-
[
|
|
992
|
+
), a = D((l) => {
|
|
993
|
+
r(l ? (h) => ({
|
|
994
|
+
...h,
|
|
995
|
+
[l]: []
|
|
996
996
|
}) : {});
|
|
997
997
|
}, []), c = Ae(
|
|
998
998
|
() => ({
|
|
999
999
|
dynamicItems: s,
|
|
1000
|
-
addChildItem:
|
|
1001
|
-
removeChildItem:
|
|
1002
|
-
clearDynamicItems:
|
|
1000
|
+
addChildItem: n,
|
|
1001
|
+
removeChildItem: i,
|
|
1002
|
+
clearDynamicItems: a
|
|
1003
1003
|
}),
|
|
1004
|
-
[s,
|
|
1004
|
+
[s, a, i, n]
|
|
1005
1005
|
);
|
|
1006
|
-
return /* @__PURE__ */ g(
|
|
1007
|
-
},
|
|
1008
|
-
|
|
1006
|
+
return /* @__PURE__ */ g(es.Provider, { value: c, children: t });
|
|
1007
|
+
}, ar = () => Oe(
|
|
1008
|
+
es
|
|
1009
1009
|
);
|
|
1010
|
-
function
|
|
1011
|
-
const { t } = V(), { open: s, onClose:
|
|
1012
|
-
const B = k.auth, N = !!(
|
|
1010
|
+
function vi(e) {
|
|
1011
|
+
const { t } = V(), { open: s, onClose: r, menuMap: n, logo: i } = e, { account: a } = Xt(), { dynamicItems: c } = ar(), { linkComponent: l, location: h } = Re(), y = l, m = Ae(() => n.filter((k) => {
|
|
1012
|
+
const B = k.auth, N = !!(a != null && a.email);
|
|
1013
1013
|
return B == null || B && N || !B && !N;
|
|
1014
|
-
}), [
|
|
1014
|
+
}), [a == null ? void 0 : a.email, n]), f = D(
|
|
1015
1015
|
(k) => {
|
|
1016
|
-
k.key === "Escape" && s &&
|
|
1016
|
+
k.key === "Escape" && s && r();
|
|
1017
1017
|
},
|
|
1018
|
-
[
|
|
1018
|
+
[r, s]
|
|
1019
1019
|
);
|
|
1020
|
-
|
|
1020
|
+
fe(() => (document.addEventListener("keydown", f), () => {
|
|
1021
1021
|
document.removeEventListener("keydown", f);
|
|
1022
1022
|
}), [f]);
|
|
1023
1023
|
const p = D(
|
|
1024
|
-
(k, B) => B ? k === `${
|
|
1025
|
-
[
|
|
1024
|
+
(k, B) => B ? k === `${h.pathname}${h.search}` : k === h.pathname,
|
|
1025
|
+
[h.pathname, h.search]
|
|
1026
1026
|
), _ = D(
|
|
1027
1027
|
(k) => /* @__PURE__ */ g(
|
|
1028
1028
|
"li",
|
|
1029
1029
|
{
|
|
1030
1030
|
className: `drawer-list-item-child ${p(k.path, !0) ? "active" : ""} animated`,
|
|
1031
1031
|
children: k.path ? /* @__PURE__ */ g(
|
|
1032
|
-
|
|
1032
|
+
y,
|
|
1033
1033
|
{
|
|
1034
1034
|
tabIndex: s ? 0 : -1,
|
|
1035
1035
|
to: k.path ?? "/",
|
|
@@ -1043,15 +1043,15 @@ function _n(e) {
|
|
|
1043
1043
|
},
|
|
1044
1044
|
k.id
|
|
1045
1045
|
),
|
|
1046
|
-
[
|
|
1047
|
-
), C = Ae(() =>
|
|
1046
|
+
[y, s, t, p]
|
|
1047
|
+
), C = Ae(() => m.map((k, B) => {
|
|
1048
1048
|
const N = k.page ?? String(B), $ = `drawer-list-item ${p(k.path) ? "active" : ""} animated`;
|
|
1049
1049
|
if (k.type === "divider")
|
|
1050
1050
|
return /* @__PURE__ */ g("li", { className: $, children: /* @__PURE__ */ g("hr", { className: "drawer-divider" }) }, N);
|
|
1051
1051
|
const x = k.children ?? (k.page && c ? c[k.page] : null);
|
|
1052
|
-
return /* @__PURE__ */
|
|
1053
|
-
/* @__PURE__ */
|
|
1054
|
-
|
|
1052
|
+
return /* @__PURE__ */ F("li", { className: $, children: [
|
|
1053
|
+
/* @__PURE__ */ F(
|
|
1054
|
+
y,
|
|
1055
1055
|
{
|
|
1056
1056
|
tabIndex: s ? 0 : -1,
|
|
1057
1057
|
to: k.path ?? "/",
|
|
@@ -1067,17 +1067,17 @@ function _n(e) {
|
|
|
1067
1067
|
),
|
|
1068
1068
|
x && /* @__PURE__ */ g("ul", { className: "drawer-children-list", children: x.map(_) })
|
|
1069
1069
|
] }, N);
|
|
1070
|
-
}), [
|
|
1070
|
+
}), [y, c, p, s, m, _, t]);
|
|
1071
1071
|
return /* @__PURE__ */ g(
|
|
1072
1072
|
"div",
|
|
1073
1073
|
{
|
|
1074
1074
|
"aria-label": t("_accessibility:ariaLabels.closeMenu"),
|
|
1075
1075
|
"aria-disabled": !s,
|
|
1076
1076
|
className: `${s ? "opened" : "closed"} drawer-backdrop`,
|
|
1077
|
-
onClick: () =>
|
|
1078
|
-
children: /* @__PURE__ */
|
|
1079
|
-
/* @__PURE__ */
|
|
1080
|
-
|
|
1077
|
+
onClick: () => r(),
|
|
1078
|
+
children: /* @__PURE__ */ F("aside", { className: `${s ? "opened" : "closed"} drawer animated`, children: [
|
|
1079
|
+
/* @__PURE__ */ F("div", { className: "drawer-header-container", children: [
|
|
1080
|
+
i,
|
|
1081
1081
|
/* @__PURE__ */ g("h2", { className: "drawer-header poppins", children: t("_pages:home.appName") })
|
|
1082
1082
|
] }),
|
|
1083
1083
|
/* @__PURE__ */ g("ul", { className: "drawer-menu-list", children: C })
|
|
@@ -1085,20 +1085,20 @@ function _n(e) {
|
|
|
1085
1085
|
}
|
|
1086
1086
|
);
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1089
|
-
const { error: t, resetErrorBoundary: s } = e, { t:
|
|
1090
|
-
return /* @__PURE__ */
|
|
1091
|
-
/* @__PURE__ */ g(ce, { icon:
|
|
1092
|
-
/* @__PURE__ */ g("p", { className: "error-message", children: (t == null ? void 0 : t.message) ??
|
|
1093
|
-
s && /* @__PURE__ */ g("button", { className: "error-retry", onClick: s, children:
|
|
1088
|
+
function wi(e) {
|
|
1089
|
+
const { error: t, resetErrorBoundary: s } = e, { t: r } = V();
|
|
1090
|
+
return /* @__PURE__ */ F("div", { className: "error-container", children: [
|
|
1091
|
+
/* @__PURE__ */ g(ce, { icon: Ys, className: "error-icon" }),
|
|
1092
|
+
/* @__PURE__ */ g("p", { className: "error-message", children: (t == null ? void 0 : t.message) ?? r("_accessibility:errors.unknownError") }),
|
|
1093
|
+
s && /* @__PURE__ */ g("button", { className: "error-retry", onClick: s, children: r("_accessibility:actions.retry", { defaultValue: "Retry" }) })
|
|
1094
1094
|
] });
|
|
1095
1095
|
}
|
|
1096
|
-
function
|
|
1096
|
+
function _i() {
|
|
1097
1097
|
const { t: e, language: t } = V();
|
|
1098
1098
|
return { timeAge: D(
|
|
1099
|
-
(
|
|
1100
|
-
const
|
|
1101
|
-
return
|
|
1099
|
+
(r) => {
|
|
1100
|
+
const i = /* @__PURE__ */ new Date() - r, a = Math.floor(i / (1e3 * 60)), c = Math.floor(a / 60), l = t === "es", h = e("_accessibility:labels.ago"), y = e("_accessibility:labels.minute"), m = e("_accessibility:labels.minutes"), f = e("_accessibility:labels.hour"), p = e("_accessibility:labels.hours"), _ = e("_accessibility:labels.yesterday"), C = e("_accessibility:labels.justNow");
|
|
1101
|
+
return i < 1e3 * 60 ? C : a < 60 ? `${l ? h : ""} ${a} ${a === 1 ? y : m} ${l ? "" : h}` : c < 24 ? `${l ? h : ""} ${c} ${c === 1 ? f : p} ${l ? "" : h}` : c < 48 ? _ : r.toLocaleDateString(navigator.language || "es-ES", {
|
|
1102
1102
|
day: "2-digit",
|
|
1103
1103
|
month: "2-digit",
|
|
1104
1104
|
year: "numeric"
|
|
@@ -1107,71 +1107,71 @@ function Cn() {
|
|
|
1107
1107
|
[e, t]
|
|
1108
1108
|
) };
|
|
1109
1109
|
}
|
|
1110
|
-
const
|
|
1111
|
-
const { showSuccessNotification: t } = ke(), { mutationFn: s, onError:
|
|
1112
|
-
|
|
1110
|
+
const ts = (e) => {
|
|
1111
|
+
const { showSuccessNotification: t } = ke(), { mutationFn: s, onError: r, onSuccess: n, onSuccessMessage: i } = e, [a, c] = Z([]), { open: l, handleClose: h, handleOpen: y } = us(), m = () => {
|
|
1112
|
+
h(), c([]);
|
|
1113
1113
|
}, f = async (_) => {
|
|
1114
|
-
c(_),
|
|
1114
|
+
c(_), y();
|
|
1115
1115
|
}, p = Me({
|
|
1116
1116
|
mutationFn: () => s(
|
|
1117
|
-
Array.isArray(
|
|
1117
|
+
Array.isArray(a) ? a : [a]
|
|
1118
1118
|
),
|
|
1119
1119
|
onError: (_) => {
|
|
1120
|
-
console.error(_),
|
|
1120
|
+
console.error(_), r && r(_), m();
|
|
1121
1121
|
},
|
|
1122
1122
|
onSuccess: async (_) => {
|
|
1123
|
-
|
|
1124
|
-
message:
|
|
1125
|
-
}),
|
|
1123
|
+
n && n(_), t({
|
|
1124
|
+
message: i
|
|
1125
|
+
}), m();
|
|
1126
1126
|
}
|
|
1127
1127
|
});
|
|
1128
|
-
return { open:
|
|
1128
|
+
return { open: l, onClick: f, close: m, dialogFn: p, isLoading: p.isPending };
|
|
1129
1129
|
};
|
|
1130
|
-
var Ue = (e) => e.type === "checkbox", Ee = (e) => e instanceof Date,
|
|
1131
|
-
const
|
|
1132
|
-
var
|
|
1130
|
+
var Ue = (e) => e.type === "checkbox", Ee = (e) => e instanceof Date, X = (e) => e == null;
|
|
1131
|
+
const ss = (e) => typeof e == "object";
|
|
1132
|
+
var K = (e) => !X(e) && !Array.isArray(e) && ss(e) && !Ee(e), or = (e) => K(e) && e.target ? Ue(e.target) ? e.target.checked : e.target.value : e, cr = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, lr = (e, t) => e.has(cr(t)), ur = (e) => {
|
|
1133
1133
|
const t = e.constructor && e.constructor.prototype;
|
|
1134
|
-
return
|
|
1134
|
+
return K(t) && t.hasOwnProperty("isPrototypeOf");
|
|
1135
1135
|
}, ct = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
|
|
1136
1136
|
function G(e) {
|
|
1137
1137
|
let t;
|
|
1138
|
-
const s = Array.isArray(e),
|
|
1138
|
+
const s = Array.isArray(e), r = typeof FileList < "u" ? e instanceof FileList : !1;
|
|
1139
1139
|
if (e instanceof Date)
|
|
1140
1140
|
t = new Date(e);
|
|
1141
|
-
else if (!(ct && (e instanceof Blob ||
|
|
1142
|
-
if (t = s ? [] : {}, !s && !
|
|
1141
|
+
else if (!(ct && (e instanceof Blob || r)) && (s || K(e)))
|
|
1142
|
+
if (t = s ? [] : {}, !s && !ur(e))
|
|
1143
1143
|
t = e;
|
|
1144
1144
|
else
|
|
1145
|
-
for (const
|
|
1146
|
-
e.hasOwnProperty(
|
|
1145
|
+
for (const n in e)
|
|
1146
|
+
e.hasOwnProperty(n) && (t[n] = G(e[n]));
|
|
1147
1147
|
else
|
|
1148
1148
|
return e;
|
|
1149
1149
|
return t;
|
|
1150
1150
|
}
|
|
1151
1151
|
var ze = (e) => /^\w*$/.test(e), j = (e) => e === void 0, lt = (e) => Array.isArray(e) ? e.filter(Boolean) : [], ut = (e) => lt(e.replace(/["|']|\]/g, "").split(/\.|\[/)), S = (e, t, s) => {
|
|
1152
|
-
if (!t || !
|
|
1152
|
+
if (!t || !K(e))
|
|
1153
1153
|
return s;
|
|
1154
|
-
const
|
|
1155
|
-
return j(
|
|
1154
|
+
const r = (ze(t) ? [t] : ut(t)).reduce((n, i) => X(n) ? n : n[i], e);
|
|
1155
|
+
return j(r) || r === e ? j(e[t]) ? s : e[t] : r;
|
|
1156
1156
|
}, he = (e) => typeof e == "boolean", q = (e, t, s) => {
|
|
1157
|
-
let
|
|
1158
|
-
const
|
|
1159
|
-
for (; ++
|
|
1160
|
-
const c =
|
|
1161
|
-
let
|
|
1162
|
-
if (
|
|
1163
|
-
const
|
|
1164
|
-
|
|
1157
|
+
let r = -1;
|
|
1158
|
+
const n = ze(t) ? [t] : ut(t), i = n.length, a = i - 1;
|
|
1159
|
+
for (; ++r < i; ) {
|
|
1160
|
+
const c = n[r];
|
|
1161
|
+
let l = s;
|
|
1162
|
+
if (r !== a) {
|
|
1163
|
+
const h = e[c];
|
|
1164
|
+
l = K(h) || Array.isArray(h) ? h : isNaN(+n[r + 1]) ? {} : [];
|
|
1165
1165
|
}
|
|
1166
1166
|
if (c === "__proto__" || c === "constructor" || c === "prototype")
|
|
1167
1167
|
return;
|
|
1168
|
-
e[c] =
|
|
1168
|
+
e[c] = l, e = e[c];
|
|
1169
1169
|
}
|
|
1170
1170
|
};
|
|
1171
|
-
const
|
|
1171
|
+
const Nt = {
|
|
1172
1172
|
BLUR: "blur",
|
|
1173
1173
|
FOCUS_OUT: "focusout"
|
|
1174
|
-
},
|
|
1174
|
+
}, ue = {
|
|
1175
1175
|
onBlur: "onBlur",
|
|
1176
1176
|
onChange: "onChange",
|
|
1177
1177
|
onSubmit: "onSubmit",
|
|
@@ -1185,120 +1185,120 @@ const At = {
|
|
|
1185
1185
|
pattern: "pattern",
|
|
1186
1186
|
required: "required",
|
|
1187
1187
|
validate: "validate"
|
|
1188
|
-
},
|
|
1189
|
-
|
|
1190
|
-
var
|
|
1191
|
-
const
|
|
1188
|
+
}, dr = ne.createContext(null);
|
|
1189
|
+
dr.displayName = "HookFormContext";
|
|
1190
|
+
var fr = (e, t, s, r = !0) => {
|
|
1191
|
+
const n = {
|
|
1192
1192
|
defaultValues: t._defaultValues
|
|
1193
1193
|
};
|
|
1194
|
-
for (const
|
|
1195
|
-
Object.defineProperty(
|
|
1194
|
+
for (const i in e)
|
|
1195
|
+
Object.defineProperty(n, i, {
|
|
1196
1196
|
get: () => {
|
|
1197
|
-
const
|
|
1198
|
-
return t._proxyFormState[
|
|
1197
|
+
const a = i;
|
|
1198
|
+
return t._proxyFormState[a] !== ue.all && (t._proxyFormState[a] = !r || ue.all), e[a];
|
|
1199
1199
|
}
|
|
1200
1200
|
});
|
|
1201
|
-
return
|
|
1201
|
+
return n;
|
|
1202
1202
|
};
|
|
1203
|
-
const
|
|
1204
|
-
var ye = (e) => typeof e == "string",
|
|
1203
|
+
const mr = typeof window < "u" ? ne.useLayoutEffect : ne.useEffect;
|
|
1204
|
+
var ye = (e) => typeof e == "string", hr = (e, t, s, r, n) => ye(e) ? (r && t.watch.add(e), S(s, e, n)) : Array.isArray(e) ? e.map((i) => (r && t.watch.add(i), S(s, i))) : (r && (t.watchAll = !0), s), nt = (e) => X(e) || !ss(e);
|
|
1205
1205
|
function ve(e, t, s = /* @__PURE__ */ new WeakSet()) {
|
|
1206
|
-
if (
|
|
1206
|
+
if (nt(e) || nt(t))
|
|
1207
1207
|
return e === t;
|
|
1208
1208
|
if (Ee(e) && Ee(t))
|
|
1209
1209
|
return e.getTime() === t.getTime();
|
|
1210
|
-
const
|
|
1211
|
-
if (
|
|
1210
|
+
const r = Object.keys(e), n = Object.keys(t);
|
|
1211
|
+
if (r.length !== n.length)
|
|
1212
1212
|
return !1;
|
|
1213
1213
|
if (s.has(e) || s.has(t))
|
|
1214
1214
|
return !0;
|
|
1215
1215
|
s.add(e), s.add(t);
|
|
1216
|
-
for (const
|
|
1217
|
-
const
|
|
1218
|
-
if (!
|
|
1216
|
+
for (const i of r) {
|
|
1217
|
+
const a = e[i];
|
|
1218
|
+
if (!n.includes(i))
|
|
1219
1219
|
return !1;
|
|
1220
|
-
if (
|
|
1221
|
-
const c = t[
|
|
1222
|
-
if (Ee(
|
|
1220
|
+
if (i !== "ref") {
|
|
1221
|
+
const c = t[i];
|
|
1222
|
+
if (Ee(a) && Ee(c) || K(a) && K(c) || Array.isArray(a) && Array.isArray(c) ? !ve(a, c, s) : a !== c)
|
|
1223
1223
|
return !1;
|
|
1224
1224
|
}
|
|
1225
1225
|
}
|
|
1226
1226
|
return !0;
|
|
1227
1227
|
}
|
|
1228
|
-
var
|
|
1228
|
+
var yr = (e, t, s, r, n) => t ? {
|
|
1229
1229
|
...s[e],
|
|
1230
1230
|
types: {
|
|
1231
1231
|
...s[e] && s[e].types ? s[e].types : {},
|
|
1232
|
-
[
|
|
1232
|
+
[r]: n || !0
|
|
1233
1233
|
}
|
|
1234
|
-
} : {}, Le = (e) => Array.isArray(e) ? e : [e],
|
|
1234
|
+
} : {}, Le = (e) => Array.isArray(e) ? e : [e], At = () => {
|
|
1235
1235
|
let e = [];
|
|
1236
1236
|
return {
|
|
1237
1237
|
get observers() {
|
|
1238
1238
|
return e;
|
|
1239
1239
|
},
|
|
1240
|
-
next: (
|
|
1241
|
-
for (const
|
|
1242
|
-
|
|
1240
|
+
next: (n) => {
|
|
1241
|
+
for (const i of e)
|
|
1242
|
+
i.next && i.next(n);
|
|
1243
1243
|
},
|
|
1244
|
-
subscribe: (
|
|
1244
|
+
subscribe: (n) => (e.push(n), {
|
|
1245
1245
|
unsubscribe: () => {
|
|
1246
|
-
e = e.filter((
|
|
1246
|
+
e = e.filter((i) => i !== n);
|
|
1247
1247
|
}
|
|
1248
1248
|
}),
|
|
1249
1249
|
unsubscribe: () => {
|
|
1250
1250
|
e = [];
|
|
1251
1251
|
}
|
|
1252
1252
|
};
|
|
1253
|
-
}, ee = (e) =>
|
|
1253
|
+
}, ee = (e) => K(e) && !Object.keys(e).length, dt = (e) => e.type === "file", de = (e) => typeof e == "function", Qe = (e) => {
|
|
1254
1254
|
if (!ct)
|
|
1255
1255
|
return !1;
|
|
1256
1256
|
const t = e ? e.ownerDocument : 0;
|
|
1257
1257
|
return e instanceof (t && t.defaultView ? t.defaultView.HTMLElement : HTMLElement);
|
|
1258
|
-
},
|
|
1259
|
-
function
|
|
1258
|
+
}, rs = (e) => e.type === "select-multiple", ft = (e) => e.type === "radio", gr = (e) => ft(e) || Ue(e), st = (e) => Qe(e) && e.isConnected;
|
|
1259
|
+
function pr(e, t) {
|
|
1260
1260
|
const s = t.slice(0, -1).length;
|
|
1261
|
-
let
|
|
1262
|
-
for (;
|
|
1263
|
-
e = j(e) ?
|
|
1261
|
+
let r = 0;
|
|
1262
|
+
for (; r < s; )
|
|
1263
|
+
e = j(e) ? r++ : e[t[r++]];
|
|
1264
1264
|
return e;
|
|
1265
1265
|
}
|
|
1266
|
-
function
|
|
1266
|
+
function br(e) {
|
|
1267
1267
|
for (const t in e)
|
|
1268
1268
|
if (e.hasOwnProperty(t) && !j(e[t]))
|
|
1269
1269
|
return !1;
|
|
1270
1270
|
return !0;
|
|
1271
1271
|
}
|
|
1272
|
-
function
|
|
1273
|
-
const s = Array.isArray(t) ? t : ze(t) ? [t] : ut(t),
|
|
1274
|
-
return
|
|
1272
|
+
function Q(e, t) {
|
|
1273
|
+
const s = Array.isArray(t) ? t : ze(t) ? [t] : ut(t), r = s.length === 1 ? e : pr(e, s), n = s.length - 1, i = s[n];
|
|
1274
|
+
return r && delete r[i], n !== 0 && (K(r) && ee(r) || Array.isArray(r) && br(r)) && Q(e, s.slice(0, -1)), e;
|
|
1275
1275
|
}
|
|
1276
1276
|
var is = (e) => {
|
|
1277
1277
|
for (const t in e)
|
|
1278
|
-
if (
|
|
1278
|
+
if (de(e[t]))
|
|
1279
1279
|
return !0;
|
|
1280
1280
|
return !1;
|
|
1281
1281
|
};
|
|
1282
1282
|
function je(e, t = {}) {
|
|
1283
1283
|
const s = Array.isArray(e);
|
|
1284
|
-
if (
|
|
1285
|
-
for (const
|
|
1286
|
-
Array.isArray(e[
|
|
1284
|
+
if (K(e) || s)
|
|
1285
|
+
for (const r in e)
|
|
1286
|
+
Array.isArray(e[r]) || K(e[r]) && !is(e[r]) ? (t[r] = Array.isArray(e[r]) ? [] : {}, je(e[r], t[r])) : X(e[r]) || (t[r] = !0);
|
|
1287
1287
|
return t;
|
|
1288
1288
|
}
|
|
1289
|
-
function
|
|
1290
|
-
const
|
|
1291
|
-
if (
|
|
1292
|
-
for (const
|
|
1293
|
-
Array.isArray(e[
|
|
1289
|
+
function ns(e, t, s) {
|
|
1290
|
+
const r = Array.isArray(e);
|
|
1291
|
+
if (K(e) || r)
|
|
1292
|
+
for (const n in e)
|
|
1293
|
+
Array.isArray(e[n]) || K(e[n]) && !is(e[n]) ? j(t) || nt(s[n]) ? s[n] = Array.isArray(e[n]) ? je(e[n], []) : { ...je(e[n]) } : ns(e[n], X(t) ? {} : t[n], s[n]) : s[n] = !ve(e[n], t[n]);
|
|
1294
1294
|
return s;
|
|
1295
1295
|
}
|
|
1296
|
-
var Fe = (e, t) =>
|
|
1297
|
-
const
|
|
1296
|
+
var Fe = (e, t) => ns(e, t, je(t));
|
|
1297
|
+
const xt = {
|
|
1298
1298
|
value: !1,
|
|
1299
1299
|
isValid: !1
|
|
1300
|
-
},
|
|
1301
|
-
var
|
|
1300
|
+
}, Tt = { value: !0, isValid: !0 };
|
|
1301
|
+
var as = (e) => {
|
|
1302
1302
|
if (Array.isArray(e)) {
|
|
1303
1303
|
if (e.length > 1) {
|
|
1304
1304
|
const t = e.filter((s) => s && s.checked && !s.disabled).map((s) => s.value);
|
|
@@ -1306,203 +1306,203 @@ var os = (e) => {
|
|
|
1306
1306
|
}
|
|
1307
1307
|
return e[0].checked && !e[0].disabled ? (
|
|
1308
1308
|
// @ts-expect-error expected to work in the browser
|
|
1309
|
-
e[0].attributes && !j(e[0].attributes.value) ? j(e[0].value) || e[0].value === "" ?
|
|
1310
|
-
) :
|
|
1309
|
+
e[0].attributes && !j(e[0].attributes.value) ? j(e[0].value) || e[0].value === "" ? Tt : { value: e[0].value, isValid: !0 } : Tt
|
|
1310
|
+
) : xt;
|
|
1311
1311
|
}
|
|
1312
|
-
return
|
|
1313
|
-
},
|
|
1314
|
-
const
|
|
1312
|
+
return xt;
|
|
1313
|
+
}, os = (e, { valueAsNumber: t, valueAsDate: s, setValueAs: r }) => j(e) ? e : t ? e === "" ? NaN : e && +e : s && ye(e) ? new Date(e) : r ? r(e) : e;
|
|
1314
|
+
const Ft = {
|
|
1315
1315
|
isValid: !1,
|
|
1316
1316
|
value: null
|
|
1317
1317
|
};
|
|
1318
|
-
var
|
|
1318
|
+
var cs = (e) => Array.isArray(e) ? e.reduce((t, s) => s && s.checked && !s.disabled ? {
|
|
1319
1319
|
isValid: !0,
|
|
1320
1320
|
value: s.value
|
|
1321
|
-
} : t,
|
|
1322
|
-
function
|
|
1321
|
+
} : t, Ft) : Ft;
|
|
1322
|
+
function $t(e) {
|
|
1323
1323
|
const t = e.ref;
|
|
1324
|
-
return dt(t) ? t.files : ft(t) ?
|
|
1324
|
+
return dt(t) ? t.files : ft(t) ? cs(e.refs).value : rs(t) ? [...t.selectedOptions].map(({ value: s }) => s) : Ue(t) ? as(e.refs).value : os(j(t.value) ? e.ref.value : t.value, e);
|
|
1325
1325
|
}
|
|
1326
|
-
var
|
|
1327
|
-
const
|
|
1328
|
-
for (const
|
|
1329
|
-
const
|
|
1330
|
-
|
|
1326
|
+
var vr = (e, t, s, r) => {
|
|
1327
|
+
const n = {};
|
|
1328
|
+
for (const i of e) {
|
|
1329
|
+
const a = S(t, i);
|
|
1330
|
+
a && q(n, i, a._f);
|
|
1331
1331
|
}
|
|
1332
1332
|
return {
|
|
1333
1333
|
criteriaMode: s,
|
|
1334
1334
|
names: [...e],
|
|
1335
|
-
fields:
|
|
1336
|
-
shouldUseNativeValidation:
|
|
1335
|
+
fields: n,
|
|
1336
|
+
shouldUseNativeValidation: r
|
|
1337
1337
|
};
|
|
1338
|
-
}, We = (e) => e instanceof RegExp, $e = (e) => j(e) ? e : We(e) ? e.source :
|
|
1339
|
-
isOnSubmit: !e || e ===
|
|
1340
|
-
isOnBlur: e ===
|
|
1341
|
-
isOnChange: e ===
|
|
1342
|
-
isOnAll: e ===
|
|
1343
|
-
isOnTouch: e ===
|
|
1338
|
+
}, We = (e) => e instanceof RegExp, $e = (e) => j(e) ? e : We(e) ? e.source : K(e) ? We(e.value) ? e.value.source : e.value : e, Lt = (e) => ({
|
|
1339
|
+
isOnSubmit: !e || e === ue.onSubmit,
|
|
1340
|
+
isOnBlur: e === ue.onBlur,
|
|
1341
|
+
isOnChange: e === ue.onChange,
|
|
1342
|
+
isOnAll: e === ue.all,
|
|
1343
|
+
isOnTouch: e === ue.onTouched
|
|
1344
1344
|
});
|
|
1345
|
-
const
|
|
1346
|
-
var
|
|
1347
|
-
const De = (e, t, s,
|
|
1348
|
-
for (const
|
|
1349
|
-
const
|
|
1350
|
-
if (
|
|
1351
|
-
const { _f:
|
|
1352
|
-
if (
|
|
1353
|
-
if (
|
|
1345
|
+
const Dt = "AsyncFunction";
|
|
1346
|
+
var wr = (e) => !!e && !!e.validate && !!(de(e.validate) && e.validate.constructor.name === Dt || K(e.validate) && Object.values(e.validate).find((t) => t.constructor.name === Dt)), _r = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), Vt = (e, t, s) => !s && (t.watchAll || t.watch.has(e) || [...t.watch].some((r) => e.startsWith(r) && /^\.\w+/.test(e.slice(r.length))));
|
|
1347
|
+
const De = (e, t, s, r) => {
|
|
1348
|
+
for (const n of s || Object.keys(e)) {
|
|
1349
|
+
const i = S(e, n);
|
|
1350
|
+
if (i) {
|
|
1351
|
+
const { _f: a, ...c } = i;
|
|
1352
|
+
if (a) {
|
|
1353
|
+
if (a.refs && a.refs[0] && t(a.refs[0], n) && !r)
|
|
1354
1354
|
return !0;
|
|
1355
|
-
if (
|
|
1355
|
+
if (a.ref && t(a.ref, a.name) && !r)
|
|
1356
1356
|
return !0;
|
|
1357
1357
|
if (De(c, t))
|
|
1358
1358
|
break;
|
|
1359
|
-
} else if (
|
|
1359
|
+
} else if (K(c) && De(c, t))
|
|
1360
1360
|
break;
|
|
1361
1361
|
}
|
|
1362
1362
|
}
|
|
1363
1363
|
};
|
|
1364
|
-
function
|
|
1365
|
-
const
|
|
1366
|
-
if (
|
|
1364
|
+
function It(e, t, s) {
|
|
1365
|
+
const r = S(e, s);
|
|
1366
|
+
if (r || ze(s))
|
|
1367
1367
|
return {
|
|
1368
|
-
error:
|
|
1368
|
+
error: r,
|
|
1369
1369
|
name: s
|
|
1370
1370
|
};
|
|
1371
|
-
const
|
|
1372
|
-
for (;
|
|
1373
|
-
const
|
|
1374
|
-
if (
|
|
1371
|
+
const n = s.split(".");
|
|
1372
|
+
for (; n.length; ) {
|
|
1373
|
+
const i = n.join("."), a = S(t, i), c = S(e, i);
|
|
1374
|
+
if (a && !Array.isArray(a) && s !== i)
|
|
1375
1375
|
return { name: s };
|
|
1376
1376
|
if (c && c.type)
|
|
1377
1377
|
return {
|
|
1378
|
-
name:
|
|
1378
|
+
name: i,
|
|
1379
1379
|
error: c
|
|
1380
1380
|
};
|
|
1381
1381
|
if (c && c.root && c.root.type)
|
|
1382
1382
|
return {
|
|
1383
|
-
name: `${
|
|
1383
|
+
name: `${i}.root`,
|
|
1384
1384
|
error: c.root
|
|
1385
1385
|
};
|
|
1386
|
-
|
|
1386
|
+
n.pop();
|
|
1387
1387
|
}
|
|
1388
1388
|
return {
|
|
1389
1389
|
name: s
|
|
1390
1390
|
};
|
|
1391
1391
|
}
|
|
1392
|
-
var
|
|
1392
|
+
var Sr = (e, t, s, r) => {
|
|
1393
1393
|
s(e);
|
|
1394
|
-
const { name:
|
|
1395
|
-
return ee(
|
|
1396
|
-
},
|
|
1397
|
-
const
|
|
1398
|
-
return q(
|
|
1399
|
-
},
|
|
1400
|
-
function
|
|
1401
|
-
if (
|
|
1394
|
+
const { name: n, ...i } = e;
|
|
1395
|
+
return ee(i) || Object.keys(i).length >= Object.keys(t).length || Object.keys(i).find((a) => t[a] === (!r || ue.all));
|
|
1396
|
+
}, Cr = (e, t, s) => !e || !t || e === t || Le(e).some((r) => r && (s ? r === t : r.startsWith(t) || t.startsWith(r))), Er = (e, t, s, r, n) => n.isOnAll ? !1 : !s && n.isOnTouch ? !(t || e) : (s ? r.isOnBlur : n.isOnBlur) ? !e : (s ? r.isOnChange : n.isOnChange) ? e : !0, kr = (e, t) => !lt(S(e, t)).length && Q(e, t), Nr = (e, t, s) => {
|
|
1397
|
+
const r = Le(S(e, s));
|
|
1398
|
+
return q(r, "root", t[s]), q(e, s, r), e;
|
|
1399
|
+
}, Ke = (e) => ye(e);
|
|
1400
|
+
function Pt(e, t, s = "validate") {
|
|
1401
|
+
if (Ke(e) || Array.isArray(e) && e.every(Ke) || he(e) && !e)
|
|
1402
1402
|
return {
|
|
1403
1403
|
type: s,
|
|
1404
|
-
message:
|
|
1404
|
+
message: Ke(e) ? e : "",
|
|
1405
1405
|
ref: t
|
|
1406
1406
|
};
|
|
1407
1407
|
}
|
|
1408
|
-
var Ne = (e) =>
|
|
1408
|
+
var Ne = (e) => K(e) && !We(e) ? e : {
|
|
1409
1409
|
value: e,
|
|
1410
1410
|
message: ""
|
|
1411
|
-
},
|
|
1412
|
-
const { ref:
|
|
1411
|
+
}, Ot = async (e, t, s, r, n, i) => {
|
|
1412
|
+
const { ref: a, refs: c, required: l, maxLength: h, minLength: y, min: m, max: f, pattern: p, validate: _, name: C, valueAsNumber: k, mount: B } = e._f, N = S(s, C);
|
|
1413
1413
|
if (!B || t.has(C))
|
|
1414
1414
|
return {};
|
|
1415
|
-
const $ = c ? c[0] :
|
|
1416
|
-
|
|
1417
|
-
}, A = {}, I = ft(
|
|
1418
|
-
const R =
|
|
1415
|
+
const $ = c ? c[0] : a, x = (T) => {
|
|
1416
|
+
n && $.reportValidity && ($.setCustomValidity(he(T) ? "" : T || ""), $.reportValidity());
|
|
1417
|
+
}, A = {}, I = ft(a), M = Ue(a), se = I || M, P = (k || dt(a)) && j(a.value) && j(N) || Qe(a) && a.value === "" || N === "" || Array.isArray(N) && !N.length, re = yr.bind(null, C, r, A), ae = (T, L, H, W = ge.maxLength, z = ge.minLength) => {
|
|
1418
|
+
const R = T ? L : H;
|
|
1419
1419
|
A[C] = {
|
|
1420
|
-
type:
|
|
1420
|
+
type: T ? W : z,
|
|
1421
1421
|
message: R,
|
|
1422
|
-
ref:
|
|
1423
|
-
...re(
|
|
1422
|
+
ref: a,
|
|
1423
|
+
...re(T ? W : z, R)
|
|
1424
1424
|
};
|
|
1425
1425
|
};
|
|
1426
|
-
if (
|
|
1427
|
-
const { value:
|
|
1428
|
-
if (
|
|
1426
|
+
if (i ? !Array.isArray(N) || !N.length : l && (!se && (P || X(N)) || he(N) && !N || M && !as(c).isValid || I && !cs(c).isValid)) {
|
|
1427
|
+
const { value: T, message: L } = Ke(l) ? { value: !!l, message: l } : Ne(l);
|
|
1428
|
+
if (T && (A[C] = {
|
|
1429
1429
|
type: ge.required,
|
|
1430
1430
|
message: L,
|
|
1431
1431
|
ref: $,
|
|
1432
1432
|
...re(ge.required, L)
|
|
1433
|
-
}, !
|
|
1433
|
+
}, !r))
|
|
1434
1434
|
return x(L), A;
|
|
1435
1435
|
}
|
|
1436
|
-
if (!P && (!
|
|
1437
|
-
let
|
|
1438
|
-
const H = Ne(f), W = Ne(
|
|
1439
|
-
if (!
|
|
1440
|
-
const z =
|
|
1441
|
-
|
|
1436
|
+
if (!P && (!X(m) || !X(f))) {
|
|
1437
|
+
let T, L;
|
|
1438
|
+
const H = Ne(f), W = Ne(m);
|
|
1439
|
+
if (!X(N) && !isNaN(N)) {
|
|
1440
|
+
const z = a.valueAsNumber || N && +N;
|
|
1441
|
+
X(H.value) || (T = z > H.value), X(W.value) || (L = z < W.value);
|
|
1442
1442
|
} else {
|
|
1443
|
-
const z =
|
|
1444
|
-
ye(H.value) && N && (
|
|
1443
|
+
const z = a.valueAsDate || new Date(N), R = (le) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + le), Y = a.type == "time", ie = a.type == "week";
|
|
1444
|
+
ye(H.value) && N && (T = Y ? R(N) > R(H.value) : ie ? N > H.value : z > new Date(H.value)), ye(W.value) && N && (L = Y ? R(N) < R(W.value) : ie ? N < W.value : z < new Date(W.value));
|
|
1445
1445
|
}
|
|
1446
|
-
if ((
|
|
1446
|
+
if ((T || L) && (ae(!!T, H.message, W.message, ge.max, ge.min), !r))
|
|
1447
1447
|
return x(A[C].message), A;
|
|
1448
1448
|
}
|
|
1449
|
-
if ((
|
|
1450
|
-
const
|
|
1451
|
-
if ((H || W) && (ae(H,
|
|
1449
|
+
if ((h || y) && !P && (ye(N) || i && Array.isArray(N))) {
|
|
1450
|
+
const T = Ne(h), L = Ne(y), H = !X(T.value) && N.length > +T.value, W = !X(L.value) && N.length < +L.value;
|
|
1451
|
+
if ((H || W) && (ae(H, T.message, L.message), !r))
|
|
1452
1452
|
return x(A[C].message), A;
|
|
1453
1453
|
}
|
|
1454
1454
|
if (p && !P && ye(N)) {
|
|
1455
|
-
const { value:
|
|
1456
|
-
if (We(
|
|
1455
|
+
const { value: T, message: L } = Ne(p);
|
|
1456
|
+
if (We(T) && !N.match(T) && (A[C] = {
|
|
1457
1457
|
type: ge.pattern,
|
|
1458
1458
|
message: L,
|
|
1459
|
-
ref:
|
|
1459
|
+
ref: a,
|
|
1460
1460
|
...re(ge.pattern, L)
|
|
1461
|
-
}, !
|
|
1461
|
+
}, !r))
|
|
1462
1462
|
return x(L), A;
|
|
1463
1463
|
}
|
|
1464
1464
|
if (_) {
|
|
1465
|
-
if (
|
|
1466
|
-
const
|
|
1465
|
+
if (de(_)) {
|
|
1466
|
+
const T = await _(N, s), L = Pt(T, $);
|
|
1467
1467
|
if (L && (A[C] = {
|
|
1468
1468
|
...L,
|
|
1469
1469
|
...re(ge.validate, L.message)
|
|
1470
|
-
}, !
|
|
1470
|
+
}, !r))
|
|
1471
1471
|
return x(L.message), A;
|
|
1472
|
-
} else if (
|
|
1473
|
-
let
|
|
1472
|
+
} else if (K(_)) {
|
|
1473
|
+
let T = {};
|
|
1474
1474
|
for (const L in _) {
|
|
1475
|
-
if (!ee(
|
|
1475
|
+
if (!ee(T) && !r)
|
|
1476
1476
|
break;
|
|
1477
|
-
const H =
|
|
1478
|
-
H && (
|
|
1477
|
+
const H = Pt(await _[L](N, s), $, L);
|
|
1478
|
+
H && (T = {
|
|
1479
1479
|
...H,
|
|
1480
1480
|
...re(L, H.message)
|
|
1481
|
-
}, x(H.message),
|
|
1481
|
+
}, x(H.message), r && (A[C] = T));
|
|
1482
1482
|
}
|
|
1483
|
-
if (!ee(
|
|
1483
|
+
if (!ee(T) && (A[C] = {
|
|
1484
1484
|
ref: $,
|
|
1485
|
-
...
|
|
1486
|
-
}, !
|
|
1485
|
+
...T
|
|
1486
|
+
}, !r))
|
|
1487
1487
|
return A;
|
|
1488
1488
|
}
|
|
1489
1489
|
}
|
|
1490
1490
|
return x(!0), A;
|
|
1491
1491
|
};
|
|
1492
|
-
const
|
|
1493
|
-
mode:
|
|
1494
|
-
reValidateMode:
|
|
1492
|
+
const Ar = {
|
|
1493
|
+
mode: ue.onSubmit,
|
|
1494
|
+
reValidateMode: ue.onChange,
|
|
1495
1495
|
shouldFocusError: !0
|
|
1496
1496
|
};
|
|
1497
|
-
function
|
|
1497
|
+
function xr(e = {}) {
|
|
1498
1498
|
let t = {
|
|
1499
|
-
...
|
|
1499
|
+
...Ar,
|
|
1500
1500
|
...e
|
|
1501
1501
|
}, s = {
|
|
1502
1502
|
submitCount: 0,
|
|
1503
1503
|
isDirty: !1,
|
|
1504
1504
|
isReady: !1,
|
|
1505
|
-
isLoading:
|
|
1505
|
+
isLoading: de(t.defaultValues),
|
|
1506
1506
|
isValidating: !1,
|
|
1507
1507
|
isSubmitted: !1,
|
|
1508
1508
|
isSubmitting: !1,
|
|
@@ -1513,7 +1513,7 @@ function Fr(e = {}) {
|
|
|
1513
1513
|
validatingFields: {},
|
|
1514
1514
|
errors: t.errors || {},
|
|
1515
1515
|
disabled: t.disabled || !1
|
|
1516
|
-
},
|
|
1516
|
+
}, r = {}, n = K(t.defaultValues) || K(t.values) ? G(t.defaultValues || t.values) || {} : {}, i = t.shouldUnregister ? {} : G(n), a = {
|
|
1517
1517
|
action: !1,
|
|
1518
1518
|
mount: !1,
|
|
1519
1519
|
watch: !1
|
|
@@ -1523,8 +1523,8 @@ function Fr(e = {}) {
|
|
|
1523
1523
|
unMount: /* @__PURE__ */ new Set(),
|
|
1524
1524
|
array: /* @__PURE__ */ new Set(),
|
|
1525
1525
|
watch: /* @__PURE__ */ new Set()
|
|
1526
|
-
},
|
|
1527
|
-
const
|
|
1526
|
+
}, l, h = 0;
|
|
1527
|
+
const y = {
|
|
1528
1528
|
isDirty: !1,
|
|
1529
1529
|
dirtyFields: !1,
|
|
1530
1530
|
validatingFields: !1,
|
|
@@ -1533,354 +1533,354 @@ function Fr(e = {}) {
|
|
|
1533
1533
|
isValid: !1,
|
|
1534
1534
|
errors: !1
|
|
1535
1535
|
};
|
|
1536
|
-
let
|
|
1537
|
-
...
|
|
1536
|
+
let m = {
|
|
1537
|
+
...y
|
|
1538
1538
|
};
|
|
1539
1539
|
const f = {
|
|
1540
|
-
array:
|
|
1541
|
-
state:
|
|
1542
|
-
}, p = t.criteriaMode ===
|
|
1543
|
-
clearTimeout(
|
|
1544
|
-
}, C = async (
|
|
1545
|
-
if (!t.disabled && (
|
|
1546
|
-
const
|
|
1547
|
-
|
|
1548
|
-
isValid:
|
|
1540
|
+
array: At(),
|
|
1541
|
+
state: At()
|
|
1542
|
+
}, p = t.criteriaMode === ue.all, _ = (o) => (u) => {
|
|
1543
|
+
clearTimeout(h), h = setTimeout(o, u);
|
|
1544
|
+
}, C = async (o) => {
|
|
1545
|
+
if (!t.disabled && (y.isValid || m.isValid || o)) {
|
|
1546
|
+
const u = t.resolver ? ee((await M()).errors) : await P(r, !0);
|
|
1547
|
+
u !== s.isValid && f.state.next({
|
|
1548
|
+
isValid: u
|
|
1549
1549
|
});
|
|
1550
1550
|
}
|
|
1551
|
-
}, k = (
|
|
1552
|
-
!t.disabled && (
|
|
1553
|
-
d && (
|
|
1551
|
+
}, k = (o, u) => {
|
|
1552
|
+
!t.disabled && (y.isValidating || y.validatingFields || m.isValidating || m.validatingFields) && ((o || Array.from(c.mount)).forEach((d) => {
|
|
1553
|
+
d && (u ? q(s.validatingFields, d, u) : Q(s.validatingFields, d));
|
|
1554
1554
|
}), f.state.next({
|
|
1555
1555
|
validatingFields: s.validatingFields,
|
|
1556
1556
|
isValidating: !ee(s.validatingFields)
|
|
1557
1557
|
}));
|
|
1558
|
-
}, B = (
|
|
1558
|
+
}, B = (o, u = [], d, w, v = !0, b = !0) => {
|
|
1559
1559
|
if (w && d && !t.disabled) {
|
|
1560
|
-
if (
|
|
1561
|
-
const E = d(S(
|
|
1562
|
-
v && q(
|
|
1560
|
+
if (a.action = !0, b && Array.isArray(S(r, o))) {
|
|
1561
|
+
const E = d(S(r, o), w.argA, w.argB);
|
|
1562
|
+
v && q(r, o, E);
|
|
1563
1563
|
}
|
|
1564
|
-
if (b && Array.isArray(S(s.errors,
|
|
1565
|
-
const E = d(S(s.errors,
|
|
1566
|
-
v && q(s.errors,
|
|
1564
|
+
if (b && Array.isArray(S(s.errors, o))) {
|
|
1565
|
+
const E = d(S(s.errors, o), w.argA, w.argB);
|
|
1566
|
+
v && q(s.errors, o, E), kr(s.errors, o);
|
|
1567
1567
|
}
|
|
1568
|
-
if ((
|
|
1569
|
-
const E = d(S(s.touchedFields,
|
|
1570
|
-
v && q(s.touchedFields,
|
|
1568
|
+
if ((y.touchedFields || m.touchedFields) && b && Array.isArray(S(s.touchedFields, o))) {
|
|
1569
|
+
const E = d(S(s.touchedFields, o), w.argA, w.argB);
|
|
1570
|
+
v && q(s.touchedFields, o, E);
|
|
1571
1571
|
}
|
|
1572
|
-
(
|
|
1573
|
-
name:
|
|
1574
|
-
isDirty: ae(
|
|
1572
|
+
(y.dirtyFields || m.dirtyFields) && (s.dirtyFields = Fe(n, i)), f.state.next({
|
|
1573
|
+
name: o,
|
|
1574
|
+
isDirty: ae(o, u),
|
|
1575
1575
|
dirtyFields: s.dirtyFields,
|
|
1576
1576
|
errors: s.errors,
|
|
1577
1577
|
isValid: s.isValid
|
|
1578
1578
|
});
|
|
1579
1579
|
} else
|
|
1580
|
-
q(
|
|
1581
|
-
}, N = (
|
|
1582
|
-
q(s.errors,
|
|
1580
|
+
q(i, o, u);
|
|
1581
|
+
}, N = (o, u) => {
|
|
1582
|
+
q(s.errors, o, u), f.state.next({
|
|
1583
1583
|
errors: s.errors
|
|
1584
1584
|
});
|
|
1585
|
-
}, $ = (
|
|
1586
|
-
s.errors =
|
|
1585
|
+
}, $ = (o) => {
|
|
1586
|
+
s.errors = o, f.state.next({
|
|
1587
1587
|
errors: s.errors,
|
|
1588
1588
|
isValid: !1
|
|
1589
1589
|
});
|
|
1590
|
-
}, x = (
|
|
1591
|
-
const v = S(
|
|
1590
|
+
}, x = (o, u, d, w) => {
|
|
1591
|
+
const v = S(r, o);
|
|
1592
1592
|
if (v) {
|
|
1593
|
-
const b = S(
|
|
1594
|
-
j(b) || w && w.defaultChecked ||
|
|
1593
|
+
const b = S(i, o, j(d) ? S(n, o) : d);
|
|
1594
|
+
j(b) || w && w.defaultChecked || u ? q(i, o, u ? b : $t(v._f)) : H(o, b), a.mount && C();
|
|
1595
1595
|
}
|
|
1596
|
-
}, A = (
|
|
1596
|
+
}, A = (o, u, d, w, v) => {
|
|
1597
1597
|
let b = !1, E = !1;
|
|
1598
1598
|
const O = {
|
|
1599
|
-
name:
|
|
1599
|
+
name: o
|
|
1600
1600
|
};
|
|
1601
1601
|
if (!t.disabled) {
|
|
1602
1602
|
if (!d || w) {
|
|
1603
|
-
(
|
|
1604
|
-
const U = ve(S(
|
|
1605
|
-
E = !!S(s.dirtyFields,
|
|
1603
|
+
(y.isDirty || m.isDirty) && (E = s.isDirty, s.isDirty = O.isDirty = ae(), b = E !== O.isDirty);
|
|
1604
|
+
const U = ve(S(n, o), u);
|
|
1605
|
+
E = !!S(s.dirtyFields, o), U ? Q(s.dirtyFields, o) : q(s.dirtyFields, o, !0), O.dirtyFields = s.dirtyFields, b = b || (y.dirtyFields || m.dirtyFields) && E !== !U;
|
|
1606
1606
|
}
|
|
1607
1607
|
if (d) {
|
|
1608
|
-
const U = S(s.touchedFields,
|
|
1609
|
-
U || (q(s.touchedFields,
|
|
1608
|
+
const U = S(s.touchedFields, o);
|
|
1609
|
+
U || (q(s.touchedFields, o, d), O.touchedFields = s.touchedFields, b = b || (y.touchedFields || m.touchedFields) && U !== d);
|
|
1610
1610
|
}
|
|
1611
1611
|
b && v && f.state.next(O);
|
|
1612
1612
|
}
|
|
1613
1613
|
return b ? O : {};
|
|
1614
|
-
}, I = (
|
|
1615
|
-
const v = S(s.errors,
|
|
1616
|
-
if (t.delayError && d ? (
|
|
1614
|
+
}, I = (o, u, d, w) => {
|
|
1615
|
+
const v = S(s.errors, o), b = (y.isValid || m.isValid) && he(u) && s.isValid !== u;
|
|
1616
|
+
if (t.delayError && d ? (l = _(() => N(o, d)), l(t.delayError)) : (clearTimeout(h), l = null, d ? q(s.errors, o, d) : Q(s.errors, o)), (d ? !ve(v, d) : v) || !ee(w) || b) {
|
|
1617
1617
|
const E = {
|
|
1618
1618
|
...w,
|
|
1619
|
-
...b && he(
|
|
1619
|
+
...b && he(u) ? { isValid: u } : {},
|
|
1620
1620
|
errors: s.errors,
|
|
1621
|
-
name:
|
|
1621
|
+
name: o
|
|
1622
1622
|
};
|
|
1623
1623
|
s = {
|
|
1624
1624
|
...s,
|
|
1625
1625
|
...E
|
|
1626
1626
|
}, f.state.next(E);
|
|
1627
1627
|
}
|
|
1628
|
-
}, M = async (
|
|
1629
|
-
k(
|
|
1630
|
-
const
|
|
1631
|
-
return k(
|
|
1632
|
-
}, se = async (
|
|
1633
|
-
const { errors:
|
|
1634
|
-
if (
|
|
1635
|
-
for (const d of
|
|
1636
|
-
const w = S(
|
|
1637
|
-
w ? q(s.errors, d, w) :
|
|
1628
|
+
}, M = async (o) => {
|
|
1629
|
+
k(o, !0);
|
|
1630
|
+
const u = await t.resolver(i, t.context, vr(o || c.mount, r, t.criteriaMode, t.shouldUseNativeValidation));
|
|
1631
|
+
return k(o), u;
|
|
1632
|
+
}, se = async (o) => {
|
|
1633
|
+
const { errors: u } = await M(o);
|
|
1634
|
+
if (o)
|
|
1635
|
+
for (const d of o) {
|
|
1636
|
+
const w = S(u, d);
|
|
1637
|
+
w ? q(s.errors, d, w) : Q(s.errors, d);
|
|
1638
1638
|
}
|
|
1639
1639
|
else
|
|
1640
|
-
s.errors =
|
|
1641
|
-
return
|
|
1642
|
-
}, P = async (
|
|
1640
|
+
s.errors = u;
|
|
1641
|
+
return u;
|
|
1642
|
+
}, P = async (o, u, d = {
|
|
1643
1643
|
valid: !0
|
|
1644
1644
|
}) => {
|
|
1645
|
-
for (const w in
|
|
1646
|
-
const v =
|
|
1645
|
+
for (const w in o) {
|
|
1646
|
+
const v = o[w];
|
|
1647
1647
|
if (v) {
|
|
1648
1648
|
const { _f: b, ...E } = v;
|
|
1649
1649
|
if (b) {
|
|
1650
|
-
const O = c.array.has(b.name), U = v._f &&
|
|
1651
|
-
U &&
|
|
1652
|
-
const oe = await
|
|
1653
|
-
if (U &&
|
|
1650
|
+
const O = c.array.has(b.name), U = v._f && wr(v._f);
|
|
1651
|
+
U && y.validatingFields && k([w], !0);
|
|
1652
|
+
const oe = await Ot(v, c.disabled, i, p, t.shouldUseNativeValidation && !u, O);
|
|
1653
|
+
if (U && y.validatingFields && k([w]), oe[b.name] && (d.valid = !1, u))
|
|
1654
1654
|
break;
|
|
1655
|
-
!
|
|
1655
|
+
!u && (S(oe, b.name) ? O ? Nr(s.errors, oe, b.name) : q(s.errors, b.name, oe[b.name]) : Q(s.errors, b.name));
|
|
1656
1656
|
}
|
|
1657
|
-
!ee(E) && await P(E,
|
|
1657
|
+
!ee(E) && await P(E, u, d);
|
|
1658
1658
|
}
|
|
1659
1659
|
}
|
|
1660
1660
|
return d.valid;
|
|
1661
1661
|
}, re = () => {
|
|
1662
|
-
for (const
|
|
1663
|
-
const
|
|
1664
|
-
|
|
1662
|
+
for (const o of c.unMount) {
|
|
1663
|
+
const u = S(r, o);
|
|
1664
|
+
u && (u._f.refs ? u._f.refs.every((d) => !st(d)) : !st(u._f.ref)) && Ye(o);
|
|
1665
1665
|
}
|
|
1666
1666
|
c.unMount = /* @__PURE__ */ new Set();
|
|
1667
|
-
}, ae = (
|
|
1668
|
-
...
|
|
1669
|
-
}, d,
|
|
1670
|
-
const w = S(
|
|
1671
|
-
let v =
|
|
1667
|
+
}, ae = (o, u) => !t.disabled && (o && u && q(i, o, u), !ve(le(), n)), T = (o, u, d) => hr(o, c, {
|
|
1668
|
+
...a.mount ? i : j(u) ? n : ye(o) ? { [o]: u } : u
|
|
1669
|
+
}, d, u), L = (o) => lt(S(a.mount ? i : n, o, t.shouldUnregister ? S(n, o, []) : [])), H = (o, u, d = {}) => {
|
|
1670
|
+
const w = S(r, o);
|
|
1671
|
+
let v = u;
|
|
1672
1672
|
if (w) {
|
|
1673
1673
|
const b = w._f;
|
|
1674
|
-
b && (!b.disabled && q(
|
|
1674
|
+
b && (!b.disabled && q(i, o, os(u, b)), v = Qe(b.ref) && X(u) ? "" : u, rs(b.ref) ? [...b.ref.options].forEach((E) => E.selected = v.includes(E.value)) : b.refs ? Ue(b.ref) ? b.refs.forEach((E) => {
|
|
1675
1675
|
(!E.defaultChecked || !E.disabled) && (Array.isArray(v) ? E.checked = !!v.find((O) => O === E.value) : E.checked = v === E.value || !!v);
|
|
1676
1676
|
}) : b.refs.forEach((E) => E.checked = E.value === v) : dt(b.ref) ? b.ref.value = "" : (b.ref.value = v, b.ref.type || f.state.next({
|
|
1677
|
-
name:
|
|
1678
|
-
values: G(
|
|
1677
|
+
name: o,
|
|
1678
|
+
values: G(i)
|
|
1679
1679
|
})));
|
|
1680
1680
|
}
|
|
1681
|
-
(d.shouldDirty || d.shouldTouch) && A(
|
|
1682
|
-
}, W = (
|
|
1683
|
-
for (const w in
|
|
1684
|
-
if (!
|
|
1681
|
+
(d.shouldDirty || d.shouldTouch) && A(o, v, d.shouldTouch, d.shouldDirty, !0), d.shouldValidate && ie(o);
|
|
1682
|
+
}, W = (o, u, d) => {
|
|
1683
|
+
for (const w in u) {
|
|
1684
|
+
if (!u.hasOwnProperty(w))
|
|
1685
1685
|
return;
|
|
1686
|
-
const v =
|
|
1687
|
-
(c.array.has(
|
|
1686
|
+
const v = u[w], b = o + "." + w, E = S(r, b);
|
|
1687
|
+
(c.array.has(o) || K(v) || E && !E._f) && !Ee(v) ? W(b, v, d) : H(b, v, d);
|
|
1688
1688
|
}
|
|
1689
|
-
}, z = (
|
|
1690
|
-
const w = S(
|
|
1691
|
-
q(
|
|
1692
|
-
name:
|
|
1693
|
-
values: G(
|
|
1694
|
-
}), (
|
|
1695
|
-
name:
|
|
1696
|
-
dirtyFields: Fe(
|
|
1697
|
-
isDirty: ae(
|
|
1698
|
-
})) : w && !w._f && !
|
|
1699
|
-
name:
|
|
1700
|
-
values: G(
|
|
1689
|
+
}, z = (o, u, d = {}) => {
|
|
1690
|
+
const w = S(r, o), v = c.array.has(o), b = G(u);
|
|
1691
|
+
q(i, o, b), v ? (f.array.next({
|
|
1692
|
+
name: o,
|
|
1693
|
+
values: G(i)
|
|
1694
|
+
}), (y.isDirty || y.dirtyFields || m.isDirty || m.dirtyFields) && d.shouldDirty && f.state.next({
|
|
1695
|
+
name: o,
|
|
1696
|
+
dirtyFields: Fe(n, i),
|
|
1697
|
+
isDirty: ae(o, b)
|
|
1698
|
+
})) : w && !w._f && !X(b) ? W(o, b, d) : H(o, b, d), Vt(o, c) && f.state.next({ ...s, name: o }), f.state.next({
|
|
1699
|
+
name: a.mount ? o : void 0,
|
|
1700
|
+
values: G(i)
|
|
1701
1701
|
});
|
|
1702
|
-
}, R = async (
|
|
1703
|
-
|
|
1704
|
-
const
|
|
1705
|
-
let d =
|
|
1706
|
-
const v = S(
|
|
1707
|
-
w = Number.isNaN(U) || Ee(U) && isNaN(U.getTime()) || ve(U, S(
|
|
1708
|
-
}, E =
|
|
1702
|
+
}, R = async (o) => {
|
|
1703
|
+
a.mount = !0;
|
|
1704
|
+
const u = o.target;
|
|
1705
|
+
let d = u.name, w = !0;
|
|
1706
|
+
const v = S(r, d), b = (U) => {
|
|
1707
|
+
w = Number.isNaN(U) || Ee(U) && isNaN(U.getTime()) || ve(U, S(i, d, U));
|
|
1708
|
+
}, E = Lt(t.mode), O = Lt(t.reValidateMode);
|
|
1709
1709
|
if (v) {
|
|
1710
1710
|
let U, oe;
|
|
1711
|
-
const He =
|
|
1712
|
-
q(
|
|
1713
|
-
const tt = A(d, He, be),
|
|
1711
|
+
const He = u.type ? $t(v._f) : or(o), be = o.type === Nt.BLUR || o.type === Nt.FOCUS_OUT, ps = !_r(v._f) && !t.resolver && !S(s.errors, d) && !v._f.deps || Er(be, S(s.touchedFields, d), s.isSubmitted, O, E), et = Vt(d, c, be);
|
|
1712
|
+
q(i, d, He), be ? (v._f.onBlur && v._f.onBlur(o), l && l(0)) : v._f.onChange && v._f.onChange(o);
|
|
1713
|
+
const tt = A(d, He, be), bs = !ee(tt) || et;
|
|
1714
1714
|
if (!be && f.state.next({
|
|
1715
1715
|
name: d,
|
|
1716
|
-
type:
|
|
1717
|
-
values: G(
|
|
1718
|
-
}),
|
|
1719
|
-
return (
|
|
1716
|
+
type: o.type,
|
|
1717
|
+
values: G(i)
|
|
1718
|
+
}), ps)
|
|
1719
|
+
return (y.isValid || m.isValid) && (t.mode === "onBlur" ? be && C() : be || C()), bs && f.state.next({ name: d, ...et ? {} : tt });
|
|
1720
1720
|
if (!be && et && f.state.next({ ...s }), t.resolver) {
|
|
1721
1721
|
const { errors: wt } = await M([d]);
|
|
1722
1722
|
if (b(He), w) {
|
|
1723
|
-
const
|
|
1723
|
+
const vs = It(s.errors, r, d), _t = It(wt, r, vs.name || d);
|
|
1724
1724
|
U = _t.error, d = _t.name, oe = ee(wt);
|
|
1725
1725
|
}
|
|
1726
1726
|
} else
|
|
1727
|
-
k([d], !0), U = (await
|
|
1728
|
-
w && (v._f.deps &&
|
|
1727
|
+
k([d], !0), U = (await Ot(v, c.disabled, i, p, t.shouldUseNativeValidation))[d], k([d]), b(He), w && (U ? oe = !1 : (y.isValid || m.isValid) && (oe = await P(r, !0)));
|
|
1728
|
+
w && (v._f.deps && ie(v._f.deps), I(d, oe, U, tt));
|
|
1729
1729
|
}
|
|
1730
|
-
}, Y = (
|
|
1731
|
-
if (S(s.errors,
|
|
1732
|
-
return
|
|
1733
|
-
},
|
|
1730
|
+
}, Y = (o, u) => {
|
|
1731
|
+
if (S(s.errors, u) && o.focus)
|
|
1732
|
+
return o.focus(), 1;
|
|
1733
|
+
}, ie = async (o, u = {}) => {
|
|
1734
1734
|
let d, w;
|
|
1735
|
-
const v = Le(
|
|
1735
|
+
const v = Le(o);
|
|
1736
1736
|
if (t.resolver) {
|
|
1737
|
-
const b = await se(j(
|
|
1738
|
-
d = ee(b), w =
|
|
1739
|
-
} else
|
|
1740
|
-
const E = S(
|
|
1737
|
+
const b = await se(j(o) ? o : v);
|
|
1738
|
+
d = ee(b), w = o ? !v.some((E) => S(b, E)) : d;
|
|
1739
|
+
} else o ? (w = (await Promise.all(v.map(async (b) => {
|
|
1740
|
+
const E = S(r, b);
|
|
1741
1741
|
return await P(E && E._f ? { [b]: E } : E);
|
|
1742
|
-
}))).every(Boolean), !(!w && !s.isValid) && C()) : w = d = await P(
|
|
1742
|
+
}))).every(Boolean), !(!w && !s.isValid) && C()) : w = d = await P(r);
|
|
1743
1743
|
return f.state.next({
|
|
1744
|
-
...!ye(
|
|
1745
|
-
...t.resolver || !
|
|
1744
|
+
...!ye(o) || (y.isValid || m.isValid) && d !== s.isValid ? {} : { name: o },
|
|
1745
|
+
...t.resolver || !o ? { isValid: d } : {},
|
|
1746
1746
|
errors: s.errors
|
|
1747
|
-
}),
|
|
1748
|
-
},
|
|
1749
|
-
const
|
|
1750
|
-
...
|
|
1747
|
+
}), u.shouldFocus && !w && De(r, Y, o ? v : c.mount), w;
|
|
1748
|
+
}, le = (o) => {
|
|
1749
|
+
const u = {
|
|
1750
|
+
...a.mount ? i : n
|
|
1751
1751
|
};
|
|
1752
|
-
return j(
|
|
1753
|
-
}, qe = (
|
|
1754
|
-
invalid: !!S((
|
|
1755
|
-
isDirty: !!S((
|
|
1756
|
-
error: S((
|
|
1757
|
-
isValidating: !!S(s.validatingFields,
|
|
1758
|
-
isTouched: !!S((
|
|
1759
|
-
}), Ce = (
|
|
1760
|
-
|
|
1761
|
-
errors:
|
|
1752
|
+
return j(o) ? u : ye(o) ? S(u, o) : o.map((d) => S(u, d));
|
|
1753
|
+
}, qe = (o, u) => ({
|
|
1754
|
+
invalid: !!S((u || s).errors, o),
|
|
1755
|
+
isDirty: !!S((u || s).dirtyFields, o),
|
|
1756
|
+
error: S((u || s).errors, o),
|
|
1757
|
+
isValidating: !!S(s.validatingFields, o),
|
|
1758
|
+
isTouched: !!S((u || s).touchedFields, o)
|
|
1759
|
+
}), Ce = (o) => {
|
|
1760
|
+
o && Le(o).forEach((u) => Q(s.errors, u)), f.state.next({
|
|
1761
|
+
errors: o ? s.errors : {}
|
|
1762
1762
|
});
|
|
1763
|
-
}, mt = (
|
|
1764
|
-
const w = (S(
|
|
1765
|
-
q(s.errors,
|
|
1763
|
+
}, mt = (o, u, d) => {
|
|
1764
|
+
const w = (S(r, o, { _f: {} })._f || {}).ref, v = S(s.errors, o) || {}, { ref: b, message: E, type: O, ...U } = v;
|
|
1765
|
+
q(s.errors, o, {
|
|
1766
1766
|
...U,
|
|
1767
|
-
...
|
|
1767
|
+
...u,
|
|
1768
1768
|
ref: w
|
|
1769
1769
|
}), f.state.next({
|
|
1770
|
-
name:
|
|
1770
|
+
name: o,
|
|
1771
1771
|
errors: s.errors,
|
|
1772
1772
|
isValid: !1
|
|
1773
1773
|
}), d && d.shouldFocus && w && w.focus && w.focus();
|
|
1774
|
-
},
|
|
1775
|
-
next: (d) => "values" in d &&
|
|
1776
|
-
}) :
|
|
1777
|
-
next: (
|
|
1778
|
-
|
|
1779
|
-
values: { ...
|
|
1774
|
+
}, ds = (o, u) => de(o) ? f.state.subscribe({
|
|
1775
|
+
next: (d) => "values" in d && o(T(void 0, u), d)
|
|
1776
|
+
}) : T(o, u, !0), ht = (o) => f.state.subscribe({
|
|
1777
|
+
next: (u) => {
|
|
1778
|
+
Cr(o.name, u.name, o.exact) && Sr(u, o.formState || y, gs, o.reRenderRoot) && o.callback({
|
|
1779
|
+
values: { ...i },
|
|
1780
1780
|
...s,
|
|
1781
|
-
...
|
|
1782
|
-
defaultValues:
|
|
1781
|
+
...u,
|
|
1782
|
+
defaultValues: n
|
|
1783
1783
|
});
|
|
1784
1784
|
}
|
|
1785
|
-
}).unsubscribe,
|
|
1786
|
-
...
|
|
1787
|
-
...
|
|
1785
|
+
}).unsubscribe, fs = (o) => (a.mount = !0, m = {
|
|
1786
|
+
...m,
|
|
1787
|
+
...o.formState
|
|
1788
1788
|
}, ht({
|
|
1789
|
-
...
|
|
1790
|
-
formState:
|
|
1791
|
-
})), Ye = (
|
|
1792
|
-
for (const d of
|
|
1793
|
-
c.mount.delete(d), c.array.delete(d),
|
|
1789
|
+
...o,
|
|
1790
|
+
formState: m
|
|
1791
|
+
})), Ye = (o, u = {}) => {
|
|
1792
|
+
for (const d of o ? Le(o) : c.mount)
|
|
1793
|
+
c.mount.delete(d), c.array.delete(d), u.keepValue || (Q(r, d), Q(i, d)), !u.keepError && Q(s.errors, d), !u.keepDirty && Q(s.dirtyFields, d), !u.keepTouched && Q(s.touchedFields, d), !u.keepIsValidating && Q(s.validatingFields, d), !t.shouldUnregister && !u.keepDefaultValue && Q(n, d);
|
|
1794
1794
|
f.state.next({
|
|
1795
|
-
values: G(
|
|
1795
|
+
values: G(i)
|
|
1796
1796
|
}), f.state.next({
|
|
1797
1797
|
...s,
|
|
1798
|
-
...
|
|
1799
|
-
}), !
|
|
1800
|
-
}, yt = ({ disabled:
|
|
1801
|
-
(he(
|
|
1802
|
-
}, Xe = (
|
|
1803
|
-
let d = S(
|
|
1804
|
-
const w = he(
|
|
1805
|
-
return q(
|
|
1798
|
+
...u.keepDirty ? { isDirty: ae() } : {}
|
|
1799
|
+
}), !u.keepIsValid && C();
|
|
1800
|
+
}, yt = ({ disabled: o, name: u }) => {
|
|
1801
|
+
(he(o) && a.mount || o || c.disabled.has(u)) && (o ? c.disabled.add(u) : c.disabled.delete(u));
|
|
1802
|
+
}, Xe = (o, u = {}) => {
|
|
1803
|
+
let d = S(r, o);
|
|
1804
|
+
const w = he(u.disabled) || he(t.disabled);
|
|
1805
|
+
return q(r, o, {
|
|
1806
1806
|
...d || {},
|
|
1807
1807
|
_f: {
|
|
1808
|
-
...d && d._f ? d._f : { ref: { name:
|
|
1809
|
-
name:
|
|
1808
|
+
...d && d._f ? d._f : { ref: { name: o } },
|
|
1809
|
+
name: o,
|
|
1810
1810
|
mount: !0,
|
|
1811
|
-
...
|
|
1811
|
+
...u
|
|
1812
1812
|
}
|
|
1813
|
-
}), c.mount.add(
|
|
1814
|
-
disabled: he(
|
|
1815
|
-
name:
|
|
1816
|
-
}) : x(
|
|
1817
|
-
...w ? { disabled:
|
|
1813
|
+
}), c.mount.add(o), d ? yt({
|
|
1814
|
+
disabled: he(u.disabled) ? u.disabled : t.disabled,
|
|
1815
|
+
name: o
|
|
1816
|
+
}) : x(o, !0, u.value), {
|
|
1817
|
+
...w ? { disabled: u.disabled || t.disabled } : {},
|
|
1818
1818
|
...t.progressive ? {
|
|
1819
|
-
required: !!
|
|
1820
|
-
min: $e(
|
|
1821
|
-
max: $e(
|
|
1822
|
-
minLength: $e(
|
|
1823
|
-
maxLength: $e(
|
|
1824
|
-
pattern: $e(
|
|
1819
|
+
required: !!u.required,
|
|
1820
|
+
min: $e(u.min),
|
|
1821
|
+
max: $e(u.max),
|
|
1822
|
+
minLength: $e(u.minLength),
|
|
1823
|
+
maxLength: $e(u.maxLength),
|
|
1824
|
+
pattern: $e(u.pattern)
|
|
1825
1825
|
} : {},
|
|
1826
|
-
name:
|
|
1826
|
+
name: o,
|
|
1827
1827
|
onChange: R,
|
|
1828
1828
|
onBlur: R,
|
|
1829
1829
|
ref: (v) => {
|
|
1830
1830
|
if (v) {
|
|
1831
|
-
Xe(
|
|
1832
|
-
const b = j(v.value) && v.querySelectorAll && v.querySelectorAll("input,select,textarea")[0] || v, E =
|
|
1831
|
+
Xe(o, u), d = S(r, o);
|
|
1832
|
+
const b = j(v.value) && v.querySelectorAll && v.querySelectorAll("input,select,textarea")[0] || v, E = gr(b), O = d._f.refs || [];
|
|
1833
1833
|
if (E ? O.find((U) => U === b) : b === d._f.ref)
|
|
1834
1834
|
return;
|
|
1835
|
-
q(
|
|
1835
|
+
q(r, o, {
|
|
1836
1836
|
_f: {
|
|
1837
1837
|
...d._f,
|
|
1838
1838
|
...E ? {
|
|
1839
1839
|
refs: [
|
|
1840
1840
|
...O.filter(st),
|
|
1841
1841
|
b,
|
|
1842
|
-
...Array.isArray(S(
|
|
1842
|
+
...Array.isArray(S(n, o)) ? [{}] : []
|
|
1843
1843
|
],
|
|
1844
|
-
ref: { type: b.type, name:
|
|
1844
|
+
ref: { type: b.type, name: o }
|
|
1845
1845
|
} : { ref: b }
|
|
1846
1846
|
}
|
|
1847
|
-
}), x(
|
|
1847
|
+
}), x(o, !1, void 0, b);
|
|
1848
1848
|
} else
|
|
1849
|
-
d = S(
|
|
1849
|
+
d = S(r, o, {}), d._f && (d._f.mount = !1), (t.shouldUnregister || u.shouldUnregister) && !(lr(c.array, o) && a.action) && c.unMount.add(o);
|
|
1850
1850
|
}
|
|
1851
1851
|
};
|
|
1852
|
-
}, Ze = () => t.shouldFocusError && De(
|
|
1853
|
-
he(
|
|
1854
|
-
const w = S(
|
|
1855
|
-
w && (
|
|
1856
|
-
v.disabled = w._f.disabled ||
|
|
1852
|
+
}, Ze = () => t.shouldFocusError && De(r, Y, c.mount), ms = (o) => {
|
|
1853
|
+
he(o) && (f.state.next({ disabled: o }), De(r, (u, d) => {
|
|
1854
|
+
const w = S(r, d);
|
|
1855
|
+
w && (u.disabled = w._f.disabled || o, Array.isArray(w._f.refs) && w._f.refs.forEach((v) => {
|
|
1856
|
+
v.disabled = w._f.disabled || o;
|
|
1857
1857
|
}));
|
|
1858
1858
|
}, 0, !1));
|
|
1859
|
-
}, gt = (
|
|
1859
|
+
}, gt = (o, u) => async (d) => {
|
|
1860
1860
|
let w;
|
|
1861
1861
|
d && (d.preventDefault && d.preventDefault(), d.persist && d.persist());
|
|
1862
|
-
let v = G(
|
|
1862
|
+
let v = G(i);
|
|
1863
1863
|
if (f.state.next({
|
|
1864
1864
|
isSubmitting: !0
|
|
1865
1865
|
}), t.resolver) {
|
|
1866
1866
|
const { errors: b, values: E } = await M();
|
|
1867
1867
|
s.errors = b, v = G(E);
|
|
1868
1868
|
} else
|
|
1869
|
-
await P(
|
|
1869
|
+
await P(r);
|
|
1870
1870
|
if (c.disabled.size)
|
|
1871
1871
|
for (const b of c.disabled)
|
|
1872
|
-
|
|
1873
|
-
if (
|
|
1872
|
+
Q(v, b);
|
|
1873
|
+
if (Q(s.errors, "root"), ee(s.errors)) {
|
|
1874
1874
|
f.state.next({
|
|
1875
1875
|
errors: {}
|
|
1876
1876
|
});
|
|
1877
1877
|
try {
|
|
1878
|
-
await
|
|
1878
|
+
await o(v, d);
|
|
1879
1879
|
} catch (b) {
|
|
1880
1880
|
w = b;
|
|
1881
1881
|
}
|
|
1882
1882
|
} else
|
|
1883
|
-
|
|
1883
|
+
u && await u({ ...s.errors }, d), Ze(), setTimeout(Ze);
|
|
1884
1884
|
if (f.state.next({
|
|
1885
1885
|
isSubmitted: !0,
|
|
1886
1886
|
isSubmitting: !1,
|
|
@@ -1889,25 +1889,25 @@ function Fr(e = {}) {
|
|
|
1889
1889
|
errors: s.errors
|
|
1890
1890
|
}), w)
|
|
1891
1891
|
throw w;
|
|
1892
|
-
},
|
|
1893
|
-
S(
|
|
1894
|
-
}, pt = (
|
|
1895
|
-
const d =
|
|
1896
|
-
if (
|
|
1897
|
-
if (
|
|
1892
|
+
}, hs = (o, u = {}) => {
|
|
1893
|
+
S(r, o) && (j(u.defaultValue) ? z(o, G(S(n, o))) : (z(o, u.defaultValue), q(n, o, G(u.defaultValue))), u.keepTouched || Q(s.touchedFields, o), u.keepDirty || (Q(s.dirtyFields, o), s.isDirty = u.defaultValue ? ae(o, G(S(n, o))) : ae()), u.keepError || (Q(s.errors, o), y.isValid && C()), f.state.next({ ...s }));
|
|
1894
|
+
}, pt = (o, u = {}) => {
|
|
1895
|
+
const d = o ? G(o) : n, w = G(d), v = ee(o), b = v ? n : w;
|
|
1896
|
+
if (u.keepDefaultValues || (n = d), !u.keepValues) {
|
|
1897
|
+
if (u.keepDirtyValues) {
|
|
1898
1898
|
const E = /* @__PURE__ */ new Set([
|
|
1899
1899
|
...c.mount,
|
|
1900
|
-
...Object.keys(Fe(
|
|
1900
|
+
...Object.keys(Fe(n, i))
|
|
1901
1901
|
]);
|
|
1902
1902
|
for (const O of Array.from(E))
|
|
1903
|
-
S(s.dirtyFields, O) ? q(b, O, S(
|
|
1903
|
+
S(s.dirtyFields, O) ? q(b, O, S(i, O)) : z(O, S(b, O));
|
|
1904
1904
|
} else {
|
|
1905
|
-
if (ct && j(
|
|
1905
|
+
if (ct && j(o))
|
|
1906
1906
|
for (const E of c.mount) {
|
|
1907
|
-
const O = S(
|
|
1907
|
+
const O = S(r, E);
|
|
1908
1908
|
if (O && O._f) {
|
|
1909
1909
|
const U = Array.isArray(O._f.refs) ? O._f.refs[0] : O._f.ref;
|
|
1910
|
-
if (
|
|
1910
|
+
if (Qe(U)) {
|
|
1911
1911
|
const oe = U.closest("form");
|
|
1912
1912
|
if (oe) {
|
|
1913
1913
|
oe.reset();
|
|
@@ -1916,46 +1916,46 @@ function Fr(e = {}) {
|
|
|
1916
1916
|
}
|
|
1917
1917
|
}
|
|
1918
1918
|
}
|
|
1919
|
-
if (
|
|
1919
|
+
if (u.keepFieldsRef)
|
|
1920
1920
|
for (const E of c.mount)
|
|
1921
1921
|
z(E, S(b, E));
|
|
1922
1922
|
else
|
|
1923
|
-
|
|
1923
|
+
r = {};
|
|
1924
1924
|
}
|
|
1925
|
-
|
|
1925
|
+
i = t.shouldUnregister ? u.keepDefaultValues ? G(n) : {} : G(b), f.array.next({
|
|
1926
1926
|
values: { ...b }
|
|
1927
1927
|
}), f.state.next({
|
|
1928
1928
|
values: { ...b }
|
|
1929
1929
|
});
|
|
1930
1930
|
}
|
|
1931
1931
|
c = {
|
|
1932
|
-
mount:
|
|
1932
|
+
mount: u.keepDirtyValues ? c.mount : /* @__PURE__ */ new Set(),
|
|
1933
1933
|
unMount: /* @__PURE__ */ new Set(),
|
|
1934
1934
|
array: /* @__PURE__ */ new Set(),
|
|
1935
1935
|
disabled: /* @__PURE__ */ new Set(),
|
|
1936
1936
|
watch: /* @__PURE__ */ new Set(),
|
|
1937
1937
|
watchAll: !1,
|
|
1938
1938
|
focus: ""
|
|
1939
|
-
},
|
|
1940
|
-
submitCount:
|
|
1941
|
-
isDirty: v ? !1 :
|
|
1942
|
-
isSubmitted:
|
|
1943
|
-
dirtyFields: v ? {} :
|
|
1944
|
-
touchedFields:
|
|
1945
|
-
errors:
|
|
1946
|
-
isSubmitSuccessful:
|
|
1939
|
+
}, a.mount = !y.isValid || !!u.keepIsValid || !!u.keepDirtyValues, a.watch = !!t.shouldUnregister, f.state.next({
|
|
1940
|
+
submitCount: u.keepSubmitCount ? s.submitCount : 0,
|
|
1941
|
+
isDirty: v ? !1 : u.keepDirty ? s.isDirty : !!(u.keepDefaultValues && !ve(o, n)),
|
|
1942
|
+
isSubmitted: u.keepIsSubmitted ? s.isSubmitted : !1,
|
|
1943
|
+
dirtyFields: v ? {} : u.keepDirtyValues ? u.keepDefaultValues && i ? Fe(n, i) : s.dirtyFields : u.keepDefaultValues && o ? Fe(n, o) : u.keepDirty ? s.dirtyFields : {},
|
|
1944
|
+
touchedFields: u.keepTouched ? s.touchedFields : {},
|
|
1945
|
+
errors: u.keepErrors ? s.errors : {},
|
|
1946
|
+
isSubmitSuccessful: u.keepIsSubmitSuccessful ? s.isSubmitSuccessful : !1,
|
|
1947
1947
|
isSubmitting: !1
|
|
1948
1948
|
});
|
|
1949
|
-
}, bt = (
|
|
1950
|
-
const d = S(
|
|
1949
|
+
}, bt = (o, u) => pt(de(o) ? o(i) : o, u), ys = (o, u = {}) => {
|
|
1950
|
+
const d = S(r, o), w = d && d._f;
|
|
1951
1951
|
if (w) {
|
|
1952
1952
|
const v = w.refs ? w.refs[0] : w.ref;
|
|
1953
|
-
v.focus && (v.focus(),
|
|
1953
|
+
v.focus && (v.focus(), u.shouldSelect && de(v.select) && v.select());
|
|
1954
1954
|
}
|
|
1955
|
-
},
|
|
1955
|
+
}, gs = (o) => {
|
|
1956
1956
|
s = {
|
|
1957
1957
|
...s,
|
|
1958
|
-
...
|
|
1958
|
+
...o
|
|
1959
1959
|
};
|
|
1960
1960
|
}, vt = {
|
|
1961
1961
|
control: {
|
|
@@ -1967,7 +1967,7 @@ function Fr(e = {}) {
|
|
|
1967
1967
|
_subscribe: ht,
|
|
1968
1968
|
_runSchema: M,
|
|
1969
1969
|
_focusError: Ze,
|
|
1970
|
-
_getWatch:
|
|
1970
|
+
_getWatch: T,
|
|
1971
1971
|
_getDirty: ae,
|
|
1972
1972
|
_setValid: C,
|
|
1973
1973
|
_setFieldArray: B,
|
|
@@ -1975,35 +1975,35 @@ function Fr(e = {}) {
|
|
|
1975
1975
|
_setErrors: $,
|
|
1976
1976
|
_getFieldArray: L,
|
|
1977
1977
|
_reset: pt,
|
|
1978
|
-
_resetDefaultValues: () =>
|
|
1979
|
-
bt(
|
|
1978
|
+
_resetDefaultValues: () => de(t.defaultValues) && t.defaultValues().then((o) => {
|
|
1979
|
+
bt(o, t.resetOptions), f.state.next({
|
|
1980
1980
|
isLoading: !1
|
|
1981
1981
|
});
|
|
1982
1982
|
}),
|
|
1983
1983
|
_removeUnmounted: re,
|
|
1984
|
-
_disableForm:
|
|
1984
|
+
_disableForm: ms,
|
|
1985
1985
|
_subjects: f,
|
|
1986
|
-
_proxyFormState:
|
|
1986
|
+
_proxyFormState: y,
|
|
1987
1987
|
get _fields() {
|
|
1988
|
-
return
|
|
1988
|
+
return r;
|
|
1989
1989
|
},
|
|
1990
1990
|
get _formValues() {
|
|
1991
|
-
return
|
|
1991
|
+
return i;
|
|
1992
1992
|
},
|
|
1993
1993
|
get _state() {
|
|
1994
|
-
return
|
|
1994
|
+
return a;
|
|
1995
1995
|
},
|
|
1996
|
-
set _state(
|
|
1997
|
-
|
|
1996
|
+
set _state(o) {
|
|
1997
|
+
a = o;
|
|
1998
1998
|
},
|
|
1999
1999
|
get _defaultValues() {
|
|
2000
|
-
return
|
|
2000
|
+
return n;
|
|
2001
2001
|
},
|
|
2002
2002
|
get _names() {
|
|
2003
2003
|
return c;
|
|
2004
2004
|
},
|
|
2005
|
-
set _names(
|
|
2006
|
-
c =
|
|
2005
|
+
set _names(o) {
|
|
2006
|
+
c = o;
|
|
2007
2007
|
},
|
|
2008
2008
|
get _formState() {
|
|
2009
2009
|
return s;
|
|
@@ -2011,26 +2011,26 @@ function Fr(e = {}) {
|
|
|
2011
2011
|
get _options() {
|
|
2012
2012
|
return t;
|
|
2013
2013
|
},
|
|
2014
|
-
set _options(
|
|
2014
|
+
set _options(o) {
|
|
2015
2015
|
t = {
|
|
2016
2016
|
...t,
|
|
2017
|
-
...
|
|
2017
|
+
...o
|
|
2018
2018
|
};
|
|
2019
2019
|
}
|
|
2020
2020
|
},
|
|
2021
|
-
subscribe:
|
|
2022
|
-
trigger:
|
|
2021
|
+
subscribe: fs,
|
|
2022
|
+
trigger: ie,
|
|
2023
2023
|
register: Xe,
|
|
2024
2024
|
handleSubmit: gt,
|
|
2025
|
-
watch:
|
|
2025
|
+
watch: ds,
|
|
2026
2026
|
setValue: z,
|
|
2027
|
-
getValues:
|
|
2027
|
+
getValues: le,
|
|
2028
2028
|
reset: bt,
|
|
2029
|
-
resetField:
|
|
2029
|
+
resetField: hs,
|
|
2030
2030
|
clearErrors: Ce,
|
|
2031
2031
|
unregister: Ye,
|
|
2032
2032
|
setError: mt,
|
|
2033
|
-
setFocus:
|
|
2033
|
+
setFocus: ys,
|
|
2034
2034
|
getFieldState: qe
|
|
2035
2035
|
};
|
|
2036
2036
|
return {
|
|
@@ -2038,11 +2038,11 @@ function Fr(e = {}) {
|
|
|
2038
2038
|
formControl: vt
|
|
2039
2039
|
};
|
|
2040
2040
|
}
|
|
2041
|
-
function
|
|
2042
|
-
const t =
|
|
2041
|
+
function ls(e = {}) {
|
|
2042
|
+
const t = ne.useRef(void 0), s = ne.useRef(void 0), [r, n] = ne.useState({
|
|
2043
2043
|
isDirty: !1,
|
|
2044
2044
|
isValidating: !1,
|
|
2045
|
-
isLoading:
|
|
2045
|
+
isLoading: de(e.defaultValues),
|
|
2046
2046
|
isSubmitted: !1,
|
|
2047
2047
|
isSubmitting: !1,
|
|
2048
2048
|
isSubmitSuccessful: !1,
|
|
@@ -2054,83 +2054,83 @@ function us(e = {}) {
|
|
|
2054
2054
|
errors: e.errors || {},
|
|
2055
2055
|
disabled: e.disabled || !1,
|
|
2056
2056
|
isReady: !1,
|
|
2057
|
-
defaultValues:
|
|
2057
|
+
defaultValues: de(e.defaultValues) ? void 0 : e.defaultValues
|
|
2058
2058
|
});
|
|
2059
2059
|
if (!t.current)
|
|
2060
2060
|
if (e.formControl)
|
|
2061
2061
|
t.current = {
|
|
2062
2062
|
...e.formControl,
|
|
2063
|
-
formState:
|
|
2064
|
-
}, e.defaultValues && !
|
|
2063
|
+
formState: r
|
|
2064
|
+
}, e.defaultValues && !de(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
|
|
2065
2065
|
else {
|
|
2066
|
-
const { formControl:
|
|
2066
|
+
const { formControl: a, ...c } = xr(e);
|
|
2067
2067
|
t.current = {
|
|
2068
2068
|
...c,
|
|
2069
|
-
formState:
|
|
2069
|
+
formState: r
|
|
2070
2070
|
};
|
|
2071
2071
|
}
|
|
2072
|
-
const
|
|
2073
|
-
return
|
|
2074
|
-
const
|
|
2075
|
-
formState:
|
|
2076
|
-
callback: () =>
|
|
2072
|
+
const i = t.current.control;
|
|
2073
|
+
return i._options = e, mr(() => {
|
|
2074
|
+
const a = i._subscribe({
|
|
2075
|
+
formState: i._proxyFormState,
|
|
2076
|
+
callback: () => n({ ...i._formState }),
|
|
2077
2077
|
reRenderRoot: !0
|
|
2078
2078
|
});
|
|
2079
|
-
return
|
|
2079
|
+
return n((c) => ({
|
|
2080
2080
|
...c,
|
|
2081
2081
|
isReady: !0
|
|
2082
|
-
})),
|
|
2083
|
-
}, [
|
|
2084
|
-
e.mode && (
|
|
2085
|
-
}, [
|
|
2086
|
-
e.errors && (
|
|
2087
|
-
}, [
|
|
2088
|
-
e.shouldUnregister &&
|
|
2089
|
-
values:
|
|
2082
|
+
})), i._formState.isReady = !0, a;
|
|
2083
|
+
}, [i]), ne.useEffect(() => i._disableForm(e.disabled), [i, e.disabled]), ne.useEffect(() => {
|
|
2084
|
+
e.mode && (i._options.mode = e.mode), e.reValidateMode && (i._options.reValidateMode = e.reValidateMode);
|
|
2085
|
+
}, [i, e.mode, e.reValidateMode]), ne.useEffect(() => {
|
|
2086
|
+
e.errors && (i._setErrors(e.errors), i._focusError());
|
|
2087
|
+
}, [i, e.errors]), ne.useEffect(() => {
|
|
2088
|
+
e.shouldUnregister && i._subjects.state.next({
|
|
2089
|
+
values: i._getWatch()
|
|
2090
2090
|
});
|
|
2091
|
-
}, [
|
|
2092
|
-
if (
|
|
2093
|
-
const
|
|
2094
|
-
|
|
2095
|
-
isDirty:
|
|
2091
|
+
}, [i, e.shouldUnregister]), ne.useEffect(() => {
|
|
2092
|
+
if (i._proxyFormState.isDirty) {
|
|
2093
|
+
const a = i._getDirty();
|
|
2094
|
+
a !== r.isDirty && i._subjects.state.next({
|
|
2095
|
+
isDirty: a
|
|
2096
2096
|
});
|
|
2097
2097
|
}
|
|
2098
|
-
}, [
|
|
2099
|
-
e.values && !ve(e.values, s.current) ? (
|
|
2098
|
+
}, [i, r.isDirty]), ne.useEffect(() => {
|
|
2099
|
+
e.values && !ve(e.values, s.current) ? (i._reset(e.values, {
|
|
2100
2100
|
keepFieldsRef: !0,
|
|
2101
|
-
...
|
|
2102
|
-
}), s.current = e.values,
|
|
2103
|
-
}, [
|
|
2104
|
-
|
|
2105
|
-
}), t.current.formState =
|
|
2101
|
+
...i._options.resetOptions
|
|
2102
|
+
}), s.current = e.values, n((a) => ({ ...a }))) : i._resetDefaultValues();
|
|
2103
|
+
}, [i, e.values]), ne.useEffect(() => {
|
|
2104
|
+
i._state.mount || (i._setValid(), i._state.mount = !0), i._state.watch && (i._state.watch = !1, i._subjects.state.next({ ...i._formState })), i._removeUnmounted();
|
|
2105
|
+
}), t.current.formState = fr(r, i), t.current;
|
|
2106
2106
|
}
|
|
2107
|
-
const
|
|
2108
|
-
const { t } = V(), { showStackNotifications: s, showSuccessNotification:
|
|
2109
|
-
defaultValues:
|
|
2110
|
-
mutationFn:
|
|
2111
|
-
formToDto:
|
|
2107
|
+
const Si = (e) => {
|
|
2108
|
+
const { t } = V(), { showStackNotifications: s, showSuccessNotification: r } = ke(), {
|
|
2109
|
+
defaultValues: n,
|
|
2110
|
+
mutationFn: i,
|
|
2111
|
+
formToDto: a,
|
|
2112
2112
|
onError: c,
|
|
2113
|
-
onSuccess:
|
|
2114
|
-
queryKey:
|
|
2115
|
-
onSuccessMessage:
|
|
2116
|
-
} = e, { control:
|
|
2117
|
-
defaultValues:
|
|
2113
|
+
onSuccess: l,
|
|
2114
|
+
queryKey: h,
|
|
2115
|
+
onSuccessMessage: y
|
|
2116
|
+
} = e, { control: m, handleSubmit: f, reset: p, setError: _, getValues: C, setValue: k } = ls({
|
|
2117
|
+
defaultValues: n
|
|
2118
2118
|
}), B = D(
|
|
2119
2119
|
(x) => {
|
|
2120
2120
|
const A = x == null ? void 0 : x.errors, I = [];
|
|
2121
2121
|
return A && A.forEach(([M, se]) => {
|
|
2122
2122
|
const P = document.querySelector(`[name="${M}"]`);
|
|
2123
|
-
(P instanceof HTMLInputElement || P instanceof HTMLTextAreaElement || P instanceof HTMLSelectElement) && (P.focus(), P.classList.add("error"), I.push(t(`_entities:${
|
|
2123
|
+
(P instanceof HTMLInputElement || P instanceof HTMLTextAreaElement || P instanceof HTMLSelectElement) && (P.focus(), P.classList.add("error"), I.push(t(`_entities:${h}.${M}.${se}`)));
|
|
2124
2124
|
}), I;
|
|
2125
2125
|
},
|
|
2126
|
-
[t,
|
|
2126
|
+
[t, h]
|
|
2127
2127
|
), N = D(() => {
|
|
2128
2128
|
document.querySelectorAll("input, textarea, select").forEach((A) => {
|
|
2129
2129
|
A.classList.remove("error");
|
|
2130
2130
|
});
|
|
2131
2131
|
}, []), $ = Me(
|
|
2132
2132
|
{
|
|
2133
|
-
mutationFn:
|
|
2133
|
+
mutationFn: i,
|
|
2134
2134
|
onError: (x) => {
|
|
2135
2135
|
console.error(x);
|
|
2136
2136
|
const A = x;
|
|
@@ -2156,146 +2156,175 @@ const En = (e) => {
|
|
|
2156
2156
|
}
|
|
2157
2157
|
},
|
|
2158
2158
|
onSuccess: async (x) => {
|
|
2159
|
-
pe && await pe.invalidateQueries({ queryKey:
|
|
2160
|
-
message:
|
|
2159
|
+
pe && await pe.invalidateQueries({ queryKey: h }), l && l(x), y && r({
|
|
2160
|
+
message: y
|
|
2161
2161
|
});
|
|
2162
2162
|
}
|
|
2163
2163
|
}
|
|
2164
2164
|
);
|
|
2165
2165
|
return {
|
|
2166
|
-
control:
|
|
2166
|
+
control: m,
|
|
2167
2167
|
getValues: C,
|
|
2168
2168
|
setValue: k,
|
|
2169
2169
|
handleSubmit: f,
|
|
2170
2170
|
onSubmit: (x) => {
|
|
2171
2171
|
N(), $.mutate(
|
|
2172
|
-
|
|
2172
|
+
a ? a(x) : x
|
|
2173
2173
|
);
|
|
2174
2174
|
},
|
|
2175
2175
|
reset: p,
|
|
2176
2176
|
setError: _,
|
|
2177
2177
|
isLoading: $.isPending
|
|
2178
2178
|
};
|
|
2179
|
-
},
|
|
2180
|
-
const { t } = V(), {
|
|
2179
|
+
}, Tr = (e) => {
|
|
2180
|
+
const { t } = V(), {
|
|
2181
|
+
onClick: s,
|
|
2182
|
+
icon: r = Os,
|
|
2183
|
+
sticky: n = !0,
|
|
2184
|
+
hidden: i = !1,
|
|
2185
|
+
multiple: a = !0,
|
|
2186
|
+
disabled: c = !1,
|
|
2187
|
+
id: l = _e.Delete,
|
|
2188
|
+
tooltip: h = t("_pages:common.actions.delete.text")
|
|
2189
|
+
} = e;
|
|
2181
2190
|
return {
|
|
2182
2191
|
action: D(
|
|
2183
|
-
(
|
|
2184
|
-
id:
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
+
(m) => ({
|
|
2193
|
+
id: l,
|
|
2194
|
+
sticky: n,
|
|
2195
|
+
tooltip: h,
|
|
2196
|
+
multiple: a,
|
|
2197
|
+
onClick: () => s([m == null ? void 0 : m.id]),
|
|
2198
|
+
hidden: !!m.deletedAt || i,
|
|
2199
|
+
disabled: !!m.deletedAt || c,
|
|
2200
|
+
icon: /* @__PURE__ */ g(ce, { className: "text-bg-error", icon: r }),
|
|
2201
|
+
onMultipleClick: (f) => s(f.map((p) => p.id))
|
|
2192
2202
|
}),
|
|
2193
|
-
[i,
|
|
2203
|
+
[c, i, r, l, a, s, n, h]
|
|
2194
2204
|
)
|
|
2195
2205
|
};
|
|
2196
|
-
},
|
|
2197
|
-
const { t } = V(), {
|
|
2206
|
+
}, Fr = (e) => {
|
|
2207
|
+
const { t } = V(), {
|
|
2208
|
+
onClick: s,
|
|
2209
|
+
sticky: r = !0,
|
|
2210
|
+
hidden: n = !1,
|
|
2211
|
+
disabled: i = !1,
|
|
2212
|
+
multiple: a = !1,
|
|
2213
|
+
icon: c = Ht,
|
|
2214
|
+
id: l = _e.Restore,
|
|
2215
|
+
tooltip: h = t("_pages:common.actions.restore.text")
|
|
2216
|
+
} = e;
|
|
2198
2217
|
return {
|
|
2199
2218
|
action: D(
|
|
2200
|
-
(
|
|
2201
|
-
id:
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2219
|
+
(m) => ({
|
|
2220
|
+
id: l,
|
|
2221
|
+
sticky: r,
|
|
2222
|
+
tooltip: h,
|
|
2223
|
+
multiple: a,
|
|
2224
|
+
onClick: () => s([m == null ? void 0 : m.id]),
|
|
2225
|
+
hidden: !m.deletedAt || n,
|
|
2226
|
+
disabled: !m.deletedAt || i,
|
|
2227
|
+
icon: /* @__PURE__ */ g(ce, { className: "text-bg-error", icon: c }),
|
|
2228
|
+
onMultipleClick: (f) => s(f.map((p) => p.id))
|
|
2209
2229
|
}),
|
|
2210
|
-
[n, s,
|
|
2230
|
+
[i, n, c, l, a, s, r, h]
|
|
2211
2231
|
)
|
|
2212
2232
|
};
|
|
2213
|
-
},
|
|
2214
|
-
const { t } = V(), {
|
|
2233
|
+
}, Ci = (e) => {
|
|
2234
|
+
const { t } = V(), {
|
|
2235
|
+
onClick: s,
|
|
2236
|
+
hidden: r = !1,
|
|
2237
|
+
sticky: n = !0,
|
|
2238
|
+
disabled: i = !1,
|
|
2239
|
+
id: a = _e.Edit,
|
|
2240
|
+
icon: c = Ms,
|
|
2241
|
+
tooltip: l = t("_pages:common.actions.edit.text")
|
|
2242
|
+
} = e;
|
|
2215
2243
|
return {
|
|
2216
2244
|
action: D(
|
|
2217
|
-
(
|
|
2218
|
-
id:
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2245
|
+
(y) => ({
|
|
2246
|
+
id: a,
|
|
2247
|
+
sticky: n,
|
|
2248
|
+
tooltip: l,
|
|
2249
|
+
onClick: () => s(y == null ? void 0 : y.id),
|
|
2250
|
+
hidden: !!y.deletedAt || r,
|
|
2251
|
+
disabled: !!y.deletedAt || i,
|
|
2252
|
+
icon: /* @__PURE__ */ g(ce, { className: "primary", icon: c })
|
|
2224
2253
|
}),
|
|
2225
|
-
[
|
|
2254
|
+
[i, r, c, a, s, n, l]
|
|
2226
2255
|
)
|
|
2227
2256
|
};
|
|
2228
2257
|
};
|
|
2229
2258
|
var _e = /* @__PURE__ */ ((e) => (e.Add = "add", e.Edit = "edit", e.Delete = "delete", e.Restore = "restore", e.Refresh = "refresh", e.Export = "export", e.Import = "import", e))(_e || {});
|
|
2230
|
-
const
|
|
2259
|
+
const $r = (e) => {
|
|
2231
2260
|
const { t } = V(), {
|
|
2232
2261
|
onClick: s,
|
|
2233
|
-
hidden:
|
|
2234
|
-
disabled:
|
|
2235
|
-
isLoading:
|
|
2262
|
+
hidden: r = !1,
|
|
2263
|
+
disabled: n = !1,
|
|
2264
|
+
isLoading: i = !1
|
|
2236
2265
|
} = e;
|
|
2237
2266
|
return {
|
|
2238
2267
|
action: D(
|
|
2239
2268
|
() => ({
|
|
2240
2269
|
id: _e.Export,
|
|
2241
|
-
hidden:
|
|
2242
|
-
disabled:
|
|
2270
|
+
hidden: r,
|
|
2271
|
+
disabled: n,
|
|
2243
2272
|
icon: /* @__PURE__ */ g(
|
|
2244
2273
|
ce,
|
|
2245
2274
|
{
|
|
2246
|
-
className: `${
|
|
2247
|
-
icon:
|
|
2275
|
+
className: `${i ? "rotate" : ""}`,
|
|
2276
|
+
icon: i ? Bt : Rs
|
|
2248
2277
|
}
|
|
2249
2278
|
),
|
|
2250
2279
|
tooltip: t("_pages:common.actions.export.text"),
|
|
2251
2280
|
onClick: s
|
|
2252
2281
|
}),
|
|
2253
|
-
[
|
|
2282
|
+
[n, r, i, s, t]
|
|
2254
2283
|
)
|
|
2255
2284
|
};
|
|
2256
|
-
},
|
|
2285
|
+
}, Lr = (e) => {
|
|
2257
2286
|
const { t } = V(), {
|
|
2258
2287
|
onClick: s,
|
|
2259
|
-
hidden:
|
|
2260
|
-
disabled:
|
|
2261
|
-
isLoading:
|
|
2288
|
+
hidden: r = !1,
|
|
2289
|
+
disabled: n = !1,
|
|
2290
|
+
isLoading: i = !1
|
|
2262
2291
|
} = e;
|
|
2263
2292
|
return {
|
|
2264
2293
|
action: D(
|
|
2265
2294
|
() => ({
|
|
2266
2295
|
id: _e.Import,
|
|
2267
|
-
hidden:
|
|
2268
|
-
disabled:
|
|
2296
|
+
hidden: r,
|
|
2297
|
+
disabled: n,
|
|
2269
2298
|
icon: /* @__PURE__ */ g(
|
|
2270
2299
|
ce,
|
|
2271
2300
|
{
|
|
2272
|
-
className: `${
|
|
2273
|
-
icon:
|
|
2301
|
+
className: `${i ? "rotate" : ""}`,
|
|
2302
|
+
icon: i ? Bt : Us
|
|
2274
2303
|
}
|
|
2275
2304
|
),
|
|
2276
2305
|
tooltip: t("_pages:common.actions.import.text"),
|
|
2277
2306
|
onClick: s
|
|
2278
2307
|
}),
|
|
2279
|
-
[
|
|
2308
|
+
[n, r, i, s, t]
|
|
2280
2309
|
)
|
|
2281
2310
|
};
|
|
2282
|
-
},
|
|
2283
|
-
const { queryKey: t, onSuccess: s, ...
|
|
2284
|
-
onSuccessMessage:
|
|
2311
|
+
}, Ei = (e) => {
|
|
2312
|
+
const { queryKey: t, onSuccess: s, ...r } = e, { showStackNotifications: n } = ke(), { t: i } = V(), { open: a, onClick: c, close: l, dialogFn: h, isLoading: y } = ts({
|
|
2313
|
+
onSuccessMessage: i("_pages:common.actions.delete.successMessage"),
|
|
2285
2314
|
onError: (f) => {
|
|
2286
2315
|
const p = f;
|
|
2287
2316
|
if (Ge(p))
|
|
2288
|
-
|
|
2317
|
+
n(
|
|
2289
2318
|
p.errors.map(
|
|
2290
2319
|
([_, C]) => ({
|
|
2291
|
-
message:
|
|
2320
|
+
message: i(`_pages:${_}.errors.${C}`),
|
|
2292
2321
|
type: J.error
|
|
2293
2322
|
})
|
|
2294
2323
|
)
|
|
2295
2324
|
);
|
|
2296
2325
|
else if (Je(p)) {
|
|
2297
|
-
const _ = p.message ||
|
|
2298
|
-
|
|
2326
|
+
const _ = p.message || i("_accessibility:errors.500"), C = i(`_accessibility:errors.${p.status}`);
|
|
2327
|
+
n([
|
|
2299
2328
|
{
|
|
2300
2329
|
message: C || _,
|
|
2301
2330
|
type: J.error
|
|
@@ -2306,53 +2335,53 @@ const Dr = (e) => {
|
|
|
2306
2335
|
onSuccess: async (f) => {
|
|
2307
2336
|
await pe.invalidateQueries({ queryKey: t }), s && s(f);
|
|
2308
2337
|
},
|
|
2309
|
-
...
|
|
2310
|
-
}), { action:
|
|
2338
|
+
...r
|
|
2339
|
+
}), { action: m } = Tr({ onClick: c });
|
|
2311
2340
|
return {
|
|
2312
2341
|
onClick: c,
|
|
2313
|
-
title:
|
|
2314
|
-
open:
|
|
2315
|
-
isLoading:
|
|
2316
|
-
handleSubmit: () =>
|
|
2317
|
-
handleClose:
|
|
2318
|
-
action:
|
|
2342
|
+
title: i("_pages:common.actions.delete.dialog.title"),
|
|
2343
|
+
open: a,
|
|
2344
|
+
isLoading: y,
|
|
2345
|
+
handleSubmit: () => h.mutate(),
|
|
2346
|
+
handleClose: l,
|
|
2347
|
+
action: m
|
|
2319
2348
|
};
|
|
2320
|
-
},
|
|
2321
|
-
const [e, t] =
|
|
2349
|
+
}, us = () => {
|
|
2350
|
+
const [e, t] = Z(!1);
|
|
2322
2351
|
return { open: e, setOpen: t, handleClose: () => t(!1), handleOpen: () => t(!0) };
|
|
2323
|
-
},
|
|
2352
|
+
}, ki = (e) => {
|
|
2324
2353
|
const { t } = V(), {
|
|
2325
2354
|
showErrorNotification: s,
|
|
2326
|
-
showStackNotifications:
|
|
2327
|
-
showSuccessNotification:
|
|
2355
|
+
showStackNotifications: r,
|
|
2356
|
+
showSuccessNotification: n
|
|
2328
2357
|
} = ke(), {
|
|
2329
|
-
defaultValues:
|
|
2330
|
-
getFunction:
|
|
2358
|
+
defaultValues: i,
|
|
2359
|
+
getFunction: a,
|
|
2331
2360
|
mutationFn: c,
|
|
2332
|
-
formToDto:
|
|
2333
|
-
dtoToForm:
|
|
2334
|
-
onError:
|
|
2335
|
-
onSuccess:
|
|
2361
|
+
formToDto: l,
|
|
2362
|
+
dtoToForm: h,
|
|
2363
|
+
onError: y,
|
|
2364
|
+
onSuccess: m,
|
|
2336
2365
|
queryKey: f,
|
|
2337
2366
|
onSuccessMessage: p,
|
|
2338
2367
|
title: _
|
|
2339
|
-
} = e, [C, k] =
|
|
2340
|
-
defaultValues:
|
|
2341
|
-
}), { data: re, isLoading: ae } =
|
|
2342
|
-
queryFn: () =>
|
|
2368
|
+
} = e, [C, k] = Z(0), { open: B, handleClose: N, handleOpen: $ } = us(), { control: x, handleSubmit: A, reset: I, setError: M, getValues: se, setValue: P } = ls({
|
|
2369
|
+
defaultValues: i
|
|
2370
|
+
}), { data: re, isLoading: ae } = zs({
|
|
2371
|
+
queryFn: () => a == null ? void 0 : a(C),
|
|
2343
2372
|
queryKey: [...f, C],
|
|
2344
|
-
enabled: !!
|
|
2373
|
+
enabled: !!a && !!f && !!C
|
|
2345
2374
|
});
|
|
2346
|
-
|
|
2347
|
-
re &&
|
|
2375
|
+
fe(() => {
|
|
2376
|
+
re && h && I({ ...h(re) });
|
|
2348
2377
|
}, [re]);
|
|
2349
|
-
const
|
|
2378
|
+
const T = D(
|
|
2350
2379
|
(R) => {
|
|
2351
|
-
const Y = R == null ? void 0 : R.errors,
|
|
2352
|
-
return Y && Y.forEach(([
|
|
2353
|
-
const Ce = document.querySelector(`[name="${
|
|
2354
|
-
(Ce instanceof HTMLInputElement || Ce instanceof HTMLTextAreaElement || Ce instanceof HTMLSelectElement) && (Ce.focus(), Ce.classList.add("error"),
|
|
2355
|
-
}),
|
|
2380
|
+
const Y = R == null ? void 0 : R.errors, ie = [];
|
|
2381
|
+
return Y && Y.forEach(([le, qe]) => {
|
|
2382
|
+
const Ce = document.querySelector(`[name="${le}"]`);
|
|
2383
|
+
(Ce instanceof HTMLInputElement || Ce instanceof HTMLTextAreaElement || Ce instanceof HTMLSelectElement) && (Ce.focus(), Ce.classList.add("error"), ie.push(t(`_entities:${f}.${le}.${qe}`)));
|
|
2384
|
+
}), ie;
|
|
2356
2385
|
},
|
|
2357
2386
|
[t, f]
|
|
2358
2387
|
), L = D(() => {
|
|
@@ -2369,28 +2398,28 @@ const Dr = (e) => {
|
|
|
2369
2398
|
}, [I, L, N]), z = Me({
|
|
2370
2399
|
mutationFn: c,
|
|
2371
2400
|
onError: (R) => {
|
|
2372
|
-
if (console.error(R),
|
|
2401
|
+
if (console.error(R), y) y(R);
|
|
2373
2402
|
else {
|
|
2374
2403
|
const Y = R;
|
|
2375
2404
|
if (Ge(Y)) {
|
|
2376
|
-
const
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
(
|
|
2380
|
-
message:
|
|
2405
|
+
const ie = T(Y);
|
|
2406
|
+
r(
|
|
2407
|
+
ie.map(
|
|
2408
|
+
(le) => ({
|
|
2409
|
+
message: le,
|
|
2381
2410
|
type: J.error
|
|
2382
2411
|
})
|
|
2383
2412
|
)
|
|
2384
2413
|
);
|
|
2385
2414
|
} else if (Je(Y)) {
|
|
2386
|
-
const
|
|
2387
|
-
s({ message:
|
|
2415
|
+
const ie = Y.message || t("_accessibility:errors.500"), le = t(`_accessibility:errors.${Y.status}`);
|
|
2416
|
+
s({ message: le || ie });
|
|
2388
2417
|
} else
|
|
2389
2418
|
s({ message: t("_accessibility:errors.500") });
|
|
2390
2419
|
}
|
|
2391
2420
|
},
|
|
2392
2421
|
onSuccess: async (R) => {
|
|
2393
|
-
await pe.invalidateQueries({ queryKey: f }),
|
|
2422
|
+
await pe.invalidateQueries({ queryKey: f }), m && m(R), n({
|
|
2394
2423
|
message: p
|
|
2395
2424
|
}), W();
|
|
2396
2425
|
}
|
|
@@ -2404,30 +2433,30 @@ const Dr = (e) => {
|
|
|
2404
2433
|
setValue: P,
|
|
2405
2434
|
handleSubmit: A,
|
|
2406
2435
|
onSubmit: (R) => z.mutate(
|
|
2407
|
-
|
|
2436
|
+
l ? l(R) : R
|
|
2408
2437
|
),
|
|
2409
2438
|
reset: I,
|
|
2410
2439
|
setError: M,
|
|
2411
2440
|
title: _,
|
|
2412
2441
|
isLoading: ae || z.isPending
|
|
2413
2442
|
};
|
|
2414
|
-
},
|
|
2415
|
-
const { queryKey: t, onSuccess: s, ...
|
|
2416
|
-
onSuccessMessage:
|
|
2443
|
+
}, Ni = (e) => {
|
|
2444
|
+
const { queryKey: t, onSuccess: s, ...r } = e, { showStackNotifications: n } = ke(), { t: i } = V(), { open: a, onClick: c, close: l, dialogFn: h, isLoading: y } = ts({
|
|
2445
|
+
onSuccessMessage: i("_pages:common.actions.restore.successMessage"),
|
|
2417
2446
|
onError: (f) => {
|
|
2418
2447
|
const p = f;
|
|
2419
2448
|
if (Ge(p))
|
|
2420
|
-
|
|
2449
|
+
n(
|
|
2421
2450
|
p.errors.map(
|
|
2422
2451
|
([_, C]) => ({
|
|
2423
|
-
message:
|
|
2452
|
+
message: i(`_pages:${_}.errors.${C}`),
|
|
2424
2453
|
type: J.error
|
|
2425
2454
|
})
|
|
2426
2455
|
)
|
|
2427
2456
|
);
|
|
2428
2457
|
else if (Je(p)) {
|
|
2429
|
-
const _ = p.message ||
|
|
2430
|
-
|
|
2458
|
+
const _ = p.message || i("_accessibility:errors.500"), C = i(`_accessibility:errors.${p.status}`);
|
|
2459
|
+
n([
|
|
2431
2460
|
{
|
|
2432
2461
|
message: C || _,
|
|
2433
2462
|
type: J.error
|
|
@@ -2438,336 +2467,320 @@ const Dr = (e) => {
|
|
|
2438
2467
|
onSuccess: async (f) => {
|
|
2439
2468
|
await pe.invalidateQueries({ queryKey: t }), s && s(f);
|
|
2440
2469
|
},
|
|
2441
|
-
...
|
|
2442
|
-
}), { action:
|
|
2470
|
+
...r
|
|
2471
|
+
}), { action: m } = Fr({ onClick: c });
|
|
2443
2472
|
return {
|
|
2444
2473
|
onClick: c,
|
|
2445
|
-
title:
|
|
2446
|
-
open:
|
|
2447
|
-
isLoading:
|
|
2448
|
-
handleSubmit: () =>
|
|
2449
|
-
handleClose:
|
|
2450
|
-
action:
|
|
2474
|
+
title: i("_pages:common.actions.restore.dialog.title"),
|
|
2475
|
+
open: a,
|
|
2476
|
+
isLoading: y,
|
|
2477
|
+
handleSubmit: () => h.mutate(),
|
|
2478
|
+
handleClose: l,
|
|
2479
|
+
action: m
|
|
2451
2480
|
};
|
|
2452
2481
|
};
|
|
2453
|
-
function
|
|
2454
|
-
const { t } = V(), { queryKey: s, mutationFn:
|
|
2455
|
-
mutationFn:
|
|
2482
|
+
function Ai(e) {
|
|
2483
|
+
const { t } = V(), { queryKey: s, mutationFn: r, entity: n, fileProcessor: i, onError: a } = e, [c, l] = Z(!1), [h, y] = Z(null), [m, f] = Z(!1), p = Me({
|
|
2484
|
+
mutationFn: r,
|
|
2456
2485
|
onError: (C) => {
|
|
2457
|
-
console.error(C),
|
|
2486
|
+
console.error(C), a == null || a(C);
|
|
2458
2487
|
},
|
|
2459
2488
|
onSuccess: async () => {
|
|
2460
2489
|
pe && await pe.invalidateQueries({ queryKey: s });
|
|
2461
2490
|
}
|
|
2462
|
-
}), { action: _ } =
|
|
2463
|
-
onClick: () =>
|
|
2491
|
+
}), { action: _ } = Lr({
|
|
2492
|
+
onClick: () => l(!0)
|
|
2464
2493
|
});
|
|
2465
2494
|
return {
|
|
2466
2495
|
handleSubmit: async () => {
|
|
2467
|
-
if (!(!
|
|
2496
|
+
if (!(!h || h.length === 0))
|
|
2468
2497
|
try {
|
|
2469
2498
|
await p.mutateAsync({
|
|
2470
|
-
items:
|
|
2471
|
-
override:
|
|
2472
|
-
}),
|
|
2499
|
+
items: h,
|
|
2500
|
+
override: m
|
|
2501
|
+
}), l(!1), y(null), f(!1);
|
|
2473
2502
|
} catch (C) {
|
|
2474
2503
|
console.error(C);
|
|
2475
2504
|
}
|
|
2476
2505
|
},
|
|
2477
2506
|
isLoading: p.isPending,
|
|
2478
|
-
fileProcessor:
|
|
2479
|
-
onFileProcessed: (C) =>
|
|
2507
|
+
fileProcessor: i,
|
|
2508
|
+
onFileProcessed: (C) => y(C),
|
|
2480
2509
|
onOverrideChange: (C) => f(C),
|
|
2481
2510
|
open: c,
|
|
2482
2511
|
title: t("_pages:common.actions.import.dialog.title", {
|
|
2483
|
-
entity: t(`_pages:${
|
|
2512
|
+
entity: t(`_pages:${n}.title`)
|
|
2484
2513
|
}),
|
|
2485
2514
|
handleClose: () => {
|
|
2486
|
-
|
|
2515
|
+
l(!1), y(null);
|
|
2487
2516
|
},
|
|
2488
2517
|
action: _
|
|
2489
2518
|
};
|
|
2490
2519
|
}
|
|
2491
|
-
const
|
|
2520
|
+
const xi = (e) => {
|
|
2492
2521
|
const { showSuccessNotification: t } = ke(), { t: s } = V(), {
|
|
2493
|
-
entity:
|
|
2494
|
-
mutationFn:
|
|
2495
|
-
onError:
|
|
2496
|
-
onSuccess:
|
|
2522
|
+
entity: r,
|
|
2523
|
+
mutationFn: n,
|
|
2524
|
+
onError: i,
|
|
2525
|
+
onSuccess: a,
|
|
2497
2526
|
onSuccessMessage: c = s("_pages:common.actions.export.successMessage")
|
|
2498
|
-
} = e,
|
|
2499
|
-
mutationFn: () =>
|
|
2500
|
-
onError: (
|
|
2501
|
-
console.error(
|
|
2527
|
+
} = e, l = Me({
|
|
2528
|
+
mutationFn: () => n(),
|
|
2529
|
+
onError: (m) => {
|
|
2530
|
+
console.error(m), i && i(m);
|
|
2502
2531
|
},
|
|
2503
|
-
onSuccess: async (
|
|
2504
|
-
const f = JSON.stringify(
|
|
2505
|
-
C.href = _, C.download = `${
|
|
2532
|
+
onSuccess: async (m) => {
|
|
2533
|
+
const f = JSON.stringify(m, null, 2), p = new Blob([f], { type: "application/json" }), _ = URL.createObjectURL(p), C = document.createElement("a");
|
|
2534
|
+
C.href = _, C.download = `${r}.json`, C.click(), URL.revokeObjectURL(_), a && a(m), t({
|
|
2506
2535
|
message: c
|
|
2507
2536
|
});
|
|
2508
2537
|
}
|
|
2509
|
-
}),
|
|
2510
|
-
|
|
2511
|
-
}, [
|
|
2512
|
-
onClick:
|
|
2513
|
-
isLoading:
|
|
2538
|
+
}), h = D(() => {
|
|
2539
|
+
l.mutate();
|
|
2540
|
+
}, [l]), { action: y } = $r({
|
|
2541
|
+
onClick: h,
|
|
2542
|
+
isLoading: l.isPending
|
|
2514
2543
|
});
|
|
2515
2544
|
return {
|
|
2516
|
-
action:
|
|
2545
|
+
action: y
|
|
2517
2546
|
};
|
|
2518
2547
|
};
|
|
2519
|
-
function
|
|
2520
|
-
const [t, s] =
|
|
2521
|
-
const
|
|
2522
|
-
s(
|
|
2548
|
+
function Dr(e) {
|
|
2549
|
+
const [t, s] = Z(!1), r = D(() => {
|
|
2550
|
+
const n = window.scrollY > e;
|
|
2551
|
+
s(n);
|
|
2523
2552
|
}, [e]);
|
|
2524
|
-
return
|
|
2525
|
-
window.removeEventListener("scroll",
|
|
2526
|
-
}), [
|
|
2553
|
+
return fe(() => (window.addEventListener("scroll", r), () => {
|
|
2554
|
+
window.removeEventListener("scroll", r);
|
|
2555
|
+
}), [r]), t;
|
|
2527
2556
|
}
|
|
2528
|
-
const
|
|
2529
|
-
const { showBackButton: t, title: s, actions:
|
|
2530
|
-
return /* @__PURE__ */
|
|
2531
|
-
/* @__PURE__ */
|
|
2557
|
+
const Vr = (e) => {
|
|
2558
|
+
const { showBackButton: t, title: s, actions: r } = e, { t: n } = V(), { navigate: i } = Re();
|
|
2559
|
+
return /* @__PURE__ */ F("div", { className: "page-header", children: [
|
|
2560
|
+
/* @__PURE__ */ F("div", { className: "page-header-left", children: [
|
|
2532
2561
|
t && /* @__PURE__ */ g(
|
|
2533
2562
|
Se,
|
|
2534
2563
|
{
|
|
2535
|
-
icon:
|
|
2536
|
-
onClick: () =>
|
|
2537
|
-
name:
|
|
2564
|
+
icon: qs,
|
|
2565
|
+
onClick: () => i(-1),
|
|
2566
|
+
name: n("_accessibility:buttons.back"),
|
|
2538
2567
|
"data-tooltip-id": "tooltip",
|
|
2539
|
-
"data-tooltip-content":
|
|
2568
|
+
"data-tooltip-content": n("_accessibility:buttons.back")
|
|
2540
2569
|
}
|
|
2541
2570
|
),
|
|
2542
2571
|
/* @__PURE__ */ g("h2", { className: "page-header-title", children: s })
|
|
2543
2572
|
] }),
|
|
2544
|
-
/* @__PURE__ */
|
|
2545
|
-
/* @__PURE__ */ g(
|
|
2546
|
-
/* @__PURE__ */ g(
|
|
2573
|
+
/* @__PURE__ */ F("div", { children: [
|
|
2574
|
+
/* @__PURE__ */ g(xs, { className: "page-header-actions-desktop", actions: r ?? [] }),
|
|
2575
|
+
/* @__PURE__ */ g(Ts, { className: "page-header-actions-mobile", actions: r ?? [] })
|
|
2547
2576
|
] })
|
|
2548
2577
|
] });
|
|
2549
|
-
},
|
|
2578
|
+
}, Ti = (e) => {
|
|
2550
2579
|
const {
|
|
2551
2580
|
title: t,
|
|
2552
2581
|
children: s,
|
|
2553
|
-
addOptions:
|
|
2554
|
-
filterOptions:
|
|
2555
|
-
actions:
|
|
2556
|
-
queryKey:
|
|
2582
|
+
addOptions: r,
|
|
2583
|
+
filterOptions: n,
|
|
2584
|
+
actions: i,
|
|
2585
|
+
queryKey: a,
|
|
2557
2586
|
isLoading: c = !1,
|
|
2558
|
-
isAnimated:
|
|
2559
|
-
showBackButton:
|
|
2560
|
-
} = e, { t:
|
|
2561
|
-
const p = Array.isArray(
|
|
2562
|
-
if (
|
|
2587
|
+
isAnimated: l = !0,
|
|
2588
|
+
showBackButton: h = !1
|
|
2589
|
+
} = e, { t: y } = V(), { countOfFilters: m } = Fs(), f = Ae(() => {
|
|
2590
|
+
const p = Array.isArray(i) ? [...i] : [];
|
|
2591
|
+
if (a) {
|
|
2563
2592
|
const _ = {
|
|
2564
2593
|
id: _e.Refresh,
|
|
2565
|
-
onClick: () => pe.invalidateQueries({ queryKey:
|
|
2566
|
-
icon: /* @__PURE__ */ g(ce, { icon:
|
|
2567
|
-
tooltip:
|
|
2594
|
+
onClick: () => pe.invalidateQueries({ queryKey: a }),
|
|
2595
|
+
icon: /* @__PURE__ */ g(ce, { icon: Ht }),
|
|
2596
|
+
tooltip: y("_pages:common.actions.refresh.text")
|
|
2568
2597
|
};
|
|
2569
2598
|
p.unshift(_);
|
|
2570
2599
|
}
|
|
2571
|
-
if (
|
|
2600
|
+
if (r) {
|
|
2572
2601
|
const _ = {
|
|
2573
|
-
...
|
|
2602
|
+
...r,
|
|
2574
2603
|
id: _e.Add,
|
|
2575
2604
|
icon: /* @__PURE__ */ g(ce, { icon: St })
|
|
2576
2605
|
};
|
|
2577
2606
|
p.unshift(_);
|
|
2578
2607
|
}
|
|
2579
|
-
if (
|
|
2608
|
+
if (n) {
|
|
2580
2609
|
const _ = {
|
|
2581
|
-
...
|
|
2610
|
+
...n,
|
|
2582
2611
|
id: "filter",
|
|
2583
|
-
icon: /* @__PURE__ */ g(ce, { icon:
|
|
2612
|
+
icon: /* @__PURE__ */ g(ce, { icon: Hs }),
|
|
2584
2613
|
children: /* @__PURE__ */ g(
|
|
2585
|
-
|
|
2614
|
+
$s,
|
|
2586
2615
|
{
|
|
2587
|
-
className: `${
|
|
2588
|
-
count:
|
|
2616
|
+
className: `${m > 0 ? "show" : "hide"} `,
|
|
2617
|
+
count: m
|
|
2589
2618
|
}
|
|
2590
2619
|
)
|
|
2591
2620
|
};
|
|
2592
2621
|
p.push(_);
|
|
2593
2622
|
}
|
|
2594
2623
|
return p;
|
|
2595
|
-
}, [
|
|
2596
|
-
return /* @__PURE__ */
|
|
2624
|
+
}, [i, r, m, n, a, y]);
|
|
2625
|
+
return /* @__PURE__ */ F("main", { className: "page-main", children: [
|
|
2597
2626
|
/* @__PURE__ */ g(
|
|
2598
|
-
|
|
2627
|
+
Vr,
|
|
2599
2628
|
{
|
|
2600
|
-
showBackButton:
|
|
2629
|
+
showBackButton: h,
|
|
2601
2630
|
actions: f,
|
|
2602
2631
|
title: t
|
|
2603
2632
|
}
|
|
2604
2633
|
),
|
|
2605
|
-
/* @__PURE__ */ g("div", { className: `page-main-content ${
|
|
2606
|
-
|
|
2634
|
+
/* @__PURE__ */ g("div", { className: `page-main-content ${l ? "appear" : ""}`, children: c ? /* @__PURE__ */ g(xe, { className: "page-loading" }) : s }),
|
|
2635
|
+
r && /* @__PURE__ */ g(
|
|
2607
2636
|
Se,
|
|
2608
2637
|
{
|
|
2609
|
-
icon:
|
|
2610
|
-
color:
|
|
2611
|
-
variant:
|
|
2638
|
+
icon: r.icon ?? St,
|
|
2639
|
+
color: r.color ?? "primary",
|
|
2640
|
+
variant: r.variant ?? "submit",
|
|
2612
2641
|
onClick: () => {
|
|
2613
2642
|
var p;
|
|
2614
|
-
return (p =
|
|
2643
|
+
return (p = r.onClick) == null ? void 0 : p.call(r);
|
|
2615
2644
|
},
|
|
2616
|
-
className: `button fab ${
|
|
2645
|
+
className: `button fab ${r.className ?? ""}`
|
|
2617
2646
|
}
|
|
2618
2647
|
)
|
|
2619
2648
|
] });
|
|
2620
|
-
},
|
|
2649
|
+
}, Fi = (e) => {
|
|
2621
2650
|
const { t } = V(), {
|
|
2622
2651
|
className: s = "",
|
|
2623
|
-
itemClassName:
|
|
2624
|
-
loading:
|
|
2625
|
-
emptyComponent:
|
|
2626
|
-
emptyMessage:
|
|
2652
|
+
itemClassName: r = "",
|
|
2653
|
+
loading: n = !1,
|
|
2654
|
+
emptyComponent: i = null,
|
|
2655
|
+
emptyMessage: a = t("_accessibility:messages.empty"),
|
|
2627
2656
|
renderComponent: c,
|
|
2628
|
-
data:
|
|
2657
|
+
data: l = []
|
|
2629
2658
|
} = e;
|
|
2630
|
-
return
|
|
2631
|
-
}, Or = () => {
|
|
2632
|
-
const [e, t] = X(Nt());
|
|
2633
|
-
return le(() => {
|
|
2634
|
-
const s = window.matchMedia("(min-width: 768px)"), n = () => {
|
|
2635
|
-
t(
|
|
2636
|
-
s.matches ? Nt() : ir()
|
|
2637
|
-
);
|
|
2638
|
-
}, i = setInterval(n, 1e3);
|
|
2639
|
-
return s.addEventListener("change", n), () => {
|
|
2640
|
-
clearInterval(i), s.removeEventListener("change", n);
|
|
2641
|
-
};
|
|
2642
|
-
}, []), /* @__PURE__ */ g("p", { className: "clock", children: e });
|
|
2659
|
+
return n ? /* @__PURE__ */ g(xe, {}) : /* @__PURE__ */ g(Ve, { children: l != null && l.length ? /* @__PURE__ */ g("ul", { className: `pretty-grid-main ${s}`, children: l == null ? void 0 : l.map((h) => /* @__PURE__ */ g("li", { className: `pretty-grid-item ${r}`, children: c(h) }, h.id)) }) : /* @__PURE__ */ g(Ve, { children: i || /* @__PURE__ */ g(Br, { message: a }) }) });
|
|
2643
2660
|
};
|
|
2644
|
-
function
|
|
2661
|
+
function $i(e) {
|
|
2645
2662
|
const { t } = V(), {
|
|
2646
2663
|
openDrawer: s,
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
(ar() ? f.metaKey : f.ctrlKey) && f.shiftKey && f.key.toLowerCase() === "f" && (m(!0), f.preventDefault());
|
|
2664
|
+
showSearch: r = !0,
|
|
2665
|
+
menuButtonProps: n
|
|
2666
|
+
} = e, { searchComponent: i, location: a } = Re(), [c, l] = Z(!1), h = D((m) => {
|
|
2667
|
+
(ir() ? m.metaKey : m.ctrlKey) && m.shiftKey && m.key.toLowerCase() === "f" && (l(!0), m.preventDefault());
|
|
2652
2668
|
}, []);
|
|
2653
|
-
|
|
2669
|
+
fe(() => (window.addEventListener("keydown", h), () => {
|
|
2654
2670
|
window.removeEventListener("keydown", h);
|
|
2655
2671
|
}), [h]);
|
|
2656
|
-
const y =
|
|
2657
|
-
return /* @__PURE__ */
|
|
2658
|
-
|
|
2659
|
-
/* @__PURE__ */
|
|
2660
|
-
/* @__PURE__ */
|
|
2672
|
+
const y = i;
|
|
2673
|
+
return /* @__PURE__ */ F(Ve, { children: [
|
|
2674
|
+
a.pathname !== "/" && !!y && /* @__PURE__ */ g(y, { open: c, onClose: () => l(!1) }),
|
|
2675
|
+
/* @__PURE__ */ F("header", { id: "header", className: "header", children: [
|
|
2676
|
+
/* @__PURE__ */ F("div", { className: "navbar-left", children: [
|
|
2661
2677
|
/* @__PURE__ */ g(
|
|
2662
2678
|
Se,
|
|
2663
2679
|
{
|
|
2664
|
-
...
|
|
2665
|
-
type: (
|
|
2666
|
-
icon: (
|
|
2667
|
-
onClick: (
|
|
2668
|
-
var
|
|
2669
|
-
(
|
|
2680
|
+
...n,
|
|
2681
|
+
type: (n == null ? void 0 : n.type) ?? "button",
|
|
2682
|
+
icon: (n == null ? void 0 : n.icon) ?? Bs,
|
|
2683
|
+
onClick: (m) => {
|
|
2684
|
+
var f;
|
|
2685
|
+
(f = n == null ? void 0 : n.onClick) == null || f.call(n, m), s();
|
|
2670
2686
|
},
|
|
2671
|
-
name: (
|
|
2672
|
-
"aria-label": (
|
|
2673
|
-
className: `navbar-menu animated ${(
|
|
2687
|
+
name: (n == null ? void 0 : n.name) ?? t("_accessibility:buttons.openMenu"),
|
|
2688
|
+
"aria-label": (n == null ? void 0 : n["aria-label"]) ?? t("_accessibility:ariaLabels.openMenu"),
|
|
2689
|
+
className: `navbar-menu animated ${(n == null ? void 0 : n.className) ?? ""}`
|
|
2674
2690
|
}
|
|
2675
2691
|
),
|
|
2676
2692
|
/* @__PURE__ */ g("h1", { className: "poppins navbar-title", children: t("_pages:home.appName") })
|
|
2677
2693
|
] }),
|
|
2678
|
-
/* @__PURE__ */
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
),
|
|
2687
|
-
n && /* @__PURE__ */ g(Or, {})
|
|
2688
|
-
] })
|
|
2694
|
+
/* @__PURE__ */ g("div", { className: "navbar-right", children: r && /* @__PURE__ */ g(
|
|
2695
|
+
Se,
|
|
2696
|
+
{
|
|
2697
|
+
icon: Ks,
|
|
2698
|
+
className: "navbar-search-btn",
|
|
2699
|
+
onClick: () => l(!0)
|
|
2700
|
+
}
|
|
2701
|
+
) })
|
|
2689
2702
|
] })
|
|
2690
2703
|
] });
|
|
2691
2704
|
}
|
|
2692
|
-
const Se = ({ icon: e, ...t }) => /* @__PURE__ */ g(
|
|
2693
|
-
var rt,
|
|
2694
|
-
function
|
|
2695
|
-
if (
|
|
2696
|
-
|
|
2697
|
-
const e = (c,
|
|
2698
|
-
if (
|
|
2705
|
+
const Se = ({ icon: e, ...t }) => /* @__PURE__ */ g(Ls, { icon: /* @__PURE__ */ g(ce, { icon: e }), ...t });
|
|
2706
|
+
var rt, Mt;
|
|
2707
|
+
function Ir() {
|
|
2708
|
+
if (Mt) return rt;
|
|
2709
|
+
Mt = 1;
|
|
2710
|
+
const e = (c, l = "local", h = void 0) => {
|
|
2711
|
+
if (l === "local") {
|
|
2699
2712
|
if (localStorage.getItem(c) !== void 0 && localStorage.getItem(c) !== "undefined" && localStorage.getItem(c) !== null)
|
|
2700
|
-
return
|
|
2701
|
-
} else if (
|
|
2702
|
-
return
|
|
2713
|
+
return h === void 0 || h !== void 0 && localStorage.getItem(c) === h;
|
|
2714
|
+
} else if (l === "session" && sessionStorage.getItem(c) !== void 0 && sessionStorage.getItem(c) !== "undefined" && sessionStorage.getItem(c) !== null)
|
|
2715
|
+
return h === void 0 || h !== void 0 && sessionStorage.getItem(c) === h;
|
|
2703
2716
|
return !1;
|
|
2704
2717
|
}, t = (c) => {
|
|
2705
|
-
const
|
|
2706
|
-
return c.substring(1).split("&").forEach((
|
|
2707
|
-
const [
|
|
2708
|
-
|
|
2709
|
-
}),
|
|
2718
|
+
const l = {};
|
|
2719
|
+
return c.substring(1).split("&").forEach((y) => {
|
|
2720
|
+
const [m, f] = y.split("=");
|
|
2721
|
+
l[m] = f;
|
|
2722
|
+
}), l;
|
|
2710
2723
|
}, s = (c = "") => {
|
|
2711
|
-
if (
|
|
2724
|
+
if (i(c) && c.length) return i(c);
|
|
2712
2725
|
{
|
|
2713
|
-
let
|
|
2714
|
-
if (
|
|
2715
|
-
return c.length &&
|
|
2726
|
+
let l = navigator.language || navigator.userLanguage;
|
|
2727
|
+
if (l.indexOf("en") < 0 && l.indexOf("es") < 0 && (l = "en-US"), l = l.split("-")[0], l)
|
|
2728
|
+
return c.length && n(c, 730, l), l;
|
|
2716
2729
|
}
|
|
2717
2730
|
return "en";
|
|
2718
|
-
},
|
|
2731
|
+
}, r = (c = 0, l = 0, h = window, y = "smooth") => h.scroll({
|
|
2719
2732
|
top: c,
|
|
2720
|
-
left:
|
|
2721
|
-
behavior:
|
|
2722
|
-
}),
|
|
2733
|
+
left: l,
|
|
2734
|
+
behavior: y
|
|
2735
|
+
}), n = (c, l, h, y = "/", m = "Lax") => {
|
|
2723
2736
|
var f = /* @__PURE__ */ new Date();
|
|
2724
|
-
f.setTime(f.getTime() +
|
|
2737
|
+
f.setTime(f.getTime() + l * 24 * 60 * 60 * 1e3);
|
|
2725
2738
|
const p = "; expires=" + f.toUTCString();
|
|
2726
|
-
document.cookie = `${c}=${
|
|
2727
|
-
},
|
|
2728
|
-
const
|
|
2729
|
-
for (let
|
|
2730
|
-
let f =
|
|
2739
|
+
document.cookie = `${c}=${h || ""}${p};path=${y};SameSite=${m}`;
|
|
2740
|
+
}, i = (c) => {
|
|
2741
|
+
const l = `${c}=`, y = decodeURIComponent(document.cookie).split(";");
|
|
2742
|
+
for (let m = 0; m < y.length; m += 1) {
|
|
2743
|
+
let f = y[m];
|
|
2731
2744
|
for (; f.charAt(0) === " "; )
|
|
2732
2745
|
f = f.substring(1);
|
|
2733
|
-
if (f.indexOf(
|
|
2734
|
-
return f.substring(
|
|
2746
|
+
if (f.indexOf(l) === 0)
|
|
2747
|
+
return f.substring(l.length, f.length);
|
|
2735
2748
|
}
|
|
2736
2749
|
return "";
|
|
2737
2750
|
};
|
|
2738
2751
|
return rt = {
|
|
2739
|
-
getCookie:
|
|
2740
|
-
createCookie:
|
|
2752
|
+
getCookie: i,
|
|
2753
|
+
createCookie: n,
|
|
2741
2754
|
deleteCookie: (c) => document.cookie = `${c}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`,
|
|
2742
2755
|
getUserLanguage: s,
|
|
2743
|
-
scrollTo:
|
|
2756
|
+
scrollTo: r,
|
|
2744
2757
|
parseQueries: t,
|
|
2745
2758
|
validation: e
|
|
2746
2759
|
}, rt;
|
|
2747
2760
|
}
|
|
2748
|
-
var
|
|
2749
|
-
const
|
|
2750
|
-
const { t: e } = V(), t =
|
|
2761
|
+
var Pr = Ir();
|
|
2762
|
+
const Li = () => {
|
|
2763
|
+
const { t: e } = V(), t = Dr(200);
|
|
2751
2764
|
return /* @__PURE__ */ g(
|
|
2752
2765
|
Se,
|
|
2753
2766
|
{
|
|
2754
2767
|
variant: "submit",
|
|
2755
2768
|
color: "primary",
|
|
2756
|
-
icon:
|
|
2769
|
+
icon: Qs,
|
|
2757
2770
|
"data-tooltip-id": "tooltip",
|
|
2758
|
-
onClick: () =>
|
|
2771
|
+
onClick: () => Pr.scrollTo(0, 0),
|
|
2759
2772
|
className: `to-top ${t ? "show" : "hide"}`,
|
|
2760
2773
|
"data-tooltip-content": e("_accessibility:buttons.toTop")
|
|
2761
2774
|
}
|
|
2762
2775
|
);
|
|
2763
|
-
}, Be = 300,
|
|
2776
|
+
}, Be = 300, Or = (e) => e ?? J.error, Mr = (e) => {
|
|
2764
2777
|
switch (e) {
|
|
2765
2778
|
case J.error:
|
|
2766
|
-
return Gs;
|
|
2767
|
-
default:
|
|
2768
2779
|
return Ws;
|
|
2780
|
+
default:
|
|
2781
|
+
return js;
|
|
2769
2782
|
}
|
|
2770
|
-
},
|
|
2783
|
+
}, it = (e) => {
|
|
2771
2784
|
switch (e) {
|
|
2772
2785
|
case J.success:
|
|
2773
2786
|
return "!text-success";
|
|
@@ -2778,7 +2791,7 @@ const Vn = () => {
|
|
|
2778
2791
|
default:
|
|
2779
2792
|
return "!text-info";
|
|
2780
2793
|
}
|
|
2781
|
-
},
|
|
2794
|
+
}, Rr = (e) => {
|
|
2782
2795
|
switch (e) {
|
|
2783
2796
|
case J.success:
|
|
2784
2797
|
return "bg-bg-success";
|
|
@@ -2790,164 +2803,164 @@ const Vn = () => {
|
|
|
2790
2803
|
return "bg-bg-info";
|
|
2791
2804
|
}
|
|
2792
2805
|
};
|
|
2793
|
-
function
|
|
2794
|
-
const { t: e } = V(), { notification: t, removeNotification: s } = ke(), [
|
|
2795
|
-
|
|
2796
|
-
|
|
2806
|
+
function Di() {
|
|
2807
|
+
const { t: e } = V(), { notification: t, removeNotification: s } = ke(), [r, n] = Z([]), i = Ie(r);
|
|
2808
|
+
Vs(() => {
|
|
2809
|
+
i.current = r;
|
|
2797
2810
|
});
|
|
2798
|
-
const
|
|
2799
|
-
(
|
|
2800
|
-
|
|
2801
|
-
(
|
|
2802
|
-
),
|
|
2803
|
-
s(
|
|
2804
|
-
}, Be) : (
|
|
2805
|
-
s(),
|
|
2811
|
+
const a = Ie(null), c = D(
|
|
2812
|
+
(l) => {
|
|
2813
|
+
n(
|
|
2814
|
+
(h) => l !== void 0 ? h.map((y) => y.id === l ? { ...y, closing: !0 } : y) : h.map((y) => ({ ...y, closing: !0 }))
|
|
2815
|
+
), l !== void 0 ? setTimeout(() => {
|
|
2816
|
+
s(l), n((h) => h.filter((y) => y.id !== l));
|
|
2817
|
+
}, Be) : (a.current && clearTimeout(a.current), a.current = setTimeout(() => {
|
|
2818
|
+
s(), n([]), a.current = null;
|
|
2806
2819
|
}, Be));
|
|
2807
2820
|
},
|
|
2808
2821
|
[s]
|
|
2809
2822
|
);
|
|
2810
|
-
return
|
|
2811
|
-
let
|
|
2812
|
-
const
|
|
2813
|
-
|
|
2823
|
+
return fe(() => {
|
|
2824
|
+
let l = null;
|
|
2825
|
+
const h = () => {
|
|
2826
|
+
l && clearTimeout(l), a.current && (clearTimeout(a.current), a.current = null);
|
|
2814
2827
|
};
|
|
2815
2828
|
if (t.length === 0)
|
|
2816
|
-
return
|
|
2817
|
-
|
|
2818
|
-
}, 0),
|
|
2819
|
-
|
|
2820
|
-
}, Be),
|
|
2821
|
-
const
|
|
2829
|
+
return i.current.length === 0 ? void 0 : (a.current && clearTimeout(a.current), l = setTimeout(() => {
|
|
2830
|
+
n((p) => p.map((_) => ({ ..._, closing: !0 }))), l = null;
|
|
2831
|
+
}, 0), a.current = setTimeout(() => {
|
|
2832
|
+
n([]), a.current = null;
|
|
2833
|
+
}, Be), h);
|
|
2834
|
+
const y = new Set(i.current.map((p) => p.id));
|
|
2822
2835
|
if (!t.some(
|
|
2823
|
-
(p) => p.id !== void 0 && !
|
|
2836
|
+
(p) => p.id !== void 0 && !y.has(p.id)
|
|
2824
2837
|
)) return;
|
|
2825
|
-
if (
|
|
2838
|
+
if (i.current.length === 0) {
|
|
2826
2839
|
const p = [...t];
|
|
2827
|
-
return
|
|
2828
|
-
|
|
2840
|
+
return l = setTimeout(() => {
|
|
2841
|
+
n(p.map((_) => ({ ..._, closing: !1 }))), l = null;
|
|
2829
2842
|
}, 0), () => {
|
|
2830
|
-
|
|
2843
|
+
l && clearTimeout(l);
|
|
2831
2844
|
};
|
|
2832
2845
|
}
|
|
2833
|
-
|
|
2834
|
-
|
|
2846
|
+
a.current && clearTimeout(a.current), l = setTimeout(() => {
|
|
2847
|
+
n(
|
|
2835
2848
|
(p) => p.every((_) => _.closing) ? p : p.map((_) => ({ ..._, closing: !0 }))
|
|
2836
|
-
),
|
|
2849
|
+
), l = null;
|
|
2837
2850
|
}, 0);
|
|
2838
2851
|
const f = [...t];
|
|
2839
|
-
return
|
|
2840
|
-
|
|
2841
|
-
}, Be),
|
|
2842
|
-
}, [t]),
|
|
2843
|
-
if (!
|
|
2844
|
-
let
|
|
2845
|
-
const
|
|
2846
|
-
|
|
2847
|
-
}, 0),
|
|
2848
|
-
|
|
2852
|
+
return a.current = setTimeout(() => {
|
|
2853
|
+
n(f.map((p) => ({ ...p, closing: !1 }))), a.current = null;
|
|
2854
|
+
}, Be), h;
|
|
2855
|
+
}, [t]), fe(() => {
|
|
2856
|
+
if (!r.length) return;
|
|
2857
|
+
let l;
|
|
2858
|
+
const h = window.setTimeout(() => {
|
|
2859
|
+
l = () => c(), window.addEventListener("click", l);
|
|
2860
|
+
}, 0), y = (m) => {
|
|
2861
|
+
m.key === "Escape" && c();
|
|
2849
2862
|
};
|
|
2850
|
-
return window.addEventListener("keydown",
|
|
2851
|
-
window.clearTimeout(
|
|
2863
|
+
return window.addEventListener("keydown", y), () => {
|
|
2864
|
+
window.clearTimeout(h), l && window.removeEventListener("click", l), window.removeEventListener("keydown", y);
|
|
2852
2865
|
};
|
|
2853
|
-
}, [
|
|
2854
|
-
/* @__PURE__ */ g("div", { className: `notification-portal ${
|
|
2855
|
-
const f =
|
|
2856
|
-
return /* @__PURE__ */
|
|
2866
|
+
}, [r.length, c]), Kt(
|
|
2867
|
+
/* @__PURE__ */ g("div", { className: `notification-portal ${r.length ? "active" : ""}`, children: r.map(({ id: l, type: h, message: y, closing: m }) => {
|
|
2868
|
+
const f = Or(h);
|
|
2869
|
+
return /* @__PURE__ */ F(
|
|
2857
2870
|
"div",
|
|
2858
2871
|
{
|
|
2859
|
-
className: `notification ${
|
|
2872
|
+
className: `notification ${m ? "closing" : ""} ${Rr(f)}`,
|
|
2860
2873
|
onClick: (p) => p.stopPropagation(),
|
|
2861
2874
|
children: [
|
|
2862
|
-
/* @__PURE__ */
|
|
2875
|
+
/* @__PURE__ */ F("div", { className: "notification-body", children: [
|
|
2863
2876
|
/* @__PURE__ */ g(
|
|
2864
2877
|
ce,
|
|
2865
2878
|
{
|
|
2866
|
-
icon:
|
|
2867
|
-
className: `notification-icon ${
|
|
2879
|
+
icon: Mr(f),
|
|
2880
|
+
className: `notification-icon ${it(f)}`
|
|
2868
2881
|
}
|
|
2869
2882
|
),
|
|
2870
|
-
/* @__PURE__ */ g("p", { className: `notification-text ${
|
|
2883
|
+
/* @__PURE__ */ g("p", { className: `notification-text ${it(f)}`, children: y })
|
|
2871
2884
|
] }),
|
|
2872
2885
|
/* @__PURE__ */ g(
|
|
2873
2886
|
Se,
|
|
2874
2887
|
{
|
|
2875
2888
|
type: "button",
|
|
2876
|
-
icon:
|
|
2889
|
+
icon: qt,
|
|
2877
2890
|
color: "error",
|
|
2878
2891
|
className: "notification-close group",
|
|
2879
2892
|
onClick: (p) => {
|
|
2880
|
-
p.stopPropagation(),
|
|
2893
|
+
p.stopPropagation(), l !== void 0 && c(l);
|
|
2881
2894
|
},
|
|
2882
|
-
iconClassName: `${
|
|
2895
|
+
iconClassName: `${it(f)} notification-close-icon`,
|
|
2883
2896
|
name: e("_accessibility:buttons.closeNotification"),
|
|
2884
2897
|
"aria-label": e("_accessibility:ariaLabels.closeNotification")
|
|
2885
2898
|
}
|
|
2886
2899
|
)
|
|
2887
2900
|
]
|
|
2888
2901
|
},
|
|
2889
|
-
|
|
2902
|
+
l
|
|
2890
2903
|
);
|
|
2891
2904
|
}) }),
|
|
2892
2905
|
document.body
|
|
2893
2906
|
);
|
|
2894
2907
|
}
|
|
2895
|
-
function
|
|
2908
|
+
function Vi(e) {
|
|
2896
2909
|
const { className: t, ...s } = e;
|
|
2897
2910
|
return /* @__PURE__ */ g("div", { className: "splash-screen", children: /* @__PURE__ */ g(xe, { className: `blur-appear ${t ? ` ${t}` : ""}`, ...s }) });
|
|
2898
2911
|
}
|
|
2899
|
-
const
|
|
2900
|
-
const { id: t, active: s, onClick:
|
|
2912
|
+
const Ur = (e) => {
|
|
2913
|
+
const { id: t, active: s, onClick: r, children: n, to: i } = e, { linkComponent: a } = Re();
|
|
2901
2914
|
return /* @__PURE__ */ g(
|
|
2902
|
-
|
|
2915
|
+
a,
|
|
2903
2916
|
{
|
|
2904
|
-
to:
|
|
2905
|
-
onClick: () =>
|
|
2917
|
+
to: i ?? `#${t}`,
|
|
2918
|
+
onClick: () => r(),
|
|
2906
2919
|
className: `button submit tab ${s ? "primary" : "outlined"}`,
|
|
2907
|
-
children:
|
|
2920
|
+
children: n
|
|
2908
2921
|
}
|
|
2909
2922
|
);
|
|
2910
|
-
},
|
|
2911
|
-
var
|
|
2923
|
+
}, qr = (e) => {
|
|
2924
|
+
var l;
|
|
2912
2925
|
const {
|
|
2913
2926
|
tabs: t = [],
|
|
2914
2927
|
defaultTab: s,
|
|
2915
|
-
className:
|
|
2916
|
-
tabsContainerClassName:
|
|
2917
|
-
} = e, [
|
|
2918
|
-
return /* @__PURE__ */
|
|
2928
|
+
className: r = "",
|
|
2929
|
+
tabsContainerClassName: n = ""
|
|
2930
|
+
} = e, [i, a] = Z(s ?? ((l = t[0]) == null ? void 0 : l.id)), c = Ae(() => t.find((h) => h.id === i), [t, i]);
|
|
2931
|
+
return /* @__PURE__ */ F("div", { className: `tabs-layout-main ${r}`, children: [
|
|
2919
2932
|
/* @__PURE__ */ g(
|
|
2920
2933
|
"ul",
|
|
2921
2934
|
{
|
|
2922
|
-
className: `horizontal tabs tabs-container ${
|
|
2923
|
-
children: t.map(({ id:
|
|
2924
|
-
|
|
2935
|
+
className: `horizontal tabs tabs-container ${n}`,
|
|
2936
|
+
children: t.map(({ id: h, to: y, label: m }) => /* @__PURE__ */ g("li", { children: /* @__PURE__ */ g(
|
|
2937
|
+
Ur,
|
|
2925
2938
|
{
|
|
2926
|
-
onClick: () =>
|
|
2927
|
-
id:
|
|
2928
|
-
to:
|
|
2939
|
+
onClick: () => a(h),
|
|
2940
|
+
id: h,
|
|
2941
|
+
to: y ?? "",
|
|
2929
2942
|
siblings: t.length > 1,
|
|
2930
|
-
active:
|
|
2931
|
-
children:
|
|
2943
|
+
active: i === h,
|
|
2944
|
+
children: m
|
|
2932
2945
|
}
|
|
2933
|
-
) },
|
|
2946
|
+
) }, h))
|
|
2934
2947
|
}
|
|
2935
2948
|
),
|
|
2936
2949
|
c == null ? void 0 : c.content
|
|
2937
2950
|
] });
|
|
2938
|
-
},
|
|
2951
|
+
}, Hr = (e) => {
|
|
2939
2952
|
const {
|
|
2940
2953
|
translation: t,
|
|
2941
2954
|
onClickNext: s,
|
|
2942
|
-
image:
|
|
2943
|
-
alt:
|
|
2944
|
-
final:
|
|
2945
|
-
} = e, { setGuestMode:
|
|
2946
|
-
return /* @__PURE__ */
|
|
2947
|
-
|
|
2948
|
-
/* @__PURE__ */ g("h2", { className: "step-title", children:
|
|
2949
|
-
/* @__PURE__ */ g("p", { className: "step-body", children:
|
|
2950
|
-
/* @__PURE__ */ g("div", { className: "step-actions", children:
|
|
2955
|
+
image: r = "",
|
|
2956
|
+
alt: n = "",
|
|
2957
|
+
final: i = !1
|
|
2958
|
+
} = e, { setGuestMode: a } = Xt(), { navigate: c } = Re(), { t: l } = V();
|
|
2959
|
+
return /* @__PURE__ */ F("div", { className: "big-appear step-container", children: [
|
|
2960
|
+
r && /* @__PURE__ */ g("img", { src: r, alt: n }),
|
|
2961
|
+
/* @__PURE__ */ g("h2", { className: "step-title", children: l(`_pages:onboarding.${t}.title`) }),
|
|
2962
|
+
/* @__PURE__ */ g("p", { className: "step-body", children: l(`_pages:onboarding.${t}.body`) }),
|
|
2963
|
+
/* @__PURE__ */ g("div", { className: "step-actions", children: i ? /* @__PURE__ */ F(Ve, { children: [
|
|
2951
2964
|
/* @__PURE__ */ g(
|
|
2952
2965
|
we,
|
|
2953
2966
|
{
|
|
@@ -2955,10 +2968,10 @@ const Br = (e) => {
|
|
|
2955
2968
|
className: "step-button",
|
|
2956
2969
|
variant: "outlined",
|
|
2957
2970
|
onClick: () => {
|
|
2958
|
-
|
|
2971
|
+
a(!0), c("/");
|
|
2959
2972
|
},
|
|
2960
|
-
"aria-label":
|
|
2961
|
-
children:
|
|
2973
|
+
"aria-label": l("_accessibility:ariaLabels.start"),
|
|
2974
|
+
children: l("_accessibility:buttons.startAsGuest")
|
|
2962
2975
|
}
|
|
2963
2976
|
),
|
|
2964
2977
|
/* @__PURE__ */ g(
|
|
@@ -2967,12 +2980,12 @@ const Br = (e) => {
|
|
|
2967
2980
|
color: "primary",
|
|
2968
2981
|
variant: "submit",
|
|
2969
2982
|
className: "step-button",
|
|
2970
|
-
"aria-label":
|
|
2983
|
+
"aria-label": l("_accessibility:ariaLabels.start"),
|
|
2971
2984
|
onClick: () => c("/auth/sign-in"),
|
|
2972
|
-
children:
|
|
2985
|
+
children: l("_accessibility:buttons.signIn")
|
|
2973
2986
|
}
|
|
2974
2987
|
)
|
|
2975
|
-
] }) : /* @__PURE__ */
|
|
2988
|
+
] }) : /* @__PURE__ */ F(Ve, { children: [
|
|
2976
2989
|
/* @__PURE__ */ g(
|
|
2977
2990
|
we,
|
|
2978
2991
|
{
|
|
@@ -2980,8 +2993,8 @@ const Br = (e) => {
|
|
|
2980
2993
|
className: "step-button",
|
|
2981
2994
|
variant: "outlined",
|
|
2982
2995
|
onClick: () => c("/auth/sign-in"),
|
|
2983
|
-
"aria-label":
|
|
2984
|
-
children:
|
|
2996
|
+
"aria-label": l("_accessibility:ariaLabels.skip"),
|
|
2997
|
+
children: l("_accessibility:buttons.skip")
|
|
2985
2998
|
}
|
|
2986
2999
|
),
|
|
2987
3000
|
/* @__PURE__ */ g(
|
|
@@ -2991,113 +3004,113 @@ const Br = (e) => {
|
|
|
2991
3004
|
className: "step-button",
|
|
2992
3005
|
variant: "outlined",
|
|
2993
3006
|
onClick: () => s(),
|
|
2994
|
-
"aria-label":
|
|
2995
|
-
children:
|
|
3007
|
+
"aria-label": l("_accessibility:ariaLabels.next"),
|
|
3008
|
+
children: l("_accessibility:buttons.next")
|
|
2996
3009
|
}
|
|
2997
3010
|
)
|
|
2998
3011
|
] }) })
|
|
2999
3012
|
] });
|
|
3000
|
-
},
|
|
3001
|
-
const { steps: t } = e, [s,
|
|
3002
|
-
id:
|
|
3013
|
+
}, Ii = (e) => {
|
|
3014
|
+
const { steps: t } = e, [s, r] = Z(1), n = Ae(() => t.map((i, a) => ({
|
|
3015
|
+
id: a + 1,
|
|
3003
3016
|
label: "",
|
|
3004
3017
|
content: /* @__PURE__ */ g(
|
|
3005
|
-
|
|
3018
|
+
Hr,
|
|
3006
3019
|
{
|
|
3007
|
-
translation:
|
|
3008
|
-
final:
|
|
3009
|
-
onClickNext: () =>
|
|
3020
|
+
translation: i,
|
|
3021
|
+
final: a === t.length - 1,
|
|
3022
|
+
onClickNext: () => r((c) => c + 1)
|
|
3010
3023
|
}
|
|
3011
3024
|
)
|
|
3012
3025
|
})), [t]);
|
|
3013
|
-
return /* @__PURE__ */ g("div", { className: "onboarding-main", children: /* @__PURE__ */ g(
|
|
3014
|
-
},
|
|
3026
|
+
return /* @__PURE__ */ g("div", { className: "onboarding-main", children: /* @__PURE__ */ g(qr, { defaultTab: s, tabs: n }) });
|
|
3027
|
+
}, Br = (e) => {
|
|
3015
3028
|
const {
|
|
3016
3029
|
message: t,
|
|
3017
3030
|
messageProps: s = { className: "empty-message" },
|
|
3018
|
-
action:
|
|
3019
|
-
iconProps:
|
|
3031
|
+
action: r,
|
|
3032
|
+
iconProps: n
|
|
3020
3033
|
} = e;
|
|
3021
|
-
return /* @__PURE__ */
|
|
3022
|
-
|
|
3034
|
+
return /* @__PURE__ */ F("div", { className: "empty-container", children: [
|
|
3035
|
+
n && /* @__PURE__ */ g(ce, { ...n }),
|
|
3023
3036
|
/* @__PURE__ */ g("p", { ...s, children: t }),
|
|
3024
|
-
|
|
3037
|
+
r && /* @__PURE__ */ g(Ds, { showTooltips: !1, showText: !0, ...r })
|
|
3025
3038
|
] });
|
|
3026
3039
|
};
|
|
3027
3040
|
export {
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3041
|
+
Wt as APIClient,
|
|
3042
|
+
Ri as Action,
|
|
3043
|
+
Ui as Actions,
|
|
3044
|
+
qi as ActionsDropdown,
|
|
3032
3045
|
Se as AppIconButton,
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3046
|
+
rr as AuthClient,
|
|
3047
|
+
gi as AuthProvider,
|
|
3048
|
+
ci as BaseClient,
|
|
3049
|
+
Hi as Button,
|
|
3050
|
+
pi as ConfigProvider,
|
|
3051
|
+
ni as ConfirmationDialog,
|
|
3039
3052
|
at as Dialog,
|
|
3040
3053
|
ot as DialogActions,
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3054
|
+
vi as Drawer,
|
|
3055
|
+
es as DrawerMenuContext,
|
|
3056
|
+
bi as DrawerMenuProvider,
|
|
3057
|
+
Br as Empty,
|
|
3058
|
+
wi as Error,
|
|
3059
|
+
si as FormContainer,
|
|
3060
|
+
ii as FormDialog,
|
|
3048
3061
|
_e as GlobalActions,
|
|
3049
|
-
|
|
3062
|
+
oi as IManager,
|
|
3050
3063
|
Se as IconButton,
|
|
3051
|
-
|
|
3052
|
-
|
|
3064
|
+
ai as ImportDialog,
|
|
3065
|
+
yi as ManagerProvider,
|
|
3053
3066
|
te as Methods,
|
|
3054
|
-
|
|
3055
|
-
|
|
3067
|
+
$i as Navbar,
|
|
3068
|
+
Di as Notification,
|
|
3056
3069
|
J as NotificationEnumType,
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3070
|
+
hi as NotificationProvider,
|
|
3071
|
+
Ii as Onboarding,
|
|
3072
|
+
Ti as Page,
|
|
3073
|
+
ti as ParagraphInput,
|
|
3074
|
+
ri as PasswordInput,
|
|
3075
|
+
Fi as PrettyGrid,
|
|
3076
|
+
Vi as SplashScreen,
|
|
3077
|
+
Hr as Step,
|
|
3078
|
+
Ur as Tab,
|
|
3079
|
+
qr as TabsLayout,
|
|
3080
|
+
Li as ToTop,
|
|
3081
|
+
sr as buildQueryUrl,
|
|
3082
|
+
li as enumToKeyValueArray,
|
|
3083
|
+
fi as formatForDatetimeLocal,
|
|
3084
|
+
Gt as fromLocal,
|
|
3085
|
+
ui as getFormattedDateTime,
|
|
3086
|
+
di as getShortFormattedDateTime,
|
|
3074
3087
|
Je as isHttpError,
|
|
3075
|
-
|
|
3088
|
+
ir as isMac,
|
|
3076
3089
|
Ge as isValidationError,
|
|
3077
3090
|
Te as makeRequest,
|
|
3078
|
-
|
|
3079
|
-
|
|
3091
|
+
mi as mapValidationErrors,
|
|
3092
|
+
jt as parseQueries,
|
|
3080
3093
|
pe as queryClient,
|
|
3081
3094
|
kt as removeFromLocal,
|
|
3082
3095
|
Et as toLocal,
|
|
3083
|
-
|
|
3096
|
+
Xt as useAuth,
|
|
3084
3097
|
Re as useConfig,
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3098
|
+
ts as useConfirmationForm,
|
|
3099
|
+
Tr as useDeleteAction,
|
|
3100
|
+
Ei as useDeleteDialog,
|
|
3101
|
+
us as useDialog,
|
|
3102
|
+
ar as useDrawerMenu,
|
|
3103
|
+
Ci as useEditAction,
|
|
3104
|
+
$r as useExportAction,
|
|
3105
|
+
xi as useExportActionMutate,
|
|
3106
|
+
ki as useFormDialog,
|
|
3107
|
+
Lr as useImportAction,
|
|
3108
|
+
Ai as useImportDialog,
|
|
3109
|
+
nr as useManager,
|
|
3097
3110
|
ke as useNotification,
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3111
|
+
Si as usePostForm,
|
|
3112
|
+
Fr as useRestoreAction,
|
|
3113
|
+
Ni as useRestoreDialog,
|
|
3114
|
+
Dr as useScrollTrigger,
|
|
3115
|
+
_i as useTimeAge
|
|
3103
3116
|
};
|