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