@sito/dashboard-app 0.0.54 → 0.0.56
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 +155 -4
- package/dist/dashboard-app.cjs +1 -1
- package/dist/dashboard-app.js +1375 -1422
- package/dist/hooks/dialogs/types.d.ts +13 -8
- package/dist/hooks/dialogs/useFormDialog.d.ts +2 -10
- package/dist/hooks/forms/types.d.ts +1 -1
- package/dist/main.css +1 -1
- package/package.json +4 -4
package/dist/dashboard-app.js
CHANGED
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var Ye = Object.defineProperty;
|
|
2
|
+
var Xe = (r, e, s) => e in r ? Ye(r, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[e] = s;
|
|
3
|
+
var N = (r, e, s) => Xe(r, typeof e != "symbol" ? e + "" : e, s);
|
|
4
4
|
import "./main.css";
|
|
5
|
-
import { State as
|
|
5
|
+
import { State as Ze, inputStateClassName as et, labelStateClassName as tt, helperTextStateClassName as st, useTranslation as k, Button as H, Loading as re, TextInput as rt, FileInput as nt, IconButton as ot, Actions as it, ActionsDropdown as at, useTableOptions as ct, Badge as lt, Action as ut } from "@sito/dashboard";
|
|
6
6
|
export * from "@sito/dashboard";
|
|
7
|
-
import { Action as
|
|
8
|
-
import { jsxs as
|
|
9
|
-
import { FontAwesomeIcon as
|
|
10
|
-
import { forwardRef as
|
|
11
|
-
import { faEyeSlash as
|
|
12
|
-
import { createPortal as
|
|
13
|
-
import { QueryClient as
|
|
14
|
-
import { faSadTear as
|
|
15
|
-
import { useForm as
|
|
16
|
-
const
|
|
7
|
+
import { Action as fr, Actions as pr, ActionsDropdown as gr, Button as br } from "@sito/dashboard";
|
|
8
|
+
import { jsxs as v, jsx as h, Fragment as ae } from "react/jsx-runtime";
|
|
9
|
+
import { FontAwesomeIcon as q } from "@fortawesome/react-fontawesome";
|
|
10
|
+
import { forwardRef as $e, useState as R, useCallback as S, useEffect as O, useReducer as xe, useRef as F, useMemo as V, createContext as Y, useContext as X, useLayoutEffect as dt } from "react";
|
|
11
|
+
import { faEyeSlash as mt, faEye as ht, faClose as De, faTrash as ft, faRotateLeft as Le, faPencil as pt, faCircleNotch as Re, faCloudArrowDown as gt, faCloudUpload as bt, faArrowUp as yt, faArrowLeft as wt, faAdd as ve, faFilter as St, faBars as Ct, faSearch as Tt, faCircleCheck as vt, faWarning as Et } from "@fortawesome/free-solid-svg-icons";
|
|
12
|
+
import { createPortal as Ie } from "react-dom";
|
|
13
|
+
import { QueryClient as kt, QueryClientProvider as _e, useMutation as ne, useQueryClient as Z, useQuery as Nt } from "@tanstack/react-query";
|
|
14
|
+
import { faSadTear as At } from "@fortawesome/free-regular-svg-icons";
|
|
15
|
+
import { useForm as Pe } from "react-hook-form";
|
|
16
|
+
const Ee = (r) => r == null ? !1 : `${r}`.length > 0, vs = $e(function(r, e) {
|
|
17
17
|
const {
|
|
18
18
|
value: s,
|
|
19
19
|
defaultValue: t,
|
|
20
|
-
onChange:
|
|
21
|
-
state: o =
|
|
20
|
+
onChange: n,
|
|
21
|
+
state: o = Ze.default,
|
|
22
22
|
name: i = "",
|
|
23
23
|
id: c = "",
|
|
24
24
|
label: a = "",
|
|
25
|
-
disabled:
|
|
26
|
-
required:
|
|
25
|
+
disabled: l = !1,
|
|
26
|
+
required: u = !1,
|
|
27
27
|
containerClassName: d = "",
|
|
28
28
|
inputClassName: m = "",
|
|
29
|
-
labelClassName:
|
|
30
|
-
helperText:
|
|
31
|
-
helperTextClassName:
|
|
29
|
+
labelClassName: f = "",
|
|
30
|
+
helperText: p = "",
|
|
31
|
+
helperTextClassName: b = "",
|
|
32
32
|
...g
|
|
33
|
-
} =
|
|
34
|
-
() =>
|
|
35
|
-
),
|
|
36
|
-
|
|
33
|
+
} = r, y = s !== void 0, [C, w] = R(
|
|
34
|
+
() => Ee(t)
|
|
35
|
+
), E = y ? Ee(s) : C, A = (U) => {
|
|
36
|
+
y || w(U.currentTarget.value.length > 0), n == null || n(U);
|
|
37
37
|
};
|
|
38
|
-
return /* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ v("div", { className: `form-paragraph-container group ${d}`, children: [
|
|
39
|
+
/* @__PURE__ */ h(
|
|
40
40
|
"textarea",
|
|
41
41
|
{
|
|
42
42
|
ref: e,
|
|
43
43
|
name: i,
|
|
44
44
|
id: c,
|
|
45
|
-
className: `text-input text-area form-paragraph-textarea peer ${
|
|
46
|
-
required:
|
|
45
|
+
className: `text-input text-area form-paragraph-textarea peer ${et(o)} ${E ? "has-value" : ""} ${g.placeholder ? "has-placeholder" : ""} ${m}`,
|
|
46
|
+
required: u,
|
|
47
47
|
defaultValue: t,
|
|
48
|
-
...
|
|
49
|
-
onChange:
|
|
50
|
-
disabled:
|
|
48
|
+
...y ? { value: s } : {},
|
|
49
|
+
onChange: A,
|
|
50
|
+
disabled: l,
|
|
51
51
|
...g
|
|
52
52
|
}
|
|
53
53
|
),
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ v(
|
|
55
55
|
"label",
|
|
56
56
|
{
|
|
57
57
|
htmlFor: c,
|
|
58
|
-
className: `text-input-label ${
|
|
58
|
+
className: `text-input-label ${tt(o)} ${f}`,
|
|
59
59
|
children: [
|
|
60
60
|
a,
|
|
61
|
-
|
|
61
|
+
u ? " *" : ""
|
|
62
62
|
]
|
|
63
63
|
}
|
|
64
64
|
),
|
|
65
|
-
!!
|
|
65
|
+
!!p && /* @__PURE__ */ h(
|
|
66
66
|
"p",
|
|
67
67
|
{
|
|
68
|
-
className: `text-input-helper-text ${
|
|
69
|
-
children:
|
|
68
|
+
className: `text-input-helper-text ${st(o)} ${b}`,
|
|
69
|
+
children: p
|
|
70
70
|
}
|
|
71
71
|
)
|
|
72
72
|
] });
|
|
73
|
-
}),
|
|
74
|
-
const { t: e } =
|
|
73
|
+
}), Es = (r) => {
|
|
74
|
+
const { t: e } = k(), {
|
|
75
75
|
children: s,
|
|
76
76
|
handleSubmit: t,
|
|
77
|
-
onSubmit:
|
|
77
|
+
onSubmit: n,
|
|
78
78
|
isLoading: o = !1,
|
|
79
79
|
buttonEnd: i = !0,
|
|
80
80
|
reset: c
|
|
81
|
-
} =
|
|
82
|
-
return /* @__PURE__ */
|
|
81
|
+
} = r;
|
|
82
|
+
return /* @__PURE__ */ v("form", { className: "form-container", onSubmit: t(n), children: [
|
|
83
83
|
s,
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
|
|
84
|
+
/* @__PURE__ */ v("div", { className: `form-actions ${i ? "end" : ""}`, children: [
|
|
85
|
+
/* @__PURE__ */ v(
|
|
86
|
+
H,
|
|
87
87
|
{
|
|
88
88
|
type: "submit",
|
|
89
89
|
color: "primary",
|
|
@@ -92,8 +92,8 @@ const Re = (n) => n == null ? !1 : `${n}`.length > 0, Is = Oe(function(n, e) {
|
|
|
92
92
|
name: e("_accessibility:buttons.submit"),
|
|
93
93
|
"aria-label": e("_accessibility:ariaLabels.submit"),
|
|
94
94
|
children: [
|
|
95
|
-
o ? /* @__PURE__ */
|
|
96
|
-
|
|
95
|
+
o ? /* @__PURE__ */ h(
|
|
96
|
+
re,
|
|
97
97
|
{
|
|
98
98
|
color: "stroke-base",
|
|
99
99
|
loaderClass: "!w-6 mt-1",
|
|
@@ -104,8 +104,8 @@ const Re = (n) => n == null ? !1 : `${n}`.length > 0, Is = Oe(function(n, e) {
|
|
|
104
104
|
]
|
|
105
105
|
}
|
|
106
106
|
),
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
|
|
107
|
+
/* @__PURE__ */ h(
|
|
108
|
+
H,
|
|
109
109
|
{
|
|
110
110
|
type: "button",
|
|
111
111
|
variant: "outlined",
|
|
@@ -117,10 +117,10 @@ const Re = (n) => n == null ? !1 : `${n}`.length > 0, Is = Oe(function(n, e) {
|
|
|
117
117
|
)
|
|
118
118
|
] })
|
|
119
119
|
] });
|
|
120
|
-
},
|
|
121
|
-
const { t: s } =
|
|
122
|
-
return /* @__PURE__ */
|
|
123
|
-
|
|
120
|
+
}, ks = $e(function(r, e) {
|
|
121
|
+
const { t: s } = k(), [t, n] = R(!1);
|
|
122
|
+
return /* @__PURE__ */ h(rt, { ...r, type: t ? "text" : "password", ref: e, children: /* @__PURE__ */ h(
|
|
123
|
+
z,
|
|
124
124
|
{
|
|
125
125
|
type: "button",
|
|
126
126
|
tabIndex: -1,
|
|
@@ -128,63 +128,63 @@ const Re = (n) => n == null ? !1 : `${n}`.length > 0, Is = Oe(function(n, e) {
|
|
|
128
128
|
t ? "_accessibility:ariaLabels.hidePassword" : "_accessibility:ariaLabels.showPassword"
|
|
129
129
|
),
|
|
130
130
|
className: "password-icon",
|
|
131
|
-
onClick: () =>
|
|
132
|
-
icon: t ?
|
|
131
|
+
onClick: () => n(!t),
|
|
132
|
+
icon: t ? mt : ht
|
|
133
133
|
}
|
|
134
134
|
) });
|
|
135
|
-
}),
|
|
136
|
-
const { t: e } =
|
|
135
|
+
}), be = (r) => {
|
|
136
|
+
const { t: e } = k(), {
|
|
137
137
|
title: s,
|
|
138
138
|
children: t,
|
|
139
|
-
handleClose:
|
|
139
|
+
handleClose: n,
|
|
140
140
|
open: o = !1,
|
|
141
141
|
containerClassName: i = "",
|
|
142
142
|
className: c = "",
|
|
143
143
|
animationClass: a = "appear"
|
|
144
|
-
} =
|
|
144
|
+
} = r, l = S(
|
|
145
145
|
(d) => {
|
|
146
|
-
d.key === "Escape" && o &&
|
|
146
|
+
d.key === "Escape" && o && n();
|
|
147
147
|
},
|
|
148
|
-
[o,
|
|
148
|
+
[o, n]
|
|
149
149
|
);
|
|
150
|
-
|
|
151
|
-
window.removeEventListener("keydown",
|
|
152
|
-
}), [
|
|
153
|
-
const
|
|
150
|
+
O(() => (window.addEventListener("keydown", l), () => {
|
|
151
|
+
window.removeEventListener("keydown", l);
|
|
152
|
+
}), [l]);
|
|
153
|
+
const u = S(
|
|
154
154
|
(d) => {
|
|
155
|
-
d.target === d.currentTarget &&
|
|
155
|
+
d.target === d.currentTarget && n();
|
|
156
156
|
},
|
|
157
|
-
[
|
|
157
|
+
[n]
|
|
158
158
|
);
|
|
159
|
-
return
|
|
159
|
+
return O(() => {
|
|
160
160
|
const d = (m) => {
|
|
161
161
|
m ? document.body.style.overflow = "hidden" : document.body.style.overflow = "auto";
|
|
162
162
|
};
|
|
163
163
|
return d(o), () => {
|
|
164
164
|
d(!1);
|
|
165
165
|
};
|
|
166
|
-
}, [o]),
|
|
167
|
-
/* @__PURE__ */
|
|
166
|
+
}, [o]), Ie(
|
|
167
|
+
/* @__PURE__ */ h(
|
|
168
168
|
"div",
|
|
169
169
|
{
|
|
170
170
|
"aria-label": e("_accessibility:ariaLabels.closeDialog"),
|
|
171
171
|
"aria-hidden": !o,
|
|
172
|
-
onClick:
|
|
172
|
+
onClick: u,
|
|
173
173
|
className: `dialog-backdrop animated ${o ? `opened ${a}` : "closed"} ${i}`,
|
|
174
|
-
children: /* @__PURE__ */
|
|
174
|
+
children: /* @__PURE__ */ v(
|
|
175
175
|
"div",
|
|
176
176
|
{
|
|
177
177
|
className: `dialog elevated animated ${o ? `opened ${a}` : "closed"} ${c}`,
|
|
178
178
|
children: [
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
|
|
179
|
+
/* @__PURE__ */ v("div", { className: "dialog-header", children: [
|
|
180
|
+
/* @__PURE__ */ h("h3", { className: "dialog-title", children: s }),
|
|
181
|
+
/* @__PURE__ */ h(
|
|
182
|
+
z,
|
|
183
183
|
{
|
|
184
|
-
icon:
|
|
184
|
+
icon: De,
|
|
185
185
|
disabled: !o,
|
|
186
186
|
"aria-disabled": !o,
|
|
187
|
-
onClick:
|
|
187
|
+
onClick: n,
|
|
188
188
|
variant: "text",
|
|
189
189
|
color: "error",
|
|
190
190
|
className: "icon-button dialog-close-btn",
|
|
@@ -201,43 +201,43 @@ const Re = (n) => n == null ? !1 : `${n}`.length > 0, Is = Oe(function(n, e) {
|
|
|
201
201
|
),
|
|
202
202
|
document.body
|
|
203
203
|
);
|
|
204
|
-
},
|
|
204
|
+
}, ye = (r) => {
|
|
205
205
|
const {
|
|
206
206
|
primaryText: e,
|
|
207
207
|
cancelText: s,
|
|
208
208
|
onPrimaryClick: t,
|
|
209
|
-
onCancel:
|
|
209
|
+
onCancel: n,
|
|
210
210
|
isLoading: o = !1,
|
|
211
211
|
disabled: i = !1,
|
|
212
212
|
primaryType: c = "submit",
|
|
213
213
|
containerClassName: a = "",
|
|
214
|
-
primaryClassName:
|
|
215
|
-
alignEnd:
|
|
214
|
+
primaryClassName: l = "",
|
|
215
|
+
alignEnd: u = !1,
|
|
216
216
|
primaryName: d,
|
|
217
217
|
primaryAriaLabel: m,
|
|
218
|
-
cancelName:
|
|
219
|
-
cancelAriaLabel:
|
|
220
|
-
extraActions:
|
|
221
|
-
} =
|
|
222
|
-
return /* @__PURE__ */
|
|
218
|
+
cancelName: f,
|
|
219
|
+
cancelAriaLabel: p,
|
|
220
|
+
extraActions: b = []
|
|
221
|
+
} = r;
|
|
222
|
+
return /* @__PURE__ */ v(
|
|
223
223
|
"div",
|
|
224
224
|
{
|
|
225
|
-
className: `dialog-actions ${
|
|
225
|
+
className: `dialog-actions ${u ? "end" : ""} ${a}`,
|
|
226
226
|
children: [
|
|
227
|
-
/* @__PURE__ */
|
|
228
|
-
|
|
227
|
+
/* @__PURE__ */ v(
|
|
228
|
+
H,
|
|
229
229
|
{
|
|
230
230
|
type: c,
|
|
231
231
|
color: "primary",
|
|
232
232
|
variant: "submit",
|
|
233
|
-
className:
|
|
233
|
+
className: l,
|
|
234
234
|
disabled: i,
|
|
235
235
|
onClick: t,
|
|
236
236
|
name: d,
|
|
237
237
|
"aria-label": m,
|
|
238
238
|
children: [
|
|
239
|
-
o ? /* @__PURE__ */
|
|
240
|
-
|
|
239
|
+
o ? /* @__PURE__ */ h(
|
|
240
|
+
re,
|
|
241
241
|
{
|
|
242
242
|
color: "stroke-base",
|
|
243
243
|
loaderClass: "!w-6 mt-1",
|
|
@@ -248,37 +248,37 @@ const Re = (n) => n == null ? !1 : `${n}`.length > 0, Is = Oe(function(n, e) {
|
|
|
248
248
|
]
|
|
249
249
|
}
|
|
250
250
|
),
|
|
251
|
-
|
|
252
|
-
/* @__PURE__ */
|
|
253
|
-
|
|
251
|
+
b == null ? void 0 : b.map((g) => /* @__PURE__ */ h(H, { ...g }, g.id)),
|
|
252
|
+
/* @__PURE__ */ h(
|
|
253
|
+
H,
|
|
254
254
|
{
|
|
255
255
|
type: "button",
|
|
256
256
|
variant: "outlined",
|
|
257
257
|
disabled: i,
|
|
258
|
-
onClick:
|
|
259
|
-
name:
|
|
260
|
-
"aria-label":
|
|
258
|
+
onClick: n,
|
|
259
|
+
name: f,
|
|
260
|
+
"aria-label": p,
|
|
261
261
|
children: s
|
|
262
262
|
}
|
|
263
263
|
)
|
|
264
264
|
]
|
|
265
265
|
}
|
|
266
266
|
);
|
|
267
|
-
},
|
|
268
|
-
const { t: e } =
|
|
267
|
+
}, Ns = (r) => {
|
|
268
|
+
const { t: e } = k(), {
|
|
269
269
|
children: s,
|
|
270
270
|
handleSubmit: t,
|
|
271
|
-
onSubmit:
|
|
271
|
+
onSubmit: n,
|
|
272
272
|
handleClose: o,
|
|
273
273
|
isLoading: i = !1,
|
|
274
274
|
buttonEnd: c = !0,
|
|
275
275
|
extraActions: a = [],
|
|
276
|
-
...
|
|
277
|
-
} =
|
|
278
|
-
return /* @__PURE__ */
|
|
279
|
-
/* @__PURE__ */
|
|
280
|
-
/* @__PURE__ */
|
|
281
|
-
|
|
276
|
+
...l
|
|
277
|
+
} = r;
|
|
278
|
+
return /* @__PURE__ */ h(be, { ...l, handleClose: o, children: /* @__PURE__ */ v("form", { onSubmit: t(n), children: [
|
|
279
|
+
/* @__PURE__ */ h("div", { className: "form-container", children: s }),
|
|
280
|
+
/* @__PURE__ */ h(
|
|
281
|
+
ye,
|
|
282
282
|
{
|
|
283
283
|
primaryType: "submit",
|
|
284
284
|
primaryText: e("_accessibility:buttons.submit"),
|
|
@@ -296,24 +296,24 @@ const Re = (n) => n == null ? !1 : `${n}`.length > 0, Is = Oe(function(n, e) {
|
|
|
296
296
|
}
|
|
297
297
|
)
|
|
298
298
|
] }) });
|
|
299
|
-
},
|
|
300
|
-
const { t: e } =
|
|
299
|
+
}, As = (r) => {
|
|
300
|
+
const { t: e } = k(), {
|
|
301
301
|
children: s,
|
|
302
302
|
handleSubmit: t,
|
|
303
|
-
handleClose:
|
|
303
|
+
handleClose: n,
|
|
304
304
|
isLoading: o = !1,
|
|
305
305
|
extraActions: i = [],
|
|
306
306
|
...c
|
|
307
|
-
} =
|
|
308
|
-
return /* @__PURE__ */
|
|
307
|
+
} = r;
|
|
308
|
+
return /* @__PURE__ */ v(be, { ...c, handleClose: n, children: [
|
|
309
309
|
s,
|
|
310
|
-
/* @__PURE__ */
|
|
311
|
-
|
|
310
|
+
/* @__PURE__ */ h(
|
|
311
|
+
ye,
|
|
312
312
|
{
|
|
313
313
|
primaryText: e("_accessibility:buttons.ok"),
|
|
314
314
|
cancelText: e("_accessibility:buttons.cancel"),
|
|
315
315
|
onPrimaryClick: t,
|
|
316
|
-
onCancel:
|
|
316
|
+
onCancel: n,
|
|
317
317
|
isLoading: o,
|
|
318
318
|
disabled: o,
|
|
319
319
|
primaryType: "button",
|
|
@@ -327,34 +327,34 @@ const Re = (n) => n == null ? !1 : `${n}`.length > 0, Is = Oe(function(n, e) {
|
|
|
327
327
|
)
|
|
328
328
|
] });
|
|
329
329
|
};
|
|
330
|
-
function
|
|
331
|
-
const { message: e, className: s = "" } =
|
|
332
|
-
return /* @__PURE__ */
|
|
330
|
+
function $t(r) {
|
|
331
|
+
const { message: e, className: s = "" } = r, { t } = k();
|
|
332
|
+
return /* @__PURE__ */ h("p", { className: `import-error-message ${s}`, children: e ?? t("_messages:errors.parseFile", {
|
|
333
333
|
defaultValue: "Failed to process file"
|
|
334
334
|
}) });
|
|
335
335
|
}
|
|
336
|
-
function
|
|
337
|
-
const { message: e, className: s = "" } =
|
|
338
|
-
return /* @__PURE__ */
|
|
339
|
-
/* @__PURE__ */
|
|
340
|
-
/* @__PURE__ */
|
|
336
|
+
function xt(r) {
|
|
337
|
+
const { message: e, className: s = "" } = r, { t } = k();
|
|
338
|
+
return /* @__PURE__ */ v("div", { className: `import-loading ${s}`, children: [
|
|
339
|
+
/* @__PURE__ */ h(re, { loaderClass: "w-5 h-5", className: "!w-auto" }),
|
|
340
|
+
/* @__PURE__ */ h("span", { children: e ?? t("_messages:loading.processingFile", {
|
|
341
341
|
defaultValue: "Processing file..."
|
|
342
342
|
}) })
|
|
343
343
|
] });
|
|
344
344
|
}
|
|
345
|
-
function
|
|
346
|
-
const { items: e, max: s = 5, className: t = "" } =
|
|
345
|
+
function Dt(r) {
|
|
346
|
+
const { items: e, max: s = 5, className: t = "" } = r, { t: n } = k();
|
|
347
347
|
if (!e || e.length === 0) return null;
|
|
348
348
|
const o = e.slice(0, s);
|
|
349
|
-
return /* @__PURE__ */
|
|
350
|
-
/* @__PURE__ */
|
|
349
|
+
return /* @__PURE__ */ v("div", { className: `import-preview ${t}`, children: [
|
|
350
|
+
/* @__PURE__ */ h("p", { className: "import-preview-count", children: n("_pages:common.actions.import.previewCount", {
|
|
351
351
|
count: e.length,
|
|
352
352
|
defaultValue: `Preview: ${e.length} items`
|
|
353
353
|
}) }),
|
|
354
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ h("pre", { className: "import-preview-content", children: JSON.stringify(o, null, 2) })
|
|
355
355
|
] });
|
|
356
356
|
}
|
|
357
|
-
const
|
|
357
|
+
const Oe = () => ({
|
|
358
358
|
file: null,
|
|
359
359
|
previewItems: null,
|
|
360
360
|
parseError: null,
|
|
@@ -362,136 +362,136 @@ const Be = () => ({
|
|
|
362
362
|
overrideExisting: !1,
|
|
363
363
|
inputKey: 0
|
|
364
364
|
});
|
|
365
|
-
function
|
|
365
|
+
function Lt(r, e) {
|
|
366
366
|
switch (e.type) {
|
|
367
367
|
case "SET_FILE":
|
|
368
368
|
return {
|
|
369
|
-
...
|
|
369
|
+
...r,
|
|
370
370
|
file: e.file,
|
|
371
371
|
previewItems: null,
|
|
372
372
|
parseError: null,
|
|
373
373
|
processing: !1
|
|
374
374
|
};
|
|
375
375
|
case "START_PROCESSING":
|
|
376
|
-
return { ...
|
|
376
|
+
return { ...r, processing: !0 };
|
|
377
377
|
case "SET_PREVIEW":
|
|
378
378
|
return {
|
|
379
|
-
...
|
|
379
|
+
...r,
|
|
380
380
|
previewItems: e.items,
|
|
381
381
|
parseError: null,
|
|
382
382
|
processing: !1
|
|
383
383
|
};
|
|
384
384
|
case "SET_ERROR":
|
|
385
385
|
return {
|
|
386
|
-
...
|
|
386
|
+
...r,
|
|
387
387
|
previewItems: null,
|
|
388
388
|
parseError: e.message,
|
|
389
389
|
processing: !1
|
|
390
390
|
};
|
|
391
391
|
case "SET_OVERRIDE":
|
|
392
|
-
return { ...
|
|
392
|
+
return { ...r, overrideExisting: e.value };
|
|
393
393
|
case "RESET":
|
|
394
|
-
return { ...
|
|
394
|
+
return { ...Oe(), inputKey: r.inputKey + 1 };
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
|
-
const
|
|
398
|
-
const { t: e } =
|
|
397
|
+
const $s = (r) => {
|
|
398
|
+
const { t: e } = k(), {
|
|
399
399
|
children: s,
|
|
400
400
|
handleSubmit: t,
|
|
401
|
-
handleClose:
|
|
401
|
+
handleClose: n,
|
|
402
402
|
isLoading: o = !1,
|
|
403
403
|
fileProcessor: i,
|
|
404
404
|
onFileProcessed: c,
|
|
405
405
|
renderCustomPreview: a,
|
|
406
|
-
onOverrideChange:
|
|
407
|
-
open:
|
|
406
|
+
onOverrideChange: l,
|
|
407
|
+
open: u,
|
|
408
408
|
extraActions: d = [],
|
|
409
409
|
...m
|
|
410
|
-
} =
|
|
411
|
-
|
|
412
|
-
|
|
410
|
+
} = r, [f, p] = xe(
|
|
411
|
+
Lt,
|
|
412
|
+
Oe()
|
|
413
413
|
), {
|
|
414
|
-
file:
|
|
414
|
+
file: b,
|
|
415
415
|
previewItems: g,
|
|
416
|
-
parseError:
|
|
417
|
-
processing:
|
|
418
|
-
overrideExisting:
|
|
419
|
-
inputKey:
|
|
420
|
-
} =
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
}, [c]),
|
|
424
|
-
|
|
425
|
-
}, [i]),
|
|
426
|
-
|
|
427
|
-
}, [
|
|
428
|
-
const
|
|
429
|
-
async (
|
|
430
|
-
var
|
|
431
|
-
if (
|
|
432
|
-
|
|
416
|
+
parseError: y,
|
|
417
|
+
processing: C,
|
|
418
|
+
overrideExisting: w,
|
|
419
|
+
inputKey: E
|
|
420
|
+
} = f, A = F(c), U = F(i);
|
|
421
|
+
O(() => {
|
|
422
|
+
A.current = c;
|
|
423
|
+
}, [c]), O(() => {
|
|
424
|
+
U.current = i;
|
|
425
|
+
}, [i]), O(() => {
|
|
426
|
+
u || p({ type: "RESET" });
|
|
427
|
+
}, [u]);
|
|
428
|
+
const B = S(
|
|
429
|
+
async (T, $) => {
|
|
430
|
+
var x;
|
|
431
|
+
if (U.current) {
|
|
432
|
+
p({ type: "START_PROCESSING" });
|
|
433
433
|
try {
|
|
434
|
-
const
|
|
435
|
-
|
|
436
|
-
} catch (
|
|
437
|
-
console.error(
|
|
438
|
-
const
|
|
439
|
-
|
|
434
|
+
const _ = await U.current(T, { override: $ });
|
|
435
|
+
p({ type: "SET_PREVIEW", items: _ ?? [] }), (x = A.current) == null || x.call(A, _ ?? []);
|
|
436
|
+
} catch (_) {
|
|
437
|
+
console.error(_);
|
|
438
|
+
const K = _ instanceof Error ? _.message : "Failed to parse file";
|
|
439
|
+
p({ type: "SET_ERROR", message: K });
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
442
|
},
|
|
443
443
|
[]
|
|
444
444
|
);
|
|
445
|
-
return /* @__PURE__ */
|
|
446
|
-
/* @__PURE__ */
|
|
447
|
-
|
|
445
|
+
return /* @__PURE__ */ v(be, { ...m, open: u, handleClose: n, children: [
|
|
446
|
+
/* @__PURE__ */ h(
|
|
447
|
+
nt,
|
|
448
448
|
{
|
|
449
449
|
onClear: () => {
|
|
450
|
-
var
|
|
451
|
-
|
|
450
|
+
var T;
|
|
451
|
+
p({ type: "SET_FILE", file: null }), (T = A.current) == null || T.call(A, []);
|
|
452
452
|
},
|
|
453
|
-
onChange: (
|
|
454
|
-
var
|
|
455
|
-
const
|
|
456
|
-
if (
|
|
457
|
-
|
|
453
|
+
onChange: (T) => {
|
|
454
|
+
var x, _;
|
|
455
|
+
const $ = (x = T.target.files) == null ? void 0 : x[0];
|
|
456
|
+
if (!$) {
|
|
457
|
+
p({ type: "SET_FILE", file: null }), (_ = A.current) == null || _.call(A, []);
|
|
458
458
|
return;
|
|
459
459
|
}
|
|
460
|
-
|
|
460
|
+
p({ type: "SET_FILE", file: $ }), B($, w);
|
|
461
461
|
},
|
|
462
462
|
label: e("_accessibility:labels.file")
|
|
463
463
|
},
|
|
464
|
-
|
|
464
|
+
E
|
|
465
465
|
),
|
|
466
|
-
/* @__PURE__ */
|
|
467
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ v("label", { className: "import-override-label", children: [
|
|
467
|
+
/* @__PURE__ */ h(
|
|
468
468
|
"input",
|
|
469
469
|
{
|
|
470
470
|
type: "checkbox",
|
|
471
|
-
checked:
|
|
472
|
-
onChange: (
|
|
473
|
-
const
|
|
474
|
-
|
|
471
|
+
checked: w,
|
|
472
|
+
onChange: (T) => {
|
|
473
|
+
const $ = T.target.checked;
|
|
474
|
+
p({ type: "SET_OVERRIDE", value: $ }), l == null || l($), b && B(b, $);
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
477
|
),
|
|
478
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ h("span", { children: e("_pages:common.actions.import.override", {
|
|
479
479
|
defaultValue: "Override existing items"
|
|
480
480
|
}) })
|
|
481
481
|
] }),
|
|
482
|
-
/* @__PURE__ */
|
|
483
|
-
|
|
484
|
-
a ? a(g) : !!g && g.length > 0 && /* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ h($t, { message: y }),
|
|
483
|
+
C && /* @__PURE__ */ h(xt, {}),
|
|
484
|
+
a ? a(g) : !!g && g.length > 0 && /* @__PURE__ */ h(Dt, { items: g }),
|
|
485
485
|
s,
|
|
486
|
-
/* @__PURE__ */
|
|
487
|
-
|
|
486
|
+
/* @__PURE__ */ h(
|
|
487
|
+
ye,
|
|
488
488
|
{
|
|
489
489
|
primaryText: e("_accessibility:buttons.ok"),
|
|
490
490
|
cancelText: e("_accessibility:buttons.cancel"),
|
|
491
491
|
onPrimaryClick: () => {
|
|
492
492
|
(!i || !!g && g.length > 0) && t();
|
|
493
493
|
},
|
|
494
|
-
onCancel:
|
|
494
|
+
onCancel: n,
|
|
495
495
|
isLoading: o,
|
|
496
496
|
primaryType: "button",
|
|
497
497
|
containerClassName: "import-dialog-actions",
|
|
@@ -504,18 +504,18 @@ const Ps = (n) => {
|
|
|
504
504
|
)
|
|
505
505
|
] });
|
|
506
506
|
};
|
|
507
|
-
var
|
|
508
|
-
const
|
|
509
|
-
async function
|
|
510
|
-
const
|
|
507
|
+
var M = /* @__PURE__ */ ((r) => (r[r.success = 0] = "success", r[r.error = 1] = "error", r[r.warning = 2] = "warning", r[r.info = 3] = "info", r))(M || {}), P = /* @__PURE__ */ ((r) => (r.GET = "GET", r.POST = "POST", r.PUT = "PUT", r.PATCH = "PATCH", r.DELETE = "DELETE", r))(P || {});
|
|
508
|
+
const Rt = (r) => Array.isArray(r) || r instanceof Headers ? !1 : typeof r == "object" && r !== null && ("headers" in r || "credentials" in r), It = (r) => r ? Rt(r) ? r : { headers: r } : {}, _t = (r) => r ? r instanceof Headers ? Object.fromEntries(r.entries()) : Array.isArray(r) ? Object.fromEntries(r) : r : {};
|
|
509
|
+
async function me(r, e = "GET", s, t) {
|
|
510
|
+
const n = It(t), o = {
|
|
511
511
|
...s !== void 0 ? { "Content-Type": "application/json" } : {},
|
|
512
|
-
...
|
|
512
|
+
..._t(n.headers)
|
|
513
513
|
};
|
|
514
514
|
try {
|
|
515
|
-
const i = await fetch(
|
|
515
|
+
const i = await fetch(r, {
|
|
516
516
|
method: e,
|
|
517
517
|
headers: o,
|
|
518
|
-
...
|
|
518
|
+
...n.credentials ? { credentials: n.credentials } : {},
|
|
519
519
|
...s !== void 0 ? { body: JSON.stringify(s) } : {}
|
|
520
520
|
}), c = await i.text();
|
|
521
521
|
let a = null;
|
|
@@ -525,13 +525,13 @@ async function Se(n, e = "GET", s, t) {
|
|
|
525
525
|
a = null;
|
|
526
526
|
}
|
|
527
527
|
if (!i.ok) {
|
|
528
|
-
const
|
|
528
|
+
const l = typeof a == "object" && a !== null ? a.message ?? a.error ?? c : c || i.statusText;
|
|
529
529
|
return {
|
|
530
530
|
data: null,
|
|
531
531
|
status: i.status,
|
|
532
532
|
error: {
|
|
533
533
|
status: i.status,
|
|
534
|
-
message:
|
|
534
|
+
message: l || "Unknown error occurred"
|
|
535
535
|
}
|
|
536
536
|
};
|
|
537
537
|
}
|
|
@@ -551,66 +551,66 @@ async function Se(n, e = "GET", s, t) {
|
|
|
551
551
|
};
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function Pt(r, e) {
|
|
555
555
|
const s = (t) => t instanceof Date ? t.toISOString() : String(t);
|
|
556
556
|
if (e) {
|
|
557
|
-
const t = Object.entries(e).filter(([,
|
|
558
|
-
([
|
|
557
|
+
const t = Object.entries(e).filter(([, n]) => n != null).map(
|
|
558
|
+
([n, o]) => `${encodeURIComponent(n)}=${encodeURIComponent(s(o))}`
|
|
559
559
|
).join("&");
|
|
560
|
-
return t ? `${
|
|
560
|
+
return t ? `${r}?${t}` : r;
|
|
561
561
|
}
|
|
562
|
-
return
|
|
562
|
+
return r;
|
|
563
563
|
}
|
|
564
|
-
const
|
|
565
|
-
if (typeof
|
|
566
|
-
const e =
|
|
564
|
+
const he = (r) => typeof r == "object" && r !== null, W = (r) => r instanceof Date ? encodeURIComponent(r.toISOString()) : encodeURIComponent(String(r)), Ot = (r) => {
|
|
565
|
+
if (typeof r != "string") return;
|
|
566
|
+
const e = r.trim().toUpperCase();
|
|
567
567
|
if (e === "ACTIVE" || e === "DELETED" || e === "ALL")
|
|
568
568
|
return e;
|
|
569
|
-
},
|
|
569
|
+
}, Me = (r, e, s) => {
|
|
570
570
|
const t = [];
|
|
571
571
|
if (e) {
|
|
572
|
-
const { sortingBy:
|
|
573
|
-
|
|
572
|
+
const { sortingBy: n, sortingOrder: o, currentPage: i, pageSize: c } = e;
|
|
573
|
+
n !== void 0 && t.push(`sort=${String(n)}`), o !== void 0 && t.push(`order=${o}`), i !== void 0 && t.push(`page=${i}`), c !== void 0 && t.push(`pageSize=${c}`);
|
|
574
574
|
}
|
|
575
575
|
if (s) {
|
|
576
|
-
const
|
|
577
|
-
|
|
576
|
+
const n = Ot(s.softDeleteScope);
|
|
577
|
+
n && t.push(`softDeleteScope=${encodeURIComponent(n)}`);
|
|
578
578
|
const o = Object.entries(s).filter(
|
|
579
579
|
([i, c]) => i !== "softDeleteScope" && c !== null && c !== void 0 && c !== ""
|
|
580
580
|
).flatMap(([i, c]) => {
|
|
581
581
|
if (Array.isArray(c))
|
|
582
|
-
return c.map((a) => a instanceof Date ? `${i}==${W(a)}` :
|
|
583
|
-
if (
|
|
582
|
+
return c.map((a) => a instanceof Date ? `${i}==${W(a)}` : he(a) ? `${i}==${W(a.id ?? "")}` : `${i}==${W(a)}`);
|
|
583
|
+
if (he(c) && "start" in c && "end" in c) {
|
|
584
584
|
const a = [];
|
|
585
585
|
return c.start != null && c.start !== "" && a.push(`${i}>=${W(c.start)}`), c.end != null && c.end !== "" && a.push(`${i}<=${W(c.end)}`), a;
|
|
586
586
|
}
|
|
587
|
-
return c instanceof Date ? `${i}==${W(c)}` :
|
|
587
|
+
return c instanceof Date ? `${i}==${W(c)}` : he(c) ? `${i}==${W(c.id ?? "")}` : `${i}==${W(c)}`;
|
|
588
588
|
});
|
|
589
589
|
o.length > 0 && t.push(`filters=${o.join(",")}`);
|
|
590
590
|
}
|
|
591
|
-
return t.length ? `${
|
|
592
|
-
},
|
|
591
|
+
return t.length ? `${r}?${t.join("&")}` : r;
|
|
592
|
+
}, se = class se {
|
|
593
593
|
/**
|
|
594
594
|
* @param baseUrl the base url of the server
|
|
595
595
|
* @param userKey the local storage user key
|
|
596
596
|
* @param secured if the api client requires token
|
|
597
597
|
* @param tokenAcquirer custom token acquirer
|
|
598
598
|
*/
|
|
599
|
-
constructor(e, s = "user", t = !0,
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
this.baseUrl = e, this.secured = t, this.userKey = s, this.rememberKey = o.rememberKey ?? "remember", this.refreshTokenKey = o.refreshTokenKey ?? "refreshToken", this.accessTokenExpiresAtKey = o.accessTokenExpiresAtKey ?? "accessTokenExpiresAt", this.refreshEndpoint = o.refreshEndpoint ?? "auth/refresh", this.refreshExpirySkewMs = o.refreshExpirySkewMs ?? 5e3, this.tokenAcquirer =
|
|
599
|
+
constructor(e, s = "user", t = !0, n, o = {}) {
|
|
600
|
+
N(this, "baseUrl");
|
|
601
|
+
N(this, "userKey");
|
|
602
|
+
N(this, "rememberKey");
|
|
603
|
+
N(this, "refreshTokenKey");
|
|
604
|
+
N(this, "accessTokenExpiresAtKey");
|
|
605
|
+
N(this, "refreshEndpoint");
|
|
606
|
+
N(this, "refreshExpirySkewMs");
|
|
607
|
+
N(this, "secured");
|
|
608
|
+
N(this, "tokenAcquirer");
|
|
609
|
+
this.baseUrl = e, this.secured = t, this.userKey = s, this.rememberKey = o.rememberKey ?? "remember", this.refreshTokenKey = o.refreshTokenKey ?? "refreshToken", this.accessTokenExpiresAtKey = o.accessTokenExpiresAtKey ?? "accessTokenExpiresAt", this.refreshEndpoint = o.refreshEndpoint ?? "auth/refresh", this.refreshExpirySkewMs = o.refreshExpirySkewMs ?? 5e3, this.tokenAcquirer = n ?? this.defaultTokenAcquirer;
|
|
610
610
|
}
|
|
611
611
|
defaultTokenAcquirer(e) {
|
|
612
612
|
if (e) return { credentials: "include" };
|
|
613
|
-
const s =
|
|
613
|
+
const s = G(this.userKey);
|
|
614
614
|
if (s && s.length) return { Authorization: `Bearer ${s}` };
|
|
615
615
|
}
|
|
616
616
|
getRefreshLockKey() {
|
|
@@ -621,12 +621,12 @@ const Te = (n) => typeof n == "object" && n !== null, W = (n) => n instanceof Da
|
|
|
621
621
|
return `${s}${t}`;
|
|
622
622
|
}
|
|
623
623
|
getRefreshToken() {
|
|
624
|
-
const e =
|
|
624
|
+
const e = G(this.refreshTokenKey);
|
|
625
625
|
if (typeof e == "string" && e.length)
|
|
626
626
|
return e;
|
|
627
627
|
}
|
|
628
628
|
getAccessTokenExpiresAt() {
|
|
629
|
-
const e =
|
|
629
|
+
const e = G(this.accessTokenExpiresAtKey);
|
|
630
630
|
if (typeof e == "string" && e.length)
|
|
631
631
|
return e;
|
|
632
632
|
}
|
|
@@ -640,12 +640,12 @@ const Te = (n) => typeof n == "object" && n !== null, W = (n) => n instanceof Da
|
|
|
640
640
|
return Number.isNaN(t) ? !1 : Date.now() >= t - this.refreshExpirySkewMs;
|
|
641
641
|
}
|
|
642
642
|
clearStoredSession() {
|
|
643
|
-
|
|
643
|
+
I(this.userKey), I(this.rememberKey), I(this.refreshTokenKey), I(this.accessTokenExpiresAtKey);
|
|
644
644
|
}
|
|
645
645
|
storeSession(e, s) {
|
|
646
|
-
|
|
646
|
+
Q(this.userKey, e.token);
|
|
647
647
|
const t = e.refreshToken === void 0 ? s : e.refreshToken;
|
|
648
|
-
typeof t == "string" && t.length ?
|
|
648
|
+
typeof t == "string" && t.length ? Q(this.refreshTokenKey, t) : I(this.refreshTokenKey), typeof e.accessTokenExpiresAt == "string" && e.accessTokenExpiresAt.length ? Q(this.accessTokenExpiresAtKey, e.accessTokenExpiresAt) : I(this.accessTokenExpiresAtKey);
|
|
649
649
|
}
|
|
650
650
|
async refreshAccessTokenWithMutex() {
|
|
651
651
|
const e = this.getRefreshToken();
|
|
@@ -654,15 +654,15 @@ const Te = (n) => typeof n == "object" && n !== null, W = (n) => n instanceof Da
|
|
|
654
654
|
status: 401,
|
|
655
655
|
message: "Missing refresh token"
|
|
656
656
|
};
|
|
657
|
-
const s = this.getRefreshLockKey(), t =
|
|
657
|
+
const s = this.getRefreshLockKey(), t = se.refreshInFlight.get(s);
|
|
658
658
|
if (t) {
|
|
659
659
|
await t;
|
|
660
660
|
return;
|
|
661
661
|
}
|
|
662
|
-
const
|
|
663
|
-
const { data: o, status: i, error: c } = await
|
|
662
|
+
const n = (async () => {
|
|
663
|
+
const { data: o, status: i, error: c } = await me(
|
|
664
664
|
this.buildUrl(this.refreshEndpoint),
|
|
665
|
-
|
|
665
|
+
P.POST,
|
|
666
666
|
{ refreshToken: e }
|
|
667
667
|
);
|
|
668
668
|
if (c || !(o != null && o.token))
|
|
@@ -672,11 +672,11 @@ const Te = (n) => typeof n == "object" && n !== null, W = (n) => n instanceof Da
|
|
|
672
672
|
};
|
|
673
673
|
this.storeSession(o, e);
|
|
674
674
|
})();
|
|
675
|
-
|
|
675
|
+
se.refreshInFlight.set(s, n);
|
|
676
676
|
try {
|
|
677
|
-
await
|
|
677
|
+
await n;
|
|
678
678
|
} finally {
|
|
679
|
-
|
|
679
|
+
se.refreshInFlight.delete(s);
|
|
680
680
|
}
|
|
681
681
|
}
|
|
682
682
|
isRequestOptions(e) {
|
|
@@ -689,30 +689,30 @@ const Te = (n) => typeof n == "object" && n !== null, W = (n) => n instanceof Da
|
|
|
689
689
|
return e ? e instanceof Headers ? Object.fromEntries(e.entries()) : Array.isArray(e) ? Object.fromEntries(e) : e : {};
|
|
690
690
|
}
|
|
691
691
|
mergeRequestConfig(e) {
|
|
692
|
-
const s = this.secured ? this.tokenAcquirer() : void 0, t = this.toRequestOptions(s),
|
|
692
|
+
const s = this.secured ? this.tokenAcquirer() : void 0, t = this.toRequestOptions(s), n = this.toRequestOptions(e), o = {
|
|
693
693
|
...this.toHeaderRecord(t.headers),
|
|
694
|
-
...this.toHeaderRecord(
|
|
695
|
-
}, i =
|
|
694
|
+
...this.toHeaderRecord(n.headers)
|
|
695
|
+
}, i = n.credentials ?? t.credentials, c = Object.keys(o).length > 0;
|
|
696
696
|
if (i)
|
|
697
697
|
return c ? { headers: o, credentials: i } : { credentials: i };
|
|
698
698
|
if (c) return o;
|
|
699
699
|
}
|
|
700
|
-
async makeRequestWithRefresh(e, s, t,
|
|
700
|
+
async makeRequestWithRefresh(e, s, t, n) {
|
|
701
701
|
this.secured && this.shouldRefreshBeforeRequest() && await this.refreshAccessTokenWithMutex();
|
|
702
|
-
let o = await
|
|
702
|
+
let o = await me(
|
|
703
703
|
this.buildUrl(e),
|
|
704
704
|
s,
|
|
705
705
|
t,
|
|
706
|
-
this.mergeRequestConfig(
|
|
706
|
+
this.mergeRequestConfig(n)
|
|
707
707
|
);
|
|
708
|
-
return this.secured && o.status === 401 && this.canRefresh() && (await this.refreshAccessTokenWithMutex(), o = await
|
|
708
|
+
return this.secured && o.status === 401 && this.canRefresh() && (await this.refreshAccessTokenWithMutex(), o = await me(
|
|
709
709
|
this.buildUrl(e),
|
|
710
710
|
s,
|
|
711
711
|
t,
|
|
712
|
-
this.mergeRequestConfig(
|
|
712
|
+
this.mergeRequestConfig(n)
|
|
713
713
|
)), o;
|
|
714
714
|
}
|
|
715
|
-
async doQuery(e, s =
|
|
715
|
+
async doQuery(e, s = P.GET, t, n) {
|
|
716
716
|
const {
|
|
717
717
|
data: o,
|
|
718
718
|
status: i,
|
|
@@ -721,7 +721,7 @@ const Te = (n) => typeof n == "object" && n !== null, W = (n) => n instanceof Da
|
|
|
721
721
|
e,
|
|
722
722
|
s,
|
|
723
723
|
t,
|
|
724
|
-
|
|
724
|
+
n
|
|
725
725
|
);
|
|
726
726
|
if (c || i < 200 || i >= 300)
|
|
727
727
|
throw c ?? {
|
|
@@ -737,13 +737,13 @@ const Te = (n) => typeof n == "object" && n !== null, W = (n) => n instanceof Da
|
|
|
737
737
|
* @returns Result list
|
|
738
738
|
*/
|
|
739
739
|
async get(e, s, t) {
|
|
740
|
-
const
|
|
740
|
+
const n = Me(e, s, t), {
|
|
741
741
|
data: o,
|
|
742
742
|
error: i,
|
|
743
743
|
status: c
|
|
744
744
|
} = await this.makeRequestWithRefresh(
|
|
745
|
-
|
|
746
|
-
|
|
745
|
+
n,
|
|
746
|
+
P.GET
|
|
747
747
|
);
|
|
748
748
|
if (i || c < 200 || c >= 300 || !o)
|
|
749
749
|
throw i ?? {
|
|
@@ -761,19 +761,19 @@ const Te = (n) => typeof n == "object" && n !== null, W = (n) => n instanceof Da
|
|
|
761
761
|
async patch(e, s) {
|
|
762
762
|
const {
|
|
763
763
|
error: t,
|
|
764
|
-
data:
|
|
764
|
+
data: n,
|
|
765
765
|
status: o
|
|
766
766
|
} = await this.makeRequestWithRefresh(
|
|
767
767
|
e,
|
|
768
|
-
|
|
768
|
+
P.PATCH,
|
|
769
769
|
s
|
|
770
770
|
);
|
|
771
|
-
if (t ||
|
|
771
|
+
if (t || n === null || n === void 0)
|
|
772
772
|
throw t ?? {
|
|
773
773
|
status: o,
|
|
774
774
|
message: "Unknown error"
|
|
775
775
|
};
|
|
776
|
-
return
|
|
776
|
+
return n;
|
|
777
777
|
}
|
|
778
778
|
/**
|
|
779
779
|
* @param endpoint - backend endpoint
|
|
@@ -783,19 +783,19 @@ const Te = (n) => typeof n == "object" && n !== null, W = (n) => n instanceof Da
|
|
|
783
783
|
async delete(e, s) {
|
|
784
784
|
const {
|
|
785
785
|
error: t,
|
|
786
|
-
data:
|
|
786
|
+
data: n,
|
|
787
787
|
status: o
|
|
788
788
|
} = await this.makeRequestWithRefresh(
|
|
789
789
|
e,
|
|
790
|
-
|
|
790
|
+
P.DELETE,
|
|
791
791
|
s
|
|
792
792
|
);
|
|
793
|
-
if (t ||
|
|
793
|
+
if (t || n === null || n === void 0)
|
|
794
794
|
throw t ?? {
|
|
795
795
|
status: o,
|
|
796
796
|
message: "Unknown error"
|
|
797
797
|
};
|
|
798
|
-
return
|
|
798
|
+
return n;
|
|
799
799
|
}
|
|
800
800
|
/**
|
|
801
801
|
*
|
|
@@ -806,74 +806,74 @@ const Te = (n) => typeof n == "object" && n !== null, W = (n) => n instanceof Da
|
|
|
806
806
|
async post(e, s) {
|
|
807
807
|
const {
|
|
808
808
|
error: t,
|
|
809
|
-
data:
|
|
809
|
+
data: n,
|
|
810
810
|
status: o
|
|
811
811
|
} = await this.makeRequestWithRefresh(
|
|
812
812
|
e,
|
|
813
|
-
|
|
813
|
+
P.POST,
|
|
814
814
|
s
|
|
815
815
|
);
|
|
816
|
-
if (t ||
|
|
816
|
+
if (t || n === null || n === void 0)
|
|
817
817
|
throw t ?? {
|
|
818
818
|
status: o,
|
|
819
819
|
message: "Unknown error"
|
|
820
820
|
};
|
|
821
|
-
return
|
|
821
|
+
return n;
|
|
822
822
|
}
|
|
823
823
|
};
|
|
824
|
-
|
|
825
|
-
let
|
|
826
|
-
class
|
|
824
|
+
N(se, "refreshInFlight", /* @__PURE__ */ new Map());
|
|
825
|
+
let de = se;
|
|
826
|
+
class Mt {
|
|
827
827
|
constructor(e, s = "user", t = {}) {
|
|
828
|
-
|
|
829
|
-
this.api = new
|
|
828
|
+
N(this, "api");
|
|
829
|
+
this.api = new de(e, s, !1, void 0, t);
|
|
830
830
|
}
|
|
831
831
|
async login(e) {
|
|
832
832
|
const s = "auth/sign-in", t = e;
|
|
833
833
|
return await this.api.doQuery(
|
|
834
834
|
s,
|
|
835
|
-
|
|
835
|
+
P.POST,
|
|
836
836
|
t
|
|
837
837
|
);
|
|
838
838
|
}
|
|
839
839
|
async refresh(e) {
|
|
840
840
|
return await this.api.doQuery(
|
|
841
841
|
"auth/refresh",
|
|
842
|
-
|
|
842
|
+
P.POST,
|
|
843
843
|
e
|
|
844
844
|
);
|
|
845
845
|
}
|
|
846
846
|
async logout(e) {
|
|
847
847
|
const s = "auth/sign-out", t = e != null && e.accessToken ? {
|
|
848
848
|
Authorization: `Bearer ${e.accessToken}`
|
|
849
|
-
} : void 0,
|
|
849
|
+
} : void 0, n = e != null && e.refreshToken ? { refreshToken: e.refreshToken } : void 0;
|
|
850
850
|
return await this.api.doQuery(
|
|
851
851
|
s,
|
|
852
|
-
|
|
853
|
-
|
|
852
|
+
P.POST,
|
|
853
|
+
n,
|
|
854
854
|
t
|
|
855
855
|
);
|
|
856
856
|
}
|
|
857
857
|
async register(e) {
|
|
858
858
|
return await this.api.doQuery(
|
|
859
859
|
"auth/sign-up",
|
|
860
|
-
|
|
860
|
+
P.POST,
|
|
861
861
|
e
|
|
862
862
|
);
|
|
863
863
|
}
|
|
864
864
|
async getSession() {
|
|
865
865
|
return await this.api.doQuery(
|
|
866
866
|
"auth/session",
|
|
867
|
-
|
|
867
|
+
P.GET,
|
|
868
868
|
void 0,
|
|
869
869
|
this.api.defaultTokenAcquirer()
|
|
870
870
|
);
|
|
871
871
|
}
|
|
872
872
|
}
|
|
873
|
-
class
|
|
873
|
+
class xs {
|
|
874
874
|
constructor(e, s, t = {}) {
|
|
875
|
-
|
|
876
|
-
this.auth = new
|
|
875
|
+
N(this, "auth");
|
|
876
|
+
this.auth = new Mt(e, s, t);
|
|
877
877
|
}
|
|
878
878
|
/**
|
|
879
879
|
* @returns auth
|
|
@@ -882,17 +882,17 @@ class Us {
|
|
|
882
882
|
return this.auth;
|
|
883
883
|
}
|
|
884
884
|
}
|
|
885
|
-
class
|
|
885
|
+
class Ds {
|
|
886
886
|
/**
|
|
887
887
|
*
|
|
888
888
|
* @param table
|
|
889
889
|
* @param secured to see if the api client requires jwt protection
|
|
890
890
|
*/
|
|
891
|
-
constructor(e, s, t = "user",
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
this.table = e, this.secured =
|
|
891
|
+
constructor(e, s, t = "user", n = !0, o = {}) {
|
|
892
|
+
N(this, "table");
|
|
893
|
+
N(this, "secured");
|
|
894
|
+
N(this, "api");
|
|
895
|
+
this.table = e, this.secured = n, this.api = new de(s, t, n, void 0, o);
|
|
896
896
|
}
|
|
897
897
|
/**
|
|
898
898
|
*
|
|
@@ -910,7 +910,7 @@ class Ks {
|
|
|
910
910
|
async insertMany(e) {
|
|
911
911
|
return await this.api.doQuery(
|
|
912
912
|
`${this.table}/batch`,
|
|
913
|
-
|
|
913
|
+
P.POST,
|
|
914
914
|
e
|
|
915
915
|
);
|
|
916
916
|
}
|
|
@@ -940,12 +940,12 @@ class Ks {
|
|
|
940
940
|
* @returns - List of elements
|
|
941
941
|
*/
|
|
942
942
|
async export(e) {
|
|
943
|
-
const s =
|
|
943
|
+
const s = Me(
|
|
944
944
|
`${this.table}/export`,
|
|
945
945
|
void 0,
|
|
946
946
|
e
|
|
947
947
|
);
|
|
948
|
-
return await this.api.doQuery(s,
|
|
948
|
+
return await this.api.doQuery(s, P.GET, void 0);
|
|
949
949
|
}
|
|
950
950
|
/**
|
|
951
951
|
*
|
|
@@ -955,7 +955,7 @@ class Ks {
|
|
|
955
955
|
async import(e) {
|
|
956
956
|
return await this.api.doQuery(
|
|
957
957
|
`${this.table}/import`,
|
|
958
|
-
|
|
958
|
+
P.POST,
|
|
959
959
|
e
|
|
960
960
|
);
|
|
961
961
|
}
|
|
@@ -966,8 +966,8 @@ class Ks {
|
|
|
966
966
|
*/
|
|
967
967
|
async commonGet(e) {
|
|
968
968
|
return await this.api.doQuery(
|
|
969
|
-
|
|
970
|
-
|
|
969
|
+
Pt(`${this.table}/common`, e),
|
|
970
|
+
P.GET
|
|
971
971
|
);
|
|
972
972
|
}
|
|
973
973
|
/**
|
|
@@ -985,12 +985,12 @@ class Ks {
|
|
|
985
985
|
return await this.api.patch(`${this.table}/restore`, e);
|
|
986
986
|
}
|
|
987
987
|
}
|
|
988
|
-
class
|
|
988
|
+
class Ls {
|
|
989
989
|
constructor(e, s, t = 1) {
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
990
|
+
N(this, "table");
|
|
991
|
+
N(this, "dbName");
|
|
992
|
+
N(this, "version");
|
|
993
|
+
N(this, "db", null);
|
|
994
994
|
this.table = e, this.dbName = s, this.version = t;
|
|
995
995
|
}
|
|
996
996
|
close() {
|
|
@@ -999,18 +999,18 @@ class qs {
|
|
|
999
999
|
open() {
|
|
1000
1000
|
return this.db ? Promise.resolve(this.db) : new Promise((e, s) => {
|
|
1001
1001
|
const t = indexedDB.open(this.dbName, this.version);
|
|
1002
|
-
t.onupgradeneeded = (
|
|
1003
|
-
const o =
|
|
1002
|
+
t.onupgradeneeded = (n) => {
|
|
1003
|
+
const o = n.target.result;
|
|
1004
1004
|
o.objectStoreNames.contains(this.table) || o.createObjectStore(this.table, {
|
|
1005
1005
|
keyPath: "id",
|
|
1006
1006
|
autoIncrement: !0
|
|
1007
1007
|
});
|
|
1008
|
-
}, t.onsuccess = (
|
|
1009
|
-
this.db =
|
|
1008
|
+
}, t.onsuccess = (n) => {
|
|
1009
|
+
this.db = n.target.result, this.db.onversionchange = () => {
|
|
1010
1010
|
this.close();
|
|
1011
1011
|
}, e(this.db);
|
|
1012
|
-
}, t.onerror = (
|
|
1013
|
-
s(
|
|
1012
|
+
}, t.onerror = (n) => {
|
|
1013
|
+
s(n.target.error);
|
|
1014
1014
|
};
|
|
1015
1015
|
});
|
|
1016
1016
|
}
|
|
@@ -1029,34 +1029,34 @@ class qs {
|
|
|
1029
1029
|
async insertMany(e) {
|
|
1030
1030
|
const s = await this.transaction("readwrite");
|
|
1031
1031
|
let t = 0;
|
|
1032
|
-
for (const
|
|
1033
|
-
t = await this.request(s.add(
|
|
1032
|
+
for (const n of e)
|
|
1033
|
+
t = await this.request(s.add(n));
|
|
1034
1034
|
return { ...e[e.length - 1], id: t };
|
|
1035
1035
|
}
|
|
1036
1036
|
async update(e, s) {
|
|
1037
1037
|
const t = typeof e == "number" ? s : e;
|
|
1038
1038
|
if (!t)
|
|
1039
1039
|
throw new Error("IndexedDBClient.update requires a value payload");
|
|
1040
|
-
const
|
|
1041
|
-
return await this.request(o.put(
|
|
1040
|
+
const n = typeof e == "number" ? { ...t, id: t.id ?? e } : t, o = await this.transaction("readwrite");
|
|
1041
|
+
return await this.request(o.put(n)), n;
|
|
1042
1042
|
}
|
|
1043
1043
|
async get(e, s) {
|
|
1044
|
-
var
|
|
1045
|
-
const t = await this.transaction("readonly"),
|
|
1046
|
-
o.sort((
|
|
1047
|
-
const g =
|
|
1048
|
-
return g <
|
|
1044
|
+
var f;
|
|
1045
|
+
const t = await this.transaction("readonly"), n = await this.request(t.getAll()), o = this.applyFilter(n, s), i = (e == null ? void 0 : e.sortingBy) ?? "id", c = ((f = e == null ? void 0 : e.sortingOrder) == null ? void 0 : f.toLowerCase()) ?? "asc";
|
|
1046
|
+
o.sort((p, b) => {
|
|
1047
|
+
const g = p[i], y = b[i];
|
|
1048
|
+
return g < y ? c === "asc" ? -1 : 1 : g > y ? c === "asc" ? 1 : -1 : 0;
|
|
1049
1049
|
});
|
|
1050
|
-
const a = (e == null ? void 0 : e.pageSize) ?? 10,
|
|
1051
|
-
|
|
1052
|
-
|
|
1050
|
+
const a = (e == null ? void 0 : e.pageSize) ?? 10, l = (e == null ? void 0 : e.currentPage) ?? 0, u = o.length, d = Math.ceil(u / a), m = o.slice(
|
|
1051
|
+
l * a,
|
|
1052
|
+
l * a + a
|
|
1053
1053
|
);
|
|
1054
1054
|
return {
|
|
1055
1055
|
sort: i,
|
|
1056
1056
|
order: c,
|
|
1057
|
-
currentPage:
|
|
1057
|
+
currentPage: l,
|
|
1058
1058
|
pageSize: a,
|
|
1059
|
-
totalElements:
|
|
1059
|
+
totalElements: u,
|
|
1060
1060
|
totalPages: d,
|
|
1061
1061
|
items: m
|
|
1062
1062
|
};
|
|
@@ -1068,8 +1068,8 @@ class qs {
|
|
|
1068
1068
|
async import(e) {
|
|
1069
1069
|
const s = await this.transaction("readwrite");
|
|
1070
1070
|
let t = 0;
|
|
1071
|
-
for (const
|
|
1072
|
-
e.override ? await this.request(s.put(
|
|
1071
|
+
for (const n of e.items)
|
|
1072
|
+
e.override ? await this.request(s.put(n)) : await this.request(s.add(n)), t++;
|
|
1073
1073
|
return t;
|
|
1074
1074
|
}
|
|
1075
1075
|
async commonGet(e) {
|
|
@@ -1084,8 +1084,8 @@ class qs {
|
|
|
1084
1084
|
async softDelete(e) {
|
|
1085
1085
|
const s = await this.transaction("readwrite");
|
|
1086
1086
|
let t = 0;
|
|
1087
|
-
for (const
|
|
1088
|
-
const o = await this.request(s.get(
|
|
1087
|
+
for (const n of e) {
|
|
1088
|
+
const o = await this.request(s.get(n));
|
|
1089
1089
|
o && (await this.request(s.put({ ...o, deletedAt: /* @__PURE__ */ new Date() })), t++);
|
|
1090
1090
|
}
|
|
1091
1091
|
return t;
|
|
@@ -1093,15 +1093,15 @@ class qs {
|
|
|
1093
1093
|
async restore(e) {
|
|
1094
1094
|
const s = await this.transaction("readwrite");
|
|
1095
1095
|
let t = 0;
|
|
1096
|
-
for (const
|
|
1097
|
-
const o = await this.request(s.get(
|
|
1096
|
+
for (const n of e) {
|
|
1097
|
+
const o = await this.request(s.get(n));
|
|
1098
1098
|
o && (await this.request(s.put({ ...o, deletedAt: null })), t++);
|
|
1099
1099
|
}
|
|
1100
1100
|
return t;
|
|
1101
1101
|
}
|
|
1102
1102
|
applyFilter(e, s) {
|
|
1103
1103
|
if (!s) return e;
|
|
1104
|
-
const t = this.resolveSoftDeleteScope(s.softDeleteScope),
|
|
1104
|
+
const t = this.resolveSoftDeleteScope(s.softDeleteScope), n = t === void 0 ? e : e.filter(
|
|
1105
1105
|
(i) => this.matchesSoftDeleteScope(
|
|
1106
1106
|
t,
|
|
1107
1107
|
i.deletedAt
|
|
@@ -1109,7 +1109,7 @@ class qs {
|
|
|
1109
1109
|
), o = Object.entries(s).filter(
|
|
1110
1110
|
([i, c]) => i !== "softDeleteScope" && c !== void 0
|
|
1111
1111
|
);
|
|
1112
|
-
return o.length === 0 ?
|
|
1112
|
+
return o.length === 0 ? n : n.filter(
|
|
1113
1113
|
(i) => o.every(
|
|
1114
1114
|
([c, a]) => this.matchesFilterValue(
|
|
1115
1115
|
a,
|
|
@@ -1143,34 +1143,34 @@ class qs {
|
|
|
1143
1143
|
return e === "DELETED" ? t : !t;
|
|
1144
1144
|
}
|
|
1145
1145
|
}
|
|
1146
|
-
const
|
|
1147
|
-
if (typeof
|
|
1148
|
-
const e =
|
|
1146
|
+
const ge = (r) => typeof r == "object" && r !== null, Ft = (r) => ge(r) ? "start" in r || "end" in r : !1, Ut = (r) => r !== void 0, ie = (r) => r instanceof Date ? r.toISOString() : r, Kt = (r) => {
|
|
1147
|
+
if (typeof r != "string") return;
|
|
1148
|
+
const e = r.trim().toUpperCase();
|
|
1149
1149
|
if (e === "ACTIVE") return "ACTIVE";
|
|
1150
1150
|
if (e === "DELETED") return "DELETED";
|
|
1151
1151
|
if (e === "ALL") return "ALL";
|
|
1152
1152
|
};
|
|
1153
|
-
class
|
|
1153
|
+
class Rs {
|
|
1154
1154
|
constructor(e, s, t = {}) {
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1155
|
+
N(this, "table");
|
|
1156
|
+
N(this, "supabase");
|
|
1157
|
+
N(this, "idColumn");
|
|
1158
|
+
N(this, "deletedAtColumn");
|
|
1159
|
+
N(this, "defaultSortColumn");
|
|
1160
|
+
N(this, "options");
|
|
1161
1161
|
this.table = e, this.supabase = s, this.options = t, this.idColumn = t.idColumn ?? "id", this.deletedAtColumn = t.deletedAtColumn ?? "deletedAt", this.defaultSortColumn = t.defaultSortColumn ?? this.idColumn;
|
|
1162
1162
|
}
|
|
1163
1163
|
resolveStatus(e) {
|
|
1164
1164
|
return typeof e == "number" && Number.isFinite(e) ? e : 500;
|
|
1165
1165
|
}
|
|
1166
|
-
throwHttpError(e, s, t,
|
|
1166
|
+
throwHttpError(e, s, t, n = "Unknown error") {
|
|
1167
1167
|
throw {
|
|
1168
1168
|
status: this.resolveStatus(s),
|
|
1169
|
-
message: (e == null ? void 0 : e.message) || t ||
|
|
1169
|
+
message: (e == null ? void 0 : e.message) || t || n
|
|
1170
1170
|
};
|
|
1171
1171
|
}
|
|
1172
|
-
assertNoError(e, s, t,
|
|
1173
|
-
e && this.throwHttpError(e, s, t,
|
|
1172
|
+
assertNoError(e, s, t, n) {
|
|
1173
|
+
e && this.throwHttpError(e, s, t, n);
|
|
1174
1174
|
}
|
|
1175
1175
|
toDto(e) {
|
|
1176
1176
|
return this.options.mapRowToDto ? this.options.mapRowToDto(e) : e;
|
|
@@ -1188,28 +1188,28 @@ class js {
|
|
|
1188
1188
|
return this.options.mapImportPreviewToRow ? this.options.mapImportPreviewToRow(e) : e;
|
|
1189
1189
|
}
|
|
1190
1190
|
resolveObjectFilterValue(e) {
|
|
1191
|
-
return "id" in e ?
|
|
1191
|
+
return "id" in e ? ie(e.id) : "";
|
|
1192
1192
|
}
|
|
1193
1193
|
applyFilters(e, s) {
|
|
1194
1194
|
if (!s) return e;
|
|
1195
1195
|
let t = e;
|
|
1196
|
-
const
|
|
1197
|
-
return
|
|
1196
|
+
const n = Kt(s.softDeleteScope);
|
|
1197
|
+
return n === "ACTIVE" ? t = t.is(this.deletedAtColumn, null) : n === "DELETED" && (t = t.not(this.deletedAtColumn, "is", null)), Object.entries(s).forEach(([o, i]) => {
|
|
1198
1198
|
if (o === "softDeleteScope" || i === void 0 || i === null || i === "")
|
|
1199
1199
|
return;
|
|
1200
1200
|
const c = o === "deletedAt" ? this.deletedAtColumn : o;
|
|
1201
1201
|
if (Array.isArray(i)) {
|
|
1202
|
-
const a = i.map((
|
|
1202
|
+
const a = i.map((l) => l instanceof Date ? l.toISOString() : ge(l) ? this.resolveObjectFilterValue(l) : ie(l)).filter(Ut);
|
|
1203
1203
|
a.length > 0 && (t = t.in(c, a));
|
|
1204
1204
|
return;
|
|
1205
1205
|
}
|
|
1206
|
-
if (
|
|
1206
|
+
if (Ft(i)) {
|
|
1207
1207
|
i.start !== void 0 && i.start !== "" && (t = t.gte(
|
|
1208
1208
|
c,
|
|
1209
|
-
|
|
1209
|
+
ie(i.start)
|
|
1210
1210
|
)), i.end !== void 0 && i.end !== "" && (t = t.lte(
|
|
1211
1211
|
c,
|
|
1212
|
-
|
|
1212
|
+
ie(i.end)
|
|
1213
1213
|
));
|
|
1214
1214
|
return;
|
|
1215
1215
|
}
|
|
@@ -1217,7 +1217,7 @@ class js {
|
|
|
1217
1217
|
t = t.eq(c, i.toISOString());
|
|
1218
1218
|
return;
|
|
1219
1219
|
}
|
|
1220
|
-
if (
|
|
1220
|
+
if (ge(i)) {
|
|
1221
1221
|
t = t.eq(
|
|
1222
1222
|
c,
|
|
1223
1223
|
this.resolveObjectFilterValue(i)
|
|
@@ -1226,7 +1226,7 @@ class js {
|
|
|
1226
1226
|
}
|
|
1227
1227
|
t = t.eq(
|
|
1228
1228
|
c,
|
|
1229
|
-
|
|
1229
|
+
ie(i)
|
|
1230
1230
|
);
|
|
1231
1231
|
}), t;
|
|
1232
1232
|
}
|
|
@@ -1254,13 +1254,13 @@ class js {
|
|
|
1254
1254
|
t.statusText,
|
|
1255
1255
|
"Unable to insert many rows"
|
|
1256
1256
|
);
|
|
1257
|
-
const
|
|
1258
|
-
return
|
|
1257
|
+
const n = (o = t.data) == null ? void 0 : o.at(-1);
|
|
1258
|
+
return n || this.throwHttpError(
|
|
1259
1259
|
null,
|
|
1260
1260
|
t.status,
|
|
1261
1261
|
t.statusText,
|
|
1262
1262
|
"Unable to insert many rows"
|
|
1263
|
-
), this.toDto(
|
|
1263
|
+
), this.toDto(n);
|
|
1264
1264
|
}
|
|
1265
1265
|
async update(e) {
|
|
1266
1266
|
const s = {
|
|
@@ -1279,23 +1279,23 @@ class js {
|
|
|
1279
1279
|
), this.toDto(t.data);
|
|
1280
1280
|
}
|
|
1281
1281
|
async get(e, s) {
|
|
1282
|
-
const t = (e == null ? void 0 : e.pageSize) ?? 10,
|
|
1283
|
-
let
|
|
1282
|
+
const t = (e == null ? void 0 : e.pageSize) ?? 10, n = (e == null ? void 0 : e.currentPage) ?? 0, o = String((e == null ? void 0 : e.sortingBy) ?? this.defaultSortColumn), i = String((e == null ? void 0 : e.sortingOrder) ?? "asc").toLowerCase() === "desc" ? "desc" : "asc", c = n * t, a = c + t - 1;
|
|
1283
|
+
let l = this.supabase.from(this.table).select("*", {
|
|
1284
1284
|
count: "exact"
|
|
1285
1285
|
});
|
|
1286
|
-
|
|
1287
|
-
const
|
|
1286
|
+
l = this.applyFilters(l, s).order(o, { ascending: i === "asc" }).range(c, a);
|
|
1287
|
+
const u = await l;
|
|
1288
1288
|
this.assertNoError(
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1289
|
+
u.error,
|
|
1290
|
+
u.status,
|
|
1291
|
+
u.statusText,
|
|
1292
1292
|
"Unable to load list"
|
|
1293
1293
|
);
|
|
1294
|
-
const d = (
|
|
1294
|
+
const d = (u.data ?? []).map((f) => this.toDto(f)), m = u.count ?? d.length;
|
|
1295
1295
|
return {
|
|
1296
1296
|
sort: o,
|
|
1297
1297
|
order: i,
|
|
1298
|
-
currentPage:
|
|
1298
|
+
currentPage: n,
|
|
1299
1299
|
pageSize: t,
|
|
1300
1300
|
totalElements: m,
|
|
1301
1301
|
totalPages: t > 0 ? Math.ceil(m / t) : 0,
|
|
@@ -1311,18 +1311,18 @@ class js {
|
|
|
1311
1311
|
t.status,
|
|
1312
1312
|
t.statusText,
|
|
1313
1313
|
"Unable to export"
|
|
1314
|
-
), (t.data ?? []).map((
|
|
1314
|
+
), (t.data ?? []).map((n) => this.toDto(n));
|
|
1315
1315
|
}
|
|
1316
1316
|
async import(e) {
|
|
1317
1317
|
var o;
|
|
1318
1318
|
if (e.items.length === 0) return 0;
|
|
1319
|
-
const s = e.items.map((i) => this.toImportRow(i)),
|
|
1319
|
+
const s = e.items.map((i) => this.toImportRow(i)), n = await (e.override ? this.supabase.from(this.table).upsert(s, { onConflict: this.idColumn }).select(this.idColumn) : this.supabase.from(this.table).insert(s).select(this.idColumn));
|
|
1320
1320
|
return this.assertNoError(
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1321
|
+
n.error,
|
|
1322
|
+
n.status,
|
|
1323
|
+
n.statusText,
|
|
1324
1324
|
"Unable to import rows"
|
|
1325
|
-
), ((o =
|
|
1325
|
+
), ((o = n.data) == null ? void 0 : o.length) ?? 0;
|
|
1326
1326
|
}
|
|
1327
1327
|
async commonGet(e) {
|
|
1328
1328
|
let s = this.supabase.from(this.table).select("*");
|
|
@@ -1333,7 +1333,7 @@ class js {
|
|
|
1333
1333
|
t.status,
|
|
1334
1334
|
t.statusText,
|
|
1335
1335
|
"Unable to load common data"
|
|
1336
|
-
), (t.data ?? []).map((
|
|
1336
|
+
), (t.data ?? []).map((n) => this.toCommonDto(n));
|
|
1337
1337
|
}
|
|
1338
1338
|
async getById(e) {
|
|
1339
1339
|
const s = {
|
|
@@ -1356,7 +1356,7 @@ class js {
|
|
|
1356
1356
|
if (e.length === 0) return 0;
|
|
1357
1357
|
const s = ((c = (i = this.options).nowFactory) == null ? void 0 : c.call(i).toISOString()) ?? (/* @__PURE__ */ new Date()).toISOString(), t = this.supabase.from(this.table).update({
|
|
1358
1358
|
[this.deletedAtColumn]: s
|
|
1359
|
-
}),
|
|
1359
|
+
}), n = `(${e.join(",")})`, o = await t.filter(this.idColumn, "in", n).select(this.idColumn);
|
|
1360
1360
|
return this.assertNoError(
|
|
1361
1361
|
o.error,
|
|
1362
1362
|
o.status,
|
|
@@ -1367,53 +1367,53 @@ class js {
|
|
|
1367
1367
|
async restore(e) {
|
|
1368
1368
|
var o;
|
|
1369
1369
|
if (e.length === 0) return 0;
|
|
1370
|
-
const s = this.supabase.from(this.table).update({ [this.deletedAtColumn]: null }), t = `(${e.join(",")})`,
|
|
1370
|
+
const s = this.supabase.from(this.table).update({ [this.deletedAtColumn]: null }), t = `(${e.join(",")})`, n = await s.filter(this.idColumn, "in", t).select(this.idColumn);
|
|
1371
1371
|
return this.assertNoError(
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1372
|
+
n.error,
|
|
1373
|
+
n.status,
|
|
1374
|
+
n.statusText,
|
|
1375
1375
|
"Unable to restore"
|
|
1376
|
-
), ((o =
|
|
1376
|
+
), ((o = n.data) == null ? void 0 : o.length) ?? 0;
|
|
1377
1377
|
}
|
|
1378
1378
|
}
|
|
1379
|
-
const
|
|
1380
|
-
if (
|
|
1379
|
+
const jt = (r) => typeof r == "object" && r !== null, Qt = (r, e) => {
|
|
1380
|
+
if (jt(r))
|
|
1381
1381
|
for (const s of e) {
|
|
1382
|
-
const t =
|
|
1382
|
+
const t = r[s];
|
|
1383
1383
|
if (typeof t == "string" && t.trim().length > 0)
|
|
1384
1384
|
return t.trim();
|
|
1385
1385
|
}
|
|
1386
|
-
},
|
|
1387
|
-
if (!
|
|
1388
|
-
const s = Number(
|
|
1386
|
+
}, qt = (r, e) => {
|
|
1387
|
+
if (!r) return e;
|
|
1388
|
+
const s = Number(r);
|
|
1389
1389
|
return Number.isFinite(s) ? s : e;
|
|
1390
|
-
},
|
|
1390
|
+
}, ke = (r, e) => {
|
|
1391
1391
|
const {
|
|
1392
1392
|
defaultId: s = 0,
|
|
1393
1393
|
defaultUsername: t = "",
|
|
1394
|
-
defaultEmail:
|
|
1394
|
+
defaultEmail: n = "",
|
|
1395
1395
|
usernameMetadataKeys: o = ["username", "name", "full_name"]
|
|
1396
|
-
} = e ?? {}, i =
|
|
1397
|
-
|
|
1396
|
+
} = e ?? {}, i = Qt(
|
|
1397
|
+
r.user.user_metadata,
|
|
1398
1398
|
o
|
|
1399
1399
|
);
|
|
1400
1400
|
return {
|
|
1401
|
-
id:
|
|
1401
|
+
id: qt(r.user.id, s),
|
|
1402
1402
|
username: i ?? t,
|
|
1403
|
-
email:
|
|
1404
|
-
token:
|
|
1405
|
-
refreshToken:
|
|
1406
|
-
accessTokenExpiresAt: typeof
|
|
1403
|
+
email: r.user.email ?? n,
|
|
1404
|
+
token: r.access_token,
|
|
1405
|
+
refreshToken: r.refresh_token ?? null,
|
|
1406
|
+
accessTokenExpiresAt: typeof r.expires_at == "number" ? new Date(r.expires_at * 1e3).toISOString() : null
|
|
1407
1407
|
};
|
|
1408
1408
|
};
|
|
1409
|
-
function
|
|
1410
|
-
return Object.keys(
|
|
1409
|
+
function Is(r) {
|
|
1410
|
+
return Object.keys(r).filter((e) => isNaN(Number(e))).map((e) => ({
|
|
1411
1411
|
key: e,
|
|
1412
|
-
value:
|
|
1412
|
+
value: r[e]
|
|
1413
1413
|
}));
|
|
1414
1414
|
}
|
|
1415
|
-
const
|
|
1416
|
-
const s = localStorage.getItem(
|
|
1415
|
+
const G = (r, e = "") => {
|
|
1416
|
+
const s = localStorage.getItem(r) ?? void 0;
|
|
1417
1417
|
if (s && e.length)
|
|
1418
1418
|
switch (e) {
|
|
1419
1419
|
case "object":
|
|
@@ -1426,12 +1426,12 @@ const z = (n, e = "") => {
|
|
|
1426
1426
|
return s;
|
|
1427
1427
|
}
|
|
1428
1428
|
return s;
|
|
1429
|
-
},
|
|
1430
|
-
|
|
1429
|
+
}, Q = (r, e) => localStorage.setItem(
|
|
1430
|
+
r,
|
|
1431
1431
|
typeof e == "object" ? JSON.stringify(e) : e
|
|
1432
|
-
),
|
|
1433
|
-
function
|
|
1434
|
-
const e =
|
|
1432
|
+
), I = (r) => localStorage.removeItem(r);
|
|
1433
|
+
function _s(r) {
|
|
1434
|
+
const e = r ? new Date(r) : /* @__PURE__ */ new Date(), s = {
|
|
1435
1435
|
weekday: "long",
|
|
1436
1436
|
// martes
|
|
1437
1437
|
day: "numeric",
|
|
@@ -1452,91 +1452,91 @@ function Hs(n) {
|
|
|
1452
1452
|
s
|
|
1453
1453
|
);
|
|
1454
1454
|
}
|
|
1455
|
-
function
|
|
1456
|
-
const e =
|
|
1457
|
-
return `${s}/${t}/${
|
|
1455
|
+
function Ps(r) {
|
|
1456
|
+
const e = r ? new Date(r) : /* @__PURE__ */ new Date(), s = String(e.getDate()).padStart(2, "0"), t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getFullYear()).slice(-2), o = String(e.getHours()).padStart(2, "0"), i = String(e.getMinutes()).padStart(2, "0");
|
|
1457
|
+
return `${s}/${t}/${n} ${o}:${i}`;
|
|
1458
1458
|
}
|
|
1459
|
-
function
|
|
1460
|
-
const e =
|
|
1461
|
-
return `${s}-${t}-${
|
|
1459
|
+
function Os(r) {
|
|
1460
|
+
const e = r ? new Date(r) : /* @__PURE__ */ new Date(), s = e.getFullYear(), t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0"), o = String(e.getHours()).padStart(2, "0"), i = String(e.getMinutes()).padStart(2, "0");
|
|
1461
|
+
return `${s}-${t}-${n}T${o}:${i}`;
|
|
1462
1462
|
}
|
|
1463
|
-
const
|
|
1463
|
+
const Ht = () => {
|
|
1464
1464
|
var s;
|
|
1465
|
-
const
|
|
1465
|
+
const r = navigator, e = ((s = r == null ? void 0 : r.userAgentData) == null ? void 0 : s.platform) || (r == null ? void 0 : r.platform) || "";
|
|
1466
1466
|
return /Mac|iPhone|iPod|iPad/i.test(e);
|
|
1467
1467
|
};
|
|
1468
|
-
function
|
|
1469
|
-
if (!
|
|
1470
|
-
const e =
|
|
1468
|
+
function we(r) {
|
|
1469
|
+
if (!r || typeof r != "object") return !1;
|
|
1470
|
+
const e = r;
|
|
1471
1471
|
return Array.isArray(e.errors) && e.errors.every(
|
|
1472
1472
|
(s) => Array.isArray(s) && s.length === 2 && typeof s[0] == "string"
|
|
1473
1473
|
);
|
|
1474
1474
|
}
|
|
1475
|
-
function
|
|
1476
|
-
if (!
|
|
1477
|
-
const e =
|
|
1475
|
+
function Se(r) {
|
|
1476
|
+
if (!r || typeof r != "object") return !1;
|
|
1477
|
+
const e = r;
|
|
1478
1478
|
return typeof (e == null ? void 0 : e.status) == "number" && typeof (e == null ? void 0 : e.message) == "string";
|
|
1479
1479
|
}
|
|
1480
|
-
function
|
|
1481
|
-
return
|
|
1480
|
+
function Ms(r, e) {
|
|
1481
|
+
return r != null && r.errors ? r.errors.map(([s, t]) => e(s, t)) : [];
|
|
1482
1482
|
}
|
|
1483
|
-
const
|
|
1483
|
+
const Fe = Y(
|
|
1484
1484
|
void 0
|
|
1485
1485
|
);
|
|
1486
|
-
function
|
|
1487
|
-
const { children: e } =
|
|
1488
|
-
(m,
|
|
1489
|
-
const { type:
|
|
1490
|
-
switch (
|
|
1486
|
+
function Fs(r) {
|
|
1487
|
+
const { children: e } = r, s = F(0), [t, n] = xe(
|
|
1488
|
+
(m, f) => {
|
|
1489
|
+
const { type: p, items: b, id: g } = f;
|
|
1490
|
+
switch (p) {
|
|
1491
1491
|
case "set":
|
|
1492
|
-
return
|
|
1492
|
+
return b ?? [];
|
|
1493
1493
|
case "remove":
|
|
1494
|
-
return g !== void 0 ? m.filter((
|
|
1494
|
+
return g !== void 0 ? m.filter((y) => y.id !== g) : [];
|
|
1495
1495
|
}
|
|
1496
1496
|
return m;
|
|
1497
1497
|
},
|
|
1498
1498
|
[],
|
|
1499
1499
|
() => []
|
|
1500
|
-
), o = (m) => m.map((
|
|
1501
|
-
(m) =>
|
|
1500
|
+
), o = (m) => m.map((f) => ({ ...f, id: s.current++ })), i = S(
|
|
1501
|
+
(m) => n({
|
|
1502
1502
|
type: "set",
|
|
1503
|
-
items: o([{ ...m, type:
|
|
1503
|
+
items: o([{ ...m, type: M.error }])
|
|
1504
1504
|
}),
|
|
1505
1505
|
[]
|
|
1506
|
-
), c =
|
|
1507
|
-
(m) =>
|
|
1506
|
+
), c = S(
|
|
1507
|
+
(m) => n({ type: "set", items: o([{ ...m }]) }),
|
|
1508
1508
|
[]
|
|
1509
|
-
), a =
|
|
1510
|
-
(m) =>
|
|
1509
|
+
), a = S(
|
|
1510
|
+
(m) => n({ type: "set", items: o(m) }),
|
|
1511
1511
|
[]
|
|
1512
|
-
),
|
|
1513
|
-
(m) =>
|
|
1512
|
+
), l = S(
|
|
1513
|
+
(m) => n({
|
|
1514
1514
|
type: "set",
|
|
1515
|
-
items: o([{ ...m, type:
|
|
1515
|
+
items: o([{ ...m, type: M.success }])
|
|
1516
1516
|
}),
|
|
1517
1517
|
[]
|
|
1518
|
-
),
|
|
1518
|
+
), u = (m) => n({ type: "remove", id: m }), d = V(() => ({
|
|
1519
1519
|
notification: t,
|
|
1520
|
-
removeNotification:
|
|
1520
|
+
removeNotification: u,
|
|
1521
1521
|
showErrorNotification: i,
|
|
1522
1522
|
showNotification: c,
|
|
1523
|
-
showSuccessNotification:
|
|
1523
|
+
showSuccessNotification: l,
|
|
1524
1524
|
showStackNotifications: a
|
|
1525
1525
|
}), [
|
|
1526
1526
|
t,
|
|
1527
1527
|
i,
|
|
1528
1528
|
c,
|
|
1529
1529
|
a,
|
|
1530
|
-
|
|
1530
|
+
l
|
|
1531
1531
|
]);
|
|
1532
|
-
return /* @__PURE__ */
|
|
1532
|
+
return /* @__PURE__ */ h(Fe.Provider, { value: d, children: e });
|
|
1533
1533
|
}
|
|
1534
|
-
const
|
|
1535
|
-
const
|
|
1536
|
-
if (!
|
|
1534
|
+
const oe = () => {
|
|
1535
|
+
const r = X(Fe);
|
|
1536
|
+
if (!r)
|
|
1537
1537
|
throw new Error("NotificationContext must be used within a Provider");
|
|
1538
|
-
return
|
|
1539
|
-
},
|
|
1538
|
+
return r;
|
|
1539
|
+
}, Ce = () => new kt({
|
|
1540
1540
|
defaultOptions: {
|
|
1541
1541
|
queries: {
|
|
1542
1542
|
refetchInterval: !1,
|
|
@@ -1548,191 +1548,191 @@ const ne = () => {
|
|
|
1548
1548
|
// default: true
|
|
1549
1549
|
}
|
|
1550
1550
|
}
|
|
1551
|
-
}),
|
|
1551
|
+
}), Us = Ce(), Ue = Y(
|
|
1552
1552
|
void 0
|
|
1553
|
-
),
|
|
1554
|
-
const { children: e, manager: s, queryClient: t } =
|
|
1555
|
-
return /* @__PURE__ */
|
|
1556
|
-
},
|
|
1557
|
-
const
|
|
1558
|
-
if (!
|
|
1553
|
+
), Ks = (r) => {
|
|
1554
|
+
const { children: e, manager: s, queryClient: t } = r, [n] = R(Ce), o = t ?? n;
|
|
1555
|
+
return /* @__PURE__ */ h(Ue.Provider, { value: { client: s }, children: /* @__PURE__ */ h(_e, { client: o, children: e }) });
|
|
1556
|
+
}, Bt = () => {
|
|
1557
|
+
const r = X(Ue);
|
|
1558
|
+
if (!r)
|
|
1559
1559
|
throw new Error("managerContext must be used within a Provider");
|
|
1560
|
-
return
|
|
1561
|
-
},
|
|
1560
|
+
return r.client;
|
|
1561
|
+
}, Te = Y(
|
|
1562
1562
|
void 0
|
|
1563
|
-
),
|
|
1564
|
-
const
|
|
1565
|
-
if (!
|
|
1566
|
-
return
|
|
1567
|
-
},
|
|
1563
|
+
), Vt = () => {
|
|
1564
|
+
const r = X(Te);
|
|
1565
|
+
if (!r) throw new Error("authContext must be used within a Provider");
|
|
1566
|
+
return r;
|
|
1567
|
+
}, js = (r) => {
|
|
1568
1568
|
const {
|
|
1569
1569
|
children: e,
|
|
1570
1570
|
guestMode: s = "guest_mode",
|
|
1571
1571
|
user: t = "user",
|
|
1572
|
-
remember:
|
|
1572
|
+
remember: n = "remember",
|
|
1573
1573
|
refreshTokenKey: o = "refreshToken",
|
|
1574
1574
|
accessTokenExpiresAtKey: i = "accessTokenExpiresAt"
|
|
1575
|
-
} =
|
|
1576
|
-
|
|
1577
|
-
}, [i, o,
|
|
1578
|
-
(
|
|
1579
|
-
|
|
1575
|
+
} = r, c = Bt(), [a, l] = R({}), u = S(() => {
|
|
1576
|
+
I(t), I(n), I(o), I(i);
|
|
1577
|
+
}, [i, o, n, t]), d = S(() => !!G(s, "boolean") && a.token === void 0, [a.token, s]), m = S(
|
|
1578
|
+
(y) => {
|
|
1579
|
+
Q(s, y);
|
|
1580
1580
|
},
|
|
1581
1581
|
[s]
|
|
1582
|
-
),
|
|
1583
|
-
(
|
|
1584
|
-
if (!
|
|
1585
|
-
const
|
|
1586
|
-
|
|
1582
|
+
), f = S(
|
|
1583
|
+
(y, C) => {
|
|
1584
|
+
if (!y) return;
|
|
1585
|
+
const w = G(n, "boolean"), E = C ?? (typeof w == "boolean" ? w : !1);
|
|
1586
|
+
l(y), I(s), Q(t, y.token), Q(n, E), typeof y.refreshToken == "string" && y.refreshToken.length ? Q(o, y.refreshToken) : I(o), typeof y.accessTokenExpiresAt == "string" && y.accessTokenExpiresAt.length ? Q(i, y.accessTokenExpiresAt) : I(i);
|
|
1587
1587
|
},
|
|
1588
|
-
[i, s, o,
|
|
1589
|
-
),
|
|
1590
|
-
const
|
|
1588
|
+
[i, s, o, n, t]
|
|
1589
|
+
), p = S(async () => {
|
|
1590
|
+
const y = G(t) ?? a.token, C = G(o) ?? (typeof a.refreshToken == "string" ? a.refreshToken : void 0);
|
|
1591
1591
|
try {
|
|
1592
1592
|
await c.Auth.logout({
|
|
1593
|
-
accessToken:
|
|
1594
|
-
refreshToken:
|
|
1593
|
+
accessToken: y,
|
|
1594
|
+
refreshToken: C
|
|
1595
1595
|
});
|
|
1596
|
-
} catch (
|
|
1597
|
-
console.error(
|
|
1596
|
+
} catch (w) {
|
|
1597
|
+
console.error(w);
|
|
1598
1598
|
}
|
|
1599
|
-
|
|
1599
|
+
l({}), u();
|
|
1600
1600
|
}, [
|
|
1601
1601
|
a.refreshToken,
|
|
1602
1602
|
a.token,
|
|
1603
|
-
|
|
1603
|
+
u,
|
|
1604
1604
|
c.Auth,
|
|
1605
1605
|
o,
|
|
1606
1606
|
t
|
|
1607
|
-
]),
|
|
1607
|
+
]), b = S(async () => {
|
|
1608
1608
|
try {
|
|
1609
|
-
const
|
|
1610
|
-
|
|
1611
|
-
} catch (
|
|
1612
|
-
console.error(
|
|
1609
|
+
const y = await c.Auth.getSession();
|
|
1610
|
+
f(y);
|
|
1611
|
+
} catch (y) {
|
|
1612
|
+
console.error(y), p();
|
|
1613
1613
|
}
|
|
1614
|
-
}, [
|
|
1614
|
+
}, [f, p, c.Auth]), g = V(() => ({
|
|
1615
1615
|
account: a,
|
|
1616
|
-
logUser:
|
|
1617
|
-
logoutUser:
|
|
1618
|
-
logUserFromLocal:
|
|
1616
|
+
logUser: f,
|
|
1617
|
+
logoutUser: p,
|
|
1618
|
+
logUserFromLocal: b,
|
|
1619
1619
|
isInGuestMode: d,
|
|
1620
1620
|
setGuestMode: m
|
|
1621
1621
|
}), [
|
|
1622
1622
|
a,
|
|
1623
|
+
f,
|
|
1623
1624
|
p,
|
|
1624
|
-
|
|
1625
|
-
y,
|
|
1625
|
+
b,
|
|
1626
1626
|
d,
|
|
1627
1627
|
m
|
|
1628
1628
|
]);
|
|
1629
|
-
return /* @__PURE__ */
|
|
1630
|
-
},
|
|
1631
|
-
const
|
|
1632
|
-
if (!
|
|
1629
|
+
return /* @__PURE__ */ h(Te.Provider, { value: g, children: e });
|
|
1630
|
+
}, Ke = () => Vt(), je = Y(void 0), Gt = () => {
|
|
1631
|
+
const r = X(je);
|
|
1632
|
+
if (!r)
|
|
1633
1633
|
throw new Error("supabaseManagerContext must be used within a Provider");
|
|
1634
|
-
return
|
|
1635
|
-
},
|
|
1634
|
+
return r.client;
|
|
1635
|
+
}, Qs = (r) => {
|
|
1636
1636
|
const {
|
|
1637
1637
|
children: e,
|
|
1638
1638
|
guestMode: s = "guest_mode",
|
|
1639
1639
|
user: t = "user",
|
|
1640
|
-
remember:
|
|
1640
|
+
remember: n = "remember",
|
|
1641
1641
|
refreshTokenKey: o = "refreshToken",
|
|
1642
1642
|
accessTokenExpiresAtKey: i = "accessTokenExpiresAt",
|
|
1643
1643
|
sessionMapper: c
|
|
1644
|
-
} =
|
|
1645
|
-
|
|
1646
|
-
|
|
1644
|
+
} = r, a = Gt(), l = F(c ?? ke);
|
|
1645
|
+
O(() => {
|
|
1646
|
+
l.current = c ?? ke;
|
|
1647
1647
|
}, [c]);
|
|
1648
|
-
const [
|
|
1649
|
-
|
|
1650
|
-
}, [i, o,
|
|
1651
|
-
(
|
|
1652
|
-
|
|
1648
|
+
const [u, d] = R({}), m = S(() => {
|
|
1649
|
+
I(t), I(n), I(o), I(i);
|
|
1650
|
+
}, [i, o, n, t]), f = S(() => !!G(s, "boolean") && u.token === void 0, [u.token, s]), p = S(
|
|
1651
|
+
(w) => {
|
|
1652
|
+
Q(s, w);
|
|
1653
1653
|
},
|
|
1654
1654
|
[s]
|
|
1655
|
-
),
|
|
1656
|
-
(
|
|
1657
|
-
if (!
|
|
1658
|
-
const
|
|
1659
|
-
d(
|
|
1655
|
+
), b = S(
|
|
1656
|
+
(w, E) => {
|
|
1657
|
+
if (!w) return;
|
|
1658
|
+
const A = G(n, "boolean"), U = E ?? (typeof A == "boolean" ? A : !1);
|
|
1659
|
+
d(w), I(s), Q(t, w.token), Q(n, U), typeof w.refreshToken == "string" && w.refreshToken.length ? Q(o, w.refreshToken) : I(o), typeof w.accessTokenExpiresAt == "string" && w.accessTokenExpiresAt.length ? Q(i, w.accessTokenExpiresAt) : I(i);
|
|
1660
1660
|
},
|
|
1661
|
-
[i, s, o,
|
|
1662
|
-
), g =
|
|
1661
|
+
[i, s, o, n, t]
|
|
1662
|
+
), g = S(async () => {
|
|
1663
1663
|
try {
|
|
1664
1664
|
await a.auth.signOut();
|
|
1665
|
-
} catch (
|
|
1666
|
-
console.error(
|
|
1665
|
+
} catch (w) {
|
|
1666
|
+
console.error(w);
|
|
1667
1667
|
}
|
|
1668
1668
|
d({}), m();
|
|
1669
|
-
}, [m, a.auth]),
|
|
1669
|
+
}, [m, a.auth]), y = S(async () => {
|
|
1670
1670
|
try {
|
|
1671
|
-
const { data:
|
|
1672
|
-
if (
|
|
1673
|
-
if (!
|
|
1671
|
+
const { data: w, error: E } = await a.auth.getSession();
|
|
1672
|
+
if (E) throw E;
|
|
1673
|
+
if (!w.session) {
|
|
1674
1674
|
d({}), m();
|
|
1675
1675
|
return;
|
|
1676
1676
|
}
|
|
1677
|
-
|
|
1678
|
-
} catch (
|
|
1679
|
-
console.error(
|
|
1677
|
+
b(l.current(w.session));
|
|
1678
|
+
} catch (w) {
|
|
1679
|
+
console.error(w), await g();
|
|
1680
1680
|
}
|
|
1681
|
-
}, [m,
|
|
1682
|
-
|
|
1683
|
-
let
|
|
1681
|
+
}, [m, b, g, a.auth]);
|
|
1682
|
+
O(() => {
|
|
1683
|
+
let w = !0;
|
|
1684
1684
|
(async () => {
|
|
1685
|
-
|
|
1685
|
+
w && await y();
|
|
1686
1686
|
})();
|
|
1687
|
-
const { data:
|
|
1688
|
-
if (
|
|
1689
|
-
if (!
|
|
1687
|
+
const { data: A } = a.auth.onAuthStateChange((U, B) => {
|
|
1688
|
+
if (w) {
|
|
1689
|
+
if (!B) {
|
|
1690
1690
|
d({}), m();
|
|
1691
1691
|
return;
|
|
1692
1692
|
}
|
|
1693
|
-
|
|
1693
|
+
b(l.current(B));
|
|
1694
1694
|
}
|
|
1695
1695
|
});
|
|
1696
1696
|
return () => {
|
|
1697
|
-
|
|
1697
|
+
w = !1, A.subscription.unsubscribe();
|
|
1698
1698
|
};
|
|
1699
|
-
}, [m,
|
|
1700
|
-
const
|
|
1701
|
-
account:
|
|
1702
|
-
logUser:
|
|
1699
|
+
}, [m, b, y, a.auth]);
|
|
1700
|
+
const C = V(() => ({
|
|
1701
|
+
account: u,
|
|
1702
|
+
logUser: b,
|
|
1703
1703
|
logoutUser: g,
|
|
1704
|
-
logUserFromLocal:
|
|
1705
|
-
isInGuestMode:
|
|
1706
|
-
setGuestMode:
|
|
1704
|
+
logUserFromLocal: y,
|
|
1705
|
+
isInGuestMode: f,
|
|
1706
|
+
setGuestMode: p
|
|
1707
1707
|
}), [
|
|
1708
|
-
|
|
1709
|
-
y,
|
|
1710
|
-
g,
|
|
1708
|
+
u,
|
|
1711
1709
|
b,
|
|
1712
|
-
|
|
1713
|
-
|
|
1710
|
+
g,
|
|
1711
|
+
y,
|
|
1712
|
+
f,
|
|
1713
|
+
p
|
|
1714
1714
|
]);
|
|
1715
|
-
return /* @__PURE__ */
|
|
1716
|
-
},
|
|
1717
|
-
const { children: e, supabase: s, queryClient: t } =
|
|
1718
|
-
return /* @__PURE__ */
|
|
1719
|
-
},
|
|
1720
|
-
const { children: e, location: s, navigate: t, linkComponent:
|
|
1721
|
-
return /* @__PURE__ */
|
|
1722
|
-
|
|
1715
|
+
return /* @__PURE__ */ h(Te.Provider, { value: C, children: e });
|
|
1716
|
+
}, qs = (r) => {
|
|
1717
|
+
const { children: e, supabase: s, queryClient: t } = r, [n] = R(Ce), o = t ?? n;
|
|
1718
|
+
return /* @__PURE__ */ h(je.Provider, { value: { client: s }, children: /* @__PURE__ */ h(_e, { client: o, children: e }) });
|
|
1719
|
+
}, Qe = Y({}), Hs = (r) => {
|
|
1720
|
+
const { children: e, location: s, navigate: t, linkComponent: n, searchComponent: o } = r;
|
|
1721
|
+
return /* @__PURE__ */ h(
|
|
1722
|
+
Qe.Provider,
|
|
1723
1723
|
{
|
|
1724
|
-
value: { location: s, navigate: t, linkComponent:
|
|
1724
|
+
value: { location: s, navigate: t, linkComponent: n, searchComponent: o },
|
|
1725
1725
|
children: e
|
|
1726
1726
|
}
|
|
1727
1727
|
);
|
|
1728
|
-
},
|
|
1729
|
-
const
|
|
1730
|
-
if (
|
|
1728
|
+
}, ce = () => {
|
|
1729
|
+
const r = X(Qe);
|
|
1730
|
+
if (r === void 0 || Object.keys(r).length === 0)
|
|
1731
1731
|
throw new Error(
|
|
1732
1732
|
"Config provider has not been set. This step is required and cannot be skipped."
|
|
1733
1733
|
);
|
|
1734
|
-
return
|
|
1735
|
-
},
|
|
1734
|
+
return r;
|
|
1735
|
+
}, Wt = {
|
|
1736
1736
|
addChildItem: () => {
|
|
1737
1737
|
},
|
|
1738
1738
|
removeChildItem: () => {
|
|
@@ -1740,66 +1740,66 @@ const ne = () => {
|
|
|
1740
1740
|
clearDynamicItems: () => {
|
|
1741
1741
|
},
|
|
1742
1742
|
dynamicItems: {}
|
|
1743
|
-
},
|
|
1744
|
-
|
|
1745
|
-
),
|
|
1746
|
-
const { children: e } =
|
|
1747
|
-
(a,
|
|
1748
|
-
...
|
|
1749
|
-
[a]: [...
|
|
1743
|
+
}, qe = Y(
|
|
1744
|
+
Wt
|
|
1745
|
+
), Bs = (r) => {
|
|
1746
|
+
const { children: e } = r, [s, t] = R({}), n = S(
|
|
1747
|
+
(a, l) => t((u) => ({
|
|
1748
|
+
...u,
|
|
1749
|
+
[a]: [...u[a] ?? [], l]
|
|
1750
1750
|
})),
|
|
1751
1751
|
[]
|
|
1752
|
-
), o =
|
|
1753
|
-
(a,
|
|
1754
|
-
...
|
|
1755
|
-
[a]: (
|
|
1752
|
+
), o = S(
|
|
1753
|
+
(a, l) => t((u) => ({
|
|
1754
|
+
...u,
|
|
1755
|
+
[a]: (u[a] ?? []).filter((d, m) => m !== l)
|
|
1756
1756
|
})),
|
|
1757
1757
|
[]
|
|
1758
|
-
), i =
|
|
1759
|
-
t(a ? (
|
|
1760
|
-
...
|
|
1758
|
+
), i = S((a) => {
|
|
1759
|
+
t(a ? (l) => ({
|
|
1760
|
+
...l,
|
|
1761
1761
|
[a]: []
|
|
1762
1762
|
}) : {});
|
|
1763
|
-
}, []), c =
|
|
1763
|
+
}, []), c = V(
|
|
1764
1764
|
() => ({
|
|
1765
1765
|
dynamicItems: s,
|
|
1766
|
-
addChildItem:
|
|
1766
|
+
addChildItem: n,
|
|
1767
1767
|
removeChildItem: o,
|
|
1768
1768
|
clearDynamicItems: i
|
|
1769
1769
|
}),
|
|
1770
|
-
[s, i, o,
|
|
1770
|
+
[s, i, o, n]
|
|
1771
1771
|
);
|
|
1772
|
-
return /* @__PURE__ */
|
|
1773
|
-
|
|
1772
|
+
return /* @__PURE__ */ h(
|
|
1773
|
+
qe.Provider,
|
|
1774
1774
|
{
|
|
1775
1775
|
value: c,
|
|
1776
1776
|
children: e
|
|
1777
1777
|
}
|
|
1778
1778
|
);
|
|
1779
|
-
},
|
|
1780
|
-
function
|
|
1781
|
-
const { t: e } =
|
|
1782
|
-
const
|
|
1783
|
-
return
|
|
1784
|
-
}), [i == null ? void 0 : i.email,
|
|
1779
|
+
}, zt = () => X(qe);
|
|
1780
|
+
function Vs(r) {
|
|
1781
|
+
const { t: e } = k(), { open: s, onClose: t, menuMap: n, logo: o } = r, { account: i } = Ke(), { dynamicItems: c } = zt(), { linkComponent: a, location: l } = ce(), u = a, d = V(() => n.filter((g) => {
|
|
1782
|
+
const y = g.auth, C = !!(i != null && i.email);
|
|
1783
|
+
return y == null || y && C || !y && !C;
|
|
1784
|
+
}), [i == null ? void 0 : i.email, n]), m = S(
|
|
1785
1785
|
(g) => {
|
|
1786
1786
|
g.key === "Escape" && s && t();
|
|
1787
1787
|
},
|
|
1788
1788
|
[t, s]
|
|
1789
1789
|
);
|
|
1790
|
-
|
|
1790
|
+
O(() => (document.addEventListener("keydown", m), () => {
|
|
1791
1791
|
document.removeEventListener("keydown", m);
|
|
1792
1792
|
}), [m]);
|
|
1793
|
-
const
|
|
1794
|
-
(g,
|
|
1795
|
-
[
|
|
1796
|
-
),
|
|
1797
|
-
(g) => /* @__PURE__ */
|
|
1793
|
+
const f = S(
|
|
1794
|
+
(g, y) => y ? g === `${l.pathname}${l.search}` : g === l.pathname,
|
|
1795
|
+
[l.pathname, l.search]
|
|
1796
|
+
), p = S(
|
|
1797
|
+
(g) => /* @__PURE__ */ h(
|
|
1798
1798
|
"li",
|
|
1799
1799
|
{
|
|
1800
|
-
className: `drawer-list-item-child ${
|
|
1801
|
-
children: g.path ? /* @__PURE__ */
|
|
1802
|
-
|
|
1800
|
+
className: `drawer-list-item-child ${f(g.path, !0) ? "active" : ""} animated`,
|
|
1801
|
+
children: g.path ? /* @__PURE__ */ h(
|
|
1802
|
+
u,
|
|
1803
1803
|
{
|
|
1804
1804
|
tabIndex: s ? 0 : -1,
|
|
1805
1805
|
to: g.path ?? "/",
|
|
@@ -1813,15 +1813,15 @@ function sn(n) {
|
|
|
1813
1813
|
},
|
|
1814
1814
|
g.id
|
|
1815
1815
|
),
|
|
1816
|
-
[
|
|
1817
|
-
),
|
|
1818
|
-
const
|
|
1816
|
+
[u, s, e, f]
|
|
1817
|
+
), b = V(() => d.map((g, y) => {
|
|
1818
|
+
const C = g.page ?? String(y), w = `drawer-list-item ${f(g.path) ? "active" : ""} animated`;
|
|
1819
1819
|
if (g.type === "divider")
|
|
1820
|
-
return /* @__PURE__ */
|
|
1821
|
-
const
|
|
1822
|
-
return /* @__PURE__ */
|
|
1823
|
-
/* @__PURE__ */
|
|
1824
|
-
|
|
1820
|
+
return /* @__PURE__ */ h("li", { className: w, children: /* @__PURE__ */ h("hr", { className: "drawer-divider" }) }, C);
|
|
1821
|
+
const E = g.children ?? (g.page && c ? c[g.page] : null);
|
|
1822
|
+
return /* @__PURE__ */ v("li", { className: w, children: [
|
|
1823
|
+
/* @__PURE__ */ v(
|
|
1824
|
+
u,
|
|
1825
1825
|
{
|
|
1826
1826
|
tabIndex: s ? 0 : -1,
|
|
1827
1827
|
to: g.path ?? "/",
|
|
@@ -1835,42 +1835,42 @@ function sn(n) {
|
|
|
1835
1835
|
]
|
|
1836
1836
|
}
|
|
1837
1837
|
),
|
|
1838
|
-
|
|
1839
|
-
] },
|
|
1840
|
-
}), [
|
|
1841
|
-
return /* @__PURE__ */
|
|
1838
|
+
E && /* @__PURE__ */ h("ul", { className: "drawer-children-list", children: E.map(p) })
|
|
1839
|
+
] }, C);
|
|
1840
|
+
}), [u, c, f, s, d, p, e]);
|
|
1841
|
+
return /* @__PURE__ */ h(
|
|
1842
1842
|
"div",
|
|
1843
1843
|
{
|
|
1844
1844
|
"aria-label": e("_accessibility:ariaLabels.closeMenu"),
|
|
1845
1845
|
"aria-disabled": !s,
|
|
1846
1846
|
className: `${s ? "opened" : "closed"} drawer-backdrop`,
|
|
1847
1847
|
onClick: () => t(),
|
|
1848
|
-
children: /* @__PURE__ */
|
|
1849
|
-
/* @__PURE__ */
|
|
1848
|
+
children: /* @__PURE__ */ v("aside", { className: `${s ? "opened" : "closed"} drawer animated`, children: [
|
|
1849
|
+
/* @__PURE__ */ v("div", { className: "drawer-header-container", children: [
|
|
1850
1850
|
o,
|
|
1851
|
-
/* @__PURE__ */
|
|
1851
|
+
/* @__PURE__ */ h("h2", { className: "drawer-header poppins", children: e("_pages:home.appName") })
|
|
1852
1852
|
] }),
|
|
1853
|
-
/* @__PURE__ */
|
|
1853
|
+
/* @__PURE__ */ h("ul", { className: "drawer-menu-list", children: b })
|
|
1854
1854
|
] })
|
|
1855
1855
|
}
|
|
1856
1856
|
);
|
|
1857
1857
|
}
|
|
1858
|
-
const
|
|
1859
|
-
var
|
|
1860
|
-
function
|
|
1861
|
-
if (
|
|
1862
|
-
|
|
1863
|
-
const
|
|
1858
|
+
const z = ({ icon: r, ...e }) => /* @__PURE__ */ h(ot, { icon: /* @__PURE__ */ h(q, { icon: r }), ...e });
|
|
1859
|
+
var fe, Ne;
|
|
1860
|
+
function Jt() {
|
|
1861
|
+
if (Ne) return fe;
|
|
1862
|
+
Ne = 1;
|
|
1863
|
+
const r = (c, a = "local", l = void 0) => {
|
|
1864
1864
|
if (a === "local") {
|
|
1865
1865
|
if (localStorage.getItem(c) !== void 0 && localStorage.getItem(c) !== "undefined" && localStorage.getItem(c) !== null)
|
|
1866
|
-
return
|
|
1866
|
+
return l === void 0 || l !== void 0 && localStorage.getItem(c) === l;
|
|
1867
1867
|
} else if (a === "session" && sessionStorage.getItem(c) !== void 0 && sessionStorage.getItem(c) !== "undefined" && sessionStorage.getItem(c) !== null)
|
|
1868
|
-
return
|
|
1868
|
+
return l === void 0 || l !== void 0 && sessionStorage.getItem(c) === l;
|
|
1869
1869
|
return !1;
|
|
1870
1870
|
}, e = (c) => {
|
|
1871
1871
|
const a = {};
|
|
1872
|
-
return c.substring(1).split("&").forEach((
|
|
1873
|
-
const [d, m] =
|
|
1872
|
+
return c.substring(1).split("&").forEach((u) => {
|
|
1873
|
+
const [d, m] = u.split("=");
|
|
1874
1874
|
a[d] = m;
|
|
1875
1875
|
}), a;
|
|
1876
1876
|
}, s = (c = "") => {
|
|
@@ -1878,22 +1878,22 @@ function os() {
|
|
|
1878
1878
|
{
|
|
1879
1879
|
let a = navigator.language || navigator.userLanguage;
|
|
1880
1880
|
if (a.indexOf("en") < 0 && a.indexOf("es") < 0 && (a = "en-US"), a = a.split("-")[0], a)
|
|
1881
|
-
return c.length &&
|
|
1881
|
+
return c.length && n(c, 730, a), a;
|
|
1882
1882
|
}
|
|
1883
1883
|
return "en";
|
|
1884
|
-
}, t = (c = 0, a = 0,
|
|
1884
|
+
}, t = (c = 0, a = 0, l = window, u = "smooth") => l.scroll({
|
|
1885
1885
|
top: c,
|
|
1886
1886
|
left: a,
|
|
1887
|
-
behavior:
|
|
1888
|
-
}),
|
|
1887
|
+
behavior: u
|
|
1888
|
+
}), n = (c, a, l, u = "/", d = "Lax") => {
|
|
1889
1889
|
var m = /* @__PURE__ */ new Date();
|
|
1890
1890
|
m.setTime(m.getTime() + a * 24 * 60 * 60 * 1e3);
|
|
1891
|
-
const
|
|
1892
|
-
document.cookie = `${c}=${
|
|
1891
|
+
const f = "; expires=" + m.toUTCString();
|
|
1892
|
+
document.cookie = `${c}=${l || ""}${f};path=${u};SameSite=${d}`;
|
|
1893
1893
|
}, o = (c) => {
|
|
1894
|
-
const a = `${c}=`,
|
|
1895
|
-
for (let d = 0; d <
|
|
1896
|
-
let m =
|
|
1894
|
+
const a = `${c}=`, u = decodeURIComponent(document.cookie).split(";");
|
|
1895
|
+
for (let d = 0; d < u.length; d += 1) {
|
|
1896
|
+
let m = u[d];
|
|
1897
1897
|
for (; m.charAt(0) === " "; )
|
|
1898
1898
|
m = m.substring(1);
|
|
1899
1899
|
if (m.indexOf(a) === 0)
|
|
@@ -1901,781 +1901,736 @@ function os() {
|
|
|
1901
1901
|
}
|
|
1902
1902
|
return "";
|
|
1903
1903
|
};
|
|
1904
|
-
return
|
|
1904
|
+
return fe = {
|
|
1905
1905
|
getCookie: o,
|
|
1906
|
-
createCookie:
|
|
1906
|
+
createCookie: n,
|
|
1907
1907
|
deleteCookie: (c) => document.cookie = `${c}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`,
|
|
1908
1908
|
getUserLanguage: s,
|
|
1909
1909
|
scrollTo: t,
|
|
1910
1910
|
parseQueries: e,
|
|
1911
|
-
validation:
|
|
1912
|
-
},
|
|
1911
|
+
validation: r
|
|
1912
|
+
}, fe;
|
|
1913
1913
|
}
|
|
1914
|
-
var
|
|
1915
|
-
function
|
|
1916
|
-
const { t:
|
|
1917
|
-
return { timeAge:
|
|
1914
|
+
var Yt = Jt();
|
|
1915
|
+
function Gs() {
|
|
1916
|
+
const { t: r, language: e } = k();
|
|
1917
|
+
return { timeAge: S(
|
|
1918
1918
|
(t) => {
|
|
1919
|
-
const o = /* @__PURE__ */ new Date() - t, i = Math.floor(o / (1e3 * 60)), c = Math.floor(i / 60), a = e === "es",
|
|
1920
|
-
return o < 1e3 * 60 ?
|
|
1919
|
+
const o = /* @__PURE__ */ new Date() - t, i = Math.floor(o / (1e3 * 60)), c = Math.floor(i / 60), a = e === "es", l = r("_accessibility:labels.ago"), u = r("_accessibility:labels.minute"), d = r("_accessibility:labels.minutes"), m = r("_accessibility:labels.hour"), f = r("_accessibility:labels.hours"), p = r("_accessibility:labels.yesterday"), b = r("_accessibility:labels.justNow");
|
|
1920
|
+
return o < 1e3 * 60 ? b : i < 60 ? `${a ? l : ""} ${i} ${i === 1 ? u : d} ${a ? "" : l}` : c < 24 ? `${a ? l : ""} ${c} ${c === 1 ? m : f} ${a ? "" : l}` : c < 48 ? p : t.toLocaleDateString(navigator.language || "es-ES", {
|
|
1921
1921
|
day: "2-digit",
|
|
1922
1922
|
month: "2-digit",
|
|
1923
1923
|
year: "numeric"
|
|
1924
1924
|
});
|
|
1925
1925
|
},
|
|
1926
|
-
[
|
|
1926
|
+
[r, e]
|
|
1927
1927
|
) };
|
|
1928
1928
|
}
|
|
1929
|
-
const
|
|
1930
|
-
const { showSuccessNotification: e } =
|
|
1931
|
-
|
|
1932
|
-
}, m = async (
|
|
1933
|
-
c(
|
|
1934
|
-
},
|
|
1929
|
+
const He = (r) => {
|
|
1930
|
+
const { showSuccessNotification: e } = oe(), { mutationFn: s, onError: t, onSuccess: n, onSuccessMessage: o } = r, [i, c] = R([]), { open: a, handleClose: l, handleOpen: u } = Be(), d = () => {
|
|
1931
|
+
l(), c([]);
|
|
1932
|
+
}, m = async (p) => {
|
|
1933
|
+
c(p), u();
|
|
1934
|
+
}, f = ne({
|
|
1935
1935
|
mutationFn: () => s(
|
|
1936
1936
|
Array.isArray(i) ? i : [i]
|
|
1937
1937
|
),
|
|
1938
|
-
onError: (
|
|
1939
|
-
console.error(
|
|
1938
|
+
onError: (p) => {
|
|
1939
|
+
console.error(p), t && t(p), d();
|
|
1940
1940
|
},
|
|
1941
|
-
onSuccess: async (
|
|
1942
|
-
|
|
1941
|
+
onSuccess: async (p) => {
|
|
1942
|
+
n && n(p), e({
|
|
1943
1943
|
message: o
|
|
1944
1944
|
}), d();
|
|
1945
1945
|
}
|
|
1946
1946
|
});
|
|
1947
|
-
return { open: a, onClick: m, close: d, dialogFn:
|
|
1948
|
-
},
|
|
1949
|
-
const { t: e } =
|
|
1947
|
+
return { open: a, onClick: m, close: d, dialogFn: f, isLoading: f.isPending };
|
|
1948
|
+
}, Ws = (r) => {
|
|
1949
|
+
const { t: e } = k(), {
|
|
1950
1950
|
showStackNotifications: s,
|
|
1951
1951
|
showSuccessNotification: t,
|
|
1952
|
-
showErrorNotification:
|
|
1953
|
-
} =
|
|
1952
|
+
showErrorNotification: n
|
|
1953
|
+
} = oe(), o = Z(), {
|
|
1954
1954
|
defaultValues: i,
|
|
1955
1955
|
mutationFn: c,
|
|
1956
1956
|
formToDto: a,
|
|
1957
|
-
onError:
|
|
1958
|
-
onSuccess:
|
|
1957
|
+
onError: l,
|
|
1958
|
+
onSuccess: u,
|
|
1959
1959
|
queryKey: d,
|
|
1960
1960
|
onSuccessMessage: m
|
|
1961
|
-
} =
|
|
1961
|
+
} = r, { control: f, handleSubmit: p, reset: b, setError: g, getValues: y, setValue: C } = Pe({
|
|
1962
1962
|
defaultValues: i
|
|
1963
|
-
}),
|
|
1964
|
-
const
|
|
1965
|
-
if (!(
|
|
1966
|
-
|
|
1963
|
+
}), w = F(null), E = S(() => {
|
|
1964
|
+
const T = document.activeElement;
|
|
1965
|
+
if (!(T instanceof HTMLElement)) {
|
|
1966
|
+
w.current = null;
|
|
1967
1967
|
return;
|
|
1968
1968
|
}
|
|
1969
|
-
|
|
1970
|
-
}, []),
|
|
1971
|
-
(
|
|
1972
|
-
const
|
|
1973
|
-
if (!
|
|
1974
|
-
let
|
|
1975
|
-
return
|
|
1976
|
-
const
|
|
1977
|
-
(
|
|
1978
|
-
}),
|
|
1969
|
+
w.current = T.closest("form");
|
|
1970
|
+
}, []), A = S(
|
|
1971
|
+
(T) => {
|
|
1972
|
+
const $ = T == null ? void 0 : T.errors, x = [], _ = w.current;
|
|
1973
|
+
if (!_) return x;
|
|
1974
|
+
let K = !1;
|
|
1975
|
+
return $ && $.forEach(([le, ee]) => {
|
|
1976
|
+
const j = _.querySelector(`[name="${le}"]`);
|
|
1977
|
+
(j instanceof HTMLInputElement || j instanceof HTMLTextAreaElement || j instanceof HTMLSelectElement) && (K || (j.focus(), K = !0), j.classList.add("error"), x.push(e(`_entities:${d}.${le}.${ee}`)));
|
|
1978
|
+
}), x;
|
|
1979
1979
|
},
|
|
1980
1980
|
[e, d]
|
|
1981
|
-
),
|
|
1982
|
-
const
|
|
1983
|
-
if (!
|
|
1984
|
-
|
|
1985
|
-
|
|
1981
|
+
), U = S(() => {
|
|
1982
|
+
const T = w.current;
|
|
1983
|
+
if (!T) return;
|
|
1984
|
+
T.querySelectorAll("input, textarea, select").forEach((x) => {
|
|
1985
|
+
x.classList.remove("error");
|
|
1986
1986
|
});
|
|
1987
|
-
}, []),
|
|
1987
|
+
}, []), B = ne(
|
|
1988
1988
|
{
|
|
1989
1989
|
mutationFn: c,
|
|
1990
|
-
onError: (
|
|
1991
|
-
console.error(
|
|
1992
|
-
const
|
|
1993
|
-
if (
|
|
1994
|
-
else if (
|
|
1995
|
-
const
|
|
1990
|
+
onError: (T) => {
|
|
1991
|
+
console.error(T);
|
|
1992
|
+
const $ = T;
|
|
1993
|
+
if (l) l(T);
|
|
1994
|
+
else if (we($)) {
|
|
1995
|
+
const x = A($);
|
|
1996
1996
|
s(
|
|
1997
|
-
|
|
1998
|
-
(
|
|
1999
|
-
message:
|
|
2000
|
-
type:
|
|
1997
|
+
x.map(
|
|
1998
|
+
(_) => ({
|
|
1999
|
+
message: _,
|
|
2000
|
+
type: M.error
|
|
2001
2001
|
})
|
|
2002
2002
|
)
|
|
2003
2003
|
);
|
|
2004
|
-
} else if (
|
|
2005
|
-
const
|
|
2006
|
-
|
|
2004
|
+
} else if (Se($)) {
|
|
2005
|
+
const x = $.message || e("_accessibility:errors.500"), _ = e(`_accessibility:errors.${$.status}`);
|
|
2006
|
+
n({ message: _ || x });
|
|
2007
2007
|
} else
|
|
2008
|
-
|
|
2008
|
+
n({ message: e("_accessibility:errors.500") });
|
|
2009
2009
|
},
|
|
2010
|
-
onSuccess: async (
|
|
2011
|
-
await o.invalidateQueries({ queryKey: d }),
|
|
2010
|
+
onSuccess: async (T) => {
|
|
2011
|
+
await o.invalidateQueries({ queryKey: d }), u && u(T), m && t({
|
|
2012
2012
|
message: m
|
|
2013
2013
|
});
|
|
2014
2014
|
}
|
|
2015
2015
|
}
|
|
2016
2016
|
);
|
|
2017
2017
|
return {
|
|
2018
|
-
control:
|
|
2019
|
-
getValues:
|
|
2020
|
-
setValue:
|
|
2021
|
-
handleSubmit:
|
|
2022
|
-
onSubmit: (
|
|
2023
|
-
|
|
2024
|
-
a ? a(
|
|
2018
|
+
control: f,
|
|
2019
|
+
getValues: y,
|
|
2020
|
+
setValue: C,
|
|
2021
|
+
handleSubmit: p,
|
|
2022
|
+
onSubmit: (T) => {
|
|
2023
|
+
E(), U(), B.mutate(
|
|
2024
|
+
a ? a(T) : T
|
|
2025
2025
|
);
|
|
2026
2026
|
},
|
|
2027
|
-
reset:
|
|
2027
|
+
reset: b,
|
|
2028
2028
|
setError: g,
|
|
2029
|
-
isLoading:
|
|
2029
|
+
isLoading: B.isPending
|
|
2030
2030
|
};
|
|
2031
|
-
},
|
|
2032
|
-
const { t: e } =
|
|
2031
|
+
}, Xt = (r) => {
|
|
2032
|
+
const { t: e } = k(), {
|
|
2033
2033
|
onClick: s,
|
|
2034
|
-
icon: t =
|
|
2035
|
-
sticky:
|
|
2034
|
+
icon: t = ft,
|
|
2035
|
+
sticky: n = !0,
|
|
2036
2036
|
hidden: o = !1,
|
|
2037
2037
|
multiple: i = !0,
|
|
2038
2038
|
disabled: c = !1,
|
|
2039
|
-
id: a =
|
|
2040
|
-
tooltip:
|
|
2041
|
-
} =
|
|
2039
|
+
id: a = J.Delete,
|
|
2040
|
+
tooltip: l = e("_pages:common.actions.delete.text")
|
|
2041
|
+
} = r;
|
|
2042
2042
|
return {
|
|
2043
|
-
action:
|
|
2043
|
+
action: S(
|
|
2044
2044
|
(d) => ({
|
|
2045
2045
|
id: a,
|
|
2046
|
-
sticky:
|
|
2047
|
-
tooltip:
|
|
2046
|
+
sticky: n,
|
|
2047
|
+
tooltip: l,
|
|
2048
2048
|
multiple: i,
|
|
2049
2049
|
onClick: () => s([d == null ? void 0 : d.id]),
|
|
2050
2050
|
hidden: !!d.deletedAt || o,
|
|
2051
2051
|
disabled: !!d.deletedAt || c,
|
|
2052
|
-
icon: /* @__PURE__ */
|
|
2053
|
-
onMultipleClick: (m) => s(m.map((
|
|
2052
|
+
icon: /* @__PURE__ */ h(q, { className: "text-bg-error", icon: t }),
|
|
2053
|
+
onMultipleClick: (m) => s(m.map((f) => f.id))
|
|
2054
2054
|
}),
|
|
2055
|
-
[c, o, t, a, i, s,
|
|
2055
|
+
[c, o, t, a, i, s, n, l]
|
|
2056
2056
|
)
|
|
2057
2057
|
};
|
|
2058
|
-
},
|
|
2059
|
-
const { t: e } =
|
|
2058
|
+
}, Zt = (r) => {
|
|
2059
|
+
const { t: e } = k(), {
|
|
2060
2060
|
onClick: s,
|
|
2061
2061
|
sticky: t = !0,
|
|
2062
|
-
hidden:
|
|
2062
|
+
hidden: n = !1,
|
|
2063
2063
|
disabled: o = !1,
|
|
2064
2064
|
multiple: i = !1,
|
|
2065
|
-
icon: c =
|
|
2066
|
-
id: a =
|
|
2067
|
-
tooltip:
|
|
2068
|
-
} =
|
|
2065
|
+
icon: c = Le,
|
|
2066
|
+
id: a = J.Restore,
|
|
2067
|
+
tooltip: l = e("_pages:common.actions.restore.text")
|
|
2068
|
+
} = r;
|
|
2069
2069
|
return {
|
|
2070
|
-
action:
|
|
2070
|
+
action: S(
|
|
2071
2071
|
(d) => ({
|
|
2072
2072
|
id: a,
|
|
2073
2073
|
sticky: t,
|
|
2074
|
-
tooltip:
|
|
2074
|
+
tooltip: l,
|
|
2075
2075
|
multiple: i,
|
|
2076
2076
|
onClick: () => s([d == null ? void 0 : d.id]),
|
|
2077
|
-
hidden: !d.deletedAt ||
|
|
2077
|
+
hidden: !d.deletedAt || n,
|
|
2078
2078
|
disabled: !d.deletedAt || o,
|
|
2079
|
-
icon: /* @__PURE__ */
|
|
2080
|
-
onMultipleClick: (m) => s(m.map((
|
|
2079
|
+
icon: /* @__PURE__ */ h(q, { className: "text-bg-error", icon: c }),
|
|
2080
|
+
onMultipleClick: (m) => s(m.map((f) => f.id))
|
|
2081
2081
|
}),
|
|
2082
|
-
[o,
|
|
2082
|
+
[o, n, c, a, i, s, t, l]
|
|
2083
2083
|
)
|
|
2084
2084
|
};
|
|
2085
|
-
},
|
|
2086
|
-
const { t: e } =
|
|
2085
|
+
}, zs = (r) => {
|
|
2086
|
+
const { t: e } = k(), {
|
|
2087
2087
|
onClick: s,
|
|
2088
2088
|
hidden: t = !1,
|
|
2089
|
-
sticky:
|
|
2089
|
+
sticky: n = !0,
|
|
2090
2090
|
disabled: o = !1,
|
|
2091
|
-
id: i =
|
|
2092
|
-
icon: c =
|
|
2091
|
+
id: i = J.Edit,
|
|
2092
|
+
icon: c = pt,
|
|
2093
2093
|
tooltip: a = e("_pages:common.actions.edit.text")
|
|
2094
|
-
} =
|
|
2094
|
+
} = r;
|
|
2095
2095
|
return {
|
|
2096
|
-
action:
|
|
2097
|
-
(
|
|
2096
|
+
action: S(
|
|
2097
|
+
(u) => ({
|
|
2098
2098
|
id: i,
|
|
2099
|
-
sticky:
|
|
2099
|
+
sticky: n,
|
|
2100
2100
|
tooltip: a,
|
|
2101
|
-
onClick: () => s(
|
|
2102
|
-
hidden: !!
|
|
2103
|
-
disabled: !!
|
|
2104
|
-
icon: /* @__PURE__ */
|
|
2101
|
+
onClick: () => s(u == null ? void 0 : u.id),
|
|
2102
|
+
hidden: !!u.deletedAt || t,
|
|
2103
|
+
disabled: !!u.deletedAt || o,
|
|
2104
|
+
icon: /* @__PURE__ */ h(q, { className: "primary", icon: c })
|
|
2105
2105
|
}),
|
|
2106
|
-
[o, t, c, i, s,
|
|
2106
|
+
[o, t, c, i, s, n, a]
|
|
2107
2107
|
)
|
|
2108
2108
|
};
|
|
2109
2109
|
};
|
|
2110
|
-
var
|
|
2111
|
-
const
|
|
2112
|
-
const { t: e } =
|
|
2110
|
+
var J = /* @__PURE__ */ ((r) => (r.Add = "add", r.Edit = "edit", r.Delete = "delete", r.Restore = "restore", r.Refresh = "refresh", r.Export = "export", r.Import = "import", r))(J || {});
|
|
2111
|
+
const es = (r) => {
|
|
2112
|
+
const { t: e } = k(), {
|
|
2113
2113
|
onClick: s,
|
|
2114
2114
|
hidden: t = !1,
|
|
2115
|
-
disabled:
|
|
2115
|
+
disabled: n = !1,
|
|
2116
2116
|
isLoading: o = !1
|
|
2117
|
-
} =
|
|
2117
|
+
} = r;
|
|
2118
2118
|
return {
|
|
2119
|
-
action:
|
|
2119
|
+
action: S(
|
|
2120
2120
|
() => ({
|
|
2121
|
-
id:
|
|
2121
|
+
id: J.Export,
|
|
2122
2122
|
hidden: t,
|
|
2123
|
-
disabled:
|
|
2124
|
-
icon: /* @__PURE__ */
|
|
2125
|
-
|
|
2123
|
+
disabled: n,
|
|
2124
|
+
icon: /* @__PURE__ */ h(
|
|
2125
|
+
q,
|
|
2126
2126
|
{
|
|
2127
2127
|
className: `${o ? "rotate" : ""}`,
|
|
2128
|
-
icon: o ?
|
|
2128
|
+
icon: o ? Re : gt
|
|
2129
2129
|
}
|
|
2130
2130
|
),
|
|
2131
2131
|
tooltip: e("_pages:common.actions.export.text"),
|
|
2132
2132
|
onClick: s
|
|
2133
2133
|
}),
|
|
2134
|
-
[
|
|
2134
|
+
[n, t, o, s, e]
|
|
2135
2135
|
)
|
|
2136
2136
|
};
|
|
2137
|
-
},
|
|
2138
|
-
const { t: e } =
|
|
2137
|
+
}, ts = (r) => {
|
|
2138
|
+
const { t: e } = k(), {
|
|
2139
2139
|
onClick: s,
|
|
2140
2140
|
hidden: t = !1,
|
|
2141
|
-
disabled:
|
|
2141
|
+
disabled: n = !1,
|
|
2142
2142
|
isLoading: o = !1
|
|
2143
|
-
} =
|
|
2143
|
+
} = r;
|
|
2144
2144
|
return {
|
|
2145
|
-
action:
|
|
2145
|
+
action: S(
|
|
2146
2146
|
() => ({
|
|
2147
|
-
id:
|
|
2147
|
+
id: J.Import,
|
|
2148
2148
|
hidden: t,
|
|
2149
|
-
disabled:
|
|
2150
|
-
icon: /* @__PURE__ */
|
|
2151
|
-
|
|
2149
|
+
disabled: n,
|
|
2150
|
+
icon: /* @__PURE__ */ h(
|
|
2151
|
+
q,
|
|
2152
2152
|
{
|
|
2153
2153
|
className: `${o ? "rotate" : ""}`,
|
|
2154
|
-
icon: o ?
|
|
2154
|
+
icon: o ? Re : bt
|
|
2155
2155
|
}
|
|
2156
2156
|
),
|
|
2157
2157
|
tooltip: e("_pages:common.actions.import.text"),
|
|
2158
2158
|
onClick: s
|
|
2159
2159
|
}),
|
|
2160
|
-
[
|
|
2160
|
+
[n, t, o, s, e]
|
|
2161
2161
|
)
|
|
2162
2162
|
};
|
|
2163
|
-
},
|
|
2164
|
-
const { queryKey: e, onSuccess: s, ...t } =
|
|
2163
|
+
}, Js = (r) => {
|
|
2164
|
+
const { queryKey: e, onSuccess: s, ...t } = r, n = Z(), { showStackNotifications: o } = oe(), { t: i } = k(), { open: c, onClick: a, close: l, dialogFn: u, isLoading: d } = He({
|
|
2165
2165
|
onSuccessMessage: i("_pages:common.actions.delete.successMessage"),
|
|
2166
|
-
onError: (
|
|
2167
|
-
const
|
|
2168
|
-
if (
|
|
2166
|
+
onError: (f) => {
|
|
2167
|
+
const p = f;
|
|
2168
|
+
if (we(p))
|
|
2169
2169
|
o(
|
|
2170
|
-
|
|
2171
|
-
([
|
|
2172
|
-
message: i(`_pages:${
|
|
2173
|
-
type:
|
|
2170
|
+
p.errors.map(
|
|
2171
|
+
([b, g]) => ({
|
|
2172
|
+
message: i(`_pages:${b}.errors.${g}`),
|
|
2173
|
+
type: M.error
|
|
2174
2174
|
})
|
|
2175
2175
|
)
|
|
2176
2176
|
);
|
|
2177
|
-
else if (
|
|
2178
|
-
const
|
|
2177
|
+
else if (Se(p)) {
|
|
2178
|
+
const b = p.message || i("_accessibility:errors.500"), g = i(`_accessibility:errors.${p.status}`);
|
|
2179
2179
|
o([
|
|
2180
2180
|
{
|
|
2181
|
-
message: g ||
|
|
2182
|
-
type:
|
|
2181
|
+
message: g || b,
|
|
2182
|
+
type: M.error
|
|
2183
2183
|
}
|
|
2184
2184
|
]);
|
|
2185
2185
|
}
|
|
2186
2186
|
},
|
|
2187
|
-
onSuccess: async (
|
|
2188
|
-
await
|
|
2187
|
+
onSuccess: async (f) => {
|
|
2188
|
+
await n.invalidateQueries({ queryKey: e }), s && s(f);
|
|
2189
2189
|
},
|
|
2190
2190
|
...t
|
|
2191
|
-
}), { action: m } =
|
|
2191
|
+
}), { action: m } = Xt({ onClick: a });
|
|
2192
2192
|
return {
|
|
2193
2193
|
onClick: a,
|
|
2194
2194
|
title: i("_pages:common.actions.delete.dialog.title"),
|
|
2195
2195
|
open: c,
|
|
2196
2196
|
isLoading: d,
|
|
2197
|
-
handleSubmit: () =>
|
|
2198
|
-
handleClose:
|
|
2197
|
+
handleSubmit: () => u.mutate(),
|
|
2198
|
+
handleClose: l,
|
|
2199
2199
|
action: m
|
|
2200
2200
|
};
|
|
2201
|
-
},
|
|
2202
|
-
const [
|
|
2203
|
-
return { open:
|
|
2204
|
-
},
|
|
2205
|
-
const
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2201
|
+
}, Be = () => {
|
|
2202
|
+
const [r, e] = R(!1);
|
|
2203
|
+
return { open: r, setOpen: e, handleClose: () => e(!1), handleOpen: () => e(!0) };
|
|
2204
|
+
}, Ve = (r) => {
|
|
2205
|
+
const {
|
|
2206
|
+
closeOnSubmit: e = !0,
|
|
2207
|
+
defaultValues: s,
|
|
2208
|
+
mapIn: t,
|
|
2209
|
+
mapOut: n,
|
|
2210
|
+
mode: o = "state",
|
|
2211
|
+
onApply: i,
|
|
2212
|
+
onClear: c,
|
|
2213
|
+
onError: a,
|
|
2214
|
+
onSubmit: l,
|
|
2215
|
+
reinitializeOnOpen: u,
|
|
2216
|
+
resetOnOpen: d,
|
|
2217
|
+
title: m
|
|
2218
|
+
} = r, [f, p] = R(), [b, g] = R(!1), y = F(!1), C = F(null), { open: w, handleClose: E, handleOpen: A } = Be(), { control: U, handleSubmit: B, reset: T, setError: $, getValues: x, setValue: _ } = Pe({
|
|
2219
|
+
defaultValues: s || {}
|
|
2220
|
+
});
|
|
2221
|
+
O(() => {
|
|
2222
|
+
if (!w) {
|
|
2223
|
+
y.current = !1, C.current = null;
|
|
2215
2224
|
return;
|
|
2216
2225
|
}
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
if (!(!(s != null && s.getFunction) || !l))
|
|
2221
|
-
return s.getFunction(l);
|
|
2222
|
-
},
|
|
2223
|
-
queryKey: I,
|
|
2224
|
-
enabled: !!(s != null && s.getFunction) && !!l
|
|
2225
|
-
});
|
|
2226
|
-
_(() => {
|
|
2227
|
-
!s || !H || !s.dtoToForm || y.current !== H && (E({ ...s.dtoToForm(H) }), y.current = H);
|
|
2228
|
-
}, [H, s, E]), _(() => {
|
|
2229
|
-
if (t) {
|
|
2230
|
-
if (!g) {
|
|
2231
|
-
h.current = !1;
|
|
2226
|
+
if (!y.current) {
|
|
2227
|
+
if (y.current = !0, C.current) {
|
|
2228
|
+
T(C.current), C.current = null;
|
|
2232
2229
|
return;
|
|
2233
2230
|
}
|
|
2234
|
-
if (
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
return;
|
|
2242
|
-
}
|
|
2243
|
-
t.resetOnOpen && E(t.defaultValues || {});
|
|
2231
|
+
if (u && t) {
|
|
2232
|
+
T(t());
|
|
2233
|
+
return;
|
|
2234
|
+
}
|
|
2235
|
+
if (u && s) {
|
|
2236
|
+
T(s);
|
|
2237
|
+
return;
|
|
2244
2238
|
}
|
|
2239
|
+
d && T(s || {});
|
|
2245
2240
|
}
|
|
2246
|
-
}, [t,
|
|
2247
|
-
const
|
|
2248
|
-
(
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
let
|
|
2252
|
-
|
|
2253
|
-
const ae = re.querySelector(`[name="${Le}"]`);
|
|
2254
|
-
(ae instanceof HTMLInputElement || ae instanceof HTMLTextAreaElement || ae instanceof HTMLSelectElement) && (xe || (ae.focus(), xe = !0), ae.classList.add("error"), V.push(
|
|
2255
|
-
o(`_entities:${s.queryKey}.${Le}.${it}`)
|
|
2256
|
-
));
|
|
2257
|
-
}), V;
|
|
2258
|
-
},
|
|
2259
|
-
[s, o]
|
|
2260
|
-
), G = w(() => {
|
|
2261
|
-
const N = x.current;
|
|
2262
|
-
if (!N) return;
|
|
2263
|
-
N.querySelectorAll("input, textarea, select").forEach((V) => {
|
|
2264
|
-
V.classList.remove("error");
|
|
2265
|
-
});
|
|
2266
|
-
}, []), Z = w(() => {
|
|
2267
|
-
G(), x.current = null, b(), E();
|
|
2268
|
-
}, [b, G, E]), st = w(
|
|
2269
|
-
(N) => {
|
|
2270
|
-
d(N), T();
|
|
2271
|
-
},
|
|
2272
|
-
[T]
|
|
2273
|
-
), we = se({
|
|
2274
|
-
mutationFn: async (N) => {
|
|
2275
|
-
if (s)
|
|
2276
|
-
return s.mutationFn(N);
|
|
2241
|
+
}, [s, t, w, u, T, d]);
|
|
2242
|
+
const K = S(() => {
|
|
2243
|
+
E(), T();
|
|
2244
|
+
}, [E, T]), le = S(
|
|
2245
|
+
(D) => {
|
|
2246
|
+
let L, te;
|
|
2247
|
+
typeof D == "number" || D == null ? L = D : (L = D.id, te = D.values), p(L), te ? w ? T(te) : C.current = te : C.current = null, w || A();
|
|
2277
2248
|
},
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
})
|
|
2291
|
-
)
|
|
2292
|
-
);
|
|
2293
|
-
} else if (ge(U)) {
|
|
2294
|
-
const V = U.message || o("_accessibility:errors.500"), re = o(`_accessibility:errors.${U.status}`);
|
|
2295
|
-
c({ message: re || V });
|
|
2296
|
-
} else
|
|
2297
|
-
c({ message: o("_accessibility:errors.500") });
|
|
2298
|
-
}
|
|
2249
|
+
[A, w, T]
|
|
2250
|
+
), ee = S(
|
|
2251
|
+
(D) => n ? n(D, { id: f }) : D,
|
|
2252
|
+
[f, n]
|
|
2253
|
+
), j = S(
|
|
2254
|
+
async (D, L, te) => {
|
|
2255
|
+
a && await a(D, {
|
|
2256
|
+
close: K,
|
|
2257
|
+
id: f,
|
|
2258
|
+
phase: L,
|
|
2259
|
+
values: te
|
|
2260
|
+
});
|
|
2299
2261
|
},
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
}), me = w(
|
|
2306
|
-
(N) => s ? N : t != null && t.mapOut ? t.mapOut(N, { id: l }) : N,
|
|
2307
|
-
[t, l, s]
|
|
2308
|
-
), nt = w(async () => {
|
|
2309
|
-
if (!(t != null && t.onApply)) return;
|
|
2310
|
-
const N = q(), U = me(N);
|
|
2311
|
-
p(!0);
|
|
2262
|
+
[K, f, a]
|
|
2263
|
+
), We = S(async () => {
|
|
2264
|
+
if (!i) return;
|
|
2265
|
+
const D = x();
|
|
2266
|
+
g(!0);
|
|
2312
2267
|
try {
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2268
|
+
const L = ee(D);
|
|
2269
|
+
await i(L, {
|
|
2270
|
+
close: K,
|
|
2271
|
+
id: f,
|
|
2272
|
+
values: D
|
|
2317
2273
|
});
|
|
2274
|
+
} catch (L) {
|
|
2275
|
+
throw await j(L, "apply", D).catch(() => {
|
|
2276
|
+
}), L;
|
|
2318
2277
|
} finally {
|
|
2319
|
-
|
|
2278
|
+
g(!1);
|
|
2320
2279
|
}
|
|
2321
|
-
}, [
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
}
|
|
2280
|
+
}, [K, x, j, f, ee, i]), ze = S(async () => {
|
|
2281
|
+
const D = x();
|
|
2282
|
+
if (c) {
|
|
2283
|
+
g(!0);
|
|
2284
|
+
try {
|
|
2285
|
+
await c();
|
|
2286
|
+
} catch (L) {
|
|
2287
|
+
throw await j(L, "clear", D).catch(() => {
|
|
2288
|
+
}), L;
|
|
2289
|
+
} finally {
|
|
2290
|
+
g(!1);
|
|
2330
2291
|
}
|
|
2331
|
-
E(t.defaultValues || {});
|
|
2332
2292
|
}
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
p(!0);
|
|
2293
|
+
try {
|
|
2294
|
+
T(s || {});
|
|
2295
|
+
} catch (L) {
|
|
2296
|
+
throw await j(L, "clear", D).catch(() => {
|
|
2297
|
+
}), L;
|
|
2298
|
+
}
|
|
2299
|
+
}, [s, x, j, c, T]), Je = S(
|
|
2300
|
+
async (D) => {
|
|
2301
|
+
g(!0);
|
|
2343
2302
|
try {
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2303
|
+
const L = ee(D);
|
|
2304
|
+
l && await l(L, {
|
|
2305
|
+
close: K,
|
|
2306
|
+
id: f,
|
|
2307
|
+
values: D
|
|
2308
|
+
}), e && K();
|
|
2309
|
+
} catch (L) {
|
|
2310
|
+
throw await j(L, "submit", D).catch(() => {
|
|
2311
|
+
}), L;
|
|
2349
2312
|
} finally {
|
|
2350
|
-
|
|
2313
|
+
g(!1);
|
|
2351
2314
|
}
|
|
2352
2315
|
},
|
|
2353
|
-
[
|
|
2354
|
-
R,
|
|
2355
|
-
Z,
|
|
2356
|
-
t,
|
|
2357
|
-
l,
|
|
2358
|
-
we,
|
|
2359
|
-
s,
|
|
2360
|
-
me
|
|
2361
|
-
]
|
|
2316
|
+
[K, e, j, f, ee, l]
|
|
2362
2317
|
);
|
|
2363
2318
|
return {
|
|
2364
|
-
open:
|
|
2365
|
-
mode:
|
|
2366
|
-
id:
|
|
2367
|
-
openDialog:
|
|
2368
|
-
handleClose:
|
|
2369
|
-
control:
|
|
2370
|
-
getValues:
|
|
2371
|
-
setValue:
|
|
2372
|
-
handleSubmit:
|
|
2373
|
-
onSubmit:
|
|
2374
|
-
reset:
|
|
2375
|
-
setError:
|
|
2376
|
-
title:
|
|
2377
|
-
isSubmitting:
|
|
2378
|
-
onApply:
|
|
2379
|
-
onClear:
|
|
2380
|
-
isLoading:
|
|
2319
|
+
open: w,
|
|
2320
|
+
mode: o,
|
|
2321
|
+
id: f,
|
|
2322
|
+
openDialog: le,
|
|
2323
|
+
handleClose: K,
|
|
2324
|
+
control: U,
|
|
2325
|
+
getValues: x,
|
|
2326
|
+
setValue: _,
|
|
2327
|
+
handleSubmit: B,
|
|
2328
|
+
onSubmit: Je,
|
|
2329
|
+
reset: T,
|
|
2330
|
+
setError: $,
|
|
2331
|
+
title: m,
|
|
2332
|
+
isSubmitting: b,
|
|
2333
|
+
onApply: We,
|
|
2334
|
+
onClear: ze,
|
|
2335
|
+
isLoading: b
|
|
2381
2336
|
};
|
|
2382
|
-
},
|
|
2383
|
-
const e =
|
|
2337
|
+
}, Ys = (r) => {
|
|
2338
|
+
const e = Z(), { mutationFn: s, queryKey: t, onSuccess: n, onError: o, mapOut: i, ...c } = r, a = ne({
|
|
2384
2339
|
mutationFn: s
|
|
2385
2340
|
});
|
|
2386
|
-
return
|
|
2341
|
+
return Ve({
|
|
2387
2342
|
...c,
|
|
2388
2343
|
mode: "entity",
|
|
2389
2344
|
mapOut: i,
|
|
2390
|
-
onSubmit: async (
|
|
2345
|
+
onSubmit: async (l) => {
|
|
2391
2346
|
try {
|
|
2392
|
-
const
|
|
2393
|
-
t && await e.invalidateQueries({ queryKey: t }),
|
|
2394
|
-
} catch (
|
|
2395
|
-
throw o && o(
|
|
2347
|
+
const u = await a.mutateAsync(l);
|
|
2348
|
+
t && await e.invalidateQueries({ queryKey: t }), n && await n(u);
|
|
2349
|
+
} catch (u) {
|
|
2350
|
+
throw o && o(u), u;
|
|
2396
2351
|
}
|
|
2397
2352
|
}
|
|
2398
2353
|
});
|
|
2399
|
-
},
|
|
2400
|
-
const e =
|
|
2401
|
-
mutationFn:
|
|
2354
|
+
}, Xs = (r) => {
|
|
2355
|
+
const e = Z(), s = F(), t = F(), {
|
|
2356
|
+
mutationFn: n,
|
|
2402
2357
|
queryKey: o,
|
|
2403
2358
|
onSuccess: i,
|
|
2404
2359
|
onError: c,
|
|
2405
2360
|
mapOut: a,
|
|
2406
|
-
getFunction:
|
|
2407
|
-
dtoToForm:
|
|
2361
|
+
getFunction: l,
|
|
2362
|
+
dtoToForm: u,
|
|
2408
2363
|
title: d,
|
|
2409
2364
|
...m
|
|
2410
|
-
} =
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
}, [
|
|
2414
|
-
const
|
|
2415
|
-
mutationFn:
|
|
2416
|
-
}),
|
|
2365
|
+
} = r, f = F(u);
|
|
2366
|
+
O(() => {
|
|
2367
|
+
f.current = u;
|
|
2368
|
+
}, [u]);
|
|
2369
|
+
const p = ne({
|
|
2370
|
+
mutationFn: n
|
|
2371
|
+
}), b = Ve({
|
|
2417
2372
|
...m,
|
|
2418
2373
|
mode: "entity",
|
|
2419
2374
|
title: d,
|
|
2420
|
-
onSubmit: async (
|
|
2375
|
+
onSubmit: async (w) => {
|
|
2421
2376
|
try {
|
|
2422
|
-
const
|
|
2423
|
-
o && await e.invalidateQueries({ queryKey: o }), i && await i(
|
|
2424
|
-
} catch (
|
|
2425
|
-
throw c && c(
|
|
2377
|
+
const E = await p.mutateAsync(w);
|
|
2378
|
+
o && await e.invalidateQueries({ queryKey: o }), i && await i(E);
|
|
2379
|
+
} catch (E) {
|
|
2380
|
+
throw c && c(E), E;
|
|
2426
2381
|
}
|
|
2427
2382
|
},
|
|
2428
|
-
mapOut: (
|
|
2429
|
-
}), { reset: g } =
|
|
2430
|
-
queryFn: () =>
|
|
2431
|
-
queryKey: [...o || ["put-dialog", d],
|
|
2432
|
-
enabled:
|
|
2383
|
+
mapOut: (w) => a ? a(w, s.current) : w
|
|
2384
|
+
}), { reset: g } = b, C = Nt({
|
|
2385
|
+
queryFn: () => l(b.id),
|
|
2386
|
+
queryKey: [...o || ["put-dialog", d], b.id],
|
|
2387
|
+
enabled: b.open && !!b.id
|
|
2433
2388
|
});
|
|
2434
|
-
return
|
|
2435
|
-
if (
|
|
2436
|
-
if (s.current =
|
|
2437
|
-
g(
|
|
2389
|
+
return O(() => {
|
|
2390
|
+
if (C.data && t.current !== C.data) {
|
|
2391
|
+
if (s.current = C.data, t.current = C.data, f.current && g) {
|
|
2392
|
+
g(f.current(C.data));
|
|
2438
2393
|
return;
|
|
2439
2394
|
}
|
|
2440
|
-
g == null || g(
|
|
2395
|
+
g == null || g(C.data);
|
|
2441
2396
|
}
|
|
2442
|
-
}, [
|
|
2443
|
-
...
|
|
2444
|
-
isLoading:
|
|
2397
|
+
}, [C.data, g]), {
|
|
2398
|
+
...b,
|
|
2399
|
+
isLoading: b.isLoading || p.isPending || C.isFetching || C.isLoading
|
|
2445
2400
|
};
|
|
2446
|
-
},
|
|
2447
|
-
const { queryKey: e, onSuccess: s, ...t } =
|
|
2401
|
+
}, Zs = (r) => {
|
|
2402
|
+
const { queryKey: e, onSuccess: s, ...t } = r, n = Z(), { showStackNotifications: o } = oe(), { t: i } = k(), { open: c, onClick: a, close: l, dialogFn: u, isLoading: d } = He({
|
|
2448
2403
|
onSuccessMessage: i("_pages:common.actions.restore.successMessage"),
|
|
2449
|
-
onError: (
|
|
2450
|
-
const
|
|
2451
|
-
if (
|
|
2404
|
+
onError: (f) => {
|
|
2405
|
+
const p = f;
|
|
2406
|
+
if (we(p))
|
|
2452
2407
|
o(
|
|
2453
|
-
|
|
2454
|
-
([
|
|
2455
|
-
message: i(`_pages:${
|
|
2456
|
-
type:
|
|
2408
|
+
p.errors.map(
|
|
2409
|
+
([b, g]) => ({
|
|
2410
|
+
message: i(`_pages:${b}.errors.${g}`),
|
|
2411
|
+
type: M.error
|
|
2457
2412
|
})
|
|
2458
2413
|
)
|
|
2459
2414
|
);
|
|
2460
|
-
else if (
|
|
2461
|
-
const
|
|
2415
|
+
else if (Se(p)) {
|
|
2416
|
+
const b = p.message || i("_accessibility:errors.500"), g = i(`_accessibility:errors.${p.status}`);
|
|
2462
2417
|
o([
|
|
2463
2418
|
{
|
|
2464
|
-
message: g ||
|
|
2465
|
-
type:
|
|
2419
|
+
message: g || b,
|
|
2420
|
+
type: M.error
|
|
2466
2421
|
}
|
|
2467
2422
|
]);
|
|
2468
2423
|
}
|
|
2469
2424
|
},
|
|
2470
|
-
onSuccess: async (
|
|
2471
|
-
await
|
|
2425
|
+
onSuccess: async (f) => {
|
|
2426
|
+
await n.invalidateQueries({ queryKey: e }), s && s(f);
|
|
2472
2427
|
},
|
|
2473
2428
|
...t
|
|
2474
|
-
}), { action: m } =
|
|
2429
|
+
}), { action: m } = Zt({ onClick: a });
|
|
2475
2430
|
return {
|
|
2476
2431
|
onClick: a,
|
|
2477
2432
|
title: i("_pages:common.actions.restore.dialog.title"),
|
|
2478
2433
|
open: c,
|
|
2479
2434
|
isLoading: d,
|
|
2480
|
-
handleSubmit: () =>
|
|
2481
|
-
handleClose:
|
|
2435
|
+
handleSubmit: () => u.mutate(),
|
|
2436
|
+
handleClose: l,
|
|
2482
2437
|
action: m
|
|
2483
2438
|
};
|
|
2484
2439
|
};
|
|
2485
|
-
function
|
|
2486
|
-
const { t: e } =
|
|
2440
|
+
function er(r) {
|
|
2441
|
+
const { t: e } = k(), s = Z(), {
|
|
2487
2442
|
queryKey: t,
|
|
2488
|
-
mutationFn:
|
|
2443
|
+
mutationFn: n,
|
|
2489
2444
|
entity: o,
|
|
2490
2445
|
fileProcessor: i,
|
|
2491
2446
|
renderCustomPreview: c,
|
|
2492
2447
|
onError: a
|
|
2493
|
-
} =
|
|
2494
|
-
mutationFn:
|
|
2495
|
-
onError: (
|
|
2496
|
-
console.error(
|
|
2448
|
+
} = r, [l, u] = R(!1), [d, m] = R(null), [f, p] = R(!1), b = ne({
|
|
2449
|
+
mutationFn: n,
|
|
2450
|
+
onError: (y) => {
|
|
2451
|
+
console.error(y), a == null || a(y);
|
|
2497
2452
|
},
|
|
2498
2453
|
onSuccess: async () => {
|
|
2499
2454
|
await s.invalidateQueries({ queryKey: t });
|
|
2500
2455
|
}
|
|
2501
|
-
}), { action: g } =
|
|
2502
|
-
onClick: () =>
|
|
2456
|
+
}), { action: g } = ts({
|
|
2457
|
+
onClick: () => u(!0)
|
|
2503
2458
|
});
|
|
2504
2459
|
return {
|
|
2505
2460
|
handleSubmit: async () => {
|
|
2506
2461
|
if (!(!d || d.length === 0))
|
|
2507
2462
|
try {
|
|
2508
|
-
await
|
|
2463
|
+
await b.mutateAsync({
|
|
2509
2464
|
items: d,
|
|
2510
|
-
override:
|
|
2511
|
-
}),
|
|
2512
|
-
} catch (
|
|
2513
|
-
console.error(
|
|
2465
|
+
override: f
|
|
2466
|
+
}), u(!1), m(null), p(!1);
|
|
2467
|
+
} catch (y) {
|
|
2468
|
+
console.error(y);
|
|
2514
2469
|
}
|
|
2515
2470
|
},
|
|
2516
|
-
isLoading:
|
|
2471
|
+
isLoading: b.isPending,
|
|
2517
2472
|
fileProcessor: i,
|
|
2518
|
-
onFileProcessed: (
|
|
2473
|
+
onFileProcessed: (y) => m(y),
|
|
2519
2474
|
renderCustomPreview: c,
|
|
2520
|
-
onOverrideChange: (
|
|
2521
|
-
open:
|
|
2475
|
+
onOverrideChange: (y) => p(y),
|
|
2476
|
+
open: l,
|
|
2522
2477
|
title: e("_pages:common.actions.import.dialog.title", {
|
|
2523
2478
|
entity: e(`_pages:${o}.title`)
|
|
2524
2479
|
}),
|
|
2525
2480
|
handleClose: () => {
|
|
2526
|
-
|
|
2481
|
+
u(!1), m(null), p(!1);
|
|
2527
2482
|
},
|
|
2528
2483
|
action: g
|
|
2529
2484
|
};
|
|
2530
2485
|
}
|
|
2531
|
-
const
|
|
2532
|
-
const { showSuccessNotification: e } =
|
|
2486
|
+
const tr = (r) => {
|
|
2487
|
+
const { showSuccessNotification: e } = oe(), { t: s } = k(), {
|
|
2533
2488
|
entity: t,
|
|
2534
|
-
mutationFn:
|
|
2489
|
+
mutationFn: n,
|
|
2535
2490
|
onError: o,
|
|
2536
2491
|
onSuccess: i,
|
|
2537
2492
|
onSuccessMessage: c = s("_pages:common.actions.export.successMessage")
|
|
2538
|
-
} =
|
|
2539
|
-
mutationFn: () =>
|
|
2493
|
+
} = r, a = ne({
|
|
2494
|
+
mutationFn: () => n(),
|
|
2540
2495
|
onError: (d) => {
|
|
2541
2496
|
console.error(d), o && o(d);
|
|
2542
2497
|
},
|
|
2543
2498
|
onSuccess: async (d) => {
|
|
2544
|
-
const m = JSON.stringify(d, null, 2),
|
|
2545
|
-
|
|
2499
|
+
const m = JSON.stringify(d, null, 2), f = new Blob([m], { type: "application/json" }), p = URL.createObjectURL(f), b = document.createElement("a");
|
|
2500
|
+
b.href = p, b.download = `${t}.json`, b.click(), URL.revokeObjectURL(p), i && i(d), e({
|
|
2546
2501
|
message: c
|
|
2547
2502
|
});
|
|
2548
2503
|
}
|
|
2549
|
-
}),
|
|
2504
|
+
}), l = S(() => {
|
|
2550
2505
|
a.mutate();
|
|
2551
|
-
}, [a]), { action:
|
|
2552
|
-
onClick:
|
|
2506
|
+
}, [a]), { action: u } = es({
|
|
2507
|
+
onClick: l,
|
|
2553
2508
|
isLoading: a.isPending
|
|
2554
2509
|
});
|
|
2555
2510
|
return {
|
|
2556
|
-
action:
|
|
2511
|
+
action: u
|
|
2557
2512
|
};
|
|
2558
|
-
},
|
|
2559
|
-
function
|
|
2560
|
-
const [e, s] =
|
|
2561
|
-
s(
|
|
2513
|
+
}, Ae = () => typeof window < "u" ? window.scrollY : 0;
|
|
2514
|
+
function ss(r) {
|
|
2515
|
+
const [e, s] = R(Ae), t = S(() => {
|
|
2516
|
+
s(Ae());
|
|
2562
2517
|
}, []);
|
|
2563
|
-
return
|
|
2518
|
+
return O(() => (window.addEventListener("scroll", t), () => {
|
|
2564
2519
|
window.removeEventListener("scroll", t);
|
|
2565
|
-
}), [t]), e >
|
|
2520
|
+
}), [t]), e > r;
|
|
2566
2521
|
}
|
|
2567
|
-
const
|
|
2568
|
-
const { t: e } =
|
|
2569
|
-
icon: s =
|
|
2522
|
+
const sr = (r) => {
|
|
2523
|
+
const { t: e } = k(), {
|
|
2524
|
+
icon: s = yt,
|
|
2570
2525
|
threshold: t = 200,
|
|
2571
|
-
scrollTop:
|
|
2526
|
+
scrollTop: n = 0,
|
|
2572
2527
|
scrollLeft: o = 0,
|
|
2573
2528
|
tooltip: i = e("_accessibility:buttons.toTop"),
|
|
2574
2529
|
scrollOnClick: c = !0,
|
|
2575
2530
|
onClick: a,
|
|
2576
|
-
className:
|
|
2577
|
-
variant:
|
|
2531
|
+
className: l = "",
|
|
2532
|
+
variant: u = "submit",
|
|
2578
2533
|
color: d = "primary",
|
|
2579
2534
|
...m
|
|
2580
|
-
} =
|
|
2581
|
-
return /* @__PURE__ */
|
|
2582
|
-
|
|
2535
|
+
} = r, f = ss(t);
|
|
2536
|
+
return /* @__PURE__ */ h(
|
|
2537
|
+
z,
|
|
2583
2538
|
{
|
|
2584
|
-
variant:
|
|
2539
|
+
variant: u,
|
|
2585
2540
|
color: d,
|
|
2586
2541
|
icon: s,
|
|
2587
2542
|
"data-tooltip-id": "tooltip",
|
|
2588
2543
|
onClick: () => {
|
|
2589
|
-
a == null || a(), c &&
|
|
2544
|
+
a == null || a(), c && Yt.scrollTo(o, n);
|
|
2590
2545
|
},
|
|
2591
|
-
className: `to-top ${
|
|
2546
|
+
className: `to-top ${f ? "show" : "hide"} ${l}`.trim(),
|
|
2592
2547
|
"data-tooltip-content": i,
|
|
2593
2548
|
...m
|
|
2594
2549
|
}
|
|
2595
2550
|
);
|
|
2596
2551
|
};
|
|
2597
|
-
function
|
|
2598
|
-
const { t: e } =
|
|
2599
|
-
if ("children" in
|
|
2600
|
-
const { children:
|
|
2601
|
-
return /* @__PURE__ */
|
|
2552
|
+
function rr(r) {
|
|
2553
|
+
const { t: e } = k();
|
|
2554
|
+
if ("children" in r) {
|
|
2555
|
+
const { children: E, className: A } = r;
|
|
2556
|
+
return /* @__PURE__ */ h("div", { className: `error-container${A ? ` ${A}` : ""}`, children: E });
|
|
2602
2557
|
}
|
|
2603
2558
|
const {
|
|
2604
2559
|
error: t,
|
|
2605
|
-
message:
|
|
2560
|
+
message: n,
|
|
2606
2561
|
iconProps: o,
|
|
2607
2562
|
onRetry: i,
|
|
2608
2563
|
retryLabel: c,
|
|
2609
2564
|
retryButtonProps: a,
|
|
2610
|
-
messageProps:
|
|
2611
|
-
className:
|
|
2565
|
+
messageProps: l,
|
|
2566
|
+
className: u,
|
|
2612
2567
|
resetErrorBoundary: d
|
|
2613
|
-
} =
|
|
2614
|
-
className:
|
|
2615
|
-
children:
|
|
2616
|
-
onClick:
|
|
2568
|
+
} = r, m = i ?? d, {
|
|
2569
|
+
className: f,
|
|
2570
|
+
children: p,
|
|
2571
|
+
onClick: b,
|
|
2617
2572
|
...g
|
|
2618
|
-
} = a ?? {}, { className:
|
|
2619
|
-
return /* @__PURE__ */
|
|
2620
|
-
|
|
2621
|
-
|
|
2573
|
+
} = a ?? {}, { className: y, ...C } = l ?? {}, w = o !== null;
|
|
2574
|
+
return /* @__PURE__ */ v("div", { className: `error-container${u ? ` ${u}` : ""}`, children: [
|
|
2575
|
+
w && /* @__PURE__ */ h(
|
|
2576
|
+
q,
|
|
2622
2577
|
{
|
|
2623
2578
|
...o,
|
|
2624
|
-
icon: (o == null ? void 0 : o.icon) ??
|
|
2579
|
+
icon: (o == null ? void 0 : o.icon) ?? At,
|
|
2625
2580
|
className: `error-icon${o != null && o.className ? ` ${o.className}` : ""}`
|
|
2626
2581
|
}
|
|
2627
2582
|
),
|
|
2628
|
-
/* @__PURE__ */
|
|
2583
|
+
/* @__PURE__ */ h(
|
|
2629
2584
|
"p",
|
|
2630
2585
|
{
|
|
2631
|
-
...
|
|
2632
|
-
className: `error-message${
|
|
2633
|
-
children:
|
|
2586
|
+
...C,
|
|
2587
|
+
className: `error-message${y ? ` ${y}` : ""}`,
|
|
2588
|
+
children: n ?? (t == null ? void 0 : t.message) ?? e("_accessibility:errors.unknownError")
|
|
2634
2589
|
}
|
|
2635
2590
|
),
|
|
2636
|
-
m && /* @__PURE__ */
|
|
2637
|
-
|
|
2591
|
+
m && /* @__PURE__ */ h(
|
|
2592
|
+
H,
|
|
2638
2593
|
{
|
|
2639
2594
|
type: "button",
|
|
2640
2595
|
variant: "submit",
|
|
2641
2596
|
color: "primary",
|
|
2642
2597
|
...g,
|
|
2643
|
-
className: `error-retry ${
|
|
2644
|
-
onClick: (
|
|
2645
|
-
|
|
2598
|
+
className: `error-retry ${f ? ` ${f}` : ""}`,
|
|
2599
|
+
onClick: (E) => {
|
|
2600
|
+
b == null || b(E), E.defaultPrevented || m();
|
|
2646
2601
|
},
|
|
2647
|
-
children:
|
|
2602
|
+
children: p ?? c ?? e("_accessibility:actions.retry", { defaultValue: "Retry" })
|
|
2648
2603
|
}
|
|
2649
2604
|
)
|
|
2650
2605
|
] });
|
|
2651
2606
|
}
|
|
2652
|
-
const
|
|
2653
|
-
const { showBackButton: e, title: s, actions: t } =
|
|
2654
|
-
return /* @__PURE__ */
|
|
2655
|
-
/* @__PURE__ */
|
|
2656
|
-
e && /* @__PURE__ */
|
|
2657
|
-
|
|
2607
|
+
const rs = (r) => {
|
|
2608
|
+
const { showBackButton: e, title: s, actions: t } = r, { t: n } = k(), { navigate: o } = ce();
|
|
2609
|
+
return /* @__PURE__ */ v("div", { className: "page-header", children: [
|
|
2610
|
+
/* @__PURE__ */ v("div", { className: "page-header-left", children: [
|
|
2611
|
+
e && /* @__PURE__ */ h(
|
|
2612
|
+
z,
|
|
2658
2613
|
{
|
|
2659
|
-
icon:
|
|
2614
|
+
icon: wt,
|
|
2660
2615
|
onClick: () => o(-1),
|
|
2661
2616
|
className: "page-header-back",
|
|
2662
|
-
name:
|
|
2617
|
+
name: n("_accessibility:buttons.back"),
|
|
2663
2618
|
"data-tooltip-id": "tooltip",
|
|
2664
|
-
"data-tooltip-content":
|
|
2619
|
+
"data-tooltip-content": n("_accessibility:buttons.back")
|
|
2665
2620
|
}
|
|
2666
2621
|
),
|
|
2667
|
-
/* @__PURE__ */
|
|
2622
|
+
/* @__PURE__ */ h("h2", { className: "page-header-title", children: s })
|
|
2668
2623
|
] }),
|
|
2669
|
-
/* @__PURE__ */
|
|
2670
|
-
/* @__PURE__ */
|
|
2671
|
-
|
|
2624
|
+
/* @__PURE__ */ v("div", { children: [
|
|
2625
|
+
/* @__PURE__ */ h(
|
|
2626
|
+
it,
|
|
2672
2627
|
{
|
|
2673
2628
|
className: "page-header-actions-desktop",
|
|
2674
2629
|
actions: t ?? []
|
|
2675
2630
|
}
|
|
2676
2631
|
),
|
|
2677
|
-
/* @__PURE__ */
|
|
2678
|
-
|
|
2632
|
+
/* @__PURE__ */ h(
|
|
2633
|
+
at,
|
|
2679
2634
|
{
|
|
2680
2635
|
className: "page-header-actions-mobile",
|
|
2681
2636
|
actions: t ?? []
|
|
@@ -2683,320 +2638,320 @@ const hs = (n) => {
|
|
|
2683
2638
|
)
|
|
2684
2639
|
] })
|
|
2685
2640
|
] });
|
|
2686
|
-
},
|
|
2641
|
+
}, nr = (r) => {
|
|
2687
2642
|
const {
|
|
2688
2643
|
title: e,
|
|
2689
2644
|
children: s,
|
|
2690
2645
|
addOptions: t,
|
|
2691
|
-
filterOptions:
|
|
2646
|
+
filterOptions: n,
|
|
2692
2647
|
actions: o,
|
|
2693
2648
|
queryKey: i,
|
|
2694
2649
|
isLoading: c = !1,
|
|
2695
2650
|
isAnimated: a = !0,
|
|
2696
|
-
showBackButton:
|
|
2697
|
-
} =
|
|
2698
|
-
const
|
|
2651
|
+
showBackButton: l = !1
|
|
2652
|
+
} = r, { t: u } = k(), d = Z(), { countOfFilters: m } = ct(), f = V(() => {
|
|
2653
|
+
const p = Array.isArray(o) ? [...o] : [];
|
|
2699
2654
|
if (i) {
|
|
2700
|
-
const
|
|
2701
|
-
id:
|
|
2655
|
+
const b = {
|
|
2656
|
+
id: J.Refresh,
|
|
2702
2657
|
onClick: () => d.invalidateQueries({ queryKey: i }),
|
|
2703
|
-
icon: /* @__PURE__ */
|
|
2704
|
-
tooltip:
|
|
2658
|
+
icon: /* @__PURE__ */ h(q, { icon: Le }),
|
|
2659
|
+
tooltip: u("_pages:common.actions.refresh.text")
|
|
2705
2660
|
};
|
|
2706
|
-
|
|
2661
|
+
p.unshift(b);
|
|
2707
2662
|
}
|
|
2708
2663
|
if (t) {
|
|
2709
|
-
const
|
|
2664
|
+
const b = {
|
|
2710
2665
|
...t,
|
|
2711
|
-
id:
|
|
2712
|
-
icon: /* @__PURE__ */
|
|
2666
|
+
id: J.Add,
|
|
2667
|
+
icon: /* @__PURE__ */ h(q, { icon: ve })
|
|
2713
2668
|
};
|
|
2714
|
-
|
|
2669
|
+
p.unshift(b);
|
|
2715
2670
|
}
|
|
2716
|
-
if (
|
|
2717
|
-
const
|
|
2718
|
-
...
|
|
2671
|
+
if (n) {
|
|
2672
|
+
const b = {
|
|
2673
|
+
...n,
|
|
2719
2674
|
id: "filter",
|
|
2720
|
-
icon: /* @__PURE__ */
|
|
2721
|
-
children: /* @__PURE__ */
|
|
2722
|
-
|
|
2675
|
+
icon: /* @__PURE__ */ h(q, { icon: St }),
|
|
2676
|
+
children: /* @__PURE__ */ h(
|
|
2677
|
+
lt,
|
|
2723
2678
|
{
|
|
2724
2679
|
className: `${m > 0 ? "show" : "hide"} `,
|
|
2725
2680
|
count: m
|
|
2726
2681
|
}
|
|
2727
2682
|
)
|
|
2728
2683
|
};
|
|
2729
|
-
|
|
2684
|
+
p.push(b);
|
|
2730
2685
|
}
|
|
2731
|
-
return
|
|
2686
|
+
return p;
|
|
2732
2687
|
}, [
|
|
2733
2688
|
o,
|
|
2734
2689
|
t,
|
|
2735
2690
|
m,
|
|
2736
|
-
|
|
2691
|
+
n,
|
|
2737
2692
|
d,
|
|
2738
2693
|
i,
|
|
2739
|
-
|
|
2694
|
+
u
|
|
2740
2695
|
]);
|
|
2741
|
-
return /* @__PURE__ */
|
|
2742
|
-
/* @__PURE__ */
|
|
2743
|
-
|
|
2696
|
+
return /* @__PURE__ */ v("main", { className: "page-main", children: [
|
|
2697
|
+
/* @__PURE__ */ h(
|
|
2698
|
+
rs,
|
|
2744
2699
|
{
|
|
2745
|
-
showBackButton:
|
|
2746
|
-
actions:
|
|
2700
|
+
showBackButton: l,
|
|
2701
|
+
actions: f,
|
|
2747
2702
|
title: e
|
|
2748
2703
|
}
|
|
2749
2704
|
),
|
|
2750
|
-
/* @__PURE__ */
|
|
2751
|
-
t && /* @__PURE__ */
|
|
2752
|
-
|
|
2705
|
+
/* @__PURE__ */ h("div", { className: `page-main-content ${a ? "appear" : ""}`, children: c ? /* @__PURE__ */ h(re, { className: "page-loading" }) : s }),
|
|
2706
|
+
t && /* @__PURE__ */ h(
|
|
2707
|
+
z,
|
|
2753
2708
|
{
|
|
2754
|
-
icon: t.icon ??
|
|
2709
|
+
icon: t.icon ?? ve,
|
|
2755
2710
|
color: t.color ?? "primary",
|
|
2756
2711
|
variant: t.variant ?? "submit",
|
|
2757
2712
|
onClick: () => {
|
|
2758
|
-
var
|
|
2759
|
-
return (
|
|
2713
|
+
var p;
|
|
2714
|
+
return (p = t.onClick) == null ? void 0 : p.call(t);
|
|
2760
2715
|
},
|
|
2761
2716
|
className: `button page-fab ${t.className ?? ""}`
|
|
2762
2717
|
}
|
|
2763
2718
|
)
|
|
2764
2719
|
] });
|
|
2765
|
-
},
|
|
2766
|
-
const { t: e } =
|
|
2720
|
+
}, or = (r) => {
|
|
2721
|
+
const { t: e } = k(), {
|
|
2767
2722
|
className: s = "",
|
|
2768
2723
|
itemClassName: t = "",
|
|
2769
|
-
loading:
|
|
2724
|
+
loading: n = !1,
|
|
2770
2725
|
emptyComponent: o = null,
|
|
2771
2726
|
emptyMessage: i = e("_accessibility:messages.empty"),
|
|
2772
2727
|
renderComponent: c,
|
|
2773
2728
|
data: a = [],
|
|
2774
|
-
hasMore:
|
|
2775
|
-
loadingMore:
|
|
2729
|
+
hasMore: l = !1,
|
|
2730
|
+
loadingMore: u = !1,
|
|
2776
2731
|
onLoadMore: d,
|
|
2777
2732
|
loadMoreComponent: m = null,
|
|
2778
|
-
observerRootMargin:
|
|
2779
|
-
observerThreshold:
|
|
2780
|
-
} =
|
|
2781
|
-
if (!(!
|
|
2782
|
-
|
|
2733
|
+
observerRootMargin: f = "0px 0px 200px 0px",
|
|
2734
|
+
observerThreshold: p = 0
|
|
2735
|
+
} = r, b = F(!1), g = F(null), y = S(async () => {
|
|
2736
|
+
if (!(!l || !d) && !(u || b.current)) {
|
|
2737
|
+
b.current = !0;
|
|
2783
2738
|
try {
|
|
2784
2739
|
await d();
|
|
2785
2740
|
} finally {
|
|
2786
|
-
|
|
2741
|
+
b.current = !1;
|
|
2787
2742
|
}
|
|
2788
2743
|
}
|
|
2789
|
-
}, [
|
|
2790
|
-
return
|
|
2791
|
-
if (!
|
|
2792
|
-
const
|
|
2793
|
-
(
|
|
2794
|
-
|
|
2744
|
+
}, [l, u, d]);
|
|
2745
|
+
return O(() => {
|
|
2746
|
+
if (!l || !d || !g.current || typeof IntersectionObserver > "u") return;
|
|
2747
|
+
const C = new IntersectionObserver(
|
|
2748
|
+
(w) => {
|
|
2749
|
+
w.some((E) => E.isIntersecting) && y();
|
|
2795
2750
|
},
|
|
2796
2751
|
{
|
|
2797
|
-
rootMargin:
|
|
2798
|
-
threshold:
|
|
2752
|
+
rootMargin: f,
|
|
2753
|
+
threshold: p
|
|
2799
2754
|
}
|
|
2800
2755
|
);
|
|
2801
|
-
return
|
|
2756
|
+
return C.observe(g.current), () => C.disconnect();
|
|
2802
2757
|
}, [
|
|
2803
|
-
|
|
2758
|
+
l,
|
|
2804
2759
|
d,
|
|
2760
|
+
f,
|
|
2805
2761
|
p,
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
}, tt = ee({
|
|
2762
|
+
y
|
|
2763
|
+
]), n ? /* @__PURE__ */ h(re, {}) : /* @__PURE__ */ h(ae, { children: a != null && a.length ? /* @__PURE__ */ v("ul", { className: `pretty-grid-main ${s}`, children: [
|
|
2764
|
+
a == null ? void 0 : a.map((C) => /* @__PURE__ */ h("li", { className: `pretty-grid-item ${t}`, children: c(C) }, C.id)),
|
|
2765
|
+
l && d && /* @__PURE__ */ h("li", { className: "pretty-grid-load-more", ref: g, children: m })
|
|
2766
|
+
] }) : /* @__PURE__ */ h(ae, { children: o || /* @__PURE__ */ h(ds, { message: i }) }) });
|
|
2767
|
+
}, Ge = Y({
|
|
2813
2768
|
title: "",
|
|
2814
2769
|
setTitle: () => {
|
|
2815
2770
|
},
|
|
2816
2771
|
rightContent: null,
|
|
2817
2772
|
setRightContent: () => {
|
|
2818
2773
|
}
|
|
2819
|
-
}),
|
|
2820
|
-
const { children: e } =
|
|
2821
|
-
t(
|
|
2822
|
-
}, []), c =
|
|
2823
|
-
o(
|
|
2824
|
-
}, []), a =
|
|
2774
|
+
}), ir = (r) => {
|
|
2775
|
+
const { children: e } = r, [s, t] = R(""), [n, o] = R(null), i = S((l) => {
|
|
2776
|
+
t(l);
|
|
2777
|
+
}, []), c = S((l) => {
|
|
2778
|
+
o(l);
|
|
2779
|
+
}, []), a = V(
|
|
2825
2780
|
() => ({
|
|
2826
2781
|
title: s,
|
|
2827
2782
|
setTitle: i,
|
|
2828
|
-
rightContent:
|
|
2783
|
+
rightContent: n,
|
|
2829
2784
|
setRightContent: c
|
|
2830
2785
|
}),
|
|
2831
|
-
[s, i,
|
|
2786
|
+
[s, i, n, c]
|
|
2832
2787
|
);
|
|
2833
|
-
return /* @__PURE__ */
|
|
2834
|
-
},
|
|
2835
|
-
function
|
|
2836
|
-
const { t: e } =
|
|
2837
|
-
(
|
|
2788
|
+
return /* @__PURE__ */ h(Ge.Provider, { value: a, children: e });
|
|
2789
|
+
}, ns = () => X(Ge);
|
|
2790
|
+
function ar(r) {
|
|
2791
|
+
const { t: e } = k(), { openDrawer: s, showSearch: t = !0, menuButtonProps: n } = r, { searchComponent: o, location: i } = ce(), { title: c, rightContent: a } = ns(), [l, u] = R(!1), d = S((p) => {
|
|
2792
|
+
(Ht() ? p.metaKey : p.ctrlKey) && p.shiftKey && p.key.toLowerCase() === "f" && (u(!0), p.preventDefault());
|
|
2838
2793
|
}, []);
|
|
2839
|
-
|
|
2794
|
+
O(() => (window.addEventListener("keydown", d), () => {
|
|
2840
2795
|
window.removeEventListener("keydown", d);
|
|
2841
2796
|
}), [d]);
|
|
2842
|
-
const m = o,
|
|
2843
|
-
return /* @__PURE__ */
|
|
2844
|
-
i.pathname !== "/" && !!m && /* @__PURE__ */
|
|
2845
|
-
/* @__PURE__ */
|
|
2846
|
-
/* @__PURE__ */
|
|
2847
|
-
/* @__PURE__ */
|
|
2848
|
-
|
|
2797
|
+
const m = o, f = t && !!m;
|
|
2798
|
+
return /* @__PURE__ */ v(ae, { children: [
|
|
2799
|
+
i.pathname !== "/" && !!m && /* @__PURE__ */ h(m, { open: l, onClose: () => u(!1) }),
|
|
2800
|
+
/* @__PURE__ */ v("header", { id: "header", className: "header", children: [
|
|
2801
|
+
/* @__PURE__ */ v("div", { className: "navbar-left", children: [
|
|
2802
|
+
/* @__PURE__ */ h(
|
|
2803
|
+
z,
|
|
2849
2804
|
{
|
|
2850
|
-
...
|
|
2851
|
-
type: (
|
|
2852
|
-
icon: (
|
|
2853
|
-
onClick: (
|
|
2854
|
-
var
|
|
2855
|
-
(
|
|
2805
|
+
...n,
|
|
2806
|
+
type: (n == null ? void 0 : n.type) ?? "button",
|
|
2807
|
+
icon: (n == null ? void 0 : n.icon) ?? Ct,
|
|
2808
|
+
onClick: (p) => {
|
|
2809
|
+
var b;
|
|
2810
|
+
(b = n == null ? void 0 : n.onClick) == null || b.call(n, p), s();
|
|
2856
2811
|
},
|
|
2857
|
-
name: (
|
|
2858
|
-
"aria-label": (
|
|
2859
|
-
className: `navbar-menu animated ${(
|
|
2812
|
+
name: (n == null ? void 0 : n.name) ?? e("_accessibility:buttons.openMenu"),
|
|
2813
|
+
"aria-label": (n == null ? void 0 : n["aria-label"]) ?? e("_accessibility:ariaLabels.openMenu"),
|
|
2814
|
+
className: `navbar-menu animated ${(n == null ? void 0 : n.className) ?? ""}`
|
|
2860
2815
|
}
|
|
2861
2816
|
),
|
|
2862
|
-
/* @__PURE__ */
|
|
2817
|
+
/* @__PURE__ */ h("h1", { className: "poppins navbar-title", children: c || e("_pages:home.appName") })
|
|
2863
2818
|
] }),
|
|
2864
|
-
/* @__PURE__ */
|
|
2819
|
+
/* @__PURE__ */ v("div", { className: "navbar-right", children: [
|
|
2865
2820
|
a,
|
|
2866
|
-
|
|
2867
|
-
|
|
2821
|
+
f && /* @__PURE__ */ h(
|
|
2822
|
+
z,
|
|
2868
2823
|
{
|
|
2869
|
-
icon:
|
|
2824
|
+
icon: Tt,
|
|
2870
2825
|
className: "navbar-search-btn",
|
|
2871
|
-
onClick: () =>
|
|
2826
|
+
onClick: () => u(!0)
|
|
2872
2827
|
}
|
|
2873
2828
|
)
|
|
2874
2829
|
] })
|
|
2875
2830
|
] })
|
|
2876
2831
|
] });
|
|
2877
2832
|
}
|
|
2878
|
-
const
|
|
2879
|
-
switch (
|
|
2880
|
-
case
|
|
2881
|
-
return
|
|
2833
|
+
const ue = 300, os = (r) => r ?? M.error, is = (r) => {
|
|
2834
|
+
switch (r) {
|
|
2835
|
+
case M.error:
|
|
2836
|
+
return Et;
|
|
2882
2837
|
default:
|
|
2883
|
-
return
|
|
2838
|
+
return vt;
|
|
2884
2839
|
}
|
|
2885
|
-
},
|
|
2886
|
-
switch (
|
|
2887
|
-
case
|
|
2840
|
+
}, pe = (r) => {
|
|
2841
|
+
switch (r) {
|
|
2842
|
+
case M.success:
|
|
2888
2843
|
return "!text-success";
|
|
2889
|
-
case
|
|
2844
|
+
case M.error:
|
|
2890
2845
|
return "!text-error";
|
|
2891
|
-
case
|
|
2846
|
+
case M.warning:
|
|
2892
2847
|
return "!text-warning";
|
|
2893
2848
|
default:
|
|
2894
2849
|
return "!text-info";
|
|
2895
2850
|
}
|
|
2896
|
-
},
|
|
2897
|
-
switch (
|
|
2898
|
-
case
|
|
2851
|
+
}, as = (r) => {
|
|
2852
|
+
switch (r) {
|
|
2853
|
+
case M.success:
|
|
2899
2854
|
return "bg-bg-success";
|
|
2900
|
-
case
|
|
2855
|
+
case M.error:
|
|
2901
2856
|
return "bg-bg-error";
|
|
2902
|
-
case
|
|
2857
|
+
case M.warning:
|
|
2903
2858
|
return "bg-bg-warning";
|
|
2904
2859
|
default:
|
|
2905
2860
|
return "bg-bg-info";
|
|
2906
2861
|
}
|
|
2907
2862
|
};
|
|
2908
|
-
function
|
|
2909
|
-
const { t:
|
|
2910
|
-
|
|
2863
|
+
function cr() {
|
|
2864
|
+
const { t: r } = k(), { notification: e, removeNotification: s } = oe(), [t, n] = R([]), o = F(t);
|
|
2865
|
+
dt(() => {
|
|
2911
2866
|
o.current = t;
|
|
2912
2867
|
});
|
|
2913
|
-
const i =
|
|
2868
|
+
const i = F(null), c = S(
|
|
2914
2869
|
(a) => {
|
|
2915
|
-
|
|
2916
|
-
(
|
|
2870
|
+
n(
|
|
2871
|
+
(l) => a !== void 0 ? l.map((u) => u.id === a ? { ...u, closing: !0 } : u) : l.map((u) => ({ ...u, closing: !0 }))
|
|
2917
2872
|
), a !== void 0 ? setTimeout(() => {
|
|
2918
|
-
s(a),
|
|
2919
|
-
},
|
|
2920
|
-
s(),
|
|
2921
|
-
},
|
|
2873
|
+
s(a), n((l) => l.filter((u) => u.id !== a));
|
|
2874
|
+
}, ue) : (i.current && clearTimeout(i.current), i.current = setTimeout(() => {
|
|
2875
|
+
s(), n([]), i.current = null;
|
|
2876
|
+
}, ue));
|
|
2922
2877
|
},
|
|
2923
2878
|
[s]
|
|
2924
2879
|
);
|
|
2925
|
-
return
|
|
2880
|
+
return O(() => {
|
|
2926
2881
|
let a = null;
|
|
2927
|
-
const
|
|
2882
|
+
const l = () => {
|
|
2928
2883
|
a && clearTimeout(a), i.current && (clearTimeout(i.current), i.current = null);
|
|
2929
2884
|
};
|
|
2930
2885
|
if (e.length === 0)
|
|
2931
2886
|
return o.current.length === 0 ? void 0 : (i.current && clearTimeout(i.current), a = setTimeout(() => {
|
|
2932
|
-
|
|
2887
|
+
n((f) => f.map((p) => ({ ...p, closing: !0 }))), a = null;
|
|
2933
2888
|
}, 0), i.current = setTimeout(() => {
|
|
2934
|
-
|
|
2935
|
-
},
|
|
2936
|
-
const
|
|
2889
|
+
n([]), i.current = null;
|
|
2890
|
+
}, ue), l);
|
|
2891
|
+
const u = new Set(o.current.map((f) => f.id));
|
|
2937
2892
|
if (!e.some(
|
|
2938
|
-
(
|
|
2893
|
+
(f) => f.id !== void 0 && !u.has(f.id)
|
|
2939
2894
|
)) return;
|
|
2940
2895
|
if (o.current.length === 0) {
|
|
2941
|
-
const
|
|
2896
|
+
const f = [...e];
|
|
2942
2897
|
return a = setTimeout(() => {
|
|
2943
|
-
|
|
2898
|
+
n(f.map((p) => ({ ...p, closing: !1 }))), a = null;
|
|
2944
2899
|
}, 0), () => {
|
|
2945
2900
|
a && clearTimeout(a);
|
|
2946
2901
|
};
|
|
2947
2902
|
}
|
|
2948
2903
|
i.current && clearTimeout(i.current), a = setTimeout(() => {
|
|
2949
|
-
|
|
2950
|
-
(
|
|
2904
|
+
n(
|
|
2905
|
+
(f) => f.every((p) => p.closing) ? f : f.map((p) => ({ ...p, closing: !0 }))
|
|
2951
2906
|
), a = null;
|
|
2952
2907
|
}, 0);
|
|
2953
2908
|
const m = [...e];
|
|
2954
2909
|
return i.current = setTimeout(() => {
|
|
2955
|
-
|
|
2956
|
-
},
|
|
2957
|
-
}, [e]),
|
|
2910
|
+
n(m.map((f) => ({ ...f, closing: !1 }))), i.current = null;
|
|
2911
|
+
}, ue), l;
|
|
2912
|
+
}, [e]), O(() => {
|
|
2958
2913
|
if (!t.length) return;
|
|
2959
2914
|
let a;
|
|
2960
|
-
const
|
|
2915
|
+
const l = window.setTimeout(() => {
|
|
2961
2916
|
a = () => c(), window.addEventListener("click", a);
|
|
2962
|
-
}, 0),
|
|
2917
|
+
}, 0), u = (d) => {
|
|
2963
2918
|
d.key === "Escape" && c();
|
|
2964
2919
|
};
|
|
2965
|
-
return window.addEventListener("keydown",
|
|
2966
|
-
window.clearTimeout(
|
|
2920
|
+
return window.addEventListener("keydown", u), () => {
|
|
2921
|
+
window.clearTimeout(l), a && window.removeEventListener("click", a), window.removeEventListener("keydown", u);
|
|
2967
2922
|
};
|
|
2968
|
-
}, [t.length, c]),
|
|
2969
|
-
/* @__PURE__ */
|
|
2970
|
-
const m =
|
|
2971
|
-
return /* @__PURE__ */
|
|
2923
|
+
}, [t.length, c]), Ie(
|
|
2924
|
+
/* @__PURE__ */ h("div", { className: `notification-portal ${t.length ? "active" : ""}`, children: t.map(({ id: a, type: l, message: u, closing: d }) => {
|
|
2925
|
+
const m = os(l);
|
|
2926
|
+
return /* @__PURE__ */ v(
|
|
2972
2927
|
"div",
|
|
2973
2928
|
{
|
|
2974
|
-
className: `notification ${d ? "closing" : ""} ${
|
|
2975
|
-
onClick: (
|
|
2929
|
+
className: `notification ${d ? "closing" : ""} ${as(m)}`,
|
|
2930
|
+
onClick: (f) => f.stopPropagation(),
|
|
2976
2931
|
children: [
|
|
2977
|
-
/* @__PURE__ */
|
|
2978
|
-
/* @__PURE__ */
|
|
2979
|
-
|
|
2932
|
+
/* @__PURE__ */ v("div", { className: "notification-body", children: [
|
|
2933
|
+
/* @__PURE__ */ h(
|
|
2934
|
+
q,
|
|
2980
2935
|
{
|
|
2981
|
-
icon:
|
|
2982
|
-
className: `notification-icon ${
|
|
2936
|
+
icon: is(m),
|
|
2937
|
+
className: `notification-icon ${pe(m)}`
|
|
2983
2938
|
}
|
|
2984
2939
|
),
|
|
2985
|
-
/* @__PURE__ */
|
|
2940
|
+
/* @__PURE__ */ h("p", { className: `notification-text ${pe(m)}`, children: u })
|
|
2986
2941
|
] }),
|
|
2987
|
-
/* @__PURE__ */
|
|
2988
|
-
|
|
2942
|
+
/* @__PURE__ */ h(
|
|
2943
|
+
z,
|
|
2989
2944
|
{
|
|
2990
2945
|
type: "button",
|
|
2991
|
-
icon:
|
|
2946
|
+
icon: De,
|
|
2992
2947
|
color: "error",
|
|
2993
2948
|
className: "notification-close group",
|
|
2994
|
-
onClick: (
|
|
2995
|
-
|
|
2949
|
+
onClick: (f) => {
|
|
2950
|
+
f.stopPropagation(), a !== void 0 && c(a);
|
|
2996
2951
|
},
|
|
2997
|
-
iconClassName: `${
|
|
2998
|
-
name:
|
|
2999
|
-
"aria-label":
|
|
2952
|
+
iconClassName: `${pe(m)} notification-close-icon`,
|
|
2953
|
+
name: r("_accessibility:buttons.closeNotification"),
|
|
2954
|
+
"aria-label": r("_accessibility:ariaLabels.closeNotification")
|
|
3000
2955
|
}
|
|
3001
2956
|
)
|
|
3002
2957
|
]
|
|
@@ -3007,113 +2962,113 @@ function Tn() {
|
|
|
3007
2962
|
document.body
|
|
3008
2963
|
);
|
|
3009
2964
|
}
|
|
3010
|
-
function
|
|
3011
|
-
const { className: e, ...s } =
|
|
3012
|
-
return /* @__PURE__ */
|
|
3013
|
-
|
|
2965
|
+
function lr(r) {
|
|
2966
|
+
const { className: e, ...s } = r;
|
|
2967
|
+
return /* @__PURE__ */ h("div", { className: "splash-screen", children: /* @__PURE__ */ h(
|
|
2968
|
+
re,
|
|
3014
2969
|
{
|
|
3015
2970
|
className: `blur-appear ${e ? ` ${e}` : ""}`,
|
|
3016
2971
|
...s
|
|
3017
2972
|
}
|
|
3018
2973
|
) });
|
|
3019
2974
|
}
|
|
3020
|
-
const
|
|
2975
|
+
const cs = (r) => {
|
|
3021
2976
|
const {
|
|
3022
2977
|
id: e,
|
|
3023
2978
|
active: s,
|
|
3024
2979
|
onClick: t,
|
|
3025
|
-
children:
|
|
2980
|
+
children: n,
|
|
3026
2981
|
to: o,
|
|
3027
2982
|
useLinks: i = !0,
|
|
3028
2983
|
tabButtonProps: c
|
|
3029
|
-
} =
|
|
2984
|
+
} = r, { linkComponent: a } = ce(), l = a;
|
|
3030
2985
|
if (!i) {
|
|
3031
2986
|
const {
|
|
3032
2987
|
className: d = "",
|
|
3033
2988
|
variant: m = s ? "submit" : "outlined",
|
|
3034
|
-
color:
|
|
3035
|
-
...
|
|
2989
|
+
color: f = s ? "primary" : "default",
|
|
2990
|
+
...p
|
|
3036
2991
|
} = c ?? {};
|
|
3037
|
-
return /* @__PURE__ */
|
|
3038
|
-
|
|
2992
|
+
return /* @__PURE__ */ h(
|
|
2993
|
+
H,
|
|
3039
2994
|
{
|
|
3040
2995
|
type: "button",
|
|
3041
2996
|
variant: m,
|
|
3042
|
-
color:
|
|
2997
|
+
color: f,
|
|
3043
2998
|
className: `tab ${d}`,
|
|
3044
2999
|
onClick: t,
|
|
3045
|
-
...
|
|
3046
|
-
children:
|
|
3000
|
+
...p,
|
|
3001
|
+
children: n
|
|
3047
3002
|
}
|
|
3048
3003
|
);
|
|
3049
3004
|
}
|
|
3050
|
-
const
|
|
3051
|
-
return /* @__PURE__ */
|
|
3052
|
-
|
|
3005
|
+
const u = `button submit tab ${s ? "primary" : "outlined"} ${(c == null ? void 0 : c.className) ?? ""}`.trim();
|
|
3006
|
+
return /* @__PURE__ */ h(
|
|
3007
|
+
l,
|
|
3053
3008
|
{
|
|
3054
3009
|
to: o ?? `#${e}`,
|
|
3055
3010
|
onClick: () => t(),
|
|
3056
|
-
className:
|
|
3057
|
-
children:
|
|
3011
|
+
className: u,
|
|
3012
|
+
children: n
|
|
3058
3013
|
}
|
|
3059
3014
|
);
|
|
3060
|
-
},
|
|
3061
|
-
var
|
|
3015
|
+
}, ls = (r) => {
|
|
3016
|
+
var f;
|
|
3062
3017
|
const {
|
|
3063
3018
|
tabs: e = [],
|
|
3064
3019
|
defaultTab: s,
|
|
3065
3020
|
currentTab: t,
|
|
3066
|
-
onTabChange:
|
|
3021
|
+
onTabChange: n,
|
|
3067
3022
|
className: o = "",
|
|
3068
3023
|
tabsContainerClassName: i = "",
|
|
3069
3024
|
useLinks: c = !0,
|
|
3070
3025
|
tabButtonProps: a
|
|
3071
|
-
} =
|
|
3072
|
-
return /* @__PURE__ */
|
|
3073
|
-
/* @__PURE__ */
|
|
3026
|
+
} = r, [l, u] = R(s ?? ((f = e[0]) == null ? void 0 : f.id)), d = t ?? l, m = V(() => e.find((p) => p.id === d), [e, d]);
|
|
3027
|
+
return /* @__PURE__ */ v("div", { className: `tabs-layout-main ${o}`, children: [
|
|
3028
|
+
/* @__PURE__ */ h(
|
|
3074
3029
|
"ul",
|
|
3075
3030
|
{
|
|
3076
3031
|
className: `horizontal tabs tabs-container ${i}`,
|
|
3077
|
-
children: e.map(({ id:
|
|
3078
|
-
|
|
3032
|
+
children: e.map(({ id: p, to: b, label: g }) => /* @__PURE__ */ h("li", { children: /* @__PURE__ */ h(
|
|
3033
|
+
cs,
|
|
3079
3034
|
{
|
|
3080
3035
|
onClick: () => {
|
|
3081
|
-
t === void 0 &&
|
|
3036
|
+
t === void 0 && u(p), n == null || n(p);
|
|
3082
3037
|
},
|
|
3083
|
-
id:
|
|
3084
|
-
to:
|
|
3038
|
+
id: p,
|
|
3039
|
+
to: b,
|
|
3085
3040
|
siblings: e.length > 1,
|
|
3086
|
-
active: d ===
|
|
3041
|
+
active: d === p,
|
|
3087
3042
|
useLinks: c,
|
|
3088
3043
|
tabButtonProps: a,
|
|
3089
3044
|
children: g
|
|
3090
3045
|
}
|
|
3091
|
-
) },
|
|
3046
|
+
) }, p))
|
|
3092
3047
|
}
|
|
3093
3048
|
),
|
|
3094
3049
|
m == null ? void 0 : m.content
|
|
3095
3050
|
] });
|
|
3096
|
-
},
|
|
3051
|
+
}, us = (r) => {
|
|
3097
3052
|
const {
|
|
3098
3053
|
title: e,
|
|
3099
3054
|
body: s,
|
|
3100
3055
|
content: t,
|
|
3101
|
-
onClickNext:
|
|
3056
|
+
onClickNext: n,
|
|
3102
3057
|
onSkip: o,
|
|
3103
3058
|
onStartAsGuest: i,
|
|
3104
3059
|
onSignIn: c,
|
|
3105
3060
|
image: a = "",
|
|
3106
|
-
alt:
|
|
3107
|
-
final:
|
|
3108
|
-
} =
|
|
3109
|
-
return /* @__PURE__ */
|
|
3110
|
-
a && /* @__PURE__ */
|
|
3111
|
-
e != null && /* @__PURE__ */
|
|
3112
|
-
s != null && /* @__PURE__ */
|
|
3113
|
-
t != null && /* @__PURE__ */
|
|
3114
|
-
/* @__PURE__ */
|
|
3115
|
-
/* @__PURE__ */
|
|
3116
|
-
|
|
3061
|
+
alt: l = "",
|
|
3062
|
+
final: u = !1
|
|
3063
|
+
} = r, { t: d } = k();
|
|
3064
|
+
return /* @__PURE__ */ v("div", { className: "big-appear step-container", children: [
|
|
3065
|
+
a && /* @__PURE__ */ h("img", { src: a, alt: l }),
|
|
3066
|
+
e != null && /* @__PURE__ */ h("h2", { className: "step-title", children: e }),
|
|
3067
|
+
s != null && /* @__PURE__ */ h("div", { className: "step-body", children: s }),
|
|
3068
|
+
t != null && /* @__PURE__ */ h("div", { className: "step-content", children: t }),
|
|
3069
|
+
/* @__PURE__ */ h("div", { className: "step-actions", children: u ? /* @__PURE__ */ v(ae, { children: [
|
|
3070
|
+
/* @__PURE__ */ h(
|
|
3071
|
+
H,
|
|
3117
3072
|
{
|
|
3118
3073
|
color: "primary",
|
|
3119
3074
|
className: "step-button",
|
|
@@ -3123,8 +3078,8 @@ const bs = (n) => {
|
|
|
3123
3078
|
children: d("_accessibility:buttons.startAsGuest")
|
|
3124
3079
|
}
|
|
3125
3080
|
),
|
|
3126
|
-
/* @__PURE__ */
|
|
3127
|
-
|
|
3081
|
+
/* @__PURE__ */ h(
|
|
3082
|
+
H,
|
|
3128
3083
|
{
|
|
3129
3084
|
color: "primary",
|
|
3130
3085
|
variant: "submit",
|
|
@@ -3134,9 +3089,9 @@ const bs = (n) => {
|
|
|
3134
3089
|
children: d("_accessibility:buttons.signIn")
|
|
3135
3090
|
}
|
|
3136
3091
|
)
|
|
3137
|
-
] }) : /* @__PURE__ */
|
|
3138
|
-
/* @__PURE__ */
|
|
3139
|
-
|
|
3092
|
+
] }) : /* @__PURE__ */ v(ae, { children: [
|
|
3093
|
+
/* @__PURE__ */ h(
|
|
3094
|
+
H,
|
|
3140
3095
|
{
|
|
3141
3096
|
color: "primary",
|
|
3142
3097
|
className: "step-button",
|
|
@@ -3146,173 +3101,171 @@ const bs = (n) => {
|
|
|
3146
3101
|
children: d("_accessibility:buttons.skip")
|
|
3147
3102
|
}
|
|
3148
3103
|
),
|
|
3149
|
-
/* @__PURE__ */
|
|
3150
|
-
|
|
3104
|
+
/* @__PURE__ */ h(
|
|
3105
|
+
H,
|
|
3151
3106
|
{
|
|
3152
3107
|
color: "primary",
|
|
3153
3108
|
className: "step-button",
|
|
3154
3109
|
variant: "outlined",
|
|
3155
|
-
onClick: () =>
|
|
3110
|
+
onClick: () => n(),
|
|
3156
3111
|
"aria-label": d("_accessibility:ariaLabels.next"),
|
|
3157
3112
|
children: d("_accessibility:buttons.next")
|
|
3158
3113
|
}
|
|
3159
3114
|
)
|
|
3160
3115
|
] }) })
|
|
3161
3116
|
] });
|
|
3162
|
-
},
|
|
3117
|
+
}, ur = (r) => {
|
|
3163
3118
|
const {
|
|
3164
3119
|
steps: e,
|
|
3165
3120
|
signInPath: s = "/auth/sign-in",
|
|
3166
3121
|
guestPath: t = "/",
|
|
3167
|
-
onSkip:
|
|
3122
|
+
onSkip: n,
|
|
3168
3123
|
onSignIn: o,
|
|
3169
3124
|
onStartAsGuest: i
|
|
3170
|
-
} =
|
|
3171
|
-
if (
|
|
3172
|
-
|
|
3125
|
+
} = r, { setGuestMode: c } = Ke(), { navigate: a } = ce(), [l, u] = R(1), d = S(() => {
|
|
3126
|
+
if (n) {
|
|
3127
|
+
n();
|
|
3173
3128
|
return;
|
|
3174
3129
|
}
|
|
3175
3130
|
a(s);
|
|
3176
|
-
}, [a,
|
|
3131
|
+
}, [a, n, s]), m = S(() => {
|
|
3177
3132
|
if (o) {
|
|
3178
3133
|
o();
|
|
3179
3134
|
return;
|
|
3180
3135
|
}
|
|
3181
3136
|
a(s);
|
|
3182
|
-
}, [a, o, s]),
|
|
3137
|
+
}, [a, o, s]), f = S(() => {
|
|
3183
3138
|
if (i) {
|
|
3184
3139
|
i();
|
|
3185
3140
|
return;
|
|
3186
3141
|
}
|
|
3187
3142
|
c(!0), a(t);
|
|
3188
|
-
}, [t, a, i, c]),
|
|
3143
|
+
}, [t, a, i, c]), p = V(() => e.map((b, g) => ({
|
|
3189
3144
|
id: g + 1,
|
|
3190
3145
|
label: "",
|
|
3191
|
-
content: /* @__PURE__ */
|
|
3192
|
-
|
|
3146
|
+
content: /* @__PURE__ */ h(
|
|
3147
|
+
us,
|
|
3193
3148
|
{
|
|
3194
|
-
...
|
|
3149
|
+
...b,
|
|
3195
3150
|
final: g === e.length - 1,
|
|
3196
|
-
onClickNext: () =>
|
|
3151
|
+
onClickNext: () => u((y) => y + 1),
|
|
3197
3152
|
onSkip: d,
|
|
3198
|
-
onStartAsGuest:
|
|
3153
|
+
onStartAsGuest: f,
|
|
3199
3154
|
onSignIn: m
|
|
3200
3155
|
}
|
|
3201
3156
|
)
|
|
3202
|
-
})), [m, d,
|
|
3203
|
-
return /* @__PURE__ */
|
|
3204
|
-
|
|
3157
|
+
})), [m, d, f, e]);
|
|
3158
|
+
return /* @__PURE__ */ h("div", { className: "onboarding-main", children: /* @__PURE__ */ h(
|
|
3159
|
+
ls,
|
|
3205
3160
|
{
|
|
3206
|
-
currentTab:
|
|
3207
|
-
onTabChange: (
|
|
3208
|
-
tabs:
|
|
3161
|
+
currentTab: l,
|
|
3162
|
+
onTabChange: (b) => u(Number(b)),
|
|
3163
|
+
tabs: p,
|
|
3209
3164
|
useLinks: !1
|
|
3210
3165
|
}
|
|
3211
3166
|
) });
|
|
3212
|
-
},
|
|
3167
|
+
}, ds = (r) => {
|
|
3213
3168
|
const {
|
|
3214
3169
|
message: e,
|
|
3215
3170
|
messageProps: s = { className: "empty-message" },
|
|
3216
3171
|
action: t,
|
|
3217
|
-
iconProps:
|
|
3218
|
-
} =
|
|
3219
|
-
return /* @__PURE__ */
|
|
3220
|
-
|
|
3221
|
-
/* @__PURE__ */
|
|
3222
|
-
t && /* @__PURE__ */
|
|
3172
|
+
iconProps: n
|
|
3173
|
+
} = r;
|
|
3174
|
+
return /* @__PURE__ */ v("div", { className: "empty-container", children: [
|
|
3175
|
+
n && /* @__PURE__ */ h(q, { ...n }),
|
|
3176
|
+
/* @__PURE__ */ h("p", { ...s, children: e }),
|
|
3177
|
+
t && /* @__PURE__ */ h(ut, { showTooltips: !1, showText: !0, ...t })
|
|
3223
3178
|
] });
|
|
3224
3179
|
};
|
|
3225
3180
|
export {
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
ss as useSupabase,
|
|
3317
|
-
nn as useTimeAge
|
|
3181
|
+
de as APIClient,
|
|
3182
|
+
fr as Action,
|
|
3183
|
+
pr as Actions,
|
|
3184
|
+
gr as ActionsDropdown,
|
|
3185
|
+
z as AppIconButton,
|
|
3186
|
+
Mt as AuthClient,
|
|
3187
|
+
Te as AuthContext,
|
|
3188
|
+
js as AuthProvider,
|
|
3189
|
+
Ds as BaseClient,
|
|
3190
|
+
br as Button,
|
|
3191
|
+
Hs as ConfigProvider,
|
|
3192
|
+
As as ConfirmationDialog,
|
|
3193
|
+
be as Dialog,
|
|
3194
|
+
ye as DialogActions,
|
|
3195
|
+
Vs as Drawer,
|
|
3196
|
+
qe as DrawerMenuContext,
|
|
3197
|
+
Bs as DrawerMenuProvider,
|
|
3198
|
+
ds as Empty,
|
|
3199
|
+
rr as Error,
|
|
3200
|
+
Es as FormContainer,
|
|
3201
|
+
Ns as FormDialog,
|
|
3202
|
+
J as GlobalActions,
|
|
3203
|
+
xs as IManager,
|
|
3204
|
+
z as IconButton,
|
|
3205
|
+
$s as ImportDialog,
|
|
3206
|
+
Ls as IndexedDBClient,
|
|
3207
|
+
Ks as ManagerProvider,
|
|
3208
|
+
P as Methods,
|
|
3209
|
+
ar as Navbar,
|
|
3210
|
+
Ge as NavbarContext,
|
|
3211
|
+
ir as NavbarProvider,
|
|
3212
|
+
cr as Notification,
|
|
3213
|
+
M as NotificationEnumType,
|
|
3214
|
+
Fs as NotificationProvider,
|
|
3215
|
+
ur as Onboarding,
|
|
3216
|
+
nr as Page,
|
|
3217
|
+
vs as ParagraphInput,
|
|
3218
|
+
ks as PasswordInput,
|
|
3219
|
+
or as PrettyGrid,
|
|
3220
|
+
lr as SplashScreen,
|
|
3221
|
+
us as Step,
|
|
3222
|
+
Qs as SupabaseAuthProvider,
|
|
3223
|
+
Rs as SupabaseDataClient,
|
|
3224
|
+
je as SupabaseManagerContext,
|
|
3225
|
+
qs as SupabaseManagerProvider,
|
|
3226
|
+
cs as Tab,
|
|
3227
|
+
ls as TabsLayout,
|
|
3228
|
+
sr as ToTop,
|
|
3229
|
+
Pt as buildQueryUrl,
|
|
3230
|
+
Ce as createQueryClient,
|
|
3231
|
+
Is as enumToKeyValueArray,
|
|
3232
|
+
Os as formatForDatetimeLocal,
|
|
3233
|
+
G as fromLocal,
|
|
3234
|
+
_s as getFormattedDateTime,
|
|
3235
|
+
Ps as getShortFormattedDateTime,
|
|
3236
|
+
Se as isHttpError,
|
|
3237
|
+
Ht as isMac,
|
|
3238
|
+
we as isValidationError,
|
|
3239
|
+
me as makeRequest,
|
|
3240
|
+
ke as mapSupabaseSessionToSessionDto,
|
|
3241
|
+
Ms as mapValidationErrors,
|
|
3242
|
+
Me as parseQueries,
|
|
3243
|
+
Us as queryClient,
|
|
3244
|
+
I as removeFromLocal,
|
|
3245
|
+
Q as toLocal,
|
|
3246
|
+
Ke as useAuth,
|
|
3247
|
+
Vt as useAuthContext,
|
|
3248
|
+
ce as useConfig,
|
|
3249
|
+
He as useConfirmationForm,
|
|
3250
|
+
Xt as useDeleteAction,
|
|
3251
|
+
Js as useDeleteDialog,
|
|
3252
|
+
Be as useDialog,
|
|
3253
|
+
zt as useDrawerMenu,
|
|
3254
|
+
zs as useEditAction,
|
|
3255
|
+
es as useExportAction,
|
|
3256
|
+
tr as useExportActionMutate,
|
|
3257
|
+
Ve as useFormDialog,
|
|
3258
|
+
ts as useImportAction,
|
|
3259
|
+
er as useImportDialog,
|
|
3260
|
+
Bt as useManager,
|
|
3261
|
+
ns as useNavbar,
|
|
3262
|
+
oe as useNotification,
|
|
3263
|
+
Ys as usePostDialog,
|
|
3264
|
+
Ws as usePostForm,
|
|
3265
|
+
Xs as usePutDialog,
|
|
3266
|
+
Zt as useRestoreAction,
|
|
3267
|
+
Zs as useRestoreDialog,
|
|
3268
|
+
ss as useScrollTrigger,
|
|
3269
|
+
Gt as useSupabase,
|
|
3270
|
+
Gs as useTimeAge
|
|
3318
3271
|
};
|