spry-apps-dropdown 3.0.1 → 3.0.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/README.md +275 -276
- package/dist/index.cjs +15 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1349 -1332
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as x, jsxs as
|
|
1
|
+
import { jsx as x, jsxs as re, Fragment as ut } from "react/jsx-runtime";
|
|
2
2
|
import * as Oe from "react";
|
|
3
|
-
import ie, { useRef as
|
|
4
|
-
import { Box as ne, CircularProgress as ft, Typography as
|
|
3
|
+
import ie, { useRef as be, useState as ge, useLayoutEffect as Rn, useEffect as de, useCallback as he, createContext as On, useMemo as qe, useContext as In } from "react";
|
|
4
|
+
import { Box as ne, CircularProgress as ft, Typography as _e, Link as dr, List as $n, Divider as ct, ListItemButton as en, ListItemIcon as tn, Avatar as Kt, ListItemText as kn, Chip as pr, ListItemSecondaryAction as Pn, IconButton as dt, Menu as Nn, Button as mr, MenuItem as hr, Stack as Un } from "@mui/material";
|
|
5
5
|
import { AnimatePresence as Dn, motion as Ln } from "framer-motion";
|
|
6
6
|
import Mn from "@emotion/styled";
|
|
7
7
|
import "@emotion/react";
|
|
@@ -14,32 +14,32 @@ function Wn({
|
|
|
14
14
|
buttonRef: n,
|
|
15
15
|
isLoading: o = !1,
|
|
16
16
|
error: i = null,
|
|
17
|
-
onRetry:
|
|
17
|
+
onRetry: c,
|
|
18
18
|
excludeAppId: l
|
|
19
19
|
}) {
|
|
20
|
-
const f =
|
|
21
|
-
const
|
|
22
|
-
return e.find((
|
|
23
|
-
},
|
|
24
|
-
if (l &&
|
|
25
|
-
const
|
|
26
|
-
return !(
|
|
20
|
+
const f = be(null), [u, y] = ge("64px"), d = () => {
|
|
21
|
+
const g = window.location.origin;
|
|
22
|
+
return e.find((a) => a.url.startsWith(g))?.id;
|
|
23
|
+
}, h = e.filter((g) => {
|
|
24
|
+
if (l && g.id === l) return !1;
|
|
25
|
+
const a = d();
|
|
26
|
+
return !(a && g.id === a);
|
|
27
27
|
});
|
|
28
28
|
Rn(() => {
|
|
29
29
|
if (t && n?.current) {
|
|
30
|
-
const
|
|
31
|
-
|
|
30
|
+
const g = n.current.getBoundingClientRect();
|
|
31
|
+
y(`${g.bottom + 8}px`);
|
|
32
32
|
}
|
|
33
|
-
}, [t, n]),
|
|
34
|
-
const
|
|
35
|
-
f.current && !f.current.contains(
|
|
33
|
+
}, [t, n]), de(() => {
|
|
34
|
+
const g = (a) => {
|
|
35
|
+
f.current && !f.current.contains(a.target) && n?.current && !n.current.contains(a.target) && r();
|
|
36
36
|
};
|
|
37
|
-
return t && document.addEventListener("mousedown",
|
|
38
|
-
document.removeEventListener("mousedown",
|
|
37
|
+
return t && document.addEventListener("mousedown", g), () => {
|
|
38
|
+
document.removeEventListener("mousedown", g);
|
|
39
39
|
};
|
|
40
40
|
}, [t, r, n]);
|
|
41
|
-
const
|
|
42
|
-
window.open(
|
|
41
|
+
const v = (g) => {
|
|
42
|
+
window.open(g, "_blank"), r();
|
|
43
43
|
};
|
|
44
44
|
return /* @__PURE__ */ x(Dn, { children: t && /* @__PURE__ */ x(
|
|
45
45
|
Ln.div,
|
|
@@ -74,7 +74,7 @@ function Wn({
|
|
|
74
74
|
zIndex: 1e3,
|
|
75
75
|
transformOrigin: "top right"
|
|
76
76
|
},
|
|
77
|
-
children: /* @__PURE__ */
|
|
77
|
+
children: /* @__PURE__ */ re(
|
|
78
78
|
ne,
|
|
79
79
|
{
|
|
80
80
|
sx: {
|
|
@@ -85,9 +85,9 @@ function Wn({
|
|
|
85
85
|
width: "320px",
|
|
86
86
|
minHeight: "100px"
|
|
87
87
|
},
|
|
88
|
-
onClick: (
|
|
88
|
+
onClick: (g) => g.stopPropagation(),
|
|
89
89
|
children: [
|
|
90
|
-
o &&
|
|
90
|
+
o && h.length === 0 && /* @__PURE__ */ x(
|
|
91
91
|
ne,
|
|
92
92
|
{
|
|
93
93
|
sx: {
|
|
@@ -99,7 +99,7 @@ function Wn({
|
|
|
99
99
|
children: /* @__PURE__ */ x(ft, { size: 32 })
|
|
100
100
|
}
|
|
101
101
|
),
|
|
102
|
-
i &&
|
|
102
|
+
i && h.length === 0 && /* @__PURE__ */ re(
|
|
103
103
|
ne,
|
|
104
104
|
{
|
|
105
105
|
sx: {
|
|
@@ -112,7 +112,7 @@ function Wn({
|
|
|
112
112
|
},
|
|
113
113
|
children: [
|
|
114
114
|
/* @__PURE__ */ x(
|
|
115
|
-
|
|
115
|
+
_e,
|
|
116
116
|
{
|
|
117
117
|
sx: {
|
|
118
118
|
fontSize: "0.875rem",
|
|
@@ -122,11 +122,11 @@ function Wn({
|
|
|
122
122
|
children: "Failed to load apps"
|
|
123
123
|
}
|
|
124
124
|
),
|
|
125
|
-
|
|
125
|
+
c && /* @__PURE__ */ x(
|
|
126
126
|
dr,
|
|
127
127
|
{
|
|
128
128
|
component: "button",
|
|
129
|
-
onClick:
|
|
129
|
+
onClick: c,
|
|
130
130
|
sx: {
|
|
131
131
|
fontSize: "0.875rem",
|
|
132
132
|
color: "#1a73e8",
|
|
@@ -139,7 +139,7 @@ function Wn({
|
|
|
139
139
|
]
|
|
140
140
|
}
|
|
141
141
|
),
|
|
142
|
-
|
|
142
|
+
h.length > 0 && /* @__PURE__ */ x(
|
|
143
143
|
ne,
|
|
144
144
|
{
|
|
145
145
|
sx: {
|
|
@@ -147,10 +147,10 @@ function Wn({
|
|
|
147
147
|
gridTemplateColumns: "repeat(3, 1fr)",
|
|
148
148
|
gap: 1
|
|
149
149
|
},
|
|
150
|
-
children:
|
|
150
|
+
children: h.map((g) => /* @__PURE__ */ re(
|
|
151
151
|
dr,
|
|
152
152
|
{
|
|
153
|
-
onClick: () =>
|
|
153
|
+
onClick: () => v(g.url),
|
|
154
154
|
sx: {
|
|
155
155
|
display: "flex",
|
|
156
156
|
flexDirection: "column",
|
|
@@ -166,14 +166,14 @@ function Wn({
|
|
|
166
166
|
bgcolor: "#f1f3f4"
|
|
167
167
|
}
|
|
168
168
|
},
|
|
169
|
-
title:
|
|
169
|
+
title: g.description,
|
|
170
170
|
children: [
|
|
171
|
-
/* @__PURE__ */ x(ne, { sx: { pb: 1 }, children:
|
|
171
|
+
/* @__PURE__ */ x(ne, { sx: { pb: 1 }, children: g.iconUrl ? /* @__PURE__ */ x(
|
|
172
172
|
ne,
|
|
173
173
|
{
|
|
174
174
|
component: "img",
|
|
175
|
-
src:
|
|
176
|
-
alt:
|
|
175
|
+
src: g.iconUrl,
|
|
176
|
+
alt: g.name,
|
|
177
177
|
sx: {
|
|
178
178
|
width: "32px",
|
|
179
179
|
height: "32px",
|
|
@@ -187,17 +187,17 @@ function Wn({
|
|
|
187
187
|
width: "32px",
|
|
188
188
|
height: "32px",
|
|
189
189
|
borderRadius: "6px",
|
|
190
|
-
bgcolor:
|
|
190
|
+
bgcolor: g.color || "#4285f4",
|
|
191
191
|
display: "flex",
|
|
192
192
|
alignItems: "center",
|
|
193
193
|
justifyContent: "center",
|
|
194
194
|
fontSize: "1.5rem"
|
|
195
195
|
},
|
|
196
|
-
children:
|
|
196
|
+
children: g.name.charAt(0)
|
|
197
197
|
}
|
|
198
198
|
) }),
|
|
199
199
|
/* @__PURE__ */ x(
|
|
200
|
-
|
|
200
|
+
_e,
|
|
201
201
|
{
|
|
202
202
|
sx: {
|
|
203
203
|
fontSize: "0.75rem",
|
|
@@ -206,12 +206,12 @@ function Wn({
|
|
|
206
206
|
textAlign: "center",
|
|
207
207
|
lineHeight: 1.2
|
|
208
208
|
},
|
|
209
|
-
children:
|
|
209
|
+
children: g.name
|
|
210
210
|
}
|
|
211
211
|
)
|
|
212
212
|
]
|
|
213
213
|
},
|
|
214
|
-
|
|
214
|
+
g.id
|
|
215
215
|
))
|
|
216
216
|
}
|
|
217
217
|
)
|
|
@@ -226,62 +226,62 @@ function Kn(e, t = {}) {
|
|
|
226
226
|
const {
|
|
227
227
|
refetchInterval: r = Gn,
|
|
228
228
|
cacheTime: n = Yn
|
|
229
|
-
} = t, [o, i] =
|
|
229
|
+
} = t, [o, i] = ge([]), [c, l] = ge(!0), [f, u] = ge(null), y = be(null), d = be(null), h = he(() => {
|
|
230
230
|
try {
|
|
231
|
-
const
|
|
232
|
-
if (!
|
|
233
|
-
const
|
|
234
|
-
return Date.now() -
|
|
235
|
-
} catch (
|
|
236
|
-
return console.error("Error loading from cache:",
|
|
231
|
+
const a = localStorage.getItem($t);
|
|
232
|
+
if (!a) return null;
|
|
233
|
+
const b = JSON.parse(a);
|
|
234
|
+
return Date.now() - b.timestamp < n ? b.apps : (localStorage.removeItem($t), null);
|
|
235
|
+
} catch (a) {
|
|
236
|
+
return console.error("Error loading from cache:", a), null;
|
|
237
237
|
}
|
|
238
|
-
}, [n]),
|
|
238
|
+
}, [n]), v = he((a) => {
|
|
239
239
|
try {
|
|
240
|
-
const
|
|
241
|
-
apps:
|
|
240
|
+
const b = {
|
|
241
|
+
apps: a,
|
|
242
242
|
timestamp: Date.now()
|
|
243
243
|
};
|
|
244
|
-
localStorage.setItem($t, JSON.stringify(
|
|
245
|
-
} catch (
|
|
246
|
-
console.error("Error saving to cache:",
|
|
244
|
+
localStorage.setItem($t, JSON.stringify(b));
|
|
245
|
+
} catch (b) {
|
|
246
|
+
console.error("Error saving to cache:", b);
|
|
247
247
|
}
|
|
248
|
-
}, []),
|
|
248
|
+
}, []), g = he(async () => {
|
|
249
249
|
d.current && d.current.abort(), d.current = new AbortController();
|
|
250
250
|
try {
|
|
251
251
|
l(!0), u(null);
|
|
252
|
-
const
|
|
252
|
+
const a = await fetch(`${e}/api/apps`, {
|
|
253
253
|
signal: d.current.signal,
|
|
254
254
|
headers: {
|
|
255
255
|
Accept: "application/json"
|
|
256
256
|
}
|
|
257
257
|
});
|
|
258
|
-
if (!
|
|
259
|
-
throw new Error(`HTTP error! status: ${
|
|
260
|
-
const
|
|
261
|
-
i(
|
|
262
|
-
} catch (
|
|
263
|
-
if (
|
|
258
|
+
if (!a.ok)
|
|
259
|
+
throw new Error(`HTTP error! status: ${a.status}`);
|
|
260
|
+
const b = await a.json();
|
|
261
|
+
i(b.apps), v(b.apps), u(null);
|
|
262
|
+
} catch (a) {
|
|
263
|
+
if (a instanceof Error && a.name === "AbortError")
|
|
264
264
|
return;
|
|
265
|
-
const
|
|
266
|
-
u(
|
|
267
|
-
const
|
|
268
|
-
|
|
265
|
+
const b = a instanceof Error ? a.message : "Failed to fetch apps";
|
|
266
|
+
u(b), console.error("Error fetching apps:", a);
|
|
267
|
+
const C = h();
|
|
268
|
+
C && i(C);
|
|
269
269
|
} finally {
|
|
270
270
|
l(!1);
|
|
271
271
|
}
|
|
272
|
-
}, [e,
|
|
273
|
-
return
|
|
274
|
-
const
|
|
275
|
-
return
|
|
276
|
-
|
|
272
|
+
}, [e, h, v]);
|
|
273
|
+
return de(() => {
|
|
274
|
+
const a = h();
|
|
275
|
+
return a && (i(a), l(!1)), g(), r > 0 && (y.current = window.setInterval(() => {
|
|
276
|
+
g();
|
|
277
277
|
}, r)), () => {
|
|
278
|
-
|
|
278
|
+
y.current && window.clearInterval(y.current), d.current && d.current.abort();
|
|
279
279
|
};
|
|
280
280
|
}, [e, r, n]), {
|
|
281
281
|
apps: o,
|
|
282
|
-
isLoading:
|
|
282
|
+
isLoading: c,
|
|
283
283
|
error: f,
|
|
284
|
-
refetch:
|
|
284
|
+
refetch: g
|
|
285
285
|
};
|
|
286
286
|
}
|
|
287
287
|
function Hn(e) {
|
|
@@ -292,171 +292,171 @@ var gr;
|
|
|
292
292
|
function qn() {
|
|
293
293
|
if (gr) return K;
|
|
294
294
|
gr = 1;
|
|
295
|
-
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.portal"), r = /* @__PURE__ */ Symbol.for("react.fragment"), n = /* @__PURE__ */ Symbol.for("react.strict_mode"), o = /* @__PURE__ */ Symbol.for("react.profiler"), i = /* @__PURE__ */ Symbol.for("react.consumer"),
|
|
296
|
-
function
|
|
297
|
-
if (typeof
|
|
298
|
-
var
|
|
299
|
-
switch (
|
|
295
|
+
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.portal"), r = /* @__PURE__ */ Symbol.for("react.fragment"), n = /* @__PURE__ */ Symbol.for("react.strict_mode"), o = /* @__PURE__ */ Symbol.for("react.profiler"), i = /* @__PURE__ */ Symbol.for("react.consumer"), c = /* @__PURE__ */ Symbol.for("react.context"), l = /* @__PURE__ */ Symbol.for("react.forward_ref"), f = /* @__PURE__ */ Symbol.for("react.suspense"), u = /* @__PURE__ */ Symbol.for("react.suspense_list"), y = /* @__PURE__ */ Symbol.for("react.memo"), d = /* @__PURE__ */ Symbol.for("react.lazy"), h = /* @__PURE__ */ Symbol.for("react.view_transition"), v = /* @__PURE__ */ Symbol.for("react.client.reference");
|
|
296
|
+
function g(a) {
|
|
297
|
+
if (typeof a == "object" && a !== null) {
|
|
298
|
+
var b = a.$$typeof;
|
|
299
|
+
switch (b) {
|
|
300
300
|
case e:
|
|
301
|
-
switch (
|
|
301
|
+
switch (a = a.type, a) {
|
|
302
302
|
case r:
|
|
303
303
|
case o:
|
|
304
304
|
case n:
|
|
305
305
|
case f:
|
|
306
306
|
case u:
|
|
307
|
-
case
|
|
308
|
-
return
|
|
307
|
+
case h:
|
|
308
|
+
return a;
|
|
309
309
|
default:
|
|
310
|
-
switch (
|
|
311
|
-
case
|
|
310
|
+
switch (a = a && a.$$typeof, a) {
|
|
311
|
+
case c:
|
|
312
312
|
case l:
|
|
313
313
|
case d:
|
|
314
|
-
case
|
|
315
|
-
return
|
|
314
|
+
case y:
|
|
315
|
+
return a;
|
|
316
316
|
case i:
|
|
317
|
-
return
|
|
317
|
+
return a;
|
|
318
318
|
default:
|
|
319
|
-
return
|
|
319
|
+
return b;
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
322
|
case t:
|
|
323
|
-
return
|
|
323
|
+
return b;
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
|
-
return K.ContextConsumer = i, K.ContextProvider =
|
|
328
|
-
return
|
|
329
|
-
}, K.isContextProvider = function(
|
|
330
|
-
return
|
|
331
|
-
}, K.isElement = function(
|
|
332
|
-
return typeof
|
|
333
|
-
}, K.isForwardRef = function(
|
|
334
|
-
return
|
|
335
|
-
}, K.isFragment = function(
|
|
336
|
-
return
|
|
337
|
-
}, K.isLazy = function(
|
|
338
|
-
return
|
|
339
|
-
}, K.isMemo = function(
|
|
340
|
-
return
|
|
341
|
-
}, K.isPortal = function(
|
|
342
|
-
return
|
|
343
|
-
}, K.isProfiler = function(
|
|
344
|
-
return
|
|
345
|
-
}, K.isStrictMode = function(
|
|
346
|
-
return
|
|
347
|
-
}, K.isSuspense = function(
|
|
348
|
-
return
|
|
349
|
-
}, K.isSuspenseList = function(
|
|
350
|
-
return
|
|
351
|
-
}, K.isValidElementType = function(
|
|
352
|
-
return typeof
|
|
353
|
-
}, K.typeOf =
|
|
327
|
+
return K.ContextConsumer = i, K.ContextProvider = c, K.Element = e, K.ForwardRef = l, K.Fragment = r, K.Lazy = d, K.Memo = y, K.Portal = t, K.Profiler = o, K.StrictMode = n, K.Suspense = f, K.SuspenseList = u, K.isContextConsumer = function(a) {
|
|
328
|
+
return g(a) === i;
|
|
329
|
+
}, K.isContextProvider = function(a) {
|
|
330
|
+
return g(a) === c;
|
|
331
|
+
}, K.isElement = function(a) {
|
|
332
|
+
return typeof a == "object" && a !== null && a.$$typeof === e;
|
|
333
|
+
}, K.isForwardRef = function(a) {
|
|
334
|
+
return g(a) === l;
|
|
335
|
+
}, K.isFragment = function(a) {
|
|
336
|
+
return g(a) === r;
|
|
337
|
+
}, K.isLazy = function(a) {
|
|
338
|
+
return g(a) === d;
|
|
339
|
+
}, K.isMemo = function(a) {
|
|
340
|
+
return g(a) === y;
|
|
341
|
+
}, K.isPortal = function(a) {
|
|
342
|
+
return g(a) === t;
|
|
343
|
+
}, K.isProfiler = function(a) {
|
|
344
|
+
return g(a) === o;
|
|
345
|
+
}, K.isStrictMode = function(a) {
|
|
346
|
+
return g(a) === n;
|
|
347
|
+
}, K.isSuspense = function(a) {
|
|
348
|
+
return g(a) === f;
|
|
349
|
+
}, K.isSuspenseList = function(a) {
|
|
350
|
+
return g(a) === u;
|
|
351
|
+
}, K.isValidElementType = function(a) {
|
|
352
|
+
return typeof a == "string" || typeof a == "function" || a === r || a === o || a === n || a === f || a === u || typeof a == "object" && a !== null && (a.$$typeof === d || a.$$typeof === y || a.$$typeof === c || a.$$typeof === i || a.$$typeof === l || a.$$typeof === v || a.getModuleId !== void 0);
|
|
353
|
+
}, K.typeOf = g, K;
|
|
354
354
|
}
|
|
355
355
|
var H = {};
|
|
356
356
|
var yr;
|
|
357
357
|
function Jn() {
|
|
358
358
|
return yr || (yr = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
359
|
-
function e(
|
|
360
|
-
if (typeof
|
|
361
|
-
var
|
|
362
|
-
switch (
|
|
359
|
+
function e(a) {
|
|
360
|
+
if (typeof a == "object" && a !== null) {
|
|
361
|
+
var b = a.$$typeof;
|
|
362
|
+
switch (b) {
|
|
363
363
|
case t:
|
|
364
|
-
switch (
|
|
364
|
+
switch (a = a.type, a) {
|
|
365
365
|
case n:
|
|
366
366
|
case i:
|
|
367
367
|
case o:
|
|
368
368
|
case u:
|
|
369
|
-
case
|
|
370
|
-
case
|
|
371
|
-
return
|
|
369
|
+
case y:
|
|
370
|
+
case v:
|
|
371
|
+
return a;
|
|
372
372
|
default:
|
|
373
|
-
switch (
|
|
373
|
+
switch (a = a && a.$$typeof, a) {
|
|
374
374
|
case l:
|
|
375
375
|
case f:
|
|
376
|
-
case
|
|
376
|
+
case h:
|
|
377
377
|
case d:
|
|
378
|
-
return
|
|
379
|
-
case
|
|
380
|
-
return
|
|
378
|
+
return a;
|
|
379
|
+
case c:
|
|
380
|
+
return a;
|
|
381
381
|
default:
|
|
382
|
-
return
|
|
382
|
+
return b;
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
385
|
case r:
|
|
386
|
-
return
|
|
386
|
+
return b;
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
|
-
var t = /* @__PURE__ */ Symbol.for("react.transitional.element"), r = /* @__PURE__ */ Symbol.for("react.portal"), n = /* @__PURE__ */ Symbol.for("react.fragment"), o = /* @__PURE__ */ Symbol.for("react.strict_mode"), i = /* @__PURE__ */ Symbol.for("react.profiler"),
|
|
391
|
-
H.ContextConsumer =
|
|
392
|
-
return e(
|
|
393
|
-
}, H.isContextProvider = function(
|
|
394
|
-
return e(
|
|
395
|
-
}, H.isElement = function(
|
|
396
|
-
return typeof
|
|
397
|
-
}, H.isForwardRef = function(
|
|
398
|
-
return e(
|
|
399
|
-
}, H.isFragment = function(
|
|
400
|
-
return e(
|
|
401
|
-
}, H.isLazy = function(
|
|
402
|
-
return e(
|
|
403
|
-
}, H.isMemo = function(
|
|
404
|
-
return e(
|
|
405
|
-
}, H.isPortal = function(
|
|
406
|
-
return e(
|
|
407
|
-
}, H.isProfiler = function(
|
|
408
|
-
return e(
|
|
409
|
-
}, H.isStrictMode = function(
|
|
410
|
-
return e(
|
|
411
|
-
}, H.isSuspense = function(
|
|
412
|
-
return e(
|
|
413
|
-
}, H.isSuspenseList = function(
|
|
414
|
-
return e(
|
|
415
|
-
}, H.isValidElementType = function(
|
|
416
|
-
return typeof
|
|
390
|
+
var t = /* @__PURE__ */ Symbol.for("react.transitional.element"), r = /* @__PURE__ */ Symbol.for("react.portal"), n = /* @__PURE__ */ Symbol.for("react.fragment"), o = /* @__PURE__ */ Symbol.for("react.strict_mode"), i = /* @__PURE__ */ Symbol.for("react.profiler"), c = /* @__PURE__ */ Symbol.for("react.consumer"), l = /* @__PURE__ */ Symbol.for("react.context"), f = /* @__PURE__ */ Symbol.for("react.forward_ref"), u = /* @__PURE__ */ Symbol.for("react.suspense"), y = /* @__PURE__ */ Symbol.for("react.suspense_list"), d = /* @__PURE__ */ Symbol.for("react.memo"), h = /* @__PURE__ */ Symbol.for("react.lazy"), v = /* @__PURE__ */ Symbol.for("react.view_transition"), g = /* @__PURE__ */ Symbol.for("react.client.reference");
|
|
391
|
+
H.ContextConsumer = c, H.ContextProvider = l, H.Element = t, H.ForwardRef = f, H.Fragment = n, H.Lazy = h, H.Memo = d, H.Portal = r, H.Profiler = i, H.StrictMode = o, H.Suspense = u, H.SuspenseList = y, H.isContextConsumer = function(a) {
|
|
392
|
+
return e(a) === c;
|
|
393
|
+
}, H.isContextProvider = function(a) {
|
|
394
|
+
return e(a) === l;
|
|
395
|
+
}, H.isElement = function(a) {
|
|
396
|
+
return typeof a == "object" && a !== null && a.$$typeof === t;
|
|
397
|
+
}, H.isForwardRef = function(a) {
|
|
398
|
+
return e(a) === f;
|
|
399
|
+
}, H.isFragment = function(a) {
|
|
400
|
+
return e(a) === n;
|
|
401
|
+
}, H.isLazy = function(a) {
|
|
402
|
+
return e(a) === h;
|
|
403
|
+
}, H.isMemo = function(a) {
|
|
404
|
+
return e(a) === d;
|
|
405
|
+
}, H.isPortal = function(a) {
|
|
406
|
+
return e(a) === r;
|
|
407
|
+
}, H.isProfiler = function(a) {
|
|
408
|
+
return e(a) === i;
|
|
409
|
+
}, H.isStrictMode = function(a) {
|
|
410
|
+
return e(a) === o;
|
|
411
|
+
}, H.isSuspense = function(a) {
|
|
412
|
+
return e(a) === u;
|
|
413
|
+
}, H.isSuspenseList = function(a) {
|
|
414
|
+
return e(a) === y;
|
|
415
|
+
}, H.isValidElementType = function(a) {
|
|
416
|
+
return typeof a == "string" || typeof a == "function" || a === n || a === i || a === o || a === u || a === y || typeof a == "object" && a !== null && (a.$$typeof === h || a.$$typeof === d || a.$$typeof === l || a.$$typeof === c || a.$$typeof === f || a.$$typeof === g || a.getModuleId !== void 0);
|
|
417
417
|
}, H.typeOf = e;
|
|
418
418
|
})()), H;
|
|
419
419
|
}
|
|
420
|
-
var
|
|
420
|
+
var Sr;
|
|
421
421
|
function Xn() {
|
|
422
|
-
return
|
|
422
|
+
return Sr || (Sr = 1, process.env.NODE_ENV === "production" ? nt.exports = /* @__PURE__ */ qn() : nt.exports = /* @__PURE__ */ Jn()), nt.exports;
|
|
423
423
|
}
|
|
424
424
|
var pt = /* @__PURE__ */ Xn();
|
|
425
|
-
function
|
|
425
|
+
function Te(e) {
|
|
426
426
|
if (typeof e != "object" || e === null)
|
|
427
427
|
return !1;
|
|
428
428
|
const t = Object.getPrototypeOf(e);
|
|
429
429
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
430
430
|
}
|
|
431
431
|
function rn(e) {
|
|
432
|
-
if (/* @__PURE__ */ Oe.isValidElement(e) || pt.isValidElementType(e) || !
|
|
432
|
+
if (/* @__PURE__ */ Oe.isValidElement(e) || pt.isValidElementType(e) || !Te(e))
|
|
433
433
|
return e;
|
|
434
434
|
const t = {};
|
|
435
435
|
return Object.keys(e).forEach((r) => {
|
|
436
436
|
t[r] = rn(e[r]);
|
|
437
437
|
}), t;
|
|
438
438
|
}
|
|
439
|
-
function
|
|
439
|
+
function fe(e, t, r = {
|
|
440
440
|
clone: !0
|
|
441
441
|
}) {
|
|
442
442
|
const n = r.clone ? {
|
|
443
443
|
...e
|
|
444
444
|
} : e;
|
|
445
|
-
return
|
|
446
|
-
/* @__PURE__ */ Oe.isValidElement(t[o]) || pt.isValidElementType(t[o]) ? n[o] = t[o] :
|
|
447
|
-
Object.prototype.hasOwnProperty.call(e, o) &&
|
|
445
|
+
return Te(e) && Te(t) && Object.keys(t).forEach((o) => {
|
|
446
|
+
/* @__PURE__ */ Oe.isValidElement(t[o]) || pt.isValidElementType(t[o]) ? n[o] = t[o] : Te(t[o]) && // Avoid prototype pollution
|
|
447
|
+
Object.prototype.hasOwnProperty.call(e, o) && Te(e[o]) ? n[o] = fe(e[o], t[o], r) : r.clone ? n[o] = Te(t[o]) ? rn(t[o]) : t[o] : n[o] = t[o];
|
|
448
448
|
}), n;
|
|
449
449
|
}
|
|
450
450
|
var ot = { exports: {} }, it = { exports: {} }, W = {};
|
|
451
|
-
var
|
|
451
|
+
var br;
|
|
452
452
|
function Qn() {
|
|
453
|
-
if (
|
|
454
|
-
|
|
455
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, n = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, o = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, i = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114,
|
|
456
|
-
function
|
|
453
|
+
if (br) return W;
|
|
454
|
+
br = 1;
|
|
455
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, n = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, o = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, i = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, c = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, l = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, f = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, u = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, y = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, d = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, h = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, v = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, g = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, a = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, b = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, C = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, _ = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
456
|
+
function A(p) {
|
|
457
457
|
if (typeof p == "object" && p !== null) {
|
|
458
|
-
var
|
|
459
|
-
switch (
|
|
458
|
+
var w = p.$$typeof;
|
|
459
|
+
switch (w) {
|
|
460
460
|
case t:
|
|
461
461
|
switch (p = p.type, p) {
|
|
462
462
|
case f:
|
|
@@ -469,66 +469,66 @@ function Qn() {
|
|
|
469
469
|
default:
|
|
470
470
|
switch (p = p && p.$$typeof, p) {
|
|
471
471
|
case l:
|
|
472
|
+
case y:
|
|
472
473
|
case g:
|
|
473
|
-
case
|
|
474
|
-
case
|
|
475
|
-
case s:
|
|
474
|
+
case v:
|
|
475
|
+
case c:
|
|
476
476
|
return p;
|
|
477
477
|
default:
|
|
478
|
-
return
|
|
478
|
+
return w;
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
case r:
|
|
482
|
-
return
|
|
482
|
+
return w;
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
function
|
|
487
|
-
return
|
|
486
|
+
function m(p) {
|
|
487
|
+
return A(p) === u;
|
|
488
488
|
}
|
|
489
|
-
return W.AsyncMode = f, W.ConcurrentMode = u, W.ContextConsumer = l, W.ContextProvider =
|
|
490
|
-
return
|
|
491
|
-
}, W.isConcurrentMode =
|
|
492
|
-
return
|
|
489
|
+
return W.AsyncMode = f, W.ConcurrentMode = u, W.ContextConsumer = l, W.ContextProvider = c, W.Element = t, W.ForwardRef = y, W.Fragment = n, W.Lazy = g, W.Memo = v, W.Portal = r, W.Profiler = i, W.StrictMode = o, W.Suspense = d, W.isAsyncMode = function(p) {
|
|
490
|
+
return m(p) || A(p) === f;
|
|
491
|
+
}, W.isConcurrentMode = m, W.isContextConsumer = function(p) {
|
|
492
|
+
return A(p) === l;
|
|
493
493
|
}, W.isContextProvider = function(p) {
|
|
494
|
-
return
|
|
494
|
+
return A(p) === c;
|
|
495
495
|
}, W.isElement = function(p) {
|
|
496
496
|
return typeof p == "object" && p !== null && p.$$typeof === t;
|
|
497
497
|
}, W.isForwardRef = function(p) {
|
|
498
|
-
return
|
|
498
|
+
return A(p) === y;
|
|
499
499
|
}, W.isFragment = function(p) {
|
|
500
|
-
return
|
|
500
|
+
return A(p) === n;
|
|
501
501
|
}, W.isLazy = function(p) {
|
|
502
|
-
return
|
|
502
|
+
return A(p) === g;
|
|
503
503
|
}, W.isMemo = function(p) {
|
|
504
|
-
return
|
|
504
|
+
return A(p) === v;
|
|
505
505
|
}, W.isPortal = function(p) {
|
|
506
|
-
return
|
|
506
|
+
return A(p) === r;
|
|
507
507
|
}, W.isProfiler = function(p) {
|
|
508
|
-
return
|
|
508
|
+
return A(p) === i;
|
|
509
509
|
}, W.isStrictMode = function(p) {
|
|
510
|
-
return
|
|
510
|
+
return A(p) === o;
|
|
511
511
|
}, W.isSuspense = function(p) {
|
|
512
|
-
return
|
|
512
|
+
return A(p) === d;
|
|
513
513
|
}, W.isValidElementType = function(p) {
|
|
514
|
-
return typeof p == "string" || typeof p == "function" || p === n || p === u || p === i || p === o || p === d || p ===
|
|
515
|
-
}, W.typeOf =
|
|
514
|
+
return typeof p == "string" || typeof p == "function" || p === n || p === u || p === i || p === o || p === d || p === h || typeof p == "object" && p !== null && (p.$$typeof === g || p.$$typeof === v || p.$$typeof === c || p.$$typeof === l || p.$$typeof === y || p.$$typeof === b || p.$$typeof === C || p.$$typeof === _ || p.$$typeof === a);
|
|
515
|
+
}, W.typeOf = A, W;
|
|
516
516
|
}
|
|
517
517
|
var G = {};
|
|
518
518
|
var vr;
|
|
519
519
|
function Zn() {
|
|
520
520
|
return vr || (vr = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
521
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, n = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, o = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, i = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114,
|
|
522
|
-
function
|
|
523
|
-
return typeof
|
|
524
|
-
|
|
521
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, n = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, o = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, i = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, c = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, l = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, f = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, u = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, y = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, d = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, h = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, v = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, g = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, a = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, b = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, C = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, _ = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
522
|
+
function A(T) {
|
|
523
|
+
return typeof T == "string" || typeof T == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
524
|
+
T === n || T === u || T === i || T === o || T === d || T === h || typeof T == "object" && T !== null && (T.$$typeof === g || T.$$typeof === v || T.$$typeof === c || T.$$typeof === l || T.$$typeof === y || T.$$typeof === b || T.$$typeof === C || T.$$typeof === _ || T.$$typeof === a);
|
|
525
525
|
}
|
|
526
|
-
function
|
|
527
|
-
if (typeof
|
|
528
|
-
var
|
|
529
|
-
switch (
|
|
526
|
+
function m(T) {
|
|
527
|
+
if (typeof T == "object" && T !== null) {
|
|
528
|
+
var Ee = T.$$typeof;
|
|
529
|
+
switch (Ee) {
|
|
530
530
|
case t:
|
|
531
|
-
var rt =
|
|
531
|
+
var rt = T.type;
|
|
532
532
|
switch (rt) {
|
|
533
533
|
case f:
|
|
534
534
|
case u:
|
|
@@ -541,61 +541,61 @@ function Zn() {
|
|
|
541
541
|
var fr = rt && rt.$$typeof;
|
|
542
542
|
switch (fr) {
|
|
543
543
|
case l:
|
|
544
|
+
case y:
|
|
544
545
|
case g:
|
|
545
|
-
case
|
|
546
|
-
case
|
|
547
|
-
case s:
|
|
546
|
+
case v:
|
|
547
|
+
case c:
|
|
548
548
|
return fr;
|
|
549
549
|
default:
|
|
550
|
-
return
|
|
550
|
+
return Ee;
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
553
|
case r:
|
|
554
|
-
return
|
|
554
|
+
return Ee;
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
|
-
var p = f,
|
|
559
|
-
function It(
|
|
560
|
-
return tt || (tt = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), E(
|
|
558
|
+
var p = f, w = u, I = l, k = c, $ = t, s = y, O = n, L = g, V = v, ae = r, oe = i, ce = o, we = d, tt = !1;
|
|
559
|
+
function It(T) {
|
|
560
|
+
return tt || (tt = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), E(T) || m(T) === f;
|
|
561
561
|
}
|
|
562
|
-
function E(
|
|
563
|
-
return
|
|
562
|
+
function E(T) {
|
|
563
|
+
return m(T) === u;
|
|
564
564
|
}
|
|
565
|
-
function R(
|
|
566
|
-
return
|
|
565
|
+
function R(T) {
|
|
566
|
+
return m(T) === l;
|
|
567
567
|
}
|
|
568
|
-
function
|
|
569
|
-
return
|
|
568
|
+
function M(T) {
|
|
569
|
+
return m(T) === c;
|
|
570
570
|
}
|
|
571
|
-
function
|
|
572
|
-
return typeof
|
|
571
|
+
function U(T) {
|
|
572
|
+
return typeof T == "object" && T !== null && T.$$typeof === t;
|
|
573
573
|
}
|
|
574
|
-
function
|
|
575
|
-
return
|
|
574
|
+
function P(T) {
|
|
575
|
+
return m(T) === y;
|
|
576
576
|
}
|
|
577
|
-
function
|
|
578
|
-
return
|
|
577
|
+
function F(T) {
|
|
578
|
+
return m(T) === n;
|
|
579
579
|
}
|
|
580
|
-
function
|
|
581
|
-
return
|
|
580
|
+
function N(T) {
|
|
581
|
+
return m(T) === g;
|
|
582
582
|
}
|
|
583
|
-
function
|
|
584
|
-
return
|
|
583
|
+
function D(T) {
|
|
584
|
+
return m(T) === v;
|
|
585
585
|
}
|
|
586
|
-
function
|
|
587
|
-
return
|
|
586
|
+
function B(T) {
|
|
587
|
+
return m(T) === r;
|
|
588
588
|
}
|
|
589
|
-
function Y(
|
|
590
|
-
return
|
|
589
|
+
function Y(T) {
|
|
590
|
+
return m(T) === i;
|
|
591
591
|
}
|
|
592
|
-
function
|
|
593
|
-
return
|
|
592
|
+
function z(T) {
|
|
593
|
+
return m(T) === o;
|
|
594
594
|
}
|
|
595
|
-
function se(
|
|
596
|
-
return
|
|
595
|
+
function se(T) {
|
|
596
|
+
return m(T) === d;
|
|
597
597
|
}
|
|
598
|
-
G.AsyncMode = p, G.ConcurrentMode =
|
|
598
|
+
G.AsyncMode = p, G.ConcurrentMode = w, G.ContextConsumer = I, G.ContextProvider = k, G.Element = $, G.ForwardRef = s, G.Fragment = O, G.Lazy = L, G.Memo = V, G.Portal = ae, G.Profiler = oe, G.StrictMode = ce, G.Suspense = we, G.isAsyncMode = It, G.isConcurrentMode = E, G.isContextConsumer = R, G.isContextProvider = M, G.isElement = U, G.isForwardRef = P, G.isFragment = F, G.isLazy = N, G.isMemo = D, G.isPortal = B, G.isProfiler = Y, G.isStrictMode = z, G.isSuspense = se, G.isValidElementType = A, G.typeOf = m;
|
|
599
599
|
})()), G;
|
|
600
600
|
}
|
|
601
601
|
var wr;
|
|
@@ -619,30 +619,30 @@ function eo() {
|
|
|
619
619
|
var i = new String("abc");
|
|
620
620
|
if (i[5] = "de", Object.getOwnPropertyNames(i)[0] === "5")
|
|
621
621
|
return !1;
|
|
622
|
-
for (var
|
|
623
|
-
|
|
624
|
-
var f = Object.getOwnPropertyNames(
|
|
625
|
-
return
|
|
622
|
+
for (var c = {}, l = 0; l < 10; l++)
|
|
623
|
+
c["_" + String.fromCharCode(l)] = l;
|
|
624
|
+
var f = Object.getOwnPropertyNames(c).map(function(y) {
|
|
625
|
+
return c[y];
|
|
626
626
|
});
|
|
627
627
|
if (f.join("") !== "0123456789")
|
|
628
628
|
return !1;
|
|
629
629
|
var u = {};
|
|
630
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
631
|
-
u[
|
|
630
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(y) {
|
|
631
|
+
u[y] = y;
|
|
632
632
|
}), Object.keys(Object.assign({}, u)).join("") === "abcdefghijklmnopqrst";
|
|
633
633
|
} catch {
|
|
634
634
|
return !1;
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
|
-
return kt = o() ? Object.assign : function(i,
|
|
638
|
-
for (var l, f = n(i), u,
|
|
639
|
-
l = Object(arguments[
|
|
637
|
+
return kt = o() ? Object.assign : function(i, c) {
|
|
638
|
+
for (var l, f = n(i), u, y = 1; y < arguments.length; y++) {
|
|
639
|
+
l = Object(arguments[y]);
|
|
640
640
|
for (var d in l)
|
|
641
641
|
t.call(l, d) && (f[d] = l[d]);
|
|
642
642
|
if (e) {
|
|
643
643
|
u = e(l);
|
|
644
|
-
for (var
|
|
645
|
-
r.call(l, u[
|
|
644
|
+
for (var h = 0; h < u.length; h++)
|
|
645
|
+
r.call(l, u[h]) && (f[u[h]] = l[u[h]]);
|
|
646
646
|
}
|
|
647
647
|
}
|
|
648
648
|
return f;
|
|
@@ -668,37 +668,37 @@ function to() {
|
|
|
668
668
|
if (process.env.NODE_ENV !== "production") {
|
|
669
669
|
var t = /* @__PURE__ */ Zt(), r = {}, n = /* @__PURE__ */ on();
|
|
670
670
|
e = function(i) {
|
|
671
|
-
var
|
|
672
|
-
typeof console < "u" && console.error(
|
|
671
|
+
var c = "Warning: " + i;
|
|
672
|
+
typeof console < "u" && console.error(c);
|
|
673
673
|
try {
|
|
674
|
-
throw new Error(
|
|
674
|
+
throw new Error(c);
|
|
675
675
|
} catch {
|
|
676
676
|
}
|
|
677
677
|
};
|
|
678
678
|
}
|
|
679
|
-
function o(i,
|
|
679
|
+
function o(i, c, l, f, u) {
|
|
680
680
|
if (process.env.NODE_ENV !== "production") {
|
|
681
|
-
for (var
|
|
682
|
-
if (n(i,
|
|
681
|
+
for (var y in i)
|
|
682
|
+
if (n(i, y)) {
|
|
683
683
|
var d;
|
|
684
684
|
try {
|
|
685
|
-
if (typeof i[
|
|
686
|
-
var
|
|
687
|
-
(f || "React class") + ": " + l + " type `" +
|
|
685
|
+
if (typeof i[y] != "function") {
|
|
686
|
+
var h = Error(
|
|
687
|
+
(f || "React class") + ": " + l + " type `" + y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
688
688
|
);
|
|
689
|
-
throw
|
|
689
|
+
throw h.name = "Invariant Violation", h;
|
|
690
690
|
}
|
|
691
|
-
d = i[
|
|
692
|
-
} catch (
|
|
693
|
-
d =
|
|
691
|
+
d = i[y](c, y, f, l, null, t);
|
|
692
|
+
} catch (g) {
|
|
693
|
+
d = g;
|
|
694
694
|
}
|
|
695
695
|
if (d && !(d instanceof Error) && e(
|
|
696
|
-
(f || "React class") + ": type specification of " + l + " `" +
|
|
696
|
+
(f || "React class") + ": type specification of " + l + " `" + y + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof d + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
697
697
|
), d instanceof Error && !(d.message in r)) {
|
|
698
698
|
r[d.message] = !0;
|
|
699
|
-
var
|
|
699
|
+
var v = u ? u() : "";
|
|
700
700
|
e(
|
|
701
|
-
"Failed " + l + " type: " + d.message + (
|
|
701
|
+
"Failed " + l + " type: " + d.message + (v ?? "")
|
|
702
702
|
);
|
|
703
703
|
}
|
|
704
704
|
}
|
|
@@ -722,240 +722,240 @@ function ro() {
|
|
|
722
722
|
} catch {
|
|
723
723
|
}
|
|
724
724
|
});
|
|
725
|
-
function
|
|
725
|
+
function c() {
|
|
726
726
|
return null;
|
|
727
727
|
}
|
|
728
728
|
return Dt = function(l, f) {
|
|
729
|
-
var u = typeof Symbol == "function" && Symbol.iterator,
|
|
729
|
+
var u = typeof Symbol == "function" && Symbol.iterator, y = "@@iterator";
|
|
730
730
|
function d(E) {
|
|
731
|
-
var R = E && (u && E[u] || E[
|
|
731
|
+
var R = E && (u && E[u] || E[y]);
|
|
732
732
|
if (typeof R == "function")
|
|
733
733
|
return R;
|
|
734
734
|
}
|
|
735
|
-
var
|
|
736
|
-
array:
|
|
737
|
-
bigint:
|
|
738
|
-
bool:
|
|
739
|
-
func:
|
|
740
|
-
number:
|
|
741
|
-
object:
|
|
742
|
-
string:
|
|
743
|
-
symbol:
|
|
744
|
-
any:
|
|
745
|
-
arrayOf:
|
|
746
|
-
element:
|
|
735
|
+
var h = "<<anonymous>>", v = {
|
|
736
|
+
array: C("array"),
|
|
737
|
+
bigint: C("bigint"),
|
|
738
|
+
bool: C("boolean"),
|
|
739
|
+
func: C("function"),
|
|
740
|
+
number: C("number"),
|
|
741
|
+
object: C("object"),
|
|
742
|
+
string: C("string"),
|
|
743
|
+
symbol: C("symbol"),
|
|
744
|
+
any: _(),
|
|
745
|
+
arrayOf: A,
|
|
746
|
+
element: m(),
|
|
747
747
|
elementType: p(),
|
|
748
|
-
instanceOf:
|
|
749
|
-
node:
|
|
750
|
-
objectOf:
|
|
751
|
-
oneOf:
|
|
752
|
-
oneOfType:
|
|
753
|
-
shape:
|
|
754
|
-
exact:
|
|
748
|
+
instanceOf: w,
|
|
749
|
+
node: s(),
|
|
750
|
+
objectOf: k,
|
|
751
|
+
oneOf: I,
|
|
752
|
+
oneOfType: $,
|
|
753
|
+
shape: L,
|
|
754
|
+
exact: V
|
|
755
755
|
};
|
|
756
|
-
function
|
|
756
|
+
function g(E, R) {
|
|
757
757
|
return E === R ? E !== 0 || 1 / E === 1 / R : E !== E && R !== R;
|
|
758
758
|
}
|
|
759
|
-
function
|
|
759
|
+
function a(E, R) {
|
|
760
760
|
this.message = E, this.data = R && typeof R == "object" ? R : {}, this.stack = "";
|
|
761
761
|
}
|
|
762
|
-
|
|
763
|
-
function
|
|
762
|
+
a.prototype = Error.prototype;
|
|
763
|
+
function b(E) {
|
|
764
764
|
if (process.env.NODE_ENV !== "production")
|
|
765
|
-
var R = {},
|
|
766
|
-
function
|
|
767
|
-
if (
|
|
765
|
+
var R = {}, M = 0;
|
|
766
|
+
function U(F, N, D, B, Y, z, se) {
|
|
767
|
+
if (B = B || h, z = z || D, se !== r) {
|
|
768
768
|
if (f) {
|
|
769
|
-
var
|
|
769
|
+
var T = new Error(
|
|
770
770
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
771
771
|
);
|
|
772
|
-
throw
|
|
772
|
+
throw T.name = "Invariant Violation", T;
|
|
773
773
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
774
|
-
var
|
|
775
|
-
!R[
|
|
776
|
-
|
|
777
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
778
|
-
), R[
|
|
774
|
+
var Ee = B + ":" + D;
|
|
775
|
+
!R[Ee] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
776
|
+
M < 3 && (i(
|
|
777
|
+
"You are manually calling a React.PropTypes validation function for the `" + z + "` prop on `" + B + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
778
|
+
), R[Ee] = !0, M++);
|
|
779
779
|
}
|
|
780
780
|
}
|
|
781
|
-
return
|
|
781
|
+
return N[D] == null ? F ? N[D] === null ? new a("The " + Y + " `" + z + "` is marked as required " + ("in `" + B + "`, but its value is `null`.")) : new a("The " + Y + " `" + z + "` is marked as required in " + ("`" + B + "`, but its value is `undefined`.")) : null : E(N, D, B, Y, z);
|
|
782
782
|
}
|
|
783
|
-
var
|
|
784
|
-
return
|
|
783
|
+
var P = U.bind(null, !1);
|
|
784
|
+
return P.isRequired = U.bind(null, !0), P;
|
|
785
785
|
}
|
|
786
|
-
function
|
|
787
|
-
function R(
|
|
788
|
-
var
|
|
786
|
+
function C(E) {
|
|
787
|
+
function R(M, U, P, F, N, D) {
|
|
788
|
+
var B = M[U], Y = ce(B);
|
|
789
789
|
if (Y !== E) {
|
|
790
|
-
var
|
|
791
|
-
return new
|
|
792
|
-
"Invalid " +
|
|
790
|
+
var z = we(B);
|
|
791
|
+
return new a(
|
|
792
|
+
"Invalid " + F + " `" + N + "` of type " + ("`" + z + "` supplied to `" + P + "`, expected ") + ("`" + E + "`."),
|
|
793
793
|
{ expectedType: E }
|
|
794
794
|
);
|
|
795
795
|
}
|
|
796
796
|
return null;
|
|
797
797
|
}
|
|
798
|
-
return
|
|
798
|
+
return b(R);
|
|
799
799
|
}
|
|
800
|
-
function
|
|
801
|
-
return
|
|
800
|
+
function _() {
|
|
801
|
+
return b(c);
|
|
802
802
|
}
|
|
803
|
-
function
|
|
804
|
-
function R(
|
|
803
|
+
function A(E) {
|
|
804
|
+
function R(M, U, P, F, N) {
|
|
805
805
|
if (typeof E != "function")
|
|
806
|
-
return new
|
|
807
|
-
var
|
|
808
|
-
if (!Array.isArray(
|
|
809
|
-
var
|
|
810
|
-
return new
|
|
806
|
+
return new a("Property `" + N + "` of component `" + P + "` has invalid PropType notation inside arrayOf.");
|
|
807
|
+
var D = M[U];
|
|
808
|
+
if (!Array.isArray(D)) {
|
|
809
|
+
var B = ce(D);
|
|
810
|
+
return new a("Invalid " + F + " `" + N + "` of type " + ("`" + B + "` supplied to `" + P + "`, expected an array."));
|
|
811
811
|
}
|
|
812
|
-
for (var Y = 0; Y <
|
|
813
|
-
var
|
|
814
|
-
if (
|
|
815
|
-
return
|
|
812
|
+
for (var Y = 0; Y < D.length; Y++) {
|
|
813
|
+
var z = E(D, Y, P, F, N + "[" + Y + "]", r);
|
|
814
|
+
if (z instanceof Error)
|
|
815
|
+
return z;
|
|
816
816
|
}
|
|
817
817
|
return null;
|
|
818
818
|
}
|
|
819
|
-
return
|
|
819
|
+
return b(R);
|
|
820
820
|
}
|
|
821
|
-
function
|
|
822
|
-
function E(R,
|
|
823
|
-
var
|
|
824
|
-
if (!l(
|
|
825
|
-
var
|
|
826
|
-
return new
|
|
821
|
+
function m() {
|
|
822
|
+
function E(R, M, U, P, F) {
|
|
823
|
+
var N = R[M];
|
|
824
|
+
if (!l(N)) {
|
|
825
|
+
var D = ce(N);
|
|
826
|
+
return new a("Invalid " + P + " `" + F + "` of type " + ("`" + D + "` supplied to `" + U + "`, expected a single ReactElement."));
|
|
827
827
|
}
|
|
828
828
|
return null;
|
|
829
829
|
}
|
|
830
|
-
return
|
|
830
|
+
return b(E);
|
|
831
831
|
}
|
|
832
832
|
function p() {
|
|
833
|
-
function E(R,
|
|
834
|
-
var
|
|
835
|
-
if (!e.isValidElementType(
|
|
836
|
-
var
|
|
837
|
-
return new
|
|
833
|
+
function E(R, M, U, P, F) {
|
|
834
|
+
var N = R[M];
|
|
835
|
+
if (!e.isValidElementType(N)) {
|
|
836
|
+
var D = ce(N);
|
|
837
|
+
return new a("Invalid " + P + " `" + F + "` of type " + ("`" + D + "` supplied to `" + U + "`, expected a single ReactElement type."));
|
|
838
838
|
}
|
|
839
839
|
return null;
|
|
840
840
|
}
|
|
841
|
-
return
|
|
841
|
+
return b(E);
|
|
842
842
|
}
|
|
843
|
-
function
|
|
844
|
-
function R(
|
|
845
|
-
if (!(
|
|
846
|
-
var
|
|
847
|
-
return new
|
|
843
|
+
function w(E) {
|
|
844
|
+
function R(M, U, P, F, N) {
|
|
845
|
+
if (!(M[U] instanceof E)) {
|
|
846
|
+
var D = E.name || h, B = It(M[U]);
|
|
847
|
+
return new a("Invalid " + F + " `" + N + "` of type " + ("`" + B + "` supplied to `" + P + "`, expected ") + ("instance of `" + D + "`."));
|
|
848
848
|
}
|
|
849
849
|
return null;
|
|
850
850
|
}
|
|
851
|
-
return
|
|
851
|
+
return b(R);
|
|
852
852
|
}
|
|
853
|
-
function
|
|
853
|
+
function I(E) {
|
|
854
854
|
if (!Array.isArray(E))
|
|
855
855
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
|
|
856
856
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
857
|
-
) : i("Invalid argument supplied to oneOf, expected an array.")),
|
|
858
|
-
function R(
|
|
859
|
-
for (var
|
|
860
|
-
if (
|
|
857
|
+
) : i("Invalid argument supplied to oneOf, expected an array.")), c;
|
|
858
|
+
function R(M, U, P, F, N) {
|
|
859
|
+
for (var D = M[U], B = 0; B < E.length; B++)
|
|
860
|
+
if (g(D, E[B]))
|
|
861
861
|
return null;
|
|
862
|
-
var Y = JSON.stringify(E, function(se,
|
|
863
|
-
var
|
|
864
|
-
return
|
|
862
|
+
var Y = JSON.stringify(E, function(se, T) {
|
|
863
|
+
var Ee = we(T);
|
|
864
|
+
return Ee === "symbol" ? String(T) : T;
|
|
865
865
|
});
|
|
866
|
-
return new
|
|
866
|
+
return new a("Invalid " + F + " `" + N + "` of value `" + String(D) + "` " + ("supplied to `" + P + "`, expected one of " + Y + "."));
|
|
867
867
|
}
|
|
868
|
-
return
|
|
868
|
+
return b(R);
|
|
869
869
|
}
|
|
870
|
-
function
|
|
871
|
-
function R(
|
|
870
|
+
function k(E) {
|
|
871
|
+
function R(M, U, P, F, N) {
|
|
872
872
|
if (typeof E != "function")
|
|
873
|
-
return new
|
|
874
|
-
var
|
|
875
|
-
if (
|
|
876
|
-
return new
|
|
877
|
-
for (var Y in
|
|
878
|
-
if (n(
|
|
879
|
-
var
|
|
880
|
-
if (
|
|
881
|
-
return
|
|
873
|
+
return new a("Property `" + N + "` of component `" + P + "` has invalid PropType notation inside objectOf.");
|
|
874
|
+
var D = M[U], B = ce(D);
|
|
875
|
+
if (B !== "object")
|
|
876
|
+
return new a("Invalid " + F + " `" + N + "` of type " + ("`" + B + "` supplied to `" + P + "`, expected an object."));
|
|
877
|
+
for (var Y in D)
|
|
878
|
+
if (n(D, Y)) {
|
|
879
|
+
var z = E(D, Y, P, F, N + "." + Y, r);
|
|
880
|
+
if (z instanceof Error)
|
|
881
|
+
return z;
|
|
882
882
|
}
|
|
883
883
|
return null;
|
|
884
884
|
}
|
|
885
|
-
return
|
|
885
|
+
return b(R);
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function $(E) {
|
|
888
888
|
if (!Array.isArray(E))
|
|
889
|
-
return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."),
|
|
889
|
+
return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), c;
|
|
890
890
|
for (var R = 0; R < E.length; R++) {
|
|
891
|
-
var
|
|
892
|
-
if (typeof
|
|
891
|
+
var M = E[R];
|
|
892
|
+
if (typeof M != "function")
|
|
893
893
|
return i(
|
|
894
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + tt(
|
|
895
|
-
),
|
|
894
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + tt(M) + " at index " + R + "."
|
|
895
|
+
), c;
|
|
896
896
|
}
|
|
897
|
-
function
|
|
898
|
-
for (var Y = [],
|
|
899
|
-
var se = E[
|
|
900
|
-
if (
|
|
897
|
+
function U(P, F, N, D, B) {
|
|
898
|
+
for (var Y = [], z = 0; z < E.length; z++) {
|
|
899
|
+
var se = E[z], T = se(P, F, N, D, B, r);
|
|
900
|
+
if (T == null)
|
|
901
901
|
return null;
|
|
902
|
-
|
|
902
|
+
T.data && n(T.data, "expectedType") && Y.push(T.data.expectedType);
|
|
903
903
|
}
|
|
904
|
-
var
|
|
905
|
-
return new
|
|
904
|
+
var Ee = Y.length > 0 ? ", expected one of type [" + Y.join(", ") + "]" : "";
|
|
905
|
+
return new a("Invalid " + D + " `" + B + "` supplied to " + ("`" + N + "`" + Ee + "."));
|
|
906
906
|
}
|
|
907
|
-
return
|
|
907
|
+
return b(U);
|
|
908
908
|
}
|
|
909
|
-
function
|
|
910
|
-
function E(R,
|
|
911
|
-
return ae(R[
|
|
909
|
+
function s() {
|
|
910
|
+
function E(R, M, U, P, F) {
|
|
911
|
+
return ae(R[M]) ? null : new a("Invalid " + P + " `" + F + "` supplied to " + ("`" + U + "`, expected a ReactNode."));
|
|
912
912
|
}
|
|
913
|
-
return
|
|
913
|
+
return b(E);
|
|
914
914
|
}
|
|
915
|
-
function O(E, R,
|
|
916
|
-
return new
|
|
917
|
-
(E || "React class") + ": " + R + " type `" +
|
|
915
|
+
function O(E, R, M, U, P) {
|
|
916
|
+
return new a(
|
|
917
|
+
(E || "React class") + ": " + R + " type `" + M + "." + U + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + P + "`."
|
|
918
918
|
);
|
|
919
919
|
}
|
|
920
|
-
function
|
|
921
|
-
function R(
|
|
922
|
-
var
|
|
923
|
-
if (
|
|
924
|
-
return new
|
|
920
|
+
function L(E) {
|
|
921
|
+
function R(M, U, P, F, N) {
|
|
922
|
+
var D = M[U], B = ce(D);
|
|
923
|
+
if (B !== "object")
|
|
924
|
+
return new a("Invalid " + F + " `" + N + "` of type `" + B + "` " + ("supplied to `" + P + "`, expected `object`."));
|
|
925
925
|
for (var Y in E) {
|
|
926
|
-
var
|
|
927
|
-
if (typeof
|
|
928
|
-
return O(
|
|
929
|
-
var se =
|
|
926
|
+
var z = E[Y];
|
|
927
|
+
if (typeof z != "function")
|
|
928
|
+
return O(P, F, N, Y, we(z));
|
|
929
|
+
var se = z(D, Y, P, F, N + "." + Y, r);
|
|
930
930
|
if (se)
|
|
931
931
|
return se;
|
|
932
932
|
}
|
|
933
933
|
return null;
|
|
934
934
|
}
|
|
935
|
-
return
|
|
935
|
+
return b(R);
|
|
936
936
|
}
|
|
937
|
-
function
|
|
938
|
-
function R(
|
|
939
|
-
var
|
|
940
|
-
if (
|
|
941
|
-
return new
|
|
942
|
-
var Y = t({},
|
|
943
|
-
for (var
|
|
944
|
-
var se = E[
|
|
945
|
-
if (n(E,
|
|
946
|
-
return O(
|
|
937
|
+
function V(E) {
|
|
938
|
+
function R(M, U, P, F, N) {
|
|
939
|
+
var D = M[U], B = ce(D);
|
|
940
|
+
if (B !== "object")
|
|
941
|
+
return new a("Invalid " + F + " `" + N + "` of type `" + B + "` " + ("supplied to `" + P + "`, expected `object`."));
|
|
942
|
+
var Y = t({}, M[U], E);
|
|
943
|
+
for (var z in Y) {
|
|
944
|
+
var se = E[z];
|
|
945
|
+
if (n(E, z) && typeof se != "function")
|
|
946
|
+
return O(P, F, N, z, we(se));
|
|
947
947
|
if (!se)
|
|
948
|
-
return new
|
|
949
|
-
"Invalid " +
|
|
948
|
+
return new a(
|
|
949
|
+
"Invalid " + F + " `" + N + "` key `" + z + "` supplied to `" + P + "`.\nBad object: " + JSON.stringify(M[U], null, " ") + `
|
|
950
950
|
Valid keys: ` + JSON.stringify(Object.keys(E), null, " ")
|
|
951
951
|
);
|
|
952
|
-
var
|
|
953
|
-
if (
|
|
954
|
-
return
|
|
952
|
+
var T = se(D, z, P, F, N + "." + z, r);
|
|
953
|
+
if (T)
|
|
954
|
+
return T;
|
|
955
955
|
}
|
|
956
956
|
return null;
|
|
957
957
|
}
|
|
958
|
-
return
|
|
958
|
+
return b(R);
|
|
959
959
|
}
|
|
960
960
|
function ae(E) {
|
|
961
961
|
switch (typeof E) {
|
|
@@ -972,15 +972,15 @@ Valid keys: ` + JSON.stringify(Object.keys(E), null, " ")
|
|
|
972
972
|
return !0;
|
|
973
973
|
var R = d(E);
|
|
974
974
|
if (R) {
|
|
975
|
-
var
|
|
975
|
+
var M = R.call(E), U;
|
|
976
976
|
if (R !== E.entries) {
|
|
977
|
-
for (; !(
|
|
978
|
-
if (!ae(
|
|
977
|
+
for (; !(U = M.next()).done; )
|
|
978
|
+
if (!ae(U.value))
|
|
979
979
|
return !1;
|
|
980
980
|
} else
|
|
981
|
-
for (; !(
|
|
982
|
-
var
|
|
983
|
-
if (
|
|
981
|
+
for (; !(U = M.next()).done; ) {
|
|
982
|
+
var P = U.value;
|
|
983
|
+
if (P && !ae(P[1]))
|
|
984
984
|
return !1;
|
|
985
985
|
}
|
|
986
986
|
} else
|
|
@@ -997,7 +997,7 @@ Valid keys: ` + JSON.stringify(Object.keys(E), null, " ")
|
|
|
997
997
|
var R = typeof E;
|
|
998
998
|
return Array.isArray(E) ? "array" : E instanceof RegExp ? "object" : oe(R, E) ? "symbol" : R;
|
|
999
999
|
}
|
|
1000
|
-
function
|
|
1000
|
+
function we(E) {
|
|
1001
1001
|
if (typeof E > "u" || E === null)
|
|
1002
1002
|
return "" + E;
|
|
1003
1003
|
var R = ce(E);
|
|
@@ -1010,7 +1010,7 @@ Valid keys: ` + JSON.stringify(Object.keys(E), null, " ")
|
|
|
1010
1010
|
return R;
|
|
1011
1011
|
}
|
|
1012
1012
|
function tt(E) {
|
|
1013
|
-
var R =
|
|
1013
|
+
var R = we(E);
|
|
1014
1014
|
switch (R) {
|
|
1015
1015
|
case "array":
|
|
1016
1016
|
case "object":
|
|
@@ -1024,9 +1024,9 @@ Valid keys: ` + JSON.stringify(Object.keys(E), null, " ")
|
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
1026
1026
|
function It(E) {
|
|
1027
|
-
return !E.constructor || !E.constructor.name ?
|
|
1027
|
+
return !E.constructor || !E.constructor.name ? h : E.constructor.name;
|
|
1028
1028
|
}
|
|
1029
|
-
return
|
|
1029
|
+
return v.checkPropTypes = o, v.resetWarningCache = o.resetWarningCache, v.PropTypes = v, v;
|
|
1030
1030
|
}, Dt;
|
|
1031
1031
|
}
|
|
1032
1032
|
var Lt, xr;
|
|
@@ -1039,12 +1039,12 @@ function no() {
|
|
|
1039
1039
|
function r() {
|
|
1040
1040
|
}
|
|
1041
1041
|
return r.resetWarningCache = t, Lt = function() {
|
|
1042
|
-
function n(
|
|
1042
|
+
function n(c, l, f, u, y, d) {
|
|
1043
1043
|
if (d !== e) {
|
|
1044
|
-
var
|
|
1044
|
+
var h = new Error(
|
|
1045
1045
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1046
1046
|
);
|
|
1047
|
-
throw
|
|
1047
|
+
throw h.name = "Invariant Violation", h;
|
|
1048
1048
|
}
|
|
1049
1049
|
}
|
|
1050
1050
|
n.isRequired = n;
|
|
@@ -1088,7 +1088,7 @@ function oo() {
|
|
|
1088
1088
|
return ot.exports;
|
|
1089
1089
|
}
|
|
1090
1090
|
var io = /* @__PURE__ */ oo();
|
|
1091
|
-
const
|
|
1091
|
+
const j = /* @__PURE__ */ Hn(io);
|
|
1092
1092
|
function Ie(e, ...t) {
|
|
1093
1093
|
const r = new URL(`https://mui.com/production-error/?code=${e}`);
|
|
1094
1094
|
return t.forEach((n) => r.searchParams.append("args[]", n)), `Minified MUI error #${e}; visit ${r} for the full message.`;
|
|
@@ -1135,19 +1135,19 @@ function Ht(e, t) {
|
|
|
1135
1135
|
...r[o]
|
|
1136
1136
|
};
|
|
1137
1137
|
else if (o === "componentsProps" || o === "slotProps") {
|
|
1138
|
-
const i = e[o],
|
|
1139
|
-
if (!
|
|
1138
|
+
const i = e[o], c = t[o];
|
|
1139
|
+
if (!c)
|
|
1140
1140
|
r[o] = i || {};
|
|
1141
1141
|
else if (!i)
|
|
1142
|
-
r[o] =
|
|
1142
|
+
r[o] = c;
|
|
1143
1143
|
else {
|
|
1144
1144
|
r[o] = {
|
|
1145
|
-
...
|
|
1145
|
+
...c
|
|
1146
1146
|
};
|
|
1147
1147
|
for (const l in i)
|
|
1148
1148
|
if (Object.prototype.hasOwnProperty.call(i, l)) {
|
|
1149
1149
|
const f = l;
|
|
1150
|
-
r[o][f] = Ht(i[f],
|
|
1150
|
+
r[o][f] = Ht(i[f], c[f]);
|
|
1151
1151
|
}
|
|
1152
1152
|
}
|
|
1153
1153
|
} else r[o] === void 0 && (r[o] = e[o]);
|
|
@@ -1158,12 +1158,12 @@ function ao(e, t, r = void 0) {
|
|
|
1158
1158
|
const n = {};
|
|
1159
1159
|
for (const o in e) {
|
|
1160
1160
|
const i = e[o];
|
|
1161
|
-
let
|
|
1161
|
+
let c = "", l = !0;
|
|
1162
1162
|
for (let f = 0; f < i.length; f += 1) {
|
|
1163
1163
|
const u = i[f];
|
|
1164
|
-
u && (
|
|
1164
|
+
u && (c += (l === !0 ? "" : " ") + t(u), l = !1, r && r[u] && (c += " " + r[u]));
|
|
1165
1165
|
}
|
|
1166
|
-
n[o] =
|
|
1166
|
+
n[o] = c;
|
|
1167
1167
|
}
|
|
1168
1168
|
return n;
|
|
1169
1169
|
}
|
|
@@ -1221,12 +1221,12 @@ function mo() {
|
|
|
1221
1221
|
return n;
|
|
1222
1222
|
}
|
|
1223
1223
|
function Je(e, t) {
|
|
1224
|
-
return t ?
|
|
1224
|
+
return t ? fe(e, t, {
|
|
1225
1225
|
clone: !1
|
|
1226
1226
|
// No need to clone deep, it's way faster.
|
|
1227
1227
|
}) : e;
|
|
1228
1228
|
}
|
|
1229
|
-
const ke = process.env.NODE_ENV !== "production" ?
|
|
1229
|
+
const ke = process.env.NODE_ENV !== "production" ? j.oneOfType([j.number, j.string, j.object, j.array]) : {};
|
|
1230
1230
|
function $r(e, t) {
|
|
1231
1231
|
if (!e.containerQueries)
|
|
1232
1232
|
return t;
|
|
@@ -1256,10 +1256,10 @@ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.` : Ie(18, `(${t})`));
|
|
|
1256
1256
|
return e.containerQueries(o).up(i);
|
|
1257
1257
|
}
|
|
1258
1258
|
function yo(e) {
|
|
1259
|
-
const t = (i,
|
|
1260
|
-
function r(i,
|
|
1261
|
-
i.up = (...l) => t(e.breakpoints.up(...l),
|
|
1262
|
-
const f = t(e.breakpoints.not(...l),
|
|
1259
|
+
const t = (i, c) => i.replace("@media", c ? `@container ${c}` : "@container");
|
|
1260
|
+
function r(i, c) {
|
|
1261
|
+
i.up = (...l) => t(e.breakpoints.up(...l), c), i.down = (...l) => t(e.breakpoints.down(...l), c), i.between = (...l) => t(e.breakpoints.between(...l), c), i.only = (...l) => t(e.breakpoints.only(...l), c), i.not = (...l) => {
|
|
1262
|
+
const f = t(e.breakpoints.not(...l), c);
|
|
1263
1263
|
return f.includes("not all and") ? f.replace("not all and ", "").replace("min-width:", "width<").replace("max-width:", "width>").replace("and", "or") : f;
|
|
1264
1264
|
};
|
|
1265
1265
|
}
|
|
@@ -1285,7 +1285,7 @@ const yt = {
|
|
|
1285
1285
|
// It can't be configured as it's used statically for propTypes.
|
|
1286
1286
|
keys: ["xs", "sm", "md", "lg", "xl"],
|
|
1287
1287
|
up: (e) => `@media (min-width:${yt[e]}px)`
|
|
1288
|
-
},
|
|
1288
|
+
}, So = {
|
|
1289
1289
|
containerQueries: (e) => ({
|
|
1290
1290
|
up: (t) => {
|
|
1291
1291
|
let r = typeof t == "number" ? t : yt[t] || t;
|
|
@@ -1293,31 +1293,31 @@ const yt = {
|
|
|
1293
1293
|
}
|
|
1294
1294
|
})
|
|
1295
1295
|
};
|
|
1296
|
-
function
|
|
1296
|
+
function xe(e, t, r) {
|
|
1297
1297
|
const n = e.theme || {};
|
|
1298
1298
|
if (Array.isArray(t)) {
|
|
1299
1299
|
const i = n.breakpoints || kr;
|
|
1300
|
-
return t.reduce((
|
|
1300
|
+
return t.reduce((c, l, f) => (c[i.up(i.keys[f])] = r(t[f]), c), {});
|
|
1301
1301
|
}
|
|
1302
1302
|
if (typeof t == "object") {
|
|
1303
1303
|
const i = n.breakpoints || kr;
|
|
1304
|
-
return Object.keys(t).reduce((
|
|
1304
|
+
return Object.keys(t).reduce((c, l) => {
|
|
1305
1305
|
if (ho(i.keys, l)) {
|
|
1306
|
-
const f = go(n.containerQueries ? n :
|
|
1307
|
-
f && (
|
|
1306
|
+
const f = go(n.containerQueries ? n : So, l);
|
|
1307
|
+
f && (c[f] = r(t[l], l));
|
|
1308
1308
|
} else if (Object.keys(i.values || yt).includes(l)) {
|
|
1309
1309
|
const f = i.up(l);
|
|
1310
|
-
|
|
1310
|
+
c[f] = r(t[l], l);
|
|
1311
1311
|
} else {
|
|
1312
1312
|
const f = l;
|
|
1313
|
-
|
|
1313
|
+
c[f] = t[f];
|
|
1314
1314
|
}
|
|
1315
|
-
return
|
|
1315
|
+
return c;
|
|
1316
1316
|
}, {});
|
|
1317
1317
|
}
|
|
1318
1318
|
return r(t);
|
|
1319
1319
|
}
|
|
1320
|
-
function
|
|
1320
|
+
function bo(e = {}) {
|
|
1321
1321
|
return e.keys?.reduce((r, n) => {
|
|
1322
1322
|
const o = e.up(n);
|
|
1323
1323
|
return r[o] = {}, r;
|
|
@@ -1329,7 +1329,7 @@ function Pr(e, t) {
|
|
|
1329
1329
|
return (!o || Object.keys(o).length === 0) && delete r[n], r;
|
|
1330
1330
|
}, t);
|
|
1331
1331
|
}
|
|
1332
|
-
function
|
|
1332
|
+
function St(e, t, r = !0) {
|
|
1333
1333
|
if (!t || typeof t != "string")
|
|
1334
1334
|
return null;
|
|
1335
1335
|
if (e && e.vars && r) {
|
|
@@ -1341,22 +1341,22 @@ function bt(e, t, r = !0) {
|
|
|
1341
1341
|
}
|
|
1342
1342
|
function mt(e, t, r, n = r) {
|
|
1343
1343
|
let o;
|
|
1344
|
-
return typeof e == "function" ? o = e(r) : Array.isArray(e) ? o = e[r] || n : o =
|
|
1344
|
+
return typeof e == "function" ? o = e(r) : Array.isArray(e) ? o = e[r] || n : o = St(e, r) || n, t && (o = t(o, n, e)), o;
|
|
1345
1345
|
}
|
|
1346
|
-
function
|
|
1346
|
+
function te(e) {
|
|
1347
1347
|
const {
|
|
1348
1348
|
prop: t,
|
|
1349
1349
|
cssProperty: r = e.prop,
|
|
1350
1350
|
themeKey: n,
|
|
1351
1351
|
transform: o
|
|
1352
|
-
} = e, i = (
|
|
1353
|
-
if (
|
|
1352
|
+
} = e, i = (c) => {
|
|
1353
|
+
if (c[t] == null)
|
|
1354
1354
|
return null;
|
|
1355
|
-
const l =
|
|
1356
|
-
return
|
|
1357
|
-
let
|
|
1358
|
-
return d ===
|
|
1359
|
-
[r]:
|
|
1355
|
+
const l = c[t], f = c.theme, u = St(f, n) || {};
|
|
1356
|
+
return xe(c, l, (d) => {
|
|
1357
|
+
let h = mt(u, o, d);
|
|
1358
|
+
return d === h && typeof d == "string" && (h = mt(u, o, `${t}${d === "default" ? "" : Ue(d)}`, d)), r === !1 ? h : {
|
|
1359
|
+
[r]: h
|
|
1360
1360
|
};
|
|
1361
1361
|
});
|
|
1362
1362
|
};
|
|
@@ -1391,17 +1391,17 @@ const wo = {
|
|
|
1391
1391
|
return [e];
|
|
1392
1392
|
const [t, r] = e.split(""), n = wo[t], o = Eo[r] || "";
|
|
1393
1393
|
return Array.isArray(o) ? o.map((i) => n + i) : [n + o];
|
|
1394
|
-
}),
|
|
1394
|
+
}), bt = ["m", "mt", "mr", "mb", "ml", "mx", "my", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginX", "marginY", "marginInline", "marginInlineStart", "marginInlineEnd", "marginBlock", "marginBlockStart", "marginBlockEnd"], vt = ["p", "pt", "pr", "pb", "pl", "px", "py", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "paddingX", "paddingY", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "paddingBlock", "paddingBlockStart", "paddingBlockEnd"], Co = [...bt, ...vt];
|
|
1395
1395
|
function Qe(e, t, r, n) {
|
|
1396
|
-
const o =
|
|
1396
|
+
const o = St(e, t, !0) ?? r;
|
|
1397
1397
|
return typeof o == "number" || typeof o == "string" ? (i) => typeof i == "string" ? i : (process.env.NODE_ENV !== "production" && typeof i != "number" && console.error(`MUI: Expected ${n} argument to be a number or a string, got ${i}.`), typeof o == "string" ? `calc(${i} * ${o})` : o * i) : Array.isArray(o) ? (i) => {
|
|
1398
1398
|
if (typeof i == "string")
|
|
1399
1399
|
return i;
|
|
1400
|
-
const
|
|
1401
|
-
process.env.NODE_ENV !== "production" && (Number.isInteger(
|
|
1400
|
+
const c = Math.abs(i);
|
|
1401
|
+
process.env.NODE_ENV !== "production" && (Number.isInteger(c) ? c > o.length - 1 && console.error([`MUI: The value provided (${c}) overflows.`, `The supported values are: ${JSON.stringify(o)}.`, `${c} > ${o.length - 1}, you need to add the missing values.`].join(`
|
|
1402
1402
|
`)) : console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
|
|
1403
1403
|
`)));
|
|
1404
|
-
const l = o[
|
|
1404
|
+
const l = o[c];
|
|
1405
1405
|
return i >= 0 ? l : typeof l == "number" ? -l : `-${l}`;
|
|
1406
1406
|
} : typeof o == "function" ? o : (process.env.NODE_ENV !== "production" && console.error([`MUI: The \`theme.${t}\` value (${o}) is invalid.`, "It should be a number, an array or a function."].join(`
|
|
1407
1407
|
`)), () => {
|
|
@@ -1419,18 +1419,18 @@ function _o(e, t) {
|
|
|
1419
1419
|
function To(e, t, r, n) {
|
|
1420
1420
|
if (!t.includes(r))
|
|
1421
1421
|
return null;
|
|
1422
|
-
const o = Ao(r), i = _o(o, n),
|
|
1423
|
-
return
|
|
1422
|
+
const o = Ao(r), i = _o(o, n), c = e[r];
|
|
1423
|
+
return xe(e, c, i);
|
|
1424
1424
|
}
|
|
1425
1425
|
function cn(e, t) {
|
|
1426
1426
|
const r = tr(e.theme);
|
|
1427
1427
|
return Object.keys(e).map((n) => To(e, t, n, r)).reduce(Je, {});
|
|
1428
1428
|
}
|
|
1429
1429
|
function Q(e) {
|
|
1430
|
-
return cn(e,
|
|
1430
|
+
return cn(e, bt);
|
|
1431
1431
|
}
|
|
1432
|
-
Q.propTypes = process.env.NODE_ENV !== "production" ?
|
|
1433
|
-
Q.filterProps =
|
|
1432
|
+
Q.propTypes = process.env.NODE_ENV !== "production" ? bt.reduce((e, t) => (e[t] = ke, e), {}) : {};
|
|
1433
|
+
Q.filterProps = bt;
|
|
1434
1434
|
function Z(e) {
|
|
1435
1435
|
return cn(e, vt);
|
|
1436
1436
|
}
|
|
@@ -1443,22 +1443,22 @@ function wt(...e) {
|
|
|
1443
1443
|
}), n), {}), r = (n) => Object.keys(n).reduce((o, i) => t[i] ? Je(o, t[i](n)) : o, {});
|
|
1444
1444
|
return r.propTypes = process.env.NODE_ENV !== "production" ? e.reduce((n, o) => Object.assign(n, o.propTypes), {}) : {}, r.filterProps = e.reduce((n, o) => n.concat(o.filterProps), []), r;
|
|
1445
1445
|
}
|
|
1446
|
-
function
|
|
1446
|
+
function me(e) {
|
|
1447
1447
|
return typeof e != "number" ? e : `${e}px solid`;
|
|
1448
1448
|
}
|
|
1449
|
-
function
|
|
1450
|
-
return
|
|
1449
|
+
function Se(e, t) {
|
|
1450
|
+
return te({
|
|
1451
1451
|
prop: e,
|
|
1452
1452
|
themeKey: "borders",
|
|
1453
1453
|
transform: t
|
|
1454
1454
|
});
|
|
1455
1455
|
}
|
|
1456
|
-
const xo =
|
|
1456
|
+
const xo = Se("border", me), Ro = Se("borderTop", me), Oo = Se("borderRight", me), Io = Se("borderBottom", me), $o = Se("borderLeft", me), ko = Se("borderColor"), Po = Se("borderTopColor"), No = Se("borderRightColor"), Uo = Se("borderBottomColor"), Do = Se("borderLeftColor"), Lo = Se("outline", me), Mo = Se("outlineColor"), Et = (e) => {
|
|
1457
1457
|
if (e.borderRadius !== void 0 && e.borderRadius !== null) {
|
|
1458
1458
|
const t = Qe(e.theme, "shape.borderRadius", 4, "borderRadius"), r = (n) => ({
|
|
1459
1459
|
borderRadius: Ze(t, n)
|
|
1460
1460
|
});
|
|
1461
|
-
return
|
|
1461
|
+
return xe(e, e.borderRadius, r);
|
|
1462
1462
|
}
|
|
1463
1463
|
return null;
|
|
1464
1464
|
};
|
|
@@ -1472,7 +1472,7 @@ const At = (e) => {
|
|
|
1472
1472
|
const t = Qe(e.theme, "spacing", 8, "gap"), r = (n) => ({
|
|
1473
1473
|
gap: Ze(t, n)
|
|
1474
1474
|
});
|
|
1475
|
-
return
|
|
1475
|
+
return xe(e, e.gap, r);
|
|
1476
1476
|
}
|
|
1477
1477
|
return null;
|
|
1478
1478
|
};
|
|
@@ -1485,7 +1485,7 @@ const Ct = (e) => {
|
|
|
1485
1485
|
const t = Qe(e.theme, "spacing", 8, "columnGap"), r = (n) => ({
|
|
1486
1486
|
columnGap: Ze(t, n)
|
|
1487
1487
|
});
|
|
1488
|
-
return
|
|
1488
|
+
return xe(e, e.columnGap, r);
|
|
1489
1489
|
}
|
|
1490
1490
|
return null;
|
|
1491
1491
|
};
|
|
@@ -1498,7 +1498,7 @@ const _t = (e) => {
|
|
|
1498
1498
|
const t = Qe(e.theme, "spacing", 8, "rowGap"), r = (n) => ({
|
|
1499
1499
|
rowGap: Ze(t, n)
|
|
1500
1500
|
});
|
|
1501
|
-
return
|
|
1501
|
+
return xe(e, e.rowGap, r);
|
|
1502
1502
|
}
|
|
1503
1503
|
return null;
|
|
1504
1504
|
};
|
|
@@ -1506,50 +1506,50 @@ _t.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1506
1506
|
rowGap: ke
|
|
1507
1507
|
} : {};
|
|
1508
1508
|
_t.filterProps = ["rowGap"];
|
|
1509
|
-
const Fo =
|
|
1509
|
+
const Fo = te({
|
|
1510
1510
|
prop: "gridColumn"
|
|
1511
|
-
}), Bo =
|
|
1511
|
+
}), Bo = te({
|
|
1512
1512
|
prop: "gridRow"
|
|
1513
|
-
}), zo =
|
|
1513
|
+
}), zo = te({
|
|
1514
1514
|
prop: "gridAutoFlow"
|
|
1515
|
-
}), jo =
|
|
1515
|
+
}), jo = te({
|
|
1516
1516
|
prop: "gridAutoColumns"
|
|
1517
|
-
}), Vo =
|
|
1517
|
+
}), Vo = te({
|
|
1518
1518
|
prop: "gridAutoRows"
|
|
1519
|
-
}), Wo =
|
|
1519
|
+
}), Wo = te({
|
|
1520
1520
|
prop: "gridTemplateColumns"
|
|
1521
|
-
}), Go =
|
|
1521
|
+
}), Go = te({
|
|
1522
1522
|
prop: "gridTemplateRows"
|
|
1523
|
-
}), Yo =
|
|
1523
|
+
}), Yo = te({
|
|
1524
1524
|
prop: "gridTemplateAreas"
|
|
1525
|
-
}), Ko =
|
|
1525
|
+
}), Ko = te({
|
|
1526
1526
|
prop: "gridArea"
|
|
1527
1527
|
});
|
|
1528
1528
|
wt(At, Ct, _t, Fo, Bo, zo, jo, Vo, Wo, Go, Yo, Ko);
|
|
1529
1529
|
function ze(e, t) {
|
|
1530
1530
|
return t === "grey" ? t : e;
|
|
1531
1531
|
}
|
|
1532
|
-
const Ho =
|
|
1532
|
+
const Ho = te({
|
|
1533
1533
|
prop: "color",
|
|
1534
1534
|
themeKey: "palette",
|
|
1535
1535
|
transform: ze
|
|
1536
|
-
}), qo =
|
|
1536
|
+
}), qo = te({
|
|
1537
1537
|
prop: "bgcolor",
|
|
1538
1538
|
cssProperty: "backgroundColor",
|
|
1539
1539
|
themeKey: "palette",
|
|
1540
1540
|
transform: ze
|
|
1541
|
-
}), Jo =
|
|
1541
|
+
}), Jo = te({
|
|
1542
1542
|
prop: "backgroundColor",
|
|
1543
1543
|
themeKey: "palette",
|
|
1544
1544
|
transform: ze
|
|
1545
1545
|
});
|
|
1546
1546
|
wt(Ho, qo, Jo);
|
|
1547
|
-
function
|
|
1547
|
+
function ue(e) {
|
|
1548
1548
|
return e <= 1 && e !== 0 ? `${e * 100}%` : e;
|
|
1549
1549
|
}
|
|
1550
|
-
const Xo =
|
|
1550
|
+
const Xo = te({
|
|
1551
1551
|
prop: "width",
|
|
1552
|
-
transform:
|
|
1552
|
+
transform: ue
|
|
1553
1553
|
}), rr = (e) => {
|
|
1554
1554
|
if (e.maxWidth !== void 0 && e.maxWidth !== null) {
|
|
1555
1555
|
const t = (r) => {
|
|
@@ -1559,38 +1559,38 @@ const Xo = ee({
|
|
|
1559
1559
|
} : {
|
|
1560
1560
|
maxWidth: n
|
|
1561
1561
|
} : {
|
|
1562
|
-
maxWidth:
|
|
1562
|
+
maxWidth: ue(r)
|
|
1563
1563
|
};
|
|
1564
1564
|
};
|
|
1565
|
-
return
|
|
1565
|
+
return xe(e, e.maxWidth, t);
|
|
1566
1566
|
}
|
|
1567
1567
|
return null;
|
|
1568
1568
|
};
|
|
1569
1569
|
rr.filterProps = ["maxWidth"];
|
|
1570
|
-
const Qo =
|
|
1570
|
+
const Qo = te({
|
|
1571
1571
|
prop: "minWidth",
|
|
1572
|
-
transform:
|
|
1573
|
-
}), Zo =
|
|
1572
|
+
transform: ue
|
|
1573
|
+
}), Zo = te({
|
|
1574
1574
|
prop: "height",
|
|
1575
|
-
transform:
|
|
1576
|
-
}), ei =
|
|
1575
|
+
transform: ue
|
|
1576
|
+
}), ei = te({
|
|
1577
1577
|
prop: "maxHeight",
|
|
1578
|
-
transform:
|
|
1579
|
-
}), ti =
|
|
1578
|
+
transform: ue
|
|
1579
|
+
}), ti = te({
|
|
1580
1580
|
prop: "minHeight",
|
|
1581
|
-
transform:
|
|
1581
|
+
transform: ue
|
|
1582
1582
|
});
|
|
1583
|
-
|
|
1583
|
+
te({
|
|
1584
1584
|
prop: "size",
|
|
1585
1585
|
cssProperty: "width",
|
|
1586
|
-
transform:
|
|
1586
|
+
transform: ue
|
|
1587
1587
|
});
|
|
1588
|
-
|
|
1588
|
+
te({
|
|
1589
1589
|
prop: "size",
|
|
1590
1590
|
cssProperty: "height",
|
|
1591
|
-
transform:
|
|
1591
|
+
transform: ue
|
|
1592
1592
|
});
|
|
1593
|
-
const ri =
|
|
1593
|
+
const ri = te({
|
|
1594
1594
|
prop: "boxSizing"
|
|
1595
1595
|
});
|
|
1596
1596
|
wt(Xo, rr, Qo, Zo, ei, ti, ri);
|
|
@@ -1598,23 +1598,23 @@ const Tt = {
|
|
|
1598
1598
|
// borders
|
|
1599
1599
|
border: {
|
|
1600
1600
|
themeKey: "borders",
|
|
1601
|
-
transform:
|
|
1601
|
+
transform: me
|
|
1602
1602
|
},
|
|
1603
1603
|
borderTop: {
|
|
1604
1604
|
themeKey: "borders",
|
|
1605
|
-
transform:
|
|
1605
|
+
transform: me
|
|
1606
1606
|
},
|
|
1607
1607
|
borderRight: {
|
|
1608
1608
|
themeKey: "borders",
|
|
1609
|
-
transform:
|
|
1609
|
+
transform: me
|
|
1610
1610
|
},
|
|
1611
1611
|
borderBottom: {
|
|
1612
1612
|
themeKey: "borders",
|
|
1613
|
-
transform:
|
|
1613
|
+
transform: me
|
|
1614
1614
|
},
|
|
1615
1615
|
borderLeft: {
|
|
1616
1616
|
themeKey: "borders",
|
|
1617
|
-
transform:
|
|
1617
|
+
transform: me
|
|
1618
1618
|
},
|
|
1619
1619
|
borderColor: {
|
|
1620
1620
|
themeKey: "palette"
|
|
@@ -1633,7 +1633,7 @@ const Tt = {
|
|
|
1633
1633
|
},
|
|
1634
1634
|
outline: {
|
|
1635
1635
|
themeKey: "borders",
|
|
1636
|
-
transform:
|
|
1636
|
+
transform: me
|
|
1637
1637
|
},
|
|
1638
1638
|
outlineColor: {
|
|
1639
1639
|
themeKey: "palette"
|
|
@@ -1839,22 +1839,22 @@ const Tt = {
|
|
|
1839
1839
|
},
|
|
1840
1840
|
// sizing
|
|
1841
1841
|
width: {
|
|
1842
|
-
transform:
|
|
1842
|
+
transform: ue
|
|
1843
1843
|
},
|
|
1844
1844
|
maxWidth: {
|
|
1845
1845
|
style: rr
|
|
1846
1846
|
},
|
|
1847
1847
|
minWidth: {
|
|
1848
|
-
transform:
|
|
1848
|
+
transform: ue
|
|
1849
1849
|
},
|
|
1850
1850
|
height: {
|
|
1851
|
-
transform:
|
|
1851
|
+
transform: ue
|
|
1852
1852
|
},
|
|
1853
1853
|
maxHeight: {
|
|
1854
|
-
transform:
|
|
1854
|
+
transform: ue
|
|
1855
1855
|
},
|
|
1856
1856
|
minHeight: {
|
|
1857
|
-
transform:
|
|
1857
|
+
transform: ue
|
|
1858
1858
|
},
|
|
1859
1859
|
boxSizing: {},
|
|
1860
1860
|
// typography
|
|
@@ -1891,7 +1891,7 @@ function oi(e, t) {
|
|
|
1891
1891
|
}
|
|
1892
1892
|
function ii() {
|
|
1893
1893
|
function e(r, n, o, i) {
|
|
1894
|
-
const
|
|
1894
|
+
const c = {
|
|
1895
1895
|
[r]: n,
|
|
1896
1896
|
theme: o
|
|
1897
1897
|
}, l = i[r];
|
|
@@ -1902,7 +1902,7 @@ function ii() {
|
|
|
1902
1902
|
const {
|
|
1903
1903
|
cssProperty: f = r,
|
|
1904
1904
|
themeKey: u,
|
|
1905
|
-
transform:
|
|
1905
|
+
transform: y,
|
|
1906
1906
|
style: d
|
|
1907
1907
|
} = l;
|
|
1908
1908
|
if (n == null)
|
|
@@ -1911,11 +1911,11 @@ function ii() {
|
|
|
1911
1911
|
return {
|
|
1912
1912
|
[r]: n
|
|
1913
1913
|
};
|
|
1914
|
-
const
|
|
1915
|
-
return d ? d(
|
|
1916
|
-
let
|
|
1917
|
-
return
|
|
1918
|
-
[f]:
|
|
1914
|
+
const h = St(o, u) || {};
|
|
1915
|
+
return d ? d(c) : xe(c, n, (g) => {
|
|
1916
|
+
let a = mt(h, y, g);
|
|
1917
|
+
return g === a && typeof g == "string" && (a = mt(h, y, `${r}${g === "default" ? "" : Ue(g)}`, g)), f === !1 ? a : {
|
|
1918
|
+
[f]: a
|
|
1919
1919
|
};
|
|
1920
1920
|
});
|
|
1921
1921
|
}
|
|
@@ -1927,7 +1927,7 @@ function ii() {
|
|
|
1927
1927
|
} = r || {};
|
|
1928
1928
|
if (!n)
|
|
1929
1929
|
return null;
|
|
1930
|
-
const
|
|
1930
|
+
const c = o.unstable_sxConfig ?? Tt;
|
|
1931
1931
|
function l(f) {
|
|
1932
1932
|
let u = f;
|
|
1933
1933
|
if (typeof f == "function")
|
|
@@ -1936,31 +1936,31 @@ function ii() {
|
|
|
1936
1936
|
return f;
|
|
1937
1937
|
if (!u)
|
|
1938
1938
|
return null;
|
|
1939
|
-
const
|
|
1940
|
-
let
|
|
1941
|
-
return Object.keys(u).forEach((
|
|
1942
|
-
const
|
|
1943
|
-
if (
|
|
1944
|
-
if (typeof
|
|
1945
|
-
if (
|
|
1946
|
-
|
|
1939
|
+
const y = bo(o.breakpoints), d = Object.keys(y);
|
|
1940
|
+
let h = y;
|
|
1941
|
+
return Object.keys(u).forEach((v) => {
|
|
1942
|
+
const g = oi(u[v], o);
|
|
1943
|
+
if (g != null)
|
|
1944
|
+
if (typeof g == "object")
|
|
1945
|
+
if (c[v])
|
|
1946
|
+
h = Je(h, e(v, g, o, c));
|
|
1947
1947
|
else {
|
|
1948
|
-
const
|
|
1948
|
+
const a = xe({
|
|
1949
1949
|
theme: o
|
|
1950
|
-
},
|
|
1951
|
-
[
|
|
1950
|
+
}, g, (b) => ({
|
|
1951
|
+
[v]: b
|
|
1952
1952
|
}));
|
|
1953
|
-
ni(
|
|
1954
|
-
sx:
|
|
1953
|
+
ni(a, g) ? h[v] = t({
|
|
1954
|
+
sx: g,
|
|
1955
1955
|
theme: o,
|
|
1956
1956
|
nested: !0
|
|
1957
|
-
}) :
|
|
1957
|
+
}) : h = Je(h, a);
|
|
1958
1958
|
}
|
|
1959
1959
|
else
|
|
1960
|
-
|
|
1960
|
+
h = Je(h, e(v, g, o, c));
|
|
1961
1961
|
}), !i && o.modularCssLayers ? {
|
|
1962
|
-
"@layer sx": $r(o, Pr(d,
|
|
1963
|
-
} : $r(o, Pr(d,
|
|
1962
|
+
"@layer sx": $r(o, Pr(d, h))
|
|
1963
|
+
} : $r(o, Pr(d, h));
|
|
1964
1964
|
}
|
|
1965
1965
|
return Array.isArray(n) ? n.map(l) : l(n);
|
|
1966
1966
|
}
|
|
@@ -2055,10 +2055,10 @@ var li = /[A-Z]|^ms/g, ui = /_EMO_([^_]+?)_([^]*?)_EMO_/g, ln = function(t) {
|
|
|
2055
2055
|
case "animationName":
|
|
2056
2056
|
if (typeof r == "string")
|
|
2057
2057
|
return r.replace(ui, function(n, o, i) {
|
|
2058
|
-
return
|
|
2058
|
+
return Re = {
|
|
2059
2059
|
name: o,
|
|
2060
2060
|
styles: i,
|
|
2061
|
-
next:
|
|
2061
|
+
next: Re
|
|
2062
2062
|
}, o;
|
|
2063
2063
|
});
|
|
2064
2064
|
}
|
|
@@ -2076,21 +2076,21 @@ function ht(e, t, r) {
|
|
|
2076
2076
|
case "object": {
|
|
2077
2077
|
var o = r;
|
|
2078
2078
|
if (o.anim === 1)
|
|
2079
|
-
return
|
|
2079
|
+
return Re = {
|
|
2080
2080
|
name: o.name,
|
|
2081
2081
|
styles: o.styles,
|
|
2082
|
-
next:
|
|
2082
|
+
next: Re
|
|
2083
2083
|
}, o.name;
|
|
2084
2084
|
var i = r;
|
|
2085
2085
|
if (i.styles !== void 0) {
|
|
2086
|
-
var
|
|
2087
|
-
if (
|
|
2088
|
-
for (;
|
|
2089
|
-
|
|
2090
|
-
name:
|
|
2091
|
-
styles:
|
|
2092
|
-
next:
|
|
2093
|
-
},
|
|
2086
|
+
var c = i.next;
|
|
2087
|
+
if (c !== void 0)
|
|
2088
|
+
for (; c !== void 0; )
|
|
2089
|
+
Re = {
|
|
2090
|
+
name: c.name,
|
|
2091
|
+
styles: c.styles,
|
|
2092
|
+
next: Re
|
|
2093
|
+
}, c = c.next;
|
|
2094
2094
|
var l = i.styles + ";";
|
|
2095
2095
|
return l;
|
|
2096
2096
|
}
|
|
@@ -2107,15 +2107,15 @@ function fi(e, t, r) {
|
|
|
2107
2107
|
n += ht(e, t, r[o]) + ";";
|
|
2108
2108
|
else
|
|
2109
2109
|
for (var i in r) {
|
|
2110
|
-
var
|
|
2111
|
-
if (typeof
|
|
2112
|
-
var l =
|
|
2110
|
+
var c = r[i];
|
|
2111
|
+
if (typeof c != "object") {
|
|
2112
|
+
var l = c;
|
|
2113
2113
|
Ur(l) && (n += Mt(i) + ":" + Dr(i, l) + ";");
|
|
2114
|
-
} else if (Array.isArray(
|
|
2115
|
-
for (var f = 0; f <
|
|
2116
|
-
Ur(
|
|
2114
|
+
} else if (Array.isArray(c) && typeof c[0] == "string" && t == null)
|
|
2115
|
+
for (var f = 0; f < c.length; f++)
|
|
2116
|
+
Ur(c[f]) && (n += Mt(i) + ":" + Dr(i, c[f]) + ";");
|
|
2117
2117
|
else {
|
|
2118
|
-
var u = ht(e, t,
|
|
2118
|
+
var u = ht(e, t, c);
|
|
2119
2119
|
switch (i) {
|
|
2120
2120
|
case "animation":
|
|
2121
2121
|
case "animationName": {
|
|
@@ -2129,18 +2129,18 @@ function fi(e, t, r) {
|
|
|
2129
2129
|
}
|
|
2130
2130
|
return n;
|
|
2131
2131
|
}
|
|
2132
|
-
var Lr = /label:\s*([^\s;{]+)\s*(;|$)/g,
|
|
2132
|
+
var Lr = /label:\s*([^\s;{]+)\s*(;|$)/g, Re;
|
|
2133
2133
|
function di(e, t, r) {
|
|
2134
2134
|
if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
|
|
2135
2135
|
return e[0];
|
|
2136
2136
|
var n = !0, o = "";
|
|
2137
|
-
|
|
2137
|
+
Re = void 0;
|
|
2138
2138
|
var i = e[0];
|
|
2139
2139
|
if (i == null || i.raw === void 0)
|
|
2140
2140
|
n = !1, o += ht(r, t, i);
|
|
2141
2141
|
else {
|
|
2142
|
-
var
|
|
2143
|
-
o +=
|
|
2142
|
+
var c = i;
|
|
2143
|
+
o += c[0];
|
|
2144
2144
|
}
|
|
2145
2145
|
for (var l = 1; l < e.length; l++)
|
|
2146
2146
|
if (o += ht(r, t, e[l]), n) {
|
|
@@ -2148,13 +2148,13 @@ function di(e, t, r) {
|
|
|
2148
2148
|
o += f[l];
|
|
2149
2149
|
}
|
|
2150
2150
|
Lr.lastIndex = 0;
|
|
2151
|
-
for (var u = "",
|
|
2152
|
-
u += "-" +
|
|
2151
|
+
for (var u = "", y; (y = Lr.exec(o)) !== null; )
|
|
2152
|
+
u += "-" + y[1];
|
|
2153
2153
|
var d = si(o) + u;
|
|
2154
2154
|
return {
|
|
2155
2155
|
name: d,
|
|
2156
2156
|
styles: o,
|
|
2157
|
-
next:
|
|
2157
|
+
next: Re
|
|
2158
2158
|
};
|
|
2159
2159
|
}
|
|
2160
2160
|
function pi(e, t) {
|
|
@@ -2201,31 +2201,31 @@ function gi(e) {
|
|
|
2201
2201
|
unit: r = "px",
|
|
2202
2202
|
step: n = 5,
|
|
2203
2203
|
...o
|
|
2204
|
-
} = e, i = hi(t),
|
|
2205
|
-
function l(
|
|
2206
|
-
return `@media (min-width:${typeof t[
|
|
2204
|
+
} = e, i = hi(t), c = Object.keys(i);
|
|
2205
|
+
function l(h) {
|
|
2206
|
+
return `@media (min-width:${typeof t[h] == "number" ? t[h] : h}${r})`;
|
|
2207
2207
|
}
|
|
2208
|
-
function f(
|
|
2209
|
-
return `@media (max-width:${(typeof t[
|
|
2208
|
+
function f(h) {
|
|
2209
|
+
return `@media (max-width:${(typeof t[h] == "number" ? t[h] : h) - n / 100}${r})`;
|
|
2210
2210
|
}
|
|
2211
|
-
function u(
|
|
2212
|
-
const
|
|
2213
|
-
return `@media (min-width:${typeof t[
|
|
2211
|
+
function u(h, v) {
|
|
2212
|
+
const g = c.indexOf(v);
|
|
2213
|
+
return `@media (min-width:${typeof t[h] == "number" ? t[h] : h}${r}) and (max-width:${(g !== -1 && typeof t[c[g]] == "number" ? t[c[g]] : v) - n / 100}${r})`;
|
|
2214
2214
|
}
|
|
2215
|
-
function
|
|
2216
|
-
return
|
|
2215
|
+
function y(h) {
|
|
2216
|
+
return c.indexOf(h) + 1 < c.length ? u(h, c[c.indexOf(h) + 1]) : l(h);
|
|
2217
2217
|
}
|
|
2218
|
-
function d(
|
|
2219
|
-
const
|
|
2220
|
-
return
|
|
2218
|
+
function d(h) {
|
|
2219
|
+
const v = c.indexOf(h);
|
|
2220
|
+
return v === 0 ? l(c[1]) : v === c.length - 1 ? f(c[v]) : u(h, c[c.indexOf(h) + 1]).replace("@media", "@media not all and");
|
|
2221
2221
|
}
|
|
2222
2222
|
return {
|
|
2223
|
-
keys:
|
|
2223
|
+
keys: c,
|
|
2224
2224
|
values: i,
|
|
2225
2225
|
up: l,
|
|
2226
2226
|
down: f,
|
|
2227
2227
|
between: u,
|
|
2228
|
-
only:
|
|
2228
|
+
only: y,
|
|
2229
2229
|
not: d,
|
|
2230
2230
|
unit: r,
|
|
2231
2231
|
...o
|
|
@@ -2240,12 +2240,12 @@ function un(e = 8, t = tr({
|
|
|
2240
2240
|
if (e.mui)
|
|
2241
2241
|
return e;
|
|
2242
2242
|
const r = (...n) => (process.env.NODE_ENV !== "production" && (n.length <= 4 || console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)), (n.length === 0 ? [1] : n).map((i) => {
|
|
2243
|
-
const
|
|
2244
|
-
return typeof
|
|
2243
|
+
const c = t(i);
|
|
2244
|
+
return typeof c == "number" ? `${c}px` : c;
|
|
2245
2245
|
}).join(" "));
|
|
2246
2246
|
return r.mui = !0, r;
|
|
2247
2247
|
}
|
|
2248
|
-
function
|
|
2248
|
+
function Si(e, t) {
|
|
2249
2249
|
const r = this;
|
|
2250
2250
|
if (r.vars) {
|
|
2251
2251
|
if (!r.colorSchemes?.[e] || typeof r.getColorSchemeSelector != "function")
|
|
@@ -2263,9 +2263,9 @@ function fn(e = {}, ...t) {
|
|
|
2263
2263
|
palette: n = {},
|
|
2264
2264
|
spacing: o,
|
|
2265
2265
|
shape: i = {},
|
|
2266
|
-
...
|
|
2266
|
+
...c
|
|
2267
2267
|
} = e, l = gi(r), f = un(o);
|
|
2268
|
-
let u =
|
|
2268
|
+
let u = fe({
|
|
2269
2269
|
breakpoints: l,
|
|
2270
2270
|
direction: "ltr",
|
|
2271
2271
|
components: {},
|
|
@@ -2279,10 +2279,10 @@ function fn(e = {}, ...t) {
|
|
|
2279
2279
|
...yi,
|
|
2280
2280
|
...i
|
|
2281
2281
|
}
|
|
2282
|
-
},
|
|
2283
|
-
return u = yo(u), u.applyStyles =
|
|
2282
|
+
}, c);
|
|
2283
|
+
return u = yo(u), u.applyStyles = Si, u = t.reduce((y, d) => fe(y, d), u), u.unstable_sxConfig = {
|
|
2284
2284
|
...Tt,
|
|
2285
|
-
...
|
|
2285
|
+
...c?.unstable_sxConfig
|
|
2286
2286
|
}, u.unstable_sx = function(d) {
|
|
2287
2287
|
return je({
|
|
2288
2288
|
sx: d,
|
|
@@ -2303,7 +2303,7 @@ function dn(e) {
|
|
|
2303
2303
|
typeof o.style != "function" && (o.style = Ne(o.style));
|
|
2304
2304
|
}), n;
|
|
2305
2305
|
}
|
|
2306
|
-
const
|
|
2306
|
+
const bi = fn();
|
|
2307
2307
|
function Ft(e) {
|
|
2308
2308
|
return e !== "ownerState" && e !== "theme" && e !== "sx" && e !== "as";
|
|
2309
2309
|
}
|
|
@@ -2327,9 +2327,9 @@ function lt(e, t, r) {
|
|
|
2327
2327
|
else {
|
|
2328
2328
|
const {
|
|
2329
2329
|
variants: i,
|
|
2330
|
-
...
|
|
2330
|
+
...c
|
|
2331
2331
|
} = n;
|
|
2332
|
-
o = r ? Pe(Ne(
|
|
2332
|
+
o = r ? Pe(Ne(c), r) : c;
|
|
2333
2333
|
}
|
|
2334
2334
|
return pn(e, n.variants, [o], r);
|
|
2335
2335
|
}
|
|
@@ -2338,30 +2338,30 @@ function lt(e, t, r) {
|
|
|
2338
2338
|
function pn(e, t, r = [], n = void 0) {
|
|
2339
2339
|
let o;
|
|
2340
2340
|
e: for (let i = 0; i < t.length; i += 1) {
|
|
2341
|
-
const
|
|
2342
|
-
if (typeof
|
|
2341
|
+
const c = t[i];
|
|
2342
|
+
if (typeof c.props == "function") {
|
|
2343
2343
|
if (o ??= {
|
|
2344
2344
|
...e,
|
|
2345
2345
|
...e.ownerState,
|
|
2346
2346
|
ownerState: e.ownerState
|
|
2347
|
-
}, !
|
|
2347
|
+
}, !c.props(o))
|
|
2348
2348
|
continue;
|
|
2349
2349
|
} else
|
|
2350
|
-
for (const l in
|
|
2351
|
-
if (e[l] !==
|
|
2350
|
+
for (const l in c.props)
|
|
2351
|
+
if (e[l] !== c.props[l] && e.ownerState?.[l] !== c.props[l])
|
|
2352
2352
|
continue e;
|
|
2353
|
-
typeof
|
|
2353
|
+
typeof c.style == "function" ? (o ??= {
|
|
2354
2354
|
...e,
|
|
2355
2355
|
...e.ownerState,
|
|
2356
2356
|
ownerState: e.ownerState
|
|
2357
|
-
}, r.push(n ? Pe(Ne(
|
|
2357
|
+
}, r.push(n ? Pe(Ne(c.style(o)), n) : c.style(o))) : r.push(n ? Pe(Ne(c.style), n) : c.style);
|
|
2358
2358
|
}
|
|
2359
2359
|
return r;
|
|
2360
2360
|
}
|
|
2361
2361
|
function Ei(e = {}) {
|
|
2362
2362
|
const {
|
|
2363
2363
|
themeId: t,
|
|
2364
|
-
defaultTheme: r =
|
|
2364
|
+
defaultTheme: r = bi,
|
|
2365
2365
|
rootShouldForwardProp: n = Ft,
|
|
2366
2366
|
slotShouldForwardProp: o = Ft
|
|
2367
2367
|
} = e;
|
|
@@ -2369,63 +2369,63 @@ function Ei(e = {}) {
|
|
|
2369
2369
|
wi(l, t, r);
|
|
2370
2370
|
}
|
|
2371
2371
|
return (l, f = {}) => {
|
|
2372
|
-
mi(l, (
|
|
2372
|
+
mi(l, (w) => w.filter((I) => I !== je));
|
|
2373
2373
|
const {
|
|
2374
2374
|
name: u,
|
|
2375
|
-
slot:
|
|
2375
|
+
slot: y,
|
|
2376
2376
|
skipVariantsResolver: d,
|
|
2377
|
-
skipSx:
|
|
2377
|
+
skipSx: h,
|
|
2378
2378
|
// TODO v6: remove `lowercaseFirstLetter()` in the next major release
|
|
2379
2379
|
// For more details: https://github.com/mui/material-ui/pull/37908
|
|
2380
|
-
overridesResolver:
|
|
2381
|
-
...
|
|
2382
|
-
} = f,
|
|
2380
|
+
overridesResolver: v = vi(mn(y)),
|
|
2381
|
+
...g
|
|
2382
|
+
} = f, a = u && u.startsWith("Mui") || y ? "components" : "custom", b = d !== void 0 ? d : (
|
|
2383
2383
|
// TODO v6: remove `Root` in the next major release
|
|
2384
2384
|
// For more details: https://github.com/mui/material-ui/pull/37908
|
|
2385
|
-
|
|
2386
|
-
),
|
|
2387
|
-
let
|
|
2388
|
-
|
|
2389
|
-
const
|
|
2390
|
-
shouldForwardProp:
|
|
2391
|
-
label: Ci(u,
|
|
2392
|
-
...
|
|
2393
|
-
}),
|
|
2394
|
-
if (
|
|
2395
|
-
return
|
|
2396
|
-
if (typeof
|
|
2397
|
-
return function(
|
|
2398
|
-
return lt(
|
|
2385
|
+
y && y !== "Root" && y !== "root" || !1
|
|
2386
|
+
), C = h || !1;
|
|
2387
|
+
let _ = Ft;
|
|
2388
|
+
y === "Root" || y === "root" ? _ = n : y ? _ = o : Ti(l) && (_ = void 0);
|
|
2389
|
+
const A = pi(l, {
|
|
2390
|
+
shouldForwardProp: _,
|
|
2391
|
+
label: Ci(u, y),
|
|
2392
|
+
...g
|
|
2393
|
+
}), m = (w) => {
|
|
2394
|
+
if (w.__emotion_real === w)
|
|
2395
|
+
return w;
|
|
2396
|
+
if (typeof w == "function")
|
|
2397
|
+
return function(k) {
|
|
2398
|
+
return lt(k, w, k.theme.modularCssLayers ? a : void 0);
|
|
2399
2399
|
};
|
|
2400
|
-
if (
|
|
2401
|
-
const
|
|
2402
|
-
return function(
|
|
2403
|
-
return
|
|
2400
|
+
if (Te(w)) {
|
|
2401
|
+
const I = dn(w);
|
|
2402
|
+
return function($) {
|
|
2403
|
+
return I.variants ? lt($, I, $.theme.modularCssLayers ? a : void 0) : $.theme.modularCssLayers ? Pe(I.style, a) : I.style;
|
|
2404
2404
|
};
|
|
2405
2405
|
}
|
|
2406
|
-
return
|
|
2407
|
-
}, p = (...
|
|
2408
|
-
const
|
|
2409
|
-
if (
|
|
2410
|
-
const oe =
|
|
2406
|
+
return w;
|
|
2407
|
+
}, p = (...w) => {
|
|
2408
|
+
const I = [], k = w.map(m), $ = [];
|
|
2409
|
+
if (I.push(i), u && v && $.push(function(V) {
|
|
2410
|
+
const oe = V.theme.components?.[u]?.styleOverrides;
|
|
2411
2411
|
if (!oe)
|
|
2412
2412
|
return null;
|
|
2413
2413
|
const ce = {};
|
|
2414
|
-
for (const
|
|
2415
|
-
ce[
|
|
2416
|
-
return
|
|
2417
|
-
}), u && !
|
|
2418
|
-
const oe =
|
|
2419
|
-
return oe ? pn(
|
|
2420
|
-
}),
|
|
2421
|
-
const
|
|
2414
|
+
for (const we in oe)
|
|
2415
|
+
ce[we] = lt(V, oe[we], V.theme.modularCssLayers ? "theme" : void 0);
|
|
2416
|
+
return v(V, ce);
|
|
2417
|
+
}), u && !b && $.push(function(V) {
|
|
2418
|
+
const oe = V.theme?.components?.[u]?.variants;
|
|
2419
|
+
return oe ? pn(V, oe, [], V.theme.modularCssLayers ? "theme" : void 0) : null;
|
|
2420
|
+
}), C || $.push(je), Array.isArray(k[0])) {
|
|
2421
|
+
const L = k.shift(), V = new Array(I.length).fill(""), ae = new Array($.length).fill("");
|
|
2422
2422
|
let oe;
|
|
2423
|
-
oe = [...
|
|
2423
|
+
oe = [...V, ...L, ...ae], oe.raw = [...V, ...L.raw, ...ae], I.unshift(oe);
|
|
2424
2424
|
}
|
|
2425
|
-
const
|
|
2426
|
-
return l.muiName && (O.muiName = l.muiName), process.env.NODE_ENV !== "production" && (O.displayName = Ai(u,
|
|
2425
|
+
const s = [...I, ...k, ...$], O = A(...s);
|
|
2426
|
+
return l.muiName && (O.muiName = l.muiName), process.env.NODE_ENV !== "production" && (O.displayName = Ai(u, y, l)), O;
|
|
2427
2427
|
};
|
|
2428
|
-
return
|
|
2428
|
+
return A.withConfig && (p.withConfig = A.withConfig), p;
|
|
2429
2429
|
};
|
|
2430
2430
|
}
|
|
2431
2431
|
function Ai(e, t, r) {
|
|
@@ -2504,9 +2504,9 @@ function hn(e) {
|
|
|
2504
2504
|
e = $e(e);
|
|
2505
2505
|
const {
|
|
2506
2506
|
values: t
|
|
2507
|
-
} = e, r = t[0], n = t[1] / 100, o = t[2] / 100, i = n * Math.min(o, 1 - o),
|
|
2507
|
+
} = e, r = t[0], n = t[1] / 100, o = t[2] / 100, i = n * Math.min(o, 1 - o), c = (u, y = (u + r / 30) % 12) => o - i * Math.max(Math.min(y - 3, 9 - y, 1), -1);
|
|
2508
2508
|
let l = "rgb";
|
|
2509
|
-
const f = [Math.round(
|
|
2509
|
+
const f = [Math.round(c(0) * 255), Math.round(c(8) * 255), Math.round(c(4) * 255)];
|
|
2510
2510
|
return e.type === "hsla" && (l += "a", f.push(t[3])), xt({
|
|
2511
2511
|
type: l,
|
|
2512
2512
|
values: f
|
|
@@ -2575,7 +2575,7 @@ function at(e, t, r) {
|
|
|
2575
2575
|
}
|
|
2576
2576
|
}
|
|
2577
2577
|
const $i = /* @__PURE__ */ Oe.createContext(void 0);
|
|
2578
|
-
process.env.NODE_ENV !== "production" && (
|
|
2578
|
+
process.env.NODE_ENV !== "production" && (j.node, j.object);
|
|
2579
2579
|
function ki(e) {
|
|
2580
2580
|
const {
|
|
2581
2581
|
theme: t,
|
|
@@ -2621,13 +2621,13 @@ function Ui(e = "") {
|
|
|
2621
2621
|
}
|
|
2622
2622
|
const zr = (e, t, r, n = []) => {
|
|
2623
2623
|
let o = e;
|
|
2624
|
-
t.forEach((i,
|
|
2625
|
-
|
|
2624
|
+
t.forEach((i, c) => {
|
|
2625
|
+
c === t.length - 1 ? Array.isArray(o) ? o[Number(i)] = r : o && typeof o == "object" && (o[i] = r) : o && typeof o == "object" && (o[i] || (o[i] = n.includes(i) ? [] : {}), o = o[i]);
|
|
2626
2626
|
});
|
|
2627
2627
|
}, Di = (e, t, r) => {
|
|
2628
|
-
function n(o, i = [],
|
|
2628
|
+
function n(o, i = [], c = []) {
|
|
2629
2629
|
Object.entries(o).forEach(([l, f]) => {
|
|
2630
|
-
(!r || r && !r([...i, l])) && f != null && (typeof f == "object" && Object.keys(f).length > 0 ? n(f, [...i, l], Array.isArray(f) ? [...
|
|
2630
|
+
(!r || r && !r([...i, l])) && f != null && (typeof f == "object" && Object.keys(f).length > 0 ? n(f, [...i, l], Array.isArray(f) ? [...c, l] : c) : t([...i, l], f, c));
|
|
2631
2631
|
});
|
|
2632
2632
|
}
|
|
2633
2633
|
n(e);
|
|
@@ -2636,15 +2636,15 @@ function Bt(e, t) {
|
|
|
2636
2636
|
const {
|
|
2637
2637
|
prefix: r,
|
|
2638
2638
|
shouldSkipGeneratingVar: n
|
|
2639
|
-
} = t || {}, o = {}, i = {},
|
|
2639
|
+
} = t || {}, o = {}, i = {}, c = {};
|
|
2640
2640
|
return Di(
|
|
2641
2641
|
e,
|
|
2642
2642
|
(l, f, u) => {
|
|
2643
2643
|
if ((typeof f == "string" || typeof f == "number") && (!n || !n(l, f))) {
|
|
2644
|
-
const
|
|
2644
|
+
const y = `--${r ? `${r}-` : ""}${l.join("-")}`, d = Li(l, f);
|
|
2645
2645
|
Object.assign(o, {
|
|
2646
|
-
[
|
|
2647
|
-
}), zr(i, l, `var(${
|
|
2646
|
+
[y]: d
|
|
2647
|
+
}), zr(i, l, `var(${y})`, u), zr(c, l, `var(${y}, ${d})`, u);
|
|
2648
2648
|
}
|
|
2649
2649
|
},
|
|
2650
2650
|
(l) => l[0] === "vars"
|
|
@@ -2652,118 +2652,118 @@ function Bt(e, t) {
|
|
|
2652
2652
|
), {
|
|
2653
2653
|
css: o,
|
|
2654
2654
|
vars: i,
|
|
2655
|
-
varsWithDefaults:
|
|
2655
|
+
varsWithDefaults: c
|
|
2656
2656
|
};
|
|
2657
2657
|
}
|
|
2658
2658
|
function Mi(e, t = {}) {
|
|
2659
2659
|
const {
|
|
2660
|
-
getSelector: r =
|
|
2660
|
+
getSelector: r = b,
|
|
2661
2661
|
disableCssColorScheme: n,
|
|
2662
2662
|
colorSchemeSelector: o
|
|
2663
2663
|
} = t, {
|
|
2664
2664
|
colorSchemes: i = {},
|
|
2665
|
-
components:
|
|
2665
|
+
components: c,
|
|
2666
2666
|
defaultColorScheme: l = "light",
|
|
2667
2667
|
...f
|
|
2668
2668
|
} = e, {
|
|
2669
2669
|
vars: u,
|
|
2670
|
-
css:
|
|
2670
|
+
css: y,
|
|
2671
2671
|
varsWithDefaults: d
|
|
2672
2672
|
} = Bt(f, t);
|
|
2673
|
-
let
|
|
2674
|
-
const
|
|
2675
|
-
[l]:
|
|
2676
|
-
...
|
|
2673
|
+
let h = d;
|
|
2674
|
+
const v = {}, {
|
|
2675
|
+
[l]: g,
|
|
2676
|
+
...a
|
|
2677
2677
|
} = i;
|
|
2678
|
-
if (Object.entries(
|
|
2678
|
+
if (Object.entries(a || {}).forEach(([A, m]) => {
|
|
2679
2679
|
const {
|
|
2680
2680
|
vars: p,
|
|
2681
|
-
css:
|
|
2682
|
-
varsWithDefaults:
|
|
2683
|
-
} = Bt(
|
|
2684
|
-
|
|
2685
|
-
css:
|
|
2681
|
+
css: w,
|
|
2682
|
+
varsWithDefaults: I
|
|
2683
|
+
} = Bt(m, t);
|
|
2684
|
+
h = fe(h, I), v[A] = {
|
|
2685
|
+
css: w,
|
|
2686
2686
|
vars: p
|
|
2687
2687
|
};
|
|
2688
|
-
}),
|
|
2688
|
+
}), g) {
|
|
2689
2689
|
const {
|
|
2690
|
-
css:
|
|
2691
|
-
vars:
|
|
2690
|
+
css: A,
|
|
2691
|
+
vars: m,
|
|
2692
2692
|
varsWithDefaults: p
|
|
2693
|
-
} = Bt(
|
|
2694
|
-
|
|
2695
|
-
css:
|
|
2696
|
-
vars:
|
|
2693
|
+
} = Bt(g, t);
|
|
2694
|
+
h = fe(h, p), v[l] = {
|
|
2695
|
+
css: A,
|
|
2696
|
+
vars: m
|
|
2697
2697
|
};
|
|
2698
2698
|
}
|
|
2699
|
-
function
|
|
2699
|
+
function b(A, m) {
|
|
2700
2700
|
let p = o;
|
|
2701
|
-
if (o === "class" && (p = ".%s"), o === "data" && (p = "[data-%s]"), o?.startsWith("data-") && !o.includes("%s") && (p = `[${o}="%s"]`),
|
|
2701
|
+
if (o === "class" && (p = ".%s"), o === "data" && (p = "[data-%s]"), o?.startsWith("data-") && !o.includes("%s") && (p = `[${o}="%s"]`), A) {
|
|
2702
2702
|
if (p === "media")
|
|
2703
|
-
return e.defaultColorScheme ===
|
|
2704
|
-
[`@media (prefers-color-scheme: ${i[
|
|
2705
|
-
":root":
|
|
2703
|
+
return e.defaultColorScheme === A ? ":root" : {
|
|
2704
|
+
[`@media (prefers-color-scheme: ${i[A]?.palette?.mode || A})`]: {
|
|
2705
|
+
":root": m
|
|
2706
2706
|
}
|
|
2707
2707
|
};
|
|
2708
2708
|
if (p)
|
|
2709
|
-
return e.defaultColorScheme ===
|
|
2709
|
+
return e.defaultColorScheme === A ? `:root, ${p.replace("%s", String(A))}` : p.replace("%s", String(A));
|
|
2710
2710
|
}
|
|
2711
2711
|
return ":root";
|
|
2712
2712
|
}
|
|
2713
2713
|
return {
|
|
2714
|
-
vars:
|
|
2714
|
+
vars: h,
|
|
2715
2715
|
generateThemeVars: () => {
|
|
2716
|
-
let
|
|
2716
|
+
let A = {
|
|
2717
2717
|
...u
|
|
2718
2718
|
};
|
|
2719
|
-
return Object.entries(
|
|
2720
|
-
vars:
|
|
2719
|
+
return Object.entries(v).forEach(([, {
|
|
2720
|
+
vars: m
|
|
2721
2721
|
}]) => {
|
|
2722
|
-
|
|
2723
|
-
}),
|
|
2722
|
+
A = fe(A, m);
|
|
2723
|
+
}), A;
|
|
2724
2724
|
},
|
|
2725
2725
|
generateStyleSheets: () => {
|
|
2726
|
-
const
|
|
2727
|
-
function p(
|
|
2728
|
-
Object.keys(
|
|
2729
|
-
[
|
|
2730
|
-
|
|
2726
|
+
const A = [], m = e.defaultColorScheme || "light";
|
|
2727
|
+
function p(k, $) {
|
|
2728
|
+
Object.keys($).length && A.push(typeof k == "string" ? {
|
|
2729
|
+
[k]: {
|
|
2730
|
+
...$
|
|
2731
2731
|
}
|
|
2732
|
-
} :
|
|
2732
|
+
} : k);
|
|
2733
2733
|
}
|
|
2734
2734
|
p(r(void 0, {
|
|
2735
|
-
...
|
|
2736
|
-
}),
|
|
2735
|
+
...y
|
|
2736
|
+
}), y);
|
|
2737
2737
|
const {
|
|
2738
|
-
[
|
|
2739
|
-
...
|
|
2740
|
-
} =
|
|
2741
|
-
if (
|
|
2738
|
+
[m]: w,
|
|
2739
|
+
...I
|
|
2740
|
+
} = v;
|
|
2741
|
+
if (w) {
|
|
2742
2742
|
const {
|
|
2743
|
-
css:
|
|
2744
|
-
} =
|
|
2745
|
-
colorScheme:
|
|
2746
|
-
...
|
|
2743
|
+
css: k
|
|
2744
|
+
} = w, $ = i[m]?.palette?.mode, s = !n && $ ? {
|
|
2745
|
+
colorScheme: $,
|
|
2746
|
+
...k
|
|
2747
2747
|
} : {
|
|
2748
|
-
...
|
|
2748
|
+
...k
|
|
2749
2749
|
};
|
|
2750
|
-
p(r(
|
|
2751
|
-
...
|
|
2752
|
-
}),
|
|
2750
|
+
p(r(m, {
|
|
2751
|
+
...s
|
|
2752
|
+
}), s);
|
|
2753
2753
|
}
|
|
2754
|
-
return Object.entries(
|
|
2755
|
-
css:
|
|
2754
|
+
return Object.entries(I).forEach(([k, {
|
|
2755
|
+
css: $
|
|
2756
2756
|
}]) => {
|
|
2757
|
-
const
|
|
2758
|
-
colorScheme:
|
|
2759
|
-
|
|
2757
|
+
const s = i[k]?.palette?.mode, O = !n && s ? {
|
|
2758
|
+
colorScheme: s,
|
|
2759
|
+
...$
|
|
2760
2760
|
} : {
|
|
2761
|
-
|
|
2761
|
+
...$
|
|
2762
2762
|
};
|
|
2763
|
-
p(r(
|
|
2763
|
+
p(r(k, {
|
|
2764
2764
|
...O
|
|
2765
2765
|
}), O);
|
|
2766
|
-
}),
|
|
2766
|
+
}), A;
|
|
2767
2767
|
}
|
|
2768
2768
|
};
|
|
2769
2769
|
}
|
|
@@ -2976,31 +2976,31 @@ function sr(e) {
|
|
|
2976
2976
|
contrastThreshold: r = 3,
|
|
2977
2977
|
tonalOffset: n = 0.2,
|
|
2978
2978
|
...o
|
|
2979
|
-
} = e, i = e.primary || ji(t),
|
|
2980
|
-
function d(
|
|
2981
|
-
const
|
|
2979
|
+
} = e, i = e.primary || ji(t), c = e.secondary || Vi(t), l = e.error || Wi(t), f = e.info || Gi(t), u = e.success || Yi(t), y = e.warning || Ki(t);
|
|
2980
|
+
function d(a) {
|
|
2981
|
+
const b = Fr(a, jr.text.primary) >= r ? jr.text.primary : zi.text.primary;
|
|
2982
2982
|
if (process.env.NODE_ENV !== "production") {
|
|
2983
|
-
const
|
|
2984
|
-
|
|
2983
|
+
const C = Fr(a, b);
|
|
2984
|
+
C < 3 && console.error([`MUI: The contrast ratio of ${C}:1 for ${b} on ${a}`, "falls below the WCAG recommended absolute minimum contrast ratio of 3:1.", "https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
2985
2985
|
`));
|
|
2986
2986
|
}
|
|
2987
|
-
return
|
|
2987
|
+
return b;
|
|
2988
2988
|
}
|
|
2989
|
-
const
|
|
2990
|
-
color:
|
|
2991
|
-
name:
|
|
2992
|
-
mainShade:
|
|
2993
|
-
lightShade:
|
|
2994
|
-
darkShade:
|
|
2989
|
+
const h = ({
|
|
2990
|
+
color: a,
|
|
2991
|
+
name: b,
|
|
2992
|
+
mainShade: C = 500,
|
|
2993
|
+
lightShade: _ = 300,
|
|
2994
|
+
darkShade: A = 700
|
|
2995
2995
|
}) => {
|
|
2996
|
-
if (
|
|
2997
|
-
...
|
|
2998
|
-
}, !
|
|
2999
|
-
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The color${
|
|
3000
|
-
The color object needs to have a \`main\` property or a \`${
|
|
3001
|
-
if (typeof
|
|
3002
|
-
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The color${
|
|
3003
|
-
\`color.main\` should be a string, but \`${JSON.stringify(
|
|
2996
|
+
if (a = {
|
|
2997
|
+
...a
|
|
2998
|
+
}, !a.main && a[C] && (a.main = a[C]), !a.hasOwnProperty("main"))
|
|
2999
|
+
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The color${b ? ` (${b})` : ""} provided to augmentColor(color) is invalid.
|
|
3000
|
+
The color object needs to have a \`main\` property or a \`${C}\` property.` : Ie(11, b ? ` (${b})` : "", C));
|
|
3001
|
+
if (typeof a.main != "string")
|
|
3002
|
+
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The color${b ? ` (${b})` : ""} provided to augmentColor(color) is invalid.
|
|
3003
|
+
\`color.main\` should be a string, but \`${JSON.stringify(a.main)}\` was provided instead.
|
|
3004
3004
|
|
|
3005
3005
|
Did you intend to use one of the following approaches?
|
|
3006
3006
|
|
|
@@ -3012,11 +3012,11 @@ const theme1 = createTheme({ palette: {
|
|
|
3012
3012
|
|
|
3013
3013
|
const theme2 = createTheme({ palette: {
|
|
3014
3014
|
primary: { main: green[500] },
|
|
3015
|
-
} });` : Ie(12,
|
|
3016
|
-
return Vr(
|
|
3015
|
+
} });` : Ie(12, b ? ` (${b})` : "", JSON.stringify(a.main)));
|
|
3016
|
+
return Vr(a, "light", _, n), Vr(a, "dark", A, n), a.contrastText || (a.contrastText = d(a.main)), a;
|
|
3017
3017
|
};
|
|
3018
|
-
let
|
|
3019
|
-
return t === "light" ?
|
|
3018
|
+
let v;
|
|
3019
|
+
return t === "light" ? v = gn() : t === "dark" && (v = yn()), process.env.NODE_ENV !== "production" && (v || console.error(`MUI: The palette mode \`${t}\` is not supported.`)), fe({
|
|
3020
3020
|
// A collection of common colors.
|
|
3021
3021
|
common: {
|
|
3022
3022
|
...Xe
|
|
@@ -3025,35 +3025,35 @@ const theme2 = createTheme({ palette: {
|
|
|
3025
3025
|
// The palette mode, can be light or dark.
|
|
3026
3026
|
mode: t,
|
|
3027
3027
|
// The colors used to represent primary interface elements for a user.
|
|
3028
|
-
primary:
|
|
3028
|
+
primary: h({
|
|
3029
3029
|
color: i,
|
|
3030
3030
|
name: "primary"
|
|
3031
3031
|
}),
|
|
3032
3032
|
// The colors used to represent secondary interface elements for a user.
|
|
3033
|
-
secondary:
|
|
3034
|
-
color:
|
|
3033
|
+
secondary: h({
|
|
3034
|
+
color: c,
|
|
3035
3035
|
name: "secondary",
|
|
3036
3036
|
mainShade: "A400",
|
|
3037
3037
|
lightShade: "A200",
|
|
3038
3038
|
darkShade: "A700"
|
|
3039
3039
|
}),
|
|
3040
3040
|
// The colors used to represent interface elements that the user should be made aware of.
|
|
3041
|
-
error:
|
|
3041
|
+
error: h({
|
|
3042
3042
|
color: l,
|
|
3043
3043
|
name: "error"
|
|
3044
3044
|
}),
|
|
3045
3045
|
// The colors used to represent potentially dangerous actions or important messages.
|
|
3046
|
-
warning:
|
|
3047
|
-
color:
|
|
3046
|
+
warning: h({
|
|
3047
|
+
color: y,
|
|
3048
3048
|
name: "warning"
|
|
3049
3049
|
}),
|
|
3050
3050
|
// The colors used to present information to the user that is neutral and not necessarily important.
|
|
3051
|
-
info:
|
|
3051
|
+
info: h({
|
|
3052
3052
|
color: f,
|
|
3053
3053
|
name: "info"
|
|
3054
3054
|
}),
|
|
3055
3055
|
// The colors used to indicate the successful completion of an action that user triggered.
|
|
3056
|
-
success:
|
|
3056
|
+
success: h({
|
|
3057
3057
|
color: u,
|
|
3058
3058
|
name: "success"
|
|
3059
3059
|
}),
|
|
@@ -3065,13 +3065,13 @@ const theme2 = createTheme({ palette: {
|
|
|
3065
3065
|
// Takes a background color and returns the text color that maximizes the contrast.
|
|
3066
3066
|
getContrastText: d,
|
|
3067
3067
|
// Generate a rich color object.
|
|
3068
|
-
augmentColor:
|
|
3068
|
+
augmentColor: h,
|
|
3069
3069
|
// Used by the functions below to shift a color's luminance by approximately
|
|
3070
3070
|
// two indexes within its tonal palette.
|
|
3071
3071
|
// E.g., shift from Red 500 to Red 300 or Red 700.
|
|
3072
3072
|
tonalOffset: n,
|
|
3073
3073
|
// The light and dark mode object.
|
|
3074
|
-
...
|
|
3074
|
+
...v
|
|
3075
3075
|
}, o);
|
|
3076
3076
|
}
|
|
3077
3077
|
function Hi(e) {
|
|
@@ -3111,44 +3111,44 @@ function Xi(e, t) {
|
|
|
3111
3111
|
// px
|
|
3112
3112
|
fontWeightLight: o = 300,
|
|
3113
3113
|
fontWeightRegular: i = 400,
|
|
3114
|
-
fontWeightMedium:
|
|
3114
|
+
fontWeightMedium: c = 500,
|
|
3115
3115
|
fontWeightBold: l = 700,
|
|
3116
3116
|
// Tell MUI what's the font-size on the html element.
|
|
3117
3117
|
// 16px is the default font-size used by browsers.
|
|
3118
3118
|
htmlFontSize: f = 16,
|
|
3119
3119
|
// Apply the CSS properties to all the variants.
|
|
3120
3120
|
allVariants: u,
|
|
3121
|
-
pxToRem:
|
|
3121
|
+
pxToRem: y,
|
|
3122
3122
|
...d
|
|
3123
3123
|
} = typeof t == "function" ? t(e) : t;
|
|
3124
3124
|
process.env.NODE_ENV !== "production" && (typeof n != "number" && console.error("MUI: `fontSize` is required to be a number."), typeof f != "number" && console.error("MUI: `htmlFontSize` is required to be a number."));
|
|
3125
|
-
const
|
|
3125
|
+
const h = n / 14, v = y || ((b) => `${b / f * h}rem`), g = (b, C, _, A, m) => ({
|
|
3126
3126
|
fontFamily: r,
|
|
3127
|
-
fontWeight:
|
|
3128
|
-
fontSize:
|
|
3127
|
+
fontWeight: b,
|
|
3128
|
+
fontSize: v(C),
|
|
3129
3129
|
// Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/
|
|
3130
|
-
lineHeight:
|
|
3130
|
+
lineHeight: _,
|
|
3131
3131
|
// The letter spacing was designed for the Roboto font-family. Using the same letter-spacing
|
|
3132
3132
|
// across font-families can cause issues with the kerning.
|
|
3133
3133
|
...r === Gr ? {
|
|
3134
|
-
letterSpacing: `${Ji(
|
|
3134
|
+
letterSpacing: `${Ji(A / C)}em`
|
|
3135
3135
|
} : {},
|
|
3136
|
-
...
|
|
3136
|
+
...m,
|
|
3137
3137
|
...u
|
|
3138
|
-
}),
|
|
3139
|
-
h1:
|
|
3140
|
-
h2:
|
|
3141
|
-
h3:
|
|
3142
|
-
h4:
|
|
3143
|
-
h5:
|
|
3144
|
-
h6:
|
|
3145
|
-
subtitle1:
|
|
3146
|
-
subtitle2:
|
|
3147
|
-
body1:
|
|
3148
|
-
body2:
|
|
3149
|
-
button:
|
|
3150
|
-
caption:
|
|
3151
|
-
overline:
|
|
3138
|
+
}), a = {
|
|
3139
|
+
h1: g(o, 96, 1.167, -1.5),
|
|
3140
|
+
h2: g(o, 60, 1.2, -0.5),
|
|
3141
|
+
h3: g(i, 48, 1.167, 0),
|
|
3142
|
+
h4: g(i, 34, 1.235, 0.25),
|
|
3143
|
+
h5: g(i, 24, 1.334, 0),
|
|
3144
|
+
h6: g(c, 20, 1.6, 0.15),
|
|
3145
|
+
subtitle1: g(i, 16, 1.75, 0.15),
|
|
3146
|
+
subtitle2: g(c, 14, 1.57, 0.1),
|
|
3147
|
+
body1: g(i, 16, 1.5, 0.15),
|
|
3148
|
+
body2: g(i, 14, 1.43, 0.15),
|
|
3149
|
+
button: g(c, 14, 1.75, 0.4, Wr),
|
|
3150
|
+
caption: g(i, 12, 1.66, 0.4),
|
|
3151
|
+
overline: g(i, 12, 2.66, 1, Wr),
|
|
3152
3152
|
// TODO v6: Remove handling of 'inherit' variant from the theme as it is already handled in Material UI's Typography component. Also, remember to remove the associated types.
|
|
3153
3153
|
inherit: {
|
|
3154
3154
|
fontFamily: "inherit",
|
|
@@ -3158,16 +3158,16 @@ function Xi(e, t) {
|
|
|
3158
3158
|
letterSpacing: "inherit"
|
|
3159
3159
|
}
|
|
3160
3160
|
};
|
|
3161
|
-
return
|
|
3161
|
+
return fe({
|
|
3162
3162
|
htmlFontSize: f,
|
|
3163
|
-
pxToRem:
|
|
3163
|
+
pxToRem: v,
|
|
3164
3164
|
fontFamily: r,
|
|
3165
3165
|
fontSize: n,
|
|
3166
3166
|
fontWeightLight: o,
|
|
3167
3167
|
fontWeightRegular: i,
|
|
3168
|
-
fontWeightMedium:
|
|
3168
|
+
fontWeightMedium: c,
|
|
3169
3169
|
fontWeightBold: l,
|
|
3170
|
-
...
|
|
3170
|
+
...a
|
|
3171
3171
|
}, d, {
|
|
3172
3172
|
clone: !1
|
|
3173
3173
|
// No need to clone deep
|
|
@@ -3221,17 +3221,17 @@ function is(e) {
|
|
|
3221
3221
|
getAutoHeightDuration: os,
|
|
3222
3222
|
create: (o = ["all"], i = {}) => {
|
|
3223
3223
|
const {
|
|
3224
|
-
duration:
|
|
3224
|
+
duration: c = r.standard,
|
|
3225
3225
|
easing: l = t.easeInOut,
|
|
3226
3226
|
delay: f = 0,
|
|
3227
3227
|
...u
|
|
3228
3228
|
} = i;
|
|
3229
3229
|
if (process.env.NODE_ENV !== "production") {
|
|
3230
|
-
const
|
|
3231
|
-
!
|
|
3230
|
+
const y = (h) => typeof h == "string", d = (h) => !Number.isNaN(parseFloat(h));
|
|
3231
|
+
!y(o) && !Array.isArray(o) && console.error('MUI: Argument "props" must be a string or Array.'), !d(c) && !y(c) && console.error(`MUI: Argument "duration" must be a number or a string but found ${c}.`), y(l) || console.error('MUI: Argument "easing" must be a string.'), !d(f) && !y(f) && console.error('MUI: Argument "delay" must be a number or a string.'), typeof i != "object" && console.error(["MUI: Secong argument of transition.create must be an object.", "Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
|
|
3232
3232
|
`)), Object.keys(u).length !== 0 && console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`);
|
|
3233
3233
|
}
|
|
3234
|
-
return (Array.isArray(o) ? o : [o]).map((
|
|
3234
|
+
return (Array.isArray(o) ? o : [o]).map((y) => `${y} ${typeof c == "string" ? c : Yr(c)} ${l} ${typeof f == "string" ? f : Yr(f)}`).join(",");
|
|
3235
3235
|
},
|
|
3236
3236
|
...e,
|
|
3237
3237
|
easing: t,
|
|
@@ -3249,19 +3249,19 @@ const ss = {
|
|
|
3249
3249
|
tooltip: 1500
|
|
3250
3250
|
};
|
|
3251
3251
|
function as(e) {
|
|
3252
|
-
return
|
|
3252
|
+
return Te(e) || typeof e > "u" || typeof e == "string" || typeof e == "boolean" || typeof e == "number" || Array.isArray(e);
|
|
3253
3253
|
}
|
|
3254
|
-
function
|
|
3254
|
+
function Sn(e = {}) {
|
|
3255
3255
|
const t = {
|
|
3256
3256
|
...e
|
|
3257
3257
|
};
|
|
3258
3258
|
function r(n) {
|
|
3259
3259
|
const o = Object.entries(n);
|
|
3260
3260
|
for (let i = 0; i < o.length; i++) {
|
|
3261
|
-
const [
|
|
3262
|
-
!as(l) ||
|
|
3261
|
+
const [c, l] = o[i];
|
|
3262
|
+
!as(l) || c.startsWith("unstable_") ? delete n[c] : Te(l) && (n[c] = {
|
|
3263
3263
|
...l
|
|
3264
|
-
}, r(n[
|
|
3264
|
+
}, r(n[c]));
|
|
3265
3265
|
}
|
|
3266
3266
|
}
|
|
3267
3267
|
return r(t), `import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
@@ -3279,7 +3279,7 @@ function Jt(e = {}, ...t) {
|
|
|
3279
3279
|
mixins: n = {},
|
|
3280
3280
|
spacing: o,
|
|
3281
3281
|
palette: i = {},
|
|
3282
|
-
transitions:
|
|
3282
|
+
transitions: c = {},
|
|
3283
3283
|
typography: l = {},
|
|
3284
3284
|
shape: f,
|
|
3285
3285
|
...u
|
|
@@ -3288,51 +3288,51 @@ function Jt(e = {}, ...t) {
|
|
|
3288
3288
|
// `generateThemeVars` is the closest identifier for checking that the `options` is a result of `createTheme` with CSS variables so that user can create new theme for nested ThemeProvider.
|
|
3289
3289
|
e.generateThemeVars === void 0)
|
|
3290
3290
|
throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature." : Ie(20));
|
|
3291
|
-
const
|
|
3292
|
-
let
|
|
3291
|
+
const y = sr(i), d = fn(e);
|
|
3292
|
+
let h = fe(d, {
|
|
3293
3293
|
mixins: qi(d.breakpoints, n),
|
|
3294
|
-
palette:
|
|
3294
|
+
palette: y,
|
|
3295
3295
|
// Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.
|
|
3296
3296
|
shadows: ts.slice(),
|
|
3297
|
-
typography: Xi(
|
|
3298
|
-
transitions: is(
|
|
3297
|
+
typography: Xi(y, l),
|
|
3298
|
+
transitions: is(c),
|
|
3299
3299
|
zIndex: {
|
|
3300
3300
|
...ss
|
|
3301
3301
|
}
|
|
3302
3302
|
});
|
|
3303
|
-
if (
|
|
3304
|
-
const
|
|
3305
|
-
let
|
|
3306
|
-
for (
|
|
3307
|
-
const
|
|
3308
|
-
if (
|
|
3303
|
+
if (h = fe(h, u), h = t.reduce((v, g) => fe(v, g), h), process.env.NODE_ENV !== "production") {
|
|
3304
|
+
const v = ["active", "checked", "completed", "disabled", "error", "expanded", "focused", "focusVisible", "required", "selected"], g = (a, b) => {
|
|
3305
|
+
let C;
|
|
3306
|
+
for (C in a) {
|
|
3307
|
+
const _ = a[C];
|
|
3308
|
+
if (v.includes(C) && Object.keys(_).length > 0) {
|
|
3309
3309
|
if (process.env.NODE_ENV !== "production") {
|
|
3310
|
-
const
|
|
3311
|
-
console.error([`MUI: The \`${
|
|
3310
|
+
const A = er("", C);
|
|
3311
|
+
console.error([`MUI: The \`${b}\` component increases the CSS specificity of the \`${C}\` internal state.`, "You can not override it like this: ", JSON.stringify(a, null, 2), "", `Instead, you need to use the '&.${A}' syntax:`, JSON.stringify({
|
|
3312
3312
|
root: {
|
|
3313
|
-
[`&.${
|
|
3313
|
+
[`&.${A}`]: _
|
|
3314
3314
|
}
|
|
3315
3315
|
}, null, 2), "", "https://mui.com/r/state-classes-guide"].join(`
|
|
3316
3316
|
`));
|
|
3317
3317
|
}
|
|
3318
|
-
|
|
3318
|
+
a[C] = {};
|
|
3319
3319
|
}
|
|
3320
3320
|
}
|
|
3321
3321
|
};
|
|
3322
|
-
Object.keys(
|
|
3323
|
-
const
|
|
3324
|
-
|
|
3322
|
+
Object.keys(h.components).forEach((a) => {
|
|
3323
|
+
const b = h.components[a].styleOverrides;
|
|
3324
|
+
b && a.startsWith("Mui") && g(b, a);
|
|
3325
3325
|
});
|
|
3326
3326
|
}
|
|
3327
|
-
return
|
|
3327
|
+
return h.unstable_sxConfig = {
|
|
3328
3328
|
...Tt,
|
|
3329
3329
|
...u?.unstable_sxConfig
|
|
3330
|
-
},
|
|
3330
|
+
}, h.unstable_sx = function(g) {
|
|
3331
3331
|
return je({
|
|
3332
|
-
sx:
|
|
3332
|
+
sx: g,
|
|
3333
3333
|
theme: this
|
|
3334
3334
|
});
|
|
3335
|
-
},
|
|
3335
|
+
}, h.toRuntimeSource = Sn, h;
|
|
3336
3336
|
}
|
|
3337
3337
|
function cs(e) {
|
|
3338
3338
|
let t;
|
|
@@ -3344,7 +3344,7 @@ const ls = [...Array(25)].map((e, t) => {
|
|
|
3344
3344
|
const r = cs(t);
|
|
3345
3345
|
return `linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`;
|
|
3346
3346
|
});
|
|
3347
|
-
function
|
|
3347
|
+
function bn(e) {
|
|
3348
3348
|
return {
|
|
3349
3349
|
inputPlaceholder: e === "dark" ? 0.5 : 0.42,
|
|
3350
3350
|
inputUnderline: e === "dark" ? 0.7 : 0.42,
|
|
@@ -3368,7 +3368,7 @@ function us(e) {
|
|
|
3368
3368
|
return {
|
|
3369
3369
|
palette: i,
|
|
3370
3370
|
opacity: {
|
|
3371
|
-
...
|
|
3371
|
+
...bn(i.mode),
|
|
3372
3372
|
...r
|
|
3373
3373
|
},
|
|
3374
3374
|
overlays: n || vn(i.mode),
|
|
@@ -3384,21 +3384,21 @@ const ds = (e) => [...[...Array(25)].map((t, r) => `--${e ? `${e}-` : ""}overlay
|
|
|
3384
3384
|
let i = o;
|
|
3385
3385
|
if (o === "class" && (i = ".%s"), o === "data" && (i = "[data-%s]"), o?.startsWith("data-") && !o.includes("%s") && (i = `[${o}="%s"]`), e.defaultColorScheme === t) {
|
|
3386
3386
|
if (t === "dark") {
|
|
3387
|
-
const
|
|
3387
|
+
const c = {};
|
|
3388
3388
|
return ds(e.cssVarPrefix).forEach((l) => {
|
|
3389
|
-
|
|
3389
|
+
c[l] = r[l], delete r[l];
|
|
3390
3390
|
}), i === "media" ? {
|
|
3391
3391
|
[n]: r,
|
|
3392
3392
|
"@media (prefers-color-scheme: dark)": {
|
|
3393
|
-
[n]:
|
|
3393
|
+
[n]: c
|
|
3394
3394
|
}
|
|
3395
3395
|
} : i ? {
|
|
3396
|
-
[i.replace("%s", t)]:
|
|
3396
|
+
[i.replace("%s", t)]: c,
|
|
3397
3397
|
[`${n}, ${i.replace("%s", t)}`]: r
|
|
3398
3398
|
} : {
|
|
3399
3399
|
[n]: {
|
|
3400
3400
|
...r,
|
|
3401
|
-
...
|
|
3401
|
+
...c
|
|
3402
3402
|
}
|
|
3403
3403
|
};
|
|
3404
3404
|
}
|
|
@@ -3427,14 +3427,14 @@ function S(e, t, r) {
|
|
|
3427
3427
|
function Ke(e) {
|
|
3428
3428
|
return typeof e != "string" || !e.startsWith("hsl") ? e : hn(e);
|
|
3429
3429
|
}
|
|
3430
|
-
function
|
|
3430
|
+
function Ce(e, t) {
|
|
3431
3431
|
`${t}Channel` in e || (e[`${t}Channel`] = Ye(Ke(e[t]), `MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
3432
3432
|
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`));
|
|
3433
3433
|
}
|
|
3434
3434
|
function hs(e) {
|
|
3435
3435
|
return typeof e == "number" ? `${e}px` : typeof e == "string" || typeof e == "function" || Array.isArray(e) ? e : "8px";
|
|
3436
3436
|
}
|
|
3437
|
-
const
|
|
3437
|
+
const Ae = (e) => {
|
|
3438
3438
|
try {
|
|
3439
3439
|
return e();
|
|
3440
3440
|
} catch {
|
|
@@ -3457,7 +3457,7 @@ function zt(e, t, r, n) {
|
|
|
3457
3457
|
}
|
|
3458
3458
|
const {
|
|
3459
3459
|
palette: i,
|
|
3460
|
-
...
|
|
3460
|
+
...c
|
|
3461
3461
|
} = Jt({
|
|
3462
3462
|
...r,
|
|
3463
3463
|
palette: {
|
|
@@ -3469,11 +3469,11 @@ function zt(e, t, r, n) {
|
|
|
3469
3469
|
...t,
|
|
3470
3470
|
palette: i,
|
|
3471
3471
|
opacity: {
|
|
3472
|
-
...
|
|
3472
|
+
...bn(o),
|
|
3473
3473
|
...t?.opacity
|
|
3474
3474
|
},
|
|
3475
3475
|
overlays: t?.overlays || vn(o)
|
|
3476
|
-
},
|
|
3476
|
+
}, c;
|
|
3477
3477
|
}
|
|
3478
3478
|
function ys(e = {}, ...t) {
|
|
3479
3479
|
const {
|
|
@@ -3483,80 +3483,80 @@ function ys(e = {}, ...t) {
|
|
|
3483
3483
|
defaultColorScheme: n,
|
|
3484
3484
|
disableCssColorScheme: o = !1,
|
|
3485
3485
|
cssVarPrefix: i = "mui",
|
|
3486
|
-
shouldSkipGeneratingVar:
|
|
3486
|
+
shouldSkipGeneratingVar: c = fs,
|
|
3487
3487
|
colorSchemeSelector: l = r.light && r.dark ? "media" : void 0,
|
|
3488
3488
|
rootSelector: f = ":root",
|
|
3489
3489
|
...u
|
|
3490
|
-
} = e,
|
|
3491
|
-
[d]:
|
|
3492
|
-
light:
|
|
3493
|
-
dark:
|
|
3494
|
-
...
|
|
3495
|
-
} = r,
|
|
3496
|
-
...
|
|
3490
|
+
} = e, y = Object.keys(r)[0], d = n || (r.light && y !== "light" ? "light" : y), h = gs(i), {
|
|
3491
|
+
[d]: v,
|
|
3492
|
+
light: g,
|
|
3493
|
+
dark: a,
|
|
3494
|
+
...b
|
|
3495
|
+
} = r, C = {
|
|
3496
|
+
...b
|
|
3497
3497
|
};
|
|
3498
|
-
let
|
|
3499
|
-
if ((d === "dark" && !("dark" in r) || d === "light" && !("light" in r)) && (
|
|
3498
|
+
let _ = v;
|
|
3499
|
+
if ((d === "dark" && !("dark" in r) || d === "light" && !("light" in r)) && (_ = !0), !_)
|
|
3500
3500
|
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The \`colorSchemes.${d}\` option is either missing or invalid.` : Ie(21, d));
|
|
3501
|
-
const
|
|
3502
|
-
|
|
3503
|
-
let
|
|
3501
|
+
const A = zt(C, _, u, d);
|
|
3502
|
+
g && !C.light && zt(C, g, void 0, "light"), a && !C.dark && zt(C, a, void 0, "dark");
|
|
3503
|
+
let m = {
|
|
3504
3504
|
defaultColorScheme: d,
|
|
3505
|
-
...
|
|
3505
|
+
...A,
|
|
3506
3506
|
cssVarPrefix: i,
|
|
3507
3507
|
colorSchemeSelector: l,
|
|
3508
3508
|
rootSelector: f,
|
|
3509
|
-
getCssVar:
|
|
3510
|
-
colorSchemes:
|
|
3509
|
+
getCssVar: h,
|
|
3510
|
+
colorSchemes: C,
|
|
3511
3511
|
font: {
|
|
3512
|
-
...Hi(
|
|
3513
|
-
...
|
|
3512
|
+
...Hi(A.typography),
|
|
3513
|
+
...A.font
|
|
3514
3514
|
},
|
|
3515
3515
|
spacing: hs(u.spacing)
|
|
3516
3516
|
};
|
|
3517
|
-
Object.keys(
|
|
3518
|
-
const
|
|
3519
|
-
const
|
|
3520
|
-
return
|
|
3517
|
+
Object.keys(m.colorSchemes).forEach(($) => {
|
|
3518
|
+
const s = m.colorSchemes[$].palette, O = (L) => {
|
|
3519
|
+
const V = L.split("-"), ae = V[1], oe = V[2];
|
|
3520
|
+
return h(L, s[ae][oe]);
|
|
3521
3521
|
};
|
|
3522
|
-
if (
|
|
3523
|
-
S(
|
|
3524
|
-
const
|
|
3525
|
-
S(
|
|
3522
|
+
if (s.mode === "light" && (S(s.common, "background", "#fff"), S(s.common, "onBackground", "#000")), s.mode === "dark" && (S(s.common, "background", "#000"), S(s.common, "onBackground", "#fff")), ms(s, ["Alert", "AppBar", "Avatar", "Button", "Chip", "FilledInput", "LinearProgress", "Skeleton", "Slider", "SnackbarContent", "SpeedDialAction", "StepConnector", "StepContent", "Switch", "TableCell", "Tooltip"]), s.mode === "light") {
|
|
3523
|
+
S(s.Alert, "errorColor", q(s.error.light, 0.6)), S(s.Alert, "infoColor", q(s.info.light, 0.6)), S(s.Alert, "successColor", q(s.success.light, 0.6)), S(s.Alert, "warningColor", q(s.warning.light, 0.6)), S(s.Alert, "errorFilledBg", O("palette-error-main")), S(s.Alert, "infoFilledBg", O("palette-info-main")), S(s.Alert, "successFilledBg", O("palette-success-main")), S(s.Alert, "warningFilledBg", O("palette-warning-main")), S(s.Alert, "errorFilledColor", Ae(() => s.getContrastText(s.error.main))), S(s.Alert, "infoFilledColor", Ae(() => s.getContrastText(s.info.main))), S(s.Alert, "successFilledColor", Ae(() => s.getContrastText(s.success.main))), S(s.Alert, "warningFilledColor", Ae(() => s.getContrastText(s.warning.main))), S(s.Alert, "errorStandardBg", J(s.error.light, 0.9)), S(s.Alert, "infoStandardBg", J(s.info.light, 0.9)), S(s.Alert, "successStandardBg", J(s.success.light, 0.9)), S(s.Alert, "warningStandardBg", J(s.warning.light, 0.9)), S(s.Alert, "errorIconColor", O("palette-error-main")), S(s.Alert, "infoIconColor", O("palette-info-main")), S(s.Alert, "successIconColor", O("palette-success-main")), S(s.Alert, "warningIconColor", O("palette-warning-main")), S(s.AppBar, "defaultBg", O("palette-grey-100")), S(s.Avatar, "defaultBg", O("palette-grey-400")), S(s.Button, "inheritContainedBg", O("palette-grey-300")), S(s.Button, "inheritContainedHoverBg", O("palette-grey-A100")), S(s.Chip, "defaultBorder", O("palette-grey-400")), S(s.Chip, "defaultAvatarColor", O("palette-grey-700")), S(s.Chip, "defaultIconColor", O("palette-grey-700")), S(s.FilledInput, "bg", "rgba(0, 0, 0, 0.06)"), S(s.FilledInput, "hoverBg", "rgba(0, 0, 0, 0.09)"), S(s.FilledInput, "disabledBg", "rgba(0, 0, 0, 0.12)"), S(s.LinearProgress, "primaryBg", J(s.primary.main, 0.62)), S(s.LinearProgress, "secondaryBg", J(s.secondary.main, 0.62)), S(s.LinearProgress, "errorBg", J(s.error.main, 0.62)), S(s.LinearProgress, "infoBg", J(s.info.main, 0.62)), S(s.LinearProgress, "successBg", J(s.success.main, 0.62)), S(s.LinearProgress, "warningBg", J(s.warning.main, 0.62)), S(s.Skeleton, "bg", `rgba(${O("palette-text-primaryChannel")} / 0.11)`), S(s.Slider, "primaryTrack", J(s.primary.main, 0.62)), S(s.Slider, "secondaryTrack", J(s.secondary.main, 0.62)), S(s.Slider, "errorTrack", J(s.error.main, 0.62)), S(s.Slider, "infoTrack", J(s.info.main, 0.62)), S(s.Slider, "successTrack", J(s.success.main, 0.62)), S(s.Slider, "warningTrack", J(s.warning.main, 0.62));
|
|
3524
|
+
const L = at(s.background.default, 0.8);
|
|
3525
|
+
S(s.SnackbarContent, "bg", L), S(s.SnackbarContent, "color", Ae(() => s.getContrastText(L))), S(s.SpeedDialAction, "fabHoverBg", at(s.background.paper, 0.15)), S(s.StepConnector, "border", O("palette-grey-400")), S(s.StepContent, "border", O("palette-grey-400")), S(s.Switch, "defaultColor", O("palette-common-white")), S(s.Switch, "defaultDisabledColor", O("palette-grey-100")), S(s.Switch, "primaryDisabledColor", J(s.primary.main, 0.62)), S(s.Switch, "secondaryDisabledColor", J(s.secondary.main, 0.62)), S(s.Switch, "errorDisabledColor", J(s.error.main, 0.62)), S(s.Switch, "infoDisabledColor", J(s.info.main, 0.62)), S(s.Switch, "successDisabledColor", J(s.success.main, 0.62)), S(s.Switch, "warningDisabledColor", J(s.warning.main, 0.62)), S(s.TableCell, "border", J(st(s.divider, 1), 0.88)), S(s.Tooltip, "bg", st(s.grey[700], 0.92));
|
|
3526
3526
|
}
|
|
3527
|
-
if (
|
|
3528
|
-
S(
|
|
3529
|
-
const
|
|
3530
|
-
S(
|
|
3527
|
+
if (s.mode === "dark") {
|
|
3528
|
+
S(s.Alert, "errorColor", J(s.error.light, 0.6)), S(s.Alert, "infoColor", J(s.info.light, 0.6)), S(s.Alert, "successColor", J(s.success.light, 0.6)), S(s.Alert, "warningColor", J(s.warning.light, 0.6)), S(s.Alert, "errorFilledBg", O("palette-error-dark")), S(s.Alert, "infoFilledBg", O("palette-info-dark")), S(s.Alert, "successFilledBg", O("palette-success-dark")), S(s.Alert, "warningFilledBg", O("palette-warning-dark")), S(s.Alert, "errorFilledColor", Ae(() => s.getContrastText(s.error.dark))), S(s.Alert, "infoFilledColor", Ae(() => s.getContrastText(s.info.dark))), S(s.Alert, "successFilledColor", Ae(() => s.getContrastText(s.success.dark))), S(s.Alert, "warningFilledColor", Ae(() => s.getContrastText(s.warning.dark))), S(s.Alert, "errorStandardBg", q(s.error.light, 0.9)), S(s.Alert, "infoStandardBg", q(s.info.light, 0.9)), S(s.Alert, "successStandardBg", q(s.success.light, 0.9)), S(s.Alert, "warningStandardBg", q(s.warning.light, 0.9)), S(s.Alert, "errorIconColor", O("palette-error-main")), S(s.Alert, "infoIconColor", O("palette-info-main")), S(s.Alert, "successIconColor", O("palette-success-main")), S(s.Alert, "warningIconColor", O("palette-warning-main")), S(s.AppBar, "defaultBg", O("palette-grey-900")), S(s.AppBar, "darkBg", O("palette-background-paper")), S(s.AppBar, "darkColor", O("palette-text-primary")), S(s.Avatar, "defaultBg", O("palette-grey-600")), S(s.Button, "inheritContainedBg", O("palette-grey-800")), S(s.Button, "inheritContainedHoverBg", O("palette-grey-700")), S(s.Chip, "defaultBorder", O("palette-grey-700")), S(s.Chip, "defaultAvatarColor", O("palette-grey-300")), S(s.Chip, "defaultIconColor", O("palette-grey-300")), S(s.FilledInput, "bg", "rgba(255, 255, 255, 0.09)"), S(s.FilledInput, "hoverBg", "rgba(255, 255, 255, 0.13)"), S(s.FilledInput, "disabledBg", "rgba(255, 255, 255, 0.12)"), S(s.LinearProgress, "primaryBg", q(s.primary.main, 0.5)), S(s.LinearProgress, "secondaryBg", q(s.secondary.main, 0.5)), S(s.LinearProgress, "errorBg", q(s.error.main, 0.5)), S(s.LinearProgress, "infoBg", q(s.info.main, 0.5)), S(s.LinearProgress, "successBg", q(s.success.main, 0.5)), S(s.LinearProgress, "warningBg", q(s.warning.main, 0.5)), S(s.Skeleton, "bg", `rgba(${O("palette-text-primaryChannel")} / 0.13)`), S(s.Slider, "primaryTrack", q(s.primary.main, 0.5)), S(s.Slider, "secondaryTrack", q(s.secondary.main, 0.5)), S(s.Slider, "errorTrack", q(s.error.main, 0.5)), S(s.Slider, "infoTrack", q(s.info.main, 0.5)), S(s.Slider, "successTrack", q(s.success.main, 0.5)), S(s.Slider, "warningTrack", q(s.warning.main, 0.5));
|
|
3529
|
+
const L = at(s.background.default, 0.98);
|
|
3530
|
+
S(s.SnackbarContent, "bg", L), S(s.SnackbarContent, "color", Ae(() => s.getContrastText(L))), S(s.SpeedDialAction, "fabHoverBg", at(s.background.paper, 0.15)), S(s.StepConnector, "border", O("palette-grey-600")), S(s.StepContent, "border", O("palette-grey-600")), S(s.Switch, "defaultColor", O("palette-grey-300")), S(s.Switch, "defaultDisabledColor", O("palette-grey-600")), S(s.Switch, "primaryDisabledColor", q(s.primary.main, 0.55)), S(s.Switch, "secondaryDisabledColor", q(s.secondary.main, 0.55)), S(s.Switch, "errorDisabledColor", q(s.error.main, 0.55)), S(s.Switch, "infoDisabledColor", q(s.info.main, 0.55)), S(s.Switch, "successDisabledColor", q(s.success.main, 0.55)), S(s.Switch, "warningDisabledColor", q(s.warning.main, 0.55)), S(s.TableCell, "border", q(st(s.divider, 1), 0.68)), S(s.Tooltip, "bg", st(s.grey[700], 0.92));
|
|
3531
3531
|
}
|
|
3532
|
-
|
|
3533
|
-
const
|
|
3534
|
-
|
|
3532
|
+
Ce(s.background, "default"), Ce(s.background, "paper"), Ce(s.common, "background"), Ce(s.common, "onBackground"), Ce(s, "divider"), Object.keys(s).forEach((L) => {
|
|
3533
|
+
const V = s[L];
|
|
3534
|
+
L !== "tonalOffset" && V && typeof V == "object" && (V.main && S(s[L], "mainChannel", Ye(Ke(V.main))), V.light && S(s[L], "lightChannel", Ye(Ke(V.light))), V.dark && S(s[L], "darkChannel", Ye(Ke(V.dark))), V.contrastText && S(s[L], "contrastTextChannel", Ye(Ke(V.contrastText))), L === "text" && (Ce(s[L], "primary"), Ce(s[L], "secondary")), L === "action" && (V.active && Ce(s[L], "active"), V.selected && Ce(s[L], "selected")));
|
|
3535
3535
|
});
|
|
3536
|
-
}),
|
|
3536
|
+
}), m = t.reduce(($, s) => fe($, s), m);
|
|
3537
3537
|
const p = {
|
|
3538
3538
|
prefix: i,
|
|
3539
3539
|
disableCssColorScheme: o,
|
|
3540
|
-
shouldSkipGeneratingVar:
|
|
3541
|
-
getSelector: ps(
|
|
3540
|
+
shouldSkipGeneratingVar: c,
|
|
3541
|
+
getSelector: ps(m)
|
|
3542
3542
|
}, {
|
|
3543
|
-
vars:
|
|
3544
|
-
generateThemeVars:
|
|
3545
|
-
generateStyleSheets:
|
|
3546
|
-
} = Mi(
|
|
3547
|
-
return
|
|
3548
|
-
|
|
3549
|
-
}),
|
|
3543
|
+
vars: w,
|
|
3544
|
+
generateThemeVars: I,
|
|
3545
|
+
generateStyleSheets: k
|
|
3546
|
+
} = Mi(m, p);
|
|
3547
|
+
return m.vars = w, Object.entries(m.colorSchemes[m.defaultColorScheme]).forEach(([$, s]) => {
|
|
3548
|
+
m[$] = s;
|
|
3549
|
+
}), m.generateThemeVars = I, m.generateStyleSheets = k, m.generateSpacing = function() {
|
|
3550
3550
|
return un(u.spacing, tr(this));
|
|
3551
|
-
},
|
|
3551
|
+
}, m.getColorSchemeSelector = Fi(l), m.spacing = m.generateSpacing(), m.shouldSkipGeneratingVar = c, m.unstable_sxConfig = {
|
|
3552
3552
|
...Tt,
|
|
3553
3553
|
...u?.unstable_sxConfig
|
|
3554
|
-
},
|
|
3554
|
+
}, m.unstable_sx = function(s) {
|
|
3555
3555
|
return je({
|
|
3556
|
-
sx:
|
|
3556
|
+
sx: s,
|
|
3557
3557
|
theme: this
|
|
3558
3558
|
});
|
|
3559
|
-
},
|
|
3559
|
+
}, m.toRuntimeSource = Sn, m;
|
|
3560
3560
|
}
|
|
3561
3561
|
function Kr(e, t, r) {
|
|
3562
3562
|
e.colorSchemes && r && (e.colorSchemes[t] = {
|
|
@@ -3568,7 +3568,7 @@ function Kr(e, t, r) {
|
|
|
3568
3568
|
// cast type to skip module augmentation test
|
|
3569
3569
|
});
|
|
3570
3570
|
}
|
|
3571
|
-
function
|
|
3571
|
+
function Ss(e = {}, ...t) {
|
|
3572
3572
|
const {
|
|
3573
3573
|
palette: r,
|
|
3574
3574
|
cssVariables: n = !1,
|
|
@@ -3576,7 +3576,7 @@ function bs(e = {}, ...t) {
|
|
|
3576
3576
|
light: !0
|
|
3577
3577
|
},
|
|
3578
3578
|
defaultColorScheme: i = r?.mode,
|
|
3579
|
-
...
|
|
3579
|
+
...c
|
|
3580
3580
|
} = e, l = i || "light", f = o?.[l], u = {
|
|
3581
3581
|
...o,
|
|
3582
3582
|
...r ? {
|
|
@@ -3589,13 +3589,13 @@ function bs(e = {}, ...t) {
|
|
|
3589
3589
|
if (n === !1) {
|
|
3590
3590
|
if (!("colorSchemes" in e))
|
|
3591
3591
|
return Jt(e, ...t);
|
|
3592
|
-
let
|
|
3593
|
-
"palette" in e || u[l] && (u[l] !== !0 ?
|
|
3592
|
+
let y = r;
|
|
3593
|
+
"palette" in e || u[l] && (u[l] !== !0 ? y = u[l].palette : l === "dark" && (y = {
|
|
3594
3594
|
mode: "dark"
|
|
3595
3595
|
}));
|
|
3596
3596
|
const d = Jt({
|
|
3597
3597
|
...e,
|
|
3598
|
-
palette:
|
|
3598
|
+
palette: y
|
|
3599
3599
|
}, ...t);
|
|
3600
3600
|
return d.defaultColorScheme = l, d.colorSchemes = u, d.palette.mode === "light" && (d.colorSchemes.light = {
|
|
3601
3601
|
...u.light !== !0 && u.light,
|
|
@@ -3606,22 +3606,22 @@ function bs(e = {}, ...t) {
|
|
|
3606
3606
|
}, Kr(d, "light", u.light)), d;
|
|
3607
3607
|
}
|
|
3608
3608
|
return !r && !("light" in u) && l === "light" && (u.light = !0), ys({
|
|
3609
|
-
...
|
|
3609
|
+
...c,
|
|
3610
3610
|
colorSchemes: u,
|
|
3611
3611
|
defaultColorScheme: l,
|
|
3612
3612
|
...typeof n != "boolean" && n
|
|
3613
3613
|
}, ...t);
|
|
3614
3614
|
}
|
|
3615
|
-
const
|
|
3615
|
+
const bs = Ss(), vs = "$$material";
|
|
3616
3616
|
function ws(e) {
|
|
3617
3617
|
return e !== "ownerState" && e !== "theme" && e !== "sx" && e !== "as";
|
|
3618
3618
|
}
|
|
3619
3619
|
const Es = (e) => ws(e) && e !== "classes", As = Ei({
|
|
3620
3620
|
themeId: vs,
|
|
3621
|
-
defaultTheme:
|
|
3621
|
+
defaultTheme: bs,
|
|
3622
3622
|
rootShouldForwardProp: Es
|
|
3623
3623
|
}), Cs = Ni;
|
|
3624
|
-
process.env.NODE_ENV !== "production" && (
|
|
3624
|
+
process.env.NODE_ENV !== "production" && (j.node, j.object.isRequired);
|
|
3625
3625
|
function _s(e) {
|
|
3626
3626
|
return Pi(e);
|
|
3627
3627
|
}
|
|
@@ -3740,39 +3740,39 @@ const xs = (e) => {
|
|
|
3740
3740
|
}), {
|
|
3741
3741
|
children: o,
|
|
3742
3742
|
className: i,
|
|
3743
|
-
color:
|
|
3743
|
+
color: c = "inherit",
|
|
3744
3744
|
component: l = "svg",
|
|
3745
3745
|
fontSize: f = "medium",
|
|
3746
3746
|
htmlColor: u,
|
|
3747
|
-
inheritViewBox:
|
|
3747
|
+
inheritViewBox: y = !1,
|
|
3748
3748
|
titleAccess: d,
|
|
3749
|
-
viewBox:
|
|
3750
|
-
...
|
|
3751
|
-
} = n,
|
|
3749
|
+
viewBox: h = "0 0 24 24",
|
|
3750
|
+
...v
|
|
3751
|
+
} = n, g = /* @__PURE__ */ Oe.isValidElement(o) && o.type === "svg", a = {
|
|
3752
3752
|
...n,
|
|
3753
|
-
color:
|
|
3753
|
+
color: c,
|
|
3754
3754
|
component: l,
|
|
3755
3755
|
fontSize: f,
|
|
3756
3756
|
instanceFontSize: t.fontSize,
|
|
3757
|
-
inheritViewBox:
|
|
3758
|
-
viewBox:
|
|
3759
|
-
hasSvgAsChild:
|
|
3760
|
-
},
|
|
3761
|
-
|
|
3762
|
-
const
|
|
3763
|
-
return /* @__PURE__ */
|
|
3757
|
+
inheritViewBox: y,
|
|
3758
|
+
viewBox: h,
|
|
3759
|
+
hasSvgAsChild: g
|
|
3760
|
+
}, b = {};
|
|
3761
|
+
y || (b.viewBox = h);
|
|
3762
|
+
const C = xs(a);
|
|
3763
|
+
return /* @__PURE__ */ re(Rs, {
|
|
3764
3764
|
as: l,
|
|
3765
|
-
className: mo(
|
|
3765
|
+
className: mo(C.root, i),
|
|
3766
3766
|
focusable: "false",
|
|
3767
3767
|
color: u,
|
|
3768
3768
|
"aria-hidden": d ? void 0 : !0,
|
|
3769
3769
|
role: d ? "img" : void 0,
|
|
3770
3770
|
ref: r,
|
|
3771
|
+
...b,
|
|
3771
3772
|
...v,
|
|
3772
|
-
...
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
children: [b ? o.props.children : o, d ? /* @__PURE__ */ x("title", {
|
|
3773
|
+
...g && o.props,
|
|
3774
|
+
ownerState: a,
|
|
3775
|
+
children: [g ? o.props.children : o, d ? /* @__PURE__ */ x("title", {
|
|
3776
3776
|
children: d
|
|
3777
3777
|
}) : null]
|
|
3778
3778
|
});
|
|
@@ -3785,15 +3785,15 @@ process.env.NODE_ENV !== "production" && (gt.propTypes = {
|
|
|
3785
3785
|
/**
|
|
3786
3786
|
* Node passed into the SVG element.
|
|
3787
3787
|
*/
|
|
3788
|
-
children:
|
|
3788
|
+
children: j.node,
|
|
3789
3789
|
/**
|
|
3790
3790
|
* Override or extend the styles applied to the component.
|
|
3791
3791
|
*/
|
|
3792
|
-
classes:
|
|
3792
|
+
classes: j.object,
|
|
3793
3793
|
/**
|
|
3794
3794
|
* @ignore
|
|
3795
3795
|
*/
|
|
3796
|
-
className:
|
|
3796
|
+
className: j.string,
|
|
3797
3797
|
/**
|
|
3798
3798
|
* The color of the component.
|
|
3799
3799
|
* It supports both default and custom theme colors, which can be added as shown in the
|
|
@@ -3801,21 +3801,21 @@ process.env.NODE_ENV !== "production" && (gt.propTypes = {
|
|
|
3801
3801
|
* You can use the `htmlColor` prop to apply a color attribute to the SVG element.
|
|
3802
3802
|
* @default 'inherit'
|
|
3803
3803
|
*/
|
|
3804
|
-
color:
|
|
3804
|
+
color: j.oneOfType([j.oneOf(["inherit", "action", "disabled", "primary", "secondary", "error", "info", "success", "warning"]), j.string]),
|
|
3805
3805
|
/**
|
|
3806
3806
|
* The component used for the root node.
|
|
3807
3807
|
* Either a string to use a HTML element or a component.
|
|
3808
3808
|
*/
|
|
3809
|
-
component:
|
|
3809
|
+
component: j.elementType,
|
|
3810
3810
|
/**
|
|
3811
3811
|
* The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.
|
|
3812
3812
|
* @default 'medium'
|
|
3813
3813
|
*/
|
|
3814
|
-
fontSize:
|
|
3814
|
+
fontSize: j.oneOfType([j.oneOf(["inherit", "large", "medium", "small"]), j.string]),
|
|
3815
3815
|
/**
|
|
3816
3816
|
* Applies a color attribute to the SVG element.
|
|
3817
3817
|
*/
|
|
3818
|
-
htmlColor:
|
|
3818
|
+
htmlColor: j.string,
|
|
3819
3819
|
/**
|
|
3820
3820
|
* If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`
|
|
3821
3821
|
* prop will be ignored.
|
|
@@ -3823,22 +3823,22 @@ process.env.NODE_ENV !== "production" && (gt.propTypes = {
|
|
|
3823
3823
|
* `component`'s viewBox to the root node.
|
|
3824
3824
|
* @default false
|
|
3825
3825
|
*/
|
|
3826
|
-
inheritViewBox:
|
|
3826
|
+
inheritViewBox: j.bool,
|
|
3827
3827
|
/**
|
|
3828
3828
|
* The shape-rendering attribute. The behavior of the different options is described on the
|
|
3829
3829
|
* [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).
|
|
3830
3830
|
* If you are having issues with blurry icons you should investigate this prop.
|
|
3831
3831
|
*/
|
|
3832
|
-
shapeRendering:
|
|
3832
|
+
shapeRendering: j.string,
|
|
3833
3833
|
/**
|
|
3834
3834
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
3835
3835
|
*/
|
|
3836
|
-
sx:
|
|
3836
|
+
sx: j.oneOfType([j.arrayOf(j.oneOfType([j.func, j.object, j.bool])), j.func, j.object]),
|
|
3837
3837
|
/**
|
|
3838
3838
|
* Provides a human-readable title for the element that contains it.
|
|
3839
3839
|
* https://www.w3.org/TR/SVG-access/#Equivalent
|
|
3840
3840
|
*/
|
|
3841
|
-
titleAccess:
|
|
3841
|
+
titleAccess: j.string,
|
|
3842
3842
|
/**
|
|
3843
3843
|
* Allows you to redefine what the coordinates without units mean inside an SVG element.
|
|
3844
3844
|
* For example, if the SVG element is 500 (width) by 200 (height),
|
|
@@ -3847,7 +3847,7 @@ process.env.NODE_ENV !== "production" && (gt.propTypes = {
|
|
|
3847
3847
|
* to bottom right (50,20) and each unit will be worth 10px.
|
|
3848
3848
|
* @default '0 0 24 24'
|
|
3849
3849
|
*/
|
|
3850
|
-
viewBox:
|
|
3850
|
+
viewBox: j.string
|
|
3851
3851
|
});
|
|
3852
3852
|
gt.muiName = "SvgIcon";
|
|
3853
3853
|
function wn(e, t) {
|
|
@@ -3863,7 +3863,7 @@ function wn(e, t) {
|
|
|
3863
3863
|
}
|
|
3864
3864
|
const Os = wn(/* @__PURE__ */ x("path", {
|
|
3865
3865
|
d: "m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"
|
|
3866
|
-
}), "Logout"),
|
|
3866
|
+
}), "Logout"), ye = {
|
|
3867
3867
|
ACCOUNTS: "spry_accounts",
|
|
3868
3868
|
BRIDGE_ACCOUNTS: "spry_accounts_shared_state",
|
|
3869
3869
|
ADD_ACCOUNT_IN_PROGRESS: "spry_add_account_in_progress",
|
|
@@ -3876,7 +3876,7 @@ const Os = wn(/* @__PURE__ */ x("path", {
|
|
|
3876
3876
|
REFRESH_TOKEN_BUFFER_SECONDS: 300,
|
|
3877
3877
|
// How often to check stale account status (on mount and account switch)
|
|
3878
3878
|
STALE_CHECK_INTERVAL_MS: 1e3
|
|
3879
|
-
},
|
|
3879
|
+
}, ve = {
|
|
3880
3880
|
INVALID_TOKEN: "Invalid or malformed token",
|
|
3881
3881
|
TOKEN_DECODE_FAILED: "Failed to decode token",
|
|
3882
3882
|
ACCOUNT_NOT_FOUND: "Account not found",
|
|
@@ -3894,7 +3894,7 @@ function et(e) {
|
|
|
3894
3894
|
try {
|
|
3895
3895
|
const t = e.split(".");
|
|
3896
3896
|
if (t.length !== 3)
|
|
3897
|
-
return console.warn(
|
|
3897
|
+
return console.warn(ve.INVALID_TOKEN), null;
|
|
3898
3898
|
const r = t[1];
|
|
3899
3899
|
return JSON.parse(
|
|
3900
3900
|
decodeURIComponent(
|
|
@@ -3902,7 +3902,7 @@ function et(e) {
|
|
|
3902
3902
|
)
|
|
3903
3903
|
);
|
|
3904
3904
|
} catch (t) {
|
|
3905
|
-
return console.warn(
|
|
3905
|
+
return console.warn(ve.TOKEN_DECODE_FAILED, t), null;
|
|
3906
3906
|
}
|
|
3907
3907
|
}
|
|
3908
3908
|
function ar(e, t = Rt.ACCESS_TOKEN_BUFFER_SECONDS) {
|
|
@@ -3963,28 +3963,28 @@ function Ps({
|
|
|
3963
3963
|
onRemove: o,
|
|
3964
3964
|
onRefresh: i
|
|
3965
3965
|
}) {
|
|
3966
|
-
const { email:
|
|
3967
|
-
|
|
3966
|
+
const { email: c, name: l, avatar: f } = He(e.user), [u, y] = ie.useState(!1), [d, h] = ie.useState(!1), v = async (b) => {
|
|
3967
|
+
b.stopPropagation(), y(!0);
|
|
3968
3968
|
try {
|
|
3969
3969
|
await o();
|
|
3970
3970
|
} finally {
|
|
3971
|
-
|
|
3971
|
+
y(!1);
|
|
3972
3972
|
}
|
|
3973
|
-
},
|
|
3974
|
-
|
|
3973
|
+
}, g = async (b) => {
|
|
3974
|
+
b.stopPropagation(), h(!0);
|
|
3975
3975
|
try {
|
|
3976
3976
|
await i();
|
|
3977
3977
|
} finally {
|
|
3978
|
-
|
|
3978
|
+
h(!1);
|
|
3979
3979
|
}
|
|
3980
|
-
},
|
|
3980
|
+
}, a = async () => {
|
|
3981
3981
|
r || await n();
|
|
3982
3982
|
};
|
|
3983
|
-
return /* @__PURE__ */ x(ie.Fragment, { children: /* @__PURE__ */
|
|
3983
|
+
return /* @__PURE__ */ x(ie.Fragment, { children: /* @__PURE__ */ re(
|
|
3984
3984
|
en,
|
|
3985
3985
|
{
|
|
3986
3986
|
selected: t,
|
|
3987
|
-
onClick:
|
|
3987
|
+
onClick: a,
|
|
3988
3988
|
disabled: r,
|
|
3989
3989
|
sx: {
|
|
3990
3990
|
opacity: t ? 1 : 0.8,
|
|
@@ -4011,7 +4011,7 @@ function Ps({
|
|
|
4011
4011
|
/* @__PURE__ */ x(
|
|
4012
4012
|
kn,
|
|
4013
4013
|
{
|
|
4014
|
-
primary: /* @__PURE__ */
|
|
4014
|
+
primary: /* @__PURE__ */ re(ne, { display: "flex", alignItems: "center", gap: 1, children: [
|
|
4015
4015
|
/* @__PURE__ */ x("span", { children: l }),
|
|
4016
4016
|
t && /* @__PURE__ */ x(
|
|
4017
4017
|
pr,
|
|
@@ -4034,17 +4034,17 @@ function Ps({
|
|
|
4034
4034
|
}
|
|
4035
4035
|
)
|
|
4036
4036
|
] }),
|
|
4037
|
-
secondary:
|
|
4037
|
+
secondary: c,
|
|
4038
4038
|
secondaryTypographyProps: { noWrap: !0 }
|
|
4039
4039
|
}
|
|
4040
4040
|
),
|
|
4041
|
-
!t && /* @__PURE__ */
|
|
4041
|
+
!t && /* @__PURE__ */ re(Pn, { children: [
|
|
4042
4042
|
e.isStale && /* @__PURE__ */ x(
|
|
4043
4043
|
dt,
|
|
4044
4044
|
{
|
|
4045
4045
|
edge: "end",
|
|
4046
4046
|
size: "small",
|
|
4047
|
-
onClick:
|
|
4047
|
+
onClick: g,
|
|
4048
4048
|
disabled: d || r,
|
|
4049
4049
|
title: "Re-authenticate this account",
|
|
4050
4050
|
children: d ? /* @__PURE__ */ x(ft, { size: 20 }) : /* @__PURE__ */ x(Bn, { fontSize: "small" })
|
|
@@ -4055,7 +4055,7 @@ function Ps({
|
|
|
4055
4055
|
{
|
|
4056
4056
|
edge: "end",
|
|
4057
4057
|
size: "small",
|
|
4058
|
-
onClick:
|
|
4058
|
+
onClick: v,
|
|
4059
4059
|
disabled: u || r,
|
|
4060
4060
|
title: "Remove this account",
|
|
4061
4061
|
children: u ? /* @__PURE__ */ x(ft, { size: 20 }) : /* @__PURE__ */ x(zn, { fontSize: "small" })
|
|
@@ -4074,9 +4074,9 @@ const An = ie.forwardRef(
|
|
|
4074
4074
|
onSwitchAccount: n,
|
|
4075
4075
|
onAddAccount: o,
|
|
4076
4076
|
onRemoveAccount: i,
|
|
4077
|
-
onRefreshAccount:
|
|
4077
|
+
onRefreshAccount: c
|
|
4078
4078
|
}, l) => {
|
|
4079
|
-
const [f, u] = ie.useState(!1),
|
|
4079
|
+
const [f, u] = ie.useState(!1), y = async () => {
|
|
4080
4080
|
u(!0);
|
|
4081
4081
|
try {
|
|
4082
4082
|
await o();
|
|
@@ -4084,12 +4084,12 @@ const An = ie.forwardRef(
|
|
|
4084
4084
|
u(!1);
|
|
4085
4085
|
}
|
|
4086
4086
|
};
|
|
4087
|
-
return /* @__PURE__ */ x(ne, { ref: l, sx: { width: "100%", maxWidth: 360, bgcolor: "background.paper" }, children: e.length === 0 ? /* @__PURE__ */
|
|
4088
|
-
/* @__PURE__ */ x(
|
|
4087
|
+
return /* @__PURE__ */ x(ne, { ref: l, sx: { width: "100%", maxWidth: 360, bgcolor: "background.paper" }, children: e.length === 0 ? /* @__PURE__ */ re(ne, { sx: { p: 2, textAlign: "center" }, children: [
|
|
4088
|
+
/* @__PURE__ */ x(_e, { variant: "body2", color: "textSecondary", sx: { mb: 2 }, children: "No additional accounts logged in" }),
|
|
4089
4089
|
/* @__PURE__ */ x(
|
|
4090
4090
|
"button",
|
|
4091
4091
|
{
|
|
4092
|
-
onClick:
|
|
4092
|
+
onClick: y,
|
|
4093
4093
|
disabled: f || r,
|
|
4094
4094
|
style: {
|
|
4095
4095
|
padding: "8px 16px",
|
|
@@ -4101,7 +4101,7 @@ const An = ie.forwardRef(
|
|
|
4101
4101
|
children: f ? "Adding Account..." : "Add Account"
|
|
4102
4102
|
}
|
|
4103
4103
|
)
|
|
4104
|
-
] }) : /* @__PURE__ */
|
|
4104
|
+
] }) : /* @__PURE__ */ re(ut, { children: [
|
|
4105
4105
|
/* @__PURE__ */ x($n, { children: e.map((d) => /* @__PURE__ */ x(
|
|
4106
4106
|
Ps,
|
|
4107
4107
|
{
|
|
@@ -4110,15 +4110,15 @@ const An = ie.forwardRef(
|
|
|
4110
4110
|
isLoading: r,
|
|
4111
4111
|
onSwitch: () => n(d.accountId),
|
|
4112
4112
|
onRemove: () => i(d.accountId),
|
|
4113
|
-
onRefresh: () =>
|
|
4113
|
+
onRefresh: () => c(d.accountId)
|
|
4114
4114
|
},
|
|
4115
4115
|
d.accountId
|
|
4116
4116
|
)) }),
|
|
4117
4117
|
/* @__PURE__ */ x(ct, { sx: { my: 1 } }),
|
|
4118
|
-
/* @__PURE__ */ x(ne, { sx: { p: 1 }, children: /* @__PURE__ */
|
|
4118
|
+
/* @__PURE__ */ x(ne, { sx: { p: 1 }, children: /* @__PURE__ */ re(
|
|
4119
4119
|
en,
|
|
4120
4120
|
{
|
|
4121
|
-
onClick:
|
|
4121
|
+
onClick: y,
|
|
4122
4122
|
disabled: f || r,
|
|
4123
4123
|
sx: {
|
|
4124
4124
|
justifyContent: "center",
|
|
@@ -4126,7 +4126,7 @@ const An = ie.forwardRef(
|
|
|
4126
4126
|
},
|
|
4127
4127
|
children: [
|
|
4128
4128
|
/* @__PURE__ */ x(Fn, { sx: { mr: 1 }, fontSize: "small" }),
|
|
4129
|
-
/* @__PURE__ */ x(
|
|
4129
|
+
/* @__PURE__ */ x(_e, { variant: "button", sx: { fontSize: "0.875rem" }, children: f ? "Adding..." : "Add Another Account" })
|
|
4130
4130
|
]
|
|
4131
4131
|
}
|
|
4132
4132
|
) })
|
|
@@ -4141,43 +4141,43 @@ function Ns({
|
|
|
4141
4141
|
onManageAccount: n,
|
|
4142
4142
|
accountManager: o
|
|
4143
4143
|
}) {
|
|
4144
|
-
const i = "https://sprylogin.com/my-account/", [
|
|
4145
|
-
l(
|
|
4146
|
-
},
|
|
4144
|
+
const i = "https://sprylogin.com/my-account/", [c, l] = ge(null), [f, u] = ge(!1), y = o?.accounts.length ?? 0, d = (m) => {
|
|
4145
|
+
l(m.currentTarget);
|
|
4146
|
+
}, h = () => {
|
|
4147
4147
|
l(null), u(!1);
|
|
4148
|
-
},
|
|
4149
|
-
o && o.activeAccount ? o.removeAccount(o.activeAccount.accountId) : (
|
|
4150
|
-
},
|
|
4151
|
-
|
|
4152
|
-
},
|
|
4148
|
+
}, v = () => {
|
|
4149
|
+
o && o.activeAccount ? o.removeAccount(o.activeAccount.accountId) : (h(), r && r()), h();
|
|
4150
|
+
}, g = () => {
|
|
4151
|
+
h(), n ? n() : e?.manageAccountUrl ? window.location.href = e.manageAccountUrl : window.location.href = i;
|
|
4152
|
+
}, a = !!c, b = () => {
|
|
4153
4153
|
if (o?.activeAccount) {
|
|
4154
|
-
const { name:
|
|
4155
|
-
if (
|
|
4156
|
-
return
|
|
4154
|
+
const { name: m, email: p } = He(o.activeAccount.user);
|
|
4155
|
+
if (m)
|
|
4156
|
+
return m.split(" ").map((w) => w[0]).join("").slice(0, 2).toUpperCase();
|
|
4157
4157
|
if (p)
|
|
4158
4158
|
return p[0].toUpperCase();
|
|
4159
4159
|
}
|
|
4160
4160
|
return e?.firstName && e?.lastName ? `${e.firstName[0]}${e.lastName[0]}`.toUpperCase() : e?.firstName ? e.firstName[0].toUpperCase() : e?.email ? e.email[0].toUpperCase() : "?";
|
|
4161
|
-
},
|
|
4161
|
+
}, C = () => {
|
|
4162
4162
|
if (o?.activeAccount) {
|
|
4163
|
-
const { name:
|
|
4164
|
-
return
|
|
4163
|
+
const { name: m } = He(o.activeAccount.user);
|
|
4164
|
+
return m;
|
|
4165
4165
|
}
|
|
4166
4166
|
return e?.firstName && e?.lastName ? `${e.firstName} ${e.lastName}` : e?.firstName ? e.firstName : e?.email ? e.email.split("@")[0] : "User";
|
|
4167
|
-
},
|
|
4167
|
+
}, _ = () => {
|
|
4168
4168
|
if (o?.activeAccount) {
|
|
4169
|
-
const { email:
|
|
4170
|
-
return
|
|
4169
|
+
const { email: m } = He(o.activeAccount.user);
|
|
4170
|
+
return m;
|
|
4171
4171
|
}
|
|
4172
4172
|
return e?.email || "No email";
|
|
4173
|
-
},
|
|
4173
|
+
}, A = () => {
|
|
4174
4174
|
if (o?.activeAccount) {
|
|
4175
|
-
const { avatar:
|
|
4176
|
-
return
|
|
4175
|
+
const { avatar: m } = He(o.activeAccount.user);
|
|
4176
|
+
return m || null;
|
|
4177
4177
|
}
|
|
4178
4178
|
return e?.avatar || null;
|
|
4179
4179
|
};
|
|
4180
|
-
return /* @__PURE__ */
|
|
4180
|
+
return /* @__PURE__ */ re(ut, { children: [
|
|
4181
4181
|
/* @__PURE__ */ x(
|
|
4182
4182
|
dt,
|
|
4183
4183
|
{
|
|
@@ -4192,7 +4192,7 @@ function Ns({
|
|
|
4192
4192
|
children: t && !e ? /* @__PURE__ */ x(ft, { size: 32 }) : /* @__PURE__ */ x(
|
|
4193
4193
|
Kt,
|
|
4194
4194
|
{
|
|
4195
|
-
src:
|
|
4195
|
+
src: A() || void 0,
|
|
4196
4196
|
sx: {
|
|
4197
4197
|
width: 32,
|
|
4198
4198
|
height: 32,
|
|
@@ -4200,7 +4200,7 @@ function Ns({
|
|
|
4200
4200
|
fontSize: "0.875rem",
|
|
4201
4201
|
fontWeight: 500
|
|
4202
4202
|
},
|
|
4203
|
-
children:
|
|
4203
|
+
children: b()
|
|
4204
4204
|
}
|
|
4205
4205
|
)
|
|
4206
4206
|
}
|
|
@@ -4208,9 +4208,9 @@ function Ns({
|
|
|
4208
4208
|
/* @__PURE__ */ x(
|
|
4209
4209
|
Nn,
|
|
4210
4210
|
{
|
|
4211
|
-
anchorEl:
|
|
4212
|
-
open:
|
|
4213
|
-
onClose:
|
|
4211
|
+
anchorEl: c,
|
|
4212
|
+
open: a,
|
|
4213
|
+
onClose: h,
|
|
4214
4214
|
anchorOrigin: {
|
|
4215
4215
|
vertical: "bottom",
|
|
4216
4216
|
horizontal: "right"
|
|
@@ -4232,8 +4232,8 @@ function Ns({
|
|
|
4232
4232
|
},
|
|
4233
4233
|
children: f ? (
|
|
4234
4234
|
// Account List View
|
|
4235
|
-
/* @__PURE__ */
|
|
4236
|
-
/* @__PURE__ */
|
|
4235
|
+
/* @__PURE__ */ re(ne, { children: [
|
|
4236
|
+
/* @__PURE__ */ re(ne, { sx: { px: 1.5, py: 1.25, display: "flex", alignItems: "center", gap: 0.75 }, children: [
|
|
4237
4237
|
/* @__PURE__ */ x(
|
|
4238
4238
|
mr,
|
|
4239
4239
|
{
|
|
@@ -4249,7 +4249,7 @@ function Ns({
|
|
|
4249
4249
|
children: "← Back"
|
|
4250
4250
|
}
|
|
4251
4251
|
),
|
|
4252
|
-
/* @__PURE__ */ x(
|
|
4252
|
+
/* @__PURE__ */ x(_e, { variant: "caption", sx: { fontWeight: 600, flex: 1, fontSize: "0.75rem" }, children: "Accounts" })
|
|
4253
4253
|
] }),
|
|
4254
4254
|
/* @__PURE__ */ x(ct, { sx: { my: 0 } }),
|
|
4255
4255
|
/* @__PURE__ */ x(ne, { sx: { px: 0.75, py: 0.75 }, children: o && /* @__PURE__ */ x(
|
|
@@ -4267,13 +4267,13 @@ function Ns({
|
|
|
4267
4267
|
] })
|
|
4268
4268
|
) : (
|
|
4269
4269
|
// Main Profile View
|
|
4270
|
-
/* @__PURE__ */
|
|
4271
|
-
/* @__PURE__ */
|
|
4272
|
-
/* @__PURE__ */
|
|
4270
|
+
/* @__PURE__ */ re(ne, { children: [
|
|
4271
|
+
/* @__PURE__ */ re(ne, { sx: { px: 1.5, py: 1.5 }, children: [
|
|
4272
|
+
/* @__PURE__ */ re(ne, { sx: { display: "flex", flexDirection: "column", alignItems: "center", mb: 1.25 }, children: [
|
|
4273
4273
|
/* @__PURE__ */ x(
|
|
4274
4274
|
Kt,
|
|
4275
4275
|
{
|
|
4276
|
-
src:
|
|
4276
|
+
src: A() || void 0,
|
|
4277
4277
|
sx: {
|
|
4278
4278
|
width: 56,
|
|
4279
4279
|
height: 56,
|
|
@@ -4282,12 +4282,12 @@ function Ns({
|
|
|
4282
4282
|
fontWeight: 500,
|
|
4283
4283
|
mb: 1
|
|
4284
4284
|
},
|
|
4285
|
-
children:
|
|
4285
|
+
children: b()
|
|
4286
4286
|
},
|
|
4287
4287
|
o?.activeAccount?.accountId || "profile-avatar"
|
|
4288
4288
|
),
|
|
4289
4289
|
/* @__PURE__ */ x(
|
|
4290
|
-
|
|
4290
|
+
_e,
|
|
4291
4291
|
{
|
|
4292
4292
|
sx: {
|
|
4293
4293
|
fontWeight: 500,
|
|
@@ -4296,11 +4296,11 @@ function Ns({
|
|
|
4296
4296
|
mb: 0.25,
|
|
4297
4297
|
fontSize: "0.9rem"
|
|
4298
4298
|
},
|
|
4299
|
-
children:
|
|
4299
|
+
children: C()
|
|
4300
4300
|
}
|
|
4301
4301
|
),
|
|
4302
4302
|
/* @__PURE__ */ x(
|
|
4303
|
-
|
|
4303
|
+
_e,
|
|
4304
4304
|
{
|
|
4305
4305
|
sx: {
|
|
4306
4306
|
color: "text.secondary",
|
|
@@ -4308,7 +4308,7 @@ function Ns({
|
|
|
4308
4308
|
wordBreak: "break-all",
|
|
4309
4309
|
fontSize: "0.75rem"
|
|
4310
4310
|
},
|
|
4311
|
-
children:
|
|
4311
|
+
children: _()
|
|
4312
4312
|
}
|
|
4313
4313
|
)
|
|
4314
4314
|
] }),
|
|
@@ -4317,7 +4317,7 @@ function Ns({
|
|
|
4317
4317
|
{
|
|
4318
4318
|
variant: "outlined",
|
|
4319
4319
|
fullWidth: !0,
|
|
4320
|
-
onClick:
|
|
4320
|
+
onClick: g,
|
|
4321
4321
|
sx: {
|
|
4322
4322
|
borderRadius: "20px",
|
|
4323
4323
|
textTransform: "none",
|
|
@@ -4336,7 +4336,7 @@ function Ns({
|
|
|
4336
4336
|
)
|
|
4337
4337
|
] }),
|
|
4338
4338
|
/* @__PURE__ */ x(ct, { sx: { my: 0 } }),
|
|
4339
|
-
o && /* @__PURE__ */
|
|
4339
|
+
o && /* @__PURE__ */ re(ut, { children: [
|
|
4340
4340
|
/* @__PURE__ */ x(
|
|
4341
4341
|
hr,
|
|
4342
4342
|
{
|
|
@@ -4350,14 +4350,14 @@ function Ns({
|
|
|
4350
4350
|
}
|
|
4351
4351
|
},
|
|
4352
4352
|
children: /* @__PURE__ */ x(
|
|
4353
|
-
|
|
4353
|
+
_e,
|
|
4354
4354
|
{
|
|
4355
4355
|
sx: {
|
|
4356
4356
|
color: "#3c4043",
|
|
4357
4357
|
width: "100%",
|
|
4358
4358
|
fontSize: "0.8125rem"
|
|
4359
4359
|
},
|
|
4360
|
-
children:
|
|
4360
|
+
children: y > 0 ? `Accounts (${y})` : "Accounts"
|
|
4361
4361
|
}
|
|
4362
4362
|
)
|
|
4363
4363
|
}
|
|
@@ -4365,10 +4365,10 @@ function Ns({
|
|
|
4365
4365
|
/* @__PURE__ */ x(ct, { sx: { my: 0 } })
|
|
4366
4366
|
] }),
|
|
4367
4367
|
o?.addNewAccount && /* @__PURE__ */ x(ne, { sx: { px: 1.5, py: 0.5 } }),
|
|
4368
|
-
/* @__PURE__ */
|
|
4368
|
+
/* @__PURE__ */ re(
|
|
4369
4369
|
hr,
|
|
4370
4370
|
{
|
|
4371
|
-
onClick:
|
|
4371
|
+
onClick: v,
|
|
4372
4372
|
sx: {
|
|
4373
4373
|
py: 0.75,
|
|
4374
4374
|
px: 1.5,
|
|
@@ -4379,7 +4379,7 @@ function Ns({
|
|
|
4379
4379
|
},
|
|
4380
4380
|
children: [
|
|
4381
4381
|
/* @__PURE__ */ x(tn, { sx: { minWidth: 32, mr: 0.5 }, children: /* @__PURE__ */ x(Os, { sx: { fontSize: "1rem", color: "#5f6368" } }) }),
|
|
4382
|
-
/* @__PURE__ */ x(
|
|
4382
|
+
/* @__PURE__ */ x(_e, { sx: { color: "#3c4043", fontSize: "0.8125rem" }, children: "Sign out" })
|
|
4383
4383
|
]
|
|
4384
4384
|
}
|
|
4385
4385
|
)
|
|
@@ -4396,67 +4396,67 @@ function Ls(e, t = {}) {
|
|
|
4396
4396
|
cacheTime: n = Ds,
|
|
4397
4397
|
getAuthToken: o,
|
|
4398
4398
|
headers: i = {}
|
|
4399
|
-
} = t, [
|
|
4399
|
+
} = t, [c, l] = ge(null), [f, u] = ge(!0), [y, d] = ge(null), h = be(null), v = be(null), g = he(() => {
|
|
4400
4400
|
try {
|
|
4401
|
-
const
|
|
4402
|
-
if (!
|
|
4403
|
-
const
|
|
4404
|
-
return Date.now() -
|
|
4405
|
-
} catch (
|
|
4406
|
-
return console.error("Error loading profile from cache:",
|
|
4401
|
+
const C = localStorage.getItem(jt);
|
|
4402
|
+
if (!C) return null;
|
|
4403
|
+
const _ = JSON.parse(C);
|
|
4404
|
+
return Date.now() - _.timestamp < n ? _.profile : (localStorage.removeItem(jt), null);
|
|
4405
|
+
} catch (C) {
|
|
4406
|
+
return console.error("Error loading profile from cache:", C), null;
|
|
4407
4407
|
}
|
|
4408
|
-
}, [n]),
|
|
4408
|
+
}, [n]), a = he((C) => {
|
|
4409
4409
|
try {
|
|
4410
|
-
const
|
|
4411
|
-
profile:
|
|
4410
|
+
const _ = {
|
|
4411
|
+
profile: C,
|
|
4412
4412
|
timestamp: Date.now()
|
|
4413
4413
|
};
|
|
4414
|
-
localStorage.setItem(jt, JSON.stringify(
|
|
4415
|
-
} catch (
|
|
4416
|
-
console.error("Error saving profile to cache:",
|
|
4414
|
+
localStorage.setItem(jt, JSON.stringify(_));
|
|
4415
|
+
} catch (_) {
|
|
4416
|
+
console.error("Error saving profile to cache:", _);
|
|
4417
4417
|
}
|
|
4418
|
-
}, []),
|
|
4419
|
-
|
|
4418
|
+
}, []), b = he(async () => {
|
|
4419
|
+
v.current && v.current.abort(), v.current = new AbortController();
|
|
4420
4420
|
try {
|
|
4421
4421
|
u(!0), d(null);
|
|
4422
|
-
let
|
|
4423
|
-
o && (
|
|
4424
|
-
const
|
|
4422
|
+
let C = null;
|
|
4423
|
+
o && (C = await Promise.resolve(o()));
|
|
4424
|
+
const _ = {
|
|
4425
4425
|
Accept: "application/json",
|
|
4426
4426
|
...i
|
|
4427
4427
|
};
|
|
4428
|
-
|
|
4429
|
-
const
|
|
4430
|
-
signal:
|
|
4431
|
-
headers:
|
|
4428
|
+
C && (_.Authorization = `Bearer ${C}`);
|
|
4429
|
+
const A = await fetch(`${e}/api/profile`, {
|
|
4430
|
+
signal: v.current.signal,
|
|
4431
|
+
headers: _
|
|
4432
4432
|
});
|
|
4433
|
-
if (!
|
|
4434
|
-
throw new Error(`HTTP error! status: ${
|
|
4435
|
-
const
|
|
4436
|
-
l(
|
|
4437
|
-
} catch (
|
|
4438
|
-
if (
|
|
4433
|
+
if (!A.ok)
|
|
4434
|
+
throw new Error(`HTTP error! status: ${A.status}`);
|
|
4435
|
+
const m = await A.json();
|
|
4436
|
+
l(m), a(m), d(null);
|
|
4437
|
+
} catch (C) {
|
|
4438
|
+
if (C instanceof Error && C.name === "AbortError")
|
|
4439
4439
|
return;
|
|
4440
|
-
const
|
|
4441
|
-
d(
|
|
4442
|
-
const
|
|
4443
|
-
|
|
4440
|
+
const _ = C instanceof Error ? C.message : "Failed to fetch profile";
|
|
4441
|
+
d(_), console.error("Error fetching profile:", C);
|
|
4442
|
+
const A = g();
|
|
4443
|
+
A && l(A);
|
|
4444
4444
|
} finally {
|
|
4445
4445
|
u(!1);
|
|
4446
4446
|
}
|
|
4447
|
-
}, [e, o, i,
|
|
4448
|
-
return
|
|
4449
|
-
const
|
|
4450
|
-
return
|
|
4451
|
-
|
|
4447
|
+
}, [e, o, i, g, a]);
|
|
4448
|
+
return de(() => {
|
|
4449
|
+
const C = g();
|
|
4450
|
+
return C && (l(C), u(!1)), b(), r > 0 && (h.current = window.setInterval(() => {
|
|
4451
|
+
b();
|
|
4452
4452
|
}, r)), () => {
|
|
4453
|
-
|
|
4453
|
+
h.current && window.clearInterval(h.current), v.current && v.current.abort();
|
|
4454
4454
|
};
|
|
4455
4455
|
}, [e, r, n]), {
|
|
4456
|
-
profile:
|
|
4456
|
+
profile: c,
|
|
4457
4457
|
isLoading: f,
|
|
4458
|
-
error:
|
|
4459
|
-
refetch:
|
|
4458
|
+
error: y,
|
|
4459
|
+
refetch: b
|
|
4460
4460
|
};
|
|
4461
4461
|
}
|
|
4462
4462
|
function Ms({
|
|
@@ -4466,12 +4466,12 @@ function Ms({
|
|
|
4466
4466
|
accountManager: n,
|
|
4467
4467
|
...o
|
|
4468
4468
|
}) {
|
|
4469
|
-
const { profile: i, isLoading:
|
|
4469
|
+
const { profile: i, isLoading: c, error: l } = Ls(e, o);
|
|
4470
4470
|
return l && console.error("Error loading profile:", l), /* @__PURE__ */ x(
|
|
4471
4471
|
Ns,
|
|
4472
4472
|
{
|
|
4473
4473
|
profile: i,
|
|
4474
|
-
isLoading:
|
|
4474
|
+
isLoading: c,
|
|
4475
4475
|
onSignOut: t,
|
|
4476
4476
|
onManageAccount: r,
|
|
4477
4477
|
accountManager: n
|
|
@@ -4488,25 +4488,25 @@ function $a({
|
|
|
4488
4488
|
getAuthToken: n,
|
|
4489
4489
|
profileHeaders: o,
|
|
4490
4490
|
showAppsDropdown: i = !0,
|
|
4491
|
-
showProfileMenu:
|
|
4491
|
+
showProfileMenu: c = !0,
|
|
4492
4492
|
appsRefetchInterval: l = 300 * 1e3,
|
|
4493
4493
|
// 5 minutes
|
|
4494
4494
|
appsCacheTime: f = 300 * 1e3,
|
|
4495
4495
|
// 5 minutes
|
|
4496
4496
|
profileRefetchInterval: u = 300 * 1e3,
|
|
4497
4497
|
// 5 minutes
|
|
4498
|
-
profileCacheTime:
|
|
4498
|
+
profileCacheTime: y = 300 * 1e3,
|
|
4499
4499
|
// 5 minutes
|
|
4500
4500
|
accountManager: d
|
|
4501
4501
|
}) {
|
|
4502
|
-
const [
|
|
4503
|
-
return /* @__PURE__ */
|
|
4504
|
-
i && /* @__PURE__ */
|
|
4502
|
+
const [h, v] = ge(!1), g = be(null);
|
|
4503
|
+
return /* @__PURE__ */ re(Un, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
4504
|
+
i && /* @__PURE__ */ re(ut, { children: [
|
|
4505
4505
|
/* @__PURE__ */ x(
|
|
4506
4506
|
dt,
|
|
4507
4507
|
{
|
|
4508
|
-
ref:
|
|
4509
|
-
onClick: () =>
|
|
4508
|
+
ref: g,
|
|
4509
|
+
onClick: () => v(!h),
|
|
4510
4510
|
sx: {
|
|
4511
4511
|
color: "#5f6368",
|
|
4512
4512
|
"&:hover": {
|
|
@@ -4521,21 +4521,21 @@ function $a({
|
|
|
4521
4521
|
ya,
|
|
4522
4522
|
{
|
|
4523
4523
|
apiUrl: e,
|
|
4524
|
-
open:
|
|
4525
|
-
onClose: () =>
|
|
4526
|
-
buttonRef:
|
|
4524
|
+
open: h,
|
|
4525
|
+
onClose: () => v(!1),
|
|
4526
|
+
buttonRef: g,
|
|
4527
4527
|
refetchInterval: l,
|
|
4528
4528
|
cacheTime: f
|
|
4529
4529
|
}
|
|
4530
4530
|
)
|
|
4531
4531
|
] }),
|
|
4532
|
-
|
|
4532
|
+
c && /* @__PURE__ */ x(
|
|
4533
4533
|
Ms,
|
|
4534
4534
|
{
|
|
4535
4535
|
apiUrl: t || e,
|
|
4536
4536
|
onSignOut: r,
|
|
4537
4537
|
refetchInterval: u,
|
|
4538
|
-
cacheTime:
|
|
4538
|
+
cacheTime: y,
|
|
4539
4539
|
getAuthToken: n,
|
|
4540
4540
|
headers: o,
|
|
4541
4541
|
accountManager: d
|
|
@@ -4652,107 +4652,107 @@ var Ys = [
|
|
|
4652
4652
|
skipSigninCallback: n,
|
|
4653
4653
|
matchSignoutCallback: o,
|
|
4654
4654
|
onSignoutCallback: i,
|
|
4655
|
-
onRemoveUser:
|
|
4655
|
+
onRemoveUser: c,
|
|
4656
4656
|
userManager: l = null,
|
|
4657
4657
|
...f
|
|
4658
|
-
} = e, [u] = ie.useState(() => l ?? (qr ? new qr(f) : { settings: f })), [
|
|
4658
|
+
} = e, [u] = ie.useState(() => l ?? (qr ? new qr(f) : { settings: f })), [y, d] = ie.useReducer(zs, Bs), h = ie.useMemo(
|
|
4659
4659
|
() => Object.assign(
|
|
4660
4660
|
{
|
|
4661
4661
|
settings: u.settings,
|
|
4662
4662
|
events: u.events
|
|
4663
4663
|
},
|
|
4664
4664
|
Object.fromEntries(
|
|
4665
|
-
Ys.map((
|
|
4666
|
-
var
|
|
4665
|
+
Ys.map((b) => {
|
|
4666
|
+
var C, _;
|
|
4667
4667
|
return [
|
|
4668
|
-
|
|
4669
|
-
(
|
|
4668
|
+
b,
|
|
4669
|
+
(_ = (C = u[b]) == null ? void 0 : C.bind(u)) != null ? _ : Hr(b)
|
|
4670
4670
|
];
|
|
4671
4671
|
})
|
|
4672
4672
|
),
|
|
4673
4673
|
Object.fromEntries(
|
|
4674
|
-
Ks.map((
|
|
4675
|
-
|
|
4676
|
-
u[
|
|
4674
|
+
Ks.map((b) => [
|
|
4675
|
+
b,
|
|
4676
|
+
u[b] ? async (C) => {
|
|
4677
4677
|
d({
|
|
4678
4678
|
type: "NAVIGATOR_INIT",
|
|
4679
|
-
method:
|
|
4679
|
+
method: b
|
|
4680
4680
|
});
|
|
4681
4681
|
try {
|
|
4682
|
-
return await u[
|
|
4683
|
-
} catch (
|
|
4682
|
+
return await u[b](C);
|
|
4683
|
+
} catch (_) {
|
|
4684
4684
|
return d({
|
|
4685
4685
|
type: "ERROR",
|
|
4686
4686
|
error: {
|
|
4687
|
-
...Cn(
|
|
4688
|
-
source:
|
|
4689
|
-
args:
|
|
4687
|
+
...Cn(_, `Unknown error while executing ${b}(...).`),
|
|
4688
|
+
source: b,
|
|
4689
|
+
args: C
|
|
4690
4690
|
}
|
|
4691
4691
|
}), null;
|
|
4692
4692
|
} finally {
|
|
4693
4693
|
d({ type: "NAVIGATOR_CLOSE" });
|
|
4694
4694
|
}
|
|
4695
|
-
} : Hr(
|
|
4695
|
+
} : Hr(b)
|
|
4696
4696
|
])
|
|
4697
4697
|
)
|
|
4698
4698
|
),
|
|
4699
4699
|
[u]
|
|
4700
|
-
),
|
|
4700
|
+
), v = ie.useRef(!1);
|
|
4701
4701
|
ie.useEffect(() => {
|
|
4702
|
-
!u ||
|
|
4702
|
+
!u || v.current || (v.current = !0, (async () => {
|
|
4703
4703
|
try {
|
|
4704
|
-
let
|
|
4705
|
-
js() && !n && (
|
|
4706
|
-
} catch (
|
|
4704
|
+
let b = null;
|
|
4705
|
+
js() && !n && (b = await u.signinCallback(), r && await r(b)), b = b || await u.getUser(), d({ type: "INITIALISED", user: b });
|
|
4706
|
+
} catch (b) {
|
|
4707
4707
|
d({
|
|
4708
4708
|
type: "ERROR",
|
|
4709
|
-
error: Vs(
|
|
4709
|
+
error: Vs(b)
|
|
4710
4710
|
});
|
|
4711
4711
|
}
|
|
4712
4712
|
try {
|
|
4713
4713
|
if (o && o(u.settings)) {
|
|
4714
|
-
const
|
|
4715
|
-
i && await i(
|
|
4714
|
+
const b = await u.signoutCallback();
|
|
4715
|
+
i && await i(b);
|
|
4716
4716
|
}
|
|
4717
|
-
} catch (
|
|
4717
|
+
} catch (b) {
|
|
4718
4718
|
d({
|
|
4719
4719
|
type: "ERROR",
|
|
4720
|
-
error: Ws(
|
|
4720
|
+
error: Ws(b)
|
|
4721
4721
|
});
|
|
4722
4722
|
}
|
|
4723
4723
|
})());
|
|
4724
4724
|
}, [u, n, r, i, o]), ie.useEffect(() => {
|
|
4725
4725
|
if (!u) return;
|
|
4726
|
-
const
|
|
4727
|
-
d({ type: "USER_LOADED", user:
|
|
4726
|
+
const b = (m) => {
|
|
4727
|
+
d({ type: "USER_LOADED", user: m });
|
|
4728
4728
|
};
|
|
4729
|
-
u.events.addUserLoaded(
|
|
4730
|
-
const
|
|
4729
|
+
u.events.addUserLoaded(b);
|
|
4730
|
+
const C = () => {
|
|
4731
4731
|
d({ type: "USER_UNLOADED" });
|
|
4732
4732
|
};
|
|
4733
|
-
u.events.addUserUnloaded(
|
|
4734
|
-
const
|
|
4733
|
+
u.events.addUserUnloaded(C);
|
|
4734
|
+
const _ = () => {
|
|
4735
4735
|
d({ type: "USER_SIGNED_OUT" });
|
|
4736
4736
|
};
|
|
4737
|
-
u.events.addUserSignedOut(
|
|
4738
|
-
const
|
|
4737
|
+
u.events.addUserSignedOut(_);
|
|
4738
|
+
const A = (m) => {
|
|
4739
4739
|
d({
|
|
4740
4740
|
type: "ERROR",
|
|
4741
|
-
error: Gs(
|
|
4741
|
+
error: Gs(m)
|
|
4742
4742
|
});
|
|
4743
4743
|
};
|
|
4744
|
-
return u.events.addSilentRenewError(
|
|
4745
|
-
u.events.removeUserLoaded(
|
|
4744
|
+
return u.events.addSilentRenewError(A), () => {
|
|
4745
|
+
u.events.removeUserLoaded(b), u.events.removeUserUnloaded(C), u.events.removeUserSignedOut(_), u.events.removeSilentRenewError(A);
|
|
4746
4746
|
};
|
|
4747
4747
|
}, [u]);
|
|
4748
|
-
const
|
|
4749
|
-
await u.removeUser(),
|
|
4750
|
-
}, [u,
|
|
4751
|
-
...
|
|
4752
|
-
...
|
|
4753
|
-
removeUser:
|
|
4754
|
-
}), [
|
|
4755
|
-
return /* @__PURE__ */ ie.createElement(cr.Provider, { value:
|
|
4748
|
+
const g = ie.useCallback(async () => {
|
|
4749
|
+
await u.removeUser(), c && await c();
|
|
4750
|
+
}, [u, c]), a = ie.useMemo(() => ({
|
|
4751
|
+
...y,
|
|
4752
|
+
...h,
|
|
4753
|
+
removeUser: g
|
|
4754
|
+
}), [y, h, g]);
|
|
4755
|
+
return /* @__PURE__ */ ie.createElement(cr.Provider, { value: a }, t);
|
|
4756
4756
|
}, _n = () => {
|
|
4757
4757
|
const e = ie.useContext(cr);
|
|
4758
4758
|
return e || console.warn("AuthProvider context is undefined, please verify you are calling useAuth() as child of a <AuthProvider> component."), e;
|
|
@@ -4775,7 +4775,7 @@ function ka({
|
|
|
4775
4775
|
matchSignoutCallback: n,
|
|
4776
4776
|
onSignoutCallback: o,
|
|
4777
4777
|
onRemoveUser: i,
|
|
4778
|
-
skipSigninCallback:
|
|
4778
|
+
skipSigninCallback: c
|
|
4779
4779
|
}) {
|
|
4780
4780
|
const l = qe(
|
|
4781
4781
|
() => ({
|
|
@@ -4791,16 +4791,16 @@ function ka({
|
|
|
4791
4791
|
post_logout_redirect_uri: l.post_logout_redirect_uri
|
|
4792
4792
|
}),
|
|
4793
4793
|
[l]
|
|
4794
|
-
),
|
|
4794
|
+
), y = r || qs, d = n || Js, h = o || (() => Xs(l));
|
|
4795
4795
|
return /* @__PURE__ */ x(Tn.Provider, { value: { keycloakConfig: u, userManager: f, syncBridgeUrl: $s }, children: /* @__PURE__ */ x(
|
|
4796
4796
|
Hs,
|
|
4797
4797
|
{
|
|
4798
4798
|
userManager: f,
|
|
4799
|
-
onSigninCallback:
|
|
4799
|
+
onSigninCallback: y,
|
|
4800
4800
|
matchSignoutCallback: d,
|
|
4801
|
-
onSignoutCallback:
|
|
4801
|
+
onSignoutCallback: h,
|
|
4802
4802
|
onRemoveUser: i,
|
|
4803
|
-
skipSigninCallback:
|
|
4803
|
+
skipSigninCallback: c,
|
|
4804
4804
|
children: e
|
|
4805
4805
|
}
|
|
4806
4806
|
) });
|
|
@@ -4815,9 +4815,9 @@ function Zs(e) {
|
|
|
4815
4815
|
const t = e.profile?.email || e.profile?.sub || "unknown", r = Date.now();
|
|
4816
4816
|
return `account_${t.replace(/[^a-z0-9]/gi, "_").toLowerCase()}_${r}`;
|
|
4817
4817
|
}
|
|
4818
|
-
function
|
|
4818
|
+
function ee() {
|
|
4819
4819
|
try {
|
|
4820
|
-
const e = localStorage.getItem(
|
|
4820
|
+
const e = localStorage.getItem(ye.ACCOUNTS);
|
|
4821
4821
|
return e ? JSON.parse(e) : {
|
|
4822
4822
|
accounts: [],
|
|
4823
4823
|
activeAccountId: null,
|
|
@@ -4831,18 +4831,18 @@ function re() {
|
|
|
4831
4831
|
};
|
|
4832
4832
|
}
|
|
4833
4833
|
}
|
|
4834
|
-
function
|
|
4835
|
-
return
|
|
4834
|
+
function pe() {
|
|
4835
|
+
return ee().accounts;
|
|
4836
4836
|
}
|
|
4837
4837
|
function Ve(e) {
|
|
4838
4838
|
try {
|
|
4839
|
-
localStorage.setItem(
|
|
4839
|
+
localStorage.setItem(ye.ACCOUNTS, JSON.stringify(e));
|
|
4840
4840
|
} catch (t) {
|
|
4841
4841
|
console.error("Failed to save accounts to localStorage:", t);
|
|
4842
4842
|
}
|
|
4843
4843
|
}
|
|
4844
4844
|
function ea(e, t = null) {
|
|
4845
|
-
const r =
|
|
4845
|
+
const r = ee(), n = {
|
|
4846
4846
|
accounts: e,
|
|
4847
4847
|
activeAccountId: t ?? r.activeAccountId,
|
|
4848
4848
|
lastUpdated: Date.now()
|
|
@@ -4850,7 +4850,7 @@ function ea(e, t = null) {
|
|
|
4850
4850
|
Ve(n);
|
|
4851
4851
|
}
|
|
4852
4852
|
function Ge(e) {
|
|
4853
|
-
const t =
|
|
4853
|
+
const t = ee(), r = Zs(e), n = e.profile?.sub, o = e.profile?.email, i = t.accounts.findIndex((f) => n && f.user.profile?.sub ? f.user.profile.sub === n : o && f.user.profile?.email ? f.user.profile.email === o : !1), l = {
|
|
4854
4854
|
...{
|
|
4855
4855
|
accountId: r,
|
|
4856
4856
|
lastUsed: Date.now(),
|
|
@@ -4862,33 +4862,33 @@ function Ge(e) {
|
|
|
4862
4862
|
return i >= 0 ? t.accounts[i] = l : t.accounts.push(l), t.lastUpdated = Date.now(), Ve(t), r;
|
|
4863
4863
|
}
|
|
4864
4864
|
function ur(e) {
|
|
4865
|
-
const t =
|
|
4865
|
+
const t = ee();
|
|
4866
4866
|
t.accounts = t.accounts.filter((r) => r.accountId !== e), t.activeAccountId === e && (t.activeAccountId = null), t.lastUpdated = Date.now(), Ve(t);
|
|
4867
4867
|
}
|
|
4868
|
-
function
|
|
4869
|
-
const t =
|
|
4868
|
+
function le(e) {
|
|
4869
|
+
const t = ee();
|
|
4870
4870
|
t.activeAccountId = e, t.lastUpdated = Date.now(), Ve(t);
|
|
4871
4871
|
}
|
|
4872
4872
|
function ta() {
|
|
4873
|
-
const e =
|
|
4873
|
+
const e = ee();
|
|
4874
4874
|
return e.activeAccountId && e.accounts.find((t) => t.accountId === e.activeAccountId) || null;
|
|
4875
4875
|
}
|
|
4876
4876
|
function ra() {
|
|
4877
|
-
return
|
|
4877
|
+
return ee().activeAccountId;
|
|
4878
4878
|
}
|
|
4879
4879
|
function na(e, t) {
|
|
4880
|
-
const r =
|
|
4880
|
+
const r = ee(), n = r.accounts.find((o) => o.accountId === e);
|
|
4881
4881
|
n && (n.user = t, n.lastUsed = Date.now(), n.isStale = !1, r.lastUpdated = Date.now(), Ve(r));
|
|
4882
4882
|
}
|
|
4883
4883
|
function oa(e) {
|
|
4884
|
-
const t =
|
|
4884
|
+
const t = ee(), r = t.accounts.find((n) => n.accountId === e);
|
|
4885
4885
|
r && (r.isStale = !0, t.lastUpdated = Date.now(), Ve(t));
|
|
4886
4886
|
}
|
|
4887
4887
|
function Pa() {
|
|
4888
|
-
localStorage.removeItem(
|
|
4888
|
+
localStorage.removeItem(ye.ACCOUNTS);
|
|
4889
4889
|
}
|
|
4890
4890
|
function Na(e) {
|
|
4891
|
-
const r =
|
|
4891
|
+
const r = ee().accounts.find((n) => n.accountId === e);
|
|
4892
4892
|
return r ? {
|
|
4893
4893
|
accountId: r.accountId,
|
|
4894
4894
|
lastUsed: r.lastUsed,
|
|
@@ -4897,45 +4897,45 @@ function Na(e) {
|
|
|
4897
4897
|
} : null;
|
|
4898
4898
|
}
|
|
4899
4899
|
function Wt(e) {
|
|
4900
|
-
e ? localStorage.setItem(
|
|
4900
|
+
e ? localStorage.setItem(ye.ADD_ACCOUNT_IN_PROGRESS, "true") : localStorage.removeItem(ye.ADD_ACCOUNT_IN_PROGRESS);
|
|
4901
4901
|
}
|
|
4902
4902
|
function Gt() {
|
|
4903
|
-
return localStorage.getItem(
|
|
4903
|
+
return localStorage.getItem(ye.ADD_ACCOUNT_IN_PROGRESS) === "true";
|
|
4904
4904
|
}
|
|
4905
4905
|
function ia(e) {
|
|
4906
|
-
localStorage.setItem(
|
|
4906
|
+
localStorage.setItem(ye.RETURN_URL, e);
|
|
4907
4907
|
}
|
|
4908
4908
|
function sa() {
|
|
4909
|
-
return localStorage.getItem(
|
|
4909
|
+
return localStorage.getItem(ye.RETURN_URL);
|
|
4910
4910
|
}
|
|
4911
4911
|
function Jr() {
|
|
4912
|
-
localStorage.removeItem(
|
|
4912
|
+
localStorage.removeItem(ye.RETURN_URL);
|
|
4913
4913
|
}
|
|
4914
4914
|
function aa(e) {
|
|
4915
|
-
localStorage.setItem(
|
|
4915
|
+
localStorage.setItem(ye.TEMP_CURRENT_USER, JSON.stringify(e));
|
|
4916
4916
|
}
|
|
4917
4917
|
function Ua() {
|
|
4918
4918
|
try {
|
|
4919
|
-
const e = localStorage.getItem(
|
|
4919
|
+
const e = localStorage.getItem(ye.TEMP_CURRENT_USER);
|
|
4920
4920
|
return e ? JSON.parse(e) : null;
|
|
4921
4921
|
} catch {
|
|
4922
4922
|
return null;
|
|
4923
4923
|
}
|
|
4924
4924
|
}
|
|
4925
4925
|
function Xr() {
|
|
4926
|
-
localStorage.removeItem(
|
|
4926
|
+
localStorage.removeItem(ye.TEMP_CURRENT_USER);
|
|
4927
4927
|
}
|
|
4928
4928
|
async function ca(e, t) {
|
|
4929
4929
|
try {
|
|
4930
4930
|
const r = `${t.authority.replace(/\/$/, "")}/soft-logout`, n = "openid profile email offline_access", o = t.redirect_uri || window.location.origin, i = `${t.authority.replace(/\/$/, "")}/protocol/openid-connect/auth?client_id=${encodeURIComponent(t.client_id)}&redirect_uri=${encodeURIComponent(o)}&response_type=code&scope=${encodeURIComponent(n)}`;
|
|
4931
4931
|
return window.location.href = `${r}?post_logout_redirect_uri=${encodeURIComponent(i)}`, !0;
|
|
4932
4932
|
} catch (r) {
|
|
4933
|
-
return console.error("Failed to clear SSO session:", r), console.warn(
|
|
4933
|
+
return console.error("Failed to clear SSO session:", r), console.warn(ve.SSO_CLEAR_FAILED), !1;
|
|
4934
4934
|
}
|
|
4935
4935
|
}
|
|
4936
4936
|
async function la(e, t, r) {
|
|
4937
4937
|
try {
|
|
4938
|
-
const o =
|
|
4938
|
+
const o = pe().length === 1;
|
|
4939
4939
|
if (!await da(e, t) && o)
|
|
4940
4940
|
return console.warn("Token revocation failed for last account, falling back to redirect logout"), await xn(e, t, r), {
|
|
4941
4941
|
success: !0,
|
|
@@ -4943,12 +4943,12 @@ async function la(e, t, r) {
|
|
|
4943
4943
|
remainingAccounts: 0
|
|
4944
4944
|
};
|
|
4945
4945
|
ur(r), Ot.remove(r);
|
|
4946
|
-
const
|
|
4947
|
-
return f ? (
|
|
4946
|
+
const c = pe(), f = c.sort((u, y) => y.lastUsed - u.lastUsed)[0] || null;
|
|
4947
|
+
return f ? (le(f.accountId), {
|
|
4948
4948
|
success: !0,
|
|
4949
4949
|
message: `Logged out. Switched to ${f.user.profile?.email || f.user.profile?.sub}`,
|
|
4950
|
-
remainingAccounts:
|
|
4951
|
-
}) : (
|
|
4950
|
+
remainingAccounts: c.length
|
|
4951
|
+
}) : (le(null), {
|
|
4952
4952
|
success: !0,
|
|
4953
4953
|
message: "Logged out. No other accounts available.",
|
|
4954
4954
|
remainingAccounts: 0
|
|
@@ -4957,7 +4957,7 @@ async function la(e, t, r) {
|
|
|
4957
4957
|
return console.error("Error during logout:", n), {
|
|
4958
4958
|
success: !1,
|
|
4959
4959
|
message: `Logout failed: ${n instanceof Error ? n.message : "Unknown error"}`,
|
|
4960
|
-
remainingAccounts:
|
|
4960
|
+
remainingAccounts: pe().length
|
|
4961
4961
|
};
|
|
4962
4962
|
}
|
|
4963
4963
|
}
|
|
@@ -4969,7 +4969,7 @@ async function Da(e, t) {
|
|
|
4969
4969
|
);
|
|
4970
4970
|
return await Promise.all(r), e.forEach((n) => {
|
|
4971
4971
|
ur(n.accountId), Ot.remove(n.accountId);
|
|
4972
|
-
}),
|
|
4972
|
+
}), le(null), {
|
|
4973
4973
|
success: !0,
|
|
4974
4974
|
message: "All accounts logged out.",
|
|
4975
4975
|
remainingAccounts: 0
|
|
@@ -4977,16 +4977,16 @@ async function Da(e, t) {
|
|
|
4977
4977
|
}
|
|
4978
4978
|
function La(e) {
|
|
4979
4979
|
ur(e);
|
|
4980
|
-
const t =
|
|
4980
|
+
const t = pe();
|
|
4981
4981
|
if (t.length > 0) {
|
|
4982
4982
|
const n = t.sort((o, i) => i.lastUsed - o.lastUsed)[0];
|
|
4983
|
-
return
|
|
4983
|
+
return le(n.accountId), {
|
|
4984
4984
|
success: !0,
|
|
4985
4985
|
message: `Account removed locally. Switched to ${n.user.profile?.email || n.user.profile?.sub}`,
|
|
4986
4986
|
remainingAccounts: t.length - 1
|
|
4987
4987
|
};
|
|
4988
4988
|
} else
|
|
4989
|
-
return
|
|
4989
|
+
return le(null), {
|
|
4990
4990
|
success: !0,
|
|
4991
4991
|
message: "Account removed. No other accounts available.",
|
|
4992
4992
|
remainingAccounts: 0
|
|
@@ -5034,7 +5034,7 @@ class fa {
|
|
|
5034
5034
|
const Ot = new fa();
|
|
5035
5035
|
async function Xt(e, t, r) {
|
|
5036
5036
|
if (!t.refresh_token)
|
|
5037
|
-
return console.warn(`${
|
|
5037
|
+
return console.warn(`${ve.TOKEN_REFRESH_FAILED} (${e}): missing refresh token`), null;
|
|
5038
5038
|
const n = `${r.authority.replace(/\/$/, "")}/protocol/openid-connect/token`;
|
|
5039
5039
|
try {
|
|
5040
5040
|
const o = await fetch(n, {
|
|
@@ -5050,25 +5050,25 @@ async function Xt(e, t, r) {
|
|
|
5050
5050
|
});
|
|
5051
5051
|
if (!o.ok) {
|
|
5052
5052
|
const l = await o.text();
|
|
5053
|
-
return console.warn(`${
|
|
5053
|
+
return console.warn(`${ve.TOKEN_REFRESH_FAILED} (${e}):`, l), null;
|
|
5054
5054
|
}
|
|
5055
|
-
const i = await o.json(),
|
|
5055
|
+
const i = await o.json(), c = {
|
|
5056
5056
|
access_token: i.access_token,
|
|
5057
5057
|
refresh_token: i.refresh_token || t.refresh_token,
|
|
5058
5058
|
id_token: i.id_token || t.id_token,
|
|
5059
5059
|
expires_in: i.expires_in || t.expires_in,
|
|
5060
5060
|
profile: t.profile
|
|
5061
5061
|
};
|
|
5062
|
-
return na(e,
|
|
5062
|
+
return na(e, c), c;
|
|
5063
5063
|
} catch (o) {
|
|
5064
|
-
return console.warn(`${
|
|
5064
|
+
return console.warn(`${ve.TOKEN_REFRESH_FAILED} (${e}):`, o), null;
|
|
5065
5065
|
}
|
|
5066
5066
|
}
|
|
5067
5067
|
async function Qr(e, t) {
|
|
5068
5068
|
try {
|
|
5069
5069
|
await (await Ot.getOrCreate(e, t)).signinRedirect();
|
|
5070
5070
|
} catch (r) {
|
|
5071
|
-
throw console.error(
|
|
5071
|
+
throw console.error(ve.SIGNIN_REDIRECT_FAILED, r), r;
|
|
5072
5072
|
}
|
|
5073
5073
|
}
|
|
5074
5074
|
async function da(e, t) {
|
|
@@ -5098,192 +5098,209 @@ async function xn(e, t, r) {
|
|
|
5098
5098
|
post_logout_redirect_uri: t.post_logout_redirect_uri || t.redirect_uri || window.location.origin
|
|
5099
5099
|
});
|
|
5100
5100
|
} catch (n) {
|
|
5101
|
-
console.warn(
|
|
5101
|
+
console.warn(ve.LOGOUT_FAILED, n);
|
|
5102
5102
|
}
|
|
5103
5103
|
}
|
|
5104
5104
|
function pa(e) {
|
|
5105
|
-
const { keycloakConfig: t, initialUser: r, onAccountSwitch: n, signinRedirect: o, syncBridge: i } = e, [
|
|
5106
|
-
const
|
|
5107
|
-
let
|
|
5108
|
-
if (
|
|
5109
|
-
const
|
|
5110
|
-
|
|
5105
|
+
const { keycloakConfig: t, initialUser: r, onAccountSwitch: n, signinRedirect: o, syncBridge: i } = e, [c, l] = ge([]), [f, u] = ge(null), y = be(!1), d = be(!1), h = be(!1), v = be(null), g = he((m) => {
|
|
5106
|
+
const p = m.accounts;
|
|
5107
|
+
let w = m.activeAccountId;
|
|
5108
|
+
if (w && !p.find((I) => I.accountId === w) && (w = p[0]?.accountId || null), l(p), u(w), w) {
|
|
5109
|
+
const I = p.find((k) => k.accountId === w);
|
|
5110
|
+
I && n(I.user);
|
|
5111
5111
|
}
|
|
5112
5112
|
}, [n]);
|
|
5113
|
-
|
|
5114
|
-
!i ||
|
|
5115
|
-
if (!
|
|
5116
|
-
|
|
5117
|
-
Ge(
|
|
5118
|
-
}),
|
|
5119
|
-
const
|
|
5120
|
-
|
|
5113
|
+
de(() => {
|
|
5114
|
+
!i || h.current || (h.current = !0, i.getAccountsState().then((m) => {
|
|
5115
|
+
if (!m || !m.accounts.length) return;
|
|
5116
|
+
m.accounts.forEach((w) => {
|
|
5117
|
+
Ge(w.user);
|
|
5118
|
+
}), m.activeAccountId && le(m.activeAccountId);
|
|
5119
|
+
const p = ee();
|
|
5120
|
+
g(p);
|
|
5121
5121
|
}));
|
|
5122
|
-
}, [
|
|
5122
|
+
}, [g, i]), de(() => {
|
|
5123
5123
|
if (d.current) return;
|
|
5124
5124
|
if (Gt())
|
|
5125
5125
|
if (console.log("🔄 Detected redirect callback for add account flow"), r) {
|
|
5126
|
-
const
|
|
5127
|
-
if (
|
|
5126
|
+
const p = pe(), w = r.profile?.sub, I = r.profile?.email;
|
|
5127
|
+
if (p.some((L) => w && L.user.profile?.sub ? L.user.profile.sub === w : I && L.user.profile?.email ? L.user.profile.email === I : !1)) {
|
|
5128
5128
|
console.log("⏳ initialUser matches an existing account, waiting for new user...");
|
|
5129
5129
|
return;
|
|
5130
5130
|
}
|
|
5131
5131
|
d.current = !0, console.log("✅ Primary auth populated initialUser, processing new account...");
|
|
5132
|
-
const
|
|
5133
|
-
console.log(`✅ Added new account: ${
|
|
5134
|
-
const
|
|
5132
|
+
const $ = Ge(r);
|
|
5133
|
+
console.log(`✅ Added new account: ${$}`), le($), Wt(!1);
|
|
5134
|
+
const s = sa();
|
|
5135
5135
|
Xr(), Jr();
|
|
5136
|
-
const
|
|
5137
|
-
l(
|
|
5136
|
+
const O = ee();
|
|
5137
|
+
l(O.accounts), u($), i && i.setAccountsState(O), n(r), console.log("✅ Account switch completed"), s && s !== window.location.href && (console.log(`🔄 Navigating back to: ${s}`), window.location.assign(s));
|
|
5138
5138
|
} else
|
|
5139
5139
|
console.log("⏳ Waiting for primary auth to populate initialUser...");
|
|
5140
|
-
}, [r, n]),
|
|
5140
|
+
}, [r, n]), de(() => {
|
|
5141
5141
|
(async () => {
|
|
5142
|
-
const
|
|
5143
|
-
let
|
|
5144
|
-
for (;
|
|
5145
|
-
await new Promise((
|
|
5146
|
-
if (await
|
|
5142
|
+
const m = async () => !(localStorage.getItem("spry_add_account_pending") !== "1" || d.current);
|
|
5143
|
+
let p = 0;
|
|
5144
|
+
for (; p < 10 && !await m(); )
|
|
5145
|
+
await new Promise((w) => setTimeout(w, 150)), p++;
|
|
5146
|
+
if (await m())
|
|
5147
5147
|
if (localStorage.removeItem("spry_add_account_pending"), console.log("🔄 Soft-logout completed, initiating signinRedirect..."), o)
|
|
5148
|
-
o().catch((
|
|
5149
|
-
console.error("signinRedirect failed:",
|
|
5148
|
+
o().catch((w) => {
|
|
5149
|
+
console.error("signinRedirect failed:", w);
|
|
5150
5150
|
});
|
|
5151
5151
|
else {
|
|
5152
|
-
const
|
|
5153
|
-
Qr(t,
|
|
5154
|
-
console.error("signinRedirectForNewAccount failed:",
|
|
5152
|
+
const w = `temp_add_${Date.now()}`;
|
|
5153
|
+
Qr(t, w).catch((I) => {
|
|
5154
|
+
console.error("signinRedirectForNewAccount failed:", I);
|
|
5155
5155
|
});
|
|
5156
5156
|
}
|
|
5157
5157
|
})();
|
|
5158
|
-
}, [t, o]),
|
|
5159
|
-
if (!
|
|
5160
|
-
|
|
5158
|
+
}, [t, o]), de(() => {
|
|
5159
|
+
if (!y.current && !d.current) {
|
|
5160
|
+
y.current = !0;
|
|
5161
5161
|
try {
|
|
5162
|
-
const
|
|
5163
|
-
let
|
|
5164
|
-
if (
|
|
5165
|
-
const
|
|
5166
|
-
|
|
5162
|
+
const m = ee();
|
|
5163
|
+
let p = m.accounts, w = m.activeAccountId;
|
|
5164
|
+
if (p.length === 0 && r) {
|
|
5165
|
+
const I = Ge(r);
|
|
5166
|
+
p = pe(), w = I, le(I);
|
|
5167
5167
|
}
|
|
5168
|
-
|
|
5169
|
-
accounts:
|
|
5170
|
-
activeAccountId:
|
|
5171
|
-
lastUpdated:
|
|
5168
|
+
w && !p.find((I) => I.accountId === w) && (w = p[0]?.accountId || null, w && le(w)), g({
|
|
5169
|
+
accounts: p,
|
|
5170
|
+
activeAccountId: w,
|
|
5171
|
+
lastUpdated: m.lastUpdated
|
|
5172
5172
|
}), i && i.setAccountsState({
|
|
5173
|
-
accounts:
|
|
5174
|
-
activeAccountId:
|
|
5175
|
-
lastUpdated:
|
|
5176
|
-
}), console.log(`📦 Loaded ${
|
|
5177
|
-
} catch (
|
|
5178
|
-
const
|
|
5179
|
-
console.error("Failed to initialize account manager:",
|
|
5173
|
+
accounts: p,
|
|
5174
|
+
activeAccountId: w,
|
|
5175
|
+
lastUpdated: m.lastUpdated
|
|
5176
|
+
}), console.log(`📦 Loaded ${p.length} accounts from localStorage`);
|
|
5177
|
+
} catch (m) {
|
|
5178
|
+
const p = m instanceof Error ? m.message : "Unknown initialization error";
|
|
5179
|
+
console.error("Failed to initialize account manager:", p);
|
|
5180
5180
|
}
|
|
5181
5181
|
}
|
|
5182
|
-
}, [
|
|
5183
|
-
if (d.current || !r ||
|
|
5184
|
-
const
|
|
5185
|
-
|
|
5186
|
-
const
|
|
5187
|
-
w
|
|
5188
|
-
}, [
|
|
5182
|
+
}, [g, r, n, i]), de(() => {
|
|
5183
|
+
if (d.current || !r || ee().accounts.length > 0 || Gt()) return;
|
|
5184
|
+
const p = Ge(r);
|
|
5185
|
+
le(p);
|
|
5186
|
+
const w = ee();
|
|
5187
|
+
g(w), i && i.setAccountsState(w), console.log("✅ Seeded initial account after auth became available");
|
|
5188
|
+
}, [g, r, n, i]), de(() => {
|
|
5189
5189
|
if (!r || d.current || Gt()) return;
|
|
5190
|
-
const
|
|
5191
|
-
if (
|
|
5192
|
-
const
|
|
5193
|
-
|
|
5194
|
-
const
|
|
5195
|
-
|
|
5196
|
-
}, [
|
|
5197
|
-
|
|
5198
|
-
|
|
5190
|
+
const m = pe(), p = r.profile?.sub, w = r.profile?.email;
|
|
5191
|
+
if (m.some((s) => p && s.user.profile?.sub ? s.user.profile.sub === p : w && s.user.profile?.email ? s.user.profile.email === w : !1)) return;
|
|
5192
|
+
const k = Ge(r);
|
|
5193
|
+
le(k);
|
|
5194
|
+
const $ = ee();
|
|
5195
|
+
g($), i && i.setAccountsState($), console.log("✅ Added account from auth state update");
|
|
5196
|
+
}, [g, r, n, i]), de(() => {
|
|
5197
|
+
const m = (p) => {
|
|
5198
|
+
if (p.key === "spry_accounts") {
|
|
5199
|
+
console.log("🔄 Detected cross-tab localStorage change, reloading accounts...");
|
|
5200
|
+
const w = ee();
|
|
5201
|
+
g(w);
|
|
5202
|
+
}
|
|
5203
|
+
};
|
|
5204
|
+
return window.addEventListener("storage", m), () => {
|
|
5205
|
+
window.removeEventListener("storage", m);
|
|
5206
|
+
};
|
|
5207
|
+
}, [g]);
|
|
5208
|
+
const a = he(
|
|
5209
|
+
async (m) => {
|
|
5199
5210
|
try {
|
|
5200
|
-
const
|
|
5201
|
-
if (!
|
|
5202
|
-
console.error(
|
|
5211
|
+
const w = pe().find((k) => k.accountId === m);
|
|
5212
|
+
if (!w) {
|
|
5213
|
+
console.error(ve.ACCOUNT_NOT_FOUND);
|
|
5203
5214
|
return;
|
|
5204
5215
|
}
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5216
|
+
const I = v.current === m;
|
|
5217
|
+
ar(w.user.access_token) && (console.warn("Access token expired for account:", m), oa(m)), le(m), u(m), await n(w.user), i && await i.setAccountsState(ee()), console.log(`✅ Switched to account: ${w.user.profile?.email || m}`), I ? v.current = null : (v.current = m, setTimeout(async () => {
|
|
5218
|
+
if (v.current === m) {
|
|
5219
|
+
const $ = pe().find((s) => s.accountId === m);
|
|
5220
|
+
$ && (le(m), u(m), await n($.user), i && await i.setAccountsState(ee())), v.current = null;
|
|
5221
|
+
}
|
|
5222
|
+
}, 100));
|
|
5223
|
+
} catch (p) {
|
|
5224
|
+
const w = p instanceof Error ? p.message : "Failed to switch account";
|
|
5225
|
+
console.error(w, p), v.current = null;
|
|
5209
5226
|
}
|
|
5210
5227
|
},
|
|
5211
|
-
[
|
|
5212
|
-
),
|
|
5228
|
+
[n, i]
|
|
5229
|
+
), b = he(async () => {
|
|
5213
5230
|
try {
|
|
5214
|
-
if (console.log("🔄 Starting add new account flow..."), console.log("📦 Saving state flags to localStorage..."), r && aa(r), Wt(!0), localStorage.setItem("spry_add_account_pending", "1"), ia(window.location.href), console.log("🔄 Clearing SSO session..."), await ca(r || null, t), await new Promise((
|
|
5231
|
+
if (console.log("🔄 Starting add new account flow..."), console.log("📦 Saving state flags to localStorage..."), r && aa(r), Wt(!0), localStorage.setItem("spry_add_account_pending", "1"), ia(window.location.href), console.log("🔄 Clearing SSO session..."), await ca(r || null, t), await new Promise((m) => setTimeout(m, 1200)), console.log(Is.REDIRECT_IN_PROGRESS), o)
|
|
5215
5232
|
await o();
|
|
5216
5233
|
else {
|
|
5217
|
-
const
|
|
5218
|
-
await Qr(t,
|
|
5234
|
+
const m = `temp_add_${Date.now()}`;
|
|
5235
|
+
await Qr(t, m);
|
|
5219
5236
|
}
|
|
5220
|
-
} catch (
|
|
5221
|
-
const
|
|
5222
|
-
console.error(
|
|
5237
|
+
} catch (m) {
|
|
5238
|
+
const p = m instanceof Error ? m.message : "Failed to add new account";
|
|
5239
|
+
console.error(p, m), Wt(!1), Jr(), Xr(), localStorage.removeItem("spry_add_account_pending");
|
|
5223
5240
|
}
|
|
5224
|
-
}, [t, r]),
|
|
5225
|
-
async (
|
|
5241
|
+
}, [t, r]), C = he(
|
|
5242
|
+
async (m) => {
|
|
5226
5243
|
try {
|
|
5227
|
-
const
|
|
5228
|
-
if (!
|
|
5229
|
-
console.error(
|
|
5244
|
+
const w = pe().find(($) => $.accountId === m);
|
|
5245
|
+
if (!w) {
|
|
5246
|
+
console.error(ve.ACCOUNT_NOT_FOUND);
|
|
5230
5247
|
return;
|
|
5231
5248
|
}
|
|
5232
|
-
const
|
|
5233
|
-
|
|
5234
|
-
const
|
|
5235
|
-
|
|
5236
|
-
} catch (
|
|
5237
|
-
const
|
|
5238
|
-
console.error(
|
|
5249
|
+
const I = await la(w.user, t, m);
|
|
5250
|
+
I.success || console.warn("Keycloak logout failed, but account removed locally:", I.message);
|
|
5251
|
+
const k = ee();
|
|
5252
|
+
g(k), i && i.setAccountsState(k);
|
|
5253
|
+
} catch (p) {
|
|
5254
|
+
const w = p instanceof Error ? p.message : "Failed to remove account";
|
|
5255
|
+
console.error(w, p);
|
|
5239
5256
|
}
|
|
5240
5257
|
},
|
|
5241
|
-
[
|
|
5242
|
-
),
|
|
5243
|
-
async (
|
|
5258
|
+
[t, g, i]
|
|
5259
|
+
), _ = he(
|
|
5260
|
+
async (m) => {
|
|
5244
5261
|
try {
|
|
5245
|
-
const
|
|
5246
|
-
if (!
|
|
5247
|
-
console.error(
|
|
5262
|
+
const w = pe().find(($) => $.accountId === m);
|
|
5263
|
+
if (!w) {
|
|
5264
|
+
console.error(ve.ACCOUNT_NOT_FOUND);
|
|
5248
5265
|
return;
|
|
5249
5266
|
}
|
|
5250
5267
|
if (!await Xt(
|
|
5251
|
-
|
|
5252
|
-
|
|
5268
|
+
m,
|
|
5269
|
+
w.user,
|
|
5253
5270
|
t
|
|
5254
5271
|
)) {
|
|
5255
|
-
console.error(`No refreshed user returned for ${
|
|
5272
|
+
console.error(`No refreshed user returned for ${m}`);
|
|
5256
5273
|
return;
|
|
5257
5274
|
}
|
|
5258
|
-
const
|
|
5259
|
-
|
|
5260
|
-
} catch (
|
|
5261
|
-
const
|
|
5262
|
-
console.error(
|
|
5275
|
+
const k = ee();
|
|
5276
|
+
g(k), i && i.setAccountsState(k);
|
|
5277
|
+
} catch (p) {
|
|
5278
|
+
const w = p instanceof Error ? p.message : "Failed to refresh token";
|
|
5279
|
+
console.error(w, p);
|
|
5263
5280
|
}
|
|
5264
5281
|
},
|
|
5265
|
-
[
|
|
5282
|
+
[t, g, i]
|
|
5266
5283
|
);
|
|
5267
|
-
|
|
5268
|
-
const
|
|
5269
|
-
const
|
|
5270
|
-
...
|
|
5271
|
-
isStale: ks(
|
|
5284
|
+
de(() => {
|
|
5285
|
+
const m = () => {
|
|
5286
|
+
const p = c.map((I) => ({
|
|
5287
|
+
...I,
|
|
5288
|
+
isStale: ks(I)
|
|
5272
5289
|
}));
|
|
5273
|
-
|
|
5274
|
-
(
|
|
5275
|
-
) && (ea(
|
|
5290
|
+
p.some(
|
|
5291
|
+
(I, k) => I.isStale !== c[k]?.isStale
|
|
5292
|
+
) && (ea(p), l(p));
|
|
5276
5293
|
};
|
|
5277
|
-
|
|
5278
|
-
}, [
|
|
5279
|
-
const
|
|
5294
|
+
c.length > 0 && m();
|
|
5295
|
+
}, [c]);
|
|
5296
|
+
const A = f && c.find((m) => m.accountId === f) || null;
|
|
5280
5297
|
return {
|
|
5281
|
-
accounts:
|
|
5282
|
-
activeAccount:
|
|
5283
|
-
switchAccount:
|
|
5284
|
-
addNewAccount:
|
|
5285
|
-
removeAccount:
|
|
5286
|
-
refreshAccountToken:
|
|
5298
|
+
accounts: c,
|
|
5299
|
+
activeAccount: A,
|
|
5300
|
+
switchAccount: a,
|
|
5301
|
+
addNewAccount: b,
|
|
5302
|
+
removeAccount: C,
|
|
5303
|
+
refreshAccountToken: _
|
|
5287
5304
|
};
|
|
5288
5305
|
}
|
|
5289
5306
|
const ma = 2e3, Yt = /* @__PURE__ */ new Map();
|
|
@@ -5292,91 +5309,91 @@ function ha(e) {
|
|
|
5292
5309
|
if (Yt.has(e.bridgeUrl))
|
|
5293
5310
|
return Yt.get(e.bridgeUrl) || null;
|
|
5294
5311
|
const t = e.bridgeUrl, r = new URL(t).origin, n = e.timeoutMs ?? ma;
|
|
5295
|
-
let o = null, i = !1,
|
|
5312
|
+
let o = null, i = !1, c = null, l = null;
|
|
5296
5313
|
const f = /* @__PURE__ */ new Map(), u = () => {
|
|
5297
5314
|
o || (o = document.createElement("iframe"), o.src = t, o.title = "Spry Sync Bridge", o.style.width = "0", o.style.height = "0", o.style.border = "0", o.style.position = "absolute", o.style.left = "-9999px", o.style.top = "-9999px", o.setAttribute("aria-hidden", "true"), o.addEventListener("load", () => {
|
|
5298
5315
|
i = !0;
|
|
5299
5316
|
}), document.body.appendChild(o));
|
|
5300
|
-
},
|
|
5317
|
+
}, y = () => (u(), i ? Promise.resolve() : c || (c = new Promise((_, A) => {
|
|
5301
5318
|
if (!o) {
|
|
5302
|
-
|
|
5319
|
+
c = null, A(new Error("Bridge iframe not available"));
|
|
5303
5320
|
return;
|
|
5304
5321
|
}
|
|
5305
|
-
const
|
|
5322
|
+
const m = () => {
|
|
5306
5323
|
if (i = !0, d()) {
|
|
5307
|
-
|
|
5324
|
+
w(), _();
|
|
5308
5325
|
return;
|
|
5309
5326
|
}
|
|
5310
|
-
|
|
5327
|
+
w(), A(new Error("Bridge iframe did not load the expected origin"));
|
|
5311
5328
|
}, p = () => {
|
|
5312
|
-
|
|
5313
|
-
},
|
|
5314
|
-
o?.removeEventListener("load",
|
|
5329
|
+
w(), A(new Error("Bridge iframe failed to load"));
|
|
5330
|
+
}, w = () => {
|
|
5331
|
+
o?.removeEventListener("load", m), o?.removeEventListener("error", p), c = null;
|
|
5315
5332
|
};
|
|
5316
|
-
o.addEventListener("load",
|
|
5317
|
-
}),
|
|
5333
|
+
o.addEventListener("load", m), o.addEventListener("error", p);
|
|
5334
|
+
}), c)), d = () => {
|
|
5318
5335
|
if (!o || !o.contentWindow) return !1;
|
|
5319
5336
|
try {
|
|
5320
|
-
const
|
|
5321
|
-
return !
|
|
5337
|
+
const _ = o.contentWindow.location.href;
|
|
5338
|
+
return !_ || _ === "about:blank" ? !1 : _.startsWith(t);
|
|
5322
5339
|
} catch {
|
|
5323
5340
|
return !0;
|
|
5324
5341
|
}
|
|
5325
|
-
},
|
|
5326
|
-
if (
|
|
5327
|
-
const
|
|
5328
|
-
if (!
|
|
5329
|
-
const
|
|
5330
|
-
if (!
|
|
5331
|
-
const p = f.get(
|
|
5342
|
+
}, h = (_) => {
|
|
5343
|
+
if (_.origin !== r) return;
|
|
5344
|
+
const A = _.data;
|
|
5345
|
+
if (!A || typeof A != "object") return;
|
|
5346
|
+
const m = A.requestId;
|
|
5347
|
+
if (!m || typeof m != "string") return;
|
|
5348
|
+
const p = f.get(m);
|
|
5332
5349
|
if (p) {
|
|
5333
|
-
if (f.delete(
|
|
5334
|
-
p.reject(new Error(
|
|
5350
|
+
if (f.delete(m), window.clearTimeout(p.timeoutId), A.type === "ERROR") {
|
|
5351
|
+
p.reject(new Error(A.error || "Bridge error"));
|
|
5335
5352
|
return;
|
|
5336
5353
|
}
|
|
5337
|
-
p.resolve(
|
|
5354
|
+
p.resolve(A.payload ?? null);
|
|
5338
5355
|
}
|
|
5339
|
-
},
|
|
5340
|
-
const
|
|
5341
|
-
f.delete(
|
|
5356
|
+
}, v = (_, A, m) => m ? a(_, A) : b().then(() => a(_, A)), g = () => typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `${Date.now()}_${Math.random().toString(16).slice(2)}`, a = (_, A) => y().then(() => new Promise((m, p) => {
|
|
5357
|
+
const w = g(), I = window.setTimeout(() => {
|
|
5358
|
+
f.delete(w), p(new Error(`Bridge request timed out: ${_}`));
|
|
5342
5359
|
}, n);
|
|
5343
|
-
f.set(
|
|
5360
|
+
f.set(w, { resolve: m, reject: p, timeoutId: I });
|
|
5344
5361
|
try {
|
|
5345
|
-
o?.contentWindow?.postMessage({ type:
|
|
5362
|
+
o?.contentWindow?.postMessage({ type: _, requestId: w, payload: A }, "*");
|
|
5346
5363
|
} catch {
|
|
5347
|
-
f.delete(
|
|
5364
|
+
f.delete(w), window.clearTimeout(I), p(new Error("Bridge postMessage failed"));
|
|
5348
5365
|
}
|
|
5349
|
-
})),
|
|
5350
|
-
}).catch((
|
|
5351
|
-
throw l = null,
|
|
5366
|
+
})), b = () => l || (l = v("PING", null, !0).then(() => {
|
|
5367
|
+
}).catch((_) => {
|
|
5368
|
+
throw l = null, _;
|
|
5352
5369
|
}), l);
|
|
5353
|
-
window.addEventListener("message",
|
|
5354
|
-
const
|
|
5370
|
+
window.addEventListener("message", h);
|
|
5371
|
+
const C = {
|
|
5355
5372
|
getAccountsState: async () => {
|
|
5356
5373
|
try {
|
|
5357
|
-
const
|
|
5358
|
-
return !
|
|
5359
|
-
accounts:
|
|
5360
|
-
activeAccountId:
|
|
5361
|
-
lastUpdated: Number(
|
|
5374
|
+
const _ = await v("GET_ACCOUNTS");
|
|
5375
|
+
return !_ || !Array.isArray(_.accounts) ? null : {
|
|
5376
|
+
accounts: _.accounts,
|
|
5377
|
+
activeAccountId: _.activeAccountId ?? null,
|
|
5378
|
+
lastUpdated: Number(_.lastUpdated) || 0
|
|
5362
5379
|
};
|
|
5363
|
-
} catch (
|
|
5364
|
-
return console.warn("Sync bridge unavailable for GET_ACCOUNTS:",
|
|
5380
|
+
} catch (_) {
|
|
5381
|
+
return console.warn("Sync bridge unavailable for GET_ACCOUNTS:", _), null;
|
|
5365
5382
|
}
|
|
5366
5383
|
},
|
|
5367
|
-
setAccountsState: async (
|
|
5384
|
+
setAccountsState: async (_) => {
|
|
5368
5385
|
try {
|
|
5369
|
-
await
|
|
5370
|
-
accounts:
|
|
5371
|
-
activeAccountId:
|
|
5372
|
-
lastUpdated:
|
|
5386
|
+
await v("SET_ACCOUNTS", {
|
|
5387
|
+
accounts: _.accounts,
|
|
5388
|
+
activeAccountId: _.activeAccountId ?? null,
|
|
5389
|
+
lastUpdated: _.lastUpdated ?? Date.now()
|
|
5373
5390
|
});
|
|
5374
|
-
} catch (
|
|
5375
|
-
console.warn("Sync bridge unavailable for SET_ACCOUNTS:",
|
|
5391
|
+
} catch (A) {
|
|
5392
|
+
console.warn("Sync bridge unavailable for SET_ACCOUNTS:", A);
|
|
5376
5393
|
}
|
|
5377
5394
|
}
|
|
5378
5395
|
};
|
|
5379
|
-
return Yt.set(t,
|
|
5396
|
+
return Yt.set(t, C), C;
|
|
5380
5397
|
}
|
|
5381
5398
|
function ga(e) {
|
|
5382
5399
|
if (e)
|
|
@@ -5398,65 +5415,65 @@ function Zr(e) {
|
|
|
5398
5415
|
});
|
|
5399
5416
|
}
|
|
5400
5417
|
function Ma() {
|
|
5401
|
-
const e = _n(), { keycloakConfig: t, userManager: r, syncBridgeUrl: n } = Qs(), o =
|
|
5418
|
+
const e = _n(), { keycloakConfig: t, userManager: r, syncBridgeUrl: n } = Qs(), o = be(!1), i = qe(
|
|
5402
5419
|
() => ha(n ? { bridgeUrl: n } : null),
|
|
5403
5420
|
[n]
|
|
5404
|
-
),
|
|
5421
|
+
), c = pa({
|
|
5405
5422
|
keycloakConfig: t,
|
|
5406
5423
|
initialUser: ga(e.user),
|
|
5407
5424
|
signinRedirect: e.signinRedirect,
|
|
5408
5425
|
syncBridge: i,
|
|
5409
5426
|
onAccountSwitch: async (f) => {
|
|
5410
5427
|
let u = f;
|
|
5411
|
-
const
|
|
5412
|
-
if (
|
|
5413
|
-
const
|
|
5414
|
-
|
|
5428
|
+
const y = pe(), d = f.profile?.sub, h = f.profile?.email, v = y.find((a) => d && a.user.profile?.sub ? a.user.profile.sub === d : h && a.user.profile?.email ? a.user.profile.email === h : !1);
|
|
5429
|
+
if (v && f.refresh_token) {
|
|
5430
|
+
const a = await Xt(
|
|
5431
|
+
v.accountId,
|
|
5415
5432
|
f,
|
|
5416
5433
|
t
|
|
5417
5434
|
);
|
|
5418
|
-
|
|
5435
|
+
a && (u = a);
|
|
5419
5436
|
}
|
|
5420
|
-
const
|
|
5421
|
-
await r.storeUser(
|
|
5437
|
+
const g = Zr(u);
|
|
5438
|
+
await r.storeUser(g), await r.events.load(g), window.dispatchEvent(
|
|
5422
5439
|
new CustomEvent("auth:account-switched", {
|
|
5423
5440
|
detail: { user: u }
|
|
5424
5441
|
})
|
|
5425
5442
|
);
|
|
5426
5443
|
}
|
|
5427
5444
|
});
|
|
5428
|
-
|
|
5445
|
+
de(() => {
|
|
5429
5446
|
if (o.current || e.isAuthenticated || e.isLoading || e.activeNavigator) return;
|
|
5430
5447
|
const f = ta();
|
|
5431
5448
|
if (!f) return;
|
|
5432
5449
|
o.current = !0, (async () => {
|
|
5433
|
-
let
|
|
5434
|
-
if (
|
|
5435
|
-
const
|
|
5450
|
+
let y = f.user;
|
|
5451
|
+
if (y.refresh_token) {
|
|
5452
|
+
const h = await Xt(
|
|
5436
5453
|
f.accountId,
|
|
5437
|
-
|
|
5454
|
+
y,
|
|
5438
5455
|
t
|
|
5439
5456
|
);
|
|
5440
|
-
|
|
5457
|
+
h && (y = h);
|
|
5441
5458
|
}
|
|
5442
|
-
const d = Zr(
|
|
5459
|
+
const d = Zr(y);
|
|
5443
5460
|
await r.storeUser(d), await r.events.load(d);
|
|
5444
|
-
})().catch((
|
|
5445
|
-
console.log("Restore from stored account failed:",
|
|
5461
|
+
})().catch((y) => {
|
|
5462
|
+
console.log("Restore from stored account failed:", y);
|
|
5446
5463
|
});
|
|
5447
|
-
}, [
|
|
5448
|
-
const l =
|
|
5464
|
+
}, [c.accounts.length, e, t, r]);
|
|
5465
|
+
const l = he(
|
|
5449
5466
|
async (f) => {
|
|
5450
|
-
await
|
|
5467
|
+
await c.removeAccount(f), ra() || await r.removeUser();
|
|
5451
5468
|
},
|
|
5452
|
-
[
|
|
5469
|
+
[c, r]
|
|
5453
5470
|
);
|
|
5454
5471
|
return qe(
|
|
5455
5472
|
() => ({
|
|
5456
|
-
...
|
|
5473
|
+
...c,
|
|
5457
5474
|
removeAccount: l
|
|
5458
5475
|
}),
|
|
5459
|
-
[
|
|
5476
|
+
[c, l]
|
|
5460
5477
|
);
|
|
5461
5478
|
}
|
|
5462
5479
|
function Fa() {
|
|
@@ -5470,14 +5487,14 @@ function ya({
|
|
|
5470
5487
|
refetchInterval: o,
|
|
5471
5488
|
cacheTime: i
|
|
5472
5489
|
}) {
|
|
5473
|
-
const { apps:
|
|
5490
|
+
const { apps: c, isLoading: l, error: f, refetch: u } = Kn(e, {
|
|
5474
5491
|
refetchInterval: o,
|
|
5475
5492
|
cacheTime: i
|
|
5476
5493
|
});
|
|
5477
5494
|
return /* @__PURE__ */ x(
|
|
5478
5495
|
Wn,
|
|
5479
5496
|
{
|
|
5480
|
-
apps:
|
|
5497
|
+
apps: c,
|
|
5481
5498
|
open: t,
|
|
5482
5499
|
onClose: r,
|
|
5483
5500
|
buttonRef: n,
|
|
@@ -5491,11 +5508,11 @@ export {
|
|
|
5491
5508
|
An as AccountList,
|
|
5492
5509
|
Wn as AppsDropdown,
|
|
5493
5510
|
ya as AppsDropdownConnected,
|
|
5494
|
-
|
|
5511
|
+
ve as ERROR_MESSAGES,
|
|
5495
5512
|
Is as INFO_MESSAGES,
|
|
5496
5513
|
Ns as ProfileMenu,
|
|
5497
5514
|
Ms as ProfileMenuConnected,
|
|
5498
|
-
|
|
5515
|
+
ye as STORAGE_KEYS,
|
|
5499
5516
|
$s as SYNC_BRIDGE_URL,
|
|
5500
5517
|
ka as SpryAuthProvider,
|
|
5501
5518
|
Rt as TOKEN_VALIDATION,
|
|
@@ -5509,8 +5526,8 @@ export {
|
|
|
5509
5526
|
ya as default,
|
|
5510
5527
|
He as extractUserInfo,
|
|
5511
5528
|
Na as getAccountMetadata,
|
|
5512
|
-
|
|
5513
|
-
|
|
5529
|
+
pe as getAccounts,
|
|
5530
|
+
ee as getAccountsState,
|
|
5514
5531
|
ta as getActiveAccount,
|
|
5515
5532
|
ra as getActiveAccountId,
|
|
5516
5533
|
sa as getReturnUrl,
|
|
@@ -5530,7 +5547,7 @@ export {
|
|
|
5530
5547
|
ea as saveAccounts,
|
|
5531
5548
|
Ve as saveAccountsState,
|
|
5532
5549
|
aa as saveTempCurrentUser,
|
|
5533
|
-
|
|
5550
|
+
le as setActiveAccount,
|
|
5534
5551
|
Wt as setAddAccountInProgress,
|
|
5535
5552
|
ia as setReturnUrl,
|
|
5536
5553
|
Ra as shouldRefreshAccessToken,
|