authhero 0.218.0 → 0.219.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/authhero.cjs +13 -13
- package/dist/authhero.mjs +148 -144
- package/package.json +1 -1
package/dist/authhero.mjs
CHANGED
|
@@ -372,10 +372,10 @@ class ma extends dc {
|
|
|
372
372
|
return i ? (h.res = V, h.usedParams = this.getUsedParamsDetails(n), h) : V;
|
|
373
373
|
}
|
|
374
374
|
if (s) {
|
|
375
|
-
const V = Array.isArray(g), M = V ? [] : {},
|
|
375
|
+
const V = Array.isArray(g), M = V ? [] : {}, K = V ? A : $;
|
|
376
376
|
for (const W in g)
|
|
377
377
|
if (Object.prototype.hasOwnProperty.call(g, W)) {
|
|
378
|
-
const Z = `${
|
|
378
|
+
const Z = `${K}${s}${W}`;
|
|
379
379
|
M[W] = this.translate(Z, {
|
|
380
380
|
...n,
|
|
381
381
|
joinArrays: !1,
|
|
@@ -388,9 +388,9 @@ class ma extends dc {
|
|
|
388
388
|
g = g.join(D), g && (g = this.extendTranslation(g, e, n, r));
|
|
389
389
|
else {
|
|
390
390
|
let V = !1, M = !1;
|
|
391
|
-
const
|
|
391
|
+
const K = n.count !== void 0 && !Ne(n.count), W = ma.hasDefaultValue(n), Z = K ? this.pluralResolver.getSuffix(d, n.count, n) : "", Y = n.ordinal && K ? this.pluralResolver.getSuffix(d, n.count, {
|
|
392
392
|
ordinal: !1
|
|
393
|
-
}) : "", Se =
|
|
393
|
+
}) : "", Se = K && !n.ordinal && n.count === 0, j = Se && n[`defaultValue${this.options.pluralSeparator}zero`] || n[`defaultValue${Z}`] || n[`defaultValue${Y}`] || n.defaultValue;
|
|
394
394
|
!this.isValidLookup(g) && W && (V = !0, g = j), this.isValidLookup(g) || (M = !0, g = a);
|
|
395
395
|
const P = (n.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && M ? void 0 : g, N = W && j !== g && this.options.updateMissing;
|
|
396
396
|
if (M || V || N) {
|
|
@@ -407,17 +407,17 @@ class ma extends dc {
|
|
|
407
407
|
for (let pe = 0; pe < L.length; pe++)
|
|
408
408
|
k.push(L[pe]);
|
|
409
409
|
else this.options.saveMissingTo === "all" ? k = this.languageUtils.toResolveHierarchy(n.lng || this.language) : k.push(n.lng || this.language);
|
|
410
|
-
const
|
|
410
|
+
const G = (pe, se, $e) => {
|
|
411
411
|
var ee;
|
|
412
412
|
const Ce = W && $e !== g ? $e : P;
|
|
413
413
|
this.options.missingKeyHandler ? this.options.missingKeyHandler(pe, u, se, Ce, N, n) : (ee = this.backendConnector) != null && ee.saveMissing && this.backendConnector.saveMissing(pe, u, se, Ce, N, n), this.emit("missingKey", pe, u, se, g);
|
|
414
414
|
};
|
|
415
|
-
this.options.saveMissing && (this.options.saveMissingPlurals &&
|
|
415
|
+
this.options.saveMissing && (this.options.saveMissingPlurals && K ? k.forEach((pe) => {
|
|
416
416
|
const se = this.pluralResolver.getSuffixes(pe, n);
|
|
417
417
|
Se && n[`defaultValue${this.options.pluralSeparator}zero`] && se.indexOf(`${this.options.pluralSeparator}zero`) < 0 && se.push(`${this.options.pluralSeparator}zero`), se.forEach(($e) => {
|
|
418
|
-
|
|
418
|
+
G([pe], a + $e, n[`defaultValue${$e}`] || j);
|
|
419
419
|
});
|
|
420
|
-
}) :
|
|
420
|
+
}) : G(k, a, j));
|
|
421
421
|
}
|
|
422
422
|
g = this.extendTranslation(g, e, n, h, r), M && g === a && this.options.appendNamespaceToMissingKey && (g = `${u}:${a}`), (M || V) && this.options.parseMissingKeyHandler && (g = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${u}:${a}` : a, V ? g : void 0));
|
|
423
423
|
}
|
|
@@ -482,11 +482,11 @@ class ma extends dc {
|
|
|
482
482
|
h.forEach((O) => {
|
|
483
483
|
var D, x;
|
|
484
484
|
this.isValidLookup(r) || (l = O, !nh[`${T[0]}-${O}`] && ((D = this.utils) != null && D.hasLoadedNamespace) && !((x = this.utils) != null && x.hasLoadedNamespace(l)) && (nh[`${T[0]}-${O}`] = !0, this.logger.warn(`key "${i}" for languages "${T.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), T.forEach((q) => {
|
|
485
|
-
var
|
|
485
|
+
var K;
|
|
486
486
|
if (this.isValidLookup(r)) return;
|
|
487
487
|
a = q;
|
|
488
488
|
const V = [p];
|
|
489
|
-
if ((
|
|
489
|
+
if ((K = this.i18nFormat) != null && K.addLookupKeys)
|
|
490
490
|
this.i18nFormat.addLookupKeys(V, p, q, O, n);
|
|
491
491
|
else {
|
|
492
492
|
let W;
|
|
@@ -3187,9 +3187,9 @@ const ov = {}, av = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
3187
3187
|
N(P);
|
|
3188
3188
|
} else
|
|
3189
3189
|
return new Promise(function(k, L) {
|
|
3190
|
-
N(function(
|
|
3191
|
-
if (
|
|
3192
|
-
L(
|
|
3190
|
+
N(function(G, pe) {
|
|
3191
|
+
if (G) {
|
|
3192
|
+
L(G);
|
|
3193
3193
|
return;
|
|
3194
3194
|
}
|
|
3195
3195
|
k(pe);
|
|
@@ -3201,7 +3201,7 @@ const ov = {}, av = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
3201
3201
|
return Se(j, F);
|
|
3202
3202
|
}, e.hash = function(j, F, P, N) {
|
|
3203
3203
|
function k(L) {
|
|
3204
|
-
typeof j == "string" && typeof F == "number" ? e.genSalt(F, function(
|
|
3204
|
+
typeof j == "string" && typeof F == "number" ? e.genSalt(F, function(G, pe) {
|
|
3205
3205
|
Se(j, pe, L, N);
|
|
3206
3206
|
}) : typeof j == "string" && typeof F == "string" ? Se(j, F, L, N) : a(L.bind(this, Error("Illegal arguments: " + typeof j + ", " + typeof F)));
|
|
3207
3207
|
}
|
|
@@ -3210,10 +3210,10 @@ const ov = {}, av = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
3210
3210
|
throw Error("Illegal callback: " + typeof P);
|
|
3211
3211
|
k(P);
|
|
3212
3212
|
} else
|
|
3213
|
-
return new Promise(function(L,
|
|
3213
|
+
return new Promise(function(L, G) {
|
|
3214
3214
|
k(function(pe, se) {
|
|
3215
3215
|
if (pe) {
|
|
3216
|
-
|
|
3216
|
+
G(pe);
|
|
3217
3217
|
return;
|
|
3218
3218
|
}
|
|
3219
3219
|
L(se);
|
|
@@ -3239,8 +3239,8 @@ const ov = {}, av = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
3239
3239
|
a(L.bind(this, null, !1));
|
|
3240
3240
|
return;
|
|
3241
3241
|
}
|
|
3242
|
-
e.hash(j, F.substr(0, 29), function(
|
|
3243
|
-
|
|
3242
|
+
e.hash(j, F.substr(0, 29), function(G, pe) {
|
|
3243
|
+
G ? L(G) : L(null, s(pe, F));
|
|
3244
3244
|
}, N);
|
|
3245
3245
|
}
|
|
3246
3246
|
if (P) {
|
|
@@ -3248,10 +3248,10 @@ const ov = {}, av = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
3248
3248
|
throw Error("Illegal callback: " + typeof P);
|
|
3249
3249
|
k(P);
|
|
3250
3250
|
} else
|
|
3251
|
-
return new Promise(function(L,
|
|
3251
|
+
return new Promise(function(L, G) {
|
|
3252
3252
|
k(function(pe, se) {
|
|
3253
3253
|
if (pe) {
|
|
3254
|
-
|
|
3254
|
+
G(pe);
|
|
3255
3255
|
return;
|
|
3256
3256
|
}
|
|
3257
3257
|
L(se);
|
|
@@ -3425,10 +3425,10 @@ const ov = {}, av = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
3425
3425
|
return N.join("");
|
|
3426
3426
|
}
|
|
3427
3427
|
function g(j, F) {
|
|
3428
|
-
var P = 0, N = j.length, k = 0, L = [],
|
|
3428
|
+
var P = 0, N = j.length, k = 0, L = [], G, pe, se, $e, Ce, ee;
|
|
3429
3429
|
if (F <= 0)
|
|
3430
3430
|
throw Error("Illegal len: " + F);
|
|
3431
|
-
for (; P < N - 1 && k < F && (ee = j.charCodeAt(P++),
|
|
3431
|
+
for (; P < N - 1 && k < F && (ee = j.charCodeAt(P++), G = ee < d.length ? d[ee] : -1, ee = j.charCodeAt(P++), pe = ee < d.length ? d[ee] : -1, !(G == -1 || pe == -1 || (Ce = G << 2 >>> 0, Ce |= (pe & 48) >> 4, L.push(p(Ce)), ++k >= F || P >= N) || (ee = j.charCodeAt(P++), se = ee < d.length ? d[ee] : -1, se == -1) || (Ce = (pe & 15) << 4 >>> 0, Ce |= (se & 60) >> 2, L.push(p(Ce)), ++k >= F || P >= N))); )
|
|
3432
3432
|
ee = j.charCodeAt(P++), $e = ee < d.length ? d[ee] : -1, Ce = (se & 3) << 6 >>> 0, Ce |= $e, L.push(p(Ce)), ++k;
|
|
3433
3433
|
var we = [];
|
|
3434
3434
|
for (P = 0; P < k; P++)
|
|
@@ -3444,7 +3444,7 @@ const ov = {}, av = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
3444
3444
|
}); N !== null || (N = F()) !== null; )
|
|
3445
3445
|
N < 128 ? P(N & 127) : N < 2048 ? (P(N >> 6 & 31 | 192), P(N & 63 | 128)) : N < 65536 ? (P(N >> 12 & 15 | 224), P(N >> 6 & 63 | 128), P(N & 63 | 128)) : (P(N >> 18 & 7 | 240), P(N >> 12 & 63 | 128), P(N >> 6 & 63 | 128), P(N & 63 | 128)), N = null;
|
|
3446
3446
|
}, j.decodeUTF8 = function(F, P) {
|
|
3447
|
-
for (var N, k, L,
|
|
3447
|
+
for (var N, k, L, G, pe = function(se) {
|
|
3448
3448
|
se = se.slice(0, se.indexOf(null));
|
|
3449
3449
|
var $e = Error(se.toString());
|
|
3450
3450
|
throw $e.name = "TruncatedError", $e.bytes = se, $e;
|
|
@@ -3456,7 +3456,7 @@ const ov = {}, av = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
3456
3456
|
else if ((N & 240) === 224)
|
|
3457
3457
|
((k = F()) === null || (L = F()) === null) && pe([N, k, L]), P((N & 15) << 12 | (k & 63) << 6 | L & 63);
|
|
3458
3458
|
else if ((N & 248) === 240)
|
|
3459
|
-
((k = F()) === null || (L = F()) === null || (
|
|
3459
|
+
((k = F()) === null || (L = F()) === null || (G = F()) === null) && pe([N, k, L, G]), P((N & 7) << 18 | (k & 63) << 12 | (L & 63) << 6 | G & 63);
|
|
3460
3460
|
else throw RangeError("Illegal starting byte: " + N);
|
|
3461
3461
|
}, j.UTF16toUTF8 = function(F, P) {
|
|
3462
3462
|
for (var N, k = null; (N = k !== null ? k : F()) !== null; ) {
|
|
@@ -4550,32 +4550,32 @@ const ov = {}, av = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
4550
4550
|
1869963892
|
|
4551
4551
|
];
|
|
4552
4552
|
function M(j, F, P, N) {
|
|
4553
|
-
var k, L = j[F],
|
|
4554
|
-
return L ^= P[0], k = N[L >>> 24], k += N[256 | L >> 16 & 255], k ^= N[512 | L >> 8 & 255], k += N[768 | L & 255],
|
|
4553
|
+
var k, L = j[F], G = j[F + 1];
|
|
4554
|
+
return L ^= P[0], k = N[L >>> 24], k += N[256 | L >> 16 & 255], k ^= N[512 | L >> 8 & 255], k += N[768 | L & 255], G ^= k ^ P[1], k = N[G >>> 24], k += N[256 | G >> 16 & 255], k ^= N[512 | G >> 8 & 255], k += N[768 | G & 255], L ^= k ^ P[2], k = N[L >>> 24], k += N[256 | L >> 16 & 255], k ^= N[512 | L >> 8 & 255], k += N[768 | L & 255], G ^= k ^ P[3], k = N[G >>> 24], k += N[256 | G >> 16 & 255], k ^= N[512 | G >> 8 & 255], k += N[768 | G & 255], L ^= k ^ P[4], k = N[L >>> 24], k += N[256 | L >> 16 & 255], k ^= N[512 | L >> 8 & 255], k += N[768 | L & 255], G ^= k ^ P[5], k = N[G >>> 24], k += N[256 | G >> 16 & 255], k ^= N[512 | G >> 8 & 255], k += N[768 | G & 255], L ^= k ^ P[6], k = N[L >>> 24], k += N[256 | L >> 16 & 255], k ^= N[512 | L >> 8 & 255], k += N[768 | L & 255], G ^= k ^ P[7], k = N[G >>> 24], k += N[256 | G >> 16 & 255], k ^= N[512 | G >> 8 & 255], k += N[768 | G & 255], L ^= k ^ P[8], k = N[L >>> 24], k += N[256 | L >> 16 & 255], k ^= N[512 | L >> 8 & 255], k += N[768 | L & 255], G ^= k ^ P[9], k = N[G >>> 24], k += N[256 | G >> 16 & 255], k ^= N[512 | G >> 8 & 255], k += N[768 | G & 255], L ^= k ^ P[10], k = N[L >>> 24], k += N[256 | L >> 16 & 255], k ^= N[512 | L >> 8 & 255], k += N[768 | L & 255], G ^= k ^ P[11], k = N[G >>> 24], k += N[256 | G >> 16 & 255], k ^= N[512 | G >> 8 & 255], k += N[768 | G & 255], L ^= k ^ P[12], k = N[L >>> 24], k += N[256 | L >> 16 & 255], k ^= N[512 | L >> 8 & 255], k += N[768 | L & 255], G ^= k ^ P[13], k = N[G >>> 24], k += N[256 | G >> 16 & 255], k ^= N[512 | G >> 8 & 255], k += N[768 | G & 255], L ^= k ^ P[14], k = N[L >>> 24], k += N[256 | L >> 16 & 255], k ^= N[512 | L >> 8 & 255], k += N[768 | L & 255], G ^= k ^ P[15], k = N[G >>> 24], k += N[256 | G >> 16 & 255], k ^= N[512 | G >> 8 & 255], k += N[768 | G & 255], L ^= k ^ P[16], j[F] = G ^ P[O + 1], j[F + 1] = L, j;
|
|
4555
4555
|
}
|
|
4556
|
-
function
|
|
4556
|
+
function K(j, F) {
|
|
4557
4557
|
for (var P = 0, N = 0; P < 4; ++P)
|
|
4558
4558
|
N = N << 8 | j[F] & 255, F = (F + 1) % j.length;
|
|
4559
4559
|
return { key: N, offp: F };
|
|
4560
4560
|
}
|
|
4561
4561
|
function W(j, F, P) {
|
|
4562
|
-
for (var N = 0, k = [0, 0], L = F.length,
|
|
4563
|
-
pe =
|
|
4562
|
+
for (var N = 0, k = [0, 0], L = F.length, G = P.length, pe, se = 0; se < L; se++)
|
|
4563
|
+
pe = K(j, N), N = pe.offp, F[se] = F[se] ^ pe.key;
|
|
4564
4564
|
for (se = 0; se < L; se += 2)
|
|
4565
4565
|
k = M(k, 0, F, P), F[se] = k[0], F[se + 1] = k[1];
|
|
4566
|
-
for (se = 0; se <
|
|
4566
|
+
for (se = 0; se < G; se += 2)
|
|
4567
4567
|
k = M(k, 0, F, P), P[se] = k[0], P[se + 1] = k[1];
|
|
4568
4568
|
}
|
|
4569
4569
|
function Z(j, F, P, N) {
|
|
4570
|
-
for (var k = 0, L = [0, 0],
|
|
4571
|
-
se =
|
|
4572
|
-
for (k = 0, $e = 0; $e <
|
|
4573
|
-
se =
|
|
4570
|
+
for (var k = 0, L = [0, 0], G = P.length, pe = N.length, se, $e = 0; $e < G; $e++)
|
|
4571
|
+
se = K(F, k), k = se.offp, P[$e] = P[$e] ^ se.key;
|
|
4572
|
+
for (k = 0, $e = 0; $e < G; $e += 2)
|
|
4573
|
+
se = K(j, k), k = se.offp, L[0] ^= se.key, se = K(j, k), k = se.offp, L[1] ^= se.key, L = M(L, 0, P, N), P[$e] = L[0], P[$e + 1] = L[1];
|
|
4574
4574
|
for ($e = 0; $e < pe; $e += 2)
|
|
4575
|
-
se =
|
|
4575
|
+
se = K(j, k), k = se.offp, L[0] ^= se.key, se = K(j, k), k = se.offp, L[1] ^= se.key, L = M(L, 0, P, N), N[$e] = L[0], N[$e + 1] = L[1];
|
|
4576
4576
|
}
|
|
4577
4577
|
function Y(j, F, P, N, k) {
|
|
4578
|
-
var L = V.slice(),
|
|
4578
|
+
var L = V.slice(), G = L.length, pe;
|
|
4579
4579
|
if (P < 4 || P > 31)
|
|
4580
4580
|
if (pe = Error("Illegal number of rounds (4-31): " + P), N) {
|
|
4581
4581
|
a(N.bind(this, pe));
|
|
@@ -4597,10 +4597,10 @@ const ov = {}, av = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
4597
4597
|
;
|
|
4598
4598
|
else {
|
|
4599
4599
|
for (Ce = 0; Ce < 64; Ce++)
|
|
4600
|
-
for (ee = 0; ee <
|
|
4600
|
+
for (ee = 0; ee < G >> 1; ee++)
|
|
4601
4601
|
M(L, ee << 1, se, $e);
|
|
4602
4602
|
var Xe = [];
|
|
4603
|
-
for (Ce = 0; Ce <
|
|
4603
|
+
for (Ce = 0; Ce < G; Ce++)
|
|
4604
4604
|
Xe.push((L[Ce] >> 24 & 255) >>> 0), Xe.push((L[Ce] >> 16 & 255) >>> 0), Xe.push((L[Ce] >> 8 & 255) >>> 0), Xe.push((L[Ce] & 255) >>> 0);
|
|
4605
4605
|
if (N) {
|
|
4606
4606
|
N(null, Xe);
|
|
@@ -4625,7 +4625,7 @@ const ov = {}, av = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
4625
4625
|
return;
|
|
4626
4626
|
} else
|
|
4627
4627
|
throw k;
|
|
4628
|
-
var L,
|
|
4628
|
+
var L, G;
|
|
4629
4629
|
if (F.charAt(0) !== "$" || F.charAt(1) !== "2")
|
|
4630
4630
|
if (k = Error("Invalid salt version: " + F.substring(0, 2)), P) {
|
|
4631
4631
|
a(P.bind(this, k));
|
|
@@ -4633,7 +4633,7 @@ const ov = {}, av = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
4633
4633
|
} else
|
|
4634
4634
|
throw k;
|
|
4635
4635
|
if (F.charAt(2) === "$")
|
|
4636
|
-
L = "\0",
|
|
4636
|
+
L = "\0", G = 3;
|
|
4637
4637
|
else {
|
|
4638
4638
|
if (L = F.charAt(2), L !== "a" && L !== "b" && L !== "y" || F.charAt(3) !== "$")
|
|
4639
4639
|
if (k = Error("Invalid salt revision: " + F.substring(2, 4)), P) {
|
|
@@ -4641,15 +4641,15 @@ const ov = {}, av = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
4641
4641
|
return;
|
|
4642
4642
|
} else
|
|
4643
4643
|
throw k;
|
|
4644
|
-
|
|
4644
|
+
G = 4;
|
|
4645
4645
|
}
|
|
4646
|
-
if (F.charAt(
|
|
4646
|
+
if (F.charAt(G + 2) > "$")
|
|
4647
4647
|
if (k = Error("Missing salt rounds"), P) {
|
|
4648
4648
|
a(P.bind(this, k));
|
|
4649
4649
|
return;
|
|
4650
4650
|
} else
|
|
4651
4651
|
throw k;
|
|
4652
|
-
var pe = parseInt(F.substring(
|
|
4652
|
+
var pe = parseInt(F.substring(G, G + 1), 10) * 10, se = parseInt(F.substring(G + 1, G + 2), 10), $e = pe + se, Ce = F.substring(G + 3, G + 25);
|
|
4653
4653
|
j += L >= "a" ? "\0" : "";
|
|
4654
4654
|
var ee = l(j), we = g(Ce, A);
|
|
4655
4655
|
function Un(Fe) {
|
|
@@ -6596,10 +6596,12 @@ async function Qb(t, e) {
|
|
|
6596
6596
|
(V) => V.value
|
|
6597
6597
|
);
|
|
6598
6598
|
if (!p) {
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
|
|
6602
|
-
|
|
6599
|
+
let V;
|
|
6600
|
+
return s.length === 0 ? V = A.filter(
|
|
6601
|
+
(K) => T.includes(K)
|
|
6602
|
+
) : V = s.filter(
|
|
6603
|
+
(K) => T.includes(K) && A.includes(K)
|
|
6604
|
+
), { scopes: [
|
|
6603
6605
|
.../* @__PURE__ */ new Set([...a, ...V])
|
|
6604
6606
|
], permissions: [] };
|
|
6605
6607
|
}
|
|
@@ -6609,10 +6611,12 @@ async function Qb(t, e) {
|
|
|
6609
6611
|
);
|
|
6610
6612
|
return { scopes: a, permissions: V };
|
|
6611
6613
|
}
|
|
6612
|
-
|
|
6614
|
+
let O;
|
|
6615
|
+
return s.length === 0 ? O = A.filter(
|
|
6616
|
+
(V) => T.includes(V)
|
|
6617
|
+
) : O = s.filter(
|
|
6613
6618
|
(V) => T.includes(V) && A.includes(V)
|
|
6614
|
-
)
|
|
6615
|
-
return { scopes: [
|
|
6619
|
+
), { scopes: [
|
|
6616
6620
|
.../* @__PURE__ */ new Set([...a, ...O])
|
|
6617
6621
|
], permissions: [] };
|
|
6618
6622
|
}
|
|
@@ -8523,12 +8527,12 @@ var kh;
|
|
|
8523
8527
|
return ee(z) || (z = rt(z)), N(R, I, z);
|
|
8524
8528
|
}
|
|
8525
8529
|
e("hasMetadata", M);
|
|
8526
|
-
function
|
|
8530
|
+
function K(R, I, z) {
|
|
8527
8531
|
if (!Fe(I))
|
|
8528
8532
|
throw new TypeError();
|
|
8529
8533
|
return ee(z) || (z = rt(z)), k(R, I, z);
|
|
8530
8534
|
}
|
|
8531
|
-
e("hasOwnMetadata",
|
|
8535
|
+
e("hasOwnMetadata", K);
|
|
8532
8536
|
function W(R, I, z) {
|
|
8533
8537
|
if (!Fe(I))
|
|
8534
8538
|
throw new TypeError();
|
|
@@ -8538,7 +8542,7 @@ var kh;
|
|
|
8538
8542
|
function Z(R, I, z) {
|
|
8539
8543
|
if (!Fe(I))
|
|
8540
8544
|
throw new TypeError();
|
|
8541
|
-
return ee(z) || (z = rt(z)),
|
|
8545
|
+
return ee(z) || (z = rt(z)), G(R, I, z);
|
|
8542
8546
|
}
|
|
8543
8547
|
e("getOwnMetadata", Z);
|
|
8544
8548
|
function Y(R, I) {
|
|
@@ -8609,12 +8613,12 @@ var kh;
|
|
|
8609
8613
|
function L(R, I, z) {
|
|
8610
8614
|
var ne = k(R, I, z);
|
|
8611
8615
|
if (ne)
|
|
8612
|
-
return
|
|
8616
|
+
return G(R, I, z);
|
|
8613
8617
|
var ve = Bt(I);
|
|
8614
8618
|
if (!we(ve))
|
|
8615
8619
|
return L(R, ve, z);
|
|
8616
8620
|
}
|
|
8617
|
-
function
|
|
8621
|
+
function G(R, I, z) {
|
|
8618
8622
|
var ne = _e(
|
|
8619
8623
|
I,
|
|
8620
8624
|
z,
|
|
@@ -19466,12 +19470,12 @@ function gl(t, e) {
|
|
|
19466
19470
|
T[O] = async (...M) => {
|
|
19467
19471
|
if (V)
|
|
19468
19472
|
return await D.apply($, M);
|
|
19469
|
-
const
|
|
19473
|
+
const K = ex(
|
|
19470
19474
|
g,
|
|
19471
19475
|
O,
|
|
19472
19476
|
M,
|
|
19473
19477
|
l
|
|
19474
|
-
), W = await n.get(
|
|
19478
|
+
), W = await n.get(K);
|
|
19475
19479
|
if (W !== null)
|
|
19476
19480
|
if (W && typeof W == "object" && "isCachedNull" in W) {
|
|
19477
19481
|
const Y = W;
|
|
@@ -19481,13 +19485,13 @@ function gl(t, e) {
|
|
|
19481
19485
|
const Z = await D.apply($, M);
|
|
19482
19486
|
if (q >= 0)
|
|
19483
19487
|
if (Z !== null)
|
|
19484
|
-
await n.set(
|
|
19488
|
+
await n.set(K, Z, q);
|
|
19485
19489
|
else {
|
|
19486
19490
|
const Y = {
|
|
19487
19491
|
value: null,
|
|
19488
19492
|
isCachedNull: !0
|
|
19489
19493
|
};
|
|
19490
|
-
await n.set(
|
|
19494
|
+
await n.set(K, Y, q);
|
|
19491
19495
|
}
|
|
19492
19496
|
return Z;
|
|
19493
19497
|
};
|
|
@@ -26021,17 +26025,17 @@ async function TE({
|
|
|
26021
26025
|
response_type: p
|
|
26022
26026
|
}) {
|
|
26023
26027
|
const { env: h } = t, g = new URL(r), $ = `${g.protocol}//${g.host}`;
|
|
26024
|
-
async function A(
|
|
26028
|
+
async function A(K = "Login required") {
|
|
26025
26029
|
const W = Ve(t, {
|
|
26026
26030
|
type: qe.FAILED_SILENT_AUTH,
|
|
26027
|
-
description:
|
|
26031
|
+
description: K
|
|
26028
26032
|
});
|
|
26029
26033
|
return await t.env.data.logs.create(e.tenant.id, W), t.html(
|
|
26030
26034
|
Tu(
|
|
26031
26035
|
$,
|
|
26032
26036
|
JSON.stringify({
|
|
26033
26037
|
error: "login_required",
|
|
26034
|
-
error_description:
|
|
26038
|
+
error_description: K,
|
|
26035
26039
|
state: i
|
|
26036
26040
|
})
|
|
26037
26041
|
)
|
|
@@ -26200,7 +26204,7 @@ const IE = ["email", "sms", "Username-Password-Authentication"], OE = new be().o
|
|
|
26200
26204
|
t.set("log", "authorize");
|
|
26201
26205
|
const M = await as(e, n);
|
|
26202
26206
|
t.set("client_id", M.client_id), t.set("tenant_id", M.tenant.id);
|
|
26203
|
-
const
|
|
26207
|
+
const K = {
|
|
26204
26208
|
redirect_uri: i.split("#")[0],
|
|
26205
26209
|
// Remove fragment if present
|
|
26206
26210
|
scope: s,
|
|
@@ -26222,13 +26226,13 @@ const IE = ["email", "sms", "Username-Password-Authentication"], OE = new be().o
|
|
|
26222
26226
|
throw new E(403, {
|
|
26223
26227
|
message: `Origin ${W} not allowed`
|
|
26224
26228
|
});
|
|
26225
|
-
if (
|
|
26229
|
+
if (K.redirect_uri) {
|
|
26226
26230
|
const F = M.callbacks || [];
|
|
26227
|
-
if (t.var.host && (F.push(`${pl(t.env)}/*`), F.push(`${ft(t.env)}/*`)), !yf(
|
|
26231
|
+
if (t.var.host && (F.push(`${pl(t.env)}/*`), F.push(`${ft(t.env)}/*`)), !yf(K.redirect_uri, F, {
|
|
26228
26232
|
allowPathWildcards: !0
|
|
26229
26233
|
}))
|
|
26230
26234
|
throw new E(400, {
|
|
26231
|
-
message: `Invalid redirect URI - ${
|
|
26235
|
+
message: `Invalid redirect URI - ${K.redirect_uri}`
|
|
26232
26236
|
});
|
|
26233
26237
|
}
|
|
26234
26238
|
const Z = Ii(
|
|
@@ -26259,16 +26263,16 @@ const IE = ["email", "sms", "Username-Password-Authentication"], OE = new be().o
|
|
|
26259
26263
|
t,
|
|
26260
26264
|
M,
|
|
26261
26265
|
M.connections[0].name,
|
|
26262
|
-
|
|
26266
|
+
K
|
|
26263
26267
|
);
|
|
26264
26268
|
if (d && d !== "email")
|
|
26265
|
-
return lg(t, M, d,
|
|
26269
|
+
return lg(t, M, d, K);
|
|
26266
26270
|
if (T) {
|
|
26267
26271
|
const F = await CE(
|
|
26268
26272
|
t,
|
|
26269
26273
|
M.tenant.id,
|
|
26270
26274
|
T,
|
|
26271
|
-
|
|
26275
|
+
K,
|
|
26272
26276
|
O
|
|
26273
26277
|
);
|
|
26274
26278
|
return F instanceof Response ? F : t.json(F);
|
|
@@ -26277,7 +26281,7 @@ const IE = ["email", "sms", "Username-Password-Authentication"], OE = new be().o
|
|
|
26277
26281
|
ctx: t,
|
|
26278
26282
|
client: M,
|
|
26279
26283
|
auth0Client: D,
|
|
26280
|
-
authParams:
|
|
26284
|
+
authParams: K,
|
|
26281
26285
|
session: Se || void 0,
|
|
26282
26286
|
connection: d,
|
|
26283
26287
|
login_hint: x
|
|
@@ -27992,8 +27996,8 @@ var Zs = "_hp", d8 = {
|
|
|
27992
27996
|
if (n === 2 && (x.innerHTML = ""), (g || A) && T(x), !l && !a)
|
|
27993
27997
|
return;
|
|
27994
27998
|
let V = hi[M = x.getAttribute(q)] || (hi[M] = new Promise(
|
|
27995
|
-
(
|
|
27996
|
-
x.addEventListener("load",
|
|
27999
|
+
(K, W) => {
|
|
28000
|
+
x.addEventListener("load", K), x.addEventListener("error", W);
|
|
27997
28001
|
}
|
|
27998
28002
|
));
|
|
27999
28003
|
a && (V = V.then(a)), l && (V = V.catch(l)), V.catch(() => {
|
|
@@ -28002,8 +28006,8 @@ var Zs = "_hp", d8 = {
|
|
|
28002
28006
|
if (i && d === "render") {
|
|
28003
28007
|
const x = ca[t][0];
|
|
28004
28008
|
if (e[x]) {
|
|
28005
|
-
const q = e[x], V = hi[q] || (hi[q] = new Promise((M,
|
|
28006
|
-
T(h), h.addEventListener("load", M), h.addEventListener("error",
|
|
28009
|
+
const q = e[x], V = hi[q] || (hi[q] = new Promise((M, K) => {
|
|
28010
|
+
T(h), h.addEventListener("load", M), h.addEventListener("error", K);
|
|
28007
28011
|
}));
|
|
28008
28012
|
$8(V);
|
|
28009
28013
|
}
|
|
@@ -31642,7 +31646,7 @@ var $6 = {}, ri = {}, Oo = {}, bl = {};
|
|
|
31642
31646
|
}, this.reduceActions[13] = function(c) {
|
|
31643
31647
|
return new L(c[0], c[2]);
|
|
31644
31648
|
}, this.reduceActions[15] = function(c) {
|
|
31645
|
-
return new
|
|
31649
|
+
return new G(c[0], c[2]);
|
|
31646
31650
|
}, this.reduceActions[16] = function(c) {
|
|
31647
31651
|
return new pe(c[0], c[2]);
|
|
31648
31652
|
}, this.reduceActions[18] = function(c) {
|
|
@@ -32357,13 +32361,13 @@ var $6 = {}, ri = {}, Oo = {}, bl = {};
|
|
|
32357
32361
|
return "<Expression>";
|
|
32358
32362
|
}, M.prototype.evaluate = function(c) {
|
|
32359
32363
|
throw new Error("Could not evaluate expression.");
|
|
32360
|
-
},
|
|
32361
|
-
function
|
|
32364
|
+
}, K.prototype = new M(), K.prototype.constructor = K, K.superclass = M.prototype;
|
|
32365
|
+
function K(c) {
|
|
32362
32366
|
arguments.length > 0 && this.init(c);
|
|
32363
32367
|
}
|
|
32364
|
-
|
|
32368
|
+
K.prototype.init = function(c) {
|
|
32365
32369
|
this.rhs = c;
|
|
32366
|
-
}, W.prototype = new
|
|
32370
|
+
}, W.prototype = new K(), W.prototype.constructor = W, W.superclass = K.prototype;
|
|
32367
32371
|
function W(c) {
|
|
32368
32372
|
arguments.length > 0 && this.init(c);
|
|
32369
32373
|
}
|
|
@@ -32461,15 +32465,15 @@ var $6 = {}, ri = {}, Oo = {}, bl = {};
|
|
|
32461
32465
|
return this.lhs.evaluate(c).greaterthanorequal(this.rhs.evaluate(c));
|
|
32462
32466
|
}, L.prototype.toString = function() {
|
|
32463
32467
|
return "(" + this.lhs.toString() + " >= " + this.rhs.toString() + ")";
|
|
32464
|
-
},
|
|
32465
|
-
function
|
|
32468
|
+
}, G.prototype = new Z(), G.prototype.constructor = G, G.superclass = Z.prototype;
|
|
32469
|
+
function G(c, f) {
|
|
32466
32470
|
arguments.length > 0 && this.init(c, f);
|
|
32467
32471
|
}
|
|
32468
|
-
|
|
32469
|
-
|
|
32470
|
-
},
|
|
32472
|
+
G.prototype.init = function(c, f) {
|
|
32473
|
+
G.superclass.init.call(this, c, f);
|
|
32474
|
+
}, G.prototype.evaluate = function(c) {
|
|
32471
32475
|
return this.lhs.evaluate(c).number().plus(this.rhs.evaluate(c).number());
|
|
32472
|
-
},
|
|
32476
|
+
}, G.prototype.toString = function() {
|
|
32473
32477
|
return "(" + this.lhs.toString() + " + " + this.rhs.toString() + ")";
|
|
32474
32478
|
}, pe.prototype = new Z(), pe.prototype.constructor = pe, pe.superclass = Z.prototype;
|
|
32475
32479
|
function pe(c, f) {
|
|
@@ -33808,7 +33812,7 @@ var $6 = {}, ri = {}, Oo = {}, bl = {};
|
|
|
33808
33812
|
GreaterThanOperation: N,
|
|
33809
33813
|
LessThanOrEqualOperation: k,
|
|
33810
33814
|
GreaterThanOrEqualOperation: L,
|
|
33811
|
-
PlusOperation:
|
|
33815
|
+
PlusOperation: G,
|
|
33812
33816
|
MinusOperation: pe,
|
|
33813
33817
|
MultiplyOperation: se,
|
|
33814
33818
|
DivOperation: $e,
|
|
@@ -33949,32 +33953,32 @@ Ae.assertIsDocumentFragmentNode = q6;
|
|
|
33949
33953
|
return Array.isArray(M) && M.length > 0;
|
|
33950
33954
|
}
|
|
33951
33955
|
t.isArrayHasLength = r;
|
|
33952
|
-
function i(M,
|
|
33953
|
-
return M.localName ===
|
|
33956
|
+
function i(M, K, W) {
|
|
33957
|
+
return M.localName === K && (M.namespaceURI === W || W == null);
|
|
33954
33958
|
}
|
|
33955
|
-
function s(M,
|
|
33956
|
-
return M.localName ===
|
|
33959
|
+
function s(M, K, W, Z) {
|
|
33960
|
+
return M.localName === K && (!M.namespaceURI && (Z == null ? void 0 : Z.namespaceURI) === W || W == null);
|
|
33957
33961
|
}
|
|
33958
|
-
function a(M,
|
|
33962
|
+
function a(M, K, W) {
|
|
33959
33963
|
for (let Z = 0; Z < M.attributes.length; Z++) {
|
|
33960
33964
|
const Y = M.attributes[Z];
|
|
33961
|
-
if (i(Y,
|
|
33965
|
+
if (i(Y, K, W) || s(Y, K, W, M))
|
|
33962
33966
|
return Y;
|
|
33963
33967
|
}
|
|
33964
33968
|
return null;
|
|
33965
33969
|
}
|
|
33966
33970
|
t.findAttr = a;
|
|
33967
|
-
function l(M,
|
|
33971
|
+
function l(M, K, W) {
|
|
33968
33972
|
const Z = M.documentElement ?? M, Y = [];
|
|
33969
33973
|
for (let Se = 0; Se < Z.childNodes.length; Se++) {
|
|
33970
33974
|
const j = Z.childNodes[Se];
|
|
33971
|
-
n.isElementNode(j) && j.localName ===
|
|
33975
|
+
n.isElementNode(j) && j.localName === K && (j.namespaceURI === W || W == null) && Y.push(j);
|
|
33972
33976
|
}
|
|
33973
33977
|
return Y;
|
|
33974
33978
|
}
|
|
33975
33979
|
t.findChildren = l;
|
|
33976
|
-
function u(M,
|
|
33977
|
-
return l(M,
|
|
33980
|
+
function u(M, K, W) {
|
|
33981
|
+
return l(M, K, W);
|
|
33978
33982
|
}
|
|
33979
33983
|
t.findChilds = u;
|
|
33980
33984
|
const d = {
|
|
@@ -33991,13 +33995,13 @@ Ae.assertIsDocumentFragmentNode = q6;
|
|
|
33991
33995
|
"\r": "
"
|
|
33992
33996
|
};
|
|
33993
33997
|
function h(M) {
|
|
33994
|
-
return M.replace(/([&<"\r\n\t])/g, function(
|
|
33998
|
+
return M.replace(/([&<"\r\n\t])/g, function(K, W) {
|
|
33995
33999
|
return d[W];
|
|
33996
34000
|
});
|
|
33997
34001
|
}
|
|
33998
34002
|
t.encodeSpecialCharactersInAttribute = h;
|
|
33999
34003
|
function g(M) {
|
|
34000
|
-
return M.replace(/([&<>\r])/g, function(
|
|
34004
|
+
return M.replace(/([&<>\r])/g, function(K, W) {
|
|
34001
34005
|
return p[W];
|
|
34002
34006
|
});
|
|
34003
34007
|
}
|
|
@@ -34015,53 +34019,53 @@ Ae.assertIsDocumentFragmentNode = q6;
|
|
|
34015
34019
|
return Buffer.from(M.replace(/(\r\n|\r)/g, "").replace(/-----BEGIN [A-Z\x20]{1,48}-----\n?/, "").replace(/-----END [A-Z\x20]{1,48}-----\n?/, ""), "base64");
|
|
34016
34020
|
}
|
|
34017
34021
|
t.pemToDer = A;
|
|
34018
|
-
function T(M,
|
|
34022
|
+
function T(M, K) {
|
|
34019
34023
|
const W = Buffer.isBuffer(M) ? M.toString("base64").trim() : M.replace(/(\r\n|\r)/g, "").trim();
|
|
34020
34024
|
if (t.PEM_FORMAT_REGEX.test(W))
|
|
34021
34025
|
return $(W);
|
|
34022
34026
|
if (t.BASE64_REGEX.test(W.replace(/ /g, ""))) {
|
|
34023
|
-
if (
|
|
34027
|
+
if (K == null)
|
|
34024
34028
|
throw new Error("PEM label is required when DER is given.");
|
|
34025
|
-
const Z = `-----BEGIN ${
|
|
34029
|
+
const Z = `-----BEGIN ${K}-----
|
|
34026
34030
|
${W.replace(/ /g, "")}
|
|
34027
|
-
-----END ${
|
|
34031
|
+
-----END ${K}-----`;
|
|
34028
34032
|
return $(Z);
|
|
34029
34033
|
}
|
|
34030
34034
|
throw new Error("Unknown DER format.");
|
|
34031
34035
|
}
|
|
34032
34036
|
t.derToPem = T;
|
|
34033
|
-
function O(M,
|
|
34037
|
+
function O(M, K = []) {
|
|
34034
34038
|
if (!n.isElementNode(M.parentNode))
|
|
34035
|
-
return
|
|
34039
|
+
return K;
|
|
34036
34040
|
const W = M.parentNode;
|
|
34037
34041
|
if (!W)
|
|
34038
|
-
return
|
|
34042
|
+
return K;
|
|
34039
34043
|
if (W.attributes && W.attributes.length > 0)
|
|
34040
34044
|
for (let Z = 0; Z < W.attributes.length; Z++) {
|
|
34041
34045
|
const Y = W.attributes[Z];
|
|
34042
|
-
Y && Y.nodeName && Y.nodeName.search(/^xmlns:?/) !== -1 &&
|
|
34046
|
+
Y && Y.nodeName && Y.nodeName.search(/^xmlns:?/) !== -1 && K.push({
|
|
34043
34047
|
prefix: Y.nodeName.replace(/^xmlns:?/, ""),
|
|
34044
34048
|
namespaceURI: Y.nodeValue || ""
|
|
34045
34049
|
});
|
|
34046
34050
|
}
|
|
34047
|
-
return O(W,
|
|
34051
|
+
return O(W, K);
|
|
34048
34052
|
}
|
|
34049
34053
|
function D(M) {
|
|
34050
|
-
const
|
|
34051
|
-
for (let W = 0; W <
|
|
34052
|
-
const Z =
|
|
34054
|
+
const K = M.attributes;
|
|
34055
|
+
for (let W = 0; W < K.length; W++) {
|
|
34056
|
+
const Z = K[W].nodeName;
|
|
34053
34057
|
if (Z.search(/^xmlns:?/) !== -1)
|
|
34054
34058
|
return Z.replace(/^xmlns:?/, "");
|
|
34055
34059
|
}
|
|
34056
34060
|
return M.prefix || "";
|
|
34057
34061
|
}
|
|
34058
34062
|
function x(M) {
|
|
34059
|
-
return M.every((
|
|
34063
|
+
return M.every((K) => n.isElementNode(K));
|
|
34060
34064
|
}
|
|
34061
|
-
function q(M,
|
|
34062
|
-
if (
|
|
34065
|
+
function q(M, K, W) {
|
|
34066
|
+
if (K == null)
|
|
34063
34067
|
return [];
|
|
34064
|
-
const Z = e.selectWithResolver(
|
|
34068
|
+
const Z = e.selectWithResolver(K, M, W);
|
|
34065
34069
|
if (!r(Z))
|
|
34066
34070
|
return [];
|
|
34067
34071
|
if (!x(Z))
|
|
@@ -34082,8 +34086,8 @@ ${W.replace(/ /g, "")}
|
|
|
34082
34086
|
return j;
|
|
34083
34087
|
}
|
|
34084
34088
|
t.findAncestorNs = q;
|
|
34085
|
-
function V(M,
|
|
34086
|
-
const W = Buffer.from(M, "base64"), Z = Buffer.from(
|
|
34089
|
+
function V(M, K) {
|
|
34090
|
+
const W = Buffer.from(M, "base64"), Z = Buffer.from(K, "base64");
|
|
34087
34091
|
if (typeof W.equals == "function")
|
|
34088
34092
|
return W.equals(Z);
|
|
34089
34093
|
if (W.length !== Z.length)
|
|
@@ -37665,24 +37669,24 @@ function sS(t, e, n, r, i) {
|
|
|
37665
37669
|
function s(L) {
|
|
37666
37670
|
if (L > 65535) {
|
|
37667
37671
|
L -= 65536;
|
|
37668
|
-
var
|
|
37669
|
-
return String.fromCharCode(
|
|
37672
|
+
var G = 55296 + (L >> 10), pe = 56320 + (L & 1023);
|
|
37673
|
+
return String.fromCharCode(G, pe);
|
|
37670
37674
|
} else
|
|
37671
37675
|
return String.fromCharCode(L);
|
|
37672
37676
|
}
|
|
37673
37677
|
function a(L) {
|
|
37674
|
-
var
|
|
37675
|
-
return Object.hasOwnProperty.call(n,
|
|
37678
|
+
var G = L.slice(1, -1);
|
|
37679
|
+
return Object.hasOwnProperty.call(n, G) ? n[G] : G.charAt(0) === "#" ? s(parseInt(G.substr(1).replace("x", "0x"))) : (i.error("entity not found:" + L), L);
|
|
37676
37680
|
}
|
|
37677
37681
|
function l(L) {
|
|
37678
37682
|
if (L > T) {
|
|
37679
|
-
var
|
|
37680
|
-
g && u(T), r.characters(
|
|
37683
|
+
var G = t.substring(T, L).replace(/&#?\w+;/g, a);
|
|
37684
|
+
g && u(T), r.characters(G, 0, L - T), T = L;
|
|
37681
37685
|
}
|
|
37682
37686
|
}
|
|
37683
|
-
function u(L,
|
|
37684
|
-
for (; L >= p && (
|
|
37685
|
-
d =
|
|
37687
|
+
function u(L, G) {
|
|
37688
|
+
for (; L >= p && (G = h.exec(t)); )
|
|
37689
|
+
d = G.index, p = d + G[0].length, g.lineNumber++;
|
|
37686
37690
|
g.columnNumber = L - d + 1;
|
|
37687
37691
|
}
|
|
37688
37692
|
for (var d = 0, p = 0, h = /.*(?:\r\n?|\n)|.*$/g, g = r.locator, $ = [{ currentNSMap: e }], A = {}, T = 0; ; ) {
|
|
@@ -37699,12 +37703,12 @@ function sS(t, e, n, r, i) {
|
|
|
37699
37703
|
case "/":
|
|
37700
37704
|
var j = t.indexOf(">", O + 3), q = t.substring(O + 2, j).replace(/[ \t\n\r]+$/g, ""), V = $.pop();
|
|
37701
37705
|
j < 0 ? (q = t.substring(O + 2).replace(/[\s<].*/, ""), i.error("end tag name: " + q + " is not complete:" + V.tagName), j = O + 1 + q.length) : q.match(/\s</) && (q = q.replace(/[\s<].*/, ""), i.error("end tag name: " + q + " maybe not complete"), j = O + 1 + q.length);
|
|
37702
|
-
var M = V.localNSMap,
|
|
37706
|
+
var M = V.localNSMap, K = V.tagName == q, W = K || V.tagName && V.tagName.toLowerCase() == q.toLowerCase();
|
|
37703
37707
|
if (W) {
|
|
37704
37708
|
if (r.endElement(V.uri, V.localName, q), M)
|
|
37705
37709
|
for (var Z in M)
|
|
37706
37710
|
Object.prototype.hasOwnProperty.call(M, Z) && r.endPrefixMapping(Z);
|
|
37707
|
-
|
|
37711
|
+
K || i.fatalError("end tag name: " + q + " is not match the current start tagName:" + V.tagName);
|
|
37708
37712
|
} else
|
|
37709
37713
|
$.push(V);
|
|
37710
37714
|
j++;
|
|
@@ -38624,34 +38628,34 @@ class Vn {
|
|
|
38624
38628
|
let u;
|
|
38625
38629
|
const d = ["append", "prepend", "before", "after"], p = n.prefix, h = n.attrs || {}, g = n.location || {}, $ = n.existingPrefixes || {};
|
|
38626
38630
|
if (this.namespaceResolver = {
|
|
38627
|
-
lookupNamespaceURI: function(
|
|
38628
|
-
return
|
|
38631
|
+
lookupNamespaceURI: function(K) {
|
|
38632
|
+
return K ? $[K] : null;
|
|
38629
38633
|
}
|
|
38630
38634
|
}, g.reference = g.reference || "/*", g.action = g.action || "append", d.indexOf(g.action) === -1) {
|
|
38631
|
-
const
|
|
38635
|
+
const K = new Error(`location.action option has an invalid action: ${g.action}, must be any of the following values: ${d.join(", ")}`);
|
|
38632
38636
|
if (i) {
|
|
38633
|
-
i(
|
|
38637
|
+
i(K);
|
|
38634
38638
|
return;
|
|
38635
38639
|
} else
|
|
38636
|
-
throw
|
|
38640
|
+
throw K;
|
|
38637
38641
|
}
|
|
38638
|
-
p ? (a += `:${p}`, u = `${p}:`) : u = "", Object.keys(h).forEach(function(
|
|
38639
|
-
|
|
38642
|
+
p ? (a += `:${p}`, u = `${p}:`) : u = "", Object.keys(h).forEach(function(K) {
|
|
38643
|
+
K !== "xmlns" && K !== a && l.push(`${K}="${h[K]}"`);
|
|
38640
38644
|
}), l.push(`${a}="http://www.w3.org/2000/09/xmldsig#"`);
|
|
38641
38645
|
let A = `<${u}Signature ${l.join(" ")}>`;
|
|
38642
38646
|
A += this.createSignedInfo(s, p), A += this.getKeyInfo(p), A += `</${u}Signature>`, this.originalXmlWithIds = s.toString();
|
|
38643
38647
|
let T = "";
|
|
38644
|
-
Object.keys($).forEach(function(
|
|
38645
|
-
T += `xmlns:${
|
|
38648
|
+
Object.keys($).forEach(function(K) {
|
|
38649
|
+
T += `xmlns:${K}="${$[K]}" `;
|
|
38646
38650
|
});
|
|
38647
38651
|
const O = `<Dummy ${T}>${A}</Dummy>`, x = new Ir.DOMParser().parseFromString(O).documentElement.firstChild, q = Xt.select1(g.reference, s);
|
|
38648
38652
|
if (!Ft.isNodeLike(q)) {
|
|
38649
|
-
const
|
|
38653
|
+
const K = new Error(`the following xpath cannot be used because it was not found: ${g.reference}`);
|
|
38650
38654
|
if (i) {
|
|
38651
|
-
i(
|
|
38655
|
+
i(K);
|
|
38652
38656
|
return;
|
|
38653
38657
|
} else
|
|
38654
|
-
throw
|
|
38658
|
+
throw K;
|
|
38655
38659
|
}
|
|
38656
38660
|
if (g.action === "append")
|
|
38657
38661
|
q.appendChild(x);
|
|
@@ -38669,16 +38673,16 @@ class Vn {
|
|
|
38669
38673
|
this.signatureNode = x;
|
|
38670
38674
|
const V = Re.findChildren(this.signatureNode, "SignedInfo");
|
|
38671
38675
|
if (V.length === 0) {
|
|
38672
|
-
const
|
|
38676
|
+
const K = new Error("could not find SignedInfo element in the message");
|
|
38673
38677
|
if (i) {
|
|
38674
|
-
i(
|
|
38678
|
+
i(K);
|
|
38675
38679
|
return;
|
|
38676
38680
|
} else
|
|
38677
|
-
throw
|
|
38681
|
+
throw K;
|
|
38678
38682
|
}
|
|
38679
38683
|
const M = V[0];
|
|
38680
|
-
typeof i == "function" ? this.calculateSignatureValue(s, (
|
|
38681
|
-
|
|
38684
|
+
typeof i == "function" ? this.calculateSignatureValue(s, (K, W) => {
|
|
38685
|
+
K ? i(K) : (this.signatureValue = W || "", x.insertBefore(this.createSignature(p), M.nextSibling), this.signatureXml = x.toString(), this.signedXml = s.toString(), i(null, this));
|
|
38682
38686
|
}) : (this.calculateSignatureValue(s), x.insertBefore(this.createSignature(p), M.nextSibling), this.signatureXml = x.toString(), this.signedXml = s.toString());
|
|
38683
38687
|
}
|
|
38684
38688
|
getKeyInfo(e) {
|