@axa-fr/react-oidc 7.7.2 → 7.8.0

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