@axa-fr/react-oidc 7.4.0-alpha.1025 → 7.4.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/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import ve, { useCallback as bt, useState as P, useEffect as j } from "react";
2
- import { OidcClient as l, getParseQueryStringFromLocation as kt, getPath as V, getFetchDefault as mt } from "@axa-fr/oidc-client";
3
- import { TokenRenewMode as er } from "@axa-fr/oidc-client";
4
- var fe = { exports: {} }, B = {};
1
+ import be, { useCallback as kt, useState as P, useEffect as O } from "react";
2
+ import { OidcClient as f, getParseQueryStringFromLocation as mt, getPath as z, getFetchDefault as Et } from "@axa-fr/oidc-client";
3
+ import { TokenRenewMode as rr } from "@axa-fr/oidc-client";
4
+ var ye = { exports: {} }, G = {};
5
5
  /**
6
6
  * @license React
7
7
  * react-jsx-runtime.production.min.js
@@ -11,25 +11,25 @@ var fe = { exports: {} }, B = {};
11
11
  * This source code is licensed under the MIT license found in the
12
12
  * LICENSE file in the root directory of this source tree.
13
13
  */
14
- var Ue;
15
- function Et() {
16
- if (Ue)
17
- return B;
18
- Ue = 1;
19
- var s = ve, o = Symbol.for("react.element"), n = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, f = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
20
- function p(i, v, _) {
21
- var g, w = {}, x = null, I = null;
22
- _ !== void 0 && (x = "" + _), v.key !== void 0 && (x = "" + v.key), v.ref !== void 0 && (I = v.ref);
23
- for (g in v)
24
- a.call(v, g) && !c.hasOwnProperty(g) && (w[g] = v[g]);
25
- if (i && i.defaultProps)
26
- for (g in v = i.defaultProps, v)
27
- w[g] === void 0 && (w[g] = v[g]);
28
- return { $$typeof: o, type: i, key: x, ref: I, props: w, _owner: f.current };
14
+ var Ye;
15
+ function Tt() {
16
+ if (Ye)
17
+ return G;
18
+ Ye = 1;
19
+ var o = be, s = Symbol.for("react.element"), r = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, u = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
20
+ function h(c, v, g) {
21
+ var b, m = {}, C = null, D = null;
22
+ g !== void 0 && (C = "" + g), v.key !== void 0 && (C = "" + v.key), v.ref !== void 0 && (D = v.ref);
23
+ for (b in v)
24
+ a.call(v, b) && !l.hasOwnProperty(b) && (m[b] = v[b]);
25
+ if (c && c.defaultProps)
26
+ for (b in v = c.defaultProps, v)
27
+ m[b] === void 0 && (m[b] = v[b]);
28
+ return { $$typeof: s, type: c, key: C, ref: D, props: m, _owner: u.current };
29
29
  }
30
- return B.Fragment = n, B.jsx = p, B.jsxs = p, B;
30
+ return G.Fragment = r, G.jsx = h, G.jsxs = h, G;
31
31
  }
32
- var q = {};
32
+ var H = {};
33
33
  /**
34
34
  * @license React
35
35
  * react-jsx-runtime.development.js
@@ -39,91 +39,91 @@ var q = {};
39
39
  * This source code is licensed under the MIT license found in the
40
40
  * LICENSE file in the root directory of this source tree.
41
41
  */
42
- var Ye;
43
- function Tt() {
44
- return Ye || (Ye = 1, process.env.NODE_ENV !== "production" && function() {
45
- var s = ve, o = Symbol.for("react.element"), n = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), f = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), i = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), _ = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), N = Symbol.iterator, he = "@@iterator";
46
- function X(e) {
42
+ var Me;
43
+ function wt() {
44
+ return Me || (Me = 1, process.env.NODE_ENV !== "production" && function() {
45
+ var o = be, s = Symbol.for("react.element"), r = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), u = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), c = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), D = Symbol.for("react.offscreen"), K = Symbol.iterator, U = "@@iterator";
46
+ function ne(e) {
47
47
  if (e === null || typeof e != "object")
48
48
  return null;
49
- var t = N && e[N] || e[he];
49
+ var t = K && e[K] || e[U];
50
50
  return typeof t == "function" ? t : null;
51
51
  }
52
- var F = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
53
- function E(e) {
52
+ var L = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
53
+ function R(e) {
54
54
  {
55
- for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), u = 1; u < t; u++)
56
- r[u - 1] = arguments[u];
57
- _e("error", e, r);
55
+ for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), d = 1; d < t; d++)
56
+ n[d - 1] = arguments[d];
57
+ $("error", e, n);
58
58
  }
59
59
  }
60
- function _e(e, t, r) {
60
+ function $(e, t, n) {
61
61
  {
62
- var u = F.ReactDebugCurrentFrame, b = u.getStackAddendum();
63
- b !== "" && (t += "%s", r = r.concat([b]));
64
- var m = r.map(function(y) {
65
- return String(y);
62
+ var d = L.ReactDebugCurrentFrame, y = d.getStackAddendum();
63
+ y !== "" && (t += "%s", n = n.concat([y]));
64
+ var k = n.map(function(_) {
65
+ return String(_);
66
66
  });
67
- m.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, m);
67
+ k.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, k);
68
68
  }
69
69
  }
70
- var Q = !1, Z = !1, ee = !1, te = !1, re = !1, D;
71
- D = Symbol.for("react.module.reference");
72
- function ye(e) {
73
- return !!(typeof e == "string" || typeof e == "function" || e === a || e === c || re || e === f || e === _ || e === g || te || e === I || Q || Z || ee || typeof e == "object" && e !== null && (e.$$typeof === x || e.$$typeof === w || e.$$typeof === p || e.$$typeof === i || e.$$typeof === v || // This needs to include all possible module reference object
70
+ var oe = !1, se = !1, ae = !1, ie = !1, W = !1, X;
71
+ X = Symbol.for("react.module.reference");
72
+ function ce(e) {
73
+ return !!(typeof e == "string" || typeof e == "function" || e === a || e === l || W || e === u || e === g || e === b || ie || e === D || oe || se || ae || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === m || e.$$typeof === h || e.$$typeof === c || e.$$typeof === v || // This needs to include all possible module reference object
74
74
  // types supported by any Flight configuration anywhere since
75
75
  // we don't know which Flight build this will end up being used
76
76
  // with.
77
- e.$$typeof === D || e.getModuleId !== void 0));
77
+ e.$$typeof === X || e.getModuleId !== void 0));
78
78
  }
79
- function U(e, t, r) {
80
- var u = e.displayName;
81
- if (u)
82
- return u;
83
- var b = t.displayName || t.name || "";
84
- return b !== "" ? r + "(" + b + ")" : r;
79
+ function Y(e, t, n) {
80
+ var d = e.displayName;
81
+ if (d)
82
+ return d;
83
+ var y = t.displayName || t.name || "";
84
+ return y !== "" ? n + "(" + y + ")" : n;
85
85
  }
86
- function L(e) {
86
+ function M(e) {
87
87
  return e.displayName || "Context";
88
88
  }
89
- function k(e) {
89
+ function A(e) {
90
90
  if (e == null)
91
91
  return null;
92
- if (typeof e.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
92
+ if (typeof e.tag == "number" && R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
93
93
  return e.displayName || e.name || null;
94
94
  if (typeof e == "string")
95
95
  return e;
96
96
  switch (e) {
97
97
  case a:
98
98
  return "Fragment";
99
- case n:
99
+ case r:
100
100
  return "Portal";
101
- case c:
101
+ case l:
102
102
  return "Profiler";
103
- case f:
103
+ case u:
104
104
  return "StrictMode";
105
- case _:
106
- return "Suspense";
107
105
  case g:
106
+ return "Suspense";
107
+ case b:
108
108
  return "SuspenseList";
109
109
  }
110
110
  if (typeof e == "object")
111
111
  switch (e.$$typeof) {
112
- case i:
112
+ case c:
113
113
  var t = e;
114
- return L(t) + ".Consumer";
115
- case p:
116
- var r = e;
117
- return L(r._context) + ".Provider";
114
+ return M(t) + ".Consumer";
115
+ case h:
116
+ var n = e;
117
+ return M(n._context) + ".Provider";
118
118
  case v:
119
- return U(e, e.render, "ForwardRef");
120
- case w:
121
- var u = e.displayName || null;
122
- return u !== null ? u : k(e.type) || "Memo";
123
- case x: {
124
- var b = e, m = b._payload, y = b._init;
119
+ return Y(e, e.render, "ForwardRef");
120
+ case m:
121
+ var d = e.displayName || null;
122
+ return d !== null ? d : A(e.type) || "Memo";
123
+ case C: {
124
+ var y = e, k = y._payload, _ = y._init;
125
125
  try {
126
- return k(y(m));
126
+ return A(_(k));
127
127
  } catch {
128
128
  return null;
129
129
  }
@@ -131,14 +131,14 @@ function Tt() {
131
131
  }
132
132
  return null;
133
133
  }
134
- var C = Object.assign, Y = 0, ge, be, ke, me, Ee, Te, we;
134
+ var S = Object.assign, F = 0, T, N, me, Ee, Te, we, Ce;
135
135
  function Re() {
136
136
  }
137
137
  Re.__reactDisabledLog = !0;
138
- function Ge() {
138
+ function Je() {
139
139
  {
140
- if (Y === 0) {
141
- ge = console.log, be = console.info, ke = console.warn, me = console.error, Ee = console.group, Te = console.groupCollapsed, we = console.groupEnd;
140
+ if (F === 0) {
141
+ T = console.log, N = console.info, me = console.warn, Ee = console.error, Te = console.group, we = console.groupCollapsed, Ce = console.groupEnd;
142
142
  var e = {
143
143
  configurable: !0,
144
144
  enumerable: !0,
@@ -155,336 +155,336 @@ function Tt() {
155
155
  groupEnd: e
156
156
  });
157
157
  }
158
- Y++;
158
+ F++;
159
159
  }
160
160
  }
161
- function He() {
161
+ function Ke() {
162
162
  {
163
- if (Y--, Y === 0) {
163
+ if (F--, F === 0) {
164
164
  var e = {
165
165
  configurable: !0,
166
166
  enumerable: !0,
167
167
  writable: !0
168
168
  };
169
169
  Object.defineProperties(console, {
170
- log: C({}, e, {
171
- value: ge
172
- }),
173
- info: C({}, e, {
174
- value: be
170
+ log: S({}, e, {
171
+ value: T
175
172
  }),
176
- warn: C({}, e, {
177
- value: ke
173
+ info: S({}, e, {
174
+ value: N
178
175
  }),
179
- error: C({}, e, {
176
+ warn: S({}, e, {
180
177
  value: me
181
178
  }),
182
- group: C({}, e, {
179
+ error: S({}, e, {
183
180
  value: Ee
184
181
  }),
185
- groupCollapsed: C({}, e, {
182
+ group: S({}, e, {
186
183
  value: Te
187
184
  }),
188
- groupEnd: C({}, e, {
185
+ groupCollapsed: S({}, e, {
189
186
  value: we
187
+ }),
188
+ groupEnd: S({}, e, {
189
+ value: Ce
190
190
  })
191
191
  });
192
192
  }
193
- Y < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
193
+ F < 0 && R("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
194
194
  }
195
195
  }
196
- var ne = F.ReactCurrentDispatcher, se;
197
- function K(e, t, r) {
196
+ var le = L.ReactCurrentDispatcher, ue;
197
+ function Q(e, t, n) {
198
198
  {
199
- if (se === void 0)
199
+ if (ue === void 0)
200
200
  try {
201
201
  throw Error();
202
- } catch (b) {
203
- var u = b.stack.trim().match(/\n( *(at )?)/);
204
- se = u && u[1] || "";
202
+ } catch (y) {
203
+ var d = y.stack.trim().match(/\n( *(at )?)/);
204
+ ue = d && d[1] || "";
205
205
  }
206
206
  return `
207
- ` + se + e;
207
+ ` + ue + e;
208
208
  }
209
209
  }
210
- var oe = !1, z;
210
+ var de = !1, Z;
211
211
  {
212
- var Je = typeof WeakMap == "function" ? WeakMap : Map;
213
- z = new Je();
212
+ var Xe = typeof WeakMap == "function" ? WeakMap : Map;
213
+ Z = new Xe();
214
214
  }
215
215
  function xe(e, t) {
216
- if (!e || oe)
216
+ if (!e || de)
217
217
  return "";
218
218
  {
219
- var r = z.get(e);
220
- if (r !== void 0)
221
- return r;
219
+ var n = Z.get(e);
220
+ if (n !== void 0)
221
+ return n;
222
222
  }
223
- var u;
224
- oe = !0;
225
- var b = Error.prepareStackTrace;
223
+ var d;
224
+ de = !0;
225
+ var y = Error.prepareStackTrace;
226
226
  Error.prepareStackTrace = void 0;
227
- var m;
228
- m = ne.current, ne.current = null, Ge();
227
+ var k;
228
+ k = le.current, le.current = null, Je();
229
229
  try {
230
230
  if (t) {
231
- var y = function() {
231
+ var _ = function() {
232
232
  throw Error();
233
233
  };
234
- if (Object.defineProperty(y.prototype, "props", {
234
+ if (Object.defineProperty(_.prototype, "props", {
235
235
  set: function() {
236
236
  throw Error();
237
237
  }
238
238
  }), typeof Reflect == "object" && Reflect.construct) {
239
239
  try {
240
- Reflect.construct(y, []);
241
- } catch (A) {
242
- u = A;
240
+ Reflect.construct(_, []);
241
+ } catch (I) {
242
+ d = I;
243
243
  }
244
- Reflect.construct(e, [], y);
244
+ Reflect.construct(e, [], _);
245
245
  } else {
246
246
  try {
247
- y.call();
248
- } catch (A) {
249
- u = A;
247
+ _.call();
248
+ } catch (I) {
249
+ d = I;
250
250
  }
251
- e.call(y.prototype);
251
+ e.call(_.prototype);
252
252
  }
253
253
  } else {
254
254
  try {
255
255
  throw Error();
256
- } catch (A) {
257
- u = A;
256
+ } catch (I) {
257
+ d = I;
258
258
  }
259
259
  e();
260
260
  }
261
- } catch (A) {
262
- if (A && u && typeof A.stack == "string") {
263
- for (var h = A.stack.split(`
264
- `), S = u.stack.split(`
265
- `), T = h.length - 1, R = S.length - 1; T >= 1 && R >= 0 && h[T] !== S[R]; )
266
- R--;
267
- for (; T >= 1 && R >= 0; T--, R--)
268
- if (h[T] !== S[R]) {
269
- if (T !== 1 || R !== 1)
261
+ } catch (I) {
262
+ if (I && d && typeof I.stack == "string") {
263
+ for (var p = I.stack.split(`
264
+ `), x = d.stack.split(`
265
+ `), E = p.length - 1, w = x.length - 1; E >= 1 && w >= 0 && p[E] !== x[w]; )
266
+ w--;
267
+ for (; E >= 1 && w >= 0; E--, w--)
268
+ if (p[E] !== x[w]) {
269
+ if (E !== 1 || w !== 1)
270
270
  do
271
- if (T--, R--, R < 0 || h[T] !== S[R]) {
272
- var O = `
273
- ` + h[T].replace(" at new ", " at ");
274
- return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && z.set(e, O), O;
271
+ if (E--, w--, w < 0 || p[E] !== x[w]) {
272
+ var j = `
273
+ ` + p[E].replace(" at new ", " at ");
274
+ return e.displayName && j.includes("<anonymous>") && (j = j.replace("<anonymous>", e.displayName)), typeof e == "function" && Z.set(e, j), j;
275
275
  }
276
- while (T >= 1 && R >= 0);
276
+ while (E >= 1 && w >= 0);
277
277
  break;
278
278
  }
279
279
  }
280
280
  } finally {
281
- oe = !1, ne.current = m, He(), Error.prepareStackTrace = b;
281
+ de = !1, le.current = k, Ke(), Error.prepareStackTrace = y;
282
282
  }
283
- var $ = e ? e.displayName || e.name : "", $e = $ ? K($) : "";
284
- return typeof e == "function" && z.set(e, $e), $e;
283
+ var B = e ? e.displayName || e.name : "", $e = B ? Q(B) : "";
284
+ return typeof e == "function" && Z.set(e, $e), $e;
285
285
  }
286
- function Xe(e, t, r) {
286
+ function Qe(e, t, n) {
287
287
  return xe(e, !1);
288
288
  }
289
- function Qe(e) {
289
+ function Ze(e) {
290
290
  var t = e.prototype;
291
291
  return !!(t && t.isReactComponent);
292
292
  }
293
- function G(e, t, r) {
293
+ function ee(e, t, n) {
294
294
  if (e == null)
295
295
  return "";
296
296
  if (typeof e == "function")
297
- return xe(e, Qe(e));
297
+ return xe(e, Ze(e));
298
298
  if (typeof e == "string")
299
- return K(e);
299
+ return Q(e);
300
300
  switch (e) {
301
- case _:
302
- return K("Suspense");
303
301
  case g:
304
- return K("SuspenseList");
302
+ return Q("Suspense");
303
+ case b:
304
+ return Q("SuspenseList");
305
305
  }
306
306
  if (typeof e == "object")
307
307
  switch (e.$$typeof) {
308
308
  case v:
309
- return Xe(e.render);
310
- case w:
311
- return G(e.type, t, r);
312
- case x: {
313
- var u = e, b = u._payload, m = u._init;
309
+ return Qe(e.render);
310
+ case m:
311
+ return ee(e.type, t, n);
312
+ case C: {
313
+ var d = e, y = d._payload, k = d._init;
314
314
  try {
315
- return G(m(b), t, r);
315
+ return ee(k(y), t, n);
316
316
  } catch {
317
317
  }
318
318
  }
319
319
  }
320
320
  return "";
321
321
  }
322
- var H = Object.prototype.hasOwnProperty, Se = {}, Ce = F.ReactDebugCurrentFrame;
323
- function J(e) {
322
+ var te = Object.prototype.hasOwnProperty, je = {}, Oe = L.ReactDebugCurrentFrame;
323
+ function re(e) {
324
324
  if (e) {
325
- var t = e._owner, r = G(e.type, e._source, t ? t.type : null);
326
- Ce.setExtraStackFrame(r);
325
+ var t = e._owner, n = ee(e.type, e._source, t ? t.type : null);
326
+ Oe.setExtraStackFrame(n);
327
327
  } else
328
- Ce.setExtraStackFrame(null);
328
+ Oe.setExtraStackFrame(null);
329
329
  }
330
- function Ze(e, t, r, u, b) {
330
+ function et(e, t, n, d, y) {
331
331
  {
332
- var m = Function.call.bind(H);
333
- for (var y in e)
334
- if (m(e, y)) {
335
- var h = void 0;
332
+ var k = Function.call.bind(te);
333
+ for (var _ in e)
334
+ if (k(e, _)) {
335
+ var p = void 0;
336
336
  try {
337
- if (typeof e[y] != "function") {
338
- var S = Error((u || "React class") + ": " + r + " type `" + y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
339
- throw S.name = "Invariant Violation", S;
337
+ if (typeof e[_] != "function") {
338
+ var x = Error((d || "React class") + ": " + n + " type `" + _ + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[_] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
339
+ throw x.name = "Invariant Violation", x;
340
340
  }
341
- h = e[y](t, y, u, r, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
342
- } catch (T) {
343
- h = T;
341
+ p = e[_](t, _, d, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
342
+ } catch (E) {
343
+ p = E;
344
344
  }
345
- h && !(h instanceof Error) && (J(b), E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", u || "React class", r, y, typeof h), J(null)), h instanceof Error && !(h.message in Se) && (Se[h.message] = !0, J(b), E("Failed %s type: %s", r, h.message), J(null));
345
+ p && !(p instanceof Error) && (re(y), R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", d || "React class", n, _, typeof p), re(null)), p instanceof Error && !(p.message in je) && (je[p.message] = !0, re(y), R("Failed %s type: %s", n, p.message), re(null));
346
346
  }
347
347
  }
348
348
  }
349
- var et = Array.isArray;
350
- function ae(e) {
351
- return et(e);
349
+ var tt = Array.isArray;
350
+ function fe(e) {
351
+ return tt(e);
352
352
  }
353
- function tt(e) {
353
+ function rt(e) {
354
354
  {
355
- var t = typeof Symbol == "function" && Symbol.toStringTag, r = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
356
- return r;
355
+ var t = typeof Symbol == "function" && Symbol.toStringTag, n = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
356
+ return n;
357
357
  }
358
358
  }
359
- function rt(e) {
359
+ function nt(e) {
360
360
  try {
361
- return Oe(e), !1;
361
+ return Se(e), !1;
362
362
  } catch {
363
363
  return !0;
364
364
  }
365
365
  }
366
- function Oe(e) {
366
+ function Se(e) {
367
367
  return "" + e;
368
368
  }
369
- function je(e) {
370
- if (rt(e))
371
- return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", tt(e)), Oe(e);
369
+ function Pe(e) {
370
+ if (nt(e))
371
+ return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", rt(e)), Se(e);
372
372
  }
373
- var M = F.ReactCurrentOwner, nt = {
373
+ var q = L.ReactCurrentOwner, ot = {
374
374
  key: !0,
375
375
  ref: !0,
376
376
  __self: !0,
377
377
  __source: !0
378
- }, Pe, Ae, ie;
379
- ie = {};
378
+ }, Ae, Fe, ve;
379
+ ve = {};
380
380
  function st(e) {
381
- if (H.call(e, "ref")) {
381
+ if (te.call(e, "ref")) {
382
382
  var t = Object.getOwnPropertyDescriptor(e, "ref").get;
383
383
  if (t && t.isReactWarning)
384
384
  return !1;
385
385
  }
386
386
  return e.ref !== void 0;
387
387
  }
388
- function ot(e) {
389
- if (H.call(e, "key")) {
388
+ function at(e) {
389
+ if (te.call(e, "key")) {
390
390
  var t = Object.getOwnPropertyDescriptor(e, "key").get;
391
391
  if (t && t.isReactWarning)
392
392
  return !1;
393
393
  }
394
394
  return e.key !== void 0;
395
395
  }
396
- function at(e, t) {
397
- if (typeof e.ref == "string" && M.current && t && M.current.stateNode !== t) {
398
- var r = k(M.current.type);
399
- ie[r] || (E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', k(M.current.type), e.ref), ie[r] = !0);
396
+ function it(e, t) {
397
+ if (typeof e.ref == "string" && q.current && t && q.current.stateNode !== t) {
398
+ var n = A(q.current.type);
399
+ ve[n] || (R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', A(q.current.type), e.ref), ve[n] = !0);
400
400
  }
401
401
  }
402
- function it(e, t) {
402
+ function ct(e, t) {
403
403
  {
404
- var r = function() {
405
- Pe || (Pe = !0, E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
404
+ var n = function() {
405
+ Ae || (Ae = !0, R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
406
406
  };
407
- r.isReactWarning = !0, Object.defineProperty(e, "key", {
408
- get: r,
407
+ n.isReactWarning = !0, Object.defineProperty(e, "key", {
408
+ get: n,
409
409
  configurable: !0
410
410
  });
411
411
  }
412
412
  }
413
- function ct(e, t) {
413
+ function lt(e, t) {
414
414
  {
415
- var r = function() {
416
- Ae || (Ae = !0, E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
415
+ var n = function() {
416
+ Fe || (Fe = !0, R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
417
417
  };
418
- r.isReactWarning = !0, Object.defineProperty(e, "ref", {
419
- get: r,
418
+ n.isReactWarning = !0, Object.defineProperty(e, "ref", {
419
+ get: n,
420
420
  configurable: !0
421
421
  });
422
422
  }
423
423
  }
424
- var lt = function(e, t, r, u, b, m, y) {
425
- var h = {
424
+ var ut = function(e, t, n, d, y, k, _) {
425
+ var p = {
426
426
  // This tag allows us to uniquely identify this as a React Element
427
- $$typeof: o,
427
+ $$typeof: s,
428
428
  // Built-in properties that belong on the element
429
429
  type: e,
430
430
  key: t,
431
- ref: r,
432
- props: y,
431
+ ref: n,
432
+ props: _,
433
433
  // Record the component responsible for creating this element.
434
- _owner: m
434
+ _owner: k
435
435
  };
436
- return h._store = {}, Object.defineProperty(h._store, "validated", {
436
+ return p._store = {}, Object.defineProperty(p._store, "validated", {
437
437
  configurable: !1,
438
438
  enumerable: !1,
439
439
  writable: !0,
440
440
  value: !1
441
- }), Object.defineProperty(h, "_self", {
441
+ }), Object.defineProperty(p, "_self", {
442
442
  configurable: !1,
443
443
  enumerable: !1,
444
444
  writable: !1,
445
- value: u
446
- }), Object.defineProperty(h, "_source", {
445
+ value: d
446
+ }), Object.defineProperty(p, "_source", {
447
447
  configurable: !1,
448
448
  enumerable: !1,
449
449
  writable: !1,
450
- value: b
451
- }), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
450
+ value: y
451
+ }), Object.freeze && (Object.freeze(p.props), Object.freeze(p)), p;
452
452
  };
453
- function ut(e, t, r, u, b) {
453
+ function dt(e, t, n, d, y) {
454
454
  {
455
- var m, y = {}, h = null, S = null;
456
- r !== void 0 && (je(r), h = "" + r), ot(t) && (je(t.key), h = "" + t.key), st(t) && (S = t.ref, at(t, b));
457
- for (m in t)
458
- H.call(t, m) && !nt.hasOwnProperty(m) && (y[m] = t[m]);
455
+ var k, _ = {}, p = null, x = null;
456
+ n !== void 0 && (Pe(n), p = "" + n), at(t) && (Pe(t.key), p = "" + t.key), st(t) && (x = t.ref, it(t, y));
457
+ for (k in t)
458
+ te.call(t, k) && !ot.hasOwnProperty(k) && (_[k] = t[k]);
459
459
  if (e && e.defaultProps) {
460
- var T = e.defaultProps;
461
- for (m in T)
462
- y[m] === void 0 && (y[m] = T[m]);
460
+ var E = e.defaultProps;
461
+ for (k in E)
462
+ _[k] === void 0 && (_[k] = E[k]);
463
463
  }
464
- if (h || S) {
465
- var R = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
466
- h && it(y, R), S && ct(y, R);
464
+ if (p || x) {
465
+ var w = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
466
+ p && ct(_, w), x && lt(_, w);
467
467
  }
468
- return lt(e, h, S, b, u, M.current, y);
468
+ return ut(e, p, x, y, d, q.current, _);
469
469
  }
470
470
  }
471
- var ce = F.ReactCurrentOwner, Ne = F.ReactDebugCurrentFrame;
472
- function W(e) {
471
+ var he = L.ReactCurrentOwner, Ne = L.ReactDebugCurrentFrame;
472
+ function V(e) {
473
473
  if (e) {
474
- var t = e._owner, r = G(e.type, e._source, t ? t.type : null);
475
- Ne.setExtraStackFrame(r);
474
+ var t = e._owner, n = ee(e.type, e._source, t ? t.type : null);
475
+ Ne.setExtraStackFrame(n);
476
476
  } else
477
477
  Ne.setExtraStackFrame(null);
478
478
  }
479
- var le;
480
- le = !1;
481
- function ue(e) {
482
- return typeof e == "object" && e !== null && e.$$typeof === o;
479
+ var pe;
480
+ pe = !1;
481
+ function _e(e) {
482
+ return typeof e == "object" && e !== null && e.$$typeof === s;
483
483
  }
484
- function Fe() {
484
+ function Ie() {
485
485
  {
486
- if (ce.current) {
487
- var e = k(ce.current.type);
486
+ if (he.current) {
487
+ var e = A(he.current.type);
488
488
  if (e)
489
489
  return `
490
490
 
@@ -493,344 +493,353 @@ Check the render method of \`` + e + "`.";
493
493
  return "";
494
494
  }
495
495
  }
496
- function dt(e) {
496
+ function ft(e) {
497
497
  {
498
498
  if (e !== void 0) {
499
- var t = e.fileName.replace(/^.*[\\\/]/, ""), r = e.lineNumber;
499
+ var t = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber;
500
500
  return `
501
501
 
502
- Check your code at ` + t + ":" + r + ".";
502
+ Check your code at ` + t + ":" + n + ".";
503
503
  }
504
504
  return "";
505
505
  }
506
506
  }
507
- var Ie = {};
508
- function ft(e) {
507
+ var De = {};
508
+ function vt(e) {
509
509
  {
510
- var t = Fe();
510
+ var t = Ie();
511
511
  if (!t) {
512
- var r = typeof e == "string" ? e : e.displayName || e.name;
513
- r && (t = `
512
+ var n = typeof e == "string" ? e : e.displayName || e.name;
513
+ n && (t = `
514
514
 
515
- Check the top-level render call using <` + r + ">.");
515
+ Check the top-level render call using <` + n + ">.");
516
516
  }
517
517
  return t;
518
518
  }
519
519
  }
520
- function De(e, t) {
520
+ function Le(e, t) {
521
521
  {
522
522
  if (!e._store || e._store.validated || e.key != null)
523
523
  return;
524
524
  e._store.validated = !0;
525
- var r = ft(t);
526
- if (Ie[r])
525
+ var n = vt(t);
526
+ if (De[n])
527
527
  return;
528
- Ie[r] = !0;
529
- var u = "";
530
- e && e._owner && e._owner !== ce.current && (u = " It was passed a child from " + k(e._owner.type) + "."), W(e), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', r, u), W(null);
528
+ De[n] = !0;
529
+ var d = "";
530
+ e && e._owner && e._owner !== he.current && (d = " It was passed a child from " + A(e._owner.type) + "."), V(e), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, d), V(null);
531
531
  }
532
532
  }
533
- function Le(e, t) {
533
+ function We(e, t) {
534
534
  {
535
535
  if (typeof e != "object")
536
536
  return;
537
- if (ae(e))
538
- for (var r = 0; r < e.length; r++) {
539
- var u = e[r];
540
- ue(u) && De(u, t);
537
+ if (fe(e))
538
+ for (var n = 0; n < e.length; n++) {
539
+ var d = e[n];
540
+ _e(d) && Le(d, t);
541
541
  }
542
- else if (ue(e))
542
+ else if (_e(e))
543
543
  e._store && (e._store.validated = !0);
544
544
  else if (e) {
545
- var b = X(e);
546
- if (typeof b == "function" && b !== e.entries)
547
- for (var m = b.call(e), y; !(y = m.next()).done; )
548
- ue(y.value) && De(y.value, t);
545
+ var y = ne(e);
546
+ if (typeof y == "function" && y !== e.entries)
547
+ for (var k = y.call(e), _; !(_ = k.next()).done; )
548
+ _e(_.value) && Le(_.value, t);
549
549
  }
550
550
  }
551
551
  }
552
- function vt(e) {
552
+ function ht(e) {
553
553
  {
554
554
  var t = e.type;
555
555
  if (t == null || typeof t == "string")
556
556
  return;
557
- var r;
557
+ var n;
558
558
  if (typeof t == "function")
559
- r = t.propTypes;
559
+ n = t.propTypes;
560
560
  else if (typeof t == "object" && (t.$$typeof === v || // Note: Memo only checks outer props here.
561
561
  // Inner props are checked in the reconciler.
562
- t.$$typeof === w))
563
- r = t.propTypes;
562
+ t.$$typeof === m))
563
+ n = t.propTypes;
564
564
  else
565
565
  return;
566
- if (r) {
567
- var u = k(t);
568
- Ze(r, e.props, "prop", u, e);
569
- } else if (t.PropTypes !== void 0 && !le) {
570
- le = !0;
571
- var b = k(t);
572
- E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown");
566
+ if (n) {
567
+ var d = A(t);
568
+ et(n, e.props, "prop", d, e);
569
+ } else if (t.PropTypes !== void 0 && !pe) {
570
+ pe = !0;
571
+ var y = A(t);
572
+ R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", y || "Unknown");
573
573
  }
574
- typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
574
+ typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
575
575
  }
576
576
  }
577
577
  function pt(e) {
578
578
  {
579
- for (var t = Object.keys(e.props), r = 0; r < t.length; r++) {
580
- var u = t[r];
581
- if (u !== "children" && u !== "key") {
582
- W(e), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", u), W(null);
579
+ for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
580
+ var d = t[n];
581
+ if (d !== "children" && d !== "key") {
582
+ V(e), R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", d), V(null);
583
583
  break;
584
584
  }
585
585
  }
586
- e.ref !== null && (W(e), E("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
586
+ e.ref !== null && (V(e), R("Invalid attribute `ref` supplied to `React.Fragment`."), V(null));
587
587
  }
588
588
  }
589
- function We(e, t, r, u, b, m) {
589
+ function Ue(e, t, n, d, y, k) {
590
590
  {
591
- var y = ye(e);
592
- if (!y) {
593
- var h = "";
594
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (h += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
595
- var S = dt(b);
596
- S ? h += S : h += Fe();
597
- var T;
598
- e === null ? T = "null" : ae(e) ? T = "array" : e !== void 0 && e.$$typeof === o ? (T = "<" + (k(e.type) || "Unknown") + " />", h = " Did you accidentally export a JSX literal instead of a component?") : T = typeof e, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", T, h);
591
+ var _ = ce(e);
592
+ if (!_) {
593
+ var p = "";
594
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (p += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
595
+ var x = ft(y);
596
+ x ? p += x : p += Ie();
597
+ var E;
598
+ e === null ? E = "null" : fe(e) ? E = "array" : e !== void 0 && e.$$typeof === s ? (E = "<" + (A(e.type) || "Unknown") + " />", p = " Did you accidentally export a JSX literal instead of a component?") : E = typeof e, R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", E, p);
599
599
  }
600
- var R = ut(e, t, r, b, m);
601
- if (R == null)
602
- return R;
603
- if (y) {
604
- var O = t.children;
605
- if (O !== void 0)
606
- if (u)
607
- if (ae(O)) {
608
- for (var $ = 0; $ < O.length; $++)
609
- Le(O[$], e);
610
- Object.freeze && Object.freeze(O);
600
+ var w = dt(e, t, n, y, k);
601
+ if (w == null)
602
+ return w;
603
+ if (_) {
604
+ var j = t.children;
605
+ if (j !== void 0)
606
+ if (d)
607
+ if (fe(j)) {
608
+ for (var B = 0; B < j.length; B++)
609
+ We(j[B], e);
610
+ Object.freeze && Object.freeze(j);
611
611
  } else
612
- E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
612
+ R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
613
613
  else
614
- Le(O, e);
614
+ We(j, e);
615
615
  }
616
- return e === a ? pt(R) : vt(R), R;
616
+ return e === a ? pt(w) : ht(w), w;
617
617
  }
618
618
  }
619
- function ht(e, t, r) {
620
- return We(e, t, r, !0);
619
+ function _t(e, t, n) {
620
+ return Ue(e, t, n, !0);
621
621
  }
622
- function _t(e, t, r) {
623
- return We(e, t, r, !1);
622
+ function gt(e, t, n) {
623
+ return Ue(e, t, n, !1);
624
624
  }
625
- var yt = _t, gt = ht;
626
- q.Fragment = a, q.jsx = yt, q.jsxs = gt;
627
- }()), q;
625
+ var yt = gt, bt = _t;
626
+ H.Fragment = a, H.jsx = yt, H.jsxs = bt;
627
+ }()), H;
628
628
  }
629
- process.env.NODE_ENV === "production" ? fe.exports = Et() : fe.exports = Tt();
630
- var d = fe.exports;
631
- const Ve = "default", wt = (s, o) => async (...n) => {
632
- var x;
633
- const [a, f, ...c] = n, p = f ? { ...f } : { method: "GET" };
634
- let i = new Headers();
635
- p.headers && (i = p.headers instanceof Headers ? p.headers : new Headers(p.headers));
636
- const _ = await o().getValidTokenAsync(), g = (x = _ == null ? void 0 : _.tokens) == null ? void 0 : x.accessToken;
637
- i.has("Accept") || i.set("Accept", "application/json"), g && (i.set("Authorization", `Bearer ${g}`), p.credentials || (p.credentials = "same-origin"));
638
- const w = { ...p, headers: i };
639
- return await s(a, w, ...c);
640
- }, qt = (s = null, o = Ve) => (n) => (a) => {
641
- const { fetch: f } = Rt(s || a.fetch, o);
642
- return /* @__PURE__ */ d.jsx(n, { ...a, fetch: f });
643
- }, Rt = (s = null, o = Ve) => {
644
- const n = s || window.fetch, a = l.get;
645
- return { fetch: bt(
646
- (c, p) => wt(n, () => a(o))(c, p),
647
- [n, o]
629
+ process.env.NODE_ENV === "production" ? ye.exports = Tt() : ye.exports = wt();
630
+ var i = ye.exports;
631
+ const Be = "default", Ct = (o, s) => async (...r) => {
632
+ var C;
633
+ const [a, u, ...l] = r, h = u ? { ...u } : { method: "GET" };
634
+ let c = new Headers();
635
+ h.headers && (c = h.headers instanceof Headers ? h.headers : new Headers(h.headers));
636
+ const g = await s().getValidTokenAsync(), b = (C = g == null ? void 0 : g.tokens) == null ? void 0 : C.accessToken;
637
+ c.has("Accept") || c.set("Accept", "application/json"), b && (c.set("Authorization", `Bearer ${b}`), h.credentials || (h.credentials = "same-origin"));
638
+ const m = { ...h, headers: c };
639
+ return await o(a, m, ...l);
640
+ }, Gt = (o = null, s = Be) => (r) => (a) => {
641
+ const { fetch: u } = Rt(o || a.fetch, s);
642
+ return /* @__PURE__ */ i.jsx(r, { ...a, fetch: u });
643
+ }, Rt = (o = null, s = Be) => {
644
+ const r = o || window.fetch, a = f.get;
645
+ return { fetch: kt(
646
+ (l, h) => Ct(r, () => a(s))(l, h),
647
+ [r, s]
648
648
  ) };
649
- }, Be = () => /* @__PURE__ */ d.jsx("div", { className: "oidc-authenticating", children: /* @__PURE__ */ d.jsxs("div", { className: "oidc-authenticating__container", children: [
650
- /* @__PURE__ */ d.jsx("h1", { className: "oidc-authenticating__title", children: "Error authentication" }),
651
- /* @__PURE__ */ d.jsx("p", { className: "oidc-authenticating__content", children: "An error occurred during authentication." })
652
- ] }) }), xt = () => /* @__PURE__ */ d.jsx("div", { className: "oidc-authenticating", children: /* @__PURE__ */ d.jsxs("div", { className: "oidc-authenticating__container", children: [
653
- /* @__PURE__ */ d.jsx("h1", { className: "oidc-authenticating__title", children: "Authentication in progress" }),
654
- /* @__PURE__ */ d.jsx("p", { className: "oidc-authenticating__content", children: "You will be redirected to the login page." })
655
- ] }) }), St = () => Math.random().toString(36).substr(2, 6), Ct = (s, o) => (n, a) => {
656
- if (typeof s.CustomEvent == "function")
657
- return new s.CustomEvent(n, a);
658
- const f = a || { bubbles: !1, cancelable: !1, detail: void 0 }, c = o.createEvent("CustomEvent");
659
- return c.initCustomEvent(n, f.bubbles, f.cancelable, f.detail), c.prototype = s.Event.prototype, c;
660
- }, Ot = (s, o, n) => ({
661
- replaceState: (a, f) => {
662
- const c = n(), p = f || s.history.state;
663
- s.history.replaceState({ key: c, state: p }, null, a), s.dispatchEvent(o("popstate"));
649
+ }, qe = () => /* @__PURE__ */ i.jsx("div", { className: "oidc-authenticating", children: /* @__PURE__ */ i.jsxs("div", { className: "oidc-authenticating__container", children: [
650
+ /* @__PURE__ */ i.jsx("h1", { className: "oidc-authenticating__title", children: "Error authentication" }),
651
+ /* @__PURE__ */ i.jsx("p", { className: "oidc-authenticating__content", children: "An error occurred during authentication." })
652
+ ] }) }), xt = () => /* @__PURE__ */ i.jsx("div", { className: "oidc-authenticating", children: /* @__PURE__ */ i.jsxs("div", { className: "oidc-authenticating__container", children: [
653
+ /* @__PURE__ */ i.jsx("h1", { className: "oidc-authenticating__title", children: "Authentication in progress" }),
654
+ /* @__PURE__ */ i.jsx("p", { className: "oidc-authenticating__content", children: "You will be redirected to the login page." })
655
+ ] }) }), jt = () => Math.random().toString(36).substr(2, 6), Ot = (o, s) => (r, a) => {
656
+ if (typeof o.CustomEvent == "function")
657
+ return new o.CustomEvent(r, a);
658
+ const u = a || { bubbles: !1, cancelable: !1, detail: void 0 }, l = s.createEvent("CustomEvent");
659
+ return l.initCustomEvent(r, u.bubbles, u.cancelable, u.detail), l.prototype = o.Event.prototype, l;
660
+ }, St = (o, s, r) => ({
661
+ replaceState: (a, u) => {
662
+ const l = r(), h = u || o.history.state;
663
+ o.history.replaceState({ key: l, state: h }, null, a), o.dispatchEvent(s("popstate"));
664
664
  }
665
- }), jt = () => Ot(window, Ct(window, document), St), qe = () => /* @__PURE__ */ d.jsx("div", { className: "oidc-callback", children: /* @__PURE__ */ d.jsxs("div", { className: "oidc-callback__container", children: [
666
- /* @__PURE__ */ d.jsx("h1", { className: "oidc-callback__title", children: "Authentication complete" }),
667
- /* @__PURE__ */ d.jsx("p", { className: "oidc-callback__content", children: "You will be redirected to your application." })
668
- ] }) }), Pt = ({ callBackError: s, callBackSuccess: o, configurationName: n, withCustomHistory: a }) => {
669
- const [f, c] = P(!1);
670
- j(() => {
665
+ }), Pt = () => St(window, Ot(window, document), jt), ze = () => /* @__PURE__ */ i.jsx("div", { className: "oidc-callback", children: /* @__PURE__ */ i.jsxs("div", { className: "oidc-callback__container", children: [
666
+ /* @__PURE__ */ i.jsx("h1", { className: "oidc-callback__title", children: "Authentication complete" }),
667
+ /* @__PURE__ */ i.jsx("p", { className: "oidc-callback__content", children: "You will be redirected to your application." })
668
+ ] }) }), At = ({ callBackError: o, callBackSuccess: s, configurationName: r, withCustomHistory: a }) => {
669
+ const [u, l] = P(!1);
670
+ O(() => {
671
671
  let v = !0;
672
672
  return (async () => {
673
- const g = l.get;
673
+ const b = f.get;
674
674
  try {
675
- const { callbackPath: w } = await g(n).loginCallbackAsync();
676
- (a ? a() : jt()).replaceState(w || "/");
677
- } catch (w) {
678
- v && (console.warn(w), c(!0));
675
+ const { callbackPath: m } = await b(r).loginCallbackAsync();
676
+ (a ? a() : Pt()).replaceState(m || "/");
677
+ } catch (m) {
678
+ v && (console.warn(m), l(!0));
679
679
  }
680
680
  })(), () => {
681
681
  v = !1;
682
682
  };
683
683
  }, []);
684
- const p = s || Be, i = o || qe;
685
- return f ? /* @__PURE__ */ d.jsx(p, { configurationName: n }) : /* @__PURE__ */ d.jsx(i, { configurationName: n });
686
- }, At = () => /* @__PURE__ */ d.jsx("div", { className: "oidc-serviceworker", children: /* @__PURE__ */ d.jsxs("div", { className: "oidc-serviceworker__container", children: [
687
- /* @__PURE__ */ d.jsx("h1", { className: "oidc-serviceworker__title", children: "Unable to authenticate on this browser" }),
688
- /* @__PURE__ */ d.jsx("p", { className: "oidc-serviceworker__content", children: "Your browser is not secure enough to make authentication work. Try updating your browser or use a newer browser." })
689
- ] }) }), Nt = () => /* @__PURE__ */ d.jsx("div", { className: "oidc-session-lost", children: /* @__PURE__ */ d.jsxs("div", { className: "oidc-session-lost__container", children: [
690
- /* @__PURE__ */ d.jsx("h1", { className: "oidc-session-lost__title", children: "Session timed out" }),
691
- /* @__PURE__ */ d.jsx("p", { className: "oidc-session-lost__content", children: "Your session has expired. Please re-authenticate." })
692
- ] }) }), Ft = ({ configurationName: s }) => (j(() => {
684
+ const h = o || qe, c = s || ze;
685
+ return u ? /* @__PURE__ */ i.jsx(h, { configurationName: r }) : /* @__PURE__ */ i.jsx(c, { configurationName: r });
686
+ }, Ft = () => /* @__PURE__ */ i.jsx("span", { className: "oidc-loading", children: "Loading" }), Nt = () => /* @__PURE__ */ i.jsx("div", { className: "oidc-serviceworker", children: /* @__PURE__ */ i.jsxs("div", { className: "oidc-serviceworker__container", children: [
687
+ /* @__PURE__ */ i.jsx("h1", { className: "oidc-serviceworker__title", children: "Unable to authenticate on this browser" }),
688
+ /* @__PURE__ */ i.jsx("p", { className: "oidc-serviceworker__content", children: "Your browser is not secure enough to make authentication work. Try updating your browser or use a newer browser." })
689
+ ] }) }), It = () => /* @__PURE__ */ i.jsx("div", { className: "oidc-session-lost", children: /* @__PURE__ */ i.jsxs("div", { className: "oidc-session-lost__container", children: [
690
+ /* @__PURE__ */ i.jsx("h1", { className: "oidc-session-lost__title", children: "Session timed out" }),
691
+ /* @__PURE__ */ i.jsx("p", { className: "oidc-session-lost__content", children: "Your session has expired. Please re-authenticate." })
692
+ ] }) }), Dt = ({ configurationName: o }) => (O(() => {
693
693
  (async () => {
694
- const n = l.get;
695
- n(s).silentLoginCallbackAsync();
694
+ const r = f.get;
695
+ r(o).silentLoginCallbackAsync();
696
696
  })();
697
- }, []), /* @__PURE__ */ d.jsx(d.Fragment, {})), It = ({ configurationName: s }) => {
698
- const o = kt(window.location.href), n = l.get, a = n(s);
699
- let f = null;
700
- for (const [c, p] of Object.entries(o))
701
- c === "state" || c === "scope" || (f === null && (f = {}), f[c] = p);
702
- return j(() => {
703
- a.tokens || a.loginAsync(null, f, !0, o.scope);
704
- }, []), /* @__PURE__ */ d.jsx(d.Fragment, {});
705
- }, Dt = ({
706
- callbackErrorComponent: s,
707
- callbackSuccessComponent: o,
708
- redirect_uri: n,
697
+ }, []), /* @__PURE__ */ i.jsx(i.Fragment, {})), Lt = ({ configurationName: o }) => {
698
+ const s = mt(window.location.href), r = f.get, a = r(o);
699
+ let u = null;
700
+ for (const [l, h] of Object.entries(s))
701
+ l === "state" || l === "scope" || (u === null && (u = {}), u[l] = h);
702
+ return O(() => {
703
+ a.tokens || a.loginAsync(null, u, !0, s.scope);
704
+ }, []), /* @__PURE__ */ i.jsx(i.Fragment, {});
705
+ }, Wt = ({
706
+ callbackErrorComponent: o,
707
+ callbackSuccessComponent: s,
708
+ redirect_uri: r,
709
709
  silent_redirect_uri: a,
710
- silent_login_uri: f,
711
- children: c,
712
- configurationName: p,
713
- withCustomHistory: i = null
710
+ silent_login_uri: u,
711
+ children: l,
712
+ configurationName: h,
713
+ withCustomHistory: c = null
714
714
  }) => {
715
- const v = window ? V(window.location.href) : "", [_, g] = P(v);
716
- j(() => {
717
- const x = () => g(V(window.location.href));
718
- return x(), window.addEventListener("popstate", x, !1), () => window.removeEventListener("popstate", x, !1);
715
+ const v = window ? z(window.location.href) : "", [g, b] = P(v);
716
+ O(() => {
717
+ const C = () => b(z(window.location.href));
718
+ return C(), window.addEventListener("popstate", C, !1), () => window.removeEventListener("popstate", C, !1);
719
719
  }, []);
720
- const w = V(n);
721
- if (a && _ === V(a))
722
- return /* @__PURE__ */ d.jsx(Ft, { configurationName: p });
723
- if (f && _ === V(f))
724
- return /* @__PURE__ */ d.jsx(It, { configurationName: p });
725
- switch (_) {
726
- case w:
727
- return /* @__PURE__ */ d.jsx(Pt, { callBackError: s, callBackSuccess: o, configurationName: p, withCustomHistory: i });
720
+ const m = z(r);
721
+ if (a && g === z(a))
722
+ return /* @__PURE__ */ i.jsx(Dt, { configurationName: h });
723
+ if (u && g === z(u))
724
+ return /* @__PURE__ */ i.jsx(Lt, { configurationName: h });
725
+ switch (g) {
726
+ case m:
727
+ return /* @__PURE__ */ i.jsx(At, { callBackError: o, callBackSuccess: s, configurationName: h, withCustomHistory: c });
728
728
  default:
729
- return /* @__PURE__ */ d.jsx(d.Fragment, { children: c });
729
+ return /* @__PURE__ */ i.jsx(i.Fragment, { children: l });
730
730
  }
731
- }, Lt = ve.memo(Dt), Me = { name: "", data: null }, Wt = ({ children: s, configurationName: o }) => {
732
- const n = l.get, a = n(o);
733
- return j(() => {
734
- a && a.tryKeepExistingSessionAsync();
735
- }, [o]), /* @__PURE__ */ d.jsx(d.Fragment, { children: s });
736
- }, Kt = ({
737
- children: s,
738
- configuration: o,
739
- configurationName: n = "default",
740
- callbackSuccessComponent: a = qe,
741
- authenticatingComponent: f = xt,
742
- serviceWorkerNotSupportedComponent: c = At,
743
- authenticatingErrorComponent: p = Be,
744
- sessionLostComponent: i = Nt,
745
- onSessionLost: v = null,
746
- onLogoutFromAnotherTab: _ = null,
747
- onLogoutFromSameTab: g = null,
748
- withCustomHistory: w = null,
749
- onEvent: x = null,
750
- getFetch: I = null
731
+ }, Ut = be.memo(Wt), Ve = { name: "", data: null }, $t = ({ loadingComponent: o, children: s, configurationName: r }) => {
732
+ const [a, u] = P(!0), l = f.get, h = l(r);
733
+ O(() => {
734
+ let v = !0;
735
+ return h && h.tryKeepExistingSessionAsync().then(() => {
736
+ v && u(!1);
737
+ }), () => {
738
+ v = !1;
739
+ };
740
+ }, [r]);
741
+ const c = o;
742
+ return /* @__PURE__ */ i.jsx(i.Fragment, { children: a ? /* @__PURE__ */ i.jsx(c, { configurationName: r }) : /* @__PURE__ */ i.jsx(i.Fragment, { children: s }) });
743
+ }, J = ({ isLoading: o, loadingComponent: s, children: r, configurationName: a }) => {
744
+ const u = s;
745
+ return o ? /* @__PURE__ */ i.jsx(u, { configurationName: a, children: r }) : /* @__PURE__ */ i.jsx(i.Fragment, { children: r });
746
+ }, Ht = ({
747
+ children: o,
748
+ configuration: s,
749
+ configurationName: r = "default",
750
+ callbackSuccessComponent: a = ze,
751
+ authenticatingComponent: u = xt,
752
+ loadingComponent: l = Ft,
753
+ serviceWorkerNotSupportedComponent: h = Nt,
754
+ authenticatingErrorComponent: c = qe,
755
+ sessionLostComponent: v = It,
756
+ onSessionLost: g = null,
757
+ onLogoutFromAnotherTab: b = null,
758
+ onLogoutFromSameTab: m = null,
759
+ withCustomHistory: C = null,
760
+ onEvent: D = null,
761
+ getFetch: K = null
751
762
  }) => {
752
- const N = (U = "default") => l.getOrCreate(I ?? mt)(o, U), [he, X] = P(!0), [F, E] = P(Me), [_e, Q] = P("default");
753
- j(() => {
754
- const L = N(n).subscribeEvents((k, C) => {
755
- x && x(n, k, C);
763
+ const U = (S = "default") => f.getOrCreate(K ?? Et)(s, S), [ne, L] = P(!0), [R, $] = P(Ve), [oe, se] = P("default");
764
+ O(() => {
765
+ const F = U(r).subscribeEvents((T, N) => {
766
+ D && D(r, T, N);
756
767
  });
757
768
  return () => {
758
- N(n).removeEventSubscription(L);
769
+ U(r).removeEventSubscription(F);
759
770
  };
760
- }, [n, x]), j(() => {
761
- const L = N(n).subscribeEvents((k, C) => {
762
- if (k === l.eventNames.refreshTokensAsync_error || k === l.eventNames.syncTokensAsync_error) {
763
- if (v != null) {
764
- v();
771
+ }, [r, D]), O(() => {
772
+ const F = U(r).subscribeEvents((T, N) => {
773
+ if (T === f.eventNames.refreshTokensAsync_error || T === f.eventNames.syncTokensAsync_error) {
774
+ if (g != null) {
775
+ g();
765
776
  return;
766
777
  }
767
- E({ name: k, data: C });
768
- } else if (k === l.eventNames.logout_from_another_tab) {
769
- if (_ != null) {
770
- _();
778
+ $({ name: T, data: N });
779
+ } else if (T === f.eventNames.logout_from_another_tab) {
780
+ if (b != null) {
781
+ b();
771
782
  return;
772
783
  }
773
- E({ name: k, data: C });
784
+ $({ name: T, data: N });
774
785
  } else
775
- k === l.eventNames.logout_from_same_tab ? g != null && g() : k === l.eventNames.loginAsync_begin || k === l.eventNames.loginCallbackAsync_end || k === l.eventNames.loginAsync_error || k === l.eventNames.loginCallbackAsync_error ? E({ name: k, data: C }) : k === l.eventNames.service_worker_not_supported_by_browser && o.service_worker_only === !0 && E({ name: k, data: C });
786
+ T === f.eventNames.logout_from_same_tab ? m != null && m() : T === f.eventNames.loginAsync_begin || T === f.eventNames.loginCallbackAsync_end || T === f.eventNames.loginAsync_error || T === f.eventNames.loginCallbackAsync_error ? $({ name: T, data: N }) : T === f.eventNames.service_worker_not_supported_by_browser && s.service_worker_only === !0 && $({ name: T, data: N });
776
787
  });
777
- return Q(n), X(!1), () => {
778
- N(n).removeEventSubscription(L), E(Me);
788
+ return se(r), L(!1), () => {
789
+ U(r).removeEventSubscription(F), $(Ve);
779
790
  };
780
- }, [o, n]);
781
- const Z = i, ee = f, te = c, re = p, D = N(n);
782
- switch (F.name) {
783
- case l.eventNames.service_worker_not_supported_by_browser:
784
- return /* @__PURE__ */ d.jsx(te, { configurationName: n });
785
- case l.eventNames.loginAsync_begin:
786
- return /* @__PURE__ */ d.jsx(ee, { configurationName: n });
787
- case l.eventNames.loginAsync_error:
788
- case l.eventNames.loginCallbackAsync_error:
789
- return /* @__PURE__ */ d.jsx(re, { configurationName: n });
790
- case l.eventNames.refreshTokensAsync_error:
791
- case l.eventNames.syncTokensAsync_error:
792
- case l.eventNames.logout_from_another_tab:
793
- return /* @__PURE__ */ d.jsx(Z, { configurationName: n });
791
+ }, [s, r]);
792
+ const ae = v, ie = u, W = l, X = h, ce = c, Y = ne || oe !== r, M = U(r);
793
+ switch (R.name) {
794
+ case f.eventNames.service_worker_not_supported_by_browser:
795
+ return /* @__PURE__ */ i.jsx(J, { loadingComponent: W, isLoading: Y, configurationName: r, children: /* @__PURE__ */ i.jsx(X, { configurationName: r }) });
796
+ case f.eventNames.loginAsync_begin:
797
+ return /* @__PURE__ */ i.jsx(J, { loadingComponent: W, isLoading: Y, configurationName: r, children: /* @__PURE__ */ i.jsx(ie, { configurationName: r }) });
798
+ case f.eventNames.loginAsync_error:
799
+ case f.eventNames.loginCallbackAsync_error:
800
+ return /* @__PURE__ */ i.jsx(J, { loadingComponent: W, isLoading: Y, configurationName: r, children: /* @__PURE__ */ i.jsx(ce, { configurationName: r }) });
801
+ case f.eventNames.refreshTokensAsync_error:
802
+ case f.eventNames.syncTokensAsync_error:
803
+ case f.eventNames.logout_from_another_tab:
804
+ return /* @__PURE__ */ i.jsx(J, { loadingComponent: W, isLoading: Y, configurationName: r, children: /* @__PURE__ */ i.jsx(ae, { configurationName: r }) });
794
805
  default:
795
- return /* @__PURE__ */ d.jsx(
796
- Lt,
806
+ return /* @__PURE__ */ i.jsx(J, { loadingComponent: W, isLoading: Y, configurationName: r, children: /* @__PURE__ */ i.jsx(
807
+ Ut,
797
808
  {
798
- redirect_uri: D.configuration.redirect_uri,
799
- silent_redirect_uri: D.configuration.silent_redirect_uri,
800
- silent_login_uri: D.configuration.silent_login_uri,
809
+ redirect_uri: M.configuration.redirect_uri,
810
+ silent_redirect_uri: M.configuration.silent_redirect_uri,
811
+ silent_login_uri: M.configuration.silent_login_uri,
801
812
  callbackSuccessComponent: a,
802
- callbackErrorComponent: p,
803
- authenticatingComponent: f,
804
- configurationName: n,
805
- withCustomHistory: w,
806
- children: /* @__PURE__ */ d.jsx(Wt, { configurationName: n, children: s })
813
+ callbackErrorComponent: c,
814
+ authenticatingComponent: u,
815
+ configurationName: r,
816
+ withCustomHistory: C,
817
+ children: /* @__PURE__ */ i.jsx($t, { loadingComponent: W, configurationName: r, children: o })
807
818
  }
808
- );
819
+ ) });
809
820
  }
810
- }, $t = ({ children: s, callbackPath: o = null, extras: n = null, configurationName: a = "default" }) => {
811
- const f = l.get, c = f(a);
812
- return j(() => {
813
- c.tryKeepExistingSessionAsync().then(() => {
814
- c.tokens || c.loginAsync(o, n);
815
- });
816
- }, [a, o, n]), !c && !c.tokens ? null : /* @__PURE__ */ d.jsx(d.Fragment, { children: s });
817
- }, zt = (s, o = null, n = null, a = "default") => (f) => /* @__PURE__ */ d.jsx($t, { callbackPath: o, extras: n, configurationName: a, children: /* @__PURE__ */ d.jsx(s, { ...f }) }), pe = "default", de = (s, o) => {
818
- let n = !1;
819
- return s(o) && (n = s(o).tokens != null), n;
820
- }, Gt = (s = pe) => {
821
- const o = l.get, [n, a] = P(de(o, s));
822
- return j(() => {
823
- let i = !0;
824
- const v = o(s);
825
- a(de(o, s));
826
- const _ = v.subscribeEvents((g, w) => {
827
- (g === l.eventNames.logout_from_another_tab || g === l.eventNames.logout_from_same_tab || g === l.eventNames.token_aquired || g == l.eventNames.tryKeepExistingSessionAsync_end) && i && a(de(o, s));
821
+ }, Yt = ({ children: o, callbackPath: s = null, extras: r = null, configurationName: a = "default" }) => {
822
+ const u = f.get, l = u(a);
823
+ return O(() => {
824
+ l.tokens || l.loginAsync(s, r);
825
+ }, [a, s, r]), l.tokens ? /* @__PURE__ */ i.jsx(i.Fragment, { children: o }) : null;
826
+ }, Jt = (o, s = null, r = null, a = "default") => (u) => /* @__PURE__ */ i.jsx(Yt, { callbackPath: s, extras: r, configurationName: a, children: /* @__PURE__ */ i.jsx(o, { ...u }) }), ke = "default", ge = (o, s) => {
827
+ let r = !1;
828
+ return o(s) && (r = o(s).tokens != null), r;
829
+ }, Kt = (o = ke) => {
830
+ const s = f.get, [r, a] = P(ge(s, o));
831
+ return O(() => {
832
+ let c = !0;
833
+ const v = s(o);
834
+ a(ge(s, o));
835
+ const g = v.subscribeEvents((b, m) => {
836
+ (b === f.eventNames.logout_from_another_tab || b === f.eventNames.logout_from_same_tab || b === f.eventNames.token_aquired) && c && a(ge(s, o));
828
837
  });
829
838
  return () => {
830
- i = !1, v.removeEventSubscription(_);
839
+ c = !1, v.removeEventSubscription(g);
831
840
  };
832
- }, [s]), { login: (i = void 0, v = null, _ = !1) => o(s).loginAsync(i, v, !1, void 0, _), logout: (i = void 0, v = null) => o(s).logoutAsync(i, v), renewTokens: async (i = null) => {
833
- const v = await o(s).renewTokensAsync(i);
841
+ }, [o]), { login: (c = void 0, v = null, g = !1) => s(o).loginAsync(c, v, !1, void 0, g), logout: (c = void 0, v = null) => s(o).logoutAsync(c, v), renewTokens: async (c = null) => {
842
+ const v = await s(o).renewTokensAsync(c);
834
843
  return {
835
844
  // @ts-ignore
836
845
  accessToken: v.accessToken,
@@ -841,118 +850,115 @@ const Ve = "default", wt = (s, o) => async (...n) => {
841
850
  // @ts-ignore
842
851
  idTokenPayload: v.idTokenPayload
843
852
  };
844
- }, isAuthenticated: n };
845
- }, Ke = { accessToken: null, accessTokenPayload: null }, Ut = (s) => {
846
- const o = l.get, n = o(s);
847
- if (n.tokens) {
848
- const a = n.tokens;
853
+ }, isAuthenticated: r };
854
+ }, Ge = { accessToken: null, accessTokenPayload: null }, Mt = (o) => {
855
+ const s = f.get, r = s(o);
856
+ if (r.tokens) {
857
+ const a = r.tokens;
849
858
  return {
850
859
  accessToken: a.accessToken,
851
860
  accessTokenPayload: a.accessTokenPayload
852
861
  };
853
862
  }
854
- return Ke;
855
- }, Ht = (s = pe) => {
856
- const o = l.get, [n, a] = P(Ut(s));
857
- return j(() => {
858
- let f = !0;
859
- const c = o(s);
860
- if (c.tokens) {
861
- const i = c.tokens;
862
- a({ accessToken: i.accessToken, accessTokenPayload: i.accessTokenPayload });
863
- }
864
- const p = c.subscribeEvents((i, v) => {
865
- if ((i === l.eventNames.token_renewed || i === l.eventNames.token_aquired || i === l.eventNames.logout_from_another_tab || i === l.eventNames.logout_from_same_tab || i === l.eventNames.refreshTokensAsync_error || i === l.eventNames.syncTokensAsync_error || i == l.eventNames.tryKeepExistingSessionAsync_end) && f) {
866
- const _ = c.tokens;
867
- a(_ != null ? { accessToken: _.accessToken, accessTokenPayload: _.accessTokenPayload } : Ke);
863
+ return Ge;
864
+ }, Xt = (o = ke) => {
865
+ const s = f.get, [r, a] = P(Mt(o));
866
+ return O(() => {
867
+ let u = !0;
868
+ const l = s(o);
869
+ if (l.tokens) {
870
+ const c = l.tokens;
871
+ a({ accessToken: c.accessToken, accessTokenPayload: c.accessTokenPayload });
872
+ }
873
+ const h = l.subscribeEvents((c, v) => {
874
+ if ((c === f.eventNames.token_renewed || c === f.eventNames.token_aquired || c === f.eventNames.logout_from_another_tab || c === f.eventNames.logout_from_same_tab || c === f.eventNames.refreshTokensAsync_error || c === f.eventNames.syncTokensAsync_error) && u) {
875
+ const g = l.tokens;
876
+ a(g != null ? { accessToken: g.accessToken, accessTokenPayload: g.accessTokenPayload } : Ge);
868
877
  }
869
878
  });
870
879
  return () => {
871
- f = !1, c.removeEventSubscription(p);
880
+ u = !1, l.removeEventSubscription(h);
872
881
  };
873
- }, [s]), n;
874
- }, ze = { idToken: null, idTokenPayload: null }, Yt = (s) => {
875
- const o = l.get, n = o(s);
876
- if (n.tokens) {
877
- const a = n.tokens;
882
+ }, [o]), r;
883
+ }, He = { idToken: null, idTokenPayload: null }, Vt = (o) => {
884
+ const s = f.get, r = s(o);
885
+ if (r.tokens) {
886
+ const a = r.tokens;
878
887
  return { idToken: a.idToken, idTokenPayload: a.idTokenPayload };
879
888
  }
880
- return ze;
881
- }, Jt = (s = pe) => {
882
- const o = l.get, [n, a] = P(Yt(s));
883
- return j(() => {
884
- let f = !0;
885
- const c = o(s);
886
- if (c.tokens) {
887
- const i = c.tokens;
888
- a({ idToken: i.idToken, idTokenPayload: i.idTokenPayload });
889
- }
890
- const p = c.subscribeEvents((i, v) => {
891
- if ((i === l.eventNames.token_renewed || i === l.eventNames.token_aquired || i === l.eventNames.logout_from_another_tab || i === l.eventNames.logout_from_same_tab || i === l.eventNames.refreshTokensAsync_error || i === l.eventNames.syncTokensAsync_error || i == l.eventNames.tryKeepExistingSessionAsync_end) && f) {
892
- const _ = c.tokens;
893
- a(_ != null ? { idToken: _.idToken, idTokenPayload: _.idTokenPayload } : ze);
889
+ return He;
890
+ }, Qt = (o = ke) => {
891
+ const s = f.get, [r, a] = P(Vt(o));
892
+ return O(() => {
893
+ let u = !0;
894
+ const l = s(o);
895
+ if (l.tokens) {
896
+ const c = l.tokens;
897
+ a({ idToken: c.idToken, idTokenPayload: c.idTokenPayload });
898
+ }
899
+ const h = l.subscribeEvents((c, v) => {
900
+ if ((c === f.eventNames.token_renewed || c === f.eventNames.token_aquired || c === f.eventNames.logout_from_another_tab || c === f.eventNames.logout_from_same_tab || c === f.eventNames.refreshTokensAsync_error || c === f.eventNames.syncTokensAsync_error) && u) {
901
+ const g = l.tokens;
902
+ a(g != null ? { idToken: g.idToken, idTokenPayload: g.idTokenPayload } : He);
894
903
  }
895
904
  });
896
905
  return () => {
897
- f = !1, c.removeEventSubscription(p);
906
+ u = !1, l.removeEventSubscription(h);
898
907
  };
899
- }, [s]), n;
908
+ }, [o]), r;
900
909
  };
901
- var Mt = /* @__PURE__ */ ((s) => (s.Unauthenticated = "Unauthenticated", s.Loading = "Loading user", s.Loaded = "User loaded", s.LoadingError = "Error loading user", s))(Mt || {});
902
- const Xt = (s = "default") => {
903
- const [o, n] = P({
910
+ var Bt = /* @__PURE__ */ ((o) => (o.Unauthenticated = "Unauthenticated", o.Loading = "Loading user", o.Loaded = "User loaded", o.LoadingError = "Error loading user", o))(Bt || {});
911
+ const Zt = (o = "default") => {
912
+ const [s, r] = P({
904
913
  user: null,
905
914
  status: "Unauthenticated"
906
915
  /* Unauthenticated */
907
- }), [a, f] = P(""), c = l.get(s);
908
- j(() => {
909
- let i = !0;
910
- if (c && c.tokens) {
911
- n({
912
- ...o,
916
+ }), [a, u] = P(""), l = f.get(o);
917
+ O(() => {
918
+ let c = !0;
919
+ if (l && l.tokens) {
920
+ r({
921
+ ...s,
913
922
  status: "Loading user"
914
923
  /* Loading */
915
924
  });
916
- const _ = a !== "";
917
- c.userInfoAsync(_).then((g) => {
918
- i && n({
925
+ const v = a !== "";
926
+ l.userInfoAsync(v).then((g) => {
927
+ c && r({
919
928
  user: g,
920
929
  status: "User loaded"
921
930
  /* Loaded */
922
931
  });
923
- }).catch(() => n({
924
- ...o,
932
+ }).catch(() => r({
933
+ ...s,
925
934
  status: "Error loading user"
926
935
  /* LoadingError */
927
936
  }));
928
937
  } else
929
- n({
938
+ r({
930
939
  user: null,
931
940
  status: "Unauthenticated"
932
941
  /* Unauthenticated */
933
942
  });
934
- const v = c.subscribeEvents((_, g) => {
935
- console.log(`Event ${_} has been raised`), _ == l.eventNames.tryKeepExistingSessionAsync_end && i && p();
936
- });
937
943
  return () => {
938
- i = !1, c.removeEventSubscription(v);
944
+ c = !1;
939
945
  };
940
946
  }, [a]);
941
- const p = () => {
942
- f(a + " ");
947
+ const h = () => {
948
+ u(a + " ");
943
949
  };
944
- return { oidcUser: o.user, oidcUserLoadingState: o.status, reloadOidcUser: p };
950
+ return { oidcUser: s.user, oidcUserLoadingState: s.status, reloadOidcUser: h };
945
951
  };
946
952
  export {
947
- Kt as OidcProvider,
948
- $t as OidcSecure,
949
- Mt as OidcUserStatus,
950
- er as TokenRenewMode,
951
- Gt as useOidc,
952
- Ht as useOidcAccessToken,
953
+ Ht as OidcProvider,
954
+ Yt as OidcSecure,
955
+ Bt as OidcUserStatus,
956
+ rr as TokenRenewMode,
957
+ Kt as useOidc,
958
+ Xt as useOidcAccessToken,
953
959
  Rt as useOidcFetch,
954
- Jt as useOidcIdToken,
955
- Xt as useOidcUser,
956
- qt as withOidcFetch,
957
- zt as withOidcSecure
960
+ Qt as useOidcIdToken,
961
+ Zt as useOidcUser,
962
+ Gt as withOidcFetch,
963
+ Jt as withOidcSecure
958
964
  };