@sylphx/auth-solid 0.1.1 → 0.1.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.
package/dist/browser.js CHANGED
@@ -1,9 +1,18 @@
1
1
  import { addEventListener as e, className as t, createComponent as n, delegateEvents as r, effect as i, getNextElement as a, getNextMarker as o, insert as s, memo as c, runHydrationEvents as l, setAttribute as u, setProperty as d, style as f, template as p, use as m } from "solid-js/web";
2
- import { providerDestination as h, providers as g, safeReturnTo as _ } from "@sylphx/auth/client";
3
- import { For as v, Match as y, Show as b, Switch as x, createMemo as S, createSignal as C, createUniqueId as w, onCleanup as ee, onMount as te } from "solid-js";
2
+ import { authRoutePrefix as h, providerDestination as g, providers as _, safeReturnTo as v } from "@sylphx/auth/client";
3
+ import { For as y, Match as b, Show as x, Switch as S, createEffect as C, createMemo as w, createSignal as T, createUniqueId as E, onCleanup as D, onMount as ee } from "solid-js";
4
4
  // src/messages.ts
5
- var T = {
5
+ var O = {
6
6
  en: {
7
+ lastUsed: "Last used",
8
+ forgotPassword: "Forgot your password?",
9
+ recoverAccount: "Reset your password",
10
+ recoverDescription: "Enter the email address for your account.",
11
+ sendResetLink: "Send reset link",
12
+ recoverySent: "Check your inbox",
13
+ recoverySentDescription: "If an account exists for this address, you’ll receive a password reset link.",
14
+ addPasskey: "Add a passkey",
15
+ passkeyAdded: "Passkey added",
7
16
  signIn: "Sign in",
8
17
  enterPassword: "Enter your password",
9
18
  createYourAccount: "Create your account",
@@ -60,6 +69,7 @@ var T = {
60
69
  cancelled: "Sign-in was canceled. You can try again whenever you’re ready.",
61
70
  use_existing: "Try the method you originally used to sign in. This provider couldn’t confirm your email.",
62
71
  invalid_credentials: "That email and password didn’t match. Check both and try again.",
72
+ acceptance_required: "Accept the current terms to continue.",
63
73
  verify_email: "Confirm your email from the link in your inbox before signing in.",
64
74
  verification_failed: "This confirmation link couldn’t be used. Check that you opened the latest link.",
65
75
  invalid_code: "That code didn’t work. Check it and try again.",
@@ -71,6 +81,15 @@ var T = {
71
81
  }
72
82
  },
73
83
  "zh-Hant-HK": {
84
+ lastUsed: "上次使用",
85
+ forgotPassword: "忘記密碼?",
86
+ recoverAccount: "重設密碼",
87
+ recoverDescription: "請輸入帳戶的電郵地址。",
88
+ sendResetLink: "傳送重設連結",
89
+ recoverySent: "查閱收件箱",
90
+ recoverySentDescription: "如這個電郵地址已連結帳戶,你將收到密碼重設連結。",
91
+ addPasskey: "新增通行密鑰",
92
+ passkeyAdded: "已新增通行密鑰",
74
93
  signIn: "登入",
75
94
  enterPassword: "輸入密碼",
76
95
  createYourAccount: "建立帳戶",
@@ -127,6 +146,7 @@ var T = {
127
146
  cancelled: "登入已取消。你可以隨時再試。",
128
147
  use_existing: "這項登入服務未能確認你的電郵地址。請改用原來的登入方式。",
129
148
  invalid_credentials: "電郵地址與密碼不符。請核對後再試。",
149
+ acceptance_required: "請同意現行條款後繼續。",
130
150
  verify_email: "請先開啟確認電郵內的連結,確認電郵地址後再登入。",
131
151
  verification_failed: "此連結無法使用。請開啟最新一封確認電郵內的連結。",
132
152
  invalid_code: "驗證碼無法使用。請核對後再試。",
@@ -138,6 +158,15 @@ var T = {
138
158
  }
139
159
  },
140
160
  "zh-Hant-TW": {
161
+ lastUsed: "上次使用",
162
+ forgotPassword: "忘記密碼?",
163
+ recoverAccount: "重設密碼",
164
+ recoverDescription: "請輸入帳戶的電子郵件地址。",
165
+ sendResetLink: "傳送重設連結",
166
+ recoverySent: "查看收件匣",
167
+ recoverySentDescription: "如果這個電子郵件地址已連結帳戶,你會收到密碼重設連結。",
168
+ addPasskey: "新增通行密鑰",
169
+ passkeyAdded: "已新增通行密鑰",
141
170
  signIn: "登入",
142
171
  enterPassword: "輸入密碼",
143
172
  createYourAccount: "建立帳號",
@@ -194,6 +223,7 @@ var T = {
194
223
  cancelled: "登入已取消。你可以隨時再試。",
195
224
  use_existing: "這項登入服務無法確認你的電子郵件地址。請改用原本的登入方式。",
196
225
  invalid_credentials: "電子郵件地址和密碼不符。請檢查後再試一次。",
226
+ acceptance_required: "請同意目前的條款後繼續。",
197
227
  verify_email: "請先開啟確認信中的連結,確認電子郵件地址後再登入。",
198
228
  verification_failed: "這個確認連結無法使用。請確認你開啟的是最新一封確認信中的連結。",
199
229
  invalid_code: "這組驗證碼無法使用。請檢查後再試一次。",
@@ -205,6 +235,15 @@ var T = {
205
235
  }
206
236
  },
207
237
  "zh-Hans": {
238
+ lastUsed: "上次使用",
239
+ forgotPassword: "忘记密码?",
240
+ recoverAccount: "重置密码",
241
+ recoverDescription: "请输入账户的电子邮箱。",
242
+ sendResetLink: "发送重置链接",
243
+ recoverySent: "查看收件箱",
244
+ recoverySentDescription: "如果此邮箱关联了账户,你将收到密码重置链接。",
245
+ addPasskey: "添加通行密钥",
246
+ passkeyAdded: "已添加通行密钥",
208
247
  signIn: "登录",
209
248
  enterPassword: "输入密码",
210
249
  createYourAccount: "创建账号",
@@ -261,6 +300,7 @@ var T = {
261
300
  cancelled: "登录已取消。你可以随时重试。",
262
301
  use_existing: "此登录服务无法确认你的邮箱地址。请改用原来的登录方式。",
263
302
  invalid_credentials: "邮箱地址和密码不匹配。请检查后重试。",
303
+ acceptance_required: "请同意当前条款后继续。",
264
304
  verify_email: "请先打开确认邮件中的链接,确认邮箱地址后再登录。",
265
305
  verification_failed: "此链接无法使用。请打开最新一封确认邮件中的链接。",
266
306
  invalid_code: "此验证码无法使用。请检查后重试。",
@@ -272,6 +312,15 @@ var T = {
272
312
  }
273
313
  },
274
314
  ja: {
315
+ lastUsed: "前回使用",
316
+ forgotPassword: "パスワードをお忘れですか?",
317
+ recoverAccount: "パスワードを再設定",
318
+ recoverDescription: "アカウントのメールアドレスを入力してください。",
319
+ sendResetLink: "再設定リンクを送信",
320
+ recoverySent: "メールを確認",
321
+ recoverySentDescription: "該当するアカウントがある場合、再設定リンクが届きます。",
322
+ addPasskey: "パスキーを追加",
323
+ passkeyAdded: "パスキーを追加しました",
275
324
  signIn: "ログイン",
276
325
  enterPassword: "パスワードを入力",
277
326
  createYourAccount: "アカウントを作成",
@@ -328,6 +377,7 @@ var T = {
328
377
  cancelled: "ログインがキャンセルされました。いつでもやり直せます。",
329
378
  use_existing: "このサービスではメールアドレスを確認できませんでした。最初に使った方法でログインしてください。",
330
379
  invalid_credentials: "メールアドレスとパスワードが一致しません。両方を確認して、もう一度お試しください。",
380
+ acceptance_required: "続行するには、現在の利用規約に同意してください。",
331
381
  verify_email: "確認メール内のリンクを開き、メールアドレスを確認してからログインしてください。",
332
382
  verification_failed: "この確認リンクは使えません。最新の確認メールのリンクをお試しください。",
333
383
  invalid_code: "このコードは使えません。入力内容を確認して、もう一度お試しください。",
@@ -339,6 +389,15 @@ var T = {
339
389
  }
340
390
  },
341
391
  ko: {
392
+ lastUsed: "최근 사용",
393
+ forgotPassword: "비밀번호를 잊으셨나요?",
394
+ recoverAccount: "비밀번호 재설정",
395
+ recoverDescription: "계정의 이메일 주소를 입력하세요.",
396
+ sendResetLink: "재설정 링크 보내기",
397
+ recoverySent: "받은편지함을 확인하세요",
398
+ recoverySentDescription: "이 주소에 연결된 계정이 있다면 비밀번호 재설정 링크가 전송됩니다.",
399
+ addPasskey: "패스키 추가",
400
+ passkeyAdded: "패스키가 추가되었습니다",
342
401
  signIn: "로그인",
343
402
  enterPassword: "비밀번호를 입력하세요",
344
403
  createYourAccount: "계정 만들기",
@@ -395,6 +454,7 @@ var T = {
395
454
  cancelled: "로그인이 취소되었습니다. 언제든지 다시 시도할 수 있습니다.",
396
455
  use_existing: "이 로그인 서비스에서 이메일 주소를 확인할 수 없습니다. 처음 사용한 방법으로 로그인하세요.",
397
456
  invalid_credentials: "이메일 주소 또는 비밀번호가 올바르지 않습니다. 확인한 뒤 다시 시도하세요.",
457
+ acceptance_required: "계속하려면 현재 약관에 동의하세요.",
398
458
  verify_email: "로그인하기 전에 받은 이메일의 링크를 열어 이메일 주소를 확인하세요.",
399
459
  verification_failed: "이 확인 링크를 사용할 수 없습니다. 가장 최근에 받은 링크를 열어 보세요.",
400
460
  invalid_code: "인증 코드가 올바르지 않습니다. 코드를 확인한 뒤 다시 시도하세요.",
@@ -404,16 +464,183 @@ var T = {
404
464
  try_later: "시도 횟수가 너무 많습니다. 잠시 후 다시 시도하세요.",
405
465
  unavailable: "연결하지 못했습니다. 잠시 후 다시 시도하세요."
406
466
  }
467
+ },
468
+ es: {
469
+ lastUsed: "Último método usado",
470
+ forgotPassword: "¿Olvidaste tu contraseña?",
471
+ recoverAccount: "Restablece tu contraseña",
472
+ recoverDescription: "Introduce el correo de tu cuenta.",
473
+ sendResetLink: "Enviar enlace de recuperación",
474
+ recoverySent: "Revisa tu bandeja de entrada",
475
+ recoverySentDescription: "Si hay una cuenta asociada a este correo, recibirás un enlace para restablecer la contraseña.",
476
+ addPasskey: "Añadir una llave de acceso",
477
+ passkeyAdded: "Llave de acceso añadida",
478
+ signIn: "Inicia sesión",
479
+ enterPassword: "Introduce tu contraseña",
480
+ createYourAccount: "Crea tu cuenta",
481
+ checkInbox: "Revisa tu bandeja de entrada",
482
+ confirmEmail: "Confirma tu correo electrónico",
483
+ verifyIdentity: "Verifica tu identidad",
484
+ chooseMethod: "Elige cómo quieres iniciar sesión.",
485
+ startWithEmail: "Usa tu correo electrónico para empezar.",
486
+ checkEmailDescription: "Si esta dirección es nueva, te enviaremos un enlace de confirmación. Ábrelo e introduce la contraseña que elegiste.",
487
+ confirmEmailDescription: "Introduce el correo y la contraseña que usaste para registrarte.",
488
+ enterEmailCode: (e) => `Introduce el código de seis dígitos que enviamos a ${e}.`,
489
+ enterRecovery: "Introduce uno de tus códigos de recuperación guardados.",
490
+ enterAuthenticator: "Introduce el código de tu aplicación de autenticación.",
491
+ loading: "Cargando opciones de acceso…",
492
+ retry: "Volver a intentar",
493
+ openingProvider: (e) => `Abriendo ${e}…`,
494
+ continueProvider: (e) => `Continuar con ${e}`,
495
+ orEmail: "o usa tu correo electrónico",
496
+ email: "Correo electrónico",
497
+ sendingCode: "Enviando el código…",
498
+ emailCodeAction: "Enviarme un código",
499
+ continueEmail: "Continuar con correo electrónico",
500
+ waitingPasskey: "Esperando tu llave de acceso…",
501
+ usePasskey: "Usar una llave de acceso",
502
+ newHere: "¿No tienes cuenta?",
503
+ createAnAccount: "Crea una cuenta",
504
+ noMethods: "No hay métodos de inicio de sesión disponibles ahora.",
505
+ password: "Contraseña",
506
+ hidePassword: "Ocultar contraseña",
507
+ showPassword: "Mostrar contraseña",
508
+ hide: "Ocultar",
509
+ show: "Mostrar",
510
+ minimumPassword: "Usa al menos 12 caracteres.",
511
+ working: "Un momento…",
512
+ createAccount: "Crear cuenta",
513
+ confirmAndSignIn: "Confirmar e iniciar sesión",
514
+ changeEmailOrMethod: "Cambiar de correo o método de acceso",
515
+ backToSignIn: "Volver al inicio de sesión",
516
+ emailCode: "Código de correo electrónico",
517
+ checkingCode: "Comprobando el código…",
518
+ verifyCode: "Verificar código",
519
+ resendIn: (e) => `Reenviar en ${e}`,
520
+ resendCode: "Reenviar código",
521
+ changeEmail: "Cambiar de correo",
522
+ usePassword: "Usar contraseña",
523
+ recoveryCode: "Código de recuperación",
524
+ authenticatorCode: "Código de autenticación",
525
+ verifyAndSignIn: "Verificar e iniciar sesión",
526
+ useAuthenticator: "Usar la aplicación de autenticación",
527
+ useRecovery: "Usar un código de recuperación",
528
+ language: "Idioma",
529
+ errors: {
530
+ signin: "No se completó el inicio de sesión. Inténtalo de nuevo o elige otro método.",
531
+ cancelled: "Se canceló el inicio de sesión. Puedes volver a intentarlo cuando quieras.",
532
+ use_existing: "Usa el método con el que iniciaste sesión la primera vez. Este proveedor no pudo confirmar tu correo.",
533
+ invalid_credentials: "El correo y la contraseña no coinciden. Comprueba ambos e inténtalo de nuevo.",
534
+ acceptance_required: "Acepta las condiciones vigentes para continuar.",
535
+ verify_email: "Confirma tu correo con el enlace de tu bandeja de entrada antes de iniciar sesión.",
536
+ verification_failed: "No se pudo usar este enlace de confirmación. Comprueba que abriste el más reciente.",
537
+ invalid_code: "El código no es válido. Revísalo e inténtalo de nuevo.",
538
+ method_unavailable: "Este método no está disponible ahora. Prueba otro.",
539
+ signup_failed: "No pudimos iniciar el registro. Comprueba tus datos e inténtalo de nuevo.",
540
+ invalid_input: "Comprueba tus datos e inténtalo de nuevo.",
541
+ try_later: "Demasiados intentos. Espera un momento antes de volver a intentarlo.",
542
+ unavailable: "No pudimos conectarnos. Inténtalo de nuevo en un momento."
543
+ }
544
+ },
545
+ "pt-BR": {
546
+ lastUsed: "Último método usado",
547
+ forgotPassword: "Esqueceu sua senha?",
548
+ recoverAccount: "Redefina sua senha",
549
+ recoverDescription: "Digite o e-mail da sua conta.",
550
+ sendResetLink: "Enviar link de redefinição",
551
+ recoverySent: "Confira sua caixa de entrada",
552
+ recoverySentDescription: "Se houver uma conta com esse e-mail, você receberá um link para redefinir a senha.",
553
+ addPasskey: "Adicionar uma chave de acesso",
554
+ passkeyAdded: "Chave de acesso adicionada",
555
+ signIn: "Entrar",
556
+ enterPassword: "Digite sua senha",
557
+ createYourAccount: "Crie sua conta",
558
+ checkInbox: "Confira sua caixa de entrada",
559
+ confirmEmail: "Confirme seu e-mail",
560
+ verifyIdentity: "Confirme que é você",
561
+ chooseMethod: "Escolha como você quer entrar.",
562
+ startWithEmail: "Use seu e-mail para começar.",
563
+ checkEmailDescription: "Se este endereço for novo, enviaremos um link de confirmação. Abra o link e digite a senha que você escolheu.",
564
+ confirmEmailDescription: "Digite o e-mail e a senha que você usou no cadastro.",
565
+ enterEmailCode: (e) => `Digite o código de seis dígitos que enviamos para ${e}.`,
566
+ enterRecovery: "Digite um dos códigos de recuperação que você guardou.",
567
+ enterAuthenticator: "Digite o código do seu aplicativo autenticador.",
568
+ loading: "Carregando opções de login…",
569
+ retry: "Tentar novamente",
570
+ openingProvider: (e) => `Abrindo ${e}…`,
571
+ continueProvider: (e) => `Continuar com ${e}`,
572
+ orEmail: "ou use seu e-mail",
573
+ email: "Endereço de e-mail",
574
+ sendingCode: "Enviando código…",
575
+ emailCodeAction: "Enviar um código por e-mail",
576
+ continueEmail: "Continuar com e-mail",
577
+ waitingPasskey: "Aguardando sua chave de acesso…",
578
+ usePasskey: "Usar uma chave de acesso",
579
+ newHere: "Ainda não tem conta?",
580
+ createAnAccount: "Crie uma conta",
581
+ noMethods: "Nenhum método de login está disponível no momento.",
582
+ password: "Senha",
583
+ hidePassword: "Ocultar senha",
584
+ showPassword: "Mostrar senha",
585
+ hide: "Ocultar",
586
+ show: "Mostrar",
587
+ minimumPassword: "Use pelo menos 12 caracteres.",
588
+ working: "Aguarde…",
589
+ createAccount: "Criar conta",
590
+ confirmAndSignIn: "Confirmar e entrar",
591
+ changeEmailOrMethod: "Trocar e-mail ou método de login",
592
+ backToSignIn: "Voltar para o login",
593
+ emailCode: "Código por e-mail",
594
+ checkingCode: "Verificando código…",
595
+ verifyCode: "Verificar código",
596
+ resendIn: (e) => `Reenviar em ${e}`,
597
+ resendCode: "Reenviar código",
598
+ changeEmail: "Trocar e-mail",
599
+ usePassword: "Usar senha",
600
+ recoveryCode: "Código de recuperação",
601
+ authenticatorCode: "Código do autenticador",
602
+ verifyAndSignIn: "Verificar e entrar",
603
+ useAuthenticator: "Usar o aplicativo autenticador",
604
+ useRecovery: "Usar um código de recuperação",
605
+ language: "Idioma",
606
+ errors: {
607
+ signin: "Não foi possível concluir o login. Tente novamente ou escolha outro método.",
608
+ cancelled: "O login foi cancelado. Você pode tentar novamente quando quiser.",
609
+ use_existing: "Use o método com o qual você entrou pela primeira vez. Este provedor não conseguiu confirmar seu e-mail.",
610
+ invalid_credentials: "O e-mail e a senha não correspondem. Confira os dois e tente novamente.",
611
+ acceptance_required: "Aceite os termos atuais para continuar.",
612
+ verify_email: "Antes de entrar, confirme seu e-mail pelo link na sua caixa de entrada.",
613
+ verification_failed: "Não foi possível usar este link de confirmação. Confira se você abriu o mais recente.",
614
+ invalid_code: "O código não funcionou. Confira e tente novamente.",
615
+ method_unavailable: "Este método de login não está disponível no momento. Tente outro.",
616
+ signup_failed: "Não foi possível iniciar o cadastro. Confira seus dados e tente novamente.",
617
+ invalid_input: "Confira seus dados e tente novamente.",
618
+ try_later: "Muitas tentativas. Aguarde um momento e tente novamente.",
619
+ unavailable: "Não foi possível conectar. Tente novamente em instantes."
620
+ }
407
621
  }
408
- }, E = {
622
+ }, k = {
409
623
  en: "English",
410
624
  "zh-Hant-HK": "繁體中文(香港)",
411
625
  "zh-Hant-TW": "繁體中文(台灣)",
412
626
  "zh-Hans": "简体中文",
413
627
  ja: "日本語",
414
- ko: "한국어"
628
+ ko: "한국어",
629
+ es: "Español",
630
+ "pt-BR": "Português (Brasil)"
415
631
  };
416
- function D(e) {
632
+ function A(e, t) {
633
+ let n = O[e];
634
+ return t ? {
635
+ ...n,
636
+ ...t,
637
+ errors: {
638
+ ...n.errors,
639
+ ...t.errors
640
+ }
641
+ } : n;
642
+ }
643
+ function j(e) {
417
644
  for (let t of e) {
418
645
  let e;
419
646
  try {
@@ -421,8 +648,8 @@ function D(e) {
421
648
  } catch {
422
649
  continue;
423
650
  }
424
- if (Object.hasOwn(T, e.baseName)) return e.baseName;
425
- if (e.language === "en" || e.language === "ja" || e.language === "ko") return e.language;
651
+ if (Object.hasOwn(O, e.baseName)) return e.baseName;
652
+ if (e.language === "en" || e.language === "ja" || e.language === "ko" || e.language === "es") return e.language;
426
653
  if (e.language === "zh") {
427
654
  let t = e.maximize().script;
428
655
  if (t === "Hans") return "zh-Hans";
@@ -431,352 +658,555 @@ function D(e) {
431
658
  }
432
659
  return "en";
433
660
  }
434
- function O(e) {
661
+ function M(e) {
435
662
  return new Intl.NumberFormat(e, {
436
663
  style: "unit",
437
664
  unit: "second",
438
665
  unitDisplay: "short"
439
666
  });
440
667
  }
441
- // src/provider-icons.tsx
442
- var k = /*#__PURE__*/ p("<svg aria-hidden=true viewBox=\"0 0 24 24\"fill=currentColor width=19 height=19><path d=\"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z\"fill=#4285F4></path><path d=\"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z\"fill=#34A853></path><path d=\"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z\"fill=#FBBC05></path><path d=\"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z\"fill=#EA4335>"), A = /*#__PURE__*/ p("<svg aria-hidden=true viewBox=\"0 0 24 24\"fill=currentColor width=19 height=19><path d=\"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z\">"), j = /*#__PURE__*/ p("<svg aria-hidden=true viewBox=\"0 0 24 24\"fill=currentColor width=19 height=19><path d=\"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701\">"), ne = /*#__PURE__*/ p("<svg aria-hidden=true viewBox=\"0 0 24 24\"fill=currentColor width=19 height=19><path d=\"M0 0h11.377v11.372H0zm12.623 0H24v11.372H12.623zM0 12.623h11.377V24H0zm12.623 0H24V24H12.623\"fill=#00A4EF>"), M = /*#__PURE__*/ p("<svg aria-hidden=true viewBox=\"0 0 24 24\"fill=currentColor width=19 height=19><path d=\"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z\">");
443
- function N() {
444
- return a(k);
445
- }
446
- function re() {
447
- return a(A);
448
- }
449
- function P() {
450
- return a(j);
668
+ // src/sign-in-messages.ts
669
+ function te(e, t, n) {
670
+ if (t !== void 0 && n !== void 0) try {
671
+ return new Intl.Locale(t).toString();
672
+ } catch {}
673
+ return e;
451
674
  }
452
- function F() {
453
- return a(ne);
454
- }
455
- function I() {
456
- return a(M);
457
- }
458
- // src/sign-in-controller.ts
459
- var L = T.en.errors;
460
- L.unavailable;
461
- function ie(e) {
462
- return typeof e == "string" && Object.hasOwn(L, e);
675
+ // src/sign-in-request.ts
676
+ var N = O.en.errors;
677
+ N.unavailable;
678
+ function ne(e) {
679
+ return typeof e == "string" && Object.hasOwn(N, e);
463
680
  }
464
- var R = class extends Error {
681
+ var P = class extends Error {
465
682
  code;
466
683
  constructor(e) {
467
684
  super(e), this.code = e;
468
685
  }
469
686
  };
470
- function ae(e) {
687
+ async function F(e, t, n) {
688
+ n.throwIfAborted();
689
+ let r = await fetch(e, {
690
+ method: "POST",
691
+ headers: { "Content-Type": "application/json" },
692
+ credentials: "same-origin",
693
+ referrerPolicy: "origin",
694
+ redirect: "error",
695
+ signal: AbortSignal.any([n, AbortSignal.timeout(45e3)]),
696
+ body: JSON.stringify(t)
697
+ }), i = await r.json();
698
+ if (!r.ok) {
699
+ let e = i && typeof i == "object" && "error" in i ? i.error : void 0;
700
+ throw new P(ne(e) ? e : "unavailable");
701
+ }
702
+ return i;
703
+ }
704
+ // src/sign-in-webauthn.ts
705
+ function I(e) {
471
706
  return Uint8Array.from(atob(e.replace(/-/g, "+").replace(/_/g, "/")), (e) => e.charCodeAt(0));
472
707
  }
473
- function z(e) {
474
- return btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
708
+ function L(e) {
709
+ return btoa(Array.from(new Uint8Array(e), (e) => String.fromCharCode(e)).join("")).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
710
+ }
711
+ // src/passkey-enroll.tsx
712
+ var re = /*#__PURE__*/ p("<output>"), R = /*#__PURE__*/ p("<div><button type=button></button><!$><!/><!$><!/>"), ie = /*#__PURE__*/ p("<p role=alert>");
713
+ function z(e, t) {
714
+ if (!e || typeof e != "object") throw Error();
715
+ let { challenge: n, challengeId: r, rpId: i, userId: a, userName: o, algorithms: s } = e, c = /^[A-Za-z0-9_-]+$/;
716
+ if (typeof n != "string" || !c.test(n) || typeof r != "string" || !r || i !== t || typeof a != "string" || !c.test(a) || typeof o != "string" || !o || !Array.isArray(s) || !s.length || !s.every(Number.isSafeInteger)) throw Error();
717
+ return {
718
+ challengeId: r,
719
+ publicKey: {
720
+ challenge: I(n),
721
+ rp: {
722
+ id: i,
723
+ name: i
724
+ },
725
+ user: {
726
+ id: I(a),
727
+ name: o,
728
+ displayName: o
729
+ },
730
+ pubKeyCredParams: s.map((e) => ({
731
+ type: "public-key",
732
+ alg: e
733
+ })),
734
+ authenticatorSelection: {
735
+ residentKey: "required",
736
+ userVerification: "required"
737
+ },
738
+ attestation: "none",
739
+ timeout: 6e4
740
+ }
741
+ };
475
742
  }
476
- function B(e) {
477
- let t = new URLSearchParams(e.search), n = _(e.next), r = _(e.loginPath, "/login").split(/[?#]/, 1)[0], i = t.get("challenge_id"), a = t.get("token"), o = !!i && !!a && t.get("type") === "email_verification", [s, c] = C(), [l, u] = C(!1), [d, f] = C("choose"), [p, m] = C(""), v = t.get("error"), [y, b] = C(ie(v) ? v : ""), x = () => {
478
- let e = y();
479
- return e ? L[e] : "";
480
- }, [S, w] = C(""), [T, E] = C(!1), [D, O] = C(!1), [k, A] = C(""), [j, ne] = C(""), [M, N] = C(""), [re, P] = C(!1), [F, I] = C(!1), [B, V] = C(0), [oe, se] = C(0), ce = () => Math.max(0, Math.ceil((B() - oe()) / 1e3)), H, U = new AbortController();
481
- async function le() {
743
+ function ae(e) {
744
+ let r = `${h(e.routePrefix)}/passkey/enroll`, f = new AbortController(), [p, m] = T(!1), [g, _] = T(!1), [v, y] = T(!1), [b, S] = T(), C = () => j(e.locale ? [e.locale] : []), E = w(() => A(C(), e.messages));
745
+ ee(() => m(window.isSecureContext && typeof PublicKeyCredential < "u")), D(() => f.abort());
746
+ async function O() {
747
+ if (!g() && p() && e.enabled && !f.signal.aborted) {
748
+ _(!0), S(void 0), y(!1);
749
+ try {
750
+ let t = await F(r, { action: "begin" }, f.signal);
751
+ if (f.signal.throwIfAborted(), !e.enabled) return;
752
+ let { challengeId: n, publicKey: i } = z(t, window.location.hostname), a = await navigator.credentials.create({
753
+ publicKey: i,
754
+ signal: f.signal
755
+ });
756
+ if (!e.enabled || f.signal.aborted) return;
757
+ if (!(a instanceof PublicKeyCredential) || !(a.response instanceof AuthenticatorAttestationResponse)) throw Error();
758
+ let o = a.response, s = await F(r, {
759
+ action: "verify",
760
+ challenge_id: n,
761
+ credential_id: L(a.rawId),
762
+ client_data_json: L(o.clientDataJSON),
763
+ attestation_object: L(o.attestationObject),
764
+ transports: o.getTransports?.() ?? []
765
+ }, f.signal);
766
+ if (!s || typeof s != "object" || !("enrolled" in s) || s.enrolled !== !0) throw Error();
767
+ f.signal.aborted || y(!0);
768
+ } catch (e) {
769
+ f.signal.aborted || S(e instanceof P ? e.code : "method_unavailable");
770
+ } finally {
771
+ f.signal.aborted || _(!1);
772
+ }
773
+ }
774
+ }
775
+ return n(x, {
776
+ get when() {
777
+ return c(() => !!p())() && e.enabled;
778
+ },
779
+ get children() {
780
+ var r = a(R), f = r.firstChild, p = f.nextSibling, [m, h] = o(p.nextSibling), _ = m.nextSibling, [y, S] = o(_.nextSibling);
781
+ return f.$$click = () => void O(), s(f, (() => {
782
+ var e = c(() => !!g());
783
+ return () => e() ? E().working : E().addPasskey;
784
+ })()), s(r, n(x, {
785
+ get when() {
786
+ return b();
787
+ },
788
+ children: (e) => (() => {
789
+ var t = a(ie);
790
+ return s(t, () => E().errors[e()]), t;
791
+ })()
792
+ }), m, h), s(r, n(x, {
793
+ get when() {
794
+ return v();
795
+ },
796
+ get children() {
797
+ var e = a(re);
798
+ return s(e, () => E().passkeyAdded), e;
799
+ }
800
+ }), y, S), i((n) => {
801
+ var i = te(C(), e.locale, e.messages), a = e.class ?? "auth-sign-in-secondary", o = g();
802
+ return i !== n.e && u(r, "lang", n.e = i), a !== n.t && t(f, n.t = a), o !== n.a && d(f, "disabled", n.a = o), n;
803
+ }, {
804
+ e: void 0,
805
+ t: void 0,
806
+ a: void 0
807
+ }), l(), r;
808
+ }
809
+ });
810
+ }
811
+ r(["click"]);
812
+ // src/provider-icons.tsx
813
+ var B = /*#__PURE__*/ p("<svg aria-hidden=true viewBox=\"0 0 24 24\"fill=currentColor width=19 height=19><path d=\"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z\"fill=#4285F4></path><path d=\"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z\"fill=#34A853></path><path d=\"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z\"fill=#FBBC05></path><path d=\"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z\"fill=#EA4335>"), oe = /*#__PURE__*/ p("<svg aria-hidden=true viewBox=\"0 0 24 24\"fill=currentColor width=19 height=19><path d=\"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z\">"), se = /*#__PURE__*/ p("<svg aria-hidden=true viewBox=\"0 0 24 24\"fill=currentColor width=19 height=19><path d=\"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701\">"), ce = /*#__PURE__*/ p("<svg aria-hidden=true viewBox=\"0 0 24 24\"fill=currentColor width=19 height=19><path d=\"M0 0h11.377v11.372H0zm12.623 0H24v11.372H12.623zM0 12.623h11.377V24H0zm12.623 0H24V24H12.623\"fill=#00A4EF>"), le = /*#__PURE__*/ p("<svg aria-hidden=true viewBox=\"0 0 24 24\"fill=currentColor width=19 height=19><path d=\"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z\">");
814
+ function ue() {
815
+ return a(B);
816
+ }
817
+ function de() {
818
+ return a(oe);
819
+ }
820
+ function V() {
821
+ return a(se);
822
+ }
823
+ function fe() {
824
+ return a(ce);
825
+ }
826
+ function H() {
827
+ return a(le);
828
+ }
829
+ // src/sign-in-controller.ts
830
+ var pe = O.en.errors;
831
+ function me(e) {
832
+ let t = new URLSearchParams(e.search), n = v(e.next), r = h(e.routePrefix), i = v(e.loginPath, "/login").split(/[?#]/, 1)[0], a = t.get("challenge_id"), o = t.get("token"), s = !!a && !!o && t.get("type") === "email_verification", [c, l] = T(e.initialConfig), [u, d] = T(!1), [f, p] = T("choose"), [m, y] = T(""), b = t.get("error"), [x, S] = T(ne(b) ? b : ""), w = () => {
833
+ let e = x();
834
+ return e ? pe[e] : "";
835
+ }, [E, O] = T(""), k = () => !e.requireAgreement || e.agreementAccepted === !0, [A, j] = T(!1), [M, te] = T(!1), [N, re] = T(!1), R, ie = !1, [z, ae] = T(""), [B, oe] = T(""), [se, ce] = T(""), [le, ue] = T(!1), [de, V] = T(!1), [fe, H] = T(0), [me, he] = T(0), ge = () => Math.max(0, Math.ceil((fe() - me()) / 1e3)), _e, U = new AbortController();
836
+ async function ve() {
482
837
  if (U.signal.aborted) return;
483
- u(!1), c(void 0), H?.abort();
838
+ d(!1), l(void 0), _e?.abort();
484
839
  let e = new AbortController();
485
- H = e;
840
+ _e = e;
486
841
  try {
487
- let t = await fetch("/auth/config", {
842
+ let t = await fetch(`${r}/config`, {
488
843
  referrerPolicy: "origin",
489
844
  redirect: "error",
490
845
  signal: AbortSignal.any([e.signal, AbortSignal.timeout(12e3)])
491
846
  });
492
847
  if (!t.ok) throw Error();
493
848
  let n = await t.json();
494
- if (!n || !Array.isArray(n.providers) || !n.providers.every((e) => typeof e == "string" && Object.hasOwn(g, e)) || [
849
+ if (!n || !Array.isArray(n.providers) || !n.providers.every((e) => typeof e == "string" && Object.hasOwn(_, e)) || [
495
850
  n.password,
496
851
  n.signup,
497
852
  n.otp,
498
853
  n.passkey
499
- ].some((e) => typeof e != "boolean")) throw Error();
500
- e.signal.aborted || c(n);
854
+ ].some((e) => typeof e != "boolean") || [n.recovery, n.passkeyEnrollment].some((e) => e !== void 0 && typeof e != "boolean")) throw Error();
855
+ e.signal.aborted || l(n);
501
856
  } catch {
502
- !e.signal.aborted && !U.signal.aborted && u(!0);
857
+ !e.signal.aborted && !U.signal.aborted && d(!0);
503
858
  }
504
859
  }
505
- te(() => {
506
- O(window.isSecureContext && typeof PublicKeyCredential < "u"), o && (f("confirm"), window.history.replaceState(window.history.state, "", `${r}?${new URLSearchParams({ next: n })}`)), le();
507
- let e = window.setInterval(() => se(Date.now()), 1e3);
508
- ee(() => {
509
- window.clearInterval(e), H?.abort(), U.abort();
860
+ ee(() => {
861
+ te(window.isSecureContext && typeof PublicKeyCredential < "u"), s && (p("confirm"), window.history.replaceState(window.history.state, "", `${i}?${new URLSearchParams({ next: n })}`)), c() || ve(), e.conditionalPasskey && M() && PublicKeyCredential.isConditionalMediationAvailable?.().then((e) => {
862
+ U.signal.aborted || re(e);
863
+ }).catch(() => void 0);
864
+ let t = window.setInterval(() => he(Date.now()), 1e3);
865
+ D(() => {
866
+ window.clearInterval(t), _e?.abort(), ye(), U.abort();
510
867
  });
511
868
  });
869
+ function ye() {
870
+ R?.abort(), R = void 0;
871
+ }
512
872
  function W(e) {
513
- b(""), E(!1), f(e);
873
+ e !== "choose" && ye(), S(""), j(!1), p(e);
514
874
  }
515
- async function ue(e, t) {
516
- let n = await fetch(e, {
517
- method: "POST",
518
- headers: { "Content-Type": "application/json" },
519
- referrerPolicy: "origin",
520
- redirect: "error",
521
- signal: AbortSignal.any([U.signal, AbortSignal.timeout(45e3)]),
522
- body: JSON.stringify(t)
523
- }), r = await n.json();
524
- if (!n.ok) throw new R(ie(r.error) ? r.error : "unavailable");
525
- return r;
875
+ async function G(t, n, r = U.signal) {
876
+ if (!k()) throw new P("acceptance_required");
877
+ return await F(t, {
878
+ ...n,
879
+ acceptance: e.getAcceptance?.()
880
+ }, AbortSignal.any([U.signal, r]));
526
881
  }
527
- async function G(e, t = {}) {
528
- let r = await ue("/auth/email", {
882
+ async function K(e, t = {}) {
883
+ let i = await G(`${r}/email`, {
529
884
  action: e,
530
885
  next: n,
531
886
  ...t
532
887
  });
533
- return !U.signal.aborted && typeof r.next == "string" && window.location.assign(_(r.next, n)), r;
888
+ return !U.signal.aborted && typeof i.next == "string" && window.location.assign(v(i.next, n)), i;
534
889
  }
535
- async function K(e, t) {
536
- if (!(S() || U.signal.aborted)) {
537
- w(e), b("");
538
- try {
539
- await t();
540
- } catch (e) {
541
- U.signal.aborted || b(e instanceof R ? e.code : "unavailable");
542
- } finally {
543
- w("");
890
+ async function q(e, t) {
891
+ if (!(E() || U.signal.aborted)) {
892
+ if (!k()) S("acceptance_required");
893
+ else {
894
+ ie = !0, ye(), O(e), S("");
895
+ try {
896
+ await t();
897
+ } catch (e) {
898
+ U.signal.aborted || S(e instanceof P ? e.code : "unavailable");
899
+ } finally {
900
+ O("");
901
+ }
544
902
  }
545
903
  }
546
904
  }
547
- function de(e) {
548
- if (s()?.providers.includes(e)) return K(g[e][0], async () => {
549
- let { authorize: t } = await ue(`/auth/start/${e}`, { next: n }), r = h(e, t);
550
- if (!r) throw Error();
551
- U.signal.aborted || window.location.assign(r);
905
+ function be(t) {
906
+ if (c()?.providers.includes(t)) return q(_[t][0], async () => {
907
+ let { authorize: i } = await G(`${r}/start/${t}`, { next: n }), a = g(t, i);
908
+ if (!a) throw Error();
909
+ if (!U.signal.aborted) {
910
+ if (!k() || (await e.beforeOAuthNavigate?.(t, a), !k())) throw new P("acceptance_required");
911
+ U.signal.aborted || window.location.assign(a);
912
+ }
913
+ });
914
+ }
915
+ function xe() {
916
+ if (c()?.recovery && f() === "recover") return q("recovery", async () => {
917
+ if ((await G(`${r}/email`, {
918
+ action: "recovery_start",
919
+ email: m().trim(),
920
+ next: n
921
+ })).step !== "recovery_sent") throw Error();
922
+ U.signal.aborted || W("recovery_sent");
552
923
  });
553
924
  }
554
- function q() {
555
- if (!(!s()?.otp || d() === "otp" && ce() > 0)) return K("email", async () => {
556
- let e = await G("otp_start", { email: p().trim() });
925
+ function Se() {
926
+ if (!(!c()?.otp || f() === "otp" && ge() > 0)) return q("email", async () => {
927
+ let e = await K("otp_start", { email: m().trim() });
557
928
  if (!e.flow) throw Error();
558
- ne(e.flow), A("");
929
+ oe(e.flow), ae("");
559
930
  let t = Date.now();
560
- se(t), V(t + 3e4), W("otp");
931
+ he(t), H(t + 3e4), W("otp");
561
932
  });
562
933
  }
563
- function fe(e = k()) {
564
- if (d() === "otp" && !S() && /^\d{6}$/.test(e)) return A(e), K("verify", async () => {
565
- (await G("otp_verify", {
566
- flow: j(),
934
+ function Ce(e = z()) {
935
+ if (f() === "otp" && !E() && /^\d{6}$/.test(e)) return ae(e), q("verify", async () => {
936
+ (await K("otp_verify", {
937
+ flow: B(),
567
938
  code: e
568
- })).step === "mfa" && (N(""), I(!1), W("mfa"));
939
+ })).step === "mfa" && (ce(""), V(!1), W("mfa"));
569
940
  });
570
941
  }
571
- function pe() {
572
- if (D() && s()?.passkey) return K("passkey", async () => {
573
- let { challenge: e, challengeId: t, rpId: n, credentials: r } = await G("passkey_start");
574
- if (!e || !t || !n || !r) throw Error();
575
- let i = await navigator.credentials.get({
576
- signal: U.signal,
577
- publicKey: {
578
- challenge: ae(e),
579
- rpId: n,
580
- timeout: 6e4,
581
- userVerification: "required",
582
- allowCredentials: r.map((e) => ({
583
- id: ae(e),
584
- type: "public-key"
585
- }))
586
- }
587
- }).catch((e) => {
588
- if (e instanceof DOMException && e.name === "NotAllowedError") return null;
589
- throw e;
590
- });
591
- if (!(i instanceof PublicKeyCredential) || !(i.response instanceof AuthenticatorAssertionResponse)) throw new R("method_unavailable");
592
- let a = i.response;
593
- await G("passkey_verify", {
594
- challenge_id: t,
595
- credential_id: z(i.rawId),
596
- client_data_json: z(a.clientDataJSON),
597
- authenticator_data: z(a.authenticatorData),
598
- signature: z(a.signature),
599
- user_handle: a.userHandle ? z(a.userHandle) : ""
942
+ async function we(e, t) {
943
+ let { challenge: i, challengeId: a, rpId: o, credentials: s } = await G(`${r}/email`, {
944
+ action: "passkey_start",
945
+ next: n
946
+ }, e);
947
+ if (e.aborted || !i || !a || !o || !s) return;
948
+ if (!k()) throw new P("acceptance_required");
949
+ if (t && s.length) return;
950
+ let c = await navigator.credentials.get({
951
+ signal: e,
952
+ ...t && { mediation: "conditional" },
953
+ publicKey: {
954
+ challenge: I(i),
955
+ rpId: o,
956
+ ...t ? {} : { timeout: 6e4 },
957
+ userVerification: "required",
958
+ allowCredentials: s.map((e) => ({
959
+ id: I(e),
960
+ type: "public-key"
961
+ }))
962
+ }
963
+ });
964
+ if (e.aborted || !(c instanceof PublicKeyCredential) || !(c.response instanceof AuthenticatorAssertionResponse)) return;
965
+ let l = c.response;
966
+ return {
967
+ challenge_id: a,
968
+ credential_id: L(c.rawId),
969
+ client_data_json: L(l.clientDataJSON),
970
+ authenticator_data: L(l.authenticatorData),
971
+ signature: L(l.signature),
972
+ user_handle: l.userHandle ? L(l.userHandle) : ""
973
+ };
974
+ }
975
+ function Te() {
976
+ if (M() && c()?.passkey && (f() === "choose" || f() === "confirm" && s)) return q("passkey", async () => {
977
+ let e = await we(U.signal, !1).catch((e) => {
978
+ if (!(e instanceof DOMException && e.name === "NotAllowedError")) throw e;
600
979
  });
980
+ if (!e) throw new P("method_unavailable");
981
+ await K("passkey_verify", e);
601
982
  });
602
983
  }
603
- function me() {
604
- if (s()?.otp) return q();
605
- s()?.password && !S() && W("password");
984
+ C(() => {
985
+ if (!k()) {
986
+ ye();
987
+ return;
988
+ }
989
+ if (ie || !N() || f() !== "choose" || !c()?.passkey || e.getAcceptance && !e.getAcceptance()) return;
990
+ ie = !0;
991
+ let t = new AbortController();
992
+ R = t, we(t.signal, !0).then((e) => {
993
+ if (e && !t.signal.aborted && !U.signal.aborted) return q("passkey", async () => {
994
+ await K("passkey_verify", e);
995
+ });
996
+ }).catch(() => void 0).finally(() => {
997
+ R === t && (R = void 0);
998
+ });
999
+ });
1000
+ function Ee(e) {
1001
+ if (e !== "password" && c()?.otp) return Se();
1002
+ e !== "otp" && c()?.password && !E() && W("password");
606
1003
  }
607
- function he(e) {
608
- let t = d();
609
- if ((t === "password" || t === "signup" || t === "confirm") && (t !== "confirm" || o)) return K("password", async () => {
610
- let n = await G(t === "confirm" ? "verify_signup" : t, {
611
- email: p().trim(),
1004
+ function De(e) {
1005
+ let t = f();
1006
+ if ((t === "password" || t === "signup" || t === "confirm") && (t !== "confirm" || s)) return q("password", async () => {
1007
+ let n = await K(t === "confirm" ? "verify_signup" : t, {
1008
+ email: m().trim(),
612
1009
  password: e,
613
1010
  ...t === "confirm" ? {
614
- challengeId: i,
615
- verification: a
1011
+ challengeId: a,
1012
+ verification: o
616
1013
  } : {}
617
1014
  });
618
- n.step === "check_email" && W("check_email"), n.step === "mfa" && n.challenge && (N(n.challenge), P(t === "confirm"), I(!1), W("mfa"));
1015
+ n.step === "check_email" && W("check_email"), n.step === "mfa" && n.challenge && (ce(n.challenge), ue(t === "confirm"), V(!1), W("mfa"));
619
1016
  });
620
1017
  }
621
- function ge(e) {
622
- if (d() !== "mfa") return;
623
- let t = e.trim(), n = F() ? "recovery_code" : "totp";
624
- return K("verify", async () => {
625
- M() ? await G("mfa", {
626
- challenge: M(),
1018
+ function Oe(e) {
1019
+ if (f() !== "mfa") return;
1020
+ let t = e.trim(), n = de() ? "recovery_code" : "totp";
1021
+ return q("verify", async () => {
1022
+ se() ? await K("mfa", {
1023
+ challenge: se(),
627
1024
  code: t,
628
1025
  method: n,
629
- ...re() ? {
630
- challengeId: i,
631
- verification: a
1026
+ ...le() ? {
1027
+ challengeId: a,
1028
+ verification: o
632
1029
  } : {}
633
- }) : await G("otp_verify", {
634
- flow: j(),
635
- code: k(),
1030
+ }) : await K("otp_verify", {
1031
+ flow: B(),
1032
+ code: z(),
636
1033
  factor: t,
637
1034
  method: n
638
1035
  });
639
1036
  });
640
1037
  }
641
1038
  return {
642
- config: s,
643
- configFailed: l,
644
- loadConfig: le,
645
- step: d,
1039
+ emailRoute: `${r}/email`,
1040
+ config: c,
1041
+ configFailed: u,
1042
+ loadConfig: ve,
1043
+ step: f,
646
1044
  go: W,
647
- email: p,
648
- setEmail: m,
649
- error: x,
650
- errorCode: y,
651
- busy: S,
652
- showPassword: T,
653
- setShowPassword: E,
654
- canPasskey: D,
655
- code: k,
656
- setCode: A,
657
- recovery: F,
658
- setRecovery: I,
659
- wait: ce,
660
- continueWithEmail: me,
661
- social: de,
662
- sendCode: q,
663
- verifyCode: fe,
664
- passkey: pe,
665
- submitPassword: he,
666
- submitMfa: ge
1045
+ email: m,
1046
+ setEmail: y,
1047
+ error: w,
1048
+ errorCode: x,
1049
+ agreementAllowed: k,
1050
+ busy: E,
1051
+ showPassword: A,
1052
+ setShowPassword: j,
1053
+ canPasskey: M,
1054
+ code: z,
1055
+ setCode: ae,
1056
+ recovery: de,
1057
+ setRecovery: V,
1058
+ wait: ge,
1059
+ continueWithEmail: Ee,
1060
+ social: be,
1061
+ sendCode: Se,
1062
+ sendRecovery: xe,
1063
+ verifyCode: Ce,
1064
+ passkey: Te,
1065
+ submitPassword: De,
1066
+ submitMfa: Oe
667
1067
  };
668
1068
  }
669
1069
  // src/sign-in.tsx
670
- var V = /*#__PURE__*/ p("<p>"), oe = /*#__PURE__*/ p("<p role=alert>"), se = /*#__PURE__*/ p("<label>"), ce = /*#__PURE__*/ p("<input type=email name=username autocomplete=username required maxlength=254>"), H = /*#__PURE__*/ p("<form method=post action=/auth/email><!$><!/><label></label><div><input name=password required maxlength=1024><button type=button></button></div><!$><!/><button type=submit>"), U = /*#__PURE__*/ p("<button type=button>"), le = /*#__PURE__*/ p("<form method=post action=/auth/email><label></label><div><input type=text inputmode=numeric autocomplete=one-time-code><div aria-hidden=true></div></div><button type=submit>"), W = /*#__PURE__*/ p("<div><button type=button></button><button type=button></button><!$><!/>"), ue = /*#__PURE__*/ p("<form method=post action=/auth/email><label></label><input name=code autocomplete=one-time-code required><button type=submit>"), G = /*#__PURE__*/ p("<div><button type=button></button><button type=button>"), K = /*#__PURE__*/ p("<div><label></label><select>"), de = /*#__PURE__*/ p("<section><div><!$><!/><h1></h1><p></p><!$><!/><!$><!/><!$><!/><!$><!/>"), q = /*#__PURE__*/ p("<output>"), fe = /*#__PURE__*/ p("<div>"), pe = /*#__PURE__*/ p("<form method=post action=/auth/email><label></label><input type=email name=email autocomplete=username required maxlength=254><button type=submit>"), me = /*#__PURE__*/ p("<p><!$><!/> <button type=button>"), he = /*#__PURE__*/ p("<button type=button><!$><!/><!$><!/>"), ge = /*#__PURE__*/ p("<input tabindex=-1 hidden name=username autocomplete=username readonly>"), _e = /*#__PURE__*/ p("<span>"), ve = /*#__PURE__*/ p("<option>"), ye = Object.keys(E), be = {
671
- google: N,
672
- github: re,
673
- apple: P,
674
- facebook: I,
675
- microsoft: F
1070
+ var he = /*#__PURE__*/ p("<span>"), ge = /*#__PURE__*/ p("<button type=button><!$><!/><!$><!/>"), _e = /*#__PURE__*/ p("<p>"), U = /*#__PURE__*/ p("<p role=alert>"), ve = /*#__PURE__*/ p("<label>"), ye = /*#__PURE__*/ p("<input type=email name=username required maxlength=254>"), W = /*#__PURE__*/ p("<form method=post><!$><!/><label></label><div><input name=password required maxlength=1024><button type=button></button></div><!$><!/><button type=submit>"), G = /*#__PURE__*/ p("<button type=button>"), K = /*#__PURE__*/ p("<form method=post><label></label><input type=email autocomplete=email required maxlength=254><button type=submit>"), q = /*#__PURE__*/ p("<form method=post><label></label><div><input type=text inputmode=numeric autocomplete=one-time-code><div aria-hidden=true></div></div><button type=submit>"), be = /*#__PURE__*/ p("<div><button type=button></button><button type=button></button><!$><!/>"), xe = /*#__PURE__*/ p("<form method=post><label></label><input name=code autocomplete=one-time-code required><button type=submit>"), Se = /*#__PURE__*/ p("<div><button type=button></button><button type=button>"), Ce = /*#__PURE__*/ p("<div><label></label><select>"), we = /*#__PURE__*/ p("<div>"), Te = /*#__PURE__*/ p("<section><div><!$><!/><h1></h1><p></p><!$><!/><!$><!/><!$><!/><!$><!/>"), Ee = /*#__PURE__*/ p("<output>"), De = /*#__PURE__*/ p("<form method=post><label></label><input type=email name=email required maxlength=254><button type=submit><!$><!/><!$><!/>"), Oe = /*#__PURE__*/ p("<p><!$><!/> <button type=button>"), ke = /*#__PURE__*/ p("<button type=button><!$><!/><!$><!/><!$><!/>"), Ae = /*#__PURE__*/ p("<input tabindex=-1 hidden name=username readonly>"), je = /*#__PURE__*/ p("<option>"), Me = Object.keys(k), Ne = {
1071
+ google: ue,
1072
+ github: de,
1073
+ apple: V,
1074
+ facebook: H,
1075
+ microsoft: fe
676
1076
  };
677
- function xe(r) {
678
- let p = B(r), { config: h, configFailed: _, loadConfig: ee, step: k, email: A, setEmail: j, errorCode: ne, busy: M, showPassword: N, setShowPassword: re, canPasskey: P, code: F, setCode: I, recovery: L, setRecovery: ie, wait: R, continueWithEmail: ae, social: z, sendCode: xe, verifyCode: Se, passkey: Ce, submitPassword: we, submitMfa: Te } = p, [Ee, De] = C(), [Oe, ke] = C(), J = S(() => r.locale === void 0 ? Oe() ?? Ee() ?? D(r.localePreferences ?? []) : D([r.locale, ...r.localePreferences ?? []])), Y = () => T[J()], Ae = S(() => O(J())), je = () => {
1077
+ function Pe(r) {
1078
+ let p = me(r), { emailRoute: h, config: g, configFailed: v, loadConfig: C, step: D, email: O, setEmail: N, errorCode: ne, busy: P, agreementAllowed: F, showPassword: I, setShowPassword: L, canPasskey: re, code: R, setCode: ie, recovery: z, setRecovery: ae, wait: B, continueWithEmail: oe, social: se, sendCode: ce, sendRecovery: le, verifyCode: ue, passkey: de, submitPassword: V, submitMfa: fe } = p, [H, pe] = T(), [Pe, Fe] = T(), Ie = w(() => r.locale === void 0 ? Pe() ?? H() ?? j(r.localePreferences ?? []) : j([r.locale, ...r.localePreferences ?? []])), J = w(() => A(Ie(), r.messages)), Le = () => te(Ie(), r.locale, r.messages), Re = w(() => M(Le())), Y = () => !!P() || !F(), ze = () => {
679
1079
  let e = ne();
680
- return e ? Y().errors[e] : "";
1080
+ return e ? J().errors[e] : "";
681
1081
  };
682
- te(() => {
683
- r.locale === void 0 && !r.localePreferences?.length && De(D(navigator.languages));
1082
+ ee(() => {
1083
+ r.locale === void 0 && !r.localePreferences?.length && pe(j(navigator.languages));
684
1084
  });
685
- let Me = w(), X = (e) => `${Me}-${e}`;
1085
+ let Be = E(), X = (e) => `${Be}-${e}`;
686
1086
  function Z(e) {
687
1087
  let t = r.appearance?.classes?.[e];
688
1088
  return r.appearance?.unstyled ? t : t ? `auth-sign-in-${e} ${t}` : `auth-sign-in-${e}`;
689
1089
  }
690
- let Ne;
1090
+ let [Ve, He] = T(!1), Ue;
691
1091
  function Q(e) {
692
1092
  queueMicrotask(() => e.focus());
693
1093
  }
694
1094
  function $(e) {
695
- p.go(e), e === "choose" && queueMicrotask(() => Ne?.focus());
1095
+ p.go(e), e === "choose" && queueMicrotask(() => Ue?.focus());
696
1096
  }
1097
+ let We = (e) => n(x, {
1098
+ get when() {
1099
+ return r.lastUsed === e;
1100
+ },
1101
+ get children() {
1102
+ var e = a(he);
1103
+ return s(e, () => J().lastUsed), i(() => t(e, Z("last-used"))), e;
1104
+ }
1105
+ }), Ge = () => n(x, {
1106
+ get when() {
1107
+ return c(() => !!g()?.passkey)() && re();
1108
+ },
1109
+ get children() {
1110
+ var e = a(ge), n = e.firstChild, [r, u] = o(n.nextSibling), f = r.nextSibling, [p, m] = o(f.nextSibling);
1111
+ return e.$$click = () => void de(), s(e, (() => {
1112
+ var e = c(() => P() === "passkey");
1113
+ return () => e() ? J().waitingPasskey : J().usePasskey;
1114
+ })(), r, u), s(e, () => We("passkey"), p, m), i((n) => {
1115
+ var r = Z("link"), i = Y();
1116
+ return r !== n.e && t(e, n.e = r), i !== n.t && d(e, "disabled", n.t = i), n;
1117
+ }, {
1118
+ e: void 0,
1119
+ t: void 0
1120
+ }), l(), e;
1121
+ }
1122
+ });
697
1123
  return (() => {
698
- var p = a(de), S = p.firstChild, C = S.firstChild, [w, te] = o(C.nextSibling), T = w.nextSibling, O = T.nextSibling, ne = O.nextSibling, [B, Ee] = o(ne.nextSibling), De = B.nextSibling, [Oe, Me] = o(De.nextSibling), Pe = Oe.nextSibling, [Fe, Ie] = o(Pe.nextSibling), Le = Fe.nextSibling, [Re, ze] = o(Le.nextSibling);
699
- return s(S, n(b, {
1124
+ var p = a(Te), w = p.firstChild, T = w.firstChild, [E, ee] = o(T.nextSibling), A = E.nextSibling, M = A.nextSibling, te = M.nextSibling, [ne, F] = o(te.nextSibling), de = ne.nextSibling, [H, pe] = o(de.nextSibling), me = H.nextSibling, [Pe, Be] = o(me.nextSibling), Ke = Pe.nextSibling, [qe, Je] = o(Ke.nextSibling);
1125
+ return s(w, n(x, {
700
1126
  get when() {
701
1127
  return r.kicker;
702
1128
  },
703
1129
  get children() {
704
- var e = a(V);
1130
+ var e = a(_e);
705
1131
  return s(e, () => r.kicker), i(() => t(e, Z("kicker"))), e;
706
1132
  }
707
- }), w, te), s(T, () => ({
708
- choose: r.title ?? Y().signIn,
709
- password: Y().enterPassword,
710
- signup: Y().createYourAccount,
711
- check_email: Y().checkInbox,
712
- confirm: Y().confirmEmail,
713
- otp: Y().checkInbox,
714
- mfa: Y().verifyIdentity
715
- })[k()]), s(O, () => ({
716
- choose: r.description ?? Y().chooseMethod,
717
- password: A(),
718
- signup: Y().startWithEmail,
719
- check_email: Y().checkEmailDescription,
720
- confirm: Y().confirmEmailDescription,
721
- otp: Y().enterEmailCode(A()),
722
- mfa: L() ? Y().enterRecovery : Y().enterAuthenticator
723
- })[k()]), s(S, n(b, {
1133
+ }), E, ee), s(A, () => ({
1134
+ choose: r.title ?? J().signIn,
1135
+ password: J().enterPassword,
1136
+ signup: J().createYourAccount,
1137
+ check_email: J().checkInbox,
1138
+ confirm: J().confirmEmail,
1139
+ otp: J().checkInbox,
1140
+ mfa: J().verifyIdentity,
1141
+ recover: J().recoverAccount,
1142
+ recovery_sent: J().recoverySent
1143
+ })[D()]), s(M, () => ({
1144
+ choose: r.description ?? J().chooseMethod,
1145
+ password: O(),
1146
+ signup: J().startWithEmail,
1147
+ check_email: J().checkEmailDescription,
1148
+ confirm: J().confirmEmailDescription,
1149
+ otp: J().enterEmailCode(O()),
1150
+ mfa: z() ? J().enterRecovery : J().enterAuthenticator,
1151
+ recover: J().recoverDescription,
1152
+ recovery_sent: J().recoverySentDescription
1153
+ })[D()]), s(w, n(x, {
724
1154
  get when() {
725
- return je();
1155
+ return ze();
726
1156
  },
727
1157
  get children() {
728
- var e = a(oe);
729
- return s(e, je), i(() => t(e, Z("error"))), e;
1158
+ var e = a(U);
1159
+ return s(e, ze), i(() => t(e, Z("error"))), e;
730
1160
  }
731
- }), B, Ee), s(S, n(x, { get children() {
1161
+ }), ne, F), s(w, n(S, { get children() {
732
1162
  return [
733
- n(y, {
1163
+ n(b, {
734
1164
  get when() {
735
- return k() === "choose";
1165
+ return D() === "choose";
736
1166
  },
737
1167
  get children() {
738
- return n(b, {
1168
+ return n(x, {
739
1169
  get when() {
740
- return h();
1170
+ return g();
741
1171
  },
742
1172
  get fallback() {
743
- return n(b, {
1173
+ return n(x, {
744
1174
  get when() {
745
- return _();
1175
+ return v();
746
1176
  },
747
1177
  get fallback() {
748
1178
  return (() => {
749
- var e = a(q);
750
- return s(e, () => Y().loading), i(() => t(e, Z("loading"))), e;
1179
+ var e = a(Ee);
1180
+ return s(e, () => J().loading), i(() => t(e, Z("loading"))), e;
751
1181
  })();
752
1182
  },
753
1183
  get children() {
754
1184
  return [(() => {
755
- var e = a(oe);
756
- return s(e, () => Y().errors.unavailable), i(() => t(e, Z("error"))), e;
1185
+ var e = a(U);
1186
+ return s(e, () => J().errors.unavailable), i(() => t(e, Z("error"))), e;
757
1187
  })(), (() => {
758
- var n = a(U);
759
- return e(n, "click", ee, !0), s(n, () => Y().retry), i(() => t(n, Z("secondary"))), l(), n;
1188
+ var n = a(G);
1189
+ return e(n, "click", C, !0), s(n, () => J().retry), i(() => t(n, Z("secondary"))), l(), n;
760
1190
  })()];
761
1191
  }
762
1192
  });
763
1193
  },
764
1194
  children: (e) => [
765
1195
  (() => {
766
- var r = a(fe);
767
- return s(r, n(v, {
1196
+ var r = a(we);
1197
+ return s(r, n(y, {
768
1198
  get each() {
769
1199
  return e().providers;
770
1200
  },
771
1201
  children: (e) => {
772
- let r = be[e];
1202
+ let r = Ne[e];
773
1203
  return (() => {
774
- var u = a(he), f = u.firstChild, [p, m] = o(f.nextSibling), h = p.nextSibling, [_, v] = o(h.nextSibling);
775
- return u.$$click = () => void z(e), s(u, r && n(r, {}), p, m), s(u, (() => {
776
- var t = c(() => M() === g[e][0]);
777
- return () => t() ? Y().openingProvider(g[e][0]) : Y().continueProvider(g[e][0]);
778
- })(), _, v), i((e) => {
779
- var n = Z("secondary"), r = !!M();
1204
+ var u = a(ke), f = u.firstChild, [p, m] = o(f.nextSibling), h = p.nextSibling, [g, v] = o(h.nextSibling), y = g.nextSibling, [b, x] = o(y.nextSibling);
1205
+ return u.$$click = () => void se(e), s(u, r && n(r, {}), p, m), s(u, (() => {
1206
+ var t = c(() => P() === _[e][0]);
1207
+ return () => t() ? J().openingProvider(_[e][0]) : J().continueProvider(_[e][0]);
1208
+ })(), g, v), s(u, () => We(e), b, x), i((e) => {
1209
+ var n = Z("secondary"), r = Y();
780
1210
  return n !== e.e && t(u, e.e = n), r !== e.t && d(u, "disabled", e.t = r), e;
781
1211
  }, {
782
1212
  e: void 0,
@@ -786,52 +1216,52 @@ function xe(r) {
786
1216
  }
787
1217
  })), i(() => t(r, Z("providers"))), r;
788
1218
  })(),
789
- n(b, {
1219
+ n(x, {
790
1220
  get when() {
791
1221
  return e().password || e().otp;
792
1222
  },
793
1223
  get children() {
794
- return [n(b, {
1224
+ return [n(x, {
795
1225
  get when() {
796
1226
  return e().providers.length;
797
1227
  },
798
1228
  get children() {
799
- var e = a(fe);
800
- return s(e, () => Y().orEmail), i(() => t(e, Z("divider"))), e;
1229
+ var e = a(we);
1230
+ return s(e, () => J().orEmail), i(() => t(e, Z("divider"))), e;
801
1231
  }
802
1232
  }), (() => {
803
- var n = a(pe), r = n.firstChild, o = r.nextSibling, f = o.nextSibling;
1233
+ var n = a(De), r = n.firstChild, f = r.nextSibling, p = f.nextSibling, _ = p.firstChild, [v, y] = o(_.nextSibling), b = v.nextSibling, [x, S] = o(b.nextSibling);
804
1234
  return n.addEventListener("submit", (e) => {
805
- e.preventDefault(), ae();
806
- }), s(r, () => Y().email), o.$$input = (e) => j(e.currentTarget.value), m((e) => {
807
- Ne = e;
808
- }, o), s(f, (() => {
809
- var t = c(() => M() === "email");
810
- return () => t() ? Y().sendingCode : c(() => !!e().otp)() ? Y().emailCodeAction : Y().continueEmail;
811
- })()), i((e) => {
812
- var i = Z("form"), a = X("email"), s = X("email"), c = Z("primary"), l = !!M();
813
- return i !== e.e && t(n, e.e = i), a !== e.t && u(r, "for", e.t = a), s !== e.a && u(o, "id", e.a = s), c !== e.o && t(f, e.o = c), l !== e.i && d(f, "disabled", e.i = l), e;
1235
+ e.preventDefault(), oe();
1236
+ }), u(n, "action", h), s(r, () => J().email), f.$$input = (e) => N(e.currentTarget.value), m((e) => {
1237
+ Ue = e;
1238
+ }, f), s(p, (() => {
1239
+ var t = c(() => P() === "email");
1240
+ return () => t() ? J().sendingCode : c(() => !!e().otp)() ? J().emailCodeAction : J().continueEmail;
1241
+ })(), v, y), s(p, () => We(e().otp ? "otp" : "password"), x, S), i((e) => {
1242
+ var i = Z("form"), a = X("email"), o = X("email"), s = g()?.passkey ? "username webauthn" : "username", c = Z("primary"), l = Y();
1243
+ return i !== e.e && t(n, e.e = i), a !== e.t && u(r, "for", e.t = a), o !== e.a && u(f, "id", e.a = o), s !== e.o && u(f, "autocomplete", e.o = s), c !== e.i && t(p, e.i = c), l !== e.n && d(p, "disabled", e.n = l), e;
814
1244
  }, {
815
1245
  e: void 0,
816
1246
  t: void 0,
817
1247
  a: void 0,
818
1248
  o: void 0,
819
- i: void 0
820
- }), i(() => d(o, "value", A())), l(), n;
1249
+ i: void 0,
1250
+ n: void 0
1251
+ }), i(() => d(f, "value", O())), l(), n;
821
1252
  })()];
822
1253
  }
823
1254
  }),
824
- n(b, {
1255
+ n(x, {
825
1256
  get when() {
826
- return c(() => !!e().passkey)() && P();
1257
+ return c(() => !!e().otp)() && e().password;
827
1258
  },
828
1259
  get children() {
829
- var e = a(U);
830
- return e.$$click = () => void Ce(), s(e, (() => {
831
- var e = c(() => M() === "passkey");
832
- return () => e() ? Y().waitingPasskey : Y().usePasskey;
833
- })()), i((n) => {
834
- var r = Z("link"), i = !!M();
1260
+ var e = a(ge), n = e.firstChild, [r, c] = o(n.nextSibling), u = r.nextSibling, [f, p] = o(u.nextSibling);
1261
+ return e.$$click = () => {
1262
+ He(!O().trim() || !Ue?.validity.valid), oe("password");
1263
+ }, s(e, () => J().usePassword, r, c), s(e, () => We("password"), f, p), i((n) => {
1264
+ var r = Z("link"), i = !!P();
835
1265
  return r !== n.e && t(e, n.e = r), i !== n.t && d(e, "disabled", n.t = i), n;
836
1266
  }, {
837
1267
  e: void 0,
@@ -839,14 +1269,15 @@ function xe(r) {
839
1269
  }), l(), e;
840
1270
  }
841
1271
  }),
842
- n(b, {
1272
+ c(Ge),
1273
+ n(x, {
843
1274
  get when() {
844
1275
  return e().signup;
845
1276
  },
846
1277
  get children() {
847
- var e = a(me), n = e.firstChild, [r, c] = o(n.nextSibling), u = r.nextSibling.nextSibling;
848
- return s(e, () => Y().newHere, r, c), u.$$click = () => $("signup"), s(u, () => Y().createAnAccount), i((n) => {
849
- var r = Z("switch"), i = Z("link"), a = !!M();
1278
+ var e = a(Oe), n = e.firstChild, [r, c] = o(n.nextSibling), u = r.nextSibling.nextSibling;
1279
+ return s(e, () => J().newHere, r, c), u.$$click = () => $("signup"), s(u, () => J().createAnAccount), i((n) => {
1280
+ var r = Z("switch"), i = Z("link"), a = !!P();
850
1281
  return r !== n.e && t(e, n.e = r), i !== n.t && t(u, n.t = i), a !== n.a && d(u, "disabled", n.a = a), n;
851
1282
  }, {
852
1283
  e: void 0,
@@ -855,95 +1286,163 @@ function xe(r) {
855
1286
  }), l(), e;
856
1287
  }
857
1288
  }),
858
- n(b, {
1289
+ n(x, {
859
1290
  get when() {
860
- return c(() => !(e().password || e().signup || e().otp || e().providers.length))() && !(e().passkey && P());
1291
+ return c(() => !(e().password || e().signup || e().otp || e().providers.length))() && !(e().passkey && re());
861
1292
  },
862
1293
  get children() {
863
- var e = a(q);
864
- return s(e, () => Y().noMethods), e;
1294
+ var e = a(Ee);
1295
+ return s(e, () => J().noMethods), e;
865
1296
  }
866
1297
  })
867
1298
  ]
868
1299
  });
869
1300
  }
870
1301
  }),
871
- n(y, {
1302
+ n(b, {
872
1303
  get when() {
873
- return k() === "password" || k() === "signup" || k() === "confirm";
1304
+ return D() === "password" || D() === "signup" || D() === "confirm";
874
1305
  },
875
1306
  get children() {
876
- return [(() => {
877
- var e = a(H), r = e.firstChild, [f, p] = o(r.nextSibling), h = f.nextSibling, g = h.nextSibling, _ = g.firstChild, v = _.nextSibling, y = g.nextSibling, [x, S] = o(y.nextSibling), C = x.nextSibling;
878
- return e.addEventListener("submit", (e) => {
879
- e.preventDefault(), we(String(new FormData(e.currentTarget).get("password") ?? ""));
880
- }), s(e, n(b, {
1307
+ return [
1308
+ (() => {
1309
+ var e = a(W), r = e.firstChild, [f, p] = o(r.nextSibling), _ = f.nextSibling, v = _.nextSibling, y = v.firstChild, b = y.nextSibling, S = v.nextSibling, [C, w] = o(S.nextSibling), T = C.nextSibling;
1310
+ return e.addEventListener("submit", (e) => {
1311
+ e.preventDefault(), V(String(new FormData(e.currentTarget).get("password") ?? ""));
1312
+ }), u(e, "action", h), s(e, n(x, {
1313
+ get when() {
1314
+ return D() !== "password" || Ve();
1315
+ },
1316
+ get fallback() {
1317
+ return (() => {
1318
+ var e = a(Ae);
1319
+ return i(() => u(e, "autocomplete", g()?.passkey ? "username webauthn" : "username")), i(() => d(e, "value", O())), e;
1320
+ })();
1321
+ },
1322
+ get children() {
1323
+ return [(() => {
1324
+ var e = a(ve);
1325
+ return s(e, () => J().email), i(() => u(e, "for", X("account-email"))), e;
1326
+ })(), (() => {
1327
+ var e = a(ye);
1328
+ e.$$input = (e) => N(e.currentTarget.value);
1329
+ var t = Q;
1330
+ return typeof t == "function" ? m(t, e) : Q = e, i((t) => {
1331
+ var n = X("account-email"), r = g()?.passkey ? "username webauthn" : "username";
1332
+ return n !== t.e && u(e, "id", t.e = n), r !== t.t && u(e, "autocomplete", t.t = r), t;
1333
+ }, {
1334
+ e: void 0,
1335
+ t: void 0
1336
+ }), i(() => d(e, "value", O())), l(), e;
1337
+ })()];
1338
+ }
1339
+ }), f, p), s(_, () => J().password), m((e) => {
1340
+ D() === "password" && !Ve() && Q(e);
1341
+ }, y), b.$$click = () => L(!I()), s(b, (() => {
1342
+ var e = c(() => !!I());
1343
+ return () => e() ? J().hide : J().show;
1344
+ })()), s(e, n(x, {
1345
+ get when() {
1346
+ return D() === "signup";
1347
+ },
1348
+ get children() {
1349
+ var e = a(_e);
1350
+ return s(e, () => J().minimumPassword), i((n) => {
1351
+ var r = Z("hint"), i = X("password-hint");
1352
+ return r !== n.e && t(e, n.e = r), i !== n.t && u(e, "id", n.t = i), n;
1353
+ }, {
1354
+ e: void 0,
1355
+ t: void 0
1356
+ }), e;
1357
+ }
1358
+ }), C, w), s(T, (() => {
1359
+ var e = c(() => !!P());
1360
+ return () => e() ? J().working : c(() => D() === "signup")() ? J().createAccount : c(() => D() === "confirm")() ? J().confirmAndSignIn : J().signIn;
1361
+ })()), i((n) => {
1362
+ var r = Z("form"), i = X("password"), a = Z("password"), o = X("password"), s = I() ? "text" : "password", c = D() === "signup" ? "new-password" : "current-password", l = D() === "signup" ? 12 : void 0, f = D() === "signup" ? X("password-hint") : void 0, p = Z("link"), m = I() ? J().hidePassword : J().showPassword, h = Z("primary"), g = Y();
1363
+ return r !== n.e && t(e, n.e = r), i !== n.t && u(_, "for", n.t = i), a !== n.a && t(v, n.a = a), o !== n.o && u(y, "id", n.o = o), s !== n.i && u(y, "type", n.i = s), c !== n.n && u(y, "autocomplete", n.n = c), l !== n.s && u(y, "minlength", n.s = l), f !== n.h && u(y, "aria-describedby", n.h = f), p !== n.r && t(b, n.r = p), m !== n.d && u(b, "aria-label", n.d = m), h !== n.l && t(T, n.l = h), g !== n.u && d(T, "disabled", n.u = g), n;
1364
+ }, {
1365
+ e: void 0,
1366
+ t: void 0,
1367
+ a: void 0,
1368
+ o: void 0,
1369
+ i: void 0,
1370
+ n: void 0,
1371
+ s: void 0,
1372
+ h: void 0,
1373
+ r: void 0,
1374
+ d: void 0,
1375
+ l: void 0,
1376
+ u: void 0
1377
+ }), l(), e;
1378
+ })(),
1379
+ n(x, {
881
1380
  get when() {
882
- return k() !== "password";
883
- },
884
- get fallback() {
885
- return (() => {
886
- var e = a(ge);
887
- return i(() => d(e, "value", A())), e;
888
- })();
1381
+ return c(() => D() === "password")() && g()?.recovery;
889
1382
  },
890
1383
  get children() {
891
- return [(() => {
892
- var e = a(se);
893
- return s(e, () => Y().email), i(() => u(e, "for", X("account-email"))), e;
894
- })(), (() => {
895
- var e = a(ce);
896
- e.$$input = (e) => j(e.currentTarget.value);
897
- var t = Q;
898
- return typeof t == "function" ? m(t, e) : Q = e, i(() => u(e, "id", X("account-email"))), i(() => d(e, "value", A())), l(), e;
899
- })()];
1384
+ var e = a(G);
1385
+ return e.$$click = () => $("recover"), s(e, () => J().forgotPassword), i((n) => {
1386
+ var r = Z("link"), i = !!P();
1387
+ return r !== n.e && t(e, n.e = r), i !== n.t && d(e, "disabled", n.t = i), n;
1388
+ }, {
1389
+ e: void 0,
1390
+ t: void 0
1391
+ }), l(), e;
900
1392
  }
901
- }), f, p), s(h, () => Y().password), m((e) => {
902
- k() === "password" && Q(e);
903
- }, _), v.$$click = () => re(!N()), s(v, (() => {
904
- var e = c(() => !!N());
905
- return () => e() ? Y().hide : Y().show;
906
- })()), s(e, n(b, {
1393
+ }),
1394
+ n(x, {
907
1395
  get when() {
908
- return k() === "signup";
1396
+ return D() === "confirm";
909
1397
  },
910
1398
  get children() {
911
- var e = a(V);
912
- return s(e, () => Y().minimumPassword), i((n) => {
913
- var r = Z("hint"), i = X("password-hint");
914
- return r !== n.e && t(e, n.e = r), i !== n.t && u(e, "id", n.t = i), n;
915
- }, {
916
- e: void 0,
917
- t: void 0
918
- }), e;
1399
+ return Ge();
919
1400
  }
920
- }), x, S), s(C, (() => {
921
- var e = c(() => !!M());
922
- return () => e() ? Y().working : c(() => k() === "signup")() ? Y().createAccount : c(() => k() === "confirm")() ? Y().confirmAndSignIn : Y().signIn;
923
- })()), i((n) => {
924
- var r = Z("form"), i = X("password"), a = Z("password"), o = X("password"), s = N() ? "text" : "password", c = k() === "signup" ? "new-password" : "current-password", l = k() === "signup" ? 12 : void 0, f = k() === "signup" ? X("password-hint") : void 0, p = Z("link"), m = N() ? Y().hidePassword : Y().showPassword, y = Z("primary"), b = !!M();
925
- return r !== n.e && t(e, n.e = r), i !== n.t && u(h, "for", n.t = i), a !== n.a && t(g, n.a = a), o !== n.o && u(_, "id", n.o = o), s !== n.i && u(_, "type", n.i = s), c !== n.n && u(_, "autocomplete", n.n = c), l !== n.s && u(_, "minlength", n.s = l), f !== n.h && u(_, "aria-describedby", n.h = f), p !== n.r && t(v, n.r = p), m !== n.d && u(v, "aria-label", n.d = m), y !== n.l && t(C, n.l = y), b !== n.u && d(C, "disabled", n.u = b), n;
1401
+ }),
1402
+ (() => {
1403
+ var e = a(G);
1404
+ return e.$$click = () => $("choose"), s(e, (() => {
1405
+ var e = c(() => D() === "password");
1406
+ return () => e() ? J().changeEmailOrMethod : J().backToSignIn;
1407
+ })()), i((n) => {
1408
+ var r = Z("link"), i = !!P();
1409
+ return r !== n.e && t(e, n.e = r), i !== n.t && d(e, "disabled", n.t = i), n;
1410
+ }, {
1411
+ e: void 0,
1412
+ t: void 0
1413
+ }), l(), e;
1414
+ })()
1415
+ ];
1416
+ }
1417
+ }),
1418
+ n(b, {
1419
+ get when() {
1420
+ return D() === "recover";
1421
+ },
1422
+ get children() {
1423
+ return [(() => {
1424
+ var e = a(K), n = e.firstChild, r = n.nextSibling, o = r.nextSibling;
1425
+ e.addEventListener("submit", (e) => {
1426
+ e.preventDefault(), le();
1427
+ }), u(e, "action", h), s(n, () => J().email), r.$$input = (e) => N(e.currentTarget.value);
1428
+ var f = Q;
1429
+ return typeof f == "function" ? m(f, r) : Q = r, s(o, (() => {
1430
+ var e = c(() => !!P());
1431
+ return () => e() ? J().working : J().sendResetLink;
1432
+ })()), i((i) => {
1433
+ var a = Z("form"), s = X("recovery-email"), c = X("recovery-email"), l = Z("primary"), f = Y();
1434
+ return a !== i.e && t(e, i.e = a), s !== i.t && u(n, "for", i.t = s), c !== i.a && u(r, "id", i.a = c), l !== i.o && t(o, i.o = l), f !== i.i && d(o, "disabled", i.i = f), i;
926
1435
  }, {
927
1436
  e: void 0,
928
1437
  t: void 0,
929
1438
  a: void 0,
930
1439
  o: void 0,
931
- i: void 0,
932
- n: void 0,
933
- s: void 0,
934
- h: void 0,
935
- r: void 0,
936
- d: void 0,
937
- l: void 0,
938
- u: void 0
939
- }), l(), e;
1440
+ i: void 0
1441
+ }), i(() => d(r, "value", O())), l(), e;
940
1442
  })(), (() => {
941
- var e = a(U);
942
- return e.$$click = () => $("choose"), s(e, (() => {
943
- var e = c(() => k() === "password");
944
- return () => e() ? Y().changeEmailOrMethod : Y().backToSignIn;
945
- })()), i((n) => {
946
- var r = Z("link"), i = !!M();
1443
+ var e = a(G);
1444
+ return e.$$click = () => $("choose"), s(e, () => J().backToSignIn), i((n) => {
1445
+ var r = Z("link"), i = !!P();
947
1446
  return r !== n.e && t(e, n.e = r), i !== n.t && d(e, "disabled", n.t = i), n;
948
1447
  }, {
949
1448
  e: void 0,
@@ -952,30 +1451,39 @@ function xe(r) {
952
1451
  })()];
953
1452
  }
954
1453
  }),
955
- n(y, {
1454
+ n(b, {
1455
+ get when() {
1456
+ return D() === "recovery_sent";
1457
+ },
1458
+ get children() {
1459
+ var e = a(G);
1460
+ return e.$$click = () => $("choose"), s(e, () => J().backToSignIn), i(() => t(e, Z("secondary"))), l(), e;
1461
+ }
1462
+ }),
1463
+ n(b, {
956
1464
  get when() {
957
- return k() === "check_email";
1465
+ return D() === "check_email";
958
1466
  },
959
1467
  get children() {
960
- var e = a(U);
961
- return e.$$click = () => $("choose"), s(e, () => Y().backToSignIn), i(() => t(e, Z("secondary"))), l(), e;
1468
+ var e = a(G);
1469
+ return e.$$click = () => $("choose"), s(e, () => J().backToSignIn), i(() => t(e, Z("secondary"))), l(), e;
962
1470
  }
963
1471
  }),
964
- n(y, {
1472
+ n(b, {
965
1473
  get when() {
966
- return k() === "otp";
1474
+ return D() === "otp";
967
1475
  },
968
1476
  get children() {
969
1477
  return [(() => {
970
- var e = a(le), r = e.firstChild, o = r.nextSibling, f = o.firstChild, p = f.nextSibling, h = o.nextSibling;
1478
+ var e = a(q), r = e.firstChild, o = r.nextSibling, f = o.firstChild, p = f.nextSibling, g = o.nextSibling;
971
1479
  e.addEventListener("submit", (e) => {
972
- e.preventDefault(), Se(F());
973
- }), s(r, () => Y().emailCode), f.$$input = (e) => {
1480
+ e.preventDefault(), ue(R());
1481
+ }), u(e, "action", h), s(r, () => J().emailCode), f.$$input = (e) => {
974
1482
  let t = e.currentTarget.value.replace(/\D/g, "").slice(0, 6);
975
- e.currentTarget.value = t, I(t), Se(t);
1483
+ e.currentTarget.value = t, ie(t), ue(t);
976
1484
  };
977
- var g = Q;
978
- return typeof g == "function" ? m(g, f) : Q = f, s(p, n(v, {
1485
+ var _ = Q;
1486
+ return typeof _ == "function" ? m(_, f) : Q = f, s(p, n(y, {
979
1487
  each: [
980
1488
  0,
981
1489
  1,
@@ -985,15 +1493,15 @@ function xe(r) {
985
1493
  5
986
1494
  ],
987
1495
  children: (e) => (() => {
988
- var t = a(_e);
989
- return s(t, () => F()[e] ?? ""), t;
1496
+ var t = a(he);
1497
+ return s(t, () => R()[e] ?? ""), t;
990
1498
  })()
991
- })), s(h, (() => {
992
- var e = c(() => M() === "verify");
993
- return () => e() ? Y().checkingCode : Y().verifyCode;
1499
+ })), s(g, (() => {
1500
+ var e = c(() => P() === "verify");
1501
+ return () => e() ? J().checkingCode : J().verifyCode;
994
1502
  })()), i((n) => {
995
- var i = Z("form"), a = X("code"), s = Z("otp"), c = X("code"), l = !!M(), m = Z("cells"), g = Z("primary"), _ = !!M() || F().length !== 6;
996
- return i !== n.e && t(e, n.e = i), a !== n.t && u(r, "for", n.t = a), s !== n.a && t(o, n.a = s), c !== n.o && u(f, "id", n.o = c), l !== n.i && d(f, "readOnly", n.i = l), m !== n.n && t(p, n.n = m), g !== n.s && t(h, n.s = g), _ !== n.h && d(h, "disabled", n.h = _), n;
1503
+ var i = Z("form"), a = X("code"), s = Z("otp"), c = X("code"), l = !!P(), m = Z("cells"), h = Z("primary"), _ = Y() || R().length !== 6;
1504
+ return i !== n.e && t(e, n.e = i), a !== n.t && u(r, "for", n.t = a), s !== n.a && t(o, n.a = s), c !== n.o && u(f, "id", n.o = c), l !== n.i && d(f, "readOnly", n.i = l), m !== n.n && t(p, n.n = m), h !== n.s && t(g, n.s = h), _ !== n.h && d(g, "disabled", n.h = _), n;
997
1505
  }, {
998
1506
  e: void 0,
999
1507
  t: void 0,
@@ -1003,20 +1511,20 @@ function xe(r) {
1003
1511
  n: void 0,
1004
1512
  s: void 0,
1005
1513
  h: void 0
1006
- }), i(() => d(f, "value", F())), l(), e;
1514
+ }), i(() => d(f, "value", R())), l(), e;
1007
1515
  })(), (() => {
1008
- var e = a(W), r = e.firstChild, u = r.nextSibling, f = u.nextSibling, [p, m] = o(f.nextSibling);
1009
- return r.$$click = () => void xe(), s(r, (() => {
1010
- var e = c(() => !!R());
1011
- return () => e() ? Y().resendIn(Ae().format(R())) : Y().resendCode;
1012
- })()), u.$$click = () => $("choose"), s(u, () => Y().changeEmail), s(e, n(b, {
1516
+ var e = a(be), r = e.firstChild, u = r.nextSibling, f = u.nextSibling, [p, m] = o(f.nextSibling);
1517
+ return r.$$click = () => void ce(), s(r, (() => {
1518
+ var e = c(() => !!B());
1519
+ return () => e() ? J().resendIn(Re().format(B())) : J().resendCode;
1520
+ })()), u.$$click = () => $("choose"), s(u, () => J().changeEmail), s(e, n(x, {
1013
1521
  get when() {
1014
- return h()?.password;
1522
+ return g()?.password;
1015
1523
  },
1016
1524
  get children() {
1017
- var e = a(U);
1018
- return e.$$click = () => $("password"), s(e, () => Y().usePassword), i((n) => {
1019
- var r = Z("link"), i = !!M();
1525
+ var e = a(G);
1526
+ return e.$$click = () => $("password"), s(e, () => J().usePassword), i((n) => {
1527
+ var r = Z("link"), i = !!P();
1020
1528
  return r !== n.e && t(e, n.e = r), i !== n.t && d(e, "disabled", n.t = i), n;
1021
1529
  }, {
1022
1530
  e: void 0,
@@ -1024,7 +1532,7 @@ function xe(r) {
1024
1532
  }), l(), e;
1025
1533
  }
1026
1534
  }), p, m), i((n) => {
1027
- var i = Z("actions"), a = Z("link"), o = !!M() || R() > 0, s = Z("link"), c = !!M();
1535
+ var i = Z("actions"), a = Z("link"), o = Y() || B() > 0, s = Z("link"), c = !!P();
1028
1536
  return i !== n.e && t(e, n.e = i), a !== n.t && t(r, n.t = a), o !== n.a && d(r, "disabled", n.a = o), s !== n.o && t(u, n.o = s), c !== n.i && d(u, "disabled", n.i = c), n;
1029
1537
  }, {
1030
1538
  e: void 0,
@@ -1036,25 +1544,25 @@ function xe(r) {
1036
1544
  })()];
1037
1545
  }
1038
1546
  }),
1039
- n(y, {
1547
+ n(b, {
1040
1548
  get when() {
1041
- return k() === "mfa";
1549
+ return D() === "mfa";
1042
1550
  },
1043
1551
  get children() {
1044
1552
  return [(() => {
1045
- var e = a(ue), n = e.firstChild, r = n.nextSibling, o = r.nextSibling;
1553
+ var e = a(xe), n = e.firstChild, r = n.nextSibling, o = r.nextSibling;
1046
1554
  e.addEventListener("submit", (e) => {
1047
- e.preventDefault(), Te(String(new FormData(e.currentTarget).get("code") ?? ""));
1048
- }), s(n, (() => {
1049
- var e = c(() => !!L());
1050
- return () => e() ? Y().recoveryCode : Y().authenticatorCode;
1555
+ e.preventDefault(), fe(String(new FormData(e.currentTarget).get("code") ?? ""));
1556
+ }), u(e, "action", h), s(n, (() => {
1557
+ var e = c(() => !!z());
1558
+ return () => e() ? J().recoveryCode : J().authenticatorCode;
1051
1559
  })());
1052
1560
  var l = Q;
1053
1561
  return typeof l == "function" ? m(l, r) : Q = r, s(o, (() => {
1054
- var e = c(() => !!M());
1055
- return () => e() ? Y().checkingCode : Y().verifyAndSignIn;
1562
+ var e = c(() => !!P());
1563
+ return () => e() ? J().checkingCode : J().verifyAndSignIn;
1056
1564
  })()), i((i) => {
1057
- var a = Z("form"), s = X("mfa"), c = X("mfa"), l = L() ? "text" : "numeric", f = L() ? 128 : 6, p = Z("primary"), m = !!M();
1565
+ var a = Z("form"), s = X("mfa"), c = X("mfa"), l = z() ? "text" : "numeric", f = z() ? 128 : 6, p = Z("primary"), m = Y();
1058
1566
  return a !== i.e && t(e, i.e = a), s !== i.t && u(n, "for", i.t = s), c !== i.a && u(r, "id", i.a = c), l !== i.o && u(r, "inputmode", i.o = l), f !== i.i && u(r, "maxlength", i.i = f), p !== i.n && t(o, i.n = p), m !== i.s && d(o, "disabled", i.s = m), i;
1059
1567
  }, {
1060
1568
  e: void 0,
@@ -1066,12 +1574,12 @@ function xe(r) {
1066
1574
  s: void 0
1067
1575
  }), e;
1068
1576
  })(), (() => {
1069
- var e = a(G), n = e.firstChild, r = n.nextSibling;
1070
- return n.$$click = () => ie(!L()), s(n, (() => {
1071
- var e = c(() => !!L());
1072
- return () => e() ? Y().useAuthenticator : Y().useRecovery;
1073
- })()), r.$$click = () => $("choose"), s(r, () => Y().backToSignIn), i((i) => {
1074
- var a = Z("actions"), o = !!M(), s = Z("link"), c = !!M(), l = Z("link");
1577
+ var e = a(Se), n = e.firstChild, r = n.nextSibling;
1578
+ return n.$$click = () => ae(!z()), s(n, (() => {
1579
+ var e = c(() => !!z());
1580
+ return () => e() ? J().useAuthenticator : J().useRecovery;
1581
+ })()), r.$$click = () => $("choose"), s(r, () => J().backToSignIn), i((i) => {
1582
+ var a = Z("actions"), o = !!P(), s = Z("link"), c = !!P(), l = Z("link");
1075
1583
  return a !== i.e && t(e, i.e = a), o !== i.t && d(n, "disabled", i.t = o), s !== i.a && t(n, i.a = s), c !== i.o && d(r, "disabled", i.o = c), l !== i.i && t(r, i.i = l), i;
1076
1584
  }, {
1077
1585
  e: void 0,
@@ -1084,20 +1592,20 @@ function xe(r) {
1084
1592
  }
1085
1593
  })
1086
1594
  ];
1087
- } }), Oe, Me), s(S, n(b, {
1595
+ } }), H, pe), s(w, n(x, {
1088
1596
  get when() {
1089
1597
  return c(() => r.showLocaleSelector !== !1)() && (r.locale === void 0 || r.onLocaleChange);
1090
1598
  },
1091
1599
  get children() {
1092
- var e = a(K), o = e.firstChild, c = o.nextSibling;
1093
- return s(o, () => Y().language), c.addEventListener("change", (e) => {
1094
- let t = D([e.currentTarget.value]);
1095
- r.locale === void 0 && ke(t), r.onLocaleChange?.(t);
1096
- }), s(c, n(v, {
1097
- each: ye,
1600
+ var e = a(Ce), o = e.firstChild, c = o.nextSibling;
1601
+ return s(o, () => J().language), c.addEventListener("change", (e) => {
1602
+ let t = j([e.currentTarget.value]);
1603
+ r.locale === void 0 && Fe(t), r.onLocaleChange?.(t);
1604
+ }), s(c, n(y, {
1605
+ each: Me,
1098
1606
  children: (e) => (() => {
1099
- var t = a(ve);
1100
- return d(t, "value", e), u(t, "lang", e), s(t, () => E[e]), i(() => d(t, "selected", J() === e)), t;
1607
+ var t = a(je);
1608
+ return d(t, "value", e), u(t, "lang", e), s(t, () => k[e]), i(() => d(t, "selected", Ie() === e)), t;
1101
1609
  })()
1102
1610
  })), i((n) => {
1103
1611
  var r = Z("locale"), i = X("locale"), a = X("locale");
@@ -1106,19 +1614,19 @@ function xe(r) {
1106
1614
  e: void 0,
1107
1615
  t: void 0,
1108
1616
  a: void 0
1109
- }), i(() => d(c, "value", J())), e;
1617
+ }), i(() => d(c, "value", Ie())), e;
1110
1618
  }
1111
- }), Fe, Ie), s(S, n(b, {
1619
+ }), Pe, Be), s(w, n(x, {
1112
1620
  get when() {
1113
1621
  return r.agreement;
1114
1622
  },
1115
1623
  get children() {
1116
- var e = a(V);
1624
+ var e = a(we);
1117
1625
  return s(e, () => r.agreement), i(() => t(e, Z("agreement"))), e;
1118
1626
  }
1119
- }), Re, ze), i((e) => {
1120
- var n = Z("panel"), i = r.appearance?.tokens, a = X("title"), o = J(), s = Z("content"), c = X("title"), l = Z("title"), d = Z("sub");
1121
- return n !== e.e && t(p, e.e = n), e.t = f(p, i, e.t), a !== e.a && u(p, "aria-labelledby", e.a = a), o !== e.o && u(p, "lang", e.o = o), s !== e.i && t(S, e.i = s), c !== e.n && u(T, "id", e.n = c), l !== e.s && t(T, e.s = l), d !== e.h && t(O, e.h = d), e;
1627
+ }), qe, Je), i((e) => {
1628
+ var n = Z("panel"), i = r.appearance?.tokens, a = X("title"), o = Le(), s = Z("content"), c = X("title"), l = Z("title"), d = Z("sub");
1629
+ return n !== e.e && t(p, e.e = n), e.t = f(p, i, e.t), a !== e.a && u(p, "aria-labelledby", e.a = a), o !== e.o && u(p, "lang", e.o = o), s !== e.i && t(w, e.i = s), c !== e.n && u(A, "id", e.n = c), l !== e.s && t(A, e.s = l), d !== e.h && t(M, e.h = d), e;
1122
1630
  }, {
1123
1631
  e: void 0,
1124
1632
  t: void 0,
@@ -1131,5 +1639,5 @@ function xe(r) {
1131
1639
  }), p;
1132
1640
  })();
1133
1641
  }
1134
- r(["input", "click"]);
1135
- export { xe as SylphxSignIn, B as createSignInController, E as localeNames, D as resolveAuthLocale, T as signInMessages };
1642
+ r(["click", "input"]);
1643
+ export { ae as SylphxPasskeyEnroll, Pe as SylphxSignIn, me as createSignInController, k as localeNames, j as resolveAuthLocale, A as resolveSignInMessages, O as signInMessages };