authhero 8.17.1 → 8.17.3

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.
Files changed (31) hide show
  1. package/dist/authhero.cjs +23 -23
  2. package/dist/authhero.d.ts +272 -272
  3. package/dist/authhero.mjs +69 -62
  4. package/dist/tsconfig.types.tsbuildinfo +1 -1
  5. package/dist/types/authentication-flows/passwordless.d.ts +5 -5
  6. package/dist/types/index.d.ts +272 -272
  7. package/dist/types/routes/auth-api/authorize.d.ts +14 -14
  8. package/dist/types/routes/auth-api/index.d.ts +50 -50
  9. package/dist/types/routes/auth-api/passwordless.d.ts +4 -4
  10. package/dist/types/routes/management-api/action-executions.d.ts +1 -1
  11. package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
  12. package/dist/types/routes/management-api/branding.d.ts +5 -5
  13. package/dist/types/routes/management-api/clients.d.ts +6 -6
  14. package/dist/types/routes/management-api/connections.d.ts +15 -15
  15. package/dist/types/routes/management-api/failed-events.d.ts +1 -1
  16. package/dist/types/routes/management-api/index.d.ts +91 -91
  17. package/dist/types/routes/management-api/log-streams.d.ts +6 -6
  18. package/dist/types/routes/management-api/logs.d.ts +3 -3
  19. package/dist/types/routes/management-api/migration-sources.d.ts +6 -6
  20. package/dist/types/routes/management-api/organizations.d.ts +3 -3
  21. package/dist/types/routes/management-api/prompts.d.ts +4 -4
  22. package/dist/types/routes/management-api/tenants.d.ts +6 -6
  23. package/dist/types/routes/management-api/themes.d.ts +3 -3
  24. package/dist/types/routes/management-api/users.d.ts +2 -2
  25. package/dist/types/routes/universal-login/common.d.ts +2 -2
  26. package/dist/types/routes/universal-login/flow-api.d.ts +12 -12
  27. package/dist/types/routes/universal-login/identifier.d.ts +2 -2
  28. package/dist/types/routes/universal-login/index.d.ts +2 -2
  29. package/dist/types/routes/universal-login/u2-index.d.ts +5 -5
  30. package/dist/types/routes/universal-login/u2-routes.d.ts +5 -5
  31. package/package.json +3 -3
package/dist/authhero.mjs CHANGED
@@ -648,7 +648,7 @@ var ye = {}, be = (e) => !v(e) && typeof e != "boolean" && typeof e != "number",
648
648
  init(e = {}) {
649
649
  e.interpolation ||= { escapeValue: !0 };
650
650
  let { escape: t, escapeValue: n, useRawValueToEscape: r, prefix: i, prefixEscaped: a, suffix: o, suffixEscaped: s, formatSeparator: c, unescapeSuffix: l, unescapePrefix: u, nestingPrefix: d, nestingPrefixEscaped: f, nestingSuffix: p, nestingSuffixEscaped: m, nestingOptionsSeparator: h, maxReplaces: g, alwaysFormat: _ } = e.interpolation;
651
- this.escape = t === void 0 ? D : t, this.escapeValue = n === void 0 ? !0 : n, this.useRawValueToEscape = r === void 0 ? !1 : r, this.prefix = i ? ie(i) : a || "{{", this.suffix = o ? ie(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? ie(d) : f || ie("$t("), this.nestingSuffix = p ? ie(p) : m || ie(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ === void 0 ? !1 : _, this.resetRegExp();
651
+ this.escape = t === void 0 ? D : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? ie(i) : a || "{{", this.suffix = o ? ie(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? ie(d) : f || ie("$t("), this.nestingSuffix = p ? ie(p) : m || ie(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ !== void 0 && _, this.resetRegExp();
652
652
  }
653
653
  reset() {
654
654
  this.options && this.init(this.options);
@@ -6190,7 +6190,7 @@ function il(e, t) {
6190
6190
  return Ks(e) ? e.equals(t) : Ks(t) ? t.equals(e) : (e = ds(e), t = ds(t), gs(e) ? gs(t) && al(e, t) : e === t);
6191
6191
  }
6192
6192
  function al(e, t) {
6193
- return e.length === t.length ? !e.some((e, n) => !il(e, t[n])) : !1;
6193
+ return e.length === t.length && !e.some((e, n) => !il(e, t[n]));
6194
6194
  }
6195
6195
  function ol(e, t) {
6196
6196
  return e.some((e) => il(e, t));
@@ -8663,7 +8663,7 @@ var hne = (e, t) => {
8663
8663
  }, af = (e, t, n, r) => {
8664
8664
  let i = bne(t, n, r);
8665
8665
  e.header("Set-Cookie", i, { append: !0 });
8666
- }, of = "mrb21yjo", xne = /* @__PURE__ */ p({
8666
+ }, of = "mrc5ps3g", xne = /* @__PURE__ */ p({
8667
8667
  common: () => sf,
8668
8668
  consent: () => cf,
8669
8669
  default: () => Sne,
@@ -14816,7 +14816,7 @@ function Vg(e, t) {
14816
14816
  }
14817
14817
  function Hg(e, t) {
14818
14818
  if (typeof e != "string" || typeof t != "string") throw Error("Illegal arguments: " + typeof e + ", " + typeof t);
14819
- return t.length === 60 ? Vg(zg(e, t.substring(0, t.length - 31)), t) : !1;
14819
+ return t.length === 60 && Vg(zg(e, t.substring(0, t.length - 31)), t);
14820
14820
  }
14821
14821
  function Ug(e, t, n, r) {
14822
14822
  function i(n) {
@@ -17447,7 +17447,7 @@ function Wv(e) {
17447
17447
  throw TypeError("Invalid algorithm");
17448
17448
  }
17449
17449
  function Gv(e) {
17450
- return typeof e == "string" ? [
17450
+ return typeof e == "string" && [
17451
17451
  "HS256",
17452
17452
  "HS384",
17453
17453
  "HS512",
@@ -17460,7 +17460,7 @@ function Gv(e) {
17460
17460
  "PS256",
17461
17461
  "PS384",
17462
17462
  "PS512"
17463
- ].includes(e) : !1;
17463
+ ].includes(e);
17464
17464
  }
17465
17465
  var Kv = {
17466
17466
  ES256: {
@@ -18217,16 +18217,17 @@ var xb = Et.extend({ users: r.array(Nt) }), Une = Et.extend({ sessions: r.array(
18217
18217
  handler: async (e) => {
18218
18218
  let t = e.req.valid("json");
18219
18219
  e.set("body", t);
18220
- let { email: n, phone_number: r, name: i, linked_to: a, email_verified: o, provider: s, connection: c, password: l } = t, u = await e.env.data.connections.get(e.var.tenant_id, c), d = (u ? Da(u.strategy) : c === N.USERNAME_PASSWORD || pb(s)) ? await fb(e.env, e.var.tenant_id) : u ? cb(u) : s || c, f = t.user_id, p = `${d}|${f ? Cg(f) : Sg()}`;
18220
+ let { email: n, phone_number: r, name: i, linked_to: a, email_verified: o, provider: s, connection: c, password: l, user_id: u, verify_email: d, last_ip: f, is_social: p, last_login: m, registration_completed_at: h, ...g } = t, v = await e.env.data.connections.get(e.var.tenant_id, c), y = (v ? Da(v.strategy) : c === N.USERNAME_PASSWORD || pb(s)) ? await fb(e.env, e.var.tenant_id) : v ? cb(v) : s || c, b = t.user_id, x = `${y}|${b ? Cg(b) : Sg()}`;
18221
18221
  try {
18222
18222
  let t;
18223
18223
  l && (t = await b_(l));
18224
18224
  let s = {
18225
+ ...g,
18225
18226
  email: n,
18226
- user_id: p,
18227
+ user_id: x,
18227
18228
  name: i || n || r,
18228
18229
  phone_number: r,
18229
- provider: d,
18230
+ provider: y,
18230
18231
  connection: c,
18231
18232
  linked_to: a ?? void 0,
18232
18233
  email_verified: o || !1,
@@ -18242,11 +18243,11 @@ var xb = Et.extend({ users: r.array(Nt) }), Une = Et.extend({ sessions: r.array(
18242
18243
  targetType: "user",
18243
18244
  targetId: u.user_id
18244
18245
  });
18245
- let f = u.identities ? u : {
18246
+ let d = u.identities ? u : {
18246
18247
  ...u,
18247
18248
  identities: [bb(u)]
18248
18249
  };
18249
- return e.json(Nt.parse(yb(f, za(e.env, e.var.custom_domain))), { status: 201 });
18250
+ return e.json(Nt.parse(yb(d, za(e.env, e.var.custom_domain))), { status: 201 });
18250
18251
  } catch (e) {
18251
18252
  throw e.message === "User already exists" ? new _(409, { message: "User already exists" }) : e;
18252
18253
  }
@@ -18853,7 +18854,7 @@ var xb = Et.extend({ users: r.array(Nt) }), Une = Et.extend({ sessions: r.array(
18853
18854
  if (!de(t) || (O(n) || (n = ge(n)), !de(t))) throw TypeError();
18854
18855
  O(n) || (n = ge(n));
18855
18856
  var r = Me(t, n, !1);
18856
- return O(r) ? !1 : r.OrdinaryDeleteMetadata(e, t, n);
18857
+ return !O(r) && r.OrdinaryDeleteMetadata(e, t, n);
18857
18858
  }
18858
18859
  e("deleteMetadata", E);
18859
18860
  function ee(e, t) {
@@ -18879,11 +18880,11 @@ var xb = Et.extend({ users: r.array(Nt) }), Une = Et.extend({ sessions: r.array(
18879
18880
  function ne(e, t, n) {
18880
18881
  if (re(e, t, n)) return !0;
18881
18882
  var r = De(t);
18882
- return le(r) ? !1 : ne(e, r, n);
18883
+ return !le(r) && ne(e, r, n);
18883
18884
  }
18884
18885
  function re(e, t, n) {
18885
18886
  var r = Me(t, n, !1);
18886
- return O(r) ? !1 : me(r.OrdinaryHasOwnMetadata(e, t, n));
18887
+ return !O(r) && me(r.OrdinaryHasOwnMetadata(e, t, n));
18887
18888
  }
18888
18889
  function ie(e, t, n) {
18889
18890
  if (re(e, t, n)) return ae(e, t, n);
@@ -19032,7 +19033,7 @@ var xb = Et.extend({ users: r.array(Nt) }), Une = Et.extend({ sessions: r.array(
19032
19033
  }
19033
19034
  function Te(e) {
19034
19035
  var t = e.next();
19035
- return t.done ? !1 : t;
19036
+ return !t.done && t;
19036
19037
  }
19037
19038
  function Ee(e) {
19038
19039
  var t = e.return;
@@ -19119,7 +19120,7 @@ var xb = Et.extend({ users: r.array(Nt) }), Une = Et.extend({ sessions: r.array(
19119
19120
  var t = new p(), n = {
19120
19121
  isProviderFor: function(e, n) {
19121
19122
  var r = t.get(e);
19122
- return O(r) ? !1 : r.has(n);
19123
+ return !O(r) && r.has(n);
19123
19124
  },
19124
19125
  OrdinaryDefineOwnMetadata: o,
19125
19126
  OrdinaryHasOwnMetadata: i,
@@ -19143,7 +19144,7 @@ var xb = Et.extend({ users: r.array(Nt) }), Une = Et.extend({ sessions: r.array(
19143
19144
  }
19144
19145
  function i(e, t, n) {
19145
19146
  var i = r(t, n, !1);
19146
- return O(i) ? !1 : me(i.has(e));
19147
+ return !O(i) && me(i.has(e));
19147
19148
  }
19148
19149
  function a(e, t, n) {
19149
19150
  var i = r(t, n, !1);
@@ -19332,7 +19333,7 @@ var xb = Et.extend({ users: r.array(Nt) }), Une = Et.extend({ sessions: r.array(
19332
19333
  }
19333
19334
  return e.prototype.has = function(e) {
19334
19335
  var t = i(e, !1);
19335
- return t === void 0 ? !1 : l.has(t, this._key);
19336
+ return t !== void 0 && l.has(t, this._key);
19336
19337
  }, e.prototype.get = function(e) {
19337
19338
  var t = i(e, !1);
19338
19339
  return t === void 0 ? void 0 : l.get(t, this._key);
@@ -19341,7 +19342,7 @@ var xb = Et.extend({ users: r.array(Nt) }), Une = Et.extend({ sessions: r.array(
19341
19342
  return n[this._key] = t, this;
19342
19343
  }, e.prototype.delete = function(e) {
19343
19344
  var t = i(e, !1);
19344
- return t === void 0 ? !1 : delete t[this._key];
19345
+ return t !== void 0 && delete t[this._key];
19345
19346
  }, e.prototype.clear = function() {
19346
19347
  this._key = r();
19347
19348
  }, e;
@@ -20011,7 +20012,7 @@ var H = {}, Jb = class extends Wb {
20011
20012
  return `${this.constructor.NAME} : ${V.Convert.ToHex(this.valueBlock.valueBeforeDecodeView)}`;
20012
20013
  }
20013
20014
  isEqual(e) {
20014
- return this === e ? !0 : e instanceof this.constructor ? hre(this.toBER(), e.toBER()) : !1;
20015
+ return this === e || e instanceof this.constructor && hre(this.toBER(), e.toBER());
20015
20016
  }
20016
20017
  };
20017
20018
  Jb.NAME = "BaseBlock";
@@ -21687,7 +21688,7 @@ function bC(e) {
21687
21688
  function xC(e) {
21688
21689
  if (e) {
21689
21690
  let t = Object.getPrototypeOf(e);
21690
- return t?.prototype?.constructor === Array ? !0 : xC(t);
21691
+ return t?.prototype?.constructor === Array || xC(t);
21691
21692
  }
21692
21693
  return !1;
21693
21694
  }
@@ -25550,7 +25551,7 @@ var YA, XA = class e {
25550
25551
  YA.set(this, void 0), V.BufferSourceConverter.isBufferSource(e[0]) ? (this.asn = J.parse(e[0], e[1]), OC(this, YA, V.BufferSourceConverter.toArrayBuffer(e[0]), "f"), this.onInit(this.asn)) : (this.asn = e[0], this.onInit(this.asn));
25551
25552
  }
25552
25553
  equal(t) {
25553
- return t instanceof e ? (0, V.isEqual)(t.rawData, this.rawData) : !1;
25554
+ return t instanceof e && (0, V.isEqual)(t.rawData, this.rawData);
25554
25555
  }
25555
25556
  toString(e = "text") {
25556
25557
  switch (e) {
@@ -27622,7 +27623,7 @@ function eN(e) {
27622
27623
  //#endregion
27623
27624
  //#region src/routes/management-api/clients.ts
27624
27625
  function tN(e) {
27625
- return e?.client_id ? e.client_metadata?.system_purpose === "try_connection" ? !0 : eN(e.client_id) : !1;
27626
+ return e?.client_id ? e.client_metadata?.system_purpose === "try_connection" || eN(e.client_id) : !1;
27626
27627
  }
27627
27628
  function kie(e) {
27628
27629
  return e?.client_metadata?.cimd !== "true" || !e.client_id ? !1 : GM(e.client_id);
@@ -27986,7 +27987,7 @@ var Mie = Et.extend({ clients: r.array(Lt) }), rN = r.object({ enabled_connectio
27986
27987
  ]);
27987
27988
  function iN(e, t) {
27988
27989
  let n = e.env.data.multiTenancyConfig?.controlPlaneTenantId;
27989
- return n ? n === t : !0;
27990
+ return !n || n === t;
27990
27991
  }
27991
27992
  //#endregion
27992
27993
  //#region src/routes/management-api/logs.ts
@@ -28770,11 +28771,11 @@ var jN = /* @__PURE__ */ ON(((e) => {
28770
28771
  }
28771
28772
  n += e[t];
28772
28773
  }
28773
- return r === "" ? {
28774
+ return r === "" && {
28774
28775
  value: n,
28775
28776
  index: t,
28776
28777
  tagClosed: i
28777
- } : !1;
28778
+ };
28778
28779
  }
28779
28780
  var l = /* @__PURE__ */ RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g");
28780
28781
  function u(e, n) {
@@ -29456,7 +29457,7 @@ var jN = /* @__PURE__ */ ON(((e) => {
29456
29457
  function S(e, t, r) {
29457
29458
  if (t && typeof e == "string") {
29458
29459
  let t = e.trim();
29459
- return t === "true" ? !0 : t === "false" ? !1 : a(e, r);
29460
+ return t === "true" || t !== "false" && a(e, r);
29460
29461
  } else if (n.isExist(e)) return e;
29461
29462
  else return "";
29462
29463
  }
@@ -30861,7 +30862,8 @@ function Jae(e, t) {
30861
30862
  await e.env.hooks.onExecutePreUserRegistration({
30862
30863
  ctx: e,
30863
30864
  user: r,
30864
- request: i
30865
+ request: i,
30866
+ tenant: { id: n }
30865
30867
  }, {
30866
30868
  user: {
30867
30869
  setUserMetadata: async (e, t) => {
@@ -30956,7 +30958,8 @@ function Jae(e, t) {
30956
30958
  await e.env.hooks.onExecutePostUserRegistration({
30957
30959
  ctx: e,
30958
30960
  user: r,
30959
- request: i
30961
+ request: i,
30962
+ tenant: { id: n }
30960
30963
  }, {
30961
30964
  user: {},
30962
30965
  token: rP(e, n)
@@ -32119,7 +32122,7 @@ function NP(e) {
32119
32122
  var PP = typeof Symbol == "function" && Symbol.observable || "@@observable";
32120
32123
  function FP(e, t) {
32121
32124
  let n = LP(e), r = LP(t);
32122
- return typeof r == "string" ? typeof n == "string" ? r === n : !1 : typeof n == "string" ? n in r : Object.keys(n).every((e) => e in r ? FP(n[e], r[e]) : !1);
32125
+ return typeof r == "string" ? typeof n == "string" && r === n : typeof n == "string" ? n in r : Object.keys(n).every((e) => e in r && FP(n[e], r[e]));
32123
32126
  }
32124
32127
  function IP(e) {
32125
32128
  if (UP(e)) return e;
@@ -34475,7 +34478,8 @@ async function OL(e, t) {
34475
34478
  client: r,
34476
34479
  loginSession: t.loginSession,
34477
34480
  existingSessionId: t.existingSessionIdToLink,
34478
- authConnection: t.authConnection
34481
+ authConnection: t.authConnection,
34482
+ authStrategy: t.authStrategy
34479
34483
  });
34480
34484
  let n = await e.env.data.loginSessions.get(r.tenant.id, t.loginSession.id);
34481
34485
  n && (u = n);
@@ -45747,7 +45751,7 @@ async function IH(e, t, n, r, i = N.USERNAME_PASSWORD) {
45747
45751
  });
45748
45752
  let f = t.connections.find((e) => e.name === i);
45749
45753
  if (!f && i === N.USERNAME_PASSWORD) {
45750
- let e = t.connections.filter((e) => e.strategy === N.USERNAME_PASSWORD);
45754
+ let e = t.connections.filter((e) => Da(e.strategy));
45751
45755
  e.length === 1 && (f = e[0]);
45752
45756
  }
45753
45757
  if (e.set("connection", f?.name ?? i), e.set("user_id", d.user_id), await jH(a, t.tenant.id, d) >= OH) throw P(e, t.tenant.id, {
@@ -49007,7 +49011,7 @@ var CK = F({
49007
49011
  take: r.string().min(1).optional().transform((e) => e ? parseInt(e, 10) : void 0).openapi({ description: "Number of results per page. Defaults to 50." }),
49008
49012
  audience: r.string().optional().openapi({ description: "Optional filter on audience." }),
49009
49013
  client_id: r.string().optional().openapi({ description: "Optional filter on client_id." }),
49010
- allow_any_organization: r.string().optional().transform((e) => e === "true" ? !0 : e === "false" ? !1 : void 0).openapi({ description: "Optional filter on allow_any_organization." }),
49014
+ allow_any_organization: r.string().optional().transform((e) => e === "true" || e !== "false" && void 0).openapi({ description: "Optional filter on allow_any_organization." }),
49011
49015
  subject_type: r.enum(["client", "user"]).optional().openapi({ description: "EA The type of application access the client grant allows. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement." })
49012
49016
  }), AK = Et.extend({ client_grants: r.array(zt) }), jK = F({
49013
49017
  route: t({
@@ -52218,7 +52222,7 @@ function GY(e) {
52218
52222
  };
52219
52223
  }
52220
52224
  function KY(e, t) {
52221
- return !e.filters || e.filters.length === 0 ? !0 : e.filters.some((e) => e.name === t);
52225
+ return !e.filters || e.filters.length === 0 || e.filters.some((e) => e.name === t);
52222
52226
  }
52223
52227
  function qY(e, t) {
52224
52228
  switch (e) {
@@ -56963,7 +56967,7 @@ function $1(e) {
56963
56967
  }
56964
56968
  function e0(e) {
56965
56969
  let t = $1(e).split(".");
56966
- return t.length === 4 ? t.every((e) => /^\d+$/.test(e) && Number(e) >= 0 && Number(e) <= 255) : !1;
56970
+ return t.length === 4 && t.every((e) => /^\d+$/.test(e) && Number(e) >= 0 && Number(e) <= 255);
56967
56971
  }
56968
56972
  function t0(e) {
56969
56973
  let t = $1(e);
@@ -58175,7 +58179,7 @@ async function Y0(e, t, n, r, i) {
58175
58179
  //#endregion
58176
58180
  //#region src/authentication-flows/silent.ts
58177
58181
  function X0(e, t) {
58178
- return t === fn.QUERY ? !1 : t === fn.FRAGMENT ? !0 : e !== dn.CODE;
58182
+ return t === fn.QUERY ? !1 : t === fn.FRAGMENT || e !== dn.CODE;
58179
58183
  }
58180
58184
  async function Z0({ ctx: e, client: t, session: n, redirect_uri: r, state: i, nonce: a, code_challenge_method: o, code_challenge: s, audience: c, scope: l, response_type: u, response_mode: d, organization: f, max_age: p }) {
58181
58185
  let { env: m } = e, h = new URL(r), g = `${h.protocol}//${h.host}`, _ = d === fn.WEB_MESSAGE;
@@ -58282,6 +58286,7 @@ async function Z0({ ctx: e, client: t, session: n, redirect_uri: r, state: i, no
58282
58286
  expires_at: new Date(Date.now() + 300 * 1e3).toISOString(),
58283
58287
  session_id: n.id,
58284
58288
  ...re ? { auth_connection: re } : {},
58289
+ ...ne?.auth_strategy ? { auth_strategy: ne.auth_strategy } : {},
58285
58290
  ip: e.var.ip,
58286
58291
  useragent: e.var.useragent
58287
58292
  }), ae = p === void 0 ? void 0 : Math.floor(new Date(n.authenticated_at).getTime() / 1e3), D = {
@@ -58338,26 +58343,28 @@ async function Z0({ ctx: e, client: t, session: n, redirect_uri: r, state: i, no
58338
58343
  last_user_agent: e.var.useragent || ""
58339
58344
  },
58340
58345
  idle_expires_at: de
58341
- }), de && await m.data.loginSessions.update(t.tenant.id, ie.id, { expires_at: de }), P(e, t.tenant.id, {
58346
+ });
58347
+ let fe = Math.max(de ? new Date(de).getTime() : 0, n.expires_at ? new Date(n.expires_at).getTime() : 0);
58348
+ fe > Date.now() && await m.data.loginSessions.update(t.tenant.id, ie.id, { expires_at: new Date(fe).toISOString() }), P(e, t.tenant.id, {
58342
58349
  type: M.SUCCESS_SILENT_AUTH,
58343
58350
  description: "Successful silent authentication"
58344
58351
  });
58345
- let fe = new Headers();
58352
+ let pe = new Headers();
58346
58353
  if (DN(t.tenant.id, n.id, e.var.host).forEach((e) => {
58347
- fe.append("set-cookie", e);
58354
+ pe.append("set-cookie", e);
58348
58355
  }), _) return _P(e, g, JSON.stringify({
58349
58356
  ...ue,
58350
58357
  state: i
58351
- }), fe);
58352
- let pe = {}, me = ue.code, he = ue.access_token, ge = ue.id_token;
58353
- if (se && typeof me == "string" && (pe.code = me), typeof he == "string" && (O && (pe.access_token = he, typeof ue.token_type == "string" && (pe.token_type = ue.token_type), typeof ue.expires_in == "number" && (pe.expires_in = String(ue.expires_in))), ce && typeof ge == "string" && (pe.id_token = ge)), i && (pe.state = i), (O || ce) && l && (pe.scope = l), d === fn.FORM_POST) return yP(r, pe, fe);
58354
- let _e = new URL(r);
58355
- if (X0(u, d)) _e.hash = new URLSearchParams(pe).toString();
58356
- else for (let [e, t] of Object.entries(pe)) _e.searchParams.set(e, t);
58357
- let ve = { Location: _e.toString() }, ye = fe.get("set-cookie");
58358
- return ye && (ve["set-cookie"] = ye), new Response(null, {
58358
+ }), pe);
58359
+ let me = {}, he = ue.code, ge = ue.access_token, _e = ue.id_token;
58360
+ if (se && typeof he == "string" && (me.code = he), typeof ge == "string" && (O && (me.access_token = ge, typeof ue.token_type == "string" && (me.token_type = ue.token_type), typeof ue.expires_in == "number" && (me.expires_in = String(ue.expires_in))), ce && typeof _e == "string" && (me.id_token = _e)), i && (me.state = i), (O || ce) && l && (me.scope = l), d === fn.FORM_POST) return yP(r, me, pe);
58361
+ let ve = new URL(r);
58362
+ if (X0(u, d)) ve.hash = new URLSearchParams(me).toString();
58363
+ else for (let [e, t] of Object.entries(me)) ve.searchParams.set(e, t);
58364
+ let ye = { Location: ve.toString() }, be = pe.get("set-cookie");
58365
+ return be && (ye["set-cookie"] = be), new Response(null, {
58359
58366
  status: 302,
58360
- headers: ve
58367
+ headers: ye
58361
58368
  });
58362
58369
  }
58363
58370
  //#endregion
@@ -66650,7 +66657,7 @@ var Ase = "var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{
66650
66657
  }
66651
66658
  function s(e, t) {
66652
66659
  var n = o(e);
66653
- return n ? n(t) : !0;
66660
+ return !n || n(t);
66654
66661
  }
66655
66662
  function c(e, t, r, i) {
66656
66663
  i === void 0 && (i = Infinity);
@@ -67629,7 +67636,7 @@ var Ase = "var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{
67629
67636
  return this.markDirty(), this;
67630
67637
  }
67631
67638
  insertBefore(e, t) {
67632
- let n = this.index(e), r = n === 0 ? "prepend" : !1, i = this.normalize(t, this.proxyOf.nodes[n], r).reverse();
67639
+ let n = this.index(e), r = n === 0 && "prepend", i = this.normalize(t, this.proxyOf.nodes[n], r).reverse();
67633
67640
  n = this.index(e);
67634
67641
  for (let e of i) this.proxyOf.nodes.splice(n, 0, e);
67635
67642
  let a;
@@ -68169,18 +68176,18 @@ var Ase = "var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{
68169
68176
  });
68170
68177
  }
68171
68178
  isAnnotation() {
68172
- return this.isInline() ? !0 : this.mapOpts.annotation === void 0 ? this.previous().length ? this.previous().some((e) => e.annotation) : !0 : this.mapOpts.annotation;
68179
+ return this.isInline() ? !0 : this.mapOpts.annotation === void 0 ? !this.previous().length || this.previous().some((e) => e.annotation) : this.mapOpts.annotation;
68173
68180
  }
68174
68181
  isInline() {
68175
68182
  if (this.mapOpts.inline !== void 0) return this.mapOpts.inline;
68176
68183
  let e = this.mapOpts.annotation;
68177
- return e !== void 0 && e !== !0 ? !1 : this.previous().length ? this.previous().some((e) => e.inline) : !0;
68184
+ return e !== void 0 && e !== !0 ? !1 : !this.previous().length || this.previous().some((e) => e.inline);
68178
68185
  }
68179
68186
  isMap() {
68180
68187
  return this.opts.map === void 0 ? this.previous().length > 0 : !!this.opts.map;
68181
68188
  }
68182
68189
  isSourcesContent() {
68183
- return this.mapOpts.sourcesContent === void 0 ? this.previous().length ? this.previous().some((e) => e.withContent()) : !0 : this.mapOpts.sourcesContent;
68190
+ return this.mapOpts.sourcesContent === void 0 ? !this.previous().length || this.previous().some((e) => e.withContent()) : this.mapOpts.sourcesContent;
68184
68191
  }
68185
68192
  outputFile() {
68186
68193
  return this.opts.to ? this.path(this.opts.to) : this.opts.from ? this.path(this.opts.from) : "to.css";
@@ -69504,10 +69511,10 @@ var Ase = "var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{
69504
69511
  return typeof n[0] == "object" ? (i = n.find(function(t) {
69505
69512
  return t.value === null || t.value === void 0 ? !1 : t.value.toString() === e;
69506
69513
  }), i == null ? r : i.value) : (i = n.find(function(t) {
69507
- return t == null ? !1 : t.toString() === e;
69514
+ return t != null && t.toString() === e;
69508
69515
  }), i === void 0 ? r : i);
69509
69516
  }, t.boolean = function(e, n) {
69510
- return e === !0 ? !0 : e === !1 ? !1 : (e = t.string(e, n), e === n ? e === void 0 ? !1 : e : (e = e.toLowerCase().charAt(0), e === "" || e === "n" || e === "0" || e === "f" ? !1 : e === "t" || e === "y" || e === "1"));
69517
+ return e === !0 ? !0 : e === !1 ? !1 : (e = t.string(e, n), e === n ? e !== void 0 && e : (e = e.toLowerCase().charAt(0), e === "" || e === "n" || e === "0" || e === "f" ? !1 : e === "t" || e === "y" || e === "1"));
69511
69518
  }, t.addBooleanFilterToCriteria = function(e, n, r, i) {
69512
69519
  i === void 0 && (i = null);
69513
69520
  let a = typeof e == "object" && e ? e[n] : e;
@@ -69952,7 +69959,7 @@ var Ase = "var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{
69952
69959
  parseStyleAttributes: !0,
69953
69960
  preserveEscapedAttributes: !1
69954
69961
  }, _.simpleTransform = function(e, t, n) {
69955
- return n = n === void 0 ? !0 : n, t ||= {}, function(r, i) {
69962
+ return n = n === void 0 || n, t ||= {}, function(r, i) {
69956
69963
  let a;
69957
69964
  if (n) for (a in t) i[a] = t[a];
69958
69965
  else i = t;
@@ -72310,7 +72317,7 @@ function Lle(e) {
72310
72317
  //#endregion
72311
72318
  //#region ../../node_modules/.pnpm/@simplewebauthn+server@13.3.2/node_modules/@simplewebauthn/server/esm/helpers/iso/isoUint8Array.js
72312
72319
  function G8(e, t) {
72313
- return e.length == t.length ? e.every((e, n) => e === t[n]) : !1;
72320
+ return e.length == t.length && e.every((e, n) => e === t[n]);
72314
72321
  }
72315
72322
  function K8(e) {
72316
72323
  return Array.from(e, (e) => e.toString(16).padStart(2, "0")).join("");
@@ -74612,7 +74619,7 @@ async function I5(e) {
74612
74619
  }
74613
74620
  let E = [];
74614
74621
  if (y) {
74615
- let t = e.connections.find((e) => e.options?.authentication_methods?.passkey?.enabled)?.options?.passkey_options?.challenge_ui, n = S ? x.length > 0 : !0;
74622
+ let t = e.connections.find((e) => e.options?.authentication_methods?.passkey?.enabled)?.options?.passkey_options?.challenge_ui, n = !S || x.length > 0;
74616
74623
  t !== "autofill" && n && E.push({
74617
74624
  id: "passkey-link",
74618
74625
  text: "",
@@ -80162,7 +80169,7 @@ var Ade = {
80162
80169
  }
80163
80170
  }, R7 = "/u2";
80164
80171
  function jde(e, t) {
80165
- return t === fn.QUERY ? !1 : t === fn.FRAGMENT ? !0 : e !== dn.CODE;
80172
+ return t === fn.QUERY ? !1 : t === fn.FRAGMENT || e !== dn.CODE;
80166
80173
  }
80167
80174
  function z7(e, t, n, r) {
80168
80175
  let i = new URL(e);
@@ -82597,11 +82604,11 @@ var y9 = /* @__PURE__ */ g9(((e) => {
82597
82604
  }
82598
82605
  n += e[t];
82599
82606
  }
82600
- return r === "" ? {
82607
+ return r === "" && {
82601
82608
  value: n,
82602
82609
  index: t,
82603
82610
  tagClosed: i
82604
- } : !1;
82611
+ };
82605
82612
  }
82606
82613
  var l = /* @__PURE__ */ RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g");
82607
82614
  function u(e, n) {
@@ -83283,7 +83290,7 @@ var y9 = /* @__PURE__ */ g9(((e) => {
83283
83290
  function S(e, t, r) {
83284
83291
  if (t && typeof e == "string") {
83285
83292
  let t = e.trim();
83286
- return t === "true" ? !0 : t === "false" ? !1 : a(e, r);
83293
+ return t === "true" || t !== "false" && a(e, r);
83287
83294
  } else if (n.isExist(e)) return e;
83288
83295
  else return "";
83289
83296
  }