spry-apps-dropdown 3.0.0 → 3.0.1
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 +3 -6
- package/dist/SpryAuthProvider.d.ts +1 -2
- package/dist/constants.d.ts +5 -0
- package/dist/index.cjs +11 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +389 -389
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ function Wn({
|
|
|
17
17
|
onRetry: s,
|
|
18
18
|
excludeAppId: l
|
|
19
19
|
}) {
|
|
20
|
-
const
|
|
20
|
+
const f = Ee(null), [u, g] = me("64px"), d = () => {
|
|
21
21
|
const b = window.location.origin;
|
|
22
22
|
return e.find((c) => c.url.startsWith(b))?.id;
|
|
23
23
|
}, m = e.filter((b) => {
|
|
@@ -32,7 +32,7 @@ function Wn({
|
|
|
32
32
|
}
|
|
33
33
|
}, [t, n]), ye(() => {
|
|
34
34
|
const b = (c) => {
|
|
35
|
-
|
|
35
|
+
f.current && !f.current.contains(c.target) && n?.current && !n.current.contains(c.target) && r();
|
|
36
36
|
};
|
|
37
37
|
return t && document.addEventListener("mousedown", b), () => {
|
|
38
38
|
document.removeEventListener("mousedown", b);
|
|
@@ -44,7 +44,7 @@ function Wn({
|
|
|
44
44
|
return /* @__PURE__ */ x(Dn, { children: t && /* @__PURE__ */ x(
|
|
45
45
|
Ln.div,
|
|
46
46
|
{
|
|
47
|
-
ref:
|
|
47
|
+
ref: f,
|
|
48
48
|
initial: {
|
|
49
49
|
opacity: 0,
|
|
50
50
|
scaleX: 0.6,
|
|
@@ -69,7 +69,7 @@ function Wn({
|
|
|
69
69
|
},
|
|
70
70
|
style: {
|
|
71
71
|
position: "absolute",
|
|
72
|
-
top:
|
|
72
|
+
top: u,
|
|
73
73
|
right: "16px",
|
|
74
74
|
zIndex: 1e3,
|
|
75
75
|
transformOrigin: "top right"
|
|
@@ -226,7 +226,7 @@ function Kn(e, t = {}) {
|
|
|
226
226
|
const {
|
|
227
227
|
refetchInterval: r = Gn,
|
|
228
228
|
cacheTime: n = Yn
|
|
229
|
-
} = t, [o, i] = me([]), [s, l] = me(!0), [
|
|
229
|
+
} = t, [o, i] = me([]), [s, l] = me(!0), [f, u] = me(null), g = Ee(null), d = Ee(null), m = pe(() => {
|
|
230
230
|
try {
|
|
231
231
|
const c = localStorage.getItem($t);
|
|
232
232
|
if (!c) return null;
|
|
@@ -248,7 +248,7 @@ function Kn(e, t = {}) {
|
|
|
248
248
|
}, []), b = pe(async () => {
|
|
249
249
|
d.current && d.current.abort(), d.current = new AbortController();
|
|
250
250
|
try {
|
|
251
|
-
l(!0),
|
|
251
|
+
l(!0), u(null);
|
|
252
252
|
const c = await fetch(`${e}/api/apps`, {
|
|
253
253
|
signal: d.current.signal,
|
|
254
254
|
headers: {
|
|
@@ -258,12 +258,12 @@ function Kn(e, t = {}) {
|
|
|
258
258
|
if (!c.ok)
|
|
259
259
|
throw new Error(`HTTP error! status: ${c.status}`);
|
|
260
260
|
const v = await c.json();
|
|
261
|
-
i(v.apps), w(v.apps),
|
|
261
|
+
i(v.apps), w(v.apps), u(null);
|
|
262
262
|
} catch (c) {
|
|
263
263
|
if (c instanceof Error && c.name === "AbortError")
|
|
264
264
|
return;
|
|
265
265
|
const v = c instanceof Error ? c.message : "Failed to fetch apps";
|
|
266
|
-
|
|
266
|
+
u(v), console.error("Error fetching apps:", c);
|
|
267
267
|
const A = m();
|
|
268
268
|
A && i(A);
|
|
269
269
|
} finally {
|
|
@@ -280,7 +280,7 @@ function Kn(e, t = {}) {
|
|
|
280
280
|
}, [e, r, n]), {
|
|
281
281
|
apps: o,
|
|
282
282
|
isLoading: s,
|
|
283
|
-
error:
|
|
283
|
+
error: f,
|
|
284
284
|
refetch: b
|
|
285
285
|
};
|
|
286
286
|
}
|
|
@@ -292,7 +292,7 @@ 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"), s = /* @__PURE__ */ Symbol.for("react.context"), l = /* @__PURE__ */ Symbol.for("react.forward_ref"),
|
|
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"), s = /* @__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"), g = /* @__PURE__ */ Symbol.for("react.memo"), d = /* @__PURE__ */ Symbol.for("react.lazy"), m = /* @__PURE__ */ Symbol.for("react.view_transition"), w = /* @__PURE__ */ Symbol.for("react.client.reference");
|
|
296
296
|
function b(c) {
|
|
297
297
|
if (typeof c == "object" && c !== null) {
|
|
298
298
|
var v = c.$$typeof;
|
|
@@ -302,8 +302,8 @@ function qn() {
|
|
|
302
302
|
case r:
|
|
303
303
|
case o:
|
|
304
304
|
case n:
|
|
305
|
-
case u:
|
|
306
305
|
case f:
|
|
306
|
+
case u:
|
|
307
307
|
case m:
|
|
308
308
|
return c;
|
|
309
309
|
default:
|
|
@@ -324,7 +324,7 @@ function qn() {
|
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
|
-
return K.ContextConsumer = i, K.ContextProvider = s, K.Element = e, K.ForwardRef = l, K.Fragment = r, K.Lazy = d, K.Memo = g, K.Portal = t, K.Profiler = o, K.StrictMode = n, K.Suspense =
|
|
327
|
+
return K.ContextConsumer = i, K.ContextProvider = s, K.Element = e, K.ForwardRef = l, K.Fragment = r, K.Lazy = d, K.Memo = g, K.Portal = t, K.Profiler = o, K.StrictMode = n, K.Suspense = f, K.SuspenseList = u, K.isContextConsumer = function(c) {
|
|
328
328
|
return b(c) === i;
|
|
329
329
|
}, K.isContextProvider = function(c) {
|
|
330
330
|
return b(c) === s;
|
|
@@ -345,11 +345,11 @@ function qn() {
|
|
|
345
345
|
}, K.isStrictMode = function(c) {
|
|
346
346
|
return b(c) === n;
|
|
347
347
|
}, K.isSuspense = function(c) {
|
|
348
|
-
return b(c) === u;
|
|
349
|
-
}, K.isSuspenseList = function(c) {
|
|
350
348
|
return b(c) === f;
|
|
349
|
+
}, K.isSuspenseList = function(c) {
|
|
350
|
+
return b(c) === u;
|
|
351
351
|
}, K.isValidElementType = function(c) {
|
|
352
|
-
return typeof c == "string" || typeof c == "function" || c === r || c === o || c === n || c ===
|
|
352
|
+
return typeof c == "string" || typeof c == "function" || c === r || c === o || c === n || c === f || c === u || typeof c == "object" && c !== null && (c.$$typeof === d || c.$$typeof === g || c.$$typeof === s || c.$$typeof === i || c.$$typeof === l || c.$$typeof === w || c.getModuleId !== void 0);
|
|
353
353
|
}, K.typeOf = b, K;
|
|
354
354
|
}
|
|
355
355
|
var H = {};
|
|
@@ -365,14 +365,14 @@ function Jn() {
|
|
|
365
365
|
case n:
|
|
366
366
|
case i:
|
|
367
367
|
case o:
|
|
368
|
-
case
|
|
368
|
+
case u:
|
|
369
369
|
case g:
|
|
370
370
|
case w:
|
|
371
371
|
return c;
|
|
372
372
|
default:
|
|
373
373
|
switch (c = c && c.$$typeof, c) {
|
|
374
374
|
case l:
|
|
375
|
-
case
|
|
375
|
+
case f:
|
|
376
376
|
case m:
|
|
377
377
|
case d:
|
|
378
378
|
return c;
|
|
@@ -387,15 +387,15 @@ function Jn() {
|
|
|
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"), s = /* @__PURE__ */ Symbol.for("react.consumer"), l = /* @__PURE__ */ Symbol.for("react.context"),
|
|
391
|
-
H.ContextConsumer = s, H.ContextProvider = l, H.Element = t, H.ForwardRef =
|
|
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"), s = /* @__PURE__ */ Symbol.for("react.consumer"), l = /* @__PURE__ */ Symbol.for("react.context"), f = /* @__PURE__ */ Symbol.for("react.forward_ref"), u = /* @__PURE__ */ Symbol.for("react.suspense"), g = /* @__PURE__ */ Symbol.for("react.suspense_list"), d = /* @__PURE__ */ Symbol.for("react.memo"), m = /* @__PURE__ */ Symbol.for("react.lazy"), w = /* @__PURE__ */ Symbol.for("react.view_transition"), b = /* @__PURE__ */ Symbol.for("react.client.reference");
|
|
391
|
+
H.ContextConsumer = s, H.ContextProvider = l, H.Element = t, H.ForwardRef = f, H.Fragment = n, H.Lazy = m, H.Memo = d, H.Portal = r, H.Profiler = i, H.StrictMode = o, H.Suspense = u, H.SuspenseList = g, H.isContextConsumer = function(c) {
|
|
392
392
|
return e(c) === s;
|
|
393
393
|
}, H.isContextProvider = function(c) {
|
|
394
394
|
return e(c) === l;
|
|
395
395
|
}, H.isElement = function(c) {
|
|
396
396
|
return typeof c == "object" && c !== null && c.$$typeof === t;
|
|
397
397
|
}, H.isForwardRef = function(c) {
|
|
398
|
-
return e(c) ===
|
|
398
|
+
return e(c) === f;
|
|
399
399
|
}, H.isFragment = function(c) {
|
|
400
400
|
return e(c) === n;
|
|
401
401
|
}, H.isLazy = function(c) {
|
|
@@ -409,11 +409,11 @@ function Jn() {
|
|
|
409
409
|
}, H.isStrictMode = function(c) {
|
|
410
410
|
return e(c) === o;
|
|
411
411
|
}, H.isSuspense = function(c) {
|
|
412
|
-
return e(c) ===
|
|
412
|
+
return e(c) === u;
|
|
413
413
|
}, H.isSuspenseList = function(c) {
|
|
414
414
|
return e(c) === g;
|
|
415
415
|
}, H.isValidElementType = function(c) {
|
|
416
|
-
return typeof c == "string" || typeof c == "function" || c === n || c === i || c === o || c ===
|
|
416
|
+
return typeof c == "string" || typeof c == "function" || c === n || c === i || c === o || c === u || c === g || typeof c == "object" && c !== null && (c.$$typeof === m || c.$$typeof === d || c.$$typeof === l || c.$$typeof === s || c.$$typeof === f || c.$$typeof === b || c.getModuleId !== void 0);
|
|
417
417
|
}, H.typeOf = e;
|
|
418
418
|
})()), H;
|
|
419
419
|
}
|
|
@@ -452,15 +452,15 @@ var Sr;
|
|
|
452
452
|
function Qn() {
|
|
453
453
|
if (Sr) return W;
|
|
454
454
|
Sr = 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, s = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, l = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110,
|
|
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, s = 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, g = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, d = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, m = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, w = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, b = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, c = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, v = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, A = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, C = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
456
456
|
function y(p) {
|
|
457
457
|
if (typeof p == "object" && p !== null) {
|
|
458
458
|
var T = p.$$typeof;
|
|
459
459
|
switch (T) {
|
|
460
460
|
case t:
|
|
461
461
|
switch (p = p.type, p) {
|
|
462
|
-
case u:
|
|
463
462
|
case f:
|
|
463
|
+
case u:
|
|
464
464
|
case n:
|
|
465
465
|
case i:
|
|
466
466
|
case o:
|
|
@@ -484,10 +484,10 @@ function Qn() {
|
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
function h(p) {
|
|
487
|
-
return y(p) ===
|
|
487
|
+
return y(p) === u;
|
|
488
488
|
}
|
|
489
|
-
return W.AsyncMode =
|
|
490
|
-
return h(p) || y(p) ===
|
|
489
|
+
return W.AsyncMode = f, W.ConcurrentMode = u, W.ContextConsumer = l, W.ContextProvider = s, W.Element = t, W.ForwardRef = g, W.Fragment = n, W.Lazy = b, W.Memo = w, W.Portal = r, W.Profiler = i, W.StrictMode = o, W.Suspense = d, W.isAsyncMode = function(p) {
|
|
490
|
+
return h(p) || y(p) === f;
|
|
491
491
|
}, W.isConcurrentMode = h, W.isContextConsumer = function(p) {
|
|
492
492
|
return y(p) === l;
|
|
493
493
|
}, W.isContextProvider = function(p) {
|
|
@@ -511,17 +511,17 @@ function Qn() {
|
|
|
511
511
|
}, W.isSuspense = function(p) {
|
|
512
512
|
return y(p) === d;
|
|
513
513
|
}, W.isValidElementType = function(p) {
|
|
514
|
-
return typeof p == "string" || typeof p == "function" || p === n || p ===
|
|
514
|
+
return typeof p == "string" || typeof p == "function" || p === n || p === u || p === i || p === o || p === d || p === m || typeof p == "object" && p !== null && (p.$$typeof === b || p.$$typeof === w || p.$$typeof === s || p.$$typeof === l || p.$$typeof === g || p.$$typeof === v || p.$$typeof === A || p.$$typeof === C || p.$$typeof === c);
|
|
515
515
|
}, W.typeOf = y, 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, s = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, l = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110,
|
|
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, s = 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, g = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, d = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, m = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, w = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, b = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, c = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, v = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, A = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, C = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
522
522
|
function y(_) {
|
|
523
523
|
return typeof _ == "string" || typeof _ == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
524
|
-
_ === n || _ ===
|
|
524
|
+
_ === n || _ === u || _ === i || _ === o || _ === d || _ === m || typeof _ == "object" && _ !== null && (_.$$typeof === b || _.$$typeof === w || _.$$typeof === s || _.$$typeof === l || _.$$typeof === g || _.$$typeof === v || _.$$typeof === A || _.$$typeof === C || _.$$typeof === c);
|
|
525
525
|
}
|
|
526
526
|
function h(_) {
|
|
527
527
|
if (typeof _ == "object" && _ !== null) {
|
|
@@ -530,8 +530,8 @@ function Zn() {
|
|
|
530
530
|
case t:
|
|
531
531
|
var rt = _.type;
|
|
532
532
|
switch (rt) {
|
|
533
|
-
case u:
|
|
534
533
|
case f:
|
|
534
|
+
case u:
|
|
535
535
|
case n:
|
|
536
536
|
case i:
|
|
537
537
|
case o:
|
|
@@ -555,12 +555,12 @@ function Zn() {
|
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
|
-
var p =
|
|
558
|
+
var p = f, T = u, P = l, z = s, I = t, a = g, O = n, V = b, j = w, ae = r, oe = i, ce = o, Se = d, tt = !1;
|
|
559
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(_) || h(_) ===
|
|
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(_) || h(_) === f;
|
|
561
561
|
}
|
|
562
562
|
function E(_) {
|
|
563
|
-
return h(_) ===
|
|
563
|
+
return h(_) === u;
|
|
564
564
|
}
|
|
565
565
|
function R(_) {
|
|
566
566
|
return h(_) === l;
|
|
@@ -621,31 +621,31 @@ function eo() {
|
|
|
621
621
|
return !1;
|
|
622
622
|
for (var s = {}, l = 0; l < 10; l++)
|
|
623
623
|
s["_" + String.fromCharCode(l)] = l;
|
|
624
|
-
var
|
|
624
|
+
var f = Object.getOwnPropertyNames(s).map(function(g) {
|
|
625
625
|
return s[g];
|
|
626
626
|
});
|
|
627
|
-
if (
|
|
627
|
+
if (f.join("") !== "0123456789")
|
|
628
628
|
return !1;
|
|
629
|
-
var
|
|
629
|
+
var u = {};
|
|
630
630
|
return "abcdefghijklmnopqrst".split("").forEach(function(g) {
|
|
631
|
-
|
|
632
|
-
}), Object.keys(Object.assign({},
|
|
631
|
+
u[g] = g;
|
|
632
|
+
}), Object.keys(Object.assign({}, u)).join("") === "abcdefghijklmnopqrst";
|
|
633
633
|
} catch {
|
|
634
634
|
return !1;
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
637
|
return kt = o() ? Object.assign : function(i, s) {
|
|
638
|
-
for (var l,
|
|
638
|
+
for (var l, f = n(i), u, g = 1; g < arguments.length; g++) {
|
|
639
639
|
l = Object(arguments[g]);
|
|
640
640
|
for (var d in l)
|
|
641
|
-
t.call(l, d) && (
|
|
641
|
+
t.call(l, d) && (f[d] = l[d]);
|
|
642
642
|
if (e) {
|
|
643
|
-
|
|
644
|
-
for (var m = 0; m <
|
|
645
|
-
r.call(l,
|
|
643
|
+
u = e(l);
|
|
644
|
+
for (var m = 0; m < u.length; m++)
|
|
645
|
+
r.call(l, u[m]) && (f[u[m]] = l[u[m]]);
|
|
646
646
|
}
|
|
647
647
|
}
|
|
648
|
-
return
|
|
648
|
+
return f;
|
|
649
649
|
}, kt;
|
|
650
650
|
}
|
|
651
651
|
var Pt, Ar;
|
|
@@ -676,7 +676,7 @@ function to() {
|
|
|
676
676
|
}
|
|
677
677
|
};
|
|
678
678
|
}
|
|
679
|
-
function o(i, s, l,
|
|
679
|
+
function o(i, s, l, f, u) {
|
|
680
680
|
if (process.env.NODE_ENV !== "production") {
|
|
681
681
|
for (var g in i)
|
|
682
682
|
if (n(i, g)) {
|
|
@@ -684,19 +684,19 @@ function to() {
|
|
|
684
684
|
try {
|
|
685
685
|
if (typeof i[g] != "function") {
|
|
686
686
|
var m = Error(
|
|
687
|
-
(
|
|
687
|
+
(f || "React class") + ": " + l + " type `" + g + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[g] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
688
688
|
);
|
|
689
689
|
throw m.name = "Invariant Violation", m;
|
|
690
690
|
}
|
|
691
|
-
d = i[g](s, g,
|
|
691
|
+
d = i[g](s, g, f, l, null, t);
|
|
692
692
|
} catch (b) {
|
|
693
693
|
d = b;
|
|
694
694
|
}
|
|
695
695
|
if (d && !(d instanceof Error) && e(
|
|
696
|
-
(
|
|
696
|
+
(f || "React class") + ": type specification of " + l + " `" + g + "` 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 w =
|
|
699
|
+
var w = u ? u() : "";
|
|
700
700
|
e(
|
|
701
701
|
"Failed " + l + " type: " + d.message + (w ?? "")
|
|
702
702
|
);
|
|
@@ -715,20 +715,20 @@ function ro() {
|
|
|
715
715
|
var e = nn(), t = eo(), r = /* @__PURE__ */ Zt(), n = /* @__PURE__ */ on(), o = /* @__PURE__ */ to(), i = function() {
|
|
716
716
|
};
|
|
717
717
|
process.env.NODE_ENV !== "production" && (i = function(l) {
|
|
718
|
-
var
|
|
719
|
-
typeof console < "u" && console.error(
|
|
718
|
+
var f = "Warning: " + l;
|
|
719
|
+
typeof console < "u" && console.error(f);
|
|
720
720
|
try {
|
|
721
|
-
throw new Error(
|
|
721
|
+
throw new Error(f);
|
|
722
722
|
} catch {
|
|
723
723
|
}
|
|
724
724
|
});
|
|
725
725
|
function s() {
|
|
726
726
|
return null;
|
|
727
727
|
}
|
|
728
|
-
return Dt = function(l,
|
|
729
|
-
var
|
|
728
|
+
return Dt = function(l, f) {
|
|
729
|
+
var u = typeof Symbol == "function" && Symbol.iterator, g = "@@iterator";
|
|
730
730
|
function d(E) {
|
|
731
|
-
var R = E && (
|
|
731
|
+
var R = E && (u && E[u] || E[g]);
|
|
732
732
|
if (typeof R == "function")
|
|
733
733
|
return R;
|
|
734
734
|
}
|
|
@@ -765,7 +765,7 @@ function ro() {
|
|
|
765
765
|
var R = {}, D = 0;
|
|
766
766
|
function N(L, k, U, M, Y, F, se) {
|
|
767
767
|
if (M = M || m, F = F || U, se !== r) {
|
|
768
|
-
if (
|
|
768
|
+
if (f) {
|
|
769
769
|
var _ = 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
|
);
|
|
@@ -1039,7 +1039,7 @@ function no() {
|
|
|
1039
1039
|
function r() {
|
|
1040
1040
|
}
|
|
1041
1041
|
return r.resetWarningCache = t, Lt = function() {
|
|
1042
|
-
function n(s, l,
|
|
1042
|
+
function n(s, l, f, u, g, d) {
|
|
1043
1043
|
if (d !== e) {
|
|
1044
1044
|
var m = 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"
|
|
@@ -1146,8 +1146,8 @@ function Ht(e, t) {
|
|
|
1146
1146
|
};
|
|
1147
1147
|
for (const l in i)
|
|
1148
1148
|
if (Object.prototype.hasOwnProperty.call(i, l)) {
|
|
1149
|
-
const
|
|
1150
|
-
r[o][
|
|
1149
|
+
const f = l;
|
|
1150
|
+
r[o][f] = Ht(i[f], s[f]);
|
|
1151
1151
|
}
|
|
1152
1152
|
}
|
|
1153
1153
|
} else r[o] === void 0 && (r[o] = e[o]);
|
|
@@ -1159,9 +1159,9 @@ function ao(e, t, r = void 0) {
|
|
|
1159
1159
|
for (const o in e) {
|
|
1160
1160
|
const i = e[o];
|
|
1161
1161
|
let s = "", l = !0;
|
|
1162
|
-
for (let
|
|
1163
|
-
const
|
|
1164
|
-
|
|
1162
|
+
for (let f = 0; f < i.length; f += 1) {
|
|
1163
|
+
const u = i[f];
|
|
1164
|
+
u && (s += (l === !0 ? "" : " ") + t(u), l = !1, r && r[u] && (s += " " + r[u]));
|
|
1165
1165
|
}
|
|
1166
1166
|
n[o] = s;
|
|
1167
1167
|
}
|
|
@@ -1259,8 +1259,8 @@ function yo(e) {
|
|
|
1259
1259
|
const t = (i, s) => i.replace("@media", s ? `@container ${s}` : "@container");
|
|
1260
1260
|
function r(i, s) {
|
|
1261
1261
|
i.up = (...l) => t(e.breakpoints.up(...l), s), i.down = (...l) => t(e.breakpoints.down(...l), s), i.between = (...l) => t(e.breakpoints.between(...l), s), i.only = (...l) => t(e.breakpoints.only(...l), s), i.not = (...l) => {
|
|
1262
|
-
const
|
|
1263
|
-
return
|
|
1262
|
+
const f = t(e.breakpoints.not(...l), s);
|
|
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
|
}
|
|
1266
1266
|
const n = {}, o = (i) => (r(n, i), n);
|
|
@@ -1297,20 +1297,20 @@ function Te(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((s, l,
|
|
1300
|
+
return t.reduce((s, l, f) => (s[i.up(i.keys[f])] = r(t[f]), s), {});
|
|
1301
1301
|
}
|
|
1302
1302
|
if (typeof t == "object") {
|
|
1303
1303
|
const i = n.breakpoints || kr;
|
|
1304
1304
|
return Object.keys(t).reduce((s, l) => {
|
|
1305
1305
|
if (ho(i.keys, l)) {
|
|
1306
|
-
const
|
|
1307
|
-
|
|
1306
|
+
const f = go(n.containerQueries ? n : bo, l);
|
|
1307
|
+
f && (s[f] = r(t[l], l));
|
|
1308
1308
|
} else if (Object.keys(i.values || yt).includes(l)) {
|
|
1309
|
-
const
|
|
1310
|
-
s[
|
|
1309
|
+
const f = i.up(l);
|
|
1310
|
+
s[f] = r(t[l], l);
|
|
1311
1311
|
} else {
|
|
1312
|
-
const
|
|
1313
|
-
s[
|
|
1312
|
+
const f = l;
|
|
1313
|
+
s[f] = t[f];
|
|
1314
1314
|
}
|
|
1315
1315
|
return s;
|
|
1316
1316
|
}, {});
|
|
@@ -1352,10 +1352,10 @@ function ee(e) {
|
|
|
1352
1352
|
} = e, i = (s) => {
|
|
1353
1353
|
if (s[t] == null)
|
|
1354
1354
|
return null;
|
|
1355
|
-
const l = s[t],
|
|
1355
|
+
const l = s[t], f = s.theme, u = bt(f, n) || {};
|
|
1356
1356
|
return Te(s, l, (d) => {
|
|
1357
|
-
let m = mt(
|
|
1358
|
-
return d === m && typeof d == "string" && (m = mt(
|
|
1357
|
+
let m = mt(u, o, d);
|
|
1358
|
+
return d === m && typeof d == "string" && (m = mt(u, o, `${t}${d === "default" ? "" : Ue(d)}`, d)), r === !1 ? m : {
|
|
1359
1359
|
[r]: m
|
|
1360
1360
|
};
|
|
1361
1361
|
});
|
|
@@ -1900,22 +1900,22 @@ function ii() {
|
|
|
1900
1900
|
[r]: n
|
|
1901
1901
|
};
|
|
1902
1902
|
const {
|
|
1903
|
-
cssProperty:
|
|
1904
|
-
themeKey:
|
|
1903
|
+
cssProperty: f = r,
|
|
1904
|
+
themeKey: u,
|
|
1905
1905
|
transform: g,
|
|
1906
1906
|
style: d
|
|
1907
1907
|
} = l;
|
|
1908
1908
|
if (n == null)
|
|
1909
1909
|
return null;
|
|
1910
|
-
if (
|
|
1910
|
+
if (u === "typography" && n === "inherit")
|
|
1911
1911
|
return {
|
|
1912
1912
|
[r]: n
|
|
1913
1913
|
};
|
|
1914
|
-
const m = bt(o,
|
|
1914
|
+
const m = bt(o, u) || {};
|
|
1915
1915
|
return d ? d(s) : Te(s, n, (b) => {
|
|
1916
1916
|
let c = mt(m, g, b);
|
|
1917
|
-
return b === c && typeof b == "string" && (c = mt(m, g, `${r}${b === "default" ? "" : Ue(b)}`, b)),
|
|
1918
|
-
[
|
|
1917
|
+
return b === c && typeof b == "string" && (c = mt(m, g, `${r}${b === "default" ? "" : Ue(b)}`, b)), f === !1 ? c : {
|
|
1918
|
+
[f]: c
|
|
1919
1919
|
};
|
|
1920
1920
|
});
|
|
1921
1921
|
}
|
|
@@ -1928,18 +1928,18 @@ function ii() {
|
|
|
1928
1928
|
if (!n)
|
|
1929
1929
|
return null;
|
|
1930
1930
|
const s = o.unstable_sxConfig ?? Tt;
|
|
1931
|
-
function l(
|
|
1932
|
-
let
|
|
1933
|
-
if (typeof
|
|
1934
|
-
|
|
1935
|
-
else if (typeof
|
|
1936
|
-
return
|
|
1937
|
-
if (!
|
|
1931
|
+
function l(f) {
|
|
1932
|
+
let u = f;
|
|
1933
|
+
if (typeof f == "function")
|
|
1934
|
+
u = f(o);
|
|
1935
|
+
else if (typeof f != "object")
|
|
1936
|
+
return f;
|
|
1937
|
+
if (!u)
|
|
1938
1938
|
return null;
|
|
1939
1939
|
const g = So(o.breakpoints), d = Object.keys(g);
|
|
1940
1940
|
let m = g;
|
|
1941
|
-
return Object.keys(
|
|
1942
|
-
const b = oi(
|
|
1941
|
+
return Object.keys(u).forEach((w) => {
|
|
1942
|
+
const b = oi(u[w], o);
|
|
1943
1943
|
if (b != null)
|
|
1944
1944
|
if (typeof b == "object")
|
|
1945
1945
|
if (s[w])
|
|
@@ -2097,8 +2097,8 @@ function ht(e, t, r) {
|
|
|
2097
2097
|
return fi(e, t, r);
|
|
2098
2098
|
}
|
|
2099
2099
|
}
|
|
2100
|
-
var
|
|
2101
|
-
return
|
|
2100
|
+
var f = r;
|
|
2101
|
+
return f;
|
|
2102
2102
|
}
|
|
2103
2103
|
function fi(e, t, r) {
|
|
2104
2104
|
var n = "";
|
|
@@ -2112,18 +2112,18 @@ function fi(e, t, r) {
|
|
|
2112
2112
|
var l = s;
|
|
2113
2113
|
Ur(l) && (n += Mt(i) + ":" + Dr(i, l) + ";");
|
|
2114
2114
|
} else if (Array.isArray(s) && typeof s[0] == "string" && t == null)
|
|
2115
|
-
for (var
|
|
2116
|
-
Ur(s[
|
|
2115
|
+
for (var f = 0; f < s.length; f++)
|
|
2116
|
+
Ur(s[f]) && (n += Mt(i) + ":" + Dr(i, s[f]) + ";");
|
|
2117
2117
|
else {
|
|
2118
|
-
var
|
|
2118
|
+
var u = ht(e, t, s);
|
|
2119
2119
|
switch (i) {
|
|
2120
2120
|
case "animation":
|
|
2121
2121
|
case "animationName": {
|
|
2122
|
-
n += Mt(i) + ":" +
|
|
2122
|
+
n += Mt(i) + ":" + u + ";";
|
|
2123
2123
|
break;
|
|
2124
2124
|
}
|
|
2125
2125
|
default:
|
|
2126
|
-
n += i + "{" +
|
|
2126
|
+
n += i + "{" + u + "}";
|
|
2127
2127
|
}
|
|
2128
2128
|
}
|
|
2129
2129
|
}
|
|
@@ -2144,13 +2144,13 @@ function di(e, t, r) {
|
|
|
2144
2144
|
}
|
|
2145
2145
|
for (var l = 1; l < e.length; l++)
|
|
2146
2146
|
if (o += ht(r, t, e[l]), n) {
|
|
2147
|
-
var
|
|
2148
|
-
o +=
|
|
2147
|
+
var f = i;
|
|
2148
|
+
o += f[l];
|
|
2149
2149
|
}
|
|
2150
2150
|
Lr.lastIndex = 0;
|
|
2151
|
-
for (var
|
|
2152
|
-
|
|
2153
|
-
var d = si(o) +
|
|
2151
|
+
for (var u = "", g; (g = Lr.exec(o)) !== null; )
|
|
2152
|
+
u += "-" + g[1];
|
|
2153
|
+
var d = si(o) + u;
|
|
2154
2154
|
return {
|
|
2155
2155
|
name: d,
|
|
2156
2156
|
styles: o,
|
|
@@ -2205,26 +2205,26 @@ function gi(e) {
|
|
|
2205
2205
|
function l(m) {
|
|
2206
2206
|
return `@media (min-width:${typeof t[m] == "number" ? t[m] : m}${r})`;
|
|
2207
2207
|
}
|
|
2208
|
-
function
|
|
2208
|
+
function f(m) {
|
|
2209
2209
|
return `@media (max-width:${(typeof t[m] == "number" ? t[m] : m) - n / 100}${r})`;
|
|
2210
2210
|
}
|
|
2211
|
-
function
|
|
2211
|
+
function u(m, w) {
|
|
2212
2212
|
const b = s.indexOf(w);
|
|
2213
2213
|
return `@media (min-width:${typeof t[m] == "number" ? t[m] : m}${r}) and (max-width:${(b !== -1 && typeof t[s[b]] == "number" ? t[s[b]] : w) - n / 100}${r})`;
|
|
2214
2214
|
}
|
|
2215
2215
|
function g(m) {
|
|
2216
|
-
return s.indexOf(m) + 1 < s.length ?
|
|
2216
|
+
return s.indexOf(m) + 1 < s.length ? u(m, s[s.indexOf(m) + 1]) : l(m);
|
|
2217
2217
|
}
|
|
2218
2218
|
function d(m) {
|
|
2219
2219
|
const w = s.indexOf(m);
|
|
2220
|
-
return w === 0 ? l(s[1]) : w === s.length - 1 ?
|
|
2220
|
+
return w === 0 ? l(s[1]) : w === s.length - 1 ? f(s[w]) : u(m, s[s.indexOf(m) + 1]).replace("@media", "@media not all and");
|
|
2221
2221
|
}
|
|
2222
2222
|
return {
|
|
2223
2223
|
keys: s,
|
|
2224
2224
|
values: i,
|
|
2225
2225
|
up: l,
|
|
2226
|
-
down:
|
|
2227
|
-
between:
|
|
2226
|
+
down: f,
|
|
2227
|
+
between: u,
|
|
2228
2228
|
only: g,
|
|
2229
2229
|
not: d,
|
|
2230
2230
|
unit: r,
|
|
@@ -2264,8 +2264,8 @@ function fn(e = {}, ...t) {
|
|
|
2264
2264
|
spacing: o,
|
|
2265
2265
|
shape: i = {},
|
|
2266
2266
|
...s
|
|
2267
|
-
} = e, l = gi(r),
|
|
2268
|
-
let
|
|
2267
|
+
} = e, l = gi(r), f = un(o);
|
|
2268
|
+
let u = ue({
|
|
2269
2269
|
breakpoints: l,
|
|
2270
2270
|
direction: "ltr",
|
|
2271
2271
|
components: {},
|
|
@@ -2274,21 +2274,21 @@ function fn(e = {}, ...t) {
|
|
|
2274
2274
|
mode: "light",
|
|
2275
2275
|
...n
|
|
2276
2276
|
},
|
|
2277
|
-
spacing:
|
|
2277
|
+
spacing: f,
|
|
2278
2278
|
shape: {
|
|
2279
2279
|
...yi,
|
|
2280
2280
|
...i
|
|
2281
2281
|
}
|
|
2282
2282
|
}, s);
|
|
2283
|
-
return
|
|
2283
|
+
return u = yo(u), u.applyStyles = bi, u = t.reduce((g, d) => ue(g, d), u), u.unstable_sxConfig = {
|
|
2284
2284
|
...Tt,
|
|
2285
2285
|
...s?.unstable_sxConfig
|
|
2286
|
-
},
|
|
2286
|
+
}, u.unstable_sx = function(d) {
|
|
2287
2287
|
return je({
|
|
2288
2288
|
sx: d,
|
|
2289
2289
|
theme: this
|
|
2290
2290
|
});
|
|
2291
|
-
},
|
|
2291
|
+
}, u;
|
|
2292
2292
|
}
|
|
2293
2293
|
function dn(e) {
|
|
2294
2294
|
const {
|
|
@@ -2368,10 +2368,10 @@ function Ei(e = {}) {
|
|
|
2368
2368
|
function i(l) {
|
|
2369
2369
|
wi(l, t, r);
|
|
2370
2370
|
}
|
|
2371
|
-
return (l,
|
|
2371
|
+
return (l, f = {}) => {
|
|
2372
2372
|
mi(l, (T) => T.filter((P) => P !== je));
|
|
2373
2373
|
const {
|
|
2374
|
-
name:
|
|
2374
|
+
name: u,
|
|
2375
2375
|
slot: g,
|
|
2376
2376
|
skipVariantsResolver: d,
|
|
2377
2377
|
skipSx: m,
|
|
@@ -2379,7 +2379,7 @@ function Ei(e = {}) {
|
|
|
2379
2379
|
// For more details: https://github.com/mui/material-ui/pull/37908
|
|
2380
2380
|
overridesResolver: w = vi(mn(g)),
|
|
2381
2381
|
...b
|
|
2382
|
-
} =
|
|
2382
|
+
} = f, c = u && u.startsWith("Mui") || g ? "components" : "custom", v = 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
2385
|
g && g !== "Root" && g !== "root" || !1
|
|
@@ -2388,7 +2388,7 @@ function Ei(e = {}) {
|
|
|
2388
2388
|
g === "Root" || g === "root" ? C = n : g ? C = o : Ti(l) && (C = void 0);
|
|
2389
2389
|
const y = pi(l, {
|
|
2390
2390
|
shouldForwardProp: C,
|
|
2391
|
-
label: Ci(
|
|
2391
|
+
label: Ci(u, g),
|
|
2392
2392
|
...b
|
|
2393
2393
|
}), h = (T) => {
|
|
2394
2394
|
if (T.__emotion_real === T)
|
|
@@ -2406,16 +2406,16 @@ function Ei(e = {}) {
|
|
|
2406
2406
|
return T;
|
|
2407
2407
|
}, p = (...T) => {
|
|
2408
2408
|
const P = [], z = T.map(h), I = [];
|
|
2409
|
-
if (P.push(i),
|
|
2410
|
-
const oe = j.theme.components?.[
|
|
2409
|
+
if (P.push(i), u && w && I.push(function(j) {
|
|
2410
|
+
const oe = j.theme.components?.[u]?.styleOverrides;
|
|
2411
2411
|
if (!oe)
|
|
2412
2412
|
return null;
|
|
2413
2413
|
const ce = {};
|
|
2414
2414
|
for (const Se in oe)
|
|
2415
2415
|
ce[Se] = lt(j, oe[Se], j.theme.modularCssLayers ? "theme" : void 0);
|
|
2416
2416
|
return w(j, ce);
|
|
2417
|
-
}),
|
|
2418
|
-
const oe = j.theme?.components?.[
|
|
2417
|
+
}), u && !v && I.push(function(j) {
|
|
2418
|
+
const oe = j.theme?.components?.[u]?.variants;
|
|
2419
2419
|
return oe ? pn(j, oe, [], j.theme.modularCssLayers ? "theme" : void 0) : null;
|
|
2420
2420
|
}), A || I.push(je), Array.isArray(z[0])) {
|
|
2421
2421
|
const V = z.shift(), j = new Array(P.length).fill(""), ae = new Array(I.length).fill("");
|
|
@@ -2423,7 +2423,7 @@ function Ei(e = {}) {
|
|
|
2423
2423
|
oe = [...j, ...V, ...ae], oe.raw = [...j, ...V.raw, ...ae], P.unshift(oe);
|
|
2424
2424
|
}
|
|
2425
2425
|
const a = [...P, ...z, ...I], O = y(...a);
|
|
2426
|
-
return l.muiName && (O.muiName = l.muiName), process.env.NODE_ENV !== "production" && (O.displayName = Ai(
|
|
2426
|
+
return l.muiName && (O.muiName = l.muiName), process.env.NODE_ENV !== "production" && (O.displayName = Ai(u, g, l)), O;
|
|
2427
2427
|
};
|
|
2428
2428
|
return y.withConfig && (p.withConfig = y.withConfig), p;
|
|
2429
2429
|
};
|
|
@@ -2504,12 +2504,12 @@ 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), s = (
|
|
2507
|
+
} = e, r = t[0], n = t[1] / 100, o = t[2] / 100, i = n * Math.min(o, 1 - o), s = (u, g = (u + r / 30) % 12) => o - i * Math.max(Math.min(g - 3, 9 - g, 1), -1);
|
|
2508
2508
|
let l = "rgb";
|
|
2509
|
-
const
|
|
2510
|
-
return e.type === "hsla" && (l += "a",
|
|
2509
|
+
const f = [Math.round(s(0) * 255), Math.round(s(8) * 255), Math.round(s(4) * 255)];
|
|
2510
|
+
return e.type === "hsla" && (l += "a", f.push(t[3])), xt({
|
|
2511
2511
|
type: l,
|
|
2512
|
-
values:
|
|
2512
|
+
values: f
|
|
2513
2513
|
});
|
|
2514
2514
|
}
|
|
2515
2515
|
function qt(e) {
|
|
@@ -2626,8 +2626,8 @@ const zr = (e, t, r, n = []) => {
|
|
|
2626
2626
|
});
|
|
2627
2627
|
}, Di = (e, t, r) => {
|
|
2628
2628
|
function n(o, i = [], s = []) {
|
|
2629
|
-
Object.entries(o).forEach(([l,
|
|
2630
|
-
(!r || r && !r([...i, l])) &&
|
|
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) ? [...s, l] : s) : t([...i, l], f, s));
|
|
2631
2631
|
});
|
|
2632
2632
|
}
|
|
2633
2633
|
n(e);
|
|
@@ -2639,12 +2639,12 @@ function Bt(e, t) {
|
|
|
2639
2639
|
} = t || {}, o = {}, i = {}, s = {};
|
|
2640
2640
|
return Di(
|
|
2641
2641
|
e,
|
|
2642
|
-
(l,
|
|
2643
|
-
if ((typeof
|
|
2644
|
-
const g = `--${r ? `${r}-` : ""}${l.join("-")}`, d = Li(l,
|
|
2642
|
+
(l, f, u) => {
|
|
2643
|
+
if ((typeof f == "string" || typeof f == "number") && (!n || !n(l, f))) {
|
|
2644
|
+
const g = `--${r ? `${r}-` : ""}${l.join("-")}`, d = Li(l, f);
|
|
2645
2645
|
Object.assign(o, {
|
|
2646
2646
|
[g]: d
|
|
2647
|
-
}), zr(i, l, `var(${g})`,
|
|
2647
|
+
}), zr(i, l, `var(${g})`, u), zr(s, l, `var(${g}, ${d})`, u);
|
|
2648
2648
|
}
|
|
2649
2649
|
},
|
|
2650
2650
|
(l) => l[0] === "vars"
|
|
@@ -2664,12 +2664,12 @@ function Mi(e, t = {}) {
|
|
|
2664
2664
|
colorSchemes: i = {},
|
|
2665
2665
|
components: s,
|
|
2666
2666
|
defaultColorScheme: l = "light",
|
|
2667
|
-
...
|
|
2667
|
+
...f
|
|
2668
2668
|
} = e, {
|
|
2669
|
-
vars:
|
|
2669
|
+
vars: u,
|
|
2670
2670
|
css: g,
|
|
2671
2671
|
varsWithDefaults: d
|
|
2672
|
-
} = Bt(
|
|
2672
|
+
} = Bt(f, t);
|
|
2673
2673
|
let m = d;
|
|
2674
2674
|
const w = {}, {
|
|
2675
2675
|
[l]: b,
|
|
@@ -2714,7 +2714,7 @@ function Mi(e, t = {}) {
|
|
|
2714
2714
|
vars: m,
|
|
2715
2715
|
generateThemeVars: () => {
|
|
2716
2716
|
let y = {
|
|
2717
|
-
...
|
|
2717
|
+
...u
|
|
2718
2718
|
};
|
|
2719
2719
|
return Object.entries(w).forEach(([, {
|
|
2720
2720
|
vars: h
|
|
@@ -2976,7 +2976,7 @@ function sr(e) {
|
|
|
2976
2976
|
contrastThreshold: r = 3,
|
|
2977
2977
|
tonalOffset: n = 0.2,
|
|
2978
2978
|
...o
|
|
2979
|
-
} = e, i = e.primary || ji(t), s = e.secondary || Vi(t), l = e.error || Wi(t),
|
|
2979
|
+
} = e, i = e.primary || ji(t), s = e.secondary || Vi(t), l = e.error || Wi(t), f = e.info || Gi(t), u = e.success || Yi(t), g = e.warning || Ki(t);
|
|
2980
2980
|
function d(c) {
|
|
2981
2981
|
const v = Fr(c, jr.text.primary) >= r ? jr.text.primary : zi.text.primary;
|
|
2982
2982
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -3049,12 +3049,12 @@ const theme2 = createTheme({ palette: {
|
|
|
3049
3049
|
}),
|
|
3050
3050
|
// The colors used to present information to the user that is neutral and not necessarily important.
|
|
3051
3051
|
info: m({
|
|
3052
|
-
color:
|
|
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
3056
|
success: m({
|
|
3057
|
-
color:
|
|
3057
|
+
color: u,
|
|
3058
3058
|
name: "success"
|
|
3059
3059
|
}),
|
|
3060
3060
|
// The grey colors.
|
|
@@ -3115,14 +3115,14 @@ function Xi(e, t) {
|
|
|
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
|
-
htmlFontSize:
|
|
3118
|
+
htmlFontSize: f = 16,
|
|
3119
3119
|
// Apply the CSS properties to all the variants.
|
|
3120
|
-
allVariants:
|
|
3120
|
+
allVariants: u,
|
|
3121
3121
|
pxToRem: g,
|
|
3122
3122
|
...d
|
|
3123
3123
|
} = typeof t == "function" ? t(e) : t;
|
|
3124
|
-
process.env.NODE_ENV !== "production" && (typeof n != "number" && console.error("MUI: `fontSize` is required to be a number."), typeof
|
|
3125
|
-
const m = n / 14, w = g || ((v) => `${v /
|
|
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 m = n / 14, w = g || ((v) => `${v / f * m}rem`), b = (v, A, C, y, h) => ({
|
|
3126
3126
|
fontFamily: r,
|
|
3127
3127
|
fontWeight: v,
|
|
3128
3128
|
fontSize: w(A),
|
|
@@ -3134,7 +3134,7 @@ function Xi(e, t) {
|
|
|
3134
3134
|
letterSpacing: `${Ji(y / A)}em`
|
|
3135
3135
|
} : {},
|
|
3136
3136
|
...h,
|
|
3137
|
-
...
|
|
3137
|
+
...u
|
|
3138
3138
|
}), c = {
|
|
3139
3139
|
h1: b(o, 96, 1.167, -1.5),
|
|
3140
3140
|
h2: b(o, 60, 1.2, -0.5),
|
|
@@ -3159,7 +3159,7 @@ function Xi(e, t) {
|
|
|
3159
3159
|
}
|
|
3160
3160
|
};
|
|
3161
3161
|
return ue({
|
|
3162
|
-
htmlFontSize:
|
|
3162
|
+
htmlFontSize: f,
|
|
3163
3163
|
pxToRem: w,
|
|
3164
3164
|
fontFamily: r,
|
|
3165
3165
|
fontSize: n,
|
|
@@ -3223,15 +3223,15 @@ function is(e) {
|
|
|
3223
3223
|
const {
|
|
3224
3224
|
duration: s = r.standard,
|
|
3225
3225
|
easing: l = t.easeInOut,
|
|
3226
|
-
delay:
|
|
3227
|
-
...
|
|
3226
|
+
delay: f = 0,
|
|
3227
|
+
...u
|
|
3228
3228
|
} = i;
|
|
3229
3229
|
if (process.env.NODE_ENV !== "production") {
|
|
3230
3230
|
const g = (m) => typeof m == "string", d = (m) => !Number.isNaN(parseFloat(m));
|
|
3231
|
-
!g(o) && !Array.isArray(o) && console.error('MUI: Argument "props" must be a string or Array.'), !d(s) && !g(s) && console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`), g(l) || console.error('MUI: Argument "easing" must be a string.'), !d(
|
|
3232
|
-
`)), Object.keys(
|
|
3231
|
+
!g(o) && !Array.isArray(o) && console.error('MUI: Argument "props" must be a string or Array.'), !d(s) && !g(s) && console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`), g(l) || console.error('MUI: Argument "easing" must be a string.'), !d(f) && !g(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
|
+
`)), 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((g) => `${g} ${typeof s == "string" ? s : Yr(s)} ${l} ${typeof
|
|
3234
|
+
return (Array.isArray(o) ? o : [o]).map((g) => `${g} ${typeof s == "string" ? s : Yr(s)} ${l} ${typeof f == "string" ? f : Yr(f)}`).join(",");
|
|
3235
3235
|
},
|
|
3236
3236
|
...e,
|
|
3237
3237
|
easing: t,
|
|
@@ -3281,8 +3281,8 @@ function Jt(e = {}, ...t) {
|
|
|
3281
3281
|
palette: i = {},
|
|
3282
3282
|
transitions: s = {},
|
|
3283
3283
|
typography: l = {},
|
|
3284
|
-
shape:
|
|
3285
|
-
...
|
|
3284
|
+
shape: f,
|
|
3285
|
+
...u
|
|
3286
3286
|
} = e;
|
|
3287
3287
|
if (e.vars && // The error should throw only for the root theme creation because user is not allowed to use a custom node `vars`.
|
|
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.
|
|
@@ -3300,7 +3300,7 @@ function Jt(e = {}, ...t) {
|
|
|
3300
3300
|
...ss
|
|
3301
3301
|
}
|
|
3302
3302
|
});
|
|
3303
|
-
if (m = ue(m,
|
|
3303
|
+
if (m = ue(m, u), m = t.reduce((w, b) => ue(w, b), m), process.env.NODE_ENV !== "production") {
|
|
3304
3304
|
const w = ["active", "checked", "completed", "disabled", "error", "expanded", "focused", "focusVisible", "required", "selected"], b = (c, v) => {
|
|
3305
3305
|
let A;
|
|
3306
3306
|
for (A in c) {
|
|
@@ -3326,7 +3326,7 @@ function Jt(e = {}, ...t) {
|
|
|
3326
3326
|
}
|
|
3327
3327
|
return m.unstable_sxConfig = {
|
|
3328
3328
|
...Tt,
|
|
3329
|
-
...
|
|
3329
|
+
...u?.unstable_sxConfig
|
|
3330
3330
|
}, m.unstable_sx = function(b) {
|
|
3331
3331
|
return je({
|
|
3332
3332
|
sx: b,
|
|
@@ -3485,8 +3485,8 @@ function ys(e = {}, ...t) {
|
|
|
3485
3485
|
cssVarPrefix: i = "mui",
|
|
3486
3486
|
shouldSkipGeneratingVar: s = fs,
|
|
3487
3487
|
colorSchemeSelector: l = r.light && r.dark ? "media" : void 0,
|
|
3488
|
-
rootSelector:
|
|
3489
|
-
...
|
|
3488
|
+
rootSelector: f = ":root",
|
|
3489
|
+
...u
|
|
3490
3490
|
} = e, g = Object.keys(r)[0], d = n || (r.light && g !== "light" ? "light" : g), m = gs(i), {
|
|
3491
3491
|
[d]: w,
|
|
3492
3492
|
light: b,
|
|
@@ -3498,21 +3498,21 @@ function ys(e = {}, ...t) {
|
|
|
3498
3498
|
let C = w;
|
|
3499
3499
|
if ((d === "dark" && !("dark" in r) || d === "light" && !("light" in r)) && (C = !0), !C)
|
|
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 y = zt(A, C,
|
|
3501
|
+
const y = zt(A, C, u, d);
|
|
3502
3502
|
b && !A.light && zt(A, b, void 0, "light"), c && !A.dark && zt(A, c, void 0, "dark");
|
|
3503
3503
|
let h = {
|
|
3504
3504
|
defaultColorScheme: d,
|
|
3505
3505
|
...y,
|
|
3506
3506
|
cssVarPrefix: i,
|
|
3507
3507
|
colorSchemeSelector: l,
|
|
3508
|
-
rootSelector:
|
|
3508
|
+
rootSelector: f,
|
|
3509
3509
|
getCssVar: m,
|
|
3510
3510
|
colorSchemes: A,
|
|
3511
3511
|
font: {
|
|
3512
3512
|
...Hi(y.typography),
|
|
3513
3513
|
...y.font
|
|
3514
3514
|
},
|
|
3515
|
-
spacing: hs(
|
|
3515
|
+
spacing: hs(u.spacing)
|
|
3516
3516
|
};
|
|
3517
3517
|
Object.keys(h.colorSchemes).forEach((I) => {
|
|
3518
3518
|
const a = h.colorSchemes[I].palette, O = (V) => {
|
|
@@ -3547,10 +3547,10 @@ function ys(e = {}, ...t) {
|
|
|
3547
3547
|
return h.vars = T, Object.entries(h.colorSchemes[h.defaultColorScheme]).forEach(([I, a]) => {
|
|
3548
3548
|
h[I] = a;
|
|
3549
3549
|
}), h.generateThemeVars = P, h.generateStyleSheets = z, h.generateSpacing = function() {
|
|
3550
|
-
return un(
|
|
3550
|
+
return un(u.spacing, tr(this));
|
|
3551
3551
|
}, h.getColorSchemeSelector = Fi(l), h.spacing = h.generateSpacing(), h.shouldSkipGeneratingVar = s, h.unstable_sxConfig = {
|
|
3552
3552
|
...Tt,
|
|
3553
|
-
...
|
|
3553
|
+
...u?.unstable_sxConfig
|
|
3554
3554
|
}, h.unstable_sx = function(a) {
|
|
3555
3555
|
return je({
|
|
3556
3556
|
sx: a,
|
|
@@ -3577,11 +3577,11 @@ function bs(e = {}, ...t) {
|
|
|
3577
3577
|
},
|
|
3578
3578
|
defaultColorScheme: i = r?.mode,
|
|
3579
3579
|
...s
|
|
3580
|
-
} = e, l = i || "light",
|
|
3580
|
+
} = e, l = i || "light", f = o?.[l], u = {
|
|
3581
3581
|
...o,
|
|
3582
3582
|
...r ? {
|
|
3583
3583
|
[l]: {
|
|
3584
|
-
...typeof
|
|
3584
|
+
...typeof f != "boolean" && f,
|
|
3585
3585
|
palette: r
|
|
3586
3586
|
}
|
|
3587
3587
|
} : void 0
|
|
@@ -3590,24 +3590,24 @@ function bs(e = {}, ...t) {
|
|
|
3590
3590
|
if (!("colorSchemes" in e))
|
|
3591
3591
|
return Jt(e, ...t);
|
|
3592
3592
|
let g = r;
|
|
3593
|
-
"palette" in e ||
|
|
3593
|
+
"palette" in e || u[l] && (u[l] !== !0 ? g = u[l].palette : l === "dark" && (g = {
|
|
3594
3594
|
mode: "dark"
|
|
3595
3595
|
}));
|
|
3596
3596
|
const d = Jt({
|
|
3597
3597
|
...e,
|
|
3598
3598
|
palette: g
|
|
3599
3599
|
}, ...t);
|
|
3600
|
-
return d.defaultColorScheme = l, d.colorSchemes =
|
|
3601
|
-
...
|
|
3600
|
+
return d.defaultColorScheme = l, d.colorSchemes = u, d.palette.mode === "light" && (d.colorSchemes.light = {
|
|
3601
|
+
...u.light !== !0 && u.light,
|
|
3602
3602
|
palette: d.palette
|
|
3603
|
-
}, Kr(d, "dark",
|
|
3604
|
-
...
|
|
3603
|
+
}, Kr(d, "dark", u.dark)), d.palette.mode === "dark" && (d.colorSchemes.dark = {
|
|
3604
|
+
...u.dark !== !0 && u.dark,
|
|
3605
3605
|
palette: d.palette
|
|
3606
|
-
}, Kr(d, "light",
|
|
3606
|
+
}, Kr(d, "light", u.light)), d;
|
|
3607
3607
|
}
|
|
3608
|
-
return !r && !("light" in
|
|
3608
|
+
return !r && !("light" in u) && l === "light" && (u.light = !0), ys({
|
|
3609
3609
|
...s,
|
|
3610
|
-
colorSchemes:
|
|
3610
|
+
colorSchemes: u,
|
|
3611
3611
|
defaultColorScheme: l,
|
|
3612
3612
|
...typeof n != "boolean" && n
|
|
3613
3613
|
}, ...t);
|
|
@@ -3742,8 +3742,8 @@ const xs = (e) => {
|
|
|
3742
3742
|
className: i,
|
|
3743
3743
|
color: s = "inherit",
|
|
3744
3744
|
component: l = "svg",
|
|
3745
|
-
fontSize:
|
|
3746
|
-
htmlColor:
|
|
3745
|
+
fontSize: f = "medium",
|
|
3746
|
+
htmlColor: u,
|
|
3747
3747
|
inheritViewBox: g = !1,
|
|
3748
3748
|
titleAccess: d,
|
|
3749
3749
|
viewBox: m = "0 0 24 24",
|
|
@@ -3752,7 +3752,7 @@ const xs = (e) => {
|
|
|
3752
3752
|
...n,
|
|
3753
3753
|
color: s,
|
|
3754
3754
|
component: l,
|
|
3755
|
-
fontSize:
|
|
3755
|
+
fontSize: f,
|
|
3756
3756
|
instanceFontSize: t.fontSize,
|
|
3757
3757
|
inheritViewBox: g,
|
|
3758
3758
|
viewBox: m,
|
|
@@ -3764,7 +3764,7 @@ const xs = (e) => {
|
|
|
3764
3764
|
as: l,
|
|
3765
3765
|
className: mo(A.root, i),
|
|
3766
3766
|
focusable: "false",
|
|
3767
|
-
color:
|
|
3767
|
+
color: u,
|
|
3768
3768
|
"aria-hidden": d ? void 0 : !0,
|
|
3769
3769
|
role: d ? "img" : void 0,
|
|
3770
3770
|
ref: r,
|
|
@@ -3889,7 +3889,7 @@ const Os = wn(/* @__PURE__ */ x("path", {
|
|
|
3889
3889
|
ACCOUNT_MARKED_STALE: "Account refresh token expired. Click to re-authenticate.",
|
|
3890
3890
|
NO_ACCOUNTS: "No additional accounts stored. Your primary auth remains active.",
|
|
3891
3891
|
REDIRECT_IN_PROGRESS: "Redirecting to Keycloak for authentication..."
|
|
3892
|
-
};
|
|
3892
|
+
}, $s = "https://sprylogin.com/apps-api/sync-bridge.html";
|
|
3893
3893
|
function et(e) {
|
|
3894
3894
|
try {
|
|
3895
3895
|
const t = e.split(".");
|
|
@@ -3921,12 +3921,12 @@ function En(e, t = Rt.REFRESH_TOKEN_BUFFER_SECONDS) {
|
|
|
3921
3921
|
const n = r.exp * 1e3, o = Date.now(), i = t * 1e3;
|
|
3922
3922
|
return o >= n - i;
|
|
3923
3923
|
}
|
|
3924
|
-
function
|
|
3924
|
+
function Ta(e) {
|
|
3925
3925
|
if (!e) return null;
|
|
3926
3926
|
const t = et(e);
|
|
3927
3927
|
return !t || typeof t.exp != "number" ? null : t.exp * 1e3;
|
|
3928
3928
|
}
|
|
3929
|
-
function
|
|
3929
|
+
function xa(e) {
|
|
3930
3930
|
if (!e) return -1;
|
|
3931
3931
|
const t = et(e);
|
|
3932
3932
|
if (!t || typeof t.exp != "number")
|
|
@@ -3938,16 +3938,16 @@ function He(e) {
|
|
|
3938
3938
|
const t = e.profile || {}, r = t.email || "unknown@example.com", n = t.given_name, o = t.name || n || r.split("@")[0], i = t.picture;
|
|
3939
3939
|
return { email: r, name: o, avatar: i };
|
|
3940
3940
|
}
|
|
3941
|
-
function
|
|
3941
|
+
function ks(e) {
|
|
3942
3942
|
return !!(e.isStale || En(e.user.refresh_token) || !e.user.refresh_token && ar(e.user.access_token));
|
|
3943
3943
|
}
|
|
3944
|
-
function
|
|
3944
|
+
function Ra(e) {
|
|
3945
3945
|
return ar(e, Rt.ACCESS_TOKEN_BUFFER_SECONDS);
|
|
3946
3946
|
}
|
|
3947
|
-
function
|
|
3947
|
+
function Oa(e) {
|
|
3948
3948
|
return En(e, Rt.REFRESH_TOKEN_BUFFER_SECONDS);
|
|
3949
3949
|
}
|
|
3950
|
-
function
|
|
3950
|
+
function Ia(e) {
|
|
3951
3951
|
if (!e) return !1;
|
|
3952
3952
|
const t = et(e);
|
|
3953
3953
|
if (!t || typeof t.exp != "number")
|
|
@@ -3955,7 +3955,7 @@ function Oa(e) {
|
|
|
3955
3955
|
const r = t.exp * 1e3;
|
|
3956
3956
|
return Date.now() < r;
|
|
3957
3957
|
}
|
|
3958
|
-
function
|
|
3958
|
+
function Ps({
|
|
3959
3959
|
account: e,
|
|
3960
3960
|
isActive: t,
|
|
3961
3961
|
isLoading: r,
|
|
@@ -3963,7 +3963,7 @@ function ks({
|
|
|
3963
3963
|
onRemove: o,
|
|
3964
3964
|
onRefresh: i
|
|
3965
3965
|
}) {
|
|
3966
|
-
const { email: s, name: l, avatar:
|
|
3966
|
+
const { email: s, name: l, avatar: f } = He(e.user), [u, g] = ie.useState(!1), [d, m] = ie.useState(!1), w = async (v) => {
|
|
3967
3967
|
v.stopPropagation(), g(!0);
|
|
3968
3968
|
try {
|
|
3969
3969
|
await o();
|
|
@@ -3997,7 +3997,7 @@ function ks({
|
|
|
3997
3997
|
/* @__PURE__ */ x(tn, { children: /* @__PURE__ */ x(
|
|
3998
3998
|
Kt,
|
|
3999
3999
|
{
|
|
4000
|
-
src:
|
|
4000
|
+
src: f,
|
|
4001
4001
|
alt: l,
|
|
4002
4002
|
sx: {
|
|
4003
4003
|
width: 32,
|
|
@@ -4056,9 +4056,9 @@ function ks({
|
|
|
4056
4056
|
edge: "end",
|
|
4057
4057
|
size: "small",
|
|
4058
4058
|
onClick: w,
|
|
4059
|
-
disabled:
|
|
4059
|
+
disabled: u || r,
|
|
4060
4060
|
title: "Remove this account",
|
|
4061
|
-
children:
|
|
4061
|
+
children: u ? /* @__PURE__ */ x(ft, { size: 20 }) : /* @__PURE__ */ x(zn, { fontSize: "small" })
|
|
4062
4062
|
}
|
|
4063
4063
|
)
|
|
4064
4064
|
] })
|
|
@@ -4076,12 +4076,12 @@ const An = ie.forwardRef(
|
|
|
4076
4076
|
onRemoveAccount: i,
|
|
4077
4077
|
onRefreshAccount: s
|
|
4078
4078
|
}, l) => {
|
|
4079
|
-
const [
|
|
4080
|
-
|
|
4079
|
+
const [f, u] = ie.useState(!1), g = async () => {
|
|
4080
|
+
u(!0);
|
|
4081
4081
|
try {
|
|
4082
4082
|
await o();
|
|
4083
4083
|
} finally {
|
|
4084
|
-
|
|
4084
|
+
u(!1);
|
|
4085
4085
|
}
|
|
4086
4086
|
};
|
|
4087
4087
|
return /* @__PURE__ */ x(ne, { ref: l, sx: { width: "100%", maxWidth: 360, bgcolor: "background.paper" }, children: e.length === 0 ? /* @__PURE__ */ te(ne, { sx: { p: 2, textAlign: "center" }, children: [
|
|
@@ -4090,7 +4090,7 @@ const An = ie.forwardRef(
|
|
|
4090
4090
|
"button",
|
|
4091
4091
|
{
|
|
4092
4092
|
onClick: g,
|
|
4093
|
-
disabled:
|
|
4093
|
+
disabled: f || r,
|
|
4094
4094
|
style: {
|
|
4095
4095
|
padding: "8px 16px",
|
|
4096
4096
|
borderRadius: "4px",
|
|
@@ -4098,12 +4098,12 @@ const An = ie.forwardRef(
|
|
|
4098
4098
|
background: "#fff",
|
|
4099
4099
|
cursor: "pointer"
|
|
4100
4100
|
},
|
|
4101
|
-
children:
|
|
4101
|
+
children: f ? "Adding Account..." : "Add Account"
|
|
4102
4102
|
}
|
|
4103
4103
|
)
|
|
4104
4104
|
] }) : /* @__PURE__ */ te(ut, { children: [
|
|
4105
4105
|
/* @__PURE__ */ x($n, { children: e.map((d) => /* @__PURE__ */ x(
|
|
4106
|
-
|
|
4106
|
+
Ps,
|
|
4107
4107
|
{
|
|
4108
4108
|
account: d,
|
|
4109
4109
|
isActive: d.accountId === t,
|
|
@@ -4119,14 +4119,14 @@ const An = ie.forwardRef(
|
|
|
4119
4119
|
en,
|
|
4120
4120
|
{
|
|
4121
4121
|
onClick: g,
|
|
4122
|
-
disabled:
|
|
4122
|
+
disabled: f || r,
|
|
4123
4123
|
sx: {
|
|
4124
4124
|
justifyContent: "center",
|
|
4125
4125
|
py: 1
|
|
4126
4126
|
},
|
|
4127
4127
|
children: [
|
|
4128
4128
|
/* @__PURE__ */ x(Fn, { sx: { mr: 1 }, fontSize: "small" }),
|
|
4129
|
-
/* @__PURE__ */ x(Ce, { variant: "button", sx: { fontSize: "0.875rem" }, children:
|
|
4129
|
+
/* @__PURE__ */ x(Ce, { variant: "button", sx: { fontSize: "0.875rem" }, children: f ? "Adding..." : "Add Another Account" })
|
|
4130
4130
|
]
|
|
4131
4131
|
}
|
|
4132
4132
|
) })
|
|
@@ -4134,17 +4134,17 @@ const An = ie.forwardRef(
|
|
|
4134
4134
|
}
|
|
4135
4135
|
);
|
|
4136
4136
|
An.displayName = "AccountList";
|
|
4137
|
-
function
|
|
4137
|
+
function Ns({
|
|
4138
4138
|
profile: e,
|
|
4139
4139
|
isLoading: t,
|
|
4140
4140
|
onSignOut: r,
|
|
4141
4141
|
onManageAccount: n,
|
|
4142
4142
|
accountManager: o
|
|
4143
4143
|
}) {
|
|
4144
|
-
const i = "https://sprylogin.com/my-account/", [s, l] = me(null), [
|
|
4144
|
+
const i = "https://sprylogin.com/my-account/", [s, l] = me(null), [f, u] = me(!1), g = o?.accounts.length ?? 0, d = (h) => {
|
|
4145
4145
|
l(h.currentTarget);
|
|
4146
4146
|
}, m = () => {
|
|
4147
|
-
l(null),
|
|
4147
|
+
l(null), u(!1);
|
|
4148
4148
|
}, w = () => {
|
|
4149
4149
|
o && o.activeAccount ? o.removeAccount(o.activeAccount.accountId) : (m(), r && r()), m();
|
|
4150
4150
|
}, b = () => {
|
|
@@ -4230,7 +4230,7 @@ function Ps({
|
|
|
4230
4230
|
}
|
|
4231
4231
|
}
|
|
4232
4232
|
},
|
|
4233
|
-
children:
|
|
4233
|
+
children: f ? (
|
|
4234
4234
|
// Account List View
|
|
4235
4235
|
/* @__PURE__ */ te(ne, { children: [
|
|
4236
4236
|
/* @__PURE__ */ te(ne, { sx: { px: 1.5, py: 1.25, display: "flex", alignItems: "center", gap: 0.75 }, children: [
|
|
@@ -4238,7 +4238,7 @@ function Ps({
|
|
|
4238
4238
|
mr,
|
|
4239
4239
|
{
|
|
4240
4240
|
size: "small",
|
|
4241
|
-
onClick: () =>
|
|
4241
|
+
onClick: () => u(!1),
|
|
4242
4242
|
sx: {
|
|
4243
4243
|
textTransform: "none",
|
|
4244
4244
|
color: "#1a73e8",
|
|
@@ -4340,7 +4340,7 @@ function Ps({
|
|
|
4340
4340
|
/* @__PURE__ */ x(
|
|
4341
4341
|
hr,
|
|
4342
4342
|
{
|
|
4343
|
-
onClick: () =>
|
|
4343
|
+
onClick: () => u(!0),
|
|
4344
4344
|
sx: {
|
|
4345
4345
|
py: 0.75,
|
|
4346
4346
|
px: 1.5,
|
|
@@ -4389,14 +4389,14 @@ function Ps({
|
|
|
4389
4389
|
)
|
|
4390
4390
|
] });
|
|
4391
4391
|
}
|
|
4392
|
-
const jt = "spry_profile_cache",
|
|
4393
|
-
function
|
|
4392
|
+
const jt = "spry_profile_cache", Us = 300 * 1e3, Ds = 300 * 1e3;
|
|
4393
|
+
function Ls(e, t = {}) {
|
|
4394
4394
|
const {
|
|
4395
|
-
refetchInterval: r =
|
|
4396
|
-
cacheTime: n =
|
|
4395
|
+
refetchInterval: r = Us,
|
|
4396
|
+
cacheTime: n = Ds,
|
|
4397
4397
|
getAuthToken: o,
|
|
4398
4398
|
headers: i = {}
|
|
4399
|
-
} = t, [s, l] = me(null), [
|
|
4399
|
+
} = t, [s, l] = me(null), [f, u] = me(!0), [g, d] = me(null), m = Ee(null), w = Ee(null), b = pe(() => {
|
|
4400
4400
|
try {
|
|
4401
4401
|
const A = localStorage.getItem(jt);
|
|
4402
4402
|
if (!A) return null;
|
|
@@ -4418,7 +4418,7 @@ function Ds(e, t = {}) {
|
|
|
4418
4418
|
}, []), v = pe(async () => {
|
|
4419
4419
|
w.current && w.current.abort(), w.current = new AbortController();
|
|
4420
4420
|
try {
|
|
4421
|
-
|
|
4421
|
+
u(!0), d(null);
|
|
4422
4422
|
let A = null;
|
|
4423
4423
|
o && (A = await Promise.resolve(o()));
|
|
4424
4424
|
const C = {
|
|
@@ -4442,33 +4442,33 @@ function Ds(e, t = {}) {
|
|
|
4442
4442
|
const y = b();
|
|
4443
4443
|
y && l(y);
|
|
4444
4444
|
} finally {
|
|
4445
|
-
|
|
4445
|
+
u(!1);
|
|
4446
4446
|
}
|
|
4447
4447
|
}, [e, o, i, b, c]);
|
|
4448
4448
|
return ye(() => {
|
|
4449
4449
|
const A = b();
|
|
4450
|
-
return A && (l(A),
|
|
4450
|
+
return A && (l(A), u(!1)), v(), r > 0 && (m.current = window.setInterval(() => {
|
|
4451
4451
|
v();
|
|
4452
4452
|
}, r)), () => {
|
|
4453
4453
|
m.current && window.clearInterval(m.current), w.current && w.current.abort();
|
|
4454
4454
|
};
|
|
4455
4455
|
}, [e, r, n]), {
|
|
4456
4456
|
profile: s,
|
|
4457
|
-
isLoading:
|
|
4457
|
+
isLoading: f,
|
|
4458
4458
|
error: g,
|
|
4459
4459
|
refetch: v
|
|
4460
4460
|
};
|
|
4461
4461
|
}
|
|
4462
|
-
function
|
|
4462
|
+
function Ms({
|
|
4463
4463
|
apiUrl: e,
|
|
4464
4464
|
onSignOut: t,
|
|
4465
4465
|
onManageAccount: r,
|
|
4466
4466
|
accountManager: n,
|
|
4467
4467
|
...o
|
|
4468
4468
|
}) {
|
|
4469
|
-
const { profile: i, isLoading: s, error: l } =
|
|
4469
|
+
const { profile: i, isLoading: s, 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
4474
|
isLoading: s,
|
|
@@ -4478,10 +4478,10 @@ function Ls({
|
|
|
4478
4478
|
}
|
|
4479
4479
|
);
|
|
4480
4480
|
}
|
|
4481
|
-
const
|
|
4481
|
+
const Fs = wn(/* @__PURE__ */ x("path", {
|
|
4482
4482
|
d: "M4 8h4V4H4zm6 12h4v-4h-4zm-6 0h4v-4H4zm0-6h4v-4H4zm6 0h4v-4h-4zm6-10v4h4V4zm-6 4h4V4h-4zm6 6h4v-4h-4zm0 6h4v-4h-4z"
|
|
4483
4483
|
}), "Apps");
|
|
4484
|
-
function
|
|
4484
|
+
function $a({
|
|
4485
4485
|
apiUrl: e,
|
|
4486
4486
|
profileApiUrl: t,
|
|
4487
4487
|
onSignOut: r,
|
|
@@ -4491,9 +4491,9 @@ function Ia({
|
|
|
4491
4491
|
showProfileMenu: s = !0,
|
|
4492
4492
|
appsRefetchInterval: l = 300 * 1e3,
|
|
4493
4493
|
// 5 minutes
|
|
4494
|
-
appsCacheTime:
|
|
4494
|
+
appsCacheTime: f = 300 * 1e3,
|
|
4495
4495
|
// 5 minutes
|
|
4496
|
-
profileRefetchInterval:
|
|
4496
|
+
profileRefetchInterval: u = 300 * 1e3,
|
|
4497
4497
|
// 5 minutes
|
|
4498
4498
|
profileCacheTime: g = 300 * 1e3,
|
|
4499
4499
|
// 5 minutes
|
|
@@ -4514,27 +4514,27 @@ function Ia({
|
|
|
4514
4514
|
}
|
|
4515
4515
|
},
|
|
4516
4516
|
"aria-label": "Google apps",
|
|
4517
|
-
children: /* @__PURE__ */ x(
|
|
4517
|
+
children: /* @__PURE__ */ x(Fs, {})
|
|
4518
4518
|
}
|
|
4519
4519
|
),
|
|
4520
4520
|
/* @__PURE__ */ x(
|
|
4521
|
-
|
|
4521
|
+
ya,
|
|
4522
4522
|
{
|
|
4523
4523
|
apiUrl: e,
|
|
4524
4524
|
open: m,
|
|
4525
4525
|
onClose: () => w(!1),
|
|
4526
4526
|
buttonRef: b,
|
|
4527
4527
|
refetchInterval: l,
|
|
4528
|
-
cacheTime:
|
|
4528
|
+
cacheTime: f
|
|
4529
4529
|
}
|
|
4530
4530
|
)
|
|
4531
4531
|
] }),
|
|
4532
4532
|
s && /* @__PURE__ */ x(
|
|
4533
|
-
|
|
4533
|
+
Ms,
|
|
4534
4534
|
{
|
|
4535
4535
|
apiUrl: t || e,
|
|
4536
4536
|
onSignOut: r,
|
|
4537
|
-
refetchInterval:
|
|
4537
|
+
refetchInterval: u,
|
|
4538
4538
|
cacheTime: g,
|
|
4539
4539
|
getAuthToken: n,
|
|
4540
4540
|
headers: o,
|
|
@@ -4545,10 +4545,10 @@ function Ia({
|
|
|
4545
4545
|
}
|
|
4546
4546
|
var cr = ie.createContext(void 0);
|
|
4547
4547
|
cr.displayName = "AuthContext";
|
|
4548
|
-
var
|
|
4548
|
+
var Bs = {
|
|
4549
4549
|
isLoading: !0,
|
|
4550
4550
|
isAuthenticated: !1
|
|
4551
|
-
},
|
|
4551
|
+
}, zs = (e, t) => {
|
|
4552
4552
|
switch (t.type) {
|
|
4553
4553
|
case "INITIALISED":
|
|
4554
4554
|
case "USER_LOADED":
|
|
@@ -4601,10 +4601,10 @@ var Fs = {
|
|
|
4601
4601
|
};
|
|
4602
4602
|
}
|
|
4603
4603
|
}
|
|
4604
|
-
},
|
|
4604
|
+
}, js = (e = window.location) => {
|
|
4605
4605
|
let t = new URLSearchParams(e.search);
|
|
4606
4606
|
return !!((t.get("code") || t.get("error")) && t.get("state") || (t = new URLSearchParams(e.hash.replace("#", "?")), (t.get("code") || t.get("error")) && t.get("state")));
|
|
4607
|
-
},
|
|
4607
|
+
}, Vs = lr("signinCallback", "Sign-in failed"), Ws = lr("signoutCallback", "Sign-out failed"), Gs = lr("renewSilent", "Renew silent failed");
|
|
4608
4608
|
function Cn(e, t) {
|
|
4609
4609
|
return {
|
|
4610
4610
|
name: Vt(e, "name", () => "Error"),
|
|
@@ -4627,13 +4627,13 @@ function Vt(e, t, r) {
|
|
|
4627
4627
|
}
|
|
4628
4628
|
return r();
|
|
4629
4629
|
}
|
|
4630
|
-
var
|
|
4630
|
+
var Ys = [
|
|
4631
4631
|
"clearStaleState",
|
|
4632
4632
|
"querySessionStatus",
|
|
4633
4633
|
"revokeTokens",
|
|
4634
4634
|
"startSilentRenew",
|
|
4635
4635
|
"stopSilentRenew"
|
|
4636
|
-
],
|
|
4636
|
+
], Ks = [
|
|
4637
4637
|
"signinPopup",
|
|
4638
4638
|
"signinSilent",
|
|
4639
4639
|
"signinRedirect",
|
|
@@ -4645,7 +4645,7 @@ var Gs = [
|
|
|
4645
4645
|
throw new Error(
|
|
4646
4646
|
`UserManager#${e} was called from an unsupported context. If this is a server-rendered page, defer this call with useEffect() or pass a custom UserManager implementation.`
|
|
4647
4647
|
);
|
|
4648
|
-
}, qr = typeof window > "u" ? null : Qt,
|
|
4648
|
+
}, qr = typeof window > "u" ? null : Qt, Hs = (e) => {
|
|
4649
4649
|
const {
|
|
4650
4650
|
children: t,
|
|
4651
4651
|
onSigninCallback: r,
|
|
@@ -4654,32 +4654,32 @@ var Gs = [
|
|
|
4654
4654
|
onSignoutCallback: i,
|
|
4655
4655
|
onRemoveUser: s,
|
|
4656
4656
|
userManager: l = null,
|
|
4657
|
-
...
|
|
4658
|
-
} = e, [
|
|
4657
|
+
...f
|
|
4658
|
+
} = e, [u] = ie.useState(() => l ?? (qr ? new qr(f) : { settings: f })), [g, d] = ie.useReducer(zs, Bs), m = ie.useMemo(
|
|
4659
4659
|
() => Object.assign(
|
|
4660
4660
|
{
|
|
4661
|
-
settings:
|
|
4662
|
-
events:
|
|
4661
|
+
settings: u.settings,
|
|
4662
|
+
events: u.events
|
|
4663
4663
|
},
|
|
4664
4664
|
Object.fromEntries(
|
|
4665
|
-
|
|
4665
|
+
Ys.map((v) => {
|
|
4666
4666
|
var A, C;
|
|
4667
4667
|
return [
|
|
4668
4668
|
v,
|
|
4669
|
-
(C = (A =
|
|
4669
|
+
(C = (A = u[v]) == null ? void 0 : A.bind(u)) != null ? C : Hr(v)
|
|
4670
4670
|
];
|
|
4671
4671
|
})
|
|
4672
4672
|
),
|
|
4673
4673
|
Object.fromEntries(
|
|
4674
|
-
|
|
4674
|
+
Ks.map((v) => [
|
|
4675
4675
|
v,
|
|
4676
|
-
|
|
4676
|
+
u[v] ? async (A) => {
|
|
4677
4677
|
d({
|
|
4678
4678
|
type: "NAVIGATOR_INIT",
|
|
4679
4679
|
method: v
|
|
4680
4680
|
});
|
|
4681
4681
|
try {
|
|
4682
|
-
return await
|
|
4682
|
+
return await u[v](A);
|
|
4683
4683
|
} catch (C) {
|
|
4684
4684
|
return d({
|
|
4685
4685
|
type: "ERROR",
|
|
@@ -4696,58 +4696,58 @@ var Gs = [
|
|
|
4696
4696
|
])
|
|
4697
4697
|
)
|
|
4698
4698
|
),
|
|
4699
|
-
[
|
|
4699
|
+
[u]
|
|
4700
4700
|
), w = ie.useRef(!1);
|
|
4701
4701
|
ie.useEffect(() => {
|
|
4702
|
-
!
|
|
4702
|
+
!u || w.current || (w.current = !0, (async () => {
|
|
4703
4703
|
try {
|
|
4704
4704
|
let v = null;
|
|
4705
|
-
|
|
4705
|
+
js() && !n && (v = await u.signinCallback(), r && await r(v)), v = v || await u.getUser(), d({ type: "INITIALISED", user: v });
|
|
4706
4706
|
} catch (v) {
|
|
4707
4707
|
d({
|
|
4708
4708
|
type: "ERROR",
|
|
4709
|
-
error:
|
|
4709
|
+
error: Vs(v)
|
|
4710
4710
|
});
|
|
4711
4711
|
}
|
|
4712
4712
|
try {
|
|
4713
|
-
if (o && o(
|
|
4714
|
-
const v = await
|
|
4713
|
+
if (o && o(u.settings)) {
|
|
4714
|
+
const v = await u.signoutCallback();
|
|
4715
4715
|
i && await i(v);
|
|
4716
4716
|
}
|
|
4717
4717
|
} catch (v) {
|
|
4718
4718
|
d({
|
|
4719
4719
|
type: "ERROR",
|
|
4720
|
-
error:
|
|
4720
|
+
error: Ws(v)
|
|
4721
4721
|
});
|
|
4722
4722
|
}
|
|
4723
4723
|
})());
|
|
4724
|
-
}, [
|
|
4725
|
-
if (!
|
|
4724
|
+
}, [u, n, r, i, o]), ie.useEffect(() => {
|
|
4725
|
+
if (!u) return;
|
|
4726
4726
|
const v = (h) => {
|
|
4727
4727
|
d({ type: "USER_LOADED", user: h });
|
|
4728
4728
|
};
|
|
4729
|
-
|
|
4729
|
+
u.events.addUserLoaded(v);
|
|
4730
4730
|
const A = () => {
|
|
4731
4731
|
d({ type: "USER_UNLOADED" });
|
|
4732
4732
|
};
|
|
4733
|
-
|
|
4733
|
+
u.events.addUserUnloaded(A);
|
|
4734
4734
|
const C = () => {
|
|
4735
4735
|
d({ type: "USER_SIGNED_OUT" });
|
|
4736
4736
|
};
|
|
4737
|
-
|
|
4737
|
+
u.events.addUserSignedOut(C);
|
|
4738
4738
|
const y = (h) => {
|
|
4739
4739
|
d({
|
|
4740
4740
|
type: "ERROR",
|
|
4741
|
-
error:
|
|
4741
|
+
error: Gs(h)
|
|
4742
4742
|
});
|
|
4743
4743
|
};
|
|
4744
|
-
return
|
|
4745
|
-
|
|
4744
|
+
return u.events.addSilentRenewError(y), () => {
|
|
4745
|
+
u.events.removeUserLoaded(v), u.events.removeUserUnloaded(A), u.events.removeUserSignedOut(C), u.events.removeSilentRenewError(y);
|
|
4746
4746
|
};
|
|
4747
|
-
}, [
|
|
4747
|
+
}, [u]);
|
|
4748
4748
|
const b = ie.useCallback(async () => {
|
|
4749
|
-
await
|
|
4750
|
-
}, [
|
|
4749
|
+
await u.removeUser(), s && await s();
|
|
4750
|
+
}, [u, s]), c = ie.useMemo(() => ({
|
|
4751
4751
|
...g,
|
|
4752
4752
|
...m,
|
|
4753
4753
|
removeUser: b
|
|
@@ -4757,62 +4757,61 @@ var Gs = [
|
|
|
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;
|
|
4759
4759
|
};
|
|
4760
|
-
const Tn = On(null),
|
|
4760
|
+
const Tn = On(null), qs = () => {
|
|
4761
4761
|
typeof window > "u" || window.history.replaceState({}, document.title, window.location.pathname);
|
|
4762
|
-
},
|
|
4762
|
+
}, Js = (e) => {
|
|
4763
4763
|
if (typeof window > "u") return !1;
|
|
4764
4764
|
const t = e.post_logout_redirect_uri || e.redirect_uri;
|
|
4765
4765
|
return t ? window.location.href.startsWith(t) : !1;
|
|
4766
|
-
},
|
|
4766
|
+
}, Xs = (e) => {
|
|
4767
4767
|
if (typeof window > "u") return;
|
|
4768
4768
|
const t = e.post_logout_redirect_uri || e.redirect_uri || window.location.origin;
|
|
4769
4769
|
window.location.href !== t ? window.history.replaceState({}, document.title, t) : window.history.replaceState({}, document.title, window.location.pathname);
|
|
4770
4770
|
};
|
|
4771
|
-
function
|
|
4771
|
+
function ka({
|
|
4772
4772
|
children: e,
|
|
4773
4773
|
config: t,
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
skipSigninCallback: l
|
|
4774
|
+
onSigninCallback: r,
|
|
4775
|
+
matchSignoutCallback: n,
|
|
4776
|
+
onSignoutCallback: o,
|
|
4777
|
+
onRemoveUser: i,
|
|
4778
|
+
skipSigninCallback: s
|
|
4780
4779
|
}) {
|
|
4781
|
-
const
|
|
4780
|
+
const l = qe(
|
|
4782
4781
|
() => ({
|
|
4783
4782
|
...t,
|
|
4784
4783
|
post_logout_redirect_uri: t.post_logout_redirect_uri || t.redirect_uri || (typeof window < "u" ? window.location.origin : void 0)
|
|
4785
4784
|
}),
|
|
4786
4785
|
[t]
|
|
4787
|
-
), f = qe(() => new Qt(
|
|
4786
|
+
), f = qe(() => new Qt(l), [l]), u = qe(
|
|
4788
4787
|
() => ({
|
|
4789
|
-
authority:
|
|
4790
|
-
client_id:
|
|
4791
|
-
redirect_uri:
|
|
4792
|
-
post_logout_redirect_uri:
|
|
4788
|
+
authority: l.authority,
|
|
4789
|
+
client_id: l.client_id,
|
|
4790
|
+
redirect_uri: l.redirect_uri,
|
|
4791
|
+
post_logout_redirect_uri: l.post_logout_redirect_uri
|
|
4793
4792
|
}),
|
|
4794
|
-
[
|
|
4795
|
-
),
|
|
4796
|
-
return /* @__PURE__ */ x(Tn.Provider, { value: { keycloakConfig:
|
|
4797
|
-
|
|
4793
|
+
[l]
|
|
4794
|
+
), g = r || qs, d = n || Js, m = o || (() => Xs(l));
|
|
4795
|
+
return /* @__PURE__ */ x(Tn.Provider, { value: { keycloakConfig: u, userManager: f, syncBridgeUrl: $s }, children: /* @__PURE__ */ x(
|
|
4796
|
+
Hs,
|
|
4798
4797
|
{
|
|
4799
4798
|
userManager: f,
|
|
4800
|
-
onSigninCallback:
|
|
4801
|
-
matchSignoutCallback:
|
|
4802
|
-
onSignoutCallback:
|
|
4803
|
-
onRemoveUser:
|
|
4804
|
-
skipSigninCallback:
|
|
4799
|
+
onSigninCallback: g,
|
|
4800
|
+
matchSignoutCallback: d,
|
|
4801
|
+
onSignoutCallback: m,
|
|
4802
|
+
onRemoveUser: i,
|
|
4803
|
+
skipSigninCallback: s,
|
|
4805
4804
|
children: e
|
|
4806
4805
|
}
|
|
4807
4806
|
) });
|
|
4808
4807
|
}
|
|
4809
|
-
function
|
|
4808
|
+
function Qs() {
|
|
4810
4809
|
const e = In(Tn);
|
|
4811
4810
|
if (!e)
|
|
4812
4811
|
throw new Error("useSpryAuthContext must be used within SpryAuthProvider");
|
|
4813
4812
|
return e;
|
|
4814
4813
|
}
|
|
4815
|
-
function
|
|
4814
|
+
function Zs(e) {
|
|
4816
4815
|
const t = e.profile?.email || e.profile?.sub || "unknown", r = Date.now();
|
|
4817
4816
|
return `account_${t.replace(/[^a-z0-9]/gi, "_").toLowerCase()}_${r}`;
|
|
4818
4817
|
}
|
|
@@ -4842,7 +4841,7 @@ function Ve(e) {
|
|
|
4842
4841
|
console.error("Failed to save accounts to localStorage:", t);
|
|
4843
4842
|
}
|
|
4844
4843
|
}
|
|
4845
|
-
function
|
|
4844
|
+
function ea(e, t = null) {
|
|
4846
4845
|
const r = re(), n = {
|
|
4847
4846
|
accounts: e,
|
|
4848
4847
|
activeAccountId: t ?? r.activeAccountId,
|
|
@@ -4851,7 +4850,7 @@ function Zs(e, t = null) {
|
|
|
4851
4850
|
Ve(n);
|
|
4852
4851
|
}
|
|
4853
4852
|
function Ge(e) {
|
|
4854
|
-
const t = re(), r =
|
|
4853
|
+
const t = re(), 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 = {
|
|
4855
4854
|
...{
|
|
4856
4855
|
accountId: r,
|
|
4857
4856
|
lastUsed: Date.now(),
|
|
@@ -4870,25 +4869,25 @@ function fe(e) {
|
|
|
4870
4869
|
const t = re();
|
|
4871
4870
|
t.activeAccountId = e, t.lastUpdated = Date.now(), Ve(t);
|
|
4872
4871
|
}
|
|
4873
|
-
function
|
|
4872
|
+
function ta() {
|
|
4874
4873
|
const e = re();
|
|
4875
4874
|
return e.activeAccountId && e.accounts.find((t) => t.accountId === e.activeAccountId) || null;
|
|
4876
4875
|
}
|
|
4877
|
-
function
|
|
4876
|
+
function ra() {
|
|
4878
4877
|
return re().activeAccountId;
|
|
4879
4878
|
}
|
|
4880
|
-
function
|
|
4879
|
+
function na(e, t) {
|
|
4881
4880
|
const r = re(), n = r.accounts.find((o) => o.accountId === e);
|
|
4882
4881
|
n && (n.user = t, n.lastUsed = Date.now(), n.isStale = !1, r.lastUpdated = Date.now(), Ve(r));
|
|
4883
4882
|
}
|
|
4884
|
-
function
|
|
4883
|
+
function oa(e) {
|
|
4885
4884
|
const t = re(), r = t.accounts.find((n) => n.accountId === e);
|
|
4886
4885
|
r && (r.isStale = !0, t.lastUpdated = Date.now(), Ve(t));
|
|
4887
4886
|
}
|
|
4888
|
-
function
|
|
4887
|
+
function Pa() {
|
|
4889
4888
|
localStorage.removeItem(he.ACCOUNTS);
|
|
4890
4889
|
}
|
|
4891
|
-
function
|
|
4890
|
+
function Na(e) {
|
|
4892
4891
|
const r = re().accounts.find((n) => n.accountId === e);
|
|
4893
4892
|
return r ? {
|
|
4894
4893
|
accountId: r.accountId,
|
|
@@ -4903,19 +4902,19 @@ function Wt(e) {
|
|
|
4903
4902
|
function Gt() {
|
|
4904
4903
|
return localStorage.getItem(he.ADD_ACCOUNT_IN_PROGRESS) === "true";
|
|
4905
4904
|
}
|
|
4906
|
-
function
|
|
4905
|
+
function ia(e) {
|
|
4907
4906
|
localStorage.setItem(he.RETURN_URL, e);
|
|
4908
4907
|
}
|
|
4909
|
-
function
|
|
4908
|
+
function sa() {
|
|
4910
4909
|
return localStorage.getItem(he.RETURN_URL);
|
|
4911
4910
|
}
|
|
4912
4911
|
function Jr() {
|
|
4913
4912
|
localStorage.removeItem(he.RETURN_URL);
|
|
4914
4913
|
}
|
|
4915
|
-
function
|
|
4914
|
+
function aa(e) {
|
|
4916
4915
|
localStorage.setItem(he.TEMP_CURRENT_USER, JSON.stringify(e));
|
|
4917
4916
|
}
|
|
4918
|
-
function
|
|
4917
|
+
function Ua() {
|
|
4919
4918
|
try {
|
|
4920
4919
|
const e = localStorage.getItem(he.TEMP_CURRENT_USER);
|
|
4921
4920
|
return e ? JSON.parse(e) : null;
|
|
@@ -4926,7 +4925,7 @@ function Na() {
|
|
|
4926
4925
|
function Xr() {
|
|
4927
4926
|
localStorage.removeItem(he.TEMP_CURRENT_USER);
|
|
4928
4927
|
}
|
|
4929
|
-
async function
|
|
4928
|
+
async function ca(e, t) {
|
|
4930
4929
|
try {
|
|
4931
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)}`;
|
|
4932
4931
|
return window.location.href = `${r}?post_logout_redirect_uri=${encodeURIComponent(i)}`, !0;
|
|
@@ -4934,20 +4933,20 @@ async function aa(e, t) {
|
|
|
4934
4933
|
return console.error("Failed to clear SSO session:", r), console.warn(be.SSO_CLEAR_FAILED), !1;
|
|
4935
4934
|
}
|
|
4936
4935
|
}
|
|
4937
|
-
async function
|
|
4936
|
+
async function la(e, t, r) {
|
|
4938
4937
|
try {
|
|
4939
4938
|
const o = Re().length === 1;
|
|
4940
|
-
if (!await
|
|
4939
|
+
if (!await da(e, t) && o)
|
|
4941
4940
|
return console.warn("Token revocation failed for last account, falling back to redirect logout"), await xn(e, t, r), {
|
|
4942
4941
|
success: !0,
|
|
4943
4942
|
message: "Redirecting to logout...",
|
|
4944
4943
|
remainingAccounts: 0
|
|
4945
4944
|
};
|
|
4946
4945
|
ur(r), Ot.remove(r);
|
|
4947
|
-
const s = Re(),
|
|
4948
|
-
return
|
|
4946
|
+
const s = Re(), f = s.sort((u, g) => g.lastUsed - u.lastUsed)[0] || null;
|
|
4947
|
+
return f ? (fe(f.accountId), {
|
|
4949
4948
|
success: !0,
|
|
4950
|
-
message: `Logged out. Switched to ${
|
|
4949
|
+
message: `Logged out. Switched to ${f.user.profile?.email || f.user.profile?.sub}`,
|
|
4951
4950
|
remainingAccounts: s.length
|
|
4952
4951
|
}) : (fe(null), {
|
|
4953
4952
|
success: !0,
|
|
@@ -4962,7 +4961,7 @@ async function ca(e, t, r) {
|
|
|
4962
4961
|
};
|
|
4963
4962
|
}
|
|
4964
4963
|
}
|
|
4965
|
-
async function
|
|
4964
|
+
async function Da(e, t) {
|
|
4966
4965
|
const r = e.map(
|
|
4967
4966
|
(n) => xn(n.user, t, n.accountId).catch((o) => {
|
|
4968
4967
|
console.warn(`Failed to logout ${n.accountId}:`, o);
|
|
@@ -4976,7 +4975,7 @@ async function Ua(e, t) {
|
|
|
4976
4975
|
remainingAccounts: 0
|
|
4977
4976
|
};
|
|
4978
4977
|
}
|
|
4979
|
-
function
|
|
4978
|
+
function La(e) {
|
|
4980
4979
|
ur(e);
|
|
4981
4980
|
const t = Re();
|
|
4982
4981
|
if (t.length > 0) {
|
|
@@ -4993,7 +4992,7 @@ function Da(e) {
|
|
|
4993
4992
|
remainingAccounts: 0
|
|
4994
4993
|
};
|
|
4995
4994
|
}
|
|
4996
|
-
async function
|
|
4995
|
+
async function ua(e, t) {
|
|
4997
4996
|
try {
|
|
4998
4997
|
return new Qt({
|
|
4999
4998
|
authority: e.authority,
|
|
@@ -5011,11 +5010,11 @@ async function la(e, t) {
|
|
|
5011
5010
|
throw console.error("Failed to create UserManager:", r), new Error("oidc-client-ts library not found. Ensure it is installed in consuming app.");
|
|
5012
5011
|
}
|
|
5013
5012
|
}
|
|
5014
|
-
class
|
|
5013
|
+
class fa {
|
|
5015
5014
|
pool = /* @__PURE__ */ new Map();
|
|
5016
5015
|
async getOrCreate(t, r) {
|
|
5017
5016
|
if (!this.pool.has(r)) {
|
|
5018
|
-
const o = await
|
|
5017
|
+
const o = await ua(t, r);
|
|
5019
5018
|
this.pool.set(r, o);
|
|
5020
5019
|
}
|
|
5021
5020
|
const n = this.pool.get(r);
|
|
@@ -5032,7 +5031,7 @@ class ua {
|
|
|
5032
5031
|
return this.pool.has(t);
|
|
5033
5032
|
}
|
|
5034
5033
|
}
|
|
5035
|
-
const Ot = new
|
|
5034
|
+
const Ot = new fa();
|
|
5036
5035
|
async function Xt(e, t, r) {
|
|
5037
5036
|
if (!t.refresh_token)
|
|
5038
5037
|
return console.warn(`${be.TOKEN_REFRESH_FAILED} (${e}): missing refresh token`), null;
|
|
@@ -5060,7 +5059,7 @@ async function Xt(e, t, r) {
|
|
|
5060
5059
|
expires_in: i.expires_in || t.expires_in,
|
|
5061
5060
|
profile: t.profile
|
|
5062
5061
|
};
|
|
5063
|
-
return
|
|
5062
|
+
return na(e, s), s;
|
|
5064
5063
|
} catch (o) {
|
|
5065
5064
|
return console.warn(`${be.TOKEN_REFRESH_FAILED} (${e}):`, o), null;
|
|
5066
5065
|
}
|
|
@@ -5072,7 +5071,7 @@ async function Qr(e, t) {
|
|
|
5072
5071
|
throw console.error(be.SIGNIN_REDIRECT_FAILED, r), r;
|
|
5073
5072
|
}
|
|
5074
5073
|
}
|
|
5075
|
-
async function
|
|
5074
|
+
async function da(e, t) {
|
|
5076
5075
|
try {
|
|
5077
5076
|
if (!e.refresh_token)
|
|
5078
5077
|
return console.warn("No refresh token available for revocation"), !1;
|
|
@@ -5102,11 +5101,11 @@ async function xn(e, t, r) {
|
|
|
5102
5101
|
console.warn(be.LOGOUT_FAILED, n);
|
|
5103
5102
|
}
|
|
5104
5103
|
}
|
|
5105
|
-
function
|
|
5106
|
-
const { keycloakConfig: t, initialUser: r, onAccountSwitch: n, signinRedirect: o, syncBridge: i } = e, [s, l] = me([]), [
|
|
5104
|
+
function pa(e) {
|
|
5105
|
+
const { keycloakConfig: t, initialUser: r, onAccountSwitch: n, signinRedirect: o, syncBridge: i } = e, [s, l] = me([]), [f, u] = me(null), g = Ee(!1), d = Ee(!1), m = Ee(!1), w = pe((y) => {
|
|
5107
5106
|
const h = y.accounts;
|
|
5108
5107
|
let p = y.activeAccountId;
|
|
5109
|
-
if (p && !h.find((T) => T.accountId === p) && (p = h[0]?.accountId || null), l(h),
|
|
5108
|
+
if (p && !h.find((T) => T.accountId === p) && (p = h[0]?.accountId || null), l(h), u(p), p) {
|
|
5110
5109
|
const T = h.find((P) => P.accountId === p);
|
|
5111
5110
|
T && n(T.user);
|
|
5112
5111
|
}
|
|
@@ -5132,10 +5131,10 @@ function da(e) {
|
|
|
5132
5131
|
d.current = !0, console.log("✅ Primary auth populated initialUser, processing new account...");
|
|
5133
5132
|
const z = Ge(r);
|
|
5134
5133
|
console.log(`✅ Added new account: ${z}`), fe(z), Wt(!1);
|
|
5135
|
-
const I =
|
|
5134
|
+
const I = sa();
|
|
5136
5135
|
Xr(), Jr();
|
|
5137
5136
|
const a = re();
|
|
5138
|
-
l(a.accounts),
|
|
5137
|
+
l(a.accounts), u(z), i && i.setAccountsState(a), n(r), console.log("✅ Account switch completed"), I && I !== window.location.href && (console.log(`🔄 Navigating back to: ${I}`), window.location.assign(I));
|
|
5139
5138
|
} else
|
|
5140
5139
|
console.log("⏳ Waiting for primary auth to populate initialUser...");
|
|
5141
5140
|
}, [r, n]), ye(() => {
|
|
@@ -5203,7 +5202,7 @@ function da(e) {
|
|
|
5203
5202
|
console.error(be.ACCOUNT_NOT_FOUND);
|
|
5204
5203
|
return;
|
|
5205
5204
|
}
|
|
5206
|
-
ar(h.user.access_token) && (console.warn("Access token expired for account:", y),
|
|
5205
|
+
ar(h.user.access_token) && (console.warn("Access token expired for account:", y), oa(y)), fe(y), u(y), await n(h.user), i && await i.setAccountsState(re()), console.log(`✅ Switched to account: ${h.user.profile?.email || y}`);
|
|
5207
5206
|
} catch (h) {
|
|
5208
5207
|
const p = h instanceof Error ? h.message : "Failed to switch account";
|
|
5209
5208
|
console.error(p, h);
|
|
@@ -5212,7 +5211,7 @@ function da(e) {
|
|
|
5212
5211
|
[s, n, i]
|
|
5213
5212
|
), c = pe(async () => {
|
|
5214
5213
|
try {
|
|
5215
|
-
if (console.log("🔄 Starting add new account flow..."), console.log("📦 Saving state flags to localStorage..."), r &&
|
|
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((y) => setTimeout(y, 1200)), console.log(Is.REDIRECT_IN_PROGRESS), o)
|
|
5216
5215
|
await o();
|
|
5217
5216
|
else {
|
|
5218
5217
|
const y = `temp_add_${Date.now()}`;
|
|
@@ -5230,7 +5229,7 @@ function da(e) {
|
|
|
5230
5229
|
console.error(be.ACCOUNT_NOT_FOUND);
|
|
5231
5230
|
return;
|
|
5232
5231
|
}
|
|
5233
|
-
const p = await
|
|
5232
|
+
const p = await la(h.user, t, y);
|
|
5234
5233
|
p.success || console.warn("Keycloak logout failed, but account removed locally:", p.message);
|
|
5235
5234
|
const T = re();
|
|
5236
5235
|
w(T), i && i.setAccountsState(T);
|
|
@@ -5263,21 +5262,21 @@ function da(e) {
|
|
|
5263
5262
|
console.error(p, h);
|
|
5264
5263
|
}
|
|
5265
5264
|
},
|
|
5266
|
-
[s,
|
|
5265
|
+
[s, f, t, n, w, i]
|
|
5267
5266
|
);
|
|
5268
5267
|
ye(() => {
|
|
5269
5268
|
const y = () => {
|
|
5270
5269
|
const h = s.map((T) => ({
|
|
5271
5270
|
...T,
|
|
5272
|
-
isStale:
|
|
5271
|
+
isStale: ks(T)
|
|
5273
5272
|
}));
|
|
5274
5273
|
h.some(
|
|
5275
5274
|
(T, P) => T.isStale !== s[P]?.isStale
|
|
5276
|
-
) && (
|
|
5275
|
+
) && (ea(h), l(h));
|
|
5277
5276
|
};
|
|
5278
5277
|
s.length > 0 && y();
|
|
5279
5278
|
}, [s]);
|
|
5280
|
-
const C = s.find((y) => y.accountId ===
|
|
5279
|
+
const C = s.find((y) => y.accountId === f) || null;
|
|
5281
5280
|
return {
|
|
5282
5281
|
accounts: s,
|
|
5283
5282
|
activeAccount: C,
|
|
@@ -5287,18 +5286,18 @@ function da(e) {
|
|
|
5287
5286
|
refreshAccountToken: A
|
|
5288
5287
|
};
|
|
5289
5288
|
}
|
|
5290
|
-
const
|
|
5291
|
-
function
|
|
5289
|
+
const ma = 2e3, Yt = /* @__PURE__ */ new Map();
|
|
5290
|
+
function ha(e) {
|
|
5292
5291
|
if (!e?.bridgeUrl || typeof window > "u" || typeof document > "u") return null;
|
|
5293
5292
|
if (Yt.has(e.bridgeUrl))
|
|
5294
5293
|
return Yt.get(e.bridgeUrl) || null;
|
|
5295
|
-
const t = e.bridgeUrl, r = new URL(t).origin, n = e.timeoutMs ??
|
|
5294
|
+
const t = e.bridgeUrl, r = new URL(t).origin, n = e.timeoutMs ?? ma;
|
|
5296
5295
|
let o = null, i = !1, s = null, l = null;
|
|
5297
|
-
const
|
|
5296
|
+
const f = /* @__PURE__ */ new Map(), u = () => {
|
|
5298
5297
|
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", () => {
|
|
5299
5298
|
i = !0;
|
|
5300
5299
|
}), document.body.appendChild(o));
|
|
5301
|
-
}, g = () => (
|
|
5300
|
+
}, g = () => (u(), i ? Promise.resolve() : s || (s = new Promise((C, y) => {
|
|
5302
5301
|
if (!o) {
|
|
5303
5302
|
s = null, y(new Error("Bridge iframe not available"));
|
|
5304
5303
|
return;
|
|
@@ -5329,9 +5328,9 @@ function ma(e) {
|
|
|
5329
5328
|
if (!y || typeof y != "object") return;
|
|
5330
5329
|
const h = y.requestId;
|
|
5331
5330
|
if (!h || typeof h != "string") return;
|
|
5332
|
-
const p =
|
|
5331
|
+
const p = f.get(h);
|
|
5333
5332
|
if (p) {
|
|
5334
|
-
if (
|
|
5333
|
+
if (f.delete(h), window.clearTimeout(p.timeoutId), y.type === "ERROR") {
|
|
5335
5334
|
p.reject(new Error(y.error || "Bridge error"));
|
|
5336
5335
|
return;
|
|
5337
5336
|
}
|
|
@@ -5339,13 +5338,13 @@ function ma(e) {
|
|
|
5339
5338
|
}
|
|
5340
5339
|
}, w = (C, y, h) => h ? c(C, y) : v().then(() => c(C, y)), b = () => typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `${Date.now()}_${Math.random().toString(16).slice(2)}`, c = (C, y) => g().then(() => new Promise((h, p) => {
|
|
5341
5340
|
const T = b(), P = window.setTimeout(() => {
|
|
5342
|
-
|
|
5341
|
+
f.delete(T), p(new Error(`Bridge request timed out: ${C}`));
|
|
5343
5342
|
}, n);
|
|
5344
|
-
|
|
5343
|
+
f.set(T, { resolve: h, reject: p, timeoutId: P });
|
|
5345
5344
|
try {
|
|
5346
5345
|
o?.contentWindow?.postMessage({ type: C, requestId: T, payload: y }, "*");
|
|
5347
5346
|
} catch {
|
|
5348
|
-
|
|
5347
|
+
f.delete(T), window.clearTimeout(P), p(new Error("Bridge postMessage failed"));
|
|
5349
5348
|
}
|
|
5350
5349
|
})), v = () => l || (l = w("PING", null, !0).then(() => {
|
|
5351
5350
|
}).catch((C) => {
|
|
@@ -5379,7 +5378,7 @@ function ma(e) {
|
|
|
5379
5378
|
};
|
|
5380
5379
|
return Yt.set(t, A), A;
|
|
5381
5380
|
}
|
|
5382
|
-
function
|
|
5381
|
+
function ga(e) {
|
|
5383
5382
|
if (e)
|
|
5384
5383
|
return {
|
|
5385
5384
|
access_token: e.access_token,
|
|
@@ -5398,43 +5397,43 @@ function Zr(e) {
|
|
|
5398
5397
|
expires_at: r
|
|
5399
5398
|
});
|
|
5400
5399
|
}
|
|
5401
|
-
function
|
|
5402
|
-
const e = _n(), { keycloakConfig: t, userManager: r, syncBridgeUrl: n } =
|
|
5403
|
-
() =>
|
|
5400
|
+
function Ma() {
|
|
5401
|
+
const e = _n(), { keycloakConfig: t, userManager: r, syncBridgeUrl: n } = Qs(), o = Ee(!1), i = qe(
|
|
5402
|
+
() => ha(n ? { bridgeUrl: n } : null),
|
|
5404
5403
|
[n]
|
|
5405
|
-
), s =
|
|
5404
|
+
), s = pa({
|
|
5406
5405
|
keycloakConfig: t,
|
|
5407
|
-
initialUser:
|
|
5406
|
+
initialUser: ga(e.user),
|
|
5408
5407
|
signinRedirect: e.signinRedirect,
|
|
5409
5408
|
syncBridge: i,
|
|
5410
|
-
onAccountSwitch: async (
|
|
5411
|
-
let
|
|
5412
|
-
const g = Re(), d =
|
|
5413
|
-
if (w &&
|
|
5409
|
+
onAccountSwitch: async (f) => {
|
|
5410
|
+
let u = f;
|
|
5411
|
+
const g = Re(), d = f.profile?.sub, m = f.profile?.email, w = g.find((c) => d && c.user.profile?.sub ? c.user.profile.sub === d : m && c.user.profile?.email ? c.user.profile.email === m : !1);
|
|
5412
|
+
if (w && f.refresh_token) {
|
|
5414
5413
|
const c = await Xt(
|
|
5415
5414
|
w.accountId,
|
|
5416
|
-
|
|
5415
|
+
f,
|
|
5417
5416
|
t
|
|
5418
5417
|
);
|
|
5419
|
-
c && (
|
|
5418
|
+
c && (u = c);
|
|
5420
5419
|
}
|
|
5421
|
-
const b = Zr(
|
|
5420
|
+
const b = Zr(u);
|
|
5422
5421
|
await r.storeUser(b), await r.events.load(b), window.dispatchEvent(
|
|
5423
5422
|
new CustomEvent("auth:account-switched", {
|
|
5424
|
-
detail: { user:
|
|
5423
|
+
detail: { user: u }
|
|
5425
5424
|
})
|
|
5426
5425
|
);
|
|
5427
5426
|
}
|
|
5428
5427
|
});
|
|
5429
5428
|
ye(() => {
|
|
5430
5429
|
if (o.current || e.isAuthenticated || e.isLoading || e.activeNavigator) return;
|
|
5431
|
-
const
|
|
5432
|
-
if (!
|
|
5430
|
+
const f = ta();
|
|
5431
|
+
if (!f) return;
|
|
5433
5432
|
o.current = !0, (async () => {
|
|
5434
|
-
let g =
|
|
5433
|
+
let g = f.user;
|
|
5435
5434
|
if (g.refresh_token) {
|
|
5436
5435
|
const m = await Xt(
|
|
5437
|
-
|
|
5436
|
+
f.accountId,
|
|
5438
5437
|
g,
|
|
5439
5438
|
t
|
|
5440
5439
|
);
|
|
@@ -5447,8 +5446,8 @@ function La() {
|
|
|
5447
5446
|
});
|
|
5448
5447
|
}, [s.accounts.length, e, t, r]);
|
|
5449
5448
|
const l = pe(
|
|
5450
|
-
async (
|
|
5451
|
-
await s.removeAccount(
|
|
5449
|
+
async (f) => {
|
|
5450
|
+
await s.removeAccount(f), ra() || await r.removeUser();
|
|
5452
5451
|
},
|
|
5453
5452
|
[s, r]
|
|
5454
5453
|
);
|
|
@@ -5460,10 +5459,10 @@ function La() {
|
|
|
5460
5459
|
[s, l]
|
|
5461
5460
|
);
|
|
5462
5461
|
}
|
|
5463
|
-
function
|
|
5462
|
+
function Fa() {
|
|
5464
5463
|
return _n();
|
|
5465
5464
|
}
|
|
5466
|
-
function
|
|
5465
|
+
function ya({
|
|
5467
5466
|
apiUrl: e,
|
|
5468
5467
|
open: t,
|
|
5469
5468
|
onClose: r,
|
|
@@ -5471,7 +5470,7 @@ function ga({
|
|
|
5471
5470
|
refetchInterval: o,
|
|
5472
5471
|
cacheTime: i
|
|
5473
5472
|
}) {
|
|
5474
|
-
const { apps: s, isLoading: l, error:
|
|
5473
|
+
const { apps: s, isLoading: l, error: f, refetch: u } = Kn(e, {
|
|
5475
5474
|
refetchInterval: o,
|
|
5476
5475
|
cacheTime: i
|
|
5477
5476
|
});
|
|
@@ -5483,64 +5482,65 @@ function ga({
|
|
|
5483
5482
|
onClose: r,
|
|
5484
5483
|
buttonRef: n,
|
|
5485
5484
|
isLoading: l,
|
|
5486
|
-
error:
|
|
5487
|
-
onRetry:
|
|
5485
|
+
error: f,
|
|
5486
|
+
onRetry: u
|
|
5488
5487
|
}
|
|
5489
5488
|
);
|
|
5490
5489
|
}
|
|
5491
5490
|
export {
|
|
5492
5491
|
An as AccountList,
|
|
5493
5492
|
Wn as AppsDropdown,
|
|
5494
|
-
|
|
5493
|
+
ya as AppsDropdownConnected,
|
|
5495
5494
|
be as ERROR_MESSAGES,
|
|
5496
5495
|
Is as INFO_MESSAGES,
|
|
5497
|
-
|
|
5498
|
-
|
|
5496
|
+
Ns as ProfileMenu,
|
|
5497
|
+
Ms as ProfileMenuConnected,
|
|
5499
5498
|
he as STORAGE_KEYS,
|
|
5500
|
-
$
|
|
5499
|
+
$s as SYNC_BRIDGE_URL,
|
|
5500
|
+
ka as SpryAuthProvider,
|
|
5501
5501
|
Rt as TOKEN_VALIDATION,
|
|
5502
|
-
|
|
5502
|
+
$a as TopBar,
|
|
5503
5503
|
Ge as addAccount,
|
|
5504
|
-
|
|
5504
|
+
Pa as clearAllAccounts,
|
|
5505
5505
|
Jr as clearReturnUrl,
|
|
5506
|
-
|
|
5506
|
+
ca as clearSSOSessionBeforeAddAccount,
|
|
5507
5507
|
Xr as clearTempCurrentUser,
|
|
5508
5508
|
et as decodeToken,
|
|
5509
|
-
|
|
5509
|
+
ya as default,
|
|
5510
5510
|
He as extractUserInfo,
|
|
5511
|
-
|
|
5511
|
+
Na as getAccountMetadata,
|
|
5512
5512
|
Re as getAccounts,
|
|
5513
5513
|
re as getAccountsState,
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5514
|
+
ta as getActiveAccount,
|
|
5515
|
+
ra as getActiveAccountId,
|
|
5516
|
+
sa as getReturnUrl,
|
|
5517
|
+
Ua as getTempCurrentUser,
|
|
5518
|
+
Ta as getTokenExpiryTime,
|
|
5519
|
+
xa as getTokenTimeRemaining,
|
|
5520
|
+
Ia as isAccessTokenValid,
|
|
5521
|
+
ks as isAccountStale,
|
|
5522
5522
|
Gt as isAddAccountInProgress,
|
|
5523
5523
|
En as isRefreshTokenExpired,
|
|
5524
5524
|
ar as isTokenExpired,
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5525
|
+
la as logoutAccount,
|
|
5526
|
+
La as logoutAccountLocally,
|
|
5527
|
+
Da as logoutAllAccounts,
|
|
5528
|
+
oa as markAccountStale,
|
|
5529
5529
|
ur as removeAccount,
|
|
5530
|
-
|
|
5530
|
+
ea as saveAccounts,
|
|
5531
5531
|
Ve as saveAccountsState,
|
|
5532
|
-
|
|
5532
|
+
aa as saveTempCurrentUser,
|
|
5533
5533
|
fe as setActiveAccount,
|
|
5534
5534
|
Wt as setAddAccountInProgress,
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5535
|
+
ia as setReturnUrl,
|
|
5536
|
+
Ra as shouldRefreshAccessToken,
|
|
5537
|
+
Oa as shouldRefreshRefreshToken,
|
|
5538
|
+
na as updateAccountTokens,
|
|
5539
|
+
pa as useAccountManager,
|
|
5540
5540
|
Kn as useAppsData,
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5541
|
+
Ls as useProfileData,
|
|
5542
|
+
Ma as useSpryAccountManager,
|
|
5543
|
+
Fa as useSpryAuth,
|
|
5544
|
+
Qs as useSpryAuthContext
|
|
5545
5545
|
};
|
|
5546
5546
|
//# sourceMappingURL=index.js.map
|