@providame/vue 0.0.13 → 0.0.14

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.
@@ -81,42 +81,42 @@ var z = class extends Error {
81
81
  }, ie = class extends z {
82
82
  static code = "ERR_JWT_INVALID";
83
83
  code = "ERR_JWT_INVALID";
84
- }, G = class extends z {
84
+ }, ae = class extends z {
85
85
  static code = "ERR_JWKS_INVALID";
86
86
  code = "ERR_JWKS_INVALID";
87
- }, K = class extends z {
87
+ }, G = class extends z {
88
88
  static code = "ERR_JWKS_NO_MATCHING_KEY";
89
89
  code = "ERR_JWKS_NO_MATCHING_KEY";
90
90
  constructor(e = "no applicable key found in the JSON Web Key Set", t) {
91
91
  super(e, t);
92
92
  }
93
- }, q = class extends z {
93
+ }, oe = class extends z {
94
94
  [Symbol.asyncIterator];
95
95
  static code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
96
96
  code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
97
97
  constructor(e = "multiple matching keys found in the JSON Web Key Set", t) {
98
98
  super(e, t);
99
99
  }
100
- }, ae = class extends z {
100
+ }, K = class extends z {
101
101
  static code = "ERR_JWKS_TIMEOUT";
102
102
  code = "ERR_JWKS_TIMEOUT";
103
103
  constructor(e = "request timed out", t) {
104
104
  super(e, t);
105
105
  }
106
- }, oe = class extends z {
106
+ }, se = class extends z {
107
107
  static code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
108
108
  code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
109
109
  constructor(e = "signature verification failed", t) {
110
110
  super(e, t);
111
111
  }
112
- }, J = (e, t = "algorithm.name") => /* @__PURE__ */ TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`), Y = (e, t) => e.name === t;
113
- function se(e) {
112
+ }, q = (e, t = "algorithm.name") => /* @__PURE__ */ TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`), J = (e, t) => e.name === t;
113
+ function ce(e) {
114
114
  return parseInt(e.name.slice(4), 10);
115
115
  }
116
- function X(e, t) {
117
- if (se(e.hash) !== t) throw J(`SHA-${t}`, "algorithm.hash");
116
+ function Y(e, t) {
117
+ if (ce(e.hash) !== t) throw q(`SHA-${t}`, "algorithm.hash");
118
118
  }
119
- function ce(e) {
119
+ function le(e) {
120
120
  switch (e) {
121
121
  case "ES256": return "P-256";
122
122
  case "ES384": return "P-384";
@@ -124,69 +124,69 @@ function ce(e) {
124
124
  default: throw Error("unreachable");
125
125
  }
126
126
  }
127
- function le(e, t) {
127
+ function ue(e, t) {
128
128
  if (t && !e.usages.includes(t)) throw TypeError(`CryptoKey does not support this operation, its usages must include ${t}.`);
129
129
  }
130
- function ue(e, t, n) {
130
+ function de(e, t, n) {
131
131
  switch (t) {
132
132
  case "HS256":
133
133
  case "HS384":
134
134
  case "HS512":
135
- if (!Y(e.algorithm, "HMAC")) throw J("HMAC");
136
- X(e.algorithm, parseInt(t.slice(2), 10));
135
+ if (!J(e.algorithm, "HMAC")) throw q("HMAC");
136
+ Y(e.algorithm, parseInt(t.slice(2), 10));
137
137
  break;
138
138
  case "RS256":
139
139
  case "RS384":
140
140
  case "RS512":
141
- if (!Y(e.algorithm, "RSASSA-PKCS1-v1_5")) throw J("RSASSA-PKCS1-v1_5");
142
- X(e.algorithm, parseInt(t.slice(2), 10));
141
+ if (!J(e.algorithm, "RSASSA-PKCS1-v1_5")) throw q("RSASSA-PKCS1-v1_5");
142
+ Y(e.algorithm, parseInt(t.slice(2), 10));
143
143
  break;
144
144
  case "PS256":
145
145
  case "PS384":
146
146
  case "PS512":
147
- if (!Y(e.algorithm, "RSA-PSS")) throw J("RSA-PSS");
148
- X(e.algorithm, parseInt(t.slice(2), 10));
147
+ if (!J(e.algorithm, "RSA-PSS")) throw q("RSA-PSS");
148
+ Y(e.algorithm, parseInt(t.slice(2), 10));
149
149
  break;
150
150
  case "Ed25519":
151
151
  case "EdDSA":
152
- if (!Y(e.algorithm, "Ed25519")) throw J("Ed25519");
152
+ if (!J(e.algorithm, "Ed25519")) throw q("Ed25519");
153
153
  break;
154
154
  case "ML-DSA-44":
155
155
  case "ML-DSA-65":
156
156
  case "ML-DSA-87":
157
- if (!Y(e.algorithm, t)) throw J(t);
157
+ if (!J(e.algorithm, t)) throw q(t);
158
158
  break;
159
159
  case "ES256":
160
160
  case "ES384":
161
161
  case "ES512": {
162
- if (!Y(e.algorithm, "ECDSA")) throw J("ECDSA");
163
- let n = ce(t);
164
- if (e.algorithm.namedCurve !== n) throw J(n, "algorithm.namedCurve");
162
+ if (!J(e.algorithm, "ECDSA")) throw q("ECDSA");
163
+ let n = le(t);
164
+ if (e.algorithm.namedCurve !== n) throw q(n, "algorithm.namedCurve");
165
165
  break;
166
166
  }
167
167
  default: throw TypeError("CryptoKey does not support this operation");
168
168
  }
169
- le(e, n);
169
+ ue(e, n);
170
170
  }
171
171
  //#endregion
172
172
  //#region ../core/node_modules/jose/dist/webapi/lib/invalid_key_input.js
173
- function de(e, t, ...n) {
173
+ function fe(e, t, ...n) {
174
174
  if (n = n.filter(Boolean), n.length > 2) {
175
175
  let t = n.pop();
176
176
  e += `one of type ${n.join(", ")}, or ${t}.`;
177
177
  } else n.length === 2 ? e += `one of type ${n[0]} or ${n[1]}.` : e += `of type ${n[0]}.`;
178
178
  return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t && t.constructor?.name && (e += ` Received an instance of ${t.constructor.name}`), e;
179
179
  }
180
- var fe = (e, ...t) => de("Key must be ", e, ...t), pe = (e, t, ...n) => de(`Key for the ${e} algorithm must be `, t, ...n);
180
+ var pe = (e, ...t) => fe("Key must be ", e, ...t), me = (e, t, ...n) => fe(`Key for the ${e} algorithm must be `, t, ...n);
181
181
  //#endregion
182
182
  //#region ../core/node_modules/jose/dist/webapi/lib/signing.js
183
- function me(e, t) {
183
+ function he(e, t) {
184
184
  if (e.startsWith("RS") || e.startsWith("PS")) {
185
185
  let { modulusLength: n } = t.algorithm;
186
186
  if (typeof n != "number" || n < 2048) throw TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
187
187
  }
188
188
  }
189
- function he(e, t) {
189
+ function ge(e, t) {
190
190
  let n = `SHA-${e.slice(-3)}`;
191
191
  switch (e) {
192
192
  case "HS256":
@@ -223,20 +223,20 @@ function he(e, t) {
223
223
  default: throw new U(`alg ${e} is not supported either by JOSE or your javascript runtime`);
224
224
  }
225
225
  }
226
- async function ge(e, t, n) {
226
+ async function _e(e, t, n) {
227
227
  if (t instanceof Uint8Array) {
228
- if (!e.startsWith("HS")) throw TypeError(fe(t, "CryptoKey", "KeyObject", "JSON Web Key"));
228
+ if (!e.startsWith("HS")) throw TypeError(pe(t, "CryptoKey", "KeyObject", "JSON Web Key"));
229
229
  return crypto.subtle.importKey("raw", t, {
230
230
  hash: `SHA-${e.slice(-3)}`,
231
231
  name: "HMAC"
232
232
  }, !1, [n]);
233
233
  }
234
- return ue(t, e, n), t;
234
+ return de(t, e, n), t;
235
235
  }
236
- async function _e(e, t, n, r) {
237
- let i = await ge(e, t, "verify");
238
- me(e, i);
239
- let a = he(e, i.algorithm);
236
+ async function ve(e, t, n, r) {
237
+ let i = await _e(e, t, "verify");
238
+ he(e, i);
239
+ let a = ge(e, i.algorithm);
240
240
  try {
241
241
  return await crypto.subtle.verify(a, i, n, r);
242
242
  } catch {
@@ -245,7 +245,7 @@ async function _e(e, t, n, r) {
245
245
  }
246
246
  //#endregion
247
247
  //#region ../core/node_modules/jose/dist/webapi/lib/helpers.js
248
- function ve(e, t, n) {
248
+ function ye(e, t, n) {
249
249
  try {
250
250
  return R(e);
251
251
  } catch {
@@ -254,9 +254,9 @@ function ve(e, t, n) {
254
254
  }
255
255
  //#endregion
256
256
  //#region ../core/node_modules/jose/dist/webapi/lib/type_checks.js
257
- var ye = (e) => typeof e == "object" && !!e;
258
- function be(e) {
259
- if (!ye(e) || Object.prototype.toString.call(e) !== "[object Object]") return !1;
257
+ var be = (e) => typeof e == "object" && !!e;
258
+ function X(e) {
259
+ if (!be(e) || Object.prototype.toString.call(e) !== "[object Object]") return !1;
260
260
  if (Object.getPrototypeOf(e) === null) return !0;
261
261
  let t = e;
262
262
  for (; Object.getPrototypeOf(t) !== null;) t = Object.getPrototypeOf(t);
@@ -279,7 +279,7 @@ function xe(...e) {
279
279
  }
280
280
  return !0;
281
281
  }
282
- var Se = (e) => be(e) && typeof e.kty == "string", Ce = (e) => e.kty !== "oct" && (e.kty === "AKP" && typeof e.priv == "string" || typeof e.d == "string"), we = (e) => e.kty !== "oct" && e.d === void 0 && e.priv === void 0, Te = (e) => e.kty === "oct" && typeof e.k == "string", Ee = (e) => {
282
+ var Se = (e) => X(e) && typeof e.kty == "string", Ce = (e) => e.kty !== "oct" && (e.kty === "AKP" && typeof e.priv == "string" || typeof e.d == "string"), we = (e) => e.kty !== "oct" && e.d === void 0 && e.priv === void 0, Te = (e) => e.kty === "oct" && typeof e.k == "string", Ee = (e) => {
283
283
  if (e?.[Symbol.toStringTag] === "CryptoKey") return !0;
284
284
  try {
285
285
  return e instanceof CryptoKey;
@@ -332,7 +332,7 @@ var Se = (e) => be(e) && typeof e.kty == "string", Ce = (e) => e.kty !== "oct" &
332
332
  if (Te(t) && Ae(e, t, n)) return;
333
333
  throw TypeError("JSON Web Key for symmetric algorithms must have JWK \"kty\" (Key Type) equal to \"oct\" and the JWK \"k\" (Key Value) present");
334
334
  }
335
- if (!Oe(t)) throw TypeError(pe(e, t, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array"));
335
+ if (!Oe(t)) throw TypeError(me(e, t, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array"));
336
336
  if (t.type !== "secret") throw TypeError(`${ke(t)} instances for symmetric algorithms must be of type "secret"`);
337
337
  }
338
338
  }, Me = (e, t, n) => {
@@ -346,7 +346,7 @@ var Se = (e) => be(e) && typeof e.kty == "string", Ce = (e) => e.kty !== "oct" &
346
346
  if (we(t) && Ae(e, t, n)) return;
347
347
  throw TypeError("JSON Web Key for this operation must be a public JWK");
348
348
  }
349
- if (!Oe(t)) throw TypeError(pe(e, t, "CryptoKey", "KeyObject", "JSON Web Key"));
349
+ if (!Oe(t)) throw TypeError(me(e, t, "CryptoKey", "KeyObject", "JSON Web Key"));
350
350
  if (t.type === "secret") throw TypeError(`${ke(t)} instances for asymmetric algorithms must not be of type "secret"`);
351
351
  if (t.type === "public") switch (n) {
352
352
  case "sign": throw TypeError(`${ke(t)} instances for asymmetric algorithm signing must be of type "private"`);
@@ -598,12 +598,12 @@ async function Ue(e, t) {
598
598
  //#endregion
599
599
  //#region ../core/node_modules/jose/dist/webapi/jws/flattened/verify.js
600
600
  async function We(e, t, n) {
601
- if (!be(e)) throw new W("Flattened JWS must be an object");
601
+ if (!X(e)) throw new W("Flattened JWS must be an object");
602
602
  if (e.protected === void 0 && e.header === void 0) throw new W("Flattened JWS must have either of the \"protected\" or \"header\" members");
603
603
  if (e.protected !== void 0 && typeof e.protected != "string") throw new W("JWS Protected Header incorrect type");
604
604
  if (e.payload === void 0) throw new W("JWS Payload missing");
605
605
  if (typeof e.signature != "string") throw new W("JWS Signature missing or incorrect type");
606
- if (e.header !== void 0 && !be(e.header)) throw new W("JWS Unprotected Header incorrect type");
606
+ if (e.header !== void 0 && !X(e.header)) throw new W("JWS Unprotected Header incorrect type");
607
607
  let r = {};
608
608
  if (e.protected) try {
609
609
  let t = R(e.protected);
@@ -626,10 +626,10 @@ async function We(e, t, n) {
626
626
  } else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array)) throw new W("JWS Payload must be a string or an Uint8Array instance");
627
627
  let l = !1;
628
628
  typeof t == "function" && (t = await t(r, e), l = !0), Ne(s, t, "verify");
629
- let u = L(e.protected === void 0 ? /* @__PURE__ */ new Uint8Array() : ne(e.protected), ne("."), typeof e.payload == "string" ? o ? ne(e.payload) : te.encode(e.payload) : e.payload), d = ve(e.signature, "signature", W), f = await Ue(t, s);
630
- if (!await _e(s, f, d, u)) throw new oe();
629
+ let u = L(e.protected === void 0 ? /* @__PURE__ */ new Uint8Array() : ne(e.protected), ne("."), typeof e.payload == "string" ? o ? ne(e.payload) : te.encode(e.payload) : e.payload), d = ye(e.signature, "signature", W), f = await Ue(t, s);
630
+ if (!await ve(s, f, d, u)) throw new se();
631
631
  let p;
632
- p = o ? ve(e.payload, "payload", W) : typeof e.payload == "string" ? te.encode(e.payload) : e.payload;
632
+ p = o ? ye(e.payload, "payload", W) : typeof e.payload == "string" ? te.encode(e.payload) : e.payload;
633
633
  let m = { payload: p };
634
634
  return e.protected !== void 0 && (m.protectedHeader = r), e.header !== void 0 && (m.unprotectedHeader = e.header), l ? {
635
635
  ...m,
@@ -706,7 +706,7 @@ function nt(e, t, n = {}) {
706
706
  try {
707
707
  r = JSON.parse(I.decode(t));
708
708
  } catch {}
709
- if (!be(r)) throw new ie("JWT Claims Set must be a top-level JSON object");
709
+ if (!X(r)) throw new ie("JWT Claims Set must be a top-level JSON object");
710
710
  let { typ: i } = n;
711
711
  if (i && (typeof e.typ != "string" || et(e.typ) !== et(i))) throw new B("unexpected \"typ\" JWT header value", r, "typ", "check_failed");
712
712
  let { requiredClaims: a = [], issuer: o, subject: s, audience: c, maxTokenAge: l } = n, u = [...a];
@@ -762,7 +762,7 @@ async function rt(e, t, n) {
762
762
  //#endregion
763
763
  //#region ../core/node_modules/jose/dist/webapi/key/import.js
764
764
  async function it(e, t, n) {
765
- if (!be(e)) throw TypeError("JWK must be an object");
765
+ if (!X(e)) throw TypeError("JWK must be an object");
766
766
  let r;
767
767
  switch (t ??= e.alg, r ??= n?.extractable ?? e.ext, e.kty) {
768
768
  case "oct":
@@ -807,13 +807,13 @@ function ot(e) {
807
807
  return e && typeof e == "object" && Array.isArray(e.keys) && e.keys.every(st);
808
808
  }
809
809
  function st(e) {
810
- return be(e);
810
+ return X(e);
811
811
  }
812
812
  var ct = class {
813
813
  #e;
814
814
  #t = /* @__PURE__ */ new WeakMap();
815
815
  constructor(e) {
816
- if (!ot(e)) throw new G("JSON Web Key Set malformed");
816
+ if (!ot(e)) throw new ae("JSON Web Key Set malformed");
817
817
  this.#e = structuredClone(e);
818
818
  }
819
819
  jwks() {
@@ -842,9 +842,9 @@ var ct = class {
842
842
  }
843
843
  return t;
844
844
  }), { 0: o, length: s } = a;
845
- if (s === 0) throw new K();
845
+ if (s === 0) throw new G();
846
846
  if (s !== 1) {
847
- let e = new q(), t = this.#t;
847
+ let e = new oe(), t = this.#t;
848
848
  throw e[Symbol.asyncIterator] = async function* () {
849
849
  for (let e of a) try {
850
850
  yield await lt(t, e, n);
@@ -861,7 +861,7 @@ async function lt(e, t, n) {
861
861
  ...t,
862
862
  ext: !0
863
863
  }, n);
864
- if (e instanceof Uint8Array || e.type !== "public") throw new G("JSON Web Key Set members must be public keys");
864
+ if (e instanceof Uint8Array || e.type !== "public") throw new ae("JSON Web Key Set members must be public keys");
865
865
  r[n] = e;
866
866
  }
867
867
  return r[n];
@@ -890,7 +890,7 @@ async function mt(e, t, n, r = fetch) {
890
890
  redirect: "manual",
891
891
  headers: t
892
892
  }).catch((e) => {
893
- throw e.name === "TimeoutError" ? new ae() : e;
893
+ throw e.name === "TimeoutError" ? new K() : e;
894
894
  });
895
895
  if (i.status !== 200) throw new z("Expected 200 OK from the JSON Web Key Set HTTP response");
896
896
  try {
@@ -901,7 +901,7 @@ async function mt(e, t, n, r = fetch) {
901
901
  }
902
902
  var ht = Symbol();
903
903
  function gt(e, t) {
904
- return !(typeof e != "object" || !e || !("uat" in e) || typeof e.uat != "number" || Date.now() - e.uat >= t || !("jwks" in e) || !be(e.jwks) || !Array.isArray(e.jwks.keys) || !Array.prototype.every.call(e.jwks.keys, be));
904
+ return !(typeof e != "object" || !e || !("uat" in e) || typeof e.uat != "number" || Date.now() - e.uat >= t || !("jwks" in e) || !X(e.jwks) || !Array.isArray(e.jwks.keys) || !Array.prototype.every.call(e.jwks.keys, X));
905
905
  }
906
906
  var _t = class {
907
907
  #e;
@@ -935,7 +935,7 @@ var _t = class {
935
935
  try {
936
936
  return await this.#c(e, t);
937
937
  } catch (n) {
938
- if (n instanceof K && this.coolingDown() === !1) return await this.reload(), this.#c(e, t);
938
+ if (n instanceof G && this.coolingDown() === !1) return await this.reload(), this.#c(e, t);
939
939
  throw n;
940
940
  }
941
941
  }
@@ -3014,30 +3014,30 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3014
3014
  e && (e.querySelector("input:not([disabled])") ?? e.querySelector("button:not([disabled])"))?.focus();
3015
3015
  });
3016
3016
  }
3017
- let R = S(""), z = S(""), B = S(""), V = S(""), H = S(!1), U = S(""), W = S(!1), ie = Lt(), G = n(() => O.status.value === "idle" || O.status.value === "needs_first_factor"), K = S(!1), q = S(""), ae = S(""), oe = S(""), J = S(!1), Y = S(""), se = S(""), X = S(!1), ce = S(""), le = n(() => G.value ? "combined" : O.status.value);
3018
- j(() => [le.value, K.value], re), j(() => N.status.value, re);
3019
- let ue = S(0), de;
3020
- function fe() {
3021
- clearInterval(de), ue.value = Vi, de = setInterval(() => {
3022
- --ue.value, ue.value <= 0 && clearInterval(de);
3017
+ let R = S(""), z = S(""), B = S(""), V = S(""), H = S(!1), U = S(""), W = S(!1), ie = Lt(), ae = n(() => !!w?.vnode.props?.onComplete && O.status.value === "complete" && !O.recoveryCodes.value), G = n(() => O.loading.value || ae.value), oe = n(() => O.status.value === "idle" || O.status.value === "needs_first_factor" || ae.value), K = S(!1), se = S(""), q = S(""), J = S(""), ce = S(!1), Y = S(""), le = S(""), ue = S(!1), de = S(""), fe = n(() => oe.value ? "combined" : O.status.value);
3018
+ j(() => [fe.value, K.value], re), j(() => N.status.value, re);
3019
+ let pe = S(0), me;
3020
+ function he() {
3021
+ clearInterval(me), pe.value = Vi, me = setInterval(() => {
3022
+ --pe.value, pe.value <= 0 && clearInterval(me);
3023
3023
  }, 1e3);
3024
3024
  }
3025
- y(() => clearInterval(de)), j(() => O.isComplete.value, (e) => {
3025
+ y(() => clearInterval(me)), j(() => O.isComplete.value, (e) => {
3026
3026
  e && O.session.value && E("complete", O.session.value);
3027
3027
  }), j(() => N.isComplete.value, (e) => {
3028
3028
  e && N.session.value && E("complete", N.session.value);
3029
3029
  });
3030
- async function pe() {
3030
+ async function ge() {
3031
3031
  try {
3032
3032
  await O.signInWithPasskey(R.value, window.location.hostname), O.status.value === "needs_mfa_enrollment" && !O.enrollment.value && await O.enrollTotp();
3033
3033
  } catch {}
3034
3034
  }
3035
- async function me() {
3035
+ async function _e() {
3036
3036
  try {
3037
3037
  await O.signInWithPassword(R.value, z.value), O.status.value === "needs_mfa_enrollment" && !O.enrollment.value && await O.enrollTotp();
3038
3038
  } catch {}
3039
3039
  }
3040
- async function he() {
3040
+ async function ve() {
3041
3041
  try {
3042
3042
  H.value ? await O.attemptSecondFactor({
3043
3043
  strategy: "backup_code",
@@ -3048,55 +3048,55 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3048
3048
  });
3049
3049
  } catch {}
3050
3050
  }
3051
- async function ge() {
3051
+ async function ye() {
3052
3052
  try {
3053
3053
  await O.verifyTotpEnrollment(U.value);
3054
3054
  } catch {}
3055
3055
  }
3056
- async function _e() {
3057
- K.value = !0, q.value = R.value;
3056
+ async function be() {
3057
+ K.value = !0, se.value = R.value;
3058
3058
  try {
3059
- await N.create({ email: R.value }), fe();
3059
+ await N.create({ email: R.value }), he();
3060
3060
  } catch {}
3061
3061
  }
3062
- function ve() {
3063
- K.value = !1, N.reset(), q.value = "", ae.value = "", oe.value = "", Y.value = "", se.value = "", X.value = !1, ce.value = "", clearInterval(de), ue.value = 0;
3062
+ function X() {
3063
+ K.value = !1, N.reset(), se.value = "", q.value = "", J.value = "", Y.value = "", le.value = "", ue.value = !1, de.value = "", clearInterval(me), pe.value = 0;
3064
3064
  }
3065
- async function ye() {
3065
+ async function xe() {
3066
3066
  try {
3067
- await N.resend(), fe();
3067
+ await N.resend(), he();
3068
3068
  } catch {}
3069
3069
  }
3070
- async function be() {
3070
+ async function Se() {
3071
3071
  try {
3072
- await N.create({ email: q.value }), fe();
3072
+ await N.create({ email: se.value }), he();
3073
3073
  } catch {}
3074
3074
  }
3075
- async function xe() {
3075
+ async function Ce() {
3076
3076
  try {
3077
3077
  await N.attempt({
3078
- code: ae.value,
3079
- password: oe.value
3078
+ code: q.value,
3079
+ password: J.value
3080
3080
  }), N.status.value === "needs_mfa_enrollment" && !N.enrollment.value && await N.enrollTotp();
3081
3081
  } catch {}
3082
3082
  }
3083
- async function Se() {
3083
+ async function we() {
3084
3084
  try {
3085
- X.value ? await N.attemptSecondFactor({
3085
+ ue.value ? await N.attemptSecondFactor({
3086
3086
  strategy: "backup_code",
3087
- code: se.value
3087
+ code: le.value
3088
3088
  }) : await N.attemptSecondFactor({
3089
3089
  strategy: "totp",
3090
3090
  code: Y.value
3091
3091
  });
3092
3092
  } catch {}
3093
3093
  }
3094
- async function Ce() {
3094
+ async function Te() {
3095
3095
  try {
3096
- await N.verifyTotpEnrollment(ce.value);
3096
+ await N.verifyTotpEnrollment(de.value);
3097
3097
  } catch {}
3098
3098
  }
3099
- async function we(e) {
3099
+ async function Ee(e) {
3100
3100
  try {
3101
3101
  await M.signIn(e);
3102
3102
  } catch {}
@@ -3145,7 +3145,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3145
3145
  K.value ? (b(), a(e, { key: 3 }, [k(N).status.value === "idle" && k(N).loading.value ? (b(), a("p", vi, "Sending reset code…")) : k(N).status.value === "idle" ? (b(), a("form", {
3146
3146
  key: 1,
3147
3147
  class: "mrd-form",
3148
- onSubmit: F(be, ["prevent"])
3148
+ onSubmit: F(Se, ["prevent"])
3149
3149
  }, [
3150
3150
  n[27] ||= o("label", {
3151
3151
  class: "mrd-label",
@@ -3153,7 +3153,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3153
3153
  }, "Email", -1),
3154
3154
  P(o("input", {
3155
3155
  id: "mrd-reset-email",
3156
- "onUpdate:modelValue": n[8] ||= (e) => q.value = e,
3156
+ "onUpdate:modelValue": n[8] ||= (e) => se.value = e,
3157
3157
  type: "email",
3158
3158
  autocomplete: "email",
3159
3159
  class: "mrd-input",
@@ -3161,7 +3161,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3161
3161
  required: "",
3162
3162
  "aria-invalid": !!k(N).error.value,
3163
3163
  "aria-describedby": k(N).error.value ? "mrd-signin-reset-error" : void 0
3164
- }, null, 8, yi), [[A, q.value]]),
3164
+ }, null, 8, yi), [[A, se.value]]),
3165
3165
  o("button", {
3166
3166
  class: "mrd-button",
3167
3167
  disabled: k(N).loading.value,
@@ -3170,16 +3170,16 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3170
3170
  ], 32)) : k(N).status.value === "needs_verification" ? (b(), a("form", {
3171
3171
  key: 2,
3172
3172
  class: "mrd-form",
3173
- onSubmit: F(xe, ["prevent"])
3173
+ onSubmit: F(Ce, ["prevent"])
3174
3174
  }, [
3175
- o("p", xi, "If an account exists for " + D(q.value) + ", we sent a reset code.", 1),
3175
+ o("p", xi, "If an account exists for " + D(se.value) + ", we sent a reset code.", 1),
3176
3176
  n[28] ||= o("label", {
3177
3177
  class: "mrd-label",
3178
3178
  for: "mrd-reset-code"
3179
3179
  }, "Reset code", -1),
3180
3180
  P(o("input", {
3181
3181
  id: "mrd-reset-code",
3182
- "onUpdate:modelValue": n[9] ||= (e) => ae.value = e,
3182
+ "onUpdate:modelValue": n[9] ||= (e) => q.value = e,
3183
3183
  inputmode: "numeric",
3184
3184
  autocomplete: "one-time-code",
3185
3185
  class: "mrd-input",
@@ -3187,27 +3187,27 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3187
3187
  required: "",
3188
3188
  "aria-invalid": !!k(N).error.value,
3189
3189
  "aria-describedby": k(N).error.value ? "mrd-signin-reset-error" : void 0
3190
- }, null, 8, Si), [[A, ae.value]]),
3190
+ }, null, 8, Si), [[A, q.value]]),
3191
3191
  n[29] ||= o("label", {
3192
3192
  class: "mrd-label",
3193
3193
  for: "mrd-reset-password"
3194
3194
  }, "New password", -1),
3195
3195
  o("div", Ci, [P(o("input", {
3196
3196
  id: "mrd-reset-password",
3197
- "onUpdate:modelValue": n[10] ||= (e) => oe.value = e,
3198
- type: J.value ? "text" : "password",
3197
+ "onUpdate:modelValue": n[10] ||= (e) => J.value = e,
3198
+ type: ce.value ? "text" : "password",
3199
3199
  autocomplete: "new-password",
3200
3200
  class: "mrd-input",
3201
3201
  minlength: "8",
3202
3202
  required: "",
3203
3203
  "aria-invalid": !!k(N).error.value,
3204
3204
  "aria-describedby": k(N).error.value ? "mrd-signin-reset-error" : void 0
3205
- }, null, 8, wi), [[ee, oe.value]]), o("button", {
3205
+ }, null, 8, wi), [[ee, J.value]]), o("button", {
3206
3206
  type: "button",
3207
3207
  class: "mrd-password-toggle",
3208
- "aria-label": J.value ? "Hide password" : "Show password",
3209
- onClick: n[11] ||= (e) => J.value = !J.value,
3210
- innerHTML: J.value ? k(nr) : k(tr)
3208
+ "aria-label": ce.value ? "Hide password" : "Show password",
3209
+ onClick: n[11] ||= (e) => ce.value = !ce.value,
3210
+ innerHTML: ce.value ? k(nr) : k(tr)
3211
3211
  }, null, 8, Ti)]),
3212
3212
  o("button", {
3213
3213
  class: "mrd-button",
@@ -3218,32 +3218,32 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3218
3218
  id: "mrd-reset-resend",
3219
3219
  type: "button",
3220
3220
  class: "mrd-link-button",
3221
- disabled: ue.value > 0,
3222
- onClick: ye
3223
- }, D(ue.value > 0 ? `Resend code (${ue.value}s)` : "Resend code"), 9, Oi), o("button", {
3221
+ disabled: pe.value > 0,
3222
+ onClick: xe
3223
+ }, D(pe.value > 0 ? `Resend code (${pe.value}s)` : "Resend code"), 9, Oi), o("button", {
3224
3224
  id: "mrd-back-to-sign-in-inline",
3225
3225
  type: "button",
3226
3226
  class: "mrd-link-button",
3227
- onClick: ve
3227
+ onClick: X
3228
3228
  }, " Back to sign in ")])
3229
3229
  ], 32)) : k(N).status.value === "needs_second_factor" ? (b(), a("form", {
3230
3230
  key: 3,
3231
3231
  class: "mrd-form",
3232
- onSubmit: F(Se, ["prevent"])
3232
+ onSubmit: F(we, ["prevent"])
3233
3233
  }, [
3234
- X.value ? (b(), a(e, { key: 1 }, [n[31] ||= o("label", {
3234
+ ue.value ? (b(), a(e, { key: 1 }, [n[31] ||= o("label", {
3235
3235
  class: "mrd-label",
3236
3236
  for: "mrd-reset-backup-code"
3237
3237
  }, "Backup code", -1), P(o("input", {
3238
3238
  id: "mrd-reset-backup-code",
3239
- "onUpdate:modelValue": n[13] ||= (e) => se.value = e,
3239
+ "onUpdate:modelValue": n[13] ||= (e) => le.value = e,
3240
3240
  autocomplete: "off",
3241
3241
  class: "mrd-input",
3242
3242
  placeholder: "xxxx-xxxx",
3243
3243
  required: "",
3244
3244
  "aria-invalid": !!k(N).error.value,
3245
3245
  "aria-describedby": k(N).error.value ? "mrd-signin-reset-error" : void 0
3246
- }, null, 8, Ai), [[A, se.value]])], 64)) : (b(), a(e, { key: 0 }, [n[30] ||= o("label", {
3246
+ }, null, 8, Ai), [[A, le.value]])], 64)) : (b(), a(e, { key: 0 }, [n[30] ||= o("label", {
3247
3247
  class: "mrd-label",
3248
3248
  for: "mrd-reset-2fa-code"
3249
3249
  }, "Authentication code", -1), P(o("input", {
@@ -3267,12 +3267,12 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3267
3267
  type: "button",
3268
3268
  class: "mrd-link-button",
3269
3269
  disabled: k(N).loading.value,
3270
- onClick: n[14] ||= (e) => X.value = !X.value
3271
- }, D(X.value ? "Use authenticator code instead" : "Use a backup code instead"), 9, Mi)
3270
+ onClick: n[14] ||= (e) => ue.value = !ue.value
3271
+ }, D(ue.value ? "Use authenticator code instead" : "Use a backup code instead"), 9, Mi)
3272
3272
  ], 32)) : k(N).status.value === "needs_mfa_enrollment" ? (b(), a("form", {
3273
3273
  key: 4,
3274
3274
  class: "mrd-form",
3275
- onSubmit: F(Ce, ["prevent"])
3275
+ onSubmit: F(Te, ["prevent"])
3276
3276
  }, [
3277
3277
  n[33] ||= o("p", { class: "mrd-hint" }, " This account requires a second factor. Add it to your authenticator app, then enter the code it generates. ", -1),
3278
3278
  k(N).enrollment.value ? (b(), a(e, { key: 0 }, [n[32] ||= o("p", { class: "mrd-label" }, "Secret key", -1), o("p", Ni, D(k(N).enrollment.value.secret), 1)], 64)) : i("", !0),
@@ -3282,7 +3282,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3282
3282
  }, "Authentication code", -1),
3283
3283
  P(o("input", {
3284
3284
  id: "mrd-reset-enroll-code",
3285
- "onUpdate:modelValue": n[15] ||= (e) => ce.value = e,
3285
+ "onUpdate:modelValue": n[15] ||= (e) => de.value = e,
3286
3286
  inputmode: "numeric",
3287
3287
  autocomplete: "one-time-code",
3288
3288
  class: "mrd-input",
@@ -3290,7 +3290,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3290
3290
  required: "",
3291
3291
  "aria-invalid": !!k(N).error.value,
3292
3292
  "aria-describedby": k(N).error.value ? "mrd-signin-reset-error" : void 0
3293
- }, null, 8, Pi), [[A, ce.value]]),
3293
+ }, null, 8, Pi), [[A, de.value]]),
3294
3294
  o("button", {
3295
3295
  class: "mrd-button",
3296
3296
  disabled: k(N).loading.value,
@@ -3301,25 +3301,25 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3301
3301
  id: "mrd-back-to-sign-in",
3302
3302
  type: "button",
3303
3303
  class: "mrd-link-button",
3304
- onClick: ve
3304
+ onClick: X
3305
3305
  }, " Back to sign in ")) : i("", !0)], 64)) : (b(), a(e, { key: 2 }, [
3306
- G.value && k(M).providers.value.length ? (b(), a("div", qr, [o("div", Jr, [(b(!0), a(e, null, C(k(M).providers.value, (e) => (b(), a("button", {
3306
+ oe.value && k(M).providers.value.length ? (b(), a("div", qr, [o("div", Jr, [(b(!0), a(e, null, C(k(M).providers.value, (e) => (b(), a("button", {
3307
3307
  key: e.provider,
3308
3308
  type: "button",
3309
3309
  class: "mrd-idp-button",
3310
3310
  title: `Continue with ${e.displayName}`,
3311
3311
  "aria-label": `Continue with ${e.displayName}`,
3312
3312
  disabled: k(M).loading.value || k(O).loading.value,
3313
- onClick: (t) => we(e.provider)
3313
+ onClick: (t) => Ee(e.provider)
3314
3314
  }, [k(ir)(e.provider) ? (b(), a("span", {
3315
3315
  key: 0,
3316
3316
  class: "mrd-idp-icon",
3317
3317
  innerHTML: k(ir)(e.provider)
3318
3318
  }, null, 8, Xr)) : (b(), a("span", Zr, D(e.displayName.charAt(0)), 1)), o("span", Qr, "Continue with " + D(e.displayName), 1)], 8, Yr))), 128))]), n[16] ||= o("div", { class: "mrd-divider" }, [o("span", null, "or continue with email")], -1)])) : i("", !0),
3319
- G.value ? (b(), a("form", {
3319
+ oe.value ? (b(), a("form", {
3320
3320
  key: 1,
3321
3321
  class: "mrd-form",
3322
- onSubmit: F(me, ["prevent"])
3322
+ onSubmit: F(_e, ["prevent"])
3323
3323
  }, [
3324
3324
  o("label", {
3325
3325
  class: m(["mrd-label", k(l).elementProps("formFieldLabel").class]),
@@ -3358,28 +3358,28 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3358
3358
  }, null, 8, ni)]),
3359
3359
  o("button", {
3360
3360
  class: m(["mrd-button", k(l).elementProps("formButtonPrimary").class]),
3361
- disabled: k(O).loading.value || !R.value || !z.value,
3361
+ disabled: G.value || !R.value || !z.value,
3362
3362
  type: "submit"
3363
- }, D(k(O).loading.value ? "…" : "Sign in"), 11, ri),
3363
+ }, D(G.value ? "…" : "Sign in"), 11, ri),
3364
3364
  k(ie) ? (b(), a("button", {
3365
3365
  key: 0,
3366
3366
  type: "button",
3367
3367
  class: "mrd-button-secondary",
3368
3368
  "data-mrd-action": "sign-in-with-passkey",
3369
- disabled: k(O).loading.value || !R.value,
3370
- onClick: pe
3369
+ disabled: G.value || !R.value,
3370
+ onClick: ge
3371
3371
  }, " Sign in with a passkey ", 8, ii)) : i("", !0),
3372
3372
  o("button", {
3373
3373
  id: "mrd-forgot-password",
3374
3374
  type: "button",
3375
3375
  class: m(["mrd-link-button", k(l).elementProps("footerActionLink").class]),
3376
3376
  disabled: k(O).loading.value,
3377
- onClick: _e
3377
+ onClick: be
3378
3378
  }, " Forgot password? ", 10, ai)
3379
3379
  ], 32)) : k(O).status.value === "needs_second_factor" ? (b(), a("form", {
3380
3380
  key: 2,
3381
3381
  class: "mrd-form",
3382
- onSubmit: F(he, ["prevent"])
3382
+ onSubmit: F(ve, ["prevent"])
3383
3383
  }, [
3384
3384
  H.value ? (b(), a(e, { key: 1 }, [n[19] ||= o("label", {
3385
3385
  class: "mrd-label",
@@ -3422,7 +3422,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3422
3422
  ], 32)) : k(O).status.value === "needs_mfa_enrollment" ? (b(), a("form", {
3423
3423
  key: 3,
3424
3424
  class: "mrd-form",
3425
- onSubmit: F(ge, ["prevent"])
3425
+ onSubmit: F(ye, ["prevent"])
3426
3426
  }, [
3427
3427
  n[21] ||= o("p", { class: "mrd-hint" }, " This account requires a second factor. Add it to your authenticator app, then enter the code it generates. ", -1),
3428
3428
  k(O).enrollment.value ? (b(), a(e, { key: 0 }, [n[20] ||= o("p", { class: "mrd-label" }, "Secret key", -1), o("p", ui, D(k(O).enrollment.value.secret), 1)], 64)) : i("", !0),
@@ -3548,20 +3548,20 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3548
3548
  },
3549
3549
  emits: ["complete", "switchToSignIn"],
3550
3550
  setup(t, { emit: c }) {
3551
- let l = t, d = Sn(void 0, "signUp", l.appearance), f = Rr(), g = n(() => l.logo ?? br(f.value.logoUrl)), v = n(() => l.logo ? void 0 : br(f.value.logoUrlDark)), y = n(() => l.title ?? (f.value.appName ? `Create your ${f.value.appName} account` : "Create your account")), x = n(() => Sr(l.signInUrl)), w = u(), T = n(() => !!w?.vnode.props?.onSwitchToSignIn), E = c, O = Or(), M = Dr(), N = Q(), te = S(""), I = S(""), L = S(!1), ne = S(""), re = S(""), R = S(""), z = S(""), B = S(""), V = S(""), H = S(""), U = S(""), W = S(""), ie = S(""), G = S(""), K = S(!1), q = S(""), ae = S(null);
3552
- function oe() {
3551
+ let l = t, d = Sn(void 0, "signUp", l.appearance), f = Rr(), g = n(() => l.logo ?? br(f.value.logoUrl)), v = n(() => l.logo ? void 0 : br(f.value.logoUrlDark)), y = n(() => l.title ?? (f.value.appName ? `Create your ${f.value.appName} account` : "Create your account")), x = n(() => Sr(l.signInUrl)), w = u(), T = n(() => !!w?.vnode.props?.onSwitchToSignIn), E = c, O = Or(), M = Dr(), N = Q(), te = S(""), I = S(""), L = S(!1), ne = S(""), re = S(""), R = S(""), z = S(""), B = S(""), V = S(""), H = S(""), U = S(""), W = S(""), ie = S(""), ae = S(""), G = S(!1), oe = S(""), K = S(null);
3552
+ function se() {
3553
3553
  p(() => {
3554
- let e = ae.value;
3554
+ let e = K.value;
3555
3555
  e && (e.querySelector("input:not([disabled])") ?? e.querySelector("button:not([disabled])"))?.focus();
3556
3556
  });
3557
3557
  }
3558
- j(() => O.status.value, oe), _(async () => {
3558
+ j(() => O.status.value, se), _(async () => {
3559
3559
  try {
3560
3560
  let e = await N.configuration();
3561
3561
  z.value = e.turnstileSiteKey ?? "", V.value = br(e.tosUrl) ?? "", H.value = br(e.privacyUrl) ?? "", U.value = br(e.helpUrl) ?? "", W.value = Cr(e.supportEmail) ?? "";
3562
3562
  } catch {}
3563
3563
  });
3564
- async function J() {
3564
+ async function q() {
3565
3565
  try {
3566
3566
  await O.create({
3567
3567
  email: te.value,
@@ -3570,41 +3570,41 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3570
3570
  lastName: re.value || void 0,
3571
3571
  turnstileToken: B.value || void 0,
3572
3572
  inviteToken: l.inviteToken || void 0
3573
- }), await se();
3573
+ }), await ce();
3574
3574
  } catch {}
3575
3575
  }
3576
- async function Y() {
3576
+ async function J() {
3577
3577
  try {
3578
- await O.attemptVerification({ code: R.value }), await se();
3578
+ await O.attemptVerification({ code: R.value }), await ce();
3579
3579
  } catch {}
3580
3580
  }
3581
- async function se() {
3581
+ async function ce() {
3582
3582
  O.status.value === "needs_mfa_enrollment" && !O.enrollment.value && await O.enrollTotp(), O.isComplete.value && O.session.value && E("complete", O.session.value);
3583
3583
  }
3584
- async function X() {
3584
+ async function Y() {
3585
3585
  try {
3586
- K.value ? await O.attemptSecondFactor({
3586
+ G.value ? await O.attemptSecondFactor({
3587
3587
  strategy: "backup_code",
3588
- code: G.value
3588
+ code: ae.value
3589
3589
  }) : await O.attemptSecondFactor({
3590
3590
  strategy: "totp",
3591
3591
  code: ie.value
3592
- }), await se();
3592
+ }), await ce();
3593
3593
  } catch {}
3594
3594
  }
3595
- async function ce() {
3595
+ async function le() {
3596
3596
  try {
3597
- await O.verifyTotpEnrollment(q.value), await se();
3597
+ await O.verifyTotpEnrollment(oe.value), await ce();
3598
3598
  } catch {}
3599
3599
  }
3600
- async function le(e) {
3600
+ async function ue(e) {
3601
3601
  try {
3602
3602
  await M.signIn(e);
3603
3603
  } catch {}
3604
3604
  }
3605
3605
  return (t, n) => (b(), a("div", {
3606
3606
  ref_key: "cardRef",
3607
- ref: ae,
3607
+ ref: K,
3608
3608
  class: m(["mrd-card mrd-card-md", k(d).elementProps("card").class]),
3609
3609
  style: h(k(d).rootStyle)
3610
3610
  }, [
@@ -3644,7 +3644,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3644
3644
  title: `Continue with ${e.displayName}`,
3645
3645
  "aria-label": `Continue with ${e.displayName}`,
3646
3646
  disabled: k(M).loading.value || k(O).loading.value,
3647
- onClick: (t) => le(e.provider)
3647
+ onClick: (t) => ue(e.provider)
3648
3648
  }, [k(ir)(e.provider) ? (b(), a("span", {
3649
3649
  key: 0,
3650
3650
  class: "mrd-idp-icon",
@@ -3653,7 +3653,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3653
3653
  k(O).status.value === "idle" ? (b(), a("form", {
3654
3654
  key: 2,
3655
3655
  class: "mrd-form",
3656
- onSubmit: F(J, ["prevent"])
3656
+ onSubmit: F(q, ["prevent"])
3657
3657
  }, [
3658
3658
  l.collectName ? (b(), a("div", ta, [o("div", na, [n[13] ||= o("div", { class: "mrd-label-row" }, [o("label", {
3659
3659
  class: "mrd-label",
@@ -3740,7 +3740,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3740
3740
  ], 32)) : k(O).status.value === "needs_verification" ? (b(), a("form", {
3741
3741
  key: 3,
3742
3742
  class: "mrd-form",
3743
- onSubmit: F(Y, ["prevent"])
3743
+ onSubmit: F(J, ["prevent"])
3744
3744
  }, [
3745
3745
  o("p", fa, "We sent a verification code to " + D(te.value) + ".", 1),
3746
3746
  n[19] ||= o("label", {
@@ -3766,21 +3766,21 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3766
3766
  ], 32)) : k(O).status.value === "needs_second_factor" ? (b(), a("form", {
3767
3767
  key: 4,
3768
3768
  class: "mrd-form",
3769
- onSubmit: F(X, ["prevent"])
3769
+ onSubmit: F(Y, ["prevent"])
3770
3770
  }, [
3771
- K.value ? (b(), a(e, { key: 1 }, [n[21] ||= o("label", {
3771
+ G.value ? (b(), a(e, { key: 1 }, [n[21] ||= o("label", {
3772
3772
  class: "mrd-label",
3773
3773
  for: "mrd-signup-backup-code"
3774
3774
  }, "Backup code", -1), P(o("input", {
3775
3775
  id: "mrd-signup-backup-code",
3776
- "onUpdate:modelValue": n[8] ||= (e) => G.value = e,
3776
+ "onUpdate:modelValue": n[8] ||= (e) => ae.value = e,
3777
3777
  autocomplete: "off",
3778
3778
  class: "mrd-input",
3779
3779
  placeholder: "xxxx-xxxx",
3780
3780
  required: "",
3781
3781
  "aria-invalid": !!(k(O).error.value || k(M).error.value),
3782
3782
  "aria-describedby": k(O).error.value || k(M).error.value ? "mrd-signup-error" : void 0
3783
- }, null, 8, ga), [[A, G.value]])], 64)) : (b(), a(e, { key: 0 }, [n[20] ||= o("label", {
3783
+ }, null, 8, ga), [[A, ae.value]])], 64)) : (b(), a(e, { key: 0 }, [n[20] ||= o("label", {
3784
3784
  class: "mrd-label",
3785
3785
  for: "mrd-signup-2fa-code"
3786
3786
  }, "Authentication code", -1), P(o("input", {
@@ -3804,12 +3804,12 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3804
3804
  type: "button",
3805
3805
  class: "mrd-link-button",
3806
3806
  disabled: k(O).loading.value,
3807
- onClick: n[9] ||= (e) => K.value = !K.value
3808
- }, D(K.value ? "Use authenticator code instead" : "Use a backup code instead"), 9, va)
3807
+ onClick: n[9] ||= (e) => G.value = !G.value
3808
+ }, D(G.value ? "Use authenticator code instead" : "Use a backup code instead"), 9, va)
3809
3809
  ], 32)) : k(O).status.value === "needs_mfa_enrollment" ? (b(), a("form", {
3810
3810
  key: 5,
3811
3811
  class: "mrd-form",
3812
- onSubmit: F(ce, ["prevent"])
3812
+ onSubmit: F(le, ["prevent"])
3813
3813
  }, [
3814
3814
  n[23] ||= o("p", { class: "mrd-hint" }, " This account requires a second factor. Add it to your authenticator app, then enter the code it generates. ", -1),
3815
3815
  k(O).enrollment.value ? (b(), a(e, { key: 0 }, [n[22] ||= o("p", { class: "mrd-label" }, "Secret key", -1), o("p", ya, D(k(O).enrollment.value.secret), 1)], 64)) : i("", !0),
@@ -3819,7 +3819,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3819
3819
  }, "Authentication code", -1),
3820
3820
  P(o("input", {
3821
3821
  id: "mrd-signup-enroll-code",
3822
- "onUpdate:modelValue": n[10] ||= (e) => q.value = e,
3822
+ "onUpdate:modelValue": n[10] ||= (e) => oe.value = e,
3823
3823
  inputmode: "numeric",
3824
3824
  autocomplete: "one-time-code",
3825
3825
  class: "mrd-input",
@@ -3827,7 +3827,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3827
3827
  required: "",
3828
3828
  "aria-invalid": !!(k(O).error.value || k(M).error.value),
3829
3829
  "aria-describedby": k(O).error.value || k(M).error.value ? "mrd-signup-error" : void 0
3830
- }, null, 8, ba), [[A, q.value]]),
3830
+ }, null, 8, ba), [[A, oe.value]]),
3831
3831
  o("button", {
3832
3832
  class: "mrd-button",
3833
3833
  disabled: k(O).loading.value,
@@ -3932,7 +3932,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3932
3932
  }), E.status.value === "needs_mfa_enrollment" && !E.enrollment.value && await E.enrollTotp();
3933
3933
  } catch {}
3934
3934
  }
3935
- async function G() {
3935
+ async function ae() {
3936
3936
  try {
3937
3937
  R.value ? await E.attemptSecondFactor({
3938
3938
  strategy: "backup_code",
@@ -3943,7 +3943,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
3943
3943
  });
3944
3944
  } catch {}
3945
3945
  }
3946
- async function K() {
3946
+ async function G() {
3947
3947
  try {
3948
3948
  await E.verifyTotpEnrollment(z.value);
3949
3949
  } catch {}
@@ -4069,7 +4069,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
4069
4069
  ], 32)) : k(E).status.value === "needs_second_factor" ? (b(), a("form", {
4070
4070
  key: 3,
4071
4071
  class: "mrd-form",
4072
- onSubmit: F(G, ["prevent"])
4072
+ onSubmit: F(ae, ["prevent"])
4073
4073
  }, [
4074
4074
  R.value ? (b(), a(e, { key: 1 }, [n[12] ||= o("label", {
4075
4075
  class: "mrd-label",
@@ -4112,7 +4112,7 @@ var Vr = { class: "mrd-header" }, Hr = ["src"], Ur = ["src"], Wr = ["src"], Gr =
4112
4112
  ], 32)) : k(E).status.value === "needs_mfa_enrollment" ? (b(), a("form", {
4113
4113
  key: 4,
4114
4114
  class: "mrd-form",
4115
- onSubmit: F(K, ["prevent"])
4115
+ onSubmit: F(G, ["prevent"])
4116
4116
  }, [
4117
4117
  n[14] ||= o("p", { class: "mrd-hint" }, " This account requires a second factor. Add it to your authenticator app, then enter the code it generates. ", -1),
4118
4118
  k(E).enrollment.value ? (b(), a(e, { key: 0 }, [n[13] ||= o("p", { class: "mrd-label" }, "Secret key", -1), o("p", Qa, D(k(E).enrollment.value.secret), 1)], 64)) : i("", !0),
@@ -5538,62 +5538,62 @@ var tc = ["aria-label"], nc = /* @__PURE__ */ l({
5538
5538
  function z() {
5539
5539
  g.value = !1, w.value = "", M.value = null;
5540
5540
  }
5541
- let B = S([]), V = Lt(), H = S(!1), U = S(!1), W = S(""), ie = S(""), G = S(""), K = S(""), q = S(!1), ae = S(null);
5542
- async function oe() {
5543
- K.value = "", q.value = !0;
5541
+ let B = S([]), V = Lt(), H = S(!1), U = S(!1), W = S(""), ie = S(""), ae = S(""), G = S(""), oe = S(!1), K = S(null);
5542
+ async function se() {
5543
+ G.value = "", oe.value = !0;
5544
5544
  try {
5545
5545
  B.value = await r.user.passkeys.list();
5546
5546
  } catch (e) {
5547
- K.value = e instanceof Error ? e.message : "Couldn't load your passkeys.";
5547
+ G.value = e instanceof Error ? e.message : "Couldn't load your passkeys.";
5548
5548
  } finally {
5549
- q.value = !1;
5549
+ oe.value = !1;
5550
5550
  }
5551
5551
  }
5552
- async function J(e) {
5553
- G.value = "", ae.value = e;
5552
+ async function q(e) {
5553
+ ae.value = "", K.value = e;
5554
5554
  try {
5555
5555
  await r.user.passkeys.remove(e), B.value = B.value.filter((t) => t.id !== e);
5556
5556
  } catch (e) {
5557
- G.value = e instanceof Error ? e.message : "Couldn't remove that passkey — try again.";
5557
+ ae.value = e instanceof Error ? e.message : "Couldn't remove that passkey — try again.";
5558
5558
  } finally {
5559
- ae.value = null;
5559
+ K.value = null;
5560
5560
  }
5561
5561
  }
5562
- function Y() {
5562
+ function J() {
5563
5563
  H.value = !1, W.value = "", ie.value = "";
5564
5564
  }
5565
- async function se() {
5565
+ async function ce() {
5566
5566
  ie.value = "", U.value = !0;
5567
5567
  try {
5568
- await r.user.passkeys.registerWithBrowser(window.location.hostname, W.value || "Passkey"), Y(), await oe();
5568
+ await r.user.passkeys.registerWithBrowser(window.location.hostname, W.value || "Passkey"), J(), await se();
5569
5569
  } catch (e) {
5570
5570
  ie.value = Gt(e);
5571
5571
  } finally {
5572
5572
  U.value = !1;
5573
5573
  }
5574
5574
  }
5575
- let X = S([]), ce = S(""), le = S(!1), ue = S(""), de = S(null);
5576
- async function fe() {
5577
- ce.value = "", le.value = !0;
5575
+ let Y = S([]), le = S(""), ue = S(!1), de = S(""), fe = S(null);
5576
+ async function pe() {
5577
+ le.value = "", ue.value = !0;
5578
5578
  try {
5579
- X.value = await r.user.sessions.list();
5579
+ Y.value = await r.user.sessions.list();
5580
5580
  } catch (e) {
5581
- ce.value = e instanceof Error ? e.message : "Couldn't load your sessions.";
5581
+ le.value = e instanceof Error ? e.message : "Couldn't load your sessions.";
5582
5582
  } finally {
5583
- le.value = !1;
5583
+ ue.value = !1;
5584
5584
  }
5585
5585
  }
5586
- async function pe(e) {
5587
- ue.value = "", de.value = e;
5586
+ async function me(e) {
5587
+ de.value = "", fe.value = e;
5588
5588
  try {
5589
- await r.user.sessions.revoke(e), X.value = X.value.filter((t) => t.id !== e);
5589
+ await r.user.sessions.revoke(e), Y.value = Y.value.filter((t) => t.id !== e);
5590
5590
  } catch (e) {
5591
- ue.value = e instanceof Error ? e.message : "Couldn't revoke that session — try again.";
5591
+ de.value = e instanceof Error ? e.message : "Couldn't revoke that session — try again.";
5592
5592
  } finally {
5593
- de.value = null;
5593
+ fe.value = null;
5594
5594
  }
5595
5595
  }
5596
- function me(e) {
5596
+ function he(e) {
5597
5597
  let t = new Date(e);
5598
5598
  return Number.isNaN(t.getTime()) ? e : t.toLocaleDateString(void 0, {
5599
5599
  year: "numeric",
@@ -5601,24 +5601,24 @@ var tc = ["aria-label"], nc = /* @__PURE__ */ l({
5601
5601
  day: "numeric"
5602
5602
  });
5603
5603
  }
5604
- let he = S(!1), ge = S(""), _e = S(""), ve = S(""), ye = S(!1), be = S(!1), xe = S(""), Se = S(!1), Ce = n(() => N.value ? !!_e.value : !!ve.value);
5604
+ let ge = S(!1), _e = S(""), ve = S(""), ye = S(""), be = S(!1), X = S(!1), xe = S(""), Se = S(!1), Ce = n(() => N.value ? !!ve.value : !!ye.value);
5605
5605
  function we() {
5606
- he.value = !1, ge.value = "", _e.value = "", ve.value = "", ye.value = !1, xe.value = "";
5606
+ ge.value = !1, _e.value = "", ve.value = "", ye.value = "", be.value = !1, xe.value = "";
5607
5607
  }
5608
5608
  async function Te() {
5609
- be.value = !0, xe.value = "";
5609
+ X.value = !0, xe.value = "";
5610
5610
  try {
5611
- await r.user.requestReauthCode(), ye.value = !0;
5611
+ await r.user.requestReauthCode(), be.value = !0;
5612
5612
  } catch (e) {
5613
5613
  xe.value = e instanceof Error ? e.message : "Couldn't send the code — try again.";
5614
5614
  } finally {
5615
- be.value = !1;
5615
+ X.value = !1;
5616
5616
  }
5617
5617
  }
5618
5618
  async function Ee() {
5619
5619
  xe.value = "", Se.value = !0;
5620
5620
  try {
5621
- await r.user.deleteAccount(N.value ? { password: _e.value } : { code: ve.value }), await r.signOut();
5621
+ await r.user.deleteAccount(N.value ? { password: ve.value } : { code: ye.value }), await r.signOut();
5622
5622
  } catch (e) {
5623
5623
  xe.value = e instanceof Error ? e.message : "Couldn't delete your account — try again.";
5624
5624
  } finally {
@@ -5638,7 +5638,7 @@ var tc = ["aria-label"], nc = /* @__PURE__ */ l({
5638
5638
  }
5639
5639
  }
5640
5640
  return _(() => {
5641
- F(), oe(), fe();
5641
+ F(), se(), pe();
5642
5642
  }), (t, n) => (b(), a("div", qc, [
5643
5643
  o("section", Jc, [
5644
5644
  n[16] ||= o("h3", { class: "mrd-psection-title" }, "Sign-in methods", -1),
@@ -5767,13 +5767,13 @@ var tc = ["aria-label"], nc = /* @__PURE__ */ l({
5767
5767
  ]),
5768
5768
  o("section", yl, [
5769
5769
  n[19] ||= o("h3", { class: "mrd-psection-title" }, "Passkeys", -1),
5770
- K.value ? (b(), a("p", bl, [s(D(K.value) + " ", 1), o("button", {
5770
+ G.value ? (b(), a("p", bl, [s(D(G.value) + " ", 1), o("button", {
5771
5771
  type: "button",
5772
5772
  class: "mrd-link-button",
5773
5773
  "data-mrd-action": "retry-load-passkeys",
5774
- onClick: oe
5775
- }, " Retry ")])) : G.value ? (b(), a("p", xl, D(G.value), 1)) : i("", !0),
5776
- q.value ? (b(), a("p", Sl, "Loading passkeys…")) : i("", !0),
5774
+ onClick: se
5775
+ }, " Retry ")])) : ae.value ? (b(), a("p", xl, D(ae.value), 1)) : i("", !0),
5776
+ oe.value ? (b(), a("p", Sl, "Loading passkeys…")) : i("", !0),
5777
5777
  (b(!0), a(e, null, C(B.value, (e) => (b(), a("div", {
5778
5778
  class: "mrd-prow",
5779
5779
  key: e.id
@@ -5782,9 +5782,9 @@ var tc = ["aria-label"], nc = /* @__PURE__ */ l({
5782
5782
  class: "mrd-prow-action mrd-prow-action--muted",
5783
5783
  "data-mrd-action": `remove-passkey-${e.id}`,
5784
5784
  "aria-label": `Remove passkey ${e.name}`,
5785
- disabled: ae.value === e.id,
5786
- onClick: (t) => J(e.id)
5787
- }, D(ae.value === e.id ? "…" : "Remove"), 9, wl)]))), 128)),
5785
+ disabled: K.value === e.id,
5786
+ onClick: (t) => q(e.id)
5787
+ }, D(K.value === e.id ? "…" : "Remove"), 9, wl)]))), 128)),
5788
5788
  o("div", Tl, [n[17] ||= o("span", { class: "mrd-prow-sub" }, "Sign in without a password using Face ID, Touch ID, or a security key", -1), k(V) && !H.value ? (b(), a("button", {
5789
5789
  key: 0,
5790
5790
  type: "button",
@@ -5807,36 +5807,36 @@ var tc = ["aria-label"], nc = /* @__PURE__ */ l({
5807
5807
  type: "button",
5808
5808
  class: "mrd-btn-ghost-sm",
5809
5809
  "data-mrd-action": "cancel-add-passkey",
5810
- onClick: Y
5810
+ onClick: J
5811
5811
  }, " Cancel "), o("button", {
5812
5812
  type: "button",
5813
5813
  class: "mrd-btn-sm",
5814
5814
  "data-mrd-action": "add-passkey",
5815
5815
  disabled: U.value,
5816
- onClick: se
5816
+ onClick: ce
5817
5817
  }, D(U.value ? "…" : "Add passkey"), 9, jl)])
5818
5818
  ])) : i("", !0)
5819
5819
  ]),
5820
5820
  o("section", Ml, [
5821
5821
  n[21] ||= o("h3", { class: "mrd-psection-title" }, "Active sessions", -1),
5822
- ce.value ? (b(), a("p", Nl, [s(D(ce.value) + " ", 1), o("button", {
5822
+ le.value ? (b(), a("p", Nl, [s(D(le.value) + " ", 1), o("button", {
5823
5823
  type: "button",
5824
5824
  class: "mrd-link-button",
5825
5825
  "data-mrd-action": "retry-load-sessions",
5826
- onClick: fe
5827
- }, " Retry ")])) : ue.value ? (b(), a("p", Pl, D(ue.value), 1)) : i("", !0),
5828
- le.value ? (b(), a("p", Fl, "Loading sessions…")) : !X.value.length && !ce.value ? (b(), a("p", Il, "No active sessions.")) : i("", !0),
5829
- (b(!0), a(e, null, C(X.value, (e) => (b(), a("div", {
5826
+ onClick: pe
5827
+ }, " Retry ")])) : de.value ? (b(), a("p", Pl, D(de.value), 1)) : i("", !0),
5828
+ ue.value ? (b(), a("p", Fl, "Loading sessions…")) : !Y.value.length && !le.value ? (b(), a("p", Il, "No active sessions.")) : i("", !0),
5829
+ (b(!0), a(e, null, C(Y.value, (e) => (b(), a("div", {
5830
5830
  class: "mrd-prow",
5831
5831
  key: e.id
5832
- }, [o("span", null, [n[20] ||= o("span", { class: "mrd-prow-value" }, "Session", -1), o("span", Ll, "Started " + D(me(e.createdAt)), 1)]), o("button", {
5832
+ }, [o("span", null, [n[20] ||= o("span", { class: "mrd-prow-value" }, "Session", -1), o("span", Ll, "Started " + D(he(e.createdAt)), 1)]), o("button", {
5833
5833
  type: "button",
5834
5834
  class: "mrd-prow-action mrd-prow-action--muted",
5835
5835
  "data-mrd-action": `revoke-session-${e.id}`,
5836
- "aria-label": `Revoke session started ${me(e.createdAt)}`,
5837
- disabled: de.value === e.id,
5838
- onClick: (t) => pe(e.id)
5839
- }, D(de.value === e.id ? "…" : "Revoke"), 9, Rl)]))), 128))
5836
+ "aria-label": `Revoke session started ${he(e.createdAt)}`,
5837
+ disabled: fe.value === e.id,
5838
+ onClick: (t) => me(e.id)
5839
+ }, D(fe.value === e.id ? "…" : "Revoke"), 9, Rl)]))), 128))
5840
5840
  ]),
5841
5841
  o("section", zl, [
5842
5842
  n[23] ||= o("h3", { class: "mrd-psection-title" }, "Your data", -1),
@@ -5851,14 +5851,14 @@ var tc = ["aria-label"], nc = /* @__PURE__ */ l({
5851
5851
  ]),
5852
5852
  o("section", Ul, [
5853
5853
  n[27] ||= o("h3", { class: "mrd-psection-title mrd-psection-title--danger" }, "Danger zone", -1),
5854
- o("div", Wl, [n[24] ||= o("span", null, [o("span", { class: "mrd-prow-value" }, "Delete account"), o("span", { class: "mrd-prow-sub" }, "Permanently removes your account and data")], -1), he.value ? i("", !0) : (b(), a("button", {
5854
+ o("div", Wl, [n[24] ||= o("span", null, [o("span", { class: "mrd-prow-value" }, "Delete account"), o("span", { class: "mrd-prow-sub" }, "Permanently removes your account and data")], -1), ge.value ? i("", !0) : (b(), a("button", {
5855
5855
  key: 0,
5856
5856
  type: "button",
5857
5857
  class: "mrd-prow-action mrd-prow-action--danger",
5858
5858
  "data-mrd-action": "open-delete-account",
5859
- onClick: n[6] ||= (e) => he.value = !0
5859
+ onClick: n[6] ||= (e) => ge.value = !0
5860
5860
  }, " Delete… "))]),
5861
- he.value ? (b(), a("div", Gl, [
5861
+ ge.value ? (b(), a("div", Gl, [
5862
5862
  o("div", Kl, [n[25] ||= o("label", {
5863
5863
  class: "mrd-label",
5864
5864
  for: "mrd-delete-confirm"
@@ -5866,8 +5866,8 @@ var tc = ["aria-label"], nc = /* @__PURE__ */ l({
5866
5866
  id: "mrd-delete-confirm",
5867
5867
  class: "mrd-input",
5868
5868
  "data-mrd-field": "delete-confirm",
5869
- "onUpdate:modelValue": n[7] ||= (e) => ge.value = e
5870
- }, null, 512), [[A, ge.value]])]),
5869
+ "onUpdate:modelValue": n[7] ||= (e) => _e.value = e
5870
+ }, null, 512), [[A, _e.value]])]),
5871
5871
  N.value ? (b(), a("div", ql, [n[26] ||= o("label", {
5872
5872
  class: "mrd-label",
5873
5873
  for: "mrd-delete-password"
@@ -5876,27 +5876,27 @@ var tc = ["aria-label"], nc = /* @__PURE__ */ l({
5876
5876
  type: "password",
5877
5877
  class: "mrd-input",
5878
5878
  "data-mrd-field": "delete-password",
5879
- "onUpdate:modelValue": n[8] ||= (e) => _e.value = e,
5879
+ "onUpdate:modelValue": n[8] ||= (e) => ve.value = e,
5880
5880
  disabled: Se.value
5881
- }, null, 8, Jl), [[A, _e.value]])])) : (b(), a("div", Yl, [
5882
- o("label", Xl, D(ye.value ? "Enter the code we emailed you" : "We'll email you a code to confirm it's you"), 1),
5883
- ye.value ? P((b(), a("input", {
5881
+ }, null, 8, Jl), [[A, ve.value]])])) : (b(), a("div", Yl, [
5882
+ o("label", Xl, D(be.value ? "Enter the code we emailed you" : "We'll email you a code to confirm it's you"), 1),
5883
+ be.value ? P((b(), a("input", {
5884
5884
  key: 0,
5885
5885
  id: "mrd-delete-code",
5886
5886
  class: "mrd-input",
5887
5887
  inputmode: "numeric",
5888
5888
  autocomplete: "one-time-code",
5889
5889
  "data-mrd-field": "delete-code",
5890
- "onUpdate:modelValue": n[9] ||= (e) => ve.value = e,
5890
+ "onUpdate:modelValue": n[9] ||= (e) => ye.value = e,
5891
5891
  disabled: Se.value
5892
- }, null, 8, Zl)), [[A, ve.value]]) : i("", !0),
5892
+ }, null, 8, Zl)), [[A, ye.value]]) : i("", !0),
5893
5893
  o("button", {
5894
5894
  type: "button",
5895
5895
  class: "mrd-btn-ghost-sm",
5896
5896
  "data-mrd-action": "send-delete-code",
5897
- disabled: be.value || Se.value,
5897
+ disabled: X.value || Se.value,
5898
5898
  onClick: Te
5899
- }, D(be.value ? "…" : ye.value ? "Send a new code" : "Send code"), 9, Ql)
5899
+ }, D(X.value ? "…" : be.value ? "Send a new code" : "Send code"), 9, Ql)
5900
5900
  ])),
5901
5901
  xe.value ? (b(), a("p", $l, D(xe.value), 1)) : i("", !0),
5902
5902
  o("div", eu, [o("button", {
@@ -5909,7 +5909,7 @@ var tc = ["aria-label"], nc = /* @__PURE__ */ l({
5909
5909
  type: "button",
5910
5910
  class: "mrd-btn-sm mrd-btn-sm--danger",
5911
5911
  "data-mrd-action": "confirm-delete-account",
5912
- disabled: ge.value !== "delete my account" || !Ce.value || Se.value,
5912
+ disabled: _e.value !== "delete my account" || !Ce.value || Se.value,
5913
5913
  onClick: Ee
5914
5914
  }, D(Se.value ? "…" : "Permanently delete"), 9, nu)])
5915
5915
  ])) : i("", !0)