@burdenoff/microfe-auth 2026.904.2 → 2026.916.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.
@@ -3,135 +3,136 @@ import { useTr as t } from "../../shared/hooks/useTr.js";
3
3
  import { useAuthOperations as n } from "../hooks/useAuthOperations.js";
4
4
  import { useOAuthOperations as ee } from "../hooks/useOAuthOperations.js";
5
5
  import { AuthLayout as r } from "../components/AuthLayout.js";
6
- import { AlertIcon as i, CheckIcon as te, EmailIcon as a, EyeIcon as ne, EyeOffIcon as o, GitHubIcon as re, GoogleIcon as ie, LockIcon as s, MicrosoftIcon as c, SpinnerIcon as l, UserIcon as u, XIcon as d } from "../components/AuthIcons.js";
7
- import { validateEmail as f, validatePassword as p } from "../utils/validation.js";
6
+ import { AlertIcon as i, CheckIcon as te, EmailIcon as a, EyeIcon as o, EyeOffIcon as s, GitHubIcon as ne, GoogleIcon as re, LockIcon as c, MicrosoftIcon as l, SpinnerIcon as u, UserIcon as d, XIcon as f } from "../components/AuthIcons.js";
7
+ import { validateEmail as p, validatePassword as ie } from "../utils/validation.js";
8
+ import { resolveLegalUrl as m } from "../utils/legalUrls.js";
8
9
  import { CaptchaV2 as ae } from "../components/CaptchaV2.js";
9
10
  import { useSignupCaptcha as oe } from "../hooks/useSignupCaptcha.js";
10
- import { useState as m } from "react";
11
- import { useNavigate as se } from "react-router";
12
- import { Fragment as ce, jsx as h, jsxs as g } from "react/jsx-runtime";
13
- import { Button as _ } from "@burdenoff/fe-libs/button";
14
- import { PagePurpose as le } from "@burdenoff/fe-libs/ui";
11
+ import { useState as h } from "react";
12
+ import { useNavigate as g } from "react-router";
13
+ import { Fragment as se, jsx as _, jsxs as v } from "react/jsx-runtime";
14
+ import { Button as y } from "@burdenoff/fe-libs/button";
15
+ import { PagePurpose as ce } from "@burdenoff/fe-libs/ui";
15
16
  //#region src/auth/pages/RegisterPage.tsx
16
- function v() {
17
- let v = t(), { productName: y } = e(), b = se(), { signUp: x, resendVerification: S, isLoading: C, errorCode: w } = n(), { initiateGoogleOAuth: ue, initiateMicrosoftOAuth: de, isProviderConfigured: T } = ee(), [E, fe] = m(!1), [D, O] = m({
17
+ function b() {
18
+ let b = t(), { productName: x } = e(), S = g(), { signUp: C, resendVerification: le, isLoading: w, errorCode: T } = n(), { initiateGoogleOAuth: ue, initiateMicrosoftOAuth: de, isProviderConfigured: E } = ee(), [D, fe] = h(!1), [O, k] = h({
18
19
  email: "",
19
20
  username: "",
20
21
  password: "",
21
22
  firstName: "",
22
23
  lastName: ""
23
- }), [k, A] = m([]), [j, M] = m(!1), [N, P] = m(null), [F, I] = m(null), [L, R] = m(null), [z, B] = m(0), { enabled: V, siteKey: pe } = oe(), [H, U] = m(!1), [W, G] = m(null), K = !!N && w === "ACCOUNT_DEACTIVATED", q = !!N && w === "ACCOUNT_REMOVED", J = !!N && w === "ACCOUNT_SUSPENDED", Y = (() => {
24
- let e = D.password;
24
+ }), [A, j] = h([]), [M, N] = h(!1), [P, F] = h(null), [I, L] = h(null), [R, z] = h(null), [B, V] = h(0), { enabled: H, siteKey: pe } = oe(), [U, W] = h(!1), [G, K] = h(null), q = !!P && T === "ACCOUNT_DEACTIVATED", J = !!P && T === "ACCOUNT_REMOVED", Y = !!P && T === "ACCOUNT_SUSPENDED", X = (() => {
25
+ let e = O.password;
25
26
  return [
26
27
  {
27
- label: v("auth.register.pwMin8", "At least 12 characters"),
28
+ label: b("auth.register.pwMin8", "At least 12 characters"),
28
29
  met: e.length >= 12
29
30
  },
30
31
  {
31
- label: v("auth.register.pwUppercase", "One uppercase letter"),
32
+ label: b("auth.register.pwUppercase", "One uppercase letter"),
32
33
  met: /[A-Z]/.test(e)
33
34
  },
34
35
  {
35
- label: v("auth.register.pwLowercase", "One lowercase letter"),
36
+ label: b("auth.register.pwLowercase", "One lowercase letter"),
36
37
  met: /[a-z]/.test(e)
37
38
  },
38
39
  {
39
- label: v("auth.register.pwNumber", "One number"),
40
+ label: b("auth.register.pwNumber", "One number"),
40
41
  met: /\d/.test(e)
41
42
  },
42
43
  {
43
- label: v("auth.register.pwSpecial", "One special character"),
44
+ label: b("auth.register.pwSpecial", "One special character"),
44
45
  met: /[!@#$%^&*(),.?":{}|<>]/.test(e)
45
46
  }
46
47
  ];
47
- })(), X = (() => {
48
- let e = Y.filter((e) => e.met).length;
48
+ })(), Z = (() => {
49
+ let e = X.filter((e) => e.met).length;
49
50
  return e <= 2 ? {
50
- level: v("auth.register.passwordStrengthWeak", "weak"),
51
+ level: b("auth.register.passwordStrengthWeak", "weak"),
51
52
  color: "bg-status-error-bg-subtle0",
52
53
  width: "w-1/4"
53
54
  } : e <= 3 ? {
54
- level: v("auth.register.passwordStrengthFair", "fair"),
55
+ level: b("auth.register.passwordStrengthFair", "fair"),
55
56
  color: "bg-status-warning-text",
56
57
  width: "w-2/4"
57
58
  } : e <= 4 ? {
58
- level: v("auth.register.passwordStrengthGood", "good"),
59
+ level: b("auth.register.passwordStrengthGood", "good"),
59
60
  color: "bg-status-warning-bg-subtle0",
60
61
  width: "w-3/4"
61
62
  } : {
62
- level: v("auth.register.passwordStrengthStrong", "strong"),
63
+ level: b("auth.register.passwordStrengthStrong", "strong"),
63
64
  color: "bg-status-success-text",
64
65
  width: "w-full"
65
66
  };
66
- })(), Z = async (e) => {
67
+ })(), me = async (e) => {
67
68
  e.preventDefault();
68
69
  let t = [];
69
- f(D.email) || t.push(v("auth.register.invalidEmail", "Please enter a valid email address")), (!D.username || D.username.length < 3) && t.push(v("auth.register.usernameMin3", "Username must be at least 3 characters")), /^[a-zA-Z0-9_-]+$/.test(D.username) || t.push(v("auth.register.usernameChars", "Username can only contain letters, numbers, underscores, and hyphens"));
70
- let n = p(D.password);
71
- if (n.valid || t.push(...n.errors), V && !L && t.push(v("auth.register.completeCaptcha", "Please complete the reCAPTCHA verification")), t.length > 0) {
72
- A(t);
70
+ p(O.email) || t.push(b("auth.register.invalidEmail", "Please enter a valid email address")), (!O.username || O.username.length < 3) && t.push(b("auth.register.usernameMin3", "Username must be at least 3 characters")), /^[a-zA-Z0-9_-]+$/.test(O.username) || t.push(b("auth.register.usernameChars", "Username can only contain letters, numbers, underscores, and hyphens"));
71
+ let n = ie(O.password);
72
+ if (n.valid || t.push(...n.errors), H && !R && t.push(b("auth.register.completeCaptcha", "Please complete the reCAPTCHA verification")), t.length > 0) {
73
+ j(t);
73
74
  return;
74
75
  }
75
- A([]), P(null);
76
+ j([]), F(null);
76
77
  try {
77
- await x({
78
- ...D,
79
- ...L ? { recaptchaToken: L } : {}
80
- }), M(!0);
78
+ await C({
79
+ ...O,
80
+ ...R ? { recaptchaToken: R } : {}
81
+ }), N(!0);
81
82
  } catch (e) {
82
- P(e instanceof Error ? e.message : v("auth.register.signUpFailed", "Sign up failed")), console.error("Sign up failed:", e), V && (R(null), B((e) => e + 1));
83
+ F(e instanceof Error ? e.message : b("auth.register.signUpFailed", "Sign up failed")), console.error("Sign up failed:", e), H && (z(null), V((e) => e + 1));
83
84
  }
84
- }, me = () => {
85
- I(null);
85
+ }, he = () => {
86
+ L(null);
86
87
  try {
87
88
  ue();
88
89
  } catch (e) {
89
- I(e instanceof Error ? e.message : v("auth.register.googleSignUpFailed", "Failed to initiate Google sign up"));
90
+ L(e instanceof Error ? e.message : b("auth.register.googleSignUpFailed", "Failed to initiate Google sign up"));
90
91
  }
91
- }, he = () => {
92
- I(null);
92
+ }, ge = () => {
93
+ L(null);
93
94
  try {
94
95
  de();
95
96
  } catch (e) {
96
- I(e instanceof Error ? e.message : v("auth.register.microsoftSignUpFailed", "Failed to initiate Microsoft sign up"));
97
+ L(e instanceof Error ? e.message : b("auth.register.microsoftSignUpFailed", "Failed to initiate Microsoft sign up"));
97
98
  }
98
- }, Q = T("google"), $ = T("microsoft"), ge = [
99
+ }, Q = E("google"), $ = E("microsoft"), _e = [
99
100
  {
100
101
  name: "Google",
101
- icon: ie,
102
- onClick: me,
102
+ icon: re,
103
+ onClick: he,
103
104
  disabled: !Q,
104
- tooltip: Q ? void 0 : v("auth.register.googleNotConfigured", "Google sign up is not configured")
105
+ tooltip: Q ? void 0 : b("auth.register.googleNotConfigured", "Google sign up is not configured")
105
106
  },
106
107
  {
107
108
  name: "GitHub",
108
- icon: re,
109
+ icon: ne,
109
110
  onClick: () => {},
110
111
  disabled: !0,
111
- tooltip: v("auth.register.githubNotConfigured", "GitHub sign up is not configured")
112
+ tooltip: b("auth.register.githubNotConfigured", "GitHub sign up is not configured")
112
113
  },
113
114
  {
114
115
  name: "Microsoft",
115
- icon: c,
116
- onClick: he,
116
+ icon: l,
117
+ onClick: ge,
117
118
  disabled: !$,
118
- tooltip: $ ? void 0 : v("auth.register.microsoftNotConfigured", "Microsoft sign up is not configured")
119
+ tooltip: $ ? void 0 : b("auth.register.microsoftNotConfigured", "Microsoft sign up is not configured")
119
120
  }
120
- ], [_e, ve = ""] = v("auth.register.verificationEmailSentTo", "We've sent a verification email to {{email}}. Please check your inbox and click the verification link to activate your account.").split("{{email}}");
121
- return j ? /* @__PURE__ */ h(r, {
122
- title: v("auth.register.checkEmail", "Check your email"),
123
- subtitle: v("auth.register.verificationLinkSent", "We've sent you a verification link"),
124
- children: /* @__PURE__ */ g("div", {
121
+ ], [ve, ye = ""] = b("auth.register.verificationEmailSentTo", "We've sent a verification email to {{email}}. Please check your inbox and click the verification link to activate your account.").split("{{email}}");
122
+ return M ? /* @__PURE__ */ _(r, {
123
+ title: b("auth.register.checkEmail", "Check your email"),
124
+ subtitle: b("auth.register.verificationLinkSent", "We've sent you a verification link"),
125
+ children: /* @__PURE__ */ v("div", {
125
126
  className: "flex flex-col items-center justify-center py-6",
126
127
  children: [
127
- /* @__PURE__ */ h("div", {
128
+ /* @__PURE__ */ _("div", {
128
129
  className: "size-20 rounded-full bg-status-success-bg-subtle flex items-center justify-center mb-6",
129
- children: /* @__PURE__ */ h("svg", {
130
+ children: /* @__PURE__ */ _("svg", {
130
131
  className: "size-10 text-status-success-text",
131
132
  fill: "none",
132
133
  viewBox: "0 0 24 24",
133
134
  stroke: "currentColor",
134
- children: /* @__PURE__ */ h("path", {
135
+ children: /* @__PURE__ */ _("path", {
135
136
  strokeLinecap: "round",
136
137
  strokeLinejoin: "round",
137
138
  strokeWidth: 2,
@@ -139,56 +140,56 @@ function v() {
139
140
  })
140
141
  })
141
142
  }),
142
- /* @__PURE__ */ h("h3", {
143
+ /* @__PURE__ */ _("h3", {
143
144
  className: "text-lg font-semibold text-[var(--color-text-primary)] mb-2",
144
- children: v("auth.register.accountCreated", "Account created successfully!")
145
+ children: b("auth.register.accountCreated", "Account created successfully!")
145
146
  }),
146
- /* @__PURE__ */ g("p", {
147
+ /* @__PURE__ */ v("p", {
147
148
  className: "text-center text-[var(--color-text-secondary)] mb-8 max-w-sm",
148
149
  children: [
149
- _e,
150
- /* @__PURE__ */ h("span", {
150
+ ve,
151
+ /* @__PURE__ */ _("span", {
151
152
  className: "font-medium text-[var(--color-text-primary)]",
152
- children: D.email
153
+ children: O.email
153
154
  }),
154
- ve
155
+ ye
155
156
  ]
156
157
  }),
157
- /* @__PURE__ */ g("div", {
158
+ /* @__PURE__ */ v("div", {
158
159
  className: "space-y-3 w-full",
159
160
  children: [
160
- /* @__PURE__ */ h(_, {
161
+ /* @__PURE__ */ _(y, {
161
162
  type: "button",
162
- onClick: () => b("/auth/login"),
163
+ onClick: () => S("/auth/login"),
163
164
  variant: "default",
164
165
  size: "lg",
165
166
  className: "w-full font-semibold",
166
- children: v("auth.register.continueToSignIn", "Continue to sign in")
167
+ children: b("auth.register.continueToSignIn", "Continue to sign in")
167
168
  }),
168
- W && /* @__PURE__ */ h("p", {
169
+ G && /* @__PURE__ */ _("p", {
169
170
  className: "text-center text-sm text-status-error-text",
170
- children: W
171
+ children: G
171
172
  }),
172
- /* @__PURE__ */ g("p", {
173
+ /* @__PURE__ */ v("p", {
173
174
  className: "text-center text-sm text-[var(--color-text-tertiary)]",
174
175
  children: [
175
- v("auth.register.didntReceiveEmail", "Didn't receive the email? Check your spam folder or"),
176
+ b("auth.register.didntReceiveEmail", "Didn't receive the email? Check your spam folder or"),
176
177
  " ",
177
- /* @__PURE__ */ h("button", {
178
+ /* @__PURE__ */ _("button", {
178
179
  type: "button",
179
- disabled: H,
180
+ disabled: U,
180
181
  onClick: async () => {
181
- G(null), U(!0);
182
+ K(null), W(!0);
182
183
  try {
183
- await S(D.email);
184
+ await le(O.email);
184
185
  } catch (e) {
185
- G(e instanceof Error ? e.message : v("auth.register.resendFailed", "Failed to resend verification email"));
186
+ K(e instanceof Error ? e.message : b("auth.register.resendFailed", "Failed to resend verification email"));
186
187
  } finally {
187
- U(!1);
188
+ W(!1);
188
189
  }
189
190
  },
190
191
  className: "text-text-link hover:text-text-linkHover font-medium disabled:opacity-50 disabled:cursor-not-allowed",
191
- children: H ? v("auth.register.resending", "resending...") : v("auth.register.tryAgain", "try again")
192
+ children: U ? b("auth.register.resending", "resending...") : b("auth.register.tryAgain", "try again")
192
193
  })
193
194
  ]
194
195
  })
@@ -196,223 +197,223 @@ function v() {
196
197
  })
197
198
  ]
198
199
  })
199
- }) : /* @__PURE__ */ g(r, {
200
- title: v("auth.register.createAccount", "Create your account"),
201
- subtitle: v("auth.register.startJourney", "Start your journey with {{productName}}").replace("{{productName}}", y || "Burdenoff Workspaces"),
202
- productName: y,
200
+ }) : /* @__PURE__ */ v(r, {
201
+ title: b("auth.register.createAccount", "Create your account"),
202
+ subtitle: b("auth.register.startJourney", "Start your journey with {{productName}}").replace("{{productName}}", x || "Burdenoff Workspaces"),
203
+ productName: x,
203
204
  children: [
204
- /* @__PURE__ */ h(le, {
205
+ /* @__PURE__ */ _(ce, {
205
206
  className: "mb-5",
206
- children: v("auth.register.purpose", "Create your account to get a personal workspace and start collaborating. You'll verify your email, then you can sign in and invite your team.")
207
+ children: b("auth.register.purpose", "Create your account to get a personal workspace and start collaborating. You'll verify your email, then you can sign in and invite your team.")
207
208
  }),
208
- /* @__PURE__ */ g("form", {
209
- onSubmit: Z,
209
+ /* @__PURE__ */ v("form", {
210
+ onSubmit: me,
210
211
  className: "space-y-5",
211
212
  children: [
212
- K && /* @__PURE__ */ g("div", {
213
+ q && /* @__PURE__ */ v("div", {
213
214
  className: "flex items-start gap-3 p-4 rounded-xl bg-status-warning-bg-subtle border border-status-warning-border",
214
- children: [/* @__PURE__ */ h(i, { className: "size-5 text-status-warning-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ g("div", {
215
+ children: [/* @__PURE__ */ _(i, { className: "size-5 text-status-warning-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ v("div", {
215
216
  className: "space-y-2",
216
217
  children: [
217
- /* @__PURE__ */ h("p", {
218
+ /* @__PURE__ */ _("p", {
218
219
  className: "text-sm font-medium text-status-warning-text",
219
- children: v("auth.register.accountDeactivated", "This email belongs to a deactivated account.")
220
+ children: b("auth.register.accountDeactivated", "This email belongs to a deactivated account.")
220
221
  }),
221
- /* @__PURE__ */ h("p", {
222
+ /* @__PURE__ */ _("p", {
222
223
  className: "text-xs text-status-warning-text/80",
223
- children: v("auth.register.accountDeactivatedHelp", "If this is your account, you can reactivate it instead of creating a new one.")
224
+ children: b("auth.register.accountDeactivatedHelp", "If this is your account, you can reactivate it instead of creating a new one.")
224
225
  }),
225
- /* @__PURE__ */ h("button", {
226
+ /* @__PURE__ */ _("button", {
226
227
  type: "button",
227
- onClick: () => b("/auth/reactivate", { state: { email: D.email } }),
228
+ onClick: () => S("/auth/reactivate", { state: { email: O.email } }),
228
229
  className: "text-sm font-semibold text-status-warning-text underline underline-offset-2",
229
- children: v("auth.register.reactivateCta", "Reactivate my account")
230
+ children: b("auth.register.reactivateCta", "Reactivate my account")
230
231
  })
231
232
  ]
232
233
  })]
233
234
  }),
234
- (q || J) && /* @__PURE__ */ g("div", {
235
+ (J || Y) && /* @__PURE__ */ v("div", {
235
236
  className: "flex items-start gap-3 p-4 rounded-xl bg-status-warning-bg-subtle border border-status-warning-border",
236
- children: [/* @__PURE__ */ h(i, { className: "size-5 text-status-warning-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ h("p", {
237
+ children: [/* @__PURE__ */ _(i, { className: "size-5 text-status-warning-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ _("p", {
237
238
  className: "text-sm text-status-warning-text",
238
- children: N
239
+ children: P
239
240
  })]
240
241
  }),
241
- (N && !K && !q && !J || k.length > 0) && /* @__PURE__ */ g("div", {
242
+ (P && !q && !J && !Y || A.length > 0) && /* @__PURE__ */ v("div", {
242
243
  className: "flex items-start gap-3 p-4 rounded-xl bg-status-error-bg-subtle border border-status-error-border",
243
- children: [/* @__PURE__ */ h(i, { className: "size-5 text-status-error-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ g("div", {
244
+ children: [/* @__PURE__ */ _(i, { className: "size-5 text-status-error-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ v("div", {
244
245
  className: "space-y-1",
245
- children: [N && !K && !q && !J && /* @__PURE__ */ h("p", {
246
+ children: [P && !q && !J && !Y && /* @__PURE__ */ _("p", {
246
247
  className: "text-sm text-status-error-text",
247
- children: N
248
- }), k.map((e) => /* @__PURE__ */ h("p", {
248
+ children: P
249
+ }), A.map((e) => /* @__PURE__ */ _("p", {
249
250
  className: "text-sm text-status-error-text",
250
251
  children: e
251
252
  }, e))]
252
253
  })]
253
254
  }),
254
- /* @__PURE__ */ g("div", {
255
+ /* @__PURE__ */ v("div", {
255
256
  className: "grid grid-cols-2 gap-4",
256
- children: [/* @__PURE__ */ g("div", {
257
+ children: [/* @__PURE__ */ v("div", {
257
258
  className: "space-y-2",
258
- children: [/* @__PURE__ */ h("label", {
259
+ children: [/* @__PURE__ */ _("label", {
259
260
  htmlFor: "firstName",
260
261
  className: "block text-sm font-medium text-[var(--color-text-primary)]",
261
- children: v("auth.register.firstName", "First Name")
262
- }), /* @__PURE__ */ h("input", {
262
+ children: b("auth.register.firstName", "First Name")
263
+ }), /* @__PURE__ */ _("input", {
263
264
  id: "firstName",
264
265
  type: "text",
265
266
  required: !0,
266
267
  "aria-required": "true",
267
- "aria-label": v("auth.register.firstName", "First Name"),
268
- value: D.firstName,
269
- onChange: (e) => O({
270
- ...D,
268
+ "aria-label": b("auth.register.firstName", "First Name"),
269
+ value: O.firstName,
270
+ onChange: (e) => k({
271
+ ...O,
271
272
  firstName: e.target.value
272
273
  }),
273
274
  className: "block w-full px-4 py-3 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] placeholder:text-[var(--color-text-tertiary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
274
- placeholder: v("auth.register.firstNamePlaceholder", "Enter first name")
275
+ placeholder: b("auth.register.firstNamePlaceholder", "Enter first name")
275
276
  })]
276
- }), /* @__PURE__ */ g("div", {
277
+ }), /* @__PURE__ */ v("div", {
277
278
  className: "space-y-2",
278
- children: [/* @__PURE__ */ h("label", {
279
+ children: [/* @__PURE__ */ _("label", {
279
280
  htmlFor: "lastName",
280
281
  className: "block text-sm font-medium text-[var(--color-text-primary)]",
281
- children: v("auth.register.lastName", "Last Name")
282
- }), /* @__PURE__ */ h("input", {
282
+ children: b("auth.register.lastName", "Last Name")
283
+ }), /* @__PURE__ */ _("input", {
283
284
  id: "lastName",
284
285
  type: "text",
285
286
  required: !0,
286
287
  "aria-required": "true",
287
- "aria-label": v("auth.register.lastName", "Last Name"),
288
- value: D.lastName,
289
- onChange: (e) => O({
290
- ...D,
288
+ "aria-label": b("auth.register.lastName", "Last Name"),
289
+ value: O.lastName,
290
+ onChange: (e) => k({
291
+ ...O,
291
292
  lastName: e.target.value
292
293
  }),
293
294
  className: "block w-full px-4 py-3 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] placeholder:text-[var(--color-text-tertiary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
294
- placeholder: v("auth.register.lastNamePlaceholder", "Enter last name")
295
+ placeholder: b("auth.register.lastNamePlaceholder", "Enter last name")
295
296
  })]
296
297
  })]
297
298
  }),
298
- /* @__PURE__ */ g("div", {
299
+ /* @__PURE__ */ v("div", {
299
300
  className: "space-y-2",
300
- children: [/* @__PURE__ */ h("label", {
301
+ children: [/* @__PURE__ */ _("label", {
301
302
  htmlFor: "username",
302
303
  className: "block text-sm font-medium text-[var(--color-text-primary)]",
303
- children: v("auth.register.username", "Username")
304
- }), /* @__PURE__ */ g("div", {
304
+ children: b("auth.register.username", "Username")
305
+ }), /* @__PURE__ */ v("div", {
305
306
  className: "relative",
306
- children: [/* @__PURE__ */ h("div", {
307
+ children: [/* @__PURE__ */ _("div", {
307
308
  className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
308
- children: /* @__PURE__ */ h(u, { className: "size-5 text-[var(--color-text-tertiary)]" })
309
- }), /* @__PURE__ */ h("input", {
309
+ children: /* @__PURE__ */ _(d, { className: "size-5 text-[var(--color-text-tertiary)]" })
310
+ }), /* @__PURE__ */ _("input", {
310
311
  id: "username",
311
312
  type: "text",
312
313
  required: !0,
313
314
  "aria-required": "true",
314
- "aria-label": v("auth.register.username", "Username"),
315
+ "aria-label": b("auth.register.username", "Username"),
315
316
  autoComplete: "username",
316
- value: D.username,
317
- onChange: (e) => O({
318
- ...D,
317
+ value: O.username,
318
+ onChange: (e) => k({
319
+ ...O,
319
320
  username: e.target.value
320
321
  }),
321
322
  className: "block w-full pl-[3.5rem] pr-4 py-3 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] placeholder:text-[var(--color-text-tertiary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
322
- placeholder: v("auth.register.usernamePlaceholder", "Choose a username")
323
+ placeholder: b("auth.register.usernamePlaceholder", "Choose a username")
323
324
  })]
324
325
  })]
325
326
  }),
326
- /* @__PURE__ */ g("div", {
327
+ /* @__PURE__ */ v("div", {
327
328
  className: "space-y-2",
328
- children: [/* @__PURE__ */ h("label", {
329
+ children: [/* @__PURE__ */ _("label", {
329
330
  htmlFor: "email",
330
331
  className: "block text-sm font-medium text-[var(--color-text-primary)]",
331
- children: v("auth.register.email", "Email")
332
- }), /* @__PURE__ */ g("div", {
332
+ children: b("auth.register.email", "Email")
333
+ }), /* @__PURE__ */ v("div", {
333
334
  className: "relative",
334
- children: [/* @__PURE__ */ h("div", {
335
+ children: [/* @__PURE__ */ _("div", {
335
336
  className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
336
- children: /* @__PURE__ */ h(a, { className: "size-5 text-[var(--color-text-tertiary)]" })
337
- }), /* @__PURE__ */ h("input", {
337
+ children: /* @__PURE__ */ _(a, { className: "size-5 text-[var(--color-text-tertiary)]" })
338
+ }), /* @__PURE__ */ _("input", {
338
339
  id: "email",
339
340
  type: "email",
340
341
  required: !0,
341
342
  "aria-required": "true",
342
- "aria-label": v("auth.register.email", "Email"),
343
+ "aria-label": b("auth.register.email", "Email"),
343
344
  autoComplete: "email",
344
- value: D.email,
345
- onChange: (e) => O({
346
- ...D,
345
+ value: O.email,
346
+ onChange: (e) => k({
347
+ ...O,
347
348
  email: e.target.value
348
349
  }),
349
350
  className: "block w-full pl-[3.5rem] pr-4 py-3 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] placeholder:text-[var(--color-text-tertiary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
350
- placeholder: v("auth.register.emailPlaceholder", "you@example.com")
351
+ placeholder: b("auth.register.emailPlaceholder", "you@example.com")
351
352
  })]
352
353
  })]
353
354
  }),
354
- /* @__PURE__ */ g("div", {
355
+ /* @__PURE__ */ v("div", {
355
356
  className: "space-y-2",
356
357
  children: [
357
- /* @__PURE__ */ h("label", {
358
+ /* @__PURE__ */ _("label", {
358
359
  htmlFor: "password",
359
360
  className: "block text-sm font-medium text-[var(--color-text-primary)]",
360
- children: v("auth.register.password", "Password")
361
+ children: b("auth.register.password", "Password")
361
362
  }),
362
- /* @__PURE__ */ g("div", {
363
+ /* @__PURE__ */ v("div", {
363
364
  className: "relative",
364
365
  children: [
365
- /* @__PURE__ */ h("div", {
366
+ /* @__PURE__ */ _("div", {
366
367
  className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
367
- children: /* @__PURE__ */ h(s, { className: "size-5 text-[var(--color-text-tertiary)]" })
368
+ children: /* @__PURE__ */ _(c, { className: "size-5 text-[var(--color-text-tertiary)]" })
368
369
  }),
369
- /* @__PURE__ */ h("input", {
370
+ /* @__PURE__ */ _("input", {
370
371
  id: "password",
371
- type: E ? "text" : "password",
372
+ type: D ? "text" : "password",
372
373
  required: !0,
373
374
  "aria-required": "true",
374
- "aria-label": v("auth.register.password", "Password"),
375
+ "aria-label": b("auth.register.password", "Password"),
375
376
  autoComplete: "new-password",
376
- value: D.password,
377
- onChange: (e) => O({
378
- ...D,
377
+ value: O.password,
378
+ onChange: (e) => k({
379
+ ...O,
379
380
  password: e.target.value
380
381
  }),
381
382
  className: "block w-full pl-[3.5rem] pr-12 py-3 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] placeholder:text-[var(--color-text-tertiary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all",
382
- placeholder: v("auth.register.passwordPlaceholder", "Create a strong password")
383
+ placeholder: b("auth.register.passwordPlaceholder", "Create a strong password")
383
384
  }),
384
- /* @__PURE__ */ h("button", {
385
+ /* @__PURE__ */ _("button", {
385
386
  type: "button",
386
- onClick: () => fe(!E),
387
- "aria-label": E ? v("auth.register.hidePassword", "Hide password") : v("auth.register.showPassword", "Show password"),
387
+ onClick: () => fe(!D),
388
+ "aria-label": D ? b("auth.register.hidePassword", "Hide password") : b("auth.register.showPassword", "Show password"),
388
389
  className: "absolute inset-y-0 right-0 pr-3.5 flex items-center text-[var(--color-text-tertiary)] hover:text-[var(--color-text-secondary)] transition-colors",
389
- children: h(E ? o : ne, { className: "size-5" })
390
+ children: _(D ? s : o, { className: "size-5" })
390
391
  })
391
392
  ]
392
393
  }),
393
- D.password && /* @__PURE__ */ g("div", {
394
+ O.password && /* @__PURE__ */ v("div", {
394
395
  className: "space-y-3 pt-2",
395
- children: [/* @__PURE__ */ g("div", {
396
+ children: [/* @__PURE__ */ v("div", {
396
397
  className: "space-y-1",
397
- children: [/* @__PURE__ */ h("div", {
398
+ children: [/* @__PURE__ */ _("div", {
398
399
  className: "h-1.5 bg-[var(--color-bg-sunken)] rounded-full overflow-hidden",
399
- children: /* @__PURE__ */ h("div", { className: `h-full ${X.color} ${X.width} transition-all duration-300` })
400
- }), /* @__PURE__ */ g("p", {
400
+ children: /* @__PURE__ */ _("div", { className: `h-full ${Z.color} ${Z.width} transition-all duration-300` })
401
+ }), /* @__PURE__ */ v("p", {
401
402
  className: "text-xs text-[var(--color-text-tertiary)] capitalize",
402
403
  children: [
403
- v("auth.register.passwordStrength", "Password strength:"),
404
+ b("auth.register.passwordStrength", "Password strength:"),
404
405
  " ",
405
- /* @__PURE__ */ h("span", {
406
+ /* @__PURE__ */ _("span", {
406
407
  className: "font-medium",
407
- children: X.level
408
+ children: Z.level
408
409
  })
409
410
  ]
410
411
  })]
411
- }), /* @__PURE__ */ h("div", {
412
+ }), /* @__PURE__ */ _("div", {
412
413
  className: "grid grid-cols-2 gap-2",
413
- children: Y.map((e) => /* @__PURE__ */ g("div", {
414
+ children: X.map((e) => /* @__PURE__ */ v("div", {
414
415
  className: "flex items-center gap-2",
415
- children: [e.met ? /* @__PURE__ */ h(te, { className: "size-4 text-status-success-text" }) : /* @__PURE__ */ h(d, { className: "size-4 text-[var(--color-text-tertiary)]" }), /* @__PURE__ */ h("span", {
416
+ children: [e.met ? /* @__PURE__ */ _(te, { className: "size-4 text-status-success-text" }) : /* @__PURE__ */ _(f, { className: "size-4 text-[var(--color-text-tertiary)]" }), /* @__PURE__ */ _("span", {
416
417
  className: `text-xs ${e.met ? "text-status-success-text" : "text-[var(--color-text-tertiary)]"}`,
417
418
  children: e.label
418
419
  })]
@@ -421,87 +422,91 @@ function v() {
421
422
  })
422
423
  ]
423
424
  }),
424
- /* @__PURE__ */ g("p", {
425
+ /* @__PURE__ */ v("p", {
425
426
  className: "text-xs text-[var(--color-text-tertiary)] leading-relaxed",
426
427
  children: [
427
- v("auth.register.agreeToTerms", "By creating an account, you agree to our"),
428
+ b("auth.register.agreeToTerms", "By creating an account, you agree to our"),
428
429
  " ",
429
- /* @__PURE__ */ h("a", {
430
- href: "/legal/terms",
430
+ /* @__PURE__ */ _("a", {
431
+ href: m("/terms"),
432
+ target: "_blank",
433
+ rel: "noopener noreferrer",
431
434
  className: "text-text-link underline underline-offset-2",
432
- children: v("auth.register.termsOfService", "Terms of Service")
435
+ children: b("auth.register.termsOfService", "Terms of Service")
433
436
  }),
434
437
  " ",
435
- v("auth.register.and", "and"),
438
+ b("auth.register.and", "and"),
436
439
  " ",
437
- /* @__PURE__ */ h("a", {
438
- href: "/legal/privacy",
440
+ /* @__PURE__ */ _("a", {
441
+ href: m("/privacy"),
442
+ target: "_blank",
443
+ rel: "noopener noreferrer",
439
444
  className: "text-text-link underline underline-offset-2",
440
- children: v("auth.register.privacyPolicy", "Privacy Policy")
445
+ children: b("auth.register.privacyPolicy", "Privacy Policy")
441
446
  }),
442
447
  "."
443
448
  ]
444
449
  }),
445
- /* @__PURE__ */ h(ae, {
446
- enabled: V,
450
+ /* @__PURE__ */ _(ae, {
451
+ enabled: H,
447
452
  siteKey: pe,
448
- onVerify: R,
449
- onExpired: () => R(null)
450
- }, z),
451
- /* @__PURE__ */ h(_, {
453
+ onVerify: z,
454
+ onExpired: () => z(null)
455
+ }, B),
456
+ /* @__PURE__ */ _(y, {
452
457
  type: "submit",
453
- disabled: C,
458
+ disabled: w,
454
459
  variant: "default",
455
460
  size: "lg",
456
461
  className: "w-full font-semibold",
457
- children: C ? /* @__PURE__ */ g(ce, { children: [/* @__PURE__ */ h(l, { className: "size-5 animate-spin" }), /* @__PURE__ */ h("span", { children: v("auth.register.creatingAccount", "Creating account...") })] }) : v("auth.register.createAccountBtn", "Create account")
462
+ children: w ? /* @__PURE__ */ v(se, { children: [/* @__PURE__ */ _(u, { className: "size-5 animate-spin" }), /* @__PURE__ */ _("span", { children: b("auth.register.creatingAccount", "Creating account...") })] }) : b("auth.register.createAccountBtn", "Create account")
458
463
  })
459
464
  ]
460
465
  }),
461
- /* @__PURE__ */ g("div", {
466
+ /* @__PURE__ */ v("div", {
462
467
  className: "relative my-8",
463
- children: [/* @__PURE__ */ h("div", {
468
+ children: [/* @__PURE__ */ _("div", {
464
469
  className: "absolute inset-0 flex items-center",
465
- children: /* @__PURE__ */ h("div", { className: "w-full border-t border-[var(--color-border-default)]" })
466
- }), /* @__PURE__ */ h("div", {
470
+ children: /* @__PURE__ */ _("div", { className: "w-full border-t border-[var(--color-border-default)]" })
471
+ }), /* @__PURE__ */ _("div", {
467
472
  className: "relative flex justify-center",
468
- children: /* @__PURE__ */ h("span", {
473
+ children: /* @__PURE__ */ _("span", {
469
474
  className: "px-4 bg-[var(--color-bg-canvas)] text-sm text-[var(--color-text-tertiary)]",
470
- children: v("auth.register.orSignUpWith", "or sign up with")
475
+ children: b("auth.register.orSignUpWith", "or sign up with")
471
476
  })
472
477
  })]
473
478
  }),
474
- F && /* @__PURE__ */ g("div", {
479
+ I && /* @__PURE__ */ v("div", {
475
480
  className: "flex items-start gap-3 p-4 rounded-xl border bg-status-error-bg-subtle border-status-error-border",
476
- children: [/* @__PURE__ */ h(i, { className: "size-5 flex-shrink-0 mt-0.5 text-status-error-text" }), /* @__PURE__ */ h("p", {
481
+ children: [/* @__PURE__ */ _(i, { className: "size-5 flex-shrink-0 mt-0.5 text-status-error-text" }), /* @__PURE__ */ _("p", {
477
482
  className: "text-sm text-status-error-text",
478
- children: F
483
+ children: I
479
484
  })]
480
485
  }),
481
- /* @__PURE__ */ h("div", {
486
+ /* @__PURE__ */ _("div", {
482
487
  className: "grid grid-cols-3 gap-3",
483
- children: ge.map((e) => /* @__PURE__ */ g("button", {
488
+ children: _e.map((e) => /* @__PURE__ */ v("button", {
484
489
  type: "button",
485
490
  onClick: e.onClick,
486
491
  disabled: e.disabled,
487
492
  title: e.tooltip,
488
493
  className: `flex items-center justify-center gap-2 px-4 py-3 rounded-xl border transition-all duration-200 group ${e.disabled ? "border-[var(--color-border-subtle)] bg-[var(--color-bg-disabled)] cursor-not-allowed opacity-50" : "border-[var(--color-border-default)] bg-[var(--color-bg-surface)] hover:bg-[var(--color-bg-sunken)] hover:border-[var(--color-border-strong)]"}`,
489
- children: [/* @__PURE__ */ h(e.icon, { className: `size-5 ${e.disabled ? "opacity-50" : ""}` }), /* @__PURE__ */ h("span", {
494
+ children: [/* @__PURE__ */ _(e.icon, { className: `size-5 ${e.disabled ? "opacity-50" : ""}` }), /* @__PURE__ */ _("span", {
490
495
  className: `sr-only sm:not-sr-only text-sm font-medium transition-colors ${e.disabled ? "text-[var(--color-text-disabled)]" : "text-[var(--color-text-secondary)] group-hover:text-[var(--color-text-primary)]"}`,
491
496
  children: e.name
492
497
  })]
493
498
  }, e.name))
494
499
  }),
495
- /* @__PURE__ */ g("p", {
500
+ /* @__PURE__ */ v("p", {
496
501
  className: "mt-8 text-center text-sm text-[var(--color-text-secondary)]",
497
502
  children: [
498
- v("auth.register.alreadyHaveAccount", "Already have an account?"),
503
+ b("auth.register.alreadyHaveAccount", "Already have an account?"),
499
504
  " ",
500
- /* @__PURE__ */ h("button", {
505
+ /* @__PURE__ */ _("button", {
501
506
  type: "button",
502
- onClick: () => b("/auth/login"),
507
+ onClick: () => S("/auth/login"),
503
508
  className: "font-semibold text-text-link hover:text-text-linkHover transition-colors",
504
- children: v("auth.register.signIn", "Sign in")
509
+ children: b("auth.register.signIn", "Sign in")
505
510
  })
506
511
  ]
507
512
  })
@@ -509,6 +514,6 @@ function v() {
509
514
  });
510
515
  }
511
516
  //#endregion
512
- export { v as RegisterPage };
517
+ export { b as RegisterPage };
513
518
 
514
519
  //# sourceMappingURL=RegisterPage.js.map