authhero 4.78.0 → 4.79.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
@@ -79,7 +79,7 @@ const ke = (e) => typeof e == "string", es = () => {
79
79
  for (const i in t)
80
80
  i !== "__proto__" && i !== "constructor" && (i in e ? ke(e[i]) || e[i] instanceof String || ke(t[i]) || t[i] instanceof String ? n && (e[i] = t[i]) : jA(e[i], t[i], n) : e[i] = t[i]);
81
81
  return e;
82
- }, Sr = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
82
+ }, xr = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
83
83
  var PE = {
84
84
  "&": "&",
85
85
  "<": "&lt;",
@@ -718,7 +718,7 @@ class B_ {
718
718
  maxReplaces: y,
719
719
  alwaysFormat: _
720
720
  } = t.interpolation;
721
- this.escape = n !== void 0 ? n : jE, this.escapeValue = i !== void 0 ? i : !0, this.useRawValueToEscape = r !== void 0 ? r : !1, this.prefix = o ? Sr(o) : s || "{{", this.suffix = c ? Sr(c) : l || "}}", this.formatSeparator = d || ",", this.unescapePrefix = u ? "" : p || "-", this.unescapeSuffix = this.unescapePrefix ? "" : u || "", this.nestingPrefix = f ? Sr(f) : h || Sr("$t("), this.nestingSuffix = m ? Sr(m) : g || Sr(")"), this.nestingOptionsSeparator = w || ",", this.maxReplaces = y || 1e3, this.alwaysFormat = _ !== void 0 ? _ : !1, this.resetRegExp();
721
+ this.escape = n !== void 0 ? n : jE, this.escapeValue = i !== void 0 ? i : !0, this.useRawValueToEscape = r !== void 0 ? r : !1, this.prefix = o ? xr(o) : s || "{{", this.suffix = c ? xr(c) : l || "}}", this.formatSeparator = d || ",", this.unescapePrefix = u ? "" : p || "-", this.unescapeSuffix = this.unescapePrefix ? "" : u || "", this.nestingPrefix = f ? xr(f) : h || xr("$t("), this.nestingSuffix = m ? xr(m) : g || xr(")"), this.nestingOptionsSeparator = w || ",", this.maxReplaces = y || 1e3, this.alwaysFormat = _ !== void 0 ? _ : !1, this.resetRegExp();
722
722
  }
723
723
  reset() {
724
724
  this.options && this.init(this.options);
@@ -779,7 +779,7 @@ class B_ {
779
779
  const c = (l, d) => {
780
780
  const u = this.nestingOptionsSeparator;
781
781
  if (l.indexOf(u) < 0) return l;
782
- const p = l.split(new RegExp(`${Sr(u)}[ ]*{`));
782
+ const p = l.split(new RegExp(`${xr(u)}[ ]*{`));
783
783
  let f = `{${p[1]}`;
784
784
  l = p[0], f = this.interpolate(f, s);
785
785
  const h = f.match(/'/g), m = f.match(/"/g);
@@ -1376,7 +1376,7 @@ L.setDefaultNamespace;
1376
1376
  L.hasLoadedNamespace;
1377
1377
  L.loadNamespaces;
1378
1378
  L.loadLanguages;
1379
- const fr = a.object({
1379
+ const hr = a.object({
1380
1380
  created_at: a.string(),
1381
1381
  updated_at: a.string()
1382
1382
  }), vme = a.enum(["AUTH0", "EMAIL", "REDIRECT"]), Ame = a.enum([
@@ -1443,7 +1443,7 @@ const fr = a.object({
1443
1443
  description: "The list of actions to execute in sequence"
1444
1444
  })
1445
1445
  }), fs = sm.extend({
1446
- ...fr.shape,
1446
+ ...hr.shape,
1447
1447
  id: a.string().openapi({
1448
1448
  description: "Unique identifier for the flow",
1449
1449
  example: "af_12tMpdJ3iek7svMyZkSh5M"
@@ -1555,7 +1555,7 @@ const fr = a.object({
1555
1555
  }).optional()
1556
1556
  }), DA = a.object({
1557
1557
  ...lm.omit({ password: !0 }).shape,
1558
- ...fr.shape,
1558
+ ...hr.shape,
1559
1559
  user_id: a.string(),
1560
1560
  provider: a.string(),
1561
1561
  is_social: a.boolean(),
@@ -2199,7 +2199,7 @@ const Cd = a.object({
2199
2199
  show_as_button: a.boolean().optional(),
2200
2200
  metadata: a.record(a.any()).optional(),
2201
2201
  is_system: a.boolean().optional()
2202
- }), Dr = a.object({
2202
+ }), Mr = a.object({
2203
2203
  id: a.string(),
2204
2204
  created_at: a.string().transform((e) => e === null ? "" : e),
2205
2205
  updated_at: a.string().transform((e) => e === null ? "" : e)
@@ -2228,7 +2228,7 @@ const Cd = a.object({
2228
2228
  http_body: a.string(),
2229
2229
  http_url: a.string()
2230
2230
  })
2231
- ]), Pr = a.object({
2231
+ ]), jr = a.object({
2232
2232
  ...UA.shape,
2233
2233
  custom_domain_id: a.string(),
2234
2234
  primary: a.boolean(),
@@ -2238,25 +2238,25 @@ const Cd = a.object({
2238
2238
  methods: a.array(S5)
2239
2239
  }).optional(),
2240
2240
  tls_policy: a.string().optional()
2241
- }), Tme = Pr.extend({
2241
+ }), Tme = jr.extend({
2242
2242
  tenant_id: a.string()
2243
2243
  }), C0 = a.object({
2244
2244
  id: a.string(),
2245
2245
  order: a.number().optional(),
2246
2246
  visible: a.boolean().optional().default(!0)
2247
- }), hr = C0.extend({
2247
+ }), mr = C0.extend({
2248
2248
  category: a.literal("BLOCK").optional()
2249
- }), x5 = hr.extend({
2249
+ }), x5 = mr.extend({
2250
2250
  type: a.literal("DIVIDER"),
2251
2251
  config: a.object({
2252
2252
  text: a.string().optional()
2253
2253
  }).optional()
2254
- }), E5 = hr.extend({
2254
+ }), E5 = mr.extend({
2255
2255
  type: a.literal("HTML"),
2256
2256
  config: a.object({
2257
2257
  content: a.string().optional()
2258
2258
  }).optional()
2259
- }), C5 = hr.extend({
2259
+ }), C5 = mr.extend({
2260
2260
  type: a.literal("IMAGE"),
2261
2261
  config: a.object({
2262
2262
  src: a.string().optional(),
@@ -2264,29 +2264,29 @@ const Cd = a.object({
2264
2264
  width: a.number().optional(),
2265
2265
  height: a.number().optional()
2266
2266
  }).optional()
2267
- }), $5 = hr.extend({
2267
+ }), $5 = mr.extend({
2268
2268
  type: a.literal("JUMP_BUTTON"),
2269
2269
  config: a.object({
2270
2270
  text: a.string().optional(),
2271
2271
  target_step: a.string().optional()
2272
2272
  })
2273
- }), T5 = hr.extend({
2273
+ }), T5 = mr.extend({
2274
2274
  type: a.literal("RESEND_BUTTON"),
2275
2275
  config: a.object({
2276
2276
  text: a.string().optional(),
2277
2277
  resend_action: a.string().optional()
2278
2278
  })
2279
- }), I5 = hr.extend({
2279
+ }), I5 = mr.extend({
2280
2280
  type: a.literal("NEXT_BUTTON"),
2281
2281
  config: a.object({
2282
2282
  text: a.string().optional()
2283
2283
  })
2284
- }), N5 = hr.extend({
2284
+ }), N5 = mr.extend({
2285
2285
  type: a.literal("PREVIOUS_BUTTON"),
2286
2286
  config: a.object({
2287
2287
  text: a.string().optional()
2288
2288
  })
2289
- }), P5 = hr.extend({
2289
+ }), P5 = mr.extend({
2290
2290
  type: a.literal("RICH_TEXT"),
2291
2291
  config: a.object({
2292
2292
  content: a.string().optional()
@@ -2607,7 +2607,7 @@ const Cd = a.object({
2607
2607
  }).openapi({
2608
2608
  description: "Schema for flow-based forms (matches Auth0 Forms structure)"
2609
2609
  }), hs = a.object({
2610
- ...fr.shape,
2610
+ ...hr.shape,
2611
2611
  ...fm.shape,
2612
2612
  id: a.string()
2613
2613
  }), aC = a.object({
@@ -2697,19 +2697,19 @@ const qA = a.enum([
2697
2697
  ]), uC = a.object({
2698
2698
  ...Ra,
2699
2699
  trigger_id: qA,
2700
- ...fr.shape,
2700
+ ...hr.shape,
2701
2701
  hook_id: a.string(),
2702
2702
  url: a.string()
2703
2703
  }), pC = a.object({
2704
2704
  ...Ra,
2705
2705
  trigger_id: HA,
2706
- ...fr.shape,
2706
+ ...hr.shape,
2707
2707
  hook_id: a.string(),
2708
2708
  form_id: a.string()
2709
2709
  }), fC = a.object({
2710
2710
  ...Ra,
2711
2711
  trigger_id: KA,
2712
- ...fr.shape,
2712
+ ...hr.shape,
2713
2713
  hook_id: a.string(),
2714
2714
  template_id: VA
2715
2715
  }), ms = a.union([
@@ -2781,8 +2781,8 @@ const qA = a.enum([
2781
2781
  request_parameter_supported: a.boolean(),
2782
2782
  token_endpoint_auth_signing_alg_values_supported: a.array(a.string())
2783
2783
  });
2784
- var Pe = /* @__PURE__ */ ((e) => (e.PENDING = "pending", e.AUTHENTICATED = "authenticated", e.AWAITING_EMAIL_VERIFICATION = "awaiting_email_verification", e.AWAITING_MFA = "awaiting_mfa", e.AWAITING_HOOK = "awaiting_hook", e.AWAITING_CONTINUATION = "awaiting_continuation", e.COMPLETED = "completed", e.FAILED = "failed", e.EXPIRED = "expired", e))(Pe || {});
2785
- const yC = a.nativeEnum(Pe), _C = a.object({
2784
+ var $e = /* @__PURE__ */ ((e) => (e.PENDING = "pending", e.AUTHENTICATED = "authenticated", e.AWAITING_EMAIL_VERIFICATION = "awaiting_email_verification", e.AWAITING_MFA = "awaiting_mfa", e.AWAITING_HOOK = "awaiting_hook", e.AWAITING_CONTINUATION = "awaiting_continuation", e.COMPLETED = "completed", e.FAILED = "failed", e.EXPIRED = "expired", e))($e || {});
2785
+ const yC = a.nativeEnum($e), _C = a.object({
2786
2786
  csrf_token: a.string(),
2787
2787
  auth0Client: a.string().optional(),
2788
2788
  authParams: Cd,
@@ -3530,9 +3530,9 @@ const xC = a.object({
3530
3530
  description: "List of enabled connections for the organization"
3531
3531
  }),
3532
3532
  token_quota: HC
3533
- }), Mr = a.object({
3533
+ }), Lr = a.object({
3534
3534
  ...wm.shape,
3535
- ...fr.shape,
3535
+ ...hr.shape,
3536
3536
  id: a.string(),
3537
3537
  // Override name to be lenient when reading from database (to support existing uppercase names)
3538
3538
  name: a.string().min(1).openapi({
@@ -3547,7 +3547,7 @@ const xC = a.object({
3547
3547
  })
3548
3548
  }), Hme = a.object({
3549
3549
  ...KC.shape,
3550
- ...fr.shape,
3550
+ ...hr.shape,
3551
3551
  id: a.string()
3552
3552
  }), Kme = a.object({
3553
3553
  // Session settings
@@ -4254,7 +4254,7 @@ async function I0(e, t, n) {
4254
4254
  q: `email:${n}`
4255
4255
  })).users;
4256
4256
  }
4257
- async function mr({
4257
+ async function gr({
4258
4258
  userAdapter: e,
4259
4259
  tenant_id: t,
4260
4260
  username: n,
@@ -4297,7 +4297,7 @@ async function Rn({
4297
4297
  username: n,
4298
4298
  provider: i
4299
4299
  }) {
4300
- const r = await mr({
4300
+ const r = await gr({
4301
4301
  userAdapter: e,
4302
4302
  tenant_id: t,
4303
4303
  username: n,
@@ -6458,7 +6458,7 @@ function $i(e, t) {
6458
6458
  });
6459
6459
  return i.headers.set("Content-Type", "application/x-www-form-urlencoded"), i.headers.set("Accept", "application/json"), i.headers.set("User-Agent", "arctic"), i.headers.set("Content-Length", n.byteLength.toString()), i;
6460
6460
  }
6461
- function zr(e, t) {
6461
+ function qr(e, t) {
6462
6462
  const n = new TextEncoder().encode(`${e}:${t}`);
6463
6463
  return w8(n);
6464
6464
  }
@@ -6595,10 +6595,10 @@ class fo {
6595
6595
  }
6596
6596
  createAuthorizationURLWithPKCE(t, n, i, r, o) {
6597
6597
  const s = new URL(t);
6598
- if (s.searchParams.set("response_type", "code"), s.searchParams.set("client_id", this.clientId), this.redirectURI !== null && s.searchParams.set("redirect_uri", this.redirectURI), s.searchParams.set("state", n), i === Gr.S256) {
6598
+ if (s.searchParams.set("response_type", "code"), s.searchParams.set("client_id", this.clientId), this.redirectURI !== null && s.searchParams.set("redirect_uri", this.redirectURI), s.searchParams.set("state", n), i === Wr.S256) {
6599
6599
  const c = hk(r);
6600
6600
  s.searchParams.set("code_challenge_method", "S256"), s.searchParams.set("code_challenge", c);
6601
- } else i === Gr.Plain && (s.searchParams.set("code_challenge_method", "plain"), s.searchParams.set("code_challenge", r));
6601
+ } else i === Wr.Plain && (s.searchParams.set("code_challenge_method", "plain"), s.searchParams.set("code_challenge", r));
6602
6602
  return o.length > 0 && s.searchParams.set("scope", o.join(" ")), s;
6603
6603
  }
6604
6604
  async validateAuthorizationCode(t, n, i) {
@@ -6606,7 +6606,7 @@ class fo {
6606
6606
  r.set("grant_type", "authorization_code"), r.set("code", n), this.redirectURI !== null && r.set("redirect_uri", this.redirectURI), i !== null && r.set("code_verifier", i), this.clientPassword === null && r.set("client_id", this.clientId);
6607
6607
  const o = $i(t, r);
6608
6608
  if (this.clientPassword !== null) {
6609
- const c = zr(this.clientId, this.clientPassword);
6609
+ const c = qr(this.clientId, this.clientPassword);
6610
6610
  o.headers.set("Authorization", `Basic ${c}`);
6611
6611
  }
6612
6612
  return await ra(o);
@@ -6616,7 +6616,7 @@ class fo {
6616
6616
  r.set("grant_type", "refresh_token"), r.set("refresh_token", n), this.clientPassword === null && r.set("client_id", this.clientId), i.length > 0 && r.set("scope", i.join(" "));
6617
6617
  const o = $i(t, r);
6618
6618
  if (this.clientPassword !== null) {
6619
- const c = zr(this.clientId, this.clientPassword);
6619
+ const c = qr(this.clientId, this.clientPassword);
6620
6620
  o.headers.set("Authorization", `Basic ${c}`);
6621
6621
  }
6622
6622
  return await ra(o);
@@ -6626,16 +6626,16 @@ class fo {
6626
6626
  i.set("token", n), this.clientPassword === null && i.set("client_id", this.clientId);
6627
6627
  const r = $i(t, i);
6628
6628
  if (this.clientPassword !== null) {
6629
- const o = zr(this.clientId, this.clientPassword);
6629
+ const o = qr(this.clientId, this.clientPassword);
6630
6630
  r.headers.set("Authorization", `Basic ${o}`);
6631
6631
  }
6632
6632
  await C8(r);
6633
6633
  }
6634
6634
  }
6635
- var Gr;
6635
+ var Wr;
6636
6636
  (function(e) {
6637
6637
  e[e.S256 = 0] = "S256", e[e.Plain = 1] = "Plain";
6638
- })(Gr || (Gr = {}));
6638
+ })(Wr || (Wr = {}));
6639
6639
  var ew;
6640
6640
  (function(e) {
6641
6641
  e[e.Include = 0] = "Include", e[e.None = 1] = "None";
@@ -6752,13 +6752,13 @@ class _k {
6752
6752
  async validateAuthorizationCode(t) {
6753
6753
  const n = new URLSearchParams();
6754
6754
  n.set("grant_type", "authorization_code"), n.set("code", t), this.redirectURI !== null && n.set("redirect_uri", this.redirectURI);
6755
- const i = $i(iw, n), r = zr(this.clientId, this.clientSecret);
6755
+ const i = $i(iw, n), r = qr(this.clientId, this.clientSecret);
6756
6756
  return i.headers.set("Authorization", `Basic ${r}`), await rw(i);
6757
6757
  }
6758
6758
  async refreshAccessToken(t) {
6759
6759
  const n = new URLSearchParams();
6760
6760
  n.set("grant_type", "refresh_token"), n.set("refresh_token", t);
6761
- const i = $i(iw, n), r = zr(this.clientId, this.clientSecret);
6761
+ const i = $i(iw, n), r = qr(this.clientId, this.clientSecret);
6762
6762
  return i.headers.set("Authorization", `Basic ${r}`), await rw(i);
6763
6763
  }
6764
6764
  }
@@ -6797,7 +6797,7 @@ let wk = class {
6797
6797
  this.client = new fo(t, n, i);
6798
6798
  }
6799
6799
  createAuthorizationURL(t, n, i) {
6800
- return this.client.createAuthorizationURLWithPKCE(M8, t, Gr.S256, n, i);
6800
+ return this.client.createAuthorizationURLWithPKCE(M8, t, Wr.S256, n, i);
6801
6801
  }
6802
6802
  async validateAuthorizationCode(t, n) {
6803
6803
  return await this.client.validateAuthorizationCode(ow, t, n);
@@ -6829,7 +6829,7 @@ class bk {
6829
6829
  i.set("grant_type", "authorization_code"), i.set("code", t), i.set("redirect_uri", this.redirectURI), i.set("code_verifier", n), this.clientSecret === null && i.set("client_id", this.clientId);
6830
6830
  const r = $i(this.tokenEndpoint, i);
6831
6831
  if (this.clientSecret !== null) {
6832
- const s = zr(this.clientId, this.clientSecret);
6832
+ const s = qr(this.clientId, this.clientSecret);
6833
6833
  r.headers.set("Authorization", `Basic ${s}`);
6834
6834
  } else
6835
6835
  r.headers.set("Origin", "arctic");
@@ -6840,7 +6840,7 @@ class bk {
6840
6840
  i.set("grant_type", "refresh_token"), i.set("refresh_token", t), this.clientSecret === null && i.set("client_id", this.clientId), n.length > 0 && i.set("scope", n.join(" "));
6841
6841
  const r = $i(this.tokenEndpoint, i);
6842
6842
  if (this.clientSecret !== null) {
6843
- const s = zr(this.clientId, this.clientSecret);
6843
+ const s = qr(this.clientId, this.clientSecret);
6844
6844
  r.headers.set("Authorization", `Basic ${s}`);
6845
6845
  } else
6846
6846
  r.headers.set("Origin", "arctic");
@@ -7232,14 +7232,14 @@ Ma.omit({
7232
7232
  at_hash: !0,
7233
7233
  c_hash: !0
7234
7234
  });
7235
- function gr(e, t) {
7235
+ function yr(e, t) {
7236
7236
  return t ? `https://${t}/` : e.ISSUER;
7237
7237
  }
7238
7238
  function Dt(e) {
7239
7239
  return e.UNIVERSAL_LOGIN_URL || `${e.ISSUER}u/`;
7240
7240
  }
7241
- function Ge(e) {
7242
- return e.OAUTH_API_URL || e.ISSUER;
7241
+ function Ge(e, t) {
7242
+ return t ? `https://${t}/` : e.OAUTH_API_URL || e.ISSUER;
7243
7243
  }
7244
7244
  const W8 = "Apple", J8 = "data:image/svg+xml,%3Csvg%20width%3D%2245%22%20height%3D%2245%22%20viewBox%3D%220%200%2045%2045%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M45%200H0V45H45V0Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20d%3D%22M23.5344%2010.3846C25.5313%2010.3846%2028.0344%209.01144%2029.525%207.18055C30.875%205.5213%2031.8594%203.20407%2031.8594%200.886839C31.8594%200.572154%2031.8313%200.25747%2031.775%200C29.5531%200.0858233%2026.8813%201.51621%2025.2781%203.43293C24.0125%204.89193%2022.8594%207.18055%2022.8594%209.52638C22.8594%209.86968%2022.9156%2010.213%2022.9438%2010.3274C23.0844%2010.356%2023.3094%2010.3846%2023.5344%2010.3846ZM16.5031%2045C19.2313%2045%2020.4406%2043.1405%2023.8438%2043.1405C27.3031%2043.1405%2028.0625%2044.9428%2031.1%2044.9428C34.0813%2044.9428%2036.0781%2042.1392%2037.9625%2039.3929C40.0719%2036.246%2040.9438%2033.1564%2041%2033.0134C40.8031%2032.9561%2035.0938%2030.5817%2035.0938%2023.9161C35.0938%2018.1373%2039.5938%2015.534%2039.8469%2015.3338C36.8656%2010.9854%2032.3375%2010.8709%2031.1%2010.8709C27.7531%2010.8709%2025.025%2012.9307%2023.3094%2012.9307C21.4531%2012.9307%2019.0063%2010.9854%2016.1094%2010.9854C10.5969%2010.9854%205%2015.6198%205%2024.3738C5%2029.8093%207.08125%2035.5594%209.64063%2039.2784C11.8344%2042.4253%2013.7469%2045%2016.5031%2045Z%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E";
7245
7245
  function xk(e) {
@@ -7590,7 +7590,7 @@ async function C$(e, t) {
7590
7590
  redirectUrl: r.createAuthorizationURLWithPKCE(
7591
7591
  n.authorization_endpoint,
7592
7592
  o,
7593
- Gr.S256,
7593
+ Wr.S256,
7594
7594
  s,
7595
7595
  c
7596
7596
  ).href,
@@ -7669,7 +7669,7 @@ async function P$(e, t) {
7669
7669
  redirectUrl: r.createAuthorizationURLWithPKCE(
7670
7670
  n.authorization_endpoint,
7671
7671
  o,
7672
- Gr.S256,
7672
+ Wr.S256,
7673
7673
  s,
7674
7674
  c
7675
7675
  ).href,
@@ -7774,7 +7774,7 @@ const lw = nn.extend({
7774
7774
  }), M$ = nn.extend({
7775
7775
  sessions: a.array(T0)
7776
7776
  }), L$ = nn.extend({
7777
- organizations: a.array(Mr)
7777
+ organizations: a.array(Lr)
7778
7778
  }), U$ = new he().openapi(
7779
7779
  B({
7780
7780
  tags: ["users"],
@@ -8600,7 +8600,7 @@ const lw = nn.extend({
8600
8600
  "application/json": {
8601
8601
  schema: a.union([
8602
8602
  L$,
8603
- a.array(Mr)
8603
+ a.array(Lr)
8604
8604
  ])
8605
8605
  }
8606
8606
  },
@@ -8831,7 +8831,7 @@ function z$() {
8831
8831
  if (q(H) || (H = z(H)), !ue(F))
8832
8832
  throw new TypeError();
8833
8833
  q(H) || (H = z(H));
8834
- var X = kr(
8834
+ var X = Sr(
8835
8835
  F,
8836
8836
  H,
8837
8837
  /*Create*/
@@ -8870,7 +8870,7 @@ function z$() {
8870
8870
  return Be(we) ? !1 : D(U, we, H);
8871
8871
  }
8872
8872
  function V(U, F, H) {
8873
- var X = kr(
8873
+ var X = Sr(
8874
8874
  F,
8875
8875
  H,
8876
8876
  /*Create*/
@@ -8887,7 +8887,7 @@ function z$() {
8887
8887
  return Z(U, we, H);
8888
8888
  }
8889
8889
  function ne(U, F, H) {
8890
- var X = kr(
8890
+ var X = Sr(
8891
8891
  F,
8892
8892
  H,
8893
8893
  /*Create*/
@@ -8897,7 +8897,7 @@ function z$() {
8897
8897
  return X.OrdinaryGetOwnMetadata(U, F, H);
8898
8898
  }
8899
8899
  function oe(U, F, H, X) {
8900
- var we = kr(
8900
+ var we = Sr(
8901
8901
  H,
8902
8902
  X,
8903
8903
  /*Create*/
@@ -8925,7 +8925,7 @@ function z$() {
8925
8925
  return gt;
8926
8926
  }
8927
8927
  function ae(U, F) {
8928
- var H = kr(
8928
+ var H = Sr(
8929
8929
  U,
8930
8930
  F,
8931
8931
  /*create*/
@@ -9272,7 +9272,7 @@ function z$() {
9272
9272
  };
9273
9273
  return Oe;
9274
9274
  }
9275
- function kr(U, F, H) {
9275
+ function Sr(U, F, H) {
9276
9276
  var X = y.getProvider(U, F);
9277
9277
  if (!q(X))
9278
9278
  return X;
@@ -9784,7 +9784,7 @@ function oa(e, t) {
9784
9784
  n += e[e.length - 1 - i] * Math.pow(2, t * i);
9785
9785
  return n;
9786
9786
  }
9787
- function Wr(e, t, n = -1) {
9787
+ function Jr(e, t, n = -1) {
9788
9788
  const i = n;
9789
9789
  let r = e, o = 0, s = Math.pow(2, t);
9790
9790
  for (let c = 1; c < 8; c++) {
@@ -9838,10 +9838,10 @@ function W$(e) {
9838
9838
  for (let i = 1; i < 8; i++) {
9839
9839
  if (t <= n) {
9840
9840
  if (e < 0) {
9841
- const s = n - t, c = Wr(s, 8, i), l = new Uint8Array(c);
9841
+ const s = n - t, c = Jr(s, 8, i), l = new Uint8Array(c);
9842
9842
  return l[0] |= 128, c;
9843
9843
  }
9844
- let r = Wr(t, 8, i), o = new Uint8Array(r);
9844
+ let r = Jr(t, 8, i), o = new Uint8Array(r);
9845
9845
  if (o[0] & 128) {
9846
9846
  const s = r.slice(0), c = new Uint8Array(s);
9847
9847
  r = new ArrayBuffer(r.byteLength + 1), o = new Uint8Array(r);
@@ -10004,7 +10004,7 @@ class Pk extends ci(ho) {
10004
10004
  return r.buffer;
10005
10005
  }
10006
10006
  if (!this.isHexOnly) {
10007
- const r = Wr(this.tagNumber, 7), o = new Uint8Array(r), s = r.byteLength, c = new Uint8Array(s + 1);
10007
+ const r = Jr(this.tagNumber, 7), o = new Uint8Array(r), s = r.byteLength, c = new Uint8Array(s + 1);
10008
10008
  if (c[0] = n | 31, !t) {
10009
10009
  for (let l = 0; l < s - 1; l++)
10010
10010
  c[l + 1] = o[l] | 128;
@@ -10127,7 +10127,7 @@ class jk extends ho {
10127
10127
  if (this.length > 127 && (this.longFormUsed = !0), this.isIndefiniteForm)
10128
10128
  return n = new ArrayBuffer(1), t === !1 && (i = new Uint8Array(n), i[0] = 128), n;
10129
10129
  if (this.longFormUsed) {
10130
- const r = Wr(this.length, 8);
10130
+ const r = Jr(this.length, 8);
10131
10131
  if (r.byteLength > 127)
10132
10132
  return this.error = "Too big length", si;
10133
10133
  if (n = new ArrayBuffer(r.byteLength + 1), t)
@@ -10496,7 +10496,7 @@ Lk = U0;
10496
10496
  le.EndOfContent = Lk;
10497
10497
  U0.NAME = fc;
10498
10498
  var Uk;
10499
- class Jr extends kt {
10499
+ class Qr extends kt {
10500
10500
  constructor(t = {}) {
10501
10501
  super(t, Lt), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 5;
10502
10502
  }
@@ -10515,9 +10515,9 @@ class Jr extends kt {
10515
10515
  return `${this.constructor.NAME}`;
10516
10516
  }
10517
10517
  }
10518
- Uk = Jr;
10518
+ Uk = Qr;
10519
10519
  le.Null = Uk;
10520
- Jr.NAME = "NULL";
10520
+ Qr.NAME = "NULL";
10521
10521
  class Fk extends ci(Lt) {
10522
10522
  get value() {
10523
10523
  for (const t of this.valueHexView)
@@ -10599,7 +10599,7 @@ class qk extends ci(nr) {
10599
10599
  }
10600
10600
  qk.NAME = "OctetStringValueBlock";
10601
10601
  var F0;
10602
- let qr = class extends kt {
10602
+ let Hr = class extends kt {
10603
10603
  constructor({ idBlock: t = {}, lenBlock: n = {}, ...i } = {}) {
10604
10604
  var r, o;
10605
10605
  (r = i.isConstructed) !== null && r !== void 0 || (i.isConstructed = !!(!((o = i.value) === null || o === void 0) && o.length)), super({
@@ -10644,9 +10644,9 @@ let qr = class extends kt {
10644
10644
  return Y.concat(t);
10645
10645
  }
10646
10646
  };
10647
- F0 = qr;
10647
+ F0 = Hr;
10648
10648
  le.OctetString = F0;
10649
- qr.NAME = Ik;
10649
+ Hr.NAME = Ik;
10650
10650
  class Hk extends ci(nr) {
10651
10651
  constructor({ unusedBits: t = 0, isConstructed: n = !1, ...i } = {}) {
10652
10652
  super(i), this.unusedBits = t, this.isConstructed = n, this.blockLength = this.valueHexView.byteLength;
@@ -10714,7 +10714,7 @@ class Hk extends ci(nr) {
10714
10714
  }
10715
10715
  Hk.NAME = "BitStringValueBlock";
10716
10716
  var Kk;
10717
- let Hr = class extends kt {
10717
+ let Kr = class extends kt {
10718
10718
  constructor({ idBlock: t = {}, lenBlock: n = {}, ...i } = {}) {
10719
10719
  var r, o;
10720
10720
  (r = i.isConstructed) !== null && r !== void 0 || (i.isConstructed = !!(!((o = i.value) === null || o === void 0) && o.length)), super({
@@ -10744,9 +10744,9 @@ let Hr = class extends kt {
10744
10744
  }
10745
10745
  }
10746
10746
  };
10747
- Kk = Hr;
10747
+ Kk = Kr;
10748
10748
  le.BitString = Kk;
10749
- Hr.NAME = Nk;
10749
+ Kr.NAME = Nk;
10750
10750
  var Vk;
10751
10751
  function aT(e, t) {
10752
10752
  const n = new Uint8Array([0]), i = new Uint8Array(e), r = new Uint8Array(t);
@@ -10944,7 +10944,7 @@ class Em extends ci(Lt) {
10944
10944
  o[s] = r[s] | 128;
10945
10945
  return o[this.blockLength - 1] = r[this.blockLength - 1], o.buffer;
10946
10946
  }
10947
- const n = Wr(this.valueDec, 7);
10947
+ const n = Jr(this.valueDec, 7);
10948
10948
  if (n.byteLength === 0)
10949
10949
  return this.error = "Error during encoding SID value", si;
10950
10950
  const i = new Uint8Array(n.byteLength);
@@ -11109,7 +11109,7 @@ class Cm extends ci(ho) {
11109
11109
  o[s] = r[s] | 128;
11110
11110
  return o[this.blockLength - 1] = r[this.blockLength - 1], o.buffer;
11111
11111
  }
11112
- const n = Wr(this.valueDec, 7);
11112
+ const n = Jr(this.valueDec, 7);
11113
11113
  if (n.byteLength === 0)
11114
11114
  return this.error = "Error during encoding SID value", si;
11115
11115
  const i = new Uint8Array(n.byteLength);
@@ -11313,7 +11313,7 @@ class a3 extends rn {
11313
11313
  fromString(t) {
11314
11314
  const n = t.length, i = this.valueBlock.valueHexView = new Uint8Array(n * 4);
11315
11315
  for (let r = 0; r < n; r++) {
11316
- const o = Wr(t.charCodeAt(r), 8), s = new Uint8Array(o);
11316
+ const o = Jr(t.charCodeAt(r), 8), s = new Uint8Array(o);
11317
11317
  if (s.length > 4)
11318
11318
  continue;
11319
11319
  const c = 4 - s.length;
@@ -11643,18 +11643,18 @@ class W0 extends Di {
11643
11643
  k3 = W0;
11644
11644
  le.TIME = k3;
11645
11645
  W0.NAME = "TIME";
11646
- class Qr {
11646
+ class Yr {
11647
11647
  constructor({ name: t = Kt, optional: n = !1 } = {}) {
11648
11648
  this.name = t, this.optional = n;
11649
11649
  }
11650
11650
  }
11651
- class J0 extends Qr {
11651
+ class J0 extends Yr {
11652
11652
  constructor({ value: t = [], ...n } = {}) {
11653
11653
  super(n), this.value = t;
11654
11654
  }
11655
11655
  }
11656
- class Nd extends Qr {
11657
- constructor({ value: t = new Qr(), local: n = !1, ...i } = {}) {
11656
+ class Nd extends Yr {
11657
+ constructor({ value: t = new Yr(), local: n = !1, ...i } = {}) {
11658
11658
  super(i), this.value = t, this.local = n;
11659
11659
  }
11660
11660
  }
@@ -11692,7 +11692,7 @@ function Qi(e, t, n) {
11692
11692
  return n.hasOwnProperty(_f) && (o.name = n.name), o;
11693
11693
  }
11694
11694
  }
11695
- if (n instanceof Qr)
11695
+ if (n instanceof Yr)
11696
11696
  return n.hasOwnProperty(_f) && (e[n.name] = t), {
11697
11697
  verified: !0,
11698
11698
  result: e
@@ -11885,10 +11885,10 @@ function lT(e, t) {
11885
11885
  }
11886
11886
  const S3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11887
11887
  __proto__: null,
11888
- Any: Qr,
11888
+ Any: Yr,
11889
11889
  BaseBlock: kt,
11890
11890
  BaseStringBlock: L0,
11891
- BitString: Hr,
11891
+ BitString: Kr,
11892
11892
  BmpString: Vu,
11893
11893
  Boolean: qu,
11894
11894
  CharacterString: tp,
@@ -11905,10 +11905,10 @@ const S3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11905
11905
  HexBlock: ci,
11906
11906
  IA5String: Zu,
11907
11907
  Integer: Ua,
11908
- Null: Jr,
11908
+ Null: Qr,
11909
11909
  NumericString: Wu,
11910
11910
  ObjectIdentifier: Ku,
11911
- OctetString: qr,
11911
+ OctetString: Hr,
11912
11912
  Primitive: Gc,
11913
11913
  PrintableString: Ju,
11914
11914
  RawData: cT,
@@ -11949,15 +11949,15 @@ class ip {
11949
11949
  throw TypeError("Unsupported type of 'params' argument for BitString");
11950
11950
  }
11951
11951
  fromASN(t) {
11952
- if (!(t instanceof Hr))
11952
+ if (!(t instanceof Kr))
11953
11953
  throw new TypeError("Argument 'asn' is not instance of ASN.1 BitString");
11954
11954
  return this.unusedBits = t.valueBlock.unusedBits, this.value = t.valueBlock.valueHex, this;
11955
11955
  }
11956
11956
  toASN() {
11957
- return new Hr({ unusedBits: this.unusedBits, valueHex: this.value });
11957
+ return new Kr({ unusedBits: this.unusedBits, valueHex: this.value });
11958
11958
  }
11959
11959
  toSchema(t) {
11960
- return new Hr({ name: t });
11960
+ return new Kr({ name: t });
11961
11961
  }
11962
11962
  toNumber() {
11963
11963
  let t = "";
@@ -11989,22 +11989,22 @@ class ge {
11989
11989
  typeof t == "number" ? this.buffer = new ArrayBuffer(t) : Y.isBufferSource(t) ? this.buffer = Y.toArrayBuffer(t) : Array.isArray(t) ? this.buffer = new Uint8Array(t) : this.buffer = new ArrayBuffer(0);
11990
11990
  }
11991
11991
  fromASN(t) {
11992
- if (!(t instanceof qr))
11992
+ if (!(t instanceof Hr))
11993
11993
  throw new TypeError("Argument 'asn' is not instance of ASN.1 OctetString");
11994
11994
  return this.buffer = t.valueBlock.valueHex, this;
11995
11995
  }
11996
11996
  toASN() {
11997
- return new qr({ valueHex: this.buffer });
11997
+ return new Hr({ valueHex: this.buffer });
11998
11998
  }
11999
11999
  toSchema(t) {
12000
- return new qr({ name: t });
12000
+ return new Hr({ name: t });
12001
12001
  }
12002
12002
  }
12003
12003
  const dT = {
12004
- fromASN: (e) => e instanceof Jr ? null : e.valueBeforeDecodeView,
12004
+ fromASN: (e) => e instanceof Qr ? null : e.valueBeforeDecodeView,
12005
12005
  toASN: (e) => {
12006
12006
  if (e === null)
12007
- return new Jr();
12007
+ return new Qr();
12008
12008
  const t = Yo(e);
12009
12009
  if (t.result.error)
12010
12010
  throw new Error(t.result.error);
@@ -12021,7 +12021,7 @@ const dT = {
12021
12021
  toASN: (e) => new Ua({ valueHex: e })
12022
12022
  }, fT = {
12023
12023
  fromASN: (e) => e.valueBlock.valueHexView,
12024
- toASN: (e) => new Hr({ valueHex: e })
12024
+ toASN: (e) => new Kr({ valueHex: e })
12025
12025
  }, hT = {
12026
12026
  fromASN: (e) => e.valueBlock.toString(),
12027
12027
  toASN: (e) => new Ku({ value: e })
@@ -12030,7 +12030,7 @@ const dT = {
12030
12030
  toASN: (e) => new qu({ value: e })
12031
12031
  }, Pd = {
12032
12032
  fromASN: (e) => e.valueBlock.valueHexView,
12033
- toASN: (e) => new qr({ valueHex: e })
12033
+ toASN: (e) => new Hr({ valueHex: e })
12034
12034
  }, gT = {
12035
12035
  fromASN: (e) => new ge(e.getValue()),
12036
12036
  toASN: (e) => e.toASN()
@@ -12049,7 +12049,7 @@ const x3 = gn(Di), yT = gn(Vu), _T = gn(Gu), wT = gn(Wu), bT = gn(Ju), vT = gn(Q
12049
12049
  toASN: (e) => new np({ valueDate: e })
12050
12050
  }, IT = {
12051
12051
  fromASN: () => null,
12052
- toASN: () => new Jr()
12052
+ toASN: () => new Qr()
12053
12053
  };
12054
12054
  function Zs(e) {
12055
12055
  switch (e) {
@@ -12154,7 +12154,7 @@ class PT {
12154
12154
  if (!p)
12155
12155
  throw new Error(`Cannot get ASN1 class by name '${u}'`);
12156
12156
  l = new p({ name: c });
12157
- } else Ei(s.type) ? l = new s.type().toSchema(c) : s.optional ? this.get(s.type).type === K.Choice ? l = new Qr({ name: c }) : (l = this.create(s.type, !1), l.name = c) : l = new Qr({ name: c });
12157
+ } else Ei(s.type) ? l = new s.type().toSchema(c) : s.optional ? this.get(s.type).type === K.Choice ? l = new Yr({ name: c }) : (l = this.create(s.type, !1), l.name = c) : l = new Yr({ name: c });
12158
12158
  const d = !!s.optional || s.defaultValue !== void 0;
12159
12159
  if (s.repeated) {
12160
12160
  l.name = "";
@@ -12470,7 +12470,7 @@ class Q0 {
12470
12470
  if (c.implicit)
12471
12471
  if (!c.repeated && (typeof c.type == "number" || Ei(c.type))) {
12472
12472
  const u = {};
12473
- u.valueHex = d instanceof Jr ? d.valueBeforeDecodeView : d.valueBlock.toBER(), r.push(new Gc({
12473
+ u.valueHex = d instanceof Qr ? d.valueBeforeDecodeView : d.valueBlock.toBER(), r.push(new Gc({
12474
12474
  optional: c.optional,
12475
12475
  idBlock: {
12476
12476
  tagClass: 3,
@@ -12577,7 +12577,7 @@ function de(e, t, n, i) {
12577
12577
  if (typeof t == "function" ? e !== t || !i : !t.has(e)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
12578
12578
  return n === "m" ? i : n === "a" ? i.call(e) : i ? i.value : t.get(e);
12579
12579
  }
12580
- function Ie(e, t, n, i, r) {
12580
+ function Ne(e, t, n, i, r) {
12581
12581
  if (i === "m") throw new TypeError("Private method is not writable");
12582
12582
  if (i === "a" && !r) throw new TypeError("Private accessor was defined without a setter");
12583
12583
  if (typeof t == "function" ? e !== t || !r : !t.has(e)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
@@ -12856,17 +12856,17 @@ Ko = Pm = S([
12856
12856
  const Om = `${zn}.35`;
12857
12857
  class X0 extends ge {
12858
12858
  }
12859
- class Lr {
12859
+ class Ur {
12860
12860
  constructor(t = {}) {
12861
12861
  t && Object.assign(this, t);
12862
12862
  }
12863
12863
  }
12864
12864
  S([
12865
12865
  E({ type: X0, context: 0, optional: !0, implicit: !0 })
12866
- ], Lr.prototype, "keyIdentifier", void 0);
12866
+ ], Ur.prototype, "keyIdentifier", void 0);
12867
12867
  S([
12868
12868
  E({ type: Ee, context: 1, optional: !0, implicit: !0, repeated: "sequence" })
12869
- ], Lr.prototype, "authorityCertIssuer", void 0);
12869
+ ], Ur.prototype, "authorityCertIssuer", void 0);
12870
12870
  S([
12871
12871
  E({
12872
12872
  type: R.Integer,
@@ -12875,7 +12875,7 @@ S([
12875
12875
  implicit: !0,
12876
12876
  converter: We
12877
12877
  })
12878
- ], Lr.prototype, "authorityCertSerialNumber", void 0);
12878
+ ], Ur.prototype, "authorityCertSerialNumber", void 0);
12879
12879
  const ey = `${zn}.19`;
12880
12880
  class mc {
12881
12881
  constructor(t = {}) {
@@ -13028,27 +13028,27 @@ class $3 extends ip {
13028
13028
  return `[${this.toJSON().join(", ")}]`;
13029
13029
  }
13030
13030
  }
13031
- let Yr = class {
13031
+ let Zr = class {
13032
13032
  constructor(t = {}) {
13033
13033
  Object.assign(this, t);
13034
13034
  }
13035
13035
  };
13036
13036
  S([
13037
13037
  E({ type: Ee, context: 0, repeated: "sequence", implicit: !0 })
13038
- ], Yr.prototype, "fullName", void 0);
13038
+ ], Zr.prototype, "fullName", void 0);
13039
13039
  S([
13040
13040
  E({ type: sa, context: 1, implicit: !0 })
13041
- ], Yr.prototype, "nameRelativeToCRLIssuer", void 0);
13042
- Yr = S([
13041
+ ], Zr.prototype, "nameRelativeToCRLIssuer", void 0);
13042
+ Zr = S([
13043
13043
  W({ type: K.Choice })
13044
- ], Yr);
13044
+ ], Zr);
13045
13045
  class za {
13046
13046
  constructor(t = {}) {
13047
13047
  Object.assign(this, t);
13048
13048
  }
13049
13049
  }
13050
13050
  S([
13051
- E({ type: Yr, context: 0, optional: !0 })
13051
+ E({ type: Zr, context: 0, optional: !0 })
13052
13052
  ], za.prototype, "distributionPoint", void 0);
13053
13053
  S([
13054
13054
  E({ type: $3, context: 1, optional: !0, implicit: !0 })
@@ -13080,7 +13080,7 @@ class Nt {
13080
13080
  }
13081
13081
  Nt.ONLY = !1;
13082
13082
  S([
13083
- E({ type: Yr, context: 0, optional: !0 })
13083
+ E({ type: Zr, context: 0, optional: !0 })
13084
13084
  ], Nt.prototype, "distributionPoint", void 0);
13085
13085
  S([
13086
13086
  E({
@@ -13448,20 +13448,20 @@ let rr = Jm = class extends Fe {
13448
13448
  rr = Jm = S([
13449
13449
  W({ type: K.Sequence, itemType: fn })
13450
13450
  ], rr);
13451
- var Zr;
13451
+ var Xr;
13452
13452
  (function(e) {
13453
13453
  e[e.v1 = 0] = "v1", e[e.v2 = 1] = "v2", e[e.v3 = 2] = "v3";
13454
- })(Zr || (Zr = {}));
13454
+ })(Xr || (Xr = {}));
13455
13455
  class on {
13456
13456
  constructor(t = {}) {
13457
- this.version = Zr.v1, this.serialNumber = new ArrayBuffer(0), this.signature = new ce(), this.issuer = new ct(), this.validity = new Yc(), this.subject = new ct(), this.subjectPublicKeyInfo = new Tn(), Object.assign(this, t);
13457
+ this.version = Xr.v1, this.serialNumber = new ArrayBuffer(0), this.signature = new ce(), this.issuer = new ct(), this.validity = new Yc(), this.subject = new ct(), this.subjectPublicKeyInfo = new Tn(), Object.assign(this, t);
13458
13458
  }
13459
13459
  }
13460
13460
  S([
13461
13461
  E({
13462
13462
  type: R.Integer,
13463
13463
  context: 0,
13464
- defaultValue: Zr.v1
13464
+ defaultValue: Xr.v1
13465
13465
  })
13466
13466
  ], on.prototype, "version", void 0);
13467
13467
  S([
@@ -13513,20 +13513,20 @@ S([
13513
13513
  S([
13514
13514
  E({ type: R.BitString })
13515
13515
  ], hn.prototype, "signatureValue", void 0);
13516
- class Kr {
13516
+ class Vr {
13517
13517
  constructor(t = {}) {
13518
13518
  this.userCertificate = new ArrayBuffer(0), this.revocationDate = new vt(), Object.assign(this, t);
13519
13519
  }
13520
13520
  }
13521
13521
  S([
13522
13522
  E({ type: R.Integer, converter: We })
13523
- ], Kr.prototype, "userCertificate", void 0);
13523
+ ], Vr.prototype, "userCertificate", void 0);
13524
13524
  S([
13525
13525
  E({ type: vt })
13526
- ], Kr.prototype, "revocationDate", void 0);
13526
+ ], Vr.prototype, "revocationDate", void 0);
13527
13527
  S([
13528
13528
  E({ type: fn, optional: !0, repeated: "sequence" })
13529
- ], Kr.prototype, "crlEntryExtensions", void 0);
13529
+ ], Vr.prototype, "crlEntryExtensions", void 0);
13530
13530
  class Mi {
13531
13531
  constructor(t = {}) {
13532
13532
  this.signature = new ce(), this.issuer = new ct(), this.thisUpdate = new vt(), Object.assign(this, t);
@@ -13548,7 +13548,7 @@ S([
13548
13548
  E({ type: vt, optional: !0 })
13549
13549
  ], Mi.prototype, "nextUpdate", void 0);
13550
13550
  S([
13551
- E({ type: Kr, repeated: "sequence", optional: !0 })
13551
+ E({ type: Vr, repeated: "sequence", optional: !0 })
13552
13552
  ], Mi.prototype, "revokedCertificates", void 0);
13553
13553
  S([
13554
13554
  E({ type: fn, optional: !0, context: 0, repeated: "sequence" })
@@ -14175,33 +14175,33 @@ S([
14175
14175
  S([
14176
14176
  E({ type: R.BitString })
14177
14177
  ], fy.prototype, "publicKey", void 0);
14178
- let Xr = class {
14178
+ let eo = class {
14179
14179
  constructor(t = {}) {
14180
14180
  Object.assign(this, t);
14181
14181
  }
14182
14182
  };
14183
14183
  S([
14184
14184
  E({ type: ir, context: 0, implicit: !0, optional: !0 })
14185
- ], Xr.prototype, "subjectKeyIdentifier", void 0);
14185
+ ], eo.prototype, "subjectKeyIdentifier", void 0);
14186
14186
  S([
14187
14187
  E({ type: fy, context: 1, implicit: !0, optional: !0 })
14188
- ], Xr.prototype, "originatorKey", void 0);
14188
+ ], eo.prototype, "originatorKey", void 0);
14189
14189
  S([
14190
14190
  E({ type: qa, optional: !0 })
14191
- ], Xr.prototype, "issuerAndSerialNumber", void 0);
14192
- Xr = S([
14191
+ ], eo.prototype, "issuerAndSerialNumber", void 0);
14192
+ eo = S([
14193
14193
  W({ type: K.Choice })
14194
- ], Xr);
14194
+ ], eo);
14195
14195
  class Va {
14196
14196
  constructor(t = {}) {
14197
- this.version = Ni.v3, this.originator = new Xr(), this.keyEncryptionAlgorithm = new oi(), this.recipientEncryptedKeys = new Vd(), Object.assign(this, t);
14197
+ this.version = Ni.v3, this.originator = new eo(), this.keyEncryptionAlgorithm = new oi(), this.recipientEncryptedKeys = new Vd(), Object.assign(this, t);
14198
14198
  }
14199
14199
  }
14200
14200
  S([
14201
14201
  E({ type: R.Integer })
14202
14202
  ], Va.prototype, "version", void 0);
14203
14203
  S([
14204
- E({ type: Xr, context: 0 })
14204
+ E({ type: eo, context: 0 })
14205
14205
  ], Va.prototype, "originator", void 0);
14206
14206
  S([
14207
14207
  E({ type: ge, context: 1, optional: !0 })
@@ -14559,7 +14559,7 @@ function _t(e) {
14559
14559
  }
14560
14560
  _t(nI);
14561
14561
  _t(iI);
14562
- const eo = _t(eu);
14562
+ const to = _t(eu);
14563
14563
  _t(q3);
14564
14564
  _t(tu);
14565
14565
  _t(nu);
@@ -14568,7 +14568,7 @@ _t(eI);
14568
14568
  _t(tI);
14569
14569
  const H3 = new ce({
14570
14570
  algorithm: bp,
14571
- parameters: Q.serialize(eo)
14571
+ parameters: Q.serialize(to)
14572
14572
  }), K3 = new ce({
14573
14573
  algorithm: QT,
14574
14574
  parameters: Q.serialize(Pd.toASN(new Uint8Array([
@@ -14606,14 +14606,14 @@ _t(F3);
14606
14606
  _t(z3);
14607
14607
  class vp {
14608
14608
  constructor(t = {}) {
14609
- this.hashAlgorithm = new ce(eo), this.maskGenAlgorithm = new ce({
14609
+ this.hashAlgorithm = new ce(to), this.maskGenAlgorithm = new ce({
14610
14610
  algorithm: bp,
14611
- parameters: Q.serialize(eo)
14611
+ parameters: Q.serialize(to)
14612
14612
  }), this.pSourceAlgorithm = new ce(K3), Object.assign(this, t);
14613
14613
  }
14614
14614
  }
14615
14615
  S([
14616
- E({ type: ce, context: 0, defaultValue: eo })
14616
+ E({ type: ce, context: 0, defaultValue: to })
14617
14617
  ], vp.prototype, "hashAlgorithm", void 0);
14618
14618
  S([
14619
14619
  E({ type: ce, context: 1, defaultValue: H3 })
@@ -14625,29 +14625,29 @@ new ce({
14625
14625
  algorithm: JT,
14626
14626
  parameters: Q.serialize(new vp())
14627
14627
  });
14628
- class to {
14628
+ class no {
14629
14629
  constructor(t = {}) {
14630
- this.hashAlgorithm = new ce(eo), this.maskGenAlgorithm = new ce({
14630
+ this.hashAlgorithm = new ce(to), this.maskGenAlgorithm = new ce({
14631
14631
  algorithm: bp,
14632
- parameters: Q.serialize(eo)
14632
+ parameters: Q.serialize(to)
14633
14633
  }), this.saltLength = 20, this.trailerField = 1, Object.assign(this, t);
14634
14634
  }
14635
14635
  }
14636
14636
  S([
14637
- E({ type: ce, context: 0, defaultValue: eo })
14638
- ], to.prototype, "hashAlgorithm", void 0);
14637
+ E({ type: ce, context: 0, defaultValue: to })
14638
+ ], no.prototype, "hashAlgorithm", void 0);
14639
14639
  S([
14640
14640
  E({ type: ce, context: 1, defaultValue: H3 })
14641
- ], to.prototype, "maskGenAlgorithm", void 0);
14641
+ ], no.prototype, "maskGenAlgorithm", void 0);
14642
14642
  S([
14643
14643
  E({ type: R.Integer, context: 2, defaultValue: 20 })
14644
- ], to.prototype, "saltLength", void 0);
14644
+ ], no.prototype, "saltLength", void 0);
14645
14645
  S([
14646
14646
  E({ type: R.Integer, context: 3, defaultValue: 1 })
14647
- ], to.prototype, "trailerField", void 0);
14647
+ ], no.prototype, "trailerField", void 0);
14648
14648
  new ce({
14649
14649
  algorithm: tc,
14650
- parameters: Q.serialize(new to())
14650
+ parameters: Q.serialize(new no())
14651
14651
  });
14652
14652
  class Ap {
14653
14653
  constructor(t = {}) {
@@ -14862,7 +14862,7 @@ function ru(e, t) {
14862
14862
  }
14863
14863
  return o;
14864
14864
  }
14865
- function jr() {
14865
+ function Or() {
14866
14866
  for (var e = [], t = 0; t < arguments.length; t++)
14867
14867
  e = e.concat(ru(arguments[t]));
14868
14868
  return e;
@@ -14908,7 +14908,7 @@ var G3 = (function() {
14908
14908
  o[s] = arguments[s];
14909
14909
  o[0] = t();
14910
14910
  var c = Reflect[r];
14911
- return c.apply(void 0, jr(o));
14911
+ return c.apply(void 0, Or(o));
14912
14912
  };
14913
14913
  };
14914
14914
  return this.reflectMethods.forEach(i), n;
@@ -14977,7 +14977,7 @@ function pI(e, t) {
14977
14977
  return '"' + n + '" at position #' + t;
14978
14978
  }
14979
14979
  function fI(e, t, n) {
14980
- return n === void 0 && (n = " "), jr([e], t.message.split(`
14980
+ return n === void 0 && (n = " "), Or([e], t.message.split(`
14981
14981
  `).map(function(i) {
14982
14982
  return n + i;
14983
14983
  })).join(`
@@ -15021,7 +15021,7 @@ var gI = (function(e) {
15021
15021
  for (var o = [t], s = r; s != null; ) {
15022
15022
  var c = s.useToken;
15023
15023
  if (o.includes(c))
15024
- throw new Error("Token registration cycle detected! " + jr(o, [c]).join(" -> "));
15024
+ throw new Error("Token registration cycle detected! " + Or(o, [c]).join(" -> "));
15025
15025
  o.push(c);
15026
15026
  var l = this._registry.get(c);
15027
15027
  l && ld(l.provider) ? s = l.provider : s = null;
@@ -15229,7 +15229,7 @@ var gI = (function(e) {
15229
15229
  throw new Error('TypeInfo not known for "' + t.name + '"');
15230
15230
  }
15231
15231
  var s = o.map(i.resolveParams(n, t));
15232
- return new (t.bind.apply(t, jr([void 0], s)))();
15232
+ return new (t.bind.apply(t, Or([void 0], s)))();
15233
15233
  })();
15234
15234
  return mI(r) && this.disposables.add(r), r;
15235
15235
  }, e.prototype.resolveParams = function(t, n) {
@@ -15237,7 +15237,7 @@ var gI = (function(e) {
15237
15237
  return function(r, o) {
15238
15238
  var s, c, l;
15239
15239
  try {
15240
- return cI(r) ? Ow(r) ? r.multiple ? (s = i.resolve(r.transform)).transform.apply(s, jr([i.resolveAll(r.token, new Dl(), r.isOptional)], r.transformArgs)) : (c = i.resolve(r.transform)).transform.apply(c, jr([i.resolve(r.token, t, r.isOptional)], r.transformArgs)) : r.multiple ? i.resolveAll(r.token, new Dl(), r.isOptional) : i.resolve(r.token, t, r.isOptional) : Ow(r) ? (l = i.resolve(r.transform, t)).transform.apply(l, jr([i.resolve(r.token, t)], r.transformArgs)) : i.resolve(r, t);
15240
+ return cI(r) ? Ow(r) ? r.multiple ? (s = i.resolve(r.transform)).transform.apply(s, Or([i.resolveAll(r.token, new Dl(), r.isOptional)], r.transformArgs)) : (c = i.resolve(r.transform)).transform.apply(c, Or([i.resolve(r.token, t, r.isOptional)], r.transformArgs)) : r.multiple ? i.resolveAll(r.token, new Dl(), r.isOptional) : i.resolve(r.token, t, r.isOptional) : Ow(r) ? (l = i.resolve(r.transform, t)).transform.apply(l, Or([i.resolve(r.token, t)], r.transformArgs)) : i.resolve(r, t);
15241
15241
  } catch (d) {
15242
15242
  throw new Error(hI(n, o, d));
15243
15243
  }
@@ -15915,7 +15915,7 @@ Ue.NAME = n4;
15915
15915
  Ue.VALUE = i4;
15916
15916
  class vI {
15917
15917
  static toTextObject(t) {
15918
- const n = new Ue("Algorithm Identifier", {}, yr.toString(t.algorithm));
15918
+ const n = new Ue("Algorithm Identifier", {}, _r.toString(t.algorithm));
15919
15919
  if (t.parameters)
15920
15920
  if (t.algorithm === ha) {
15921
15921
  const i = new kc().toWebAlgorithm(t);
@@ -15925,13 +15925,13 @@ class vI {
15925
15925
  return n;
15926
15926
  }
15927
15927
  }
15928
- class yr {
15928
+ class _r {
15929
15929
  static toString(t) {
15930
15930
  const n = this.items[t];
15931
15931
  return n || t;
15932
15932
  }
15933
15933
  }
15934
- yr.items = {
15934
+ _r.items = {
15935
15935
  [eu]: "sha1",
15936
15936
  [q3]: "sha224",
15937
15937
  [tu]: "sha256",
@@ -15957,7 +15957,7 @@ yr.items = {
15957
15957
  [FT]: "OCSP Signing",
15958
15958
  [qT]: "Signed Data"
15959
15959
  };
15960
- class no {
15960
+ class io {
15961
15961
  static serialize(t) {
15962
15962
  return this.serializeObj(t).join(`
15963
15963
  `);
@@ -16010,15 +16010,15 @@ class no {
16010
16010
  return this.algorithmSerializer.toTextObject(t);
16011
16011
  }
16012
16012
  }
16013
- no.oidSerializer = yr;
16014
- no.algorithmSerializer = vI;
16013
+ io.oidSerializer = _r;
16014
+ io.algorithmSerializer = vI;
16015
16015
  var Po;
16016
16016
  class Li {
16017
16017
  get rawData() {
16018
- return de(this, Po, "f") || Ie(this, Po, Q.serialize(this.asn), "f"), de(this, Po, "f");
16018
+ return de(this, Po, "f") || Ne(this, Po, Q.serialize(this.asn), "f"), de(this, Po, "f");
16019
16019
  }
16020
16020
  constructor(...t) {
16021
- Po.set(this, void 0), Y.isBufferSource(t[0]) ? (this.asn = Q.parse(t[0], t[1]), Ie(this, Po, Y.toArrayBuffer(t[0]), "f"), this.onInit(this.asn)) : (this.asn = t[0], this.onInit(this.asn));
16021
+ Po.set(this, void 0), Y.isBufferSource(t[0]) ? (this.asn = Q.parse(t[0], t[1]), Ne(this, Po, Y.toArrayBuffer(t[0]), "f"), this.onInit(this.asn)) : (this.asn = t[0], this.onInit(this.asn));
16022
16022
  }
16023
16023
  equal(t) {
16024
16024
  return t instanceof Li ? $k(t.rawData, this.rawData) : !1;
@@ -16028,7 +16028,7 @@ class Li {
16028
16028
  case "asn":
16029
16029
  return Q.toString(this.rawData);
16030
16030
  case "text":
16031
- return no.serialize(this.toTextObject());
16031
+ return io.serialize(this.toTextObject());
16032
16032
  case "hex":
16033
16033
  return fe.ToHex(this.rawData);
16034
16034
  case "base64":
@@ -16070,7 +16070,7 @@ class an extends Li {
16070
16070
  }
16071
16071
  toTextObjectWithoutValue() {
16072
16072
  const t = this.toTextObjectEmpty(this.critical ? "critical" : void 0);
16073
- return t[Ue.NAME] === an.NAME && (t[Ue.NAME] = yr.toString(this.type)), t;
16073
+ return t[Ue.NAME] === an.NAME && (t[Ue.NAME] = _r.toString(this.type)), t;
16074
16074
  }
16075
16075
  }
16076
16076
  var r4;
@@ -16399,10 +16399,10 @@ class Zi extends Li {
16399
16399
  throw new Error("Unsupported GeneralName type");
16400
16400
  }
16401
16401
  let n = this.value;
16402
- return this.type === Ml && (n = yr.toString(n)), new Ue(t, void 0, n);
16402
+ return this.type === Ml && (n = _r.toString(n)), new Ue(t, void 0, n);
16403
16403
  }
16404
16404
  }
16405
- class io extends Li {
16405
+ class ro extends Li {
16406
16406
  constructor(t) {
16407
16407
  let n;
16408
16408
  if (t instanceof Pt)
@@ -16449,7 +16449,7 @@ class io extends Li {
16449
16449
  return t;
16450
16450
  }
16451
16451
  }
16452
- io.NAME = "GeneralNames";
16452
+ ro.NAME = "GeneralNames";
16453
16453
  const nc = "-{5}", Sc = "\\n", CI = `[^${Sc}]+`, $I = `${nc}BEGIN (${CI}(?=${nc}))${nc}`, TI = `${nc}END \\1${nc}`, ga = "\\n", II = `[^:${Sc}]+`, NI = `(?:[^${Sc}]+${ga}(?: +[^${Sc}]+${ga})*)`, PI = "[a-zA-Z0-9=+/]+", jI = `(?:${PI}${ga})+`, Nb = `${$I}${ga}(?:((?:${II}: ${NI})+))?${ga}?(${jI})${TI}`;
16454
16454
  class Vt {
16455
16455
  static isPem(t) {
@@ -16631,7 +16631,7 @@ class dn extends Bn {
16631
16631
  }
16632
16632
  toTextObject() {
16633
16633
  const t = this.toTextObjectEmpty(), n = Q.parse(this.rawData, Tn);
16634
- switch (t.Algorithm = no.serializeAlgorithm(n.algorithm), n.algorithm.algorithm) {
16634
+ switch (t.Algorithm = io.serializeAlgorithm(n.algorithm), n.algorithm.algorithm) {
16635
16635
  case ha:
16636
16636
  t["EC Point"] = n.subjectPublicKey;
16637
16637
  break;
@@ -16659,10 +16659,10 @@ class ya extends an {
16659
16659
  if (Y.isBufferSource(t[0]))
16660
16660
  super(t[0]);
16661
16661
  else if (typeof t[0] == "string") {
16662
- const n = new Lr({ keyIdentifier: new X0(fe.FromHex(t[0])) });
16662
+ const n = new Ur({ keyIdentifier: new X0(fe.FromHex(t[0])) });
16663
16663
  super(Om, t[1], Q.serialize(n));
16664
16664
  } else {
16665
- const n = t[0], i = n.name instanceof io ? Q.parse(n.name.rawData, Pt) : n.name, r = new Lr({
16665
+ const n = t[0], i = n.name instanceof ro ? Q.parse(n.name.rawData, Pt) : n.name, r = new Ur({
16666
16666
  authorityCertIssuer: i,
16667
16667
  authorityCertSerialNumber: fe.FromHex(n.serialNumber)
16668
16668
  });
@@ -16671,15 +16671,15 @@ class ya extends an {
16671
16671
  }
16672
16672
  onInit(t) {
16673
16673
  super.onInit(t);
16674
- const n = Q.parse(t.extnValue, Lr);
16674
+ const n = Q.parse(t.extnValue, Ur);
16675
16675
  n.keyIdentifier && (this.keyId = fe.ToHex(n.keyIdentifier)), (n.authorityCertIssuer || n.authorityCertSerialNumber) && (this.certId = {
16676
16676
  name: n.authorityCertIssuer || [],
16677
16677
  serialNumber: n.authorityCertSerialNumber ? fe.ToHex(n.authorityCertSerialNumber) : ""
16678
16678
  });
16679
16679
  }
16680
16680
  toTextObject() {
16681
- const t = this.toTextObjectWithoutValue(), n = Q.parse(this.value, Lr);
16682
- return n.authorityCertIssuer && (t["Authority Issuer"] = new io(n.authorityCertIssuer).toTextObject()), n.authorityCertSerialNumber && (t["Authority Serial Number"] = n.authorityCertSerialNumber), n.keyIdentifier && (t[""] = n.keyIdentifier), t;
16681
+ const t = this.toTextObjectWithoutValue(), n = Q.parse(this.value, Ur);
16682
+ return n.authorityCertIssuer && (t["Authority Issuer"] = new ro(n.authorityCertIssuer).toTextObject()), n.authorityCertSerialNumber && (t["Authority Serial Number"] = n.authorityCertSerialNumber), n.keyIdentifier && (t[""] = n.keyIdentifier), t;
16683
16683
  }
16684
16684
  }
16685
16685
  ya.NAME = "Authority Key Identifier";
@@ -16720,7 +16720,7 @@ class Sy extends an {
16720
16720
  }
16721
16721
  toTextObject() {
16722
16722
  const t = this.toTextObjectWithoutValue();
16723
- return t[""] = this.usages.map((n) => yr.toString(n)).join(", "), t;
16723
+ return t[""] = this.usages.map((n) => _r.toString(n)).join(", "), t;
16724
16724
  }
16725
16725
  }
16726
16726
  Sy.NAME = "Extended Key Usages";
@@ -16768,12 +16768,12 @@ class Ja extends an {
16768
16768
  Ja.NAME = "Subject Key Identifier";
16769
16769
  class s4 extends an {
16770
16770
  constructor(...t) {
16771
- Y.isBufferSource(t[0]) ? super(t[0]) : super(ay, t[1], new io(t[0] || []).rawData);
16771
+ Y.isBufferSource(t[0]) ? super(t[0]) : super(ay, t[1], new ro(t[0] || []).rawData);
16772
16772
  }
16773
16773
  onInit(t) {
16774
16774
  super.onInit(t);
16775
16775
  const n = Q.parse(t.extnValue, Ld);
16776
- this.names = new io(n);
16776
+ this.names = new ro(n);
16777
16777
  }
16778
16778
  toTextObject() {
16779
16779
  const t = this.toTextObjectWithoutValue(), n = this.names.toTextObject();
@@ -16807,7 +16807,7 @@ class c4 extends an {
16807
16807
  }
16808
16808
  toTextObject() {
16809
16809
  const t = this.toTextObjectWithoutValue();
16810
- return t.Policy = this.policies.map((n) => new Ue("", {}, yr.toString(n))), t;
16810
+ return t.Policy = this.policies.map((n) => new Ue("", {}, _r.toString(n))), t;
16811
16811
  }
16812
16812
  }
16813
16813
  c4.NAME = "Certificate Policies";
@@ -16819,7 +16819,7 @@ class Ey extends an {
16819
16819
  super(t[0]);
16820
16820
  else if (Array.isArray(t[0]) && typeof t[0][0] == "string") {
16821
16821
  const r = t[0].map((s) => new za({
16822
- distributionPoint: new Yr({ fullName: [new Ee({ uniformResourceIdentifier: s })] })
16822
+ distributionPoint: new Zr({ fullName: [new Ee({ uniformResourceIdentifier: s })] })
16823
16823
  })), o = new Zo(r);
16824
16824
  super(Lm, t[1], Q.serialize(o));
16825
16825
  } else {
@@ -16904,12 +16904,12 @@ function Ul(e, t, n, i) {
16904
16904
  }
16905
16905
  class d4 extends an {
16906
16906
  constructor(...t) {
16907
- Y.isBufferSource(t[0]) ? super(t[0]) : super(T3, t[1], new io(t[0] || []).rawData);
16907
+ Y.isBufferSource(t[0]) ? super(t[0]) : super(T3, t[1], new ro(t[0] || []).rawData);
16908
16908
  }
16909
16909
  onInit(t) {
16910
16910
  super.onInit(t);
16911
16911
  const n = Q.parse(t.extnValue, Pt);
16912
- this.names = new io(n);
16912
+ this.names = new ro(n);
16913
16913
  }
16914
16914
  toTextObject() {
16915
16915
  const t = this.toTextObjectWithoutValue(), n = this.names.toTextObject();
@@ -16942,7 +16942,7 @@ class Qa extends Li {
16942
16942
  }
16943
16943
  toTextObjectWithoutValue() {
16944
16944
  const t = this.toTextObjectEmpty();
16945
- return t[Ue.NAME] === Qa.NAME && (t[Ue.NAME] = yr.toString(this.type)), t;
16945
+ return t[Ue.NAME] === Qa.NAME && (t[Ue.NAME] = _r.toString(this.type)), t;
16946
16946
  }
16947
16947
  }
16948
16948
  Qa.NAME = "Attribute";
@@ -17019,7 +17019,7 @@ var pd;
17019
17019
  let Mg = pd = class {
17020
17020
  static createPssParams(t, n) {
17021
17021
  const i = pd.getHashAlgorithm(t);
17022
- return i ? new to({
17022
+ return i ? new no({
17023
17023
  hashAlgorithm: i,
17024
17024
  maskGenAlgorithm: new ce({
17025
17025
  algorithm: bp,
@@ -17116,7 +17116,7 @@ let Mg = pd = class {
17116
17116
  };
17117
17117
  case tc:
17118
17118
  if (t.parameters) {
17119
- const n = Q.parse(t.parameters, to);
17119
+ const n = Q.parse(t.parameters, no);
17120
17120
  return {
17121
17121
  name: "RSA-PSS",
17122
17122
  hash: yt.resolve(sr).toWebAlgorithm(n.hashAlgorithm),
@@ -17259,37 +17259,37 @@ yt.registerSingleton(cl, Ug);
17259
17259
  var _s, ws, bs, vs, As, ks, Ss, jo;
17260
17260
  class BI extends Bn {
17261
17261
  get subjectName() {
17262
- return de(this, ws, "f") || Ie(this, ws, new cn(this.asn.certificationRequestInfo.subject), "f"), de(this, ws, "f");
17262
+ return de(this, ws, "f") || Ne(this, ws, new cn(this.asn.certificationRequestInfo.subject), "f"), de(this, ws, "f");
17263
17263
  }
17264
17264
  get subject() {
17265
- return de(this, bs, "f") || Ie(this, bs, this.subjectName.toString(), "f"), de(this, bs, "f");
17265
+ return de(this, bs, "f") || Ne(this, bs, this.subjectName.toString(), "f"), de(this, bs, "f");
17266
17266
  }
17267
17267
  get signatureAlgorithm() {
17268
17268
  if (!de(this, vs, "f")) {
17269
17269
  const t = yt.resolve(sr);
17270
- Ie(this, vs, t.toWebAlgorithm(this.asn.signatureAlgorithm), "f");
17270
+ Ne(this, vs, t.toWebAlgorithm(this.asn.signatureAlgorithm), "f");
17271
17271
  }
17272
17272
  return de(this, vs, "f");
17273
17273
  }
17274
17274
  get signature() {
17275
- return de(this, As, "f") || Ie(this, As, this.asn.signature, "f"), de(this, As, "f");
17275
+ return de(this, As, "f") || Ne(this, As, this.asn.signature, "f"), de(this, As, "f");
17276
17276
  }
17277
17277
  get publicKey() {
17278
- return de(this, ks, "f") || Ie(this, ks, new dn(this.asn.certificationRequestInfo.subjectPKInfo), "f"), de(this, ks, "f");
17278
+ return de(this, ks, "f") || Ne(this, ks, new dn(this.asn.certificationRequestInfo.subjectPKInfo), "f"), de(this, ks, "f");
17279
17279
  }
17280
17280
  get attributes() {
17281
- return de(this, Ss, "f") || Ie(this, Ss, this.asn.certificationRequestInfo.attributes.map((t) => Ip.create(Q.serialize(t))), "f"), de(this, Ss, "f");
17281
+ return de(this, Ss, "f") || Ne(this, Ss, this.asn.certificationRequestInfo.attributes.map((t) => Ip.create(Q.serialize(t))), "f"), de(this, Ss, "f");
17282
17282
  }
17283
17283
  get extensions() {
17284
17284
  if (!de(this, jo, "f")) {
17285
- Ie(this, jo, [], "f");
17285
+ Ne(this, jo, [], "f");
17286
17286
  const t = this.getAttribute(Ay);
17287
- t instanceof Cy && Ie(this, jo, t.items, "f");
17287
+ t instanceof Cy && Ne(this, jo, t.items, "f");
17288
17288
  }
17289
17289
  return de(this, jo, "f");
17290
17290
  }
17291
17291
  get tbs() {
17292
- return de(this, _s, "f") || Ie(this, _s, this.asn.certificationRequestInfoRaw || Q.serialize(this.asn.certificationRequestInfo), "f"), de(this, _s, "f");
17292
+ return de(this, _s, "f") || Ne(this, _s, this.asn.certificationRequestInfoRaw || Q.serialize(this.asn.certificationRequestInfo), "f"), de(this, _s, "f");
17293
17293
  }
17294
17294
  constructor(t) {
17295
17295
  const n = Bn.isAsnEncoded(t) ? [t, Ac] : [t];
@@ -17330,7 +17330,7 @@ class BI extends Bn {
17330
17330
  }
17331
17331
  toTextObject() {
17332
17332
  const t = this.toTextObjectEmpty(), n = Q.parse(this.rawData, Ac), i = n.certificationRequestInfo, r = new Ue("", {
17333
- Version: `${Zr[i.version]} (${i.version})`,
17333
+ Version: `${Xr[i.version]} (${i.version})`,
17334
17334
  Subject: this.subject,
17335
17335
  "Subject Public Key Info": this.publicKey
17336
17336
  });
@@ -17343,7 +17343,7 @@ class BI extends Bn {
17343
17343
  r.Attributes = o;
17344
17344
  }
17345
17345
  return t.Data = r, t.Signature = new Ue("", {
17346
- Algorithm: no.serializeAlgorithm(n.signatureAlgorithm),
17346
+ Algorithm: io.serializeAlgorithm(n.signatureAlgorithm),
17347
17347
  "": n.signature
17348
17348
  }), t;
17349
17349
  }
@@ -17351,36 +17351,36 @@ class BI extends Bn {
17351
17351
  _s = /* @__PURE__ */ new WeakMap(), ws = /* @__PURE__ */ new WeakMap(), bs = /* @__PURE__ */ new WeakMap(), vs = /* @__PURE__ */ new WeakMap(), As = /* @__PURE__ */ new WeakMap(), ks = /* @__PURE__ */ new WeakMap(), Ss = /* @__PURE__ */ new WeakMap(), jo = /* @__PURE__ */ new WeakMap();
17352
17352
  BI.NAME = "PKCS#10 Certificate Request";
17353
17353
  var xs, Es, Cs, $s, Ts, Is, Ns, Ps, js, Os, Oo, Rs;
17354
- class ro extends Bn {
17354
+ class oo extends Bn {
17355
17355
  get publicKey() {
17356
- return de(this, Rs, "f") || Ie(this, Rs, new dn(this.asn.tbsCertificate.subjectPublicKeyInfo), "f"), de(this, Rs, "f");
17356
+ return de(this, Rs, "f") || Ne(this, Rs, new dn(this.asn.tbsCertificate.subjectPublicKeyInfo), "f"), de(this, Rs, "f");
17357
17357
  }
17358
17358
  get serialNumber() {
17359
17359
  if (!de(this, Es, "f")) {
17360
17360
  const t = this.asn.tbsCertificate;
17361
17361
  let n = new Uint8Array(t.serialNumber);
17362
- n.length > 1 && n[0] === 0 && n[1] > 127 && (n = n.slice(1)), Ie(this, Es, fe.ToHex(n), "f");
17362
+ n.length > 1 && n[0] === 0 && n[1] > 127 && (n = n.slice(1)), Ne(this, Es, fe.ToHex(n), "f");
17363
17363
  }
17364
17364
  return de(this, Es, "f");
17365
17365
  }
17366
17366
  get subjectName() {
17367
- return de(this, Cs, "f") || Ie(this, Cs, new cn(this.asn.tbsCertificate.subject), "f"), de(this, Cs, "f");
17367
+ return de(this, Cs, "f") || Ne(this, Cs, new cn(this.asn.tbsCertificate.subject), "f"), de(this, Cs, "f");
17368
17368
  }
17369
17369
  get subject() {
17370
- return de(this, $s, "f") || Ie(this, $s, this.subjectName.toString(), "f"), de(this, $s, "f");
17370
+ return de(this, $s, "f") || Ne(this, $s, this.subjectName.toString(), "f"), de(this, $s, "f");
17371
17371
  }
17372
17372
  get issuerName() {
17373
- return de(this, Ts, "f") || Ie(this, Ts, new cn(this.asn.tbsCertificate.issuer), "f"), de(this, Ts, "f");
17373
+ return de(this, Ts, "f") || Ne(this, Ts, new cn(this.asn.tbsCertificate.issuer), "f"), de(this, Ts, "f");
17374
17374
  }
17375
17375
  get issuer() {
17376
- return de(this, Is, "f") || Ie(this, Is, this.issuerName.toString(), "f"), de(this, Is, "f");
17376
+ return de(this, Is, "f") || Ne(this, Is, this.issuerName.toString(), "f"), de(this, Is, "f");
17377
17377
  }
17378
17378
  get notBefore() {
17379
17379
  if (!de(this, Ns, "f")) {
17380
17380
  const t = this.asn.tbsCertificate.validity.notBefore.utcTime || this.asn.tbsCertificate.validity.notBefore.generalTime;
17381
17381
  if (!t)
17382
17382
  throw new Error("Cannot get 'notBefore' value");
17383
- Ie(this, Ns, t, "f");
17383
+ Ne(this, Ns, t, "f");
17384
17384
  }
17385
17385
  return de(this, Ns, "f");
17386
17386
  }
@@ -17389,25 +17389,25 @@ class ro extends Bn {
17389
17389
  const t = this.asn.tbsCertificate.validity.notAfter.utcTime || this.asn.tbsCertificate.validity.notAfter.generalTime;
17390
17390
  if (!t)
17391
17391
  throw new Error("Cannot get 'notAfter' value");
17392
- Ie(this, Ps, t, "f");
17392
+ Ne(this, Ps, t, "f");
17393
17393
  }
17394
17394
  return de(this, Ps, "f");
17395
17395
  }
17396
17396
  get signatureAlgorithm() {
17397
17397
  if (!de(this, js, "f")) {
17398
17398
  const t = yt.resolve(sr);
17399
- Ie(this, js, t.toWebAlgorithm(this.asn.signatureAlgorithm), "f");
17399
+ Ne(this, js, t.toWebAlgorithm(this.asn.signatureAlgorithm), "f");
17400
17400
  }
17401
17401
  return de(this, js, "f");
17402
17402
  }
17403
17403
  get signature() {
17404
- return de(this, Os, "f") || Ie(this, Os, this.asn.signatureValue, "f"), de(this, Os, "f");
17404
+ return de(this, Os, "f") || Ne(this, Os, this.asn.signatureValue, "f"), de(this, Os, "f");
17405
17405
  }
17406
17406
  get extensions() {
17407
- return de(this, Oo, "f") || (Ie(this, Oo, [], "f"), this.asn.tbsCertificate.extensions && Ie(this, Oo, this.asn.tbsCertificate.extensions.map((t) => Ut.create(Q.serialize(t))), "f")), de(this, Oo, "f");
17407
+ return de(this, Oo, "f") || (Ne(this, Oo, [], "f"), this.asn.tbsCertificate.extensions && Ne(this, Oo, this.asn.tbsCertificate.extensions.map((t) => Ut.create(Q.serialize(t))), "f")), de(this, Oo, "f");
17408
17408
  }
17409
17409
  get tbs() {
17410
- return de(this, xs, "f") || Ie(this, xs, this.asn.tbsCertificateRaw || Q.serialize(this.asn.tbsCertificate), "f"), de(this, xs, "f");
17410
+ return de(this, xs, "f") || Ne(this, xs, this.asn.tbsCertificateRaw || Q.serialize(this.asn.tbsCertificate), "f"), de(this, xs, "f");
17411
17411
  }
17412
17412
  constructor(t) {
17413
17413
  const n = Bn.isAsnEncoded(t) ? [t, hn] : [t];
@@ -17484,9 +17484,9 @@ class ro extends Bn {
17484
17484
  }
17485
17485
  toTextObject() {
17486
17486
  const t = this.toTextObjectEmpty(), n = Q.parse(this.rawData, hn), i = n.tbsCertificate, r = new Ue("", {
17487
- Version: `${Zr[i.version]} (${i.version})`,
17487
+ Version: `${Xr[i.version]} (${i.version})`,
17488
17488
  "Serial Number": i.serialNumber,
17489
- "Signature Algorithm": no.serializeAlgorithm(i.signature),
17489
+ "Signature Algorithm": io.serializeAlgorithm(i.signature),
17490
17490
  Issuer: this.issuer,
17491
17491
  Validity: new Ue("", {
17492
17492
  "Not Before": i.validity.notBefore.getTime(),
@@ -17504,13 +17504,13 @@ class ro extends Bn {
17504
17504
  r.Extensions = o;
17505
17505
  }
17506
17506
  return t.Data = r, t.Signature = new Ue("", {
17507
- Algorithm: no.serializeAlgorithm(n.signatureAlgorithm),
17507
+ Algorithm: io.serializeAlgorithm(n.signatureAlgorithm),
17508
17508
  "": n.signatureValue
17509
17509
  }), t;
17510
17510
  }
17511
17511
  }
17512
17512
  xs = /* @__PURE__ */ new WeakMap(), Es = /* @__PURE__ */ new WeakMap(), Cs = /* @__PURE__ */ new WeakMap(), $s = /* @__PURE__ */ new WeakMap(), Ts = /* @__PURE__ */ new WeakMap(), Is = /* @__PURE__ */ new WeakMap(), Ns = /* @__PURE__ */ new WeakMap(), Ps = /* @__PURE__ */ new WeakMap(), js = /* @__PURE__ */ new WeakMap(), Os = /* @__PURE__ */ new WeakMap(), Oo = /* @__PURE__ */ new WeakMap(), Rs = /* @__PURE__ */ new WeakMap();
17513
- ro.NAME = "Certificate";
17513
+ oo.NAME = "Certificate";
17514
17514
  function $y(e, t = ut.get()) {
17515
17515
  const n = Y.toUint8Array(fe.FromHex(e || ""));
17516
17516
  let i = n && n.length && n.some((o) => o > 0) ? new Uint8Array(n) : void 0;
@@ -17548,7 +17548,7 @@ class DI {
17548
17548
  t.publicKey instanceof dn ? r = t.publicKey.rawData : "publicKey" in t.publicKey ? r = t.publicKey.publicKey.rawData : Y.isBufferSource(t.publicKey) ? r = t.publicKey : r = await n.subtle.exportKey("spki", t.publicKey);
17549
17549
  const o = $y(t.serialNumber, n), s = t.notBefore || /* @__PURE__ */ new Date(), c = t.notAfter || new Date(s.getTime() + 31536e6), l = new hn({
17550
17550
  tbsCertificate: new on({
17551
- version: Zr.v3,
17551
+ version: Xr.v3,
17552
17552
  serialNumber: o,
17553
17553
  validity: new Yc({
17554
17554
  notBefore: s,
@@ -17582,7 +17582,7 @@ class DI {
17582
17582
  break;
17583
17583
  if (!g)
17584
17584
  throw Error("Cannot convert ASN.1 signature value to WebCrypto format");
17585
- return l.signatureValue = g, new ro(Q.serialize(l));
17585
+ return l.signatureValue = g, new oo(Q.serialize(l));
17586
17586
  }
17587
17587
  }
17588
17588
  var Bs, Ds, Ro, Bo, Do, Rb;
@@ -17591,10 +17591,10 @@ var Bs, Ds, Ro, Bo, Do, Rb;
17591
17591
  })(Rb || (Rb = {}));
17592
17592
  class Bb extends Li {
17593
17593
  get serialNumber() {
17594
- return de(this, Bs, "f") || Ie(this, Bs, fe.ToHex(this.asn.userCertificate), "f"), de(this, Bs, "f");
17594
+ return de(this, Bs, "f") || Ne(this, Bs, fe.ToHex(this.asn.userCertificate), "f"), de(this, Bs, "f");
17595
17595
  }
17596
17596
  get revocationDate() {
17597
- return de(this, Ds, "f") || Ie(this, Ds, this.asn.revocationDate.getTime(), "f"), de(this, Ds, "f");
17597
+ return de(this, Ds, "f") || Ne(this, Ds, this.asn.revocationDate.getTime(), "f"), de(this, Ds, "f");
17598
17598
  }
17599
17599
  get reason() {
17600
17600
  return de(this, Ro, "f") === void 0 && this.extensions, de(this, Ro, "f");
@@ -17603,14 +17603,14 @@ class Bb extends Li {
17603
17603
  return de(this, Bo, "f") === void 0 && this.extensions, de(this, Bo, "f");
17604
17604
  }
17605
17605
  get extensions() {
17606
- return de(this, Do, "f") || (Ie(this, Do, [], "f"), this.asn.crlEntryExtensions && Ie(this, Do, this.asn.crlEntryExtensions.map((t) => {
17606
+ return de(this, Do, "f") || (Ne(this, Do, [], "f"), this.asn.crlEntryExtensions && Ne(this, Do, this.asn.crlEntryExtensions.map((t) => {
17607
17607
  const n = Ut.create(Q.serialize(t));
17608
17608
  switch (n.type) {
17609
17609
  case RT:
17610
- de(this, Ro, "f") === void 0 && Ie(this, Ro, Q.parse(n.value, Bd).reason, "f");
17610
+ de(this, Ro, "f") === void 0 && Ne(this, Ro, Q.parse(n.value, Bd).reason, "f");
17611
17611
  break;
17612
17612
  case zT:
17613
- de(this, Bo, "f") === void 0 && Ie(this, Bo, Q.parse(n.value, Dd).value, "f");
17613
+ de(this, Bo, "f") === void 0 && Ne(this, Bo, Q.parse(n.value, Dd).value, "f");
17614
17614
  break;
17615
17615
  }
17616
17616
  return n;
@@ -17618,13 +17618,13 @@ class Bb extends Li {
17618
17618
  }
17619
17619
  constructor(...t) {
17620
17620
  let n;
17621
- if (Y.isBufferSource(t[0]) ? n = Y.toArrayBuffer(t[0]) : typeof t[0] == "string" ? n = Q.serialize(new Kr({
17621
+ if (Y.isBufferSource(t[0]) ? n = Y.toArrayBuffer(t[0]) : typeof t[0] == "string" ? n = Q.serialize(new Vr({
17622
17622
  userCertificate: $y(t[0]),
17623
17623
  revocationDate: new vt(t[1]),
17624
17624
  crlEntryExtensions: t[2]
17625
- })) : t[0] instanceof Kr && (n = t[0]), !n)
17625
+ })) : t[0] instanceof Vr && (n = t[0]), !n)
17626
17626
  throw new TypeError("Cannot create X509CrlEntry instance. Wrong constructor arguments.");
17627
- super(n, Kr), Bs.set(this, void 0), Ds.set(this, void 0), Ro.set(this, void 0), Bo.set(this, void 0), Do.set(this, void 0);
17627
+ super(n, Vr), Bs.set(this, void 0), Ds.set(this, void 0), Ro.set(this, void 0), Bo.set(this, void 0), Do.set(this, void 0);
17628
17628
  }
17629
17629
  onInit(t) {
17630
17630
  }
@@ -17638,7 +17638,7 @@ class MI extends Bn {
17638
17638
  get signatureAlgorithm() {
17639
17639
  if (!de(this, Ls, "f")) {
17640
17640
  const t = yt.resolve(sr);
17641
- Ie(this, Ls, t.toWebAlgorithm(this.asn.signatureAlgorithm), "f");
17641
+ Ne(this, Ls, t.toWebAlgorithm(this.asn.signatureAlgorithm), "f");
17642
17642
  }
17643
17643
  return de(this, Ls, "f");
17644
17644
  }
@@ -17649,30 +17649,30 @@ class MI extends Bn {
17649
17649
  return this.issuerName.toString();
17650
17650
  }
17651
17651
  get issuerName() {
17652
- return de(this, Us, "f") || Ie(this, Us, new cn(this.asn.tbsCertList.issuer), "f"), de(this, Us, "f");
17652
+ return de(this, Us, "f") || Ne(this, Us, new cn(this.asn.tbsCertList.issuer), "f"), de(this, Us, "f");
17653
17653
  }
17654
17654
  get thisUpdate() {
17655
17655
  if (!de(this, Fs, "f")) {
17656
17656
  const t = this.asn.tbsCertList.thisUpdate.getTime();
17657
17657
  if (!t)
17658
17658
  throw new Error("Cannot get 'thisUpdate' value");
17659
- Ie(this, Fs, t, "f");
17659
+ Ne(this, Fs, t, "f");
17660
17660
  }
17661
17661
  return de(this, Fs, "f");
17662
17662
  }
17663
17663
  get nextUpdate() {
17664
17664
  var t;
17665
- return de(this, zs, "f") === void 0 && Ie(this, zs, ((t = this.asn.tbsCertList.nextUpdate) === null || t === void 0 ? void 0 : t.getTime()) || void 0, "f"), de(this, zs, "f");
17665
+ return de(this, zs, "f") === void 0 && Ne(this, zs, ((t = this.asn.tbsCertList.nextUpdate) === null || t === void 0 ? void 0 : t.getTime()) || void 0, "f"), de(this, zs, "f");
17666
17666
  }
17667
17667
  get entries() {
17668
17668
  var t;
17669
- return de(this, qs, "f") || Ie(this, qs, ((t = this.asn.tbsCertList.revokedCertificates) === null || t === void 0 ? void 0 : t.map((n) => new Bb(n))) || [], "f"), de(this, qs, "f");
17669
+ return de(this, qs, "f") || Ne(this, qs, ((t = this.asn.tbsCertList.revokedCertificates) === null || t === void 0 ? void 0 : t.map((n) => new Bb(n))) || [], "f"), de(this, qs, "f");
17670
17670
  }
17671
17671
  get extensions() {
17672
- return de(this, Mo, "f") || (Ie(this, Mo, [], "f"), this.asn.tbsCertList.crlExtensions && Ie(this, Mo, this.asn.tbsCertList.crlExtensions.map((t) => Ut.create(Q.serialize(t))), "f")), de(this, Mo, "f");
17672
+ return de(this, Mo, "f") || (Ne(this, Mo, [], "f"), this.asn.tbsCertList.crlExtensions && Ne(this, Mo, this.asn.tbsCertList.crlExtensions.map((t) => Ut.create(Q.serialize(t))), "f")), de(this, Mo, "f");
17673
17673
  }
17674
17674
  get tbs() {
17675
- return de(this, Ms, "f") || Ie(this, Ms, this.asn.tbsCertListRaw || Q.serialize(this.asn.tbsCertList), "f"), de(this, Ms, "f");
17675
+ return de(this, Ms, "f") || Ne(this, Ms, this.asn.tbsCertListRaw || Q.serialize(this.asn.tbsCertList), "f"), de(this, Ms, "f");
17676
17676
  }
17677
17677
  get tbsCertListSignatureAlgorithm() {
17678
17678
  return this.asn.tbsCertList.signature;
@@ -17703,7 +17703,7 @@ class MI extends Bn {
17703
17703
  let i, r;
17704
17704
  const o = t.publicKey;
17705
17705
  try {
17706
- o instanceof ro ? (i = {
17706
+ o instanceof oo ? (i = {
17707
17707
  ...o.publicKey.algorithm,
17708
17708
  ...o.signatureAlgorithm
17709
17709
  }, r = await o.publicKey.export(i, ["verify"])) : o instanceof dn ? (i = {
@@ -17985,7 +17985,7 @@ const FI = 1e3 * 60 * 60 * 24, zI = new he().openapi(
17985
17985
  enabled_connections: a.array(
17986
17986
  a.object({
17987
17987
  connection_id: a.string(),
17988
- connection: Dr.optional()
17988
+ connection: Mr.optional()
17989
17989
  })
17990
17990
  )
17991
17991
  }), KI = a.array(a.string()), VI = new he().openapi(
@@ -18706,7 +18706,7 @@ x0.extend({
18706
18706
  user_id: a.string()
18707
18707
  }).catchall(a.any());
18708
18708
  const rN = nn.extend({
18709
- connections: a.array(Dr)
18709
+ connections: a.array(Mr)
18710
18710
  }), oN = a.object({
18711
18711
  enabled_clients: a.array(
18712
18712
  a.object({
@@ -18740,7 +18740,7 @@ const rN = nn.extend({
18740
18740
  content: {
18741
18741
  "application/json": {
18742
18742
  schema: a.union([
18743
- a.array(Dr),
18743
+ a.array(Mr),
18744
18744
  rN
18745
18745
  ])
18746
18746
  }
@@ -18787,7 +18787,7 @@ const rN = nn.extend({
18787
18787
  200: {
18788
18788
  content: {
18789
18789
  "application/json": {
18790
- schema: Dr
18790
+ schema: Mr
18791
18791
  }
18792
18792
  },
18793
18793
  description: "A connection"
@@ -18864,7 +18864,7 @@ const rN = nn.extend({
18864
18864
  200: {
18865
18865
  content: {
18866
18866
  "application/json": {
18867
- schema: Dr
18867
+ schema: Mr
18868
18868
  }
18869
18869
  },
18870
18870
  description: "The updated connection"
@@ -18910,7 +18910,7 @@ const rN = nn.extend({
18910
18910
  201: {
18911
18911
  content: {
18912
18912
  "application/json": {
18913
- schema: Dr
18913
+ schema: Mr
18914
18914
  }
18915
18915
  },
18916
18916
  description: "A connection"
@@ -19419,7 +19419,7 @@ function CN(e) {
19419
19419
  const t = e.split("-")[0]?.toLowerCase() || uu;
19420
19420
  return SN.includes(t) ? t : uu;
19421
19421
  }
19422
- function Te(e, t, n, i) {
19422
+ function Ie(e, t, n, i) {
19423
19423
  const r = CN(n), o = _a[uu]?.[e]?.[t] ?? {}, s = _a[r]?.[e]?.[t] ?? {}, c = { ...o, ...s }, l = i?.[t] ?? {}, d = { ...c, ...l }, u = IS[`${e}.${t}`];
19424
19424
  if (u) {
19425
19425
  const h = u.safeParse(d);
@@ -20104,7 +20104,7 @@ async function fd(e) {
20104
20104
  });
20105
20105
  return await Promise.all(
20106
20106
  t.map(async (i) => {
20107
- const o = await new ro(i.cert).publicKey.export(), s = await crypto.subtle.exportKey("jwk", o);
20107
+ const o = await new oo(i.cert).publicKey.export(), s = await crypto.subtle.exportKey("jwk", o);
20108
20108
  return WA.parse({
20109
20109
  ...s,
20110
20110
  kid: i.kid
@@ -20500,7 +20500,7 @@ const c9 = new he().openapi(
20500
20500
  200: {
20501
20501
  content: {
20502
20502
  "application/json": {
20503
- schema: a.array(Pr)
20503
+ schema: a.array(jr)
20504
20504
  }
20505
20505
  },
20506
20506
  description: "List of custom domains"
@@ -20533,7 +20533,7 @@ const c9 = new he().openapi(
20533
20533
  200: {
20534
20534
  content: {
20535
20535
  "application/json": {
20536
- schema: Pr
20536
+ schema: jr
20537
20537
  }
20538
20538
  },
20539
20539
  description: "A customDomain"
@@ -20593,7 +20593,7 @@ const c9 = new he().openapi(
20593
20593
  body: {
20594
20594
  content: {
20595
20595
  "application/json": {
20596
- schema: a.object(Pr.shape).partial()
20596
+ schema: a.object(jr.shape).partial()
20597
20597
  }
20598
20598
  }
20599
20599
  },
@@ -20613,7 +20613,7 @@ const c9 = new he().openapi(
20613
20613
  200: {
20614
20614
  content: {
20615
20615
  "application/json": {
20616
- schema: Pr
20616
+ schema: jr
20617
20617
  }
20618
20618
  },
20619
20619
  description: "The updated custom domain"
@@ -20662,7 +20662,7 @@ const c9 = new he().openapi(
20662
20662
  201: {
20663
20663
  content: {
20664
20664
  "application/json": {
20665
- schema: Pr
20665
+ schema: jr
20666
20666
  }
20667
20667
  },
20668
20668
  description: "The created custom domain"
@@ -20698,7 +20698,7 @@ const c9 = new he().openapi(
20698
20698
  200: {
20699
20699
  content: {
20700
20700
  "application/json": {
20701
- schema: Pr
20701
+ schema: jr
20702
20702
  }
20703
20703
  },
20704
20704
  description: "The custom domain"
@@ -20785,7 +20785,7 @@ async function _9(e, t) {
20785
20785
  includePadding: !1
20786
20786
  });
20787
20787
  }
20788
- const Ke = "auth2", Fl = 300, jp = 720 * 60 * 60, oo = 1440 * 60, w9 = "auth-token", ea = 1800 * 1e3, Hg = 10080 * 60 * 1e3, b9 = 300, v9 = 300, A9 = 1800 * 1e3, k9 = 1800 * 1e3, S9 = 1440 * 60 * 1e3;
20788
+ const Ke = "auth2", Fl = 300, jp = 720 * 60 * 60, lr = 1440 * 60, w9 = "auth-token", ea = 1800 * 1e3, Hg = 10080 * 60 * 1e3, b9 = 300, v9 = 300, A9 = 1800 * 1e3, k9 = 1800 * 1e3, S9 = 1440 * 60 * 1e3;
20789
20789
  var wn = {}, Vb;
20790
20790
  function x9() {
20791
20791
  if (Vb) return wn;
@@ -20999,7 +20999,7 @@ function E9(e, t) {
20999
20999
  }
21000
21000
  return i;
21001
21001
  }
21002
- function lr(e, t) {
21002
+ function dr(e, t) {
21003
21003
  return t ? xc.parse(t)[Op(e)] : void 0;
21004
21004
  }
21005
21005
  function MS(e, t) {
@@ -21524,7 +21524,7 @@ const L9 = M9, U9 = j9, F9 = {
21524
21524
  // transformAttributeName: false,
21525
21525
  oneListGroup: !1
21526
21526
  };
21527
- function _r(e) {
21527
+ function wr(e) {
21528
21528
  this.options = Object.assign({}, F9, e), this.options.ignoreAttributes === !0 || this.options.attributesGroupName ? this.isAttribute = function() {
21529
21529
  return !1;
21530
21530
  } : (this.ignoreAttributesFn = U9(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = H9), this.processTextOrObjNode = z9, this.options.format ? (this.indentate = q9, this.tagEndChar = `>
@@ -21533,12 +21533,12 @@ function _r(e) {
21533
21533
  return "";
21534
21534
  }, this.tagEndChar = ">", this.newLine = "");
21535
21535
  }
21536
- _r.prototype.build = function(e) {
21536
+ wr.prototype.build = function(e) {
21537
21537
  return this.options.preserveOrder ? L9(e, this.options) : (Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = {
21538
21538
  [this.options.arrayNodeName]: e
21539
21539
  }), this.j2x(e, 0, []).val);
21540
21540
  };
21541
- _r.prototype.j2x = function(e, t, n) {
21541
+ wr.prototype.j2x = function(e, t, n) {
21542
21542
  let i = "", r = "";
21543
21543
  const o = n.join(".");
21544
21544
  for (let s in e)
@@ -21587,14 +21587,14 @@ _r.prototype.j2x = function(e, t, n) {
21587
21587
  r += this.processTextOrObjNode(e[s], s, t, n);
21588
21588
  return { attrStr: i, val: r };
21589
21589
  };
21590
- _r.prototype.buildAttrPairStr = function(e, t) {
21590
+ wr.prototype.buildAttrPairStr = function(e, t) {
21591
21591
  return t = this.options.attributeValueProcessor(e, "" + t), t = this.replaceEntitiesValue(t), this.options.suppressBooleanAttributes && t === "true" ? " " + e : " " + e + '="' + t + '"';
21592
21592
  };
21593
21593
  function z9(e, t, n, i) {
21594
21594
  const r = this.j2x(e, n + 1, i.concat(t));
21595
21595
  return e[this.options.textNodeName] !== void 0 && Object.keys(e).length === 1 ? this.buildTextValNode(e[this.options.textNodeName], t, r.attrStr, n) : this.buildObjectNode(r.val, t, r.attrStr, n);
21596
21596
  }
21597
- _r.prototype.buildObjectNode = function(e, t, n, i) {
21597
+ wr.prototype.buildObjectNode = function(e, t, n, i) {
21598
21598
  if (e === "")
21599
21599
  return t[0] === "?" ? this.indentate(i) + "<" + t + n + "?" + this.tagEndChar : this.indentate(i) + "<" + t + n + this.closeTag(t) + this.tagEndChar;
21600
21600
  {
@@ -21602,11 +21602,11 @@ _r.prototype.buildObjectNode = function(e, t, n, i) {
21602
21602
  return t[0] === "?" && (o = "?", r = ""), (n || n === "") && e.indexOf("<") === -1 ? this.indentate(i) + "<" + t + n + o + ">" + e + r : this.options.commentPropName !== !1 && t === this.options.commentPropName && o.length === 0 ? this.indentate(i) + `<!--${e}-->` + this.newLine : this.indentate(i) + "<" + t + n + o + this.tagEndChar + e + this.indentate(i) + r;
21603
21603
  }
21604
21604
  };
21605
- _r.prototype.closeTag = function(e) {
21605
+ wr.prototype.closeTag = function(e) {
21606
21606
  let t = "";
21607
21607
  return this.options.unpairedTags.indexOf(e) !== -1 ? this.options.suppressUnpairedNode || (t = "/") : this.options.suppressEmptyNode ? t = "/" : t = `></${e}`, t;
21608
21608
  };
21609
- _r.prototype.buildTextValNode = function(e, t, n, i) {
21609
+ wr.prototype.buildTextValNode = function(e, t, n, i) {
21610
21610
  if (this.options.cdataPropName !== !1 && t === this.options.cdataPropName)
21611
21611
  return this.indentate(i) + `<![CDATA[${e}]]>` + this.newLine;
21612
21612
  if (this.options.commentPropName !== !1 && t === this.options.commentPropName)
@@ -21618,7 +21618,7 @@ _r.prototype.buildTextValNode = function(e, t, n, i) {
21618
21618
  return r = this.replaceEntitiesValue(r), r === "" ? this.indentate(i) + "<" + t + n + this.closeTag(t) + this.tagEndChar : this.indentate(i) + "<" + t + n + ">" + r + "</" + t + this.tagEndChar;
21619
21619
  }
21620
21620
  };
21621
- _r.prototype.replaceEntitiesValue = function(e) {
21621
+ wr.prototype.replaceEntitiesValue = function(e) {
21622
21622
  if (e && e.length > 0 && this.options.processEntities)
21623
21623
  for (let t = 0; t < this.options.entities.length; t++) {
21624
21624
  const n = this.options.entities[t];
@@ -21632,7 +21632,7 @@ function q9(e) {
21632
21632
  function H9(e) {
21633
21633
  return e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName ? e.substr(this.attrPrefixLen) : !1;
21634
21634
  }
21635
- var K9 = _r;
21635
+ var K9 = wr;
21636
21636
  const V9 = K9;
21637
21637
  var G9 = {
21638
21638
  XMLBuilder: V9
@@ -23646,7 +23646,7 @@ function rx(e) {
23646
23646
  target: t.map((n) => typeof n == "string" ? yu(e.parent, n) : n)
23647
23647
  } : e.parent.initial;
23648
23648
  }
23649
- function Ur(e) {
23649
+ function Fr(e) {
23650
23650
  return e.type === "history";
23651
23651
  }
23652
23652
  function nv(e) {
@@ -23736,7 +23736,7 @@ function Ly(e, t, n, i) {
23736
23736
  function UP(e) {
23737
23737
  return Object.keys(e.states).map((t) => e.states[t]).filter((t) => t.type === "history");
23738
23738
  }
23739
- function dr(e, t) {
23739
+ function ur(e, t) {
23740
23740
  let n = e;
23741
23741
  for (; n.parent && n.parent !== t; )
23742
23742
  n = n.parent;
@@ -23759,7 +23759,7 @@ function ax(e, t, n) {
23759
23759
  const s = /* @__PURE__ */ new Set();
23760
23760
  for (const c of i)
23761
23761
  if (FP(Qg([r], t, n), Qg([c], t, n)))
23762
- if (dr(r.source, c.source))
23762
+ if (ur(r.source, c.source))
23763
23763
  s.add(c);
23764
23764
  else {
23765
23765
  o = !0;
@@ -23776,7 +23776,7 @@ function ax(e, t, n) {
23776
23776
  function zP(e) {
23777
23777
  const [t, ...n] = e;
23778
23778
  for (const i of ll(t, void 0))
23779
- if (n.every((r) => dr(r, i)))
23779
+ if (n.every((r) => ur(r, i)))
23780
23780
  return i;
23781
23781
  }
23782
23782
  function Uy(e, t) {
@@ -23784,7 +23784,7 @@ function Uy(e, t) {
23784
23784
  return [];
23785
23785
  const n = /* @__PURE__ */ new Set();
23786
23786
  for (const i of e.target)
23787
- if (Ur(i))
23787
+ if (Fr(i))
23788
23788
  if (t[i.id])
23789
23789
  for (const r of t[i.id])
23790
23790
  n.add(r);
@@ -23799,7 +23799,7 @@ function sx(e, t) {
23799
23799
  const n = Uy(e, t);
23800
23800
  if (!n)
23801
23801
  return;
23802
- if (!e.reenter && n.every((r) => r === e.source || dr(r, e.source)))
23802
+ if (!e.reenter && n.every((r) => r === e.source || ur(r, e.source)))
23803
23803
  return e.source;
23804
23804
  const i = zP(n.concat(e.source));
23805
23805
  if (i)
@@ -23814,7 +23814,7 @@ function Qg(e, t, n) {
23814
23814
  const o = sx(r, n);
23815
23815
  r.reenter && r.source === o && i.add(o);
23816
23816
  for (const s of t)
23817
- dr(s, o) && i.add(s);
23817
+ ur(s, o) && i.add(s);
23818
23818
  }
23819
23819
  return [...i];
23820
23820
  }
@@ -23907,7 +23907,7 @@ function GP(e, t, n, i) {
23907
23907
  for (const r of e) {
23908
23908
  const o = sx(r, t);
23909
23909
  for (const c of r.target || [])
23910
- !Ur(c) && // if the target is different than the source then it will *definitely* be entered
23910
+ !Fr(c) && // if the target is different than the source then it will *definitely* be entered
23911
23911
  (r.source !== c || // we know that the domain can't lie within the source
23912
23912
  // if it's different than the source then it's outside of it and it means that the target has to be entered as well
23913
23913
  r.source !== o || // reentering transitions always enter the target, even if it's the source itself
@@ -23920,7 +23920,7 @@ function GP(e, t, n, i) {
23920
23920
  }
23921
23921
  }
23922
23922
  function Vo(e, t, n, i) {
23923
- if (Ur(e))
23923
+ if (Fr(e))
23924
23924
  if (t[e.id]) {
23925
23925
  const r = t[e.id];
23926
23926
  for (const o of r)
@@ -23936,16 +23936,16 @@ function Vo(e, t, n, i) {
23936
23936
  }
23937
23937
  else if (e.type === "compound") {
23938
23938
  const [r] = e.initial.target;
23939
- Ur(r) || (i.add(r), n.add(r)), Vo(r, t, n, i), Pf(r, e, i, t, n);
23939
+ Fr(r) || (i.add(r), n.add(r)), Vo(r, t, n, i), Pf(r, e, i, t, n);
23940
23940
  } else if (e.type === "parallel")
23941
- for (const r of wa(e).filter((o) => !Ur(o)))
23942
- [...i].some((o) => dr(o, r)) || (Ur(r) || (i.add(r), n.add(r)), Vo(r, t, n, i));
23941
+ for (const r of wa(e).filter((o) => !Fr(o)))
23942
+ [...i].some((o) => ur(o, r)) || (Fr(r) || (i.add(r), n.add(r)), Vo(r, t, n, i));
23943
23943
  }
23944
23944
  function cx(e, t, n, i, r) {
23945
23945
  for (const o of i)
23946
- if ((!r || dr(o, r)) && e.add(o), o.type === "parallel")
23947
- for (const s of wa(o).filter((c) => !Ur(c)))
23948
- [...e].some((c) => dr(c, s)) || (e.add(s), Vo(s, t, n, e));
23946
+ if ((!r || ur(o, r)) && e.add(o), o.type === "parallel")
23947
+ for (const s of wa(o).filter((c) => !Fr(c)))
23948
+ [...e].some((c) => ur(c, s)) || (e.add(s), Vo(s, t, n, e));
23949
23949
  }
23950
23950
  function Pf(e, t, n, i, r) {
23951
23951
  cx(n, i, r, ll(e, t));
@@ -23958,7 +23958,7 @@ function WP(e, t, n, i, r, o, s, c) {
23958
23958
  for (const p of d)
23959
23959
  for (const f of UP(p)) {
23960
23960
  let h;
23961
- f.history === "deep" ? h = (m) => Dy(m) && dr(m, p) : h = (m) => m.parent === p, u ??= {
23961
+ f.history === "deep" ? h = (m) => Dy(m) && ur(m, p) : h = (m) => m.parent === p, u ??= {
23962
23962
  ...o
23963
23963
  }, u[f.id] = Array.from(r).filter(h);
23964
23964
  }
@@ -25168,7 +25168,7 @@ async function Mp(e, t) {
25168
25168
  ), f = p[p.length - 1];
25169
25169
  if (!f?.pkcs7)
25170
25170
  throw new ee(500, { message: "No signing key available" });
25171
- const h = y9(f.pkcs7), m = gr(e.env, e.var.custom_domain), g = n.audience || r.tenant.audience;
25171
+ const h = y9(f.pkcs7), m = yr(e.env, e.var.custom_domain), g = n.audience || r.tenant.audience;
25172
25172
  if (!g)
25173
25173
  throw new ee(400, {
25174
25174
  error: "invalid_request",
@@ -25421,12 +25421,13 @@ async function $7(e, {
25421
25421
  throw new j(400, {
25422
25422
  message: `Login session ${i.id} not found`
25423
25423
  });
25424
- const c = s.state || Pe.PENDING;
25425
- if (c === Pe.FAILED || c === Pe.EXPIRED || c === Pe.COMPLETED)
25426
- throw new j(400, {
25427
- message: `Cannot authenticate login session in ${c} state`
25424
+ const c = s.state || $e.PENDING;
25425
+ if (c === $e.FAILED || c === $e.COMPLETED)
25426
+ throw new ee(400, {
25427
+ error: "access_denied",
25428
+ error_description: `Cannot authenticate login session in ${c} state`
25428
25429
  });
25429
- if (c === Pe.AUTHENTICATED) {
25430
+ if (c === $e.AUTHENTICATED) {
25430
25431
  if (s.session_id)
25431
25432
  return s.session_id;
25432
25433
  throw new j(500, {
@@ -25435,19 +25436,19 @@ async function $7(e, {
25435
25436
  }
25436
25437
  let l;
25437
25438
  if (r) {
25438
- const p = await e.env.data.sessions.get(
25439
+ const f = await e.env.data.sessions.get(
25439
25440
  n.tenant.id,
25440
25441
  r
25441
25442
  );
25442
- !p || p.revoked_at ? l = (await sv(e, {
25443
+ !f || f.revoked_at ? l = (await sv(e, {
25443
25444
  user: t,
25444
25445
  client: n,
25445
25446
  loginSession: i
25446
- })).id : (l = r, p.clients.includes(n.client_id) || await e.env.data.sessions.update(
25447
+ })).id : (l = r, f.clients.includes(n.client_id) || await e.env.data.sessions.update(
25447
25448
  n.tenant.id,
25448
25449
  r,
25449
25450
  {
25450
- clients: [...p.clients, n.client_id]
25451
+ clients: [...f.clients, n.client_id]
25451
25452
  }
25452
25453
  ));
25453
25454
  } else
@@ -25456,15 +25457,20 @@ async function $7(e, {
25456
25457
  client: n,
25457
25458
  loginSession: i
25458
25459
  })).id;
25459
- const { state: d } = ui(c, {
25460
+ const d = c === $e.EXPIRED ? $e.PENDING : c, { state: u } = ui(d, {
25460
25461
  type: Hn.AUTHENTICATE,
25461
25462
  userId: t.user_id
25462
- }), u = o || e.var.connection;
25463
+ }), p = o || e.var.connection;
25463
25464
  return await e.env.data.loginSessions.update(n.tenant.id, i.id, {
25464
25465
  session_id: l,
25465
- state: d,
25466
+ state: u,
25466
25467
  user_id: t.user_id,
25467
- ...u ? { auth_connection: u } : {}
25468
+ ...p ? { auth_connection: p } : {},
25469
+ ...c === $e.EXPIRED ? {
25470
+ expires_at: new Date(
25471
+ Date.now() + lr * 1e3
25472
+ ).toISOString()
25473
+ } : {}
25468
25474
  }), l;
25469
25475
  }
25470
25476
  async function T7(e, t, n, i) {
@@ -25478,7 +25484,7 @@ async function T7(e, t, n, i) {
25478
25484
  );
25479
25485
  return;
25480
25486
  }
25481
- const o = r.state || Pe.PENDING, { state: s, context: c } = ui(o, {
25487
+ const o = r.state || $e.PENDING, { state: s, context: c } = ui(o, {
25482
25488
  type: Hn.FAIL,
25483
25489
  reason: i
25484
25490
  });
@@ -25498,7 +25504,7 @@ async function bu(e, t, n, i) {
25498
25504
  );
25499
25505
  return;
25500
25506
  }
25501
- const o = r.state || Pe.PENDING, { state: s, context: c } = ui(o, {
25507
+ const o = r.state || $e.PENDING, { state: s, context: c } = ui(o, {
25502
25508
  type: Hn.START_HOOK,
25503
25509
  hookId: i
25504
25510
  });
@@ -25518,7 +25524,7 @@ async function $c(e, t, n) {
25518
25524
  );
25519
25525
  return;
25520
25526
  }
25521
- const r = i.state || Pe.PENDING, { state: o } = ui(r, {
25527
+ const r = i.state || $e.PENDING, { state: o } = ui(r, {
25522
25528
  type: Hn.COMPLETE_HOOK
25523
25529
  });
25524
25530
  o !== r && await e.env.data.loginSessions.update(t, n.id, {
@@ -25538,7 +25544,7 @@ async function cv(e, t, n, i) {
25538
25544
  );
25539
25545
  return;
25540
25546
  }
25541
- const o = r.state || Pe.PENDING, { state: s } = ui(o, {
25547
+ const o = r.state || $e.PENDING, { state: s } = ui(o, {
25542
25548
  type: Hn.COMPLETE
25543
25549
  });
25544
25550
  s !== o && await e.env.data.loginSessions.update(t, n.id, {
@@ -25557,7 +25563,7 @@ async function dl(e, t, n, i, r) {
25557
25563
  );
25558
25564
  return;
25559
25565
  }
25560
- const s = o.state || Pe.PENDING, { state: c } = ui(s, {
25566
+ const s = o.state || $e.PENDING, { state: c } = ui(s, {
25561
25567
  type: Hn.START_CONTINUATION,
25562
25568
  scope: i
25563
25569
  });
@@ -25605,7 +25611,7 @@ async function vu(e, t, n) {
25605
25611
  o = p;
25606
25612
  } catch {
25607
25613
  }
25608
- const s = i.state || Pe.PENDING, { state: c } = ui(s, {
25614
+ const s = i.state || $e.PENDING, { state: c } = ui(s, {
25609
25615
  type: Hn.COMPLETE_CONTINUATION
25610
25616
  });
25611
25617
  return c !== s ? await e.env.data.loginSessions.update(t, n.id, {
@@ -25624,7 +25630,7 @@ function I7(e) {
25624
25630
  }
25625
25631
  }
25626
25632
  function Au(e, t) {
25627
- if (e.state !== Pe.AWAITING_CONTINUATION)
25633
+ if (e.state !== $e.AWAITING_CONTINUATION)
25628
25634
  return !1;
25629
25635
  const n = I7(e);
25630
25636
  return n ? n.includes(t) : !1;
@@ -25685,23 +25691,18 @@ async function et(e, t) {
25685
25691
  throw new ee(500, {
25686
25692
  message: "Login session not found."
25687
25693
  });
25688
- const m = h.state || Pe.PENDING;
25689
- if (m === Pe.COMPLETED)
25694
+ const m = h.state || $e.PENDING;
25695
+ if (m === $e.COMPLETED)
25690
25696
  throw new ee(400, {
25691
25697
  error: "invalid_request",
25692
25698
  error_description: "Login session has already been completed"
25693
25699
  });
25694
- if (m === Pe.FAILED)
25700
+ if (m === $e.FAILED)
25695
25701
  throw new ee(400, {
25696
25702
  error: "access_denied",
25697
25703
  error_description: `Login session failed: ${h.failure_reason || "unknown reason"}`
25698
25704
  });
25699
- if (m === Pe.EXPIRED)
25700
- throw new ee(400, {
25701
- error: "invalid_request",
25702
- error_description: "Login session has expired"
25703
- });
25704
- if (m === Pe.PENDING)
25705
+ if (m === $e.PENDING || m === $e.EXPIRED)
25705
25706
  d = await $7(e, {
25706
25707
  user: o,
25707
25708
  client: i,
@@ -25723,7 +25724,7 @@ async function et(e, t) {
25723
25724
  t.loginSession.id
25724
25725
  );
25725
25726
  if (h) {
25726
- const m = h.state || Pe.PENDING;
25727
+ const m = h.state || $e.PENDING;
25727
25728
  let g = {};
25728
25729
  if (h.state_data)
25729
25730
  try {
@@ -25734,7 +25735,7 @@ async function et(e, t) {
25734
25735
  h.id
25735
25736
  );
25736
25737
  }
25737
- if (m === Pe.AWAITING_MFA) {
25738
+ if (m === $e.AWAITING_MFA) {
25738
25739
  let w = "/u2/mfa/login-options";
25739
25740
  if (g.authenticationMethodId) {
25740
25741
  const _ = (await e.env.data.authenticationMethods.list(
@@ -25752,7 +25753,7 @@ async function et(e, t) {
25752
25753
  }
25753
25754
  });
25754
25755
  }
25755
- if (m === Pe.AUTHENTICATED && !g.mfa_verified) {
25756
+ if (m === $e.AUTHENTICATED && !g.mfa_verified) {
25756
25757
  const { checkMfaRequired: w, sendMfaOtp: y } = await Promise.resolve().then(() => S6), _ = await w(
25757
25758
  e,
25758
25759
  i.tenant.id,
@@ -25760,7 +25761,7 @@ async function et(e, t) {
25760
25761
  );
25761
25762
  if (_.required) {
25762
25763
  const { state: v } = ui(
25763
- Pe.AUTHENTICATED,
25764
+ $e.AUTHENTICATED,
25764
25765
  { type: Hn.REQUIRE_MFA }
25765
25766
  );
25766
25767
  if (_.enrolled) {
@@ -25842,14 +25843,14 @@ async function et(e, t) {
25842
25843
  t.loginSession.id
25843
25844
  );
25844
25845
  if (h) {
25845
- const m = h.state || Pe.PENDING;
25846
+ const m = h.state || $e.PENDING;
25846
25847
  let g = {};
25847
25848
  if (h.state_data)
25848
25849
  try {
25849
25850
  g = JSON.parse(h.state_data);
25850
25851
  } catch {
25851
25852
  }
25852
- if (m === Pe.AUTHENTICATED && !g.passkey_nudge_completed) {
25853
+ if (m === $e.AUTHENTICATED && !g.passkey_nudge_completed) {
25853
25854
  const { checkPasskeyNudgeRequired: w } = await import("./passkey-enrollment-D0dl7raT.mjs");
25854
25855
  if ((await w(
25855
25856
  e,
@@ -26239,7 +26240,7 @@ function B7(e) {
26239
26240
  a.object({
26240
26241
  ...Fo.shape,
26241
26242
  tenant: mm,
26242
- connections: a.array(Dr)
26243
+ connections: a.array(Mr)
26243
26244
  });
26244
26245
  async function tt(e, t, n) {
26245
26246
  let i, r = n;
@@ -27252,7 +27253,7 @@ async function ml(e, t) {
27252
27253
  await e.env.data.tenants.get(l) && e.set("tenant_id", l);
27253
27254
  }
27254
27255
  } else
27255
- e.set("host", new URL(gr(e.env)).host);
27256
+ e.set("host", new URL(yr(e.env)).host);
27256
27257
  if (!e.var.tenant_id) {
27257
27258
  const { tenants: s } = await e.env.data.tenants.list({ per_page: 2 });
27258
27259
  s.length === 1 && s[0] && e.set("tenant_id", s[0].id);
@@ -28926,7 +28927,7 @@ const ej = nn.extend({
28926
28927
  organization_id: !0,
28927
28928
  invitation_url: !0
28928
28929
  }), hj = nn.extend({
28929
- organizations: a.array(Mr)
28930
+ organizations: a.array(Lr)
28930
28931
  }), Hy = a.object({
28931
28932
  user_id: a.string().openapi({
28932
28933
  description: "ID of this user"
@@ -28988,7 +28989,7 @@ const ej = nn.extend({
28988
28989
  "application/json": {
28989
28990
  schema: a.union([
28990
28991
  hj,
28991
- a.array(Mr)
28992
+ a.array(Lr)
28992
28993
  ])
28993
28994
  }
28994
28995
  },
@@ -29030,7 +29031,7 @@ const ej = nn.extend({
29030
29031
  200: {
29031
29032
  content: {
29032
29033
  "application/json": {
29033
- schema: Mr
29034
+ schema: Lr
29034
29035
  }
29035
29036
  },
29036
29037
  description: "An organization"
@@ -29102,7 +29103,7 @@ const ej = nn.extend({
29102
29103
  200: {
29103
29104
  content: {
29104
29105
  "application/json": {
29105
- schema: Mr
29106
+ schema: Lr
29106
29107
  }
29107
29108
  },
29108
29109
  description: "The updated organization"
@@ -29148,7 +29149,7 @@ const ej = nn.extend({
29148
29149
  201: {
29149
29150
  content: {
29150
29151
  "application/json": {
29151
- schema: Mr
29152
+ schema: Lr
29152
29153
  }
29153
29154
  },
29154
29155
  description: "The created organization"
@@ -30250,7 +30251,7 @@ const e0 = a.object({
30250
30251
  },
30251
30252
  csrf_token: He(),
30252
30253
  user_id: t,
30253
- state: Pe.AWAITING_MFA,
30254
+ state: $e.AWAITING_MFA,
30254
30255
  state_data: JSON.stringify({ guardian_enrollment: !0 })
30255
30256
  }), f = He();
30256
30257
  await e.env.data.codes.create(i, {
@@ -30260,7 +30261,7 @@ const e0 = a.object({
30260
30261
  user_id: t,
30261
30262
  expires_at: u
30262
30263
  });
30263
- const m = `${gr(e.env, e.var.custom_domain)}u2/guardian/enroll?ticket=${f}`;
30264
+ const m = `${yr(e.env, e.var.custom_domain)}u2/guardian/enroll?ticket=${f}`;
30264
30265
  return e.json(
30265
30266
  {
30266
30267
  ticket_id: f,
@@ -30803,7 +30804,7 @@ async function hv(e, t, n, i) {
30803
30804
  const l = e.get("ip"), d = e.get("useragent"), u = e.get("auth0_client");
30804
30805
  o = await e.env.data.loginSessions.create(t.tenant.id, {
30805
30806
  expires_at: new Date(
30806
- Date.now() + oo * 1e3
30807
+ Date.now() + lr * 1e3
30807
30808
  ).toISOString(),
30808
30809
  authParams: i,
30809
30810
  csrf_token: He(),
@@ -30909,7 +30910,7 @@ async function mv(e, { code: t, state: n }) {
30909
30910
  function Su(e, t, n) {
30910
30911
  const i = new URL(
30911
30912
  "/u/error",
30912
- gr(e.env, e.var.custom_domain)
30913
+ yr(e.env, e.var.custom_domain)
30913
30914
  );
30914
30915
  return hx(i, {
30915
30916
  error: t,
@@ -30958,7 +30959,7 @@ async function Hl(e, t, n, i, r) {
30958
30959
  }
30959
30960
  const u = new URL(
30960
30961
  `${l}${d}`,
30961
- gr(e.env, e.var.custom_domain)
30962
+ yr(e.env, e.var.custom_domain)
30962
30963
  );
30963
30964
  return hx(u, {
30964
30965
  state: s.id,
@@ -31037,13 +31038,14 @@ const Tj = new he().openapi(
31037
31038
  e.var.tenant_id,
31038
31039
  c.login_id
31039
31040
  )) {
31040
- let d = "access_denied";
31041
+ let d = "access_denied", u = "access_denied";
31041
31042
  try {
31042
- d = JSON.parse(s.message).message || d;
31043
+ const p = JSON.parse(s.message);
31044
+ d = p.error_description || p.message || d, u = p.error || u;
31043
31045
  } catch {
31044
31046
  d = s.message || d;
31045
31047
  }
31046
- return Hl(e, t, "access_denied", d);
31048
+ return Hl(e, t, u, d);
31047
31049
  }
31048
31050
  }
31049
31051
  }
@@ -31127,13 +31129,14 @@ const Tj = new he().openapi(
31127
31129
  e.var.tenant_id,
31128
31130
  c.login_id
31129
31131
  )) {
31130
- let d = "access_denied";
31132
+ let d = "access_denied", u = "access_denied";
31131
31133
  try {
31132
- d = JSON.parse(s.message).message || d;
31134
+ const p = JSON.parse(s.message);
31135
+ d = p.error_description || p.message || d, u = p.error || u;
31133
31136
  } catch {
31134
31137
  d = s.message || d;
31135
31138
  }
31136
- return Hl(e, t, "access_denied", d);
31139
+ return Hl(e, t, u, d);
31137
31140
  }
31138
31141
  }
31139
31142
  }
@@ -31220,7 +31223,7 @@ const Nj = new he().openapi(
31220
31223
  });
31221
31224
  const s = e.req.header("cookie");
31222
31225
  if (s) {
31223
- const d = lr(i.tenant.id, s);
31226
+ const d = dr(i.tenant.id, s);
31224
31227
  if (d) {
31225
31228
  const u = await e.env.data.sessions.get(
31226
31229
  i.tenant.id,
@@ -31500,16 +31503,16 @@ const jj = a.object({
31500
31503
  }
31501
31504
  }),
31502
31505
  async (e) => {
31503
- const t = U_.parse({
31504
- issuer: gr(e.env),
31505
- authorization_endpoint: `${Ge(e.env)}authorize`,
31506
- token_endpoint: `${Ge(e.env)}oauth/token`,
31507
- device_authorization_endpoint: `${Ge(e.env)}oauth/device/code`,
31508
- userinfo_endpoint: `${Ge(e.env)}userinfo`,
31509
- mfa_challenge_endpoint: `${Ge(e.env)}mfa/challenge`,
31510
- jwks_uri: `${Ge(e.env)}.well-known/jwks.json`,
31511
- registration_endpoint: `${Ge(e.env)}oidc/register`,
31512
- revocation_endpoint: `${Ge(e.env)}oauth/revoke`,
31506
+ const t = e.var.custom_domain, n = U_.parse({
31507
+ issuer: yr(e.env, t),
31508
+ authorization_endpoint: `${Ge(e.env, t)}authorize`,
31509
+ token_endpoint: `${Ge(e.env, t)}oauth/token`,
31510
+ device_authorization_endpoint: `${Ge(e.env, t)}oauth/device/code`,
31511
+ userinfo_endpoint: `${Ge(e.env, t)}userinfo`,
31512
+ mfa_challenge_endpoint: `${Ge(e.env, t)}mfa/challenge`,
31513
+ jwks_uri: `${Ge(e.env, t)}.well-known/jwks.json`,
31514
+ registration_endpoint: `${Ge(e.env, t)}oidc/register`,
31515
+ revocation_endpoint: `${Ge(e.env, t)}oauth/revoke`,
31513
31516
  scopes_supported: [
31514
31517
  "openid",
31515
31518
  "profile",
@@ -31572,7 +31575,7 @@ const jj = a.object({
31572
31575
  "PS256"
31573
31576
  ]
31574
31577
  });
31575
- return e.json(t, {
31578
+ return e.json(n, {
31576
31579
  headers: {
31577
31580
  "access-control-allow-origin": "*",
31578
31581
  "access-control-allow-method": "GET",
@@ -33529,7 +33532,7 @@ function ZR() {
33529
33532
  function XR() {
33530
33533
  return zj(ZR, arguments);
33531
33534
  }
33532
- function wr(e, t = "US") {
33535
+ function br(e, t = "US") {
33533
33536
  const n = e.trim();
33534
33537
  if (n.includes("@")) {
33535
33538
  const i = n.toLowerCase(), r = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i);
@@ -33640,7 +33643,7 @@ async function $x(e, {
33640
33643
  authParams: r,
33641
33644
  enforceIpCheck: o = !1
33642
33645
  }) {
33643
- const s = e.get("ip"), c = e.get("countryCode"), { connectionType: l, normalized: d } = wr(
33646
+ const s = e.get("ip"), c = e.get("countryCode"), { connectionType: l, normalized: d } = br(
33644
33647
  n,
33645
33648
  c
33646
33649
  );
@@ -34002,7 +34005,7 @@ async function vl(e, { to: t, code: n, language: i }) {
34002
34005
  const r = await e.env.data.tenants.get(e.var.tenant_id);
34003
34006
  if (!r)
34004
34007
  throw new j(500, { message: "Tenant not found" });
34005
- const { connectionType: o } = wr(t), s = await e.env.data.branding.get(e.var.tenant_id), c = s?.logo_url || "", l = s?.colors?.primary || "#7d68f4", d = new URL(Dt(e.env)), u = {
34008
+ const { connectionType: o } = br(t), s = await e.env.data.branding.get(e.var.tenant_id), c = s?.logo_url || "", l = s?.colors?.primary || "#7d68f4", d = new URL(Dt(e.env)), u = {
34006
34009
  vendorName: r.friendly_name,
34007
34010
  vendorId: r.id,
34008
34011
  loginDomain: d.hostname,
@@ -34045,7 +34048,7 @@ async function Al(e, { to: t, code: n, authParams: i, language: r }) {
34045
34048
  throw new j(500, { message: "Tenant not found" });
34046
34049
  if (!i.redirect_uri)
34047
34050
  throw new j(400, { message: "redirect_uri is required" });
34048
- const { connectionType: s } = wr(t), c = await e.env.data.branding.get(e.var.tenant_id), l = c?.logo_url || "", d = c?.colors?.primary || "", u = new URL(Ge(e.env));
34051
+ const { connectionType: s } = br(t), c = await e.env.data.branding.get(e.var.tenant_id), l = c?.logo_url || "", d = c?.colors?.primary || "", u = new URL(Ge(e.env));
34049
34052
  u.pathname = "passwordless/verify_redirect", u.searchParams.set("verification_code", n), u.searchParams.set("connection", s), u.searchParams.set("client_id", i.client_id), u.searchParams.set("redirect_uri", i.redirect_uri), u.searchParams.set("email", t), i.response_type && u.searchParams.set("response_type", i.response_type), i.scope && u.searchParams.set("scope", i.scope), i.state && u.searchParams.set("state", i.state), i.nonce && u.searchParams.set("nonce", i.nonce), i.code_challenge && u.searchParams.set("code_challenge", i.code_challenge), i.code_challenge_method && u.searchParams.set(
34050
34053
  "code_challenge_method",
34051
34054
  i.code_challenge_method
@@ -34271,7 +34274,7 @@ const cB = new he().openapi(
34271
34274
  }),
34272
34275
  async (e) => {
34273
34276
  const { email: t, client_id: n } = e.req.valid("json"), i = await tt(e.env, n);
34274
- if (e.set("client_id", i.client_id), mn(e, i.tenant.id), !await mr({
34277
+ if (e.set("client_id", i.client_id), mn(e, i.tenant.id), !await gr({
34275
34278
  userAdapter: e.env.data.users,
34276
34279
  tenant_id: i.tenant.id,
34277
34280
  username: t,
@@ -34287,7 +34290,7 @@ const cB = new he().openapi(
34287
34290
  i.tenant.id,
34288
34291
  {
34289
34292
  expires_at: new Date(
34290
- Date.now() + oo * 1e3
34293
+ Date.now() + lr * 1e3
34291
34294
  ).toISOString(),
34292
34295
  authParams: o,
34293
34296
  csrf_token: He(),
@@ -34517,7 +34520,7 @@ async function Nx(e, t, n, i) {
34517
34520
  const { data: r } = e.env, { username: o } = n;
34518
34521
  if (e.set("username", o), !o)
34519
34522
  throw new ee(400, { message: "Username is required" });
34520
- const s = await mr({
34523
+ const s = await gr({
34521
34524
  userAdapter: e.env.data.users,
34522
34525
  tenant_id: t.tenant.id,
34523
34526
  username: o,
@@ -34696,7 +34699,7 @@ const fB = new he().openapi(
34696
34699
  r.tenant.id,
34697
34700
  {
34698
34701
  expires_at: new Date(
34699
- Date.now() + oo * 1e3
34702
+ Date.now() + lr * 1e3
34700
34703
  ).toISOString(),
34701
34704
  authParams: {
34702
34705
  client_id: n,
@@ -34766,7 +34769,7 @@ async function mB({
34766
34769
  n.tenant.id,
34767
34770
  {
34768
34771
  expires_at: new Date(
34769
- Date.now() + oo * 1e3
34772
+ Date.now() + lr * 1e3
34770
34773
  ).toISOString(),
34771
34774
  authParams: i,
34772
34775
  csrf_token: He(),
@@ -34797,7 +34800,7 @@ async function mB({
34797
34800
  code_type: "otp",
34798
34801
  login_id: p.id,
34799
34802
  expires_at: new Date(
34800
- Date.now() + oo * 1e3
34803
+ Date.now() + lr * 1e3
34801
34804
  ).toISOString(),
34802
34805
  redirect_uri: i.redirect_uri
34803
34806
  }), await Al(e, {
@@ -35238,7 +35241,7 @@ const vB = new he().openapi(
35238
35241
  };
35239
35242
  if ($.redirect_uri) {
35240
35243
  const D = T.callbacks || [];
35241
- if (e.var.host && (D.push(`${gr(e.env)}/*`), D.push(`${Dt(e.env)}/*`)), !Ky($.redirect_uri, D, {
35244
+ if (e.var.host && (D.push(`${yr(e.env)}/*`), D.push(`${Dt(e.env)}/*`)), !Ky($.redirect_uri, D, {
35242
35245
  allowPathWildcards: !0,
35243
35246
  allowSubDomainWildcards: !0
35244
35247
  }))
@@ -35365,7 +35368,7 @@ const vB = new he().openapi(
35365
35368
  });
35366
35369
  if (c.redirect_uri) {
35367
35370
  const _ = s.callbacks || [];
35368
- if (e.var.host && (_.push(`${gr(e.env)}/*`), _.push(`${Dt(e.env)}/*`)), !Ky(c.redirect_uri, _, {
35371
+ if (e.var.host && (_.push(`${yr(e.env)}/*`), _.push(`${Dt(e.env)}/*`)), !Ky(c.redirect_uri, _, {
35369
35372
  allowPathWildcards: !0,
35370
35373
  allowSubDomainWildcards: !0
35371
35374
  }))
@@ -35373,7 +35376,7 @@ const vB = new he().openapi(
35373
35376
  message: `Invalid redirect URI - ${c.redirect_uri}`
35374
35377
  });
35375
35378
  }
35376
- const d = lr(
35379
+ const d = dr(
35377
35380
  s.tenant.id,
35378
35381
  e.req.header("cookie")
35379
35382
  ), u = d ? await t.data.sessions.get(s.tenant.id, d) : void 0, p = u && !u.revoked_at ? u : void 0, f = new URL(e.req.url);
@@ -35382,7 +35385,7 @@ const vB = new he().openapi(
35382
35385
  s.tenant.id,
35383
35386
  {
35384
35387
  expires_at: new Date(
35385
- Date.now() + oo * 1e3
35388
+ Date.now() + lr * 1e3
35386
35389
  ).toISOString(),
35387
35390
  authParams: c,
35388
35391
  csrf_token: He(),
@@ -35518,7 +35521,7 @@ var Xy = /* @__PURE__ */ Symbol("RENDERER"), s0 = /* @__PURE__ */ Symbol("ERROR_
35518
35521
  style: ["data-href"],
35519
35522
  link: ["href"],
35520
35523
  meta: ["name", "httpEquiv", "charset", "itemProp"]
35521
- }, c0 = {}, Or = "data-precedence", Dx = (e) => e.rel === "stylesheet" && "precedence" in e, Mx = (e, t) => e === "link" ? t : $u[e].length > 0, Sl = (e) => Array.isArray(e) ? e : [e], Kv = /* @__PURE__ */ new WeakMap(), Vv = (e, t, n, i) => ({ buffer: r, context: o }) => {
35524
+ }, c0 = {}, Rr = "data-precedence", Dx = (e) => e.rel === "stylesheet" && "precedence" in e, Mx = (e, t) => e === "link" ? t : $u[e].length > 0, Sl = (e) => Array.isArray(e) ? e : [e], Kv = /* @__PURE__ */ new WeakMap(), Vv = (e, t, n, i) => ({ buffer: r, context: o }) => {
35522
35525
  if (!r)
35523
35526
  return;
35524
35527
  const s = Kv.get(o) || {};
@@ -35528,7 +35531,7 @@ var Xy = /* @__PURE__ */ Symbol("RENDERER"), s0 = /* @__PURE__ */ Symbol("ERROR_
35528
35531
  const d = $u[e], u = Mx(e, i !== void 0);
35529
35532
  if (u) {
35530
35533
  e: for (const [, p] of c)
35531
- if (!(e === "link" && !(p.rel === "stylesheet" && p[Or] !== void 0))) {
35534
+ if (!(e === "link" && !(p.rel === "stylesheet" && p[Rr] !== void 0))) {
35532
35535
  for (const f of d)
35533
35536
  if ((p?.[f] ?? null) === n?.[f]) {
35534
35537
  l = !0;
@@ -35556,7 +35559,7 @@ var Xy = /* @__PURE__ */ Symbol("RENDERER"), s0 = /* @__PURE__ */ Symbol("ERROR_
35556
35559
  if ("itemProp" in n)
35557
35560
  return xl(e, t, n);
35558
35561
  let { precedence: r, blocking: o, ...s } = n;
35559
- r = i ? r ?? "" : void 0, i && (s[Or] = r);
35562
+ r = i ? r ?? "" : void 0, i && (s[Rr] = r);
35560
35563
  const c = new jn(e, s, Sl(t || [])).toString();
35561
35564
  return c instanceof Promise ? c.then(
35562
35565
  (l) => cr(c, [
@@ -35872,7 +35875,7 @@ async function co(e, t, n) {
35872
35875
  e,
35873
35876
  t,
35874
35877
  !0
35875
- ), l = lr(o.tenant.id, e.req.header("cookie")), d = l ? await e.env.data.sessions.get(o.tenant.id, l) : null;
35878
+ ), l = dr(o.tenant.id, e.req.header("cookie")), d = l ? await e.env.data.sessions.get(o.tenant.id, l) : null;
35876
35879
  if (n?.continuationScope && Au(c, n.continuationScope)) {
35877
35880
  if (!c.user_id)
35878
35881
  throw new en(
@@ -36040,7 +36043,7 @@ function Qv(e, t = "light") {
36040
36043
  const n = l0(e, "#ffffff"), i = l0(e, "#000000"), r = 1.35;
36041
36044
  return t === "light" ? i > n * r ? "#000000" : "#ffffff" : i * r > n ? "#000000" : "#ffffff";
36042
36045
  }
36043
- const Ea = "mndbcdfd", KB = (e, t) => {
36046
+ const Ea = "mndlhg9d", KB = (e, t) => {
36044
36047
  const n = e?.colors?.primary_button || t?.colors?.primary || "#000000", i = e?.colors?.base_hover_color || HB(n, 0.2), r = e?.colors?.primary_button_label, o = r && l0(r, n) >= 4.5, s = o ? r : Qv(n, "light"), c = o ? r : Qv(n, "dark"), l = s !== c ? `
36045
36048
  @media (prefers-color-scheme: dark) {
36046
36049
  body { --text-on-primary: ${c}; }
@@ -36503,7 +36506,7 @@ const YB = new he().openapi(
36503
36506
  normalized: f,
36504
36507
  connectionType: h,
36505
36508
  provider: m
36506
- } = wr(
36509
+ } = br(
36507
36510
  i.username,
36508
36511
  p
36509
36512
  ), g = r.connections.find(
@@ -37026,7 +37029,7 @@ t.match(/^(?:o|pai|str|u|ve)/)) ? t.replace(/([A-Z])/g, "-$1").toLowerCase() : t
37026
37029
  };
37027
37030
  const o = document.head;
37028
37031
  let { onLoad: s, onError: c, precedence: l, blocking: d, ...u } = t, p = null, f = !1;
37029
- const h = $u[e], m = Mx(e, i), g = (k) => k.getAttribute("rel") === "stylesheet" && k.getAttribute(Or) !== null;
37032
+ const h = $u[e], m = Mx(e, i), g = (k) => k.getAttribute("rel") === "stylesheet" && k.getAttribute(Rr) !== null;
37030
37033
  let w;
37031
37034
  if (m) {
37032
37035
  const k = o.querySelectorAll(e);
@@ -37052,14 +37055,14 @@ t.match(/^(?:o|pai|str|u|ve)/)) ? t.replace(/([A-Z])/g, "-$1").toLowerCase() : t
37052
37055
  }
37053
37056
  } else
37054
37057
  w = o.querySelectorAll(e);
37055
- l = i ? l ?? "" : void 0, i && (u[Or] = l);
37058
+ l = i ? l ?? "" : void 0, i && (u[Rr] = l);
37056
37059
  const y = n_(
37057
37060
  (k) => {
37058
37061
  if (m) {
37059
37062
  if (e === "link" && l !== void 0) {
37060
37063
  let x = !1;
37061
37064
  for (const C of o.querySelectorAll(e)) {
37062
- const T = C.getAttribute(Or);
37065
+ const T = C.getAttribute(Rr);
37063
37066
  if (T === null) {
37064
37067
  o.insertBefore(k, C);
37065
37068
  return;
@@ -37075,11 +37078,11 @@ t.match(/^(?:o|pai|str|u|ve)/)) ? t.replace(/([A-Z])/g, "-$1").toLowerCase() : t
37075
37078
  }
37076
37079
  let b = !1;
37077
37080
  for (const x of o.querySelectorAll(e)) {
37078
- if (b && x.getAttribute(Or) !== l) {
37081
+ if (b && x.getAttribute(Rr) !== l) {
37079
37082
  o.insertBefore(k, x);
37080
37083
  return;
37081
37084
  }
37082
- x.getAttribute(Or) === l && (b = !0);
37085
+ x.getAttribute(Rr) === l && (b = !0);
37083
37086
  }
37084
37087
  o.appendChild(k);
37085
37088
  } else if (e === "link")
@@ -38041,7 +38044,7 @@ const Mc = (e) => {
38041
38044
  s.tenant.id,
38042
38045
  p.login_id
38043
38046
  ) : void 0;
38044
- if (await mr({
38047
+ if (await gr({
38045
38048
  userAdapter: e.env.data.users,
38046
38049
  tenant_id: s.tenant.id,
38047
38050
  username: c.authParams.username,
@@ -38245,7 +38248,7 @@ const Mc = (e) => {
38245
38248
  ),
38246
38249
  400
38247
38250
  );
38248
- const u = await mr({
38251
+ const u = await gr({
38249
38252
  userAdapter: o.data.users,
38250
38253
  tenant_id: l.tenant.id,
38251
38254
  username: d.authParams.username,
@@ -38590,7 +38593,7 @@ const Mc = (e) => {
38590
38593
  ),
38591
38594
  500
38592
38595
  );
38593
- const s = lr(
38596
+ const s = dr(
38594
38597
  o.tenant.id,
38595
38598
  e.req.header("cookie")
38596
38599
  ), c = s ? await t.data.sessions.get(o.tenant.id, s) : null, l = new URL(e.req.url).pathname.startsWith("/u2/") ? "/u2" : "/u";
@@ -38662,7 +38665,7 @@ const Mc = (e) => {
38662
38665
  ),
38663
38666
  500
38664
38667
  );
38665
- const c = lr(
38668
+ const c = dr(
38666
38669
  o.tenant.id,
38667
38670
  e.req.header("cookie")
38668
38671
  ), l = c ? await t.data.sessions.get(o.tenant.id, c) : null, d = new URL(e.req.url).pathname.startsWith("/u2/") ? "/u2" : "/u";
@@ -39723,7 +39726,7 @@ const Mc = (e) => {
39723
39726
  throw new j(400, {
39724
39727
  message: "Username not found in state"
39725
39728
  });
39726
- const d = await mr({
39729
+ const d = await gr({
39727
39730
  userAdapter: i.data.users,
39728
39731
  tenant_id: r.tenant.id,
39729
39732
  username: l,
@@ -40998,7 +41001,7 @@ function x1() {
40998
41001
  };
40999
41002
  return vn.Parser = g, vn;
41000
41003
  }
41001
- var xr = {}, Yf = {}, E1;
41004
+ var Er = {}, Yf = {}, E1;
41002
41005
  function $l() {
41003
41006
  return E1 || (E1 = 1, (function(e) {
41004
41007
  Object.defineProperty(e, "__esModule", { value: !0 }), e.Doctype = e.CDATA = e.Tag = e.Style = e.Script = e.Comment = e.Directive = e.Text = e.Root = e.isTag = e.ElementType = void 0;
@@ -41367,9 +41370,9 @@ function $1() {
41367
41370
  return Ce;
41368
41371
  }
41369
41372
  var T1;
41370
- function ur() {
41373
+ function pr() {
41371
41374
  return T1 || (T1 = 1, (function(e) {
41372
- var t = xr && xr.__createBinding || (Object.create ? (function(c, l, d, u) {
41375
+ var t = Er && Er.__createBinding || (Object.create ? (function(c, l, d, u) {
41373
41376
  u === void 0 && (u = d);
41374
41377
  var p = Object.getOwnPropertyDescriptor(l, d);
41375
41378
  (!p || ("get" in p ? !l.__esModule : p.writable || p.configurable)) && (p = { enumerable: !0, get: function() {
@@ -41377,7 +41380,7 @@ function ur() {
41377
41380
  } }), Object.defineProperty(c, u, p);
41378
41381
  }) : (function(c, l, d, u) {
41379
41382
  u === void 0 && (u = d), c[u] = l[d];
41380
- })), n = xr && xr.__exportStar || function(c, l) {
41383
+ })), n = Er && Er.__exportStar || function(c, l) {
41381
41384
  for (var d in c) d !== "default" && !Object.prototype.hasOwnProperty.call(l, d) && t(l, c, d);
41382
41385
  };
41383
41386
  Object.defineProperty(e, "__esModule", { value: !0 }), e.DomHandler = void 0;
@@ -41445,9 +41448,9 @@ function ur() {
41445
41448
  })()
41446
41449
  );
41447
41450
  e.DomHandler = s, e.default = s;
41448
- })(xr)), xr;
41451
+ })(Er)), Er;
41449
41452
  }
41450
- var Er = {}, Qn = {}, zt = {}, Zf = {}, An = {}, Gl = {}, I1;
41453
+ var Cr = {}, Qn = {}, zt = {}, Zf = {}, An = {}, Gl = {}, I1;
41451
41454
  function ZD() {
41452
41455
  return I1 || (I1 = 1, Object.defineProperty(Gl, "__esModule", { value: !0 }), Gl.default = new Uint16Array(
41453
41456
  // prettier-ignore
@@ -41921,9 +41924,9 @@ function tM() {
41921
41924
  } });
41922
41925
  })(Zf)), Zf;
41923
41926
  }
41924
- var Cr = {}, F1;
41927
+ var $r = {}, F1;
41925
41928
  function nM() {
41926
- return F1 || (F1 = 1, Object.defineProperty(Cr, "__esModule", { value: !0 }), Cr.attributeNames = Cr.elementNames = void 0, Cr.elementNames = new Map([
41929
+ return F1 || (F1 = 1, Object.defineProperty($r, "__esModule", { value: !0 }), $r.attributeNames = $r.elementNames = void 0, $r.elementNames = new Map([
41927
41930
  "altGlyph",
41928
41931
  "altGlyphDef",
41929
41932
  "altGlyphItem",
@@ -41963,7 +41966,7 @@ function nM() {
41963
41966
  "textPath"
41964
41967
  ].map(function(e) {
41965
41968
  return [e.toLowerCase(), e];
41966
- })), Cr.attributeNames = new Map([
41969
+ })), $r.attributeNames = new Map([
41967
41970
  "definitionURL",
41968
41971
  "attributeName",
41969
41972
  "attributeType",
@@ -42025,7 +42028,7 @@ function nM() {
42025
42028
  "zoomAndPan"
42026
42029
  ].map(function(e) {
42027
42030
  return [e.toLowerCase(), e];
42028
- }))), Cr;
42031
+ }))), $r;
42029
42032
  }
42030
42033
  var z1;
42031
42034
  function iM() {
@@ -42175,7 +42178,7 @@ function r6() {
42175
42178
  return d && d.__esModule ? d : { default: d };
42176
42179
  };
42177
42180
  Object.defineProperty(Qn, "__esModule", { value: !0 }), Qn.getOuterHTML = r, Qn.getInnerHTML = o, Qn.getText = s, Qn.textContent = c, Qn.innerText = l;
42178
- var t = /* @__PURE__ */ ur(), n = e(/* @__PURE__ */ iM()), i = /* @__PURE__ */ $l();
42181
+ var t = /* @__PURE__ */ pr(), n = e(/* @__PURE__ */ iM()), i = /* @__PURE__ */ $l();
42179
42182
  function r(d, u) {
42180
42183
  return (0, n.default)(d, u);
42181
42184
  }
@@ -42200,7 +42203,7 @@ var kn = {}, H1;
42200
42203
  function rM() {
42201
42204
  if (H1) return kn;
42202
42205
  H1 = 1, Object.defineProperty(kn, "__esModule", { value: !0 }), kn.getChildren = t, kn.getParent = n, kn.getSiblings = i, kn.getAttributeValue = r, kn.hasAttrib = o, kn.getName = s, kn.nextElementSibling = c, kn.prevElementSibling = l;
42203
- var e = /* @__PURE__ */ ur();
42206
+ var e = /* @__PURE__ */ pr();
42204
42207
  function t(d) {
42205
42208
  return (0, e.hasChildren)(d) ? d.children : [];
42206
42209
  }
@@ -42300,7 +42303,7 @@ var _i = {}, V1;
42300
42303
  function o6() {
42301
42304
  if (V1) return _i;
42302
42305
  V1 = 1, Object.defineProperty(_i, "__esModule", { value: !0 }), _i.filter = t, _i.find = n, _i.findOneChild = i, _i.findOne = r, _i.existsOne = o, _i.findAll = s;
42303
- var e = /* @__PURE__ */ ur();
42306
+ var e = /* @__PURE__ */ pr();
42304
42307
  function t(c, l, d, u) {
42305
42308
  return d === void 0 && (d = !0), u === void 0 && (u = 1 / 0), n(c, Array.isArray(l) ? l : [l], d, u);
42306
42309
  }
@@ -42358,7 +42361,7 @@ var wi = {}, G1;
42358
42361
  function a6() {
42359
42362
  if (G1) return wi;
42360
42363
  G1 = 1, Object.defineProperty(wi, "__esModule", { value: !0 }), wi.testElement = s, wi.getElements = c, wi.getElementById = l, wi.getElementsByTagName = d, wi.getElementsByClassName = u, wi.getElementsByTagType = p;
42361
- var e = /* @__PURE__ */ ur(), t = /* @__PURE__ */ o6(), n = {
42364
+ var e = /* @__PURE__ */ pr(), t = /* @__PURE__ */ o6(), n = {
42362
42365
  tag_name: function(f) {
42363
42366
  return typeof f == "function" ? function(h) {
42364
42367
  return (0, e.isTag)(h) && f(h.name);
@@ -42427,7 +42430,7 @@ var Hi = {}, W1;
42427
42430
  function aM() {
42428
42431
  if (W1) return Hi;
42429
42432
  W1 = 1, Object.defineProperty(Hi, "__esModule", { value: !0 }), Hi.DocumentPosition = void 0, Hi.removeSubsets = t, Hi.compareDocumentPosition = i, Hi.uniqueSort = r;
42430
- var e = /* @__PURE__ */ ur();
42433
+ var e = /* @__PURE__ */ pr();
42431
42434
  function t(o) {
42432
42435
  for (var s = o.length; --s >= 0; ) {
42433
42436
  var c = o[s];
@@ -42561,7 +42564,7 @@ function sM() {
42561
42564
  var Q1;
42562
42565
  function th() {
42563
42566
  return Q1 || (Q1 = 1, (function(e) {
42564
- var t = Er && Er.__createBinding || (Object.create ? (function(r, o, s, c) {
42567
+ var t = Cr && Cr.__createBinding || (Object.create ? (function(r, o, s, c) {
42565
42568
  c === void 0 && (c = s);
42566
42569
  var l = Object.getOwnPropertyDescriptor(o, s);
42567
42570
  (!l || ("get" in l ? !o.__esModule : l.writable || l.configurable)) && (l = { enumerable: !0, get: function() {
@@ -42569,11 +42572,11 @@ function th() {
42569
42572
  } }), Object.defineProperty(r, c, l);
42570
42573
  }) : (function(r, o, s, c) {
42571
42574
  c === void 0 && (c = s), r[c] = o[s];
42572
- })), n = Er && Er.__exportStar || function(r, o) {
42575
+ })), n = Cr && Cr.__exportStar || function(r, o) {
42573
42576
  for (var s in r) s !== "default" && !Object.prototype.hasOwnProperty.call(o, s) && t(o, r, s);
42574
42577
  };
42575
42578
  Object.defineProperty(e, "__esModule", { value: !0 }), e.hasChildren = e.isDocument = e.isComment = e.isText = e.isCDATA = e.isTag = void 0, n(/* @__PURE__ */ r6(), e), n(/* @__PURE__ */ rM(), e), n(/* @__PURE__ */ oM(), e), n(/* @__PURE__ */ o6(), e), n(/* @__PURE__ */ a6(), e), n(/* @__PURE__ */ aM(), e), n(/* @__PURE__ */ sM(), e);
42576
- var i = /* @__PURE__ */ ur();
42579
+ var i = /* @__PURE__ */ pr();
42577
42580
  Object.defineProperty(e, "isTag", { enumerable: !0, get: function() {
42578
42581
  return i.isTag;
42579
42582
  } }), Object.defineProperty(e, "isCDATA", { enumerable: !0, get: function() {
@@ -42587,7 +42590,7 @@ function th() {
42587
42590
  } }), Object.defineProperty(e, "hasChildren", { enumerable: !0, get: function() {
42588
42591
  return i.hasChildren;
42589
42592
  } });
42590
- })(Er)), Er;
42593
+ })(Cr)), Cr;
42591
42594
  }
42592
42595
  var Y1;
42593
42596
  function cM() {
@@ -42627,8 +42630,8 @@ function cM() {
42627
42630
  Object.defineProperty(e, "Parser", { enumerable: !0, get: function() {
42628
42631
  return s.Parser;
42629
42632
  } });
42630
- const c = /* @__PURE__ */ ur();
42631
- var l = /* @__PURE__ */ ur();
42633
+ const c = /* @__PURE__ */ pr();
42634
+ var l = /* @__PURE__ */ pr();
42632
42635
  Object.defineProperty(e, "DomHandler", { enumerable: !0, get: function() {
42633
42636
  return l.DomHandler;
42634
42637
  } }), Object.defineProperty(e, "DefaultHandler", { enumerable: !0, get: function() {
@@ -45352,9 +45355,9 @@ and ensure you are accounting for this risk.
45352
45355
  return;
45353
45356
  }
45354
45357
  if (De === "class") {
45355
- const Me = P[z], qe = P["*"], mi = $[z], yn = N[z], Yt = N["*"], kr = $["*"], Ol = [
45358
+ const Me = P[z], qe = P["*"], mi = $[z], yn = N[z], Yt = N["*"], Sr = $["*"], Ol = [
45356
45359
  mi,
45357
- kr
45360
+ Sr
45358
45361
  ].concat(yn, Yt).filter(function(lf) {
45359
45362
  return lf;
45360
45363
  });
@@ -46763,7 +46766,7 @@ const BM = new he().openapi(
46763
46766
  const { state: t } = e.req.valid("query"), { client: n, loginSession: i } = await Le(e, t, !0);
46764
46767
  if (!n || !n.tenant?.id)
46765
46768
  return console.error("Client or tenant ID missing in GET /u/continue"), e.text("Configuration error", 500);
46766
- if (i.state !== Pe.AWAITING_CONTINUATION)
46769
+ if (i.state !== $e.AWAITING_CONTINUATION)
46767
46770
  return console.warn(
46768
46771
  `Continue endpoint called but session ${i.id} is in unexpected state ${i.state}`
46769
46772
  ), e.redirect(
@@ -47580,7 +47583,7 @@ function VM(e) {
47580
47583
  }
47581
47584
  }), r;
47582
47585
  }
47583
- async function br(e) {
47586
+ async function vr(e) {
47584
47587
  const { routePrefix: t = "/u2" } = e, n = await e.ctx.env.data.promptSettings.get(
47585
47588
  e.tenant.id
47586
47589
  ), i = Jo.parse(n || {}), r = e.connections.some(
@@ -47588,13 +47591,13 @@ async function br(e) {
47588
47591
  );
47589
47592
  return i.identifier_first === !1 && r ? `${t}/login` : `${t}/login/identifier`;
47590
47593
  }
47591
- async function Rr(e) {
47592
- const { branding: t, state: n, errors: i, messages: r, data: o, customText: s, routePrefix: c } = e, l = e.language || "en", { m: d } = Te(
47594
+ async function Br(e) {
47595
+ const { branding: t, state: n, errors: i, messages: r, data: o, customText: s, routePrefix: c } = e, l = e.language || "en", { m: d } = Ie(
47593
47596
  "email-otp-challenge",
47594
47597
  "email-otp-challenge",
47595
47598
  l,
47596
47599
  s
47597
- ), { m: u } = Te(
47600
+ ), { m: u } = Ie(
47598
47601
  "common",
47599
47602
  "common",
47600
47603
  l,
@@ -47641,7 +47644,7 @@ async function Rr(e) {
47641
47644
  }
47642
47645
  ], w = e.connections.some(
47643
47646
  (_) => _.strategy === G.USERNAME_PASSWORD
47644
- ) ? await br(e) : `${c}/login/login-passwordless-identifier`;
47647
+ ) ? await vr(e) : `${c}/login/login-passwordless-identifier`;
47645
47648
  return {
47646
47649
  screen: {
47647
47650
  name: "email-otp-challenge",
@@ -47669,9 +47672,9 @@ const GM = {
47669
47672
  name: "Email OTP Challenge",
47670
47673
  description: "Email OTP code verification screen",
47671
47674
  handler: {
47672
- get: Rr,
47675
+ get: Br,
47673
47676
  post: async (e, t) => {
47674
- const { ctx: n, client: i, state: r } = e, o = t.code?.trim(), s = e.language || "en", { m: c } = Te(
47677
+ const { ctx: n, client: i, state: r } = e, o = t.code?.trim(), s = e.language || "en", { m: c } = Ie(
47675
47678
  "email-otp-challenge",
47676
47679
  "email-otp-challenge",
47677
47680
  s,
@@ -47681,7 +47684,7 @@ const GM = {
47681
47684
  const u = c.noCode();
47682
47685
  return {
47683
47686
  error: u,
47684
- screen: await Rr({
47687
+ screen: await Br({
47685
47688
  ...e,
47686
47689
  errors: { code: u }
47687
47690
  })
@@ -47695,14 +47698,14 @@ const GM = {
47695
47698
  const u = c.sessionExpired();
47696
47699
  return {
47697
47700
  error: u,
47698
- screen: await Rr({
47701
+ screen: await Br({
47699
47702
  ...e,
47700
47703
  errors: { code: u }
47701
47704
  })
47702
47705
  };
47703
47706
  }
47704
- const d = l.state || Pe.PENDING;
47705
- if (d === Pe.AWAITING_MFA || d === Pe.AUTHENTICATED)
47707
+ const d = l.state || $e.PENDING;
47708
+ if (d === $e.AWAITING_MFA || d === $e.AUTHENTICATED)
47706
47709
  try {
47707
47710
  const u = l.session_id ? await n.env.data.sessions.get(
47708
47711
  i.tenant.id,
@@ -47742,7 +47745,7 @@ const GM = {
47742
47745
  const p = c.unexpectedError();
47743
47746
  return {
47744
47747
  error: p,
47745
- screen: await Rr({
47748
+ screen: await Br({
47746
47749
  ...e,
47747
47750
  errors: { code: p }
47748
47751
  })
@@ -47772,7 +47775,7 @@ const GM = {
47772
47775
  else u instanceof j && (f = u.message);
47773
47776
  return {
47774
47777
  error: f,
47775
- screen: await Rr({
47778
+ screen: await Br({
47776
47779
  ...e,
47777
47780
  errors: { code: f },
47778
47781
  data: {
@@ -47785,13 +47788,13 @@ const GM = {
47785
47788
  }
47786
47789
  }
47787
47790
  };
47788
- async function Br(e) {
47789
- const { branding: t, state: n, errors: i, messages: r, data: o, customText: s, routePrefix: c } = e, l = e.language || "en", { m: d } = Te(
47791
+ async function Dr(e) {
47792
+ const { branding: t, state: n, errors: i, messages: r, data: o, customText: s, routePrefix: c } = e, l = e.language || "en", { m: d } = Ie(
47790
47793
  "sms-otp-challenge",
47791
47794
  "sms-otp-challenge",
47792
47795
  l,
47793
47796
  s
47794
- ), { m: u } = Te(
47797
+ ), { m: u } = Ie(
47795
47798
  "common",
47796
47799
  "common",
47797
47800
  l,
@@ -47863,7 +47866,7 @@ async function Br(e) {
47863
47866
  id: "back",
47864
47867
  text: "",
47865
47868
  linkText: u.backText(),
47866
- href: `${await br(e)}?state=${encodeURIComponent(n)}`
47869
+ href: `${await vr(e)}?state=${encodeURIComponent(n)}`
47867
47870
  }
47868
47871
  ]
47869
47872
  },
@@ -47875,9 +47878,9 @@ const WM = {
47875
47878
  name: "SMS OTP Challenge",
47876
47879
  description: "SMS OTP code verification screen",
47877
47880
  handler: {
47878
- get: Br,
47881
+ get: Dr,
47879
47882
  post: async (e, t) => {
47880
- const { ctx: n, client: i, state: r } = e, o = t.code?.trim(), s = e.language || "en", { m: c } = Te(
47883
+ const { ctx: n, client: i, state: r } = e, o = t.code?.trim(), s = e.language || "en", { m: c } = Ie(
47881
47884
  "sms-otp-challenge",
47882
47885
  "sms-otp-challenge",
47883
47886
  s,
@@ -47890,14 +47893,14 @@ const WM = {
47890
47893
  const u = c.sessionExpired();
47891
47894
  return {
47892
47895
  error: u,
47893
- screen: await Br({
47896
+ screen: await Dr({
47894
47897
  ...e,
47895
47898
  errors: { code: u }
47896
47899
  })
47897
47900
  };
47898
47901
  }
47899
- const d = l.state || Pe.PENDING;
47900
- if (d === Pe.AWAITING_MFA || d === Pe.AUTHENTICATED)
47902
+ const d = l.state || $e.PENDING;
47903
+ if (d === $e.AWAITING_MFA || d === $e.AUTHENTICATED)
47901
47904
  try {
47902
47905
  const u = l.session_id ? await n.env.data.sessions.get(
47903
47906
  i.tenant.id,
@@ -47927,7 +47930,7 @@ const WM = {
47927
47930
  const u = c.noCode();
47928
47931
  return {
47929
47932
  error: u,
47930
- screen: await Br({
47933
+ screen: await Dr({
47931
47934
  ...e,
47932
47935
  errors: { code: u }
47933
47936
  })
@@ -47947,7 +47950,7 @@ const WM = {
47947
47950
  const p = c.unexpectedError();
47948
47951
  return {
47949
47952
  error: p,
47950
- screen: await Br({
47953
+ screen: await Dr({
47951
47954
  ...e,
47952
47955
  errors: { code: p }
47953
47956
  })
@@ -47973,7 +47976,7 @@ const WM = {
47973
47976
  }
47974
47977
  return {
47975
47978
  error: f,
47976
- screen: await Br({
47979
+ screen: await Dr({
47977
47980
  ...e,
47978
47981
  errors: { code: f },
47979
47982
  data: {
@@ -47987,12 +47990,12 @@ const WM = {
47987
47990
  }
47988
47991
  };
47989
47992
  async function w6(e) {
47990
- const { branding: t, state: n, messages: i, data: r, customText: o, routePrefix: s } = e, c = e.language || "en", { m: l } = Te(
47993
+ const { branding: t, state: n, messages: i, data: r, customText: o, routePrefix: s } = e, c = e.language || "en", { m: l } = Ie(
47991
47994
  "magic-link-sent",
47992
47995
  "magic-link-sent",
47993
47996
  c,
47994
47997
  o
47995
- ), { m: d } = Te(
47998
+ ), { m: d } = Ie(
47996
47999
  "common",
47997
48000
  "common",
47998
48001
  c,
@@ -48047,12 +48050,12 @@ async function w6(e) {
48047
48050
  };
48048
48051
  }
48049
48052
  async function Ks(e) {
48050
- const { branding: t, state: n, errors: i, data: r, customText: o, routePrefix: s } = e, c = e.language || "en", { m: l } = Te(
48053
+ const { branding: t, state: n, errors: i, data: r, customText: o, routePrefix: s } = e, c = e.language || "en", { m: l } = Ie(
48051
48054
  "login-password",
48052
48055
  "login-password",
48053
48056
  c,
48054
48057
  o
48055
- ), { m: d } = Te(
48058
+ ), { m: d } = Ie(
48056
48059
  "common",
48057
48060
  "common",
48058
48061
  c,
@@ -48097,7 +48100,7 @@ async function Ks(e) {
48097
48100
  },
48098
48101
  order: 2
48099
48102
  }
48100
- ], m = await br(e);
48103
+ ], m = await vr(e);
48101
48104
  return {
48102
48105
  screen: {
48103
48106
  name: "enter-password",
@@ -48159,7 +48162,7 @@ const JM = {
48159
48162
  ), l = c.headers.get("location"), d = c.headers.getSetCookie?.() || [];
48160
48163
  return l ? { redirect: l, cookies: d } : { response: c };
48161
48164
  } catch (c) {
48162
- const l = c, d = e.language || "en", { m: u } = Te(
48165
+ const l = c, d = e.language || "en", { m: u } = Ie(
48163
48166
  "login-password",
48164
48167
  "login-password",
48165
48168
  d,
@@ -48231,7 +48234,7 @@ async function Ki(e) {
48231
48234
  messages: s,
48232
48235
  customText: c,
48233
48236
  routePrefix: l
48234
- } = e, d = e.language || "en", { m: u } = Te("login-id", "login-id", d, c), p = QM(e, u), f = p.length, h = e.connections.some(
48237
+ } = e, d = e.language || "en", { m: u } = Ie("login-id", "login-id", d, c), p = QM(e, u), f = p.length, h = e.connections.some(
48235
48238
  (C) => C.strategy === G.EMAIL || C.strategy === G.SMS || C.strategy === G.USERNAME_PASSWORD
48236
48239
  ), m = e.connections.find(
48237
48240
  (C) => C.strategy === G.USERNAME_PASSWORD
@@ -48318,7 +48321,7 @@ const YM = {
48318
48321
  post: async (e, t) => {
48319
48322
  const { ctx: n, client: i, state: r } = e, o = t.username?.toLowerCase()?.trim(), s = i.connections.find(
48320
48323
  (T) => T.strategy === G.USERNAME_PASSWORD
48321
- ), c = Ba(s), l = c.usernameIdentifierActive, d = e.language || "en", { m: u } = Te(
48324
+ ), c = Ba(s), l = c.usernameIdentifierActive, d = e.language || "en", { m: u } = Ie(
48322
48325
  "login-id",
48323
48326
  "login-id",
48324
48327
  d,
@@ -48334,7 +48337,7 @@ const YM = {
48334
48337
  })
48335
48338
  };
48336
48339
  }
48337
- const p = n.get("countryCode"), { normalized: f, connectionType: h, provider: m } = wr(o, p);
48340
+ const p = n.get("countryCode"), { normalized: f, connectionType: h, provider: m } = br(o, p);
48338
48341
  if (!f) {
48339
48342
  const T = u["invalid-email-format"]();
48340
48343
  return {
@@ -48473,7 +48476,7 @@ const YM = {
48473
48476
  to: f,
48474
48477
  code: k,
48475
48478
  language: C
48476
- }), h === "sms" ? { screen: await Br(v) } : x?.options?.authentication_method === "magic_link" ? { screen: await w6(v) } : { screen: await Rr(v) };
48479
+ }), h === "sms" ? { screen: await Dr(v) } : x?.options?.authentication_method === "magic_link" ? { screen: await w6(v) } : { screen: await Br(v) };
48477
48480
  }
48478
48481
  }
48479
48482
  };
@@ -48546,7 +48549,7 @@ async function Sn(e) {
48546
48549
  messages: s,
48547
48550
  customText: c,
48548
48551
  routePrefix: l
48549
- } = e, d = e.language || "en", { m: u } = Te("login", "login", d, c), p = ZM(e, u), f = p.length, h = e.connections.find(
48552
+ } = e, d = e.language || "en", { m: u } = Ie("login", "login", d, c), p = ZM(e, u), f = p.length, h = e.connections.find(
48550
48553
  (x) => x.strategy === G.USERNAME_PASSWORD
48551
48554
  ), m = !!h, g = Ba(h), w = g.usernameIdentifierActive, y = g.emailIdentifierActive, _ = w && y || w ? u.usernamePlaceholder() : u.emailPlaceholder(), v = [
48552
48555
  // Social login buttons (if any)
@@ -48650,7 +48653,7 @@ const XM = {
48650
48653
  handler: {
48651
48654
  get: Sn,
48652
48655
  post: async (e, t) => {
48653
- const { ctx: n, client: i, state: r } = e, o = t.username?.toLowerCase()?.trim(), s = t.password?.trim(), c = e.language || "en", { m: l } = Te(
48656
+ const { ctx: n, client: i, state: r } = e, o = t.username?.toLowerCase()?.trim(), s = t.password?.trim(), c = e.language || "en", { m: l } = Ie(
48654
48657
  "login",
48655
48658
  "login",
48656
48659
  c,
@@ -48679,7 +48682,7 @@ const XM = {
48679
48682
  })
48680
48683
  };
48681
48684
  }
48682
- const f = n.get("countryCode"), { normalized: h, connectionType: m, provider: g } = wr(o, f);
48685
+ const f = n.get("countryCode"), { normalized: h, connectionType: m, provider: g } = br(o, f);
48683
48686
  if (!h) {
48684
48687
  const _ = l.invalidIdentifier();
48685
48688
  return {
@@ -48812,7 +48815,7 @@ const XM = {
48812
48815
  }
48813
48816
  };
48814
48817
  async function Zn(e) {
48815
- const { branding: t, state: n, prefill: i, errors: r, customText: o, routePrefix: s } = e, c = e.language || "en", { m: l } = Te("signup", "signup", c, o), d = e.connections.some(
48818
+ const { branding: t, state: n, prefill: i, errors: r, customText: o, routePrefix: s } = e, c = e.language || "en", { m: l } = Ie("signup", "signup", c, o), d = e.connections.some(
48816
48819
  (h) => h.strategy === G.USERNAME_PASSWORD
48817
48820
  ), u = [];
48818
48821
  if (d) {
@@ -48881,7 +48884,7 @@ async function Zn(e) {
48881
48884
  const h = u.find((m) => m.id === "email");
48882
48885
  h && "config" in h && (h.config.default_value = i.email);
48883
48886
  }
48884
- const p = await br(e);
48887
+ const p = await vr(e);
48885
48888
  return {
48886
48889
  screen: {
48887
48890
  name: "signup",
@@ -48910,12 +48913,12 @@ const eL = {
48910
48913
  handler: {
48911
48914
  get: Zn,
48912
48915
  post: async (e, t) => {
48913
- const { ctx: n, client: i, state: r } = e, o = t.email?.toLowerCase()?.trim(), s = t.password?.trim(), c = t.re_password?.trim(), l = e.language || "en", { m: d } = Te(
48916
+ const { ctx: n, client: i, state: r } = e, o = t.email?.toLowerCase()?.trim(), s = t.password?.trim(), c = t.re_password?.trim(), l = e.language || "en", { m: d } = Ie(
48914
48917
  "signup",
48915
48918
  "signup",
48916
48919
  l,
48917
48920
  e.customText
48918
- ), { m: u } = Te(
48921
+ ), { m: u } = Ie(
48919
48922
  "signup-password",
48920
48923
  "signup-password",
48921
48924
  l,
@@ -48982,7 +48985,7 @@ const eL = {
48982
48985
  })
48983
48986
  };
48984
48987
  }
48985
- if (await mr({
48988
+ if (await gr({
48986
48989
  userAdapter: n.env.data.users,
48987
48990
  tenant_id: i.tenant.id,
48988
48991
  username: o,
@@ -49073,12 +49076,12 @@ async function tL(e) {
49073
49076
  messages: o,
49074
49077
  customText: s,
49075
49078
  routePrefix: c = "/u2"
49076
- } = e, l = e.language || "en", { m: d } = Te(
49079
+ } = e, l = e.language || "en", { m: d } = Ie(
49077
49080
  "reset-password",
49078
49081
  "reset-password",
49079
49082
  l,
49080
49083
  s
49081
- ), { m: u } = Te("login", "login", l, s), p = [
49084
+ ), { m: u } = Ie("login", "login", l, s), p = [
49082
49085
  // Info text
49083
49086
  {
49084
49087
  id: "info",
@@ -49134,7 +49137,7 @@ async function tL(e) {
49134
49137
  id: "back",
49135
49138
  text: d.backToLoginText(),
49136
49139
  linkText: u.buttonText(),
49137
- href: `${await br(e)}?state=${encodeURIComponent(n)}`
49140
+ href: `${await vr(e)}?state=${encodeURIComponent(n)}`
49138
49141
  }
49139
49142
  ]
49140
49143
  },
@@ -49154,7 +49157,7 @@ const nL = {
49154
49157
  }
49155
49158
  };
49156
49159
  async function bi(e) {
49157
- const { branding: t, state: n, errors: i, messages: r, customText: o, routePrefix: s } = e, c = e.language || "en", { m: l } = Te(
49160
+ const { branding: t, state: n, errors: i, messages: r, customText: o, routePrefix: s } = e, c = e.language || "en", { m: l } = Ie(
49158
49161
  "reset-password",
49159
49162
  "reset-password",
49160
49163
  c,
@@ -49224,7 +49227,7 @@ const iL = {
49224
49227
  handler: {
49225
49228
  get: bi,
49226
49229
  post: async (e, t) => {
49227
- const { ctx: n, client: i, state: r } = e, { env: o } = n, s = t.password?.trim(), c = t.confirm_password?.trim(), l = e.language || "en", { m: d } = Te(
49230
+ const { ctx: n, client: i, state: r } = e, { env: o } = n, s = t.password?.trim(), c = t.confirm_password?.trim(), l = e.language || "en", { m: d } = Ie(
49228
49231
  "reset-password",
49229
49232
  "reset-password",
49230
49233
  l,
@@ -49260,7 +49263,7 @@ const iL = {
49260
49263
  errors: { password: "Session expired. Please start over." }
49261
49264
  })
49262
49265
  };
49263
- const p = await mr({
49266
+ const p = await gr({
49264
49267
  userAdapter: o.data.users,
49265
49268
  tenant_id: i.tenant.id,
49266
49269
  username: u.authParams.username,
@@ -49580,15 +49583,15 @@ async function v6(e) {
49580
49583
  state: r,
49581
49584
  routePrefix: o = "/u2",
49582
49585
  customText: s
49583
- } = e, c = e.language || "en", { m: l } = Te(
49586
+ } = e, c = e.language || "en", { m: l } = Ie(
49584
49587
  "check-account",
49585
49588
  "check-account",
49586
49589
  c,
49587
49590
  s
49588
- ), d = await br(e);
49591
+ ), d = await vr(e);
49589
49592
  if (!await t.env.data.loginSessions.get(n.id, r))
49590
49593
  throw new j(400, { message: "Login session not found" });
49591
- const p = lr(n.id, t.req.header("cookie")), f = p ? await t.env.data.sessions.get(n.id, p) : null;
49594
+ const p = dr(n.id, t.req.header("cookie")), f = p ? await t.env.data.sessions.get(n.id, p) : null;
49592
49595
  if (!f || f.revoked_at)
49593
49596
  throw new en(
49594
49597
  `${d}?state=${encodeURIComponent(r)}`
@@ -49645,7 +49648,7 @@ async function aL(e, t) {
49645
49648
  const { ctx: n, tenant: i, client: r, state: o } = e, s = await n.env.data.loginSessions.get(i.id, o);
49646
49649
  if (!s)
49647
49650
  throw new j(400, { message: "Login session not found" });
49648
- const c = lr(i.id, n.req.header("cookie")), l = c ? await n.env.data.sessions.get(i.id, c) : null, d = await br(e);
49651
+ const c = dr(i.id, n.req.header("cookie")), l = c ? await n.env.data.sessions.get(i.id, c) : null, d = await vr(e);
49649
49652
  if (!l || l.revoked_at)
49650
49653
  return {
49651
49654
  redirect: `${d}?state=${encodeURIComponent(o)}`
@@ -49670,7 +49673,7 @@ async function aL(e, t) {
49670
49673
  return {
49671
49674
  redirect: `${d}?state=${encodeURIComponent(o)}`
49672
49675
  };
49673
- const h = e.language || "en", { m } = Te(
49676
+ const h = e.language || "en", { m } = Ie(
49674
49677
  "check-account",
49675
49678
  "check-account",
49676
49679
  h,
@@ -49700,12 +49703,12 @@ async function Vi(e) {
49700
49703
  messages: o,
49701
49704
  customText: s,
49702
49705
  routePrefix: c
49703
- } = e, l = e.language || "en", { m: d } = Te(
49706
+ } = e, l = e.language || "en", { m: d } = Ie(
49704
49707
  "login-passwordless",
49705
49708
  "login-passwordless",
49706
49709
  l,
49707
49710
  s
49708
- ), { m: u } = Te(
49711
+ ), { m: u } = Ie(
49709
49712
  "common",
49710
49713
  "common",
49711
49714
  l,
@@ -49810,7 +49813,7 @@ const cL = {
49810
49813
  handler: {
49811
49814
  get: Vi,
49812
49815
  post: async (e, t) => {
49813
- const { ctx: n, client: i, state: r } = e, o = t.username?.toLowerCase()?.trim(), s = e.language || "en", { m: c } = Te(
49816
+ const { ctx: n, client: i, state: r } = e, o = t.username?.toLowerCase()?.trim(), s = e.language || "en", { m: c } = Ie(
49814
49817
  "login-passwordless",
49815
49818
  "login-passwordless",
49816
49819
  s,
@@ -49826,7 +49829,7 @@ const cL = {
49826
49829
  })
49827
49830
  };
49828
49831
  }
49829
- const l = n.get("countryCode"), { normalized: d, connectionType: u } = wr(
49832
+ const l = n.get("countryCode"), { normalized: d, connectionType: u } = br(
49830
49833
  o,
49831
49834
  l
49832
49835
  );
@@ -49962,7 +49965,7 @@ const cL = {
49962
49965
  data: { email: d },
49963
49966
  errors: void 0
49964
49967
  };
49965
- return u === "sms" ? { screen: await Br(y) } : p?.options?.authentication_method === "magic_link" ? { screen: await w6(y) } : { screen: await Rr(y) };
49968
+ return u === "sms" ? { screen: await Dr(y) } : p?.options?.authentication_method === "magic_link" ? { screen: await w6(y) } : { screen: await Br(y) };
49966
49969
  }
49967
49970
  }
49968
49971
  };
@@ -50102,7 +50105,7 @@ const S6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
50102
50105
  verifyTotpCode: f_
50103
50106
  }, Symbol.toStringTag, { value: "Module" }));
50104
50107
  async function cs(e) {
50105
- const { branding: t, state: n, errors: i, customText: r, routePrefix: o } = e, s = e.language || "en", { m: c } = Te(
50108
+ const { branding: t, state: n, errors: i, customText: r, routePrefix: o } = e, s = e.language || "en", { m: c } = Ie(
50106
50109
  "mfa-phone",
50107
50110
  "mfa-phone-enrollment",
50108
50111
  s,
@@ -50157,7 +50160,7 @@ const wL = {
50157
50160
  handler: {
50158
50161
  get: cs,
50159
50162
  post: async (e, t) => {
50160
- const { ctx: n, client: i, state: r } = e, o = t.phone_number?.trim(), s = e.language || "en", { m: c } = Te(
50163
+ const { ctx: n, client: i, state: r } = e, o = t.phone_number?.trim(), s = e.language || "en", { m: c } = Ie(
50161
50164
  "mfa-phone",
50162
50165
  "mfa-phone-enrollment",
50163
50166
  s,
@@ -50253,7 +50256,7 @@ const wL = {
50253
50256
  }
50254
50257
  };
50255
50258
  async function vi(e) {
50256
- const { branding: t, state: n, errors: i, messages: r, data: o, customText: s, routePrefix: c } = e, l = e.language || "en", { m: d } = Te(
50259
+ const { branding: t, state: n, errors: i, messages: r, data: o, customText: s, routePrefix: c } = e, l = e.language || "en", { m: d } = Ie(
50257
50260
  "mfa-phone",
50258
50261
  "mfa-phone-challenge",
50259
50262
  l,
@@ -50343,7 +50346,7 @@ const bL = {
50343
50346
  handler: {
50344
50347
  get: vi,
50345
50348
  post: async (e, t) => {
50346
- const { ctx: n, client: i, state: r } = e, o = t.code?.trim(), s = e.language || "en", { m: c } = Te(
50349
+ const { ctx: n, client: i, state: r } = e, o = t.code?.trim(), s = e.language || "en", { m: c } = Ie(
50347
50350
  "mfa-phone",
50348
50351
  "mfa-phone-challenge",
50349
50352
  s,
@@ -50354,7 +50357,7 @@ const bL = {
50354
50357
  i.tenant.id,
50355
50358
  r
50356
50359
  );
50357
- if (!u || u.state !== Pe.AWAITING_MFA) {
50360
+ if (!u || u.state !== $e.AWAITING_MFA) {
50358
50361
  const h = c["transaction-not-found"]();
50359
50362
  return {
50360
50363
  error: h,
@@ -50404,7 +50407,7 @@ const bL = {
50404
50407
  i.tenant.id,
50405
50408
  r
50406
50409
  );
50407
- if (!l || !l.user_id || l.state !== Pe.AWAITING_MFA) {
50410
+ if (!l || !l.user_id || l.state !== $e.AWAITING_MFA) {
50408
50411
  const u = c["transaction-not-found"]();
50409
50412
  return {
50410
50413
  error: u,
@@ -50502,7 +50505,7 @@ const bL = {
50502
50505
  branding: e.branding
50503
50506
  }
50504
50507
  };
50505
- const p = l.state || Pe.AWAITING_MFA, { state: f } = ui(
50508
+ const p = l.state || $e.AWAITING_MFA, { state: f } = ui(
50506
50509
  p,
50507
50510
  { type: Hn.COMPLETE_MFA }
50508
50511
  );
@@ -52064,8 +52067,8 @@ function FL() {
52064
52067
  }
52065
52068
  var zL = FL();
52066
52069
  const qL = /* @__PURE__ */ D0(zL);
52067
- async function $r(e, t) {
52068
- const { branding: n, state: i, errors: r, customText: o, routePrefix: s } = e, c = e.language || "en", { m: l } = Te(
52070
+ async function Tr(e, t) {
52071
+ const { branding: n, state: i, errors: r, customText: o, routePrefix: s } = e, c = e.language || "en", { m: l } = Ie(
52069
52072
  "mfa-otp",
52070
52073
  "mfa-totp-enrollment",
52071
52074
  c,
@@ -52153,7 +52156,7 @@ const HL = {
52153
52156
  i
52154
52157
  );
52155
52158
  if (!r || !r.user_id)
52156
- return $r(e);
52159
+ return Tr(e);
52157
52160
  const o = r.state_data ? JSON.parse(r.state_data) : {};
52158
52161
  let s = o.totpSecret;
52159
52162
  if (!s) {
@@ -52183,13 +52186,13 @@ const HL = {
52183
52186
  n.tenant.id,
52184
52187
  r.user_id
52185
52188
  ))?.email || r.user_id, d = n.tenant.friendly_name || n.tenant.id, u = vd(d, l, s), p = await im(u);
52186
- return $r(e, {
52189
+ return Tr(e, {
52187
52190
  qrCodeSvg: p,
52188
52191
  secretBase32: s
52189
52192
  });
52190
52193
  },
52191
52194
  post: async (e, t) => {
52192
- const { ctx: n, client: i, state: r } = e, o = t.code?.trim(), s = e.language || "en", { m: c } = Te(
52195
+ const { ctx: n, client: i, state: r } = e, o = t.code?.trim(), s = e.language || "en", { m: c } = Ie(
52193
52196
  "mfa-otp",
52194
52197
  "mfa-totp-enrollment",
52195
52198
  s,
@@ -52207,7 +52210,7 @@ const HL = {
52207
52210
  }
52208
52211
  return {
52209
52212
  error: h,
52210
- screen: await $r(
52213
+ screen: await Tr(
52211
52214
  { ...e, errors: { code: h } },
52212
52215
  w ? {
52213
52216
  qrCodeSvg: k,
@@ -52224,7 +52227,7 @@ const HL = {
52224
52227
  const h = c["transaction-not-found"]();
52225
52228
  return {
52226
52229
  error: h,
52227
- screen: await $r({
52230
+ screen: await Tr({
52228
52231
  ...e,
52229
52232
  errors: { code: h }
52230
52233
  })
@@ -52235,7 +52238,7 @@ const HL = {
52235
52238
  const h = c["transaction-not-found"]();
52236
52239
  return {
52237
52240
  error: h,
52238
- screen: await $r({
52241
+ screen: await Tr({
52239
52242
  ...e,
52240
52243
  errors: { code: h }
52241
52244
  })
@@ -52253,7 +52256,7 @@ const HL = {
52253
52256
  const m = c.unexpectedError();
52254
52257
  return {
52255
52258
  error: m,
52256
- screen: await $r({
52259
+ screen: await Tr({
52257
52260
  ...e,
52258
52261
  errors: { code: m }
52259
52262
  })
@@ -52271,7 +52274,7 @@ const HL = {
52271
52274
  ))?.email || l.user_id, g = i.tenant.friendly_name || i.tenant.id, w = c["invalid-code"](), y = vd(g, m, u), _ = await im(y);
52272
52275
  return {
52273
52276
  error: w,
52274
- screen: await $r(
52277
+ screen: await Tr(
52275
52278
  { ...e, errors: { code: w } },
52276
52279
  {
52277
52280
  qrCodeSvg: _,
@@ -52306,8 +52309,8 @@ const HL = {
52306
52309
  }
52307
52310
  }
52308
52311
  };
52309
- async function Tr(e) {
52310
- const { branding: t, state: n, errors: i, customText: r, routePrefix: o } = e, s = e.language || "en", { m: c } = Te(
52312
+ async function Ir(e) {
52313
+ const { branding: t, state: n, errors: i, customText: r, routePrefix: o } = e, s = e.language || "en", { m: c } = Ie(
52311
52314
  "mfa-otp",
52312
52315
  "mfa-totp-challenge",
52313
52316
  s,
@@ -52376,9 +52379,9 @@ const VL = {
52376
52379
  name: "MFA TOTP Challenge",
52377
52380
  description: "Authenticator app code verification screen for MFA",
52378
52381
  handler: {
52379
- get: Tr,
52382
+ get: Ir,
52380
52383
  post: async (e, t) => {
52381
- const { ctx: n, client: i, state: r } = e, o = t.code?.trim(), s = e.language || "en", { m: c } = Te(
52384
+ const { ctx: n, client: i, state: r } = e, o = t.code?.trim(), s = e.language || "en", { m: c } = Ie(
52382
52385
  "mfa-otp",
52383
52386
  "mfa-totp-challenge",
52384
52387
  s,
@@ -52388,7 +52391,7 @@ const VL = {
52388
52391
  const p = c["invalid-code"]();
52389
52392
  return {
52390
52393
  error: p,
52391
- screen: await Tr({
52394
+ screen: await Ir({
52392
52395
  ...e,
52393
52396
  errors: { code: p }
52394
52397
  })
@@ -52398,11 +52401,11 @@ const VL = {
52398
52401
  i.tenant.id,
52399
52402
  r
52400
52403
  );
52401
- if (!l || !l.user_id || l.state !== Pe.AWAITING_MFA) {
52404
+ if (!l || !l.user_id || l.state !== $e.AWAITING_MFA) {
52402
52405
  const p = c["transaction-not-found"]();
52403
52406
  return {
52404
52407
  error: p,
52405
- screen: await Tr({
52408
+ screen: await Ir({
52406
52409
  ...e,
52407
52410
  errors: { code: p }
52408
52411
  })
@@ -52422,7 +52425,7 @@ const VL = {
52422
52425
  const p = c["transaction-not-found"]();
52423
52426
  return {
52424
52427
  error: p,
52425
- screen: await Tr({
52428
+ screen: await Ir({
52426
52429
  ...e,
52427
52430
  errors: { code: p }
52428
52431
  })
@@ -52440,7 +52443,7 @@ const VL = {
52440
52443
  const f = c.unexpectedError();
52441
52444
  return {
52442
52445
  error: f,
52443
- screen: await Tr({
52446
+ screen: await Ir({
52444
52447
  ...e,
52445
52448
  errors: { code: f }
52446
52449
  })
@@ -52455,7 +52458,7 @@ const VL = {
52455
52458
  const p = c["invalid-code"]();
52456
52459
  return {
52457
52460
  error: p,
52458
- screen: await Tr({
52461
+ screen: await Ir({
52459
52462
  ...e,
52460
52463
  errors: { code: p }
52461
52464
  })
@@ -52478,7 +52481,7 @@ const VL = {
52478
52481
  userId: l.user_id
52479
52482
  }));
52480
52483
  }
52481
- const f = l.state || Pe.AWAITING_MFA, { state: h } = ui(
52484
+ const f = l.state || $e.AWAITING_MFA, { state: h } = ui(
52482
52485
  f,
52483
52486
  { type: Hn.COMPLETE_MFA }
52484
52487
  );
@@ -52511,7 +52514,7 @@ const VL = {
52511
52514
  const p = c.unexpectedError();
52512
52515
  return {
52513
52516
  error: p,
52514
- screen: await Tr({
52517
+ screen: await Ir({
52515
52518
  ...e,
52516
52519
  errors: { code: p }
52517
52520
  })
@@ -52521,7 +52524,7 @@ const VL = {
52521
52524
  }
52522
52525
  };
52523
52526
  async function GL(e, t) {
52524
- const { branding: n, state: i, customText: r, routePrefix: o } = e, s = e.language || "en", { m: c } = Te(
52527
+ const { branding: n, state: i, customText: r, routePrefix: o } = e, s = e.language || "en", { m: c } = Ie(
52525
52528
  "mfa-login-options",
52526
52529
  "mfa-login-options",
52527
52530
  s,
@@ -52567,7 +52570,7 @@ const WL = {
52567
52570
  );
52568
52571
  if (!r || !r.user_id)
52569
52572
  throw new j(400, { message: "Login session not found" });
52570
- const o = e.language || "en", { m: s } = Te(
52573
+ const o = e.language || "en", { m: s } = Ie(
52571
52574
  "mfa-login-options",
52572
52575
  "mfa-login-options",
52573
52576
  o,
@@ -52670,7 +52673,7 @@ const WL = {
52670
52673
  }
52671
52674
  };
52672
52675
  async function Ui(e) {
52673
- const { ctx: t, tenant: n, state: i } = e, r = await br(e), o = lr(n.id, t.req.header("cookie")), s = o ? await t.env.data.sessions.get(n.id, o) : null;
52676
+ const { ctx: t, tenant: n, state: i } = e, r = await vr(e), o = dr(n.id, t.req.header("cookie")), s = o ? await t.env.data.sessions.get(n.id, o) : null;
52674
52677
  if (!s || s.revoked_at)
52675
52678
  throw new en(
52676
52679
  `${r}?state=${encodeURIComponent(i)}`
@@ -53309,7 +53312,7 @@ const aU = {
53309
53312
  }
53310
53313
  };
53311
53314
  async function nd(e) {
53312
- const { branding: t, state: n } = e, i = e.language || "en", { m: r } = Te(
53315
+ const { branding: t, state: n } = e, i = e.language || "en", { m: r } = Ie(
53313
53316
  "passkeys",
53314
53317
  "passkey-enrollment-nudge",
53315
53318
  i,
@@ -53653,7 +53656,7 @@ function _U(e, t, n) {
53653
53656
  for (let c = 0; c < i; c++) {
53654
53657
  if (e.byteLength - n - o <= 0)
53655
53658
  throw new Error("array is not supported or well formed");
53656
- const [d, u] = Vr(e, n + o);
53659
+ const [d, u] = Gr(e, n + o);
53657
53660
  s.push(d), o += u;
53658
53661
  }
53659
53662
  return [s, o];
@@ -53669,14 +53672,14 @@ function wU(e, t, n) {
53669
53672
  let l = e.byteLength - n - o;
53670
53673
  if (l <= 0)
53671
53674
  throw new Error(id);
53672
- const [d, u] = Vr(e, n + o);
53675
+ const [d, u] = Gr(e, n + o);
53673
53676
  if (o += u, l -= u, l <= 0)
53674
53677
  throw new Error(id);
53675
53678
  if (typeof d != "string" && typeof d != "number")
53676
53679
  throw new Error(id);
53677
53680
  if (s.has(d))
53678
53681
  throw new Error(id);
53679
- const [p, f] = Vr(e, n + o);
53682
+ const [p, f] = Gr(e, n + o);
53680
53683
  o += f, s.set(d, p);
53681
53684
  }
53682
53685
  return [s, o];
@@ -53704,10 +53707,10 @@ function AU(e, t) {
53704
53707
  return [e.getFloat64(t + 1, !1), 9];
53705
53708
  }
53706
53709
  function kU(e, t, n) {
53707
- const [i, r] = Il(e, t, n), [o, s] = Vr(e, n + r);
53710
+ const [i, r] = Il(e, t, n), [o, s] = Gr(e, n + r);
53708
53711
  return [new L6(i, o), r + s];
53709
53712
  }
53710
- function Vr(e, t) {
53713
+ function Gr(e, t) {
53711
53714
  if (t >= e.byteLength)
53712
53715
  throw new Error("CBOR stream ended before tag value");
53713
53716
  const n = e.getUint8(t), i = n >> 5, r = n & 31;
@@ -53816,7 +53819,7 @@ function Uc(e, t) {
53816
53819
  function jU(e, t) {
53817
53820
  if (e.byteLength === 0 || e.byteLength <= t || t < 0)
53818
53821
  throw new Error("No data");
53819
- return e instanceof Uint8Array ? Vr(new DataView(e.buffer), t) : e instanceof ArrayBuffer ? Vr(new DataView(e), t) : Vr(e, t);
53822
+ return e instanceof Uint8Array ? Gr(new DataView(e.buffer), t) : e instanceof ArrayBuffer ? Gr(new DataView(e), t) : Gr(e, t);
53820
53823
  }
53821
53824
  function OU(e) {
53822
53825
  const t = [];
@@ -53838,21 +53841,21 @@ function pA(e) {
53838
53841
  return OU(e);
53839
53842
  }
53840
53843
  function RU(e) {
53841
- const t = e.get($e.kty);
53844
+ const t = e.get(Te.kty);
53842
53845
  return y_(t) && t === Un.OKP;
53843
53846
  }
53844
53847
  function ef(e) {
53845
- const t = e.get($e.kty);
53848
+ const t = e.get(Te.kty);
53846
53849
  return y_(t) && t === Un.EC2;
53847
53850
  }
53848
53851
  function g_(e) {
53849
- const t = e.get($e.kty);
53852
+ const t = e.get(Te.kty);
53850
53853
  return y_(t) && t === Un.RSA;
53851
53854
  }
53852
- var $e;
53855
+ var Te;
53853
53856
  (function(e) {
53854
53857
  e[e.kty = 1] = "kty", e[e.alg = 3] = "alg", e[e.crv = -1] = "crv", e[e.x = -2] = "x", e[e.y = -3] = "y", e[e.n = -1] = "n", e[e.e = -2] = "e";
53855
- })($e || ($e = {}));
53858
+ })(Te || (Te = {}));
53856
53859
  var Un;
53857
53860
  (function(e) {
53858
53861
  e[e.OKP = 1] = "OKP", e[e.EC2 = 2] = "EC2", e[e.RSA = 3] = "RSA";
@@ -53867,21 +53870,21 @@ var un;
53867
53870
  function BU(e) {
53868
53871
  return Object.values(un).indexOf(e) >= 0;
53869
53872
  }
53870
- var Ne;
53873
+ var Pe;
53871
53874
  (function(e) {
53872
53875
  e[e.ES256 = -7] = "ES256", e[e.EdDSA = -8] = "EdDSA", e[e.ES384 = -35] = "ES384", e[e.ES512 = -36] = "ES512", e[e.PS256 = -37] = "PS256", e[e.PS384 = -38] = "PS384", e[e.PS512 = -39] = "PS512", e[e.ES256K = -47] = "ES256K", e[e.RS256 = -257] = "RS256", e[e.RS384 = -258] = "RS384", e[e.RS512 = -259] = "RS512", e[e.RS1 = -65535] = "RS1";
53873
- })(Ne || (Ne = {}));
53876
+ })(Pe || (Pe = {}));
53874
53877
  function Nl(e) {
53875
- return Object.values(Ne).indexOf(e) >= 0;
53878
+ return Object.values(Pe).indexOf(e) >= 0;
53876
53879
  }
53877
53880
  function Fc(e) {
53878
- if ([Ne.RS1].indexOf(e) >= 0)
53881
+ if ([Pe.RS1].indexOf(e) >= 0)
53879
53882
  return "SHA-1";
53880
- if ([Ne.ES256, Ne.PS256, Ne.RS256].indexOf(e) >= 0)
53883
+ if ([Pe.ES256, Pe.PS256, Pe.RS256].indexOf(e) >= 0)
53881
53884
  return "SHA-256";
53882
- if ([Ne.ES384, Ne.PS384, Ne.RS384].indexOf(e) >= 0)
53885
+ if ([Pe.ES384, Pe.PS384, Pe.RS384].indexOf(e) >= 0)
53883
53886
  return "SHA-384";
53884
- if ([Ne.ES512, Ne.PS512, Ne.RS512, Ne.EdDSA].indexOf(e) >= 0)
53887
+ if ([Pe.ES512, Pe.PS512, Pe.RS512, Pe.EdDSA].indexOf(e) >= 0)
53885
53888
  return "SHA-512";
53886
53889
  throw new Error(`Could not map COSE alg value of ${e} to a WebCrypto alg`);
53887
53890
  }
@@ -53920,7 +53923,7 @@ async function __(e) {
53920
53923
  ]);
53921
53924
  }
53922
53925
  async function q6(e) {
53923
- const { cosePublicKey: t, signature: n, data: i, shaHashOverride: r } = e, o = await bo(), s = t.get($e.alg), c = t.get($e.crv), l = t.get($e.x), d = t.get($e.y);
53926
+ const { cosePublicKey: t, signature: n, data: i, shaHashOverride: r } = e, o = await bo(), s = t.get(Te.alg), c = t.get(Te.crv), l = t.get(Te.x), d = t.get(Te.y);
53924
53927
  if (!s)
53925
53928
  throw new Error("Public key was missing alg (EC2)");
53926
53929
  if (!c)
@@ -53966,18 +53969,18 @@ async function q6(e) {
53966
53969
  return o.subtle.verify(g, h, n, i);
53967
53970
  }
53968
53971
  function fA(e) {
53969
- if ([Ne.EdDSA].indexOf(e) >= 0)
53972
+ if ([Pe.EdDSA].indexOf(e) >= 0)
53970
53973
  return "Ed25519";
53971
- if ([Ne.ES256, Ne.ES384, Ne.ES512, Ne.ES256K].indexOf(e) >= 0)
53974
+ if ([Pe.ES256, Pe.ES384, Pe.ES512, Pe.ES256K].indexOf(e) >= 0)
53972
53975
  return "ECDSA";
53973
- if ([Ne.RS256, Ne.RS384, Ne.RS512, Ne.RS1].indexOf(e) >= 0)
53976
+ if ([Pe.RS256, Pe.RS384, Pe.RS512, Pe.RS1].indexOf(e) >= 0)
53974
53977
  return "RSASSA-PKCS1-v1_5";
53975
- if ([Ne.PS256, Ne.PS384, Ne.PS512].indexOf(e) >= 0)
53978
+ if ([Pe.PS256, Pe.PS384, Pe.PS512].indexOf(e) >= 0)
53976
53979
  return "RSA-PSS";
53977
53980
  throw new Error(`Could not map COSE alg value of ${e} to a WebCrypto key alg name`);
53978
53981
  }
53979
53982
  async function H6(e) {
53980
- const { cosePublicKey: t, signature: n, data: i, shaHashOverride: r } = e, o = await bo(), s = t.get($e.alg), c = t.get($e.n), l = t.get($e.e);
53983
+ const { cosePublicKey: t, signature: n, data: i, shaHashOverride: r } = e, o = await bo(), s = t.get(Te.alg), c = t.get(Te.n), l = t.get(Te.e);
53981
53984
  if (!s)
53982
53985
  throw new Error("Public key was missing alg (RSA)");
53983
53986
  if (!Nl(s))
@@ -54048,7 +54051,7 @@ ${n}-----END CERTIFICATE-----
54048
54051
  `, n;
54049
54052
  }
54050
54053
  function w_(e) {
54051
- const t = Ta(e), n = Uint8Array.from([4]), i = t.get($e.x), r = t.get($e.y);
54054
+ const t = Ta(e), n = Uint8Array.from([4]), i = t.get(Te.x), r = t.get(Te.y);
54052
54055
  if (!i)
54053
54056
  throw new Error("COSE public key was missing x");
54054
54057
  return pn(r ? [n, i, r] : [n, i]);
@@ -54249,10 +54252,10 @@ const YU = {
54249
54252
  function Ia(e, t = -7) {
54250
54253
  return typeof e == "string" && (e = nf(e)), LU(e, t);
54251
54254
  }
54252
- async function vr(e, t = []) {
54255
+ async function Ar(e, t = []) {
54253
54256
  if (t.length === 0)
54254
54257
  return !0;
54255
- const n = await bo(), i = e.map((c) => new ro(c));
54258
+ const n = await bo(), i = e.map((c) => new oo(c));
54256
54259
  for (let c = 0; c < i.length; c++) {
54257
54260
  const l = i[c], d = e[c];
54258
54261
  try {
@@ -54270,7 +54273,7 @@ ${d}`);
54270
54273
  }
54271
54274
  const r = t.map((c) => {
54272
54275
  try {
54273
- return new ro(c);
54276
+ return new oo(c);
54274
54277
  } catch (l) {
54275
54278
  const d = l;
54276
54279
  throw new Error(`Could not parse trust anchor certificate:
@@ -54338,19 +54341,19 @@ class rd extends Error {
54338
54341
  function wA(e) {
54339
54342
  let t;
54340
54343
  if (e === "1.2.840.10045.4.3.2")
54341
- t = Ne.ES256;
54344
+ t = Pe.ES256;
54342
54345
  else if (e === "1.2.840.10045.4.3.3")
54343
- t = Ne.ES384;
54346
+ t = Pe.ES384;
54344
54347
  else if (e === "1.2.840.10045.4.3.4")
54345
- t = Ne.ES512;
54348
+ t = Pe.ES512;
54346
54349
  else if (e === "1.2.840.113549.1.1.11")
54347
- t = Ne.RS256;
54350
+ t = Pe.RS256;
54348
54351
  else if (e === "1.2.840.113549.1.1.12")
54349
- t = Ne.RS384;
54352
+ t = Pe.RS384;
54350
54353
  else if (e === "1.2.840.113549.1.1.13")
54351
- t = Ne.RS512;
54354
+ t = Pe.RS512;
54352
54355
  else if (e === "1.2.840.113549.1.1.5")
54353
- t = Ne.RS1;
54356
+ t = Pe.RS1;
54354
54357
  else
54355
54358
  throw new Error(`Unable to map X.509 signature algorithm ${e} to a COSE algorithm`);
54356
54359
  return t;
@@ -54379,10 +54382,10 @@ function W6(e) {
54379
54382
  } else
54380
54383
  throw new Error('TODO: Figure out how to handle public keys in "compressed form"');
54381
54384
  const m = /* @__PURE__ */ new Map();
54382
- m.set($e.kty, Un.EC2), m.set($e.alg, wA(s)), m.set($e.crv, d), m.set($e.x, f), m.set($e.y, h), t = m;
54385
+ m.set(Te.kty, Un.EC2), m.set(Te.alg, wA(s)), m.set(Te.crv, d), m.set(Te.x, f), m.set(Te.y, h), t = m;
54383
54386
  } else if (c === ar) {
54384
54387
  const l = Gt.parse(r.subjectPublicKey, Sp), d = /* @__PURE__ */ new Map();
54385
- d.set($e.kty, Un.RSA), d.set($e.alg, wA(s)), d.set($e.n, new Uint8Array(l.modulus)), d.set($e.e, new Uint8Array(l.publicExponent)), t = d;
54388
+ d.set(Te.kty, Un.RSA), d.set(Te.alg, wA(s)), d.set(Te.n, new Uint8Array(l.modulus)), d.set(Te.e, new Uint8Array(l.publicExponent)), t = d;
54386
54389
  } else
54387
54390
  throw new Error(`Certificate public key contained unexpected algorithm ID ${c}`);
54388
54391
  return t;
@@ -54419,7 +54422,7 @@ function eF(e, t) {
54419
54422
  data: s,
54420
54423
  signature: c,
54421
54424
  cosePublicKey: o,
54422
- shaHashOverride: Ne.ES256
54425
+ shaHashOverride: Pe.ES256
54423
54426
  });
54424
54427
  if (g_(o))
54425
54428
  return H6({
@@ -54427,7 +54430,7 @@ function eF(e, t) {
54427
54430
  signature: c,
54428
54431
  cosePublicKey: o
54429
54432
  });
54430
- const l = o.get($e.kty);
54433
+ const l = o.get(Te.kty);
54431
54434
  throw new Error(`JWT verification with public key of kty ${l} is not supported by this method`);
54432
54435
  }
54433
54436
  function tF(e) {
@@ -54662,7 +54665,7 @@ async function dF(e) {
54662
54665
  const f = Xa.getRootCertificates({
54663
54666
  identifier: "mds"
54664
54667
  });
54665
- await vr(r, f);
54668
+ await Ar(r, f);
54666
54669
  } catch (f) {
54667
54670
  const h = f;
54668
54671
  throw new Error("BLOB certificate path could not be validated", { cause: h });
@@ -54686,7 +54689,7 @@ async function dF(e) {
54686
54689
  };
54687
54690
  }
54688
54691
  async function uF(e) {
54689
- const { cosePublicKey: t, signature: n, data: i } = e, r = await bo(), o = t.get($e.alg), s = t.get($e.crv), c = t.get($e.x);
54692
+ const { cosePublicKey: t, signature: n, data: i } = e, r = await bo(), o = t.get(Te.alg), s = t.get(Te.crv), c = t.get(Te.x);
54690
54693
  if (!o)
54691
54694
  throw new Error("Public key was missing alg (OKP)");
54692
54695
  if (!Nl(o))
@@ -54751,7 +54754,7 @@ function bA(e, t) {
54751
54754
  function hF(e) {
54752
54755
  const { cosePublicKey: t, signature: n, data: i, shaHashOverride: r } = e;
54753
54756
  if (ef(t)) {
54754
- const s = t.get($e.crv);
54757
+ const s = t.get(Te.crv);
54755
54758
  if (!BU(s))
54756
54759
  throw new Error(`unknown COSE curve ${s}`);
54757
54760
  const c = pF(n, s);
@@ -54767,7 +54770,7 @@ function hF(e) {
54767
54770
  if (RU(t))
54768
54771
  return uF({ cosePublicKey: t, signature: n, data: i });
54769
54772
  }
54770
- const o = t.get($e.kty);
54773
+ const o = t.get(Te.kty);
54771
54774
  throw new Error(`Signature verification with public key of kty ${o} is not supported by this method`);
54772
54775
  }
54773
54776
  function Nn(e, t) {
@@ -54919,7 +54922,7 @@ async function CF(e) {
54919
54922
  if (h !== 0)
54920
54923
  throw new Error(`AAGUID "${h}" was not expected value`);
54921
54924
  try {
54922
- await vr(f.map(Fn), c);
54925
+ await Ar(f.map(Fn), c);
54923
54926
  } catch (m) {
54924
54927
  const g = m;
54925
54928
  throw new Error(`${g.message} (FIDOU2F)`);
@@ -54928,7 +54931,7 @@ async function CF(e) {
54928
54931
  signature: p,
54929
54932
  data: u,
54930
54933
  x509Certificate: f[0],
54931
- hashAlgorithm: Ne.ES256
54934
+ hashAlgorithm: Pe.ES256
54932
54935
  });
54933
54936
  }
54934
54937
  const vA = "1.3.6.1.4.1.45724.1.1.4";
@@ -54956,7 +54959,7 @@ var Zt;
54956
54959
  (function(e) {
54957
54960
  e[e.DISABLED = 0] = "DISABLED", e[e.REFRESHING = 1] = "REFRESHING", e[e.READY = 2] = "READY";
54958
54961
  })(Zt || (Zt = {}));
54959
- const Ir = $F();
54962
+ const Nr = $F();
54960
54963
  class NF {
54961
54964
  constructor() {
54962
54965
  Object.defineProperty(this, "mdsCache", {
@@ -54995,7 +54998,7 @@ class NF {
54995
54998
  },
54996
54999
  url: TF.url
54997
55000
  }, o += 1);
54998
- }), Ir(`Cached ${o} local statements`);
55001
+ }), Nr(`Cached ${o} local statements`);
54999
55002
  }
55000
55003
  if (n?.length) {
55001
55004
  const o = Object.keys(this.statementCache).length;
@@ -55009,10 +55012,10 @@ class NF {
55009
55012
  }, p = await this.downloadBlob(u);
55010
55013
  await this.verifyBlob(p, u);
55011
55014
  } catch (u) {
55012
- Ir(`Could not download BLOB from ${d}:`, u), s -= 1;
55015
+ Nr(`Could not download BLOB from ${d}:`, u), s -= 1;
55013
55016
  }
55014
55017
  const l = Object.keys(this.statementCache).length - o;
55015
- Ir(`Cached ${l} statements from ${s} metadata server(s)`);
55018
+ Nr(`Cached ${l} statements from ${s} metadata server(s)`);
55016
55019
  }
55017
55020
  r && (this.verificationMode = r), this.setState(Zt.READY);
55018
55021
  }
@@ -55067,7 +55070,7 @@ class NF {
55067
55070
  no: o.no,
55068
55071
  // Remember when we need to refresh this blob
55069
55072
  nextUpdate: s
55070
- } : s < /* @__PURE__ */ new Date() && Ir(`⚠️ This MDS blob (serial: ${o.no}) contains stale data as of ${s.toISOString()}. Please consider re-initializing MetadataService with a newer MDS blob.`);
55073
+ } : s < /* @__PURE__ */ new Date() && Nr(`⚠️ This MDS blob (serial: ${o.no}) contains stale data as of ${s.toISOString()}. Please consider re-initializing MetadataService with a newer MDS blob.`);
55071
55074
  }
55072
55075
  /**
55073
55076
  * A helper method to pause execution until the service is ready
@@ -55086,7 +55089,7 @@ class NF {
55086
55089
  * Report service status on change
55087
55090
  */
55088
55091
  setState(t) {
55089
- this.state = t, t === Zt.DISABLED ? Ir("MetadataService is DISABLED") : t === Zt.REFRESHING ? Ir("MetadataService is REFRESHING") : t === Zt.READY && Ir("MetadataService is READY");
55092
+ this.state = t, t === Zt.DISABLED ? Nr("MetadataService is DISABLED") : t === Zt.REFRESHING ? Nr("MetadataService is REFRESHING") : t === Zt.READY && Nr("MetadataService is READY");
55090
55093
  }
55091
55094
  }
55092
55095
  const rf = new NF();
@@ -55096,7 +55099,7 @@ async function of({ statement: e, credentialPublicKey: t, x5c: n, attestationSta
55096
55099
  const y = AA[w];
55097
55100
  y && c.add(y);
55098
55101
  });
55099
- const l = tf(t), d = l.get($e.kty), u = l.get($e.alg);
55102
+ const l = tf(t), d = l.get(Te.kty), u = l.get(Te.alg);
55100
55103
  if (!d)
55101
55104
  throw new Error("Credential public key was missing kty");
55102
55105
  if (!u)
@@ -55105,7 +55108,7 @@ async function of({ statement: e, credentialPublicKey: t, x5c: n, attestationSta
55105
55108
  throw new Error("Credential public key was missing kty");
55106
55109
  const p = { kty: d, alg: u };
55107
55110
  if (ef(l)) {
55108
- const w = l.get($e.crv);
55111
+ const w = l.get(Te.crv);
55109
55112
  p.crv = w;
55110
55113
  }
55111
55114
  let f = !1;
@@ -55126,7 +55129,7 @@ ${y}`);
55126
55129
  let g = !1;
55127
55130
  if (h.length === 1 && m.indexOf(h[0]) >= 0 && (g = !0), !g)
55128
55131
  try {
55129
- await vr(h, m);
55132
+ await Ar(h, m);
55130
55133
  } catch (w) {
55131
55134
  const y = w;
55132
55135
  throw new Error(`Could not validate certificate path with any metadata root certificates: ${y.message}`);
@@ -55206,7 +55209,7 @@ async function PF(e) {
55206
55209
  }
55207
55210
  } else
55208
55211
  try {
55209
- await vr(l.map(Fn), s);
55212
+ await Ar(l.map(Fn), s);
55210
55213
  } catch (T) {
55211
55214
  const I = T;
55212
55215
  throw new Error(`${I.message} (Packed|Full)`);
@@ -55263,7 +55266,7 @@ async function jF(e) {
55263
55266
  }
55264
55267
  else
55265
55268
  try {
55266
- await vr(m.x5c.map(Fn), o);
55269
+ await Ar(m.x5c.map(Fn), o);
55267
55270
  } catch (M) {
55268
55271
  const D = M;
55269
55272
  throw new Error(`${D.message} (SafetyNet)`);
@@ -55501,8 +55504,8 @@ async function UF(e) {
55501
55504
  const h = LF(p), { unique: m, type: g, parameters: w } = h, y = tf(r);
55502
55505
  if (g === "TPM_ALG_RSA") {
55503
55506
  if (!g_(y))
55504
- throw new Error(`Credential public key with kty ${y.get($e.kty)} did not match ${g}`);
55505
- const xe = y.get($e.n), ue = y.get($e.e);
55507
+ throw new Error(`Credential public key with kty ${y.get(Te.kty)} did not match ${g}`);
55508
+ const xe = y.get(Te.n), ue = y.get(Te.e);
55506
55509
  if (!xe)
55507
55510
  throw new Error("COSE public key missing n (TPM|RSA)");
55508
55511
  if (!ue)
@@ -55516,8 +55519,8 @@ async function UF(e) {
55516
55519
  throw new Error(`Unexpected public key exp ${ft}, expected ${Qe} (TPM|RSA)`);
55517
55520
  } else if (g === "TPM_ALG_ECC") {
55518
55521
  if (!ef(y))
55519
- throw new Error(`Credential public key with kty ${y.get($e.kty)} did not match ${g}`);
55520
- const xe = y.get($e.crv), ue = y.get($e.x), je = y.get($e.y);
55522
+ throw new Error(`Credential public key with kty ${y.get(Te.kty)} did not match ${g}`);
55523
+ const xe = y.get(Te.crv), ue = y.get(Te.x), je = y.get(Te.y);
55521
55524
  if (!xe)
55522
55525
  throw new Error("COSE public key missing crv (TPM|ECC)");
55523
55526
  if (!ue)
@@ -55601,7 +55604,7 @@ async function UF(e) {
55601
55604
  }
55602
55605
  else
55603
55606
  try {
55604
- await vr(u.map(Fn), s);
55607
+ await Ar(u.map(Fn), s);
55605
55608
  } catch (xe) {
55606
55609
  const ue = xe;
55607
55610
  throw new Error(`${ue.message} (TPM)`);
@@ -55628,11 +55631,11 @@ function FF(e) {
55628
55631
  }
55629
55632
  function zF(e) {
55630
55633
  if (e === "TPM_ALG_SHA256")
55631
- return Ne.ES256;
55634
+ return Pe.ES256;
55632
55635
  if (e === "TPM_ALG_SHA384")
55633
- return Ne.ES384;
55636
+ return Pe.ES384;
55634
55637
  if (e === "TPM_ALG_SHA512")
55635
- return Ne.ES512;
55638
+ return Pe.ES512;
55636
55639
  throw new Error(`Unexpected TPM attested name alg ${e}`);
55637
55640
  }
55638
55641
  var g0;
@@ -55800,17 +55803,17 @@ S([
55800
55803
  S([
55801
55804
  E({ context: 724, type: ge, optional: !0 })
55802
55805
  ], _e.prototype, "moduleHash", void 0);
55803
- var pr;
55806
+ var fr;
55804
55807
  (function(e) {
55805
55808
  e[e.software = 0] = "software", e[e.trustedEnvironment = 1] = "trustedEnvironment", e[e.strongBox = 2] = "strongBox";
55806
- })(pr || (pr = {}));
55809
+ })(fr || (fr = {}));
55807
55810
  var zc;
55808
55811
  (function(e) {
55809
55812
  e[e.KM2 = 1] = "KM2", e[e.KM3 = 2] = "KM3", e[e.KM4 = 3] = "KM4", e[e.KM4_1 = 4] = "KM4_1", e[e.keyMint1 = 100] = "keyMint1", e[e.keyMint2 = 200] = "keyMint2", e[e.keyMint3 = 300] = "keyMint3", e[e.keyMint4 = 400] = "keyMint4";
55810
55813
  })(zc || (zc = {}));
55811
55814
  class fi {
55812
55815
  constructor(t = {}) {
55813
- this.attestationVersion = zc.KM4, this.attestationSecurityLevel = pr.software, this.keymasterVersion = 0, this.keymasterSecurityLevel = pr.software, this.attestationChallenge = new ge(), this.uniqueId = new ge(), this.softwareEnforced = new _e(), this.teeEnforced = new _e(), Object.assign(this, t);
55816
+ this.attestationVersion = zc.KM4, this.attestationSecurityLevel = fr.software, this.keymasterVersion = 0, this.keymasterSecurityLevel = fr.software, this.attestationChallenge = new ge(), this.uniqueId = new ge(), this.softwareEnforced = new _e(), this.teeEnforced = new _e(), Object.assign(this, t);
55814
55817
  }
55815
55818
  }
55816
55819
  S([
@@ -55839,7 +55842,7 @@ S([
55839
55842
  ], fi.prototype, "teeEnforced", void 0);
55840
55843
  class hi {
55841
55844
  constructor(t = {}) {
55842
- this.attestationVersion = zc.keyMint4, this.attestationSecurityLevel = pr.software, this.keyMintVersion = 0, this.keyMintSecurityLevel = pr.software, this.attestationChallenge = new ge(), this.uniqueId = new ge(), this.softwareEnforced = new _e(), this.hardwareEnforced = new _e(), Object.assign(this, t);
55845
+ this.attestationVersion = zc.keyMint4, this.attestationSecurityLevel = fr.software, this.keyMintVersion = 0, this.keyMintSecurityLevel = fr.software, this.attestationChallenge = new ge(), this.uniqueId = new ge(), this.softwareEnforced = new _e(), this.hardwareEnforced = new _e(), Object.assign(this, t);
55843
55846
  }
55844
55847
  toLegacyKeyDescription() {
55845
55848
  return new fi({
@@ -55929,7 +55932,7 @@ class Fi {
55929
55932
  this.teeEnforced = t;
55930
55933
  }
55931
55934
  constructor(t = {}) {
55932
- this.attestationVersion = zc.KM4, this.attestationSecurityLevel = pr.software, this.keymasterVersion = 0, this.keymasterSecurityLevel = pr.software, this.attestationChallenge = new ge(), this.uniqueId = new ge(), this.softwareEnforced = new ja(), this.teeEnforced = new ja(), Object.assign(this, t);
55935
+ this.attestationVersion = zc.KM4, this.attestationSecurityLevel = fr.software, this.keymasterVersion = 0, this.keymasterSecurityLevel = fr.software, this.attestationChallenge = new ge(), this.uniqueId = new ge(), this.softwareEnforced = new ja(), this.teeEnforced = new ja(), Object.assign(this, t);
55933
55936
  }
55934
55937
  }
55935
55938
  S([
@@ -56025,7 +56028,7 @@ async function HF(e) {
56025
56028
  else {
56026
56029
  const k = c.slice(0, -1).map(Fn), b = c.slice(-1).map(Fn);
56027
56030
  try {
56028
- await vr(k, b);
56031
+ await Ar(k, b);
56029
56032
  } catch (x) {
56030
56033
  const C = x;
56031
56034
  throw new Error(`${C.message} (Android Key)`, { cause: C });
@@ -56046,7 +56049,7 @@ async function KF(e) {
56046
56049
  if (!s)
56047
56050
  throw new Error("No attestation certificate provided in attestation statement (Apple)");
56048
56051
  try {
56049
- await vr(s.map(Fn), o);
56052
+ await Ar(s.map(Fn), o);
56050
56053
  } catch (w) {
56051
56054
  const y = w;
56052
56055
  throw new Error(`${y.message} (Apple)`);
@@ -56116,7 +56119,7 @@ async function VF(e) {
56116
56119
  throw new Error("No public key was provided by authenticator");
56117
56120
  if (!I)
56118
56121
  throw new Error("No AAGUID was present during registration");
56119
- const ne = tf(M).get($e.alg);
56122
+ const ne = tf(M).get(Te.alg);
56120
56123
  if (typeof ne != "number")
56121
56124
  throw new Error("Credential public key was missing numeric alg");
56122
56125
  if (!l.includes(ne)) {
@@ -56181,7 +56184,7 @@ async function VF(e) {
56181
56184
  };
56182
56185
  }
56183
56186
  async function sn(e, t) {
56184
- const { branding: n, state: i, routePrefix: r } = e, o = e.language || "en", { m: s } = Te(
56187
+ const { branding: n, state: i, routePrefix: r } = e, o = e.language || "en", { m: s } = Ie(
56185
56188
  "passkeys",
56186
56189
  "passkey-enrollment",
56187
56190
  o,
@@ -56384,7 +56387,7 @@ const WF = {
56384
56387
  });
56385
56388
  },
56386
56389
  post: async (e, t) => {
56387
- const { ctx: n, client: i, state: r } = e, o = t.action, s = t["credential-field"], c = e.language || "en", { m: l } = Te(
56390
+ const { ctx: n, client: i, state: r } = e, o = t.action, s = t["credential-field"], c = e.language || "en", { m: l } = Ie(
56388
56391
  "passkeys",
56389
56392
  "passkey-enrollment",
56390
56393
  c,
@@ -59535,7 +59538,7 @@ let Iz = class {
59535
59538
  let r = 1, o = !1, s = !1, c = "";
59536
59539
  for (; t < e.length; t++)
59537
59540
  if (e[t] === "<" && !s) {
59538
- if (o && Nr(e, "!ENTITY", t)) {
59541
+ if (o && Pr(e, "!ENTITY", t)) {
59539
59542
  t += 7;
59540
59543
  let l, d;
59541
59544
  if ([l, d, t] = this.readEntityExp(e, t + 1, this.suppressValidationErr), d.indexOf("&") === -1) {
@@ -59549,17 +59552,17 @@ let Iz = class {
59549
59552
  val: d
59550
59553
  }, i++;
59551
59554
  }
59552
- } else if (o && Nr(e, "!ELEMENT", t)) {
59555
+ } else if (o && Pr(e, "!ELEMENT", t)) {
59553
59556
  t += 8;
59554
59557
  const { index: l } = this.readElementExp(e, t + 1);
59555
59558
  t = l;
59556
- } else if (o && Nr(e, "!ATTLIST", t))
59559
+ } else if (o && Pr(e, "!ATTLIST", t))
59557
59560
  t += 8;
59558
- else if (o && Nr(e, "!NOTATION", t)) {
59561
+ else if (o && Pr(e, "!NOTATION", t)) {
59559
59562
  t += 9;
59560
59563
  const { index: l } = this.readNotationExp(e, t + 1, this.suppressValidationErr);
59561
59564
  t = l;
59562
- } else if (Nr(e, "!--", t))
59565
+ } else if (Pr(e, "!--", t))
59563
59566
  s = !0;
59564
59567
  else
59565
59568
  throw new Error("Invalid DOCTYPE");
@@ -59629,9 +59632,9 @@ let Iz = class {
59629
59632
  throw new Error(`Invalid element name: "${n}"`);
59630
59633
  t = qt(e, t);
59631
59634
  let i = "";
59632
- if (e[t] === "E" && Nr(e, "MPTY", t))
59635
+ if (e[t] === "E" && Pr(e, "MPTY", t))
59633
59636
  t += 4;
59634
- else if (e[t] === "A" && Nr(e, "NY", t))
59637
+ else if (e[t] === "A" && Pr(e, "NY", t))
59635
59638
  t += 2;
59636
59639
  else if (e[t] === "(") {
59637
59640
  for (t++; t < e.length && e[t] !== ")"; )
@@ -59698,7 +59701,7 @@ const qt = (e, t) => {
59698
59701
  t++;
59699
59702
  return t;
59700
59703
  };
59701
- function Nr(e, t, n) {
59704
+ function Pr(e, t, n) {
59702
59705
  for (let i = 0; i < t.length; i++)
59703
59706
  if (t[i] !== e[n + i + 1]) return !1;
59704
59707
  return !0;
@@ -59864,7 +59867,7 @@ const Jz = function(e) {
59864
59867
  for (let s = 0; s < e.length; s++)
59865
59868
  if (e[s] === "<")
59866
59869
  if (e[s + 1] === "/") {
59867
- const c = Fr(e, ">", s, "Closing Tag is not closed.");
59870
+ const c = zr(e, ">", s, "Closing Tag is not closed.");
59868
59871
  let l = e.substring(s + 2, c).trim();
59869
59872
  if (this.options.removeNSPrefix) {
59870
59873
  const p = l.indexOf(":");
@@ -59885,7 +59888,7 @@ const Jz = function(e) {
59885
59888
  }
59886
59889
  s = c.closeIndex + 1;
59887
59890
  } else if (e.substr(s + 1, 3) === "!--") {
59888
- const c = Fr(e, "-->", s + 4, "Comment is not closed.");
59891
+ const c = zr(e, "-->", s + 4, "Comment is not closed.");
59889
59892
  if (this.options.commentPropName) {
59890
59893
  const l = e.substring(s + 4, c - 2);
59891
59894
  i = this.saveTextToParentTag(i, n, r), n.add(this.options.commentPropName, [{ [this.options.textNodeName]: l }]);
@@ -59895,7 +59898,7 @@ const Jz = function(e) {
59895
59898
  const c = o.readDocType(e, s);
59896
59899
  this.docTypeEntities = c.entities, s = c.i;
59897
59900
  } else if (e.substr(s + 1, 2) === "![") {
59898
- const c = Fr(e, "]]>", s, "CDATA is not closed.") - 2, l = e.substring(s + 9, c);
59901
+ const c = zr(e, "]]>", s, "CDATA is not closed.") - 2, l = e.substring(s + 9, c);
59899
59902
  i = this.saveTextToParentTag(i, n, r);
59900
59903
  let d = this.parseTextData(l, n.tagname, r, !0, !1, !0, !0);
59901
59904
  d == null && (d = ""), this.options.cdataPropName ? n.add(this.options.cdataPropName, [{ [this.options.textNodeName]: l }]) : n.add(this.options.textNodeName, d), s = c + 2;
@@ -60034,7 +60037,7 @@ function eq(e, t, n = ">") {
60034
60037
  r += s;
60035
60038
  }
60036
60039
  }
60037
- function Fr(e, t, n, i) {
60040
+ function zr(e, t, n, i) {
60038
60041
  const r = e.indexOf(t, n);
60039
60042
  if (r === -1)
60040
60043
  throw new Error(i);
@@ -60066,7 +60069,7 @@ function tq(e, t, n) {
60066
60069
  for (; n < e.length; n++)
60067
60070
  if (e[n] === "<")
60068
60071
  if (e[n + 1] === "/") {
60069
- const o = Fr(e, ">", n, `${t} is not closed`);
60072
+ const o = zr(e, ">", n, `${t} is not closed`);
60070
60073
  if (e.substring(n + 2, o).trim() === t && (r--, r === 0))
60071
60074
  return {
60072
60075
  tagContent: e.substring(i, n),
@@ -60074,11 +60077,11 @@ function tq(e, t, n) {
60074
60077
  };
60075
60078
  n = o;
60076
60079
  } else if (e[n + 1] === "?")
60077
- n = Fr(e, "?>", n + 1, "StopNode is not closed.");
60080
+ n = zr(e, "?>", n + 1, "StopNode is not closed.");
60078
60081
  else if (e.substr(n + 1, 3) === "!--")
60079
- n = Fr(e, "-->", n + 3, "StopNode is not closed.");
60082
+ n = zr(e, "-->", n + 3, "StopNode is not closed.");
60080
60083
  else if (e.substr(n + 1, 2) === "![")
60081
- n = Fr(e, "]]>", n, "StopNode is not closed.") - 2;
60084
+ n = zr(e, "]]>", n, "StopNode is not closed.") - 2;
60082
60085
  else {
60083
60086
  const o = A0(e, n, ">");
60084
60087
  o && ((o && o.tagName) === t && o.tagExp[o.tagExp.length - 1] !== "/" && r++, n = o.closeIndex);
@@ -60297,7 +60300,7 @@ const wq = _q, bq = _E, vq = {
60297
60300
  // transformAttributeName: false,
60298
60301
  oneListGroup: !1
60299
60302
  };
60300
- function Ar(e) {
60303
+ function kr(e) {
60301
60304
  this.options = Object.assign({}, vq, e), this.options.ignoreAttributes === !0 || this.options.attributesGroupName ? this.isAttribute = function() {
60302
60305
  return !1;
60303
60306
  } : (this.ignoreAttributesFn = bq(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = Sq), this.processTextOrObjNode = Aq, this.options.format ? (this.indentate = kq, this.tagEndChar = `>
@@ -60306,12 +60309,12 @@ function Ar(e) {
60306
60309
  return "";
60307
60310
  }, this.tagEndChar = ">", this.newLine = "");
60308
60311
  }
60309
- Ar.prototype.build = function(e) {
60312
+ kr.prototype.build = function(e) {
60310
60313
  return this.options.preserveOrder ? wq(e, this.options) : (Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = {
60311
60314
  [this.options.arrayNodeName]: e
60312
60315
  }), this.j2x(e, 0, []).val);
60313
60316
  };
60314
- Ar.prototype.j2x = function(e, t, n) {
60317
+ kr.prototype.j2x = function(e, t, n) {
60315
60318
  let i = "", r = "";
60316
60319
  const o = n.join(".");
60317
60320
  for (let s in e)
@@ -60360,14 +60363,14 @@ Ar.prototype.j2x = function(e, t, n) {
60360
60363
  r += this.processTextOrObjNode(e[s], s, t, n);
60361
60364
  return { attrStr: i, val: r };
60362
60365
  };
60363
- Ar.prototype.buildAttrPairStr = function(e, t) {
60366
+ kr.prototype.buildAttrPairStr = function(e, t) {
60364
60367
  return t = this.options.attributeValueProcessor(e, "" + t), t = this.replaceEntitiesValue(t), this.options.suppressBooleanAttributes && t === "true" ? " " + e : " " + e + '="' + t + '"';
60365
60368
  };
60366
60369
  function Aq(e, t, n, i) {
60367
60370
  const r = this.j2x(e, n + 1, i.concat(t));
60368
60371
  return e[this.options.textNodeName] !== void 0 && Object.keys(e).length === 1 ? this.buildTextValNode(e[this.options.textNodeName], t, r.attrStr, n) : this.buildObjectNode(r.val, t, r.attrStr, n);
60369
60372
  }
60370
- Ar.prototype.buildObjectNode = function(e, t, n, i) {
60373
+ kr.prototype.buildObjectNode = function(e, t, n, i) {
60371
60374
  if (e === "")
60372
60375
  return t[0] === "?" ? this.indentate(i) + "<" + t + n + "?" + this.tagEndChar : this.indentate(i) + "<" + t + n + this.closeTag(t) + this.tagEndChar;
60373
60376
  {
@@ -60375,11 +60378,11 @@ Ar.prototype.buildObjectNode = function(e, t, n, i) {
60375
60378
  return t[0] === "?" && (o = "?", r = ""), (n || n === "") && e.indexOf("<") === -1 ? this.indentate(i) + "<" + t + n + o + ">" + e + r : this.options.commentPropName !== !1 && t === this.options.commentPropName && o.length === 0 ? this.indentate(i) + `<!--${e}-->` + this.newLine : this.indentate(i) + "<" + t + n + o + this.tagEndChar + e + this.indentate(i) + r;
60376
60379
  }
60377
60380
  };
60378
- Ar.prototype.closeTag = function(e) {
60381
+ kr.prototype.closeTag = function(e) {
60379
60382
  let t = "";
60380
60383
  return this.options.unpairedTags.indexOf(e) !== -1 ? this.options.suppressUnpairedNode || (t = "/") : this.options.suppressEmptyNode ? t = "/" : t = `></${e}`, t;
60381
60384
  };
60382
- Ar.prototype.buildTextValNode = function(e, t, n, i) {
60385
+ kr.prototype.buildTextValNode = function(e, t, n, i) {
60383
60386
  if (this.options.cdataPropName !== !1 && t === this.options.cdataPropName)
60384
60387
  return this.indentate(i) + `<![CDATA[${e}]]>` + this.newLine;
60385
60388
  if (this.options.commentPropName !== !1 && t === this.options.commentPropName)
@@ -60391,7 +60394,7 @@ Ar.prototype.buildTextValNode = function(e, t, n, i) {
60391
60394
  return r = this.replaceEntitiesValue(r), r === "" ? this.indentate(i) + "<" + t + n + this.closeTag(t) + this.tagEndChar : this.indentate(i) + "<" + t + n + ">" + r + "</" + t + this.tagEndChar;
60392
60395
  }
60393
60396
  };
60394
- Ar.prototype.replaceEntitiesValue = function(e) {
60397
+ kr.prototype.replaceEntitiesValue = function(e) {
60395
60398
  if (e && e.length > 0 && this.options.processEntities)
60396
60399
  for (let t = 0; t < this.options.entities.length; t++) {
60397
60400
  const n = this.options.entities[t];
@@ -60405,7 +60408,7 @@ function kq(e) {
60405
60408
  function Sq(e) {
60406
60409
  return e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName ? e.substr(this.attrPrefixLen) : !1;
60407
60410
  }
60408
- var xq = Ar;
60411
+ var xq = kr;
60409
60412
  const Eq = fq, Cq = xq;
60410
60413
  var AE = {
60411
60414
  XMLParser: Eq,
@@ -60673,7 +60676,7 @@ const jq = new he().openapi(
60673
60676
  message: "No signing key found"
60674
60677
  });
60675
60678
  const r = i.map(
60676
- (c) => new ro(c.cert).toString("base64")
60679
+ (c) => new oo(c.cert).toString("base64")
60677
60680
  ), o = e.env.ISSUER, s = Pq({
60678
60681
  entityId: n.addons?.samlp?.audience || n.client_id,
60679
60682
  certificates: r,
@@ -60737,7 +60740,7 @@ const jq = new he().openapi(
60737
60740
  audience: s
60738
60741
  },
60739
60742
  expires_at: new Date(
60740
- Date.now() + oo * 1e3
60743
+ Date.now() + lr * 1e3
60741
60744
  ).toISOString(),
60742
60745
  ip: e.get("ip"),
60743
60746
  useragent: e.get("useragent"),
@@ -61707,7 +61710,7 @@ function Bq(e) {
61707
61710
  const I = o("Passwords do not match.");
61708
61711
  return (l.req.header("Accept") || "").includes("application/json") ? l.json({ screen: I }) : c(l, I, "setup");
61709
61712
  }
61710
- const { connectionType: m, normalized: g, isValid: w } = wr(u), y = g || u, _ = m === "email" && w ? y : void 0, v = h || (n ? "Control Plane" : "My App"), k = n ? "control_plane" : r(v) || "my_app", b = new URL(l.req.url).origin, x = [
61713
+ const { connectionType: m, normalized: g, isValid: w } = br(u), y = g || u, _ = m === "email" && w ? y : void 0, v = h || (n ? "Control Plane" : "My App"), k = n ? "control_plane" : r(v) || "my_app", b = new URL(l.req.url).origin, x = [
61711
61714
  `${b}/auth-callback`,
61712
61715
  `${b}/admin/auth-callback`,
61713
61716
  "https://manage.authhero.net/auth-callback",
@@ -63819,7 +63822,7 @@ export {
63819
63822
  dt as Layout,
63820
63823
  vC as LocationInfo,
63821
63824
  ie as LogTypes,
63822
- Pe as LoginSessionState,
63825
+ $e as LoginSessionState,
63823
63826
  Y0e as MANAGEMENT_API_AUDIENCE,
63824
63827
  sd as MANAGEMENT_API_SCOPES,
63825
63828
  Ln as Message,
@@ -63871,14 +63874,14 @@ export {
63871
63874
  u5 as componentSchema,
63872
63875
  pm as connectionInsertSchema,
63873
63876
  k5 as connectionOptionsSchema,
63874
- Dr as connectionSchema,
63877
+ Mr as connectionSchema,
63875
63878
  Oa as coordinatesSchema,
63876
63879
  Iy as createAuthMiddleware,
63877
63880
  _l as createInMemoryCache,
63878
63881
  Yme as createPassthroughAdapter,
63879
63882
  Zme as createWriteOnlyAdapter,
63880
63883
  UA as customDomainInsertSchema,
63881
- Pr as customDomainSchema,
63884
+ jr as customDomainSchema,
63882
63885
  Tme as customDomainWithTenantIdSchema,
63883
63886
  Gme as customTextEntrySchema,
63884
63887
  ys as customTextSchema,
@@ -63933,7 +63936,7 @@ export {
63933
63936
  zC as organizationBrandingSchema,
63934
63937
  qC as organizationEnabledConnectionSchema,
63935
63938
  wm as organizationInsertSchema,
63936
- Mr as organizationSchema,
63939
+ Lr as organizationSchema,
63937
63940
  HC as organizationTokenQuotaSchema,
63938
63941
  $C as pageBackgroundSchema,
63939
63942
  Qme as parseUserId,