@burdenoff/microfe-auth 2026.510.127

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 (301) hide show
  1. package/README.md +12 -0
  2. package/dist/_virtual/_rolldown/runtime.js +13 -0
  3. package/dist/auth/AuthRoot.d.ts +30 -0
  4. package/dist/auth/AuthRoot.d.ts.map +1 -0
  5. package/dist/auth/AuthRoot.js +82 -0
  6. package/dist/auth/AuthRoot.js.map +1 -0
  7. package/dist/auth/AuthRoutes.d.ts +29 -0
  8. package/dist/auth/AuthRoutes.d.ts.map +1 -0
  9. package/dist/auth/AuthRoutes.js +271 -0
  10. package/dist/auth/AuthRoutes.js.map +1 -0
  11. package/dist/auth/components/AuthIcons.d.ts +17 -0
  12. package/dist/auth/components/AuthIcons.d.ts.map +1 -0
  13. package/dist/auth/components/AuthIcons.js +197 -0
  14. package/dist/auth/components/AuthIcons.js.map +1 -0
  15. package/dist/auth/components/AuthLayout.d.ts +17 -0
  16. package/dist/auth/components/AuthLayout.d.ts.map +1 -0
  17. package/dist/auth/components/AuthLayout.js +237 -0
  18. package/dist/auth/components/AuthLayout.js.map +1 -0
  19. package/dist/auth/components/CaptchaV2.d.ts +16 -0
  20. package/dist/auth/components/CaptchaV2.d.ts.map +1 -0
  21. package/dist/auth/components/CaptchaV2.js +47 -0
  22. package/dist/auth/components/CaptchaV2.js.map +1 -0
  23. package/dist/auth/components/ConfirmActionDialog.d.ts +16 -0
  24. package/dist/auth/components/ConfirmActionDialog.d.ts.map +1 -0
  25. package/dist/auth/components/ConfirmActionDialog.js +68 -0
  26. package/dist/auth/components/ConfirmActionDialog.js.map +1 -0
  27. package/dist/auth/components/index.d.ts +4 -0
  28. package/dist/auth/components/index.d.ts.map +1 -0
  29. package/dist/auth/components/profile/UserProfileMenu.d.ts +42 -0
  30. package/dist/auth/components/profile/UserProfileMenu.d.ts.map +1 -0
  31. package/dist/auth/components/profile/UserProfileMenu.js +91 -0
  32. package/dist/auth/components/profile/UserProfileMenu.js.map +1 -0
  33. package/dist/auth/components/workspace/WorkspaceSelector.d.ts +76 -0
  34. package/dist/auth/components/workspace/WorkspaceSelector.d.ts.map +1 -0
  35. package/dist/auth/components/workspace/WorkspaceSelector.js +240 -0
  36. package/dist/auth/components/workspace/WorkspaceSelector.js.map +1 -0
  37. package/dist/auth/constants/permissions.d.ts +30 -0
  38. package/dist/auth/constants/permissions.d.ts.map +1 -0
  39. package/dist/auth/constants/permissions.js +18 -0
  40. package/dist/auth/constants/permissions.js.map +1 -0
  41. package/dist/auth/constants/sessionKeys.d.ts +18 -0
  42. package/dist/auth/constants/sessionKeys.d.ts.map +1 -0
  43. package/dist/auth/constants/sessionKeys.js +6 -0
  44. package/dist/auth/constants/sessionKeys.js.map +1 -0
  45. package/dist/auth/hooks/index.d.ts +18 -0
  46. package/dist/auth/hooks/index.d.ts.map +1 -0
  47. package/dist/auth/hooks/index.js +16 -0
  48. package/dist/auth/hooks/useAccountOperations.d.ts +19 -0
  49. package/dist/auth/hooks/useAccountOperations.d.ts.map +1 -0
  50. package/dist/auth/hooks/useAccountOperations.js +52 -0
  51. package/dist/auth/hooks/useAccountOperations.js.map +1 -0
  52. package/dist/auth/hooks/useApiKeyOperations.d.ts +22 -0
  53. package/dist/auth/hooks/useApiKeyOperations.d.ts.map +1 -0
  54. package/dist/auth/hooks/useApiKeyOperations.js +4 -0
  55. package/dist/auth/hooks/useAppOperations.d.ts +26 -0
  56. package/dist/auth/hooks/useAppOperations.d.ts.map +1 -0
  57. package/dist/auth/hooks/useAppOperations.js +4 -0
  58. package/dist/auth/hooks/useAuthOperations.d.ts +57 -0
  59. package/dist/auth/hooks/useAuthOperations.d.ts.map +1 -0
  60. package/dist/auth/hooks/useAuthOperations.js +236 -0
  61. package/dist/auth/hooks/useAuthOperations.js.map +1 -0
  62. package/dist/auth/hooks/useAuthPermissions.d.ts +20 -0
  63. package/dist/auth/hooks/useAuthPermissions.d.ts.map +1 -0
  64. package/dist/auth/hooks/useAuthPermissions.js +22 -0
  65. package/dist/auth/hooks/useAuthPermissions.js.map +1 -0
  66. package/dist/auth/hooks/useCaptchaV3.d.ts +13 -0
  67. package/dist/auth/hooks/useCaptchaV3.d.ts.map +1 -0
  68. package/dist/auth/hooks/useCaptchaV3.js +19 -0
  69. package/dist/auth/hooks/useCaptchaV3.js.map +1 -0
  70. package/dist/auth/hooks/useContextSwitcherData.d.ts +106 -0
  71. package/dist/auth/hooks/useContextSwitcherData.d.ts.map +1 -0
  72. package/dist/auth/hooks/useContextSwitcherData.js +466 -0
  73. package/dist/auth/hooks/useContextSwitcherData.js.map +1 -0
  74. package/dist/auth/hooks/useDelegationOperations.d.ts +25 -0
  75. package/dist/auth/hooks/useDelegationOperations.d.ts.map +1 -0
  76. package/dist/auth/hooks/useDelegationOperations.js +4 -0
  77. package/dist/auth/hooks/useMfaOperations.d.ts +18 -0
  78. package/dist/auth/hooks/useMfaOperations.d.ts.map +1 -0
  79. package/dist/auth/hooks/useMfaOperations.js +103 -0
  80. package/dist/auth/hooks/useMfaOperations.js.map +1 -0
  81. package/dist/auth/hooks/useMyWorkspaces.d.ts +45 -0
  82. package/dist/auth/hooks/useMyWorkspaces.d.ts.map +1 -0
  83. package/dist/auth/hooks/useMyWorkspaces.js +140 -0
  84. package/dist/auth/hooks/useMyWorkspaces.js.map +1 -0
  85. package/dist/auth/hooks/useOAuthOperations.d.ts +19 -0
  86. package/dist/auth/hooks/useOAuthOperations.d.ts.map +1 -0
  87. package/dist/auth/hooks/useOAuthOperations.js +103 -0
  88. package/dist/auth/hooks/useOAuthOperations.js.map +1 -0
  89. package/dist/auth/hooks/usePasswordOperations.d.ts +13 -0
  90. package/dist/auth/hooks/usePasswordOperations.d.ts.map +1 -0
  91. package/dist/auth/hooks/usePasswordOperations.js +56 -0
  92. package/dist/auth/hooks/usePasswordOperations.js.map +1 -0
  93. package/dist/auth/hooks/useSessionOperations.d.ts +41 -0
  94. package/dist/auth/hooks/useSessionOperations.d.ts.map +1 -0
  95. package/dist/auth/hooks/useSessionOperations.js +59 -0
  96. package/dist/auth/hooks/useSessionOperations.js.map +1 -0
  97. package/dist/auth/hooks/useSsoOperations.d.ts +65 -0
  98. package/dist/auth/hooks/useSsoOperations.d.ts.map +1 -0
  99. package/dist/auth/hooks/useSsoOperations.js +236 -0
  100. package/dist/auth/hooks/useSsoOperations.js.map +1 -0
  101. package/dist/auth/hooks/useTokenRefresh.d.ts +56 -0
  102. package/dist/auth/hooks/useTokenRefresh.d.ts.map +1 -0
  103. package/dist/auth/hooks/useTokenRefresh.js +53 -0
  104. package/dist/auth/hooks/useTokenRefresh.js.map +1 -0
  105. package/dist/auth/hooks/useUserOperations.d.ts +32 -0
  106. package/dist/auth/hooks/useUserOperations.d.ts.map +1 -0
  107. package/dist/auth/hooks/useUserOperations.js +100 -0
  108. package/dist/auth/hooks/useUserOperations.js.map +1 -0
  109. package/dist/auth/hooks/useWorkspaceOperations.d.ts +35 -0
  110. package/dist/auth/hooks/useWorkspaceOperations.d.ts.map +1 -0
  111. package/dist/auth/hooks/useWorkspaceOperations.js +35 -0
  112. package/dist/auth/hooks/useWorkspaceOperations.js.map +1 -0
  113. package/dist/auth/hooks/useWorkspaceToken.d.ts +56 -0
  114. package/dist/auth/hooks/useWorkspaceToken.d.ts.map +1 -0
  115. package/dist/auth/hooks/useWorkspaceToken.js +94 -0
  116. package/dist/auth/hooks/useWorkspaceToken.js.map +1 -0
  117. package/dist/auth/index.d.ts +63 -0
  118. package/dist/auth/index.d.ts.map +1 -0
  119. package/dist/auth/index.js +18 -0
  120. package/dist/auth/pages/ApiKeysPage.d.ts +5 -0
  121. package/dist/auth/pages/ApiKeysPage.d.ts.map +1 -0
  122. package/dist/auth/pages/AppsPage.d.ts +5 -0
  123. package/dist/auth/pages/AppsPage.d.ts.map +1 -0
  124. package/dist/auth/pages/AuditLogPage.d.ts +5 -0
  125. package/dist/auth/pages/AuditLogPage.d.ts.map +1 -0
  126. package/dist/auth/pages/AuditLogPage.js +129 -0
  127. package/dist/auth/pages/AuditLogPage.js.map +1 -0
  128. package/dist/auth/pages/DelegationsPage.d.ts +5 -0
  129. package/dist/auth/pages/DelegationsPage.d.ts.map +1 -0
  130. package/dist/auth/pages/EmailVerifyPage.d.ts +5 -0
  131. package/dist/auth/pages/EmailVerifyPage.d.ts.map +1 -0
  132. package/dist/auth/pages/EmailVerifyPage.js +166 -0
  133. package/dist/auth/pages/EmailVerifyPage.js.map +1 -0
  134. package/dist/auth/pages/LoginPage.d.ts +6 -0
  135. package/dist/auth/pages/LoginPage.d.ts.map +1 -0
  136. package/dist/auth/pages/LoginPage.js +575 -0
  137. package/dist/auth/pages/LoginPage.js.map +1 -0
  138. package/dist/auth/pages/MagicLinkPage.d.ts +6 -0
  139. package/dist/auth/pages/MagicLinkPage.d.ts.map +1 -0
  140. package/dist/auth/pages/MagicLinkPage.js +219 -0
  141. package/dist/auth/pages/MagicLinkPage.js.map +1 -0
  142. package/dist/auth/pages/MfaSetupPage.d.ts +5 -0
  143. package/dist/auth/pages/MfaSetupPage.d.ts.map +1 -0
  144. package/dist/auth/pages/MfaSetupPage.js +341 -0
  145. package/dist/auth/pages/MfaSetupPage.js.map +1 -0
  146. package/dist/auth/pages/MfaVerifyPage.d.ts +7 -0
  147. package/dist/auth/pages/MfaVerifyPage.d.ts.map +1 -0
  148. package/dist/auth/pages/MfaVerifyPage.js +189 -0
  149. package/dist/auth/pages/MfaVerifyPage.js.map +1 -0
  150. package/dist/auth/pages/OAuthCallbackPage.d.ts +7 -0
  151. package/dist/auth/pages/OAuthCallbackPage.d.ts.map +1 -0
  152. package/dist/auth/pages/OAuthCallbackPage.js +100 -0
  153. package/dist/auth/pages/OAuthCallbackPage.js.map +1 -0
  154. package/dist/auth/pages/PasswordResetPage.d.ts +6 -0
  155. package/dist/auth/pages/PasswordResetPage.d.ts.map +1 -0
  156. package/dist/auth/pages/PasswordResetPage.js +352 -0
  157. package/dist/auth/pages/PasswordResetPage.js.map +1 -0
  158. package/dist/auth/pages/ReactivatePage.d.ts +6 -0
  159. package/dist/auth/pages/ReactivatePage.d.ts.map +1 -0
  160. package/dist/auth/pages/ReactivatePage.js +217 -0
  161. package/dist/auth/pages/ReactivatePage.js.map +1 -0
  162. package/dist/auth/pages/RegisterPage.d.ts +5 -0
  163. package/dist/auth/pages/RegisterPage.d.ts.map +1 -0
  164. package/dist/auth/pages/RegisterPage.js +439 -0
  165. package/dist/auth/pages/RegisterPage.js.map +1 -0
  166. package/dist/auth/pages/SSORelayCallbackPage.d.ts +8 -0
  167. package/dist/auth/pages/SSORelayCallbackPage.d.ts.map +1 -0
  168. package/dist/auth/pages/SSORelayCallbackPage.js +48 -0
  169. package/dist/auth/pages/SSORelayCallbackPage.js.map +1 -0
  170. package/dist/auth/pages/SSORelayPage.d.ts +18 -0
  171. package/dist/auth/pages/SSORelayPage.d.ts.map +1 -0
  172. package/dist/auth/pages/SSORelayPage.js +134 -0
  173. package/dist/auth/pages/SSORelayPage.js.map +1 -0
  174. package/dist/auth/pages/SecurityPage.d.ts +5 -0
  175. package/dist/auth/pages/SecurityPage.d.ts.map +1 -0
  176. package/dist/auth/pages/SecurityPage.js +587 -0
  177. package/dist/auth/pages/SecurityPage.js.map +1 -0
  178. package/dist/auth/pages/SessionBridgePage.d.ts +14 -0
  179. package/dist/auth/pages/SessionBridgePage.d.ts.map +1 -0
  180. package/dist/auth/pages/SessionBridgePage.js +231 -0
  181. package/dist/auth/pages/SessionBridgePage.js.map +1 -0
  182. package/dist/auth/pages/SessionsPage.d.ts +5 -0
  183. package/dist/auth/pages/SessionsPage.d.ts.map +1 -0
  184. package/dist/auth/pages/SessionsPage.js +258 -0
  185. package/dist/auth/pages/SessionsPage.js.map +1 -0
  186. package/dist/auth/pages/SsoCallbackPage.d.ts +8 -0
  187. package/dist/auth/pages/SsoCallbackPage.d.ts.map +1 -0
  188. package/dist/auth/pages/SsoCallbackPage.js +188 -0
  189. package/dist/auth/pages/SsoCallbackPage.js.map +1 -0
  190. package/dist/auth/pages/SsoConfigPage.d.ts +6 -0
  191. package/dist/auth/pages/SsoConfigPage.d.ts.map +1 -0
  192. package/dist/auth/pages/SsoConfigPage.js +1144 -0
  193. package/dist/auth/pages/SsoConfigPage.js.map +1 -0
  194. package/dist/auth/pages/SsoLoginPage.d.ts +7 -0
  195. package/dist/auth/pages/SsoLoginPage.d.ts.map +1 -0
  196. package/dist/auth/pages/SsoLoginPage.js +236 -0
  197. package/dist/auth/pages/SsoLoginPage.js.map +1 -0
  198. package/dist/auth/pages/UserDetailsPage.d.ts +11 -0
  199. package/dist/auth/pages/UserDetailsPage.d.ts.map +1 -0
  200. package/dist/auth/pages/UserDetailsPage.js +338 -0
  201. package/dist/auth/pages/UserDetailsPage.js.map +1 -0
  202. package/dist/auth/pages/UserProfilePage.d.ts +5 -0
  203. package/dist/auth/pages/UserProfilePage.d.ts.map +1 -0
  204. package/dist/auth/pages/UserProfilePage.js +445 -0
  205. package/dist/auth/pages/UserProfilePage.js.map +1 -0
  206. package/dist/auth/pages/UsersPage.d.ts +5 -0
  207. package/dist/auth/pages/UsersPage.d.ts.map +1 -0
  208. package/dist/auth/pages/UsersPage.js +899 -0
  209. package/dist/auth/pages/UsersPage.js.map +1 -0
  210. package/dist/auth/providers/AuthProvider.d.ts +18 -0
  211. package/dist/auth/providers/AuthProvider.d.ts.map +1 -0
  212. package/dist/auth/providers/AuthProvider.js +36 -0
  213. package/dist/auth/providers/AuthProvider.js.map +1 -0
  214. package/dist/auth/providers/CaptchaProvider.d.ts +13 -0
  215. package/dist/auth/providers/CaptchaProvider.d.ts.map +1 -0
  216. package/dist/auth/providers/CaptchaProvider.js +21 -0
  217. package/dist/auth/providers/CaptchaProvider.js.map +1 -0
  218. package/dist/auth/store/authStore.d.ts +91 -0
  219. package/dist/auth/store/authStore.d.ts.map +1 -0
  220. package/dist/auth/store/authStore.js +314 -0
  221. package/dist/auth/store/authStore.js.map +1 -0
  222. package/dist/auth/types/index.d.ts +636 -0
  223. package/dist/auth/types/index.d.ts.map +1 -0
  224. package/dist/auth/utils/captchaConfig.d.ts +4 -0
  225. package/dist/auth/utils/captchaConfig.d.ts.map +1 -0
  226. package/dist/auth/utils/captchaConfig.js +13 -0
  227. package/dist/auth/utils/captchaConfig.js.map +1 -0
  228. package/dist/auth/utils/formatters.d.ts +37 -0
  229. package/dist/auth/utils/formatters.d.ts.map +1 -0
  230. package/dist/auth/utils/formatters.js +48 -0
  231. package/dist/auth/utils/formatters.js.map +1 -0
  232. package/dist/auth/utils/gatewayBaseUrls.d.ts +6 -0
  233. package/dist/auth/utils/gatewayBaseUrls.d.ts.map +1 -0
  234. package/dist/auth/utils/gatewayBaseUrls.js +18 -0
  235. package/dist/auth/utils/gatewayBaseUrls.js.map +1 -0
  236. package/dist/auth/utils/index.d.ts +3 -0
  237. package/dist/auth/utils/index.d.ts.map +1 -0
  238. package/dist/auth/utils/validation.d.ts +30 -0
  239. package/dist/auth/utils/validation.d.ts.map +1 -0
  240. package/dist/auth/utils/validation.js +15 -0
  241. package/dist/auth/utils/validation.js.map +1 -0
  242. package/dist/dev/main.d.ts +2 -0
  243. package/dist/dev/main.d.ts.map +1 -0
  244. package/dist/generated/global-operations.d.ts +2978 -0
  245. package/dist/generated/global-operations.d.ts.map +1 -0
  246. package/dist/generated/global-operations.js +944 -0
  247. package/dist/generated/global-operations.js.map +1 -0
  248. package/dist/generated/global-types.d.ts +21253 -0
  249. package/dist/generated/global-types.d.ts.map +1 -0
  250. package/dist/generated/wspace-operations.d.ts +2 -0
  251. package/dist/generated/wspace-operations.d.ts.map +1 -0
  252. package/dist/generated/wspace-types.d.ts +55214 -0
  253. package/dist/generated/wspace-types.d.ts.map +1 -0
  254. package/dist/index.d.ts +4 -0
  255. package/dist/index.d.ts.map +1 -0
  256. package/dist/index.js +20 -0
  257. package/dist/microfe-auth.css +3 -0
  258. package/dist/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +70 -0
  259. package/dist/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js.map +1 -0
  260. package/dist/node_modules/object-assign/index.js +41 -0
  261. package/dist/node_modules/object-assign/index.js.map +1 -0
  262. package/dist/node_modules/prop-types/checkPropTypes.js +46 -0
  263. package/dist/node_modules/prop-types/checkPropTypes.js.map +1 -0
  264. package/dist/node_modules/prop-types/factoryWithThrowingShims.js +49 -0
  265. package/dist/node_modules/prop-types/factoryWithThrowingShims.js.map +1 -0
  266. package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +272 -0
  267. package/dist/node_modules/prop-types/factoryWithTypeCheckers.js.map +1 -0
  268. package/dist/node_modules/prop-types/index.js +16 -0
  269. package/dist/node_modules/prop-types/index.js.map +1 -0
  270. package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +10 -0
  271. package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js.map +1 -0
  272. package/dist/node_modules/prop-types/lib/has.js +10 -0
  273. package/dist/node_modules/prop-types/lib/has.js.map +1 -0
  274. package/dist/node_modules/qrcode.react/lib/esm/index.js +959 -0
  275. package/dist/node_modules/qrcode.react/lib/esm/index.js.map +1 -0
  276. package/dist/node_modules/react-async-script/lib/esm/async-script-loader.js +114 -0
  277. package/dist/node_modules/react-async-script/lib/esm/async-script-loader.js.map +1 -0
  278. package/dist/node_modules/react-google-recaptcha/lib/esm/index.js +8 -0
  279. package/dist/node_modules/react-google-recaptcha/lib/esm/index.js.map +1 -0
  280. package/dist/node_modules/react-google-recaptcha/lib/esm/recaptcha-wrapper.js +20 -0
  281. package/dist/node_modules/react-google-recaptcha/lib/esm/recaptcha-wrapper.js.map +1 -0
  282. package/dist/node_modules/react-google-recaptcha/lib/esm/recaptcha.js +148 -0
  283. package/dist/node_modules/react-google-recaptcha/lib/esm/recaptcha.js.map +1 -0
  284. package/dist/node_modules/react-google-recaptcha-v3/dist/react-google-recaptcha-v3.esm.js +445 -0
  285. package/dist/node_modules/react-google-recaptcha-v3/dist/react-google-recaptcha-v3.esm.js.map +1 -0
  286. package/dist/node_modules/react-is/cjs/react-is.development.js +84 -0
  287. package/dist/node_modules/react-is/cjs/react-is.development.js.map +1 -0
  288. package/dist/node_modules/react-is/cjs/react-is.production.min.js +64 -0
  289. package/dist/node_modules/react-is/cjs/react-is.production.min.js.map +1 -0
  290. package/dist/node_modules/react-is/index.js +12 -0
  291. package/dist/node_modules/react-is/index.js.map +1 -0
  292. package/dist/shared/hooks/index.d.ts +7 -0
  293. package/dist/shared/hooks/index.d.ts.map +1 -0
  294. package/dist/shared/index.d.ts +6 -0
  295. package/dist/shared/index.d.ts.map +1 -0
  296. package/dist/shared/types/index.d.ts +109 -0
  297. package/dist/shared/types/index.d.ts.map +1 -0
  298. package/dist/utils/nativeBridge.d.ts +3 -0
  299. package/dist/utils/nativeBridge.d.ts.map +1 -0
  300. package/dist/utils/nativeBridge.js +2 -0
  301. package/package.json +114 -0
@@ -0,0 +1,587 @@
1
+ import { useAuthStore as e } from "../store/authStore.js";
2
+ import { useAuthOperations as t } from "../hooks/useAuthOperations.js";
3
+ import { useAccountOperations as n } from "../hooks/useAccountOperations.js";
4
+ import "../hooks/index.js";
5
+ import { formatDate as r } from "../utils/formatters.js";
6
+ import { ConfirmActionDialog as i } from "../components/ConfirmActionDialog.js";
7
+ import { nativeImpact as a, nativeNotify as o } from "../../utils/nativeBridge.js";
8
+ import { useState as s } from "react";
9
+ import { useNavigate as c } from "react-router-dom";
10
+ import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell";
11
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
12
+ //#region src/auth/pages/SecurityPage.tsx
13
+ var f = ({ className: e }) => /* @__PURE__ */ u("svg", {
14
+ className: e,
15
+ fill: "none",
16
+ viewBox: "0 0 24 24",
17
+ stroke: "currentColor",
18
+ children: /* @__PURE__ */ u("path", {
19
+ strokeLinecap: "round",
20
+ strokeLinejoin: "round",
21
+ strokeWidth: 1.5,
22
+ d: "M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"
23
+ })
24
+ }), p = ({ className: e }) => /* @__PURE__ */ u("svg", {
25
+ className: e,
26
+ fill: "none",
27
+ viewBox: "0 0 24 24",
28
+ stroke: "currentColor",
29
+ children: /* @__PURE__ */ u("path", {
30
+ strokeLinecap: "round",
31
+ strokeLinejoin: "round",
32
+ strokeWidth: 1.5,
33
+ d: "M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"
34
+ })
35
+ }), m = ({ className: e }) => /* @__PURE__ */ u("svg", {
36
+ className: e,
37
+ fill: "none",
38
+ viewBox: "0 0 24 24",
39
+ stroke: "currentColor",
40
+ children: /* @__PURE__ */ u("path", {
41
+ strokeLinecap: "round",
42
+ strokeLinejoin: "round",
43
+ strokeWidth: 1.5,
44
+ d: "M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"
45
+ })
46
+ }), h = ({ className: e }) => /* @__PURE__ */ u("svg", {
47
+ className: e,
48
+ fill: "none",
49
+ viewBox: "0 0 24 24",
50
+ stroke: "currentColor",
51
+ children: /* @__PURE__ */ u("path", {
52
+ strokeLinecap: "round",
53
+ strokeLinejoin: "round",
54
+ strokeWidth: 1.5,
55
+ d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
56
+ })
57
+ }), g = ({ className: e }) => /* @__PURE__ */ u("svg", {
58
+ className: e,
59
+ fill: "none",
60
+ viewBox: "0 0 24 24",
61
+ stroke: "currentColor",
62
+ children: /* @__PURE__ */ u("path", {
63
+ strokeLinecap: "round",
64
+ strokeLinejoin: "round",
65
+ strokeWidth: 1.5,
66
+ d: "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"
67
+ })
68
+ }), ee = ({ className: e }) => /* @__PURE__ */ u("svg", {
69
+ className: e,
70
+ fill: "none",
71
+ viewBox: "0 0 24 24",
72
+ stroke: "currentColor",
73
+ children: /* @__PURE__ */ u("path", {
74
+ strokeLinecap: "round",
75
+ strokeLinejoin: "round",
76
+ strokeWidth: 1.5,
77
+ d: "M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"
78
+ })
79
+ }), _ = ({ className: e }) => /* @__PURE__ */ u("svg", {
80
+ className: e,
81
+ fill: "none",
82
+ viewBox: "0 0 24 24",
83
+ stroke: "currentColor",
84
+ children: /* @__PURE__ */ u("path", {
85
+ strokeLinecap: "round",
86
+ strokeLinejoin: "round",
87
+ strokeWidth: 2,
88
+ d: "M9 5l7 7-7 7"
89
+ })
90
+ }), v = ({ className: e }) => /* @__PURE__ */ u("svg", {
91
+ className: e,
92
+ fill: "currentColor",
93
+ viewBox: "0 0 20 20",
94
+ children: /* @__PURE__ */ u("path", {
95
+ fillRule: "evenodd",
96
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
97
+ clipRule: "evenodd"
98
+ })
99
+ }), y = ({ className: e }) => /* @__PURE__ */ u("svg", {
100
+ className: e,
101
+ fill: "currentColor",
102
+ viewBox: "0 0 20 20",
103
+ children: /* @__PURE__ */ u("path", {
104
+ fillRule: "evenodd",
105
+ d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",
106
+ clipRule: "evenodd"
107
+ })
108
+ }), b = ({ className: e }) => /* @__PURE__ */ d("svg", {
109
+ className: e,
110
+ fill: "none",
111
+ viewBox: "0 0 24 24",
112
+ children: [/* @__PURE__ */ u("circle", {
113
+ className: "opacity-25",
114
+ cx: "12",
115
+ cy: "12",
116
+ r: "10",
117
+ stroke: "currentColor",
118
+ strokeWidth: "4"
119
+ }), /* @__PURE__ */ u("path", {
120
+ className: "opacity-75",
121
+ fill: "currentColor",
122
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
123
+ })]
124
+ }), x = "DELETE MY ACCOUNT";
125
+ function S() {
126
+ let { t: S } = l(), C = (e, t) => {
127
+ let n = S(e);
128
+ return n === e ? t : n;
129
+ }, w = c(), T = e((e) => e.user), { signOut: E } = t({ disableCurrentUserQuery: !0 }), { deactivateAccount: D, deleteAccount: O, isDeactivating: k, isDeleting: A } = n(), [j, M] = s(!1), [N, P] = s(!1), F = [
130
+ {
131
+ name: C("auth.security.navProfile", "User Profile"),
132
+ description: C("auth.security.navProfileDesc", "View and edit your profile information"),
133
+ path: "/auth/profile",
134
+ icon: h,
135
+ color: "text-accent-teal",
136
+ bgColor: "bg-accent-teal-subtle"
137
+ },
138
+ {
139
+ name: C("auth.security.navMfa", "Two-Factor Authentication"),
140
+ description: C("auth.security.navMfaDesc", "Secure your account with TOTP"),
141
+ path: "/auth/mfa",
142
+ icon: p,
143
+ color: "text-accent-purple",
144
+ bgColor: "bg-accent-purple-subtle"
145
+ },
146
+ {
147
+ name: C("auth.security.navUsers", "Users"),
148
+ description: C("auth.security.navUsersDesc", "Manage system users"),
149
+ path: "/auth/users",
150
+ icon: m,
151
+ color: "text-accent-indigo",
152
+ bgColor: "bg-accent-indigo-subtle",
153
+ adminOnly: !0
154
+ }
155
+ ], I = [{
156
+ name: C("auth.security.navMagicLink", "Magic Link Login"),
157
+ description: C("auth.security.navMagicLinkDesc", "Passwordless authentication"),
158
+ path: "/auth/magic-link",
159
+ icon: ee,
160
+ color: "text-accent-pink",
161
+ bgColor: "bg-accent-pink-subtle"
162
+ }, {
163
+ name: C("auth.security.navSso", "SSO Configuration"),
164
+ description: C("auth.security.navSsoDesc", "Enterprise single sign-on"),
165
+ path: "/auth/sso",
166
+ icon: g,
167
+ color: "text-accent-cyan",
168
+ bgColor: "bg-accent-cyan-subtle",
169
+ adminOnly: !0
170
+ }], [L, R] = s(!1), [z, B] = s(!1), [V, H] = s(""), [U, W] = s(""), [G, K] = s(null), [q, J] = s(null), Y = async () => {
171
+ M(!0);
172
+ try {
173
+ await E(), w("/auth/login"), P(!1);
174
+ } catch (e) {
175
+ console.error("Logout failed:", e), M(!1);
176
+ }
177
+ }, X = async () => {
178
+ K(null);
179
+ try {
180
+ let e = await D(V);
181
+ e.success ? w("/auth/login", { replace: !0 }) : K(e.message || C("auth.security.deactivateFailed", "Failed to deactivate account"));
182
+ } catch (e) {
183
+ K(e instanceof Error ? e.message : C("auth.security.deactivateFailed", "Failed to deactivate account"));
184
+ }
185
+ }, Z = async () => {
186
+ if (K(null), U !== x) {
187
+ K(C("auth.security.deleteConfirmMismatch", "Please type \"DELETE MY ACCOUNT\" to confirm"));
188
+ return;
189
+ }
190
+ a("medium");
191
+ try {
192
+ let e = await O(V, U);
193
+ e.success ? (o("success"), w("/auth/login", { replace: !0 })) : (o("error"), K(e.message || C("auth.security.deleteFailed", "Failed to delete account")));
194
+ } catch (e) {
195
+ o("error"), K(e instanceof Error ? e.message : C("auth.security.deleteFailed", "Failed to delete account"));
196
+ }
197
+ }, Q = () => {
198
+ R(!1), B(!1), H(""), W(""), K(null), J(null);
199
+ }, $ = T?.role === "SUPER_ADMIN" || T?.role === "TENANT_ADMIN" || T?.role === "ORG_ADMIN", te = F.filter((e) => !e.adminOnly || $), ne = I.filter((e) => !e.adminOnly || $);
200
+ return /* @__PURE__ */ d("div", {
201
+ className: "bg-[var(--color-bg-canvas)] p-6",
202
+ children: [/* @__PURE__ */ u(i, {
203
+ open: N,
204
+ onOpenChange: P,
205
+ title: C("auth.security.signOutDialogTitle", "Sign out now?"),
206
+ description: C("auth.security.signOutDialogDescription", "You will be signed out of this device and returned to the login screen."),
207
+ confirmText: C("auth.security.signOutDialogConfirm", "Sign out"),
208
+ variant: "warning",
209
+ isPending: j,
210
+ onConfirm: Y
211
+ }), /* @__PURE__ */ d("main", {
212
+ className: "max-w-7xl mx-auto space-y-8",
213
+ children: [
214
+ /* @__PURE__ */ d("div", {
215
+ className: "flex items-center gap-3",
216
+ children: [/* @__PURE__ */ u("div", {
217
+ className: "auth-brand-badge flex h-10 w-10 items-center justify-center rounded-xl",
218
+ children: /* @__PURE__ */ u(f, { className: "w-6 h-6 text-white" })
219
+ }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h1", {
220
+ className: "text-lg font-bold text-text-primary",
221
+ children: C("auth.security.title", "Security Center")
222
+ }), /* @__PURE__ */ u("p", {
223
+ className: "text-xs text-text-secondary ",
224
+ children: C("auth.security.subtitle", "Account & Authentication")
225
+ })] })]
226
+ }),
227
+ /* @__PURE__ */ u("div", {
228
+ className: "auth-hero-card rounded-2xl p-6",
229
+ children: /* @__PURE__ */ d("div", {
230
+ className: "flex flex-col md:flex-row md:items-center md:justify-between gap-4",
231
+ children: [/* @__PURE__ */ d("div", {
232
+ className: "flex items-center gap-4",
233
+ children: [/* @__PURE__ */ u("div", {
234
+ className: "w-14 h-14 rounded-2xl bg-bg-surface/20 backdrop-blur flex items-center justify-center",
235
+ children: /* @__PURE__ */ u(f, { className: "w-8 h-8 text-white" })
236
+ }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h2", {
237
+ className: "text-xl font-bold",
238
+ children: C("auth.security.securityStatus", "Security Status")
239
+ }), /* @__PURE__ */ u("p", {
240
+ className: "opacity-80",
241
+ children: T?.mfaEnabled ? C("auth.security.wellProtected", "Your account is well protected") : C("auth.security.enableMfaSuggestion", "Enable MFA for better security")
242
+ })] })]
243
+ }), /* @__PURE__ */ u("div", {
244
+ className: "flex items-center gap-3",
245
+ children: T?.mfaEnabled ? /* @__PURE__ */ d("span", {
246
+ className: "inline-flex items-center gap-2 px-4 py-2 rounded-xl bg-bg-surface/20 backdrop-blur text-white font-medium",
247
+ children: [/* @__PURE__ */ u(v, { className: "w-5 h-5 text-status-success-text" }), C("auth.security.mfaEnabled", "MFA Enabled")]
248
+ }) : /* @__PURE__ */ d("button", {
249
+ onClick: () => w("/auth/mfa"),
250
+ className: "inline-flex items-center gap-2 px-4 py-2 rounded-xl bg-bg-surface text-text-link font-semibold hover:bg-status-info-bg-subtle transition-colors shadow-lg",
251
+ children: [/* @__PURE__ */ u(y, { className: "w-5 h-5 text-status-warning-text" }), C("auth.security.enableMfaNow", "Enable MFA Now")]
252
+ })
253
+ })]
254
+ })
255
+ }),
256
+ /* @__PURE__ */ d("div", {
257
+ className: "mb-8 p-6 rounded-2xl bg-bg-surface border border-border-subtle shadow-sm",
258
+ children: [/* @__PURE__ */ u("h3", {
259
+ className: "text-lg font-semibold text-text-primary mb-4",
260
+ children: C("auth.security.accountInfo", "Account Information")
261
+ }), /* @__PURE__ */ d("div", {
262
+ className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",
263
+ children: [
264
+ /* @__PURE__ */ d("div", {
265
+ className: "sm:col-span-2 lg:col-span-1",
266
+ children: [/* @__PURE__ */ u("dt", {
267
+ className: "text-sm font-medium text-text-secondary",
268
+ children: C("auth.security.email", "Email")
269
+ }), /* @__PURE__ */ d("dd", {
270
+ className: "mt-1 text-text-primary",
271
+ children: [/* @__PURE__ */ u("span", {
272
+ className: "block truncate",
273
+ title: T?.email,
274
+ children: T?.email
275
+ }), T?.emailVerified && /* @__PURE__ */ d("span", {
276
+ className: "mt-1 inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-status-success-bg-subtle text-status-success-text text-xs font-medium",
277
+ children: [/* @__PURE__ */ u(v, { className: "w-3 h-3" }), C("auth.security.verified", "Verified")]
278
+ })]
279
+ })]
280
+ }),
281
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("dt", {
282
+ className: "text-sm font-medium text-text-secondary",
283
+ children: C("auth.security.username", "Username")
284
+ }), /* @__PURE__ */ u("dd", {
285
+ className: "mt-1 text-text-primary truncate",
286
+ title: T?.username ?? void 0,
287
+ children: T?.username || "-"
288
+ })] }),
289
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("dt", {
290
+ className: "text-sm font-medium text-text-secondary",
291
+ children: C("auth.security.role", "Role")
292
+ }), /* @__PURE__ */ u("dd", {
293
+ className: "mt-1",
294
+ children: /* @__PURE__ */ u("span", {
295
+ className: "inline-flex px-2.5 py-0.5 rounded-full bg-accent-indigo-subtle text-accent-indigo text-xs font-medium",
296
+ children: T?.role || "USER"
297
+ })
298
+ })] }),
299
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("dt", {
300
+ className: "text-sm font-medium text-text-secondary",
301
+ children: C("auth.security.memberSince", "Member Since")
302
+ }), /* @__PURE__ */ u("dd", {
303
+ className: "mt-1 text-text-primary",
304
+ children: T?.createdAt ? r(T.createdAt) : "-"
305
+ })] })
306
+ ]
307
+ })]
308
+ }),
309
+ /* @__PURE__ */ d("div", {
310
+ className: "mb-8",
311
+ children: [/* @__PURE__ */ u("h3", {
312
+ className: "text-lg font-semibold text-text-primary mb-4",
313
+ children: C("auth.security.securityAuth", "Security & Authentication")
314
+ }), /* @__PURE__ */ u("div", {
315
+ className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
316
+ children: te.map((e) => /* @__PURE__ */ u("button", {
317
+ onClick: () => w(e.path),
318
+ className: "group relative p-5 rounded-2xl bg-bg-surface border border-border-subtle hover:border-border-default hover:shadow-lg transition-all duration-200 text-left",
319
+ children: /* @__PURE__ */ d("div", {
320
+ className: "flex items-start gap-4",
321
+ children: [
322
+ /* @__PURE__ */ u("div", {
323
+ className: `w-12 h-12 rounded-xl ${e.bgColor} flex items-center justify-center flex-shrink-0 transition-transform group-hover:scale-110`,
324
+ children: /* @__PURE__ */ u(e.icon, { className: `w-6 h-6 ${e.color}` })
325
+ }),
326
+ /* @__PURE__ */ d("div", {
327
+ className: "flex-1 min-w-0",
328
+ children: [/* @__PURE__ */ u("h4", {
329
+ className: "text-base font-semibold text-text-primary group-hover:text-accent-indigo transition-colors",
330
+ children: e.name
331
+ }), /* @__PURE__ */ u("p", {
332
+ className: "mt-1 text-sm text-text-secondary ",
333
+ children: e.description
334
+ })]
335
+ }),
336
+ /* @__PURE__ */ u(_, { className: "w-5 h-5 text-text-tertiary group-hover:text-indigo-500 transition-colors flex-shrink-0" })
337
+ ]
338
+ })
339
+ }, e.path))
340
+ })]
341
+ }),
342
+ /* @__PURE__ */ d("div", {
343
+ className: "mb-8",
344
+ children: [/* @__PURE__ */ u("h3", {
345
+ className: "text-lg font-semibold text-text-primary mb-4",
346
+ children: C("auth.security.quickActions", "Quick Actions")
347
+ }), /* @__PURE__ */ u("div", {
348
+ className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
349
+ children: ne.map((e) => /* @__PURE__ */ u("button", {
350
+ onClick: () => w(e.path),
351
+ className: "group relative p-5 rounded-2xl bg-bg-surface border border-border-subtle hover:border-border-default hover:shadow-lg transition-all duration-200 text-left",
352
+ children: /* @__PURE__ */ d("div", {
353
+ className: "flex items-start gap-4",
354
+ children: [
355
+ /* @__PURE__ */ u("div", {
356
+ className: `w-12 h-12 rounded-xl ${e.bgColor} flex items-center justify-center flex-shrink-0 transition-transform group-hover:scale-110`,
357
+ children: /* @__PURE__ */ u(e.icon, { className: `w-6 h-6 ${e.color}` })
358
+ }),
359
+ /* @__PURE__ */ d("div", {
360
+ className: "flex-1 min-w-0",
361
+ children: [/* @__PURE__ */ u("h4", {
362
+ className: "text-base font-semibold text-text-primary group-hover:text-accent-indigo transition-colors",
363
+ children: e.name
364
+ }), /* @__PURE__ */ u("p", {
365
+ className: "mt-1 text-sm text-text-secondary ",
366
+ children: e.description
367
+ })]
368
+ }),
369
+ /* @__PURE__ */ u(_, { className: "w-5 h-5 text-text-tertiary group-hover:text-indigo-500 transition-colors flex-shrink-0" })
370
+ ]
371
+ })
372
+ }, e.path))
373
+ })]
374
+ }),
375
+ /* @__PURE__ */ d("div", {
376
+ className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
377
+ children: [/* @__PURE__ */ d("div", {
378
+ className: "p-6 rounded-2xl bg-bg-surface border border-border-subtle ",
379
+ children: [/* @__PURE__ */ u("div", {
380
+ className: "flex items-start justify-between",
381
+ children: /* @__PURE__ */ d("div", { children: [
382
+ /* @__PURE__ */ u("h3", {
383
+ className: "text-lg font-semibold text-text-primary",
384
+ children: C("auth.security.password", "Password")
385
+ }),
386
+ /* @__PURE__ */ u("p", {
387
+ className: "mt-1 text-sm text-text-secondary ",
388
+ children: C("auth.security.updatePassword", "Update your password to keep your account secure")
389
+ }),
390
+ /* @__PURE__ */ u("p", {
391
+ className: "mt-2 text-xs text-text-tertiary ",
392
+ children: C("auth.security.lastChanged", "Last changed: Never")
393
+ })
394
+ ] })
395
+ }), /* @__PURE__ */ u("button", {
396
+ onClick: () => w("/auth/reset-password"),
397
+ className: "auth-primary-button mt-4 w-full px-5 py-2.5 font-semibold sm:w-auto",
398
+ children: C("auth.security.changePassword", "Change Password")
399
+ })]
400
+ }), /* @__PURE__ */ d("div", {
401
+ className: "p-6 rounded-2xl bg-status-error-bg-subtle border border-status-error-border",
402
+ children: [
403
+ /* @__PURE__ */ u("h3", {
404
+ className: "text-lg font-semibold text-status-error-text",
405
+ children: C("auth.security.dangerZone", "Danger Zone")
406
+ }),
407
+ /* @__PURE__ */ u("p", {
408
+ className: "mt-1 text-sm text-status-error-text/80",
409
+ children: C("auth.security.dangerWarning", "These actions affect your account. Proceed with caution.")
410
+ }),
411
+ /* @__PURE__ */ d("div", {
412
+ className: "mt-4 flex flex-wrap gap-3",
413
+ children: [/* @__PURE__ */ u("button", {
414
+ onClick: () => R(!0),
415
+ className: "px-5 py-2.5 rounded-xl border-2 border-status-warning-border text-status-warning-text font-semibold hover:bg-status-warning-bg-subtle transition-all duration-200",
416
+ children: C("auth.security.deactivateAccount", "Deactivate Account")
417
+ }), /* @__PURE__ */ u("button", {
418
+ onClick: () => B(!0),
419
+ className: "px-5 py-2.5 rounded-xl border-2 border-status-error-border text-status-error-text font-semibold hover:bg-status-error-bg-subtle transition-all duration-200",
420
+ children: C("auth.security.deleteAccount", "Delete Account")
421
+ })]
422
+ })
423
+ ]
424
+ })]
425
+ }),
426
+ L && /* @__PURE__ */ u("div", {
427
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4",
428
+ children: /* @__PURE__ */ d("div", {
429
+ className: "w-full max-w-md bg-bg-surface rounded-2xl shadow-2xl p-6",
430
+ children: [
431
+ /* @__PURE__ */ u("h3", {
432
+ className: "text-xl font-bold text-text-primary mb-2",
433
+ children: C("auth.security.deactivateTitle", "Deactivate Account")
434
+ }),
435
+ /* @__PURE__ */ u("p", {
436
+ className: "text-sm text-text-secondary mb-4",
437
+ children: C("auth.security.deactivateDesc", "Your account will be temporarily disabled. You can reactivate it by signing in again with your credentials.")
438
+ }),
439
+ G && /* @__PURE__ */ u("div", {
440
+ className: "mb-4 p-3 rounded-lg bg-status-error-bg-subtle text-status-error-text text-sm",
441
+ children: G
442
+ }),
443
+ q && /* @__PURE__ */ u("div", {
444
+ className: "mb-4 p-3 rounded-lg bg-status-success-bg-subtle text-status-success-text text-sm",
445
+ children: q
446
+ }),
447
+ /* @__PURE__ */ d("div", {
448
+ className: "mb-4",
449
+ children: [/* @__PURE__ */ u("label", {
450
+ className: "block text-sm font-medium text-text-primary mb-1",
451
+ children: C("auth.security.enterPasswordConfirm", "Enter your password to confirm")
452
+ }), /* @__PURE__ */ u("input", {
453
+ type: "password",
454
+ value: V,
455
+ onChange: (e) => H(e.target.value),
456
+ className: "w-full px-4 py-2 rounded-lg border border-border-default bg-bg-surface text-text-primary focus:ring-2 focus:ring-status-warning-bg focus:border-transparent",
457
+ placeholder: C("auth.security.yourPassword", "Your password")
458
+ })]
459
+ }),
460
+ /* @__PURE__ */ d("div", {
461
+ className: "flex gap-3",
462
+ children: [/* @__PURE__ */ u("button", {
463
+ onClick: Q,
464
+ className: "flex-1 px-4 py-2 rounded-lg border border-border-default text-text-primary font-medium hover:bg-bg-sunken transition-colors",
465
+ children: C("auth.security.cancel", "Cancel")
466
+ }), /* @__PURE__ */ d("button", {
467
+ onClick: X,
468
+ disabled: !V || k,
469
+ className: "flex-1 px-4 py-2 rounded-lg bg-status-warning-bg text-white font-medium hover:bg-status-warning-bg-hover disabled:opacity-50 disabled:cursor-not-allowed transition-colors flex items-center justify-center gap-2",
470
+ children: [k && /* @__PURE__ */ u(b, { className: "w-4 h-4 animate-spin" }), C("auth.security.deactivateBtn", "Deactivate")]
471
+ })]
472
+ })
473
+ ]
474
+ })
475
+ }),
476
+ z && /* @__PURE__ */ u("div", {
477
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4",
478
+ children: /* @__PURE__ */ d("div", {
479
+ className: "w-full max-w-md bg-bg-surface rounded-2xl shadow-2xl p-6",
480
+ children: [
481
+ /* @__PURE__ */ u("h3", {
482
+ className: "text-xl font-bold text-status-error-text mb-2",
483
+ children: C("auth.security.deleteTitle", "Delete Account Permanently")
484
+ }),
485
+ /* @__PURE__ */ u("p", {
486
+ className: "text-sm text-text-secondary mb-4",
487
+ children: C("auth.security.deleteDesc", "This action is irreversible. All your data will be permanently deleted and cannot be recovered.")
488
+ }),
489
+ G && /* @__PURE__ */ u("div", {
490
+ className: "mb-4 p-3 rounded-lg bg-status-error-bg-subtle text-status-error-text text-sm",
491
+ children: G
492
+ }),
493
+ q && /* @__PURE__ */ u("div", {
494
+ className: "mb-4 p-3 rounded-lg bg-status-success-bg-subtle text-status-success-text text-sm",
495
+ children: q
496
+ }),
497
+ /* @__PURE__ */ d("div", {
498
+ className: "mb-4",
499
+ children: [/* @__PURE__ */ u("label", {
500
+ className: "block text-sm font-medium text-text-primary mb-1",
501
+ children: C("auth.security.enterPasswordDelete", "Enter your password")
502
+ }), /* @__PURE__ */ u("input", {
503
+ type: "password",
504
+ value: V,
505
+ onChange: (e) => H(e.target.value),
506
+ className: "w-full px-4 py-2 rounded-lg border border-border-default bg-bg-surface text-text-primary focus:ring-2 focus:ring-status-error-bg focus:border-transparent",
507
+ placeholder: C("auth.security.yourPassword", "Your password")
508
+ })]
509
+ }),
510
+ /* @__PURE__ */ d("div", {
511
+ className: "mb-4",
512
+ children: [/* @__PURE__ */ d("label", {
513
+ className: "block text-sm font-medium text-text-primary mb-1",
514
+ children: [
515
+ C("auth.security.type", "Type"),
516
+ " ",
517
+ /* @__PURE__ */ u("code", {
518
+ className: "px-1 py-0.5 rounded bg-bg-sunken text-status-error-text font-mono text-sm",
519
+ children: x
520
+ }),
521
+ " ",
522
+ C("auth.security.toConfirm", "to confirm")
523
+ ]
524
+ }), /* @__PURE__ */ u("input", {
525
+ type: "text",
526
+ value: U,
527
+ onChange: (e) => W(e.target.value),
528
+ className: "w-full px-4 py-2 rounded-lg border border-border-default bg-bg-surface text-text-primary focus:ring-2 focus:ring-status-error-bg focus:border-transparent font-mono",
529
+ placeholder: C("auth.security.deleteConfirmPlaceholder", "DELETE MY ACCOUNT")
530
+ })]
531
+ }),
532
+ /* @__PURE__ */ d("div", {
533
+ className: "flex gap-3",
534
+ children: [/* @__PURE__ */ u("button", {
535
+ onClick: Q,
536
+ className: "flex-1 px-4 py-2 rounded-lg border border-border-default text-text-primary font-medium hover:bg-bg-sunken transition-colors",
537
+ children: C("auth.security.cancel", "Cancel")
538
+ }), /* @__PURE__ */ d("button", {
539
+ onClick: Z,
540
+ disabled: !V || U !== x || A,
541
+ className: "flex-1 px-4 py-2 rounded-lg bg-status-error-bg text-white font-medium hover:bg-status-error-bg-hover disabled:opacity-50 disabled:cursor-not-allowed transition-colors flex items-center justify-center gap-2",
542
+ children: [A && /* @__PURE__ */ u(b, { className: "w-4 h-4 animate-spin" }), C("auth.security.deleteForever", "Delete Forever")]
543
+ })]
544
+ })
545
+ ]
546
+ })
547
+ }),
548
+ /* @__PURE__ */ u("footer", {
549
+ className: "mt-12 pt-6 border-t border-border-subtle ",
550
+ children: /* @__PURE__ */ d("div", {
551
+ className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 text-sm text-text-secondary ",
552
+ children: [/* @__PURE__ */ d("p", { children: [
553
+ C("auth.security.signedInAs", "Signed in as"),
554
+ " ",
555
+ /* @__PURE__ */ u("span", {
556
+ className: "font-medium text-text-primary ",
557
+ children: T?.email
558
+ })
559
+ ] }), /* @__PURE__ */ d("div", {
560
+ className: "flex items-center gap-4",
561
+ children: [
562
+ /* @__PURE__ */ u("button", {
563
+ onClick: () => w("/auth/login"),
564
+ className: "hover:text-text-primary transition-colors",
565
+ children: C("auth.security.switchAccount", "Switch Account")
566
+ }),
567
+ /* @__PURE__ */ u("span", {
568
+ className: "text-text-muted ",
569
+ children: "|"
570
+ }),
571
+ /* @__PURE__ */ u("button", {
572
+ onClick: () => P(!0),
573
+ className: "hover:text-status-error-text transition-colors",
574
+ children: C("auth.security.signOut", "Sign Out")
575
+ })
576
+ ]
577
+ })]
578
+ })
579
+ })
580
+ ]
581
+ })]
582
+ });
583
+ }
584
+ //#endregion
585
+ export { S as SecurityPage };
586
+
587
+ //# sourceMappingURL=SecurityPage.js.map