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