authhero 0.219.0 → 0.220.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.mjs CHANGED
@@ -340,15 +340,15 @@ class ma extends dc {
340
340
  } = this.extractFromKey(e[e.length - 1], n), u = l[l.length - 1], d = n.lng || this.language, p = n.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
341
341
  if ((d == null ? void 0 : d.toLowerCase()) === "cimode") {
342
342
  if (p) {
343
- const V = n.nsSeparator || this.options.nsSeparator;
343
+ const z = n.nsSeparator || this.options.nsSeparator;
344
344
  return i ? {
345
- res: `${u}${V}${a}`,
345
+ res: `${u}${z}${a}`,
346
346
  usedKey: a,
347
347
  exactUsedKey: a,
348
348
  usedLng: d,
349
349
  usedNS: u,
350
350
  usedParams: this.getUsedParamsDetails(n)
351
- } : `${u}${V}${a}`;
351
+ } : `${u}${z}${a}`;
352
352
  }
353
353
  return i ? {
354
354
  res: a,
@@ -365,14 +365,14 @@ class ma extends dc {
365
365
  if (x && g && q && O.indexOf(T) < 0 && !(Ne(D) && Array.isArray(g))) {
366
366
  if (!n.returnObjects && !this.options.returnObjects) {
367
367
  this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
368
- const V = this.options.returnedObjectHandler ? this.options.returnedObjectHandler($, g, {
368
+ const z = this.options.returnedObjectHandler ? this.options.returnedObjectHandler($, g, {
369
369
  ...n,
370
370
  ns: l
371
371
  }) : `key '${a} (${this.language})' returned an object instead of string.`;
372
- return i ? (h.res = V, h.usedParams = this.getUsedParamsDetails(n), h) : V;
372
+ return i ? (h.res = z, h.usedParams = this.getUsedParamsDetails(n), h) : z;
373
373
  }
374
374
  if (s) {
375
- const V = Array.isArray(g), M = V ? [] : {}, K = V ? A : $;
375
+ const z = Array.isArray(g), M = z ? [] : {}, K = z ? A : $;
376
376
  for (const W in g)
377
377
  if (Object.prototype.hasOwnProperty.call(g, W)) {
378
378
  const Z = `${K}${s}${W}`;
@@ -387,13 +387,13 @@ class ma extends dc {
387
387
  } else if (x && Ne(D) && Array.isArray(g))
388
388
  g = g.join(D), g && (g = this.extendTranslation(g, e, n, r));
389
389
  else {
390
- let V = !1, M = !1;
390
+ let z = !1, M = !1;
391
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
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
- !this.isValidLookup(g) && W && (V = !0, g = j), this.isValidLookup(g) || (M = !0, g = a);
394
+ !this.isValidLookup(g) && W && (z = !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
- if (M || V || N) {
396
+ if (M || z || N) {
397
397
  if (this.logger.log(N ? "updateKey" : "missingKey", d, u, a, N ? j : g), s) {
398
398
  const pe = this.resolve(a, {
399
399
  ...n,
@@ -419,7 +419,7 @@ class ma extends dc {
419
419
  });
420
420
  }) : G(k, a, j));
421
421
  }
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));
422
+ g = this.extendTranslation(g, e, n, h, r), M && g === a && this.options.appendNamespaceToMissingKey && (g = `${u}:${a}`), (M || z) && this.options.parseMissingKeyHandler && (g = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${u}:${a}` : a, z ? g : void 0));
423
423
  }
424
424
  return i ? (h.res = g, h.usedParams = this.getUsedParamsDetails(n), h) : g;
425
425
  }
@@ -485,20 +485,20 @@ class ma extends dc {
485
485
  var K;
486
486
  if (this.isValidLookup(r)) return;
487
487
  a = q;
488
- const V = [p];
488
+ const z = [p];
489
489
  if ((K = this.i18nFormat) != null && K.addLookupKeys)
490
- this.i18nFormat.addLookupKeys(V, p, q, O, n);
490
+ this.i18nFormat.addLookupKeys(z, p, q, O, n);
491
491
  else {
492
492
  let W;
493
493
  g && (W = this.pluralResolver.getSuffix(q, n.count, n));
494
494
  const Z = `${this.options.pluralSeparator}zero`, Y = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
495
- if (g && (V.push(p + W), n.ordinal && W.indexOf(Y) === 0 && V.push(p + W.replace(Y, this.options.pluralSeparator)), $ && V.push(p + Z)), A) {
495
+ if (g && (z.push(p + W), n.ordinal && W.indexOf(Y) === 0 && z.push(p + W.replace(Y, this.options.pluralSeparator)), $ && z.push(p + Z)), A) {
496
496
  const Se = `${p}${this.options.contextSeparator}${n.context}`;
497
- V.push(Se), g && (V.push(Se + W), n.ordinal && W.indexOf(Y) === 0 && V.push(Se + W.replace(Y, this.options.pluralSeparator)), $ && V.push(Se + Z));
497
+ z.push(Se), g && (z.push(Se + W), n.ordinal && W.indexOf(Y) === 0 && z.push(Se + W.replace(Y, this.options.pluralSeparator)), $ && z.push(Se + Z));
498
498
  }
499
499
  }
500
500
  let M;
501
- for (; M = V.pop(); )
501
+ for (; M = z.pop(); )
502
502
  this.isValidLookup(r) || (s = M, r = this.getResource(q, O, M, n));
503
503
  }));
504
504
  });
@@ -4541,7 +4541,7 @@ const ov = {}, av = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
4541
4541
  3463963227,
4542
4542
  1469046755,
4543
4543
  985887462
4544
- ], V = [
4544
+ ], z = [
4545
4545
  1332899944,
4546
4546
  1700884034,
4547
4547
  1701343084,
@@ -4575,7 +4575,7 @@ const ov = {}, av = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
4575
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(), G = L.length, pe;
4578
+ var L = z.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));
@@ -4654,7 +4654,7 @@ const ov = {}, av = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
4654
4654
  var ee = l(j), we = g(Ce, A);
4655
4655
  function Un(Fe) {
4656
4656
  var Xe = [];
4657
- return Xe.push("$2"), L >= "a" && Xe.push(L), Xe.push("$"), $e < 10 && Xe.push("0"), Xe.push($e.toString()), Xe.push("$"), Xe.push(h(we, we.length)), Xe.push(h(Fe, V.length * 4 - 1)), Xe.join("");
4657
+ return Xe.push("$2"), L >= "a" && Xe.push(L), Xe.push("$"), $e < 10 && Xe.push("0"), Xe.push($e.toString()), Xe.push("$"), Xe.push(h(we, we.length)), Xe.push(h(Fe, z.length * 4 - 1)), Xe.join("");
4658
4658
  }
4659
4659
  if (typeof P > "u")
4660
4660
  return Un(Y(ee, we, $e));
@@ -6576,9 +6576,9 @@ const t_ = [
6576
6576
  async function Qb(t, e) {
6577
6577
  var x, q;
6578
6578
  const { tenantId: n, clientId: r, audience: i, requestedScopes: s } = e, a = s.filter(
6579
- (V) => t_.includes(V)
6579
+ (z) => t_.includes(z)
6580
6580
  ), u = (await t.env.data.resourceServers.list(n)).resource_servers.filter(
6581
- (V) => V.identifier === i
6581
+ (z) => z.identifier === i
6582
6582
  );
6583
6583
  if (u.length === 0)
6584
6584
  return { scopes: a, permissions: [] };
@@ -6588,34 +6588,34 @@ async function Qb(t, e) {
6588
6588
  const p = ((x = d.options) == null ? void 0 : x.enforce_policies) === !0, h = ((q = d.options) == null ? void 0 : q.token_dialect) || "access_token", $ = (await t.env.data.clientGrants.list(n, {
6589
6589
  q: `client_id:"${r}"`
6590
6590
  })).client_grants.find(
6591
- (V) => V.audience === i
6591
+ (z) => z.audience === i
6592
6592
  );
6593
6593
  if (!$)
6594
6594
  return { scopes: a, permissions: [] };
6595
6595
  const A = $.scope || [], T = (d.scopes || []).map(
6596
- (V) => V.value
6596
+ (z) => z.value
6597
6597
  );
6598
6598
  if (!p) {
6599
- let V;
6600
- return s.length === 0 ? V = A.filter(
6599
+ let z;
6600
+ return s.length === 0 ? z = A.filter(
6601
6601
  (K) => T.includes(K)
6602
- ) : V = s.filter(
6602
+ ) : z = s.filter(
6603
6603
  (K) => T.includes(K) && A.includes(K)
6604
6604
  ), { scopes: [
6605
- .../* @__PURE__ */ new Set([...a, ...V])
6605
+ .../* @__PURE__ */ new Set([...a, ...z])
6606
6606
  ], permissions: [] };
6607
6607
  }
6608
6608
  if (h === "access_token_authz") {
6609
- const V = A.filter(
6609
+ const z = A.filter(
6610
6610
  (M) => T.includes(M)
6611
6611
  );
6612
- return { scopes: a, permissions: V };
6612
+ return { scopes: a, permissions: z };
6613
6613
  }
6614
6614
  let O;
6615
6615
  return s.length === 0 ? O = A.filter(
6616
- (V) => T.includes(V)
6616
+ (z) => T.includes(z)
6617
6617
  ) : O = s.filter(
6618
- (V) => T.includes(V) && A.includes(V)
6618
+ (z) => T.includes(z) && A.includes(z)
6619
6619
  ), { scopes: [
6620
6620
  .../* @__PURE__ */ new Set([...a, ...O])
6621
6621
  ], permissions: [] };
@@ -6692,15 +6692,15 @@ async function va(t, e) {
6692
6692
  }), x.forEach((Y) => {
6693
6693
  q.add(Y);
6694
6694
  });
6695
- const V = Array.from(q);
6695
+ const z = Array.from(q);
6696
6696
  if ($ === "access_token_authz") {
6697
- const Y = V.filter(
6697
+ const Y = z.filter(
6698
6698
  (Se) => h.includes(Se)
6699
6699
  );
6700
6700
  return { scopes: l, permissions: Y };
6701
6701
  }
6702
6702
  const M = s.filter(
6703
- (Y) => h.includes(Y) && V.includes(Y)
6703
+ (Y) => h.includes(Y) && z.includes(Y)
6704
6704
  );
6705
6705
  return { scopes: [
6706
6706
  .../* @__PURE__ */ new Set([...l, ...M])
@@ -6708,29 +6708,34 @@ async function va(t, e) {
6708
6708
  }
6709
6709
  const $h = ["sub", "iss", "aud", "exp", "nbf", "iat", "jti"];
6710
6710
  async function yc(t, e) {
6711
- var O, D;
6711
+ var D, x;
6712
6712
  const { authParams: n, user: r, client: i, session_id: s } = e, { signingKeys: a } = await t.env.data.keys.list({
6713
6713
  q: "type:jwt_signing"
6714
6714
  }), l = a.filter(
6715
- (x) => !x.revoked_at || new Date(x.revoked_at) > /* @__PURE__ */ new Date()
6715
+ (q) => !q.revoked_at || new Date(q.revoked_at) > /* @__PURE__ */ new Date()
6716
6716
  ), u = l[l.length - 1];
6717
6717
  if (!(u != null && u.pkcs7))
6718
6718
  throw new E(500, { message: "No signing key available" });
6719
- const d = bv(u.pkcs7), p = t.var.custom_domain ? `https://${t.var.custom_domain}/` : t.env.ISSUER, h = {
6719
+ let d = null;
6720
+ e.organization && (d = await t.env.data.organizations.get(
6721
+ t.var.tenant_id,
6722
+ e.organization
6723
+ ));
6724
+ const p = bv(u.pkcs7), h = t.var.custom_domain ? `https://${t.var.custom_domain}/` : t.env.ISSUER, g = {
6720
6725
  // TODO: consider if the dafault should be removed
6721
6726
  aud: n.audience || "default",
6722
6727
  scope: n.scope || "",
6723
6728
  sub: (r == null ? void 0 : r.user_id) || n.client_id,
6724
- iss: p,
6729
+ iss: h,
6725
6730
  tenant_id: t.var.tenant_id,
6726
6731
  sid: s,
6727
6732
  ...e.organization && { org_id: e.organization },
6728
6733
  ...e.permissions && e.permissions.length > 0 && { permissions: e.permissions }
6729
- }, g = r && ((O = n.scope) != null && O.split(" ").includes("openid")) ? {
6734
+ }, $ = r && ((D = n.scope) != null && D.split(" ").includes("openid")) ? {
6730
6735
  // The audience for an id token is the client id
6731
6736
  aud: n.client_id,
6732
6737
  sub: r.user_id,
6733
- iss: p,
6738
+ iss: h,
6734
6739
  sid: s,
6735
6740
  nonce: n.nonce,
6736
6741
  given_name: r.given_name,
@@ -6741,9 +6746,12 @@ async function yc(t, e) {
6741
6746
  name: r.name,
6742
6747
  email: r.email,
6743
6748
  email_verified: r.email_verified,
6744
- ...e.organization && { org_id: e.organization }
6749
+ ...e.organization && d ? {
6750
+ org_id: e.organization,
6751
+ org_name: d.name
6752
+ } : {}
6745
6753
  } : void 0;
6746
- (D = t.env.hooks) != null && D.onExecuteCredentialsExchange && await t.env.hooks.onExecuteCredentialsExchange(
6754
+ (x = t.env.hooks) != null && x.onExecuteCredentialsExchange && await t.env.hooks.onExecuteCredentialsExchange(
6747
6755
  {
6748
6756
  ctx: t,
6749
6757
  client: i,
@@ -6759,44 +6767,44 @@ async function yc(t, e) {
6759
6767
  },
6760
6768
  {
6761
6769
  accessToken: {
6762
- setCustomClaim: (x, q) => {
6763
- if ($h.includes(x))
6764
- throw new Error(`Cannot overwrite reserved claim '${x}'`);
6765
- h[x] = q;
6770
+ setCustomClaim: (q, z) => {
6771
+ if ($h.includes(q))
6772
+ throw new Error(`Cannot overwrite reserved claim '${q}'`);
6773
+ g[q] = z;
6766
6774
  }
6767
6775
  },
6768
6776
  idToken: {
6769
- setCustomClaim: (x, q) => {
6770
- if ($h.includes(x))
6771
- throw new Error(`Cannot overwrite reserved claim '${x}'`);
6772
- g && (g[x] = q);
6777
+ setCustomClaim: (q, z) => {
6778
+ if ($h.includes(q))
6779
+ throw new Error(`Cannot overwrite reserved claim '${q}'`);
6780
+ $ && ($[q] = z);
6773
6781
  }
6774
6782
  },
6775
6783
  access: {
6776
- deny: (x) => {
6784
+ deny: (q) => {
6777
6785
  throw new E(400, {
6778
- message: `Access denied: ${x}`
6786
+ message: `Access denied: ${q}`
6779
6787
  });
6780
6788
  }
6781
6789
  }
6782
6790
  }
6783
6791
  );
6784
- const $ = {
6792
+ const A = {
6785
6793
  includeIssuedTimestamp: !0,
6786
6794
  expiresIn: new mp(1, "d"),
6787
6795
  headers: {
6788
6796
  kid: u.kid
6789
6797
  }
6790
- }, A = await mh(
6798
+ }, T = await mh(
6791
6799
  "RS256",
6792
- d,
6793
- h,
6794
- $
6795
- ), T = g ? await mh("RS256", d, g, $) : void 0;
6800
+ p,
6801
+ g,
6802
+ A
6803
+ ), O = $ ? await mh("RS256", p, $, A) : void 0;
6796
6804
  return {
6797
- access_token: A,
6805
+ access_token: T,
6798
6806
  refresh_token: e.refresh_token,
6799
- id_token: T,
6807
+ id_token: O,
6800
6808
  token_type: "Bearer",
6801
6809
  expires_in: 86400
6802
6810
  };
@@ -8486,8 +8494,8 @@ var kh;
8486
8494
  return R[I];
8487
8495
  }
8488
8496
  }, h = Object.getPrototypeOf(Function), g = typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map : le(), $ = typeof Set == "function" && typeof Set.prototype.entries == "function" ? Set : Wt(), A = typeof WeakMap == "function" ? WeakMap : Lt(), T = i ? Symbol.for("@reflect-metadata:registry") : void 0, O = bn(), D = Et(O);
8489
- function x(R, I, z, ne) {
8490
- if (ee(z)) {
8497
+ function x(R, I, V, ne) {
8498
+ if (ee(V)) {
8491
8499
  if (!Pt(R))
8492
8500
  throw new TypeError();
8493
8501
  if (!ge(I))
@@ -8500,49 +8508,49 @@ var kh;
8500
8508
  throw new TypeError();
8501
8509
  if (!Fe(ne) && !ee(ne) && !we(ne))
8502
8510
  throw new TypeError();
8503
- return we(ne) && (ne = void 0), z = rt(z), P(R, I, z, ne);
8511
+ return we(ne) && (ne = void 0), V = rt(V), P(R, I, V, ne);
8504
8512
  }
8505
8513
  }
8506
8514
  e("decorate", x);
8507
8515
  function q(R, I) {
8508
- function z(ne, ve) {
8516
+ function V(ne, ve) {
8509
8517
  if (!Fe(ne))
8510
8518
  throw new TypeError();
8511
8519
  if (!ee(ve) && !me(ve))
8512
8520
  throw new TypeError();
8513
8521
  pe(R, I, ne, ve);
8514
8522
  }
8515
- return z;
8523
+ return V;
8516
8524
  }
8517
8525
  e("metadata", q);
8518
- function V(R, I, z, ne) {
8519
- if (!Fe(z))
8526
+ function z(R, I, V, ne) {
8527
+ if (!Fe(V))
8520
8528
  throw new TypeError();
8521
- return ee(ne) || (ne = rt(ne)), pe(R, I, z, ne);
8529
+ return ee(ne) || (ne = rt(ne)), pe(R, I, V, ne);
8522
8530
  }
8523
- e("defineMetadata", V);
8524
- function M(R, I, z) {
8531
+ e("defineMetadata", z);
8532
+ function M(R, I, V) {
8525
8533
  if (!Fe(I))
8526
8534
  throw new TypeError();
8527
- return ee(z) || (z = rt(z)), N(R, I, z);
8535
+ return ee(V) || (V = rt(V)), N(R, I, V);
8528
8536
  }
8529
8537
  e("hasMetadata", M);
8530
- function K(R, I, z) {
8538
+ function K(R, I, V) {
8531
8539
  if (!Fe(I))
8532
8540
  throw new TypeError();
8533
- return ee(z) || (z = rt(z)), k(R, I, z);
8541
+ return ee(V) || (V = rt(V)), k(R, I, V);
8534
8542
  }
8535
8543
  e("hasOwnMetadata", K);
8536
- function W(R, I, z) {
8544
+ function W(R, I, V) {
8537
8545
  if (!Fe(I))
8538
8546
  throw new TypeError();
8539
- return ee(z) || (z = rt(z)), L(R, I, z);
8547
+ return ee(V) || (V = rt(V)), L(R, I, V);
8540
8548
  }
8541
8549
  e("getMetadata", W);
8542
- function Z(R, I, z) {
8550
+ function Z(R, I, V) {
8543
8551
  if (!Fe(I))
8544
8552
  throw new TypeError();
8545
- return ee(z) || (z = rt(z)), G(R, I, z);
8553
+ return ee(V) || (V = rt(V)), G(R, I, V);
8546
8554
  }
8547
8555
  e("getOwnMetadata", Z);
8548
8556
  function Y(R, I) {
@@ -8557,24 +8565,24 @@ var kh;
8557
8565
  return ee(I) || (I = rt(I)), $e(R, I);
8558
8566
  }
8559
8567
  e("getOwnMetadataKeys", Se);
8560
- function j(R, I, z) {
8568
+ function j(R, I, V) {
8561
8569
  if (!Fe(I))
8562
8570
  throw new TypeError();
8563
- if (ee(z) || (z = rt(z)), !Fe(I))
8571
+ if (ee(V) || (V = rt(V)), !Fe(I))
8564
8572
  throw new TypeError();
8565
- ee(z) || (z = rt(z));
8573
+ ee(V) || (V = rt(V));
8566
8574
  var ne = _e(
8567
8575
  I,
8568
- z,
8576
+ V,
8569
8577
  /*Create*/
8570
8578
  !1
8571
8579
  );
8572
- return ee(ne) ? !1 : ne.OrdinaryDeleteMetadata(R, I, z);
8580
+ return ee(ne) ? !1 : ne.OrdinaryDeleteMetadata(R, I, V);
8573
8581
  }
8574
8582
  e("deleteMetadata", j);
8575
8583
  function F(R, I) {
8576
- for (var z = R.length - 1; z >= 0; --z) {
8577
- var ne = R[z], ve = ne(I);
8584
+ for (var V = R.length - 1; V >= 0; --V) {
8585
+ var ne = R[V], ve = ne(I);
8578
8586
  if (!ee(ve) && !we(ve)) {
8579
8587
  if (!ge(ve))
8580
8588
  throw new TypeError();
@@ -8583,9 +8591,9 @@ var kh;
8583
8591
  }
8584
8592
  return I;
8585
8593
  }
8586
- function P(R, I, z, ne) {
8594
+ function P(R, I, V, ne) {
8587
8595
  for (var ve = R.length - 1; ve >= 0; --ve) {
8588
- var it = R[ve], Be = it(I, z, ne);
8596
+ var it = R[ve], Be = it(I, V, ne);
8589
8597
  if (!ee(Be) && !we(Be)) {
8590
8598
  if (!Fe(Be))
8591
8599
  throw new TypeError();
@@ -8594,59 +8602,59 @@ var kh;
8594
8602
  }
8595
8603
  return ne;
8596
8604
  }
8597
- function N(R, I, z) {
8598
- var ne = k(R, I, z);
8605
+ function N(R, I, V) {
8606
+ var ne = k(R, I, V);
8599
8607
  if (ne)
8600
8608
  return !0;
8601
8609
  var ve = Bt(I);
8602
- return we(ve) ? !1 : N(R, ve, z);
8610
+ return we(ve) ? !1 : N(R, ve, V);
8603
8611
  }
8604
- function k(R, I, z) {
8612
+ function k(R, I, V) {
8605
8613
  var ne = _e(
8606
8614
  I,
8607
- z,
8615
+ V,
8608
8616
  /*Create*/
8609
8617
  !1
8610
8618
  );
8611
- return ee(ne) ? !1 : te(ne.OrdinaryHasOwnMetadata(R, I, z));
8619
+ return ee(ne) ? !1 : te(ne.OrdinaryHasOwnMetadata(R, I, V));
8612
8620
  }
8613
- function L(R, I, z) {
8614
- var ne = k(R, I, z);
8621
+ function L(R, I, V) {
8622
+ var ne = k(R, I, V);
8615
8623
  if (ne)
8616
- return G(R, I, z);
8624
+ return G(R, I, V);
8617
8625
  var ve = Bt(I);
8618
8626
  if (!we(ve))
8619
- return L(R, ve, z);
8627
+ return L(R, ve, V);
8620
8628
  }
8621
- function G(R, I, z) {
8629
+ function G(R, I, V) {
8622
8630
  var ne = _e(
8623
8631
  I,
8624
- z,
8632
+ V,
8625
8633
  /*Create*/
8626
8634
  !1
8627
8635
  );
8628
8636
  if (!ee(ne))
8629
- return ne.OrdinaryGetOwnMetadata(R, I, z);
8637
+ return ne.OrdinaryGetOwnMetadata(R, I, V);
8630
8638
  }
8631
- function pe(R, I, z, ne) {
8639
+ function pe(R, I, V, ne) {
8632
8640
  var ve = _e(
8633
- z,
8641
+ V,
8634
8642
  ne,
8635
8643
  /*Create*/
8636
8644
  !0
8637
8645
  );
8638
- ve.OrdinaryDefineOwnMetadata(R, I, z, ne);
8646
+ ve.OrdinaryDefineOwnMetadata(R, I, V, ne);
8639
8647
  }
8640
8648
  function se(R, I) {
8641
- var z = $e(R, I), ne = Bt(R);
8649
+ var V = $e(R, I), ne = Bt(R);
8642
8650
  if (ne === null)
8643
- return z;
8651
+ return V;
8644
8652
  var ve = se(ne, I);
8645
8653
  if (ve.length <= 0)
8646
- return z;
8647
- if (z.length <= 0)
8654
+ return V;
8655
+ if (V.length <= 0)
8648
8656
  return ve;
8649
- for (var it = new $(), Be = [], c = 0, f = z; c < f.length; c++) {
8657
+ for (var it = new $(), Be = [], c = 0, f = V; c < f.length; c++) {
8650
8658
  var y = f[c], b = it.has(y);
8651
8659
  b || (it.add(y), Be.push(y));
8652
8660
  }
@@ -8657,13 +8665,13 @@ var kh;
8657
8665
  return Be;
8658
8666
  }
8659
8667
  function $e(R, I) {
8660
- var z = _e(
8668
+ var V = _e(
8661
8669
  R,
8662
8670
  I,
8663
8671
  /*create*/
8664
8672
  !1
8665
8673
  );
8666
- return z ? z.OrdinaryOwnMetadataKeys(R, I) : [];
8674
+ return V ? V.OrdinaryOwnMetadataKeys(R, I) : [];
8667
8675
  }
8668
8676
  function Ce(R) {
8669
8677
  if (R === null)
@@ -8712,9 +8720,9 @@ var kh;
8712
8720
  case 5:
8713
8721
  return R;
8714
8722
  }
8715
- var z = "string", ne = Lo(R, s);
8723
+ var V = "string", ne = Lo(R, s);
8716
8724
  if (ne !== void 0) {
8717
- var ve = ne.call(R, z);
8725
+ var ve = ne.call(R, V);
8718
8726
  if (Fe(ve))
8719
8727
  throw new TypeError();
8720
8728
  return ve;
@@ -8722,7 +8730,7 @@ var kh;
8722
8730
  return tn(R);
8723
8731
  }
8724
8732
  function tn(R, I) {
8725
- var z, ne;
8733
+ var V, ne;
8726
8734
  {
8727
8735
  var ve = R.toString;
8728
8736
  if (Me(ve)) {
@@ -8730,9 +8738,9 @@ var kh;
8730
8738
  if (!Fe(ne))
8731
8739
  return ne;
8732
8740
  }
8733
- var z = R.valueOf;
8734
- if (Me(z)) {
8735
- var ne = z.call(R);
8741
+ var V = R.valueOf;
8742
+ if (Me(V)) {
8743
+ var ne = V.call(R);
8736
8744
  if (!Fe(ne))
8737
8745
  return ne;
8738
8746
  }
@@ -8772,21 +8780,21 @@ var kh;
8772
8780
  return R === I || R !== R && I !== I;
8773
8781
  }
8774
8782
  function Lo(R, I) {
8775
- var z = R[I];
8776
- if (z != null) {
8777
- if (!Me(z))
8783
+ var V = R[I];
8784
+ if (V != null) {
8785
+ if (!Me(V))
8778
8786
  throw new TypeError();
8779
- return z;
8787
+ return V;
8780
8788
  }
8781
8789
  }
8782
8790
  function fe(R) {
8783
8791
  var I = Lo(R, a);
8784
8792
  if (!Me(I))
8785
8793
  throw new TypeError();
8786
- var z = I.call(R);
8787
- if (!Fe(z))
8794
+ var V = I.call(R);
8795
+ if (!Fe(V))
8788
8796
  throw new TypeError();
8789
- return z;
8797
+ return V;
8790
8798
  }
8791
8799
  function lt(R) {
8792
8800
  return R.value;
@@ -8803,7 +8811,7 @@ var kh;
8803
8811
  var I = Object.getPrototypeOf(R);
8804
8812
  if (typeof R != "function" || R === h || I !== h)
8805
8813
  return I;
8806
- var z = R.prototype, ne = z && Object.getPrototypeOf(z);
8814
+ var V = R.prototype, ne = V && Object.getPrototypeOf(V);
8807
8815
  if (ne == null || ne === Object.prototype)
8808
8816
  return I;
8809
8817
  var ve = ne.constructor;
@@ -8812,7 +8820,7 @@ var kh;
8812
8820
  function Gt() {
8813
8821
  var R;
8814
8822
  !ee(T) && typeof n.Reflect < "u" && !(T in n.Reflect) && typeof n.Reflect.defineMetadata == "function" && (R = nn(n.Reflect));
8815
- var I, z, ne, ve = new A(), it = {
8823
+ var I, V, ne, ve = new A(), it = {
8816
8824
  registerProvider: Be,
8817
8825
  getProvider: f,
8818
8826
  setProvider: b
@@ -8829,10 +8837,10 @@ var kh;
8829
8837
  break;
8830
8838
  case I === v:
8831
8839
  break;
8832
- case ee(z):
8833
- z = v;
8840
+ case ee(V):
8841
+ V = v;
8834
8842
  break;
8835
- case z === v:
8843
+ case V === v:
8836
8844
  break;
8837
8845
  default:
8838
8846
  ne === void 0 && (ne = new $()), ne.add(v);
@@ -8843,8 +8851,8 @@ var kh;
8843
8851
  if (!ee(I)) {
8844
8852
  if (I.isProviderFor(v, S))
8845
8853
  return I;
8846
- if (!ee(z)) {
8847
- if (z.isProviderFor(v, S))
8854
+ if (!ee(V)) {
8855
+ if (V.isProviderFor(v, S))
8848
8856
  return I;
8849
8857
  if (!ee(ne))
8850
8858
  for (var X = fe(ne); ; ) {
@@ -8867,7 +8875,7 @@ var kh;
8867
8875
  function y(v) {
8868
8876
  if (ee(v))
8869
8877
  throw new TypeError();
8870
- return I === v || z === v || !ee(ne) && ne.has(v);
8878
+ return I === v || V === v || !ee(ne) && ne.has(v);
8871
8879
  }
8872
8880
  function b(v, S, X) {
8873
8881
  if (!y(X))
@@ -8892,7 +8900,7 @@ var kh;
8892
8900
  }), R;
8893
8901
  }
8894
8902
  function Et(R) {
8895
- var I = new A(), z = {
8903
+ var I = new A(), V = {
8896
8904
  isProviderFor: function(y, b) {
8897
8905
  var v = I.get(y);
8898
8906
  return ee(v) ? !1 : v.has(b);
@@ -8903,7 +8911,7 @@ var kh;
8903
8911
  OrdinaryOwnMetadataKeys: c,
8904
8912
  OrdinaryDeleteMetadata: f
8905
8913
  };
8906
- return O.registerProvider(z), z;
8914
+ return O.registerProvider(V), V;
8907
8915
  function ne(y, b, v) {
8908
8916
  var S = I.get(y), X = !1;
8909
8917
  if (ee(S)) {
@@ -8915,7 +8923,7 @@ var kh;
8915
8923
  if (ee(ye)) {
8916
8924
  if (!v)
8917
8925
  return;
8918
- if (ye = new g(), S.set(b, ye), !R.setProvider(y, b, z))
8926
+ if (ye = new g(), S.set(b, ye), !R.setProvider(y, b, V))
8919
8927
  throw S.delete(b), X && I.delete(y), new Error("Wrong provider for target.");
8920
8928
  }
8921
8929
  return ye;
@@ -8991,31 +8999,31 @@ var kh;
8991
8999
  }
8992
9000
  }
8993
9001
  function nn(R) {
8994
- var I = R.defineMetadata, z = R.hasOwnMetadata, ne = R.getOwnMetadata, ve = R.getOwnMetadataKeys, it = R.deleteMetadata, Be = new A(), c = {
9002
+ var I = R.defineMetadata, V = R.hasOwnMetadata, ne = R.getOwnMetadata, ve = R.getOwnMetadataKeys, it = R.deleteMetadata, Be = new A(), c = {
8995
9003
  isProviderFor: function(f, y) {
8996
9004
  var b = Be.get(f);
8997
9005
  return !ee(b) && b.has(y) ? !0 : ve(f, y).length ? (ee(b) && (b = new $(), Be.set(f, b)), b.add(y), !0) : !1;
8998
9006
  },
8999
9007
  OrdinaryDefineOwnMetadata: I,
9000
- OrdinaryHasOwnMetadata: z,
9008
+ OrdinaryHasOwnMetadata: V,
9001
9009
  OrdinaryGetOwnMetadata: ne,
9002
9010
  OrdinaryOwnMetadataKeys: ve,
9003
9011
  OrdinaryDeleteMetadata: it
9004
9012
  };
9005
9013
  return c;
9006
9014
  }
9007
- function _e(R, I, z) {
9015
+ function _e(R, I, V) {
9008
9016
  var ne = O.getProvider(R, I);
9009
9017
  if (!ee(ne))
9010
9018
  return ne;
9011
- if (z) {
9019
+ if (V) {
9012
9020
  if (O.setProvider(R, I, D))
9013
9021
  return D;
9014
9022
  throw new Error("Illegal state.");
9015
9023
  }
9016
9024
  }
9017
9025
  function le() {
9018
- var R = {}, I = [], z = (
9026
+ var R = {}, I = [], V = (
9019
9027
  /** @class */
9020
9028
  function() {
9021
9029
  function c(f, y, b) {
@@ -9085,11 +9093,11 @@ var kh;
9085
9093
  }, c.prototype.clear = function() {
9086
9094
  this._keys.length = 0, this._values.length = 0, this._cacheKey = R, this._cacheIndex = -2;
9087
9095
  }, c.prototype.keys = function() {
9088
- return new z(this._keys, this._values, ve);
9096
+ return new V(this._keys, this._values, ve);
9089
9097
  }, c.prototype.values = function() {
9090
- return new z(this._keys, this._values, it);
9098
+ return new V(this._keys, this._values, it);
9091
9099
  }, c.prototype.entries = function() {
9092
- return new z(this._keys, this._values, Be);
9100
+ return new V(this._keys, this._values, Be);
9093
9101
  }, c.prototype["@@iterator"] = function() {
9094
9102
  return this.entries();
9095
9103
  }, c.prototype[a] = function() {
@@ -9131,12 +9139,12 @@ var kh;
9131
9139
  },
9132
9140
  enumerable: !0,
9133
9141
  configurable: !0
9134
- }), I.prototype.has = function(z) {
9135
- return this._map.has(z);
9136
- }, I.prototype.add = function(z) {
9137
- return this._map.set(z, z), this;
9138
- }, I.prototype.delete = function(z) {
9139
- return this._map.delete(z);
9142
+ }), I.prototype.has = function(V) {
9143
+ return this._map.has(V);
9144
+ }, I.prototype.add = function(V) {
9145
+ return this._map.set(V, V), this;
9146
+ }, I.prototype.delete = function(V) {
9147
+ return this._map.delete(V);
9140
9148
  }, I.prototype.clear = function() {
9141
9149
  this._map.clear();
9142
9150
  }, I.prototype.keys = function() {
@@ -9155,7 +9163,7 @@ var kh;
9155
9163
  return R;
9156
9164
  }
9157
9165
  function Lt() {
9158
- var R = 16, I = p.create(), z = ne();
9166
+ var R = 16, I = p.create(), V = ne();
9159
9167
  return (
9160
9168
  /** @class */
9161
9169
  function() {
@@ -9203,12 +9211,12 @@ var kh;
9203
9211
  return I[f] = !0, f;
9204
9212
  }
9205
9213
  function ve(f, y) {
9206
- if (!r.call(f, z)) {
9214
+ if (!r.call(f, V)) {
9207
9215
  if (!y)
9208
9216
  return;
9209
- Object.defineProperty(f, z, { value: p.create() });
9217
+ Object.defineProperty(f, V, { value: p.create() });
9210
9218
  }
9211
- return f[z];
9219
+ return f[V];
9212
9220
  }
9213
9221
  function it(f, y) {
9214
9222
  for (var b = 0; b < y; ++b)
@@ -19459,7 +19467,7 @@ function gl(t, e) {
19459
19467
  T[O] = D;
19460
19468
  continue;
19461
19469
  }
19462
- const q = i[x] ?? r, V = [
19470
+ const q = i[x] ?? r, z = [
19463
19471
  "create",
19464
19472
  "update",
19465
19473
  "remove",
@@ -19468,7 +19476,7 @@ function gl(t, e) {
19468
19476
  "used"
19469
19477
  ].includes(O);
19470
19478
  T[O] = async (...M) => {
19471
- if (V)
19479
+ if (z)
19472
19480
  return await D.apply($, M);
19473
19481
  const K = ex(
19474
19482
  g,
@@ -25619,8 +25627,8 @@ const AE = new be().openapi(
25619
25627
  if (q && typeof q == "object" && "access_token" in q)
25620
25628
  return t.json(q);
25621
25629
  } catch (q) {
25622
- const V = q;
25623
- "message" in V && typeof V.message == "string" && ($ = V.message);
25630
+ const z = q;
25631
+ "message" in z && typeof z.message == "string" && ($ = z.message);
25624
25632
  }
25625
25633
  const A = t.get("ip"), T = t.get("useragent"), O = t.get("auth0_client"), D = Qn(O), x = await e.data.loginSessions.create(
25626
25634
  h.tenant.id,
@@ -26086,14 +26094,14 @@ async function TE({
26086
26094
  description: "Successful silent authentication"
26087
26095
  });
26088
26096
  await t.env.data.logs.create(e.tenant.id, q);
26089
- const V = new Headers();
26090
- V.set("Server-Timing", "cf-nel=0; no-cloudflare-insights=1");
26097
+ const z = new Headers();
26098
+ z.set("Server-Timing", "cf-nel=0; no-cloudflare-insights=1");
26091
26099
  const M = ya(
26092
26100
  e.tenant.id,
26093
26101
  n.id,
26094
26102
  t.req.header("host")
26095
26103
  );
26096
- return V.set("set-cookie", M), t.html(
26104
+ return z.set("set-cookie", M), t.html(
26097
26105
  Tu(
26098
26106
  $,
26099
26107
  JSON.stringify({
@@ -26102,7 +26110,7 @@ async function TE({
26102
26110
  })
26103
26111
  ),
26104
26112
  {
26105
- headers: V
26113
+ headers: z
26106
26114
  }
26107
26115
  );
26108
26116
  }
@@ -26199,7 +26207,7 @@ const IE = ["email", "sms", "Username-Password-Authentication"], OE = new be().o
26199
26207
  auth0Client: D,
26200
26208
  login_hint: x,
26201
26209
  ui_locales: q,
26202
- organization: V
26210
+ organization: z
26203
26211
  } = t.req.valid("query");
26204
26212
  t.set("log", "authorize");
26205
26213
  const M = await as(e, n);
@@ -26220,7 +26228,7 @@ const IE = ["email", "sms", "Username-Password-Authentication"], OE = new be().o
26220
26228
  code_challenge_method: $,
26221
26229
  username: x,
26222
26230
  ui_locales: q,
26223
- organization: V
26231
+ organization: z
26224
26232
  }, W = t.req.header("origin");
26225
26233
  if (W && !I1(W, M.web_origins || []))
26226
26234
  throw new E(403, {
@@ -27265,7 +27273,7 @@ const i8 = (t, e) => {
27265
27273
  email: i,
27266
27274
  client: s
27267
27275
  }) => {
27268
- const a = s.connections.map(({ strategy: V }) => V), l = a.includes("email") || a.includes("Username-Password-Authentication"), u = a.includes("sms"), d = a.includes("facebook"), p = a.includes("google-oauth2"), h = a.includes("apple"), g = a.includes("vipps"), $ = d || p || h || g, A = l || u;
27276
+ const a = s.connections.map(({ strategy: z }) => z), l = a.includes("email") || a.includes("Username-Password-Authentication"), u = a.includes("sms"), d = a.includes("facebook"), p = a.includes("google-oauth2"), h = a.includes("apple"), g = a.includes("vipps"), $ = d || p || h || g, A = l || u;
27269
27277
  let T = "text", O = "username";
27270
27278
  const D = l && u ? "email_or_phone_placeholder" : l ? "email_placeholder" : "phone_placeholder";
27271
27279
  let x = B.t(
@@ -27944,21 +27952,21 @@ var Zs = "_hp", d8 = {
27944
27952
  const x = s.querySelectorAll(t);
27945
27953
  e:
27946
27954
  for (const q of x)
27947
- for (const V of ca[t])
27948
- if (q.getAttribute(V) === e[V]) {
27955
+ for (const z of ca[t])
27956
+ if (q.getAttribute(z) === e[z]) {
27949
27957
  h = q;
27950
27958
  break e;
27951
27959
  }
27952
27960
  if (!h) {
27953
27961
  const q = $.reduce(
27954
- (V, M) => e[M] === void 0 ? V : `${V}-${M}-${e[M]}`,
27962
+ (z, M) => e[M] === void 0 ? z : `${z}-${M}-${e[M]}`,
27955
27963
  t
27956
27964
  );
27957
27965
  g = !Wo[q], h = Wo[q] || (Wo[q] = (() => {
27958
- const V = document.createElement(t);
27966
+ const z = document.createElement(t);
27959
27967
  for (const M of $)
27960
- e[M] !== void 0 && V.setAttribute(M, e[M]), e.rel && V.setAttribute("rel", e.rel);
27961
- return V;
27968
+ e[M] !== void 0 && z.setAttribute(M, e[M]), e.rel && z.setAttribute("rel", e.rel);
27969
+ return z;
27962
27970
  })());
27963
27971
  }
27964
27972
  } else
@@ -27968,18 +27976,18 @@ var Zs = "_hp", d8 = {
27968
27976
  (x) => {
27969
27977
  if ($.length > 0) {
27970
27978
  let q = !1;
27971
- for (const V of s.querySelectorAll(t)) {
27972
- if (q && V.getAttribute(la) !== u) {
27973
- s.insertBefore(x, V);
27979
+ for (const z of s.querySelectorAll(t)) {
27980
+ if (q && z.getAttribute(la) !== u) {
27981
+ s.insertBefore(x, z);
27974
27982
  return;
27975
27983
  }
27976
- V.getAttribute(la) === u && (q = !0);
27984
+ z.getAttribute(la) === u && (q = !0);
27977
27985
  }
27978
27986
  s.appendChild(x);
27979
27987
  } else if (A) {
27980
27988
  let q = !1;
27981
- for (const V of A)
27982
- if (V === x) {
27989
+ for (const z of A)
27990
+ if (z === x) {
27983
27991
  q = !0;
27984
27992
  break;
27985
27993
  }
@@ -27995,21 +28003,21 @@ var Zs = "_hp", d8 = {
27995
28003
  const q = $[0];
27996
28004
  if (n === 2 && (x.innerHTML = ""), (g || A) && T(x), !l && !a)
27997
28005
  return;
27998
- let V = hi[M = x.getAttribute(q)] || (hi[M] = new Promise(
28006
+ let z = hi[M = x.getAttribute(q)] || (hi[M] = new Promise(
27999
28007
  (K, W) => {
28000
28008
  x.addEventListener("load", K), x.addEventListener("error", W);
28001
28009
  }
28002
28010
  ));
28003
- a && (V = V.then(a)), l && (V = V.catch(l)), V.catch(() => {
28011
+ a && (z = z.then(a)), l && (z = z.catch(l)), z.catch(() => {
28004
28012
  });
28005
28013
  });
28006
28014
  if (i && d === "render") {
28007
28015
  const x = ca[t][0];
28008
28016
  if (e[x]) {
28009
- const q = e[x], V = hi[q] || (hi[q] = new Promise((M, K) => {
28017
+ const q = e[x], z = hi[q] || (hi[q] = new Promise((M, K) => {
28010
28018
  T(h), h.addEventListener("load", M), h.addEventListener("error", K);
28011
28019
  }));
28012
- $8(V);
28020
+ $8(z);
28013
28021
  }
28014
28022
  }
28015
28023
  const D = {
@@ -30827,8 +30835,8 @@ const au = ({
30827
30835
  const p = await t.req.parseBody(), h = [], g = {};
30828
30836
  for (const D of d)
30829
30837
  if (D.type === "LEGAL") {
30830
- const x = D.id, q = !!D.required, V = p[x];
30831
- q && (!V || V === "") ? h.push(x) : typeof V == "string" && (g[x] = V);
30838
+ const x = D.id, q = !!D.required, z = p[x];
30839
+ q && (!z || z === "") ? h.push(x) : typeof z == "string" && (g[x] = z);
30832
30840
  }
30833
30841
  if (h.length > 0)
30834
30842
  return t.html(
@@ -32348,11 +32356,11 @@ var $6 = {}, ri = {}, Oo = {}, bl = {};
32348
32356
  q.prototype.toString = function() {
32349
32357
  return this.expression.toString();
32350
32358
  };
32351
- function V(c, f, y) {
32359
+ function z(c, f, y) {
32352
32360
  f in c || (c[f] = y);
32353
32361
  }
32354
32362
  q.prototype.evaluate = function(c) {
32355
- return c.contextNode = c.expressionContextNode, c.contextSize = 1, c.contextPosition = 1, c.isHtml && (V(c, "caseInsensitive", !0), V(c, "allowAnyNamespaceForNoPrefix", !0)), V(c, "caseInsensitive", !1), this.expression.evaluate(c);
32363
+ return c.contextNode = c.expressionContextNode, c.contextSize = 1, c.contextPosition = 1, c.isHtml && (z(c, "caseInsensitive", !0), z(c, "allowAnyNamespaceForNoPrefix", !0)), z(c, "caseInsensitive", !1), this.expression.evaluate(c);
32356
32364
  }, q.XML_NAMESPACE_URI = "http://www.w3.org/XML/1998/namespace", q.XMLNS_NAMESPACE_URI = "http://www.w3.org/2000/xmlns/", M.prototype = new Object(), M.prototype.constructor = M, M.superclass = Object.prototype;
32357
32365
  function M() {
32358
32366
  }
@@ -33641,7 +33649,7 @@ var $6 = {}, ri = {}, Oo = {}, bl = {};
33641
33649
  throw new Wt(Wt.TYPE_ERR);
33642
33650
  return this.nodes[c];
33643
33651
  }, I.ANY_TYPE = 0, I.NUMBER_TYPE = 1, I.STRING_TYPE = 2, I.BOOLEAN_TYPE = 3, I.UNORDERED_NODE_ITERATOR_TYPE = 4, I.ORDERED_NODE_ITERATOR_TYPE = 5, I.UNORDERED_NODE_SNAPSHOT_TYPE = 6, I.ORDERED_NODE_SNAPSHOT_TYPE = 7, I.ANY_UNORDERED_NODE_TYPE = 8, I.FIRST_ORDERED_NODE_TYPE = 9;
33644
- function z(c, f) {
33652
+ function V(c, f) {
33645
33653
  c.createExpression = function(y, b) {
33646
33654
  try {
33647
33655
  return new Lt(y, b, f);
@@ -33664,10 +33672,10 @@ var $6 = {}, ri = {}, Oo = {}, bl = {};
33664
33672
  document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("XPath", null) && (ne = !1);
33665
33673
  } catch {
33666
33674
  }
33667
- ne && z(document, new x());
33675
+ ne && V(document, new x());
33668
33676
  } catch {
33669
33677
  }
33670
- z(n, new x()), function() {
33678
+ V(n, new x()), function() {
33671
33679
  var c = new x(), f = new nn(), y = new Et(), b = new bn();
33672
33680
  function v(Q) {
33673
33681
  return {
@@ -34086,7 +34094,7 @@ ${W.replace(/ /g, "")}
34086
34094
  return j;
34087
34095
  }
34088
34096
  t.findAncestorNs = q;
34089
- function V(M, K) {
34097
+ function z(M, K) {
34090
34098
  const W = Buffer.from(M, "base64"), Z = Buffer.from(K, "base64");
34091
34099
  if (typeof W.equals == "function")
34092
34100
  return W.equals(Z);
@@ -34097,7 +34105,7 @@ ${W.replace(/ /g, "")}
34097
34105
  return !1;
34098
34106
  return !0;
34099
34107
  }
34100
- t.validateDigestValue = V;
34108
+ t.validateDigestValue = z;
34101
34109
  })(Oo);
34102
34110
  Object.defineProperty(ri, "__esModule", { value: !0 });
34103
34111
  ri.C14nCanonicalizationWithComments = ri.C14nCanonicalization = void 0;
@@ -35407,8 +35415,8 @@ function Si(t, e, n, r, i) {
35407
35415
  else if (q && q != ".")
35408
35416
  e.push(" SYSTEM ", q, ">");
35409
35417
  else {
35410
- var V = t.internalSubset;
35411
- V && e.push(" [", V, "]"), e.push(">");
35418
+ var z = t.internalSubset;
35419
+ z && e.push(" [", z, "]"), e.push(">");
35412
35420
  }
35413
35421
  return;
35414
35422
  case iy:
@@ -37701,16 +37709,16 @@ function sS(t, e, n, r, i) {
37701
37709
  }
37702
37710
  switch (O > T && l(O), t.charAt(O + 1)) {
37703
37711
  case "/":
37704
- var j = t.indexOf(">", O + 3), q = t.substring(O + 2, j).replace(/[ \t\n\r]+$/g, ""), V = $.pop();
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);
37706
- var M = V.localNSMap, K = V.tagName == q, W = K || V.tagName && V.tagName.toLowerCase() == q.toLowerCase();
37712
+ var j = t.indexOf(">", O + 3), q = t.substring(O + 2, j).replace(/[ \t\n\r]+$/g, ""), z = $.pop();
37713
+ j < 0 ? (q = t.substring(O + 2).replace(/[\s<].*/, ""), i.error("end tag name: " + q + " is not complete:" + z.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);
37714
+ var M = z.localNSMap, K = z.tagName == q, W = K || z.tagName && z.tagName.toLowerCase() == q.toLowerCase();
37707
37715
  if (W) {
37708
- if (r.endElement(V.uri, V.localName, q), M)
37716
+ if (r.endElement(z.uri, z.localName, q), M)
37709
37717
  for (var Z in M)
37710
37718
  Object.prototype.hasOwnProperty.call(M, Z) && r.endPrefixMapping(Z);
37711
- K || i.fatalError("end tag name: " + q + " is not match the current start tagName:" + V.tagName);
37719
+ K || i.fatalError("end tag name: " + q + " is not match the current start tagName:" + z.tagName);
37712
37720
  } else
37713
- $.push(V);
37721
+ $.push(z);
37714
37722
  j++;
37715
37723
  break;
37716
37724
  case "?":
@@ -38671,8 +38679,8 @@ class Vn {
38671
38679
  q.parentNode.insertBefore(x, q.nextSibling);
38672
38680
  }
38673
38681
  this.signatureNode = x;
38674
- const V = Re.findChildren(this.signatureNode, "SignedInfo");
38675
- if (V.length === 0) {
38682
+ const z = Re.findChildren(this.signatureNode, "SignedInfo");
38683
+ if (z.length === 0) {
38676
38684
  const K = new Error("could not find SignedInfo element in the message");
38677
38685
  if (i) {
38678
38686
  i(K);
@@ -38680,7 +38688,7 @@ class Vn {
38680
38688
  } else
38681
38689
  throw K;
38682
38690
  }
38683
- const M = V[0];
38691
+ const M = z[0];
38684
38692
  typeof i == "function" ? this.calculateSignatureValue(s, (K, W) => {
38685
38693
  K ? i(K) : (this.signatureValue = W || "", x.insertBefore(this.createSignature(p), M.nextSibling), this.signatureXml = x.toString(), this.signedXml = s.toString(), i(null, this));
38686
38694
  }) : (this.calculateSignatureValue(s), x.insertBefore(this.createSignature(p), M.nextSibling), this.signatureXml = x.toString(), this.signedXml = s.toString());