@edifice.io/collect-frontend 0.2.2-develop-pedago.2 → 0.2.2-develop-pedago.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AppHeaderCollection-CdMZTmC6.js +170 -0
- package/lib/{CXEL7IU7-DVs75C4a.js → CXEL7IU7-BLUeaFt5.js} +2 -2
- package/lib/Collection-CUCjNGrr.js +472 -0
- package/lib/CollectionsLayout-DVYmui3o.js +187 -0
- package/lib/CollectionsList-Ba1LoCCN.js +310 -0
- package/lib/DeleteCollectionModal-CtmfiR2H.js +71 -0
- package/lib/DropdownActionTable-BhSk2sde.js +84 -0
- package/lib/FormEdit-DZFkw7z9.js +102 -0
- package/lib/{HASRA6WW-qb64R1U-.js → HASRA6WW-BPaxT9L-.js} +269 -269
- package/lib/{I3HPI4QX-DhV4n2OZ.js → I3HPI4QX-BuVHGkjY.js} +2 -2
- package/lib/MembersEdit-CblCChDS.js +77 -0
- package/lib/Root--z47Brfh.js +17 -0
- package/lib/SearchBarCollect-DBKaVVDV.js +23 -0
- package/lib/Submission-AzDGz_dM.js +257 -0
- package/lib/SubmissionList-Db_nRSqg.js +197 -0
- package/lib/index-HU8ua_Ev.js +3297 -0
- package/lib/index.js +7 -43
- package/lib/{submission.queries-CslqTzEP.js → submission.queries-Cr0bP5uv.js} +20 -17
- package/lib/useGetStatusSubmission-DxHmLPxr.js +57 -0
- package/package.json +1 -1
- package/lib/AppHeaderCollection-Bglbw6q9.js +0 -188
- package/lib/Collection-DYHQunUI.js +0 -463
- package/lib/CollectionsLayout-CPYEwl1X.js +0 -361
- package/lib/CollectionsList-Inb9z2nB.js +0 -315
- package/lib/DeleteCollectionModal-Dzsn2899.js +0 -112
- package/lib/DropdownActionTable-BLHrdk4t.js +0 -83
- package/lib/FormEdit-CwVhj3_4.js +0 -96
- package/lib/MathsModal-D8rTl0Sb.js +0 -42
- package/lib/MembersEdit-DDj8IWMX.js +0 -72
- package/lib/Root-DbGwe5v1.js +0 -13
- package/lib/SearchBarCollect-BAnLCwAC.js +0 -21
- package/lib/Submission-DUcQiBve.js +0 -249
- package/lib/SubmissionList-DjQ0x7eD.js +0 -695
- package/lib/heic-to-DuZ6uPPi.js +0 -72
- package/lib/index-Dt9ykSDF.js +0 -171658
- package/lib/useGetStatusSubmission-D77F1XUy.js +0 -55
|
@@ -0,0 +1,3297 @@
|
|
|
1
|
+
var Ht = (e) => {
|
|
2
|
+
throw TypeError(e);
|
|
3
|
+
};
|
|
4
|
+
var Wt = (e, t, n) => t.has(e) || Ht("Cannot " + n);
|
|
5
|
+
var y = (e, t, n) => (Wt(e, t, "read from private field"), n ? n.call(e) : t.get(e)), T = (e, t, n) => t.has(e) ? Ht("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), I = (e, t, n, r) => (Wt(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
|
|
6
|
+
import { jsx as d, jsxs as B, Fragment as dn } from "react/jsx-runtime";
|
|
7
|
+
import * as $ from "react";
|
|
8
|
+
import { useState as $t, useEffect as X, useMemo as Dt, useRef as ee, useReducer as hr, createContext as mr, useContext as yr, useLayoutEffect as gr } from "react";
|
|
9
|
+
import { createRoot as pr } from "react-dom/client";
|
|
10
|
+
import { useRouteError as hn, useNavigate as ut, useLocation as vr, Form as br, Routes as wr, Route as Xt, createBrowserRouter as Sr, createMemoryRouter as Cr, RouterProvider as Ar } from "react-router-dom";
|
|
11
|
+
import { ERROR_CODE as Ir, odeServices as Ne } from "@edifice.io/client";
|
|
12
|
+
import { EdificeClientProvider as mn, useEdificeClient as ft, Heading as Gt, Button as J, Layout as Er, Stepper as yn, Grid as K, FormControl as Xe, Label as bt, Input as Or, DatePicker as Tr, AddAttachments as Rr, useIsAdmlcOrAdmc as gn, useUser as pn, useDebounce as xr, Flex as tt, Combobox as Nr, Alert as Pr, UserRightsList as kr, useToast as Mr, useBreakpoint as Lr, EdificeThemeProvider as Vr } from "@edifice.io/react";
|
|
13
|
+
import { useQueryClient as Z, onlineManager as vn, QueryClient as Ur, QueryCache as Fr, QueryClientProvider as bn, queryOptions as wt, useQuery as _r, useMutation as dt, useInfiniteQuery as wn } from "@tanstack/react-query";
|
|
14
|
+
import { useTranslation as ht, Trans as Br } from "react-i18next";
|
|
15
|
+
import { t as St } from "i18next";
|
|
16
|
+
import { Editor as qr } from "@edifice.io/react/editor";
|
|
17
|
+
import { IconLabel as $r, IconFlag as Dr, IconTextPage as Gr, IconBookmark as Kr, IconGroupAvatar as jr, IconArrowLeft as Qr, IconArrowRight as Yt } from "@edifice.io/react/icons";
|
|
18
|
+
import { useForm as Hr, Controller as Ct } from "react-hook-form";
|
|
19
|
+
import { create as Sn } from "zustand";
|
|
20
|
+
import { SharingPermission as nt, CollectionClient as Wr, MediaType as Xr } from "@edifice.io/collect-client-rest";
|
|
21
|
+
var g = {
|
|
22
|
+
context: void 0,
|
|
23
|
+
registry: void 0,
|
|
24
|
+
effects: void 0,
|
|
25
|
+
done: !1,
|
|
26
|
+
getContextId() {
|
|
27
|
+
return Zt(this.context.count);
|
|
28
|
+
},
|
|
29
|
+
getNextContextId() {
|
|
30
|
+
return Zt(this.context.count++);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
function Zt(e) {
|
|
34
|
+
const t = String(e), n = t.length - 1;
|
|
35
|
+
return g.context.id + (n ? String.fromCharCode(96 + n) : "") + t;
|
|
36
|
+
}
|
|
37
|
+
function xe(e) {
|
|
38
|
+
g.context = e;
|
|
39
|
+
}
|
|
40
|
+
var Cn = !1, Yr = (e, t) => e === t, st = Symbol("solid-proxy"), An = typeof Proxy == "function", In = Symbol("solid-track"), it = {
|
|
41
|
+
equals: Yr
|
|
42
|
+
}, En = Pn, W = 1, ot = 2, On = {
|
|
43
|
+
owned: null,
|
|
44
|
+
cleanups: null,
|
|
45
|
+
context: null,
|
|
46
|
+
owner: null
|
|
47
|
+
}, At = {}, C = null, It = null, Zr = null, R = null, q = null, H = null, mt = 0;
|
|
48
|
+
function re(e, t) {
|
|
49
|
+
const n = R, r = C, s = e.length === 0, i = t === void 0 ? r : t, o = s ? On : {
|
|
50
|
+
owned: null,
|
|
51
|
+
cleanups: null,
|
|
52
|
+
context: i ? i.context : null,
|
|
53
|
+
owner: i
|
|
54
|
+
}, l = s ? e : () => e(() => _(() => Le(o)));
|
|
55
|
+
C = o, R = null;
|
|
56
|
+
try {
|
|
57
|
+
return j(l, !0);
|
|
58
|
+
} finally {
|
|
59
|
+
R = n, C = r;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function M(e, t) {
|
|
63
|
+
t = t ? Object.assign({}, it, t) : it;
|
|
64
|
+
const n = {
|
|
65
|
+
value: e,
|
|
66
|
+
observers: null,
|
|
67
|
+
observerSlots: null,
|
|
68
|
+
comparator: t.equals || void 0
|
|
69
|
+
}, r = (s) => (typeof s == "function" && (s = s(n.value)), Nn(n, s));
|
|
70
|
+
return [xn.bind(n), r];
|
|
71
|
+
}
|
|
72
|
+
function zr(e, t, n) {
|
|
73
|
+
const r = yt(e, t, !0, W);
|
|
74
|
+
Re(r);
|
|
75
|
+
}
|
|
76
|
+
function se(e, t, n) {
|
|
77
|
+
const r = yt(e, t, !1, W);
|
|
78
|
+
Re(r);
|
|
79
|
+
}
|
|
80
|
+
function Tn(e, t, n) {
|
|
81
|
+
En = cs;
|
|
82
|
+
const r = yt(e, t, !1, W);
|
|
83
|
+
(!n || !n.render) && (r.user = !0), H ? H.push(r) : Re(r);
|
|
84
|
+
}
|
|
85
|
+
function F(e, t, n) {
|
|
86
|
+
n = n ? Object.assign({}, it, n) : it;
|
|
87
|
+
const r = yt(e, t, !0, 0);
|
|
88
|
+
return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0, Re(r), xn.bind(r);
|
|
89
|
+
}
|
|
90
|
+
function Jr(e) {
|
|
91
|
+
return e && typeof e == "object" && "then" in e;
|
|
92
|
+
}
|
|
93
|
+
function es(e, t, n) {
|
|
94
|
+
let r, s, i;
|
|
95
|
+
r = !0, s = e, i = {};
|
|
96
|
+
let o = null, l = At, c = null, a = !1, f = "initialValue" in i, u = typeof r == "function" && F(r);
|
|
97
|
+
const m = /* @__PURE__ */ new Set(), [h, p] = (i.storage || M)(i.initialValue), [w, N] = M(void 0), [L, A] = M(void 0, {
|
|
98
|
+
equals: !1
|
|
99
|
+
}), [P, U] = M(f ? "ready" : "unresolved");
|
|
100
|
+
g.context && (c = g.getNextContextId(), i.ssrLoadFrom === "initial" ? l = i.initialValue : g.load && g.has(c) && (l = g.load(c)));
|
|
101
|
+
function S(b, E, k, V) {
|
|
102
|
+
return o === b && (o = null, V !== void 0 && (f = !0), (b === l || E === l) && i.onHydrated && queueMicrotask(
|
|
103
|
+
() => i.onHydrated(V, {
|
|
104
|
+
value: E
|
|
105
|
+
})
|
|
106
|
+
), l = At, D(E, k)), E;
|
|
107
|
+
}
|
|
108
|
+
function D(b, E) {
|
|
109
|
+
j(() => {
|
|
110
|
+
E === void 0 && p(() => b), U(E !== void 0 ? "errored" : f ? "ready" : "unresolved"), N(E);
|
|
111
|
+
for (const k of m.keys()) k.decrement();
|
|
112
|
+
m.clear();
|
|
113
|
+
}, !1);
|
|
114
|
+
}
|
|
115
|
+
function v() {
|
|
116
|
+
const b = is, E = h(), k = w();
|
|
117
|
+
if (k !== void 0 && !o) throw k;
|
|
118
|
+
return R && R.user, E;
|
|
119
|
+
}
|
|
120
|
+
function O(b = !0) {
|
|
121
|
+
if (b !== !1 && a) return;
|
|
122
|
+
a = !1;
|
|
123
|
+
const E = u ? u() : r;
|
|
124
|
+
if (E == null || E === !1) {
|
|
125
|
+
S(o, _(h));
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
const k = l !== At ? l : _(
|
|
129
|
+
() => s(E, {
|
|
130
|
+
value: h(),
|
|
131
|
+
refetching: b
|
|
132
|
+
})
|
|
133
|
+
);
|
|
134
|
+
return Jr(k) ? (o = k, "value" in k ? (k.status === "success" ? S(o, k.value, void 0, E) : S(o, void 0, xt(k.value), E), k) : (a = !0, queueMicrotask(() => a = !1), j(() => {
|
|
135
|
+
U(f ? "refreshing" : "pending"), A();
|
|
136
|
+
}, !1), k.then(
|
|
137
|
+
(V) => S(k, V, void 0, E),
|
|
138
|
+
(V) => S(k, void 0, xt(V), E)
|
|
139
|
+
))) : (S(o, k, void 0, E), k);
|
|
140
|
+
}
|
|
141
|
+
return Object.defineProperties(v, {
|
|
142
|
+
state: {
|
|
143
|
+
get: () => P()
|
|
144
|
+
},
|
|
145
|
+
error: {
|
|
146
|
+
get: () => w()
|
|
147
|
+
},
|
|
148
|
+
loading: {
|
|
149
|
+
get() {
|
|
150
|
+
const b = P();
|
|
151
|
+
return b === "pending" || b === "refreshing";
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
latest: {
|
|
155
|
+
get() {
|
|
156
|
+
if (!f) return v();
|
|
157
|
+
const b = w();
|
|
158
|
+
if (b && !o) throw b;
|
|
159
|
+
return h();
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}), u ? zr(() => O(!1)) : O(!1), [
|
|
163
|
+
v,
|
|
164
|
+
{
|
|
165
|
+
refetch: O,
|
|
166
|
+
mutate: p
|
|
167
|
+
}
|
|
168
|
+
];
|
|
169
|
+
}
|
|
170
|
+
function ho(e) {
|
|
171
|
+
return j(e, !1);
|
|
172
|
+
}
|
|
173
|
+
function _(e) {
|
|
174
|
+
if (R === null) return e();
|
|
175
|
+
const t = R;
|
|
176
|
+
R = null;
|
|
177
|
+
try {
|
|
178
|
+
return e();
|
|
179
|
+
} finally {
|
|
180
|
+
R = t;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
function mo(e, t, n) {
|
|
184
|
+
const r = Array.isArray(e);
|
|
185
|
+
let s, i = n && n.defer;
|
|
186
|
+
return (o) => {
|
|
187
|
+
let l;
|
|
188
|
+
if (r) {
|
|
189
|
+
l = Array(e.length);
|
|
190
|
+
for (let a = 0; a < e.length; a++) l[a] = e[a]();
|
|
191
|
+
} else l = e();
|
|
192
|
+
if (i)
|
|
193
|
+
return i = !1, o;
|
|
194
|
+
const c = _(() => t(l, s, o));
|
|
195
|
+
return s = l, c;
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
function ts(e) {
|
|
199
|
+
Tn(() => _(e));
|
|
200
|
+
}
|
|
201
|
+
function Me(e) {
|
|
202
|
+
return C === null || (C.cleanups === null ? C.cleanups = [e] : C.cleanups.push(e)), e;
|
|
203
|
+
}
|
|
204
|
+
function zt() {
|
|
205
|
+
return C;
|
|
206
|
+
}
|
|
207
|
+
function ns(e, t) {
|
|
208
|
+
const n = C, r = R;
|
|
209
|
+
C = e, R = null;
|
|
210
|
+
try {
|
|
211
|
+
return j(t, !0);
|
|
212
|
+
} catch (s) {
|
|
213
|
+
Kt(s);
|
|
214
|
+
} finally {
|
|
215
|
+
C = n, R = r;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
function rs(e) {
|
|
219
|
+
const t = R, n = C;
|
|
220
|
+
return Promise.resolve().then(() => {
|
|
221
|
+
R = t, C = n;
|
|
222
|
+
let r;
|
|
223
|
+
return j(e, !1), R = C = null, r ? r.done : void 0;
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
var [ss, yo] = /* @__PURE__ */ M(!1);
|
|
227
|
+
function go() {
|
|
228
|
+
return [ss, rs];
|
|
229
|
+
}
|
|
230
|
+
function po(e, t) {
|
|
231
|
+
const n = Symbol("context");
|
|
232
|
+
return {
|
|
233
|
+
id: n,
|
|
234
|
+
Provider: as(n),
|
|
235
|
+
defaultValue: e
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
function vo(e) {
|
|
239
|
+
let t;
|
|
240
|
+
return C && C.context && (t = C.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
241
|
+
}
|
|
242
|
+
function Rn(e) {
|
|
243
|
+
const t = F(e), n = F(() => Nt(t()));
|
|
244
|
+
return n.toArray = () => {
|
|
245
|
+
const r = n();
|
|
246
|
+
return Array.isArray(r) ? r : r != null ? [r] : [];
|
|
247
|
+
}, n;
|
|
248
|
+
}
|
|
249
|
+
var is;
|
|
250
|
+
function xn() {
|
|
251
|
+
if (this.sources && this.state)
|
|
252
|
+
if (this.state === W) Re(this);
|
|
253
|
+
else {
|
|
254
|
+
const e = q;
|
|
255
|
+
q = null, j(() => ct(this), !1), q = e;
|
|
256
|
+
}
|
|
257
|
+
if (R) {
|
|
258
|
+
const e = this.observers ? this.observers.length : 0;
|
|
259
|
+
R.sources ? (R.sources.push(this), R.sourceSlots.push(e)) : (R.sources = [this], R.sourceSlots = [e]), this.observers ? (this.observers.push(R), this.observerSlots.push(R.sources.length - 1)) : (this.observers = [R], this.observerSlots = [R.sources.length - 1]);
|
|
260
|
+
}
|
|
261
|
+
return this.value;
|
|
262
|
+
}
|
|
263
|
+
function Nn(e, t, n) {
|
|
264
|
+
let r = e.value;
|
|
265
|
+
return (!e.comparator || !e.comparator(r, t)) && (e.value = t, e.observers && e.observers.length && j(() => {
|
|
266
|
+
for (let s = 0; s < e.observers.length; s += 1) {
|
|
267
|
+
const i = e.observers[s], o = It && It.running;
|
|
268
|
+
o && It.disposed.has(i), (o ? !i.tState : !i.state) && (i.pure ? q.push(i) : H.push(i), i.observers && kn(i)), o || (i.state = W);
|
|
269
|
+
}
|
|
270
|
+
if (q.length > 1e6)
|
|
271
|
+
throw q = [], new Error();
|
|
272
|
+
}, !1)), t;
|
|
273
|
+
}
|
|
274
|
+
function Re(e) {
|
|
275
|
+
if (!e.fn) return;
|
|
276
|
+
Le(e);
|
|
277
|
+
const t = mt;
|
|
278
|
+
os(
|
|
279
|
+
e,
|
|
280
|
+
e.value,
|
|
281
|
+
t
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
function os(e, t, n) {
|
|
285
|
+
let r;
|
|
286
|
+
const s = C, i = R;
|
|
287
|
+
R = C = e;
|
|
288
|
+
try {
|
|
289
|
+
r = e.fn(t);
|
|
290
|
+
} catch (o) {
|
|
291
|
+
return e.pure && (e.state = W, e.owned && e.owned.forEach(Le), e.owned = null), e.updatedAt = n + 1, Kt(o);
|
|
292
|
+
} finally {
|
|
293
|
+
R = i, C = s;
|
|
294
|
+
}
|
|
295
|
+
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Nn(e, r) : e.value = r, e.updatedAt = n);
|
|
296
|
+
}
|
|
297
|
+
function yt(e, t, n, r = W, s) {
|
|
298
|
+
const i = {
|
|
299
|
+
fn: e,
|
|
300
|
+
state: r,
|
|
301
|
+
updatedAt: null,
|
|
302
|
+
owned: null,
|
|
303
|
+
sources: null,
|
|
304
|
+
sourceSlots: null,
|
|
305
|
+
cleanups: null,
|
|
306
|
+
value: t,
|
|
307
|
+
owner: C,
|
|
308
|
+
context: C ? C.context : null,
|
|
309
|
+
pure: n
|
|
310
|
+
};
|
|
311
|
+
return C === null || C !== On && (C.owned ? C.owned.push(i) : C.owned = [i]), i;
|
|
312
|
+
}
|
|
313
|
+
function lt(e) {
|
|
314
|
+
if (e.state === 0) return;
|
|
315
|
+
if (e.state === ot) return ct(e);
|
|
316
|
+
if (e.suspense && _(e.suspense.inFallback)) return e.suspense.effects.push(e);
|
|
317
|
+
const t = [e];
|
|
318
|
+
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < mt); )
|
|
319
|
+
e.state && t.push(e);
|
|
320
|
+
for (let n = t.length - 1; n >= 0; n--)
|
|
321
|
+
if (e = t[n], e.state === W)
|
|
322
|
+
Re(e);
|
|
323
|
+
else if (e.state === ot) {
|
|
324
|
+
const r = q;
|
|
325
|
+
q = null, j(() => ct(e, t[0]), !1), q = r;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
function j(e, t) {
|
|
329
|
+
if (q) return e();
|
|
330
|
+
let n = !1;
|
|
331
|
+
t || (q = []), H ? n = !0 : H = [], mt++;
|
|
332
|
+
try {
|
|
333
|
+
const r = e();
|
|
334
|
+
return ls(n), r;
|
|
335
|
+
} catch (r) {
|
|
336
|
+
n || (H = null), q = null, Kt(r);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
function ls(e) {
|
|
340
|
+
if (q && (Pn(q), q = null), e) return;
|
|
341
|
+
const t = H;
|
|
342
|
+
H = null, t.length && j(() => En(t), !1);
|
|
343
|
+
}
|
|
344
|
+
function Pn(e) {
|
|
345
|
+
for (let t = 0; t < e.length; t++) lt(e[t]);
|
|
346
|
+
}
|
|
347
|
+
function cs(e) {
|
|
348
|
+
let t, n = 0;
|
|
349
|
+
for (t = 0; t < e.length; t++) {
|
|
350
|
+
const r = e[t];
|
|
351
|
+
r.user ? e[n++] = r : lt(r);
|
|
352
|
+
}
|
|
353
|
+
if (g.context) {
|
|
354
|
+
if (g.count) {
|
|
355
|
+
g.effects || (g.effects = []), g.effects.push(...e.slice(0, n));
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
xe();
|
|
359
|
+
}
|
|
360
|
+
for (g.effects && (g.done || !g.count) && (e = [...g.effects, ...e], n += g.effects.length, delete g.effects), t = 0; t < n; t++) lt(e[t]);
|
|
361
|
+
}
|
|
362
|
+
function ct(e, t) {
|
|
363
|
+
e.state = 0;
|
|
364
|
+
for (let n = 0; n < e.sources.length; n += 1) {
|
|
365
|
+
const r = e.sources[n];
|
|
366
|
+
if (r.sources) {
|
|
367
|
+
const s = r.state;
|
|
368
|
+
s === W ? r !== t && (!r.updatedAt || r.updatedAt < mt) && lt(r) : s === ot && ct(r, t);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
function kn(e) {
|
|
373
|
+
for (let t = 0; t < e.observers.length; t += 1) {
|
|
374
|
+
const n = e.observers[t];
|
|
375
|
+
n.state || (n.state = ot, n.pure ? q.push(n) : H.push(n), n.observers && kn(n));
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
function Le(e) {
|
|
379
|
+
let t;
|
|
380
|
+
if (e.sources)
|
|
381
|
+
for (; e.sources.length; ) {
|
|
382
|
+
const n = e.sources.pop(), r = e.sourceSlots.pop(), s = n.observers;
|
|
383
|
+
if (s && s.length) {
|
|
384
|
+
const i = s.pop(), o = n.observerSlots.pop();
|
|
385
|
+
r < s.length && (i.sourceSlots[o] = r, s[r] = i, n.observerSlots[r] = o);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
if (e.tOwned) {
|
|
389
|
+
for (t = e.tOwned.length - 1; t >= 0; t--) Le(e.tOwned[t]);
|
|
390
|
+
delete e.tOwned;
|
|
391
|
+
}
|
|
392
|
+
if (e.owned) {
|
|
393
|
+
for (t = e.owned.length - 1; t >= 0; t--) Le(e.owned[t]);
|
|
394
|
+
e.owned = null;
|
|
395
|
+
}
|
|
396
|
+
if (e.cleanups) {
|
|
397
|
+
for (t = e.cleanups.length - 1; t >= 0; t--) e.cleanups[t]();
|
|
398
|
+
e.cleanups = null;
|
|
399
|
+
}
|
|
400
|
+
e.state = 0;
|
|
401
|
+
}
|
|
402
|
+
function xt(e) {
|
|
403
|
+
return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", {
|
|
404
|
+
cause: e
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
function Kt(e, t = C) {
|
|
408
|
+
throw xt(e);
|
|
409
|
+
}
|
|
410
|
+
function Nt(e) {
|
|
411
|
+
if (typeof e == "function" && !e.length) return Nt(e());
|
|
412
|
+
if (Array.isArray(e)) {
|
|
413
|
+
const t = [];
|
|
414
|
+
for (let n = 0; n < e.length; n++) {
|
|
415
|
+
const r = Nt(e[n]);
|
|
416
|
+
Array.isArray(r) ? t.push.apply(t, r) : t.push(r);
|
|
417
|
+
}
|
|
418
|
+
return t;
|
|
419
|
+
}
|
|
420
|
+
return e;
|
|
421
|
+
}
|
|
422
|
+
function as(e, t) {
|
|
423
|
+
return function(r) {
|
|
424
|
+
let s;
|
|
425
|
+
return se(
|
|
426
|
+
() => s = _(() => (C.context = {
|
|
427
|
+
...C.context,
|
|
428
|
+
[e]: r.value
|
|
429
|
+
}, Rn(() => r.children))),
|
|
430
|
+
void 0
|
|
431
|
+
), s;
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
var Pt = Symbol("fallback");
|
|
435
|
+
function at(e) {
|
|
436
|
+
for (let t = 0; t < e.length; t++) e[t]();
|
|
437
|
+
}
|
|
438
|
+
function us(e, t, n = {}) {
|
|
439
|
+
let r = [], s = [], i = [], o = 0, l = t.length > 1 ? [] : null;
|
|
440
|
+
return Me(() => at(i)), () => {
|
|
441
|
+
let c = e() || [], a = c.length, f, u;
|
|
442
|
+
return c[In], _(() => {
|
|
443
|
+
let h, p, w, N, L, A, P, U, S;
|
|
444
|
+
if (a === 0)
|
|
445
|
+
o !== 0 && (at(i), i = [], r = [], s = [], o = 0, l && (l = [])), n.fallback && (r = [Pt], s[0] = re((D) => (i[0] = D, n.fallback())), o = 1);
|
|
446
|
+
else if (o === 0) {
|
|
447
|
+
for (s = new Array(a), u = 0; u < a; u++)
|
|
448
|
+
r[u] = c[u], s[u] = re(m);
|
|
449
|
+
o = a;
|
|
450
|
+
} else {
|
|
451
|
+
for (w = new Array(a), N = new Array(a), l && (L = new Array(a)), A = 0, P = Math.min(o, a); A < P && r[A] === c[A]; A++) ;
|
|
452
|
+
for (P = o - 1, U = a - 1; P >= A && U >= A && r[P] === c[U]; P--, U--)
|
|
453
|
+
w[U] = s[P], N[U] = i[P], l && (L[U] = l[P]);
|
|
454
|
+
for (h = /* @__PURE__ */ new Map(), p = new Array(U + 1), u = U; u >= A; u--)
|
|
455
|
+
S = c[u], f = h.get(S), p[u] = f === void 0 ? -1 : f, h.set(S, u);
|
|
456
|
+
for (f = A; f <= P; f++)
|
|
457
|
+
S = r[f], u = h.get(S), u !== void 0 && u !== -1 ? (w[u] = s[f], N[u] = i[f], l && (L[u] = l[f]), u = p[u], h.set(S, u)) : i[f]();
|
|
458
|
+
for (u = A; u < a; u++)
|
|
459
|
+
u in w ? (s[u] = w[u], i[u] = N[u], l && (l[u] = L[u], l[u](u))) : s[u] = re(m);
|
|
460
|
+
s = s.slice(0, o = a), r = c.slice(0);
|
|
461
|
+
}
|
|
462
|
+
return s;
|
|
463
|
+
});
|
|
464
|
+
function m(h) {
|
|
465
|
+
if (i[u] = h, l) {
|
|
466
|
+
const [p, w] = M(u);
|
|
467
|
+
return l[u] = w, t(c[u], p);
|
|
468
|
+
}
|
|
469
|
+
return t(c[u]);
|
|
470
|
+
}
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
function fs(e, t, n = {}) {
|
|
474
|
+
let r = [], s = [], i = [], o = [], l = 0, c;
|
|
475
|
+
return Me(() => at(i)), () => {
|
|
476
|
+
const a = e() || [], f = a.length;
|
|
477
|
+
return a[In], _(() => {
|
|
478
|
+
if (f === 0)
|
|
479
|
+
return l !== 0 && (at(i), i = [], r = [], s = [], l = 0, o = []), n.fallback && (r = [Pt], s[0] = re((m) => (i[0] = m, n.fallback())), l = 1), s;
|
|
480
|
+
for (r[0] === Pt && (i[0](), i = [], r = [], s = [], l = 0), c = 0; c < f; c++)
|
|
481
|
+
c < r.length && r[c] !== a[c] ? o[c](() => a[c]) : c >= r.length && (s[c] = re(u));
|
|
482
|
+
for (; c < r.length; c++)
|
|
483
|
+
i[c]();
|
|
484
|
+
return l = o.length = i.length = f, r = a.slice(0), s = s.slice(0, l);
|
|
485
|
+
});
|
|
486
|
+
function u(m) {
|
|
487
|
+
i[c] = m;
|
|
488
|
+
const [h, p] = M(a[c]);
|
|
489
|
+
return o[c] = p, t(h, c);
|
|
490
|
+
}
|
|
491
|
+
};
|
|
492
|
+
}
|
|
493
|
+
function Mn(e, t) {
|
|
494
|
+
return _(() => e(t || {}));
|
|
495
|
+
}
|
|
496
|
+
function Ye() {
|
|
497
|
+
return !0;
|
|
498
|
+
}
|
|
499
|
+
var kt = {
|
|
500
|
+
get(e, t, n) {
|
|
501
|
+
return t === st ? n : e.get(t);
|
|
502
|
+
},
|
|
503
|
+
has(e, t) {
|
|
504
|
+
return t === st ? !0 : e.has(t);
|
|
505
|
+
},
|
|
506
|
+
set: Ye,
|
|
507
|
+
deleteProperty: Ye,
|
|
508
|
+
getOwnPropertyDescriptor(e, t) {
|
|
509
|
+
return {
|
|
510
|
+
configurable: !0,
|
|
511
|
+
enumerable: !0,
|
|
512
|
+
get() {
|
|
513
|
+
return e.get(t);
|
|
514
|
+
},
|
|
515
|
+
set: Ye,
|
|
516
|
+
deleteProperty: Ye
|
|
517
|
+
};
|
|
518
|
+
},
|
|
519
|
+
ownKeys(e) {
|
|
520
|
+
return e.keys();
|
|
521
|
+
}
|
|
522
|
+
};
|
|
523
|
+
function Et(e) {
|
|
524
|
+
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
525
|
+
}
|
|
526
|
+
function ds() {
|
|
527
|
+
for (let e = 0, t = this.length; e < t; ++e) {
|
|
528
|
+
const n = this[e]();
|
|
529
|
+
if (n !== void 0) return n;
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
function Ln(...e) {
|
|
533
|
+
let t = !1;
|
|
534
|
+
for (let o = 0; o < e.length; o++) {
|
|
535
|
+
const l = e[o];
|
|
536
|
+
t = t || !!l && st in l, e[o] = typeof l == "function" ? (t = !0, F(l)) : l;
|
|
537
|
+
}
|
|
538
|
+
if (An && t)
|
|
539
|
+
return new Proxy(
|
|
540
|
+
{
|
|
541
|
+
get(o) {
|
|
542
|
+
for (let l = e.length - 1; l >= 0; l--) {
|
|
543
|
+
const c = Et(e[l])[o];
|
|
544
|
+
if (c !== void 0) return c;
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
has(o) {
|
|
548
|
+
for (let l = e.length - 1; l >= 0; l--)
|
|
549
|
+
if (o in Et(e[l])) return !0;
|
|
550
|
+
return !1;
|
|
551
|
+
},
|
|
552
|
+
keys() {
|
|
553
|
+
const o = [];
|
|
554
|
+
for (let l = 0; l < e.length; l++)
|
|
555
|
+
o.push(...Object.keys(Et(e[l])));
|
|
556
|
+
return [...new Set(o)];
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
kt
|
|
560
|
+
);
|
|
561
|
+
const n = {}, r = /* @__PURE__ */ Object.create(null);
|
|
562
|
+
for (let o = e.length - 1; o >= 0; o--) {
|
|
563
|
+
const l = e[o];
|
|
564
|
+
if (!l) continue;
|
|
565
|
+
const c = Object.getOwnPropertyNames(l);
|
|
566
|
+
for (let a = c.length - 1; a >= 0; a--) {
|
|
567
|
+
const f = c[a];
|
|
568
|
+
if (f === "__proto__" || f === "constructor") continue;
|
|
569
|
+
const u = Object.getOwnPropertyDescriptor(l, f);
|
|
570
|
+
if (!r[f])
|
|
571
|
+
r[f] = u.get ? {
|
|
572
|
+
enumerable: !0,
|
|
573
|
+
configurable: !0,
|
|
574
|
+
get: ds.bind(n[f] = [u.get.bind(l)])
|
|
575
|
+
} : u.value !== void 0 ? u : void 0;
|
|
576
|
+
else {
|
|
577
|
+
const m = n[f];
|
|
578
|
+
m && (u.get ? m.push(u.get.bind(l)) : u.value !== void 0 && m.push(() => u.value));
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
const s = {}, i = Object.keys(r);
|
|
583
|
+
for (let o = i.length - 1; o >= 0; o--) {
|
|
584
|
+
const l = i[o], c = r[l];
|
|
585
|
+
c && c.get ? Object.defineProperty(s, l, c) : s[l] = c ? c.value : void 0;
|
|
586
|
+
}
|
|
587
|
+
return s;
|
|
588
|
+
}
|
|
589
|
+
function hs(e, ...t) {
|
|
590
|
+
if (An && st in e) {
|
|
591
|
+
const s = new Set(t.length > 1 ? t.flat() : t[0]), i = t.map((o) => new Proxy(
|
|
592
|
+
{
|
|
593
|
+
get(l) {
|
|
594
|
+
return o.includes(l) ? e[l] : void 0;
|
|
595
|
+
},
|
|
596
|
+
has(l) {
|
|
597
|
+
return o.includes(l) && l in e;
|
|
598
|
+
},
|
|
599
|
+
keys() {
|
|
600
|
+
return o.filter((l) => l in e);
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
kt
|
|
604
|
+
));
|
|
605
|
+
return i.push(
|
|
606
|
+
new Proxy(
|
|
607
|
+
{
|
|
608
|
+
get(o) {
|
|
609
|
+
return s.has(o) ? void 0 : e[o];
|
|
610
|
+
},
|
|
611
|
+
has(o) {
|
|
612
|
+
return s.has(o) ? !1 : o in e;
|
|
613
|
+
},
|
|
614
|
+
keys() {
|
|
615
|
+
return Object.keys(e).filter((o) => !s.has(o));
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
kt
|
|
619
|
+
)
|
|
620
|
+
), i;
|
|
621
|
+
}
|
|
622
|
+
const n = {}, r = t.map(() => ({}));
|
|
623
|
+
for (const s of Object.getOwnPropertyNames(e)) {
|
|
624
|
+
const i = Object.getOwnPropertyDescriptor(e, s), o = !i.get && !i.set && i.enumerable && i.writable && i.configurable;
|
|
625
|
+
let l = !1, c = 0;
|
|
626
|
+
for (const a of t)
|
|
627
|
+
a.includes(s) && (l = !0, o ? r[c][s] = i.value : Object.defineProperty(r[c], s, i)), ++c;
|
|
628
|
+
l || (o ? n[s] = i.value : Object.defineProperty(n, s, i));
|
|
629
|
+
}
|
|
630
|
+
return [...r, n];
|
|
631
|
+
}
|
|
632
|
+
function Vn(e) {
|
|
633
|
+
let t, n;
|
|
634
|
+
const r = (s) => {
|
|
635
|
+
const i = g.context;
|
|
636
|
+
if (i) {
|
|
637
|
+
const [l, c] = M();
|
|
638
|
+
g.count || (g.count = 0), g.count++, (n || (n = e())).then((a) => {
|
|
639
|
+
!g.done && xe(i), g.count--, c(() => a.default), xe();
|
|
640
|
+
}), t = l;
|
|
641
|
+
} else if (!t) {
|
|
642
|
+
const [l] = es(() => (n || (n = e())).then((c) => c.default));
|
|
643
|
+
t = l;
|
|
644
|
+
}
|
|
645
|
+
let o;
|
|
646
|
+
return F(
|
|
647
|
+
() => (o = t()) ? _(() => {
|
|
648
|
+
if (!i || g.done) return o(s);
|
|
649
|
+
const l = g.context;
|
|
650
|
+
xe(i);
|
|
651
|
+
const c = o(s);
|
|
652
|
+
return xe(l), c;
|
|
653
|
+
}) : ""
|
|
654
|
+
);
|
|
655
|
+
};
|
|
656
|
+
return r.preload = () => n || ((n = e()).then((s) => t = () => s.default), n), r;
|
|
657
|
+
}
|
|
658
|
+
var ms = 0;
|
|
659
|
+
function bo() {
|
|
660
|
+
return g.context ? g.getNextContextId() : `cl-${ms++}`;
|
|
661
|
+
}
|
|
662
|
+
var Un = (e) => `Stale read from <${e}>.`;
|
|
663
|
+
function wo(e) {
|
|
664
|
+
const t = "fallback" in e && {
|
|
665
|
+
fallback: () => e.fallback
|
|
666
|
+
};
|
|
667
|
+
return F(us(() => e.each, e.children, t || void 0));
|
|
668
|
+
}
|
|
669
|
+
function So(e) {
|
|
670
|
+
const t = "fallback" in e && {
|
|
671
|
+
fallback: () => e.fallback
|
|
672
|
+
};
|
|
673
|
+
return F(fs(() => e.each, e.children, t || void 0));
|
|
674
|
+
}
|
|
675
|
+
function Co(e) {
|
|
676
|
+
const t = e.keyed, n = F(() => e.when, void 0, void 0), r = t ? n : F(n, void 0, {
|
|
677
|
+
equals: (s, i) => !s == !i
|
|
678
|
+
});
|
|
679
|
+
return F(
|
|
680
|
+
() => {
|
|
681
|
+
const s = r();
|
|
682
|
+
if (s) {
|
|
683
|
+
const i = e.children;
|
|
684
|
+
return typeof i == "function" && i.length > 0 ? _(
|
|
685
|
+
() => i(
|
|
686
|
+
t ? s : () => {
|
|
687
|
+
if (!_(r)) throw Un("Show");
|
|
688
|
+
return n();
|
|
689
|
+
}
|
|
690
|
+
)
|
|
691
|
+
) : i;
|
|
692
|
+
}
|
|
693
|
+
return e.fallback;
|
|
694
|
+
},
|
|
695
|
+
void 0,
|
|
696
|
+
void 0
|
|
697
|
+
);
|
|
698
|
+
}
|
|
699
|
+
function Ao(e) {
|
|
700
|
+
const t = Rn(() => e.children), n = F(() => {
|
|
701
|
+
const r = t(), s = Array.isArray(r) ? r : [r];
|
|
702
|
+
let i = () => {
|
|
703
|
+
};
|
|
704
|
+
for (let o = 0; o < s.length; o++) {
|
|
705
|
+
const l = o, c = s[o], a = i, f = F(
|
|
706
|
+
() => a() ? void 0 : c.when,
|
|
707
|
+
void 0,
|
|
708
|
+
void 0
|
|
709
|
+
), u = c.keyed ? f : F(f, void 0, {
|
|
710
|
+
equals: (m, h) => !m == !h
|
|
711
|
+
});
|
|
712
|
+
i = () => a() || (u() ? [l, f, c] : void 0);
|
|
713
|
+
}
|
|
714
|
+
return i;
|
|
715
|
+
});
|
|
716
|
+
return F(
|
|
717
|
+
() => {
|
|
718
|
+
const r = n()();
|
|
719
|
+
if (!r) return e.fallback;
|
|
720
|
+
const [s, i, o] = r, l = o.children;
|
|
721
|
+
return typeof l == "function" && l.length > 0 ? _(
|
|
722
|
+
() => l(
|
|
723
|
+
o.keyed ? i() : () => {
|
|
724
|
+
var a;
|
|
725
|
+
if (((a = _(n)()) == null ? void 0 : a[0]) !== s) throw Un("Match");
|
|
726
|
+
return i();
|
|
727
|
+
}
|
|
728
|
+
)
|
|
729
|
+
) : l;
|
|
730
|
+
},
|
|
731
|
+
void 0,
|
|
732
|
+
void 0
|
|
733
|
+
);
|
|
734
|
+
}
|
|
735
|
+
function Io(e) {
|
|
736
|
+
return e;
|
|
737
|
+
}
|
|
738
|
+
var ys = [
|
|
739
|
+
"allowfullscreen",
|
|
740
|
+
"async",
|
|
741
|
+
"autofocus",
|
|
742
|
+
"autoplay",
|
|
743
|
+
"checked",
|
|
744
|
+
"controls",
|
|
745
|
+
"default",
|
|
746
|
+
"disabled",
|
|
747
|
+
"formnovalidate",
|
|
748
|
+
"hidden",
|
|
749
|
+
"indeterminate",
|
|
750
|
+
"inert",
|
|
751
|
+
"ismap",
|
|
752
|
+
"loop",
|
|
753
|
+
"multiple",
|
|
754
|
+
"muted",
|
|
755
|
+
"nomodule",
|
|
756
|
+
"novalidate",
|
|
757
|
+
"open",
|
|
758
|
+
"playsinline",
|
|
759
|
+
"readonly",
|
|
760
|
+
"required",
|
|
761
|
+
"reversed",
|
|
762
|
+
"seamless",
|
|
763
|
+
"selected"
|
|
764
|
+
], gs = /* @__PURE__ */ new Set([
|
|
765
|
+
"className",
|
|
766
|
+
"value",
|
|
767
|
+
"readOnly",
|
|
768
|
+
"formNoValidate",
|
|
769
|
+
"isMap",
|
|
770
|
+
"noModule",
|
|
771
|
+
"playsInline",
|
|
772
|
+
...ys
|
|
773
|
+
]), ps = /* @__PURE__ */ new Set([
|
|
774
|
+
"innerHTML",
|
|
775
|
+
"textContent",
|
|
776
|
+
"innerText",
|
|
777
|
+
"children"
|
|
778
|
+
]), vs = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
779
|
+
className: "class",
|
|
780
|
+
htmlFor: "for"
|
|
781
|
+
}), bs = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
782
|
+
class: "className",
|
|
783
|
+
formnovalidate: {
|
|
784
|
+
$: "formNoValidate",
|
|
785
|
+
BUTTON: 1,
|
|
786
|
+
INPUT: 1
|
|
787
|
+
},
|
|
788
|
+
ismap: {
|
|
789
|
+
$: "isMap",
|
|
790
|
+
IMG: 1
|
|
791
|
+
},
|
|
792
|
+
nomodule: {
|
|
793
|
+
$: "noModule",
|
|
794
|
+
SCRIPT: 1
|
|
795
|
+
},
|
|
796
|
+
playsinline: {
|
|
797
|
+
$: "playsInline",
|
|
798
|
+
VIDEO: 1
|
|
799
|
+
},
|
|
800
|
+
readonly: {
|
|
801
|
+
$: "readOnly",
|
|
802
|
+
INPUT: 1,
|
|
803
|
+
TEXTAREA: 1
|
|
804
|
+
}
|
|
805
|
+
});
|
|
806
|
+
function ws(e, t) {
|
|
807
|
+
const n = bs[e];
|
|
808
|
+
return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
|
|
809
|
+
}
|
|
810
|
+
var Ss = /* @__PURE__ */ new Set([
|
|
811
|
+
"beforeinput",
|
|
812
|
+
"click",
|
|
813
|
+
"dblclick",
|
|
814
|
+
"contextmenu",
|
|
815
|
+
"focusin",
|
|
816
|
+
"focusout",
|
|
817
|
+
"input",
|
|
818
|
+
"keydown",
|
|
819
|
+
"keyup",
|
|
820
|
+
"mousedown",
|
|
821
|
+
"mousemove",
|
|
822
|
+
"mouseout",
|
|
823
|
+
"mouseover",
|
|
824
|
+
"mouseup",
|
|
825
|
+
"pointerdown",
|
|
826
|
+
"pointermove",
|
|
827
|
+
"pointerout",
|
|
828
|
+
"pointerover",
|
|
829
|
+
"pointerup",
|
|
830
|
+
"touchend",
|
|
831
|
+
"touchmove",
|
|
832
|
+
"touchstart"
|
|
833
|
+
]), Cs = /* @__PURE__ */ new Set([
|
|
834
|
+
"altGlyph",
|
|
835
|
+
"altGlyphDef",
|
|
836
|
+
"altGlyphItem",
|
|
837
|
+
"animate",
|
|
838
|
+
"animateColor",
|
|
839
|
+
"animateMotion",
|
|
840
|
+
"animateTransform",
|
|
841
|
+
"circle",
|
|
842
|
+
"clipPath",
|
|
843
|
+
"color-profile",
|
|
844
|
+
"cursor",
|
|
845
|
+
"defs",
|
|
846
|
+
"desc",
|
|
847
|
+
"ellipse",
|
|
848
|
+
"feBlend",
|
|
849
|
+
"feColorMatrix",
|
|
850
|
+
"feComponentTransfer",
|
|
851
|
+
"feComposite",
|
|
852
|
+
"feConvolveMatrix",
|
|
853
|
+
"feDiffuseLighting",
|
|
854
|
+
"feDisplacementMap",
|
|
855
|
+
"feDistantLight",
|
|
856
|
+
"feDropShadow",
|
|
857
|
+
"feFlood",
|
|
858
|
+
"feFuncA",
|
|
859
|
+
"feFuncB",
|
|
860
|
+
"feFuncG",
|
|
861
|
+
"feFuncR",
|
|
862
|
+
"feGaussianBlur",
|
|
863
|
+
"feImage",
|
|
864
|
+
"feMerge",
|
|
865
|
+
"feMergeNode",
|
|
866
|
+
"feMorphology",
|
|
867
|
+
"feOffset",
|
|
868
|
+
"fePointLight",
|
|
869
|
+
"feSpecularLighting",
|
|
870
|
+
"feSpotLight",
|
|
871
|
+
"feTile",
|
|
872
|
+
"feTurbulence",
|
|
873
|
+
"filter",
|
|
874
|
+
"font",
|
|
875
|
+
"font-face",
|
|
876
|
+
"font-face-format",
|
|
877
|
+
"font-face-name",
|
|
878
|
+
"font-face-src",
|
|
879
|
+
"font-face-uri",
|
|
880
|
+
"foreignObject",
|
|
881
|
+
"g",
|
|
882
|
+
"glyph",
|
|
883
|
+
"glyphRef",
|
|
884
|
+
"hkern",
|
|
885
|
+
"image",
|
|
886
|
+
"line",
|
|
887
|
+
"linearGradient",
|
|
888
|
+
"marker",
|
|
889
|
+
"mask",
|
|
890
|
+
"metadata",
|
|
891
|
+
"missing-glyph",
|
|
892
|
+
"mpath",
|
|
893
|
+
"path",
|
|
894
|
+
"pattern",
|
|
895
|
+
"polygon",
|
|
896
|
+
"polyline",
|
|
897
|
+
"radialGradient",
|
|
898
|
+
"rect",
|
|
899
|
+
"set",
|
|
900
|
+
"stop",
|
|
901
|
+
"svg",
|
|
902
|
+
"switch",
|
|
903
|
+
"symbol",
|
|
904
|
+
"text",
|
|
905
|
+
"textPath",
|
|
906
|
+
"tref",
|
|
907
|
+
"tspan",
|
|
908
|
+
"use",
|
|
909
|
+
"view",
|
|
910
|
+
"vkern"
|
|
911
|
+
]), As = {
|
|
912
|
+
xlink: "http://www.w3.org/1999/xlink",
|
|
913
|
+
xml: "http://www.w3.org/XML/1998/namespace"
|
|
914
|
+
};
|
|
915
|
+
function Is(e, t, n) {
|
|
916
|
+
let r = n.length, s = t.length, i = r, o = 0, l = 0, c = t[s - 1].nextSibling, a = null;
|
|
917
|
+
for (; o < s || l < i; ) {
|
|
918
|
+
if (t[o] === n[l]) {
|
|
919
|
+
o++, l++;
|
|
920
|
+
continue;
|
|
921
|
+
}
|
|
922
|
+
for (; t[s - 1] === n[i - 1]; )
|
|
923
|
+
s--, i--;
|
|
924
|
+
if (s === o) {
|
|
925
|
+
const f = i < r ? l ? n[l - 1].nextSibling : n[i - l] : c;
|
|
926
|
+
for (; l < i; ) e.insertBefore(n[l++], f);
|
|
927
|
+
} else if (i === l)
|
|
928
|
+
for (; o < s; )
|
|
929
|
+
(!a || !a.has(t[o])) && t[o].remove(), o++;
|
|
930
|
+
else if (t[o] === n[i - 1] && n[l] === t[s - 1]) {
|
|
931
|
+
const f = t[--s].nextSibling;
|
|
932
|
+
e.insertBefore(n[l++], t[o++].nextSibling), e.insertBefore(n[--i], f), t[s] = n[i];
|
|
933
|
+
} else {
|
|
934
|
+
if (!a) {
|
|
935
|
+
a = /* @__PURE__ */ new Map();
|
|
936
|
+
let u = l;
|
|
937
|
+
for (; u < i; ) a.set(n[u], u++);
|
|
938
|
+
}
|
|
939
|
+
const f = a.get(t[o]);
|
|
940
|
+
if (f != null)
|
|
941
|
+
if (l < f && f < i) {
|
|
942
|
+
let u = o, m = 1, h;
|
|
943
|
+
for (; ++u < s && u < i && !((h = a.get(t[u])) == null || h !== f + m); )
|
|
944
|
+
m++;
|
|
945
|
+
if (m > f - l) {
|
|
946
|
+
const p = t[o];
|
|
947
|
+
for (; l < f; ) e.insertBefore(n[l++], p);
|
|
948
|
+
} else e.replaceChild(n[l++], t[o++]);
|
|
949
|
+
} else o++;
|
|
950
|
+
else t[o++].remove();
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
var Pe = "_$DX_DELEGATE";
|
|
955
|
+
function Fn(e, t, n, r = {}) {
|
|
956
|
+
let s;
|
|
957
|
+
return re((i) => {
|
|
958
|
+
s = i, t === document ? e() : Lt(t, e(), t.firstChild ? null : void 0, n);
|
|
959
|
+
}, r.owner), () => {
|
|
960
|
+
s(), t.textContent = "";
|
|
961
|
+
};
|
|
962
|
+
}
|
|
963
|
+
function Eo(e, t, n, r) {
|
|
964
|
+
let s;
|
|
965
|
+
const i = () => {
|
|
966
|
+
const l = document.createElement("template");
|
|
967
|
+
return l.innerHTML = e, l.content.firstChild;
|
|
968
|
+
}, o = () => (s || (s = i())).cloneNode(!0);
|
|
969
|
+
return o.cloneNode = o, o;
|
|
970
|
+
}
|
|
971
|
+
function Es(e, t = window.document) {
|
|
972
|
+
const n = t[Pe] || (t[Pe] = /* @__PURE__ */ new Set());
|
|
973
|
+
for (let r = 0, s = e.length; r < s; r++) {
|
|
974
|
+
const i = e[r];
|
|
975
|
+
n.has(i) || (n.add(i), t.addEventListener(i, _n));
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
function Oo(e = window.document) {
|
|
979
|
+
if (e[Pe]) {
|
|
980
|
+
for (let t of e[Pe].keys()) e.removeEventListener(t, _n);
|
|
981
|
+
delete e[Pe];
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
function Mt(e, t, n) {
|
|
985
|
+
ie(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
986
|
+
}
|
|
987
|
+
function Os(e, t, n, r) {
|
|
988
|
+
ie(e) || (r == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, r));
|
|
989
|
+
}
|
|
990
|
+
function Ts(e, t, n) {
|
|
991
|
+
ie(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
|
|
992
|
+
}
|
|
993
|
+
function Rs(e, t) {
|
|
994
|
+
ie(e) || (t == null ? e.removeAttribute("class") : e.className = t);
|
|
995
|
+
}
|
|
996
|
+
function xs(e, t, n, r) {
|
|
997
|
+
if (r)
|
|
998
|
+
Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
|
|
999
|
+
else if (Array.isArray(n)) {
|
|
1000
|
+
const s = n[0];
|
|
1001
|
+
e.addEventListener(t, n[0] = (i) => s.call(e, n[1], i));
|
|
1002
|
+
} else e.addEventListener(t, n, typeof n != "function" && n);
|
|
1003
|
+
}
|
|
1004
|
+
function Ns(e, t, n = {}) {
|
|
1005
|
+
const r = Object.keys(t || {}), s = Object.keys(n);
|
|
1006
|
+
let i, o;
|
|
1007
|
+
for (i = 0, o = s.length; i < o; i++) {
|
|
1008
|
+
const l = s[i];
|
|
1009
|
+
!l || l === "undefined" || t[l] || (Jt(e, l, !1), delete n[l]);
|
|
1010
|
+
}
|
|
1011
|
+
for (i = 0, o = r.length; i < o; i++) {
|
|
1012
|
+
const l = r[i], c = !!t[l];
|
|
1013
|
+
!l || l === "undefined" || n[l] === c || !c || (Jt(e, l, !0), n[l] = c);
|
|
1014
|
+
}
|
|
1015
|
+
return n;
|
|
1016
|
+
}
|
|
1017
|
+
function Ps(e, t, n) {
|
|
1018
|
+
if (!t) return n ? Mt(e, "style") : t;
|
|
1019
|
+
const r = e.style;
|
|
1020
|
+
if (typeof t == "string") return r.cssText = t;
|
|
1021
|
+
typeof n == "string" && (r.cssText = n = void 0), n || (n = {}), t || (t = {});
|
|
1022
|
+
let s, i;
|
|
1023
|
+
for (i in n)
|
|
1024
|
+
t[i] == null && r.removeProperty(i), delete n[i];
|
|
1025
|
+
for (i in t)
|
|
1026
|
+
s = t[i], s !== n[i] && (r.setProperty(i, s), n[i] = s);
|
|
1027
|
+
return n;
|
|
1028
|
+
}
|
|
1029
|
+
function ks(e, t = {}, n, r) {
|
|
1030
|
+
const s = {};
|
|
1031
|
+
return r || se(
|
|
1032
|
+
() => s.children = Ve(e, t.children, s.children)
|
|
1033
|
+
), se(() => typeof t.ref == "function" && Ms(t.ref, e)), se(() => Ls(e, t, n, !0, s, !0)), s;
|
|
1034
|
+
}
|
|
1035
|
+
function Ms(e, t, n) {
|
|
1036
|
+
return _(() => e(t, n));
|
|
1037
|
+
}
|
|
1038
|
+
function Lt(e, t, n, r) {
|
|
1039
|
+
if (n !== void 0 && !r && (r = []), typeof t != "function") return Ve(e, t, r, n);
|
|
1040
|
+
se((s) => Ve(e, t(), s, n), r);
|
|
1041
|
+
}
|
|
1042
|
+
function Ls(e, t, n, r, s = {}, i = !1) {
|
|
1043
|
+
t || (t = {});
|
|
1044
|
+
for (const o in s)
|
|
1045
|
+
if (!(o in t)) {
|
|
1046
|
+
if (o === "children") continue;
|
|
1047
|
+
s[o] = en(e, o, null, s[o], n, i, t);
|
|
1048
|
+
}
|
|
1049
|
+
for (const o in t) {
|
|
1050
|
+
if (o === "children")
|
|
1051
|
+
continue;
|
|
1052
|
+
const l = t[o];
|
|
1053
|
+
s[o] = en(e, o, l, s[o], n, i, t);
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
function Vs(e) {
|
|
1057
|
+
let t, n;
|
|
1058
|
+
return !ie() || !(t = g.registry.get(n = Fs())) ? e() : (g.completed && g.completed.add(t), g.registry.delete(n), t);
|
|
1059
|
+
}
|
|
1060
|
+
function ie(e) {
|
|
1061
|
+
return !!g.context && !g.done && (!e || e.isConnected);
|
|
1062
|
+
}
|
|
1063
|
+
function Us(e) {
|
|
1064
|
+
return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
|
|
1065
|
+
}
|
|
1066
|
+
function Jt(e, t, n) {
|
|
1067
|
+
const r = t.trim().split(/\s+/);
|
|
1068
|
+
for (let s = 0, i = r.length; s < i; s++)
|
|
1069
|
+
e.classList.toggle(r[s], n);
|
|
1070
|
+
}
|
|
1071
|
+
function en(e, t, n, r, s, i, o) {
|
|
1072
|
+
let l, c, a, f, u;
|
|
1073
|
+
if (t === "style") return Ps(e, n, r);
|
|
1074
|
+
if (t === "classList") return Ns(e, n, r);
|
|
1075
|
+
if (n === r) return r;
|
|
1076
|
+
if (t === "ref")
|
|
1077
|
+
i || n(e);
|
|
1078
|
+
else if (t.slice(0, 3) === "on:") {
|
|
1079
|
+
const m = t.slice(3);
|
|
1080
|
+
r && e.removeEventListener(m, r, typeof r != "function" && r), n && e.addEventListener(m, n, typeof n != "function" && n);
|
|
1081
|
+
} else if (t.slice(0, 10) === "oncapture:") {
|
|
1082
|
+
const m = t.slice(10);
|
|
1083
|
+
r && e.removeEventListener(m, r, !0), n && e.addEventListener(m, n, !0);
|
|
1084
|
+
} else if (t.slice(0, 2) === "on") {
|
|
1085
|
+
const m = t.slice(2).toLowerCase(), h = Ss.has(m);
|
|
1086
|
+
if (!h && r) {
|
|
1087
|
+
const p = Array.isArray(r) ? r[0] : r;
|
|
1088
|
+
e.removeEventListener(m, p);
|
|
1089
|
+
}
|
|
1090
|
+
(h || n) && (xs(e, m, n, h), h && Es([m]));
|
|
1091
|
+
} else if (t.slice(0, 5) === "attr:")
|
|
1092
|
+
Mt(e, t.slice(5), n);
|
|
1093
|
+
else if (t.slice(0, 5) === "bool:")
|
|
1094
|
+
Ts(e, t.slice(5), n);
|
|
1095
|
+
else if ((u = t.slice(0, 5) === "prop:") || (a = ps.has(t)) || !s && ((f = ws(t, e.tagName)) || (c = gs.has(t))) || (l = e.nodeName.includes("-") || "is" in o)) {
|
|
1096
|
+
if (u)
|
|
1097
|
+
t = t.slice(5), c = !0;
|
|
1098
|
+
else if (ie(e)) return n;
|
|
1099
|
+
t === "class" || t === "className" ? Rs(e, n) : l && !c && !a ? e[Us(t)] = n : e[f || t] = n;
|
|
1100
|
+
} else {
|
|
1101
|
+
const m = s && t.indexOf(":") > -1 && As[t.split(":")[0]];
|
|
1102
|
+
m ? Os(e, m, t, n) : Mt(e, vs[t] || t, n);
|
|
1103
|
+
}
|
|
1104
|
+
return n;
|
|
1105
|
+
}
|
|
1106
|
+
function _n(e) {
|
|
1107
|
+
if (g.registry && g.events && g.events.find(([c, a]) => a === e))
|
|
1108
|
+
return;
|
|
1109
|
+
let t = e.target;
|
|
1110
|
+
const n = `$$${e.type}`, r = e.target, s = e.currentTarget, i = (c) => Object.defineProperty(e, "target", {
|
|
1111
|
+
configurable: !0,
|
|
1112
|
+
value: c
|
|
1113
|
+
}), o = () => {
|
|
1114
|
+
const c = t[n];
|
|
1115
|
+
if (c && !t.disabled) {
|
|
1116
|
+
const a = t[`${n}Data`];
|
|
1117
|
+
if (a !== void 0 ? c.call(t, a, e) : c.call(t, e), e.cancelBubble) return;
|
|
1118
|
+
}
|
|
1119
|
+
return t.host && typeof t.host != "string" && !t.host._$host && t.contains(e.target) && i(t.host), !0;
|
|
1120
|
+
}, l = () => {
|
|
1121
|
+
for (; o() && (t = t._$host || t.parentNode || t.host); ) ;
|
|
1122
|
+
};
|
|
1123
|
+
if (Object.defineProperty(e, "currentTarget", {
|
|
1124
|
+
configurable: !0,
|
|
1125
|
+
get() {
|
|
1126
|
+
return t || document;
|
|
1127
|
+
}
|
|
1128
|
+
}), g.registry && !g.done && (g.done = _$HY.done = !0), e.composedPath) {
|
|
1129
|
+
const c = e.composedPath();
|
|
1130
|
+
i(c[0]);
|
|
1131
|
+
for (let a = 0; a < c.length - 2 && (t = c[a], !!o()); a++) {
|
|
1132
|
+
if (t._$host) {
|
|
1133
|
+
t = t._$host, l();
|
|
1134
|
+
break;
|
|
1135
|
+
}
|
|
1136
|
+
if (t.parentNode === s)
|
|
1137
|
+
break;
|
|
1138
|
+
}
|
|
1139
|
+
} else l();
|
|
1140
|
+
i(r);
|
|
1141
|
+
}
|
|
1142
|
+
function Ve(e, t, n, r, s) {
|
|
1143
|
+
const i = ie(e);
|
|
1144
|
+
if (i) {
|
|
1145
|
+
!n && (n = [...e.childNodes]);
|
|
1146
|
+
let c = [];
|
|
1147
|
+
for (let a = 0; a < n.length; a++) {
|
|
1148
|
+
const f = n[a];
|
|
1149
|
+
f.nodeType === 8 && f.data.slice(0, 2) === "!$" ? f.remove() : c.push(f);
|
|
1150
|
+
}
|
|
1151
|
+
n = c;
|
|
1152
|
+
}
|
|
1153
|
+
for (; typeof n == "function"; ) n = n();
|
|
1154
|
+
if (t === n) return n;
|
|
1155
|
+
const o = typeof t, l = r !== void 0;
|
|
1156
|
+
if (e = l && n[0] && n[0].parentNode || e, o === "string" || o === "number") {
|
|
1157
|
+
if (i || o === "number" && (t = t.toString(), t === n))
|
|
1158
|
+
return n;
|
|
1159
|
+
if (l) {
|
|
1160
|
+
let c = n[0];
|
|
1161
|
+
c && c.nodeType === 3 ? c.data !== t && (c.data = t) : c = document.createTextNode(t), n = le(e, n, r, c);
|
|
1162
|
+
} else
|
|
1163
|
+
n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
|
|
1164
|
+
} else if (t == null || o === "boolean") {
|
|
1165
|
+
if (i) return n;
|
|
1166
|
+
n = le(e, n, r);
|
|
1167
|
+
} else {
|
|
1168
|
+
if (o === "function")
|
|
1169
|
+
return se(() => {
|
|
1170
|
+
let c = t();
|
|
1171
|
+
for (; typeof c == "function"; ) c = c();
|
|
1172
|
+
n = Ve(e, c, n, r);
|
|
1173
|
+
}), () => n;
|
|
1174
|
+
if (Array.isArray(t)) {
|
|
1175
|
+
const c = [], a = n && Array.isArray(n);
|
|
1176
|
+
if (Vt(c, t, n, s))
|
|
1177
|
+
return se(() => n = Ve(e, c, n, r, !0)), () => n;
|
|
1178
|
+
if (i) {
|
|
1179
|
+
if (!c.length) return n;
|
|
1180
|
+
if (r === void 0) return n = [...e.childNodes];
|
|
1181
|
+
let f = c[0];
|
|
1182
|
+
if (f.parentNode !== e) return n;
|
|
1183
|
+
const u = [f];
|
|
1184
|
+
for (; (f = f.nextSibling) !== r; ) u.push(f);
|
|
1185
|
+
return n = u;
|
|
1186
|
+
}
|
|
1187
|
+
if (c.length === 0) {
|
|
1188
|
+
if (n = le(e, n, r), l) return n;
|
|
1189
|
+
} else a ? n.length === 0 ? tn(e, c, r) : Is(e, n, c) : (n && le(e), tn(e, c));
|
|
1190
|
+
n = c;
|
|
1191
|
+
} else if (t.nodeType) {
|
|
1192
|
+
if (i && t.parentNode) return n = l ? [t] : t;
|
|
1193
|
+
if (Array.isArray(n)) {
|
|
1194
|
+
if (l) return n = le(e, n, r, t);
|
|
1195
|
+
le(e, n, null, t);
|
|
1196
|
+
} else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
|
|
1197
|
+
n = t;
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
return n;
|
|
1201
|
+
}
|
|
1202
|
+
function Vt(e, t, n, r) {
|
|
1203
|
+
let s = !1;
|
|
1204
|
+
for (let i = 0, o = t.length; i < o; i++) {
|
|
1205
|
+
let l = t[i], c = n && n[e.length], a;
|
|
1206
|
+
if (!(l == null || l === !0 || l === !1)) if ((a = typeof l) == "object" && l.nodeType)
|
|
1207
|
+
e.push(l);
|
|
1208
|
+
else if (Array.isArray(l))
|
|
1209
|
+
s = Vt(e, l, c) || s;
|
|
1210
|
+
else if (a === "function")
|
|
1211
|
+
if (r) {
|
|
1212
|
+
for (; typeof l == "function"; ) l = l();
|
|
1213
|
+
s = Vt(
|
|
1214
|
+
e,
|
|
1215
|
+
Array.isArray(l) ? l : [l],
|
|
1216
|
+
Array.isArray(c) ? c : [c]
|
|
1217
|
+
) || s;
|
|
1218
|
+
} else
|
|
1219
|
+
e.push(l), s = !0;
|
|
1220
|
+
else {
|
|
1221
|
+
const f = String(l);
|
|
1222
|
+
c && c.nodeType === 3 && c.data === f ? e.push(c) : e.push(document.createTextNode(f));
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
return s;
|
|
1226
|
+
}
|
|
1227
|
+
function tn(e, t, n = null) {
|
|
1228
|
+
for (let r = 0, s = t.length; r < s; r++) e.insertBefore(t[r], n);
|
|
1229
|
+
}
|
|
1230
|
+
function le(e, t, n, r) {
|
|
1231
|
+
if (n === void 0) return e.textContent = "";
|
|
1232
|
+
const s = r || document.createTextNode("");
|
|
1233
|
+
if (t.length) {
|
|
1234
|
+
let i = !1;
|
|
1235
|
+
for (let o = t.length - 1; o >= 0; o--) {
|
|
1236
|
+
const l = t[o];
|
|
1237
|
+
if (s !== l) {
|
|
1238
|
+
const c = l.parentNode === e;
|
|
1239
|
+
!i && !o ? c ? e.replaceChild(s, l) : e.insertBefore(s, n) : c && l.remove();
|
|
1240
|
+
} else i = !0;
|
|
1241
|
+
}
|
|
1242
|
+
} else e.insertBefore(s, n);
|
|
1243
|
+
return [s];
|
|
1244
|
+
}
|
|
1245
|
+
function Fs() {
|
|
1246
|
+
return g.getNextContextId();
|
|
1247
|
+
}
|
|
1248
|
+
var _s = "http://www.w3.org/2000/svg";
|
|
1249
|
+
function Bn(e, t = !1) {
|
|
1250
|
+
return t ? document.createElementNS(_s, e) : document.createElement(e);
|
|
1251
|
+
}
|
|
1252
|
+
function To(e) {
|
|
1253
|
+
const { useShadow: t } = e, n = document.createTextNode(""), r = () => e.mount || document.body, s = zt();
|
|
1254
|
+
let i, o = !!g.context;
|
|
1255
|
+
return Tn(
|
|
1256
|
+
() => {
|
|
1257
|
+
o && (zt().user = o = !1), i || (i = ns(s, () => F(() => e.children)));
|
|
1258
|
+
const l = r();
|
|
1259
|
+
if (l instanceof HTMLHeadElement) {
|
|
1260
|
+
const [c, a] = M(!1), f = () => a(!0);
|
|
1261
|
+
re((u) => Lt(l, () => c() ? u() : i(), null)), Me(f);
|
|
1262
|
+
} else {
|
|
1263
|
+
const c = Bn(e.isSVG ? "g" : "div", e.isSVG), a = t && c.attachShadow ? c.attachShadow({
|
|
1264
|
+
mode: "open"
|
|
1265
|
+
}) : c;
|
|
1266
|
+
Object.defineProperty(c, "_$host", {
|
|
1267
|
+
get() {
|
|
1268
|
+
return n.parentNode;
|
|
1269
|
+
},
|
|
1270
|
+
configurable: !0
|
|
1271
|
+
}), Lt(a, i), l.appendChild(c), e.ref && e.ref(c), Me(() => l.removeChild(c));
|
|
1272
|
+
}
|
|
1273
|
+
},
|
|
1274
|
+
void 0,
|
|
1275
|
+
{
|
|
1276
|
+
render: !o
|
|
1277
|
+
}
|
|
1278
|
+
), n;
|
|
1279
|
+
}
|
|
1280
|
+
function Bs(e, t) {
|
|
1281
|
+
const n = F(e);
|
|
1282
|
+
return F(() => {
|
|
1283
|
+
const r = n();
|
|
1284
|
+
switch (typeof r) {
|
|
1285
|
+
case "function":
|
|
1286
|
+
return _(() => r(t));
|
|
1287
|
+
case "string":
|
|
1288
|
+
const s = Cs.has(r), i = g.context ? Vs() : Bn(r, s);
|
|
1289
|
+
return ks(i, t, s), i;
|
|
1290
|
+
}
|
|
1291
|
+
});
|
|
1292
|
+
}
|
|
1293
|
+
function Ro(e) {
|
|
1294
|
+
const [, t] = hs(e, ["component"]);
|
|
1295
|
+
return Bs(() => e.component, t);
|
|
1296
|
+
}
|
|
1297
|
+
var qs = class {
|
|
1298
|
+
constructor() {
|
|
1299
|
+
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
1300
|
+
}
|
|
1301
|
+
set(e, t) {
|
|
1302
|
+
this.keyToValue.set(e, t), this.valueToKey.set(t, e);
|
|
1303
|
+
}
|
|
1304
|
+
getByKey(e) {
|
|
1305
|
+
return this.keyToValue.get(e);
|
|
1306
|
+
}
|
|
1307
|
+
getByValue(e) {
|
|
1308
|
+
return this.valueToKey.get(e);
|
|
1309
|
+
}
|
|
1310
|
+
clear() {
|
|
1311
|
+
this.keyToValue.clear(), this.valueToKey.clear();
|
|
1312
|
+
}
|
|
1313
|
+
}, qn = class {
|
|
1314
|
+
constructor(e) {
|
|
1315
|
+
this.generateIdentifier = e, this.kv = new qs();
|
|
1316
|
+
}
|
|
1317
|
+
register(e, t) {
|
|
1318
|
+
this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
|
|
1319
|
+
}
|
|
1320
|
+
clear() {
|
|
1321
|
+
this.kv.clear();
|
|
1322
|
+
}
|
|
1323
|
+
getIdentifier(e) {
|
|
1324
|
+
return this.kv.getByValue(e);
|
|
1325
|
+
}
|
|
1326
|
+
getValue(e) {
|
|
1327
|
+
return this.kv.getByKey(e);
|
|
1328
|
+
}
|
|
1329
|
+
}, $s = class extends qn {
|
|
1330
|
+
constructor() {
|
|
1331
|
+
super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
|
|
1332
|
+
}
|
|
1333
|
+
register(e, t) {
|
|
1334
|
+
typeof t == "object" ? (t.allowProps && this.classToAllowedProps.set(e, t.allowProps), super.register(e, t.identifier)) : super.register(e, t);
|
|
1335
|
+
}
|
|
1336
|
+
getAllowedProps(e) {
|
|
1337
|
+
return this.classToAllowedProps.get(e);
|
|
1338
|
+
}
|
|
1339
|
+
};
|
|
1340
|
+
function Ds(e) {
|
|
1341
|
+
if ("values" in Object)
|
|
1342
|
+
return Object.values(e);
|
|
1343
|
+
const t = [];
|
|
1344
|
+
for (const n in e)
|
|
1345
|
+
e.hasOwnProperty(n) && t.push(e[n]);
|
|
1346
|
+
return t;
|
|
1347
|
+
}
|
|
1348
|
+
function Gs(e, t) {
|
|
1349
|
+
const n = Ds(e);
|
|
1350
|
+
if ("find" in n)
|
|
1351
|
+
return n.find(t);
|
|
1352
|
+
const r = n;
|
|
1353
|
+
for (let s = 0; s < r.length; s++) {
|
|
1354
|
+
const i = r[s];
|
|
1355
|
+
if (t(i))
|
|
1356
|
+
return i;
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
function Te(e, t) {
|
|
1360
|
+
Object.entries(e).forEach(([n, r]) => t(r, n));
|
|
1361
|
+
}
|
|
1362
|
+
function rt(e, t) {
|
|
1363
|
+
return e.indexOf(t) !== -1;
|
|
1364
|
+
}
|
|
1365
|
+
function nn(e, t) {
|
|
1366
|
+
for (let n = 0; n < e.length; n++) {
|
|
1367
|
+
const r = e[n];
|
|
1368
|
+
if (t(r))
|
|
1369
|
+
return r;
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
var Ks = class {
|
|
1373
|
+
constructor() {
|
|
1374
|
+
this.transfomers = {};
|
|
1375
|
+
}
|
|
1376
|
+
register(e) {
|
|
1377
|
+
this.transfomers[e.name] = e;
|
|
1378
|
+
}
|
|
1379
|
+
findApplicable(e) {
|
|
1380
|
+
return Gs(this.transfomers, (t) => t.isApplicable(e));
|
|
1381
|
+
}
|
|
1382
|
+
findByName(e) {
|
|
1383
|
+
return this.transfomers[e];
|
|
1384
|
+
}
|
|
1385
|
+
}, js = (e) => Object.prototype.toString.call(e).slice(8, -1), $n = (e) => typeof e > "u", Qs = (e) => e === null, Ue = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Ut = (e) => Ue(e) && Object.keys(e).length === 0, Y = (e) => Array.isArray(e), Hs = (e) => typeof e == "string", Ws = (e) => typeof e == "number" && !isNaN(e), Xs = (e) => typeof e == "boolean", Ys = (e) => e instanceof RegExp, Fe = (e) => e instanceof Map, _e = (e) => e instanceof Set, Dn = (e) => js(e) === "Symbol", Zs = (e) => e instanceof Date && !isNaN(e.valueOf()), zs = (e) => e instanceof Error, rn = (e) => typeof e == "number" && isNaN(e), Js = (e) => Xs(e) || Qs(e) || $n(e) || Ws(e) || Hs(e) || Dn(e), ei = (e) => typeof e == "bigint", ti = (e) => e === 1 / 0 || e === -1 / 0, ni = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), ri = (e) => e instanceof URL, Gn = (e) => e.replace(/\./g, "\\."), Ot = (e) => e.map(String).map(Gn).join("."), ke = (e) => {
|
|
1386
|
+
const t = [];
|
|
1387
|
+
let n = "";
|
|
1388
|
+
for (let s = 0; s < e.length; s++) {
|
|
1389
|
+
let i = e.charAt(s);
|
|
1390
|
+
if (i === "\\" && e.charAt(s + 1) === ".") {
|
|
1391
|
+
n += ".", s++;
|
|
1392
|
+
continue;
|
|
1393
|
+
}
|
|
1394
|
+
if (i === ".") {
|
|
1395
|
+
t.push(n), n = "";
|
|
1396
|
+
continue;
|
|
1397
|
+
}
|
|
1398
|
+
n += i;
|
|
1399
|
+
}
|
|
1400
|
+
const r = n;
|
|
1401
|
+
return t.push(r), t;
|
|
1402
|
+
};
|
|
1403
|
+
function G(e, t, n, r) {
|
|
1404
|
+
return {
|
|
1405
|
+
isApplicable: e,
|
|
1406
|
+
annotation: t,
|
|
1407
|
+
transform: n,
|
|
1408
|
+
untransform: r
|
|
1409
|
+
};
|
|
1410
|
+
}
|
|
1411
|
+
var Kn = [
|
|
1412
|
+
G($n, "undefined", () => null, () => {
|
|
1413
|
+
}),
|
|
1414
|
+
G(ei, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
|
|
1415
|
+
G(Zs, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
1416
|
+
G(zs, "Error", (e, t) => {
|
|
1417
|
+
const n = {
|
|
1418
|
+
name: e.name,
|
|
1419
|
+
message: e.message
|
|
1420
|
+
};
|
|
1421
|
+
return t.allowedErrorProps.forEach((r) => {
|
|
1422
|
+
n[r] = e[r];
|
|
1423
|
+
}), n;
|
|
1424
|
+
}, (e, t) => {
|
|
1425
|
+
const n = new Error(e.message);
|
|
1426
|
+
return n.name = e.name, n.stack = e.stack, t.allowedErrorProps.forEach((r) => {
|
|
1427
|
+
n[r] = e[r];
|
|
1428
|
+
}), n;
|
|
1429
|
+
}),
|
|
1430
|
+
G(Ys, "regexp", (e) => "" + e, (e) => {
|
|
1431
|
+
const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
|
|
1432
|
+
return new RegExp(t, n);
|
|
1433
|
+
}),
|
|
1434
|
+
G(
|
|
1435
|
+
_e,
|
|
1436
|
+
"set",
|
|
1437
|
+
// (sets only exist in es6+)
|
|
1438
|
+
// eslint-disable-next-line es5/no-es6-methods
|
|
1439
|
+
(e) => [...e.values()],
|
|
1440
|
+
(e) => new Set(e)
|
|
1441
|
+
),
|
|
1442
|
+
G(Fe, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
1443
|
+
G((e) => rn(e) || ti(e), "number", (e) => rn(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
1444
|
+
G((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
1445
|
+
G(ri, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
1446
|
+
];
|
|
1447
|
+
function gt(e, t, n, r) {
|
|
1448
|
+
return {
|
|
1449
|
+
isApplicable: e,
|
|
1450
|
+
annotation: t,
|
|
1451
|
+
transform: n,
|
|
1452
|
+
untransform: r
|
|
1453
|
+
};
|
|
1454
|
+
}
|
|
1455
|
+
var jn = gt((e, t) => Dn(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
|
|
1456
|
+
const r = n.symbolRegistry.getValue(t[1]);
|
|
1457
|
+
if (!r)
|
|
1458
|
+
throw new Error("Trying to deserialize unknown symbol");
|
|
1459
|
+
return r;
|
|
1460
|
+
}), si = [
|
|
1461
|
+
Int8Array,
|
|
1462
|
+
Uint8Array,
|
|
1463
|
+
Int16Array,
|
|
1464
|
+
Uint16Array,
|
|
1465
|
+
Int32Array,
|
|
1466
|
+
Uint32Array,
|
|
1467
|
+
Float32Array,
|
|
1468
|
+
Float64Array,
|
|
1469
|
+
Uint8ClampedArray
|
|
1470
|
+
].reduce((e, t) => (e[t.name] = t, e), {}), Qn = gt(ni, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
|
|
1471
|
+
const n = si[t[1]];
|
|
1472
|
+
if (!n)
|
|
1473
|
+
throw new Error("Trying to deserialize unknown typed array");
|
|
1474
|
+
return new n(e);
|
|
1475
|
+
});
|
|
1476
|
+
function Hn(e, t) {
|
|
1477
|
+
return e != null && e.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
|
|
1478
|
+
}
|
|
1479
|
+
var Wn = gt(Hn, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
|
|
1480
|
+
const n = t.classRegistry.getAllowedProps(e.constructor);
|
|
1481
|
+
if (!n)
|
|
1482
|
+
return { ...e };
|
|
1483
|
+
const r = {};
|
|
1484
|
+
return n.forEach((s) => {
|
|
1485
|
+
r[s] = e[s];
|
|
1486
|
+
}), r;
|
|
1487
|
+
}, (e, t, n) => {
|
|
1488
|
+
const r = n.classRegistry.getValue(t[1]);
|
|
1489
|
+
if (!r)
|
|
1490
|
+
throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");
|
|
1491
|
+
return Object.assign(Object.create(r.prototype), e);
|
|
1492
|
+
}), Xn = gt((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, n) => {
|
|
1493
|
+
const r = n.customTransformerRegistry.findByName(t[1]);
|
|
1494
|
+
if (!r)
|
|
1495
|
+
throw new Error("Trying to deserialize unknown custom value");
|
|
1496
|
+
return r.deserialize(e);
|
|
1497
|
+
}), ii = [Wn, jn, Xn, Qn], sn = (e, t) => {
|
|
1498
|
+
const n = nn(ii, (s) => s.isApplicable(e, t));
|
|
1499
|
+
if (n)
|
|
1500
|
+
return {
|
|
1501
|
+
value: n.transform(e, t),
|
|
1502
|
+
type: n.annotation(e, t)
|
|
1503
|
+
};
|
|
1504
|
+
const r = nn(Kn, (s) => s.isApplicable(e, t));
|
|
1505
|
+
if (r)
|
|
1506
|
+
return {
|
|
1507
|
+
value: r.transform(e, t),
|
|
1508
|
+
type: r.annotation
|
|
1509
|
+
};
|
|
1510
|
+
}, Yn = {};
|
|
1511
|
+
Kn.forEach((e) => {
|
|
1512
|
+
Yn[e.annotation] = e;
|
|
1513
|
+
});
|
|
1514
|
+
var oi = (e, t, n) => {
|
|
1515
|
+
if (Y(t))
|
|
1516
|
+
switch (t[0]) {
|
|
1517
|
+
case "symbol":
|
|
1518
|
+
return jn.untransform(e, t, n);
|
|
1519
|
+
case "class":
|
|
1520
|
+
return Wn.untransform(e, t, n);
|
|
1521
|
+
case "custom":
|
|
1522
|
+
return Xn.untransform(e, t, n);
|
|
1523
|
+
case "typed-array":
|
|
1524
|
+
return Qn.untransform(e, t, n);
|
|
1525
|
+
default:
|
|
1526
|
+
throw new Error("Unknown transformation: " + t);
|
|
1527
|
+
}
|
|
1528
|
+
else {
|
|
1529
|
+
const r = Yn[t];
|
|
1530
|
+
if (!r)
|
|
1531
|
+
throw new Error("Unknown transformation: " + t);
|
|
1532
|
+
return r.untransform(e, n);
|
|
1533
|
+
}
|
|
1534
|
+
}, ae = (e, t) => {
|
|
1535
|
+
const n = e.keys();
|
|
1536
|
+
for (; t > 0; )
|
|
1537
|
+
n.next(), t--;
|
|
1538
|
+
return n.next().value;
|
|
1539
|
+
};
|
|
1540
|
+
function Zn(e) {
|
|
1541
|
+
if (rt(e, "__proto__"))
|
|
1542
|
+
throw new Error("__proto__ is not allowed as a property");
|
|
1543
|
+
if (rt(e, "prototype"))
|
|
1544
|
+
throw new Error("prototype is not allowed as a property");
|
|
1545
|
+
if (rt(e, "constructor"))
|
|
1546
|
+
throw new Error("constructor is not allowed as a property");
|
|
1547
|
+
}
|
|
1548
|
+
var li = (e, t) => {
|
|
1549
|
+
Zn(t);
|
|
1550
|
+
for (let n = 0; n < t.length; n++) {
|
|
1551
|
+
const r = t[n];
|
|
1552
|
+
if (_e(e))
|
|
1553
|
+
e = ae(e, +r);
|
|
1554
|
+
else if (Fe(e)) {
|
|
1555
|
+
const s = +r, i = +t[++n] == 0 ? "key" : "value", o = ae(e, s);
|
|
1556
|
+
switch (i) {
|
|
1557
|
+
case "key":
|
|
1558
|
+
e = o;
|
|
1559
|
+
break;
|
|
1560
|
+
case "value":
|
|
1561
|
+
e = e.get(o);
|
|
1562
|
+
break;
|
|
1563
|
+
}
|
|
1564
|
+
} else
|
|
1565
|
+
e = e[r];
|
|
1566
|
+
}
|
|
1567
|
+
return e;
|
|
1568
|
+
}, Ft = (e, t, n) => {
|
|
1569
|
+
if (Zn(t), t.length === 0)
|
|
1570
|
+
return n(e);
|
|
1571
|
+
let r = e;
|
|
1572
|
+
for (let i = 0; i < t.length - 1; i++) {
|
|
1573
|
+
const o = t[i];
|
|
1574
|
+
if (Y(r)) {
|
|
1575
|
+
const l = +o;
|
|
1576
|
+
r = r[l];
|
|
1577
|
+
} else if (Ue(r))
|
|
1578
|
+
r = r[o];
|
|
1579
|
+
else if (_e(r)) {
|
|
1580
|
+
const l = +o;
|
|
1581
|
+
r = ae(r, l);
|
|
1582
|
+
} else if (Fe(r)) {
|
|
1583
|
+
if (i === t.length - 2)
|
|
1584
|
+
break;
|
|
1585
|
+
const c = +o, a = +t[++i] == 0 ? "key" : "value", f = ae(r, c);
|
|
1586
|
+
switch (a) {
|
|
1587
|
+
case "key":
|
|
1588
|
+
r = f;
|
|
1589
|
+
break;
|
|
1590
|
+
case "value":
|
|
1591
|
+
r = r.get(f);
|
|
1592
|
+
break;
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
const s = t[t.length - 1];
|
|
1597
|
+
if (Y(r) ? r[+s] = n(r[+s]) : Ue(r) && (r[s] = n(r[s])), _e(r)) {
|
|
1598
|
+
const i = ae(r, +s), o = n(i);
|
|
1599
|
+
i !== o && (r.delete(i), r.add(o));
|
|
1600
|
+
}
|
|
1601
|
+
if (Fe(r)) {
|
|
1602
|
+
const i = +t[t.length - 2], o = ae(r, i);
|
|
1603
|
+
switch (+s == 0 ? "key" : "value") {
|
|
1604
|
+
case "key": {
|
|
1605
|
+
const c = n(o);
|
|
1606
|
+
r.set(c, r.get(o)), c !== o && r.delete(o);
|
|
1607
|
+
break;
|
|
1608
|
+
}
|
|
1609
|
+
case "value": {
|
|
1610
|
+
r.set(o, n(r.get(o)));
|
|
1611
|
+
break;
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
return e;
|
|
1616
|
+
};
|
|
1617
|
+
function _t(e, t, n = []) {
|
|
1618
|
+
if (!e)
|
|
1619
|
+
return;
|
|
1620
|
+
if (!Y(e)) {
|
|
1621
|
+
Te(e, (i, o) => _t(i, t, [...n, ...ke(o)]));
|
|
1622
|
+
return;
|
|
1623
|
+
}
|
|
1624
|
+
const [r, s] = e;
|
|
1625
|
+
s && Te(s, (i, o) => {
|
|
1626
|
+
_t(i, t, [...n, ...ke(o)]);
|
|
1627
|
+
}), t(r, n);
|
|
1628
|
+
}
|
|
1629
|
+
function ci(e, t, n) {
|
|
1630
|
+
return _t(t, (r, s) => {
|
|
1631
|
+
e = Ft(e, s, (i) => oi(i, r, n));
|
|
1632
|
+
}), e;
|
|
1633
|
+
}
|
|
1634
|
+
function ai(e, t) {
|
|
1635
|
+
function n(r, s) {
|
|
1636
|
+
const i = li(e, ke(s));
|
|
1637
|
+
r.map(ke).forEach((o) => {
|
|
1638
|
+
e = Ft(e, o, () => i);
|
|
1639
|
+
});
|
|
1640
|
+
}
|
|
1641
|
+
if (Y(t)) {
|
|
1642
|
+
const [r, s] = t;
|
|
1643
|
+
r.forEach((i) => {
|
|
1644
|
+
e = Ft(e, ke(i), () => e);
|
|
1645
|
+
}), s && Te(s, n);
|
|
1646
|
+
} else
|
|
1647
|
+
Te(t, n);
|
|
1648
|
+
return e;
|
|
1649
|
+
}
|
|
1650
|
+
var ui = (e, t) => Ue(e) || Y(e) || Fe(e) || _e(e) || Hn(e, t);
|
|
1651
|
+
function fi(e, t, n) {
|
|
1652
|
+
const r = n.get(e);
|
|
1653
|
+
r ? r.push(t) : n.set(e, [t]);
|
|
1654
|
+
}
|
|
1655
|
+
function di(e, t) {
|
|
1656
|
+
const n = {};
|
|
1657
|
+
let r;
|
|
1658
|
+
return e.forEach((s) => {
|
|
1659
|
+
if (s.length <= 1)
|
|
1660
|
+
return;
|
|
1661
|
+
t || (s = s.map((l) => l.map(String)).sort((l, c) => l.length - c.length));
|
|
1662
|
+
const [i, ...o] = s;
|
|
1663
|
+
i.length === 0 ? r = o.map(Ot) : n[Ot(i)] = o.map(Ot);
|
|
1664
|
+
}), r ? Ut(n) ? [r] : [r, n] : Ut(n) ? void 0 : n;
|
|
1665
|
+
}
|
|
1666
|
+
var zn = (e, t, n, r, s = [], i = [], o = /* @__PURE__ */ new Map()) => {
|
|
1667
|
+
const l = Js(e);
|
|
1668
|
+
if (!l) {
|
|
1669
|
+
fi(e, s, t);
|
|
1670
|
+
const h = o.get(e);
|
|
1671
|
+
if (h)
|
|
1672
|
+
return r ? {
|
|
1673
|
+
transformedValue: null
|
|
1674
|
+
} : h;
|
|
1675
|
+
}
|
|
1676
|
+
if (!ui(e, n)) {
|
|
1677
|
+
const h = sn(e, n), p = h ? {
|
|
1678
|
+
transformedValue: h.value,
|
|
1679
|
+
annotations: [h.type]
|
|
1680
|
+
} : {
|
|
1681
|
+
transformedValue: e
|
|
1682
|
+
};
|
|
1683
|
+
return l || o.set(e, p), p;
|
|
1684
|
+
}
|
|
1685
|
+
if (rt(i, e))
|
|
1686
|
+
return {
|
|
1687
|
+
transformedValue: null
|
|
1688
|
+
};
|
|
1689
|
+
const c = sn(e, n), a = (c == null ? void 0 : c.value) ?? e, f = Y(a) ? [] : {}, u = {};
|
|
1690
|
+
Te(a, (h, p) => {
|
|
1691
|
+
if (p === "__proto__" || p === "constructor" || p === "prototype")
|
|
1692
|
+
throw new Error(`Detected property ${p}. This is a prototype pollution risk, please remove it from your object.`);
|
|
1693
|
+
const w = zn(h, t, n, r, [...s, p], [...i, e], o);
|
|
1694
|
+
f[p] = w.transformedValue, Y(w.annotations) ? u[p] = w.annotations : Ue(w.annotations) && Te(w.annotations, (N, L) => {
|
|
1695
|
+
u[Gn(p) + "." + L] = N;
|
|
1696
|
+
});
|
|
1697
|
+
});
|
|
1698
|
+
const m = Ut(u) ? {
|
|
1699
|
+
transformedValue: f,
|
|
1700
|
+
annotations: c ? [c.type] : void 0
|
|
1701
|
+
} : {
|
|
1702
|
+
transformedValue: f,
|
|
1703
|
+
annotations: c ? [c.type, u] : u
|
|
1704
|
+
};
|
|
1705
|
+
return l || o.set(e, m), m;
|
|
1706
|
+
};
|
|
1707
|
+
function Jn(e) {
|
|
1708
|
+
return Object.prototype.toString.call(e).slice(8, -1);
|
|
1709
|
+
}
|
|
1710
|
+
function on(e) {
|
|
1711
|
+
return Jn(e) === "Array";
|
|
1712
|
+
}
|
|
1713
|
+
function hi(e) {
|
|
1714
|
+
if (Jn(e) !== "Object")
|
|
1715
|
+
return !1;
|
|
1716
|
+
const t = Object.getPrototypeOf(e);
|
|
1717
|
+
return !!t && t.constructor === Object && t === Object.prototype;
|
|
1718
|
+
}
|
|
1719
|
+
function mi(e, t, n, r, s) {
|
|
1720
|
+
const i = {}.propertyIsEnumerable.call(r, t) ? "enumerable" : "nonenumerable";
|
|
1721
|
+
i === "enumerable" && (e[t] = n), s && i === "nonenumerable" && Object.defineProperty(e, t, {
|
|
1722
|
+
value: n,
|
|
1723
|
+
enumerable: !1,
|
|
1724
|
+
writable: !0,
|
|
1725
|
+
configurable: !0
|
|
1726
|
+
});
|
|
1727
|
+
}
|
|
1728
|
+
function Bt(e, t = {}) {
|
|
1729
|
+
if (on(e))
|
|
1730
|
+
return e.map((s) => Bt(s, t));
|
|
1731
|
+
if (!hi(e))
|
|
1732
|
+
return e;
|
|
1733
|
+
const n = Object.getOwnPropertyNames(e), r = Object.getOwnPropertySymbols(e);
|
|
1734
|
+
return [...n, ...r].reduce((s, i) => {
|
|
1735
|
+
if (on(t.props) && !t.props.includes(i))
|
|
1736
|
+
return s;
|
|
1737
|
+
const o = e[i], l = Bt(o, t);
|
|
1738
|
+
return mi(s, i, l, e, t.nonenumerable), s;
|
|
1739
|
+
}, {});
|
|
1740
|
+
}
|
|
1741
|
+
var x = class {
|
|
1742
|
+
/**
|
|
1743
|
+
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
1744
|
+
*/
|
|
1745
|
+
constructor({ dedupe: e = !1 } = {}) {
|
|
1746
|
+
this.classRegistry = new $s(), this.symbolRegistry = new qn((t) => t.description ?? ""), this.customTransformerRegistry = new Ks(), this.allowedErrorProps = [], this.dedupe = e;
|
|
1747
|
+
}
|
|
1748
|
+
serialize(e) {
|
|
1749
|
+
const t = /* @__PURE__ */ new Map(), n = zn(e, t, this, this.dedupe), r = {
|
|
1750
|
+
json: n.transformedValue
|
|
1751
|
+
};
|
|
1752
|
+
n.annotations && (r.meta = {
|
|
1753
|
+
...r.meta,
|
|
1754
|
+
values: n.annotations
|
|
1755
|
+
});
|
|
1756
|
+
const s = di(t, this.dedupe);
|
|
1757
|
+
return s && (r.meta = {
|
|
1758
|
+
...r.meta,
|
|
1759
|
+
referentialEqualities: s
|
|
1760
|
+
}), r;
|
|
1761
|
+
}
|
|
1762
|
+
deserialize(e) {
|
|
1763
|
+
const { json: t, meta: n } = e;
|
|
1764
|
+
let r = Bt(t);
|
|
1765
|
+
return n != null && n.values && (r = ci(r, n.values, this)), n != null && n.referentialEqualities && (r = ai(r, n.referentialEqualities)), r;
|
|
1766
|
+
}
|
|
1767
|
+
stringify(e) {
|
|
1768
|
+
return JSON.stringify(this.serialize(e));
|
|
1769
|
+
}
|
|
1770
|
+
parse(e) {
|
|
1771
|
+
return this.deserialize(JSON.parse(e));
|
|
1772
|
+
}
|
|
1773
|
+
registerClass(e, t) {
|
|
1774
|
+
this.classRegistry.register(e, t);
|
|
1775
|
+
}
|
|
1776
|
+
registerSymbol(e, t) {
|
|
1777
|
+
this.symbolRegistry.register(e, t);
|
|
1778
|
+
}
|
|
1779
|
+
registerCustom(e, t) {
|
|
1780
|
+
this.customTransformerRegistry.register({
|
|
1781
|
+
name: t,
|
|
1782
|
+
...e
|
|
1783
|
+
});
|
|
1784
|
+
}
|
|
1785
|
+
allowErrorProps(...e) {
|
|
1786
|
+
this.allowedErrorProps.push(...e);
|
|
1787
|
+
}
|
|
1788
|
+
};
|
|
1789
|
+
x.defaultInstance = new x();
|
|
1790
|
+
x.serialize = x.defaultInstance.serialize.bind(x.defaultInstance);
|
|
1791
|
+
x.deserialize = x.defaultInstance.deserialize.bind(x.defaultInstance);
|
|
1792
|
+
x.stringify = x.defaultInstance.stringify.bind(x.defaultInstance);
|
|
1793
|
+
x.parse = x.defaultInstance.parse.bind(x.defaultInstance);
|
|
1794
|
+
x.registerClass = x.defaultInstance.registerClass.bind(x.defaultInstance);
|
|
1795
|
+
x.registerSymbol = x.defaultInstance.registerSymbol.bind(x.defaultInstance);
|
|
1796
|
+
x.registerCustom = x.defaultInstance.registerCustom.bind(x.defaultInstance);
|
|
1797
|
+
x.allowErrorProps = x.defaultInstance.allowErrorProps.bind(x.defaultInstance);
|
|
1798
|
+
var yi = x.serialize, xo = x.stringify;
|
|
1799
|
+
function No(e) {
|
|
1800
|
+
return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
|
|
1801
|
+
}
|
|
1802
|
+
function Po(e, t) {
|
|
1803
|
+
return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
|
|
1804
|
+
}
|
|
1805
|
+
function ko({
|
|
1806
|
+
queryState: e,
|
|
1807
|
+
observerCount: t,
|
|
1808
|
+
isStale: n
|
|
1809
|
+
}) {
|
|
1810
|
+
return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
|
|
1811
|
+
}
|
|
1812
|
+
function Mo({
|
|
1813
|
+
status: e,
|
|
1814
|
+
isPaused: t
|
|
1815
|
+
}) {
|
|
1816
|
+
return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
|
|
1817
|
+
}
|
|
1818
|
+
function Lo(e) {
|
|
1819
|
+
return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
|
|
1820
|
+
}
|
|
1821
|
+
var Vo = (e, t = !1) => {
|
|
1822
|
+
const {
|
|
1823
|
+
json: n
|
|
1824
|
+
} = yi(e);
|
|
1825
|
+
return JSON.stringify(n, null, t ? 2 : void 0);
|
|
1826
|
+
}, Ze = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, gi = (e, t) => e.queryHash.localeCompare(t.queryHash), er = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, pi = (e, t) => Ze(e) === Ze(t) ? er(e, t) : Ze(e) > Ze(t) ? 1 : -1, Uo = {
|
|
1827
|
+
status: pi,
|
|
1828
|
+
"query hash": gi,
|
|
1829
|
+
"last updated": er
|
|
1830
|
+
}, ze = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, tr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, vi = (e, t) => ze(e) === ze(t) ? tr(e, t) : ze(e) > ze(t) ? 1 : -1, Fo = {
|
|
1831
|
+
status: vi,
|
|
1832
|
+
"last updated": tr
|
|
1833
|
+
}, _o = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Bo = () => {
|
|
1834
|
+
const [e, t] = M("dark");
|
|
1835
|
+
return ts(() => {
|
|
1836
|
+
const n = window.matchMedia("(prefers-color-scheme: dark)");
|
|
1837
|
+
t(n.matches ? "dark" : "light");
|
|
1838
|
+
const r = (s) => {
|
|
1839
|
+
t(s.matches ? "dark" : "light");
|
|
1840
|
+
};
|
|
1841
|
+
n.addEventListener("change", r), Me(() => n.removeEventListener("change", r));
|
|
1842
|
+
}), e;
|
|
1843
|
+
}, Je = (e, t, n) => {
|
|
1844
|
+
if (t.length === 0)
|
|
1845
|
+
return n;
|
|
1846
|
+
if (e instanceof Map) {
|
|
1847
|
+
const r = new Map(e);
|
|
1848
|
+
if (t.length === 1)
|
|
1849
|
+
return r.set(t[0], n), r;
|
|
1850
|
+
const [s, ...i] = t;
|
|
1851
|
+
return r.set(s, Je(r.get(s), i, n)), r;
|
|
1852
|
+
}
|
|
1853
|
+
if (e instanceof Set) {
|
|
1854
|
+
const r = Je(Array.from(e), t, n);
|
|
1855
|
+
return new Set(r);
|
|
1856
|
+
}
|
|
1857
|
+
if (Array.isArray(e)) {
|
|
1858
|
+
const r = [...e];
|
|
1859
|
+
if (t.length === 1)
|
|
1860
|
+
return r[t[0]] = n, r;
|
|
1861
|
+
const [s, ...i] = t;
|
|
1862
|
+
return r[s] = Je(r[s], i, n), r;
|
|
1863
|
+
}
|
|
1864
|
+
if (e instanceof Object) {
|
|
1865
|
+
const r = {
|
|
1866
|
+
...e
|
|
1867
|
+
};
|
|
1868
|
+
if (t.length === 1)
|
|
1869
|
+
return r[t[0]] = n, r;
|
|
1870
|
+
const [s, ...i] = t;
|
|
1871
|
+
return r[s] = Je(r[s], i, n), r;
|
|
1872
|
+
}
|
|
1873
|
+
return e;
|
|
1874
|
+
}, et = (e, t) => {
|
|
1875
|
+
if (e instanceof Map) {
|
|
1876
|
+
const n = new Map(e);
|
|
1877
|
+
if (t.length === 1)
|
|
1878
|
+
return n.delete(t[0]), n;
|
|
1879
|
+
const [r, ...s] = t;
|
|
1880
|
+
return n.set(r, et(n.get(r), s)), n;
|
|
1881
|
+
}
|
|
1882
|
+
if (e instanceof Set) {
|
|
1883
|
+
const n = et(Array.from(e), t);
|
|
1884
|
+
return new Set(n);
|
|
1885
|
+
}
|
|
1886
|
+
if (Array.isArray(e)) {
|
|
1887
|
+
const n = [...e];
|
|
1888
|
+
if (t.length === 1)
|
|
1889
|
+
return n.filter((i, o) => o.toString() !== t[0]);
|
|
1890
|
+
const [r, ...s] = t;
|
|
1891
|
+
return n[r] = et(n[r], s), n;
|
|
1892
|
+
}
|
|
1893
|
+
if (e instanceof Object) {
|
|
1894
|
+
const n = {
|
|
1895
|
+
...e
|
|
1896
|
+
};
|
|
1897
|
+
if (t.length === 1)
|
|
1898
|
+
return delete n[t[0]], n;
|
|
1899
|
+
const [r, ...s] = t;
|
|
1900
|
+
return n[r] = et(n[r], s), n;
|
|
1901
|
+
}
|
|
1902
|
+
return e;
|
|
1903
|
+
}, nr = (e, t) => {
|
|
1904
|
+
if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober"))) return;
|
|
1905
|
+
const r = document.createElement("style"), s = document.createTextNode("");
|
|
1906
|
+
r.appendChild(s), r.id = "_goober", r.setAttribute("nonce", e), t ? t.appendChild(r) : document.head.appendChild(r);
|
|
1907
|
+
}, de, Be, qe, $e, te, De, he, me, ye, ge, pe, ve, Ge, un, bi = (un = class {
|
|
1908
|
+
constructor(e) {
|
|
1909
|
+
T(this, de);
|
|
1910
|
+
T(this, Be);
|
|
1911
|
+
T(this, qe);
|
|
1912
|
+
T(this, $e);
|
|
1913
|
+
T(this, te, !1);
|
|
1914
|
+
T(this, De);
|
|
1915
|
+
T(this, he);
|
|
1916
|
+
T(this, me);
|
|
1917
|
+
T(this, ye);
|
|
1918
|
+
T(this, ge);
|
|
1919
|
+
T(this, pe);
|
|
1920
|
+
T(this, ve);
|
|
1921
|
+
T(this, Ge);
|
|
1922
|
+
const {
|
|
1923
|
+
client: t,
|
|
1924
|
+
queryFlavor: n,
|
|
1925
|
+
version: r,
|
|
1926
|
+
onlineManager: s,
|
|
1927
|
+
buttonPosition: i,
|
|
1928
|
+
position: o,
|
|
1929
|
+
initialIsOpen: l,
|
|
1930
|
+
errorTypes: c,
|
|
1931
|
+
styleNonce: a,
|
|
1932
|
+
shadowDOMTarget: f
|
|
1933
|
+
} = e;
|
|
1934
|
+
I(this, de, M(t)), I(this, qe, n), I(this, $e, r), I(this, Be, s), I(this, De, a), I(this, he, f), I(this, me, M(i)), I(this, ye, M(o)), I(this, ge, M(l)), I(this, pe, M(c));
|
|
1935
|
+
}
|
|
1936
|
+
setButtonPosition(e) {
|
|
1937
|
+
y(this, me)[1](e);
|
|
1938
|
+
}
|
|
1939
|
+
setPosition(e) {
|
|
1940
|
+
y(this, ye)[1](e);
|
|
1941
|
+
}
|
|
1942
|
+
setInitialIsOpen(e) {
|
|
1943
|
+
y(this, ge)[1](e);
|
|
1944
|
+
}
|
|
1945
|
+
setErrorTypes(e) {
|
|
1946
|
+
y(this, pe)[1](e);
|
|
1947
|
+
}
|
|
1948
|
+
setClient(e) {
|
|
1949
|
+
y(this, de)[1](e);
|
|
1950
|
+
}
|
|
1951
|
+
mount(e) {
|
|
1952
|
+
if (y(this, te))
|
|
1953
|
+
throw new Error("Devtools is already mounted");
|
|
1954
|
+
const t = Fn(() => {
|
|
1955
|
+
const n = this, [r] = y(this, me), [s] = y(this, ye), [i] = y(this, ge), [o] = y(this, pe), [l] = y(this, de);
|
|
1956
|
+
let c;
|
|
1957
|
+
return y(this, ve) ? c = y(this, ve) : (c = Vn(() => import("./I3HPI4QX-BuVHGkjY.js")), I(this, ve, c)), nr(y(this, De), y(this, he)), Mn(c, Ln({
|
|
1958
|
+
get queryFlavor() {
|
|
1959
|
+
return y(n, qe);
|
|
1960
|
+
},
|
|
1961
|
+
get version() {
|
|
1962
|
+
return y(n, $e);
|
|
1963
|
+
},
|
|
1964
|
+
get onlineManager() {
|
|
1965
|
+
return y(n, Be);
|
|
1966
|
+
},
|
|
1967
|
+
get shadowDOMTarget() {
|
|
1968
|
+
return y(n, he);
|
|
1969
|
+
}
|
|
1970
|
+
}, {
|
|
1971
|
+
get client() {
|
|
1972
|
+
return l();
|
|
1973
|
+
},
|
|
1974
|
+
get buttonPosition() {
|
|
1975
|
+
return r();
|
|
1976
|
+
},
|
|
1977
|
+
get position() {
|
|
1978
|
+
return s();
|
|
1979
|
+
},
|
|
1980
|
+
get initialIsOpen() {
|
|
1981
|
+
return i();
|
|
1982
|
+
},
|
|
1983
|
+
get errorTypes() {
|
|
1984
|
+
return o();
|
|
1985
|
+
}
|
|
1986
|
+
}));
|
|
1987
|
+
}, e);
|
|
1988
|
+
I(this, te, !0), I(this, Ge, t);
|
|
1989
|
+
}
|
|
1990
|
+
unmount() {
|
|
1991
|
+
var e;
|
|
1992
|
+
if (!y(this, te))
|
|
1993
|
+
throw new Error("Devtools is not mounted");
|
|
1994
|
+
(e = y(this, Ge)) == null || e.call(this), I(this, te, !1);
|
|
1995
|
+
}
|
|
1996
|
+
}, de = new WeakMap(), Be = new WeakMap(), qe = new WeakMap(), $e = new WeakMap(), te = new WeakMap(), De = new WeakMap(), he = new WeakMap(), me = new WeakMap(), ye = new WeakMap(), ge = new WeakMap(), pe = new WeakMap(), ve = new WeakMap(), Ge = new WeakMap(), un), be, Ke, je, Qe, ne, He, we, Se, Ce, Ae, Ie, Ee, Oe, We, fn, wi = (fn = class {
|
|
1997
|
+
constructor(e) {
|
|
1998
|
+
T(this, be);
|
|
1999
|
+
T(this, Ke);
|
|
2000
|
+
T(this, je);
|
|
2001
|
+
T(this, Qe);
|
|
2002
|
+
T(this, ne, !1);
|
|
2003
|
+
T(this, He);
|
|
2004
|
+
T(this, we);
|
|
2005
|
+
T(this, Se);
|
|
2006
|
+
T(this, Ce);
|
|
2007
|
+
T(this, Ae);
|
|
2008
|
+
T(this, Ie);
|
|
2009
|
+
T(this, Ee);
|
|
2010
|
+
T(this, Oe);
|
|
2011
|
+
T(this, We);
|
|
2012
|
+
const {
|
|
2013
|
+
client: t,
|
|
2014
|
+
queryFlavor: n,
|
|
2015
|
+
version: r,
|
|
2016
|
+
onlineManager: s,
|
|
2017
|
+
buttonPosition: i,
|
|
2018
|
+
position: o,
|
|
2019
|
+
initialIsOpen: l,
|
|
2020
|
+
errorTypes: c,
|
|
2021
|
+
styleNonce: a,
|
|
2022
|
+
shadowDOMTarget: f,
|
|
2023
|
+
onClose: u
|
|
2024
|
+
} = e;
|
|
2025
|
+
I(this, be, M(t)), I(this, je, n), I(this, Qe, r), I(this, Ke, s), I(this, He, a), I(this, we, f), I(this, Se, M(i)), I(this, Ce, M(o)), I(this, Ae, M(l)), I(this, Ie, M(c)), I(this, Ee, M(u));
|
|
2026
|
+
}
|
|
2027
|
+
setButtonPosition(e) {
|
|
2028
|
+
y(this, Se)[1](e);
|
|
2029
|
+
}
|
|
2030
|
+
setPosition(e) {
|
|
2031
|
+
y(this, Ce)[1](e);
|
|
2032
|
+
}
|
|
2033
|
+
setInitialIsOpen(e) {
|
|
2034
|
+
y(this, Ae)[1](e);
|
|
2035
|
+
}
|
|
2036
|
+
setErrorTypes(e) {
|
|
2037
|
+
y(this, Ie)[1](e);
|
|
2038
|
+
}
|
|
2039
|
+
setClient(e) {
|
|
2040
|
+
y(this, be)[1](e);
|
|
2041
|
+
}
|
|
2042
|
+
setOnClose(e) {
|
|
2043
|
+
y(this, Ee)[1](() => e);
|
|
2044
|
+
}
|
|
2045
|
+
mount(e) {
|
|
2046
|
+
if (y(this, ne))
|
|
2047
|
+
throw new Error("Devtools is already mounted");
|
|
2048
|
+
const t = Fn(() => {
|
|
2049
|
+
const n = this, [r] = y(this, Se), [s] = y(this, Ce), [i] = y(this, Ae), [o] = y(this, Ie), [l] = y(this, be), [c] = y(this, Ee);
|
|
2050
|
+
let a;
|
|
2051
|
+
return y(this, Oe) ? a = y(this, Oe) : (a = Vn(() => import("./CXEL7IU7-BLUeaFt5.js")), I(this, Oe, a)), nr(y(this, He), y(this, we)), Mn(a, Ln({
|
|
2052
|
+
get queryFlavor() {
|
|
2053
|
+
return y(n, je);
|
|
2054
|
+
},
|
|
2055
|
+
get version() {
|
|
2056
|
+
return y(n, Qe);
|
|
2057
|
+
},
|
|
2058
|
+
get onlineManager() {
|
|
2059
|
+
return y(n, Ke);
|
|
2060
|
+
},
|
|
2061
|
+
get shadowDOMTarget() {
|
|
2062
|
+
return y(n, we);
|
|
2063
|
+
}
|
|
2064
|
+
}, {
|
|
2065
|
+
get client() {
|
|
2066
|
+
return l();
|
|
2067
|
+
},
|
|
2068
|
+
get buttonPosition() {
|
|
2069
|
+
return r();
|
|
2070
|
+
},
|
|
2071
|
+
get position() {
|
|
2072
|
+
return s();
|
|
2073
|
+
},
|
|
2074
|
+
get initialIsOpen() {
|
|
2075
|
+
return i();
|
|
2076
|
+
},
|
|
2077
|
+
get errorTypes() {
|
|
2078
|
+
return o();
|
|
2079
|
+
},
|
|
2080
|
+
get onClose() {
|
|
2081
|
+
return c();
|
|
2082
|
+
}
|
|
2083
|
+
}));
|
|
2084
|
+
}, e);
|
|
2085
|
+
I(this, ne, !0), I(this, We, t);
|
|
2086
|
+
}
|
|
2087
|
+
unmount() {
|
|
2088
|
+
var e;
|
|
2089
|
+
if (!y(this, ne))
|
|
2090
|
+
throw new Error("Devtools is not mounted");
|
|
2091
|
+
(e = y(this, We)) == null || e.call(this), I(this, ne, !1);
|
|
2092
|
+
}
|
|
2093
|
+
}, be = new WeakMap(), Ke = new WeakMap(), je = new WeakMap(), Qe = new WeakMap(), ne = new WeakMap(), He = new WeakMap(), we = new WeakMap(), Se = new WeakMap(), Ce = new WeakMap(), Ae = new WeakMap(), Ie = new WeakMap(), Ee = new WeakMap(), Oe = new WeakMap(), We = new WeakMap(), fn);
|
|
2094
|
+
function Si(e) {
|
|
2095
|
+
const t = Z(e.client), n = $.useRef(null), {
|
|
2096
|
+
buttonPosition: r,
|
|
2097
|
+
position: s,
|
|
2098
|
+
initialIsOpen: i,
|
|
2099
|
+
errorTypes: o,
|
|
2100
|
+
styleNonce: l,
|
|
2101
|
+
shadowDOMTarget: c
|
|
2102
|
+
} = e, [a] = $.useState(
|
|
2103
|
+
new bi({
|
|
2104
|
+
client: t,
|
|
2105
|
+
queryFlavor: "React Query",
|
|
2106
|
+
version: "5",
|
|
2107
|
+
onlineManager: vn,
|
|
2108
|
+
buttonPosition: r,
|
|
2109
|
+
position: s,
|
|
2110
|
+
initialIsOpen: i,
|
|
2111
|
+
errorTypes: o,
|
|
2112
|
+
styleNonce: l,
|
|
2113
|
+
shadowDOMTarget: c
|
|
2114
|
+
})
|
|
2115
|
+
);
|
|
2116
|
+
return $.useEffect(() => {
|
|
2117
|
+
a.setClient(t);
|
|
2118
|
+
}, [t, a]), $.useEffect(() => {
|
|
2119
|
+
r && a.setButtonPosition(r);
|
|
2120
|
+
}, [r, a]), $.useEffect(() => {
|
|
2121
|
+
s && a.setPosition(s);
|
|
2122
|
+
}, [s, a]), $.useEffect(() => {
|
|
2123
|
+
a.setInitialIsOpen(i || !1);
|
|
2124
|
+
}, [i, a]), $.useEffect(() => {
|
|
2125
|
+
a.setErrorTypes(o || []);
|
|
2126
|
+
}, [o, a]), $.useEffect(() => (n.current && a.mount(n.current), () => {
|
|
2127
|
+
a.unmount();
|
|
2128
|
+
}), [a]), /* @__PURE__ */ d("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
|
|
2129
|
+
}
|
|
2130
|
+
function Ci(e) {
|
|
2131
|
+
const t = Z(e.client), n = $.useRef(null), { errorTypes: r, styleNonce: s, shadowDOMTarget: i } = e, [o] = $.useState(
|
|
2132
|
+
new wi({
|
|
2133
|
+
client: t,
|
|
2134
|
+
queryFlavor: "React Query",
|
|
2135
|
+
version: "5",
|
|
2136
|
+
onlineManager: vn,
|
|
2137
|
+
buttonPosition: "bottom-left",
|
|
2138
|
+
position: "bottom",
|
|
2139
|
+
initialIsOpen: !0,
|
|
2140
|
+
errorTypes: r,
|
|
2141
|
+
styleNonce: s,
|
|
2142
|
+
shadowDOMTarget: i,
|
|
2143
|
+
onClose: e.onClose
|
|
2144
|
+
})
|
|
2145
|
+
);
|
|
2146
|
+
return $.useEffect(() => {
|
|
2147
|
+
o.setClient(t);
|
|
2148
|
+
}, [t, o]), $.useEffect(() => {
|
|
2149
|
+
o.setOnClose(e.onClose ?? (() => {
|
|
2150
|
+
}));
|
|
2151
|
+
}, [e.onClose, o]), $.useEffect(() => {
|
|
2152
|
+
o.setErrorTypes(r || []);
|
|
2153
|
+
}, [r, o]), $.useEffect(() => (n.current && o.mount(n.current), () => {
|
|
2154
|
+
o.unmount();
|
|
2155
|
+
}), [o]), /* @__PURE__ */ d(
|
|
2156
|
+
"div",
|
|
2157
|
+
{
|
|
2158
|
+
style: { height: "500px", ...e.style },
|
|
2159
|
+
className: "tsqd-parent-container",
|
|
2160
|
+
ref: n
|
|
2161
|
+
}
|
|
2162
|
+
);
|
|
2163
|
+
}
|
|
2164
|
+
var rr = process.env.NODE_ENV !== "development" ? function() {
|
|
2165
|
+
return null;
|
|
2166
|
+
} : Si;
|
|
2167
|
+
process.env.NODE_ENV;
|
|
2168
|
+
const qt = new Ur({
|
|
2169
|
+
queryCache: new Fr({
|
|
2170
|
+
onError: (e) => {
|
|
2171
|
+
typeof e == "string" && e === Ir.NOT_LOGGED_IN && window.location.replace("/auth/login");
|
|
2172
|
+
}
|
|
2173
|
+
}),
|
|
2174
|
+
defaultOptions: {
|
|
2175
|
+
queries: {
|
|
2176
|
+
retry: !1,
|
|
2177
|
+
refetchOnWindowFocus: !1,
|
|
2178
|
+
staleTime: 1e3 * 60 * 2
|
|
2179
|
+
}
|
|
2180
|
+
}
|
|
2181
|
+
}), qo = ({ children: e }) => /* @__PURE__ */ B(bn, { client: qt, children: [
|
|
2182
|
+
/* @__PURE__ */ d(
|
|
2183
|
+
mn,
|
|
2184
|
+
{
|
|
2185
|
+
params: {
|
|
2186
|
+
app: "collect"
|
|
2187
|
+
},
|
|
2188
|
+
children: e
|
|
2189
|
+
}
|
|
2190
|
+
),
|
|
2191
|
+
/* @__PURE__ */ d(rr, { initialIsOpen: !1 })
|
|
2192
|
+
] }), Ai = () => {
|
|
2193
|
+
const e = hn(), t = ut(), { appCode: n } = ft(), { t: r } = ht(n);
|
|
2194
|
+
return console.error(e), /* @__PURE__ */ B("div", { className: "d-flex flex-column gap-16 align-items-center mt-64", children: [
|
|
2195
|
+
/* @__PURE__ */ d(Gt, { level: "h2", headingStyle: "h2", className: "text-secondary", children: r("oops") }),
|
|
2196
|
+
/* @__PURE__ */ d("div", { className: "text", children: r("notfound.or.unauthorized") }),
|
|
2197
|
+
/* @__PURE__ */ d(J, { color: "primary", onClick: () => t(-1), children: r("back") })
|
|
2198
|
+
] });
|
|
2199
|
+
}, Ii = () => {
|
|
2200
|
+
const e = hn(), t = ut();
|
|
2201
|
+
return console.error(e), /* @__PURE__ */ d(Er, { children: /* @__PURE__ */ B("div", { className: "d-flex flex-column gap-16 align-items-center mt-64", children: [
|
|
2202
|
+
/* @__PURE__ */ d(Gt, { level: "h2", headingStyle: "h2", className: "text-secondary", children: St("oops") }),
|
|
2203
|
+
/* @__PURE__ */ d("div", { className: "text", children: St("e404.page") }),
|
|
2204
|
+
/* @__PURE__ */ d(J, { color: "primary", onClick: () => t(-1), children: St("back") })
|
|
2205
|
+
] }) });
|
|
2206
|
+
}, Ei = 100, $o = 100, ln = 80, Tt = "collect-wizard-data", ue = ["form", "members"], cn = {
|
|
2207
|
+
title: "",
|
|
2208
|
+
description: "",
|
|
2209
|
+
deadline: void 0,
|
|
2210
|
+
attachments: [],
|
|
2211
|
+
sharings: []
|
|
2212
|
+
}, Oi = () => {
|
|
2213
|
+
const [e, t] = $t(() => {
|
|
2214
|
+
const s = localStorage.getItem(Tt);
|
|
2215
|
+
return s ? JSON.parse(s) : cn;
|
|
2216
|
+
});
|
|
2217
|
+
return X(() => {
|
|
2218
|
+
localStorage.setItem(Tt, JSON.stringify(e));
|
|
2219
|
+
}, [e]), {
|
|
2220
|
+
wizardData: e,
|
|
2221
|
+
setWizardData: t,
|
|
2222
|
+
updateWizardData: (s) => {
|
|
2223
|
+
t((i) => ({
|
|
2224
|
+
...i,
|
|
2225
|
+
...s
|
|
2226
|
+
}));
|
|
2227
|
+
},
|
|
2228
|
+
resetWizardData: () => {
|
|
2229
|
+
localStorage.removeItem(Tt), t(cn);
|
|
2230
|
+
}
|
|
2231
|
+
};
|
|
2232
|
+
};
|
|
2233
|
+
function jt() {
|
|
2234
|
+
const e = ut(), n = vr().pathname, r = ue.findIndex(
|
|
2235
|
+
(o) => n.includes(o)
|
|
2236
|
+
);
|
|
2237
|
+
return {
|
|
2238
|
+
currentStep: r,
|
|
2239
|
+
nextStep: () => {
|
|
2240
|
+
const o = r + 1;
|
|
2241
|
+
o < ue.length && e(`/create/${ue[o]}`);
|
|
2242
|
+
},
|
|
2243
|
+
backStep: () => {
|
|
2244
|
+
const o = r - 1;
|
|
2245
|
+
o >= 0 ? e(`/create/${ue[o]}`) : e("/");
|
|
2246
|
+
}
|
|
2247
|
+
};
|
|
2248
|
+
}
|
|
2249
|
+
const sr = (e) => {
|
|
2250
|
+
const t = e;
|
|
2251
|
+
t.use = {};
|
|
2252
|
+
for (const n of Object.keys(t.getState()))
|
|
2253
|
+
t.use[n] = () => t((r) => r[n]);
|
|
2254
|
+
return t;
|
|
2255
|
+
}, Ti = Sn((e) => ({
|
|
2256
|
+
isFormValid: !1,
|
|
2257
|
+
setIsFormValid: (t) => e({ isFormValid: t })
|
|
2258
|
+
})), ir = sr(Ti);
|
|
2259
|
+
function or({ title: e }) {
|
|
2260
|
+
return /* @__PURE__ */ d("div", { className: "mb-24", children: /* @__PURE__ */ d(Gt, { className: "text-truncate", children: e }) });
|
|
2261
|
+
}
|
|
2262
|
+
const Ri = ({
|
|
2263
|
+
wizardData: e,
|
|
2264
|
+
updateWizardData: t,
|
|
2265
|
+
collection: n
|
|
2266
|
+
}) => {
|
|
2267
|
+
const { appCode: r } = ft(), { t: s } = ht(r), { currentStep: i, nextStep: o } = jt(), l = ir.use.setIsFormValid(), c = Dt(
|
|
2268
|
+
() => ({
|
|
2269
|
+
title: (e == null ? void 0 : e.title) ?? (n == null ? void 0 : n.name) ?? "",
|
|
2270
|
+
description: (e == null ? void 0 : e.description) ?? (n != null && n.content ? n.content : ""),
|
|
2271
|
+
deadline: (e == null ? void 0 : e.deadline) ?? (n != null && n.deadline ? new Date(n.deadline) : void 0),
|
|
2272
|
+
attachments: (e == null ? void 0 : e.attachments) ?? [],
|
|
2273
|
+
sharings: (e == null ? void 0 : e.sharings) ?? []
|
|
2274
|
+
}),
|
|
2275
|
+
[e, n]
|
|
2276
|
+
), a = ee(c.description), [f, u] = $t(
|
|
2277
|
+
(e == null ? void 0 : e.attachments) ?? []
|
|
2278
|
+
), {
|
|
2279
|
+
control: m,
|
|
2280
|
+
watch: h,
|
|
2281
|
+
register: p,
|
|
2282
|
+
handleSubmit: w,
|
|
2283
|
+
setValue: N,
|
|
2284
|
+
formState: { isValid: L }
|
|
2285
|
+
} = Hr({
|
|
2286
|
+
defaultValues: c
|
|
2287
|
+
});
|
|
2288
|
+
X(() => {
|
|
2289
|
+
const S = h((D) => {
|
|
2290
|
+
t == null || t(D);
|
|
2291
|
+
});
|
|
2292
|
+
return () => S.unsubscribe();
|
|
2293
|
+
}, [h]), X(() => {
|
|
2294
|
+
l(L);
|
|
2295
|
+
}, [L]);
|
|
2296
|
+
const A = (S) => {
|
|
2297
|
+
t == null || t(S), o();
|
|
2298
|
+
}, P = ({ editor: S }) => {
|
|
2299
|
+
N("description", S.isEmpty ? "" : S.getHTML());
|
|
2300
|
+
}, U = (S) => {
|
|
2301
|
+
u(S), N("attachments", S);
|
|
2302
|
+
};
|
|
2303
|
+
return /* @__PURE__ */ B(dn, { children: [
|
|
2304
|
+
/* @__PURE__ */ d(yn, { currentStep: i, nbSteps: 2 }),
|
|
2305
|
+
/* @__PURE__ */ d(or, { title: s("collection.wizard.form.title") }),
|
|
2306
|
+
/* @__PURE__ */ d(
|
|
2307
|
+
br,
|
|
2308
|
+
{
|
|
2309
|
+
id: "formCreateCollection",
|
|
2310
|
+
role: "form",
|
|
2311
|
+
onSubmit: w(A),
|
|
2312
|
+
children: /* @__PURE__ */ B(K, { children: [
|
|
2313
|
+
/* @__PURE__ */ d(K.Col, { sm: "4", md: "5", xl: "8", children: /* @__PURE__ */ B(Xe, { id: "collectionTitle", isRequired: !0, children: [
|
|
2314
|
+
/* @__PURE__ */ d(bt, { leftIcon: /* @__PURE__ */ d($r, {}), children: s("collection.wizard.create.form.title") }),
|
|
2315
|
+
/* @__PURE__ */ d(
|
|
2316
|
+
Or,
|
|
2317
|
+
{
|
|
2318
|
+
"data-testid": "collect-create-collection-input-title",
|
|
2319
|
+
type: "text",
|
|
2320
|
+
...p("title", {
|
|
2321
|
+
required: !0,
|
|
2322
|
+
maxLength: ln,
|
|
2323
|
+
pattern: {
|
|
2324
|
+
value: /[^ ]/,
|
|
2325
|
+
message: "invalid title"
|
|
2326
|
+
}
|
|
2327
|
+
}),
|
|
2328
|
+
size: "md",
|
|
2329
|
+
maxLength: ln,
|
|
2330
|
+
placeholder: s(
|
|
2331
|
+
"collection.wizard.create.form.title.placeholder"
|
|
2332
|
+
),
|
|
2333
|
+
showCounter: !0
|
|
2334
|
+
}
|
|
2335
|
+
)
|
|
2336
|
+
] }) }),
|
|
2337
|
+
/* @__PURE__ */ d(K.Col, { sm: "4", md: "3", xl: "4", children: /* @__PURE__ */ B(Xe, { id: "collectionDeadline", isRequired: !0, children: [
|
|
2338
|
+
/* @__PURE__ */ d(bt, { leftIcon: /* @__PURE__ */ d(Dr, {}), children: s("collection.wizard.create.form.deadline") }),
|
|
2339
|
+
/* @__PURE__ */ d(
|
|
2340
|
+
Ct,
|
|
2341
|
+
{
|
|
2342
|
+
name: "deadline",
|
|
2343
|
+
control: m,
|
|
2344
|
+
rules: { required: !0 },
|
|
2345
|
+
render: ({ field: S }) => /* @__PURE__ */ d(
|
|
2346
|
+
Tr,
|
|
2347
|
+
{
|
|
2348
|
+
"data-testid": "collect-create-collection-input-deadline",
|
|
2349
|
+
value: S.value,
|
|
2350
|
+
onChange: S.onChange,
|
|
2351
|
+
onBlur: S.onBlur,
|
|
2352
|
+
className: "w-full form-control"
|
|
2353
|
+
}
|
|
2354
|
+
)
|
|
2355
|
+
}
|
|
2356
|
+
)
|
|
2357
|
+
] }) }),
|
|
2358
|
+
/* @__PURE__ */ d(K.Col, { sm: "4", md: "8", xl: "12", children: /* @__PURE__ */ B(
|
|
2359
|
+
Xe,
|
|
2360
|
+
{
|
|
2361
|
+
id: "collectionDescription",
|
|
2362
|
+
isOptional: !0,
|
|
2363
|
+
className: "collectionDescription",
|
|
2364
|
+
children: [
|
|
2365
|
+
/* @__PURE__ */ d(bt, { leftIcon: /* @__PURE__ */ d(Gr, {}), children: s("collection.wizard.create.form.description") }),
|
|
2366
|
+
/* @__PURE__ */ d(
|
|
2367
|
+
Ct,
|
|
2368
|
+
{
|
|
2369
|
+
name: "description",
|
|
2370
|
+
control: m,
|
|
2371
|
+
render: () => /* @__PURE__ */ d(
|
|
2372
|
+
qr,
|
|
2373
|
+
{
|
|
2374
|
+
"data-testid": "collect-create-collection-input-description",
|
|
2375
|
+
id: "collectionDescription",
|
|
2376
|
+
content: a.current,
|
|
2377
|
+
placeholder: s(
|
|
2378
|
+
"collection.wizard.create.form.description.placeholder"
|
|
2379
|
+
),
|
|
2380
|
+
onContentChange: P,
|
|
2381
|
+
mode: "edit"
|
|
2382
|
+
}
|
|
2383
|
+
)
|
|
2384
|
+
}
|
|
2385
|
+
)
|
|
2386
|
+
]
|
|
2387
|
+
}
|
|
2388
|
+
) }),
|
|
2389
|
+
/* @__PURE__ */ d(K.Col, { sm: "4", md: "5", children: /* @__PURE__ */ d(Xe, { id: "collectionAttachments", isOptional: !0, children: /* @__PURE__ */ d(
|
|
2390
|
+
Ct,
|
|
2391
|
+
{
|
|
2392
|
+
name: "attachments",
|
|
2393
|
+
control: m,
|
|
2394
|
+
render: () => /* @__PURE__ */ d(
|
|
2395
|
+
Rr,
|
|
2396
|
+
{
|
|
2397
|
+
"data-testid": "collect-create-collection-input-attachments",
|
|
2398
|
+
attachments: f,
|
|
2399
|
+
editMode: !0,
|
|
2400
|
+
onChange: U
|
|
2401
|
+
}
|
|
2402
|
+
)
|
|
2403
|
+
}
|
|
2404
|
+
) }) })
|
|
2405
|
+
] })
|
|
2406
|
+
}
|
|
2407
|
+
)
|
|
2408
|
+
] });
|
|
2409
|
+
}, xi = (e) => e === nt.MANAGE ? ["manager"] : [e], Ni = (e) => e.includes("manager") ? nt.MANAGE : e.includes("contrib") ? nt.CONTRIB : nt.VIEW, Pi = (e) => ({
|
|
2410
|
+
recipientId: e.recipient.entId,
|
|
2411
|
+
recipientType: e.recipient.type,
|
|
2412
|
+
permission: xi(e.permission),
|
|
2413
|
+
displayName: e.recipient.displayName ?? ""
|
|
2414
|
+
}), lr = (e) => ({
|
|
2415
|
+
recipientId: e.recipientId,
|
|
2416
|
+
recipientType: e.recipientType,
|
|
2417
|
+
permission: Ni(e.permission)
|
|
2418
|
+
}), ki = (e) => ({
|
|
2419
|
+
recipientId: e.recipientId,
|
|
2420
|
+
recipientType: e.recipientType
|
|
2421
|
+
}), Do = (e, t) => ({
|
|
2422
|
+
deleteSharings: e.map(ki),
|
|
2423
|
+
newSharings: t.map(lr)
|
|
2424
|
+
});
|
|
2425
|
+
var Q = /* @__PURE__ */ ((e) => (e.USER = "User", e.GROUP = "Group", e.BROADCAST_GROUP = "BroadcastGroup", e.SHAREBOOKMARK = "ShareBookmark", e))(Q || {});
|
|
2426
|
+
const Mi = () => ({
|
|
2427
|
+
async searchVisibles(e) {
|
|
2428
|
+
return (await Ne.http().get(
|
|
2429
|
+
"/communication/visible/search",
|
|
2430
|
+
e !== void 0 ? { queryParams: { query: e, mode: "excludeFamily" } } : void 0
|
|
2431
|
+
)).filter(
|
|
2432
|
+
(n) => n.type !== "BroadcastGroup"
|
|
2433
|
+
/* BROADCAST_GROUP */
|
|
2434
|
+
);
|
|
2435
|
+
},
|
|
2436
|
+
fetchUsersByGroup(e) {
|
|
2437
|
+
return Ne.http().get(`/communication/visible/group/${e}`);
|
|
2438
|
+
},
|
|
2439
|
+
fetchSharebookmark(e) {
|
|
2440
|
+
return Ne.http().get(`/directory/sharebookmark/${e}`);
|
|
2441
|
+
}
|
|
2442
|
+
}), Rt = Mi(), fe = {
|
|
2443
|
+
base: ["user"],
|
|
2444
|
+
/**
|
|
2445
|
+
* Get a filtered list of visible users. Filtering is done by the *backend*.
|
|
2446
|
+
* @param search The search string to filter the users
|
|
2447
|
+
* @returns The query options for the search visible users
|
|
2448
|
+
*/
|
|
2449
|
+
searchVisibles(e) {
|
|
2450
|
+
return wt({
|
|
2451
|
+
queryKey: [
|
|
2452
|
+
...fe.base,
|
|
2453
|
+
"search",
|
|
2454
|
+
e ? { search: e } : void 0
|
|
2455
|
+
],
|
|
2456
|
+
queryFn: () => Rt.searchVisibles(e),
|
|
2457
|
+
staleTime: 1 / 0
|
|
2458
|
+
// This data will never change during user's session.
|
|
2459
|
+
});
|
|
2460
|
+
},
|
|
2461
|
+
/**
|
|
2462
|
+
* Get users belonging to a specific group
|
|
2463
|
+
* @param groupId The ID of the group to fetch users from
|
|
2464
|
+
* @returns The query options for fetching users by group
|
|
2465
|
+
*/
|
|
2466
|
+
fetchUsersByGroup(e) {
|
|
2467
|
+
return wt({
|
|
2468
|
+
queryKey: [...fe.base, "group", e],
|
|
2469
|
+
queryFn: () => Rt.fetchUsersByGroup(e),
|
|
2470
|
+
staleTime: 5 * 60 * 1e3,
|
|
2471
|
+
// 5 minutes - group membership changes less frequently
|
|
2472
|
+
enabled: !!e
|
|
2473
|
+
});
|
|
2474
|
+
},
|
|
2475
|
+
fetchSharebookmark(e) {
|
|
2476
|
+
return wt({
|
|
2477
|
+
queryKey: [
|
|
2478
|
+
...fe.base,
|
|
2479
|
+
"sharebookmark",
|
|
2480
|
+
e
|
|
2481
|
+
],
|
|
2482
|
+
queryFn: () => Rt.fetchSharebookmark(e),
|
|
2483
|
+
staleTime: 5 * 60 * 1e3,
|
|
2484
|
+
// 5 minutes - share bookmarks change less frequently
|
|
2485
|
+
enabled: !!e
|
|
2486
|
+
});
|
|
2487
|
+
}
|
|
2488
|
+
};
|
|
2489
|
+
function Li(e, t, n) {
|
|
2490
|
+
if (e && (!n || n.length < 3))
|
|
2491
|
+
return { triggerSearch: !1 };
|
|
2492
|
+
const s = t === "all-at-once" ? n.substring(0, 3) : void 0, i = n.length > 3;
|
|
2493
|
+
function o() {
|
|
2494
|
+
const l = Ne.idiom().removeAccents, c = l(n).toLowerCase();
|
|
2495
|
+
return i ? (a) => {
|
|
2496
|
+
let f = "", u = "";
|
|
2497
|
+
const m = a.displayName ?? void 0;
|
|
2498
|
+
if (m) {
|
|
2499
|
+
f = l(m).toLowerCase();
|
|
2500
|
+
const h = f.split(" ");
|
|
2501
|
+
u = h.length > 1 ? h[1] + " " + h[0] : f;
|
|
2502
|
+
}
|
|
2503
|
+
return f.indexOf(c) !== -1 || u.indexOf(c) !== -1;
|
|
2504
|
+
} : void 0;
|
|
2505
|
+
}
|
|
2506
|
+
return {
|
|
2507
|
+
triggerSearch: !0,
|
|
2508
|
+
backendFilter: s,
|
|
2509
|
+
frontendFilter: o()
|
|
2510
|
+
};
|
|
2511
|
+
}
|
|
2512
|
+
const Vi = () => {
|
|
2513
|
+
const e = Z(), t = "all-at-once", { isAdmlcOrAdmc: n } = gn();
|
|
2514
|
+
return { searchVisible: async (s) => {
|
|
2515
|
+
const { triggerSearch: i, backendFilter: o, frontendFilter: l } = Li(
|
|
2516
|
+
n,
|
|
2517
|
+
t,
|
|
2518
|
+
s
|
|
2519
|
+
);
|
|
2520
|
+
if (!i) return Promise.resolve([]);
|
|
2521
|
+
const c = await e.ensureQueryData(
|
|
2522
|
+
fe.searchVisibles(o)
|
|
2523
|
+
);
|
|
2524
|
+
return l ? c.filter(l) : c;
|
|
2525
|
+
} };
|
|
2526
|
+
}, Ui = Sn(
|
|
2527
|
+
(e) => ({
|
|
2528
|
+
usersCollection: [],
|
|
2529
|
+
usersToAdd: [],
|
|
2530
|
+
usersToDelete: [],
|
|
2531
|
+
setUsersCollection: (t) => e({ usersCollection: t }),
|
|
2532
|
+
addUsersToAdd: (t) => e((n) => {
|
|
2533
|
+
const r = new Set(t.map((s) => s.recipientId));
|
|
2534
|
+
return {
|
|
2535
|
+
usersToAdd: [
|
|
2536
|
+
...n.usersToAdd.filter((s) => !r.has(s.recipientId)),
|
|
2537
|
+
...t
|
|
2538
|
+
],
|
|
2539
|
+
usersToDelete: n.usersToDelete.filter(
|
|
2540
|
+
(s) => !r.has(s.recipientId)
|
|
2541
|
+
)
|
|
2542
|
+
};
|
|
2543
|
+
}),
|
|
2544
|
+
addUsersToDelete: (t) => e((n) => {
|
|
2545
|
+
const r = new Set(t.map((s) => s.recipientId));
|
|
2546
|
+
return {
|
|
2547
|
+
usersToDelete: [
|
|
2548
|
+
...n.usersToDelete.filter(
|
|
2549
|
+
(s) => !r.has(s.recipientId)
|
|
2550
|
+
),
|
|
2551
|
+
...t
|
|
2552
|
+
],
|
|
2553
|
+
usersToAdd: n.usersToAdd.filter(
|
|
2554
|
+
(s) => !r.has(s.recipientId)
|
|
2555
|
+
)
|
|
2556
|
+
};
|
|
2557
|
+
}),
|
|
2558
|
+
resetUsersDiff: () => e({ usersToAdd: [], usersToDelete: [] })
|
|
2559
|
+
})
|
|
2560
|
+
), ce = sr(
|
|
2561
|
+
Ui
|
|
2562
|
+
), Fi = {
|
|
2563
|
+
searchInputValue: "",
|
|
2564
|
+
searchResults: [],
|
|
2565
|
+
searchAPIResults: [],
|
|
2566
|
+
isSearching: !1,
|
|
2567
|
+
isAddingMembers: !1
|
|
2568
|
+
};
|
|
2569
|
+
function _i(e, t) {
|
|
2570
|
+
switch (t.type) {
|
|
2571
|
+
case "onChange":
|
|
2572
|
+
return { ...e, searchInputValue: t.payload };
|
|
2573
|
+
case "isSearching":
|
|
2574
|
+
return { ...e, isSearching: t.payload };
|
|
2575
|
+
case "isAddingMembers":
|
|
2576
|
+
return { ...e, isAddingMembers: t.payload };
|
|
2577
|
+
case "addResult":
|
|
2578
|
+
return { ...e, searchResults: t.payload };
|
|
2579
|
+
case "addApiResult":
|
|
2580
|
+
return { ...e, searchAPIResults: t.payload };
|
|
2581
|
+
case "emptyResult":
|
|
2582
|
+
return { ...e, searchResults: t.payload };
|
|
2583
|
+
default:
|
|
2584
|
+
throw new Error("Unhandled action type");
|
|
2585
|
+
}
|
|
2586
|
+
}
|
|
2587
|
+
const Bi = () => {
|
|
2588
|
+
var S, D;
|
|
2589
|
+
const [e, t] = hr(_i, Fi), { usersCollection: n } = ce(), r = pn(), s = xr(
|
|
2590
|
+
e.searchInputValue,
|
|
2591
|
+
500
|
|
2592
|
+
), { searchVisible: i } = Vi(), { isAdmlcOrAdmc: o } = gn(), l = Z(), c = (v) => {
|
|
2593
|
+
switch (v.type) {
|
|
2594
|
+
case Q.USER:
|
|
2595
|
+
return null;
|
|
2596
|
+
case Q.GROUP:
|
|
2597
|
+
case Q.BROADCAST_GROUP:
|
|
2598
|
+
return /* @__PURE__ */ d(jr, {});
|
|
2599
|
+
case Q.SHAREBOOKMARK:
|
|
2600
|
+
return /* @__PURE__ */ d(Kr, {});
|
|
2601
|
+
default:
|
|
2602
|
+
return null;
|
|
2603
|
+
}
|
|
2604
|
+
};
|
|
2605
|
+
X(() => {
|
|
2606
|
+
P(s);
|
|
2607
|
+
}, [s]);
|
|
2608
|
+
const a = (v) => v.filter(
|
|
2609
|
+
(O) => {
|
|
2610
|
+
var b;
|
|
2611
|
+
return !n.some((E) => E.recipientId === O.id) && O.id !== ((b = r == null ? void 0 : r.user) == null ? void 0 : b.userId);
|
|
2612
|
+
}
|
|
2613
|
+
), f = (v) => v.map((O) => ({
|
|
2614
|
+
value: O.id,
|
|
2615
|
+
label: O.displayName,
|
|
2616
|
+
icon: c(O)
|
|
2617
|
+
})), u = (v) => f(a(v)), m = (v, O) => ({
|
|
2618
|
+
displayName: v.displayName,
|
|
2619
|
+
permission: ["contrib"],
|
|
2620
|
+
recipientId: v.id,
|
|
2621
|
+
recipientType: O
|
|
2622
|
+
}), h = (v) => v.map((O) => ({
|
|
2623
|
+
id: O.id,
|
|
2624
|
+
displayName: O.name
|
|
2625
|
+
})), p = (v, O) => ({
|
|
2626
|
+
name: v.name,
|
|
2627
|
+
id: v.id,
|
|
2628
|
+
groups: h(v.groups),
|
|
2629
|
+
users: O
|
|
2630
|
+
});
|
|
2631
|
+
X(() => {
|
|
2632
|
+
t({
|
|
2633
|
+
type: "addResult",
|
|
2634
|
+
payload: u(e.searchAPIResults)
|
|
2635
|
+
});
|
|
2636
|
+
}, [e.searchAPIResults, n, (S = r == null ? void 0 : r.user) == null ? void 0 : S.userId]);
|
|
2637
|
+
const w = (v) => {
|
|
2638
|
+
t({
|
|
2639
|
+
type: "addApiResult",
|
|
2640
|
+
payload: v
|
|
2641
|
+
}), t({
|
|
2642
|
+
type: "addResult",
|
|
2643
|
+
payload: u(v)
|
|
2644
|
+
});
|
|
2645
|
+
}, N = async (v) => {
|
|
2646
|
+
var E, k;
|
|
2647
|
+
t({ type: "isAddingMembers", payload: !0 });
|
|
2648
|
+
const O = v[0];
|
|
2649
|
+
if (!O)
|
|
2650
|
+
return t({ type: "isAddingMembers", payload: !1 }), [];
|
|
2651
|
+
const b = e.searchAPIResults.find(
|
|
2652
|
+
(V) => V.id === O
|
|
2653
|
+
);
|
|
2654
|
+
if (!b)
|
|
2655
|
+
return t({ type: "isAddingMembers", payload: !1 }), [];
|
|
2656
|
+
try {
|
|
2657
|
+
if (b.type === Q.USER)
|
|
2658
|
+
return [m(b, "user")];
|
|
2659
|
+
if (b.type === Q.GROUP || b.type === Q.BROADCAST_GROUP)
|
|
2660
|
+
return [m(b, "group")];
|
|
2661
|
+
if (b.type === Q.SHAREBOOKMARK) {
|
|
2662
|
+
const V = await l.fetchQuery(
|
|
2663
|
+
fe.fetchSharebookmark(b.id)
|
|
2664
|
+
);
|
|
2665
|
+
let pt = [];
|
|
2666
|
+
if (((E = V == null ? void 0 : V.users) == null ? void 0 : E.length) > 0 && (pt = [
|
|
2667
|
+
p(V, V.users)
|
|
2668
|
+
]), ((k = V == null ? void 0 : V.groups) == null ? void 0 : k.length) > 0) {
|
|
2669
|
+
const fr = V.groups.map(
|
|
2670
|
+
(vt) => l.fetchQuery(
|
|
2671
|
+
fe.fetchUsersByGroup(vt.id)
|
|
2672
|
+
)
|
|
2673
|
+
), dr = await Promise.all(
|
|
2674
|
+
fr
|
|
2675
|
+
);
|
|
2676
|
+
pt = [
|
|
2677
|
+
p(
|
|
2678
|
+
V,
|
|
2679
|
+
dr.flatMap(
|
|
2680
|
+
(vt) => vt.map((Qt) => ({
|
|
2681
|
+
id: Qt.id,
|
|
2682
|
+
displayName: Qt.displayName
|
|
2683
|
+
}))
|
|
2684
|
+
)
|
|
2685
|
+
)
|
|
2686
|
+
];
|
|
2687
|
+
}
|
|
2688
|
+
return pt;
|
|
2689
|
+
}
|
|
2690
|
+
return [];
|
|
2691
|
+
} finally {
|
|
2692
|
+
t({ type: "isAddingMembers", payload: !1 });
|
|
2693
|
+
}
|
|
2694
|
+
}, L = (v) => {
|
|
2695
|
+
const O = v.target.value;
|
|
2696
|
+
t({
|
|
2697
|
+
type: "onChange",
|
|
2698
|
+
payload: O
|
|
2699
|
+
}), t({
|
|
2700
|
+
type: "addResult",
|
|
2701
|
+
payload: u(e.searchAPIResults)
|
|
2702
|
+
});
|
|
2703
|
+
}, A = o ? 3 : 1, P = async (v, O = !1) => {
|
|
2704
|
+
if (t({
|
|
2705
|
+
type: "isSearching",
|
|
2706
|
+
payload: !0
|
|
2707
|
+
}), v.length >= A || O) {
|
|
2708
|
+
const E = v.length >= A || O && v.length > 0 ? await i(v) : [];
|
|
2709
|
+
w(E);
|
|
2710
|
+
} else
|
|
2711
|
+
t({
|
|
2712
|
+
type: "emptyResult",
|
|
2713
|
+
payload: []
|
|
2714
|
+
});
|
|
2715
|
+
t({
|
|
2716
|
+
type: "isSearching",
|
|
2717
|
+
payload: !1
|
|
2718
|
+
});
|
|
2719
|
+
}, U = !e.isSearching && s.length >= A && ((D = e.searchResults) == null ? void 0 : D.length) === 0;
|
|
2720
|
+
return {
|
|
2721
|
+
state: e,
|
|
2722
|
+
searchMinLength: A,
|
|
2723
|
+
isSearchLoading: e.isSearching,
|
|
2724
|
+
isAddingMembers: e.isAddingMembers,
|
|
2725
|
+
hasSearchNoResults: U,
|
|
2726
|
+
handleSearchInputChange: L,
|
|
2727
|
+
handleSearchSubmit: N
|
|
2728
|
+
};
|
|
2729
|
+
}, qi = ({
|
|
2730
|
+
handleSearchSubmit: e,
|
|
2731
|
+
initialSharings: t,
|
|
2732
|
+
onSharingsChange: n
|
|
2733
|
+
}) => {
|
|
2734
|
+
const r = ce.use.usersCollection(), s = ce.use.setUsersCollection(), i = ce.use.addUsersToAdd(), o = ce.use.addUsersToDelete(), l = ce.use.resetUsersDiff(), c = ee(null), a = (h) => {
|
|
2735
|
+
if (h.length === 0) return;
|
|
2736
|
+
const p = [...r, ...h].filter(
|
|
2737
|
+
(w, N, L) => L.findIndex((A) => A.recipientId === w.recipientId) === N
|
|
2738
|
+
);
|
|
2739
|
+
s(p), i(h), n == null || n(p);
|
|
2740
|
+
}, f = (h) => {
|
|
2741
|
+
if (h.length === 0) return;
|
|
2742
|
+
const p = new Set(h.map((N) => N.recipientId)), w = r.filter(
|
|
2743
|
+
(N) => !p.has(N.recipientId)
|
|
2744
|
+
);
|
|
2745
|
+
s(w), o(h), n == null || n(w);
|
|
2746
|
+
}, u = (h) => {
|
|
2747
|
+
h.length !== 0 && (s(h), n == null || n(h));
|
|
2748
|
+
}, m = async (h) => {
|
|
2749
|
+
(await e(h)).forEach((w) => {
|
|
2750
|
+
var N;
|
|
2751
|
+
(N = c.current) == null || N.addItem(w);
|
|
2752
|
+
});
|
|
2753
|
+
};
|
|
2754
|
+
return X(() => {
|
|
2755
|
+
s(t ?? []);
|
|
2756
|
+
}, [t, s]), X(() => () => {
|
|
2757
|
+
l();
|
|
2758
|
+
}, [l]), {
|
|
2759
|
+
handleAddItems: a,
|
|
2760
|
+
handleDeleteItems: f,
|
|
2761
|
+
handleUpdateItems: u,
|
|
2762
|
+
handleSearchResultsChange: m,
|
|
2763
|
+
setUsersCollection: s,
|
|
2764
|
+
addUsersToAdd: i,
|
|
2765
|
+
addUsersToDelete: o,
|
|
2766
|
+
userRightsListRef: c
|
|
2767
|
+
};
|
|
2768
|
+
};
|
|
2769
|
+
function $i({
|
|
2770
|
+
wizardData: e,
|
|
2771
|
+
updateWizardData: t,
|
|
2772
|
+
collection: n,
|
|
2773
|
+
onSharingsChange: r
|
|
2774
|
+
}) {
|
|
2775
|
+
var O;
|
|
2776
|
+
const { appCode: s } = ft(), { t: i } = ht(s), { currentStep: o } = jt(), l = o < 0 ? 0 : o, c = pn(), a = Dt(() => {
|
|
2777
|
+
var b, E;
|
|
2778
|
+
return (b = e == null ? void 0 : e.sharings) != null && b.length ? e.sharings : (E = n == null ? void 0 : n.sharings) != null && E.length ? n.sharings.map(Pi) : [];
|
|
2779
|
+
}, [n == null ? void 0 : n.sharings, e == null ? void 0 : e.sharings]), {
|
|
2780
|
+
state: { searchResults: f, searchInputValue: u },
|
|
2781
|
+
isSearchLoading: m,
|
|
2782
|
+
isAddingMembers: h,
|
|
2783
|
+
hasSearchNoResults: p,
|
|
2784
|
+
searchMinLength: w,
|
|
2785
|
+
handleSearchInputChange: N,
|
|
2786
|
+
handleSearchSubmit: L
|
|
2787
|
+
} = Bi(), {
|
|
2788
|
+
handleAddItems: A,
|
|
2789
|
+
handleDeleteItems: P,
|
|
2790
|
+
handleUpdateItems: U,
|
|
2791
|
+
handleSearchResultsChange: S,
|
|
2792
|
+
userRightsListRef: D
|
|
2793
|
+
} = qi({
|
|
2794
|
+
handleSearchSubmit: L,
|
|
2795
|
+
initialSharings: a,
|
|
2796
|
+
onSharingsChange: (b) => {
|
|
2797
|
+
t == null || t({ sharings: b }), r == null || r(b);
|
|
2798
|
+
}
|
|
2799
|
+
}), v = h ? [
|
|
2800
|
+
{
|
|
2801
|
+
value: "loading",
|
|
2802
|
+
label: i("community.search.addingMembers"),
|
|
2803
|
+
disabled: !0
|
|
2804
|
+
}
|
|
2805
|
+
] : f ?? [];
|
|
2806
|
+
return /* @__PURE__ */ B(K, { className: "m-16 gap-24", children: [
|
|
2807
|
+
/* @__PURE__ */ B(K.Col, { sm: "4", md: "8", lg: "3", xl: "5", children: [
|
|
2808
|
+
/* @__PURE__ */ B(tt, { gap: "16", direction: "column", children: [
|
|
2809
|
+
/* @__PURE__ */ d(yn, { currentStep: l, nbSteps: 2 }),
|
|
2810
|
+
/* @__PURE__ */ d(or, { title: i("collection.wizard.members.title") })
|
|
2811
|
+
] }),
|
|
2812
|
+
/* @__PURE__ */ d(
|
|
2813
|
+
Nr,
|
|
2814
|
+
{
|
|
2815
|
+
"data-testid": "collect-create-add-user-input-search",
|
|
2816
|
+
value: u,
|
|
2817
|
+
placeholder: i("collection.user.search.placeholder"),
|
|
2818
|
+
isLoading: m,
|
|
2819
|
+
noResult: p,
|
|
2820
|
+
options: v,
|
|
2821
|
+
searchMinLength: w,
|
|
2822
|
+
onSearchInputChange: N,
|
|
2823
|
+
onSearchResultsChange: S
|
|
2824
|
+
}
|
|
2825
|
+
),
|
|
2826
|
+
/* @__PURE__ */ d(Pr, { type: "info", className: "mt-24", children: /* @__PURE__ */ d(
|
|
2827
|
+
Br,
|
|
2828
|
+
{
|
|
2829
|
+
t: i,
|
|
2830
|
+
i18nKey: "collection.wizard.members.alert.message",
|
|
2831
|
+
components: {
|
|
2832
|
+
strong: /* @__PURE__ */ d("strong", {})
|
|
2833
|
+
}
|
|
2834
|
+
}
|
|
2835
|
+
) })
|
|
2836
|
+
] }),
|
|
2837
|
+
/* @__PURE__ */ d(K.Col, { sm: "4", md: "8", lg: "5", xl: "7", children: /* @__PURE__ */ d(
|
|
2838
|
+
kr,
|
|
2839
|
+
{
|
|
2840
|
+
"data-testid": "collect-create-add-user-table",
|
|
2841
|
+
ref: D,
|
|
2842
|
+
initialSharings: a,
|
|
2843
|
+
isCreating: !!e,
|
|
2844
|
+
isLoading: !1,
|
|
2845
|
+
isReadOnly: !1,
|
|
2846
|
+
onAddItems: A,
|
|
2847
|
+
onChange: U,
|
|
2848
|
+
onDeleteItems: P,
|
|
2849
|
+
ownerId: ((O = c.user) == null ? void 0 : O.userId) ?? "",
|
|
2850
|
+
resourceRights: {
|
|
2851
|
+
contrib: {
|
|
2852
|
+
default: !0,
|
|
2853
|
+
excludes: [],
|
|
2854
|
+
priority: 2,
|
|
2855
|
+
requires: ["contrib"],
|
|
2856
|
+
displayName: i("collection.members.right.displayName.recipient"),
|
|
2857
|
+
isReadOnlyCheckbox: !0
|
|
2858
|
+
},
|
|
2859
|
+
manager: {
|
|
2860
|
+
default: !1,
|
|
2861
|
+
excludes: [],
|
|
2862
|
+
priority: 4,
|
|
2863
|
+
requires: ["contrib", "manager"],
|
|
2864
|
+
displayName: i("collection.members.right.displayName.manager")
|
|
2865
|
+
}
|
|
2866
|
+
}
|
|
2867
|
+
}
|
|
2868
|
+
) })
|
|
2869
|
+
] });
|
|
2870
|
+
}
|
|
2871
|
+
const cr = mr(null), Di = () => {
|
|
2872
|
+
const e = yr(cr);
|
|
2873
|
+
if (!e)
|
|
2874
|
+
throw new Error("Cannot be rendered outside the Wizard Layout");
|
|
2875
|
+
return e;
|
|
2876
|
+
}, Gi = "/collect/api", z = new Wr({
|
|
2877
|
+
httpService: Ne.http(),
|
|
2878
|
+
baseUrl: Gi
|
|
2879
|
+
}), oe = {
|
|
2880
|
+
getCollections: (e) => z.getCollections(e),
|
|
2881
|
+
getCollectionsToSubmit: (e) => z.getCollectionsToSubmit(e),
|
|
2882
|
+
getCollection: (e) => z.getCollection(e),
|
|
2883
|
+
createCollection: (e) => z.createCollection(e),
|
|
2884
|
+
updateCollection: (e, t) => z.updateCollection(e, t),
|
|
2885
|
+
deleteCollection: (e) => z.deleteCollection(e),
|
|
2886
|
+
updateSharingCollection: (e, t) => z.updateCollectionSharings(e, t)
|
|
2887
|
+
}, ar = {
|
|
2888
|
+
base: ["collections"]
|
|
2889
|
+
}, Ki = (e) => ({
|
|
2890
|
+
queryKey: [...ar.base, "collections", e],
|
|
2891
|
+
queryFn: ({ pageParam: t = 1 }) => oe.getCollections({
|
|
2892
|
+
...e,
|
|
2893
|
+
size: Ei,
|
|
2894
|
+
page: t
|
|
2895
|
+
}),
|
|
2896
|
+
staleTime: 5e3,
|
|
2897
|
+
initialPageParam: 1,
|
|
2898
|
+
refetchOnMount: !0,
|
|
2899
|
+
getNextPageParam: (t) => {
|
|
2900
|
+
const { currentPage: n, totalPages: r } = t.meta || {};
|
|
2901
|
+
return n < r ? n + 1 : void 0;
|
|
2902
|
+
}
|
|
2903
|
+
}), Go = (e) => wn(Ki(e)), ji = (e) => ({
|
|
2904
|
+
queryKey: [...ar.base, "collectionsToSubmit", e],
|
|
2905
|
+
queryFn: ({ pageParam: t = 1 }) => oe.getCollectionsToSubmit({ ...e, page: t }),
|
|
2906
|
+
staleTime: 5e3,
|
|
2907
|
+
initialPageParam: 1,
|
|
2908
|
+
refetchOnMount: !0,
|
|
2909
|
+
getNextPageParam: (t) => {
|
|
2910
|
+
const { currentPage: n, totalPages: r } = t.meta || {};
|
|
2911
|
+
return n < r ? n + 1 : void 0;
|
|
2912
|
+
}
|
|
2913
|
+
}), Ko = (e) => wn(ji(e)), Qi = (e) => ({
|
|
2914
|
+
queryKey: ["collection", e],
|
|
2915
|
+
queryFn: () => oe.getCollection(e)
|
|
2916
|
+
}), jo = (e) => _r({
|
|
2917
|
+
...Qi(e),
|
|
2918
|
+
enabled: !!e
|
|
2919
|
+
}), Hi = () => {
|
|
2920
|
+
const e = Z();
|
|
2921
|
+
return dt({
|
|
2922
|
+
mutationFn: (t) => oe.createCollection(t),
|
|
2923
|
+
onSuccess: () => {
|
|
2924
|
+
e.invalidateQueries({ queryKey: ["collections"] });
|
|
2925
|
+
}
|
|
2926
|
+
});
|
|
2927
|
+
}, Qo = () => {
|
|
2928
|
+
const e = Z();
|
|
2929
|
+
return dt({
|
|
2930
|
+
mutationFn: ({ id: t, data: n }) => oe.updateCollection(t, n),
|
|
2931
|
+
onSuccess: (t, n) => {
|
|
2932
|
+
e.invalidateQueries({ queryKey: ["collections"] }), e.invalidateQueries({ queryKey: ["collection", n.id] });
|
|
2933
|
+
}
|
|
2934
|
+
});
|
|
2935
|
+
}, Ho = () => {
|
|
2936
|
+
const e = Z();
|
|
2937
|
+
return dt({
|
|
2938
|
+
mutationFn: (t) => oe.deleteCollection(t),
|
|
2939
|
+
onSuccess: () => {
|
|
2940
|
+
e.invalidateQueries({ queryKey: ["collections"] });
|
|
2941
|
+
}
|
|
2942
|
+
});
|
|
2943
|
+
}, Wo = () => {
|
|
2944
|
+
const e = Z();
|
|
2945
|
+
return dt({
|
|
2946
|
+
mutationFn: ({
|
|
2947
|
+
id: t,
|
|
2948
|
+
data: n
|
|
2949
|
+
}) => oe.updateSharingCollection(t, n),
|
|
2950
|
+
onSuccess: (t, n) => {
|
|
2951
|
+
e.invalidateQueries({ queryKey: ["collections"] }), e.invalidateQueries({ queryKey: ["collection", n.id] });
|
|
2952
|
+
}
|
|
2953
|
+
});
|
|
2954
|
+
}, an = ({
|
|
2955
|
+
children: e
|
|
2956
|
+
}) => {
|
|
2957
|
+
const t = ee(null), { appCode: n } = ft(), { t: r } = ht(n), s = Mr(), { currentStep: i, backStep: o, nextStep: l } = jt(), { lg: c } = Lr(), { wizardData: a, resetWizardData: f } = Di(), u = Hi(), m = ir.use.isFormValid(), h = ut(), [p, w] = $t(!1);
|
|
2958
|
+
gr(() => {
|
|
2959
|
+
var A;
|
|
2960
|
+
(A = t.current) == null || A.scrollIntoView({
|
|
2961
|
+
behavior: "smooth",
|
|
2962
|
+
block: "center"
|
|
2963
|
+
});
|
|
2964
|
+
}, [i]);
|
|
2965
|
+
const N = () => {
|
|
2966
|
+
f == null || f(), h("/");
|
|
2967
|
+
}, L = async () => {
|
|
2968
|
+
try {
|
|
2969
|
+
w(!0);
|
|
2970
|
+
const A = await u.mutateAsync({
|
|
2971
|
+
name: a.title,
|
|
2972
|
+
content: a.description,
|
|
2973
|
+
deadline: a.deadline ?? /* @__PURE__ */ new Date(),
|
|
2974
|
+
// FIXME: faire une vraie traduction dans le format attendu par le backend avant envoi
|
|
2975
|
+
attachments: a.attachments.map((P) => ({
|
|
2976
|
+
name: P.name,
|
|
2977
|
+
type: Xr.ATTACHMENT,
|
|
2978
|
+
uri: P.filename,
|
|
2979
|
+
mimeType: P.contentType
|
|
2980
|
+
})),
|
|
2981
|
+
sharings: a.sharings.map(lr)
|
|
2982
|
+
});
|
|
2983
|
+
s.success(r("collection.toast.success.collection.create"), {
|
|
2984
|
+
duration: 1e4,
|
|
2985
|
+
isDismissible: !0
|
|
2986
|
+
}), h(`/list-collections/id/${A.id}`), f();
|
|
2987
|
+
} catch (A) {
|
|
2988
|
+
s.error(r("collection.toast.error.collection.create"), {
|
|
2989
|
+
duration: 1e4,
|
|
2990
|
+
isDismissible: !0
|
|
2991
|
+
}), console.log(A);
|
|
2992
|
+
} finally {
|
|
2993
|
+
w(!1);
|
|
2994
|
+
}
|
|
2995
|
+
};
|
|
2996
|
+
return /* @__PURE__ */ B(dn, { children: [
|
|
2997
|
+
/* @__PURE__ */ d(K, { className: "flex-grow-1 gap-64 px-md-8 px-lg-48 position-relative", children: /* @__PURE__ */ d(K.Col, { sm: "4", md: "8", xl: "12", className: `${c && "ms-64"}`, children: /* @__PURE__ */ d(
|
|
2998
|
+
tt,
|
|
2999
|
+
{
|
|
3000
|
+
ref: t,
|
|
3001
|
+
direction: "column",
|
|
3002
|
+
gap: "16",
|
|
3003
|
+
className: "h-100 py-24 pb-lg-48 pt-lg-32",
|
|
3004
|
+
children: e
|
|
3005
|
+
}
|
|
3006
|
+
) }) }),
|
|
3007
|
+
i === 1 ? /* @__PURE__ */ B(tt, { justify: "end", className: "mt-auto px-48 pb-64 gap-16", children: [
|
|
3008
|
+
/* @__PURE__ */ d(
|
|
3009
|
+
J,
|
|
3010
|
+
{
|
|
3011
|
+
"data-testid": "collect-add-attachments-button-previous",
|
|
3012
|
+
variant: "ghost",
|
|
3013
|
+
color: "tertiary",
|
|
3014
|
+
leftIcon: /* @__PURE__ */ d(Qr, {}),
|
|
3015
|
+
onClick: o,
|
|
3016
|
+
children: r("collection.previous")
|
|
3017
|
+
}
|
|
3018
|
+
),
|
|
3019
|
+
/* @__PURE__ */ d(
|
|
3020
|
+
J,
|
|
3021
|
+
{
|
|
3022
|
+
"data-testid": "collect-add-attachments-button-create-ignore-share",
|
|
3023
|
+
variant: "outline",
|
|
3024
|
+
color: "primary",
|
|
3025
|
+
isLoading: p,
|
|
3026
|
+
loadingPosition: "right",
|
|
3027
|
+
onClick: () => L(),
|
|
3028
|
+
children: r("collection.wizard.button.create.ignore.share")
|
|
3029
|
+
}
|
|
3030
|
+
),
|
|
3031
|
+
/* @__PURE__ */ d(
|
|
3032
|
+
J,
|
|
3033
|
+
{
|
|
3034
|
+
"data-testid": "collect-add-attachments-button-create-collect",
|
|
3035
|
+
variant: "filled",
|
|
3036
|
+
color: "primary",
|
|
3037
|
+
isLoading: p,
|
|
3038
|
+
loadingPosition: "right",
|
|
3039
|
+
rightIcon: /* @__PURE__ */ d(Yt, {}),
|
|
3040
|
+
onClick: () => L(),
|
|
3041
|
+
children: r("collection.wizard.button.create.collect")
|
|
3042
|
+
}
|
|
3043
|
+
)
|
|
3044
|
+
] }) : /* @__PURE__ */ B(tt, { justify: "end", className: "mt-auto pb-64 gap-16", children: [
|
|
3045
|
+
/* @__PURE__ */ d(
|
|
3046
|
+
J,
|
|
3047
|
+
{
|
|
3048
|
+
"data-testid": "collect-add-attachments-button-cancel",
|
|
3049
|
+
variant: "ghost",
|
|
3050
|
+
color: "tertiary",
|
|
3051
|
+
onClick: N,
|
|
3052
|
+
children: r("collection.cancel")
|
|
3053
|
+
}
|
|
3054
|
+
),
|
|
3055
|
+
/* @__PURE__ */ d(
|
|
3056
|
+
J,
|
|
3057
|
+
{
|
|
3058
|
+
"data-testid": "collect-add-attachments-button-next",
|
|
3059
|
+
variant: "filled",
|
|
3060
|
+
color: "primary",
|
|
3061
|
+
rightIcon: /* @__PURE__ */ d(Yt, {}),
|
|
3062
|
+
onClick: l,
|
|
3063
|
+
type: "submit",
|
|
3064
|
+
form: "formCreateCollection",
|
|
3065
|
+
disabled: !m,
|
|
3066
|
+
children: r("collection.next")
|
|
3067
|
+
}
|
|
3068
|
+
)
|
|
3069
|
+
] })
|
|
3070
|
+
] });
|
|
3071
|
+
};
|
|
3072
|
+
function Wi() {
|
|
3073
|
+
const { wizardData: e, updateWizardData: t, resetWizardData: n } = Oi(), r = Dt(
|
|
3074
|
+
() => ({
|
|
3075
|
+
wizardData: e,
|
|
3076
|
+
updateWizardData: t,
|
|
3077
|
+
resetWizardData: n
|
|
3078
|
+
}),
|
|
3079
|
+
[e, t, n]
|
|
3080
|
+
);
|
|
3081
|
+
return /* @__PURE__ */ d(cr.Provider, { value: r, children: /* @__PURE__ */ B(wr, { children: [
|
|
3082
|
+
/* @__PURE__ */ d(
|
|
3083
|
+
Xt,
|
|
3084
|
+
{
|
|
3085
|
+
path: ue[0],
|
|
3086
|
+
element: /* @__PURE__ */ d(an, { children: /* @__PURE__ */ d(
|
|
3087
|
+
Ri,
|
|
3088
|
+
{
|
|
3089
|
+
wizardData: e,
|
|
3090
|
+
updateWizardData: t
|
|
3091
|
+
}
|
|
3092
|
+
) })
|
|
3093
|
+
}
|
|
3094
|
+
),
|
|
3095
|
+
/* @__PURE__ */ d(
|
|
3096
|
+
Xt,
|
|
3097
|
+
{
|
|
3098
|
+
path: ue[1],
|
|
3099
|
+
element: /* @__PURE__ */ d(an, { children: /* @__PURE__ */ d(
|
|
3100
|
+
$i,
|
|
3101
|
+
{
|
|
3102
|
+
wizardData: e,
|
|
3103
|
+
updateWizardData: t
|
|
3104
|
+
}
|
|
3105
|
+
) })
|
|
3106
|
+
}
|
|
3107
|
+
)
|
|
3108
|
+
] }) });
|
|
3109
|
+
}
|
|
3110
|
+
function Xi() {
|
|
3111
|
+
return /* @__PURE__ */ d(Wi, {});
|
|
3112
|
+
}
|
|
3113
|
+
const ur = (e) => [
|
|
3114
|
+
{
|
|
3115
|
+
path: "/",
|
|
3116
|
+
async lazy() {
|
|
3117
|
+
const { loader: t, Root: n } = await import("./Root--z47Brfh.js");
|
|
3118
|
+
return { loader: t, Component: n };
|
|
3119
|
+
},
|
|
3120
|
+
children: [
|
|
3121
|
+
{
|
|
3122
|
+
async lazy() {
|
|
3123
|
+
const { loader: t, Component: n } = await import("./CollectionsLayout-DVYmui3o.js");
|
|
3124
|
+
return { loader: t, Component: n };
|
|
3125
|
+
},
|
|
3126
|
+
children: [
|
|
3127
|
+
{
|
|
3128
|
+
index: !0,
|
|
3129
|
+
async lazy() {
|
|
3130
|
+
const { loader: t, CollectionsList: n } = await import("./CollectionsList-Ba1LoCCN.js");
|
|
3131
|
+
return {
|
|
3132
|
+
loader: () => t(e),
|
|
3133
|
+
Component: n
|
|
3134
|
+
};
|
|
3135
|
+
}
|
|
3136
|
+
},
|
|
3137
|
+
{
|
|
3138
|
+
path: "list-collections",
|
|
3139
|
+
async lazy() {
|
|
3140
|
+
const { loader: t, CollectionsList: n } = await import("./CollectionsList-Ba1LoCCN.js");
|
|
3141
|
+
return {
|
|
3142
|
+
loader: () => t(e),
|
|
3143
|
+
Component: n
|
|
3144
|
+
};
|
|
3145
|
+
}
|
|
3146
|
+
},
|
|
3147
|
+
{
|
|
3148
|
+
path: "list-submissions",
|
|
3149
|
+
async lazy() {
|
|
3150
|
+
const { loader: t, SubmissionsList: n } = await import("./SubmissionList-Db_nRSqg.js");
|
|
3151
|
+
return {
|
|
3152
|
+
loader: () => t(e),
|
|
3153
|
+
Component: n
|
|
3154
|
+
};
|
|
3155
|
+
}
|
|
3156
|
+
}
|
|
3157
|
+
]
|
|
3158
|
+
},
|
|
3159
|
+
{
|
|
3160
|
+
path: "create/*",
|
|
3161
|
+
element: /* @__PURE__ */ d(Xi, {})
|
|
3162
|
+
},
|
|
3163
|
+
{
|
|
3164
|
+
path: "list-collections/id/:collectionId",
|
|
3165
|
+
async lazy() {
|
|
3166
|
+
const { loader: t, Collection: n } = await import("./Collection-CUCjNGrr.js");
|
|
3167
|
+
return { loader: () => t(e), Component: n };
|
|
3168
|
+
}
|
|
3169
|
+
},
|
|
3170
|
+
{
|
|
3171
|
+
path: "list-collections/id/:collectionId/submission/:submissionId",
|
|
3172
|
+
async lazy() {
|
|
3173
|
+
const { loader: t, Submission: n } = await import("./Submission-AzDGz_dM.js");
|
|
3174
|
+
return { loader: () => t(e), Component: n };
|
|
3175
|
+
}
|
|
3176
|
+
},
|
|
3177
|
+
{
|
|
3178
|
+
path: "id/:collectionId/members",
|
|
3179
|
+
async lazy() {
|
|
3180
|
+
const { loader: t, MembersEdit: n } = await import("./MembersEdit-CblCChDS.js");
|
|
3181
|
+
return { loader: () => t(e), Component: n };
|
|
3182
|
+
}
|
|
3183
|
+
},
|
|
3184
|
+
{
|
|
3185
|
+
path: "id/:collectionId/form",
|
|
3186
|
+
async lazy() {
|
|
3187
|
+
const { loader: t, FormEdit: n } = await import("./FormEdit-DZFkw7z9.js");
|
|
3188
|
+
return { loader: () => t(e), Component: n };
|
|
3189
|
+
}
|
|
3190
|
+
}
|
|
3191
|
+
],
|
|
3192
|
+
errorElement: /* @__PURE__ */ d(Ai, {})
|
|
3193
|
+
},
|
|
3194
|
+
{ path: "*", element: /* @__PURE__ */ d(Ii, {}) }
|
|
3195
|
+
], Yi = "./", Xo = (e) => Sr(ur(e), {
|
|
3196
|
+
basename: Yi
|
|
3197
|
+
}), Yo = ({ className: e }) => {
|
|
3198
|
+
const t = ee(null), n = ee(null), r = ee(null), s = ee(process.env.NODE_ENV === "development"), i = (o, l = "collect") => o.map((c, a) => {
|
|
3199
|
+
const f = c.id ?? `${l}-${c.path ?? "root"}-${a}`, u = {
|
|
3200
|
+
...c,
|
|
3201
|
+
id: f
|
|
3202
|
+
};
|
|
3203
|
+
return c.children && (u.children = i(c.children, f)), u;
|
|
3204
|
+
});
|
|
3205
|
+
return X(() => {
|
|
3206
|
+
if (t.current)
|
|
3207
|
+
return n.current || (n.current = pr(t.current)), r.current || (r.current = Cr(
|
|
3208
|
+
i(ur(qt)),
|
|
3209
|
+
{ initialEntries: ["/"] }
|
|
3210
|
+
)), n.current.render(
|
|
3211
|
+
/* @__PURE__ */ B(bn, { client: qt, children: [
|
|
3212
|
+
/* @__PURE__ */ d(mn, { params: { app: "collect" }, children: /* @__PURE__ */ d(Vr, { children: /* @__PURE__ */ d(Ar, { router: r.current }) }) }),
|
|
3213
|
+
/* @__PURE__ */ d(rr, { initialIsOpen: !1 })
|
|
3214
|
+
] })
|
|
3215
|
+
), () => {
|
|
3216
|
+
if (s.current) {
|
|
3217
|
+
s.current = !1;
|
|
3218
|
+
return;
|
|
3219
|
+
}
|
|
3220
|
+
const o = n.current;
|
|
3221
|
+
n.current = null, o && setTimeout(() => o.unmount(), 0);
|
|
3222
|
+
};
|
|
3223
|
+
}, []), /* @__PURE__ */ d("div", { ref: t, className: e });
|
|
3224
|
+
};
|
|
3225
|
+
export {
|
|
3226
|
+
In as $,
|
|
3227
|
+
vo as A,
|
|
3228
|
+
Me as B,
|
|
3229
|
+
Uo as C,
|
|
3230
|
+
Fo as D,
|
|
3231
|
+
mo as E,
|
|
3232
|
+
Ri as F,
|
|
3233
|
+
Mt as G,
|
|
3234
|
+
Eo as H,
|
|
3235
|
+
Po as I,
|
|
3236
|
+
Ms as J,
|
|
3237
|
+
bo as K,
|
|
3238
|
+
ho as L,
|
|
3239
|
+
$i as M,
|
|
3240
|
+
No as N,
|
|
3241
|
+
Mo as O,
|
|
3242
|
+
Ai as P,
|
|
3243
|
+
ko as Q,
|
|
3244
|
+
Lo as R,
|
|
3245
|
+
$o as S,
|
|
3246
|
+
Vo as T,
|
|
3247
|
+
wo as U,
|
|
3248
|
+
_o as V,
|
|
3249
|
+
Tt as W,
|
|
3250
|
+
_ as X,
|
|
3251
|
+
ks as Y,
|
|
3252
|
+
Ln as Z,
|
|
3253
|
+
re as _,
|
|
3254
|
+
Ki as a,
|
|
3255
|
+
yi as a0,
|
|
3256
|
+
So as a1,
|
|
3257
|
+
Je as a2,
|
|
3258
|
+
go as a3,
|
|
3259
|
+
xs as a4,
|
|
3260
|
+
xo as a5,
|
|
3261
|
+
Io as a6,
|
|
3262
|
+
Ao as a7,
|
|
3263
|
+
et as a8,
|
|
3264
|
+
hs as a9,
|
|
3265
|
+
Ro as aa,
|
|
3266
|
+
zr as ab,
|
|
3267
|
+
Yo as ac,
|
|
3268
|
+
qo as ad,
|
|
3269
|
+
Yi as ae,
|
|
3270
|
+
qt as af,
|
|
3271
|
+
Xo as ag,
|
|
3272
|
+
Ko as b,
|
|
3273
|
+
sr as c,
|
|
3274
|
+
ji as d,
|
|
3275
|
+
jo as e,
|
|
3276
|
+
Qi as f,
|
|
3277
|
+
Ho as g,
|
|
3278
|
+
Wo as h,
|
|
3279
|
+
ce as i,
|
|
3280
|
+
Do as j,
|
|
3281
|
+
Qo as k,
|
|
3282
|
+
Bo as l,
|
|
3283
|
+
F as m,
|
|
3284
|
+
Mn as n,
|
|
3285
|
+
M as o,
|
|
3286
|
+
Tn as p,
|
|
3287
|
+
po as q,
|
|
3288
|
+
ts as r,
|
|
3289
|
+
To as s,
|
|
3290
|
+
Co as t,
|
|
3291
|
+
Go as u,
|
|
3292
|
+
Lt as v,
|
|
3293
|
+
se as w,
|
|
3294
|
+
Rs as x,
|
|
3295
|
+
Oo as y,
|
|
3296
|
+
Es as z
|
|
3297
|
+
};
|