@tempots/beatui 0.50.0 → 0.50.1

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.
@@ -1,10 +1,10 @@
1
- import { localStorageProp as re, prop as U, Use as P, html as i, OnDispose as T, attr as t, on as C, When as L, coalesce as h, Ensure as N, computedOf as f, Fragment as A, bind as ie, ForEach as ce, Value as Q, OneOfValue as le } from "@tempots/dom";
2
- import { t as me, a as ee, u as R, S as q, b as se, c as $, P as M, E as W, N as G } from "../notice-Dgv1Puqy.js";
3
- import { s as I, o as H, b as D, M as ue } from "../modal-Dx7nHv_u.js";
4
- import { AuthI18n as x } from "../translations-BaKCl3Vc.js";
5
- import { B as O, T as de, I as pe } from "../translations-DoBmuZ5v.js";
6
- import { classes as he } from "@tempots/ui";
7
- const j = {
1
+ import { localStorageProp as ce, prop as V, Use as q, html as i, OnDispose as C, attr as t, on as E, When as b, coalesce as h, Ensure as W, computedOf as g, Fragment as z, bind as le, ForEach as me, Value as oe, OneOfValue as ue } from "@tempots/dom";
2
+ import { t as de, a as te, u as G, S as $, b as ae, c as T, P as N, E as H, N as j } from "../notice-Dgv1Puqy.js";
3
+ import { s as A, o as X, b as R, M as pe } from "../modal-Dx7nHv_u.js";
4
+ import { AuthI18n as B } from "../translations-BaKCl3Vc.js";
5
+ import { B as F, T as he, I as ge } from "../translations-DoBmuZ5v.js";
6
+ import { classes as fe } from "@tempots/ui";
7
+ const Y = {
8
8
  google: { name: "Google", icon: "logos:google-icon", color: "#4285f4" },
9
9
  github: { name: "GitHub", icon: "logos:github-icon", color: "#333" },
10
10
  apple: { name: "Apple", icon: "logos:apple", color: "#000" },
@@ -50,37 +50,37 @@ const j = {
50
50
  paypal: { name: "PayPal", icon: "logos:paypal", color: "#0070ba" },
51
51
  x: { name: "X", icon: "simple-icons:x", color: "#000" }
52
52
  };
53
- function ge(e) {
54
- return j[e]?.name || e;
53
+ function be(e) {
54
+ return Y[e]?.name || e;
55
55
  }
56
- function $e(e) {
57
- return j[e]?.icon || "mdi:account";
56
+ function Te(e) {
57
+ return Y[e]?.icon || "mdi:account";
58
58
  }
59
- function Ie(e) {
60
- return j[e]?.color || "#666";
59
+ function Ae(e) {
60
+ return Y[e]?.color || "#666";
61
61
  }
62
- function Te(e, o = "Continue with {provider}") {
63
- return o.replace("{provider}", ge(e));
62
+ function Ce(e, o = "Continue with {provider}") {
63
+ return o.replace("{provider}", be(e));
64
64
  }
65
- const B = {
65
+ const I = {
66
66
  minLength: 8,
67
67
  requireUppercase: !0,
68
68
  requireLowercase: !0,
69
69
  requireNumbers: !0,
70
70
  requireSymbols: !1
71
71
  };
72
- function Ae(e) {
72
+ function ze(e) {
73
73
  return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);
74
74
  }
75
- function fe(e = 32) {
75
+ function we(e = 32) {
76
76
  const o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
77
77
  let c = "";
78
78
  for (let m = 0; m < e; m++)
79
79
  c += o.charAt(Math.floor(Math.random() * o.length));
80
80
  return c;
81
81
  }
82
- function Ce(e, o, c, m = [], l = {}) {
83
- const a = {
82
+ function Ee(e, o, c, m = [], l = {}) {
83
+ const n = {
84
84
  google: "https://accounts.google.com/oauth/authorize",
85
85
  github: "https://github.com/login/oauth/authorize",
86
86
  apple: "https://appleid.apple.com/auth/authorize",
@@ -105,7 +105,7 @@ function Ce(e, o, c, m = [], l = {}) {
105
105
  yahoo: "https://api.login.yahoo.com/oauth2/request_auth",
106
106
  paypal: "https://www.paypal.com/signin/authorize",
107
107
  x: "https://api.twitter.com/oauth2/authorize"
108
- }, s = {
108
+ }, u = {
109
109
  google: ["openid", "email", "profile"],
110
110
  github: ["user:email"],
111
111
  apple: ["email", "name"],
@@ -130,20 +130,20 @@ function Ce(e, o, c, m = [], l = {}) {
130
130
  yahoo: ["openid", "email", "profile"],
131
131
  paypal: ["openid", "email", "profile"],
132
132
  x: ["openid", "email", "profile"]
133
- }, n = a[e];
134
- if (!n)
133
+ }, s = n[e];
134
+ if (!s)
135
135
  throw new Error(`Unsupported provider: ${e}`);
136
- const u = m.length > 0 ? m : s[e], r = fe(), w = new URLSearchParams({
136
+ const a = m.length > 0 ? m : u[e], r = we(), f = new URLSearchParams({
137
137
  client_id: o,
138
138
  redirect_uri: c,
139
- scope: u.join(" "),
139
+ scope: a.join(" "),
140
140
  state: r,
141
141
  response_type: "code",
142
142
  ...l
143
143
  });
144
- return `${n}?${w.toString()}`;
144
+ return `${s}?${f.toString()}`;
145
145
  }
146
- function ze(e, o, c, m) {
146
+ function Ue(e, o, c, m) {
147
147
  const l = window.open(
148
148
  e,
149
149
  `${o}_login`,
@@ -153,20 +153,20 @@ function ze(e, o, c, m) {
153
153
  m?.(new Error("Failed to open popup window"));
154
154
  return;
155
155
  }
156
- const a = setInterval(() => {
157
- l.closed && (clearInterval(a), m?.(new Error("Login cancelled")));
158
- }, 1e3), s = (n) => {
159
- n.origin === window.location.origin && (n.data.type === "SOCIAL_LOGIN_SUCCESS" ? (clearInterval(a), l.close(), window.removeEventListener("message", s), c?.(n.data.result)) : n.data.type === "SOCIAL_LOGIN_ERROR" && (clearInterval(a), l.close(), window.removeEventListener("message", s), m?.(new Error(n.data.error))));
156
+ const n = setInterval(() => {
157
+ l.closed && (clearInterval(n), m?.(new Error("Login cancelled")));
158
+ }, 1e3), u = (s) => {
159
+ s.origin === window.location.origin && (s.data.type === "SOCIAL_LOGIN_SUCCESS" ? (clearInterval(n), l.close(), window.removeEventListener("message", u), c?.(s.data.result)) : s.data.type === "SOCIAL_LOGIN_ERROR" && (clearInterval(n), l.close(), window.removeEventListener("message", u), m?.(new Error(s.data.error))));
160
160
  };
161
- window.addEventListener("message", s);
161
+ window.addEventListener("message", u);
162
162
  }
163
- function Ee(e) {
163
+ function Oe(e) {
164
164
  return e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e ? String(e.message) : "An unexpected error occurred";
165
165
  }
166
- function Ue() {
166
+ function Ve() {
167
167
  return typeof window < "u" && typeof document < "u";
168
168
  }
169
- function X({
169
+ function Z({
170
170
  task: e,
171
171
  message: o,
172
172
  onStart: c,
@@ -174,17 +174,17 @@ function X({
174
174
  }) {
175
175
  return async (l) => {
176
176
  c?.();
177
- const a = await me({
177
+ const n = await de({
178
178
  task: e != null ? () => e(l) : async () => null,
179
179
  errorMessage: o,
180
180
  errorPath: ["root"],
181
- validation: (s) => s != null ? ee.invalid({ message: s }) : ee.valid
181
+ validation: (u) => u != null ? te.invalid({ message: u }) : te.valid
182
182
  });
183
- return m?.(), a;
183
+ return m?.(), n;
184
184
  };
185
185
  }
186
- function Y(e = B) {
187
- let o = I();
186
+ function J(e = I) {
187
+ let o = A();
188
188
  return e.minLength && (o = o.min(
189
189
  e.minLength,
190
190
  `Password must be at least ${e.minLength} characters`
@@ -202,53 +202,53 @@ function Y(e = B) {
202
202
  "Password must contain at least one special character"
203
203
  )), e.customValidation && (o = o.refine((c) => e.customValidation(c))), o;
204
204
  }
205
- const V = I().min(1, "Email is required").email("Please enter a valid email address");
206
- function Z(e) {
207
- const o = e ? Y(e) : I().refine(
205
+ const M = A().min(1, "Email is required").email("Please enter a valid email address");
206
+ function K(e) {
207
+ const o = e ? J(e) : A().refine(
208
208
  (c) => c.length > 0 ? null : "Password is required"
209
209
  );
210
- return H({
211
- email: V,
210
+ return X({
211
+ email: M,
212
212
  password: o,
213
- rememberMe: D().default(!1)
213
+ rememberMe: R().default(!1)
214
214
  }).schema();
215
215
  }
216
- function J(e = B, o) {
217
- const c = Y(e), m = o?.showNameField !== !1, l = o?.showConfirmPassword !== !1, a = o?.showAcceptTermsAndConditions !== !1, s = {
218
- name: m ? I().min(1, "Name is required").optional() : I().optional(),
219
- email: V,
216
+ function Q(e = I, o) {
217
+ const c = J(e), m = o?.showNameField !== !1, l = o?.showConfirmPassword !== !1, n = o?.showAcceptTermsAndConditions !== !1, u = {
218
+ name: m ? A().min(1, "Name is required").optional() : A().optional(),
219
+ email: M,
220
220
  password: c,
221
221
  // Always require confirmPassword as string to match SignUpData interface
222
222
  // When not shown, it should accept any value (including empty string)
223
- confirmPassword: l ? I().min(1, "Please confirm your password") : I(),
223
+ confirmPassword: l ? A().min(1, "Please confirm your password") : A(),
224
224
  // Accept any string value when not shown
225
- acceptTerms: a ? D().refine(
226
- (u) => u === !0,
225
+ acceptTerms: n ? R().refine(
226
+ (a) => a === !0,
227
227
  "You must accept the terms and conditions"
228
- ) : D().default(!0)
228
+ ) : R().default(!0)
229
229
  // Default to true when not shown
230
- }, n = H(s);
231
- return l ? n.refine(
232
- (u) => u.password === u.confirmPassword ? null : "Passwords don't match",
230
+ }, s = X(u);
231
+ return l ? s.refine(
232
+ (a) => a.password === a.confirmPassword ? null : "Passwords don't match",
233
233
  { path: ["confirmPassword"] }
234
- ).schema() : n.schema();
234
+ ).schema() : s.schema();
235
235
  }
236
- const ne = H({
237
- email: V
238
- }).schema(), Oe = Z(), Ve = J(), Fe = {
239
- signIn: Z,
240
- signUp: J,
241
- resetPassword: () => ne
236
+ const re = X({
237
+ email: M
238
+ }).schema(), Fe = K(), Me = Q(), De = {
239
+ signIn: K,
240
+ signUp: Q,
241
+ resetPassword: () => re
242
242
  };
243
- function Me(e) {
244
- const o = V.validate(e);
243
+ function Ne(e) {
244
+ const o = M.validate(e);
245
245
  return o.success ? null : o.errors[0]?.message || "Invalid email";
246
246
  }
247
- function De(e, o = B) {
248
- const m = Y(o).validate(e);
247
+ function Re(e, o = I) {
248
+ const m = J(o).validate(e);
249
249
  return m.success ? null : m.errors[0]?.message || "Invalid password";
250
250
  }
251
- function K(e, o = B) {
251
+ function ee(e, o = I) {
252
252
  const c = {
253
253
  length: e.length >= (o.minLength || 8),
254
254
  uppercase: /[A-Z]/.test(e),
@@ -272,84 +272,84 @@ function K(e, o = B) {
272
272
  o.requireNumbers ? c.numbers : null,
273
273
  o.requireSymbols ? c.symbols : null,
274
274
  o.customValidation ? c.custom : null
275
- ].filter((n) => n === !0).length, a = m > 0 ? Math.round(l / m * 100) : 0;
276
- let s;
277
- return a < 40 ? s = "weak" : a < 60 ? s = "fair" : a < 80 ? s = "good" : s = "strong", { strength: s, score: a, checks: c };
275
+ ].filter((s) => s === !0).length, n = m > 0 ? Math.round(l / m * 100) : 0;
276
+ let u;
277
+ return n < 40 ? u = "weak" : n < 60 ? u = "fair" : n < 80 ? u = "good" : u = "strong", { strength: u, score: n, checks: c };
278
278
  }
279
- const ae = () => re({
279
+ const ie = () => ce({
280
280
  key: "bui_auth_email",
281
281
  defaultValue: null
282
282
  });
283
- function be({
283
+ function _e({
284
284
  onSignIn: e,
285
285
  passwordRules: o,
286
286
  labels: c,
287
287
  showRememberMe: m
288
288
  }) {
289
- const l = U(!1), a = ae(), s = Z(o), n = R({
290
- schema: s,
291
- onSubmit: X({
289
+ const l = V(!1), n = ie(), u = K(o), s = G({
290
+ schema: u,
291
+ onSubmit: Z({
292
292
  task: e,
293
293
  message: "Reset password failed",
294
294
  onStart: () => {
295
- l.set(!0), n.controller.disable();
295
+ l.set(!0), s.controller.disable();
296
296
  },
297
297
  onEnd: () => {
298
- l.set(!1), n.controller.enable();
298
+ l.set(!1), s.controller.enable();
299
299
  }
300
300
  }),
301
301
  initialValue: {
302
302
  email: "",
303
303
  password: ""
304
304
  }
305
- }), { controller: u, submit: r } = n;
306
- l.on(u.setDisabled);
307
- const w = u.field("email"), _ = u.field("password");
308
- return a.on((g) => {
309
- g != null && w.change(g);
310
- }), w.signal.on((g) => {
311
- a.value != null && (a.value = g);
312
- }), P(
313
- x,
314
- (g) => (
305
+ }), { controller: a, submit: r } = s;
306
+ l.on(a.setDisabled);
307
+ const f = a.field("email"), w = a.field("password");
308
+ return n.on((_) => {
309
+ _ != null && f.change(_);
310
+ }), f.signal.on((_) => {
311
+ n.value != null && (n.value = _);
312
+ }), q(
313
+ B,
314
+ (_) => (
315
315
  // Email/Password form
316
316
  i.form(
317
- T(u.dispose, a.dispose, l.dispose),
317
+ C(a.dispose, n.dispose, l.dispose),
318
318
  t.class("bc-auth-form__form"),
319
- C.submit(r),
320
- q(
319
+ E.submit(r),
320
+ $(
321
321
  t.class("bc-auth-form__fields"),
322
- N(
323
- u.error,
324
- (b) => G(
322
+ W(
323
+ a.error,
324
+ (k) => j(
325
325
  { variant: "danger", tone: "prominent", role: "alert" },
326
- i.div(b)
326
+ i.div(k)
327
327
  )
328
328
  ),
329
329
  // Email field
330
- $(W, {
331
- controller: w,
332
- label: h(c?.emailLabel, g.$.emailLabel)
330
+ T(H, {
331
+ controller: f,
332
+ label: h(c?.emailLabel, _.$.emailLabel)
333
333
  }),
334
334
  // Password field
335
- $(M, {
336
- controller: _,
337
- label: h(c?.passwordLabel, g.$.passwordLabel)
335
+ T(N, {
336
+ controller: w,
337
+ label: h(c?.passwordLabel, _.$.passwordLabel)
338
338
  }),
339
339
  // Remember me checkbox
340
- L(
340
+ b(
341
341
  m ?? !0,
342
342
  () => i.div(
343
343
  t.class("bc-auth-form__remember-me"),
344
344
  i.label(
345
345
  t.class("bc-auth-form__checkbox-label"),
346
- se({
347
- value: a.map((b) => b != null),
346
+ ae({
347
+ value: n.map((k) => k != null),
348
348
  after: i.span(
349
- h(c?.rememberMeLabel, g.$.rememberMeLabel)
349
+ h(c?.rememberMeLabel, _.$.rememberMeLabel)
350
350
  ),
351
- onChange: (b) => {
352
- b ? a.value = w.signal.value ?? "" : a.value = null;
351
+ onChange: (k) => {
352
+ k ? n.value = f.signal.value ?? "" : n.value = null;
353
353
  }
354
354
  })
355
355
  )
@@ -357,28 +357,28 @@ function be({
357
357
  )
358
358
  ),
359
359
  // Submit button
360
- O(
360
+ F(
361
361
  {
362
362
  type: "submit",
363
363
  variant: "filled",
364
364
  color: "primary",
365
365
  loading: l,
366
- disabled: u.disabledOrHasErrors
366
+ disabled: a.disabledOrHasErrors
367
367
  },
368
368
  t.class("bc-auth-form__submit"),
369
- h(c?.signInButton, g.$.signInButton)
369
+ h(c?.signInButton, _.$.signInButton)
370
370
  )
371
371
  )
372
372
  )
373
373
  );
374
374
  }
375
- function we({
375
+ function Le({
376
376
  password: e,
377
- rules: o = B,
377
+ rules: o = I,
378
378
  showLabel: c = !0,
379
379
  className: m
380
380
  }) {
381
- const l = f(e)((r) => !r || r.length === 0 ? {
381
+ const l = g(e)((r) => !r || r.length === 0 ? {
382
382
  strength: "weak",
383
383
  score: 0,
384
384
  checks: {
@@ -389,47 +389,47 @@ function we({
389
389
  symbols: !1,
390
390
  custom: !1
391
391
  }
392
- } : K(r, o)), a = l.map((r) => r.strength), s = l.map((r) => r.score), n = l.map((r) => r.checks), u = f(
393
- a,
392
+ } : ee(r, o)), n = l.map((r) => r.strength), u = l.map((r) => r.score), s = l.map((r) => r.checks), a = g(
393
+ n,
394
394
  m
395
- )((r, w) => [
395
+ )((r, f) => [
396
396
  "bc-password-strength",
397
397
  `bc-password-strength--${r}`,
398
- w
398
+ f
399
399
  ].filter(Boolean).join(" "));
400
400
  return i.div(
401
- T(l, u),
402
- t.class(u),
401
+ C(l, a),
402
+ t.class(a),
403
403
  // Strength bar
404
404
  i.div(
405
405
  t.class("bc-password-strength__bar"),
406
406
  i.div(
407
407
  t.class("bc-password-strength__fill"),
408
- t.style(s.map((r) => `width: ${r}%`))
408
+ t.style(u.map((r) => `width: ${r}%`))
409
409
  )
410
410
  ),
411
411
  // Strength label (optional)
412
- L(
412
+ b(
413
413
  c,
414
- () => P(
415
- x,
414
+ () => q(
415
+ B,
416
416
  (r) => i.div(
417
417
  t.class("bc-password-strength__label"),
418
- f(
419
- a,
418
+ g(
419
+ n,
420
420
  r
421
- )((w, _) => {
422
- switch (w) {
421
+ )((f, w) => {
422
+ switch (f) {
423
423
  case "weak":
424
- return _.passwordStrengthWeak;
424
+ return w.passwordStrengthWeak;
425
425
  case "fair":
426
- return _.passwordStrengthFair;
426
+ return w.passwordStrengthFair;
427
427
  case "good":
428
- return _.passwordStrengthGood;
428
+ return w.passwordStrengthGood;
429
429
  case "strong":
430
- return _.passwordStrengthStrong;
430
+ return w.passwordStrengthStrong;
431
431
  default:
432
- return _.passwordStrengthWeak;
432
+ return w.passwordStrengthWeak;
433
433
  }
434
434
  })
435
435
  )
@@ -439,18 +439,18 @@ function we({
439
439
  i.div(
440
440
  t.class("bc-password-strength__requirements"),
441
441
  // Length requirement
442
- L(
442
+ b(
443
443
  o.minLength !== void 0,
444
444
  () => i.div(
445
445
  t.class("bc-password-strength__requirement"),
446
446
  t.class(
447
- f(n)(
447
+ g(s)(
448
448
  (r) => r.length ? "bc-password-strength__requirement--met" : ""
449
449
  )
450
450
  ),
451
451
  i.span(
452
452
  t.class("bc-password-strength__requirement-icon"),
453
- f(n)((r) => r.length ? "✓" : "○")
453
+ g(s)((r) => r.length ? "✓" : "○")
454
454
  ),
455
455
  i.span(
456
456
  t.class("bc-password-strength__requirement-text"),
@@ -459,18 +459,18 @@ function we({
459
459
  )
460
460
  ),
461
461
  // Uppercase requirement
462
- L(
462
+ b(
463
463
  o.requireUppercase === !0,
464
464
  () => i.div(
465
465
  t.class("bc-password-strength__requirement"),
466
466
  t.class(
467
- f(n)(
467
+ g(s)(
468
468
  (r) => r.uppercase ? "bc-password-strength__requirement--met" : ""
469
469
  )
470
470
  ),
471
471
  i.span(
472
472
  t.class("bc-password-strength__requirement-icon"),
473
- f(n)((r) => r.uppercase ? "✓" : "○")
473
+ g(s)((r) => r.uppercase ? "✓" : "○")
474
474
  ),
475
475
  i.span(
476
476
  t.class("bc-password-strength__requirement-text"),
@@ -479,18 +479,18 @@ function we({
479
479
  )
480
480
  ),
481
481
  // Lowercase requirement
482
- L(
482
+ b(
483
483
  o.requireLowercase === !0,
484
484
  () => i.div(
485
485
  t.class("bc-password-strength__requirement"),
486
486
  t.class(
487
- f(n)(
487
+ g(s)(
488
488
  (r) => r.lowercase ? "bc-password-strength__requirement--met" : ""
489
489
  )
490
490
  ),
491
491
  i.span(
492
492
  t.class("bc-password-strength__requirement-icon"),
493
- f(n)((r) => r.lowercase ? "✓" : "○")
493
+ g(s)((r) => r.lowercase ? "✓" : "○")
494
494
  ),
495
495
  i.span(
496
496
  t.class("bc-password-strength__requirement-text"),
@@ -499,18 +499,18 @@ function we({
499
499
  )
500
500
  ),
501
501
  // Numbers requirement
502
- L(
502
+ b(
503
503
  o.requireNumbers === !0,
504
504
  () => i.div(
505
505
  t.class("bc-password-strength__requirement"),
506
506
  t.class(
507
- f(n)(
507
+ g(s)(
508
508
  (r) => r.numbers ? "bc-password-strength__requirement--met" : ""
509
509
  )
510
510
  ),
511
511
  i.span(
512
512
  t.class("bc-password-strength__requirement-icon"),
513
- f(n)((r) => r.numbers ? "✓" : "○")
513
+ g(s)((r) => r.numbers ? "✓" : "○")
514
514
  ),
515
515
  i.span(
516
516
  t.class("bc-password-strength__requirement-text"),
@@ -519,18 +519,18 @@ function we({
519
519
  )
520
520
  ),
521
521
  // Symbols requirement
522
- L(
522
+ b(
523
523
  o.requireSymbols === !0,
524
524
  () => i.div(
525
525
  t.class("bc-password-strength__requirement"),
526
526
  t.class(
527
- f(n)(
527
+ g(s)(
528
528
  (r) => r.symbols ? "bc-password-strength__requirement--met" : ""
529
529
  )
530
530
  ),
531
531
  i.span(
532
532
  t.class("bc-password-strength__requirement-icon"),
533
- f(n)((r) => r.symbols ? "✓" : "○")
533
+ g(s)((r) => r.symbols ? "✓" : "○")
534
534
  ),
535
535
  i.span(
536
536
  t.class("bc-password-strength__requirement-text"),
@@ -541,214 +541,216 @@ function we({
541
541
  )
542
542
  );
543
543
  }
544
- function Ne({
544
+ function We({
545
545
  password: e,
546
- rules: o = B,
546
+ rules: o = I,
547
547
  className: c
548
548
  }) {
549
- const m = f(e)((n) => !n || n.length === 0 ? { strength: "weak", score: 0 } : K(n, o)), l = m.map((n) => n.strength), a = m.map((n) => n.score), s = f(
549
+ const m = g(e)((s) => !s || s.length === 0 ? { strength: "weak", score: 0 } : ee(s, o)), l = m.map((s) => s.strength), n = m.map((s) => s.score), u = g(
550
550
  l,
551
551
  c
552
- )((n, u) => [
552
+ )((s, a) => [
553
553
  "bc-password-strength-bar",
554
- `bc-password-strength-bar--${n}`,
555
- u
554
+ `bc-password-strength-bar--${s}`,
555
+ a
556
556
  ].filter(Boolean).join(" "));
557
557
  return i.div(
558
- T(m, s),
559
- t.class(s),
558
+ C(m, u),
559
+ t.class(u),
560
560
  i.div(
561
561
  t.class("bc-password-strength-bar__fill"),
562
- t.style(a.map((n) => `width: ${n}%`))
562
+ t.style(n.map((s) => `width: ${s}%`))
563
563
  )
564
564
  );
565
565
  }
566
- function Re({
566
+ function Ge({
567
567
  password: e,
568
- rules: o = B,
568
+ rules: o = I,
569
569
  className: c
570
570
  }) {
571
- const m = f(e)((a) => !a || a.length === 0 ? "weak" : K(a, o).strength), l = f(
571
+ const m = g(e)((n) => !n || n.length === 0 ? "weak" : ee(n, o).strength), l = g(
572
572
  m,
573
573
  c
574
- )((a, s) => [
574
+ )((n, u) => [
575
575
  "bc-password-strength-text",
576
- `bc-password-strength-text--${a}`,
577
- s
576
+ `bc-password-strength-text--${n}`,
577
+ u
578
578
  ].filter(Boolean).join(" "));
579
- return A(
580
- T(m, l),
581
- P(
582
- x,
583
- (a) => i.span(
579
+ return z(
580
+ C(m, l),
581
+ q(
582
+ B,
583
+ (n) => i.span(
584
584
  t.class(l),
585
- f(
585
+ g(
586
586
  m,
587
- a
588
- )((s, n) => {
589
- switch (s) {
587
+ n
588
+ )((u, s) => {
589
+ switch (u) {
590
590
  case "weak":
591
- return n.passwordStrengthWeak;
591
+ return s.passwordStrengthWeak;
592
592
  case "fair":
593
- return n.passwordStrengthFair;
593
+ return s.passwordStrengthFair;
594
594
  case "good":
595
- return n.passwordStrengthGood;
595
+ return s.passwordStrengthGood;
596
596
  case "strong":
597
- return n.passwordStrengthStrong;
597
+ return s.passwordStrengthStrong;
598
598
  default:
599
- return n.passwordStrengthWeak;
599
+ return s.passwordStrengthWeak;
600
600
  }
601
601
  })
602
602
  )
603
603
  )
604
604
  );
605
605
  }
606
- function _e({
606
+ function ke({
607
607
  passwordRules: e,
608
608
  labels: o,
609
- showPasswordStrength: c,
610
- onSignUp: m,
611
- showNameField: l,
612
- showConfirmPassword: a,
613
- showAcceptTermsAndConditions: s,
614
- termsAndConditions: n
609
+ initialEmail: c,
610
+ initialName: m,
611
+ showPasswordStrength: l,
612
+ onSignUp: n,
613
+ showNameField: u,
614
+ showConfirmPassword: s,
615
+ showAcceptTermsAndConditions: a,
616
+ termsAndConditions: r
615
617
  }) {
616
- const u = U(!1), r = e || B, w = J(r, {
617
- showNameField: l !== !1,
618
- showConfirmPassword: a !== !1,
619
- showAcceptTermsAndConditions: s !== !1
620
- }), _ = R({
621
- schema: w,
622
- onSubmit: X({
623
- task: m != null ? (S) => m({
624
- email: S.email,
625
- password: S.password,
626
- name: S.name
618
+ const f = V(!1), w = e || I, _ = Q(w, {
619
+ showNameField: u !== !1,
620
+ showConfirmPassword: s !== !1,
621
+ showAcceptTermsAndConditions: a !== !1
622
+ }), k = G({
623
+ schema: _,
624
+ onSubmit: Z({
625
+ task: n != null ? (P) => n({
626
+ email: P.email,
627
+ password: P.password,
628
+ name: P.name
627
629
  }) : void 0,
628
630
  message: "Reset password failed",
629
631
  onStart: () => {
630
- u.set(!0), _.controller.disable();
632
+ f.set(!0), k.controller.disable();
631
633
  },
632
634
  onEnd: () => {
633
- u.set(!1), _.controller.enable();
635
+ f.set(!1), k.controller.enable();
634
636
  }
635
637
  }),
636
638
  initialValue: {
637
- name: "",
638
- email: "",
639
+ name: m ?? "",
640
+ email: c ?? "",
639
641
  password: "",
640
642
  confirmPassword: "",
641
643
  acceptTerms: !1
642
644
  }
643
- }), { controller: g, submit: b } = _;
644
- u.on(g.setDisabled);
645
- const v = g.field("name"), z = g.field("email"), E = g.field("password"), F = g.field("confirmPassword"), y = g.field("acceptTerms");
646
- return P(
647
- x,
648
- (S) => (
645
+ }), { controller: v, submit: x } = k;
646
+ f.on(v.setDisabled);
647
+ const y = v.field("name"), U = v.field("email"), O = v.field("password"), D = v.field("confirmPassword"), S = v.field("acceptTerms");
648
+ return q(
649
+ B,
650
+ (P) => (
649
651
  // Registration form
650
652
  i.form(
651
- T(g.dispose, u.dispose),
653
+ C(v.dispose, f.dispose),
652
654
  t.class("bc-auth-form__form"),
653
- C.submit(b),
654
- q(
655
+ E.submit(x),
656
+ $(
655
657
  t.class("bc-auth-form__fields"),
656
- N(
657
- g.error,
658
- (k) => G(
658
+ W(
659
+ v.error,
660
+ (L) => j(
659
661
  { variant: "danger", tone: "prominent", role: "alert" },
660
- i.div(k)
662
+ i.div(L)
661
663
  )
662
664
  ),
663
665
  // Name field (optional)
664
- L(
665
- l !== !1,
666
- () => $(de, {
667
- controller: v.transform(
668
- (k) => k ?? "",
669
- (k) => k === "" ? void 0 : k
666
+ b(
667
+ u !== !1,
668
+ () => T(he, {
669
+ controller: y.transform(
670
+ (L) => L ?? "",
671
+ (L) => L === "" ? void 0 : L
670
672
  ),
671
- label: h(o?.nameLabel, S.$.nameLabel)
673
+ label: h(o?.nameLabel, P.$.nameLabel)
672
674
  })
673
675
  ),
674
676
  // Email field
675
- $(W, {
676
- controller: z,
677
- label: h(o?.emailLabel, S.$.emailLabel)
677
+ T(H, {
678
+ controller: U,
679
+ label: h(o?.emailLabel, P.$.emailLabel)
678
680
  }),
679
681
  // Password field
680
- $(M, {
681
- controller: E,
682
- label: h(o?.passwordLabel, S.$.passwordLabel)
682
+ T(N, {
683
+ controller: O,
684
+ label: h(o?.passwordLabel, P.$.passwordLabel)
683
685
  }),
684
686
  // Password strength indicator
685
- L(
686
- c ?? !1,
687
- () => we({
688
- password: E.signal,
689
- rules: r,
687
+ b(
688
+ l ?? !1,
689
+ () => Le({
690
+ password: O.signal,
691
+ rules: w,
690
692
  showLabel: !0
691
693
  })
692
694
  ),
693
695
  // Confirm password field
694
- L(
695
- a ?? !1,
696
- () => $(M, {
697
- controller: F,
696
+ b(
697
+ s ?? !1,
698
+ () => T(N, {
699
+ controller: D,
698
700
  label: h(
699
701
  o?.confirmPasswordLabel,
700
- S.$.confirmPasswordLabel
702
+ P.$.confirmPasswordLabel
701
703
  )
702
704
  })
703
705
  ),
704
706
  // Terms acceptance checkbox
705
- L(
706
- s ?? !1,
707
+ b(
708
+ a ?? !1,
707
709
  () => i.div(
708
710
  t.class("bc-auth-form__terms"),
709
711
  i.label(
710
712
  t.class("bc-auth-form__checkbox-label"),
711
- se({
712
- value: y.signal.map((k) => k ?? !1),
713
- onChange: (k) => y.change(k)
713
+ ae({
714
+ value: S.signal.map((L) => L ?? !1),
715
+ onChange: (L) => S.change(L)
714
716
  }),
715
717
  i.span(
716
- n || h(o?.acceptTermsLabel, S.$.acceptTermsLabel)
718
+ r || h(o?.acceptTermsLabel, P.$.acceptTermsLabel)
717
719
  )
718
720
  ),
719
- L(
720
- y.errorVisible,
721
+ b(
722
+ S.errorVisible,
721
723
  () => i.div(
722
724
  t.class("bc-auth-form__field-error"),
723
- y.error.map((k) => k || "")
725
+ S.error.map((L) => L || "")
724
726
  )
725
727
  )
726
728
  )
727
729
  )
728
730
  ),
729
731
  // Submit button
730
- O(
732
+ F(
731
733
  {
732
734
  type: "submit",
733
735
  variant: "filled",
734
736
  color: "primary",
735
- loading: u,
736
- disabled: g.disabledOrHasErrors
737
+ loading: f,
738
+ disabled: v.disabledOrHasErrors
737
739
  },
738
740
  t.class("bc-auth-form__submit"),
739
- h(o?.signUpButton, S.$.signUpButton)
741
+ h(o?.signUpButton, P.$.signUpButton)
740
742
  )
741
743
  )
742
744
  )
743
745
  );
744
746
  }
745
- function Le({
747
+ function ve({
746
748
  onResetPassword: e,
747
749
  labels: o = {}
748
750
  }) {
749
- const c = ae(), m = U(!1), l = R({
750
- schema: ne,
751
- onSubmit: X({
751
+ const c = ie(), m = V(!1), l = G({
752
+ schema: re,
753
+ onSubmit: Z({
752
754
  task: e,
753
755
  message: "Reset password failed",
754
756
  onStart: () => {
@@ -761,21 +763,21 @@ function Le({
761
763
  initialValue: {
762
764
  email: ""
763
765
  }
764
- }), { controller: a, submit: s } = l;
765
- m.on(a.setDisabled);
766
- const n = a.field("email");
767
- return c.on((u) => {
768
- u != null && n.change(u);
769
- }), P(
770
- x,
771
- (u) => (
766
+ }), { controller: n, submit: u } = l;
767
+ m.on(n.setDisabled);
768
+ const s = n.field("email");
769
+ return c.on((a) => {
770
+ a != null && s.change(a);
771
+ }), q(
772
+ B,
773
+ (a) => (
772
774
  // Reset password form
773
775
  i.form(
774
- T(a.dispose, c.dispose, m.dispose),
776
+ C(n.dispose, c.dispose, m.dispose),
775
777
  t.class("bc-auth-form__form"),
776
- N(
777
- a.error,
778
- (r) => G(
778
+ W(
779
+ n.error,
780
+ (r) => j(
779
781
  { variant: "danger", tone: "prominent", role: "alert" },
780
782
  i.div(r)
781
783
  )
@@ -783,28 +785,28 @@ function Le({
783
785
  // Description
784
786
  i.p(
785
787
  t.class("bc-auth-form__description"),
786
- h(o?.resetPasswordDescription, u.$.resetPasswordDescription)
788
+ h(o?.resetPasswordDescription, a.$.resetPasswordDescription)
787
789
  ),
788
- C.submit(s),
789
- q(
790
+ E.submit(u),
791
+ $(
790
792
  t.class("bc-auth-form__fields"),
791
793
  // Email field
792
- $(W, {
793
- controller: n,
794
- label: h(o?.emailLabel, u.$.emailLabel)
794
+ T(H, {
795
+ controller: s,
796
+ label: h(o?.emailLabel, a.$.emailLabel)
795
797
  })
796
798
  ),
797
799
  // Submit button
798
- O(
800
+ F(
799
801
  {
800
802
  loading: m,
801
803
  type: "submit",
802
804
  variant: "filled",
803
805
  color: "primary",
804
- disabled: a.disabledOrHasErrors
806
+ disabled: n.disabledOrHasErrors
805
807
  },
806
808
  t.class("bc-auth-form__submit"),
807
- h(o?.resetPasswordButton, u.$.resetPasswordButton)
809
+ h(o?.resetPasswordButton, a.$.resetPasswordButton)
808
810
  )
809
811
  )
810
812
  )
@@ -816,23 +818,23 @@ function p({
816
818
  size: c = "md",
817
819
  name: m,
818
820
  icon: l,
819
- color: a,
820
- flow: s,
821
- labels: n
821
+ color: n,
822
+ flow: u,
823
+ labels: s
822
824
  }) {
823
- return O(
825
+ return F(
824
826
  {
825
827
  type: "button",
826
828
  variant: "filled",
827
829
  size: c,
828
- color: a,
830
+ color: n,
829
831
  onClick: async () => {
830
832
  if (o)
831
833
  try {
832
- s === "popup" ? await o() : await o();
834
+ u === "popup" ? await o() : await o();
833
835
  } catch (r) {
834
836
  console.error(
835
- `Social login error for ${e} (${s || "redirect"} flow):`,
837
+ `Social login error for ${e} (${u || "redirect"} flow):`,
836
838
  r
837
839
  );
838
840
  }
@@ -841,45 +843,45 @@ function p({
841
843
  },
842
844
  t.class("bc-social-login-button"),
843
845
  t.class(
844
- f(e)((r) => `bc-social-login-button--${r}`)
846
+ g(e)((r) => `bc-social-login-button--${r}`)
845
847
  ),
846
848
  i.span(
847
849
  t.class("bc-social-login-button__inner"),
848
850
  i.span(
849
851
  t.class("bc-social-login-button__icon"),
850
- pe({ icon: l, size: c }, t.class("bc-social-login-button__icon-inner"))
852
+ ge({ icon: l, size: c }, t.class("bc-social-login-button__icon-inner"))
851
853
  ),
852
- P(
853
- x,
854
+ q(
855
+ B,
854
856
  (r) => i.span(
855
857
  t.class("bc-social-login-button__label"),
856
- ie(
857
- h(n?.continueWithProvider, r.$.continueWithProvider)
858
+ le(
859
+ h(s?.continueWithProvider, r.$.continueWithProvider)
858
860
  )(m)
859
861
  )
860
862
  )
861
863
  )
862
864
  );
863
865
  }
864
- function ke({
866
+ function ye({
865
867
  providers: e,
866
868
  onProviderClick: o,
867
869
  size: c = "md",
868
870
  className: m
869
871
  }) {
870
- return q(
872
+ return $(
871
873
  t.class("bc-social-login-buttons"),
872
874
  t.class(m),
873
- ce(
875
+ me(
874
876
  e,
875
877
  (l) => p({
876
878
  provider: l.$.provider,
877
879
  flow: l.$.flow,
878
880
  color: l.map(
879
- ({ provider: a }) => d[a].color
881
+ ({ provider: n }) => d[n].color
880
882
  ),
881
- name: l.map(({ provider: a }) => d[a].name),
882
- icon: l.map(({ provider: a }) => d[a].icon),
883
+ name: l.map(({ provider: n }) => d[n].name),
884
+ icon: l.map(({ provider: n }) => d[n].icon),
883
885
  onClick: async () => {
884
886
  o && await o(l.$.provider.value);
885
887
  },
@@ -1019,237 +1021,241 @@ const d = {
1019
1021
  color: "blue"
1020
1022
  // distinct deep blue tone (not Facebook’s exact blue)
1021
1023
  }
1022
- }, We = (e) => p({
1024
+ }, He = (e) => p({
1023
1025
  ...e,
1024
1026
  ...d.google,
1025
1027
  provider: "google"
1026
- }), Ge = (e) => p({
1028
+ }), je = (e) => p({
1027
1029
  ...e,
1028
1030
  ...d.github,
1029
1031
  provider: "github"
1030
- }), He = (e) => p({
1032
+ }), Xe = (e) => p({
1031
1033
  ...e,
1032
1034
  ...d.apple,
1033
1035
  provider: "apple"
1034
- }), je = (e) => p({
1036
+ }), Ye = (e) => p({
1035
1037
  ...e,
1036
1038
  ...d.facebook,
1037
1039
  provider: "facebook"
1038
- }), Xe = (e) => p({
1040
+ }), Ze = (e) => p({
1039
1041
  ...e,
1040
1042
  ...d.x,
1041
1043
  provider: "x"
1042
- }), Ye = (e) => p({
1044
+ }), Je = (e) => p({
1043
1045
  ...e,
1044
1046
  ...d.twitter,
1045
1047
  provider: "twitter"
1046
- }), Ze = (e) => p({
1048
+ }), Ke = (e) => p({
1047
1049
  ...e,
1048
1050
  ...d.microsoft,
1049
1051
  provider: "microsoft"
1050
- }), Je = (e) => p({
1052
+ }), Qe = (e) => p({
1051
1053
  ...e,
1052
1054
  ...d.discord,
1053
1055
  provider: "discord"
1054
- }), Ke = (e) => p({
1056
+ }), eo = (e) => p({
1055
1057
  ...e,
1056
1058
  ...d.linkedin,
1057
1059
  provider: "linkedin"
1058
- }), Qe = (e) => p({
1060
+ }), oo = (e) => p({
1059
1061
  ...e,
1060
1062
  ...d.instagram,
1061
1063
  provider: "instagram"
1062
- }), eo = (e) => p({
1064
+ }), to = (e) => p({
1063
1065
  ...e,
1064
1066
  ...d.tiktok,
1065
1067
  provider: "tiktok"
1066
- }), oo = (e) => p({
1068
+ }), so = (e) => p({
1067
1069
  ...e,
1068
1070
  ...d.snapchat,
1069
1071
  provider: "snapchat"
1070
- }), to = (e) => p({
1072
+ }), no = (e) => p({
1071
1073
  ...e,
1072
1074
  ...d.reddit,
1073
1075
  provider: "reddit"
1074
- }), so = (e) => p({
1076
+ }), ao = (e) => p({
1075
1077
  ...e,
1076
1078
  ...d.pinterest,
1077
1079
  provider: "pinterest"
1078
- }), no = (e) => p({
1080
+ }), ro = (e) => p({
1079
1081
  ...e,
1080
1082
  ...d.twitch,
1081
1083
  provider: "twitch"
1082
- }), ao = (e) => p({
1084
+ }), io = (e) => p({
1083
1085
  ...e,
1084
1086
  ...d.steam,
1085
1087
  provider: "steam"
1086
- }), ro = (e) => p({
1088
+ }), co = (e) => p({
1087
1089
  ...e,
1088
1090
  ...d.epic,
1089
1091
  provider: "epic"
1090
- }), io = (e) => p({
1092
+ }), lo = (e) => p({
1091
1093
  ...e,
1092
1094
  ...d.playstation,
1093
1095
  provider: "playstation"
1094
- }), co = (e) => p({
1096
+ }), mo = (e) => p({
1095
1097
  ...e,
1096
1098
  ...d.xbox,
1097
1099
  provider: "xbox"
1098
- }), lo = (e) => p({
1100
+ }), uo = (e) => p({
1099
1101
  ...e,
1100
1102
  ...d.whatsapp,
1101
1103
  provider: "whatsapp"
1102
- }), mo = (e) => p({
1104
+ }), po = (e) => p({
1103
1105
  ...e,
1104
1106
  ...d.wechat,
1105
1107
  provider: "wechat"
1106
- }), uo = (e) => p({
1108
+ }), ho = (e) => p({
1107
1109
  ...e,
1108
1110
  ...d.amazon,
1109
1111
  provider: "amazon"
1110
- }), po = (e) => p({
1112
+ }), go = (e) => p({
1111
1113
  ...e,
1112
1114
  ...d.yahoo,
1113
1115
  provider: "yahoo"
1114
- }), ho = (e) => p({
1116
+ }), fo = (e) => p({
1115
1117
  ...e,
1116
1118
  ...d.paypal,
1117
1119
  provider: "paypal"
1118
1120
  });
1119
- function oe({ providers: e }) {
1120
- return q(
1121
- ke({
1121
+ function se({ providers: e }) {
1122
+ return $(
1123
+ ye({
1122
1124
  providers: e
1123
1125
  })
1124
1126
  );
1125
1127
  }
1126
- function ve({
1128
+ function Se({
1127
1129
  mode: e,
1128
1130
  socialProviders: o,
1129
- passwordRules: c,
1130
- showRememberMe: m,
1131
- showSocialDivider: l,
1132
- showPasswordStrength: a,
1133
- labels: s,
1134
- onSignIn: n,
1135
- onSignUp: u,
1136
- onResetPassword: r,
1137
- onModeChange: w,
1131
+ initialName: c,
1132
+ initialEmail: m,
1133
+ passwordRules: l,
1134
+ showRememberMe: n,
1135
+ showSocialDivider: u,
1136
+ showPasswordStrength: s,
1137
+ labels: a,
1138
+ onSignIn: r,
1139
+ onSignUp: f,
1140
+ onResetPassword: w,
1141
+ onModeChange: _,
1138
1142
  // onSocialLogin,
1139
- showContainer: _
1140
- }, ...g) {
1141
- const b = e != null ? Q.deriveProp(e) : U("signin");
1142
- return b.on((v) => w?.(v)), P(x, (v) => {
1143
- function z() {
1144
- const y = h(s?.hasAccountLink, v.$.hasAccountLink);
1143
+ showContainer: k
1144
+ }, ...v) {
1145
+ const x = e != null ? oe.deriveProp(e) : V("signin");
1146
+ return x.on((y) => _?.(y)), q(B, (y) => {
1147
+ function U() {
1148
+ const S = h(a?.hasAccountLink, y.$.hasAccountLink);
1145
1149
  return i.button(
1146
1150
  t.type("button"),
1147
1151
  t.class("bc-auth-form__link"),
1148
- C.click(() => b.set("signin")),
1149
- y
1152
+ E.click(() => x.set("signin")),
1153
+ S
1150
1154
  );
1151
1155
  }
1152
- function E() {
1156
+ function O() {
1153
1157
  return i.button(
1154
1158
  t.type("button"),
1155
1159
  t.class("bc-auth-form__link"),
1156
- C.click(() => b.set("signup")),
1157
- h(s?.noAccountLink, v.$.noAccountLink)
1160
+ E.click(() => x.set("signup")),
1161
+ h(a?.noAccountLink, y.$.noAccountLink)
1158
1162
  );
1159
1163
  }
1160
- function F() {
1164
+ function D() {
1161
1165
  return i.button(
1162
1166
  t.type("button"),
1163
1167
  t.class("bc-auth-form__link"),
1164
- C.click(() => b.set("reset-password")),
1165
- h(s?.forgotPasswordLink, v.$.forgotPasswordLink)
1168
+ E.click(() => x.set("reset-password")),
1169
+ h(a?.forgotPasswordLink, y.$.forgotPasswordLink)
1166
1170
  );
1167
1171
  }
1168
1172
  return i.div(
1169
- he({
1173
+ fe({
1170
1174
  "bc-auth-container": !0,
1171
- "bc-auth-container--styled": Q.map(_ ?? !0, (y) => y)
1175
+ "bc-auth-container--styled": oe.map(k ?? !0, (S) => S)
1172
1176
  }),
1173
- t.class(b.map((y) => `bc-auth-container--${y}`)),
1177
+ t.class(x.map((S) => `bc-auth-container--${S}`)),
1174
1178
  t.class("bc-auth-form"),
1175
- T(b.dispose),
1176
- le(b, {
1177
- signin: () => A(
1179
+ C(x.dispose),
1180
+ ue(x, {
1181
+ signin: () => z(
1178
1182
  i.h2(
1179
1183
  t.class("bc-auth-form__title"),
1180
- h(s?.signInTitle, v.$.signInTitle)
1184
+ h(a?.signInTitle, y.$.signInTitle)
1181
1185
  ),
1182
- o != null ? A(
1183
- oe({ providers: o }),
1184
- L(l ?? !1, te)
1186
+ o != null ? z(
1187
+ se({ providers: o }),
1188
+ b(u ?? !1, ne)
1185
1189
  ) : null,
1186
- be({
1187
- onSignIn: n,
1188
- showRememberMe: m,
1189
- passwordRules: c,
1190
+ _e({
1191
+ onSignIn: r,
1192
+ showRememberMe: n,
1193
+ passwordRules: l,
1190
1194
  labels: {
1191
- emailLabel: s?.emailLabel,
1192
- passwordLabel: s?.passwordLabel,
1193
- rememberMeLabel: s?.rememberMeLabel,
1194
- signInButton: s?.signInButton,
1195
- forgotPasswordLink: s?.forgotPasswordLink,
1196
- noAccountLink: s?.noAccountLink
1195
+ emailLabel: a?.emailLabel,
1196
+ passwordLabel: a?.passwordLabel,
1197
+ rememberMeLabel: a?.rememberMeLabel,
1198
+ signInButton: a?.signInButton,
1199
+ forgotPasswordLink: a?.forgotPasswordLink,
1200
+ noAccountLink: a?.noAccountLink
1197
1201
  }
1198
1202
  }),
1199
- q(
1203
+ $(
1200
1204
  t.class("bc-auth-form__footer"),
1201
- E(),
1202
- F()
1205
+ O(),
1206
+ D()
1203
1207
  )
1204
1208
  ),
1205
- signup: () => A(
1209
+ signup: () => z(
1206
1210
  i.h2(
1207
1211
  t.class("bc-auth-form__title"),
1208
- h(s?.signUpTitle, v.$.signUpTitle)
1212
+ h(a?.signUpTitle, y.$.signUpTitle)
1209
1213
  ),
1210
- o != null ? A(
1211
- oe({ providers: o }),
1212
- L(l ?? !1, te)
1214
+ o != null ? z(
1215
+ se({ providers: o }),
1216
+ b(u ?? !1, ne)
1213
1217
  ) : null,
1214
- _e({
1218
+ ke({
1215
1219
  labels: {
1216
- nameLabel: s?.nameLabel,
1217
- emailLabel: s?.emailLabel,
1218
- passwordLabel: s?.passwordLabel,
1219
- confirmPasswordLabel: s?.confirmPasswordLabel,
1220
- acceptTermsLabel: s?.acceptTermsLabel,
1221
- signUpButton: s?.signUpButton,
1222
- hasAccountLink: s?.hasAccountLink
1220
+ nameLabel: a?.nameLabel,
1221
+ emailLabel: a?.emailLabel,
1222
+ passwordLabel: a?.passwordLabel,
1223
+ confirmPasswordLabel: a?.confirmPasswordLabel,
1224
+ acceptTermsLabel: a?.acceptTermsLabel,
1225
+ signUpButton: a?.signUpButton,
1226
+ hasAccountLink: a?.hasAccountLink
1223
1227
  },
1224
- onSignUp: u,
1225
- passwordRules: c,
1226
- showPasswordStrength: a
1228
+ initialEmail: m,
1229
+ initialName: c,
1230
+ onSignUp: f,
1231
+ passwordRules: l,
1232
+ showPasswordStrength: s
1227
1233
  }),
1228
- q(t.class("bc-auth-form__footer"), z())
1234
+ $(t.class("bc-auth-form__footer"), U())
1229
1235
  ),
1230
- "reset-password": () => A(
1236
+ "reset-password": () => z(
1231
1237
  i.h2(
1232
1238
  t.class("bc-auth-form__title"),
1233
- h(s?.resetPasswordTitle, v.$.resetPasswordTitle)
1239
+ h(a?.resetPasswordTitle, y.$.resetPasswordTitle)
1234
1240
  ),
1235
- Le({
1241
+ ve({
1236
1242
  labels: {
1237
- backToSignInLink: s?.backToSignInLink,
1238
- emailLabel: s?.emailLabel,
1239
- resetPasswordButton: s?.resetPasswordButton,
1240
- resetPasswordDescription: s?.resetPasswordDescription
1243
+ backToSignInLink: a?.backToSignInLink,
1244
+ emailLabel: a?.emailLabel,
1245
+ resetPasswordButton: a?.resetPasswordButton,
1246
+ resetPasswordDescription: a?.resetPasswordDescription
1241
1247
  },
1242
- onResetPassword: r
1248
+ onResetPassword: w
1243
1249
  }),
1244
- q(t.class("bc-auth-form__footer"), z())
1250
+ $(t.class("bc-auth-form__footer"), U())
1245
1251
  )
1246
1252
  }),
1247
- ...g
1253
+ ...v
1248
1254
  );
1249
1255
  });
1250
1256
  }
1251
- function go(e) {
1252
- return ue(
1257
+ function bo(e) {
1258
+ return pe(
1253
1259
  {
1254
1260
  size: "sm",
1255
1261
  dismissable: !0,
@@ -1257,16 +1263,16 @@ function go(e) {
1257
1263
  },
1258
1264
  (o, c) => e(
1259
1265
  (m) => o({
1260
- body: ve({ showContainer: !1, ...m }),
1261
- header: P(
1262
- x,
1266
+ body: Se({ showContainer: !1, ...m }),
1267
+ header: q(
1268
+ B,
1263
1269
  (l) => h(m.modalTitle, l.$.authenticationTitle)
1264
1270
  )
1265
1271
  })
1266
1272
  )
1267
1273
  );
1268
1274
  }
1269
- function te({
1275
+ function ne({
1270
1276
  labels: e,
1271
1277
  className: o
1272
1278
  } = {}) {
@@ -1274,8 +1280,8 @@ function te({
1274
1280
  t.class("bc-auth-divider"),
1275
1281
  t.class(o),
1276
1282
  i.div(t.class("bc-auth-divider__line")),
1277
- P(
1278
- x,
1283
+ q(
1284
+ B,
1279
1285
  (c) => i.span(
1280
1286
  t.class("bc-auth-divider__text"),
1281
1287
  h(e?.text, c.$.orDivider)
@@ -1285,66 +1291,66 @@ function te({
1285
1291
  );
1286
1292
  }
1287
1293
  export {
1288
- uo as AmazonLoginButton,
1289
- He as AppleLoginButton,
1290
- ve as AuthContainer,
1291
- te as AuthDivider,
1292
- go as AuthModal,
1293
- Je as DiscordLoginButton,
1294
- ro as EpicLoginButton,
1295
- je as FacebookLoginButton,
1296
- Ge as GitHubLoginButton,
1297
- We as GoogleLoginButton,
1298
- Qe as InstagramLoginButton,
1299
- Ke as LinkedInLoginButton,
1300
- Ze as MicrosoftLoginButton,
1301
- Ne as PasswordStrengthBar,
1302
- we as PasswordStrengthIndicator,
1303
- Re as PasswordStrengthText,
1304
- ho as PayPalLoginButton,
1305
- so as PinterestLoginButton,
1306
- io as PlayStationLoginButton,
1307
- to as RedditLoginButton,
1308
- Le as ResetPasswordForm,
1309
- be as SignInForm,
1310
- _e as SignUpForm,
1311
- oo as SnapchatLoginButton,
1294
+ ho as AmazonLoginButton,
1295
+ Xe as AppleLoginButton,
1296
+ Se as AuthContainer,
1297
+ ne as AuthDivider,
1298
+ bo as AuthModal,
1299
+ Qe as DiscordLoginButton,
1300
+ co as EpicLoginButton,
1301
+ Ye as FacebookLoginButton,
1302
+ je as GitHubLoginButton,
1303
+ He as GoogleLoginButton,
1304
+ oo as InstagramLoginButton,
1305
+ eo as LinkedInLoginButton,
1306
+ Ke as MicrosoftLoginButton,
1307
+ We as PasswordStrengthBar,
1308
+ Le as PasswordStrengthIndicator,
1309
+ Ge as PasswordStrengthText,
1310
+ fo as PayPalLoginButton,
1311
+ ao as PinterestLoginButton,
1312
+ lo as PlayStationLoginButton,
1313
+ no as RedditLoginButton,
1314
+ ve as ResetPasswordForm,
1315
+ _e as SignInForm,
1316
+ ke as SignUpForm,
1317
+ so as SnapchatLoginButton,
1312
1318
  p as SocialLoginButton,
1313
- ke as SocialLoginButtons,
1314
- oe as SocialProviders,
1315
- ao as SteamLoginButton,
1316
- eo as TiktokLoginButton,
1317
- no as TwitchLoginButton,
1318
- Ye as TwitterLoginButton,
1319
- mo as WeChatLoginButton,
1320
- lo as WhatsAppLoginButton,
1321
- Xe as XLoginButtin,
1322
- co as XboxLoginButton,
1323
- po as YahooLoginButton,
1324
- Fe as authSchemas,
1325
- K as calculatePasswordStrength,
1326
- Y as createPasswordSchema,
1327
- Z as createSignInSchema,
1328
- J as createSignUpSchema,
1329
- Ce as createSocialLoginUrl,
1330
- B as defaultPasswordRules,
1331
- Oe as defaultSignInSchema,
1332
- Ve as defaultSignUpSchema,
1333
- V as emailSchema,
1334
- Ee as formatAuthError,
1335
- ge as formatProviderName,
1336
- Te as formatSocialLoginText,
1337
- fe as generateRandomString,
1338
- Ie as getProviderColor,
1339
- $e as getProviderIcon,
1340
- Ue as isBrowser,
1341
- Ae as isValidEmail,
1342
- ze as openSocialLoginPopup,
1343
- j as providerInfo,
1344
- X as requestToControllerValidation,
1345
- ne as resetPasswordSchema,
1319
+ ye as SocialLoginButtons,
1320
+ se as SocialProviders,
1321
+ io as SteamLoginButton,
1322
+ to as TiktokLoginButton,
1323
+ ro as TwitchLoginButton,
1324
+ Je as TwitterLoginButton,
1325
+ po as WeChatLoginButton,
1326
+ uo as WhatsAppLoginButton,
1327
+ Ze as XLoginButtin,
1328
+ mo as XboxLoginButton,
1329
+ go as YahooLoginButton,
1330
+ De as authSchemas,
1331
+ ee as calculatePasswordStrength,
1332
+ J as createPasswordSchema,
1333
+ K as createSignInSchema,
1334
+ Q as createSignUpSchema,
1335
+ Ee as createSocialLoginUrl,
1336
+ I as defaultPasswordRules,
1337
+ Fe as defaultSignInSchema,
1338
+ Me as defaultSignUpSchema,
1339
+ M as emailSchema,
1340
+ Oe as formatAuthError,
1341
+ be as formatProviderName,
1342
+ Ce as formatSocialLoginText,
1343
+ we as generateRandomString,
1344
+ Ae as getProviderColor,
1345
+ Te as getProviderIcon,
1346
+ Ve as isBrowser,
1347
+ ze as isValidEmail,
1348
+ Ue as openSocialLoginPopup,
1349
+ Y as providerInfo,
1350
+ Z as requestToControllerValidation,
1351
+ re as resetPasswordSchema,
1346
1352
  d as socialProviderInfo,
1347
- ae as useAuthEmailProp,
1348
- Me as validateEmail,
1349
- De as validatePassword
1353
+ ie as useAuthEmailProp,
1354
+ Ne as validateEmail,
1355
+ Re as validatePassword
1350
1356
  };