@burdenoff/microfe-auth 2026.830.1 → 2026.904.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.
Files changed (66) hide show
  1. package/dist/auth/AuthRoot.js +43 -41
  2. package/dist/auth/AuthRoot.js.map +1 -1
  3. package/dist/auth/AuthRoutes.js +7 -0
  4. package/dist/auth/AuthRoutes.js.map +1 -1
  5. package/dist/auth/components/AuthLayout.js +65 -67
  6. package/dist/auth/components/AuthLayout.js.map +1 -1
  7. package/dist/auth/components/CaptchaV2.js +21 -24
  8. package/dist/auth/components/CaptchaV2.js.map +1 -1
  9. package/dist/auth/components/ConfirmActionDialog.js +33 -32
  10. package/dist/auth/components/ConfirmActionDialog.js.map +1 -1
  11. package/dist/auth/components/profile/UserProfileMenu.js +44 -46
  12. package/dist/auth/components/profile/UserProfileMenu.js.map +1 -1
  13. package/dist/auth/components/workspace/WorkspaceSelector.js +62 -68
  14. package/dist/auth/components/workspace/WorkspaceSelector.js.map +1 -1
  15. package/dist/auth/pages/AuditLogPage.js +65 -68
  16. package/dist/auth/pages/AuditLogPage.js.map +1 -1
  17. package/dist/auth/pages/EmailVerifyPage.js +51 -54
  18. package/dist/auth/pages/EmailVerifyPage.js.map +1 -1
  19. package/dist/auth/pages/LoginPage.js +223 -225
  20. package/dist/auth/pages/LoginPage.js.map +1 -1
  21. package/dist/auth/pages/MagicLinkPage.js +67 -69
  22. package/dist/auth/pages/MagicLinkPage.js.map +1 -1
  23. package/dist/auth/pages/MfaSetupPage.js +85 -88
  24. package/dist/auth/pages/MfaSetupPage.js.map +1 -1
  25. package/dist/auth/pages/MfaVerifyPage.js +60 -63
  26. package/dist/auth/pages/MfaVerifyPage.js.map +1 -1
  27. package/dist/auth/pages/OAuthCallbackPage.js +37 -40
  28. package/dist/auth/pages/OAuthCallbackPage.js.map +1 -1
  29. package/dist/auth/pages/PasswordResetPage.js +102 -105
  30. package/dist/auth/pages/PasswordResetPage.js.map +1 -1
  31. package/dist/auth/pages/ReactivatePage.js +54 -57
  32. package/dist/auth/pages/ReactivatePage.js.map +1 -1
  33. package/dist/auth/pages/RegisterPage.js +171 -174
  34. package/dist/auth/pages/RegisterPage.js.map +1 -1
  35. package/dist/auth/pages/SSOClearPage.js +21 -20
  36. package/dist/auth/pages/SSOClearPage.js.map +1 -1
  37. package/dist/auth/pages/SSODepositPage.js +27 -26
  38. package/dist/auth/pages/SSODepositPage.js.map +1 -1
  39. package/dist/auth/pages/SSORelayCallbackPage.js +19 -18
  40. package/dist/auth/pages/SSORelayCallbackPage.js.map +1 -1
  41. package/dist/auth/pages/SecurityPage.js +247 -250
  42. package/dist/auth/pages/SecurityPage.js.map +1 -1
  43. package/dist/auth/pages/SessionsPage.js +95 -98
  44. package/dist/auth/pages/SessionsPage.js.map +1 -1
  45. package/dist/auth/pages/SsoCallbackPage.js +53 -56
  46. package/dist/auth/pages/SsoCallbackPage.js.map +1 -1
  47. package/dist/auth/pages/SsoConfigPage.js +296 -299
  48. package/dist/auth/pages/SsoConfigPage.js.map +1 -1
  49. package/dist/auth/pages/SsoLoginPage.js +65 -68
  50. package/dist/auth/pages/SsoLoginPage.js.map +1 -1
  51. package/dist/auth/pages/UserDetailsPage.js +124 -127
  52. package/dist/auth/pages/UserDetailsPage.js.map +1 -1
  53. package/dist/auth/pages/UserProfilePage.js +171 -174
  54. package/dist/auth/pages/UserProfilePage.js.map +1 -1
  55. package/dist/auth/pages/UsersPage.js +322 -325
  56. package/dist/auth/pages/UsersPage.js.map +1 -1
  57. package/dist/index.d.ts +1 -0
  58. package/dist/index.js +2 -1
  59. package/dist/shared/hooks/index.d.ts +1 -6
  60. package/dist/shared/hooks/useTr.d.ts +16 -0
  61. package/dist/shared/hooks/useTr.js +14 -0
  62. package/dist/shared/hooks/useTr.js.map +1 -0
  63. package/dist/translations/en.d.ts +806 -248
  64. package/dist/translations/en.js +870 -0
  65. package/dist/translations/en.js.map +1 -0
  66. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
1
  import { useAuthStore as e } from "../store/authStore.js";
2
- import { AuthLayout as t } from "../components/AuthLayout.js";
3
- import { AlertIcon as n, CheckIcon as r, EmailIcon as i, SpinnerIcon as a, UserIcon as o } from "../components/AuthIcons.js";
4
- import { useUserOperations as s } from "../hooks/useUserOperations.js";
5
- import { useCompleteAvatarUploadMutation as c, useInitiateAvatarUploadMutation as l } from "../../generated/wspace-operations.js";
6
- import { useEffect as u, useId as d, useRef as f, useState as p } from "react";
7
- import { useNavigate as m } from "react-router";
8
- import { useI18n as h } from "@burdenoff/fe-libs/shared/providers/shell";
2
+ import { useTr as t } from "../../shared/hooks/useTr.js";
3
+ import { AuthLayout as n } from "../components/AuthLayout.js";
4
+ import { AlertIcon as r, CheckIcon as i, EmailIcon as a, SpinnerIcon as o, UserIcon as s } from "../components/AuthIcons.js";
5
+ import { useUserOperations as c } from "../hooks/useUserOperations.js";
6
+ import { useCompleteAvatarUploadMutation as l, useInitiateAvatarUploadMutation as u } from "../../generated/wspace-operations.js";
7
+ import { useEffect as d, useId as f, useRef as p, useState as m } from "react";
8
+ import { useNavigate as h } from "react-router";
9
9
  import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
10
10
  import { Button as y } from "@burdenoff/fe-libs/button";
11
11
  import { NextSteps as b, PagePurpose as x } from "@burdenoff/fe-libs/ui";
@@ -13,24 +13,21 @@ import { useGatewayClient as S } from "@burdenoff/fe-libs/shared/graphql";
13
13
  import { useAuth as C } from "@burdenoff/fe-libs/shared/providers/shell/AuthProvider";
14
14
  //#region src/auth/pages/UserProfilePage.tsx
15
15
  function w() {
16
- let { t: w } = h(), T = (e, t) => {
17
- let n = w(e);
18
- return n === e ? t : n;
19
- }, E = m(), D = C(), O = e((e) => e.isAuthenticated), k = e((e) => e.user), A = e((e) => e.setUser), { updateCurrentUserProfile: j, isLoading: M } = s(), N = d(), P = d(), F = d(), I = d(), L = d(), R = e((e) => e.currentWorkspaceId), z = S("workspace"), [B] = l({ client: z }), [V] = c({ client: z }), H = f(null), [U, W] = p(!1), G = async (e) => {
16
+ let w = t(), T = h(), E = C(), D = e((e) => e.isAuthenticated), O = e((e) => e.user), k = e((e) => e.setUser), { updateCurrentUserProfile: A, isLoading: j } = c(), M = f(), N = f(), P = f(), F = f(), I = f(), L = e((e) => e.currentWorkspaceId), R = S("workspace"), [z] = u({ client: R }), [B] = l({ client: R }), V = p(null), [H, U] = m(!1), W = async (e) => {
20
17
  let t = e.target.files?.[0];
21
18
  if (!t) return;
22
19
  if (!t.type.startsWith("image/")) {
23
- Z(T("auth.profile.invalidImageType", "Please select an image file"));
20
+ X(w("auth.profile.invalidImageType", "Please select an image file"));
24
21
  return;
25
22
  }
26
- if (!R) {
27
- Z(T("auth.profile.noWorkspace", "Please select a workspace before uploading a profile picture"));
23
+ if (!L) {
24
+ X(w("auth.profile.noWorkspace", "Please select a workspace before uploading a profile picture"));
28
25
  return;
29
26
  }
30
- W(!0), Z(null);
31
- let n = { "x-workspace-id": R };
27
+ U(!0), X(null);
28
+ let n = { "x-workspace-id": L };
32
29
  try {
33
- let e = t.name.split(".").pop()?.toLowerCase() ?? "", r = await B({
30
+ let e = t.name.split(".").pop()?.toLowerCase() ?? "", r = await z({
34
31
  variables: { input: {
35
32
  fileName: t.name,
36
33
  fileSize: t.size.toString(),
@@ -45,60 +42,60 @@ function w() {
45
42
  headers: { "Content-Type": t.type },
46
43
  body: t
47
44
  })).ok) throw Error("Failed to upload file");
48
- let o = (await V({
45
+ let o = (await B({
49
46
  variables: { input: { sessionId: i.id } },
50
47
  context: { headers: n }
51
48
  })).data?.completeUpload.file?.downloadUrl;
52
49
  if (!o) throw Error("Upload succeeded but no URL returned");
53
- await j({ avatar: o }), k && A({
54
- ...k,
50
+ await A({ avatar: o }), O && k({
51
+ ...O,
55
52
  avatar: o
56
- }), D.updateUser({ avatar: o }), $(T("auth.profile.avatarUpdated", "Profile picture updated!"));
53
+ }), E.updateUser({ avatar: o }), Q(w("auth.profile.avatarUpdated", "Profile picture updated!"));
57
54
  } catch (e) {
58
- Z(e instanceof Error ? e.message : T("auth.profile.avatarFailed", "Failed to upload picture"));
55
+ X(e instanceof Error ? e.message : w("auth.profile.avatarFailed", "Failed to upload picture"));
59
56
  } finally {
60
- W(!1), H.current && (H.current.value = "");
57
+ U(!1), V.current && (V.current.value = "");
61
58
  }
62
- }, [K, q] = p(!1), [J, Y] = p({
59
+ }, [G, K] = m(!1), [q, J] = m({
63
60
  username: "",
64
61
  firstName: "",
65
62
  lastName: "",
66
63
  name: "",
67
64
  phoneNumber: ""
68
- }), [X, Z] = p(null), [Q, $] = p(null);
69
- return u(() => {
70
- k && Y({
71
- username: k.username || "",
72
- firstName: k.firstName || "",
73
- lastName: k.lastName || "",
74
- name: k.name || "",
75
- phoneNumber: k.phoneNumber || ""
65
+ }), [Y, X] = m(null), [Z, Q] = m(null);
66
+ return d(() => {
67
+ O && J({
68
+ username: O.username || "",
69
+ firstName: O.firstName || "",
70
+ lastName: O.lastName || "",
71
+ name: O.name || "",
72
+ phoneNumber: O.phoneNumber || ""
76
73
  });
77
- }, [k]), !O || !k ? /* @__PURE__ */ _(t, {
78
- title: T("auth.profile.title", "Profile"),
79
- subtitle: T("auth.profile.subtitle", "View and manage your profile"),
74
+ }, [O]), !D || !O ? /* @__PURE__ */ _(n, {
75
+ title: w("auth.profile.title", "Profile"),
76
+ subtitle: w("auth.profile.subtitle", "View and manage your profile"),
80
77
  children: /* @__PURE__ */ v("div", {
81
78
  className: "text-center py-12",
82
79
  children: [
83
80
  /* @__PURE__ */ _("div", {
84
81
  className: "size-16 mx-auto mb-4 rounded-full bg-[var(--color-status-warning-bg-subtle)] flex items-center justify-center",
85
- children: /* @__PURE__ */ _(n, { className: "size-8 text-[var(--color-status-warning-text)]" })
82
+ children: /* @__PURE__ */ _(r, { className: "size-8 text-[var(--color-status-warning-text)]" })
86
83
  }),
87
84
  /* @__PURE__ */ _("h2", {
88
85
  className: "text-xl font-semibold text-[var(--color-text-primary)] mb-2",
89
- children: T("auth.profile.authRequired", "Authentication Required")
86
+ children: w("auth.profile.authRequired", "Authentication Required")
90
87
  }),
91
88
  /* @__PURE__ */ _("p", {
92
89
  className: "text-[var(--color-text-secondary)] mb-6",
93
- children: T("auth.profile.signInToView", "Please sign in to view your profile")
90
+ children: w("auth.profile.signInToView", "Please sign in to view your profile")
94
91
  }),
95
92
  /* @__PURE__ */ _(y, {
96
93
  type: "button",
97
- onClick: () => E("/auth/login"),
94
+ onClick: () => T("/auth/login"),
98
95
  variant: "default",
99
96
  size: "lg",
100
97
  className: "font-semibold",
101
- children: T("auth.profile.signIn", "Sign In")
98
+ children: w("auth.profile.signIn", "Sign In")
102
99
  })
103
100
  ]
104
101
  })
@@ -110,50 +107,50 @@ function w() {
110
107
  children: [
111
108
  /* @__PURE__ */ _("h1", {
112
109
  className: "text-3xl font-semibold text-[var(--color-text-primary)]",
113
- children: T("auth.profile.myProfile", "My Profile")
110
+ children: w("auth.profile.myProfile", "My Profile")
114
111
  }),
115
112
  /* @__PURE__ */ _("p", {
116
113
  className: "text-[var(--color-text-secondary)] mt-2",
117
- children: T("auth.profile.viewAndManage", "View and manage your account information")
114
+ children: w("auth.profile.viewAndManage", "View and manage your account information")
118
115
  }),
119
116
  /* @__PURE__ */ _(x, {
120
117
  className: "mt-3",
121
- children: T("auth.profile.purpose", "This is how you appear across the platform. Update your name, photo, and contact details here — teammates see this information, and we use your email for sign-in and important notices.")
118
+ children: w("auth.profile.purpose", "This is how you appear across the platform. Update your name, photo, and contact details here — teammates see this information, and we use your email for sign-in and important notices.")
122
119
  })
123
120
  ]
124
121
  }),
125
- Q && /* @__PURE__ */ v("div", {
122
+ Z && /* @__PURE__ */ v("div", {
126
123
  className: "mb-6 flex items-center gap-3 p-4 rounded-xl bg-[var(--color-status-success-bg-subtle)] border border-[var(--color-status-success-border)]",
127
124
  children: [
128
- /* @__PURE__ */ _(r, { className: "size-5 text-[var(--color-status-success-text)] flex-shrink-0" }),
125
+ /* @__PURE__ */ _(i, { className: "size-5 text-[var(--color-status-success-text)] flex-shrink-0" }),
129
126
  /* @__PURE__ */ _("p", {
130
127
  className: "text-[var(--color-status-success-text)]",
131
- children: Q
128
+ children: Z
132
129
  }),
133
130
  /* @__PURE__ */ _("button", {
134
131
  type: "button",
135
- onClick: () => $(null),
132
+ onClick: () => Q(null),
136
133
  className: "ml-auto text-sm text-[var(--color-status-success-text)] hover:underline transition-colors duration-200",
137
- children: T("auth.profile.dismiss", "Dismiss")
134
+ children: w("auth.profile.dismiss", "Dismiss")
138
135
  })
139
136
  ]
140
137
  }),
141
- X && /* @__PURE__ */ v("div", {
138
+ Y && /* @__PURE__ */ v("div", {
142
139
  className: "mb-6 flex items-start gap-3 p-4 rounded-xl bg-[var(--color-status-error-bg-subtle)] border border-[var(--color-status-error-border)]",
143
140
  children: [
144
- /* @__PURE__ */ _(n, { className: "size-5 text-[var(--color-status-error-text)] flex-shrink-0 mt-0.5" }),
141
+ /* @__PURE__ */ _(r, { className: "size-5 text-[var(--color-status-error-text)] flex-shrink-0 mt-0.5" }),
145
142
  /* @__PURE__ */ _("div", {
146
143
  className: "flex-1",
147
144
  children: /* @__PURE__ */ _("p", {
148
145
  className: "text-sm text-[var(--color-status-error-text)]",
149
- children: X
146
+ children: Y
150
147
  })
151
148
  }),
152
149
  /* @__PURE__ */ _("button", {
153
150
  type: "button",
154
- onClick: () => Z(null),
151
+ onClick: () => X(null),
155
152
  className: "text-sm text-[var(--color-status-error-text)] hover:underline transition-colors duration-200",
156
- children: T("auth.profile.dismiss", "Dismiss")
153
+ children: w("auth.profile.dismiss", "Dismiss")
157
154
  })
158
155
  ]
159
156
  }),
@@ -166,21 +163,21 @@ function w() {
166
163
  children: [/* @__PURE__ */ v("div", {
167
164
  className: "relative group",
168
165
  children: [
169
- k.avatar ? /* @__PURE__ */ _("img", {
170
- src: k.avatar,
171
- alt: T("auth.profile.avatarAlt", "Profile picture"),
166
+ O.avatar ? /* @__PURE__ */ _("img", {
167
+ src: O.avatar,
168
+ alt: w("auth.profile.avatarAlt", "Profile picture"),
172
169
  className: "size-20 rounded-full object-cover shadow-lg"
173
170
  }) : /* @__PURE__ */ _("div", {
174
171
  className: "size-20 rounded-full bg-accent-soft backdrop-blur-sm flex items-center justify-center text-[var(--color-action-primary-bg)] text-3xl font-semibold shadow-lg",
175
- children: (k.name || k.username || k.email).charAt(0).toUpperCase()
172
+ children: (O.name || O.username || O.email).charAt(0).toUpperCase()
176
173
  }),
177
174
  /* @__PURE__ */ _("button", {
178
175
  type: "button",
179
- onClick: () => H.current?.click(),
180
- disabled: U,
181
- "aria-label": T("auth.profile.changeAvatar", "Change profile picture"),
176
+ onClick: () => V.current?.click(),
177
+ disabled: H,
178
+ "aria-label": w("auth.profile.changeAvatar", "Change profile picture"),
182
179
  className: "absolute inset-0 rounded-full flex items-center justify-center bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity duration-200 cursor-pointer",
183
- children: U ? /* @__PURE__ */ _(a, { className: "size-6 text-white animate-spin" }) : /* @__PURE__ */ v("svg", {
180
+ children: H ? /* @__PURE__ */ _(o, { className: "size-6 text-white animate-spin" }) : /* @__PURE__ */ v("svg", {
184
181
  className: "size-6 text-white",
185
182
  fill: "none",
186
183
  viewBox: "0 0 24 24",
@@ -199,13 +196,13 @@ function w() {
199
196
  })
200
197
  }),
201
198
  /* @__PURE__ */ _("input", {
202
- ref: H,
199
+ ref: V,
203
200
  type: "file",
204
201
  accept: "image/*",
205
202
  className: "hidden",
206
- onChange: (e) => void G(e),
203
+ onChange: (e) => void W(e),
207
204
  tabIndex: -1,
208
- "aria-label": T("auth.profile.avatarUpload", "Upload avatar image")
205
+ "aria-label": w("auth.profile.avatarUpload", "Upload avatar image")
209
206
  })
210
207
  ]
211
208
  }), /* @__PURE__ */ v("div", {
@@ -213,20 +210,20 @@ function w() {
213
210
  children: [
214
211
  /* @__PURE__ */ _("h2", {
215
212
  className: "text-2xl font-semibold",
216
- children: k.name || `${k.firstName || ""} ${k.lastName || ""}`.trim() || k.username
213
+ children: O.name || `${O.firstName || ""} ${O.lastName || ""}`.trim() || O.username
217
214
  }),
218
215
  /* @__PURE__ */ v("p", {
219
216
  className: "text-text-secondary flex items-center gap-2",
220
- children: [/* @__PURE__ */ _(i, { className: "size-4" }), k.email]
217
+ children: [/* @__PURE__ */ _(a, { className: "size-4" }), O.email]
221
218
  }),
222
219
  /* @__PURE__ */ v("div", {
223
220
  className: "flex items-center gap-2 mt-2",
224
221
  children: [/* @__PURE__ */ _("span", {
225
222
  className: "px-2.5 py-1 rounded-full text-xs font-medium bg-bg-surface/60 text-text-secondary backdrop-blur-sm",
226
- children: k.role?.replace("_", " ") || T("auth.profile.member", "Member")
227
- }), k.emailVerified && /* @__PURE__ */ v("span", {
223
+ children: O.role?.replace("_", " ") || w("auth.profile.member", "Member")
224
+ }), O.emailVerified && /* @__PURE__ */ v("span", {
228
225
  className: "px-2.5 py-1 rounded-full text-xs font-medium bg-status-success-bg-subtle text-status-success-text flex items-center gap-1",
229
- children: [/* @__PURE__ */ _(r, { className: "size-3" }), T("auth.profile.verified", "Verified")]
226
+ children: [/* @__PURE__ */ _(i, { className: "size-3" }), w("auth.profile.verified", "Verified")]
230
227
  })]
231
228
  })
232
229
  ]
@@ -234,19 +231,19 @@ function w() {
234
231
  })
235
232
  }), /* @__PURE__ */ _("div", {
236
233
  className: "p-6",
237
- children: K ? /* @__PURE__ */ v("form", {
234
+ children: G ? /* @__PURE__ */ v("form", {
238
235
  onSubmit: async (e) => {
239
- e.preventDefault(), Z(null), $(null);
236
+ e.preventDefault(), X(null), Q(null);
240
237
  try {
241
- await j({
242
- username: J.username || void 0,
243
- firstName: J.firstName || void 0,
244
- lastName: J.lastName || void 0,
245
- name: J.name || void 0,
246
- phoneNumber: J.phoneNumber || void 0
247
- }), $(T("auth.profile.updateSuccess", "Profile updated successfully!")), q(!1);
238
+ await A({
239
+ username: q.username || void 0,
240
+ firstName: q.firstName || void 0,
241
+ lastName: q.lastName || void 0,
242
+ name: q.name || void 0,
243
+ phoneNumber: q.phoneNumber || void 0
244
+ }), Q(w("auth.profile.updateSuccess", "Profile updated successfully!")), K(!1);
248
245
  } catch (e) {
249
- Z(e instanceof Error ? e.message : T("auth.profile.updateFailed", "Failed to update profile"));
246
+ X(e instanceof Error ? e.message : w("auth.profile.updateFailed", "Failed to update profile"));
250
247
  }
251
248
  },
252
249
  className: "space-y-6",
@@ -254,95 +251,95 @@ function w() {
254
251
  className: "grid grid-cols-1 md:grid-cols-2 gap-6",
255
252
  children: [
256
253
  /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
257
- htmlFor: N,
254
+ htmlFor: M,
258
255
  className: "block text-sm font-medium text-[var(--color-text-primary)] mb-2",
259
- children: T("auth.profile.username", "Username")
256
+ children: w("auth.profile.username", "Username")
260
257
  }), /* @__PURE__ */ v("div", {
261
258
  className: "relative",
262
259
  children: [/* @__PURE__ */ _("div", {
263
260
  className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
264
- children: /* @__PURE__ */ _(o, {
261
+ children: /* @__PURE__ */ _(s, {
265
262
  className: "size-5 text-[var(--color-text-tertiary)]",
266
263
  "aria-hidden": "true"
267
264
  })
268
265
  }), /* @__PURE__ */ _("input", {
269
- id: N,
266
+ id: M,
270
267
  type: "text",
271
- "aria-label": T("auth.profile.username", "Username"),
272
- value: J.username,
273
- onChange: (e) => Y({
274
- ...J,
268
+ "aria-label": w("auth.profile.username", "Username"),
269
+ value: q.username,
270
+ onChange: (e) => J({
271
+ ...q,
275
272
  username: e.target.value
276
273
  }),
277
274
  className: "block w-full pl-[3.5rem] pr-4 py-3 border border-[var(--color-border-default)] rounded-xl bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all duration-300",
278
- placeholder: T("auth.profile.usernamePlaceholder", "Enter username")
275
+ placeholder: w("auth.profile.usernamePlaceholder", "Enter username")
279
276
  })]
280
277
  })] }),
281
278
  /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
282
- htmlFor: P,
279
+ htmlFor: N,
283
280
  className: "block text-sm font-medium text-[var(--color-text-primary)] mb-2",
284
- children: T("auth.profile.displayName", "Display Name")
281
+ children: w("auth.profile.displayName", "Display Name")
285
282
  }), /* @__PURE__ */ _("input", {
286
- id: P,
283
+ id: N,
287
284
  type: "text",
288
- "aria-label": T("auth.profile.displayName", "Display Name"),
289
- value: J.name,
290
- onChange: (e) => Y({
291
- ...J,
285
+ "aria-label": w("auth.profile.displayName", "Display Name"),
286
+ value: q.name,
287
+ onChange: (e) => J({
288
+ ...q,
292
289
  name: e.target.value
293
290
  }),
294
291
  className: "block w-full px-4 py-3 border border-[var(--color-border-default)] rounded-xl bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all duration-300",
295
- placeholder: T("auth.profile.displayNamePlaceholder", "Enter display name")
292
+ placeholder: w("auth.profile.displayNamePlaceholder", "Enter display name")
296
293
  })] }),
297
294
  /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
298
- htmlFor: F,
295
+ htmlFor: P,
299
296
  className: "block text-sm font-medium text-[var(--color-text-primary)] mb-2",
300
- children: T("auth.profile.firstName", "First Name")
297
+ children: w("auth.profile.firstName", "First Name")
301
298
  }), /* @__PURE__ */ _("input", {
302
- id: F,
299
+ id: P,
303
300
  type: "text",
304
- "aria-label": T("auth.profile.firstName", "First Name"),
305
- value: J.firstName,
306
- onChange: (e) => Y({
307
- ...J,
301
+ "aria-label": w("auth.profile.firstName", "First Name"),
302
+ value: q.firstName,
303
+ onChange: (e) => J({
304
+ ...q,
308
305
  firstName: e.target.value
309
306
  }),
310
307
  className: "block w-full px-4 py-3 border border-[var(--color-border-default)] rounded-xl bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all duration-300",
311
- placeholder: T("auth.profile.firstNamePlaceholder", "Enter first name")
308
+ placeholder: w("auth.profile.firstNamePlaceholder", "Enter first name")
312
309
  })] }),
313
310
  /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
314
- htmlFor: I,
311
+ htmlFor: F,
315
312
  className: "block text-sm font-medium text-[var(--color-text-primary)] mb-2",
316
- children: T("auth.profile.lastName", "Last Name")
313
+ children: w("auth.profile.lastName", "Last Name")
317
314
  }), /* @__PURE__ */ _("input", {
318
- id: I,
315
+ id: F,
319
316
  type: "text",
320
- "aria-label": T("auth.profile.lastName", "Last Name"),
321
- value: J.lastName,
322
- onChange: (e) => Y({
323
- ...J,
317
+ "aria-label": w("auth.profile.lastName", "Last Name"),
318
+ value: q.lastName,
319
+ onChange: (e) => J({
320
+ ...q,
324
321
  lastName: e.target.value
325
322
  }),
326
323
  className: "block w-full px-4 py-3 border border-[var(--color-border-default)] rounded-xl bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all duration-300",
327
- placeholder: T("auth.profile.lastNamePlaceholder", "Enter last name")
324
+ placeholder: w("auth.profile.lastNamePlaceholder", "Enter last name")
328
325
  })] }),
329
326
  /* @__PURE__ */ v("div", {
330
327
  className: "md:col-span-2",
331
328
  children: [/* @__PURE__ */ _("label", {
332
- htmlFor: L,
329
+ htmlFor: I,
333
330
  className: "block text-sm font-medium text-[var(--color-text-primary)] mb-2",
334
- children: T("auth.profile.phoneNumber", "Phone Number")
331
+ children: w("auth.profile.phoneNumber", "Phone Number")
335
332
  }), /* @__PURE__ */ _("input", {
336
- id: L,
333
+ id: I,
337
334
  type: "tel",
338
- "aria-label": T("auth.profile.phoneNumber", "Phone Number"),
339
- value: J.phoneNumber,
340
- onChange: (e) => Y({
341
- ...J,
335
+ "aria-label": w("auth.profile.phoneNumber", "Phone Number"),
336
+ value: q.phoneNumber,
337
+ onChange: (e) => J({
338
+ ...q,
342
339
  phoneNumber: e.target.value
343
340
  }),
344
341
  className: "block w-full px-4 py-3 border border-[var(--color-border-default)] rounded-xl bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all duration-300",
345
- placeholder: T("auth.profile.phonePlaceholder", "Enter phone number")
342
+ placeholder: w("auth.profile.phonePlaceholder", "Enter phone number")
346
343
  })]
347
344
  })
348
345
  ]
@@ -350,24 +347,24 @@ function w() {
350
347
  className: "flex gap-3 pt-4 border-t border-[var(--color-border-default)]",
351
348
  children: [/* @__PURE__ */ _(y, {
352
349
  type: "submit",
353
- disabled: M,
350
+ disabled: j,
354
351
  variant: "default",
355
352
  size: "lg",
356
353
  className: "font-semibold",
357
- children: M ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(a, { className: "size-4 animate-spin" }), T("auth.profile.saving", "Saving...")] }) : T("auth.profile.saveChanges", "Save Changes")
354
+ children: j ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(o, { className: "size-4 animate-spin" }), w("auth.profile.saving", "Saving...")] }) : w("auth.profile.saveChanges", "Save Changes")
358
355
  }), /* @__PURE__ */ _("button", {
359
356
  type: "button",
360
357
  onClick: () => {
361
- k && Y({
362
- username: k.username || "",
363
- firstName: k.firstName || "",
364
- lastName: k.lastName || "",
365
- name: k.name || "",
366
- phoneNumber: k.phoneNumber || ""
367
- }), q(!1), Z(null);
358
+ O && J({
359
+ username: O.username || "",
360
+ firstName: O.firstName || "",
361
+ lastName: O.lastName || "",
362
+ name: O.name || "",
363
+ phoneNumber: O.phoneNumber || ""
364
+ }), K(!1), X(null);
368
365
  },
369
366
  className: "px-6 py-3 rounded-xl border border-[var(--color-border-default)] text-[var(--color-text-secondary)] font-medium hover:bg-[var(--color-bg-muted)] transition-colors duration-200",
370
- children: T("auth.profile.cancel", "Cancel")
367
+ children: w("auth.profile.cancel", "Cancel")
371
368
  })]
372
369
  })]
373
370
  }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("div", {
@@ -377,52 +374,52 @@ function w() {
377
374
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
378
375
  children: [/* @__PURE__ */ _("label", {
379
376
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
380
- children: T("auth.profile.username", "Username")
377
+ children: w("auth.profile.username", "Username")
381
378
  }), /* @__PURE__ */ _("p", {
382
379
  className: "text-[var(--color-text-primary)] font-medium",
383
- children: k.username || "-"
380
+ children: O.username || "-"
384
381
  })]
385
382
  }),
386
383
  /* @__PURE__ */ v("div", {
387
384
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
388
385
  children: [/* @__PURE__ */ _("label", {
389
386
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
390
- children: T("auth.profile.displayName", "Display Name")
387
+ children: w("auth.profile.displayName", "Display Name")
391
388
  }), /* @__PURE__ */ _("p", {
392
389
  className: "text-[var(--color-text-primary)] font-medium",
393
- children: k.name || "-"
390
+ children: O.name || "-"
394
391
  })]
395
392
  }),
396
393
  /* @__PURE__ */ v("div", {
397
394
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
398
395
  children: [/* @__PURE__ */ _("label", {
399
396
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
400
- children: T("auth.profile.firstName", "First Name")
397
+ children: w("auth.profile.firstName", "First Name")
401
398
  }), /* @__PURE__ */ _("p", {
402
399
  className: "text-[var(--color-text-primary)] font-medium",
403
- children: k.firstName || "-"
400
+ children: O.firstName || "-"
404
401
  })]
405
402
  }),
406
403
  /* @__PURE__ */ v("div", {
407
404
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
408
405
  children: [/* @__PURE__ */ _("label", {
409
406
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
410
- children: T("auth.profile.lastName", "Last Name")
407
+ children: w("auth.profile.lastName", "Last Name")
411
408
  }), /* @__PURE__ */ _("p", {
412
409
  className: "text-[var(--color-text-primary)] font-medium",
413
- children: k.lastName || "-"
410
+ children: O.lastName || "-"
414
411
  })]
415
412
  }),
416
413
  /* @__PURE__ */ v("div", {
417
414
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
418
415
  children: [/* @__PURE__ */ _("label", {
419
416
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
420
- children: T("auth.profile.email", "Email")
417
+ children: w("auth.profile.email", "Email")
421
418
  }), /* @__PURE__ */ v("p", {
422
419
  className: "text-[var(--color-text-primary)] font-medium flex items-center gap-2",
423
- children: [k.email, k.emailVerified && /* @__PURE__ */ v("span", {
420
+ children: [O.email, O.emailVerified && /* @__PURE__ */ v("span", {
424
421
  className: "inline-flex items-center gap-1 text-[var(--color-status-success-text)] text-xs",
425
- children: [/* @__PURE__ */ _(r, { className: "size-3" }), T("auth.profile.verified", "Verified")]
422
+ children: [/* @__PURE__ */ _(i, { className: "size-3" }), w("auth.profile.verified", "Verified")]
426
423
  })]
427
424
  })]
428
425
  }),
@@ -430,35 +427,35 @@ function w() {
430
427
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
431
428
  children: [/* @__PURE__ */ _("label", {
432
429
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
433
- children: T("auth.profile.phoneNumber", "Phone Number")
430
+ children: w("auth.profile.phoneNumber", "Phone Number")
434
431
  }), /* @__PURE__ */ _("p", {
435
432
  className: "text-[var(--color-text-primary)] font-medium",
436
- children: k.phoneNumber || "-"
433
+ children: O.phoneNumber || "-"
437
434
  })]
438
435
  }),
439
436
  /* @__PURE__ */ v("div", {
440
437
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
441
438
  children: [/* @__PURE__ */ _("label", {
442
439
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
443
- children: T("auth.profile.role", "Role")
440
+ children: w("auth.profile.role", "Role")
444
441
  }), /* @__PURE__ */ _("p", {
445
442
  className: "text-[var(--color-text-primary)] font-medium",
446
- children: k.role?.replace("_", " ") || T("auth.profile.member", "Member")
443
+ children: O.role?.replace("_", " ") || w("auth.profile.member", "Member")
447
444
  })]
448
445
  }),
449
446
  /* @__PURE__ */ v("div", {
450
447
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
451
448
  children: [/* @__PURE__ */ _("label", {
452
449
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
453
- children: T("auth.profile.mfaStatus", "MFA Status")
450
+ children: w("auth.profile.mfaStatus", "MFA Status")
454
451
  }), /* @__PURE__ */ _("p", {
455
452
  className: "text-[var(--color-text-primary)] font-medium",
456
- children: k.mfaEnabled ? /* @__PURE__ */ v("span", {
453
+ children: O.mfaEnabled ? /* @__PURE__ */ v("span", {
457
454
  className: "text-[var(--color-status-success-text)] flex items-center gap-1",
458
- children: [/* @__PURE__ */ _(r, { className: "size-4" }), T("auth.profile.enabled", "Enabled")]
455
+ children: [/* @__PURE__ */ _(i, { className: "size-4" }), w("auth.profile.enabled", "Enabled")]
459
456
  }) : /* @__PURE__ */ _("span", {
460
457
  className: "text-[var(--color-status-warning-text)]",
461
- children: T("auth.profile.notEnabled", "Not Enabled")
458
+ children: w("auth.profile.notEnabled", "Not Enabled")
462
459
  })
463
460
  })]
464
461
  }),
@@ -466,20 +463,20 @@ function w() {
466
463
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
467
464
  children: [/* @__PURE__ */ _("label", {
468
465
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
469
- children: T("auth.profile.lastLogin", "Last Login")
466
+ children: w("auth.profile.lastLogin", "Last Login")
470
467
  }), /* @__PURE__ */ _("p", {
471
468
  className: "text-[var(--color-text-primary)] font-medium",
472
- children: k.lastLoginAt ? new Date(k.lastLoginAt).toLocaleString() : T("auth.profile.never", "Never")
469
+ children: O.lastLoginAt ? new Date(O.lastLoginAt).toLocaleString() : w("auth.profile.never", "Never")
473
470
  })]
474
471
  }),
475
472
  /* @__PURE__ */ v("div", {
476
473
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
477
474
  children: [/* @__PURE__ */ _("label", {
478
475
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
479
- children: T("auth.profile.accountCreated", "Account Created")
476
+ children: w("auth.profile.accountCreated", "Account Created")
480
477
  }), /* @__PURE__ */ _("p", {
481
478
  className: "text-[var(--color-text-primary)] font-medium",
482
- children: k.createdAt ? new Date(k.createdAt).toLocaleString() : "-"
479
+ children: O.createdAt ? new Date(O.createdAt).toLocaleString() : "-"
483
480
  })]
484
481
  })
485
482
  ]
@@ -487,16 +484,16 @@ function w() {
487
484
  className: "flex gap-3 pt-6 mt-6 border-t border-[var(--color-border-default)]",
488
485
  children: [/* @__PURE__ */ _(y, {
489
486
  type: "button",
490
- onClick: () => q(!0),
487
+ onClick: () => K(!0),
491
488
  variant: "default",
492
489
  size: "lg",
493
490
  className: "font-semibold",
494
- children: T("auth.profile.editProfile", "Edit Profile")
491
+ children: w("auth.profile.editProfile", "Edit Profile")
495
492
  }), /* @__PURE__ */ _("button", {
496
493
  type: "button",
497
- onClick: () => E("/auth/security"),
494
+ onClick: () => T("/auth/security"),
498
495
  className: "px-6 py-3 rounded-xl border border-[var(--color-border-default)] text-[var(--color-text-secondary)] font-medium hover:bg-[var(--color-bg-muted)] transition-colors duration-200",
499
- children: T("auth.profile.securitySettings", "Security Settings")
496
+ children: w("auth.profile.securitySettings", "Security Settings")
500
497
  })]
501
498
  })] })
502
499
  })]
@@ -507,23 +504,23 @@ function w() {
507
504
  steps: [
508
505
  {
509
506
  id: "edit-profile",
510
- label: T("auth.profile.nextEdit", "Complete your profile"),
511
- description: T("auth.profile.nextEditDesc", "Add your display name and photo so teammates recognise you."),
512
- onClick: () => q(!0),
513
- done: !!(k.name && k.avatar)
507
+ label: w("auth.profile.nextEdit", "Complete your profile"),
508
+ description: w("auth.profile.nextEditDesc", "Add your display name and photo so teammates recognise you."),
509
+ onClick: () => K(!0),
510
+ done: !!(O.name && O.avatar)
514
511
  },
515
512
  {
516
513
  id: "enable-mfa",
517
- label: T("auth.profile.nextMfa", "Secure your account with 2FA"),
518
- description: T("auth.profile.nextMfaDesc", "Turn on two-factor authentication for stronger protection."),
519
- onClick: () => E("/auth/mfa"),
520
- done: !!k.mfaEnabled
514
+ label: w("auth.profile.nextMfa", "Secure your account with 2FA"),
515
+ description: w("auth.profile.nextMfaDesc", "Turn on two-factor authentication for stronger protection."),
516
+ onClick: () => T("/auth/mfa"),
517
+ done: !!O.mfaEnabled
521
518
  },
522
519
  {
523
520
  id: "security-center",
524
- label: T("auth.profile.nextSecurity", "Visit the Security Center"),
525
- description: T("auth.profile.nextSecurityDesc", "Review sessions, password, and account options."),
526
- onClick: () => E("/auth/security")
521
+ label: w("auth.profile.nextSecurity", "Visit the Security Center"),
522
+ description: w("auth.profile.nextSecurityDesc", "Review sessions, password, and account options."),
523
+ onClick: () => T("/auth/security")
527
524
  }
528
525
  ]
529
526
  }),
@@ -531,7 +528,7 @@ function w() {
531
528
  className: "mt-8 grid grid-cols-1 md:grid-cols-3 gap-4",
532
529
  children: [/* @__PURE__ */ v("button", {
533
530
  type: "button",
534
- onClick: () => E("/auth/mfa"),
531
+ onClick: () => T("/auth/mfa"),
535
532
  className: "p-4 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] hover:border-[var(--color-action-primary-border)] transition-colors duration-200 text-left group",
536
533
  children: [
537
534
  /* @__PURE__ */ _("div", {
@@ -551,16 +548,16 @@ function w() {
551
548
  }),
552
549
  /* @__PURE__ */ _("h3", {
553
550
  className: "font-medium text-[var(--color-text-primary)]",
554
- children: T("auth.profile.twoFactorAuth", "Two-Factor Auth")
551
+ children: w("auth.profile.twoFactorAuth", "Two-Factor Auth")
555
552
  }),
556
553
  /* @__PURE__ */ _("p", {
557
554
  className: "text-sm text-[var(--color-text-tertiary)] mt-1",
558
- children: k.mfaEnabled ? T("auth.profile.manageMfa", "Manage MFA settings") : T("auth.profile.enableMfa", "Enable MFA for extra security")
555
+ children: O.mfaEnabled ? w("auth.profile.manageMfa", "Manage MFA settings") : w("auth.profile.enableMfa", "Enable MFA for extra security")
559
556
  })
560
557
  ]
561
558
  }), /* @__PURE__ */ v("button", {
562
559
  type: "button",
563
- onClick: () => E("/devportal/api-keys"),
560
+ onClick: () => T("/devportal/api-keys"),
564
561
  className: "p-4 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] hover:border-[var(--color-action-secondary-border)] transition-colors duration-200 text-left group",
565
562
  children: [
566
563
  /* @__PURE__ */ _("div", {
@@ -580,11 +577,11 @@ function w() {
580
577
  }),
581
578
  /* @__PURE__ */ _("h3", {
582
579
  className: "font-medium text-[var(--color-text-primary)]",
583
- children: T("auth.profile.apiKeys", "API Keys")
580
+ children: w("auth.profile.apiKeys", "API Keys")
584
581
  }),
585
582
  /* @__PURE__ */ _("p", {
586
583
  className: "text-sm text-[var(--color-text-tertiary)] mt-1",
587
- children: T("auth.profile.manageApiKeys", "Manage your API access credentials")
584
+ children: w("auth.profile.manageApiKeys", "Manage your API access credentials")
588
585
  })
589
586
  ]
590
587
  })]