@authowl/react 0.21.1 → 0.21.2

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.
package/dist/index.js CHANGED
@@ -37,7 +37,7 @@ import {
37
37
  useT,
38
38
  useUser,
39
39
  useWaitlist
40
- } from "./chunk-K67DJJHP.js";
40
+ } from "./chunk-PUJV7S6G.js";
41
41
 
42
42
  // src/project-capabilities.ts
43
43
  import {
@@ -1374,8 +1374,25 @@ function InvitationBanner() {
1374
1374
  return /* @__PURE__ */ jsx17("p", { className: "ba-muted", "data-testid": "authowl-invitation-banner", children: t("organization.invitationBanner") });
1375
1375
  }
1376
1376
 
1377
+ // src/components/PublicConfigError.tsx
1378
+ import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
1379
+ function PublicConfigError({
1380
+ showBadge,
1381
+ showBranding = true
1382
+ }) {
1383
+ const t = useT();
1384
+ const { retry } = usePublicConfig();
1385
+ return /* @__PURE__ */ jsxs16("div", { className: "ba-form", "data-testid": "authowl-config-error", role: "alert", children: [
1386
+ showBranding ? /* @__PURE__ */ jsx18(AuthOwlBranding, {}) : null,
1387
+ /* @__PURE__ */ jsx18("h2", { className: "ba-title", children: t("publicConfig.error.title") }),
1388
+ /* @__PURE__ */ jsx18("p", { className: "ba-muted", children: t("publicConfig.error.description") }),
1389
+ /* @__PURE__ */ jsx18("button", { className: "ba-button", type: "button", onClick: retry, children: t("publicConfig.retry") }),
1390
+ /* @__PURE__ */ jsx18(AuthOwlBadge, { force: showBadge })
1391
+ ] });
1392
+ }
1393
+
1377
1394
  // src/components/SignIn.tsx
1378
- import { Fragment as Fragment4, jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
1395
+ import { Fragment as Fragment4, jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
1379
1396
  function SignIn({
1380
1397
  redirectTo,
1381
1398
  onSignedIn,
@@ -1417,41 +1434,44 @@ function SignIn({
1417
1434
  redirectTo,
1418
1435
  onSignedIn
1419
1436
  });
1420
- const badge = /* @__PURE__ */ jsx18(AuthOwlBadge, { force: showBadge });
1421
- const branding = showBranding ? /* @__PURE__ */ jsx18(AuthOwlBranding, {}) : null;
1437
+ const badge = /* @__PURE__ */ jsx19(AuthOwlBadge, { force: showBadge });
1438
+ const branding = showBranding ? /* @__PURE__ */ jsx19(AuthOwlBranding, {}) : null;
1422
1439
  if (isLoading) {
1423
- return /* @__PURE__ */ jsxs16("div", { className: "ba-form", "data-testid": "signin-loading", "aria-busy": "true", children: [
1424
- /* @__PURE__ */ jsx18("div", { className: "ba-skeleton" }),
1425
- /* @__PURE__ */ jsx18("div", { className: "ba-skeleton" })
1440
+ return /* @__PURE__ */ jsxs17("div", { className: "ba-form", "data-testid": "signin-loading", "aria-busy": "true", children: [
1441
+ /* @__PURE__ */ jsx19("div", { className: "ba-skeleton" }),
1442
+ /* @__PURE__ */ jsx19("div", { className: "ba-skeleton" })
1426
1443
  ] });
1427
1444
  }
1445
+ if (isError) {
1446
+ return /* @__PURE__ */ jsx19(PublicConfigError, { showBadge, showBranding });
1447
+ }
1428
1448
  if (mfaEnrolment !== "clear") {
1429
- return /* @__PURE__ */ jsxs16("div", { className: "ba-form", "data-testid": "signin-mfa-enrolment", "aria-busy": mfaEnrolment === "confirming", children: [
1449
+ return /* @__PURE__ */ jsxs17("div", { className: "ba-form", "data-testid": "signin-mfa-enrolment", "aria-busy": mfaEnrolment === "confirming", children: [
1430
1450
  branding,
1431
- mfaEnrolment === "pending" ? /* @__PURE__ */ jsx18(MfaEnrollmentStep, {}) : /* @__PURE__ */ jsx18("div", { className: "ba-skeleton" }),
1451
+ mfaEnrolment === "pending" ? /* @__PURE__ */ jsx19(MfaEnrollmentStep, {}) : /* @__PURE__ */ jsx19("div", { className: "ba-skeleton" }),
1432
1452
  badge
1433
1453
  ] });
1434
1454
  }
1435
1455
  if (challenge) {
1436
- return /* @__PURE__ */ jsxs16("div", { className: "ba-form", "data-testid": "signin-mfa", children: [
1456
+ return /* @__PURE__ */ jsxs17("div", { className: "ba-form", "data-testid": "signin-mfa", children: [
1437
1457
  branding,
1438
- /* @__PURE__ */ jsx18(MFAChallenge, { onVerified: () => finishSignIn({ sessionStore, redirectTo, onSignedIn }) }),
1458
+ /* @__PURE__ */ jsx19(MFAChallenge, { onVerified: () => finishSignIn({ sessionStore, redirectTo, onSignedIn }) }),
1439
1459
  badge
1440
1460
  ] });
1441
1461
  }
1442
1462
  if (view === "forgot" && resetPasswordUrl) {
1443
- return /* @__PURE__ */ jsxs16("div", { className: "ba-form", "data-testid": "signin-forgot", children: [
1463
+ return /* @__PURE__ */ jsxs17("div", { className: "ba-form", "data-testid": "signin-forgot", children: [
1444
1464
  branding,
1445
- /* @__PURE__ */ jsx18("h2", { className: "ba-title", children: t("signIn.forgotTitle") }),
1446
- /* @__PURE__ */ jsx18(ForgotPassword, { resetPasswordUrl, onBack: () => setView("sign-in") }),
1465
+ /* @__PURE__ */ jsx19("h2", { className: "ba-title", children: t("signIn.forgotTitle") }),
1466
+ /* @__PURE__ */ jsx19(ForgotPassword, { resetPasswordUrl, onBack: () => setView("sign-in") }),
1447
1467
  badge
1448
1468
  ] });
1449
1469
  }
1450
1470
  if (view === "otp-code") {
1451
- return /* @__PURE__ */ jsxs16("div", { className: "ba-form", "data-testid": "signin-otp-code", children: [
1471
+ return /* @__PURE__ */ jsxs17("div", { className: "ba-form", "data-testid": "signin-otp-code", children: [
1452
1472
  branding,
1453
- /* @__PURE__ */ jsx18("h2", { className: "ba-title", children: t("signIn.title") }),
1454
- /* @__PURE__ */ jsx18(
1473
+ /* @__PURE__ */ jsx19("h2", { className: "ba-title", children: t("signIn.title") }),
1474
+ /* @__PURE__ */ jsx19(
1455
1475
  OtpCodeForm,
1456
1476
  {
1457
1477
  email,
@@ -1477,18 +1497,18 @@ function SignIn({
1477
1497
  ] });
1478
1498
  }
1479
1499
  if (view === "magic-sent") {
1480
- return /* @__PURE__ */ jsxs16("div", { className: "ba-form", "data-testid": "signin-magic-sent", children: [
1500
+ return /* @__PURE__ */ jsxs17("div", { className: "ba-form", "data-testid": "signin-magic-sent", children: [
1481
1501
  branding,
1482
- /* @__PURE__ */ jsx18("h2", { className: "ba-title", children: t("signIn.title") }),
1483
- /* @__PURE__ */ jsx18("p", { className: "ba-muted", children: t("magicLink.sent") }),
1484
- /* @__PURE__ */ jsx18("button", { type: "button", className: "ba-link-button", onClick: () => setView("sign-in"), children: t("forgotPassword.backToSignIn") }),
1502
+ /* @__PURE__ */ jsx19("h2", { className: "ba-title", children: t("signIn.title") }),
1503
+ /* @__PURE__ */ jsx19("p", { className: "ba-muted", children: t("magicLink.sent") }),
1504
+ /* @__PURE__ */ jsx19("button", { type: "button", className: "ba-link-button", onClick: () => setView("sign-in"), children: t("forgotPassword.backToSignIn") }),
1485
1505
  badge
1486
1506
  ] });
1487
1507
  }
1488
1508
  if (view === "phone") {
1489
- return /* @__PURE__ */ jsxs16("div", { className: "ba-form", "data-testid": "signin-phone", children: [
1509
+ return /* @__PURE__ */ jsxs17("div", { className: "ba-form", "data-testid": "signin-phone", children: [
1490
1510
  branding,
1491
- /* @__PURE__ */ jsx18(
1511
+ /* @__PURE__ */ jsx19(
1492
1512
  PhoneOTP,
1493
1513
  {
1494
1514
  redirectTo,
@@ -1565,14 +1585,13 @@ function SignIn({
1565
1585
  { key: "otp", enabled: plan.emailOtp, action: doRequestOtp, label: t("emailOtp.requestSubmit"), pendingLabel: t("common.sending") },
1566
1586
  { key: "sso", enabled: plan.sso, action: doSso, label: t("sso.continueWith"), pendingLabel: t("sso.redirecting") }
1567
1587
  ];
1568
- return /* @__PURE__ */ jsxs16("div", { className: "ba-form", "data-testid": "signin-form", children: [
1588
+ return /* @__PURE__ */ jsxs17("div", { className: "ba-form", "data-testid": "signin-form", children: [
1569
1589
  branding,
1570
- /* @__PURE__ */ jsx18("h2", { className: "ba-title", children: t("signIn.title") }),
1571
- /* @__PURE__ */ jsx18(InvitationBanner, {}),
1572
- process.env.NODE_ENV !== "production" && isError && /* @__PURE__ */ jsx18("p", { className: "ba-muted", "data-testid": "signin-dev-config-notice", children: "AuthOwl (dev): couldn't load this project's config, so this is a password-only fallback that may not match the project's enabled sign-in methods. Check apiUrl / publishableKey; see the console for details." }),
1573
- /* @__PURE__ */ jsx18(SocialButtons, { providers: plan.social, callbackURL: redirectTo }),
1574
- showDivider && /* @__PURE__ */ jsx18("div", { className: "ba-divider", children: t("common.orDivider") }),
1575
- hasCredentialForm && /* @__PURE__ */ jsxs16(
1590
+ /* @__PURE__ */ jsx19("h2", { className: "ba-title", children: t("signIn.title") }),
1591
+ /* @__PURE__ */ jsx19(InvitationBanner, {}),
1592
+ /* @__PURE__ */ jsx19(SocialButtons, { providers: plan.social, callbackURL: redirectTo }),
1593
+ showDivider && /* @__PURE__ */ jsx19("div", { className: "ba-divider", children: t("common.orDivider") }),
1594
+ hasCredentialForm && /* @__PURE__ */ jsxs17(
1576
1595
  "form",
1577
1596
  {
1578
1597
  method: "post",
@@ -1583,9 +1602,9 @@ function SignIn({
1583
1602
  else if (plan.primary) PRIMARY_ACTION[plan.primary]();
1584
1603
  },
1585
1604
  children: [
1586
- credentialMode === "email" ? /* @__PURE__ */ jsxs16("label", { className: "ba-label", children: [
1605
+ credentialMode === "email" ? /* @__PURE__ */ jsxs17("label", { className: "ba-label", children: [
1587
1606
  t("common.emailLabel"),
1588
- /* @__PURE__ */ jsx18(
1607
+ /* @__PURE__ */ jsx19(
1589
1608
  "input",
1590
1609
  {
1591
1610
  ref: emailRef,
@@ -1600,9 +1619,9 @@ function SignIn({
1600
1619
  required: true
1601
1620
  }
1602
1621
  )
1603
- ] }) : /* @__PURE__ */ jsxs16("label", { className: "ba-label", children: [
1622
+ ] }) : /* @__PURE__ */ jsxs17("label", { className: "ba-label", children: [
1604
1623
  t("common.usernameLabel"),
1605
- /* @__PURE__ */ jsx18(
1624
+ /* @__PURE__ */ jsx19(
1606
1625
  "input",
1607
1626
  {
1608
1627
  className: "ba-input",
@@ -1617,9 +1636,9 @@ function SignIn({
1617
1636
  }
1618
1637
  )
1619
1638
  ] }),
1620
- plan.password && /* @__PURE__ */ jsxs16("label", { className: "ba-label", children: [
1639
+ plan.password && /* @__PURE__ */ jsxs17("label", { className: "ba-label", children: [
1621
1640
  t("common.passwordLabel"),
1622
- /* @__PURE__ */ jsx18(
1641
+ /* @__PURE__ */ jsx19(
1623
1642
  "input",
1624
1643
  {
1625
1644
  className: "ba-input",
@@ -1635,19 +1654,19 @@ function SignIn({
1635
1654
  )
1636
1655
  ] }),
1637
1656
  authChallenge.control,
1638
- /* @__PURE__ */ jsx18(FormError, { children: error }),
1639
- plan.password && /* @__PURE__ */ jsxs16(Fragment4, { children: [
1640
- /* @__PURE__ */ jsx18(
1657
+ /* @__PURE__ */ jsx19(FormError, { children: error }),
1658
+ plan.password && /* @__PURE__ */ jsxs17(Fragment4, { children: [
1659
+ /* @__PURE__ */ jsx19(
1641
1660
  "button",
1642
1661
  {
1643
1662
  className: "ba-button",
1644
1663
  type: "submit",
1645
1664
  disabled: pending || authChallenge.configPending,
1646
1665
  "aria-busy": pending && inFlight === "password" || void 0,
1647
- children: /* @__PURE__ */ jsx18(Busy, { busy: pending && inFlight === "password", label: t("signIn.submitPending"), children: t("signIn.submit") })
1666
+ children: /* @__PURE__ */ jsx19(Busy, { busy: pending && inFlight === "password", label: t("signIn.submitPending"), children: t("signIn.submit") })
1648
1667
  }
1649
1668
  ),
1650
- resetPasswordUrl && /* @__PURE__ */ jsx18(
1669
+ resetPasswordUrl && /* @__PURE__ */ jsx19(
1651
1670
  "button",
1652
1671
  {
1653
1672
  type: "button",
@@ -1659,7 +1678,7 @@ function SignIn({
1659
1678
  ] }),
1660
1679
  credentialMode === "email" && alternates.filter((a) => a.enabled).map(({ key, action, label: label2, pendingLabel }) => {
1661
1680
  const isPrimary = plan.primary === key;
1662
- return /* @__PURE__ */ jsx18(
1681
+ return /* @__PURE__ */ jsx19(
1663
1682
  "button",
1664
1683
  {
1665
1684
  type: isPrimary ? "submit" : "button",
@@ -1667,12 +1686,12 @@ function SignIn({
1667
1686
  disabled: pending || authChallenge.configPending,
1668
1687
  "aria-busy": pending && inFlight === key || void 0,
1669
1688
  onClick: isPrimary ? void 0 : withEmail(action),
1670
- children: /* @__PURE__ */ jsx18(Busy, { busy: pending && inFlight === key, label: pendingLabel, children: label2 })
1689
+ children: /* @__PURE__ */ jsx19(Busy, { busy: pending && inFlight === key, label: pendingLabel, children: label2 })
1671
1690
  },
1672
1691
  key
1673
1692
  );
1674
1693
  }),
1675
- plan.username && /* @__PURE__ */ jsx18(
1694
+ plan.username && /* @__PURE__ */ jsx19(
1676
1695
  "button",
1677
1696
  {
1678
1697
  type: "button",
@@ -1688,8 +1707,8 @@ function SignIn({
1688
1707
  ]
1689
1708
  }
1690
1709
  ),
1691
- plan.passkey && /* @__PURE__ */ jsx18(PasskeyButton, { redirectTo, onSignedIn }),
1692
- plan.phoneOtp && /* @__PURE__ */ jsx18(
1710
+ plan.passkey && /* @__PURE__ */ jsx19(PasskeyButton, { redirectTo, onSignedIn }),
1711
+ plan.phoneOtp && /* @__PURE__ */ jsx19(
1693
1712
  "button",
1694
1713
  {
1695
1714
  type: "button",
@@ -1698,7 +1717,7 @@ function SignIn({
1698
1717
  children: t("phoneOtp.usePhone")
1699
1718
  }
1700
1719
  ),
1701
- !plan.renderable && /* @__PURE__ */ jsx18("p", { className: "ba-muted", children: plan.emptyReason === "unsupported" ? t("signIn.empty.unsupported") : t("signIn.empty.none") }),
1720
+ !plan.renderable && /* @__PURE__ */ jsx19("p", { className: "ba-muted", children: plan.emptyReason === "unsupported" ? t("signIn.empty.unsupported") : t("signIn.empty.none") }),
1702
1721
  badge
1703
1722
  ] });
1704
1723
  }
@@ -1708,7 +1727,7 @@ import * as React17 from "react";
1708
1727
 
1709
1728
  // src/components/VerificationPending.tsx
1710
1729
  import * as React14 from "react";
1711
- import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
1730
+ import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
1712
1731
  function VerificationPending({
1713
1732
  email,
1714
1733
  callbackURL,
@@ -1726,10 +1745,10 @@ function VerificationPending({
1726
1745
  const [code, setCode] = React14.useState("");
1727
1746
  const [verified, setVerified] = React14.useState(false);
1728
1747
  if (verified) {
1729
- return /* @__PURE__ */ jsx19("p", { className: "ba-success", role: "status", "data-testid": "verify-code-success", children: t("verifyEmail.success") });
1748
+ return /* @__PURE__ */ jsx20("p", { className: "ba-success", role: "status", "data-testid": "verify-code-success", children: t("verifyEmail.success") });
1730
1749
  }
1731
1750
  if (method === "code") {
1732
- return /* @__PURE__ */ jsxs17(
1751
+ return /* @__PURE__ */ jsxs18(
1733
1752
  "form",
1734
1753
  {
1735
1754
  method: "post",
@@ -1746,12 +1765,12 @@ function VerificationPending({
1746
1765
  );
1747
1766
  },
1748
1767
  children: [
1749
- /* @__PURE__ */ jsx19("p", { className: "ba-muted", children: richMessage(t("verifyPending.codeBody"), {
1750
- email: /* @__PURE__ */ jsx19("strong", { children: /* @__PURE__ */ jsx19(Bidi, { children: email }) })
1768
+ /* @__PURE__ */ jsx20("p", { className: "ba-muted", children: richMessage(t("verifyPending.codeBody"), {
1769
+ email: /* @__PURE__ */ jsx20("strong", { children: /* @__PURE__ */ jsx20(Bidi, { children: email }) })
1751
1770
  }) }),
1752
- /* @__PURE__ */ jsxs17("label", { className: "ba-label", children: [
1771
+ /* @__PURE__ */ jsxs18("label", { className: "ba-label", children: [
1753
1772
  t("verifyPending.codeLabel"),
1754
- /* @__PURE__ */ jsx19(
1773
+ /* @__PURE__ */ jsx20(
1755
1774
  "input",
1756
1775
  {
1757
1776
  className: "ba-input",
@@ -1763,20 +1782,20 @@ function VerificationPending({
1763
1782
  }
1764
1783
  )
1765
1784
  ] }),
1766
- resent && /* @__PURE__ */ jsx19("p", { className: "ba-muted", children: t("verifyPending.resent") }),
1785
+ resent && /* @__PURE__ */ jsx20("p", { className: "ba-muted", children: t("verifyPending.resent") }),
1767
1786
  authChallenge.control,
1768
- /* @__PURE__ */ jsx19(FormError, { children: error }),
1769
- /* @__PURE__ */ jsx19(
1787
+ /* @__PURE__ */ jsx20(FormError, { children: error }),
1788
+ /* @__PURE__ */ jsx20(
1770
1789
  "button",
1771
1790
  {
1772
1791
  className: "ba-button",
1773
1792
  type: "submit",
1774
1793
  disabled: pending || !code,
1775
1794
  "aria-busy": pending || void 0,
1776
- children: /* @__PURE__ */ jsx19(Busy, { busy: pending, label: t("common.verifying"), children: t("emailOtp.verifySubmit") })
1795
+ children: /* @__PURE__ */ jsx20(Busy, { busy: pending, label: t("common.verifying"), children: t("emailOtp.verifySubmit") })
1777
1796
  }
1778
1797
  ),
1779
- /* @__PURE__ */ jsx19(
1798
+ /* @__PURE__ */ jsx20(
1780
1799
  "button",
1781
1800
  {
1782
1801
  type: "button",
@@ -1802,14 +1821,14 @@ function VerificationPending({
1802
1821
  }
1803
1822
  );
1804
1823
  }
1805
- return /* @__PURE__ */ jsxs17("div", { className: "ba-fields", "data-testid": "verify-pending", children: [
1806
- /* @__PURE__ */ jsx19("p", { className: "ba-muted", children: richMessage(t("verifyPending.body"), {
1807
- email: /* @__PURE__ */ jsx19("strong", { children: /* @__PURE__ */ jsx19(Bidi, { children: email }) })
1824
+ return /* @__PURE__ */ jsxs18("div", { className: "ba-fields", "data-testid": "verify-pending", children: [
1825
+ /* @__PURE__ */ jsx20("p", { className: "ba-muted", children: richMessage(t("verifyPending.body"), {
1826
+ email: /* @__PURE__ */ jsx20("strong", { children: /* @__PURE__ */ jsx20(Bidi, { children: email }) })
1808
1827
  }) }),
1809
- resent && /* @__PURE__ */ jsx19("p", { className: "ba-muted", children: t("verifyPending.resent") }),
1828
+ resent && /* @__PURE__ */ jsx20("p", { className: "ba-muted", children: t("verifyPending.resent") }),
1810
1829
  authChallenge.control,
1811
- /* @__PURE__ */ jsx19(FormError, { children: error }),
1812
- /* @__PURE__ */ jsx19(
1830
+ /* @__PURE__ */ jsx20(FormError, { children: error }),
1831
+ /* @__PURE__ */ jsx20(
1813
1832
  "button",
1814
1833
  {
1815
1834
  type: "button",
@@ -1820,7 +1839,7 @@ function VerificationPending({
1820
1839
  failure: t("verifyPending.error.resendFailed"),
1821
1840
  onSuccess: () => setResent(true)
1822
1841
  }),
1823
- children: /* @__PURE__ */ jsx19(Busy, { busy: pending, label: t("common.sending"), children: t("verifyPending.resendButton") })
1842
+ children: /* @__PURE__ */ jsx20(Busy, { busy: pending, label: t("common.sending"), children: t("verifyPending.resendButton") })
1824
1843
  }
1825
1844
  )
1826
1845
  ] });
@@ -1828,7 +1847,7 @@ function VerificationPending({
1828
1847
 
1829
1848
  // src/components/PasswordlessSignUp.tsx
1830
1849
  import * as React15 from "react";
1831
- import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
1850
+ import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
1832
1851
  function PasswordlessSignUp({ onAuthenticated }) {
1833
1852
  const t = useT();
1834
1853
  const { sendEmailOtp, signInEmailOtp } = useSignIn();
@@ -1838,7 +1857,7 @@ function PasswordlessSignUp({ onAuthenticated }) {
1838
1857
  const [code, setCode] = React15.useState("");
1839
1858
  const [codeSent, setCodeSent] = React15.useState(false);
1840
1859
  if (codeSent) {
1841
- return /* @__PURE__ */ jsx20("div", { className: "ba-fields", "data-testid": "signup-emailotp-code", children: /* @__PURE__ */ jsx20(
1860
+ return /* @__PURE__ */ jsx21("div", { className: "ba-fields", "data-testid": "signup-emailotp-code", children: /* @__PURE__ */ jsx21(
1842
1861
  OtpCodeForm,
1843
1862
  {
1844
1863
  email,
@@ -1858,7 +1877,7 @@ function PasswordlessSignUp({ onAuthenticated }) {
1858
1877
  }
1859
1878
  ) });
1860
1879
  }
1861
- return /* @__PURE__ */ jsxs18(
1880
+ return /* @__PURE__ */ jsxs19(
1862
1881
  "form",
1863
1882
  {
1864
1883
  method: "post",
@@ -1872,9 +1891,9 @@ function PasswordlessSignUp({ onAuthenticated }) {
1872
1891
  });
1873
1892
  },
1874
1893
  children: [
1875
- /* @__PURE__ */ jsxs18("label", { className: "ba-label", children: [
1894
+ /* @__PURE__ */ jsxs19("label", { className: "ba-label", children: [
1876
1895
  t("common.emailLabel"),
1877
- /* @__PURE__ */ jsx20(
1896
+ /* @__PURE__ */ jsx21(
1878
1897
  "input",
1879
1898
  {
1880
1899
  className: "ba-input",
@@ -1887,15 +1906,15 @@ function PasswordlessSignUp({ onAuthenticated }) {
1887
1906
  )
1888
1907
  ] }),
1889
1908
  authChallenge.control,
1890
- /* @__PURE__ */ jsx20(FormError, { children: error }),
1891
- /* @__PURE__ */ jsx20(
1909
+ /* @__PURE__ */ jsx21(FormError, { children: error }),
1910
+ /* @__PURE__ */ jsx21(
1892
1911
  "button",
1893
1912
  {
1894
1913
  className: "ba-button ba-button-secondary",
1895
1914
  type: "submit",
1896
1915
  disabled: pending || authChallenge.configPending,
1897
1916
  "aria-busy": pending || void 0,
1898
- children: /* @__PURE__ */ jsx20(Busy, { busy: pending, label: t("common.sending"), children: t("signUp.passwordlessSubmit") })
1917
+ children: /* @__PURE__ */ jsx21(Busy, { busy: pending, label: t("common.sending"), children: t("signUp.passwordlessSubmit") })
1899
1918
  }
1900
1919
  )
1901
1920
  ]
@@ -1904,16 +1923,16 @@ function PasswordlessSignUp({ onAuthenticated }) {
1904
1923
  }
1905
1924
 
1906
1925
  // src/components/PasskeySignUpCompletion.tsx
1907
- import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
1926
+ import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
1908
1927
  function PasskeySignUpCompletion({ onComplete }) {
1909
1928
  const t = useT();
1910
1929
  const { addPasskey } = usePasskeys();
1911
1930
  const { pending, error, run } = useSubmitAction();
1912
- return /* @__PURE__ */ jsxs19("div", { className: "ba-fields", "data-testid": "signup-passkey-completion", children: [
1913
- /* @__PURE__ */ jsx21("h3", { className: "ba-title", children: t("signUp.passkeyTitle") }),
1914
- /* @__PURE__ */ jsx21("p", { className: "ba-muted", children: t("signUp.passkeyDescription") }),
1915
- /* @__PURE__ */ jsx21(FormError, { children: error }),
1916
- /* @__PURE__ */ jsx21(
1931
+ return /* @__PURE__ */ jsxs20("div", { className: "ba-fields", "data-testid": "signup-passkey-completion", children: [
1932
+ /* @__PURE__ */ jsx22("h3", { className: "ba-title", children: t("signUp.passkeyTitle") }),
1933
+ /* @__PURE__ */ jsx22("p", { className: "ba-muted", children: t("signUp.passkeyDescription") }),
1934
+ /* @__PURE__ */ jsx22(FormError, { children: error }),
1935
+ /* @__PURE__ */ jsx22(
1917
1936
  "button",
1918
1937
  {
1919
1938
  className: "ba-button",
@@ -1924,16 +1943,16 @@ function PasskeySignUpCompletion({ onComplete }) {
1924
1943
  failure: t("signUp.error.passkeyFailed"),
1925
1944
  onSuccess: onComplete
1926
1945
  }),
1927
- children: /* @__PURE__ */ jsx21(Busy, { busy: pending, label: t("passkey.waiting"), children: t("signUp.passkeySubmit") })
1946
+ children: /* @__PURE__ */ jsx22(Busy, { busy: pending, label: t("passkey.waiting"), children: t("signUp.passkeySubmit") })
1928
1947
  }
1929
1948
  ),
1930
- /* @__PURE__ */ jsx21("button", { className: "ba-link-button", type: "button", disabled: pending, onClick: onComplete, children: t("signUp.passkeySkip") })
1949
+ /* @__PURE__ */ jsx22("button", { className: "ba-link-button", type: "button", disabled: pending, onClick: onComplete, children: t("signUp.passkeySkip") })
1931
1950
  ] });
1932
1951
  }
1933
1952
 
1934
1953
  // src/components/Waitlist.tsx
1935
1954
  import * as React16 from "react";
1936
- import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
1955
+ import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
1937
1956
  function Waitlist({ onJoined, showBadge, showBranding = true } = {}) {
1938
1957
  const t = useT();
1939
1958
  const { join } = useWaitlist();
@@ -1942,18 +1961,18 @@ function Waitlist({ onJoined, showBadge, showBranding = true } = {}) {
1942
1961
  const [email, setEmail] = React16.useState("");
1943
1962
  const [joined, setJoined] = React16.useState(false);
1944
1963
  if (joined) {
1945
- return /* @__PURE__ */ jsxs20("div", { className: "ba-form", "data-testid": "waitlist-accepted", children: [
1946
- showBranding ? /* @__PURE__ */ jsx22(AuthOwlBranding, {}) : null,
1947
- /* @__PURE__ */ jsx22("h2", { className: "ba-title", children: t("waitlist.acceptedTitle") }),
1948
- /* @__PURE__ */ jsx22("p", { className: "ba-muted", children: t("waitlist.acceptedDescription") }),
1949
- /* @__PURE__ */ jsx22(AuthOwlBadge, { force: showBadge })
1964
+ return /* @__PURE__ */ jsxs21("div", { className: "ba-form", "data-testid": "waitlist-accepted", children: [
1965
+ showBranding ? /* @__PURE__ */ jsx23(AuthOwlBranding, {}) : null,
1966
+ /* @__PURE__ */ jsx23("h2", { className: "ba-title", children: t("waitlist.acceptedTitle") }),
1967
+ /* @__PURE__ */ jsx23("p", { className: "ba-muted", children: t("waitlist.acceptedDescription") }),
1968
+ /* @__PURE__ */ jsx23(AuthOwlBadge, { force: showBadge })
1950
1969
  ] });
1951
1970
  }
1952
- return /* @__PURE__ */ jsxs20("div", { className: "ba-form", "data-testid": "waitlist-form", children: [
1953
- showBranding ? /* @__PURE__ */ jsx22(AuthOwlBranding, {}) : null,
1954
- /* @__PURE__ */ jsx22("h2", { className: "ba-title", children: t("waitlist.title") }),
1955
- /* @__PURE__ */ jsx22("p", { className: "ba-muted", children: t("waitlist.description") }),
1956
- /* @__PURE__ */ jsxs20(
1971
+ return /* @__PURE__ */ jsxs21("div", { className: "ba-form", "data-testid": "waitlist-form", children: [
1972
+ showBranding ? /* @__PURE__ */ jsx23(AuthOwlBranding, {}) : null,
1973
+ /* @__PURE__ */ jsx23("h2", { className: "ba-title", children: t("waitlist.title") }),
1974
+ /* @__PURE__ */ jsx23("p", { className: "ba-muted", children: t("waitlist.description") }),
1975
+ /* @__PURE__ */ jsxs21(
1957
1976
  "form",
1958
1977
  {
1959
1978
  method: "post",
@@ -1975,9 +1994,9 @@ function Waitlist({ onJoined, showBadge, showBranding = true } = {}) {
1975
1994
  );
1976
1995
  },
1977
1996
  children: [
1978
- /* @__PURE__ */ jsxs20("label", { className: "ba-label", children: [
1997
+ /* @__PURE__ */ jsxs21("label", { className: "ba-label", children: [
1979
1998
  t("common.emailLabel"),
1980
- /* @__PURE__ */ jsx22(
1999
+ /* @__PURE__ */ jsx23(
1981
2000
  "input",
1982
2001
  {
1983
2002
  className: "ba-input",
@@ -1991,26 +2010,26 @@ function Waitlist({ onJoined, showBadge, showBranding = true } = {}) {
1991
2010
  )
1992
2011
  ] }),
1993
2012
  authChallenge.control,
1994
- /* @__PURE__ */ jsx22(FormError, { children: error }),
1995
- /* @__PURE__ */ jsx22(
2013
+ /* @__PURE__ */ jsx23(FormError, { children: error }),
2014
+ /* @__PURE__ */ jsx23(
1996
2015
  "button",
1997
2016
  {
1998
2017
  className: "ba-button",
1999
2018
  type: "submit",
2000
2019
  disabled: pending || authChallenge.configPending,
2001
2020
  "aria-busy": pending || void 0,
2002
- children: /* @__PURE__ */ jsx22(Busy, { busy: pending, label: t("waitlist.submitPending"), children: t("waitlist.submit") })
2021
+ children: /* @__PURE__ */ jsx23(Busy, { busy: pending, label: t("waitlist.submitPending"), children: t("waitlist.submit") })
2003
2022
  }
2004
2023
  )
2005
2024
  ]
2006
2025
  }
2007
2026
  ),
2008
- /* @__PURE__ */ jsx22(AuthOwlBadge, { force: showBadge })
2027
+ /* @__PURE__ */ jsx23(AuthOwlBadge, { force: showBadge })
2009
2028
  ] });
2010
2029
  }
2011
2030
 
2012
2031
  // src/components/SignUp.tsx
2013
- import { Fragment as Fragment5, jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
2032
+ import { Fragment as Fragment5, jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
2014
2033
  function SignUp({
2015
2034
  redirectTo,
2016
2035
  onSignedUp,
@@ -2022,7 +2041,7 @@ function SignUp({
2022
2041
  const t = useT();
2023
2042
  const toServerError = useServerError();
2024
2043
  const { signUp } = useSignUp();
2025
- const { config, isLoading } = usePublicConfig();
2044
+ const { config, isLoading, isError } = usePublicConfig();
2026
2045
  const authChallenge = useAuthChallenge();
2027
2046
  const [email, setEmail] = React17.useState("");
2028
2047
  const [password, setPassword] = React17.useState("");
@@ -2094,18 +2113,21 @@ function SignUp({
2094
2113
  }
2095
2114
  }
2096
2115
  if (isLoading) {
2097
- return /* @__PURE__ */ jsxs21("div", { className: "ba-form", "data-testid": "signup-loading", "aria-busy": "true", children: [
2098
- /* @__PURE__ */ jsx23("div", { className: "ba-skeleton" }),
2099
- /* @__PURE__ */ jsx23("div", { className: "ba-skeleton" })
2116
+ return /* @__PURE__ */ jsxs22("div", { className: "ba-form", "data-testid": "signup-loading", "aria-busy": "true", children: [
2117
+ /* @__PURE__ */ jsx24("div", { className: "ba-skeleton" }),
2118
+ /* @__PURE__ */ jsx24("div", { className: "ba-skeleton" })
2100
2119
  ] });
2101
2120
  }
2121
+ if (isError) {
2122
+ return /* @__PURE__ */ jsx24(PublicConfigError, { showBadge, showBranding });
2123
+ }
2102
2124
  if (config?.signUp?.mode === "waitlist") {
2103
- return /* @__PURE__ */ jsx23(Waitlist, { onJoined: onWaitlisted, showBadge, showBranding });
2125
+ return /* @__PURE__ */ jsx24(Waitlist, { onJoined: onWaitlisted, showBadge, showBranding });
2104
2126
  }
2105
2127
  if (pendingEmail) {
2106
- return /* @__PURE__ */ jsxs21("div", { className: "ba-form", "data-testid": "signup-verify-pending", children: [
2107
- showBranding ? /* @__PURE__ */ jsx23(AuthOwlBranding, {}) : null,
2108
- /* @__PURE__ */ jsx23(
2128
+ return /* @__PURE__ */ jsxs22("div", { className: "ba-form", "data-testid": "signup-verify-pending", children: [
2129
+ showBranding ? /* @__PURE__ */ jsx24(AuthOwlBranding, {}) : null,
2130
+ /* @__PURE__ */ jsx24(
2109
2131
  VerificationPending,
2110
2132
  {
2111
2133
  email: pendingEmail,
@@ -2113,7 +2135,7 @@ function SignUp({
2113
2135
  method: capabilities.emailVerificationMethod
2114
2136
  }
2115
2137
  ),
2116
- /* @__PURE__ */ jsx23(AuthOwlBadge, { force: showBadge })
2138
+ /* @__PURE__ */ jsx24(AuthOwlBadge, { force: showBadge })
2117
2139
  ] });
2118
2140
  }
2119
2141
  const methods = config?.enabledMethods ?? ["password"];
@@ -2123,22 +2145,22 @@ function SignUp({
2123
2145
  const showPasswordless = publicSignupAllowed && capabilities.emailOtpSignIn && capabilities.emailSignUp && !consentRequired && !capabilities.mfaRequired;
2124
2146
  const renderable = showPassword || showPasswordless || social.length > 0;
2125
2147
  if (completeWithPasskey) {
2126
- return /* @__PURE__ */ jsxs21("div", { className: "ba-form", "data-testid": "signup-passkey-step", children: [
2127
- showBranding ? /* @__PURE__ */ jsx23(AuthOwlBranding, {}) : null,
2128
- /* @__PURE__ */ jsx23(PasskeySignUpCompletion, { onComplete: finishSignUp }),
2129
- /* @__PURE__ */ jsx23(AuthOwlBadge, { force: showBadge })
2148
+ return /* @__PURE__ */ jsxs22("div", { className: "ba-form", "data-testid": "signup-passkey-step", children: [
2149
+ showBranding ? /* @__PURE__ */ jsx24(AuthOwlBranding, {}) : null,
2150
+ /* @__PURE__ */ jsx24(PasskeySignUpCompletion, { onComplete: finishSignUp }),
2151
+ /* @__PURE__ */ jsx24(AuthOwlBadge, { force: showBadge })
2130
2152
  ] });
2131
2153
  }
2132
- return /* @__PURE__ */ jsxs21("div", { className: "ba-form", "data-testid": "signup-form", children: [
2133
- showBranding ? /* @__PURE__ */ jsx23(AuthOwlBranding, {}) : null,
2134
- /* @__PURE__ */ jsx23("h2", { className: "ba-title", children: t("signUp.title") }),
2135
- /* @__PURE__ */ jsx23(InvitationBanner, {}),
2136
- /* @__PURE__ */ jsx23(SocialButtons, { providers: social, callbackURL: redirectTo }),
2137
- showPassword && social.length > 0 && /* @__PURE__ */ jsx23("div", { className: "ba-divider", children: t("common.orDivider") }),
2138
- showPassword && /* @__PURE__ */ jsxs21("form", { method: "post", onSubmit, className: "ba-fields", children: [
2139
- capabilities.legacyNameField && /* @__PURE__ */ jsxs21("label", { className: "ba-label", children: [
2154
+ return /* @__PURE__ */ jsxs22("div", { className: "ba-form", "data-testid": "signup-form", children: [
2155
+ showBranding ? /* @__PURE__ */ jsx24(AuthOwlBranding, {}) : null,
2156
+ /* @__PURE__ */ jsx24("h2", { className: "ba-title", children: t("signUp.title") }),
2157
+ /* @__PURE__ */ jsx24(InvitationBanner, {}),
2158
+ /* @__PURE__ */ jsx24(SocialButtons, { providers: social, callbackURL: redirectTo }),
2159
+ showPassword && social.length > 0 && /* @__PURE__ */ jsx24("div", { className: "ba-divider", children: t("common.orDivider") }),
2160
+ showPassword && /* @__PURE__ */ jsxs22("form", { method: "post", onSubmit, className: "ba-fields", children: [
2161
+ capabilities.legacyNameField && /* @__PURE__ */ jsxs22("label", { className: "ba-label", children: [
2140
2162
  t("signUp.nameLabel"),
2141
- /* @__PURE__ */ jsx23(
2163
+ /* @__PURE__ */ jsx24(
2142
2164
  "input",
2143
2165
  {
2144
2166
  className: "ba-input",
@@ -2152,10 +2174,10 @@ function SignUp({
2152
2174
  }
2153
2175
  )
2154
2176
  ] }),
2155
- capabilities.firstLastName && /* @__PURE__ */ jsxs21(Fragment5, { children: [
2156
- /* @__PURE__ */ jsxs21("label", { className: "ba-label", children: [
2177
+ capabilities.firstLastName && /* @__PURE__ */ jsxs22(Fragment5, { children: [
2178
+ /* @__PURE__ */ jsxs22("label", { className: "ba-label", children: [
2157
2179
  t("signUp.firstNameLabel"),
2158
- /* @__PURE__ */ jsx23(
2180
+ /* @__PURE__ */ jsx24(
2159
2181
  "input",
2160
2182
  {
2161
2183
  className: "ba-input",
@@ -2168,9 +2190,9 @@ function SignUp({
2168
2190
  }
2169
2191
  )
2170
2192
  ] }),
2171
- /* @__PURE__ */ jsxs21("label", { className: "ba-label", children: [
2193
+ /* @__PURE__ */ jsxs22("label", { className: "ba-label", children: [
2172
2194
  t("signUp.lastNameLabel"),
2173
- /* @__PURE__ */ jsx23(
2195
+ /* @__PURE__ */ jsx24(
2174
2196
  "input",
2175
2197
  {
2176
2198
  className: "ba-input",
@@ -2184,9 +2206,9 @@ function SignUp({
2184
2206
  )
2185
2207
  ] })
2186
2208
  ] }),
2187
- capabilities.collectUsername && /* @__PURE__ */ jsxs21("label", { className: "ba-label", children: [
2209
+ capabilities.collectUsername && /* @__PURE__ */ jsxs22("label", { className: "ba-label", children: [
2188
2210
  t("common.usernameLabel"),
2189
- /* @__PURE__ */ jsx23(
2211
+ /* @__PURE__ */ jsx24(
2190
2212
  "input",
2191
2213
  {
2192
2214
  className: "ba-input",
@@ -2200,9 +2222,9 @@ function SignUp({
2200
2222
  }
2201
2223
  )
2202
2224
  ] }),
2203
- /* @__PURE__ */ jsxs21("label", { className: "ba-label", children: [
2225
+ /* @__PURE__ */ jsxs22("label", { className: "ba-label", children: [
2204
2226
  t("common.emailLabel"),
2205
- /* @__PURE__ */ jsx23(
2227
+ /* @__PURE__ */ jsx24(
2206
2228
  "input",
2207
2229
  {
2208
2230
  className: "ba-input",
@@ -2217,9 +2239,9 @@ function SignUp({
2217
2239
  }
2218
2240
  )
2219
2241
  ] }),
2220
- /* @__PURE__ */ jsxs21("label", { className: "ba-label", children: [
2242
+ /* @__PURE__ */ jsxs22("label", { className: "ba-label", children: [
2221
2243
  t("common.passwordLabel"),
2222
- /* @__PURE__ */ jsx23(
2244
+ /* @__PURE__ */ jsx24(
2223
2245
  "input",
2224
2246
  {
2225
2247
  className: "ba-input",
@@ -2237,7 +2259,7 @@ function SignUp({
2237
2259
  )
2238
2260
  ] }),
2239
2261
  authChallenge.control,
2240
- legal && /* @__PURE__ */ jsx23(
2262
+ legal && /* @__PURE__ */ jsx24(
2241
2263
  LegalConsentCheckbox,
2242
2264
  {
2243
2265
  legal,
@@ -2246,20 +2268,20 @@ function SignUp({
2246
2268
  testId: "signup-consent"
2247
2269
  }
2248
2270
  ),
2249
- /* @__PURE__ */ jsx23(FormError, { children: error }),
2250
- /* @__PURE__ */ jsx23(
2271
+ /* @__PURE__ */ jsx24(FormError, { children: error }),
2272
+ /* @__PURE__ */ jsx24(
2251
2273
  "button",
2252
2274
  {
2253
2275
  className: "ba-button",
2254
2276
  type: "submit",
2255
2277
  disabled: submitting || consentBlocked || authChallenge.configPending,
2256
2278
  "aria-busy": submitting || void 0,
2257
- children: /* @__PURE__ */ jsx23(Busy, { busy: submitting, label: t("signUp.submitPending"), children: t("signUp.submit") })
2279
+ children: /* @__PURE__ */ jsx24(Busy, { busy: submitting, label: t("signUp.submitPending"), children: t("signUp.submit") })
2258
2280
  }
2259
2281
  )
2260
2282
  ] }),
2261
- showPasswordless && (showPassword || social.length > 0) && /* @__PURE__ */ jsx23("div", { className: "ba-divider", children: t("common.orDivider") }),
2262
- showPasswordless && /* @__PURE__ */ jsx23(
2283
+ showPasswordless && (showPassword || social.length > 0) && /* @__PURE__ */ jsx24("div", { className: "ba-divider", children: t("common.orDivider") }),
2284
+ showPasswordless && /* @__PURE__ */ jsx24(
2263
2285
  PasswordlessSignUp,
2264
2286
  {
2265
2287
  onAuthenticated: () => {
@@ -2268,25 +2290,25 @@ function SignUp({
2268
2290
  }
2269
2291
  }
2270
2292
  ),
2271
- !renderable && /* @__PURE__ */ jsx23("p", { className: "ba-muted", children: publicSignupAllowed && methods.length > 0 ? t("signUp.empty.unsupported") : t("signUp.empty.none") }),
2272
- /* @__PURE__ */ jsx23(AuthOwlBadge, { force: showBadge })
2293
+ !renderable && /* @__PURE__ */ jsx24("p", { className: "ba-muted", children: publicSignupAllowed && methods.length > 0 ? t("signUp.empty.unsupported") : t("signUp.empty.none") }),
2294
+ /* @__PURE__ */ jsx24(AuthOwlBadge, { force: showBadge })
2273
2295
  ] });
2274
2296
  }
2275
2297
 
2276
2298
  // src/components/ConsentGate.tsx
2277
- import { Fragment as Fragment6, jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
2299
+ import { Fragment as Fragment6, jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
2278
2300
  function ConsentGate({ children, title }) {
2279
2301
  const t = useT();
2280
2302
  const { needsConsent, status, accept } = useConsent();
2281
2303
  const { pending, error, run } = useSubmitAction();
2282
- if (!needsConsent) return /* @__PURE__ */ jsx24(Fragment6, { children });
2283
- return /* @__PURE__ */ jsxs22("div", { className: "ba-form", "data-testid": "consent-gate", children: [
2284
- /* @__PURE__ */ jsx24("h2", { className: "ba-title", children: title ?? t("consent.gateTitle") }),
2285
- /* @__PURE__ */ jsx24("p", { className: "ba-muted", children: richMessage(t("consent.gateBody"), {
2286
- links: /* @__PURE__ */ jsx24(ConsentDocLinks, { termsUrl: status?.termsUrl, privacyUrl: status?.privacyUrl })
2304
+ if (!needsConsent) return /* @__PURE__ */ jsx25(Fragment6, { children });
2305
+ return /* @__PURE__ */ jsxs23("div", { className: "ba-form", "data-testid": "consent-gate", children: [
2306
+ /* @__PURE__ */ jsx25("h2", { className: "ba-title", children: title ?? t("consent.gateTitle") }),
2307
+ /* @__PURE__ */ jsx25("p", { className: "ba-muted", children: richMessage(t("consent.gateBody"), {
2308
+ links: /* @__PURE__ */ jsx25(ConsentDocLinks, { termsUrl: status?.termsUrl, privacyUrl: status?.privacyUrl })
2287
2309
  }) }),
2288
- /* @__PURE__ */ jsx24(FormError, { children: error }),
2289
- /* @__PURE__ */ jsx24(
2310
+ /* @__PURE__ */ jsx25(FormError, { children: error }),
2311
+ /* @__PURE__ */ jsx25(
2290
2312
  "button",
2291
2313
  {
2292
2314
  className: "ba-button",
@@ -2300,28 +2322,28 @@ function ConsentGate({ children, title }) {
2300
2322
  },
2301
2323
  { failure: t("consent.error.acceptFailed") }
2302
2324
  ),
2303
- children: /* @__PURE__ */ jsx24(Busy, { busy: pending, label: t("consent.acceptPending"), children: t("consent.acceptSubmit") })
2325
+ children: /* @__PURE__ */ jsx25(Busy, { busy: pending, label: t("consent.acceptPending"), children: t("consent.acceptSubmit") })
2304
2326
  }
2305
2327
  ),
2306
- /* @__PURE__ */ jsx24(AuthOwlBadge, {})
2328
+ /* @__PURE__ */ jsx25(AuthOwlBadge, {})
2307
2329
  ] });
2308
2330
  }
2309
2331
 
2310
2332
  // src/components/MFARequiredGate.tsx
2311
- import { Fragment as Fragment7, jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
2333
+ import { Fragment as Fragment7, jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
2312
2334
  function MFARequiredGate({ children, title }) {
2313
2335
  const state = useConfirmedMfaPending();
2314
- if (state === "clear") return /* @__PURE__ */ jsx25(Fragment7, { children });
2336
+ if (state === "clear") return /* @__PURE__ */ jsx26(Fragment7, { children });
2315
2337
  if (state === "confirming") return null;
2316
- return /* @__PURE__ */ jsxs23("div", { className: "ba-form", "data-testid": "mfa-required-gate", children: [
2317
- /* @__PURE__ */ jsx25(MfaEnrollmentStep, { title }),
2318
- /* @__PURE__ */ jsx25(AuthOwlBadge, {})
2338
+ return /* @__PURE__ */ jsxs24("div", { className: "ba-form", "data-testid": "mfa-required-gate", children: [
2339
+ /* @__PURE__ */ jsx26(MfaEnrollmentStep, { title }),
2340
+ /* @__PURE__ */ jsx26(AuthOwlBadge, {})
2319
2341
  ] });
2320
2342
  }
2321
2343
 
2322
2344
  // src/components/BackupCodesManager.tsx
2323
2345
  import * as React18 from "react";
2324
- import { Fragment as Fragment8, jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
2346
+ import { Fragment as Fragment8, jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
2325
2347
  function BackupCodesManager({ title }) {
2326
2348
  const t = useT();
2327
2349
  const { user } = useUser();
@@ -2340,20 +2362,20 @@ function BackupCodesManager({ title }) {
2340
2362
  }
2341
2363
  });
2342
2364
  };
2343
- return /* @__PURE__ */ jsxs24("div", { className: "ba-form", "data-testid": "backup-codes-manager", children: [
2344
- title !== null && /* @__PURE__ */ jsx26("h2", { className: "ba-title", children: title ?? t("backupCodes.title") }),
2345
- /* @__PURE__ */ jsx26("p", { className: "ba-muted", children: t("backupCodes.hint") }),
2346
- codes ? /* @__PURE__ */ jsxs24(Fragment8, { children: [
2347
- /* @__PURE__ */ jsxs24("p", { className: "ba-muted", children: [
2348
- /* @__PURE__ */ jsx26("strong", { children: t("mfa.enroll.backupCodesWarningStrong") }),
2365
+ return /* @__PURE__ */ jsxs25("div", { className: "ba-form", "data-testid": "backup-codes-manager", children: [
2366
+ title !== null && /* @__PURE__ */ jsx27("h2", { className: "ba-title", children: title ?? t("backupCodes.title") }),
2367
+ /* @__PURE__ */ jsx27("p", { className: "ba-muted", children: t("backupCodes.hint") }),
2368
+ codes ? /* @__PURE__ */ jsxs25(Fragment8, { children: [
2369
+ /* @__PURE__ */ jsxs25("p", { className: "ba-muted", children: [
2370
+ /* @__PURE__ */ jsx27("strong", { children: t("mfa.enroll.backupCodesWarningStrong") }),
2349
2371
  " ",
2350
2372
  t("mfa.enroll.backupCodesWarningRest")
2351
2373
  ] }),
2352
- /* @__PURE__ */ jsx26("ul", { className: "ba-passkey-list", "data-testid": "backup-codes-list", children: codes.map((c) => /* @__PURE__ */ jsx26("li", { className: "ba-passkey-item", children: /* @__PURE__ */ jsx26("code", { children: /* @__PURE__ */ jsx26("bdi", { children: c }) }) }, c)) })
2353
- ] }) : /* @__PURE__ */ jsxs24("form", { method: "post", className: "ba-fields", onSubmit: submit, children: [
2354
- /* @__PURE__ */ jsxs24("label", { className: "ba-label", children: [
2374
+ /* @__PURE__ */ jsx27("ul", { className: "ba-passkey-list", "data-testid": "backup-codes-list", children: codes.map((c) => /* @__PURE__ */ jsx27("li", { className: "ba-passkey-item", children: /* @__PURE__ */ jsx27("code", { children: /* @__PURE__ */ jsx27("bdi", { children: c }) }) }, c)) })
2375
+ ] }) : /* @__PURE__ */ jsxs25("form", { method: "post", className: "ba-fields", onSubmit: submit, children: [
2376
+ /* @__PURE__ */ jsxs25("label", { className: "ba-label", children: [
2355
2377
  t("common.passwordLabel"),
2356
- /* @__PURE__ */ jsx26(
2378
+ /* @__PURE__ */ jsx27(
2357
2379
  "input",
2358
2380
  {
2359
2381
  className: "ba-input",
@@ -2365,15 +2387,15 @@ function BackupCodesManager({ title }) {
2365
2387
  }
2366
2388
  )
2367
2389
  ] }),
2368
- /* @__PURE__ */ jsx26(FormError, { children: error }),
2369
- /* @__PURE__ */ jsx26("button", { className: "ba-button", type: "submit", disabled: pending || !password, "aria-busy": pending || void 0, children: /* @__PURE__ */ jsx26(Busy, { busy: pending, label: t("backupCodes.pending"), children: t("backupCodes.submit") }) })
2390
+ /* @__PURE__ */ jsx27(FormError, { children: error }),
2391
+ /* @__PURE__ */ jsx27("button", { className: "ba-button", type: "submit", disabled: pending || !password, "aria-busy": pending || void 0, children: /* @__PURE__ */ jsx27(Busy, { busy: pending, label: t("backupCodes.pending"), children: t("backupCodes.submit") }) })
2370
2392
  ] })
2371
2393
  ] });
2372
2394
  }
2373
2395
 
2374
2396
  // src/components/MagicLinkForm.tsx
2375
2397
  import * as React19 from "react";
2376
- import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
2398
+ import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
2377
2399
  function MagicLinkForm({ callbackURL, webauthnAutofill }) {
2378
2400
  const t = useT();
2379
2401
  const { signInMagicLink } = useSignIn();
@@ -2382,9 +2404,9 @@ function MagicLinkForm({ callbackURL, webauthnAutofill }) {
2382
2404
  const [email, setEmail] = React19.useState("");
2383
2405
  const [sent, setSent] = React19.useState(false);
2384
2406
  if (sent) {
2385
- return /* @__PURE__ */ jsx27("p", { className: "ba-muted", "data-testid": "magiclink-sent", children: t("magicLink.sent") });
2407
+ return /* @__PURE__ */ jsx28("p", { className: "ba-muted", "data-testid": "magiclink-sent", children: t("magicLink.sent") });
2386
2408
  }
2387
- return /* @__PURE__ */ jsxs25(
2409
+ return /* @__PURE__ */ jsxs26(
2388
2410
  "form",
2389
2411
  {
2390
2412
  method: "post",
@@ -2398,9 +2420,9 @@ function MagicLinkForm({ callbackURL, webauthnAutofill }) {
2398
2420
  className: "ba-fields",
2399
2421
  "data-testid": "magiclink-form",
2400
2422
  children: [
2401
- /* @__PURE__ */ jsxs25("label", { className: "ba-label", children: [
2423
+ /* @__PURE__ */ jsxs26("label", { className: "ba-label", children: [
2402
2424
  t("common.emailLabel"),
2403
- /* @__PURE__ */ jsx27(
2425
+ /* @__PURE__ */ jsx28(
2404
2426
  "input",
2405
2427
  {
2406
2428
  className: "ba-input",
@@ -2413,15 +2435,15 @@ function MagicLinkForm({ callbackURL, webauthnAutofill }) {
2413
2435
  )
2414
2436
  ] }),
2415
2437
  authChallenge.control,
2416
- /* @__PURE__ */ jsx27(FormError, { children: error }),
2417
- /* @__PURE__ */ jsx27(
2438
+ /* @__PURE__ */ jsx28(FormError, { children: error }),
2439
+ /* @__PURE__ */ jsx28(
2418
2440
  "button",
2419
2441
  {
2420
2442
  className: "ba-button",
2421
2443
  type: "submit",
2422
2444
  disabled: pending || authChallenge.configPending,
2423
2445
  "aria-busy": pending || void 0,
2424
- children: /* @__PURE__ */ jsx27(Busy, { busy: pending, label: t("common.sending"), children: t("magicLink.submit") })
2446
+ children: /* @__PURE__ */ jsx28(Busy, { busy: pending, label: t("common.sending"), children: t("magicLink.submit") })
2425
2447
  }
2426
2448
  )
2427
2449
  ]
@@ -2431,7 +2453,7 @@ function MagicLinkForm({ callbackURL, webauthnAutofill }) {
2431
2453
 
2432
2454
  // src/components/EmailOtpForm.tsx
2433
2455
  import * as React20 from "react";
2434
- import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
2456
+ import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
2435
2457
  function EmailOtpForm({ redirectTo, onSignedIn, webauthnAutofill }) {
2436
2458
  const t = useT();
2437
2459
  const { sessionStore } = useAuthClient();
@@ -2442,7 +2464,7 @@ function EmailOtpForm({ redirectTo, onSignedIn, webauthnAutofill }) {
2442
2464
  const [otp, setOtp] = React20.useState("");
2443
2465
  const [stage, setStage] = React20.useState("email");
2444
2466
  if (stage === "code") {
2445
- return /* @__PURE__ */ jsx28(
2467
+ return /* @__PURE__ */ jsx29(
2446
2468
  OtpCodeForm,
2447
2469
  {
2448
2470
  email,
@@ -2465,7 +2487,7 @@ function EmailOtpForm({ redirectTo, onSignedIn, webauthnAutofill }) {
2465
2487
  }
2466
2488
  );
2467
2489
  }
2468
- return /* @__PURE__ */ jsxs26(
2490
+ return /* @__PURE__ */ jsxs27(
2469
2491
  "form",
2470
2492
  {
2471
2493
  method: "post",
@@ -2479,9 +2501,9 @@ function EmailOtpForm({ redirectTo, onSignedIn, webauthnAutofill }) {
2479
2501
  className: "ba-fields",
2480
2502
  "data-testid": "emailotp-email",
2481
2503
  children: [
2482
- /* @__PURE__ */ jsxs26("label", { className: "ba-label", children: [
2504
+ /* @__PURE__ */ jsxs27("label", { className: "ba-label", children: [
2483
2505
  t("common.emailLabel"),
2484
- /* @__PURE__ */ jsx28(
2506
+ /* @__PURE__ */ jsx29(
2485
2507
  "input",
2486
2508
  {
2487
2509
  className: "ba-input",
@@ -2497,15 +2519,15 @@ function EmailOtpForm({ redirectTo, onSignedIn, webauthnAutofill }) {
2497
2519
  )
2498
2520
  ] }),
2499
2521
  authChallenge.control,
2500
- /* @__PURE__ */ jsx28(FormError, { children: error }),
2501
- /* @__PURE__ */ jsx28(
2522
+ /* @__PURE__ */ jsx29(FormError, { children: error }),
2523
+ /* @__PURE__ */ jsx29(
2502
2524
  "button",
2503
2525
  {
2504
2526
  className: "ba-button",
2505
2527
  type: "submit",
2506
2528
  disabled: pending || authChallenge.configPending,
2507
2529
  "aria-busy": pending || void 0,
2508
- children: /* @__PURE__ */ jsx28(Busy, { busy: pending, label: t("common.sending"), children: t("emailOtp.requestSubmit") })
2530
+ children: /* @__PURE__ */ jsx29(Busy, { busy: pending, label: t("common.sending"), children: t("emailOtp.requestSubmit") })
2509
2531
  }
2510
2532
  )
2511
2533
  ]
@@ -2515,7 +2537,7 @@ function EmailOtpForm({ redirectTo, onSignedIn, webauthnAutofill }) {
2515
2537
 
2516
2538
  // src/components/ResetPassword.tsx
2517
2539
  import * as React21 from "react";
2518
- import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
2540
+ import { jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
2519
2541
  function ResetPassword({ token: tokenProp, redirectTo, onReset }) {
2520
2542
  const t = useT();
2521
2543
  const { resetPassword } = usePasswordReset();
@@ -2535,15 +2557,15 @@ function ResetPassword({ token: tokenProp, redirectTo, onReset }) {
2535
2557
  setReady(true);
2536
2558
  }, [tokenProp]);
2537
2559
  if (!ready) {
2538
- return /* @__PURE__ */ jsx29("div", { className: "ba-form", "aria-busy": "true", children: /* @__PURE__ */ jsx29("div", { className: "ba-skeleton" }) });
2560
+ return /* @__PURE__ */ jsx30("div", { className: "ba-form", "aria-busy": "true", children: /* @__PURE__ */ jsx30("div", { className: "ba-skeleton" }) });
2539
2561
  }
2540
2562
  if (!token) {
2541
- return /* @__PURE__ */ jsx29(FormError, { "data-testid": "reset-invalid", children: t("resetPassword.invalidLink") });
2563
+ return /* @__PURE__ */ jsx30(FormError, { "data-testid": "reset-invalid", children: t("resetPassword.invalidLink") });
2542
2564
  }
2543
2565
  if (done) {
2544
- return /* @__PURE__ */ jsx29("p", { className: "ba-muted", "data-testid": "reset-done", children: t("resetPassword.done") });
2566
+ return /* @__PURE__ */ jsx30("p", { className: "ba-muted", "data-testid": "reset-done", children: t("resetPassword.done") });
2545
2567
  }
2546
- return /* @__PURE__ */ jsxs27(
2568
+ return /* @__PURE__ */ jsxs28(
2547
2569
  "form",
2548
2570
  {
2549
2571
  method: "post",
@@ -2569,9 +2591,9 @@ function ResetPassword({ token: tokenProp, redirectTo, onReset }) {
2569
2591
  });
2570
2592
  },
2571
2593
  children: [
2572
- /* @__PURE__ */ jsxs27("label", { className: "ba-label", children: [
2594
+ /* @__PURE__ */ jsxs28("label", { className: "ba-label", children: [
2573
2595
  t("resetPassword.newPasswordLabel"),
2574
- /* @__PURE__ */ jsx29(
2596
+ /* @__PURE__ */ jsx30(
2575
2597
  "input",
2576
2598
  {
2577
2599
  className: "ba-input",
@@ -2588,9 +2610,9 @@ function ResetPassword({ token: tokenProp, redirectTo, onReset }) {
2588
2610
  }
2589
2611
  )
2590
2612
  ] }),
2591
- /* @__PURE__ */ jsxs27("label", { className: "ba-label", children: [
2613
+ /* @__PURE__ */ jsxs28("label", { className: "ba-label", children: [
2592
2614
  t("resetPassword.confirmPasswordLabel"),
2593
- /* @__PURE__ */ jsx29(
2615
+ /* @__PURE__ */ jsx30(
2594
2616
  "input",
2595
2617
  {
2596
2618
  className: "ba-input",
@@ -2607,8 +2629,8 @@ function ResetPassword({ token: tokenProp, redirectTo, onReset }) {
2607
2629
  }
2608
2630
  )
2609
2631
  ] }),
2610
- /* @__PURE__ */ jsx29(FormError, { children: error }),
2611
- /* @__PURE__ */ jsx29("button", { className: "ba-button", type: "submit", disabled: pending, "aria-busy": pending || void 0, children: /* @__PURE__ */ jsx29(Busy, { busy: pending, label: t("resetPassword.submitPending"), children: t("resetPassword.submit") }) })
2632
+ /* @__PURE__ */ jsx30(FormError, { children: error }),
2633
+ /* @__PURE__ */ jsx30("button", { className: "ba-button", type: "submit", disabled: pending, "aria-busy": pending || void 0, children: /* @__PURE__ */ jsx30(Busy, { busy: pending, label: t("resetPassword.submitPending"), children: t("resetPassword.submit") }) })
2612
2634
  ]
2613
2635
  }
2614
2636
  );
@@ -2616,7 +2638,7 @@ function ResetPassword({ token: tokenProp, redirectTo, onReset }) {
2616
2638
 
2617
2639
  // src/components/VerifyEmail.tsx
2618
2640
  import * as React22 from "react";
2619
- import { Fragment as Fragment9, jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
2641
+ import { Fragment as Fragment9, jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
2620
2642
  function VerifyEmail({ redirectTo, onVerified, callbackURL }) {
2621
2643
  const t = useT();
2622
2644
  const { sendVerificationEmail } = useEmailVerification();
@@ -2636,12 +2658,12 @@ function VerifyEmail({ redirectTo, onVerified, callbackURL }) {
2636
2658
  }
2637
2659
  }, [onVerified, redirectTo]);
2638
2660
  if (!ready) {
2639
- return /* @__PURE__ */ jsx30("div", { className: "ba-form", "aria-busy": "true", children: /* @__PURE__ */ jsx30("div", { className: "ba-skeleton" }) });
2661
+ return /* @__PURE__ */ jsx31("div", { className: "ba-form", "aria-busy": "true", children: /* @__PURE__ */ jsx31("div", { className: "ba-skeleton" }) });
2640
2662
  }
2641
2663
  if (!failed) {
2642
- return /* @__PURE__ */ jsx30("p", { className: "ba-muted", "data-testid": "verify-success", children: t("verifyEmail.success") });
2664
+ return /* @__PURE__ */ jsx31("p", { className: "ba-muted", "data-testid": "verify-success", children: t("verifyEmail.success") });
2643
2665
  }
2644
- return /* @__PURE__ */ jsxs28(
2666
+ return /* @__PURE__ */ jsxs29(
2645
2667
  "form",
2646
2668
  {
2647
2669
  method: "post",
@@ -2656,11 +2678,11 @@ function VerifyEmail({ redirectTo, onVerified, callbackURL }) {
2656
2678
  });
2657
2679
  },
2658
2680
  children: [
2659
- /* @__PURE__ */ jsx30(FormError, { children: t("verifyEmail.invalidLink") }),
2660
- resent ? /* @__PURE__ */ jsx30("p", { className: "ba-muted", children: richMessage(t("verifyEmail.resent"), { email: /* @__PURE__ */ jsx30(Bidi, { children: email }) }) }) : /* @__PURE__ */ jsxs28(Fragment9, { children: [
2661
- /* @__PURE__ */ jsxs28("label", { className: "ba-label", children: [
2681
+ /* @__PURE__ */ jsx31(FormError, { children: t("verifyEmail.invalidLink") }),
2682
+ resent ? /* @__PURE__ */ jsx31("p", { className: "ba-muted", children: richMessage(t("verifyEmail.resent"), { email: /* @__PURE__ */ jsx31(Bidi, { children: email }) }) }) : /* @__PURE__ */ jsxs29(Fragment9, { children: [
2683
+ /* @__PURE__ */ jsxs29("label", { className: "ba-label", children: [
2662
2684
  t("common.emailLabel"),
2663
- /* @__PURE__ */ jsx30(
2685
+ /* @__PURE__ */ jsx31(
2664
2686
  "input",
2665
2687
  {
2666
2688
  className: "ba-input",
@@ -2673,15 +2695,15 @@ function VerifyEmail({ redirectTo, onVerified, callbackURL }) {
2673
2695
  )
2674
2696
  ] }),
2675
2697
  authChallenge.control,
2676
- /* @__PURE__ */ jsx30(FormError, { children: error }),
2677
- /* @__PURE__ */ jsx30(
2698
+ /* @__PURE__ */ jsx31(FormError, { children: error }),
2699
+ /* @__PURE__ */ jsx31(
2678
2700
  "button",
2679
2701
  {
2680
2702
  className: "ba-button",
2681
2703
  type: "submit",
2682
2704
  disabled: pending || authChallenge.configPending,
2683
2705
  "aria-busy": pending || void 0,
2684
- children: /* @__PURE__ */ jsx30(Busy, { busy: pending, label: t("common.sending"), children: t("verifyEmail.resendSubmit") })
2706
+ children: /* @__PURE__ */ jsx31(Busy, { busy: pending, label: t("common.sending"), children: t("verifyEmail.resendSubmit") })
2685
2707
  }
2686
2708
  )
2687
2709
  ] })
@@ -2692,17 +2714,17 @@ function VerifyEmail({ redirectTo, onVerified, callbackURL }) {
2692
2714
 
2693
2715
  // src/components/PasskeyManager.tsx
2694
2716
  import * as React23 from "react";
2695
- import { jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
2717
+ import { jsx as jsx32, jsxs as jsxs30 } from "react/jsx-runtime";
2696
2718
  function PasskeyManager({ title, allowAdd = true } = {}) {
2697
2719
  const t = useT();
2698
2720
  const { user, isLoaded, isSignedIn } = useUser();
2699
2721
  if (!isLoaded) {
2700
- return /* @__PURE__ */ jsx31("div", { className: "ba-form", "data-testid": "passkey-manager-loading", "aria-busy": "true", children: /* @__PURE__ */ jsx31("div", { className: "ba-skeleton" }) });
2722
+ return /* @__PURE__ */ jsx32("div", { className: "ba-form", "data-testid": "passkey-manager-loading", "aria-busy": "true", children: /* @__PURE__ */ jsx32("div", { className: "ba-skeleton" }) });
2701
2723
  }
2702
2724
  if (!isSignedIn || !user) {
2703
- return /* @__PURE__ */ jsx31("p", { className: "ba-muted", children: t("passkeys.signedOut") });
2725
+ return /* @__PURE__ */ jsx32("p", { className: "ba-muted", children: t("passkeys.signedOut") });
2704
2726
  }
2705
- return /* @__PURE__ */ jsx31(PasskeyManagerBody, { title, allowAdd }, user.id);
2727
+ return /* @__PURE__ */ jsx32(PasskeyManagerBody, { title, allowAdd }, user.id);
2706
2728
  }
2707
2729
  function PasskeyManagerBody({
2708
2730
  title,
@@ -2751,13 +2773,13 @@ function PasskeyManagerBody({
2751
2773
  onSuccess: load
2752
2774
  });
2753
2775
  }
2754
- return /* @__PURE__ */ jsxs29("div", { className: "ba-form", "data-testid": "passkey-manager", children: [
2755
- title !== null && /* @__PURE__ */ jsx31("h2", { className: "ba-title", children: title ?? t("passkeys.title") }),
2756
- passkeys === null ? error ? null : /* @__PURE__ */ jsx31("div", { className: "ba-skeleton" }) : /* @__PURE__ */ jsxs29("ul", { className: "ba-passkey-list", children: [
2757
- (passkeys ?? []).map((pk) => /* @__PURE__ */ jsxs29("li", { className: "ba-passkey-item", children: [
2758
- /* @__PURE__ */ jsx31("span", { className: "ba-passkey-name", children: pk.name?.trim() || t("passkeys.unnamed") }),
2759
- /* @__PURE__ */ jsxs29("span", { className: "ba-passkey-actions", children: [
2760
- /* @__PURE__ */ jsx31(
2776
+ return /* @__PURE__ */ jsxs30("div", { className: "ba-form", "data-testid": "passkey-manager", children: [
2777
+ title !== null && /* @__PURE__ */ jsx32("h2", { className: "ba-title", children: title ?? t("passkeys.title") }),
2778
+ passkeys === null ? error ? null : /* @__PURE__ */ jsx32("div", { className: "ba-skeleton" }) : /* @__PURE__ */ jsxs30("ul", { className: "ba-passkey-list", children: [
2779
+ (passkeys ?? []).map((pk) => /* @__PURE__ */ jsxs30("li", { className: "ba-passkey-item", children: [
2780
+ /* @__PURE__ */ jsx32("span", { className: "ba-passkey-name", children: pk.name?.trim() || t("passkeys.unnamed") }),
2781
+ /* @__PURE__ */ jsxs30("span", { className: "ba-passkey-actions", children: [
2782
+ /* @__PURE__ */ jsx32(
2761
2783
  "button",
2762
2784
  {
2763
2785
  type: "button",
@@ -2767,7 +2789,7 @@ function PasskeyManagerBody({
2767
2789
  children: t("passkeys.rename")
2768
2790
  }
2769
2791
  ),
2770
- /* @__PURE__ */ jsx31(
2792
+ /* @__PURE__ */ jsx32(
2771
2793
  "button",
2772
2794
  {
2773
2795
  type: "button",
@@ -2779,13 +2801,13 @@ function PasskeyManagerBody({
2779
2801
  )
2780
2802
  ] })
2781
2803
  ] }, pk.id)),
2782
- passkeys !== null && passkeys.length === 0 && /* @__PURE__ */ jsx31("li", { className: "ba-muted", children: t("passkeys.empty") })
2804
+ passkeys !== null && passkeys.length === 0 && /* @__PURE__ */ jsx32("li", { className: "ba-muted", children: t("passkeys.empty") })
2783
2805
  ] }),
2784
- error && /* @__PURE__ */ jsxs29("div", { className: "ba-inline-error", children: [
2785
- /* @__PURE__ */ jsx31(FormError, { children: error }),
2786
- passkeys === null && /* @__PURE__ */ jsx31("button", { className: "ba-link-button", type: "button", onClick: () => void load(), children: t("userProfile.retry") })
2806
+ error && /* @__PURE__ */ jsxs30("div", { className: "ba-inline-error", children: [
2807
+ /* @__PURE__ */ jsx32(FormError, { children: error }),
2808
+ passkeys === null && /* @__PURE__ */ jsx32("button", { className: "ba-link-button", type: "button", onClick: () => void load(), children: t("userProfile.retry") })
2787
2809
  ] }),
2788
- passkeys !== null && allowAdd && /* @__PURE__ */ jsx31(
2810
+ passkeys !== null && allowAdd && /* @__PURE__ */ jsx32(
2789
2811
  "button",
2790
2812
  {
2791
2813
  className: "ba-button",
@@ -2796,7 +2818,7 @@ function PasskeyManagerBody({
2796
2818
  failure: t("passkeys.error.addFailed"),
2797
2819
  onSuccess: load
2798
2820
  }),
2799
- children: /* @__PURE__ */ jsx31(Busy, { busy: pending, label: t("common.working"), children: t("passkeys.add") })
2821
+ children: /* @__PURE__ */ jsx32(Busy, { busy: pending, label: t("common.working"), children: t("passkeys.add") })
2800
2822
  }
2801
2823
  )
2802
2824
  ] });
@@ -2804,14 +2826,14 @@ function PasskeyManagerBody({
2804
2826
 
2805
2827
  // src/components/control.tsx
2806
2828
  import { membershipHas } from "@authowl/core";
2807
- import { Fragment as Fragment10, jsx as jsx32, jsxs as jsxs30 } from "react/jsx-runtime";
2829
+ import { Fragment as Fragment10, jsx as jsx33, jsxs as jsxs31 } from "react/jsx-runtime";
2808
2830
  function SignedIn({ children }) {
2809
2831
  const { isLoaded, isSignedIn } = useUser();
2810
- return isLoaded && isSignedIn ? /* @__PURE__ */ jsx32(Fragment10, { children }) : null;
2832
+ return isLoaded && isSignedIn ? /* @__PURE__ */ jsx33(Fragment10, { children }) : null;
2811
2833
  }
2812
2834
  function SignedOut({ children }) {
2813
2835
  const { isLoaded, isSignedIn } = useUser();
2814
- return isLoaded && !isSignedIn ? /* @__PURE__ */ jsx32(Fragment10, { children }) : null;
2836
+ return isLoaded && !isSignedIn ? /* @__PURE__ */ jsx33(Fragment10, { children }) : null;
2815
2837
  }
2816
2838
  function Protect({
2817
2839
  children,
@@ -2824,36 +2846,36 @@ function Protect({
2824
2846
  const { user, isLoaded, isSignedIn } = useUser();
2825
2847
  const membership = useSession().data?.session?.membership ?? null;
2826
2848
  if (!isLoaded) return null;
2827
- if (!isSignedIn || !user) return /* @__PURE__ */ jsx32(Fragment10, { children: fallback });
2849
+ if (!isSignedIn || !user) return /* @__PURE__ */ jsx33(Fragment10, { children: fallback });
2828
2850
  if ((role !== void 0 || permission !== void 0 || teamId !== void 0) && !membershipHas(membership, { role, permission, teamId })) {
2829
- return /* @__PURE__ */ jsx32(Fragment10, { children: fallback });
2851
+ return /* @__PURE__ */ jsx33(Fragment10, { children: fallback });
2830
2852
  }
2831
- if (condition && !condition(user)) return /* @__PURE__ */ jsx32(Fragment10, { children: fallback });
2832
- return /* @__PURE__ */ jsx32(Fragment10, { children });
2853
+ if (condition && !condition(user)) return /* @__PURE__ */ jsx33(Fragment10, { children: fallback });
2854
+ return /* @__PURE__ */ jsx33(Fragment10, { children });
2833
2855
  }
2834
2856
  function AuthLoading({ children }) {
2835
2857
  const t = useT();
2836
2858
  const { isLoaded } = useUser();
2837
2859
  if (isLoaded) return null;
2838
- if (children !== void 0) return /* @__PURE__ */ jsx32(Fragment10, { children });
2839
- return /* @__PURE__ */ jsxs30("div", { className: "ba-auth-loading", role: "status", "aria-busy": "true", "data-testid": "auth-loading", children: [
2840
- /* @__PURE__ */ jsx32(Spinner, {}),
2841
- /* @__PURE__ */ jsx32("span", { className: "ba-sr-only", children: t("common.loading") })
2860
+ if (children !== void 0) return /* @__PURE__ */ jsx33(Fragment10, { children });
2861
+ return /* @__PURE__ */ jsxs31("div", { className: "ba-auth-loading", role: "status", "aria-busy": "true", "data-testid": "auth-loading", children: [
2862
+ /* @__PURE__ */ jsx33(Spinner, {}),
2863
+ /* @__PURE__ */ jsx33("span", { className: "ba-sr-only", children: t("common.loading") })
2842
2864
  ] });
2843
2865
  }
2844
2866
  function AuthLoaded({ children }) {
2845
- return useUser().isLoaded ? /* @__PURE__ */ jsx32(Fragment10, { children }) : null;
2867
+ return useUser().isLoaded ? /* @__PURE__ */ jsx33(Fragment10, { children }) : null;
2846
2868
  }
2847
2869
 
2848
2870
  // src/components/SignOutButton.tsx
2849
2871
  import * as React24 from "react";
2850
- import { jsx as jsx33 } from "react/jsx-runtime";
2872
+ import { jsx as jsx34 } from "react/jsx-runtime";
2851
2873
  function SignOutButton({ children, redirectTo, onSignedOut, className }) {
2852
2874
  const t = useT();
2853
2875
  const { signOut } = useSignOut();
2854
2876
  const [pending, setPending] = React24.useState(false);
2855
2877
  const content = children ?? t("signOut.button");
2856
- return /* @__PURE__ */ jsx33(
2878
+ return /* @__PURE__ */ jsx34(
2857
2879
  "button",
2858
2880
  {
2859
2881
  type: "button",
@@ -2871,7 +2893,7 @@ function SignOutButton({ children, redirectTo, onSignedOut, className }) {
2871
2893
  setPending(false);
2872
2894
  }
2873
2895
  },
2874
- children: /* @__PURE__ */ jsx33(Busy, { busy: pending, label: content, children: content })
2896
+ children: /* @__PURE__ */ jsx34(Busy, { busy: pending, label: content, children: content })
2875
2897
  }
2876
2898
  );
2877
2899
  }
@@ -2884,7 +2906,7 @@ import * as React36 from "react";
2884
2906
 
2885
2907
  // src/components/user-profile/EmailSection.tsx
2886
2908
  import * as React25 from "react";
2887
- import { jsx as jsx34, jsxs as jsxs31 } from "react/jsx-runtime";
2909
+ import { jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
2888
2910
  function EmailSection({ allowChange }) {
2889
2911
  const t = useT();
2890
2912
  const account = useAccount();
@@ -2894,9 +2916,9 @@ function EmailSection({ allowChange }) {
2894
2916
  const [sent, setSent] = React25.useState(false);
2895
2917
  const titleId = React25.useId();
2896
2918
  if (!user?.email) {
2897
- return /* @__PURE__ */ jsxs31("section", { className: "ba-profile-section", "aria-labelledby": titleId, children: [
2898
- /* @__PURE__ */ jsx34("h2", { id: titleId, className: "ba-title", children: t("userProfile.email.title") }),
2899
- /* @__PURE__ */ jsx34("p", { className: "ba-muted", children: t("userProfile.email.unavailable") })
2919
+ return /* @__PURE__ */ jsxs32("section", { className: "ba-profile-section", "aria-labelledby": titleId, children: [
2920
+ /* @__PURE__ */ jsx35("h2", { id: titleId, className: "ba-title", children: t("userProfile.email.title") }),
2921
+ /* @__PURE__ */ jsx35("p", { className: "ba-muted", children: t("userProfile.email.unavailable") })
2900
2922
  ] });
2901
2923
  }
2902
2924
  const submit = (event) => {
@@ -2916,19 +2938,19 @@ function EmailSection({ allowChange }) {
2916
2938
  }
2917
2939
  );
2918
2940
  };
2919
- return /* @__PURE__ */ jsxs31("section", { className: "ba-profile-section", "aria-labelledby": titleId, children: [
2920
- /* @__PURE__ */ jsxs31("header", { className: "ba-profile-section-header", children: [
2921
- /* @__PURE__ */ jsx34("h2", { id: titleId, className: "ba-title", children: t("userProfile.email.title") }),
2922
- /* @__PURE__ */ jsx34("p", { className: "ba-muted", children: t("userProfile.email.description") })
2941
+ return /* @__PURE__ */ jsxs32("section", { className: "ba-profile-section", "aria-labelledby": titleId, children: [
2942
+ /* @__PURE__ */ jsxs32("header", { className: "ba-profile-section-header", children: [
2943
+ /* @__PURE__ */ jsx35("h2", { id: titleId, className: "ba-title", children: t("userProfile.email.title") }),
2944
+ /* @__PURE__ */ jsx35("p", { className: "ba-muted", children: t("userProfile.email.description") })
2923
2945
  ] }),
2924
- /* @__PURE__ */ jsxs31("p", { className: "ba-profile-current", children: [
2925
- /* @__PURE__ */ jsx34("span", { children: t("userProfile.email.current") }),
2926
- /* @__PURE__ */ jsx34("strong", { children: /* @__PURE__ */ jsx34(Bidi, { children: user.email }) })
2946
+ /* @__PURE__ */ jsxs32("p", { className: "ba-profile-current", children: [
2947
+ /* @__PURE__ */ jsx35("span", { children: t("userProfile.email.current") }),
2948
+ /* @__PURE__ */ jsx35("strong", { children: /* @__PURE__ */ jsx35(Bidi, { children: user.email }) })
2927
2949
  ] }),
2928
- !allowChange ? /* @__PURE__ */ jsx34("p", { className: "ba-muted", "data-testid": "email-change-disabled", children: t("userProfile.email.changeDisabled") }) : /* @__PURE__ */ jsxs31("form", { method: "post", className: "ba-fields", onSubmit: submit, children: [
2929
- /* @__PURE__ */ jsxs31("label", { className: "ba-label", children: [
2950
+ !allowChange ? /* @__PURE__ */ jsx35("p", { className: "ba-muted", "data-testid": "email-change-disabled", children: t("userProfile.email.changeDisabled") }) : /* @__PURE__ */ jsxs32("form", { method: "post", className: "ba-fields", onSubmit: submit, children: [
2951
+ /* @__PURE__ */ jsxs32("label", { className: "ba-label", children: [
2930
2952
  t("userProfile.email.newLabel"),
2931
- /* @__PURE__ */ jsx34(
2953
+ /* @__PURE__ */ jsx35(
2932
2954
  "input",
2933
2955
  {
2934
2956
  className: "ba-input",
@@ -2940,16 +2962,16 @@ function EmailSection({ allowChange }) {
2940
2962
  }
2941
2963
  )
2942
2964
  ] }),
2943
- /* @__PURE__ */ jsx34(FormError, { children: error }),
2944
- sent && /* @__PURE__ */ jsx34("p", { className: "ba-success", role: "status", children: t("userProfile.email.sent") }),
2945
- /* @__PURE__ */ jsx34(
2965
+ /* @__PURE__ */ jsx35(FormError, { children: error }),
2966
+ sent && /* @__PURE__ */ jsx35("p", { className: "ba-success", role: "status", children: t("userProfile.email.sent") }),
2967
+ /* @__PURE__ */ jsx35(
2946
2968
  "button",
2947
2969
  {
2948
2970
  className: "ba-button ba-profile-submit",
2949
2971
  type: "submit",
2950
2972
  disabled: pending || !newEmail.trim(),
2951
2973
  "aria-busy": pending || void 0,
2952
- children: /* @__PURE__ */ jsx34(Busy, { busy: pending, label: t("common.sending"), children: t("userProfile.email.submit") })
2974
+ children: /* @__PURE__ */ jsx35(Busy, { busy: pending, label: t("common.sending"), children: t("userProfile.email.submit") })
2953
2975
  }
2954
2976
  )
2955
2977
  ] })
@@ -2958,7 +2980,7 @@ function EmailSection({ allowChange }) {
2958
2980
 
2959
2981
  // src/components/user-profile/DeleteAccountSection.tsx
2960
2982
  import * as React26 from "react";
2961
- import { jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
2983
+ import { jsx as jsx36, jsxs as jsxs33 } from "react/jsx-runtime";
2962
2984
  function DeleteAccountSection({ onDeleted }) {
2963
2985
  const t = useT();
2964
2986
  const account = useAccount();
@@ -2983,18 +3005,18 @@ function DeleteAccountSection({ onDeleted }) {
2983
3005
  }
2984
3006
  );
2985
3007
  };
2986
- return /* @__PURE__ */ jsxs32("section", { className: "ba-profile-section ba-profile-danger-zone", "aria-labelledby": titleId, children: [
2987
- /* @__PURE__ */ jsxs32("header", { className: "ba-profile-section-header", children: [
2988
- /* @__PURE__ */ jsx35("h2", { id: titleId, className: "ba-title", children: t("userProfile.delete.title") }),
2989
- /* @__PURE__ */ jsx35("p", { className: "ba-muted", children: t("userProfile.delete.description") })
3008
+ return /* @__PURE__ */ jsxs33("section", { className: "ba-profile-section ba-profile-danger-zone", "aria-labelledby": titleId, children: [
3009
+ /* @__PURE__ */ jsxs33("header", { className: "ba-profile-section-header", children: [
3010
+ /* @__PURE__ */ jsx36("h2", { id: titleId, className: "ba-title", children: t("userProfile.delete.title") }),
3011
+ /* @__PURE__ */ jsx36("p", { className: "ba-muted", children: t("userProfile.delete.description") })
2990
3012
  ] }),
2991
- /* @__PURE__ */ jsxs32("form", { method: "post", className: "ba-fields", onSubmit: submit, children: [
2992
- /* @__PURE__ */ jsx35("p", { className: "ba-profile-delete-warning", children: t("userProfile.delete.warning", { identifier }) }),
2993
- /* @__PURE__ */ jsxs32("label", { className: "ba-label", children: [
3013
+ /* @__PURE__ */ jsxs33("form", { method: "post", className: "ba-fields", onSubmit: submit, children: [
3014
+ /* @__PURE__ */ jsx36("p", { className: "ba-profile-delete-warning", children: t("userProfile.delete.warning", { identifier }) }),
3015
+ /* @__PURE__ */ jsxs33("label", { className: "ba-label", children: [
2994
3016
  t("userProfile.delete.confirmLabel"),
2995
3017
  " ",
2996
- /* @__PURE__ */ jsx35(Bidi, { children: identifier }),
2997
- /* @__PURE__ */ jsx35(
3018
+ /* @__PURE__ */ jsx36(Bidi, { children: identifier }),
3019
+ /* @__PURE__ */ jsx36(
2998
3020
  "input",
2999
3021
  {
3000
3022
  className: "ba-input",
@@ -3008,15 +3030,15 @@ function DeleteAccountSection({ onDeleted }) {
3008
3030
  }
3009
3031
  )
3010
3032
  ] }),
3011
- /* @__PURE__ */ jsx35(FormError, { children: error }),
3012
- /* @__PURE__ */ jsx35(
3033
+ /* @__PURE__ */ jsx36(FormError, { children: error }),
3034
+ /* @__PURE__ */ jsx36(
3013
3035
  "button",
3014
3036
  {
3015
3037
  className: "ba-button ba-danger-button ba-profile-submit",
3016
3038
  type: "submit",
3017
3039
  disabled: pending || !confirmed,
3018
3040
  "aria-busy": pending || void 0,
3019
- children: /* @__PURE__ */ jsx35(Busy, { busy: pending, label: t("common.working"), children: t("userProfile.delete.submit") })
3041
+ children: /* @__PURE__ */ jsx36(Busy, { busy: pending, label: t("common.working"), children: t("userProfile.delete.submit") })
3020
3042
  }
3021
3043
  )
3022
3044
  ] })
@@ -3025,7 +3047,7 @@ function DeleteAccountSection({ onDeleted }) {
3025
3047
 
3026
3048
  // src/components/user-profile/MfaSection.tsx
3027
3049
  import * as React27 from "react";
3028
- import { jsx as jsx36, jsxs as jsxs33 } from "react/jsx-runtime";
3050
+ import { jsx as jsx37, jsxs as jsxs34 } from "react/jsx-runtime";
3029
3051
  function MfaSection() {
3030
3052
  const t = useT();
3031
3053
  const { user } = useUser();
@@ -3038,12 +3060,12 @@ function MfaSection() {
3038
3060
  const titleId = React27.useId();
3039
3061
  const required = resolveProjectCapabilities(config).mfaRequired;
3040
3062
  if (!user?.twoFactorEnabled) {
3041
- return /* @__PURE__ */ jsxs33("section", { className: "ba-profile-section", "aria-labelledby": titleId, children: [
3042
- /* @__PURE__ */ jsxs33("header", { className: "ba-profile-section-header", children: [
3043
- /* @__PURE__ */ jsx36("h2", { id: titleId, className: "ba-title", children: t("userProfile.mfa.title") }),
3044
- /* @__PURE__ */ jsx36("p", { className: "ba-muted", children: required ? t("userProfile.mfa.requiredDescription") : t("userProfile.mfa.description") })
3063
+ return /* @__PURE__ */ jsxs34("section", { className: "ba-profile-section", "aria-labelledby": titleId, children: [
3064
+ /* @__PURE__ */ jsxs34("header", { className: "ba-profile-section-header", children: [
3065
+ /* @__PURE__ */ jsx37("h2", { id: titleId, className: "ba-title", children: t("userProfile.mfa.title") }),
3066
+ /* @__PURE__ */ jsx37("p", { className: "ba-muted", children: required ? t("userProfile.mfa.requiredDescription") : t("userProfile.mfa.description") })
3045
3067
  ] }),
3046
- /* @__PURE__ */ jsx36(
3068
+ /* @__PURE__ */ jsx37(
3047
3069
  MFAEnrollment,
3048
3070
  {
3049
3071
  title: null,
@@ -3066,16 +3088,16 @@ function MfaSection() {
3066
3088
  }
3067
3089
  );
3068
3090
  };
3069
- return /* @__PURE__ */ jsxs33("section", { className: "ba-profile-section", "aria-labelledby": titleId, children: [
3070
- /* @__PURE__ */ jsxs33("header", { className: "ba-profile-section-header", children: [
3071
- /* @__PURE__ */ jsx36("h2", { id: titleId, className: "ba-title", children: t("userProfile.mfa.title") }),
3072
- /* @__PURE__ */ jsx36("p", { className: "ba-muted", children: required ? t("userProfile.mfa.requiredActive") : t("userProfile.mfa.active") })
3091
+ return /* @__PURE__ */ jsxs34("section", { className: "ba-profile-section", "aria-labelledby": titleId, children: [
3092
+ /* @__PURE__ */ jsxs34("header", { className: "ba-profile-section-header", children: [
3093
+ /* @__PURE__ */ jsx37("h2", { id: titleId, className: "ba-title", children: t("userProfile.mfa.title") }),
3094
+ /* @__PURE__ */ jsx37("p", { className: "ba-muted", children: required ? t("userProfile.mfa.requiredActive") : t("userProfile.mfa.active") })
3073
3095
  ] }),
3074
- /* @__PURE__ */ jsxs33("div", { className: "ba-profile-status", role: "status", children: [
3075
- /* @__PURE__ */ jsx36("strong", { children: t("userProfile.mfa.enabled") }),
3076
- /* @__PURE__ */ jsx36("span", { children: t("userProfile.mfa.authenticator") })
3096
+ /* @__PURE__ */ jsxs34("div", { className: "ba-profile-status", role: "status", children: [
3097
+ /* @__PURE__ */ jsx37("strong", { children: t("userProfile.mfa.enabled") }),
3098
+ /* @__PURE__ */ jsx37("span", { children: t("userProfile.mfa.authenticator") })
3077
3099
  ] }),
3078
- !showDisable ? /* @__PURE__ */ jsx36(
3100
+ !showDisable ? /* @__PURE__ */ jsx37(
3079
3101
  "button",
3080
3102
  {
3081
3103
  className: "ba-button ba-button-secondary ba-profile-submit",
@@ -3083,11 +3105,11 @@ function MfaSection() {
3083
3105
  onClick: () => setShowDisable(true),
3084
3106
  children: required ? t("userProfile.mfa.replace") : t("userProfile.mfa.disable")
3085
3107
  }
3086
- ) : /* @__PURE__ */ jsxs33("form", { method: "post", className: "ba-fields ba-profile-security-form", onSubmit: submitDisable, children: [
3087
- /* @__PURE__ */ jsx36("p", { className: "ba-muted", children: required ? t("userProfile.mfa.replaceWarning") : t("userProfile.mfa.disableWarning") }),
3088
- /* @__PURE__ */ jsxs33("label", { className: "ba-label", children: [
3108
+ ) : /* @__PURE__ */ jsxs34("form", { method: "post", className: "ba-fields ba-profile-security-form", onSubmit: submitDisable, children: [
3109
+ /* @__PURE__ */ jsx37("p", { className: "ba-muted", children: required ? t("userProfile.mfa.replaceWarning") : t("userProfile.mfa.disableWarning") }),
3110
+ /* @__PURE__ */ jsxs34("label", { className: "ba-label", children: [
3089
3111
  t("common.passwordLabel"),
3090
- /* @__PURE__ */ jsx36(
3112
+ /* @__PURE__ */ jsx37(
3091
3113
  "input",
3092
3114
  {
3093
3115
  className: "ba-input",
@@ -3099,19 +3121,19 @@ function MfaSection() {
3099
3121
  }
3100
3122
  )
3101
3123
  ] }),
3102
- /* @__PURE__ */ jsx36(FormError, { children: error }),
3103
- /* @__PURE__ */ jsxs33("span", { className: "ba-profile-action-row", children: [
3104
- /* @__PURE__ */ jsx36(
3124
+ /* @__PURE__ */ jsx37(FormError, { children: error }),
3125
+ /* @__PURE__ */ jsxs34("span", { className: "ba-profile-action-row", children: [
3126
+ /* @__PURE__ */ jsx37(
3105
3127
  "button",
3106
3128
  {
3107
3129
  className: "ba-button ba-danger-button",
3108
3130
  type: "submit",
3109
3131
  disabled: pending || !password,
3110
3132
  "aria-busy": pending || void 0,
3111
- children: /* @__PURE__ */ jsx36(Busy, { busy: pending, label: t("common.working"), children: required ? t("userProfile.mfa.replaceConfirm") : t("userProfile.mfa.disableConfirm") })
3133
+ children: /* @__PURE__ */ jsx37(Busy, { busy: pending, label: t("common.working"), children: required ? t("userProfile.mfa.replaceConfirm") : t("userProfile.mfa.disableConfirm") })
3112
3134
  }
3113
3135
  ),
3114
- /* @__PURE__ */ jsx36(
3136
+ /* @__PURE__ */ jsx37(
3115
3137
  "button",
3116
3138
  {
3117
3139
  className: "ba-button ba-button-secondary",
@@ -3131,7 +3153,7 @@ function MfaSection() {
3131
3153
 
3132
3154
  // src/components/user-profile/PasswordSection.tsx
3133
3155
  import * as React28 from "react";
3134
- import { jsx as jsx37, jsxs as jsxs34 } from "react/jsx-runtime";
3156
+ import { jsx as jsx38, jsxs as jsxs35 } from "react/jsx-runtime";
3135
3157
  function PasswordSection() {
3136
3158
  const t = useT();
3137
3159
  const account = useAccount();
@@ -3167,43 +3189,43 @@ function PasswordSection() {
3167
3189
  }
3168
3190
  );
3169
3191
  };
3170
- return /* @__PURE__ */ jsxs34("section", { className: "ba-profile-section", "aria-labelledby": titleId, children: [
3171
- /* @__PURE__ */ jsxs34("header", { className: "ba-profile-section-header", children: [
3172
- /* @__PURE__ */ jsx37("h2", { id: titleId, className: "ba-title", children: t("userProfile.password.title") }),
3173
- /* @__PURE__ */ jsx37("p", { className: "ba-muted", children: t("userProfile.password.description") })
3192
+ return /* @__PURE__ */ jsxs35("section", { className: "ba-profile-section", "aria-labelledby": titleId, children: [
3193
+ /* @__PURE__ */ jsxs35("header", { className: "ba-profile-section-header", children: [
3194
+ /* @__PURE__ */ jsx38("h2", { id: titleId, className: "ba-title", children: t("userProfile.password.title") }),
3195
+ /* @__PURE__ */ jsx38("p", { className: "ba-muted", children: t("userProfile.password.description") })
3174
3196
  ] }),
3175
- /* @__PURE__ */ jsxs34("form", { method: "post", className: "ba-fields", onSubmit: submit, children: [
3176
- /* @__PURE__ */ jsxs34("label", { className: "ba-label", children: [
3197
+ /* @__PURE__ */ jsxs35("form", { method: "post", className: "ba-fields", onSubmit: submit, children: [
3198
+ /* @__PURE__ */ jsxs35("label", { className: "ba-label", children: [
3177
3199
  t("userProfile.password.currentLabel"),
3178
- /* @__PURE__ */ jsx37("input", { className: "ba-input", type: "password", autoComplete: "current-password", value: currentPassword, onChange: (event) => {
3200
+ /* @__PURE__ */ jsx38("input", { className: "ba-input", type: "password", autoComplete: "current-password", value: currentPassword, onChange: (event) => {
3179
3201
  setCurrentPassword(event.target.value);
3180
3202
  setError(null);
3181
3203
  }, required: true })
3182
3204
  ] }),
3183
- /* @__PURE__ */ jsxs34("label", { className: "ba-label", children: [
3205
+ /* @__PURE__ */ jsxs35("label", { className: "ba-label", children: [
3184
3206
  t("resetPassword.newPasswordLabel"),
3185
- /* @__PURE__ */ jsx37("input", { className: "ba-input", type: "password", autoComplete: "new-password", value: newPassword, onChange: (event) => {
3207
+ /* @__PURE__ */ jsx38("input", { className: "ba-input", type: "password", autoComplete: "new-password", value: newPassword, onChange: (event) => {
3186
3208
  setNewPassword(event.target.value);
3187
3209
  setError(null);
3188
3210
  }, minLength: passwordMinLength, maxLength: passwordMaxLength, required: true })
3189
3211
  ] }),
3190
- /* @__PURE__ */ jsxs34("label", { className: "ba-label", children: [
3212
+ /* @__PURE__ */ jsxs35("label", { className: "ba-label", children: [
3191
3213
  t("resetPassword.confirmPasswordLabel"),
3192
- /* @__PURE__ */ jsx37("input", { className: "ba-input", type: "password", autoComplete: "new-password", value: confirmPassword, onChange: (event) => {
3214
+ /* @__PURE__ */ jsx38("input", { className: "ba-input", type: "password", autoComplete: "new-password", value: confirmPassword, onChange: (event) => {
3193
3215
  setConfirmPassword(event.target.value);
3194
3216
  setError(null);
3195
3217
  }, minLength: passwordMinLength, maxLength: passwordMaxLength, required: true })
3196
3218
  ] }),
3197
- /* @__PURE__ */ jsx37(FormError, { children: error }),
3198
- saved && /* @__PURE__ */ jsx37("p", { className: "ba-success", role: "status", children: t("userProfile.password.saved") }),
3199
- /* @__PURE__ */ jsx37(
3219
+ /* @__PURE__ */ jsx38(FormError, { children: error }),
3220
+ saved && /* @__PURE__ */ jsx38("p", { className: "ba-success", role: "status", children: t("userProfile.password.saved") }),
3221
+ /* @__PURE__ */ jsx38(
3200
3222
  "button",
3201
3223
  {
3202
3224
  className: "ba-button ba-profile-submit",
3203
3225
  type: "submit",
3204
3226
  disabled: pending || !currentPassword || !newPassword || !confirmPassword,
3205
3227
  "aria-busy": pending || void 0,
3206
- children: /* @__PURE__ */ jsx37(Busy, { busy: pending, label: t("common.working"), children: t("userProfile.password.submit") })
3228
+ children: /* @__PURE__ */ jsx38(Busy, { busy: pending, label: t("common.working"), children: t("userProfile.password.submit") })
3207
3229
  }
3208
3230
  )
3209
3231
  ] })
@@ -3212,22 +3234,22 @@ function PasswordSection() {
3212
3234
 
3213
3235
  // src/components/user-profile/PasskeysSection.tsx
3214
3236
  import * as React29 from "react";
3215
- import { jsx as jsx38, jsxs as jsxs35 } from "react/jsx-runtime";
3237
+ import { jsx as jsx39, jsxs as jsxs36 } from "react/jsx-runtime";
3216
3238
  function PasskeysSection({ allowAdd }) {
3217
3239
  const t = useT();
3218
3240
  const titleId = React29.useId();
3219
- return /* @__PURE__ */ jsxs35("section", { className: "ba-profile-section", "aria-labelledby": titleId, children: [
3220
- /* @__PURE__ */ jsxs35("header", { className: "ba-profile-section-header", children: [
3221
- /* @__PURE__ */ jsx38("h2", { id: titleId, className: "ba-title", children: t("userProfile.passkeys.title") }),
3222
- /* @__PURE__ */ jsx38("p", { className: "ba-muted", children: t("userProfile.passkeys.description") })
3241
+ return /* @__PURE__ */ jsxs36("section", { className: "ba-profile-section", "aria-labelledby": titleId, children: [
3242
+ /* @__PURE__ */ jsxs36("header", { className: "ba-profile-section-header", children: [
3243
+ /* @__PURE__ */ jsx39("h2", { id: titleId, className: "ba-title", children: t("userProfile.passkeys.title") }),
3244
+ /* @__PURE__ */ jsx39("p", { className: "ba-muted", children: t("userProfile.passkeys.description") })
3223
3245
  ] }),
3224
- /* @__PURE__ */ jsx38(PasskeyManager, { title: null, allowAdd })
3246
+ /* @__PURE__ */ jsx39(PasskeyManager, { title: null, allowAdd })
3225
3247
  ] });
3226
3248
  }
3227
3249
 
3228
3250
  // src/components/user-profile/ProfileSection.tsx
3229
3251
  import * as React30 from "react";
3230
- import { Fragment as Fragment11, jsx as jsx39, jsxs as jsxs36 } from "react/jsx-runtime";
3252
+ import { Fragment as Fragment11, jsx as jsx40, jsxs as jsxs37 } from "react/jsx-runtime";
3231
3253
  function ProfileSection({
3232
3254
  firstLastName,
3233
3255
  usernameEnabled,
@@ -3269,15 +3291,15 @@ function ProfileSection({
3269
3291
  }
3270
3292
  );
3271
3293
  };
3272
- return /* @__PURE__ */ jsxs36("section", { className: "ba-profile-section", "aria-labelledby": titleId, children: [
3273
- /* @__PURE__ */ jsxs36("header", { className: "ba-profile-section-header", children: [
3274
- /* @__PURE__ */ jsx39("h2", { id: titleId, className: "ba-title", children: t("userProfile.profile.title") }),
3275
- /* @__PURE__ */ jsx39("p", { className: "ba-muted", children: t("userProfile.profile.description") })
3294
+ return /* @__PURE__ */ jsxs37("section", { className: "ba-profile-section", "aria-labelledby": titleId, children: [
3295
+ /* @__PURE__ */ jsxs37("header", { className: "ba-profile-section-header", children: [
3296
+ /* @__PURE__ */ jsx40("h2", { id: titleId, className: "ba-title", children: t("userProfile.profile.title") }),
3297
+ /* @__PURE__ */ jsx40("p", { className: "ba-muted", children: t("userProfile.profile.description") })
3276
3298
  ] }),
3277
- /* @__PURE__ */ jsxs36("form", { method: "post", className: "ba-fields", onSubmit: submit, children: [
3278
- legacyNameField && /* @__PURE__ */ jsxs36("label", { className: "ba-label", children: [
3299
+ /* @__PURE__ */ jsxs37("form", { method: "post", className: "ba-fields", onSubmit: submit, children: [
3300
+ legacyNameField && /* @__PURE__ */ jsxs37("label", { className: "ba-label", children: [
3279
3301
  t("signUp.nameLabel"),
3280
- /* @__PURE__ */ jsx39(
3302
+ /* @__PURE__ */ jsx40(
3281
3303
  "input",
3282
3304
  {
3283
3305
  className: "ba-input",
@@ -3288,10 +3310,10 @@ function ProfileSection({
3288
3310
  }
3289
3311
  )
3290
3312
  ] }),
3291
- firstLastName && /* @__PURE__ */ jsxs36(Fragment11, { children: [
3292
- /* @__PURE__ */ jsxs36("label", { className: "ba-label", children: [
3313
+ firstLastName && /* @__PURE__ */ jsxs37(Fragment11, { children: [
3314
+ /* @__PURE__ */ jsxs37("label", { className: "ba-label", children: [
3293
3315
  t("signUp.firstNameLabel"),
3294
- /* @__PURE__ */ jsx39(
3316
+ /* @__PURE__ */ jsx40(
3295
3317
  "input",
3296
3318
  {
3297
3319
  className: "ba-input",
@@ -3301,9 +3323,9 @@ function ProfileSection({
3301
3323
  }
3302
3324
  )
3303
3325
  ] }),
3304
- /* @__PURE__ */ jsxs36("label", { className: "ba-label", children: [
3326
+ /* @__PURE__ */ jsxs37("label", { className: "ba-label", children: [
3305
3327
  t("signUp.lastNameLabel"),
3306
- /* @__PURE__ */ jsx39(
3328
+ /* @__PURE__ */ jsx40(
3307
3329
  "input",
3308
3330
  {
3309
3331
  className: "ba-input",
@@ -3314,9 +3336,9 @@ function ProfileSection({
3314
3336
  )
3315
3337
  ] })
3316
3338
  ] }),
3317
- usernameEnabled && /* @__PURE__ */ jsxs36("label", { className: "ba-label", children: [
3339
+ usernameEnabled && /* @__PURE__ */ jsxs37("label", { className: "ba-label", children: [
3318
3340
  t("common.usernameLabel"),
3319
- /* @__PURE__ */ jsx39(
3341
+ /* @__PURE__ */ jsx40(
3320
3342
  "input",
3321
3343
  {
3322
3344
  className: "ba-input",
@@ -3326,9 +3348,9 @@ function ProfileSection({
3326
3348
  }
3327
3349
  )
3328
3350
  ] }),
3329
- /* @__PURE__ */ jsxs36("label", { className: "ba-label", children: [
3351
+ /* @__PURE__ */ jsxs37("label", { className: "ba-label", children: [
3330
3352
  t("userProfile.profile.imageLabel"),
3331
- /* @__PURE__ */ jsx39(
3353
+ /* @__PURE__ */ jsx40(
3332
3354
  "input",
3333
3355
  {
3334
3356
  className: "ba-input",
@@ -3339,16 +3361,16 @@ function ProfileSection({
3339
3361
  }
3340
3362
  )
3341
3363
  ] }),
3342
- /* @__PURE__ */ jsx39(FormError, { children: error }),
3343
- saved && /* @__PURE__ */ jsx39("p", { className: "ba-success", role: "status", children: t("userProfile.profile.saved") }),
3344
- /* @__PURE__ */ jsx39(
3364
+ /* @__PURE__ */ jsx40(FormError, { children: error }),
3365
+ saved && /* @__PURE__ */ jsx40("p", { className: "ba-success", role: "status", children: t("userProfile.profile.saved") }),
3366
+ /* @__PURE__ */ jsx40(
3345
3367
  "button",
3346
3368
  {
3347
3369
  className: "ba-button ba-profile-submit",
3348
3370
  type: "submit",
3349
3371
  disabled: pending || legacyNameField && !name.trim(),
3350
3372
  "aria-busy": pending || void 0,
3351
- children: /* @__PURE__ */ jsx39(Busy, { busy: pending, label: t("common.working"), children: t("userProfile.save") })
3373
+ children: /* @__PURE__ */ jsx40(Busy, { busy: pending, label: t("common.working"), children: t("userProfile.save") })
3352
3374
  }
3353
3375
  )
3354
3376
  ] })
@@ -3357,24 +3379,24 @@ function ProfileSection({
3357
3379
 
3358
3380
  // src/components/user-profile/RecoverySection.tsx
3359
3381
  import * as React31 from "react";
3360
- import { Fragment as Fragment12, jsx as jsx40, jsxs as jsxs37 } from "react/jsx-runtime";
3382
+ import { Fragment as Fragment12, jsx as jsx41, jsxs as jsxs38 } from "react/jsx-runtime";
3361
3383
  function RecoverySection() {
3362
3384
  const t = useT();
3363
3385
  const { user } = useUser();
3364
3386
  const titleId = React31.useId();
3365
- return /* @__PURE__ */ jsxs37("section", { className: "ba-profile-section", "aria-labelledby": titleId, children: [
3366
- /* @__PURE__ */ jsxs37("header", { className: "ba-profile-section-header", children: [
3367
- /* @__PURE__ */ jsx40("h2", { id: titleId, className: "ba-title", children: t("userProfile.recovery.title") }),
3368
- /* @__PURE__ */ jsx40("p", { className: "ba-muted", children: t("userProfile.recovery.description") })
3387
+ return /* @__PURE__ */ jsxs38("section", { className: "ba-profile-section", "aria-labelledby": titleId, children: [
3388
+ /* @__PURE__ */ jsxs38("header", { className: "ba-profile-section-header", children: [
3389
+ /* @__PURE__ */ jsx41("h2", { id: titleId, className: "ba-title", children: t("userProfile.recovery.title") }),
3390
+ /* @__PURE__ */ jsx41("p", { className: "ba-muted", children: t("userProfile.recovery.description") })
3369
3391
  ] }),
3370
- /* @__PURE__ */ jsxs37("div", { className: "ba-profile-recovery-card", children: [
3371
- /* @__PURE__ */ jsx40("strong", { children: t("userProfile.recovery.emailTitle") }),
3372
- user?.email && user.emailVerified ? /* @__PURE__ */ jsxs37(Fragment12, { children: [
3373
- /* @__PURE__ */ jsx40("p", { children: t("userProfile.recovery.emailDescription") }),
3374
- /* @__PURE__ */ jsx40(Bidi, { children: user.email })
3375
- ] }) : /* @__PURE__ */ jsx40("p", { children: t("userProfile.recovery.emailUnavailable") })
3392
+ /* @__PURE__ */ jsxs38("div", { className: "ba-profile-recovery-card", children: [
3393
+ /* @__PURE__ */ jsx41("strong", { children: t("userProfile.recovery.emailTitle") }),
3394
+ user?.email && user.emailVerified ? /* @__PURE__ */ jsxs38(Fragment12, { children: [
3395
+ /* @__PURE__ */ jsx41("p", { children: t("userProfile.recovery.emailDescription") }),
3396
+ /* @__PURE__ */ jsx41(Bidi, { children: user.email })
3397
+ ] }) : /* @__PURE__ */ jsx41("p", { children: t("userProfile.recovery.emailUnavailable") })
3376
3398
  ] }),
3377
- /* @__PURE__ */ jsx40(BackupCodesManager, { title: null })
3399
+ /* @__PURE__ */ jsx41(BackupCodesManager, { title: null })
3378
3400
  ] });
3379
3401
  }
3380
3402
 
@@ -3466,7 +3488,7 @@ function useAccountResource(loader2, failure) {
3466
3488
  }
3467
3489
 
3468
3490
  // src/components/user-profile/SessionsSection.tsx
3469
- import { jsx as jsx41, jsxs as jsxs38 } from "react/jsx-runtime";
3491
+ import { jsx as jsx42, jsxs as jsxs39 } from "react/jsx-runtime";
3470
3492
  function SessionsSection() {
3471
3493
  const t = useT();
3472
3494
  const locale = useLocale();
@@ -3495,31 +3517,31 @@ function SessionsSection() {
3495
3517
  }
3496
3518
  );
3497
3519
  };
3498
- return /* @__PURE__ */ jsxs38("section", { className: "ba-profile-section", "aria-labelledby": titleId, children: [
3499
- /* @__PURE__ */ jsxs38("header", { className: "ba-profile-section-header", children: [
3500
- /* @__PURE__ */ jsx41("h2", { id: titleId, className: "ba-title", children: t("userProfile.sessions.title") }),
3501
- /* @__PURE__ */ jsx41("p", { className: "ba-muted", children: t("userProfile.sessions.description") })
3520
+ return /* @__PURE__ */ jsxs39("section", { className: "ba-profile-section", "aria-labelledby": titleId, children: [
3521
+ /* @__PURE__ */ jsxs39("header", { className: "ba-profile-section-header", children: [
3522
+ /* @__PURE__ */ jsx42("h2", { id: titleId, className: "ba-title", children: t("userProfile.sessions.title") }),
3523
+ /* @__PURE__ */ jsx42("p", { className: "ba-muted", children: t("userProfile.sessions.description") })
3502
3524
  ] }),
3503
- resource.data === null ? resource.loading ? /* @__PURE__ */ jsxs38("div", { className: "ba-profile-list-skeleton", "aria-busy": "true", children: [
3504
- /* @__PURE__ */ jsx41("div", { className: "ba-skeleton" }),
3505
- /* @__PURE__ */ jsx41("div", { className: "ba-skeleton" })
3506
- ] }) : null : /* @__PURE__ */ jsxs38("ul", { className: "ba-profile-list", children: [
3525
+ resource.data === null ? resource.loading ? /* @__PURE__ */ jsxs39("div", { className: "ba-profile-list-skeleton", "aria-busy": "true", children: [
3526
+ /* @__PURE__ */ jsx42("div", { className: "ba-skeleton" }),
3527
+ /* @__PURE__ */ jsx42("div", { className: "ba-skeleton" })
3528
+ ] }) : null : /* @__PURE__ */ jsxs39("ul", { className: "ba-profile-list", children: [
3507
3529
  sessions.map((session) => {
3508
3530
  const label2 = session.userAgent?.trim() || t("userProfile.sessions.unknownDevice");
3509
- return /* @__PURE__ */ jsxs38("li", { className: "ba-profile-list-item", children: [
3510
- /* @__PURE__ */ jsxs38("span", { children: [
3511
- /* @__PURE__ */ jsx41("strong", { children: label2 }),
3512
- /* @__PURE__ */ jsxs38("small", { children: [
3513
- session.id === currentId && /* @__PURE__ */ jsx41("em", { children: t("userProfile.sessions.current") }),
3531
+ return /* @__PURE__ */ jsxs39("li", { className: "ba-profile-list-item", children: [
3532
+ /* @__PURE__ */ jsxs39("span", { children: [
3533
+ /* @__PURE__ */ jsx42("strong", { children: label2 }),
3534
+ /* @__PURE__ */ jsxs39("small", { children: [
3535
+ session.id === currentId && /* @__PURE__ */ jsx42("em", { children: t("userProfile.sessions.current") }),
3514
3536
  formatSessionTime(session.updatedAt, locale)
3515
3537
  ] })
3516
3538
  ] }),
3517
- /* @__PURE__ */ jsx41("button", { className: "ba-link-button ba-danger", type: "button", disabled: mutation.pending, onClick: () => revoke(session.id, label2), children: t("userProfile.sessions.revoke") })
3539
+ /* @__PURE__ */ jsx42("button", { className: "ba-link-button ba-danger", type: "button", disabled: mutation.pending, onClick: () => revoke(session.id, label2), children: t("userProfile.sessions.revoke") })
3518
3540
  ] }, session.id);
3519
3541
  }),
3520
- sessions.length === 0 && /* @__PURE__ */ jsx41("li", { className: "ba-muted", children: t("userProfile.sessions.empty") })
3542
+ sessions.length === 0 && /* @__PURE__ */ jsx42("li", { className: "ba-muted", children: t("userProfile.sessions.empty") })
3521
3543
  ] }),
3522
- sessions.some((session) => session.id !== currentId) && /* @__PURE__ */ jsx41(
3544
+ sessions.some((session) => session.id !== currentId) && /* @__PURE__ */ jsx42(
3523
3545
  "button",
3524
3546
  {
3525
3547
  className: "ba-button ba-button-secondary ba-profile-submit",
@@ -3535,17 +3557,17 @@ function SessionsSection() {
3535
3557
  children: t("userProfile.sessions.revokeOthers")
3536
3558
  }
3537
3559
  ),
3538
- resource.error && /* @__PURE__ */ jsxs38("div", { className: "ba-profile-inline-error", children: [
3539
- /* @__PURE__ */ jsx41(FormError, { children: resource.error }),
3540
- /* @__PURE__ */ jsx41("button", { className: "ba-link-button", type: "button", onClick: () => void resource.load(), children: t("userProfile.retry") })
3560
+ resource.error && /* @__PURE__ */ jsxs39("div", { className: "ba-profile-inline-error", children: [
3561
+ /* @__PURE__ */ jsx42(FormError, { children: resource.error }),
3562
+ /* @__PURE__ */ jsx42("button", { className: "ba-link-button", type: "button", onClick: () => void resource.load(), children: t("userProfile.retry") })
3541
3563
  ] }),
3542
- /* @__PURE__ */ jsx41(FormError, { children: mutation.error })
3564
+ /* @__PURE__ */ jsx42(FormError, { children: mutation.error })
3543
3565
  ] });
3544
3566
  }
3545
3567
 
3546
3568
  // src/components/user-profile/SocialSection.tsx
3547
3569
  import * as React34 from "react";
3548
- import { jsx as jsx42, jsxs as jsxs39 } from "react/jsx-runtime";
3570
+ import { jsx as jsx43, jsxs as jsxs40 } from "react/jsx-runtime";
3549
3571
  function providerLabel(provider) {
3550
3572
  return provider.charAt(0).toUpperCase() + provider.slice(1);
3551
3573
  }
@@ -3585,18 +3607,18 @@ function SocialSection() {
3585
3607
  { failure: t("userProfile.social.unlinkError"), onSuccess: resource.load }
3586
3608
  );
3587
3609
  };
3588
- return /* @__PURE__ */ jsxs39("section", { className: "ba-profile-section", "aria-labelledby": titleId, children: [
3589
- /* @__PURE__ */ jsxs39("header", { className: "ba-profile-section-header", children: [
3590
- /* @__PURE__ */ jsx42("h2", { id: titleId, className: "ba-title", children: t("userProfile.social.title") }),
3591
- /* @__PURE__ */ jsx42("p", { className: "ba-muted", children: t("userProfile.social.description") })
3610
+ return /* @__PURE__ */ jsxs40("section", { className: "ba-profile-section", "aria-labelledby": titleId, children: [
3611
+ /* @__PURE__ */ jsxs40("header", { className: "ba-profile-section-header", children: [
3612
+ /* @__PURE__ */ jsx43("h2", { id: titleId, className: "ba-title", children: t("userProfile.social.title") }),
3613
+ /* @__PURE__ */ jsx43("p", { className: "ba-muted", children: t("userProfile.social.description") })
3592
3614
  ] }),
3593
- resource.data === null ? resource.loading ? /* @__PURE__ */ jsx42("div", { className: "ba-profile-list-skeleton", "aria-busy": "true", children: /* @__PURE__ */ jsx42("div", { className: "ba-skeleton" }) }) : null : /* @__PURE__ */ jsxs39("ul", { className: "ba-profile-list", children: [
3594
- linked.map((item) => /* @__PURE__ */ jsxs39("li", { className: "ba-profile-list-item", children: [
3595
- /* @__PURE__ */ jsxs39("span", { children: [
3596
- /* @__PURE__ */ jsx42("strong", { children: providerLabel(item.providerId) }),
3597
- /* @__PURE__ */ jsx42("small", { children: item.canUnlink ? t("userProfile.social.connected") : t("userProfile.social.lastMethod") })
3615
+ resource.data === null ? resource.loading ? /* @__PURE__ */ jsx43("div", { className: "ba-profile-list-skeleton", "aria-busy": "true", children: /* @__PURE__ */ jsx43("div", { className: "ba-skeleton" }) }) : null : /* @__PURE__ */ jsxs40("ul", { className: "ba-profile-list", children: [
3616
+ linked.map((item) => /* @__PURE__ */ jsxs40("li", { className: "ba-profile-list-item", children: [
3617
+ /* @__PURE__ */ jsxs40("span", { children: [
3618
+ /* @__PURE__ */ jsx43("strong", { children: providerLabel(item.providerId) }),
3619
+ /* @__PURE__ */ jsx43("small", { children: item.canUnlink ? t("userProfile.social.connected") : t("userProfile.social.lastMethod") })
3598
3620
  ] }),
3599
- /* @__PURE__ */ jsx42(
3621
+ /* @__PURE__ */ jsx43(
3600
3622
  "button",
3601
3623
  {
3602
3624
  className: "ba-link-button ba-danger",
@@ -3611,23 +3633,23 @@ function SocialSection() {
3611
3633
  }
3612
3634
  )
3613
3635
  ] }, item.id)),
3614
- linked.length === 0 && /* @__PURE__ */ jsx42("li", { className: "ba-muted", children: t("userProfile.social.empty") })
3636
+ linked.length === 0 && /* @__PURE__ */ jsx43("li", { className: "ba-muted", children: t("userProfile.social.empty") })
3615
3637
  ] }),
3616
- available.length > 0 && /* @__PURE__ */ jsxs39("div", { className: "ba-profile-provider-actions", children: [
3617
- /* @__PURE__ */ jsx42("p", { className: "ba-profile-subtitle", children: t("userProfile.social.add") }),
3618
- available.map((provider) => /* @__PURE__ */ jsx42("button", { type: "button", className: "ba-button ba-button-secondary", disabled: mutation.pending, onClick: () => link(provider), children: t("userProfile.social.connectProvider", { provider: providerLabel(provider) }) }, provider))
3638
+ available.length > 0 && /* @__PURE__ */ jsxs40("div", { className: "ba-profile-provider-actions", children: [
3639
+ /* @__PURE__ */ jsx43("p", { className: "ba-profile-subtitle", children: t("userProfile.social.add") }),
3640
+ available.map((provider) => /* @__PURE__ */ jsx43("button", { type: "button", className: "ba-button ba-button-secondary", disabled: mutation.pending, onClick: () => link(provider), children: t("userProfile.social.connectProvider", { provider: providerLabel(provider) }) }, provider))
3619
3641
  ] }),
3620
- resource.error && /* @__PURE__ */ jsxs39("div", { className: "ba-profile-inline-error", children: [
3621
- /* @__PURE__ */ jsx42(FormError, { children: resource.error }),
3622
- /* @__PURE__ */ jsx42("button", { className: "ba-link-button", type: "button", onClick: () => void resource.load(), children: t("userProfile.retry") })
3642
+ resource.error && /* @__PURE__ */ jsxs40("div", { className: "ba-profile-inline-error", children: [
3643
+ /* @__PURE__ */ jsx43(FormError, { children: resource.error }),
3644
+ /* @__PURE__ */ jsx43("button", { className: "ba-link-button", type: "button", onClick: () => void resource.load(), children: t("userProfile.retry") })
3623
3645
  ] }),
3624
- /* @__PURE__ */ jsx42(FormError, { children: mutation.error })
3646
+ /* @__PURE__ */ jsx43(FormError, { children: mutation.error })
3625
3647
  ] });
3626
3648
  }
3627
3649
 
3628
3650
  // src/components/user-profile/UserProfileModal.tsx
3629
3651
  import * as React35 from "react";
3630
- import { jsx as jsx43, jsxs as jsxs40 } from "react/jsx-runtime";
3652
+ import { jsx as jsx44, jsxs as jsxs41 } from "react/jsx-runtime";
3631
3653
  function UserProfileModal({
3632
3654
  children,
3633
3655
  onClose,
@@ -3635,7 +3657,7 @@ function UserProfileModal({
3635
3657
  }) {
3636
3658
  const t = useT();
3637
3659
  const titleId = React35.useId();
3638
- return /* @__PURE__ */ jsxs40(
3660
+ return /* @__PURE__ */ jsxs41(
3639
3661
  ModalSurface,
3640
3662
  {
3641
3663
  overlayClassName: "ba-profile-overlay",
@@ -3644,13 +3666,13 @@ function UserProfileModal({
3644
3666
  testId: "user-profile-modal",
3645
3667
  onClose,
3646
3668
  children: [
3647
- /* @__PURE__ */ jsxs40("div", { className: "ba-profile-modal-header", children: [
3648
- /* @__PURE__ */ jsxs40("span", { children: [
3669
+ /* @__PURE__ */ jsxs41("div", { className: "ba-profile-modal-header", children: [
3670
+ /* @__PURE__ */ jsxs41("span", { children: [
3649
3671
  branding,
3650
- /* @__PURE__ */ jsx43("h1", { id: titleId, children: t("userProfile.title") }),
3651
- /* @__PURE__ */ jsx43("p", { children: t("userProfile.description") })
3672
+ /* @__PURE__ */ jsx44("h1", { id: titleId, children: t("userProfile.title") }),
3673
+ /* @__PURE__ */ jsx44("p", { children: t("userProfile.description") })
3652
3674
  ] }),
3653
- /* @__PURE__ */ jsx43(
3675
+ /* @__PURE__ */ jsx44(
3654
3676
  "button",
3655
3677
  {
3656
3678
  type: "button",
@@ -3658,7 +3680,7 @@ function UserProfileModal({
3658
3680
  "aria-label": t("userProfile.close"),
3659
3681
  onClick: onClose,
3660
3682
  autoFocus: true,
3661
- children: /* @__PURE__ */ jsx43("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ jsx43(
3683
+ children: /* @__PURE__ */ jsx44("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ jsx44(
3662
3684
  "path",
3663
3685
  {
3664
3686
  d: "M6 6l12 12M18 6L6 18",
@@ -3671,14 +3693,14 @@ function UserProfileModal({
3671
3693
  )
3672
3694
  ] }),
3673
3695
  children,
3674
- /* @__PURE__ */ jsx43("footer", { className: "ba-profile-modal-footer", children: /* @__PURE__ */ jsx43(AuthOwlBadge, {}) })
3696
+ /* @__PURE__ */ jsx44("footer", { className: "ba-profile-modal-footer", children: /* @__PURE__ */ jsx44(AuthOwlBadge, {}) })
3675
3697
  ]
3676
3698
  }
3677
3699
  );
3678
3700
  }
3679
3701
 
3680
3702
  // src/components/UserProfile.tsx
3681
- import { jsx as jsx44, jsxs as jsxs41 } from "react/jsx-runtime";
3703
+ import { jsx as jsx45, jsxs as jsxs42 } from "react/jsx-runtime";
3682
3704
  var SECTION_KEYS = {
3683
3705
  profile: "userProfile.nav.profile",
3684
3706
  email: "userProfile.nav.email",
@@ -3744,11 +3766,11 @@ function UserProfile(props = {}) {
3744
3766
  window.history.replaceState(null, "", userProfileSectionHash(next));
3745
3767
  }
3746
3768
  };
3747
- const content = !isLoaded ? /* @__PURE__ */ jsxs41("div", { className: "ba-profile-loading", "aria-busy": "true", children: [
3748
- /* @__PURE__ */ jsx44("div", { className: "ba-skeleton" }),
3749
- /* @__PURE__ */ jsx44("div", { className: "ba-skeleton" }),
3750
- /* @__PURE__ */ jsx44("div", { className: "ba-skeleton" })
3751
- ] }) : !isSignedIn || !user ? /* @__PURE__ */ jsx44("p", { className: "ba-muted", children: t("userProfile.signedOut") }) : /* @__PURE__ */ jsx44(
3769
+ const content = !isLoaded ? /* @__PURE__ */ jsxs42("div", { className: "ba-profile-loading", "aria-busy": "true", children: [
3770
+ /* @__PURE__ */ jsx45("div", { className: "ba-skeleton" }),
3771
+ /* @__PURE__ */ jsx45("div", { className: "ba-skeleton" }),
3772
+ /* @__PURE__ */ jsx45("div", { className: "ba-skeleton" })
3773
+ ] }) : !isSignedIn || !user ? /* @__PURE__ */ jsx45("p", { className: "ba-muted", children: t("userProfile.signedOut") }) : /* @__PURE__ */ jsx45(
3752
3774
  UserProfileBody,
3753
3775
  {
3754
3776
  active: visibleActive,
@@ -3760,23 +3782,23 @@ function UserProfile(props = {}) {
3760
3782
  user.id
3761
3783
  );
3762
3784
  if (props.mode === "modal") {
3763
- return /* @__PURE__ */ jsx44(
3785
+ return /* @__PURE__ */ jsx45(
3764
3786
  UserProfileModal,
3765
3787
  {
3766
3788
  onClose: props.onClose,
3767
- branding: showBranding ? /* @__PURE__ */ jsx44(AuthOwlBranding, {}) : null,
3789
+ branding: showBranding ? /* @__PURE__ */ jsx45(AuthOwlBranding, {}) : null,
3768
3790
  children: content
3769
3791
  }
3770
3792
  );
3771
3793
  }
3772
- return /* @__PURE__ */ jsxs41("article", { className: "ba-profile ba-profile-page", "data-testid": "user-profile", children: [
3773
- /* @__PURE__ */ jsxs41("header", { className: "ba-profile-heading", children: [
3774
- showBranding ? /* @__PURE__ */ jsx44(AuthOwlBranding, {}) : null,
3775
- /* @__PURE__ */ jsx44("h1", { children: t("userProfile.title") }),
3776
- /* @__PURE__ */ jsx44("p", { children: t("userProfile.description") })
3794
+ return /* @__PURE__ */ jsxs42("article", { className: "ba-profile ba-profile-page", "data-testid": "user-profile", children: [
3795
+ /* @__PURE__ */ jsxs42("header", { className: "ba-profile-heading", children: [
3796
+ showBranding ? /* @__PURE__ */ jsx45(AuthOwlBranding, {}) : null,
3797
+ /* @__PURE__ */ jsx45("h1", { children: t("userProfile.title") }),
3798
+ /* @__PURE__ */ jsx45("p", { children: t("userProfile.description") })
3777
3799
  ] }),
3778
3800
  content,
3779
- /* @__PURE__ */ jsx44("footer", { className: "ba-profile-modal-footer", children: /* @__PURE__ */ jsx44(AuthOwlBadge, {}) })
3801
+ /* @__PURE__ */ jsx45("footer", { className: "ba-profile-modal-footer", children: /* @__PURE__ */ jsx45(AuthOwlBadge, {}) })
3780
3802
  ] });
3781
3803
  }
3782
3804
  function UserProfileBody({
@@ -3787,8 +3809,8 @@ function UserProfileBody({
3787
3809
  capabilities
3788
3810
  }) {
3789
3811
  const t = useT();
3790
- return /* @__PURE__ */ jsxs41("div", { className: "ba-profile-layout", children: [
3791
- /* @__PURE__ */ jsx44("nav", { className: "ba-profile-nav", "aria-label": t("userProfile.nav.aria"), children: sections.map((item) => /* @__PURE__ */ jsx44(
3812
+ return /* @__PURE__ */ jsxs42("div", { className: "ba-profile-layout", children: [
3813
+ /* @__PURE__ */ jsx45("nav", { className: "ba-profile-nav", "aria-label": t("userProfile.nav.aria"), children: sections.map((item) => /* @__PURE__ */ jsx45(
3792
3814
  "button",
3793
3815
  {
3794
3816
  type: "button",
@@ -3799,8 +3821,8 @@ function UserProfileBody({
3799
3821
  },
3800
3822
  item
3801
3823
  )) }),
3802
- /* @__PURE__ */ jsxs41("div", { className: "ba-profile-content", "data-section": active, children: [
3803
- active === "profile" && /* @__PURE__ */ jsx44(
3824
+ /* @__PURE__ */ jsxs42("div", { className: "ba-profile-content", "data-section": active, children: [
3825
+ active === "profile" && /* @__PURE__ */ jsx45(
3804
3826
  ProfileSection,
3805
3827
  {
3806
3828
  firstLastName: capabilities.firstLastName,
@@ -3808,43 +3830,54 @@ function UserProfileBody({
3808
3830
  legacyNameField: capabilities.legacyNameField
3809
3831
  }
3810
3832
  ),
3811
- active === "email" && /* @__PURE__ */ jsx44(EmailSection, { allowChange: capabilities.emailChange }),
3812
- active === "password" && /* @__PURE__ */ jsx44(PasswordSection, {}),
3813
- active === "social" && /* @__PURE__ */ jsx44(SocialSection, {}),
3814
- active === "sessions" && /* @__PURE__ */ jsx44(SessionsSection, {}),
3815
- active === "passkeys" && /* @__PURE__ */ jsx44(PasskeysSection, { allowAdd: capabilities.passkeyAdd }),
3816
- active === "mfa" && /* @__PURE__ */ jsx44(MfaSection, {}),
3817
- active === "recovery" && /* @__PURE__ */ jsx44(RecoverySection, {}),
3818
- active === "danger" && /* @__PURE__ */ jsx44(DeleteAccountSection, { onDeleted })
3833
+ active === "email" && /* @__PURE__ */ jsx45(EmailSection, { allowChange: capabilities.emailChange }),
3834
+ active === "password" && /* @__PURE__ */ jsx45(PasswordSection, {}),
3835
+ active === "social" && /* @__PURE__ */ jsx45(SocialSection, {}),
3836
+ active === "sessions" && /* @__PURE__ */ jsx45(SessionsSection, {}),
3837
+ active === "passkeys" && /* @__PURE__ */ jsx45(PasskeysSection, { allowAdd: capabilities.passkeyAdd }),
3838
+ active === "mfa" && /* @__PURE__ */ jsx45(MfaSection, {}),
3839
+ active === "recovery" && /* @__PURE__ */ jsx45(RecoverySection, {}),
3840
+ active === "danger" && /* @__PURE__ */ jsx45(DeleteAccountSection, { onDeleted })
3819
3841
  ] })
3820
3842
  ] });
3821
3843
  }
3822
3844
 
3823
3845
  // src/components/UserButton.tsx
3824
- import { jsx as jsx45, jsxs as jsxs42 } from "react/jsx-runtime";
3846
+ import { jsx as jsx46, jsxs as jsxs43 } from "react/jsx-runtime";
3825
3847
  function UserButton() {
3826
3848
  const t = useT();
3827
3849
  const { user, isLoaded } = useUser();
3828
3850
  const { signOut } = useSignOut();
3829
3851
  const [open, setOpen] = React37.useState(false);
3830
3852
  const [profileOpen, setProfileOpen] = React37.useState(false);
3853
+ const [failedImage, setFailedImage] = React37.useState(null);
3831
3854
  const triggerRef = React37.useRef(null);
3832
3855
  if (!isLoaded || !user) return null;
3833
3856
  const identity = user.email ?? user.phoneNumber ?? user.name ?? "?";
3834
- return /* @__PURE__ */ jsxs42("div", { className: "ba-user-button", "data-testid": "user-button", children: [
3835
- /* @__PURE__ */ jsx45(
3857
+ const image = user.image ?? null;
3858
+ return /* @__PURE__ */ jsxs43("div", { className: "ba-user-button", "data-testid": "user-button", children: [
3859
+ /* @__PURE__ */ jsx46(
3836
3860
  "button",
3837
3861
  {
3838
3862
  ref: triggerRef,
3839
3863
  className: "ba-user-button-trigger",
3840
3864
  "aria-label": t("userButton.openMenuAria"),
3841
3865
  onClick: () => setOpen((v) => !v),
3842
- children: user.image ? /* @__PURE__ */ jsx45("img", { className: "ba-avatar", src: user.image, alt: "" }) : /* @__PURE__ */ jsx45("span", { className: "ba-avatar ba-avatar-fallback", children: identity[0]?.toUpperCase() })
3866
+ children: image && failedImage !== image ? /* @__PURE__ */ jsx46(
3867
+ "img",
3868
+ {
3869
+ className: "ba-avatar",
3870
+ src: image,
3871
+ alt: "",
3872
+ referrerPolicy: "no-referrer",
3873
+ onError: () => setFailedImage(image)
3874
+ }
3875
+ ) : /* @__PURE__ */ jsx46("span", { className: "ba-avatar ba-avatar-fallback", children: identity[0]?.toUpperCase() })
3843
3876
  }
3844
3877
  ),
3845
- open && /* @__PURE__ */ jsxs42("div", { className: "ba-menu", children: [
3846
- /* @__PURE__ */ jsx45("p", { className: "ba-menu-label", children: identity }),
3847
- /* @__PURE__ */ jsx45(
3878
+ open && /* @__PURE__ */ jsxs43("div", { className: "ba-menu", children: [
3879
+ /* @__PURE__ */ jsx46("p", { className: "ba-menu-label", children: identity }),
3880
+ /* @__PURE__ */ jsx46(
3848
3881
  "button",
3849
3882
  {
3850
3883
  className: "ba-menu-item",
@@ -3855,10 +3888,10 @@ function UserButton() {
3855
3888
  children: t("userButton.manageAccount")
3856
3889
  }
3857
3890
  ),
3858
- /* @__PURE__ */ jsx45("button", { className: "ba-menu-item", onClick: () => signOut(), children: t("userButton.signOut") }),
3859
- /* @__PURE__ */ jsx45("div", { className: "ba-menu-badge", children: /* @__PURE__ */ jsx45(AuthOwlBadge, {}) })
3891
+ /* @__PURE__ */ jsx46("button", { className: "ba-menu-item", onClick: () => signOut(), children: t("userButton.signOut") }),
3892
+ /* @__PURE__ */ jsx46("div", { className: "ba-menu-badge", children: /* @__PURE__ */ jsx46(AuthOwlBadge, {}) })
3860
3893
  ] }),
3861
- profileOpen && /* @__PURE__ */ jsx45(
3894
+ profileOpen && /* @__PURE__ */ jsx46(
3862
3895
  UserProfile,
3863
3896
  {
3864
3897
  mode: "modal",
@@ -3878,7 +3911,7 @@ import * as React45 from "react";
3878
3911
 
3879
3912
  // src/components/CreateOrganization.tsx
3880
3913
  import * as React38 from "react";
3881
- import { jsx as jsx46, jsxs as jsxs43 } from "react/jsx-runtime";
3914
+ import { jsx as jsx47, jsxs as jsxs44 } from "react/jsx-runtime";
3882
3915
  function CreateOrganization({ onCreated, title } = {}) {
3883
3916
  const t = useT();
3884
3917
  const { config, isLoading: configLoading } = usePublicConfig();
@@ -3890,10 +3923,10 @@ function CreateOrganization({ onCreated, title } = {}) {
3890
3923
  const [logo, setLogo] = React38.useState("");
3891
3924
  const [slugTouched, setSlugTouched] = React38.useState(false);
3892
3925
  if (configLoading || !isLoaded) {
3893
- return /* @__PURE__ */ jsx46("div", { className: "ba-skeleton", "aria-label": t("organization.loading") });
3926
+ return /* @__PURE__ */ jsx47("div", { className: "ba-skeleton", "aria-label": t("organization.loading") });
3894
3927
  }
3895
3928
  if (config?.organizations !== true) return null;
3896
- if (!isSignedIn) return /* @__PURE__ */ jsx46("p", { className: "ba-muted", children: t("organization.signedOut") });
3929
+ if (!isSignedIn) return /* @__PURE__ */ jsx47("p", { className: "ba-muted", children: t("organization.signedOut") });
3897
3930
  const submit = (event) => {
3898
3931
  event.preventDefault();
3899
3932
  const normalizedName = name.trim();
@@ -3918,15 +3951,15 @@ function CreateOrganization({ onCreated, title } = {}) {
3918
3951
  }
3919
3952
  );
3920
3953
  };
3921
- return /* @__PURE__ */ jsxs43("section", { className: "ba-organization-create", children: [
3922
- title !== null && /* @__PURE__ */ jsxs43("header", { className: "ba-organization-section-header", children: [
3923
- /* @__PURE__ */ jsx46("h2", { className: "ba-title", children: title ?? t("organization.create.title") }),
3924
- /* @__PURE__ */ jsx46("p", { className: "ba-muted", children: t("organization.create.description") })
3954
+ return /* @__PURE__ */ jsxs44("section", { className: "ba-organization-create", children: [
3955
+ title !== null && /* @__PURE__ */ jsxs44("header", { className: "ba-organization-section-header", children: [
3956
+ /* @__PURE__ */ jsx47("h2", { className: "ba-title", children: title ?? t("organization.create.title") }),
3957
+ /* @__PURE__ */ jsx47("p", { className: "ba-muted", children: t("organization.create.description") })
3925
3958
  ] }),
3926
- /* @__PURE__ */ jsxs43("form", { method: "post", className: "ba-fields", onSubmit: submit, children: [
3927
- /* @__PURE__ */ jsxs43("label", { className: "ba-label", children: [
3959
+ /* @__PURE__ */ jsxs44("form", { method: "post", className: "ba-fields", onSubmit: submit, children: [
3960
+ /* @__PURE__ */ jsxs44("label", { className: "ba-label", children: [
3928
3961
  t("organization.create.name"),
3929
- /* @__PURE__ */ jsx46(
3962
+ /* @__PURE__ */ jsx47(
3930
3963
  "input",
3931
3964
  {
3932
3965
  className: "ba-input",
@@ -3941,9 +3974,9 @@ function CreateOrganization({ onCreated, title } = {}) {
3941
3974
  }
3942
3975
  )
3943
3976
  ] }),
3944
- /* @__PURE__ */ jsxs43("label", { className: "ba-label", children: [
3977
+ /* @__PURE__ */ jsxs44("label", { className: "ba-label", children: [
3945
3978
  t("organization.create.slug"),
3946
- /* @__PURE__ */ jsx46(
3979
+ /* @__PURE__ */ jsx47(
3947
3980
  "input",
3948
3981
  {
3949
3982
  className: "ba-input",
@@ -3958,9 +3991,9 @@ function CreateOrganization({ onCreated, title } = {}) {
3958
3991
  }
3959
3992
  )
3960
3993
  ] }),
3961
- /* @__PURE__ */ jsxs43("label", { className: "ba-label", children: [
3994
+ /* @__PURE__ */ jsxs44("label", { className: "ba-label", children: [
3962
3995
  t("organization.create.logo"),
3963
- /* @__PURE__ */ jsx46(
3996
+ /* @__PURE__ */ jsx47(
3964
3997
  "input",
3965
3998
  {
3966
3999
  className: "ba-input",
@@ -3972,15 +4005,15 @@ function CreateOrganization({ onCreated, title } = {}) {
3972
4005
  }
3973
4006
  )
3974
4007
  ] }),
3975
- /* @__PURE__ */ jsx46(FormError, { children: error }),
3976
- /* @__PURE__ */ jsx46(
4008
+ /* @__PURE__ */ jsx47(FormError, { children: error }),
4009
+ /* @__PURE__ */ jsx47(
3977
4010
  "button",
3978
4011
  {
3979
4012
  className: "ba-button ba-profile-submit",
3980
4013
  type: "submit",
3981
4014
  disabled: pending || !name.trim() || !slug.trim(),
3982
4015
  "aria-busy": pending || void 0,
3983
- children: /* @__PURE__ */ jsx46(Busy, { busy: pending, label: t("common.working"), children: t("organization.create.submit") })
4016
+ children: /* @__PURE__ */ jsx47(Busy, { busy: pending, label: t("common.working"), children: t("organization.create.submit") })
3984
4017
  }
3985
4018
  )
3986
4019
  ] })
@@ -3989,7 +4022,7 @@ function CreateOrganization({ onCreated, title } = {}) {
3989
4022
 
3990
4023
  // src/components/organization/OrganizationModal.tsx
3991
4024
  import * as React39 from "react";
3992
- import { jsx as jsx47, jsxs as jsxs44 } from "react/jsx-runtime";
4025
+ import { jsx as jsx48, jsxs as jsxs45 } from "react/jsx-runtime";
3993
4026
  function OrganizationModal({
3994
4027
  title,
3995
4028
  onClose,
@@ -3998,7 +4031,7 @@ function OrganizationModal({
3998
4031
  }) {
3999
4032
  const t = useT();
4000
4033
  const titleId = React39.useId();
4001
- return /* @__PURE__ */ jsxs44(
4034
+ return /* @__PURE__ */ jsxs45(
4002
4035
  ModalSurface,
4003
4036
  {
4004
4037
  overlayClassName: "ba-organization-overlay",
@@ -4007,9 +4040,9 @@ function OrganizationModal({
4007
4040
  returnFocusRef,
4008
4041
  onClose,
4009
4042
  children: [
4010
- /* @__PURE__ */ jsxs44("div", { className: "ba-organization-modal-header", children: [
4011
- /* @__PURE__ */ jsx47("h2", { id: titleId, className: "ba-title", children: title }),
4012
- /* @__PURE__ */ jsx47(
4043
+ /* @__PURE__ */ jsxs45("div", { className: "ba-organization-modal-header", children: [
4044
+ /* @__PURE__ */ jsx48("h2", { id: titleId, className: "ba-title", children: title }),
4045
+ /* @__PURE__ */ jsx48(
4013
4046
  "button",
4014
4047
  {
4015
4048
  className: "ba-profile-close",
@@ -4021,7 +4054,7 @@ function OrganizationModal({
4021
4054
  }
4022
4055
  )
4023
4056
  ] }),
4024
- /* @__PURE__ */ jsx47("div", { className: "ba-organization-modal-body", children })
4057
+ /* @__PURE__ */ jsx48("div", { className: "ba-organization-modal-body", children })
4025
4058
  ]
4026
4059
  }
4027
4060
  );
@@ -4086,7 +4119,7 @@ import * as React44 from "react";
4086
4119
 
4087
4120
  // src/components/organization/DangerSection.tsx
4088
4121
  import * as React41 from "react";
4089
- import { jsx as jsx48, jsxs as jsxs45 } from "react/jsx-runtime";
4122
+ import { jsx as jsx49, jsxs as jsxs46 } from "react/jsx-runtime";
4090
4123
  function DangerSection({
4091
4124
  organization,
4092
4125
  membership,
@@ -4127,43 +4160,43 @@ function DangerSection({
4127
4160
  }
4128
4161
  );
4129
4162
  };
4130
- return /* @__PURE__ */ jsxs45("section", { className: "ba-organization-section ba-organization-danger", children: [
4131
- /* @__PURE__ */ jsxs45("header", { className: "ba-organization-section-header", children: [
4132
- /* @__PURE__ */ jsx48("h3", { className: "ba-title", children: t("organization.profile.danger.title") }),
4133
- /* @__PURE__ */ jsx48("p", { className: "ba-muted", children: t("organization.profile.danger.description") })
4163
+ return /* @__PURE__ */ jsxs46("section", { className: "ba-organization-section ba-organization-danger", children: [
4164
+ /* @__PURE__ */ jsxs46("header", { className: "ba-organization-section-header", children: [
4165
+ /* @__PURE__ */ jsx49("h3", { className: "ba-title", children: t("organization.profile.danger.title") }),
4166
+ /* @__PURE__ */ jsx49("p", { className: "ba-muted", children: t("organization.profile.danger.description") })
4134
4167
  ] }),
4135
- /* @__PURE__ */ jsxs45("div", { className: "ba-organization-danger-action", children: [
4136
- /* @__PURE__ */ jsx48("strong", { children: t("organization.profile.danger.leaveTitle") }),
4137
- /* @__PURE__ */ jsx48("p", { className: "ba-muted", children: isOwner ? t("organization.profile.danger.ownerLeaveHint") : t("organization.profile.danger.leaveHint") }),
4138
- /* @__PURE__ */ jsx48("button", { className: "ba-button ba-button-secondary", type: "button", disabled: pending, onClick: leave, children: t("organization.profile.danger.leave") })
4168
+ /* @__PURE__ */ jsxs46("div", { className: "ba-organization-danger-action", children: [
4169
+ /* @__PURE__ */ jsx49("strong", { children: t("organization.profile.danger.leaveTitle") }),
4170
+ /* @__PURE__ */ jsx49("p", { className: "ba-muted", children: isOwner ? t("organization.profile.danger.ownerLeaveHint") : t("organization.profile.danger.leaveHint") }),
4171
+ /* @__PURE__ */ jsx49("button", { className: "ba-button ba-button-secondary", type: "button", disabled: pending, onClick: leave, children: t("organization.profile.danger.leave") })
4139
4172
  ] }),
4140
- isOwner && /* @__PURE__ */ jsxs45("form", { method: "post", className: "ba-organization-danger-action ba-organization-delete", onSubmit: remove, children: [
4141
- /* @__PURE__ */ jsx48("strong", { children: t("organization.profile.danger.deleteTitle") }),
4142
- /* @__PURE__ */ jsx48("p", { className: "ba-muted", children: t("organization.profile.danger.deleteHint") }),
4143
- /* @__PURE__ */ jsxs45("label", { className: "ba-label", children: [
4173
+ isOwner && /* @__PURE__ */ jsxs46("form", { method: "post", className: "ba-organization-danger-action ba-organization-delete", onSubmit: remove, children: [
4174
+ /* @__PURE__ */ jsx49("strong", { children: t("organization.profile.danger.deleteTitle") }),
4175
+ /* @__PURE__ */ jsx49("p", { className: "ba-muted", children: t("organization.profile.danger.deleteHint") }),
4176
+ /* @__PURE__ */ jsxs46("label", { className: "ba-label", children: [
4144
4177
  t("organization.profile.danger.deleteConfirm"),
4145
4178
  " ",
4146
- /* @__PURE__ */ jsx48(Bidi, { children: organization.slug }),
4147
- /* @__PURE__ */ jsx48("input", { className: "ba-input", dir: "ltr", value: confirmation, onChange: (event) => setConfirmation(event.target.value), autoComplete: "off", required: true })
4179
+ /* @__PURE__ */ jsx49(Bidi, { children: organization.slug }),
4180
+ /* @__PURE__ */ jsx49("input", { className: "ba-input", dir: "ltr", value: confirmation, onChange: (event) => setConfirmation(event.target.value), autoComplete: "off", required: true })
4148
4181
  ] }),
4149
- /* @__PURE__ */ jsx48(
4182
+ /* @__PURE__ */ jsx49(
4150
4183
  "button",
4151
4184
  {
4152
4185
  className: "ba-button ba-danger-button",
4153
4186
  type: "submit",
4154
4187
  disabled: pending || !confirmed,
4155
4188
  "aria-busy": pending || void 0,
4156
- children: /* @__PURE__ */ jsx48(Busy, { busy: pending, label: t("common.working"), children: t("organization.profile.danger.delete") })
4189
+ children: /* @__PURE__ */ jsx49(Busy, { busy: pending, label: t("common.working"), children: t("organization.profile.danger.delete") })
4157
4190
  }
4158
4191
  )
4159
4192
  ] }),
4160
- /* @__PURE__ */ jsx48(FormError, { children: error })
4193
+ /* @__PURE__ */ jsx49(FormError, { children: error })
4161
4194
  ] });
4162
4195
  }
4163
4196
 
4164
4197
  // src/components/organization/GeneralSection.tsx
4165
4198
  import * as React42 from "react";
4166
- import { jsx as jsx49, jsxs as jsxs46 } from "react/jsx-runtime";
4199
+ import { jsx as jsx50, jsxs as jsxs47 } from "react/jsx-runtime";
4167
4200
  function GeneralSection({
4168
4201
  organization,
4169
4202
  canManage,
@@ -4181,16 +4214,16 @@ function GeneralSection({
4181
4214
  setLogo(organization.logo ?? "");
4182
4215
  }, [organization.id, organization.logo, organization.name, organization.slug]);
4183
4216
  if (!canManage) {
4184
- return /* @__PURE__ */ jsxs46("section", { className: "ba-organization-section", children: [
4185
- /* @__PURE__ */ jsx49("p", { className: "ba-muted", children: t("organization.profile.general.readOnly") }),
4186
- /* @__PURE__ */ jsxs46("dl", { className: "ba-organization-facts", children: [
4187
- /* @__PURE__ */ jsxs46("div", { children: [
4188
- /* @__PURE__ */ jsx49("dt", { children: t("organization.create.name") }),
4189
- /* @__PURE__ */ jsx49("dd", { children: organization.name })
4217
+ return /* @__PURE__ */ jsxs47("section", { className: "ba-organization-section", children: [
4218
+ /* @__PURE__ */ jsx50("p", { className: "ba-muted", children: t("organization.profile.general.readOnly") }),
4219
+ /* @__PURE__ */ jsxs47("dl", { className: "ba-organization-facts", children: [
4220
+ /* @__PURE__ */ jsxs47("div", { children: [
4221
+ /* @__PURE__ */ jsx50("dt", { children: t("organization.create.name") }),
4222
+ /* @__PURE__ */ jsx50("dd", { children: organization.name })
4190
4223
  ] }),
4191
- /* @__PURE__ */ jsxs46("div", { children: [
4192
- /* @__PURE__ */ jsx49("dt", { children: t("organization.create.slug") }),
4193
- /* @__PURE__ */ jsx49("dd", { children: /* @__PURE__ */ jsx49(Bidi, { children: organization.slug }) })
4224
+ /* @__PURE__ */ jsxs47("div", { children: [
4225
+ /* @__PURE__ */ jsx50("dt", { children: t("organization.create.slug") }),
4226
+ /* @__PURE__ */ jsx50("dd", { children: /* @__PURE__ */ jsx50(Bidi, { children: organization.slug }) })
4194
4227
  ] })
4195
4228
  ] })
4196
4229
  ] });
@@ -4208,19 +4241,19 @@ function GeneralSection({
4208
4241
  }
4209
4242
  );
4210
4243
  };
4211
- return /* @__PURE__ */ jsxs46("section", { className: "ba-organization-section", children: [
4212
- /* @__PURE__ */ jsxs46("header", { className: "ba-organization-section-header", children: [
4213
- /* @__PURE__ */ jsx49("h3", { className: "ba-title", children: t("organization.profile.general.title") }),
4214
- /* @__PURE__ */ jsx49("p", { className: "ba-muted", children: t("organization.profile.general.description") })
4244
+ return /* @__PURE__ */ jsxs47("section", { className: "ba-organization-section", children: [
4245
+ /* @__PURE__ */ jsxs47("header", { className: "ba-organization-section-header", children: [
4246
+ /* @__PURE__ */ jsx50("h3", { className: "ba-title", children: t("organization.profile.general.title") }),
4247
+ /* @__PURE__ */ jsx50("p", { className: "ba-muted", children: t("organization.profile.general.description") })
4215
4248
  ] }),
4216
- /* @__PURE__ */ jsxs46("form", { method: "post", className: "ba-fields", onSubmit: submit, children: [
4217
- /* @__PURE__ */ jsxs46("label", { className: "ba-label", children: [
4249
+ /* @__PURE__ */ jsxs47("form", { method: "post", className: "ba-fields", onSubmit: submit, children: [
4250
+ /* @__PURE__ */ jsxs47("label", { className: "ba-label", children: [
4218
4251
  t("organization.create.name"),
4219
- /* @__PURE__ */ jsx49("input", { className: "ba-input", value: name, onChange: (event) => setName(event.target.value), required: true })
4252
+ /* @__PURE__ */ jsx50("input", { className: "ba-input", value: name, onChange: (event) => setName(event.target.value), required: true })
4220
4253
  ] }),
4221
- /* @__PURE__ */ jsxs46("label", { className: "ba-label", children: [
4254
+ /* @__PURE__ */ jsxs47("label", { className: "ba-label", children: [
4222
4255
  t("organization.create.slug"),
4223
- /* @__PURE__ */ jsx49(
4256
+ /* @__PURE__ */ jsx50(
4224
4257
  "input",
4225
4258
  {
4226
4259
  className: "ba-input",
@@ -4232,19 +4265,19 @@ function GeneralSection({
4232
4265
  }
4233
4266
  )
4234
4267
  ] }),
4235
- /* @__PURE__ */ jsxs46("label", { className: "ba-label", children: [
4268
+ /* @__PURE__ */ jsxs47("label", { className: "ba-label", children: [
4236
4269
  t("organization.create.logo"),
4237
- /* @__PURE__ */ jsx49("input", { className: "ba-input", type: "url", dir: "ltr", value: logo, onChange: (event) => setLogo(event.target.value), placeholder: "https://" })
4270
+ /* @__PURE__ */ jsx50("input", { className: "ba-input", type: "url", dir: "ltr", value: logo, onChange: (event) => setLogo(event.target.value), placeholder: "https://" })
4238
4271
  ] }),
4239
- /* @__PURE__ */ jsx49(FormError, { children: error }),
4240
- /* @__PURE__ */ jsx49(
4272
+ /* @__PURE__ */ jsx50(FormError, { children: error }),
4273
+ /* @__PURE__ */ jsx50(
4241
4274
  "button",
4242
4275
  {
4243
4276
  className: "ba-button ba-profile-submit",
4244
4277
  type: "submit",
4245
4278
  disabled: pending || !name.trim() || !slug.trim(),
4246
4279
  "aria-busy": pending || void 0,
4247
- children: /* @__PURE__ */ jsx49(Busy, { busy: pending, label: t("common.working"), children: t("organization.profile.general.save") })
4280
+ children: /* @__PURE__ */ jsx50(Busy, { busy: pending, label: t("common.working"), children: t("organization.profile.general.save") })
4248
4281
  }
4249
4282
  )
4250
4283
  ] })
@@ -4267,7 +4300,7 @@ function organizationRoleLabel(role, t) {
4267
4300
  }
4268
4301
 
4269
4302
  // src/components/organization/InvitationsSection.tsx
4270
- import { jsx as jsx50, jsxs as jsxs47 } from "react/jsx-runtime";
4303
+ import { jsx as jsx51, jsxs as jsxs48 } from "react/jsx-runtime";
4271
4304
  function InvitationsSection({
4272
4305
  organization,
4273
4306
  onChanged
@@ -4299,44 +4332,44 @@ function InvitationsSection({
4299
4332
  { failure: t("organization.profile.invitations.cancelError"), onSuccess: onChanged }
4300
4333
  );
4301
4334
  };
4302
- return /* @__PURE__ */ jsxs47("section", { className: "ba-organization-section", children: [
4303
- /* @__PURE__ */ jsxs47("header", { className: "ba-organization-section-header", children: [
4304
- /* @__PURE__ */ jsx50("h3", { className: "ba-title", children: t("organization.profile.invitations.title") }),
4305
- /* @__PURE__ */ jsx50("p", { className: "ba-muted", children: t("organization.profile.invitations.description") })
4335
+ return /* @__PURE__ */ jsxs48("section", { className: "ba-organization-section", children: [
4336
+ /* @__PURE__ */ jsxs48("header", { className: "ba-organization-section-header", children: [
4337
+ /* @__PURE__ */ jsx51("h3", { className: "ba-title", children: t("organization.profile.invitations.title") }),
4338
+ /* @__PURE__ */ jsx51("p", { className: "ba-muted", children: t("organization.profile.invitations.description") })
4306
4339
  ] }),
4307
- /* @__PURE__ */ jsxs47("form", { method: "post", className: "ba-organization-invite-form", onSubmit: invite, children: [
4308
- /* @__PURE__ */ jsxs47("label", { className: "ba-label", children: [
4340
+ /* @__PURE__ */ jsxs48("form", { method: "post", className: "ba-organization-invite-form", onSubmit: invite, children: [
4341
+ /* @__PURE__ */ jsxs48("label", { className: "ba-label", children: [
4309
4342
  t("organization.profile.invitations.email"),
4310
- /* @__PURE__ */ jsx50("input", { className: "ba-input", type: "email", dir: "ltr", value: email, onChange: (event) => setEmail(event.target.value), required: true })
4343
+ /* @__PURE__ */ jsx51("input", { className: "ba-input", type: "email", dir: "ltr", value: email, onChange: (event) => setEmail(event.target.value), required: true })
4311
4344
  ] }),
4312
- /* @__PURE__ */ jsxs47("label", { className: "ba-label", children: [
4345
+ /* @__PURE__ */ jsxs48("label", { className: "ba-label", children: [
4313
4346
  t("organization.profile.members.role"),
4314
- /* @__PURE__ */ jsx50("select", { className: "ba-input", value: role, onChange: (event) => setRole(event.target.value), children: roles.map((option) => /* @__PURE__ */ jsx50("option", { value: option, children: organizationRoleLabel(option, t) }, option)) })
4347
+ /* @__PURE__ */ jsx51("select", { className: "ba-input", value: role, onChange: (event) => setRole(event.target.value), children: roles.map((option) => /* @__PURE__ */ jsx51("option", { value: option, children: organizationRoleLabel(option, t) }, option)) })
4315
4348
  ] }),
4316
- /* @__PURE__ */ jsx50(
4349
+ /* @__PURE__ */ jsx51(
4317
4350
  "button",
4318
4351
  {
4319
4352
  className: "ba-button",
4320
4353
  type: "submit",
4321
4354
  disabled: pending || !email.trim(),
4322
4355
  "aria-busy": pending || void 0,
4323
- children: /* @__PURE__ */ jsx50(Busy, { busy: pending, label: t("common.working"), children: t("organization.profile.invitations.invite") })
4356
+ children: /* @__PURE__ */ jsx51(Busy, { busy: pending, label: t("common.working"), children: t("organization.profile.invitations.invite") })
4324
4357
  }
4325
4358
  )
4326
4359
  ] }),
4327
- /* @__PURE__ */ jsx50(FormError, { children: error }),
4328
- invitations.length === 0 ? /* @__PURE__ */ jsx50("p", { className: "ba-muted", children: t("organization.profile.invitations.empty") }) : /* @__PURE__ */ jsx50("ul", { className: "ba-organization-list", children: invitations.map((invitation) => /* @__PURE__ */ jsxs47("li", { className: "ba-organization-invitation", children: [
4329
- /* @__PURE__ */ jsxs47("span", { children: [
4330
- /* @__PURE__ */ jsx50("strong", { children: /* @__PURE__ */ jsx50(Bidi, { children: invitation.email }) }),
4331
- /* @__PURE__ */ jsx50("small", { children: organizationRoleLabel(invitation.role, t) })
4360
+ /* @__PURE__ */ jsx51(FormError, { children: error }),
4361
+ invitations.length === 0 ? /* @__PURE__ */ jsx51("p", { className: "ba-muted", children: t("organization.profile.invitations.empty") }) : /* @__PURE__ */ jsx51("ul", { className: "ba-organization-list", children: invitations.map((invitation) => /* @__PURE__ */ jsxs48("li", { className: "ba-organization-invitation", children: [
4362
+ /* @__PURE__ */ jsxs48("span", { children: [
4363
+ /* @__PURE__ */ jsx51("strong", { children: /* @__PURE__ */ jsx51(Bidi, { children: invitation.email }) }),
4364
+ /* @__PURE__ */ jsx51("small", { children: organizationRoleLabel(invitation.role, t) })
4332
4365
  ] }),
4333
- /* @__PURE__ */ jsx50("button", { className: "ba-link-button ba-danger", type: "button", disabled: pending, onClick: () => cancel(invitation), children: t("organization.profile.invitations.cancel") })
4366
+ /* @__PURE__ */ jsx51("button", { className: "ba-link-button ba-danger", type: "button", disabled: pending, onClick: () => cancel(invitation), children: t("organization.profile.invitations.cancel") })
4334
4367
  ] }, invitation.id)) })
4335
4368
  ] });
4336
4369
  }
4337
4370
 
4338
4371
  // src/components/organization/MembersSection.tsx
4339
- import { jsx as jsx51, jsxs as jsxs48 } from "react/jsx-runtime";
4372
+ import { jsx as jsx52, jsxs as jsxs49 } from "react/jsx-runtime";
4340
4373
  function MembersSection({
4341
4374
  organization,
4342
4375
  userId,
@@ -4363,27 +4396,27 @@ function MembersSection({
4363
4396
  { failure: t("organization.profile.members.removeError"), onSuccess: onChanged }
4364
4397
  );
4365
4398
  };
4366
- return /* @__PURE__ */ jsxs48("section", { className: "ba-organization-section", children: [
4367
- /* @__PURE__ */ jsxs48("header", { className: "ba-organization-section-header", children: [
4368
- /* @__PURE__ */ jsx51("h3", { className: "ba-title", children: t("organization.profile.members.title") }),
4369
- /* @__PURE__ */ jsx51("p", { className: "ba-muted", children: t("organization.profile.members.description") })
4399
+ return /* @__PURE__ */ jsxs49("section", { className: "ba-organization-section", children: [
4400
+ /* @__PURE__ */ jsxs49("header", { className: "ba-organization-section-header", children: [
4401
+ /* @__PURE__ */ jsx52("h3", { className: "ba-title", children: t("organization.profile.members.title") }),
4402
+ /* @__PURE__ */ jsx52("p", { className: "ba-muted", children: t("organization.profile.members.description") })
4370
4403
  ] }),
4371
- /* @__PURE__ */ jsx51(FormError, { children: error }),
4372
- /* @__PURE__ */ jsx51("ul", { className: "ba-organization-list", children: organization.members.map((member) => {
4404
+ /* @__PURE__ */ jsx52(FormError, { children: error }),
4405
+ /* @__PURE__ */ jsx52("ul", { className: "ba-organization-list", children: organization.members.map((member) => {
4373
4406
  const primaryRole = organizationRoles(member.role)[0] ?? member.role;
4374
4407
  const isCurrent = member.userId === userId;
4375
- return /* @__PURE__ */ jsxs48("li", { className: "ba-organization-member", children: [
4376
- /* @__PURE__ */ jsx51("span", { className: "ba-organization-avatar", "aria-hidden": "true", children: member.user.name.trim().charAt(0).toUpperCase() || "?" }),
4377
- /* @__PURE__ */ jsxs48("span", { className: "ba-organization-member-copy", children: [
4378
- /* @__PURE__ */ jsxs48("strong", { children: [
4408
+ return /* @__PURE__ */ jsxs49("li", { className: "ba-organization-member", children: [
4409
+ /* @__PURE__ */ jsx52("span", { className: "ba-organization-avatar", "aria-hidden": "true", children: member.user.name.trim().charAt(0).toUpperCase() || "?" }),
4410
+ /* @__PURE__ */ jsxs49("span", { className: "ba-organization-member-copy", children: [
4411
+ /* @__PURE__ */ jsxs49("strong", { children: [
4379
4412
  member.user.name,
4380
4413
  isCurrent ? ` ${t("organization.profile.members.you")}` : ""
4381
4414
  ] }),
4382
- /* @__PURE__ */ jsx51("small", { children: /* @__PURE__ */ jsx51(Bidi, { children: member.user.email }) })
4415
+ /* @__PURE__ */ jsx52("small", { children: /* @__PURE__ */ jsx52(Bidi, { children: member.user.email }) })
4383
4416
  ] }),
4384
- canManage && !isCurrent ? /* @__PURE__ */ jsxs48("span", { className: "ba-organization-member-actions", children: [
4385
- /* @__PURE__ */ jsx51("label", { className: "ba-sr-only", htmlFor: `organization-role-${member.id}`, children: t("organization.profile.members.role") }),
4386
- /* @__PURE__ */ jsx51(
4417
+ canManage && !isCurrent ? /* @__PURE__ */ jsxs49("span", { className: "ba-organization-member-actions", children: [
4418
+ /* @__PURE__ */ jsx52("label", { className: "ba-sr-only", htmlFor: `organization-role-${member.id}`, children: t("organization.profile.members.role") }),
4419
+ /* @__PURE__ */ jsx52(
4387
4420
  "select",
4388
4421
  {
4389
4422
  id: `organization-role-${member.id}`,
@@ -4391,18 +4424,18 @@ function MembersSection({
4391
4424
  value: primaryRole,
4392
4425
  disabled: pending,
4393
4426
  onChange: (event) => updateRole(member, event.target.value),
4394
- children: (roles.includes(primaryRole) ? roles : [primaryRole, ...roles]).map((role) => /* @__PURE__ */ jsx51("option", { value: role, children: organizationRoleLabel(role, t) }, role))
4427
+ children: (roles.includes(primaryRole) ? roles : [primaryRole, ...roles]).map((role) => /* @__PURE__ */ jsx52("option", { value: role, children: organizationRoleLabel(role, t) }, role))
4395
4428
  }
4396
4429
  ),
4397
- /* @__PURE__ */ jsx51("button", { className: "ba-link-button ba-danger", type: "button", disabled: pending, onClick: () => remove(member), children: t("organization.profile.members.remove") })
4398
- ] }) : /* @__PURE__ */ jsx51("span", { className: "ba-organization-role-label", children: /* @__PURE__ */ jsx51(Bidi, { children: organizationRoleLabel(member.role, t) }) })
4430
+ /* @__PURE__ */ jsx52("button", { className: "ba-link-button ba-danger", type: "button", disabled: pending, onClick: () => remove(member), children: t("organization.profile.members.remove") })
4431
+ ] }) : /* @__PURE__ */ jsx52("span", { className: "ba-organization-role-label", children: /* @__PURE__ */ jsx52(Bidi, { children: organizationRoleLabel(member.role, t) }) })
4399
4432
  ] }, member.id);
4400
4433
  }) })
4401
4434
  ] });
4402
4435
  }
4403
4436
 
4404
4437
  // src/components/OrganizationProfile.tsx
4405
- import { jsx as jsx52, jsxs as jsxs49 } from "react/jsx-runtime";
4438
+ import { jsx as jsx53, jsxs as jsxs50 } from "react/jsx-runtime";
4406
4439
  var SECTION_KEYS2 = {
4407
4440
  general: "organization.profile.nav.general",
4408
4441
  members: "organization.profile.nav.members",
@@ -4410,7 +4443,7 @@ var SECTION_KEYS2 = {
4410
4443
  invitations: "organization.profile.nav.invitations",
4411
4444
  danger: "organization.profile.nav.danger"
4412
4445
  };
4413
- var TeamsSection = React44.lazy(() => import("./TeamsSection-SHXAL64Q.js"));
4446
+ var TeamsSection = React44.lazy(() => import("./TeamsSection-ZQDNMWV3.js"));
4414
4447
  function OrganizationProfile({ organizationId, defaultSection = "general", onDeleted, onLeft } = {}) {
4415
4448
  const t = useT();
4416
4449
  const toServerError = useServerError();
@@ -4457,20 +4490,20 @@ function OrganizationProfile({ organizationId, defaultSection = "general", onDel
4457
4490
  requestRef.current += 1;
4458
4491
  };
4459
4492
  }, [load]);
4460
- if (configLoading || !isLoaded) return /* @__PURE__ */ jsx52("div", { className: "ba-skeleton", "aria-label": t("organization.loading") });
4493
+ if (configLoading || !isLoaded) return /* @__PURE__ */ jsx53("div", { className: "ba-skeleton", "aria-label": t("organization.loading") });
4461
4494
  if (config?.organizations !== true) return null;
4462
- if (!isSignedIn || !user) return /* @__PURE__ */ jsx52("p", { className: "ba-muted", children: t("organization.signedOut") });
4463
- if (wasRemoved) return /* @__PURE__ */ jsx52("p", { className: "ba-muted", children: t("organization.profile.noActive") });
4464
- if (!requestedId) return /* @__PURE__ */ jsx52("p", { className: "ba-muted", children: t("organization.profile.noActive") });
4495
+ if (!isSignedIn || !user) return /* @__PURE__ */ jsx53("p", { className: "ba-muted", children: t("organization.signedOut") });
4496
+ if (wasRemoved) return /* @__PURE__ */ jsx53("p", { className: "ba-muted", children: t("organization.profile.noActive") });
4497
+ if (!requestedId) return /* @__PURE__ */ jsx53("p", { className: "ba-muted", children: t("organization.profile.noActive") });
4465
4498
  if (error) {
4466
- return /* @__PURE__ */ jsxs49("div", { className: "ba-inline-error", children: [
4467
- /* @__PURE__ */ jsx52(FormError, { children: error }),
4468
- /* @__PURE__ */ jsx52("button", { className: "ba-link-button", type: "button", onClick: () => void load(), children: t("organization.retry") })
4499
+ return /* @__PURE__ */ jsxs50("div", { className: "ba-inline-error", children: [
4500
+ /* @__PURE__ */ jsx53(FormError, { children: error }),
4501
+ /* @__PURE__ */ jsx53("button", { className: "ba-link-button", type: "button", onClick: () => void load(), children: t("organization.retry") })
4469
4502
  ] });
4470
4503
  }
4471
- if (!organization) return /* @__PURE__ */ jsx52("div", { className: "ba-skeleton", "aria-label": t("organization.loading") });
4504
+ if (!organization) return /* @__PURE__ */ jsx53("div", { className: "ba-skeleton", "aria-label": t("organization.loading") });
4472
4505
  const membership = organization.members.find((member) => member.userId === user.id);
4473
- if (!membership) return /* @__PURE__ */ jsx52("p", { className: "ba-muted", children: t("organization.profile.notMember") });
4506
+ if (!membership) return /* @__PURE__ */ jsx53("p", { className: "ba-muted", children: t("organization.profile.notMember") });
4474
4507
  const canManage = canManageOrganization(membership);
4475
4508
  const visibleSections = canManage ? ["general", "members", "teams", "invitations", "danger"] : ["general", "members", "teams", "danger"];
4476
4509
  const activeSection = visibleSections.includes(section) ? section : "general";
@@ -4479,16 +4512,16 @@ function OrganizationProfile({ organizationId, defaultSection = "general", onDel
4479
4512
  setOrganization(null);
4480
4513
  callback?.(removedOrganization);
4481
4514
  };
4482
- return /* @__PURE__ */ jsxs49("article", { className: "ba-organization-profile", children: [
4483
- /* @__PURE__ */ jsxs49("header", { className: "ba-organization-profile-heading", children: [
4484
- /* @__PURE__ */ jsx52("span", { className: "ba-organization-avatar ba-organization-avatar-large", "aria-hidden": "true", children: organization.name.trim().charAt(0).toUpperCase() || "?" }),
4485
- /* @__PURE__ */ jsxs49("span", { children: [
4486
- /* @__PURE__ */ jsx52("h2", { className: "ba-title", children: organization.name }),
4487
- /* @__PURE__ */ jsx52("p", { className: "ba-muted", children: organization.slug })
4515
+ return /* @__PURE__ */ jsxs50("article", { className: "ba-organization-profile", children: [
4516
+ /* @__PURE__ */ jsxs50("header", { className: "ba-organization-profile-heading", children: [
4517
+ /* @__PURE__ */ jsx53("span", { className: "ba-organization-avatar ba-organization-avatar-large", "aria-hidden": "true", children: organization.name.trim().charAt(0).toUpperCase() || "?" }),
4518
+ /* @__PURE__ */ jsxs50("span", { children: [
4519
+ /* @__PURE__ */ jsx53("h2", { className: "ba-title", children: organization.name }),
4520
+ /* @__PURE__ */ jsx53("p", { className: "ba-muted", children: organization.slug })
4488
4521
  ] })
4489
4522
  ] }),
4490
- /* @__PURE__ */ jsxs49("div", { className: "ba-organization-profile-layout", children: [
4491
- /* @__PURE__ */ jsx52("nav", { className: "ba-organization-profile-nav", "aria-label": t("organization.profile.nav.label"), children: visibleSections.map((item) => /* @__PURE__ */ jsx52(
4523
+ /* @__PURE__ */ jsxs50("div", { className: "ba-organization-profile-layout", children: [
4524
+ /* @__PURE__ */ jsx53("nav", { className: "ba-organization-profile-nav", "aria-label": t("organization.profile.nav.label"), children: visibleSections.map((item) => /* @__PURE__ */ jsx53(
4492
4525
  "button",
4493
4526
  {
4494
4527
  className: "ba-profile-nav-item",
@@ -4499,12 +4532,12 @@ function OrganizationProfile({ organizationId, defaultSection = "general", onDel
4499
4532
  },
4500
4533
  item
4501
4534
  )) }),
4502
- /* @__PURE__ */ jsxs49("div", { className: "ba-organization-profile-content", children: [
4503
- activeSection === "general" && /* @__PURE__ */ jsx52(GeneralSection, { organization, canManage, onChanged: load }),
4504
- activeSection === "members" && /* @__PURE__ */ jsx52(MembersSection, { organization, userId: user.id, canManage, onChanged: load }),
4505
- activeSection === "teams" && /* @__PURE__ */ jsx52(React44.Suspense, { fallback: null, children: /* @__PURE__ */ jsx52(TeamsSection, { organization, membership }) }),
4506
- activeSection === "invitations" && /* @__PURE__ */ jsx52(InvitationsSection, { organization, onChanged: load }),
4507
- activeSection === "danger" && /* @__PURE__ */ jsx52(
4535
+ /* @__PURE__ */ jsxs50("div", { className: "ba-organization-profile-content", children: [
4536
+ activeSection === "general" && /* @__PURE__ */ jsx53(GeneralSection, { organization, canManage, onChanged: load }),
4537
+ activeSection === "members" && /* @__PURE__ */ jsx53(MembersSection, { organization, userId: user.id, canManage, onChanged: load }),
4538
+ activeSection === "teams" && /* @__PURE__ */ jsx53(React44.Suspense, { fallback: null, children: /* @__PURE__ */ jsx53(TeamsSection, { organization, membership }) }),
4539
+ activeSection === "invitations" && /* @__PURE__ */ jsx53(InvitationsSection, { organization, onChanged: load }),
4540
+ activeSection === "danger" && /* @__PURE__ */ jsx53(
4508
4541
  DangerSection,
4509
4542
  {
4510
4543
  organization,
@@ -4519,7 +4552,7 @@ function OrganizationProfile({ organizationId, defaultSection = "general", onDel
4519
4552
  }
4520
4553
 
4521
4554
  // src/components/OrganizationSwitcher.tsx
4522
- import { Fragment as Fragment13, jsx as jsx53, jsxs as jsxs50 } from "react/jsx-runtime";
4555
+ import { Fragment as Fragment13, jsx as jsx54, jsxs as jsxs51 } from "react/jsx-runtime";
4523
4556
  function OrganizationSwitcher({ showPersonalWorkspace = true, onOrganizationChange } = {}) {
4524
4557
  const t = useT();
4525
4558
  const { config, isLoading: configLoading } = usePublicConfig();
@@ -4552,9 +4585,9 @@ function OrganizationSwitcher({ showPersonalWorkspace = true, onOrganizationChan
4552
4585
  document.removeEventListener("keydown", onKeyDown);
4553
4586
  };
4554
4587
  }, [open]);
4555
- if (configLoading || !isLoaded) return /* @__PURE__ */ jsx53("div", { className: "ba-skeleton ba-organization-switcher-skeleton", "aria-label": t("organization.loading") });
4588
+ if (configLoading || !isLoaded) return /* @__PURE__ */ jsx54("div", { className: "ba-skeleton ba-organization-switcher-skeleton", "aria-label": t("organization.loading") });
4556
4589
  if (config?.organizations !== true) return null;
4557
- if (!isSignedIn) return /* @__PURE__ */ jsx53("p", { className: "ba-muted", children: t("organization.signedOut") });
4590
+ if (!isSignedIn) return /* @__PURE__ */ jsx54("p", { className: "ba-muted", children: t("organization.signedOut") });
4558
4591
  const select = (organization) => {
4559
4592
  void run(
4560
4593
  () => api.setActive({ organizationId: organization?.id ?? null }),
@@ -4597,9 +4630,9 @@ function OrganizationSwitcher({ showPersonalWorkspace = true, onOrganizationChan
4597
4630
  else if (event.key === "ArrowDown") items[(current + 1 + items.length) % items.length]?.focus();
4598
4631
  else items[(current - 1 + items.length) % items.length]?.focus();
4599
4632
  };
4600
- return /* @__PURE__ */ jsxs50(Fragment13, { children: [
4601
- /* @__PURE__ */ jsxs50("div", { ref: rootRef, className: "ba-organization-switcher", children: [
4602
- /* @__PURE__ */ jsxs50(
4633
+ return /* @__PURE__ */ jsxs51(Fragment13, { children: [
4634
+ /* @__PURE__ */ jsxs51("div", { ref: rootRef, className: "ba-organization-switcher", children: [
4635
+ /* @__PURE__ */ jsxs51(
4603
4636
  "button",
4604
4637
  {
4605
4638
  ref: triggerRef,
@@ -4616,43 +4649,43 @@ function OrganizationSwitcher({ showPersonalWorkspace = true, onOrganizationChan
4616
4649
  focusMenuItem(event.key === "ArrowDown" ? "first" : "last");
4617
4650
  },
4618
4651
  children: [
4619
- /* @__PURE__ */ jsx53("span", { className: "ba-organization-avatar", "aria-hidden": "true", children: active?.name.trim().charAt(0).toUpperCase() || "P" }),
4620
- /* @__PURE__ */ jsx53("span", { children: active?.name ?? t("organization.personal") }),
4621
- /* @__PURE__ */ jsx53("span", { "aria-hidden": "true", children: "\u2304" })
4652
+ /* @__PURE__ */ jsx54("span", { className: "ba-organization-avatar", "aria-hidden": "true", children: active?.name.trim().charAt(0).toUpperCase() || "P" }),
4653
+ /* @__PURE__ */ jsx54("span", { children: active?.name ?? t("organization.personal") }),
4654
+ /* @__PURE__ */ jsx54("span", { "aria-hidden": "true", children: "\u2304" })
4622
4655
  ]
4623
4656
  }
4624
4657
  ),
4625
- open && /* @__PURE__ */ jsxs50("div", { ref: menuRef, id: menuId, className: "ba-organization-menu", role: "menu", "aria-label": t("organization.switcher.label"), onKeyDown: onMenuKeyDown, children: [
4626
- isLoading ? /* @__PURE__ */ jsx53("div", { className: "ba-skeleton" }) : /* @__PURE__ */ jsxs50(Fragment13, { children: [
4627
- showPersonalWorkspace && /* @__PURE__ */ jsxs50("button", { className: "ba-organization-menu-item", type: "button", role: "menuitem", "aria-current": activeId === null ? "true" : void 0, disabled: pending, onClick: () => select(null), children: [
4628
- /* @__PURE__ */ jsx53("span", { className: "ba-organization-avatar", "aria-hidden": "true", children: "P" }),
4629
- /* @__PURE__ */ jsx53("span", { children: t("organization.personal") })
4658
+ open && /* @__PURE__ */ jsxs51("div", { ref: menuRef, id: menuId, className: "ba-organization-menu", role: "menu", "aria-label": t("organization.switcher.label"), onKeyDown: onMenuKeyDown, children: [
4659
+ isLoading ? /* @__PURE__ */ jsx54("div", { className: "ba-skeleton" }) : /* @__PURE__ */ jsxs51(Fragment13, { children: [
4660
+ showPersonalWorkspace && /* @__PURE__ */ jsxs51("button", { className: "ba-organization-menu-item", type: "button", role: "menuitem", "aria-current": activeId === null ? "true" : void 0, disabled: pending, onClick: () => select(null), children: [
4661
+ /* @__PURE__ */ jsx54("span", { className: "ba-organization-avatar", "aria-hidden": "true", children: "P" }),
4662
+ /* @__PURE__ */ jsx54("span", { children: t("organization.personal") })
4630
4663
  ] }),
4631
- organizations?.map((organization) => /* @__PURE__ */ jsxs50("button", { className: "ba-organization-menu-item", type: "button", role: "menuitem", "aria-current": activeId === organization.id ? "true" : void 0, disabled: pending, onClick: () => select(organization), children: [
4632
- /* @__PURE__ */ jsx53("span", { className: "ba-organization-avatar", "aria-hidden": "true", children: organization.name.trim().charAt(0).toUpperCase() || "?" }),
4633
- /* @__PURE__ */ jsxs50("span", { children: [
4664
+ organizations?.map((organization) => /* @__PURE__ */ jsxs51("button", { className: "ba-organization-menu-item", type: "button", role: "menuitem", "aria-current": activeId === organization.id ? "true" : void 0, disabled: pending, onClick: () => select(organization), children: [
4665
+ /* @__PURE__ */ jsx54("span", { className: "ba-organization-avatar", "aria-hidden": "true", children: organization.name.trim().charAt(0).toUpperCase() || "?" }),
4666
+ /* @__PURE__ */ jsxs51("span", { children: [
4634
4667
  organization.name,
4635
- /* @__PURE__ */ jsx53("small", { children: organization.slug })
4668
+ /* @__PURE__ */ jsx54("small", { children: organization.slug })
4636
4669
  ] })
4637
4670
  ] }, organization.id))
4638
4671
  ] }),
4639
- (loadError || error) && /* @__PURE__ */ jsxs50("div", { className: "ba-inline-error", children: [
4640
- /* @__PURE__ */ jsx53(FormError, { children: loadError ?? error }),
4641
- loadError && /* @__PURE__ */ jsx53("button", { className: "ba-link-button", type: "button", onClick: () => void refresh(), children: t("organization.retry") })
4672
+ (loadError || error) && /* @__PURE__ */ jsxs51("div", { className: "ba-inline-error", children: [
4673
+ /* @__PURE__ */ jsx54(FormError, { children: loadError ?? error }),
4674
+ loadError && /* @__PURE__ */ jsx54("button", { className: "ba-link-button", type: "button", onClick: () => void refresh(), children: t("organization.retry") })
4642
4675
  ] }),
4643
- /* @__PURE__ */ jsxs50("div", { className: "ba-organization-menu-actions", children: [
4644
- active && /* @__PURE__ */ jsx53("button", { className: "ba-menu-item", type: "button", role: "menuitem", onClick: () => {
4676
+ /* @__PURE__ */ jsxs51("div", { className: "ba-organization-menu-actions", children: [
4677
+ active && /* @__PURE__ */ jsx54("button", { className: "ba-menu-item", type: "button", role: "menuitem", onClick: () => {
4645
4678
  setOpen(false);
4646
4679
  setDialog("profile");
4647
4680
  }, children: t("organization.switcher.manage") }),
4648
- /* @__PURE__ */ jsx53("button", { className: "ba-menu-item", type: "button", role: "menuitem", onClick: () => {
4681
+ /* @__PURE__ */ jsx54("button", { className: "ba-menu-item", type: "button", role: "menuitem", onClick: () => {
4649
4682
  setOpen(false);
4650
4683
  setDialog("create");
4651
4684
  }, children: t("organization.switcher.create") })
4652
4685
  ] })
4653
4686
  ] })
4654
4687
  ] }),
4655
- dialog === "create" && /* @__PURE__ */ jsx53(OrganizationModal, { title: t("organization.create.title"), returnFocusRef: triggerRef, onClose: () => setDialog(null), children: /* @__PURE__ */ jsx53(
4688
+ dialog === "create" && /* @__PURE__ */ jsx54(OrganizationModal, { title: t("organization.create.title"), returnFocusRef: triggerRef, onClose: () => setDialog(null), children: /* @__PURE__ */ jsx54(
4656
4689
  CreateOrganization,
4657
4690
  {
4658
4691
  title: null,
@@ -4666,13 +4699,13 @@ function OrganizationSwitcher({ showPersonalWorkspace = true, onOrganizationChan
4666
4699
  }
4667
4700
  }
4668
4701
  ) }),
4669
- dialog === "profile" && active && /* @__PURE__ */ jsx53(OrganizationModal, { title: t("organization.profile.title"), returnFocusRef: triggerRef, onClose: () => setDialog(null), children: /* @__PURE__ */ jsx53(OrganizationProfile, { organizationId: active.id, onDeleted: () => void afterProfileRemoval(), onLeft: () => void afterProfileRemoval() }) })
4702
+ dialog === "profile" && active && /* @__PURE__ */ jsx54(OrganizationModal, { title: t("organization.profile.title"), returnFocusRef: triggerRef, onClose: () => setDialog(null), children: /* @__PURE__ */ jsx54(OrganizationProfile, { organizationId: active.id, onDeleted: () => void afterProfileRemoval(), onLeft: () => void afterProfileRemoval() }) })
4670
4703
  ] });
4671
4704
  }
4672
4705
 
4673
4706
  // src/components/OrganizationList.tsx
4674
4707
  import * as React46 from "react";
4675
- import { Fragment as Fragment14, jsx as jsx54, jsxs as jsxs51 } from "react/jsx-runtime";
4708
+ import { Fragment as Fragment14, jsx as jsx55, jsxs as jsxs52 } from "react/jsx-runtime";
4676
4709
  function OrganizationList({ onOrganizationChange } = {}) {
4677
4710
  const t = useT();
4678
4711
  const toServerError = useServerError();
@@ -4721,9 +4754,9 @@ function OrganizationList({ onOrganizationChange } = {}) {
4721
4754
  invitationRequestRef.current += 1;
4722
4755
  };
4723
4756
  }, [isLoaded, loadInvitations, user?.id]);
4724
- if (configLoading || !isLoaded) return /* @__PURE__ */ jsx54("div", { className: "ba-skeleton", "aria-label": t("organization.loading") });
4757
+ if (configLoading || !isLoaded) return /* @__PURE__ */ jsx55("div", { className: "ba-skeleton", "aria-label": t("organization.loading") });
4725
4758
  if (config?.organizations !== true) return null;
4726
- if (!isSignedIn) return /* @__PURE__ */ jsx54("p", { className: "ba-muted", children: t("organization.signedOut") });
4759
+ if (!isSignedIn) return /* @__PURE__ */ jsx55("p", { className: "ba-muted", children: t("organization.signedOut") });
4727
4760
  const setActive = (organization) => {
4728
4761
  void run(
4729
4762
  () => api.setActive({ organizationId: organization.id }),
@@ -4764,66 +4797,66 @@ function OrganizationList({ onOrganizationChange } = {}) {
4764
4797
  setDialog(null);
4765
4798
  setProfileId(null);
4766
4799
  };
4767
- return /* @__PURE__ */ jsxs51(Fragment14, { children: [
4768
- /* @__PURE__ */ jsxs51("section", { className: "ba-organization-directory", children: [
4769
- /* @__PURE__ */ jsxs51("header", { className: "ba-organization-directory-header", children: [
4770
- /* @__PURE__ */ jsxs51("span", { children: [
4771
- /* @__PURE__ */ jsx54("h2", { className: "ba-title", children: t("organization.list.title") }),
4772
- /* @__PURE__ */ jsx54("p", { className: "ba-muted", children: t("organization.list.description") })
4800
+ return /* @__PURE__ */ jsxs52(Fragment14, { children: [
4801
+ /* @__PURE__ */ jsxs52("section", { className: "ba-organization-directory", children: [
4802
+ /* @__PURE__ */ jsxs52("header", { className: "ba-organization-directory-header", children: [
4803
+ /* @__PURE__ */ jsxs52("span", { children: [
4804
+ /* @__PURE__ */ jsx55("h2", { className: "ba-title", children: t("organization.list.title") }),
4805
+ /* @__PURE__ */ jsx55("p", { className: "ba-muted", children: t("organization.list.description") })
4773
4806
  ] }),
4774
- /* @__PURE__ */ jsx54("button", { className: "ba-button", type: "button", onClick: (event) => {
4807
+ /* @__PURE__ */ jsx55("button", { className: "ba-button", type: "button", onClick: (event) => {
4775
4808
  dialogReturnFocusRef.current = event.currentTarget;
4776
4809
  setDialog("create");
4777
4810
  }, children: t("organization.switcher.create") })
4778
4811
  ] }),
4779
- (organizationError || error) && /* @__PURE__ */ jsxs51("div", { className: "ba-inline-error", children: [
4780
- /* @__PURE__ */ jsx54(FormError, { children: organizationError ?? error }),
4781
- organizationError && /* @__PURE__ */ jsx54("button", { className: "ba-link-button", type: "button", onClick: () => void refresh(), children: t("organization.retry") })
4812
+ (organizationError || error) && /* @__PURE__ */ jsxs52("div", { className: "ba-inline-error", children: [
4813
+ /* @__PURE__ */ jsx55(FormError, { children: organizationError ?? error }),
4814
+ organizationError && /* @__PURE__ */ jsx55("button", { className: "ba-link-button", type: "button", onClick: () => void refresh(), children: t("organization.retry") })
4782
4815
  ] }),
4783
- isLoading ? /* @__PURE__ */ jsxs51("div", { className: "ba-organization-card-grid", children: [
4784
- /* @__PURE__ */ jsx54("div", { className: "ba-skeleton" }),
4785
- /* @__PURE__ */ jsx54("div", { className: "ba-skeleton" })
4786
- ] }) : organizations?.length ? /* @__PURE__ */ jsx54("ul", { className: "ba-organization-card-grid", children: organizations.map((organization) => /* @__PURE__ */ jsxs51("li", { className: "ba-organization-card", children: [
4787
- /* @__PURE__ */ jsx54("span", { className: "ba-organization-avatar ba-organization-avatar-large", "aria-hidden": "true", children: organization.name.trim().charAt(0).toUpperCase() || "?" }),
4788
- /* @__PURE__ */ jsxs51("span", { className: "ba-organization-card-copy", children: [
4789
- /* @__PURE__ */ jsx54("strong", { children: organization.name }),
4790
- /* @__PURE__ */ jsx54("small", { children: /* @__PURE__ */ jsx54(Bidi, { children: organization.slug }) })
4816
+ isLoading ? /* @__PURE__ */ jsxs52("div", { className: "ba-organization-card-grid", children: [
4817
+ /* @__PURE__ */ jsx55("div", { className: "ba-skeleton" }),
4818
+ /* @__PURE__ */ jsx55("div", { className: "ba-skeleton" })
4819
+ ] }) : organizations?.length ? /* @__PURE__ */ jsx55("ul", { className: "ba-organization-card-grid", children: organizations.map((organization) => /* @__PURE__ */ jsxs52("li", { className: "ba-organization-card", children: [
4820
+ /* @__PURE__ */ jsx55("span", { className: "ba-organization-avatar ba-organization-avatar-large", "aria-hidden": "true", children: organization.name.trim().charAt(0).toUpperCase() || "?" }),
4821
+ /* @__PURE__ */ jsxs52("span", { className: "ba-organization-card-copy", children: [
4822
+ /* @__PURE__ */ jsx55("strong", { children: organization.name }),
4823
+ /* @__PURE__ */ jsx55("small", { children: /* @__PURE__ */ jsx55(Bidi, { children: organization.slug }) })
4791
4824
  ] }),
4792
- activeId === organization.id && /* @__PURE__ */ jsx54("span", { className: "ba-organization-active", children: t("organization.list.active") }),
4793
- /* @__PURE__ */ jsxs51("span", { className: "ba-organization-card-actions", children: [
4794
- activeId !== organization.id && /* @__PURE__ */ jsx54("button", { className: "ba-button ba-button-secondary", type: "button", disabled: pending, onClick: () => setActive(organization), children: t("organization.list.switch") }),
4795
- /* @__PURE__ */ jsx54("button", { className: "ba-link-button", type: "button", onClick: (event) => openProfile(organization, event.currentTarget), children: t("organization.list.manage") })
4825
+ activeId === organization.id && /* @__PURE__ */ jsx55("span", { className: "ba-organization-active", children: t("organization.list.active") }),
4826
+ /* @__PURE__ */ jsxs52("span", { className: "ba-organization-card-actions", children: [
4827
+ activeId !== organization.id && /* @__PURE__ */ jsx55("button", { className: "ba-button ba-button-secondary", type: "button", disabled: pending, onClick: () => setActive(organization), children: t("organization.list.switch") }),
4828
+ /* @__PURE__ */ jsx55("button", { className: "ba-link-button", type: "button", onClick: (event) => openProfile(organization, event.currentTarget), children: t("organization.list.manage") })
4796
4829
  ] })
4797
- ] }, organization.id)) }) : organizationError ? null : /* @__PURE__ */ jsx54("p", { className: "ba-muted", children: t("organization.list.empty") }),
4798
- /* @__PURE__ */ jsxs51("section", { className: "ba-organization-user-invitations", children: [
4799
- /* @__PURE__ */ jsxs51("header", { className: "ba-organization-section-header", children: [
4800
- /* @__PURE__ */ jsx54("h3", { className: "ba-title", children: t("organization.list.invitationsTitle") }),
4801
- /* @__PURE__ */ jsx54("p", { className: "ba-muted", children: t("organization.list.invitationsDescription") })
4830
+ ] }, organization.id)) }) : organizationError ? null : /* @__PURE__ */ jsx55("p", { className: "ba-muted", children: t("organization.list.empty") }),
4831
+ /* @__PURE__ */ jsxs52("section", { className: "ba-organization-user-invitations", children: [
4832
+ /* @__PURE__ */ jsxs52("header", { className: "ba-organization-section-header", children: [
4833
+ /* @__PURE__ */ jsx55("h3", { className: "ba-title", children: t("organization.list.invitationsTitle") }),
4834
+ /* @__PURE__ */ jsx55("p", { className: "ba-muted", children: t("organization.list.invitationsDescription") })
4802
4835
  ] }),
4803
- invitationError && /* @__PURE__ */ jsxs51("div", { className: "ba-inline-error", children: [
4804
- /* @__PURE__ */ jsx54(FormError, { children: invitationError }),
4805
- /* @__PURE__ */ jsx54("button", { className: "ba-link-button", type: "button", onClick: () => void loadInvitations(), children: t("organization.retry") })
4836
+ invitationError && /* @__PURE__ */ jsxs52("div", { className: "ba-inline-error", children: [
4837
+ /* @__PURE__ */ jsx55(FormError, { children: invitationError }),
4838
+ /* @__PURE__ */ jsx55("button", { className: "ba-link-button", type: "button", onClick: () => void loadInvitations(), children: t("organization.retry") })
4806
4839
  ] }),
4807
- invitations?.length ? /* @__PURE__ */ jsx54("ul", { className: "ba-organization-list", children: invitations.map((invitation) => /* @__PURE__ */ jsxs51("li", { className: "ba-organization-invitation", children: [
4808
- /* @__PURE__ */ jsxs51("span", { children: [
4809
- /* @__PURE__ */ jsx54("strong", { children: invitation.organizationName }),
4810
- /* @__PURE__ */ jsx54("small", { children: organizationRoleLabel(invitation.role, t) })
4840
+ invitations?.length ? /* @__PURE__ */ jsx55("ul", { className: "ba-organization-list", children: invitations.map((invitation) => /* @__PURE__ */ jsxs52("li", { className: "ba-organization-invitation", children: [
4841
+ /* @__PURE__ */ jsxs52("span", { children: [
4842
+ /* @__PURE__ */ jsx55("strong", { children: invitation.organizationName }),
4843
+ /* @__PURE__ */ jsx55("small", { children: organizationRoleLabel(invitation.role, t) })
4811
4844
  ] }),
4812
- /* @__PURE__ */ jsxs51("span", { className: "ba-organization-card-actions", children: [
4813
- /* @__PURE__ */ jsx54("button", { className: "ba-button", type: "button", disabled: pending, onClick: () => invitationAction(invitation, "accept"), children: t("organization.list.accept") }),
4814
- /* @__PURE__ */ jsx54("button", { className: "ba-link-button", type: "button", disabled: pending, onClick: () => invitationAction(invitation, "reject"), children: t("organization.list.reject") })
4845
+ /* @__PURE__ */ jsxs52("span", { className: "ba-organization-card-actions", children: [
4846
+ /* @__PURE__ */ jsx55("button", { className: "ba-button", type: "button", disabled: pending, onClick: () => invitationAction(invitation, "accept"), children: t("organization.list.accept") }),
4847
+ /* @__PURE__ */ jsx55("button", { className: "ba-link-button", type: "button", disabled: pending, onClick: () => invitationAction(invitation, "reject"), children: t("organization.list.reject") })
4815
4848
  ] })
4816
- ] }, invitation.id)) }) : invitationError ? null : invitations === null ? /* @__PURE__ */ jsx54("div", { className: "ba-skeleton" }) : /* @__PURE__ */ jsx54("p", { className: "ba-muted", children: t("organization.list.noInvitations") })
4849
+ ] }, invitation.id)) }) : invitationError ? null : invitations === null ? /* @__PURE__ */ jsx55("div", { className: "ba-skeleton" }) : /* @__PURE__ */ jsx55("p", { className: "ba-muted", children: t("organization.list.noInvitations") })
4817
4850
  ] })
4818
4851
  ] }),
4819
- dialog === "create" && /* @__PURE__ */ jsx54(OrganizationModal, { title: t("organization.create.title"), returnFocusRef: dialogReturnFocusRef, onClose: () => setDialog(null), children: /* @__PURE__ */ jsx54(CreateOrganization, { title: null, onCreated: () => {
4852
+ dialog === "create" && /* @__PURE__ */ jsx55(OrganizationModal, { title: t("organization.create.title"), returnFocusRef: dialogReturnFocusRef, onClose: () => setDialog(null), children: /* @__PURE__ */ jsx55(CreateOrganization, { title: null, onCreated: () => {
4820
4853
  void (async () => {
4821
4854
  await refresh();
4822
4855
  await session.refetch({ query: { disableCookieCache: true } });
4823
4856
  setDialog(null);
4824
4857
  })();
4825
4858
  } }) }),
4826
- dialog === "profile" && profileId && /* @__PURE__ */ jsx54(OrganizationModal, { title: t("organization.profile.title"), returnFocusRef: dialogReturnFocusRef, onClose: () => setDialog(null), children: /* @__PURE__ */ jsx54(OrganizationProfile, { organizationId: profileId, onDeleted: () => void afterProfileRemoval(), onLeft: () => void afterProfileRemoval() }) })
4859
+ dialog === "profile" && profileId && /* @__PURE__ */ jsx55(OrganizationModal, { title: t("organization.profile.title"), returnFocusRef: dialogReturnFocusRef, onClose: () => setDialog(null), children: /* @__PURE__ */ jsx55(OrganizationProfile, { organizationId: profileId, onDeleted: () => void afterProfileRemoval(), onLeft: () => void afterProfileRemoval() }) })
4827
4860
  ] });
4828
4861
  }
4829
4862