@burdenoff/microfe-auth 2026.1101.3 → 2026.1102.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.
@@ -2,26 +2,26 @@ import { useTr as e } from "../../shared/hooks/useTr.js";
2
2
  import { useAuthOperations as t } from "../hooks/useAuthOperations.js";
3
3
  import { useMyWorkspaces as n } from "../hooks/useMyWorkspaces.js";
4
4
  import { useOAuthOperations as r } from "../hooks/useOAuthOperations.js";
5
- import { sanitizePostLoginPath as i } from "../utils/redirect.js";
6
- import { useAuthStore as a } from "../store/authStore.js";
7
- import { useAuth as o } from "../providers/AuthProvider.js";
8
- import { AuthLayout as s } from "../components/AuthLayout.js";
9
- import { AlertIcon as c, EmailIcon as l, EyeIcon as ee, EyeOffIcon as te, GoogleIcon as u, LockIcon as ne, MicrosoftIcon as d, SpinnerIcon as f } from "../components/AuthIcons.js";
10
- import { useCaptchaV3 as re } from "../hooks/useCaptchaV3.js";
11
- import { MFA_REDIRECT as ie } from "../constants/sessionKeys.js";
12
- import { useCallback as p, useEffect as m, useRef as ae, useState as h } from "react";
13
- import { SSORedirectSpinner as oe, getSSORedirectUrl as se } from "@burdenoff/fe-libs/shared/components";
14
- import { useLocation as ce, useNavigate as le, useSearchParams as ue } from "react-router";
15
- import { useActiveContext as de } from "@burdenoff/fe-libs/shared/providers/shell";
16
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
17
- import { beginSsoNavigation as fe, buildSsoDepositUrl as pe, isSsoNavigationPending as me, markSsoDepositPending as he, mintSsoSessionTokens as ge } from "@burdenoff/fe-libs/shared/utils";
18
- import { resolveAuthBridgeConfig as _e } from "@burdenoff/fe-libs/shared/config";
19
- import { resolveGatewayUrls as ve } from "@burdenoff/fe-libs/shared/config/gatewayUrls";
20
- import { Button as ye } from "@burdenoff/fe-libs/button";
21
- import { Checkbox as be, PagePurpose as xe } from "@burdenoff/fe-libs/ui";
22
- import { getProfileTokens as Se, getProfileUser as Ce, getProfileWorkspaceToken as we, getProfiles as Te, resolveActiveProfileId as Ee } from "@burdenoff/fe-libs/shared/providers/shell/ProfileStorageManager";
5
+ import { hostFragmentContinuation as i, sameOriginFragmentPath as a, sanitizePostLoginPath as o } from "../utils/redirect.js";
6
+ import { useAuthStore as s } from "../store/authStore.js";
7
+ import { useAuth as c } from "../providers/AuthProvider.js";
8
+ import { AuthLayout as l } from "../components/AuthLayout.js";
9
+ import { AlertIcon as u, EmailIcon as ee, EyeIcon as te, EyeOffIcon as ne, GoogleIcon as re, LockIcon as ie, MicrosoftIcon as d, SpinnerIcon as f } from "../components/AuthIcons.js";
10
+ import { useCaptchaV3 as ae } from "../hooks/useCaptchaV3.js";
11
+ import { MFA_REDIRECT as oe } from "../constants/sessionKeys.js";
12
+ import { useCallback as se, useEffect as p, useRef as ce, useState as m } from "react";
13
+ import { SSORedirectSpinner as le, getSSORedirectUrl as ue } from "@burdenoff/fe-libs/shared/components";
14
+ import { useLocation as de, useNavigate as fe, useSearchParams as pe } from "react-router";
15
+ import { useActiveContext as me } from "@burdenoff/fe-libs/shared/providers/shell";
16
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
17
+ import { beginSsoNavigation as he, buildSsoDepositUrl as ge, isSsoNavigationPending as _e, markSsoDepositPending as ve, mintSsoSessionTokens as ye } from "@burdenoff/fe-libs/shared/utils";
18
+ import { resolveAuthBridgeConfig as be } from "@burdenoff/fe-libs/shared/config";
19
+ import { resolveGatewayUrls as xe } from "@burdenoff/fe-libs/shared/config/gatewayUrls";
20
+ import { Button as Se } from "@burdenoff/fe-libs/button";
21
+ import { Checkbox as Ce, PagePurpose as we } from "@burdenoff/fe-libs/ui";
22
+ import { getProfileTokens as v, getProfileUser as y, getProfileWorkspaceToken as Te, getProfiles as b, resolveActiveProfileId as Ee } from "@burdenoff/fe-libs/shared/providers/shell/ProfileStorageManager";
23
23
  // src/auth/pages/LoginPage.tsx
24
- function y() {
24
+ function De() {
25
25
  if (typeof window > "u") return !1;
26
26
  let e = window;
27
27
  if (typeof e.Capacitor?.isNativePlatform == "function") try {
@@ -29,7 +29,7 @@ function y() {
29
29
  } catch {}
30
30
  return !!(typeof navigator < "u" && /Electron/i.test(navigator.userAgent || ""));
31
31
  }
32
- function De(e) {
32
+ function Oe(e) {
33
33
  if (typeof window > "u") return e;
34
34
  try {
35
35
  let t = new URL(e, window.location.origin);
@@ -38,7 +38,7 @@ function De(e) {
38
38
  return e;
39
39
  }
40
40
  }
41
- function Oe(e) {
41
+ function ke(e) {
42
42
  try {
43
43
  let t = e.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "="), r = JSON.parse(atob(n));
44
44
  return typeof r.exp == "number" && r.exp > Date.now() / 1e3;
@@ -46,16 +46,16 @@ function Oe(e) {
46
46
  return !1;
47
47
  }
48
48
  }
49
- function ke(e) {
49
+ function Ae(e) {
50
50
  if (!e) return null;
51
51
  try {
52
52
  let t = new URL(decodeURIComponent(e), window.location.origin);
53
- return t.origin === window.location.origin ? b(t, { includeOrigin: !1 }) : null;
53
+ return t.origin === window.location.origin ? x(t, { includeOrigin: !1 }) : null;
54
54
  } catch {
55
55
  return null;
56
56
  }
57
57
  }
58
- function b(e, t) {
58
+ function x(e, t) {
59
59
  for (let t of [
60
60
  "sso_failed",
61
61
  "sso-failed",
@@ -65,93 +65,104 @@ function b(e, t) {
65
65
  let n = e.searchParams.toString();
66
66
  return `${e.pathname}${n ? `?${n}` : ""}${e.hash}`;
67
67
  }
68
- function x(e) {
68
+ function je(e) {
69
69
  try {
70
70
  let t = new URL(decodeURIComponent(e), window.location.origin);
71
- return b(t, { includeOrigin: t.origin !== window.location.origin });
71
+ return x(t, { includeOrigin: t.origin !== window.location.origin });
72
72
  } catch {
73
73
  return e;
74
74
  }
75
75
  }
76
76
  function S() {
77
- let b = e(), S = le(), C = ce(), [w] = ue(), { signIn: Ae, isLoading: T, error: E, errorCode: D, resendVerification: je } = t(), { completeAuthFlow: Me } = n(), { setWorkspace: O, setOrganization: Ne } = de(), { defaultPostLoginPath: Pe } = o(), { initiateGoogleOAuth: Fe, initiateMicrosoftOAuth: Ie, isProviderConfigured: k } = r(), Le = a((e) => e.mfaRequired), { executeRecaptcha: Re } = re(), [A, ze] = h(!1), [Be, Ve] = h(!1), He = p(async (e) => {
78
- if (typeof window > "u" || y()) return e;
77
+ let x = e(), S = fe(), Me = de(), [C] = pe(), { signIn: Ne, isLoading: Pe, error: w, errorCode: Fe, resendVerification: Ie } = t(), { completeAuthFlow: Le } = n(), { setWorkspace: Re, setOrganization: ze } = me(), { defaultPostLoginPath: T, navigate: Be } = c(), { initiateGoogleOAuth: Ve, initiateMicrosoftOAuth: He, isProviderConfigured: E } = r(), Ue = s((e) => e.mfaRequired), { executeRecaptcha: We } = ae(), [D, O] = m(!1), [Ge, Ke] = m(!1), k = se(async (e) => {
78
+ if (typeof window > "u" || De()) return e;
79
79
  try {
80
- let t = _e(), n = new URL(t.url), r = window.location.origin;
80
+ let t = be(), n = new URL(t.url), r = window.location.origin;
81
81
  if (n.origin === r) return e;
82
82
  let i = new URL(e, r).href, a = Ee();
83
83
  if (!a) return e;
84
- let o = Se(a), s = Ce(a);
84
+ let o = v(a), s = y(a);
85
85
  if (!o || !s) return e;
86
- let c = we(a), l = {
86
+ let c = Te(a), l = {
87
87
  ...o,
88
88
  workspaceToken: c
89
89
  };
90
90
  if (o.refreshToken) {
91
- let { globalBaseUrl: e } = ve(), { tokens: t } = await ge(`${e}/global/graphql`, o.refreshToken);
91
+ let { globalBaseUrl: e } = xe(), { tokens: t } = await ye(`${e}/global/graphql`, o.refreshToken);
92
92
  t && (l = {
93
93
  ...t,
94
94
  workspaceToken: c
95
95
  });
96
96
  }
97
- return he(a), pe(n.origin, i, {
97
+ return ve(a), ge(n.origin, i, {
98
98
  profileId: a,
99
99
  tokens: JSON.stringify(l),
100
100
  user: JSON.stringify(s),
101
- profiles: JSON.stringify(Te())
101
+ profiles: JSON.stringify(b())
102
102
  });
103
103
  } catch {
104
104
  return e;
105
105
  }
106
- }, []), j = ae(!1), M = p((e) => {
107
- let t = i(e);
108
- if (typeof window > "u") S(t);
106
+ }, []), A = ce(!1), j = se((e) => {
107
+ let t = o(e);
108
+ if (typeof window > "u") {
109
+ S(t);
110
+ return;
111
+ }
112
+ let n = a(t, window.location.origin);
113
+ if (n) Be(n);
109
114
  else {
110
115
  try {
111
116
  sessionStorage.setItem("bf-post-login-return-to", t);
112
117
  } catch {}
113
- y() ? S(De(t)) : (j.current = !0, (async () => {
114
- let e = await Promise.race([He(t), new Promise((e) => {
118
+ De() ? S(Oe(t)) : (A.current = !0, (async () => {
119
+ let e = await Promise.race([k(t), new Promise((e) => {
115
120
  window.setTimeout(() => e(t), 3e3);
116
121
  })]);
117
- e.includes("/auth/sso-deposit") ? (fe(), window.location.assign(e), window.setTimeout(() => {
118
- fe(), window.location.replace(e);
122
+ e.includes("/auth/sso-deposit") ? (he(), window.location.assign(e), window.setTimeout(() => {
123
+ he(), window.location.replace(e);
119
124
  }, 2500)) : window.location.assign(e), window.setTimeout(() => {
120
125
  typeof window < "u" && window.location.pathname === "/auth/login" && S("/dashboard");
121
126
  }, 3500);
122
127
  })());
123
128
  }
124
- }, [S, He]), [N, Ue] = h(!1), [P, F] = h(!1), [We, I] = h(!1), [Ge, L] = h(!1), [R, z] = h(!1), [B, V] = h(!1), [Ke, qe] = h(!1), [Je, H] = h(!1), [Ye, U] = h(null), [Xe, W] = h(null), [G, K] = h({
129
+ }, [
130
+ S,
131
+ Be,
132
+ k
133
+ ]), [M, qe] = m(!1), [N, P] = m(!1), [Je, F] = m(!1), [Ye, I] = m(!1), [L, R] = m(!1), [z, B] = m(!1), [Xe, Ze] = m(!1), [Qe, V] = m(!1), [$e, H] = m(null), [et, U] = m(null), [W, G] = m({
125
134
  email: "",
126
135
  password: "",
127
136
  rememberMe: !1
128
- }), [q, J] = h(null), [Ze, Y] = h(!1), X = w.get("mode") === "add-account", Z = w.get("returnTo"), Q = ae(Z), $ = w.get("reason");
129
- m(() => {
130
- $ === "session-expired" ? W(b("auth.login.sessionExpired", "Your session has expired. Please sign in again.")) : $ === "logout" && W(b("auth.login.signedOut", "You have been signed out."));
131
- }, [$, b]), m(() => {
132
- !Q.current && Z && (Q.current = Z);
133
- }, [Z]), m(() => {
134
- if (X || A || j.current || me()) return;
137
+ }), [K, q] = m(null), [tt, J] = m(!1), Y = C.get("mode") === "add-account", X = C.get("returnTo"), Z = ce(X), Q = C.get("reason");
138
+ p(() => {
139
+ Q === "session-expired" ? U(x("auth.login.sessionExpired", "Your session has expired. Please sign in again.")) : Q === "logout" && U(x("auth.login.signedOut", "You have been signed out."));
140
+ }, [Q, x]), p(() => {
141
+ !Z.current && X && (Z.current = X);
142
+ }, [X]), p(() => {
143
+ if (Y || D || A.current || _e()) return;
135
144
  let e = Ee();
136
145
  if (e) {
137
- let t = Se(e), n = Ce(e);
138
- if (t?.accessToken && n && Oe(t.accessToken)) {
139
- a.getState().loadFromProfile(e), M(ke(Z) ?? "/");
146
+ let t = v(e), n = y(e);
147
+ if (t?.accessToken && n && ke(t.accessToken)) {
148
+ s.getState().loadFromProfile(e), j(Ae(X) ?? T ?? "/");
140
149
  return;
141
150
  }
142
151
  }
143
- let t = se();
144
- t && (Ve(!0), window.location.replace(t));
152
+ if (a(T ?? "", window.location.origin)) return;
153
+ let t = ue();
154
+ t && (Ke(!0), window.location.replace(t));
145
155
  }, [
156
+ Y,
157
+ D,
158
+ j,
146
159
  X,
147
- A,
148
- M,
149
- Z
150
- ]), m(() => {
160
+ T
161
+ ]), p(() => {
151
162
  try {
152
163
  localStorage.removeItem("remembered_password");
153
164
  let e = localStorage.getItem("remembered_email");
154
- e && K((t) => ({
165
+ e && G((t) => ({
155
166
  ...t,
156
167
  email: e,
157
168
  rememberMe: !0
@@ -159,14 +170,14 @@ function S() {
159
170
  } catch (e) {
160
171
  console.warn("[LoginPage] Failed to load remembered email:", e);
161
172
  }
162
- }, []), m(() => {
163
- let e = C.state;
164
- e?.message && W(e.message), e?.email && K((t) => ({
173
+ }, []), p(() => {
174
+ let e = Me.state;
175
+ e?.message && U(e.message), e?.email && G((t) => ({
165
176
  ...t,
166
177
  email: e.email
167
178
  })), e && window.history.replaceState({}, document.title);
168
- }, [C.state]);
169
- let Qe = (e, t) => {
179
+ }, [Me.state]);
180
+ let nt = (e, t) => {
170
181
  if (t) switch (t) {
171
182
  case "ACCOUNT_DELETED": return "DELETED";
172
183
  case "ACCOUNT_SUSPENDED": return "SUSPENDED";
@@ -178,39 +189,39 @@ function S() {
178
189
  let n = e.toLowerCase();
179
190
  return n.includes("deleted") || n.includes("permanently deleted") ? "DELETED" : n.includes("suspended") ? "SUSPENDED" : n.includes("oauth provider") || n.includes("oauth-only") || n.includes("oauth only") ? "OAUTH_ONLY" : n.includes("inactive") || n.includes("deactivated") || n.includes("not active") ? "INACTIVE" : n.includes("verify your email") || n.includes("email not verified") || n.includes("email_not_verified") ? "EMAIL_NOT_VERIFIED" : null;
180
191
  };
181
- m(() => {
182
- let e = w.get("email");
183
- if (e && K((t) => ({
192
+ p(() => {
193
+ let e = C.get("email");
194
+ if (e && G((t) => ({
184
195
  ...t,
185
196
  email: e
186
- })), w.get("expired") === "true") {
187
- W(b("auth.login.sessionExpired", "Your session has expired. Please sign in again."));
197
+ })), C.get("expired") === "true") {
198
+ U(x("auth.login.sessionExpired", "Your session has expired. Please sign in again."));
188
199
  let e = window.location.pathname;
189
200
  window.history.replaceState({}, document.title, e);
190
201
  }
191
- }, [w, b]), m(() => {
192
- Le && S("/auth/mfa-verify");
193
- }, [Le, S]);
194
- let $e = async (e) => {
195
- e.preventDefault(), F(!1), I(!1), L(!1), z(!1), V(!1), Y(!1), H(!1), J(null);
196
- let t = (G.email ?? "").trim();
197
- if (!t) J(b("auth.login.enterEmailOrUsername", "Please enter your email or username"));
198
- else if (t.includes("@") && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)) J(b("auth.login.invalidEmail", "Please enter a valid email address"));
199
- else if (!G.password || G.password.length < 1) J(b("auth.login.enterPassword", "Please enter your password"));
200
- else if (X && Te().some((e) => e.email.toLowerCase() === t.toLowerCase())) Y(!0), J(null);
202
+ }, [C, x]), p(() => {
203
+ Ue && S("/auth/mfa-verify");
204
+ }, [Ue, S]);
205
+ let rt = async (e) => {
206
+ e.preventDefault(), P(!1), F(!1), I(!1), R(!1), B(!1), J(!1), V(!1), q(null);
207
+ let t = (W.email ?? "").trim();
208
+ if (!t) q(x("auth.login.enterEmailOrUsername", "Please enter your email or username"));
209
+ else if (t.includes("@") && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)) q(x("auth.login.invalidEmail", "Please enter a valid email address"));
210
+ else if (!W.password || W.password.length < 1) q(x("auth.login.enterPassword", "Please enter your password"));
211
+ else if (Y && b().some((e) => e.email.toLowerCase() === t.toLowerCase())) J(!0), q(null);
201
212
  else {
202
- Y(!1);
213
+ J(!1);
203
214
  try {
204
- let e = await Re("login"), n = await Ae({
215
+ let e = await We("login"), n = await Ne({
205
216
  email: t,
206
- password: G.password,
207
- rememberMe: G.rememberMe,
217
+ password: W.password,
218
+ rememberMe: W.rememberMe,
208
219
  ...e ? { recaptchaToken: e } : {}
209
220
  });
210
221
  if (n.requiresMFA) {
211
- let e = x(Q.current || Z || (Pe ?? "/dashboard"));
222
+ let e = je(Z.current || X || (T ?? "/dashboard"));
212
223
  try {
213
- sessionStorage.setItem(ie, e);
224
+ sessionStorage.setItem(oe, e);
214
225
  } catch {}
215
226
  return;
216
227
  }
@@ -226,14 +237,14 @@ function S() {
226
237
  }
227
238
  } catch {}
228
239
  try {
229
- G.rememberMe ? localStorage.setItem("remembered_email", t) : localStorage.removeItem("remembered_email");
240
+ W.rememberMe ? localStorage.setItem("remembered_email", t) : localStorage.removeItem("remembered_email");
230
241
  } catch (e) {
231
242
  console.warn("[LoginPage] Failed to save/clear remembered email:", e);
232
243
  }
233
- ze(!0);
234
- let e = x(Q.current || Z || (Pe ?? "/dashboard"));
244
+ O(!0);
245
+ let e = je(Z.current || X || (T ?? "/dashboard"));
235
246
  try {
236
- let t = await Promise.race([Me(n.token), new Promise((e) => {
247
+ let t = await Promise.race([Le(n.token), new Promise((e) => {
237
248
  window.setTimeout(() => {
238
249
  e({
239
250
  success: !1,
@@ -241,279 +252,279 @@ function S() {
241
252
  });
242
253
  }, 5e3);
243
254
  })]);
244
- t.success ? (t.workspace && (O(t.workspace.id), t.workspace.organizationId && Ne(t.workspace.organizationId)), M(e)) : t.error?.includes("No workspaces found") ? S("/onboarding/create-workspace") : (t.workspace && (O(t.workspace.id), t.workspace.organizationId && Ne(t.workspace.organizationId)), console.warn("Auth flow warning:", t.error), M(e));
255
+ t.success ? (t.workspace && (Re(t.workspace.id), t.workspace.organizationId && ze(t.workspace.organizationId)), j(e)) : t.error?.includes("No workspaces found") ? i(e, T, window.location.origin) ? j(e) : S("/onboarding/create-workspace") : (t.workspace && (Re(t.workspace.id), t.workspace.organizationId && ze(t.workspace.organizationId)), console.warn("Auth flow warning:", t.error), j(e));
245
256
  } catch (t) {
246
- console.error("Auth flow error (login succeeded):", t), M(e);
257
+ console.error("Auth flow error (login succeeded):", t), j(e);
247
258
  } finally {
248
- j.current || ze(!1);
259
+ A.current || O(!1);
249
260
  }
250
261
  }
251
262
  } catch (e) {
252
263
  let t = e instanceof Error ? e.message : String(e);
253
- t.includes("reCAPTCHA") && J(t);
254
- let n = a.getState().errorCode, r = Qe(t, n);
255
- r === "DELETED" ? I(!0) : r === "SUSPENDED" ? L(!0) : r === "OAUTH_ONLY" ? z(!0) : r === "INACTIVE" ? F(!0) : r === "EMAIL_NOT_VERIFIED" && V(!0);
264
+ t.includes("reCAPTCHA") && q(t);
265
+ let n = s.getState().errorCode, r = nt(t, n);
266
+ r === "DELETED" ? F(!0) : r === "SUSPENDED" ? I(!0) : r === "OAUTH_ONLY" ? R(!0) : r === "INACTIVE" ? P(!0) : r === "EMAIL_NOT_VERIFIED" && B(!0);
256
267
  }
257
268
  }
258
269
  };
259
- m(() => {
260
- if (E) {
261
- let e = Qe(E, D);
262
- e === "DELETED" ? I(!0) : e === "SUSPENDED" ? L(!0) : e === "OAUTH_ONLY" ? z(!0) : e === "INACTIVE" ? F(!0) : e === "EMAIL_NOT_VERIFIED" && V(!0);
270
+ p(() => {
271
+ if (w) {
272
+ let e = nt(w, Fe);
273
+ e === "DELETED" ? F(!0) : e === "SUSPENDED" ? I(!0) : e === "OAUTH_ONLY" ? R(!0) : e === "INACTIVE" ? P(!0) : e === "EMAIL_NOT_VERIFIED" && B(!0);
263
274
  }
264
- }, [E, D]);
265
- let et = () => {
266
- U(null);
275
+ }, [w, Fe]);
276
+ let it = () => {
277
+ H(null);
267
278
  try {
268
- Fe();
279
+ Ve();
269
280
  } catch (e) {
270
- U(e instanceof Error ? e.message : b("auth.login.googleSignInFailed", "Failed to initiate Google sign in"));
281
+ H(e instanceof Error ? e.message : x("auth.login.googleSignInFailed", "Failed to initiate Google sign in"));
271
282
  }
272
- }, tt = () => {
273
- U(null);
283
+ }, at = () => {
284
+ H(null);
274
285
  try {
275
- Ie();
286
+ He();
276
287
  } catch (e) {
277
- U(e instanceof Error ? e.message : b("auth.login.microsoftSignInFailed", "Failed to initiate Microsoft sign in"));
288
+ H(e instanceof Error ? e.message : x("auth.login.microsoftSignInFailed", "Failed to initiate Microsoft sign in"));
278
289
  }
279
- }, nt = async () => {
280
- qe(!0), H(!1);
290
+ }, ot = async () => {
291
+ Ze(!0), V(!1);
281
292
  try {
282
- let e = (G.email ?? "").trim();
283
- (await je(e)).success ? H(!0) : J(b("auth.login.resendFailed", "Failed to resend verification email. Please try again."));
293
+ let e = (W.email ?? "").trim();
294
+ (await Ie(e)).success ? V(!0) : q(x("auth.login.resendFailed", "Failed to resend verification email. Please try again."));
284
295
  } catch (e) {
285
- console.error("Failed to resend verification email:", e), J(e instanceof Error ? e.message : b("auth.login.resendFailed", "Failed to resend verification email. Please try again."));
296
+ console.error("Failed to resend verification email:", e), q(e instanceof Error ? e.message : x("auth.login.resendFailed", "Failed to resend verification email. Please try again."));
286
297
  } finally {
287
- qe(!1);
298
+ Ze(!1);
288
299
  }
289
- }, rt = k("google"), it = k("microsoft"), at = [{
300
+ }, st = E("google"), $ = E("microsoft"), ct = [{
290
301
  name: "Google",
291
- icon: u,
292
- onClick: et,
293
- disabled: !rt,
294
- tooltip: rt ? void 0 : b("auth.login.googleNotConfigured", "Google sign in is not configured")
302
+ icon: re,
303
+ onClick: it,
304
+ disabled: !st,
305
+ tooltip: st ? void 0 : x("auth.login.googleNotConfigured", "Google sign in is not configured")
295
306
  }, {
296
307
  name: "Microsoft",
297
308
  icon: d,
298
- onClick: tt,
299
- disabled: !it,
300
- tooltip: it ? void 0 : b("auth.login.microsoftNotConfigured", "Microsoft sign in is not configured")
309
+ onClick: at,
310
+ disabled: !$,
311
+ tooltip: $ ? void 0 : x("auth.login.microsoftNotConfigured", "Microsoft sign in is not configured")
301
312
  }];
302
- return Be ? /* @__PURE__ */ _(oe, {}) : /* @__PURE__ */ v(s, {
303
- title: b("auth.login.welcomeBack", "Welcome back"),
304
- subtitle: b("auth.login.enterCredentials", "Enter your credentials to continue"),
313
+ return Ge ? /* @__PURE__ */ g(le, {}) : /* @__PURE__ */ _(l, {
314
+ title: x("auth.login.welcomeBack", "Welcome back"),
315
+ subtitle: x("auth.login.enterCredentials", "Enter your credentials to continue"),
305
316
  children: [
306
- /* @__PURE__ */ _(xe, {
317
+ /* @__PURE__ */ g(we, {
307
318
  className: "mb-5",
308
- children: b("auth.login.purpose", "Sign in to reach your workspaces, agents, and settings. Use your email and password, a social provider, or a passwordless magic link.")
319
+ children: x("auth.login.purpose", "Sign in to reach your workspaces, agents, and settings. Use your email and password, a social provider, or a passwordless magic link.")
309
320
  }),
310
- /* @__PURE__ */ v("form", {
311
- onSubmit: $e,
321
+ /* @__PURE__ */ _("form", {
322
+ onSubmit: rt,
312
323
  className: "space-y-5",
313
324
  children: [
314
- Xe && /* @__PURE__ */ v("div", {
325
+ et && /* @__PURE__ */ _("div", {
315
326
  className: "flex items-start gap-3 p-4 rounded-xl border bg-status-info-bg-subtle border-status-info-border",
316
- children: [/* @__PURE__ */ _("svg", {
327
+ children: [/* @__PURE__ */ g("svg", {
317
328
  className: "size-5 flex-shrink-0 mt-0.5 text-text-link",
318
329
  fill: "none",
319
330
  viewBox: "0 0 24 24",
320
331
  stroke: "currentColor",
321
- children: /* @__PURE__ */ _("path", {
332
+ children: /* @__PURE__ */ g("path", {
322
333
  strokeLinecap: "round",
323
334
  strokeLinejoin: "round",
324
335
  strokeWidth: 2,
325
336
  d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
326
337
  })
327
- }), /* @__PURE__ */ _("p", {
338
+ }), /* @__PURE__ */ g("p", {
328
339
  className: "text-sm text-status-info-text",
329
- children: Xe
340
+ children: et
330
341
  })]
331
342
  }),
332
- q && /* @__PURE__ */ v("div", {
343
+ K && /* @__PURE__ */ _("div", {
333
344
  className: "flex items-start gap-3 p-4 rounded-xl border bg-status-warning-bg-subtle border-status-warning-border",
334
- children: [/* @__PURE__ */ _(c, { className: "size-5 flex-shrink-0 mt-0.5 text-status-warning-text" }), /* @__PURE__ */ _("p", {
345
+ children: [/* @__PURE__ */ g(u, { className: "size-5 flex-shrink-0 mt-0.5 text-status-warning-text" }), /* @__PURE__ */ g("p", {
335
346
  className: "text-sm text-status-warning-text",
336
- children: q
347
+ children: K
337
348
  })]
338
349
  }),
339
- Ze && /* @__PURE__ */ v("div", {
350
+ tt && /* @__PURE__ */ _("div", {
340
351
  className: "flex items-start gap-3 p-4 rounded-xl border bg-status-warning-bg-subtle border-status-warning-border",
341
- children: [/* @__PURE__ */ _(c, { className: "size-5 flex-shrink-0 mt-0.5 text-status-warning-text" }), /* @__PURE__ */ v("div", {
352
+ children: [/* @__PURE__ */ g(u, { className: "size-5 flex-shrink-0 mt-0.5 text-status-warning-text" }), /* @__PURE__ */ _("div", {
342
353
  className: "flex-1",
343
354
  children: [
344
- /* @__PURE__ */ _("p", {
355
+ /* @__PURE__ */ g("p", {
345
356
  className: "text-sm font-medium text-status-warning-text",
346
- children: b("auth.login.duplicateAccount", "This account is already signed in.")
357
+ children: x("auth.login.duplicateAccount", "This account is already signed in.")
347
358
  }),
348
- /* @__PURE__ */ _("p", {
359
+ /* @__PURE__ */ g("p", {
349
360
  className: "mt-1 text-sm text-status-warning-text/80",
350
- children: b("auth.login.duplicateAccountHint", "Please use a different account, or go back and switch to this account from the profile menu.")
361
+ children: x("auth.login.duplicateAccountHint", "Please use a different account, or go back and switch to this account from the profile menu.")
351
362
  }),
352
- (Q.current || Z) && /* @__PURE__ */ v("button", {
363
+ (Z.current || X) && /* @__PURE__ */ _("button", {
353
364
  type: "button",
354
- onClick: () => S(decodeURIComponent(Q.current || Z || "/dashboard")),
365
+ onClick: () => S(decodeURIComponent(Z.current || X || "/dashboard")),
355
366
  className: "mt-3 inline-flex items-center gap-2 px-4 py-2.5 rounded-xl border border-status-warning-border bg-bg-surface text-status-warning-text text-sm font-medium hover:bg-status-warning-bg-subtle hover:border-status-warning-border transition-all shadow-sm",
356
- children: [/* @__PURE__ */ _("svg", {
367
+ children: [/* @__PURE__ */ g("svg", {
357
368
  className: "size-4",
358
369
  fill: "none",
359
370
  viewBox: "0 0 24 24",
360
371
  stroke: "currentColor",
361
- children: /* @__PURE__ */ _("path", {
372
+ children: /* @__PURE__ */ g("path", {
362
373
  strokeLinecap: "round",
363
374
  strokeLinejoin: "round",
364
375
  strokeWidth: 2,
365
376
  d: "M10 19l-7-7m0 0l7-7m-7 7h18"
366
377
  })
367
- }), b("auth.login.goBackSwitchAccount", "Go back and switch account")]
378
+ }), x("auth.login.goBackSwitchAccount", "Go back and switch account")]
368
379
  })
369
380
  ]
370
381
  })]
371
382
  }),
372
- E && !q && !Ze && /* @__PURE__ */ v("div", {
373
- className: `flex items-start gap-3 p-4 rounded-xl border ${P || R || B ? "bg-status-warning-bg-subtle border-status-warning-border" : "bg-status-error-bg-subtle border-status-error-border"}`,
374
- children: [/* @__PURE__ */ _(c, { className: `size-5 flex-shrink-0 mt-0.5 ${P || R || B ? "text-status-warning-text" : "text-status-error-text"}` }), /* @__PURE__ */ v("div", {
383
+ w && !K && !tt && /* @__PURE__ */ _("div", {
384
+ className: `flex items-start gap-3 p-4 rounded-xl border ${N || L || z ? "bg-status-warning-bg-subtle border-status-warning-border" : "bg-status-error-bg-subtle border-status-error-border"}`,
385
+ children: [/* @__PURE__ */ g(u, { className: `size-5 flex-shrink-0 mt-0.5 ${N || L || z ? "text-status-warning-text" : "text-status-error-text"}` }), /* @__PURE__ */ _("div", {
375
386
  className: "flex-1",
376
387
  children: [
377
- /* @__PURE__ */ _("p", {
378
- className: `text-sm ${P || R || B ? "text-status-warning-text" : "text-status-error-text"}`,
379
- children: We ? b("auth.login.accountDeleted", "This account has been permanently deleted and cannot be recovered.") : Ge ? b("auth.login.accountSuspended", "Your account has been suspended. Please contact support for assistance.") : P ? b("auth.login.accountDeactivated", "Your account has been deactivated.") : R ? b("auth.login.oauthOnly", "This account uses OAuth sign-in. Please use Google or Microsoft to sign in.") : B ? b("auth.login.emailNotVerified", "Please verify your email before signing in. Check your inbox for the verification link.") : E
388
+ /* @__PURE__ */ g("p", {
389
+ className: `text-sm ${N || L || z ? "text-status-warning-text" : "text-status-error-text"}`,
390
+ children: Je ? x("auth.login.accountDeleted", "This account has been permanently deleted and cannot be recovered.") : Ye ? x("auth.login.accountSuspended", "Your account has been suspended. Please contact support for assistance.") : N ? x("auth.login.accountDeactivated", "Your account has been deactivated.") : L ? x("auth.login.oauthOnly", "This account uses OAuth sign-in. Please use Google or Microsoft to sign in.") : z ? x("auth.login.emailNotVerified", "Please verify your email before signing in. Check your inbox for the verification link.") : w
380
391
  }),
381
- P && /* @__PURE__ */ _("button", {
392
+ N && /* @__PURE__ */ g("button", {
382
393
  type: "button",
383
- onClick: () => S("/auth/reactivate", { state: { email: G.email } }),
394
+ onClick: () => S("/auth/reactivate", { state: { email: W.email } }),
384
395
  className: "mt-2 text-sm font-semibold text-status-warning-text hover:text-status-warning-text underline underline-offset-2",
385
- children: b("auth.login.clickReactivate", "Click here to reactivate your account")
396
+ children: x("auth.login.clickReactivate", "Click here to reactivate your account")
386
397
  }),
387
- B && /* @__PURE__ */ _("div", {
398
+ z && /* @__PURE__ */ g("div", {
388
399
  className: "mt-3",
389
- children: Je ? /* @__PURE__ */ v("div", {
400
+ children: Qe ? /* @__PURE__ */ _("div", {
390
401
  className: "flex items-center gap-2 text-sm text-status-success-text",
391
- children: [/* @__PURE__ */ _("svg", {
402
+ children: [/* @__PURE__ */ g("svg", {
392
403
  className: "size-4",
393
404
  fill: "none",
394
405
  viewBox: "0 0 24 24",
395
406
  stroke: "currentColor",
396
- children: /* @__PURE__ */ _("path", {
407
+ children: /* @__PURE__ */ g("path", {
397
408
  strokeLinecap: "round",
398
409
  strokeLinejoin: "round",
399
410
  strokeWidth: 2,
400
411
  d: "M5 13l4 4L19 7"
401
412
  })
402
- }), b("auth.login.verificationSent", "Verification email sent! Please check your inbox.")]
403
- }) : /* @__PURE__ */ _("button", {
413
+ }), x("auth.login.verificationSent", "Verification email sent! Please check your inbox.")]
414
+ }) : /* @__PURE__ */ g("button", {
404
415
  type: "button",
405
- onClick: nt,
406
- disabled: Ke,
416
+ onClick: ot,
417
+ disabled: Xe,
407
418
  className: "inline-flex items-center gap-2 px-4 py-2.5 rounded-xl border border-status-warning-border bg-bg-surface text-status-warning-text text-sm font-medium hover:bg-status-warning-bg-subtle hover:border-status-warning-border transition-all shadow-sm disabled:opacity-50 disabled:cursor-not-allowed",
408
- children: Ke ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(f, { className: "size-4 animate-spin" }), b("auth.login.sending", "Sending...")] }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("svg", {
419
+ children: Xe ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(f, { className: "size-4 animate-spin" }), x("auth.login.sending", "Sending...")] }) : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("svg", {
409
420
  className: "size-4",
410
421
  fill: "none",
411
422
  viewBox: "0 0 24 24",
412
423
  stroke: "currentColor",
413
- children: /* @__PURE__ */ _("path", {
424
+ children: /* @__PURE__ */ g("path", {
414
425
  strokeLinecap: "round",
415
426
  strokeLinejoin: "round",
416
427
  strokeWidth: 2,
417
428
  d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
418
429
  })
419
- }), b("auth.login.resendVerification", "Resend verification email")] })
430
+ }), x("auth.login.resendVerification", "Resend verification email")] })
420
431
  })
421
432
  }),
422
- R && /* @__PURE__ */ v("div", {
433
+ L && /* @__PURE__ */ _("div", {
423
434
  className: "mt-3 flex flex-col gap-2",
424
- children: [k("google") && /* @__PURE__ */ v("button", {
435
+ children: [E("google") && /* @__PURE__ */ _("button", {
425
436
  type: "button",
426
- onClick: et,
437
+ onClick: it,
427
438
  className: "inline-flex items-center justify-center gap-2 px-4 py-2.5 rounded-xl border border-border-default bg-bg-surface text-text-primary text-sm font-medium hover:bg-bg-canvas hover:border-border-default transition-all shadow-sm",
428
- children: [/* @__PURE__ */ _(u, { className: "size-5" }), b("auth.login.signInWithGoogle", "Sign in with Google")]
429
- }), k("microsoft") && /* @__PURE__ */ v("button", {
439
+ children: [/* @__PURE__ */ g(re, { className: "size-5" }), x("auth.login.signInWithGoogle", "Sign in with Google")]
440
+ }), E("microsoft") && /* @__PURE__ */ _("button", {
430
441
  type: "button",
431
- onClick: tt,
442
+ onClick: at,
432
443
  className: "inline-flex items-center justify-center gap-2 px-4 py-2.5 rounded-xl border border-border-default bg-bg-surface text-text-primary text-sm font-medium hover:bg-bg-canvas hover:border-border-default transition-all shadow-sm",
433
- children: [/* @__PURE__ */ _(d, { className: "size-5" }), b("auth.login.signInWithMicrosoft", "Sign in with Microsoft")]
444
+ children: [/* @__PURE__ */ g(d, { className: "size-5" }), x("auth.login.signInWithMicrosoft", "Sign in with Microsoft")]
434
445
  })]
435
446
  })
436
447
  ]
437
448
  })]
438
449
  }),
439
- /* @__PURE__ */ v("div", {
450
+ /* @__PURE__ */ _("div", {
440
451
  className: "space-y-2",
441
- children: [/* @__PURE__ */ _("label", {
452
+ children: [/* @__PURE__ */ g("label", {
442
453
  htmlFor: "email",
443
454
  className: "block text-sm font-medium text-[var(--color-text-primary)]",
444
- children: b("auth.login.emailLabel", "Email")
445
- }), /* @__PURE__ */ v("div", {
455
+ children: x("auth.login.emailLabel", "Email")
456
+ }), /* @__PURE__ */ _("div", {
446
457
  className: "relative",
447
- children: [/* @__PURE__ */ _("div", {
458
+ children: [/* @__PURE__ */ g("div", {
448
459
  className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
449
- children: /* @__PURE__ */ _(l, { className: "size-5 text-[var(--color-text-tertiary)]" })
450
- }), /* @__PURE__ */ _("input", {
460
+ children: /* @__PURE__ */ g(ee, { className: "size-5 text-[var(--color-text-tertiary)]" })
461
+ }), /* @__PURE__ */ g("input", {
451
462
  id: "email",
452
463
  type: "email",
453
464
  autoComplete: "email",
454
465
  required: !0,
455
466
  "aria-required": "true",
456
- "aria-label": b("auth.login.emailLabel", "Email"),
457
- value: G.email,
458
- onChange: (e) => K({
459
- ...G,
467
+ "aria-label": x("auth.login.emailLabel", "Email"),
468
+ value: W.email,
469
+ onChange: (e) => G({
470
+ ...W,
460
471
  email: e.target.value
461
472
  }),
462
473
  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",
463
- placeholder: b("auth.login.emailPlaceholder", "you@example.com")
474
+ placeholder: x("auth.login.emailPlaceholder", "you@example.com")
464
475
  })]
465
476
  })]
466
477
  }),
467
- /* @__PURE__ */ v("div", {
478
+ /* @__PURE__ */ _("div", {
468
479
  className: "space-y-2",
469
- children: [/* @__PURE__ */ _("label", {
480
+ children: [/* @__PURE__ */ g("label", {
470
481
  htmlFor: "password",
471
482
  className: "block text-sm font-medium text-[var(--color-text-primary)]",
472
- children: b("auth.login.passwordLabel", "Password")
473
- }), /* @__PURE__ */ v("div", {
483
+ children: x("auth.login.passwordLabel", "Password")
484
+ }), /* @__PURE__ */ _("div", {
474
485
  className: "relative",
475
486
  children: [
476
- /* @__PURE__ */ _("div", {
487
+ /* @__PURE__ */ g("div", {
477
488
  className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
478
- children: /* @__PURE__ */ _(ne, { className: "size-5 text-[var(--color-text-tertiary)]" })
489
+ children: /* @__PURE__ */ g(ie, { className: "size-5 text-[var(--color-text-tertiary)]" })
479
490
  }),
480
- /* @__PURE__ */ _("input", {
491
+ /* @__PURE__ */ g("input", {
481
492
  id: "password",
482
- type: N ? "text" : "password",
493
+ type: M ? "text" : "password",
483
494
  autoComplete: "current-password",
484
495
  required: !0,
485
496
  "aria-required": "true",
486
- "aria-label": b("auth.login.passwordLabel", "Password"),
487
- value: G.password,
488
- onChange: (e) => K({
489
- ...G,
497
+ "aria-label": x("auth.login.passwordLabel", "Password"),
498
+ value: W.password,
499
+ onChange: (e) => G({
500
+ ...W,
490
501
  password: e.target.value
491
502
  }),
492
503
  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",
493
- placeholder: b("auth.login.passwordPlaceholder", "Enter your password")
504
+ placeholder: x("auth.login.passwordPlaceholder", "Enter your password")
494
505
  }),
495
- /* @__PURE__ */ _("button", {
506
+ /* @__PURE__ */ g("button", {
496
507
  type: "button",
497
- onClick: () => Ue(!N),
498
- "aria-label": N ? b("auth.login.hidePassword", "Hide password") : b("auth.login.showPassword", "Show password"),
508
+ onClick: () => qe(!M),
509
+ "aria-label": M ? x("auth.login.hidePassword", "Hide password") : x("auth.login.showPassword", "Show password"),
499
510
  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",
500
- children: _(N ? te : ee, { className: "size-5" })
511
+ children: g(M ? ne : te, { className: "size-5" })
501
512
  })
502
513
  ]
503
514
  })]
504
515
  }),
505
- /* @__PURE__ */ v("div", {
516
+ /* @__PURE__ */ _("div", {
506
517
  className: "flex items-center justify-between",
507
- children: [/* @__PURE__ */ v("label", {
518
+ children: [/* @__PURE__ */ _("label", {
508
519
  htmlFor: "remember-me",
509
520
  className: "flex items-center gap-2 cursor-pointer group",
510
- children: [/* @__PURE__ */ _(be, {
521
+ children: [/* @__PURE__ */ g(Ce, {
511
522
  id: "remember-me",
512
- checked: G.rememberMe,
523
+ checked: W.rememberMe,
513
524
  onCheckedChange: (e) => {
514
525
  let t = e === !0;
515
- if (K({
516
- ...G,
526
+ if (G({
527
+ ...W,
517
528
  rememberMe: t
518
529
  }), !t) try {
519
530
  localStorage.removeItem("remembered_email");
@@ -521,89 +532,89 @@ function S() {
521
532
  console.warn("[LoginPage] Failed to clear remembered email:", e);
522
533
  }
523
534
  },
524
- "aria-label": b("auth.login.rememberMe", "Remember me")
525
- }), /* @__PURE__ */ _("span", {
535
+ "aria-label": x("auth.login.rememberMe", "Remember me")
536
+ }), /* @__PURE__ */ g("span", {
526
537
  className: "text-sm text-[var(--color-text-secondary)] group-hover:text-[var(--color-text-primary)] transition-colors",
527
- children: b("auth.login.rememberMe", "Remember me")
538
+ children: x("auth.login.rememberMe", "Remember me")
528
539
  })]
529
- }), /* @__PURE__ */ _("button", {
540
+ }), /* @__PURE__ */ g("button", {
530
541
  type: "button",
531
542
  onClick: () => S("/auth/reset-password"),
532
543
  className: "text-sm font-medium text-text-link hover:text-text-linkHover transition-colors",
533
- children: b("auth.login.forgotPassword", "Forgot password?")
544
+ children: x("auth.login.forgotPassword", "Forgot password?")
534
545
  })]
535
546
  }),
536
- /* @__PURE__ */ _(ye, {
547
+ /* @__PURE__ */ g(Se, {
537
548
  type: "submit",
538
- disabled: T || A,
549
+ disabled: Pe || D,
539
550
  variant: "default",
540
551
  size: "lg",
541
552
  className: "w-full font-semibold",
542
- children: T || A ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(f, { className: "size-5 animate-spin" }), /* @__PURE__ */ _("span", { children: A ? b("auth.login.settingUpWorkspace", "Setting up workspace...") : b("auth.login.signingIn", "Signing in...") })] }) : b("auth.login.signIn", "Sign in")
553
+ children: Pe || D ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(f, { className: "size-5 animate-spin" }), /* @__PURE__ */ g("span", { children: D ? x("auth.login.settingUpWorkspace", "Setting up workspace...") : x("auth.login.signingIn", "Signing in...") })] }) : x("auth.login.signIn", "Sign in")
543
554
  })
544
555
  ]
545
556
  }),
546
- /* @__PURE__ */ v("div", {
557
+ /* @__PURE__ */ _("div", {
547
558
  className: "relative my-8",
548
- children: [/* @__PURE__ */ _("div", {
559
+ children: [/* @__PURE__ */ g("div", {
549
560
  className: "absolute inset-0 flex items-center",
550
- children: /* @__PURE__ */ _("div", { className: "w-full border-t border-[var(--color-border-default)]" })
551
- }), /* @__PURE__ */ _("div", {
561
+ children: /* @__PURE__ */ g("div", { className: "w-full border-t border-[var(--color-border-default)]" })
562
+ }), /* @__PURE__ */ g("div", {
552
563
  className: "relative flex justify-center",
553
- children: /* @__PURE__ */ _("span", {
564
+ children: /* @__PURE__ */ g("span", {
554
565
  className: "px-4 bg-[var(--color-bg-canvas)] text-sm text-[var(--color-text-tertiary)]",
555
- children: b("auth.login.orContinueWith", "or continue with")
566
+ children: x("auth.login.orContinueWith", "or continue with")
556
567
  })
557
568
  })]
558
569
  }),
559
- Ye && /* @__PURE__ */ v("div", {
570
+ $e && /* @__PURE__ */ _("div", {
560
571
  className: "flex items-start gap-3 p-4 rounded-xl border bg-status-error-bg-subtle border-status-error-border",
561
- children: [/* @__PURE__ */ _(c, { className: "size-5 flex-shrink-0 mt-0.5 text-status-error-text" }), /* @__PURE__ */ _("p", {
572
+ children: [/* @__PURE__ */ g(u, { className: "size-5 flex-shrink-0 mt-0.5 text-status-error-text" }), /* @__PURE__ */ g("p", {
562
573
  className: "text-sm text-status-error-text",
563
- children: Ye
574
+ children: $e
564
575
  })]
565
576
  }),
566
- /* @__PURE__ */ _("div", {
577
+ /* @__PURE__ */ g("div", {
567
578
  className: "grid grid-cols-3 gap-3",
568
- children: at.map((e) => /* @__PURE__ */ v("button", {
579
+ children: ct.map((e) => /* @__PURE__ */ _("button", {
569
580
  type: "button",
570
581
  onClick: e.onClick,
571
582
  disabled: e.disabled,
572
583
  title: e.tooltip,
573
584
  "aria-label": e.name,
574
585
  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)]"}`,
575
- children: [/* @__PURE__ */ _(e.icon, { className: `size-5 ${e.disabled ? "opacity-50" : ""}` }), /* @__PURE__ */ _("span", {
586
+ children: [/* @__PURE__ */ g(e.icon, { className: `size-5 ${e.disabled ? "opacity-50" : ""}` }), /* @__PURE__ */ g("span", {
576
587
  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)]"}`,
577
588
  children: e.name
578
589
  })]
579
590
  }, e.name))
580
591
  }),
581
- /* @__PURE__ */ _("div", {
592
+ /* @__PURE__ */ g("div", {
582
593
  className: "mt-4 text-center",
583
- children: /* @__PURE__ */ v("button", {
594
+ children: /* @__PURE__ */ _("button", {
584
595
  type: "button",
585
596
  onClick: () => S("/auth/magic-link"),
586
597
  className: "text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] transition-colors",
587
598
  children: [
588
- b("auth.login.preferPasswordless", "Prefer passwordless login?"),
599
+ x("auth.login.preferPasswordless", "Prefer passwordless login?"),
589
600
  " ",
590
- /* @__PURE__ */ _("span", {
601
+ /* @__PURE__ */ g("span", {
591
602
  className: "font-semibold text-text-link hover:text-text-linkHover",
592
- children: b("auth.login.signInMagicLink", "Sign in with Magic Link")
603
+ children: x("auth.login.signInMagicLink", "Sign in with Magic Link")
593
604
  })
594
605
  ]
595
606
  })
596
607
  }),
597
- /* @__PURE__ */ v("p", {
608
+ /* @__PURE__ */ _("p", {
598
609
  className: "mt-6 text-center text-sm text-[var(--color-text-secondary)]",
599
610
  children: [
600
- b("auth.login.dontHaveAccount", "Don't have an account?"),
611
+ x("auth.login.dontHaveAccount", "Don't have an account?"),
601
612
  " ",
602
- /* @__PURE__ */ _("button", {
613
+ /* @__PURE__ */ g("button", {
603
614
  type: "button",
604
615
  onClick: () => S("/auth/register"),
605
616
  className: "font-semibold text-text-link hover:text-text-linkHover transition-colors",
606
- children: b("auth.login.signUp", "Sign up")
617
+ children: x("auth.login.signUp", "Sign up")
607
618
  })
608
619
  ]
609
620
  })