@carlonicora/nextjs-jsonapi 6.29.1 → 6.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/dist/{BlockNoteEditor-K4HWQLPJ.js → BlockNoteEditor-ICGGCW6N.js} +24 -24
  2. package/dist/{BlockNoteEditor-K4HWQLPJ.js.map → BlockNoteEditor-ICGGCW6N.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-TDX2RC7I.mjs → BlockNoteEditor-O4E67ECL.mjs} +4 -4
  4. package/dist/{BlockNoteViewer-76CKL6W5.mjs → BlockNoteViewer-BNZEXGVT.mjs} +2 -2
  5. package/dist/{BlockNoteViewer-B25WKYQP.js → BlockNoteViewer-YONLBNXW.js} +3 -3
  6. package/dist/{BlockNoteViewer-B25WKYQP.js.map → BlockNoteViewer-YONLBNXW.js.map} +1 -1
  7. package/dist/billing/index.js +465 -465
  8. package/dist/billing/index.mjs +3 -3
  9. package/dist/{chunk-77JC2UCF.js → chunk-5XP5G45B.js} +23 -10
  10. package/dist/chunk-5XP5G45B.js.map +1 -0
  11. package/dist/{chunk-OVSR72CZ.mjs → chunk-BT3VFB3I.mjs} +333 -299
  12. package/dist/chunk-BT3VFB3I.mjs.map +1 -0
  13. package/dist/{chunk-7MGXQIEP.mjs → chunk-FDKAVSZ6.mjs} +2 -2
  14. package/dist/{chunk-FJUKLVVX.mjs → chunk-HNK2O6YE.mjs} +23 -10
  15. package/dist/chunk-HNK2O6YE.mjs.map +1 -0
  16. package/dist/{chunk-M7YK5CCE.mjs → chunk-JL6XL5NK.mjs} +9 -2
  17. package/dist/chunk-JL6XL5NK.mjs.map +1 -0
  18. package/dist/{chunk-QI4SCGPB.js → chunk-M7FA63QE.js} +803 -769
  19. package/dist/chunk-M7FA63QE.js.map +1 -0
  20. package/dist/{chunk-F3EVYBMA.js → chunk-NQL2NDKH.js} +4 -4
  21. package/dist/{chunk-F3EVYBMA.js.map → chunk-NQL2NDKH.js.map} +1 -1
  22. package/dist/{chunk-ONU4WCDG.js → chunk-Q5SMFSE4.js} +11 -4
  23. package/dist/chunk-Q5SMFSE4.js.map +1 -0
  24. package/dist/client/index.js +4 -4
  25. package/dist/client/index.mjs +3 -3
  26. package/dist/components/forms/CommonEditorButtons.d.ts.map +1 -1
  27. package/dist/components/index.js +4 -4
  28. package/dist/components/index.mjs +3 -3
  29. package/dist/contexts/index.js +4 -4
  30. package/dist/contexts/index.mjs +3 -3
  31. package/dist/core/index.js +2 -2
  32. package/dist/core/index.mjs +1 -1
  33. package/dist/email-automations/index.js +105 -105
  34. package/dist/email-automations/index.mjs +3 -3
  35. package/dist/features/analytics/index.js +114 -114
  36. package/dist/features/analytics/index.mjs +3 -3
  37. package/dist/features/analytics/server.js +4 -4
  38. package/dist/features/analytics/server.mjs +2 -2
  39. package/dist/features/auth/components/GdprConsentSection.d.ts +2 -1
  40. package/dist/features/auth/components/GdprConsentSection.d.ts.map +1 -1
  41. package/dist/features/auth/components/forms/Login.d.ts.map +1 -1
  42. package/dist/features/auth/components/forms/Register.d.ts.map +1 -1
  43. package/dist/features/auth/data/auth.service.d.ts +8 -3
  44. package/dist/features/auth/data/auth.service.d.ts.map +1 -1
  45. package/dist/features/auth/data/pending-registration.d.ts +2 -0
  46. package/dist/features/auth/data/pending-registration.d.ts.map +1 -1
  47. package/dist/features/auth/data/pending-registration.interface.d.ts +1 -0
  48. package/dist/features/auth/data/pending-registration.interface.d.ts.map +1 -1
  49. package/dist/features/auth/hooks/useCompleteLogin.d.ts +9 -0
  50. package/dist/features/auth/hooks/useCompleteLogin.d.ts.map +1 -0
  51. package/dist/features/blog/index.js +129 -129
  52. package/dist/features/blog/index.mjs +3 -3
  53. package/dist/features/blog/server.js +7 -7
  54. package/dist/features/blog/server.mjs +1 -1
  55. package/dist/features/help/index.js +37 -37
  56. package/dist/features/help/index.mjs +3 -3
  57. package/dist/features/tokenusage/index.js +114 -114
  58. package/dist/features/tokenusage/index.mjs +3 -3
  59. package/dist/index.js +3 -3
  60. package/dist/index.mjs +2 -2
  61. package/dist/login/config.d.ts +3 -0
  62. package/dist/login/config.d.ts.map +1 -1
  63. package/dist/login/index.d.ts +1 -1
  64. package/dist/login/index.d.ts.map +1 -1
  65. package/dist/server/index.js +3 -3
  66. package/dist/server/index.mjs +2 -2
  67. package/messages/en.json +1 -0
  68. package/messages/it.json +1 -0
  69. package/package.json +1 -1
  70. package/src/components/forms/CommonEditorButtons.tsx +16 -2
  71. package/src/features/auth/components/GdprConsentSection.tsx +3 -1
  72. package/src/features/auth/components/forms/Login.tsx +4 -32
  73. package/src/features/auth/components/forms/Register.tsx +66 -36
  74. package/src/features/auth/data/__tests__/auth.oauth-completion.spec.ts +44 -0
  75. package/src/features/auth/data/__tests__/pending-registration.spec.ts +8 -0
  76. package/src/features/auth/data/auth.service.ts +21 -15
  77. package/src/features/auth/data/pending-registration.interface.ts +1 -0
  78. package/src/features/auth/data/pending-registration.ts +6 -0
  79. package/src/features/auth/hooks/__tests__/useCompleteLogin.spec.tsx +85 -0
  80. package/src/features/auth/hooks/useCompleteLogin.ts +47 -0
  81. package/src/login/__tests__/config.spec.ts +21 -0
  82. package/src/login/config.ts +8 -0
  83. package/src/login/index.ts +1 -0
  84. package/dist/chunk-77JC2UCF.js.map +0 -1
  85. package/dist/chunk-FJUKLVVX.mjs.map +0 -1
  86. package/dist/chunk-M7YK5CCE.mjs.map +0 -1
  87. package/dist/chunk-ONU4WCDG.js.map +0 -1
  88. package/dist/chunk-OVSR72CZ.mjs.map +0 -1
  89. package/dist/chunk-QI4SCGPB.js.map +0 -1
  90. /package/dist/{BlockNoteEditor-TDX2RC7I.mjs.map → BlockNoteEditor-O4E67ECL.mjs.map} +0 -0
  91. /package/dist/{BlockNoteViewer-76CKL6W5.mjs.map → BlockNoteViewer-BNZEXGVT.mjs.map} +0 -0
  92. /package/dist/{chunk-7MGXQIEP.mjs.map → chunk-FDKAVSZ6.mjs.map} +0 -0
@@ -21,13 +21,14 @@ import {
21
21
  getStripePublishableKey,
22
22
  getTrackablePages,
23
23
  getWaitlistConfig,
24
+ isCompanyNameRequired,
24
25
  isDiscordAuthEnabled,
25
26
  isGoogleAuthEnabled,
26
27
  isInternalAuthEnabled,
27
28
  isReferralEnabled,
28
29
  isRegistrationAllowed,
29
30
  useWaitlistText
30
- } from "./chunk-M7YK5CCE.mjs";
31
+ } from "./chunk-JL6XL5NK.mjs";
31
32
  import {
32
33
  getRoleId,
33
34
  isRolesConfigured
@@ -102,7 +103,7 @@ import {
102
103
  useIsMobile,
103
104
  validateItalianTaxCode,
104
105
  validatePartitaIva
105
- } from "./chunk-FJUKLVVX.mjs";
106
+ } from "./chunk-HNK2O6YE.mjs";
106
107
  import {
107
108
  dateFormatLocale,
108
109
  formatDate
@@ -6767,7 +6768,7 @@ __name(useHeaderLogo, "useHeaderLogo");
6767
6768
 
6768
6769
  // src/components/navigations/Breadcrumb.tsx
6769
6770
  import { useTranslations as useTranslations57 } from "next-intl";
6770
- import { Fragment as Fragment23, useState as useState50 } from "react";
6771
+ import { Fragment as Fragment24, useState as useState50 } from "react";
6771
6772
  import { ChevronDownIcon as ChevronDownIcon8 } from "lucide-react";
6772
6773
 
6773
6774
  // src/hooks/TableGeneratorRegistry.ts
@@ -7926,7 +7927,7 @@ var useAdministrationContext = /* @__PURE__ */ __name(() => {
7926
7927
 
7927
7928
  // src/features/company/contexts/CompanyContext.tsx
7928
7929
  import { useTranslations as useTranslations47 } from "next-intl";
7929
- import { Fragment as Fragment21, createContext as createContext17, useContext as useContext18, useState as useState39 } from "react";
7930
+ import { Fragment as Fragment22, createContext as createContext17, useContext as useContext18, useState as useState39 } from "react";
7930
7931
 
7931
7932
  // src/features/user/contexts/CurrentUserContext.tsx
7932
7933
  import { getCookie } from "cookies-next";
@@ -9555,7 +9556,8 @@ __name(CommonDeleter, "CommonDeleter");
9555
9556
 
9556
9557
  // src/components/forms/CommonEditorButtons.tsx
9557
9558
  import { useTranslations as useTranslations14 } from "next-intl";
9558
- import { jsx as jsx81, jsxs as jsxs43 } from "react/jsx-runtime";
9559
+ import { Loader2 as Loader23 } from "lucide-react";
9560
+ import { Fragment as Fragment10, jsx as jsx81, jsxs as jsxs43 } from "react/jsx-runtime";
9559
9561
  function CommonEditorButtons({
9560
9562
  isEdit,
9561
9563
  form,
@@ -9566,11 +9568,15 @@ function CommonEditorButtons({
9566
9568
  buttonTitle
9567
9569
  }) {
9568
9570
  const t = useTranslations14();
9571
+ const submitLabel = form.formState.isSubmitting ? /* @__PURE__ */ jsxs43(Fragment10, { children: [
9572
+ /* @__PURE__ */ jsx81(Loader23, { className: "h-4 w-4 animate-spin" }),
9573
+ t(`ui.buttons.saving`)
9574
+ ] }) : buttonTitle ? buttonTitle : isEdit ? t(`ui.buttons.confirm_update`) : t(`ui.buttons.confirm_create`);
9569
9575
  if (centerButtons) {
9570
9576
  return /* @__PURE__ */ jsxs43("div", { className: "flex w-full items-center justify-between gap-x-2", children: [
9571
9577
  /* @__PURE__ */ jsx81(Button, { variant: "outline", type: `button`, onClick: () => setOpen(false), "data-testid": `modal-button-cancel`, children: t(`ui.buttons.cancel`) }),
9572
9578
  /* @__PURE__ */ jsx81("div", { className: "flex flex-1 justify-center gap-x-2", children: centerButtons }),
9573
- !hideSubmit ? /* @__PURE__ */ jsx81(Button, { type: "submit", disabled: form.formState.isSubmitting || disabled, "data-testid": `modal-button-create`, children: buttonTitle ? buttonTitle : isEdit ? t(`ui.buttons.confirm_update`) : t(`ui.buttons.confirm_create`) }) : /* @__PURE__ */ jsx81("div", {})
9579
+ !hideSubmit ? /* @__PURE__ */ jsx81(Button, { type: "submit", disabled: form.formState.isSubmitting || disabled, "data-testid": `modal-button-create`, children: submitLabel }) : /* @__PURE__ */ jsx81("div", {})
9574
9580
  ] });
9575
9581
  }
9576
9582
  return /* @__PURE__ */ jsxs43("div", { className: "flex justify-end", children: [
@@ -9585,7 +9591,7 @@ function CommonEditorButtons({
9585
9591
  children: t(`ui.buttons.cancel`)
9586
9592
  }
9587
9593
  ),
9588
- !hideSubmit && /* @__PURE__ */ jsx81(Button, { type: "submit", disabled: form.formState.isSubmitting || disabled, "data-testid": `modal-button-create`, children: buttonTitle ? buttonTitle : isEdit ? t(`ui.buttons.confirm_update`) : t(`ui.buttons.confirm_create`) })
9594
+ !hideSubmit && /* @__PURE__ */ jsx81(Button, { type: "submit", disabled: form.formState.isSubmitting || disabled, "data-testid": `modal-button-create`, children: submitLabel })
9589
9595
  ] });
9590
9596
  }
9591
9597
  __name(CommonEditorButtons, "CommonEditorButtons");
@@ -9898,7 +9904,7 @@ var DatePickerPopover = /* @__PURE__ */ __name(({
9898
9904
  import { CalendarIcon as CalendarIcon2 } from "lucide-react";
9899
9905
  import { useTranslations as useTranslations18 } from "next-intl";
9900
9906
  import { useEffect as useEffect17, useState as useState23 } from "react";
9901
- import { Fragment as Fragment10, jsx as jsx87, jsxs as jsxs48 } from "react/jsx-runtime";
9907
+ import { Fragment as Fragment11, jsx as jsx87, jsxs as jsxs48 } from "react/jsx-runtime";
9902
9908
  function nextDateRange(params) {
9903
9909
  const { current, computed, triggerDate } = params;
9904
9910
  if (!computed) return void 0;
@@ -9942,7 +9948,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9942
9948
  className: cn("w-[300px] justify-start text-start font-normal", !date && "text-muted-foreground"),
9943
9949
  children: [
9944
9950
  /* @__PURE__ */ jsx87(CalendarIcon2, {}),
9945
- date?.from ? date.to ? /* @__PURE__ */ jsxs48(Fragment10, { children: [
9951
+ date?.from ? date.to ? /* @__PURE__ */ jsxs48(Fragment11, { children: [
9946
9952
  format(date.from, "dateMedium"),
9947
9953
  " - ",
9948
9954
  format(date.to, "dateMedium")
@@ -9965,7 +9971,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9965
9971
  ),
9966
9972
  children: [
9967
9973
  /* @__PURE__ */ jsx87(CalendarIcon2, {}),
9968
- date?.from ? date.to ? /* @__PURE__ */ jsxs48(Fragment10, { children: [
9974
+ date?.from ? date.to ? /* @__PURE__ */ jsxs48(Fragment11, { children: [
9969
9975
  format(date.from, "dateMedium"),
9970
9976
  " - ",
9971
9977
  format(date.to, "dateMedium")
@@ -10132,7 +10138,7 @@ function useEditorDialog(isFormDirty, options) {
10132
10138
  __name(useEditorDialog, "useEditorDialog");
10133
10139
 
10134
10140
  // src/components/forms/EditorSheet.tsx
10135
- import { Fragment as Fragment11, jsx as jsx88, jsxs as jsxs49 } from "react/jsx-runtime";
10141
+ import { Fragment as Fragment12, jsx as jsx88, jsxs as jsxs49 } from "react/jsx-runtime";
10136
10142
  function resolveTriggerIsNativeButton(trigger) {
10137
10143
  if (!isValidElement2(trigger)) return true;
10138
10144
  const props = trigger.props ?? {};
@@ -10256,7 +10262,7 @@ function EditorSheet({
10256
10262
  );
10257
10263
  const headerTitle = titleOverride ?? (isEdit ? t("common.edit.update.title", { type: entityType }) : t("common.edit.create.title", { type: entityType }));
10258
10264
  const headerDescription = descriptionOverride ?? (isEdit ? t("common.edit.update.description", { type: entityType, name: entityName2 ?? "" }) : t("common.edit.create.description", { type: entityType }));
10259
- return /* @__PURE__ */ jsxs49(Fragment11, { children: [
10265
+ return /* @__PURE__ */ jsxs49(Fragment12, { children: [
10260
10266
  /* @__PURE__ */ jsxs49(Sheet, { open, onOpenChange: handleOpenChange, children: [
10261
10267
  dialogOpen === void 0 && forceShow === void 0 && (trigger ? (
10262
10268
  // Base UI: the trigger renders its own <button>. Pass the caller's
@@ -10314,7 +10320,7 @@ function EditorSheet({
10314
10320
  ] }),
10315
10321
  /* @__PURE__ */ jsx88("div", { className: "flex shrink-0 items-center gap-x-2", children: actions })
10316
10322
  ] })
10317
- ) : /* @__PURE__ */ jsxs49(Fragment11, { children: [
10323
+ ) : /* @__PURE__ */ jsxs49(Fragment12, { children: [
10318
10324
  /* @__PURE__ */ jsx88(SheetTitle, { children: headerTitle }),
10319
10325
  /* @__PURE__ */ jsx88(SheetDescription, { children: headerDescription })
10320
10326
  ] }) }),
@@ -10877,7 +10883,7 @@ import { useRef as useRef18 } from "react";
10877
10883
  import dynamic from "next/dynamic";
10878
10884
  import React18 from "react";
10879
10885
  import { jsx as jsx91 } from "react/jsx-runtime";
10880
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-TDX2RC7I.mjs"), {
10886
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-O4E67ECL.mjs"), {
10881
10887
  ssr: false
10882
10888
  });
10883
10889
  var BlockNoteEditorContainer = React18.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -12247,7 +12253,7 @@ var useUserSearch = /* @__PURE__ */ __name(() => {
12247
12253
  // src/features/user/hooks/useUserTableStructure.tsx
12248
12254
  import { useTranslations as useTranslations25 } from "next-intl";
12249
12255
  import { useMemo as useMemo16 } from "react";
12250
- import { Fragment as Fragment12, jsx as jsx109, jsxs as jsxs65 } from "react/jsx-runtime";
12256
+ import { Fragment as Fragment13, jsx as jsx109, jsxs as jsxs65 } from "react/jsx-runtime";
12251
12257
  var useUserTableStructure = /* @__PURE__ */ __name((params) => {
12252
12258
  const t = useTranslations25();
12253
12259
  const generateUrl = usePageUrlGenerator();
@@ -12299,7 +12305,7 @@ var useUserTableStructure = /* @__PURE__ */ __name((params) => {
12299
12305
  id: "email",
12300
12306
  accessorKey: "email",
12301
12307
  header: t(`common.fields.email.label`),
12302
- cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx109(Fragment12, { children: row.getValue("email") }), "cell"),
12308
+ cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx109(Fragment13, { children: row.getValue("email") }), "cell"),
12303
12309
  enableSorting: false,
12304
12310
  enableHiding: false
12305
12311
  }),
@@ -12324,7 +12330,7 @@ var useUserTableStructure = /* @__PURE__ */ __name((params) => {
12324
12330
  header: t(`common.relevance`),
12325
12331
  cell: /* @__PURE__ */ __name(({ row }) => {
12326
12332
  const user = row.original.jsonApiData;
12327
- if (!user.relevance) return /* @__PURE__ */ jsx109(Fragment12, {});
12333
+ if (!user.relevance) return /* @__PURE__ */ jsx109(Fragment13, {});
12328
12334
  const response = `${user.relevance.toFixed(0)}%`;
12329
12335
  return /* @__PURE__ */ jsxs65("div", { className: "relative flex h-5 w-20 items-center justify-center overflow-clip rounded border text-center", children: [
12330
12336
  /* @__PURE__ */ jsx109(
@@ -12418,7 +12424,7 @@ var UserSearchPopover = /* @__PURE__ */ __name(({ children, onSelect, align = "s
12418
12424
  }, "UserSearchPopover");
12419
12425
 
12420
12426
  // src/features/user/components/forms/UserSelector.tsx
12421
- import { Fragment as Fragment13, jsx as jsx111, jsxs as jsxs67 } from "react/jsx-runtime";
12427
+ import { Fragment as Fragment14, jsx as jsx111, jsxs as jsxs67 } from "react/jsx-runtime";
12422
12428
  function UserSelector({ id, form, label, placeholder, onChange, isRequired = false }) {
12423
12429
  const t = useTranslations27();
12424
12430
  const [open, setOpen] = useState35(false);
@@ -12502,7 +12508,7 @@ function UserSelector({ id, form, label, placeholder, onChange, isRequired = fal
12502
12508
  search("");
12503
12509
  }
12504
12510
  }
12505
- ) : /* @__PURE__ */ jsx111(Fragment13, {})
12511
+ ) : /* @__PURE__ */ jsx111(Fragment14, {})
12506
12512
  ] }),
12507
12513
  /* @__PURE__ */ jsx111(CommandList, { children: data.data && data.data.length > 0 && data.data.map((user) => /* @__PURE__ */ jsxs67(
12508
12514
  CommandItem,
@@ -12669,7 +12675,7 @@ __name(AttributeElement, "AttributeElement");
12669
12675
 
12670
12676
  // src/features/user/components/details/UserContent.tsx
12671
12677
  import { BriefcaseIcon, MailIcon as MailIcon2, PhoneIcon } from "lucide-react";
12672
- import { Fragment as Fragment14, jsx as jsx117, jsxs as jsxs69 } from "react/jsx-runtime";
12678
+ import { Fragment as Fragment15, jsx as jsx117, jsxs as jsxs69 } from "react/jsx-runtime";
12673
12679
  function UserContent({ user }) {
12674
12680
  const t = useTranslations31();
12675
12681
  const generateUrl = usePageUrlGenerator();
@@ -12697,7 +12703,7 @@ function UserContent({ user }) {
12697
12703
  ),
12698
12704
  /* @__PURE__ */ jsxs69("div", { className: "flex flex-col gap-y-2", children: [
12699
12705
  user.roles && user.roles.length > 0 && /* @__PURE__ */ jsx117("div", { className: "flex flex-wrap gap-2", children: user.roles.map((role) => /* @__PURE__ */ jsx117(Link, { href: generateUrl({ page: Modules.Role, id: role.id }), children: /* @__PURE__ */ jsx117(Badge, { variant: "default", children: t(`role.roles`, { role: role.id.replaceAll(`-`, ``) }) }) }, role.id)) }),
12700
- user.isDeleted ? /* @__PURE__ */ jsx117("div", { children: /* @__PURE__ */ jsx117(Badge, { variant: "destructive", children: t(`user.errors.deleted`) }) }) : /* @__PURE__ */ jsx117(Fragment14, { children: !user.isActivated && /* @__PURE__ */ jsx117("div", { children: /* @__PURE__ */ jsx117(Badge, { variant: "destructive", children: t(`user.errors.inactive`) }) }) }),
12706
+ user.isDeleted ? /* @__PURE__ */ jsx117("div", { children: /* @__PURE__ */ jsx117(Badge, { variant: "destructive", children: t(`user.errors.deleted`) }) }) : /* @__PURE__ */ jsx117(Fragment15, { children: !user.isActivated && /* @__PURE__ */ jsx117("div", { children: /* @__PURE__ */ jsx117(Badge, { variant: "destructive", children: t(`user.errors.inactive`) }) }) }),
12701
12707
  user.title && /* @__PURE__ */ jsxs69("div", { className: "text-muted-foreground flex items-center gap-x-2 text-sm", children: [
12702
12708
  /* @__PURE__ */ jsx117(BriefcaseIcon, { className: "h-4 w-4 shrink-0" }),
12703
12709
  user.title
@@ -12736,12 +12742,12 @@ __name(UserIndexDetails, "UserIndexDetails");
12736
12742
  // src/features/user/components/details/UserStandaloneDetails.tsx
12737
12743
  import { useTranslations as useTranslations32 } from "next-intl";
12738
12744
  import Image4 from "next/image";
12739
- import { Fragment as Fragment15, jsx as jsx119, jsxs as jsxs71 } from "react/jsx-runtime";
12745
+ import { Fragment as Fragment16, jsx as jsx119, jsxs as jsxs71 } from "react/jsx-runtime";
12740
12746
  function UserStanadaloneDetails({ user }) {
12741
12747
  const generateUrl = usePageUrlGenerator();
12742
12748
  const t = useTranslations32();
12743
12749
  const { title } = useSharedContext();
12744
- let roles = /* @__PURE__ */ jsx119(Fragment15, {});
12750
+ let roles = /* @__PURE__ */ jsx119(Fragment16, {});
12745
12751
  if (user.roles && user.roles.length > 0) {
12746
12752
  roles = /* @__PURE__ */ jsx119("div", { className: "mb-4 w-full", children: /* @__PURE__ */ jsx119("div", { className: "flex flex-wrap gap-2", children: user.roles.map((role, _index) => /* @__PURE__ */ jsx119(Link, { href: generateUrl({ page: Modules.Role, id: role.id }), children: /* @__PURE__ */ jsx119(Badge, { className: "me-2", variant: `default`, children: t(`role.roles`, { role: role.id.replaceAll(`-`, ``) }) }) }, role.id)) }) });
12747
12753
  }
@@ -12759,7 +12765,7 @@ function UserStanadaloneDetails({ user }) {
12759
12765
  ) }) }),
12760
12766
  /* @__PURE__ */ jsxs71("div", { className: "flex w-full flex-col gap-y-2", children: [
12761
12767
  /* @__PURE__ */ jsx119(ContentTitle, { module: Modules.User, type: title.type, element: title.element, functions: title.functions }),
12762
- user.isDeleted ? /* @__PURE__ */ jsx119("div", { children: /* @__PURE__ */ jsx119(Badge, { variant: "destructive", children: t(`user.errors.deleted`) }) }) : /* @__PURE__ */ jsx119(Fragment15, { children: !user.isActivated && /* @__PURE__ */ jsx119("div", { children: /* @__PURE__ */ jsx119(Badge, { variant: "destructive", children: t(`user.errors.inactive`) }) }) }),
12768
+ user.isDeleted ? /* @__PURE__ */ jsx119("div", { children: /* @__PURE__ */ jsx119(Badge, { variant: "destructive", children: t(`user.errors.deleted`) }) }) : /* @__PURE__ */ jsx119(Fragment16, { children: !user.isActivated && /* @__PURE__ */ jsx119("div", { children: /* @__PURE__ */ jsx119(Badge, { variant: "destructive", children: t(`user.errors.inactive`) }) }) }),
12763
12769
  roles,
12764
12770
  /* @__PURE__ */ jsx119(AttributeElement, { inline: true, title: t(`user.fields.title.label`), value: user.title }),
12765
12771
  /* @__PURE__ */ jsx119(AttributeElement, { inline: true, title: t(`common.fields.email.label`), value: user.email }),
@@ -12942,9 +12948,9 @@ __name(RoleUsersList, "RoleUsersList");
12942
12948
 
12943
12949
  // src/features/user/components/lists/UserListInAdd.tsx
12944
12950
  import React21 from "react";
12945
- import { Fragment as Fragment16, jsx as jsx128, jsxs as jsxs73 } from "react/jsx-runtime";
12951
+ import { Fragment as Fragment17, jsx as jsx128, jsxs as jsxs73 } from "react/jsx-runtime";
12946
12952
  function UserListInAdd({ data, existingUsers, setSelectedUser, setLevelOpen }) {
12947
- return /* @__PURE__ */ jsx128(Fragment16, { children: data.data !== void 0 && data.data.filter(
12953
+ return /* @__PURE__ */ jsx128(Fragment17, { children: data.data !== void 0 && data.data.filter(
12948
12954
  (user) => existingUsers && !existingUsers.find((existingUser) => existingUser.id === user.id)
12949
12955
  ).map((user) => {
12950
12956
  return /* @__PURE__ */ jsx128(React21.Fragment, { children: /* @__PURE__ */ jsx128(
@@ -13142,7 +13148,7 @@ __name(CompanyContent, "CompanyContent");
13142
13148
  import { Battery, BatteryFull, BatteryLow, BatteryMedium, PlusCircle } from "lucide-react";
13143
13149
  import Link2 from "next/link";
13144
13150
  import { useTranslations as useTranslations42 } from "next-intl";
13145
- import { Fragment as Fragment17, jsx as jsx134, jsxs as jsxs76 } from "react/jsx-runtime";
13151
+ import { Fragment as Fragment18, jsx as jsx134, jsxs as jsxs76 } from "react/jsx-runtime";
13146
13152
  var asWholeCredits = /* @__PURE__ */ __name((value, locale) => Math.trunc(value).toLocaleString(locale), "asWholeCredits");
13147
13153
  function TokenStatusIndicator({
13148
13154
  className,
@@ -13232,7 +13238,7 @@ function TokenStatusIndicator({
13232
13238
  /* @__PURE__ */ jsx134(Link2, { href: "/settings/billing?action=subscribe", className: "w-full flex justify-end my-4", children: /* @__PURE__ */ jsx134(Button, { variant: "outline", size: "sm", children: t("billing.tokens.purchase_extra", { defaultValue: "Purchase additional analysis" }) }) })
13233
13239
  ] })
13234
13240
  ] });
13235
- const badge = /* @__PURE__ */ jsxs76(Fragment17, { children: [
13241
+ const badge = /* @__PURE__ */ jsxs76(Fragment18, { children: [
13236
13242
  getBatteryIcon(),
13237
13243
  /* @__PURE__ */ jsx134("span", { className: cn(textSize, "text-muted-foreground font-medium leading-none"), children: asWholeCredits(availableMonthlyCredits, locale) }),
13238
13244
  showExtraPages && availableExtraCredits > 0 && /* @__PURE__ */ jsxs76("span", { className: "inline-flex items-center gap-0.5", children: [
@@ -13290,12 +13296,12 @@ function CompanyDetails() {
13290
13296
  __name(CompanyDetails, "CompanyDetails");
13291
13297
 
13292
13298
  // src/features/company/components/containers/AdminCompanyContainer.tsx
13293
- import { Fragment as Fragment18, jsx as jsx136, jsxs as jsxs78 } from "react/jsx-runtime";
13299
+ import { Fragment as Fragment19, jsx as jsx136, jsxs as jsxs78 } from "react/jsx-runtime";
13294
13300
  function AdminCompanyContainerInternal() {
13295
13301
  const { company } = useCompanyContext();
13296
13302
  const { hasRole } = useCurrentUserContext();
13297
13303
  if (!company || !hasRole(getRoleId().Administrator)) return null;
13298
- return /* @__PURE__ */ jsxs78(Fragment18, { children: [
13304
+ return /* @__PURE__ */ jsxs78(Fragment19, { children: [
13299
13305
  /* @__PURE__ */ jsx136(CompanyDetails, {}),
13300
13306
  /* @__PURE__ */ jsx136(AdminUsersList, {})
13301
13307
  ] });
@@ -13318,7 +13324,7 @@ import { useCallback as useCallback22, useEffect as useEffect28, useMemo as useM
13318
13324
  import { useForm as useForm2 } from "react-hook-form";
13319
13325
  import { v4 as v42 } from "uuid";
13320
13326
  import { z as z2 } from "zod";
13321
- import { Fragment as Fragment19, jsx as jsx137, jsxs as jsxs79 } from "react/jsx-runtime";
13327
+ import { Fragment as Fragment20, jsx as jsx137, jsxs as jsxs79 } from "react/jsx-runtime";
13322
13328
  function CompanyEditorInternal({
13323
13329
  company,
13324
13330
  propagateChanges,
@@ -13480,7 +13486,7 @@ function CompanyEditorInternal({
13480
13486
  height: 200,
13481
13487
  unoptimized: isRemoteImageSrc(file ? void 0 : company?.logo)
13482
13488
  }
13483
- ) : /* @__PURE__ */ jsxs79(Fragment19, { children: [
13489
+ ) : /* @__PURE__ */ jsxs79(Fragment20, { children: [
13484
13490
  /* @__PURE__ */ jsx137(UploadIcon3, { className: "my-4 h-8 w-8" }),
13485
13491
  /* @__PURE__ */ jsx137("p", { className: "mb-1 flex w-full text-center text-sm", children: t(`company.click_drag_logo`) })
13486
13492
  ] }) }) }) }) }) }),
@@ -13628,7 +13634,7 @@ __name(CompanyConfigurationEditor, "CompanyConfigurationEditor");
13628
13634
  import { LoaderCircleIcon as LoaderCircleIcon3, Trash2Icon as Trash2Icon3 } from "lucide-react";
13629
13635
  import { useTranslations as useTranslations46 } from "next-intl";
13630
13636
  import { useState as useState38 } from "react";
13631
- import { Fragment as Fragment20, jsx as jsx142, jsxs as jsxs81 } from "react/jsx-runtime";
13637
+ import { Fragment as Fragment21, jsx as jsx142, jsxs as jsxs81 } from "react/jsx-runtime";
13632
13638
  function CompanyDeleterInternal({ company, isAdministrator: isAdministrator2 }) {
13633
13639
  const t = useTranslations46();
13634
13640
  const generateUrl = usePageUrlGenerator();
@@ -13659,7 +13665,7 @@ function CompanyDeleterInternal({ company, isAdministrator: isAdministrator2 })
13659
13665
  setFinalWarningOpen(false);
13660
13666
  setCompanyName("");
13661
13667
  }, "handleGoBack");
13662
- return /* @__PURE__ */ jsxs81(Fragment20, { children: [
13668
+ return /* @__PURE__ */ jsxs81(Fragment21, { children: [
13663
13669
  /* @__PURE__ */ jsxs81(AlertDialog, { open, onOpenChange: setOpen, children: [
13664
13670
  /* @__PURE__ */ jsx142(AlertDialogTrigger, { children: /* @__PURE__ */ jsx142(
13665
13671
  Button,
@@ -13740,7 +13746,7 @@ function CompanyDeleterInternal({ company, isAdministrator: isAdministrator2 })
13740
13746
  },
13741
13747
  variant: "destructive",
13742
13748
  disabled: isDeleting,
13743
- children: isDeleting ? /* @__PURE__ */ jsxs81(Fragment20, { children: [
13749
+ children: isDeleting ? /* @__PURE__ */ jsxs81(Fragment21, { children: [
13744
13750
  t(`ui.buttons.deleting`),
13745
13751
  /* @__PURE__ */ jsx142(LoaderCircleIcon3, { className: "animate-spin-slow h-5 w-5" })
13746
13752
  ] }) : t(`ui.buttons.delete_forever`)
@@ -13801,7 +13807,7 @@ var CompanyProvider = /* @__PURE__ */ __name(({ children, dehydratedCompany, con
13801
13807
  functions.push(/* @__PURE__ */ jsx143(CompanyDeleter, { company }, "companyDeleter"));
13802
13808
  if (hasRole(getRoleId().Administrator) || hasPermissionToModule({ module: Modules.Company, action: "update" /* Update */ })) {
13803
13809
  if (company && configurationEditorSlot)
13804
- functions.push(/* @__PURE__ */ jsx143(Fragment21, { children: configurationEditorSlot }, "configurationEditorSlot"));
13810
+ functions.push(/* @__PURE__ */ jsx143(Fragment22, { children: configurationEditorSlot }, "configurationEditorSlot"));
13805
13811
  functions.push(/* @__PURE__ */ jsx143(CompanyEditor, { company, propagateChanges: setCompany }, "companyEditor"));
13806
13812
  }
13807
13813
  if (functions.length > 0) response.functions = functions;
@@ -13857,7 +13863,7 @@ function NotificationIcon({ notificationType, className }) {
13857
13863
  __name(NotificationIcon, "NotificationIcon");
13858
13864
 
13859
13865
  // src/features/notification/components/notifications/Notification.tsx
13860
- import { Fragment as Fragment22, jsx as jsx145, jsxs as jsxs82 } from "react/jsx-runtime";
13866
+ import { Fragment as Fragment23, jsx as jsx145, jsxs as jsxs82 } from "react/jsx-runtime";
13861
13867
  var generateNotificationData = /* @__PURE__ */ __name((params) => {
13862
13868
  const response = {};
13863
13869
  response.actor = params.notification.actor;
@@ -13868,7 +13874,7 @@ var generateNotificationData = /* @__PURE__ */ __name((params) => {
13868
13874
  }, "generateNotificationData");
13869
13875
  function NotificationToastTime({ date }) {
13870
13876
  const { format } = useDateFormatter();
13871
- return /* @__PURE__ */ jsx145(Fragment22, { children: format(new Date(date), "dateTime") });
13877
+ return /* @__PURE__ */ jsx145(Fragment23, { children: format(new Date(date), "dateTime") });
13872
13878
  }
13873
13879
  __name(NotificationToastTime, "NotificationToastTime");
13874
13880
  function NotificationToast(notification, t, generateUrl, reouter, dateLocaleSource = null) {
@@ -13899,7 +13905,7 @@ __name(NotificationToast, "NotificationToast");
13899
13905
  function NotificationMenuItemTime({ date }) {
13900
13906
  const { locale } = useDateFormatter();
13901
13907
  const now = useMountedNow();
13902
- return /* @__PURE__ */ jsx145(Fragment22, { children: now ? formatDate(new Date(date), "default", locale, now) : "" });
13908
+ return /* @__PURE__ */ jsx145(Fragment23, { children: now ? formatDate(new Date(date), "default", locale, now) : "" });
13903
13909
  }
13904
13910
  __name(NotificationMenuItemTime, "NotificationMenuItemTime");
13905
13911
  function NotificationMenuItem({ notification, closePopover }) {
@@ -15720,7 +15726,7 @@ function useSocket({ token, paused = false }) {
15720
15726
  __name(useSocket, "useSocket");
15721
15727
 
15722
15728
  // src/components/navigations/Breadcrumb.tsx
15723
- import { Fragment as Fragment24, jsx as jsx161, jsxs as jsxs87 } from "react/jsx-runtime";
15729
+ import { Fragment as Fragment25, jsx as jsx161, jsxs as jsxs87 } from "react/jsx-runtime";
15724
15730
  var ITEMS_TO_DISPLAY = 4;
15725
15731
  function BreadcrumbDesktop({
15726
15732
  items,
@@ -15731,24 +15737,24 @@ function BreadcrumbDesktop({
15731
15737
  const t = useTranslations57();
15732
15738
  const [open, setOpen] = useState50(false);
15733
15739
  return /* @__PURE__ */ jsx161(Breadcrumb, { children: /* @__PURE__ */ jsxs87(BreadcrumbList, { children: [
15734
- showRoot && /* @__PURE__ */ jsxs87(Fragment24, { children: [
15740
+ showRoot && /* @__PURE__ */ jsxs87(Fragment25, { children: [
15735
15741
  /* @__PURE__ */ jsx161(BreadcrumbItem, { children: /* @__PURE__ */ jsx161(Link, { href: generateUrl({ page: `/` }), children: rootLabel }) }),
15736
15742
  items.length > 0 && /* @__PURE__ */ jsx161(BreadcrumbSeparator, {})
15737
15743
  ] }),
15738
- items.length > ITEMS_TO_DISPLAY ? /* @__PURE__ */ jsxs87(Fragment24, { children: [
15739
- /* @__PURE__ */ jsx161(BreadcrumbItem, { children: items[0].href ? /* @__PURE__ */ jsx161(Link, { href: items[0].href, onClick: items[0].onClick, children: items[0].name }) : /* @__PURE__ */ jsx161(Fragment24, { children: items[0].name }) }),
15744
+ items.length > ITEMS_TO_DISPLAY ? /* @__PURE__ */ jsxs87(Fragment25, { children: [
15745
+ /* @__PURE__ */ jsx161(BreadcrumbItem, { children: items[0].href ? /* @__PURE__ */ jsx161(Link, { href: items[0].href, onClick: items[0].onClick, children: items[0].name }) : /* @__PURE__ */ jsx161(Fragment25, { children: items[0].name }) }),
15740
15746
  /* @__PURE__ */ jsx161(BreadcrumbSeparator, {}),
15741
15747
  /* @__PURE__ */ jsx161(BreadcrumbItem, { children: /* @__PURE__ */ jsxs87(DropdownMenu, { open, onOpenChange: setOpen, children: [
15742
15748
  /* @__PURE__ */ jsx161(DropdownMenuTrigger, { className: "flex items-center gap-1", "aria-label": t("ui.labels.toggle_menu"), children: /* @__PURE__ */ jsx161(BreadcrumbEllipsis, { className: "h-4 w-4", label: t("ui.labels.more") }) }),
15743
15749
  /* @__PURE__ */ jsx161(DropdownMenuContent, { align: "start", children: items.slice(1, -ITEMS_TO_DISPLAY + 2).map((item, index) => /* @__PURE__ */ jsx161(DropdownMenuItem, { children: /* @__PURE__ */ jsx161(Link, { href: item.href ? item.href : "#", onClick: item.onClick, children: item.name }) }, index)) })
15744
15750
  ] }) }),
15745
15751
  /* @__PURE__ */ jsx161(BreadcrumbSeparator, {}),
15746
- items.slice(-ITEMS_TO_DISPLAY + 2).map((item, index) => /* @__PURE__ */ jsxs87(Fragment23, { children: [
15747
- /* @__PURE__ */ jsx161(BreadcrumbItem, { children: item.href ? /* @__PURE__ */ jsx161(Link, { href: item.href, onClick: item.onClick, children: item.name }) : /* @__PURE__ */ jsx161(Fragment24, { children: item.name }) }),
15752
+ items.slice(-ITEMS_TO_DISPLAY + 2).map((item, index) => /* @__PURE__ */ jsxs87(Fragment24, { children: [
15753
+ /* @__PURE__ */ jsx161(BreadcrumbItem, { children: item.href ? /* @__PURE__ */ jsx161(Link, { href: item.href, onClick: item.onClick, children: item.name }) : /* @__PURE__ */ jsx161(Fragment25, { children: item.name }) }),
15748
15754
  index < items.slice(-ITEMS_TO_DISPLAY + 2).length - 1 && /* @__PURE__ */ jsx161(BreadcrumbSeparator, {})
15749
15755
  ] }, index))
15750
- ] }) : /* @__PURE__ */ jsx161(Fragment24, { children: items.map((item, index) => /* @__PURE__ */ jsxs87(Fragment23, { children: [
15751
- /* @__PURE__ */ jsx161(BreadcrumbItem, { children: item.href ? /* @__PURE__ */ jsx161(Link, { href: item.href, onClick: item.onClick, children: item.name }) : /* @__PURE__ */ jsx161(Fragment24, { children: item.name }) }),
15756
+ ] }) : /* @__PURE__ */ jsx161(Fragment25, { children: items.map((item, index) => /* @__PURE__ */ jsxs87(Fragment24, { children: [
15757
+ /* @__PURE__ */ jsx161(BreadcrumbItem, { children: item.href ? /* @__PURE__ */ jsx161(Link, { href: item.href, onClick: item.onClick, children: item.name }) : /* @__PURE__ */ jsx161(Fragment25, { children: item.name }) }),
15752
15758
  index < items.length - 1 && /* @__PURE__ */ jsx161(BreadcrumbSeparator, {})
15753
15759
  ] }, index)) })
15754
15760
  ] }) });
@@ -15912,7 +15918,7 @@ __name(Header, "Header");
15912
15918
  // src/components/navigations/MobileNavigationBar.tsx
15913
15919
  import { useTranslations as useTranslations59 } from "next-intl";
15914
15920
  import { usePathname as usePathname2 } from "next/navigation";
15915
- import { Fragment as Fragment25, jsx as jsx164, jsxs as jsxs90 } from "react/jsx-runtime";
15921
+ import { Fragment as Fragment26, jsx as jsx164, jsxs as jsxs90 } from "react/jsx-runtime";
15916
15922
  function isActiveHref(pathname, href) {
15917
15923
  if (href === "/") return pathname === "/";
15918
15924
  return pathname === href || pathname.startsWith(`${href}/`);
@@ -15924,7 +15930,7 @@ var slotClass = cn(
15924
15930
  "transition-colors"
15925
15931
  );
15926
15932
  function SlotContent({ item }) {
15927
- if (item.render) return /* @__PURE__ */ jsx164(Fragment25, { children: item.render });
15933
+ if (item.render) return /* @__PURE__ */ jsx164(Fragment26, { children: item.render });
15928
15934
  const Icon = item.icon;
15929
15935
  return Icon ? /* @__PURE__ */ jsx164(Icon, { className: "size-6" }) : null;
15930
15936
  }
@@ -15945,7 +15951,7 @@ function MobileNavigationBar({ className } = {}) {
15945
15951
  children: items.map((item) => {
15946
15952
  const active = item.href ? isActiveHref(pathname, item.href) : false;
15947
15953
  const tone = active ? "text-primary" : "text-muted-foreground";
15948
- const body = /* @__PURE__ */ jsxs90(Fragment25, { children: [
15954
+ const body = /* @__PURE__ */ jsxs90(Fragment26, { children: [
15949
15955
  active && /* @__PURE__ */ jsx164("span", { "aria-hidden": true, className: "bg-primary absolute inset-x-0 top-0 h-0.5" }),
15950
15956
  /* @__PURE__ */ jsx164(SlotContent, { item })
15951
15957
  ] });
@@ -16374,7 +16380,7 @@ __name(detailsFitsByDefault, "detailsFitsByDefault");
16374
16380
  // src/components/containers/RoundPageContainerTitle.tsx
16375
16381
  import { InfoIcon as InfoIcon2 } from "lucide-react";
16376
16382
  import { useTranslations as useTranslations62 } from "next-intl";
16377
- import { Fragment as Fragment26, jsx as jsx171, jsxs as jsxs95 } from "react/jsx-runtime";
16383
+ import { Fragment as Fragment27, jsx as jsx171, jsxs as jsxs95 } from "react/jsx-runtime";
16378
16384
  var HEADER_ROW_MIN_H = "min-h-[53px]";
16379
16385
  function RoundPageContainerTitle({
16380
16386
  module,
@@ -16434,7 +16440,7 @@ function RoundPageContainerTitle({
16434
16440
  module && module.icon ? /* @__PURE__ */ jsx171(module.icon, { className: "text-primary h-5 w-5 shrink-0" }) : title.icon,
16435
16441
  /* @__PURE__ */ jsxs95("span", { className: "truncate", children: [
16436
16442
  title.type,
16437
- title.element && /* @__PURE__ */ jsxs95(Fragment26, { children: [
16443
+ title.element && /* @__PURE__ */ jsxs95(Fragment27, { children: [
16438
16444
  /* @__PURE__ */ jsx171("span", { "aria-hidden": true, children: " \xB7 " }),
16439
16445
  /* @__PURE__ */ jsx171("span", { className: "text-primary font-semibold", children: title.element })
16440
16446
  ] })
@@ -16474,8 +16480,8 @@ __name(RoundPageContainerTitle, "RoundPageContainerTitle");
16474
16480
  // src/components/containers/RoundPageContainer.tsx
16475
16481
  import { useTranslations as useTranslations63 } from "next-intl";
16476
16482
  import { useSearchParams } from "next/navigation";
16477
- import { Fragment as Fragment27, useCallback as useCallback28, useEffect as useEffect45, useMemo as useMemo23, useRef as useRef29, useState as useState56 } from "react";
16478
- import { Fragment as Fragment28, jsx as jsx172, jsxs as jsxs96 } from "react/jsx-runtime";
16483
+ import { Fragment as Fragment28, useCallback as useCallback28, useEffect as useEffect45, useMemo as useMemo23, useRef as useRef29, useState as useState56 } from "react";
16484
+ import { Fragment as Fragment29, jsx as jsx172, jsxs as jsxs96 } from "react/jsx-runtime";
16479
16485
  var DETAILS_COOKIE_NAME = "round_page_details_state";
16480
16486
  var DETAILS_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
16481
16487
  var railTriggerClass = cn(
@@ -16601,7 +16607,7 @@ function RoundPageContainer({
16601
16607
  const innerScrollY = mobileFlow ? `` : scrollY;
16602
16608
  const showMobileSectionPicker = (tabs?.length ?? 0) > 1;
16603
16609
  if (!isReady) {
16604
- return /* @__PURE__ */ jsxs96(Fragment28, { children: [
16610
+ return /* @__PURE__ */ jsxs96(Fragment29, { children: [
16605
16611
  /* @__PURE__ */ jsx172(
16606
16612
  Header,
16607
16613
  {
@@ -16639,7 +16645,7 @@ function RoundPageContainer({
16639
16645
  )
16640
16646
  ] });
16641
16647
  }
16642
- return /* @__PURE__ */ jsxs96(Fragment28, { children: [
16648
+ return /* @__PURE__ */ jsxs96(Fragment29, { children: [
16643
16649
  /* @__PURE__ */ jsx172(
16644
16650
  Header,
16645
16651
  {
@@ -16713,7 +16719,7 @@ function RoundPageContainer({
16713
16719
  railHeader && /* @__PURE__ */ jsx172("div", { children: railHeader }),
16714
16720
  /* @__PURE__ */ jsxs96(TabsList, { className: "flex h-auto w-full flex-col items-stretch gap-0.5 bg-transparent p-0", children: [
16715
16721
  ungrouped.map((tab) => /* @__PURE__ */ jsx172(TabsTrigger, { value: tabValue(tab), className: railTriggerClass, children: tab.contentLabel ?? tab.label }, tabValue(tab))),
16716
- groups.map((group) => /* @__PURE__ */ jsxs96(Fragment27, { children: [
16722
+ groups.map((group) => /* @__PURE__ */ jsxs96(Fragment28, { children: [
16717
16723
  /* @__PURE__ */ jsx172(MicroLabel, { as: "span", role: "presentation", className: "block px-3 pt-3 pb-1", children: group.label }),
16718
16724
  group.items.map((tab) => /* @__PURE__ */ jsx172(TabsTrigger, { value: tabValue(tab), className: railTriggerClass, children: tab.contentLabel ?? tab.label }, tabValue(tab)))
16719
16725
  ] }, group.label))
@@ -16804,7 +16810,7 @@ function RoundPageContainer({
16804
16810
  ),
16805
16811
  children: [
16806
16812
  header,
16807
- tabs ? /* @__PURE__ */ jsxs96(Fragment28, { children: [
16813
+ tabs ? /* @__PURE__ */ jsxs96(Fragment29, { children: [
16808
16814
  /* @__PURE__ */ jsxs96(
16809
16815
  Tabs,
16810
16816
  {
@@ -16929,7 +16935,7 @@ function RoundPageContainer({
16929
16935
  __name(RoundPageContainer, "RoundPageContainer");
16930
16936
 
16931
16937
  // src/components/containers/TabsContainer.tsx
16932
- import { Fragment as Fragment29, jsx as jsx173, jsxs as jsxs97 } from "react/jsx-runtime";
16938
+ import { Fragment as Fragment30, jsx as jsx173, jsxs as jsxs97 } from "react/jsx-runtime";
16933
16939
  function TabsContainer({
16934
16940
  tabs,
16935
16941
  defaultTab,
@@ -16974,7 +16980,7 @@ function TabsContainer({
16974
16980
  ),
16975
16981
  additionalComponent && additionalComponent
16976
16982
  ] }),
16977
- scrollAreaClassName ? /* @__PURE__ */ jsx173(ScrollArea, { className: scrollAreaClassName, children: validTabs.map((tab) => /* @__PURE__ */ jsx173(TabsContent, { value: tab.label, children: tab.content }, tab.label)) }) : /* @__PURE__ */ jsx173(Fragment29, { children: validTabs.map((tab) => /* @__PURE__ */ jsx173(TabsContent, { value: tab.label, children: tab.content }, tab.label)) })
16983
+ scrollAreaClassName ? /* @__PURE__ */ jsx173(ScrollArea, { className: scrollAreaClassName, children: validTabs.map((tab) => /* @__PURE__ */ jsx173(TabsContent, { value: tab.label, children: tab.content }, tab.label)) }) : /* @__PURE__ */ jsx173(Fragment30, { children: validTabs.map((tab) => /* @__PURE__ */ jsx173(TabsContent, { value: tab.label, children: tab.content }, tab.label)) })
16978
16984
  ] });
16979
16985
  }
16980
16986
  __name(TabsContainer, "TabsContainer");
@@ -17311,7 +17317,7 @@ __name(removeTrailingEmptyBlocks, "removeTrailingEmptyBlocks");
17311
17317
  import dynamic2 from "next/dynamic";
17312
17318
  import React29 from "react";
17313
17319
  import { jsx as jsx178 } from "react/jsx-runtime";
17314
- var BlockNoteViewer = dynamic2(() => import("./BlockNoteViewer-76CKL6W5.mjs").then((m) => m.BlockNoteViewer), { ssr: false });
17320
+ var BlockNoteViewer = dynamic2(() => import("./BlockNoteViewer-BNZEXGVT.mjs").then((m) => m.BlockNoteViewer), { ssr: false });
17315
17321
  var BlockNoteViewerContainer = React29.memo(/* @__PURE__ */ __name(function ViewerContainer(props) {
17316
17322
  return /* @__PURE__ */ jsx178(BlockNoteViewer, { ...props });
17317
17323
  }, "ViewerContainer"));
@@ -17933,7 +17939,7 @@ __name(useSubscriptionStatus, "useSubscriptionStatus");
17933
17939
  // src/features/role/hooks/useRoleTableStructure.tsx
17934
17940
  import { useTranslations as useTranslations67 } from "next-intl";
17935
17941
  import { useMemo as useMemo29 } from "react";
17936
- import { Fragment as Fragment30, jsx as jsx189 } from "react/jsx-runtime";
17942
+ import { Fragment as Fragment31, jsx as jsx189 } from "react/jsx-runtime";
17937
17943
  var useRoleTableStructure = /* @__PURE__ */ __name((params) => {
17938
17944
  const t = useTranslations67();
17939
17945
  const generateUrl = usePageUrlGenerator();
@@ -17970,7 +17976,7 @@ var useRoleTableStructure = /* @__PURE__ */ __name((params) => {
17970
17976
  id: "description",
17971
17977
  accessorKey: "description",
17972
17978
  header: t(`role.fields.description.label`),
17973
- cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx189(Fragment30, { children: row.getValue("description") }), "cell"),
17979
+ cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx189(Fragment31, { children: row.getValue("description") }), "cell"),
17974
17980
  enableSorting: false,
17975
17981
  enableHiding: false
17976
17982
  }),
@@ -19345,7 +19351,7 @@ var useWaitlistTableStructure = /* @__PURE__ */ __name((params) => {
19345
19351
  // src/features/content/hooks/useContentTableStructure.tsx
19346
19352
  import { useTranslations as useTranslations79 } from "next-intl";
19347
19353
  import { useMemo as useMemo38 } from "react";
19348
- import { Fragment as Fragment31, jsx as jsx200, jsxs as jsxs108 } from "react/jsx-runtime";
19354
+ import { Fragment as Fragment32, jsx as jsx200, jsxs as jsxs108 } from "react/jsx-runtime";
19349
19355
  var useContentTableStructure = /* @__PURE__ */ __name((params) => {
19350
19356
  const t = useTranslations79();
19351
19357
  const generateUrl = usePageUrlGenerator();
@@ -19376,7 +19382,7 @@ var useContentTableStructure = /* @__PURE__ */ __name((params) => {
19376
19382
  const contentModule = content.contentType ? Modules.findByModelName(content.contentType) : void 0;
19377
19383
  const link = contentModule ? generateUrl({ page: contentModule, id: content.id }) : "#";
19378
19384
  return /* @__PURE__ */ jsxs108(Tooltip2, { children: [
19379
- /* @__PURE__ */ jsx200(TooltipTrigger, { className: "flex items-center justify-start space-x-2", children: /* @__PURE__ */ jsxs108(Fragment31, { children: [
19385
+ /* @__PURE__ */ jsx200(TooltipTrigger, { className: "flex items-center justify-start space-x-2", children: /* @__PURE__ */ jsxs108(Fragment32, { children: [
19380
19386
  contentModule && getIconByModule({ module: contentModule, className: "h-4 w-4" }),
19381
19387
  /* @__PURE__ */ jsx200(Link, { href: link, children: content.name })
19382
19388
  ] }) }),
@@ -19392,7 +19398,7 @@ var useContentTableStructure = /* @__PURE__ */ __name((params) => {
19392
19398
  header: t(`common.relevance`),
19393
19399
  cell: /* @__PURE__ */ __name(({ row }) => {
19394
19400
  const content = row.original.jsonApiData;
19395
- if (!content.relevance) return /* @__PURE__ */ jsx200(Fragment31, {});
19401
+ if (!content.relevance) return /* @__PURE__ */ jsx200(Fragment32, {});
19396
19402
  const response = `${content.relevance.toFixed(0)}%`;
19397
19403
  return /* @__PURE__ */ jsxs108("div", { className: "relative flex h-5 w-20 items-center justify-center overflow-clip rounded border text-center", children: [
19398
19404
  /* @__PURE__ */ jsx200(
@@ -19792,7 +19798,7 @@ registerTableGenerator("waitlists", useWaitlistTableStructure);
19792
19798
 
19793
19799
  // src/components/tables/ContentListTable.tsx
19794
19800
  import { flexRender, getCoreRowModel, getExpandedRowModel, useReactTable } from "@tanstack/react-table";
19795
- import { ChevronLeft, ChevronRight, Loader2 as Loader23 } from "lucide-react";
19801
+ import { ChevronLeft, ChevronRight, Loader2 as Loader24 } from "lucide-react";
19796
19802
  import { useTranslations as useTranslations85 } from "next-intl";
19797
19803
  import React31, { memo, useMemo as useMemo39, useState as useState72 } from "react";
19798
19804
 
@@ -19902,7 +19908,7 @@ function ContentTableSearch({ data }) {
19902
19908
  __name(ContentTableSearch, "ContentTableSearch");
19903
19909
 
19904
19910
  // src/components/tables/ContentListTable.tsx
19905
- import { Fragment as Fragment32, jsx as jsx202, jsxs as jsxs110 } from "react/jsx-runtime";
19911
+ import { Fragment as Fragment33, jsx as jsx202, jsxs as jsxs110 } from "react/jsx-runtime";
19906
19912
  var EMPTY_ARRAY = [];
19907
19913
  function getGroupKeys(item, field) {
19908
19914
  const value = item.jsonApiData[field];
@@ -19917,7 +19923,7 @@ function getGroupKeys(item, field) {
19917
19923
  __name(getGroupKeys, "getGroupKeys");
19918
19924
  var isClassComponent = /* @__PURE__ */ __name((component) => typeof component === "function" && !!component.prototype?.isReactComponent, "isClassComponent");
19919
19925
  function StableCell({ render, context }) {
19920
- return /* @__PURE__ */ jsx202(Fragment32, { children: render(context) });
19926
+ return /* @__PURE__ */ jsx202(Fragment33, { children: render(context) });
19921
19927
  }
19922
19928
  __name(StableCell, "StableCell");
19923
19929
  function renderCell(cellDef, context) {
@@ -20033,7 +20039,7 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
20033
20039
  }
20034
20040
  );
20035
20041
  const hasTitleControls = !!(props.functions || props.filters || allowSearch);
20036
- const titleControls = /* @__PURE__ */ jsxs110(Fragment32, { children: [
20042
+ const titleControls = /* @__PURE__ */ jsxs110(Fragment33, { children: [
20037
20043
  props.filters,
20038
20044
  props.functions,
20039
20045
  allowSearch !== false && /* @__PURE__ */ jsx202(ContentTableSearch, { data })
@@ -20110,7 +20116,7 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
20110
20116
  data.previous?.(true);
20111
20117
  },
20112
20118
  disabled: !data.previous || pendingDirection !== null,
20113
- children: pendingDirection === "prev" ? /* @__PURE__ */ jsx202(Loader23, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx202(ChevronLeft, { className: "h-4 w-4 rtl:rotate-180" })
20119
+ children: pendingDirection === "prev" ? /* @__PURE__ */ jsx202(Loader24, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx202(ChevronLeft, { className: "h-4 w-4 rtl:rotate-180" })
20114
20120
  }
20115
20121
  ),
20116
20122
  data.pageInfo && /* @__PURE__ */ jsx202("span", { className: "text-muted-foreground text-xs", children: `${data.pageInfo.startItem}-${data.pageInfo.endItem}${data.total ? ` of ${data.total}` : ""}` }),
@@ -20125,7 +20131,7 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
20125
20131
  data.next?.(true);
20126
20132
  },
20127
20133
  disabled: !data.next || pendingDirection !== null,
20128
- children: pendingDirection === "next" ? /* @__PURE__ */ jsx202(Loader23, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx202(ChevronRight, { className: "h-4 w-4 rtl:rotate-180" })
20134
+ children: pendingDirection === "next" ? /* @__PURE__ */ jsx202(Loader24, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx202(ChevronRight, { className: "h-4 w-4 rtl:rotate-180" })
20129
20135
  }
20130
20136
  )
20131
20137
  ] }) }) }) })
@@ -20135,7 +20141,7 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
20135
20141
 
20136
20142
  // src/components/grids/ContentListGrid.tsx
20137
20143
  import { useEffect as useEffect56, useRef as useRef37 } from "react";
20138
- import { Fragment as Fragment33, jsx as jsx203, jsxs as jsxs111 } from "react/jsx-runtime";
20144
+ import { Fragment as Fragment34, jsx as jsx203, jsxs as jsxs111 } from "react/jsx-runtime";
20139
20145
  var DEFAULT_GRID_CLASSES = "grid grid-cols-2 gap-4 p-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5";
20140
20146
  function ContentListGrid(props) {
20141
20147
  const { data, ItemComponent, allowSearch, fullWidth, gridClassName } = props;
@@ -20166,7 +20172,7 @@ function ContentListGrid(props) {
20166
20172
  ]
20167
20173
  }
20168
20174
  ) }),
20169
- (props.functions || props.filters || allowSearch) && /* @__PURE__ */ jsxs111(Fragment33, { children: [
20175
+ (props.functions || props.filters || allowSearch) && /* @__PURE__ */ jsxs111(Fragment34, { children: [
20170
20176
  props.functions,
20171
20177
  props.filters,
20172
20178
  allowSearch && /* @__PURE__ */ jsx203(ContentTableSearch, { data })
@@ -20404,7 +20410,7 @@ function AccountDeletionCancelledNotice({ choosePlanHref }) {
20404
20410
  __name(AccountDeletionCancelledNotice, "AccountDeletionCancelledNotice");
20405
20411
 
20406
20412
  // src/features/account-deletion/components/AccountDeletionKeepContainer.tsx
20407
- import { CheckCircle, Loader2 as Loader24, XCircle as XCircle2 } from "lucide-react";
20413
+ import { CheckCircle, Loader2 as Loader25, XCircle as XCircle2 } from "lucide-react";
20408
20414
  import { useTranslations as useTranslations88 } from "next-intl";
20409
20415
  import { useEffect as useEffect58, useRef as useRef39, useState as useState75 } from "react";
20410
20416
  import { jsx as jsx211, jsxs as jsxs117 } from "react/jsx-runtime";
@@ -20419,7 +20425,7 @@ function AccountDeletionKeepContainer({ token }) {
20419
20425
  }, [token]);
20420
20426
  if (state === "loading") {
20421
20427
  return /* @__PURE__ */ jsxs117("div", { className: "flex flex-col items-center justify-center space-y-4 py-16 text-center", children: [
20422
- /* @__PURE__ */ jsx211(Loader24, { className: "text-primary h-12 w-12 animate-spin" }),
20428
+ /* @__PURE__ */ jsx211(Loader25, { className: "text-primary h-12 w-12 animate-spin" }),
20423
20429
  /* @__PURE__ */ jsx211("p", { className: "text-muted-foreground", children: t("ui.buttons.loading") })
20424
20430
  ] });
20425
20431
  }
@@ -20447,25 +20453,56 @@ import { createContext as createContext29, useContext as useContext29, useMemo a
20447
20453
 
20448
20454
  // src/features/auth/components/forms/Register.tsx
20449
20455
  import { zodResolver as zodResolver6 } from "@hookform/resolvers/zod";
20450
- import { Loader2 as Loader25 } from "lucide-react";
20456
+ import { Loader2 as Loader26 } from "lucide-react";
20451
20457
  import { useTranslations as useTranslations90 } from "next-intl";
20452
20458
  import Image7 from "next/image";
20453
- import { useSearchParams as useSearchParams2 } from "next/navigation";
20459
+ import { useSearchParams as useSearchParams3 } from "next/navigation";
20454
20460
  import { useEffect as useEffect59, useState as useState76 } from "react";
20455
20461
  import { useForm as useForm6 } from "react-hook-form";
20456
20462
  import { v4 as v46 } from "uuid";
20457
20463
  import { z as z7 } from "zod";
20458
20464
 
20465
+ // src/features/auth/hooks/useCompleteLogin.ts
20466
+ import { useRouter, useSearchParams as useSearchParams2 } from "next/navigation";
20467
+ import { useCallback as useCallback41 } from "react";
20468
+ function useCompleteLogin() {
20469
+ const { setUser } = useCurrentUserContext();
20470
+ const { setComponentType, setPendingTwoFactor } = useAuthContext();
20471
+ const generateUrl = usePageUrlGenerator();
20472
+ const i18nRouter = useI18nRouter();
20473
+ const nativeRouter = useRouter();
20474
+ const searchParams = useSearchParams2();
20475
+ const callbackUrl = searchParams.get("callbackUrl");
20476
+ return useCallback41(
20477
+ (response) => {
20478
+ if ("pendingToken" in response) {
20479
+ setPendingTwoFactor(response);
20480
+ setComponentType("2fa_challenge" /* TwoFactorChallenge */);
20481
+ return;
20482
+ }
20483
+ setUser(response);
20484
+ if (callbackUrl) {
20485
+ nativeRouter.replace(callbackUrl);
20486
+ } else {
20487
+ i18nRouter.replace(generateUrl({ page: `/` }));
20488
+ }
20489
+ },
20490
+ [setUser, setComponentType, setPendingTwoFactor, generateUrl, i18nRouter, nativeRouter, callbackUrl]
20491
+ );
20492
+ }
20493
+ __name(useCompleteLogin, "useCompleteLogin");
20494
+
20459
20495
  // src/features/auth/components/GdprConsentSection.tsx
20460
20496
  import { useTranslations as useTranslations89 } from "next-intl";
20461
- import { Fragment as Fragment34, jsx as jsx212, jsxs as jsxs118 } from "react/jsx-runtime";
20497
+ import { Fragment as Fragment35, jsx as jsx212, jsxs as jsxs118 } from "react/jsx-runtime";
20462
20498
  function GdprConsentSection({
20463
20499
  form,
20464
20500
  termsCheckboxId = "termsAccepted",
20465
- marketingCheckboxId = "marketingConsent"
20501
+ marketingCheckboxId = "marketingConsent",
20502
+ testId
20466
20503
  }) {
20467
20504
  const t = useTranslations89("auth.gdpr");
20468
- const termsLabel = /* @__PURE__ */ jsxs118(Fragment34, { children: [
20505
+ const termsLabel = /* @__PURE__ */ jsxs118(Fragment35, { children: [
20469
20506
  t("terms_prefix"),
20470
20507
  " ",
20471
20508
  /* @__PURE__ */ jsx212(Link, { href: "/terms", target: "_blank", rel: "noopener", children: t("terms_of_service") }),
@@ -20474,7 +20511,7 @@ function GdprConsentSection({
20474
20511
  " ",
20475
20512
  /* @__PURE__ */ jsx212(Link, { href: "/privacy", target: "_blank", rel: "noopener", children: t("privacy_policy") })
20476
20513
  ] });
20477
- return /* @__PURE__ */ jsxs118("div", { className: "space-y-4 py-4", children: [
20514
+ return /* @__PURE__ */ jsxs118("div", { className: "space-y-4 py-4", "data-testid": testId, children: [
20478
20515
  /* @__PURE__ */ jsx212(GdprConsentCheckbox, { form, id: termsCheckboxId, label: termsLabel, required: true }),
20479
20516
  /* @__PURE__ */ jsx212(
20480
20517
  GdprConsentCheckbox,
@@ -20490,7 +20527,7 @@ function GdprConsentSection({
20490
20527
  __name(GdprConsentSection, "GdprConsentSection");
20491
20528
 
20492
20529
  // src/features/auth/components/forms/Register.tsx
20493
- import { Fragment as Fragment35, jsx as jsx213, jsxs as jsxs119 } from "react/jsx-runtime";
20530
+ import { Fragment as Fragment36, jsx as jsx213, jsxs as jsxs119 } from "react/jsx-runtime";
20494
20531
  var REFERRAL_COOKIE_NAME = "referral_code";
20495
20532
  function getReferralCode() {
20496
20533
  if (typeof document === "undefined") return null;
@@ -20520,9 +20557,11 @@ __name(buildOAuthQueryParams, "buildOAuthQueryParams");
20520
20557
  function Register() {
20521
20558
  const t = useTranslations90();
20522
20559
  const { setComponentType } = useAuthContext();
20523
- const searchParams = useSearchParams2();
20560
+ const searchParams = useSearchParams3();
20524
20561
  const inviteCode = searchParams.get("invite");
20525
20562
  const registrationMode = getRegistrationMode();
20563
+ const showCompanyField = isCompanyNameRequired();
20564
+ const completeLogin = useCompleteLogin();
20526
20565
  const [showConfirmation, setShowConfirmation] = useState76(false);
20527
20566
  const [inviteValidated, setInviteValidated] = useState76(false);
20528
20567
  const [inviteError, setInviteError] = useState76("");
@@ -20537,9 +20576,7 @@ function Register() {
20537
20576
  setSignupSource(getSignupSource());
20538
20577
  }, []);
20539
20578
  const formSchema = z7.object({
20540
- company: z7.string().min(1, {
20541
- message: t(`common.errors.missing_company_name`)
20542
- }),
20579
+ company: z7.string(),
20543
20580
  name: z7.string().min(1, {
20544
20581
  message: t("common.errors.missing_name")
20545
20582
  }),
@@ -20549,10 +20586,15 @@ function Register() {
20549
20586
  password: z7.string().min(8, t(`auth.errors.password_too_short`)).regex(/^(?=.*[0-9])(?=.*[^a-zA-Z0-9]).*$/, {
20550
20587
  message: t(`auth.errors.password_invalid_format`)
20551
20588
  }),
20552
- termsAccepted: z7.literal(true, {
20553
- message: t("auth.gdpr.terms_required")
20554
- }),
20589
+ termsAccepted: z7.boolean(),
20555
20590
  marketingConsent: z7.boolean().optional()
20591
+ }).superRefine((values, ctx) => {
20592
+ if (showCompanyField && values.company.length < 1) {
20593
+ ctx.addIssue({ code: "custom", path: ["company"], message: t(`common.errors.missing_company_name`) });
20594
+ }
20595
+ if (!inviteValidated && values.termsAccepted !== true) {
20596
+ ctx.addIssue({ code: "custom", path: ["termsAccepted"], message: t("auth.gdpr.terms_required") });
20597
+ }
20556
20598
  });
20557
20599
  const form = useForm6({
20558
20600
  resolver: zodResolver6(formSchema),
@@ -20593,38 +20635,44 @@ function Register() {
20593
20635
  try {
20594
20636
  const payload = {
20595
20637
  id: v46(),
20596
- companyName: values.company,
20638
+ // Hidden company field: the server names the company after the user
20639
+ companyName: showCompanyField ? values.company : void 0,
20597
20640
  name: values.name,
20598
20641
  email: values.email,
20599
20642
  password: values.password,
20600
- termsAcceptedAt: (/* @__PURE__ */ new Date()).toISOString(),
20601
- marketingConsent: values.marketingConsent ?? false,
20602
- marketingConsentAt: values.marketingConsent ? (/* @__PURE__ */ new Date()).toISOString() : null,
20643
+ // An invite sign-up takes Terms and marketing consent from the waitlist entry on the server
20644
+ termsAcceptedAt: inviteValidated ? void 0 : (/* @__PURE__ */ new Date()).toISOString(),
20645
+ marketingConsent: inviteValidated ? void 0 : values.marketingConsent ?? false,
20646
+ marketingConsentAt: inviteValidated ? void 0 : values.marketingConsent ? (/* @__PURE__ */ new Date()).toISOString() : null,
20603
20647
  inviteCode: inviteCode ?? void 0,
20604
20648
  referralCode: referralCode ?? void 0,
20605
20649
  source: getSignupSource()
20606
20650
  };
20607
20651
  await AuthService.register(payload);
20608
20652
  clearReferralCode();
20653
+ if (inviteValidated) {
20654
+ completeLogin(await AuthService.login({ email: values.email, password: values.password }));
20655
+ return;
20656
+ }
20609
20657
  setShowConfirmation(true);
20610
20658
  } catch (e) {
20611
20659
  errorToast({ title: t("common.errors.error"), error: e });
20612
20660
  }
20613
20661
  }, "onSubmit");
20614
20662
  if (registrationMode === "waitlist" && inviteCode && isValidatingInvite) {
20615
- return /* @__PURE__ */ jsxs119(Fragment35, { children: [
20663
+ return /* @__PURE__ */ jsxs119(Fragment36, { children: [
20616
20664
  /* @__PURE__ */ jsx213(CardHeader, { children: /* @__PURE__ */ jsxs119(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
20617
20665
  /* @__PURE__ */ jsx213(Image7, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
20618
20666
  t("waitlist.invite.validating_title")
20619
20667
  ] }) }),
20620
20668
  /* @__PURE__ */ jsxs119(CardContent, { className: "flex flex-col items-center justify-center space-y-4 py-8", children: [
20621
- /* @__PURE__ */ jsx213(Loader25, { className: "h-8 w-8 animate-spin text-primary" }),
20669
+ /* @__PURE__ */ jsx213(Loader26, { className: "h-8 w-8 animate-spin text-primary" }),
20622
20670
  /* @__PURE__ */ jsx213("p", { className: "text-muted-foreground", children: t("waitlist.invite.validating_description") })
20623
20671
  ] })
20624
20672
  ] });
20625
20673
  }
20626
20674
  if (registrationMode === "waitlist" && inviteCode && inviteError) {
20627
- return /* @__PURE__ */ jsxs119(Fragment35, { children: [
20675
+ return /* @__PURE__ */ jsxs119(Fragment36, { children: [
20628
20676
  /* @__PURE__ */ jsx213(CardHeader, { children: /* @__PURE__ */ jsxs119(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
20629
20677
  /* @__PURE__ */ jsx213(Image7, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
20630
20678
  t("waitlist.invite.invalid_title")
@@ -20637,7 +20685,7 @@ function Register() {
20637
20685
  ] });
20638
20686
  }
20639
20687
  if (registrationMode === "waitlist" && !inviteCode) {
20640
- return /* @__PURE__ */ jsxs119(Fragment35, { children: [
20688
+ return /* @__PURE__ */ jsxs119(Fragment36, { children: [
20641
20689
  /* @__PURE__ */ jsx213(CardHeader, { children: /* @__PURE__ */ jsxs119(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
20642
20690
  /* @__PURE__ */ jsx213(Image7, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
20643
20691
  t("waitlist.invite.registration_title")
@@ -20650,24 +20698,25 @@ function Register() {
20650
20698
  /* @__PURE__ */ jsx213(CardFooter, { className: "flex w-full flex-row justify-between", children: /* @__PURE__ */ jsx213(Link, { href: "#", className: "flex w-full justify-start", onClick: () => setComponentType(0 /* Login */), children: t("auth.buttons.login") }) })
20651
20699
  ] });
20652
20700
  }
20653
- return /* @__PURE__ */ jsxs119(Fragment35, { children: [
20654
- /* @__PURE__ */ jsxs119(CardHeader, { children: [
20701
+ return /* @__PURE__ */ jsxs119(Fragment36, { children: [
20702
+ /* @__PURE__ */ jsxs119(CardHeader, { "data-testid": "page-register-container", children: [
20655
20703
  /* @__PURE__ */ jsxs119(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
20656
20704
  /* @__PURE__ */ jsx213(Image7, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
20657
20705
  t(`auth.buttons.register`)
20658
20706
  ] }),
20659
- /* @__PURE__ */ jsx213(CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ jsx213(Fragment35, { children: " " }) : /* @__PURE__ */ jsx213(Fragment35, { children: t(`auth.register_description`) }) })
20707
+ /* @__PURE__ */ jsx213(CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ jsx213(Fragment36, { children: " " }) : /* @__PURE__ */ jsx213(Fragment36, { children: t(`auth.register_description`) }) })
20660
20708
  ] }),
20661
20709
  showConfirmation ? /* @__PURE__ */ jsx213(CardContent, { children: /* @__PURE__ */ jsx213(CardDescription, { className: "text-center text-xl", children: t("auth.register_confirmation") }) }) : /* @__PURE__ */ jsx213(Form, { ...form, children: /* @__PURE__ */ jsxs119("form", { onSubmit: form.handleSubmit(onSubmit), children: [
20662
20710
  /* @__PURE__ */ jsxs119(CardContent, { children: [
20663
- /* @__PURE__ */ jsx213(
20711
+ showCompanyField && /* @__PURE__ */ jsx213(
20664
20712
  FormInput,
20665
20713
  {
20666
20714
  isRequired: true,
20667
20715
  form,
20668
20716
  id: "company",
20669
20717
  name: t(`company.fields.name.label`),
20670
- placeholder: t(`company.fields.name.placeholder`)
20718
+ placeholder: t(`company.fields.name.placeholder`),
20719
+ testId: "form-register-input-company"
20671
20720
  }
20672
20721
  ),
20673
20722
  /* @__PURE__ */ jsx213(
@@ -20677,7 +20726,8 @@ function Register() {
20677
20726
  form,
20678
20727
  id: "name",
20679
20728
  name: t(`user.fields.name.label`),
20680
- placeholder: t(`user.fields.name.placeholder`)
20729
+ placeholder: t(`user.fields.name.placeholder`),
20730
+ testId: "form-register-input-name"
20681
20731
  }
20682
20732
  ),
20683
20733
  /* @__PURE__ */ jsx213(
@@ -20689,7 +20739,8 @@ function Register() {
20689
20739
  name: t(`common.fields.email.label`),
20690
20740
  placeholder: t(`common.fields.email.placeholder`),
20691
20741
  disabled: inviteValidated,
20692
- description: inviteValidated ? t("waitlist.invite.email_locked_hint") : void 0
20742
+ description: inviteValidated ? t("waitlist.invite.email_locked_hint") : void 0,
20743
+ testId: "form-register-input-email"
20693
20744
  }
20694
20745
  ),
20695
20746
  /* @__PURE__ */ jsx213(
@@ -20699,11 +20750,12 @@ function Register() {
20699
20750
  form,
20700
20751
  id: "password",
20701
20752
  name: t(`user.fields.password.label`),
20702
- placeholder: t(`user.fields.password.placeholder`)
20753
+ placeholder: t(`user.fields.password.placeholder`),
20754
+ testId: "form-register-input-password"
20703
20755
  }
20704
20756
  ),
20705
- /* @__PURE__ */ jsx213(GdprConsentSection, { form }),
20706
- /* @__PURE__ */ jsx213(Button, { className: "mt-4 w-full", type: "submit", children: t(`auth.buttons.register`) }),
20757
+ !inviteValidated && /* @__PURE__ */ jsx213(GdprConsentSection, { form, testId: "form-register-consent" }),
20758
+ /* @__PURE__ */ jsx213(Button, { className: "mt-4 w-full", type: "submit", "data-testid": "form-register-button-submit", children: t(`auth.buttons.register`) }),
20707
20759
  (registrationMode !== "waitlist" || inviteValidated) && (isGoogleAuthEnabled() || isDiscordAuthEnabled()) && /* @__PURE__ */ jsxs119("div", { className: "space-y-4 pt-4", children: [
20708
20760
  /* @__PURE__ */ jsxs119("div", { className: "relative", children: [
20709
20761
  /* @__PURE__ */ jsx213("div", { className: "absolute inset-0 flex items-center", children: /* @__PURE__ */ jsx213("span", { className: "w-full border-t" }) }),
@@ -20869,7 +20921,7 @@ __name(InnerAuthContainer, "InnerAuthContainer");
20869
20921
  // src/features/auth/components/two-factor/TwoFactorSettings.tsx
20870
20922
  import { ShieldAlert, ShieldCheck } from "lucide-react";
20871
20923
  import { useTranslations as useTranslations97 } from "next-intl";
20872
- import { useCallback as useCallback41, useEffect as useEffect61, useState as useState85 } from "react";
20924
+ import { useCallback as useCallback42, useEffect as useEffect61, useState as useState85 } from "react";
20873
20925
  import { v4 as v49 } from "uuid";
20874
20926
 
20875
20927
  // src/features/auth/components/two-factor/BackupCodesDialog.tsx
@@ -21091,7 +21143,7 @@ __name(DisableTwoFactorDialog, "DisableTwoFactorDialog");
21091
21143
  import { Edit, Key, Trash2 } from "lucide-react";
21092
21144
  import { useTranslations as useTranslations93 } from "next-intl";
21093
21145
  import { useState as useState81 } from "react";
21094
- import { Fragment as Fragment36, jsx as jsx219, jsxs as jsxs123 } from "react/jsx-runtime";
21146
+ import { Fragment as Fragment37, jsx as jsx219, jsxs as jsxs123 } from "react/jsx-runtime";
21095
21147
  function PasskeyList({ passkeys, onRefresh }) {
21096
21148
  const t = useTranslations93();
21097
21149
  const dates = useDateFormatter();
@@ -21148,7 +21200,7 @@ function PasskeyList({ passkeys, onRefresh }) {
21148
21200
  if (passkeys.length === 0) {
21149
21201
  return /* @__PURE__ */ jsx219("p", { className: "text-sm text-muted-foreground text-center py-4", children: t("auth.two_factor.no_passkeys") });
21150
21202
  }
21151
- return /* @__PURE__ */ jsxs123(Fragment36, { children: [
21203
+ return /* @__PURE__ */ jsxs123(Fragment37, { children: [
21152
21204
  /* @__PURE__ */ jsx219("div", { className: "space-y-2", children: passkeys.map((passkey) => /* @__PURE__ */ jsxs123("div", { className: "flex items-center justify-between p-3 border rounded-lg", children: [
21153
21205
  /* @__PURE__ */ jsxs123("div", { className: "flex items-center gap-3", children: [
21154
21206
  /* @__PURE__ */ jsx219(Key, { className: "h-5 w-5 text-muted-foreground" }),
@@ -21466,7 +21518,7 @@ function TotpSetupDialog({ onSuccess, trigger }) {
21466
21518
  __name(TotpSetupDialog, "TotpSetupDialog");
21467
21519
 
21468
21520
  // src/features/auth/components/two-factor/TwoFactorSettings.tsx
21469
- import { Fragment as Fragment37, jsx as jsx223, jsxs as jsxs127 } from "react/jsx-runtime";
21521
+ import { Fragment as Fragment38, jsx as jsx223, jsxs as jsxs127 } from "react/jsx-runtime";
21470
21522
  function TwoFactorSettings() {
21471
21523
  const t = useTranslations97();
21472
21524
  const [status, setStatus] = useState85(null);
@@ -21475,7 +21527,7 @@ function TwoFactorSettings() {
21475
21527
  const [isLoading, setIsLoading] = useState85(true);
21476
21528
  const [isEnabling, setIsEnabling] = useState85(false);
21477
21529
  const [passkeyDialogOpen, setPasskeyDialogOpen] = useState85(false);
21478
- const loadStatus = useCallback41(async () => {
21530
+ const loadStatus = useCallback42(async () => {
21479
21531
  try {
21480
21532
  const [statusData, authenticatorsList, passkeysList] = await Promise.all([
21481
21533
  TwoFactorService.getStatus(),
@@ -21553,7 +21605,7 @@ function TwoFactorSettings() {
21553
21605
  ] }),
21554
21606
  /* @__PURE__ */ jsx223(BackupCodesDialog, { remainingCodes: status?.backupCodesCount ?? 0, onRegenerate: handleRefresh })
21555
21607
  ] }) }),
21556
- !isEnabled && (authenticators.length > 0 || passkeys.length > 0) && /* @__PURE__ */ jsxs127(Fragment37, { children: [
21608
+ !isEnabled && (authenticators.length > 0 || passkeys.length > 0) && /* @__PURE__ */ jsxs127(Fragment38, { children: [
21557
21609
  /* @__PURE__ */ jsx223(Separator, {}),
21558
21610
  /* @__PURE__ */ jsxs127("div", { className: "flex items-center justify-between", children: [
21559
21611
  /* @__PURE__ */ jsxs127("div", { children: [
@@ -21563,7 +21615,7 @@ function TwoFactorSettings() {
21563
21615
  /* @__PURE__ */ jsx223(Button, { onClick: handleEnable2FA, disabled: isEnabling, children: isEnabling ? t("common.loading") : t("auth.two_factor.enable_button") })
21564
21616
  ] })
21565
21617
  ] }),
21566
- isEnabled && /* @__PURE__ */ jsxs127(Fragment37, { children: [
21618
+ isEnabled && /* @__PURE__ */ jsxs127(Fragment38, { children: [
21567
21619
  /* @__PURE__ */ jsx223(Separator, {}),
21568
21620
  /* @__PURE__ */ jsxs127("div", { className: "flex items-center justify-between", children: [
21569
21621
  /* @__PURE__ */ jsxs127("div", { children: [
@@ -21649,11 +21701,11 @@ function GoogleSignInButton({ referralCode, source }) {
21649
21701
  __name(GoogleSignInButton, "GoogleSignInButton");
21650
21702
 
21651
21703
  // src/features/auth/components/details/LandingComponent.tsx
21652
- import { Fragment as Fragment38, jsx as jsx226, jsxs as jsxs129 } from "react/jsx-runtime";
21704
+ import { Fragment as Fragment39, jsx as jsx226, jsxs as jsxs129 } from "react/jsx-runtime";
21653
21705
  function LandingComponent() {
21654
21706
  const t = useTranslations99();
21655
21707
  const { setComponentType } = useAuthContext();
21656
- return /* @__PURE__ */ jsxs129(Fragment38, { children: [
21708
+ return /* @__PURE__ */ jsxs129(Fragment39, { children: [
21657
21709
  /* @__PURE__ */ jsxs129(CardHeader, { className: "mb-4", "data-testid": "page-pre-login-container", children: [
21658
21710
  /* @__PURE__ */ jsxs129(CardTitle, { className: "text-primary flex flex-col items-center gap-y-8 pb-8 text-4xl", children: [
21659
21711
  /* @__PURE__ */ jsx226(Image9, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
@@ -21662,7 +21714,7 @@ function LandingComponent() {
21662
21714
  /* @__PURE__ */ jsx226(CardDescription, { className: "flex w-full justify-center text-center text-sm", children: t(`common.description`) })
21663
21715
  ] }),
21664
21716
  /* @__PURE__ */ jsxs129(CardFooter, { className: "mt-4 flex w-full flex-col justify-between gap-y-4", children: [
21665
- isInternalAuthEnabled() && /* @__PURE__ */ jsxs129(Fragment38, { children: [
21717
+ isInternalAuthEnabled() && /* @__PURE__ */ jsxs129(Fragment39, { children: [
21666
21718
  isRegistrationAllowed() && /* @__PURE__ */ jsx226(
21667
21719
  Link,
21668
21720
  {
@@ -21688,7 +21740,7 @@ import Image10 from "next/image";
21688
21740
  import { useEffect as useEffect62, useState as useState86 } from "react";
21689
21741
  import { useForm as useForm7 } from "react-hook-form";
21690
21742
  import { z as z8 } from "zod";
21691
- import { Fragment as Fragment39, jsx as jsx227, jsxs as jsxs130 } from "react/jsx-runtime";
21743
+ import { Fragment as Fragment40, jsx as jsx227, jsxs as jsxs130 } from "react/jsx-runtime";
21692
21744
  function AcceptInvitation() {
21693
21745
  const { setComponentType, params, setParams } = useAuthContext();
21694
21746
  const [showConfirmation, setShowConfirmation] = useState86(false);
@@ -21751,13 +21803,13 @@ function AcceptInvitation() {
21751
21803
  errorToast({ title: t(`common.errors.error`), error });
21752
21804
  }
21753
21805
  }, "onSubmit");
21754
- return /* @__PURE__ */ jsxs130(Fragment39, { children: [
21806
+ return /* @__PURE__ */ jsxs130(Fragment40, { children: [
21755
21807
  /* @__PURE__ */ jsxs130(CardHeader, { children: [
21756
21808
  /* @__PURE__ */ jsxs130(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
21757
21809
  /* @__PURE__ */ jsx227(Image10, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
21758
21810
  t("auth.accept_invitation")
21759
21811
  ] }),
21760
- /* @__PURE__ */ jsx227(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx227(Fragment39, { children: t("auth.errors.activating_account") }) : /* @__PURE__ */ jsx227(Fragment39, { children: t("auth.select_password") }) })
21812
+ /* @__PURE__ */ jsx227(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx227(Fragment40, { children: t("auth.errors.activating_account") }) : /* @__PURE__ */ jsx227(Fragment40, { children: t("auth.select_password") }) })
21761
21813
  ] }),
21762
21814
  /* @__PURE__ */ jsx227(CardContent, { children: showConfirmation ? /* @__PURE__ */ jsx227(CardDescription, { className: "text-center text-xl", children: t("auth.activation_description") }) : error ? /* @__PURE__ */ jsx227(CardDescription, { className: "text-center text-xl", children: error }) : /* @__PURE__ */ jsx227(Form, { ...form, children: /* @__PURE__ */ jsxs130("form", { onSubmit: form.handleSubmit(onSubmit), children: [
21763
21815
  /* @__PURE__ */ jsx227(
@@ -21788,7 +21840,7 @@ __name(AcceptInvitation, "AcceptInvitation");
21788
21840
  import { useTranslations as useTranslations101 } from "next-intl";
21789
21841
  import Image11 from "next/image";
21790
21842
  import { useEffect as useEffect63, useState as useState87 } from "react";
21791
- import { Fragment as Fragment40, jsx as jsx228, jsxs as jsxs131 } from "react/jsx-runtime";
21843
+ import { Fragment as Fragment41, jsx as jsx228, jsxs as jsxs131 } from "react/jsx-runtime";
21792
21844
  function ActivateAccount() {
21793
21845
  const { setComponentType, params, setParams } = useAuthContext();
21794
21846
  const [showConfirmation, setShowConfirmation] = useState87(false);
@@ -21821,15 +21873,15 @@ function ActivateAccount() {
21821
21873
  setError(t(`auth.errors.invalid_invitation_code`));
21822
21874
  }
21823
21875
  }, []);
21824
- return /* @__PURE__ */ jsxs131(Fragment40, { children: [
21876
+ return /* @__PURE__ */ jsxs131(Fragment41, { children: [
21825
21877
  /* @__PURE__ */ jsxs131(CardHeader, { children: [
21826
21878
  /* @__PURE__ */ jsxs131(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
21827
21879
  /* @__PURE__ */ jsx228(Image11, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
21828
21880
  t("auth.accept_invitation")
21829
21881
  ] }),
21830
- /* @__PURE__ */ jsx228(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx228(Fragment40, { children: t("auth.errors.activating_account") }) : /* @__PURE__ */ jsx228(Fragment40, { children: " " }) })
21882
+ /* @__PURE__ */ jsx228(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx228(Fragment41, { children: t("auth.errors.activating_account") }) : /* @__PURE__ */ jsx228(Fragment41, { children: " " }) })
21831
21883
  ] }),
21832
- /* @__PURE__ */ jsx228(CardContent, { children: /* @__PURE__ */ jsx228(CardDescription, { className: "text-center text-xl", children: showConfirmation ? /* @__PURE__ */ jsx228(Fragment40, { children: t("auth.activation_description") }) : error ? /* @__PURE__ */ jsx228(Fragment40, { children: error }) : /* @__PURE__ */ jsx228(Fragment40, { children: t("auth.activation_wait") }) }) })
21884
+ /* @__PURE__ */ jsx228(CardContent, { children: /* @__PURE__ */ jsx228(CardDescription, { className: "text-center text-xl", children: showConfirmation ? /* @__PURE__ */ jsx228(Fragment41, { children: t("auth.activation_description") }) : error ? /* @__PURE__ */ jsx228(Fragment41, { children: error }) : /* @__PURE__ */ jsx228(Fragment41, { children: t("auth.activation_wait") }) }) })
21833
21885
  ] });
21834
21886
  }
21835
21887
  __name(ActivateAccount, "ActivateAccount");
@@ -21867,7 +21919,7 @@ import Image12 from "next/image";
21867
21919
  import { useState as useState89 } from "react";
21868
21920
  import { useForm as useForm8 } from "react-hook-form";
21869
21921
  import { z as z9 } from "zod";
21870
- import { Fragment as Fragment41, jsx as jsx229, jsxs as jsxs132 } from "react/jsx-runtime";
21922
+ import { Fragment as Fragment42, jsx as jsx229, jsxs as jsxs132 } from "react/jsx-runtime";
21871
21923
  function ForgotPassword() {
21872
21924
  const t = useTranslations102();
21873
21925
  const { setComponentType } = useAuthContext();
@@ -21894,13 +21946,13 @@ function ForgotPassword() {
21894
21946
  errorToast({ title: t("common.errors.error"), error: e });
21895
21947
  }
21896
21948
  }, "onSubmit");
21897
- return /* @__PURE__ */ jsxs132(Fragment41, { children: [
21949
+ return /* @__PURE__ */ jsxs132(Fragment42, { children: [
21898
21950
  /* @__PURE__ */ jsxs132(CardHeader, { "data-testid": "page-forgot-password-container", children: [
21899
21951
  /* @__PURE__ */ jsxs132(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
21900
21952
  /* @__PURE__ */ jsx229(Image12, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
21901
21953
  t("auth.buttons.forgot_password")
21902
21954
  ] }),
21903
- /* @__PURE__ */ jsx229(CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ jsx229(Fragment41, { children: " " }) : /* @__PURE__ */ jsx229(Fragment41, { children: t(`auth.add_email_to_reset`) }) })
21955
+ /* @__PURE__ */ jsx229(CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ jsx229(Fragment42, { children: " " }) : /* @__PURE__ */ jsx229(Fragment42, { children: t(`auth.add_email_to_reset`) }) })
21904
21956
  ] }),
21905
21957
  showConfirmation ? /* @__PURE__ */ jsx229(CardContent, { children: /* @__PURE__ */ jsx229(CardDescription, { className: "text-center text-xl", children: t(`auth.reset_confirmation`) }) }) : /* @__PURE__ */ jsx229(Form, { ...form, children: /* @__PURE__ */ jsxs132("form", { onSubmit: form.handleSubmit(onSubmit), children: [
21906
21958
  /* @__PURE__ */ jsxs132(CardContent, { children: [
@@ -21935,20 +21987,14 @@ __name(ForgotPassword, "ForgotPassword");
21935
21987
  import { zodResolver as zodResolver9 } from "@hookform/resolvers/zod";
21936
21988
  import { useTranslations as useTranslations103 } from "next-intl";
21937
21989
  import Image13 from "next/image";
21938
- import { useRouter, useSearchParams as useSearchParams3 } from "next/navigation";
21939
21990
  import { useEffect as useEffect65, useState as useState90 } from "react";
21940
21991
  import { useForm as useForm9 } from "react-hook-form";
21941
21992
  import { z as z10 } from "zod";
21942
- import { Fragment as Fragment42, jsx as jsx230, jsxs as jsxs133 } from "react/jsx-runtime";
21993
+ import { Fragment as Fragment43, jsx as jsx230, jsxs as jsxs133 } from "react/jsx-runtime";
21943
21994
  function Login() {
21944
21995
  const t = useTranslations103();
21945
- const { setUser } = useCurrentUserContext();
21946
- const { setComponentType, setPendingTwoFactor } = useAuthContext();
21947
- const generateUrl = usePageUrlGenerator();
21948
- const i18nRouter = useI18nRouter();
21949
- const nativeRouter = useRouter();
21950
- const searchParams = useSearchParams3();
21951
- const callbackUrl = searchParams.get("callbackUrl");
21996
+ const { setComponentType } = useAuthContext();
21997
+ const completeLogin = useCompleteLogin();
21952
21998
  const [referralCode, setReferralCode2] = useState90(null);
21953
21999
  useEffect65(() => {
21954
22000
  const cookies = document.cookie.split("; ");
@@ -21984,19 +22030,7 @@ function Login() {
21984
22030
  email: values.email,
21985
22031
  password: values.password
21986
22032
  });
21987
- if ("pendingToken" in response) {
21988
- const challenge = response;
21989
- setPendingTwoFactor(challenge);
21990
- setComponentType("2fa_challenge" /* TwoFactorChallenge */);
21991
- return;
21992
- }
21993
- const user = response;
21994
- setUser(user);
21995
- if (callbackUrl) {
21996
- nativeRouter.replace(callbackUrl);
21997
- } else {
21998
- i18nRouter.replace(generateUrl({ page: `/` }));
21999
- }
22033
+ completeLogin(response);
22000
22034
  } catch (e) {
22001
22035
  console.error("[Login] Login error:", e);
22002
22036
  errorToast({
@@ -22005,7 +22039,7 @@ function Login() {
22005
22039
  });
22006
22040
  }
22007
22041
  }, "onSubmit");
22008
- return /* @__PURE__ */ jsxs133(Fragment42, { children: [
22042
+ return /* @__PURE__ */ jsxs133(Fragment43, { children: [
22009
22043
  /* @__PURE__ */ jsxs133(CardHeader, { "data-testid": "page-login-container", children: [
22010
22044
  /* @__PURE__ */ jsxs133(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
22011
22045
  /* @__PURE__ */ jsx230(Image13, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
@@ -22014,7 +22048,7 @@ function Login() {
22014
22048
  /* @__PURE__ */ jsx230(CardDescription, { className: "text-sm", children: t(`auth.login_description`) })
22015
22049
  ] }),
22016
22050
  /* @__PURE__ */ jsx230(Form, { ...form, children: /* @__PURE__ */ jsxs133("form", { onSubmit: form.handleSubmit(onSubmit), children: [
22017
- /* @__PURE__ */ jsx230(CardContent, { children: isInternalAuthEnabled() && /* @__PURE__ */ jsxs133(Fragment42, { children: [
22051
+ /* @__PURE__ */ jsx230(CardContent, { children: isInternalAuthEnabled() && /* @__PURE__ */ jsxs133(Fragment43, { children: [
22018
22052
  /* @__PURE__ */ jsx230(
22019
22053
  FormInput,
22020
22054
  {
@@ -22081,7 +22115,7 @@ function clearClientStorage(keys) {
22081
22115
  __name(clearClientStorage, "clearClientStorage");
22082
22116
 
22083
22117
  // src/features/auth/components/forms/Logout.tsx
22084
- import { Fragment as Fragment43, jsx as jsx231 } from "react/jsx-runtime";
22118
+ import { Fragment as Fragment44, jsx as jsx231 } from "react/jsx-runtime";
22085
22119
  function Logout({ storageKeys, beforeLogout }) {
22086
22120
  const generateUrl = usePageUrlGenerator();
22087
22121
  useEffect66(() => {
@@ -22093,7 +22127,7 @@ function Logout({ storageKeys, beforeLogout }) {
22093
22127
  }, "logOut");
22094
22128
  logOut();
22095
22129
  }, []);
22096
- return /* @__PURE__ */ jsx231(Fragment43, {});
22130
+ return /* @__PURE__ */ jsx231(Fragment44, {});
22097
22131
  }
22098
22132
  __name(Logout, "Logout");
22099
22133
 
@@ -22134,7 +22168,7 @@ import Image14 from "next/image";
22134
22168
  import { useEffect as useEffect68, useState as useState91 } from "react";
22135
22169
  import { useForm as useForm10 } from "react-hook-form";
22136
22170
  import { z as z11 } from "zod";
22137
- import { Fragment as Fragment44, jsx as jsx232, jsxs as jsxs134 } from "react/jsx-runtime";
22171
+ import { Fragment as Fragment45, jsx as jsx232, jsxs as jsxs134 } from "react/jsx-runtime";
22138
22172
  function ResetPassword() {
22139
22173
  const { setComponentType, params, setParams } = useAuthContext();
22140
22174
  const [showConfirmation, setShowConfirmation] = useState91(false);
@@ -22197,13 +22231,13 @@ function ResetPassword() {
22197
22231
  errorToast({ title: t(`common.errors.error`), error });
22198
22232
  }
22199
22233
  }, "onSubmit");
22200
- return /* @__PURE__ */ jsxs134(Fragment44, { children: [
22234
+ return /* @__PURE__ */ jsxs134(Fragment45, { children: [
22201
22235
  /* @__PURE__ */ jsxs134(CardHeader, { children: [
22202
22236
  /* @__PURE__ */ jsxs134(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
22203
22237
  /* @__PURE__ */ jsx232(Image14, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
22204
22238
  t(`auth.password_reset`)
22205
22239
  ] }),
22206
- /* @__PURE__ */ jsx232(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx232(Fragment44, { children: t(`auth.errors.password_reset_error`) }) : /* @__PURE__ */ jsx232(Fragment44, { children: t(`auth.reset_password`) }) })
22240
+ /* @__PURE__ */ jsx232(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx232(Fragment45, { children: t(`auth.errors.password_reset_error`) }) : /* @__PURE__ */ jsx232(Fragment45, { children: t(`auth.reset_password`) }) })
22207
22241
  ] }),
22208
22242
  /* @__PURE__ */ jsx232(CardContent, { children: showConfirmation ? /* @__PURE__ */ jsx232(CardDescription, { className: "text-center text-xl", children: t(`auth.reset_success_description`) }) : error ? /* @__PURE__ */ jsx232(CardDescription, { className: "text-center text-xl", children: error }) : /* @__PURE__ */ jsx232(Form, { ...form, children: /* @__PURE__ */ jsxs134("form", { onSubmit: form.handleSubmit(onSubmit), children: [
22209
22243
  /* @__PURE__ */ jsx232(FormPassword, { form, id: "password", name: t(`user.fields.password.label`) }),
@@ -22263,7 +22297,7 @@ function PasskeyButton({ pendingToken, onSuccess, onError, disabled = false }) {
22263
22297
  __name(PasskeyButton, "PasskeyButton");
22264
22298
 
22265
22299
  // src/features/auth/components/forms/TwoFactorChallenge.tsx
22266
- import { Fragment as Fragment45, jsx as jsx234, jsxs as jsxs135 } from "react/jsx-runtime";
22300
+ import { Fragment as Fragment46, jsx as jsx234, jsxs as jsxs135 } from "react/jsx-runtime";
22267
22301
  function TwoFactorChallenge() {
22268
22302
  const t = useTranslations106();
22269
22303
  const { setUser } = useCurrentUserContext();
@@ -22344,7 +22378,7 @@ function TwoFactorChallenge() {
22344
22378
  const hasTotp = availableMethods.includes("totp");
22345
22379
  const hasPasskey = availableMethods.includes("passkey");
22346
22380
  const hasBackup = availableMethods.includes("backup");
22347
- return /* @__PURE__ */ jsxs135(Fragment45, { children: [
22381
+ return /* @__PURE__ */ jsxs135(Fragment46, { children: [
22348
22382
  /* @__PURE__ */ jsxs135(CardHeader, { "data-testid": "page-2fa-challenge", children: [
22349
22383
  /* @__PURE__ */ jsx234(CardTitle, { className: "text-primary", children: t("auth.two_factor.verification_required") }),
22350
22384
  /* @__PURE__ */ jsx234(CardDescription, { children: t("auth.two_factor.enter_verification_code") })
@@ -22583,7 +22617,7 @@ var AI_CONNECTIONS_I18N_KEYS = [
22583
22617
 
22584
22618
  // src/features/ai-connection/contexts/AiConnectionsContext.tsx
22585
22619
  import { useTranslations as useTranslations108 } from "next-intl";
22586
- import { createContext as createContext30, useCallback as useCallback42, useContext as useContext30, useEffect as useEffect69, useMemo as useMemo41, useState as useState94 } from "react";
22620
+ import { createContext as createContext30, useCallback as useCallback43, useContext as useContext30, useEffect as useEffect69, useMemo as useMemo41, useState as useState94 } from "react";
22587
22621
  import { jsx as jsx236 } from "react/jsx-runtime";
22588
22622
  var defaultContextValue4 = {
22589
22623
  connections: [],
@@ -22604,7 +22638,7 @@ var AiConnectionsProvider = /* @__PURE__ */ __name(({ children }) => {
22604
22638
  const [envDefaults, setEnvDefaults] = useState94({});
22605
22639
  const [scopeCompanyId, setScopeCompanyId] = useState94(null);
22606
22640
  const [isLoading, setIsLoading] = useState94(true);
22607
- const refresh = useCallback42(async () => {
22641
+ const refresh = useCallback43(async () => {
22608
22642
  setIsLoading(true);
22609
22643
  try {
22610
22644
  const response = await AiConnectionService.listConnections();
@@ -22648,12 +22682,12 @@ import { useMemo as useMemo43 } from "react";
22648
22682
  import { TrashIcon } from "lucide-react";
22649
22683
  import { useTranslations as useTranslations109 } from "next-intl";
22650
22684
  import { useState as useState95 } from "react";
22651
- import { Fragment as Fragment46, jsx as jsx237, jsxs as jsxs137 } from "react/jsx-runtime";
22685
+ import { Fragment as Fragment47, jsx as jsx237, jsxs as jsxs137 } from "react/jsx-runtime";
22652
22686
  function AiConnectionDeleter({ connection }) {
22653
22687
  const t = useTranslations109();
22654
22688
  const { refresh } = useAiConnections();
22655
22689
  const [open, setOpen] = useState95(false);
22656
- return /* @__PURE__ */ jsxs137(Fragment46, { children: [
22690
+ return /* @__PURE__ */ jsxs137(Fragment47, { children: [
22657
22691
  /* @__PURE__ */ jsx237(
22658
22692
  Button,
22659
22693
  {
@@ -22693,7 +22727,7 @@ __name(AiConnectionDeleter, "AiConnectionDeleter");
22693
22727
  // src/features/ai-connection/components/forms/AiConnectionEditor.tsx
22694
22728
  import { zodResolver as zodResolver11 } from "@hookform/resolvers/zod";
22695
22729
  import { useTranslations as useTranslations110 } from "next-intl";
22696
- import { useCallback as useCallback43, useEffect as useEffect70, useMemo as useMemo42 } from "react";
22730
+ import { useCallback as useCallback44, useEffect as useEffect70, useMemo as useMemo42 } from "react";
22697
22731
  import { useForm as useForm11 } from "react-hook-form";
22698
22732
  import { v4 as v412 } from "uuid";
22699
22733
  import { z as z12 } from "zod";
@@ -22720,11 +22754,11 @@ function AiConnectionEditor({
22720
22754
  const isEdit = !!connection;
22721
22755
  const registryRows = useMemo42(() => providerRegistry[connectionType] ?? [], [providerRegistry, connectionType]);
22722
22756
  const providers = useMemo42(() => registryRows.map((row) => row.provider), [registryRows]);
22723
- const fieldsFor = useCallback43(
22757
+ const fieldsFor = useCallback44(
22724
22758
  (provider) => registryRows.find((row) => row.provider === provider)?.fields ?? [],
22725
22759
  [registryRows]
22726
22760
  );
22727
- const defaultsFor = useCallback43(
22761
+ const defaultsFor = useCallback44(
22728
22762
  (provider) => {
22729
22763
  const stored = connection;
22730
22764
  const seeded = {};
@@ -22746,7 +22780,7 @@ function AiConnectionEditor({
22746
22780
  },
22747
22781
  [connection, fieldsFor]
22748
22782
  );
22749
- const hasStoredSecret = useCallback43(
22783
+ const hasStoredSecret = useCallback44(
22750
22784
  (field) => {
22751
22785
  if (!connection) return false;
22752
22786
  if (field === "apiKey") return connection.hasApiKey;
@@ -22776,7 +22810,7 @@ function AiConnectionEditor({
22776
22810
  }),
22777
22811
  [t, fieldsFor, hasStoredSecret]
22778
22812
  );
22779
- const getDefaultValues = useCallback43(
22813
+ const getDefaultValues = useCallback44(
22780
22814
  () => ({
22781
22815
  id: connection?.id ?? v412(),
22782
22816
  name: connection?.name ?? "",
@@ -22933,7 +22967,7 @@ function AiConnectionEditor({
22933
22967
  __name(AiConnectionEditor, "AiConnectionEditor");
22934
22968
 
22935
22969
  // src/features/ai-connection/components/lists/AiConnectionTypeCard.tsx
22936
- import { Fragment as Fragment47, jsx as jsx239, jsxs as jsxs139 } from "react/jsx-runtime";
22970
+ import { Fragment as Fragment48, jsx as jsx239, jsxs as jsxs139 } from "react/jsx-runtime";
22937
22971
  function toInput(connection, overrides) {
22938
22972
  return {
22939
22973
  id: connection.id,
@@ -23056,7 +23090,7 @@ function AiConnectionTypeCard({ connectionType }) {
23056
23090
  children: /* @__PURE__ */ jsx239(ChevronDownIcon10, {})
23057
23091
  }
23058
23092
  ),
23059
- !readOnly && /* @__PURE__ */ jsxs139(Fragment47, { children: [
23093
+ !readOnly && /* @__PURE__ */ jsxs139(Fragment48, { children: [
23060
23094
  /* @__PURE__ */ jsx239(
23061
23095
  AiConnectionEditor,
23062
23096
  {
@@ -23400,11 +23434,11 @@ registerTableGenerator("email-blasts", useEmailBlastTableStructure);
23400
23434
  // src/features/email-blast/components/forms/EmailBlastEditor.tsx
23401
23435
  import { zodResolver as zodResolver12 } from "@hookform/resolvers/zod";
23402
23436
  import { useTranslations as useTranslations118 } from "next-intl";
23403
- import { useCallback as useCallback44, useMemo as useMemo46 } from "react";
23437
+ import { useCallback as useCallback45, useMemo as useMemo46 } from "react";
23404
23438
  import { useForm as useForm12 } from "react-hook-form";
23405
23439
  import { v4 as v413 } from "uuid";
23406
23440
  import { z as z13 } from "zod";
23407
- import { Fragment as Fragment48, jsx as jsx246, jsxs as jsxs143 } from "react/jsx-runtime";
23441
+ import { Fragment as Fragment49, jsx as jsx246, jsxs as jsxs143 } from "react/jsx-runtime";
23408
23442
  var TEMPLATE_VARIABLES = ["{{name}}", "{{email}}", "{{url}}"];
23409
23443
  var MARKETING_ONLY_VARIABLES = ["{{unsubscribeAllUrl}}"];
23410
23444
  function EmailBlastEditorInternal({
@@ -23432,7 +23466,7 @@ function EmailBlastEditorInternal({
23432
23466
  }),
23433
23467
  [t]
23434
23468
  );
23435
- const getDefaultValues = useCallback44(
23469
+ const getDefaultValues = useCallback45(
23436
23470
  () => ({
23437
23471
  id: blast?.id ?? v413(),
23438
23472
  subject: blast?.subject ?? "",
@@ -23508,7 +23542,7 @@ function EmailBlastEditorInternal({
23508
23542
  name: t("emailBlasts.editor.fields.body.label"),
23509
23543
  className: "min-h-72",
23510
23544
  isRequired: true,
23511
- description: /* @__PURE__ */ jsxs143(Fragment48, { children: [
23545
+ description: /* @__PURE__ */ jsxs143(Fragment49, { children: [
23512
23546
  /* @__PURE__ */ jsxs143("span", { className: "block", children: [
23513
23547
  t("emailBlasts.editor.variablesHint"),
23514
23548
  " ",
@@ -23574,13 +23608,13 @@ __name(EmailBlastsListContainer, "EmailBlastsListContainer");
23574
23608
  // src/features/email-blast/components/containers/EmailBlastContainer.tsx
23575
23609
  import { LoaderCircleIcon as LoaderCircleIcon5, MailCheckIcon } from "lucide-react";
23576
23610
  import { useTranslations as useTranslations122 } from "next-intl";
23577
- import { useCallback as useCallback45, useEffect as useEffect73, useState as useState99 } from "react";
23611
+ import { useCallback as useCallback46, useEffect as useEffect73, useState as useState99 } from "react";
23578
23612
 
23579
23613
  // src/features/email-blast/components/forms/EmailBlastSendDialog.tsx
23580
23614
  import { LoaderCircleIcon as LoaderCircleIcon4, SendIcon as SendIcon2 } from "lucide-react";
23581
23615
  import { useTranslations as useTranslations121 } from "next-intl";
23582
23616
  import { useEffect as useEffect72, useState as useState98 } from "react";
23583
- import { Fragment as Fragment49, jsx as jsx249, jsxs as jsxs144 } from "react/jsx-runtime";
23617
+ import { Fragment as Fragment50, jsx as jsx249, jsxs as jsxs144 } from "react/jsx-runtime";
23584
23618
  function EmailBlastSendDialog({ blast, onSuccess }) {
23585
23619
  const t = useTranslations121();
23586
23620
  const [open, setOpen] = useState98(false);
@@ -23625,7 +23659,7 @@ function EmailBlastSendDialog({ blast, onSuccess }) {
23625
23659
  ] }),
23626
23660
  /* @__PURE__ */ jsxs144("div", { className: "flex justify-end", children: [
23627
23661
  /* @__PURE__ */ jsx249(Button, { className: "me-2", variant: "outline", type: "button", onClick: () => setOpen(false), disabled: isSending, children: t("emailBlasts.send.cancel") }),
23628
- /* @__PURE__ */ jsx249(Button, { type: "button", variant: "default", onClick: handleSend, disabled: !canSend, children: isSending ? /* @__PURE__ */ jsxs144(Fragment49, { children: [
23662
+ /* @__PURE__ */ jsx249(Button, { type: "button", variant: "default", onClick: handleSend, disabled: !canSend, children: isSending ? /* @__PURE__ */ jsxs144(Fragment50, { children: [
23629
23663
  t("emailBlasts.send.action"),
23630
23664
  /* @__PURE__ */ jsx249(LoaderCircleIcon4, { className: "animate-spin-slow h-5 w-5" })
23631
23665
  ] }) : t("emailBlasts.send.action") })
@@ -23667,7 +23701,7 @@ function EmailBlastContainer({ blastId }) {
23667
23701
  const dates = useDateFormatter();
23668
23702
  const generateUrl = usePageUrlGenerator();
23669
23703
  const [blast, setBlast] = useState99(void 0);
23670
- const reload = useCallback45(async () => {
23704
+ const reload = useCallback46(async () => {
23671
23705
  setBlast(await EmailBlastService.findOne({ id: blastId }));
23672
23706
  }, [blastId]);
23673
23707
  useEffect73(() => {
@@ -23761,7 +23795,7 @@ __name(EmailBlastContainer, "EmailBlastContainer");
23761
23795
  // src/features/how-to/components/containers/HowToCommand.tsx
23762
23796
  import { ArrowRight, LifeBuoyIcon } from "lucide-react";
23763
23797
  import { useTranslations as useTranslations124 } from "next-intl";
23764
- import { useCallback as useCallback46, useEffect as useEffect74, useMemo as useMemo48, useRef as useRef41, useState as useState100 } from "react";
23798
+ import { useCallback as useCallback47, useEffect as useEffect74, useMemo as useMemo48, useRef as useRef41, useState as useState100 } from "react";
23765
23799
 
23766
23800
  // src/features/how-to/components/containers/HowToCommandViewer.tsx
23767
23801
  import { ArrowLeft, BookOpen, MessageSquare } from "lucide-react";
@@ -23874,7 +23908,7 @@ function HowToCommandViewer({ howTo, onBack, onStartChat }) {
23874
23908
  __name(HowToCommandViewer, "HowToCommandViewer");
23875
23909
 
23876
23910
  // src/features/how-to/components/containers/HowToCommand.tsx
23877
- import { Fragment as Fragment50, jsx as jsx252, jsxs as jsxs147 } from "react/jsx-runtime";
23911
+ import { Fragment as Fragment51, jsx as jsx252, jsxs as jsxs147 } from "react/jsx-runtime";
23878
23912
  function matchPage(pathname, pattern) {
23879
23913
  if (pattern.includes(":")) {
23880
23914
  const pathSegments = pathname.split("/").filter(Boolean);
@@ -23912,7 +23946,7 @@ function HowToCommand({ pathname, contextKeys, extraGroups, onStartChat }) {
23912
23946
  });
23913
23947
  return { relevantHowTos: relevant, otherHowTos: other };
23914
23948
  }, [data.data, pathname, contextKeys]);
23915
- const search = useCallback46(
23949
+ const search = useCallback47(
23916
23950
  async (searchedTerm) => {
23917
23951
  if (searchedTerm === searchTermRef.current) return;
23918
23952
  searchTermRef.current = searchedTerm;
@@ -23945,7 +23979,7 @@ function HowToCommand({ pathname, contextKeys, extraGroups, onStartChat }) {
23945
23979
  setSelectedHowTo(null);
23946
23980
  if (onStartChat) onStartChat();
23947
23981
  }, "handleStartChat");
23948
- return /* @__PURE__ */ jsxs147(Fragment50, { children: [
23982
+ return /* @__PURE__ */ jsxs147(Fragment51, { children: [
23949
23983
  /* @__PURE__ */ jsxs147(
23950
23984
  SidebarMenuButton,
23951
23985
  {
@@ -24113,7 +24147,7 @@ import { useTranslations as useTranslations128 } from "next-intl";
24113
24147
  // src/features/how-to/hooks/useHowToTableStructure.tsx
24114
24148
  import { useTranslations as useTranslations126 } from "next-intl";
24115
24149
  import { useMemo as useMemo49 } from "react";
24116
- import { Fragment as Fragment51, jsx as jsx256 } from "react/jsx-runtime";
24150
+ import { Fragment as Fragment52, jsx as jsx256 } from "react/jsx-runtime";
24117
24151
  var useHowToTableStructure = /* @__PURE__ */ __name((params) => {
24118
24152
  const t = useTranslations126();
24119
24153
  const generateUrl = usePageUrlGenerator();
@@ -24150,7 +24184,7 @@ var useHowToTableStructure = /* @__PURE__ */ __name((params) => {
24150
24184
  id: "description",
24151
24185
  accessorKey: "description",
24152
24186
  header: t(`howto.fields.description.label`),
24153
- cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx256(Fragment51, { children: row.getValue("description") }), "cell"),
24187
+ cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx256(Fragment52, { children: row.getValue("description") }), "cell"),
24154
24188
  enableSorting: false,
24155
24189
  enableHiding: false
24156
24190
  }),
@@ -24158,7 +24192,7 @@ var useHowToTableStructure = /* @__PURE__ */ __name((params) => {
24158
24192
  id: "pages",
24159
24193
  accessorKey: "pages",
24160
24194
  header: t(`howto.fields.pages.label`),
24161
- cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx256(Fragment51, { children: row.getValue("pages") }), "cell"),
24195
+ cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx256(Fragment52, { children: row.getValue("pages") }), "cell"),
24162
24196
  enableSorting: false,
24163
24197
  enableHiding: false
24164
24198
  }),
@@ -24243,8 +24277,8 @@ __name(HowToListContainer, "HowToListContainer");
24243
24277
  // src/features/how-to/components/forms/HowToSelector.tsx
24244
24278
  import { CircleX as CircleX3, RefreshCwIcon as RefreshCwIcon5, SearchIcon as SearchIcon7, XIcon as XIcon13 } from "lucide-react";
24245
24279
  import { useTranslations as useTranslations129 } from "next-intl";
24246
- import { useCallback as useCallback47, useEffect as useEffect75, useRef as useRef42, useState as useState102 } from "react";
24247
- import { Fragment as Fragment52, jsx as jsx260, jsxs as jsxs149 } from "react/jsx-runtime";
24280
+ import { useCallback as useCallback48, useEffect as useEffect75, useRef as useRef42, useState as useState102 } from "react";
24281
+ import { Fragment as Fragment53, jsx as jsx260, jsxs as jsxs149 } from "react/jsx-runtime";
24248
24282
  function HowToSelector({
24249
24283
  id,
24250
24284
  form,
@@ -24265,7 +24299,7 @@ function HowToSelector({
24265
24299
  retrieverParams: {},
24266
24300
  module: Modules.HowTo
24267
24301
  });
24268
- const search = useCallback47(
24302
+ const search = useCallback48(
24269
24303
  async (searchedTerm) => {
24270
24304
  try {
24271
24305
  if (searchedTerm === searchTermRef.current) return;
@@ -24329,7 +24363,7 @@ function HowToSelector({
24329
24363
  search("");
24330
24364
  }
24331
24365
  }
24332
- ) : /* @__PURE__ */ jsx260(Fragment52, {})
24366
+ ) : /* @__PURE__ */ jsx260(Fragment53, {})
24333
24367
  ] }),
24334
24368
  /* @__PURE__ */ jsx260(CommandList, { children: data.data && data.data.length > 0 && data.data.map((howTo) => /* @__PURE__ */ jsx260(
24335
24369
  CommandItem,
@@ -24348,7 +24382,7 @@ __name(HowToSelector, "HowToSelector");
24348
24382
 
24349
24383
  // src/features/handbook/components/lists/HandbookContents.tsx
24350
24384
  import { useTranslations as useTranslations145 } from "next-intl";
24351
- import { useCallback as useCallback51, useEffect as useEffect79, useMemo as useMemo55, useState as useState110 } from "react";
24385
+ import { useCallback as useCallback52, useEffect as useEffect79, useMemo as useMemo55, useState as useState110 } from "react";
24352
24386
 
24353
24387
  // src/features/handbook/contexts/HandbookContext.tsx
24354
24388
  import { useTranslations as useTranslations130 } from "next-intl";
@@ -24403,7 +24437,7 @@ var HandbookProvider = /* @__PURE__ */ __name(({ children, page, section, functi
24403
24437
  import { MessagesSquareIcon, Sparkles as Sparkles2 } from "lucide-react";
24404
24438
  import { useTranslations as useTranslations142 } from "next-intl";
24405
24439
  import Link5 from "next/link";
24406
- import { useCallback as useCallback50, useState as useState108 } from "react";
24440
+ import { useCallback as useCallback51, useState as useState108 } from "react";
24407
24441
 
24408
24442
  // src/features/assistant/components/parts/AssistantComposer.tsx
24409
24443
  import { useState as useState103 } from "react";
@@ -24492,10 +24526,10 @@ import { useTranslations as useTranslations133 } from "next-intl";
24492
24526
 
24493
24527
  // src/features/assistant-message/components/parts/tabs/useEntityLabel.ts
24494
24528
  import { useTranslations as useTranslations132 } from "next-intl";
24495
- import { useCallback as useCallback48 } from "react";
24529
+ import { useCallback as useCallback49 } from "react";
24496
24530
  function useEntityLabel() {
24497
24531
  const t = useTranslations132();
24498
- return useCallback48(
24532
+ return useCallback49(
24499
24533
  (type) => {
24500
24534
  const key = `entities.${type}`;
24501
24535
  if (typeof t.has === "function" && !t.has(key)) return type;
@@ -24542,7 +24576,7 @@ function ReferencesTab({ references }) {
24542
24576
  __name(ReferencesTab, "ReferencesTab");
24543
24577
 
24544
24578
  // src/features/assistant-message/components/parts/tabs/CitationsTab.tsx
24545
- import { Fragment as Fragment53, useState as useState104 } from "react";
24579
+ import { Fragment as Fragment54, useState as useState104 } from "react";
24546
24580
  import { useTranslations as useTranslations135 } from "next-intl";
24547
24581
  import { ChevronDown as ChevronDown3, HelpCircle } from "lucide-react";
24548
24582
  import ReactMarkdown2 from "react-markdown";
@@ -24607,7 +24641,7 @@ function CitationsTab({ citations, sources }) {
24607
24641
  const typeLabel = chunk.nodeType ? entityLabel(chunk.nodeType) : t("features.assistant.message.sources.source");
24608
24642
  const fallbackName = chunk.nodeId ? `${typeLabel} ${chunk.nodeId.slice(0, 8)}` : typeLabel;
24609
24643
  const sourceName = resolved?.name ?? fallbackName;
24610
- return /* @__PURE__ */ jsxs153(Fragment53, { children: [
24644
+ return /* @__PURE__ */ jsxs153(Fragment54, { children: [
24611
24645
  /* @__PURE__ */ jsxs153(TableRow, { children: [
24612
24646
  /* @__PURE__ */ jsx265(TableCell, { children: /* @__PURE__ */ jsxs153(
24613
24647
  "div",
@@ -25004,7 +25038,7 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
25004
25038
  __name(MessageSourcesContainer, "MessageSourcesContainer");
25005
25039
 
25006
25040
  // src/features/assistant-message/components/MessageItem.tsx
25007
- import { Fragment as Fragment54, jsx as jsx271, jsxs as jsxs157 } from "react/jsx-runtime";
25041
+ import { Fragment as Fragment55, jsx as jsx271, jsxs as jsxs157 } from "react/jsx-runtime";
25008
25042
  var MENTION_HREF = /^mention:\/\/([^/]+)\/(.+)$/;
25009
25043
  function mentionUrlTransform(url) {
25010
25044
  return MENTION_HREF.test(url) ? url : defaultUrlTransform(url);
@@ -25027,7 +25061,7 @@ function MessageItem({
25027
25061
  a: /* @__PURE__ */ __name(({ href, children }) => {
25028
25062
  const match = href ? MENTION_HREF.exec(href) : null;
25029
25063
  if (!match || !renderMention) return /* @__PURE__ */ jsx271("a", { href, children });
25030
- return /* @__PURE__ */ jsx271(Fragment54, { children: renderMention({ type: match[1], id: match[2], alias: String(children ?? "") }) });
25064
+ return /* @__PURE__ */ jsx271(Fragment55, { children: renderMention({ type: match[1], id: match[2], alias: String(children ?? "") }) });
25031
25065
  }, "a")
25032
25066
  }),
25033
25067
  [renderMention]
@@ -25103,13 +25137,13 @@ __name(MessageList, "MessageList");
25103
25137
 
25104
25138
  // src/features/assistant/components/parts/AssistantStatusLine.tsx
25105
25139
  import { useTranslations as useTranslations140 } from "next-intl";
25106
- import { Loader2 as Loader26 } from "lucide-react";
25140
+ import { Loader2 as Loader27 } from "lucide-react";
25107
25141
  import { jsx as jsx273, jsxs as jsxs158 } from "react/jsx-runtime";
25108
25142
  function AssistantStatusLine({ status }) {
25109
25143
  const t = useTranslations140();
25110
25144
  const text = status ?? t("features.assistant.thinking");
25111
25145
  return /* @__PURE__ */ jsxs158("div", { className: "text-muted-foreground flex items-center gap-2 px-4 py-2 text-sm", children: [
25112
- /* @__PURE__ */ jsx273(Loader26, { className: "h-4 w-4 animate-spin" }),
25146
+ /* @__PURE__ */ jsx273(Loader27, { className: "h-4 w-4 animate-spin" }),
25113
25147
  /* @__PURE__ */ jsx273("span", { children: text })
25114
25148
  ] });
25115
25149
  }
@@ -25151,7 +25185,7 @@ __name(AssistantThread, "AssistantThread");
25151
25185
 
25152
25186
  // src/features/handbook/hooks/useHandbookAsk.ts
25153
25187
  import { useTranslations as useTranslations141 } from "next-intl";
25154
- import { useCallback as useCallback49, useEffect as useEffect78, useState as useState107 } from "react";
25188
+ import { useCallback as useCallback50, useEffect as useEffect78, useState as useState107 } from "react";
25155
25189
  import { v4 as v414 } from "uuid";
25156
25190
  function withSources(messages, label) {
25157
25191
  return messages.map((message) => withSourcesInContent(message, label));
@@ -25207,7 +25241,7 @@ function useHandbookAsk(params) {
25207
25241
  cancelled = true;
25208
25242
  };
25209
25243
  }, [handbookThreadId]);
25210
- const syncUrl = useCallback49(
25244
+ const syncUrl = useCallback50(
25211
25245
  (id) => {
25212
25246
  if (!shouldSyncUrl) return;
25213
25247
  const base = `${generateUrl({ page: Modules.HandbookPage })}/chat`;
@@ -25215,7 +25249,7 @@ function useHandbookAsk(params) {
25215
25249
  },
25216
25250
  [generateUrl, shouldSyncUrl]
25217
25251
  );
25218
- const selectThread = useCallback49(
25252
+ const selectThread = useCallback50(
25219
25253
  async (id) => {
25220
25254
  const selected = await HandbookThreadService.findOne({ id });
25221
25255
  setThread(selected);
@@ -25224,12 +25258,12 @@ function useHandbookAsk(params) {
25224
25258
  },
25225
25259
  [syncUrl]
25226
25260
  );
25227
- const startNew = useCallback49(() => {
25261
+ const startNew = useCallback50(() => {
25228
25262
  setThread(void 0);
25229
25263
  setMessages([]);
25230
25264
  syncUrl(void 0);
25231
25265
  }, [syncUrl]);
25232
- const ask = useCallback49(
25266
+ const ask = useCallback50(
25233
25267
  async (question, options) => {
25234
25268
  const trimmed = question.trim();
25235
25269
  if (!trimmed || sending) return;
@@ -25290,7 +25324,7 @@ function HandbookAskSheet({ handbookPageId } = {}) {
25290
25324
  const [scoped, setScoped] = useState108(false);
25291
25325
  const chatUrl = `${generateUrl({ page: Modules.HandbookPage })}/chat`;
25292
25326
  const showThread = !!thread || sending || messages.length > 0;
25293
- const send = useCallback50(
25327
+ const send = useCallback51(
25294
25328
  async (question) => {
25295
25329
  await ask(question, { handbookPageId: scoped ? handbookPageId : void 0 });
25296
25330
  },
@@ -25466,7 +25500,7 @@ function splitByNesting(pages) {
25466
25500
  __name(splitByNesting, "splitByNesting");
25467
25501
 
25468
25502
  // src/features/handbook/components/lists/HandbookContents.tsx
25469
- import { Fragment as Fragment55, jsx as jsx279, jsxs as jsxs163 } from "react/jsx-runtime";
25503
+ import { Fragment as Fragment56, jsx as jsx279, jsxs as jsxs163 } from "react/jsx-runtime";
25470
25504
  function HandbookContents() {
25471
25505
  const t = useTranslations145();
25472
25506
  const [pages, setPages] = useState110([]);
@@ -25495,7 +25529,7 @@ function HandbookContents() {
25495
25529
  cancelled = true;
25496
25530
  };
25497
25531
  }, [reloadToken]);
25498
- const refresh = useCallback51(async () => {
25532
+ const refresh = useCallback52(async () => {
25499
25533
  setReloadToken((token) => token + 1);
25500
25534
  }, []);
25501
25535
  const renderedSections = useMemo55(
@@ -25505,7 +25539,7 @@ function HandbookContents() {
25505
25539
  return /* @__PURE__ */ jsx279(
25506
25540
  HandbookProvider,
25507
25541
  {
25508
- functions: /* @__PURE__ */ jsxs163(Fragment55, { children: [
25542
+ functions: /* @__PURE__ */ jsxs163(Fragment56, { children: [
25509
25543
  /* @__PURE__ */ jsx279(HandbookAskSheet, {}),
25510
25544
  /* @__PURE__ */ jsx279(HandbookSyncButton, { refresh }),
25511
25545
  /* @__PURE__ */ jsx279(HandbookIndexStatus, { pages })
@@ -25619,7 +25653,7 @@ __name(HandbookPageNeighbours, "HandbookPageNeighbours");
25619
25653
  // src/features/handbook/components/details/HandbookPageToc.tsx
25620
25654
  import { List } from "lucide-react";
25621
25655
  import { useTranslations as useTranslations147 } from "next-intl";
25622
- import { useCallback as useCallback52, useEffect as useEffect80, useState as useState111 } from "react";
25656
+ import { useCallback as useCallback53, useEffect as useEffect80, useState as useState111 } from "react";
25623
25657
  import { jsx as jsx283, jsxs as jsxs165 } from "react/jsx-runtime";
25624
25658
  function HandbookPageToc({ containerId }) {
25625
25659
  const t = useTranslations147();
@@ -25678,7 +25712,7 @@ function HandbookPageToc({ containerId }) {
25678
25712
  });
25679
25713
  return () => observer.disconnect();
25680
25714
  }, [containerId, headingsWithIds]);
25681
- const handleClick = useCallback52(
25715
+ const handleClick = useCallback53(
25682
25716
  (event, id) => {
25683
25717
  const element = headingsWithIds.get(id);
25684
25718
  if (!element) return;
@@ -25896,7 +25930,7 @@ function groupThreadsByBucket(threads) {
25896
25930
  __name(groupThreadsByBucket, "groupThreadsByBucket");
25897
25931
 
25898
25932
  // src/features/assistant/components/parts/AssistantSidebar.tsx
25899
- import { Fragment as Fragment56, jsx as jsx286, jsxs as jsxs168 } from "react/jsx-runtime";
25933
+ import { Fragment as Fragment57, jsx as jsx286, jsxs as jsxs168 } from "react/jsx-runtime";
25900
25934
  function AssistantSidebar({
25901
25935
  threads,
25902
25936
  activeId,
@@ -25933,7 +25967,7 @@ function AssistantSidebar({
25933
25967
  " ",
25934
25968
  newLabel ?? t("features.assistant.new")
25935
25969
  ] }) }),
25936
- /* @__PURE__ */ jsx286("div", { className: "flex-1 overflow-y-auto p-2", children: threads.length === 0 ? /* @__PURE__ */ jsx286("div", { className: "text-muted-foreground mt-6 text-center text-xs", children: emptyLabel ?? t("features.assistant.empty_sidebar") }) : /* @__PURE__ */ jsxs168(Fragment56, { children: [
25970
+ /* @__PURE__ */ jsx286("div", { className: "flex-1 overflow-y-auto p-2", children: threads.length === 0 ? /* @__PURE__ */ jsx286("div", { className: "text-muted-foreground mt-6 text-center text-xs", children: emptyLabel ?? t("features.assistant.empty_sidebar") }) : /* @__PURE__ */ jsxs168(Fragment57, { children: [
25937
25971
  renderSection(t("features.assistant.bucket_today"), groups.today),
25938
25972
  renderSection(t("features.assistant.bucket_week"), groups.thisWeek),
25939
25973
  renderSection(t("features.assistant.bucket_earlier"), groups.earlier)
@@ -25943,7 +25977,7 @@ function AssistantSidebar({
25943
25977
  __name(AssistantSidebar, "AssistantSidebar");
25944
25978
 
25945
25979
  // src/features/handbook/components/containers/HandbookAskContainer.tsx
25946
- import { Fragment as Fragment57, jsx as jsx287, jsxs as jsxs169 } from "react/jsx-runtime";
25980
+ import { Fragment as Fragment58, jsx as jsx287, jsxs as jsxs169 } from "react/jsx-runtime";
25947
25981
  function HandbookAskContainer({ handbookThreadId } = {}) {
25948
25982
  const t = useTranslations151();
25949
25983
  const { threads, thread, messages, sending, ask, selectThread, startNew } = useHandbookAsk({ handbookThreadId });
@@ -25984,7 +26018,7 @@ function HandbookAskContainer({ handbookThreadId } = {}) {
25984
26018
  detailsIcon: /* @__PURE__ */ jsx287(MessagesSquareIcon2, {}),
25985
26019
  details,
25986
26020
  children: /* @__PURE__ */ jsxs169("div", { className: "flex h-full min-h-0 w-full flex-col overflow-hidden", children: [
25987
- showThread ? /* @__PURE__ */ jsx287(Fragment57, { children: /* @__PURE__ */ jsx287(
26021
+ showThread ? /* @__PURE__ */ jsx287(Fragment58, { children: /* @__PURE__ */ jsx287(
25988
26022
  AssistantThread,
25989
26023
  {
25990
26024
  messages,
@@ -26019,16 +26053,16 @@ import { useTranslations as useTranslations154 } from "next-intl";
26019
26053
  import { useMemo as useMemo60 } from "react";
26020
26054
 
26021
26055
  // src/features/assistant-message/components/EntityMentionLink.tsx
26022
- import { Fragment as Fragment58, jsx as jsx288 } from "react/jsx-runtime";
26056
+ import { Fragment as Fragment59, jsx as jsx288 } from "react/jsx-runtime";
26023
26057
  function EntityMentionLinkView({ type, id, alias }) {
26024
26058
  const generate = usePageUrlGenerator();
26025
26059
  let module;
26026
26060
  try {
26027
26061
  module = ModuleRegistry.findByName(type);
26028
26062
  } catch {
26029
- return /* @__PURE__ */ jsx288(Fragment58, { children: alias });
26063
+ return /* @__PURE__ */ jsx288(Fragment59, { children: alias });
26030
26064
  }
26031
- if (!module?.pageUrl) return /* @__PURE__ */ jsx288(Fragment58, { children: alias });
26065
+ if (!module?.pageUrl) return /* @__PURE__ */ jsx288(Fragment59, { children: alias });
26032
26066
  return /* @__PURE__ */ jsx288(Link, { href: generate({ page: module, id }), children: alias });
26033
26067
  }
26034
26068
  __name(EntityMentionLinkView, "EntityMentionLinkView");
@@ -26140,7 +26174,7 @@ function AssistantThreadHeader({ assistant, onRename, onDelete, renamePlaceholde
26140
26174
  __name(AssistantThreadHeader, "AssistantThreadHeader");
26141
26175
 
26142
26176
  // src/features/assistant/components/containers/AssistantContainer.tsx
26143
- import { Fragment as Fragment59, jsx as jsx291, jsxs as jsxs172 } from "react/jsx-runtime";
26177
+ import { Fragment as Fragment60, jsx as jsx291, jsxs as jsxs172 } from "react/jsx-runtime";
26144
26178
  function AssistantContainer({
26145
26179
  renderApprovalAction,
26146
26180
  renderMention,
@@ -26168,7 +26202,7 @@ function AssistantContainer({
26168
26202
  ),
26169
26203
  [ctx.threads, ctx.assistant?.id, ctx.selectThread, renderThreadBadge]
26170
26204
  );
26171
- const thread = /* @__PURE__ */ jsx291(Fragment59, { children: !showThread ? /* @__PURE__ */ jsx291(
26205
+ const thread = /* @__PURE__ */ jsx291(Fragment60, { children: !showThread ? /* @__PURE__ */ jsx291(
26172
26206
  AssistantEmptyState,
26173
26207
  {
26174
26208
  onSend: ctx.sendMessage,
@@ -26176,7 +26210,7 @@ function AssistantContainer({
26176
26210
  onOperatorModeChange: showOperatorToggle ? ctx.setOperatorMode : void 0,
26177
26211
  composerLeading: renderScopePicker?.()
26178
26212
  }
26179
- ) : /* @__PURE__ */ jsxs172(Fragment59, { children: [
26213
+ ) : /* @__PURE__ */ jsxs172(Fragment60, { children: [
26180
26214
  ctx.assistant ? /* @__PURE__ */ jsx291(
26181
26215
  AssistantThreadHeader,
26182
26216
  {
@@ -26239,7 +26273,7 @@ import { useTranslations as useTranslations156 } from "next-intl";
26239
26273
  // src/features/assistant/components/parts/AssistantBlockNoteComposer.tsx
26240
26274
  import { ArrowUp as ArrowUp2 } from "lucide-react";
26241
26275
  import { useTranslations as useTranslations155 } from "next-intl";
26242
- import { useCallback as useCallback53, useId as useId5, useState as useState115 } from "react";
26276
+ import { useCallback as useCallback54, useId as useId5, useState as useState115 } from "react";
26243
26277
  import { jsx as jsx292, jsxs as jsxs173 } from "react/jsx-runtime";
26244
26278
  function flattenBlocks(blocks) {
26245
26279
  const lines = [];
@@ -26281,7 +26315,7 @@ function AssistantBlockNoteComposer({
26281
26315
  const [isEmpty, setIsEmpty] = useState115(true);
26282
26316
  const [resetKey, setResetKey] = useState115(0);
26283
26317
  const canSend = !isEmpty && !disabled;
26284
- const submit = useCallback53(async () => {
26318
+ const submit = useCallback54(async () => {
26285
26319
  if (isEmpty || disabled) return;
26286
26320
  const payload = blocks;
26287
26321
  const plainText = flattenBlocks(payload);
@@ -26290,7 +26324,7 @@ function AssistantBlockNoteComposer({
26290
26324
  setResetKey((previous) => previous + 1);
26291
26325
  await onSend(plainText, { contentBlocks: payload });
26292
26326
  }, [blocks, disabled, isEmpty, onSend]);
26293
- const handleKeyDownCapture = useCallback53(
26327
+ const handleKeyDownCapture = useCallback54(
26294
26328
  (event) => {
26295
26329
  if (event.key !== "Enter" || event.shiftKey) return;
26296
26330
  if (typeof document !== "undefined" && document.querySelector(".bn-suggestion-menu")) return;
@@ -26332,7 +26366,7 @@ function AssistantBlockNoteComposer({
26332
26366
  __name(AssistantBlockNoteComposer, "AssistantBlockNoteComposer");
26333
26367
 
26334
26368
  // src/features/assistant/components/containers/AssistantPageContainer.tsx
26335
- import { Fragment as Fragment60, jsx as jsx293, jsxs as jsxs174 } from "react/jsx-runtime";
26369
+ import { Fragment as Fragment61, jsx as jsx293, jsxs as jsxs174 } from "react/jsx-runtime";
26336
26370
  function AssistantPageContainer({
26337
26371
  renderApprovalAction,
26338
26372
  renderMention,
@@ -26371,7 +26405,7 @@ function AssistantPageContainer({
26371
26405
  ) })
26372
26406
  ),
26373
26407
  children: /* @__PURE__ */ jsxs174("div", { className: "bg-background flex h-full w-full flex-col overflow-hidden rounded-lg border", children: [
26374
- showThread ? /* @__PURE__ */ jsxs174(Fragment60, { children: [
26408
+ showThread ? /* @__PURE__ */ jsxs174(Fragment61, { children: [
26375
26409
  ctx.assistant ? /* @__PURE__ */ jsx293(
26376
26410
  AssistantThreadHeader,
26377
26411
  {
@@ -26418,7 +26452,7 @@ __name(AssistantPageContainer, "AssistantPageContainer");
26418
26452
  // src/features/assistant-action/components/ApprovalActionCard.tsx
26419
26453
  import { ShieldAlert as ShieldAlert2 } from "lucide-react";
26420
26454
  import { useTranslations as useTranslations157 } from "next-intl";
26421
- import { Fragment as Fragment61, useEffect as useEffect83, useMemo as useMemo61, useState as useState116 } from "react";
26455
+ import { Fragment as Fragment62, useEffect as useEffect83, useMemo as useMemo61, useState as useState116 } from "react";
26422
26456
  import { jsx as jsx294, jsxs as jsxs175 } from "react/jsx-runtime";
26423
26457
  var STATUS_VARIANT2 = {
26424
26458
  pending: "softBlue",
@@ -26705,7 +26739,7 @@ function ApprovalActionCard({ actionId, summary, onResolved, hiddenRelationshipK
26705
26739
  /* @__PURE__ */ jsx294("span", { children: isUpdate ? t("features.assistant.approval.proposal.updateHeading", { entity: entityLabel }) : t("features.assistant.approval.proposal.heading", { entity: entityLabel }) }),
26706
26740
  targetLabel !== "" && /* @__PURE__ */ jsx294("span", { className: "text-foreground tracking-normal normal-case", children: targetLabel })
26707
26741
  ] }),
26708
- /* @__PURE__ */ jsx294("dl", { className: "grid grid-cols-1 gap-x-4 gap-y-1.5 sm:grid-cols-[minmax(0,10rem)_minmax(0,1fr)]", children: rows.map((row) => /* @__PURE__ */ jsxs175(Fragment61, { children: [
26742
+ /* @__PURE__ */ jsx294("dl", { className: "grid grid-cols-1 gap-x-4 gap-y-1.5 sm:grid-cols-[minmax(0,10rem)_minmax(0,1fr)]", children: rows.map((row) => /* @__PURE__ */ jsxs175(Fragment62, { children: [
26709
26743
  /* @__PURE__ */ jsx294("dt", { className: "text-muted-foreground text-xs leading-relaxed break-words sm:text-sm", children: row.label }),
26710
26744
  /* @__PURE__ */ jsx294("dd", { className: "text-foreground text-sm leading-relaxed break-words whitespace-pre-wrap", children: row.value })
26711
26745
  ] }, row.key)) })
@@ -27025,7 +27059,7 @@ __name(NotificationsListContainer, "NotificationsListContainer");
27025
27059
  // src/features/notification/components/modals/NotificationModal.tsx
27026
27060
  import { BellIcon as BellIcon2, ExternalLinkIcon } from "lucide-react";
27027
27061
  import { useTranslations as useTranslations163 } from "next-intl";
27028
- import { Fragment as Fragment62, useCallback as useCallback54, useEffect as useEffect85, useMemo as useMemo63, useRef as useRef46, useState as useState118 } from "react";
27062
+ import { Fragment as Fragment63, useCallback as useCallback55, useEffect as useEffect85, useMemo as useMemo63, useRef as useRef46, useState as useState118 } from "react";
27029
27063
  import { jsx as jsx301, jsxs as jsxs179 } from "react/jsx-runtime";
27030
27064
  function NotificationModalContent({ isOpen, setIsOpen }) {
27031
27065
  const _instanceId = useRef46(Math.random().toString(36).substr(2, 9));
@@ -27054,7 +27088,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
27054
27088
  resetTime: 0,
27055
27089
  isOpen: false
27056
27090
  });
27057
- const checkCircuitBreaker = useCallback54(() => {
27091
+ const checkCircuitBreaker = useCallback55(() => {
27058
27092
  const now = Date.now();
27059
27093
  const breaker = circuitBreakerRef.current;
27060
27094
  if (now > breaker.resetTime) {
@@ -27079,7 +27113,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
27079
27113
  useEffect85(() => {
27080
27114
  setNewNotifications(unreadCount > 0);
27081
27115
  }, [unreadCount]);
27082
- const processSocketNotifications = useCallback54(() => {
27116
+ const processSocketNotifications = useCallback55(() => {
27083
27117
  if (socketNotifications.length === 0) {
27084
27118
  return;
27085
27119
  }
@@ -27214,7 +27248,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
27214
27248
  ] }),
27215
27249
  isLoading && /* @__PURE__ */ jsx301("div", { className: "text-muted-foreground px-3 py-2 text-xs", children: t(`common.loading`) }),
27216
27250
  error && /* @__PURE__ */ jsx301("div", { className: "text-destructive px-3 py-2 text-xs", children: error }),
27217
- /* @__PURE__ */ jsx301(ScrollArea, { className: "[&_[data-slot=scroll-area-scrollbar]]:w-2.5 [&_[data-slot=scroll-area-thumb]]:bg-muted-foreground/40 [&>[data-slot=scroll-area-viewport]]:max-h-[min(32rem,calc(var(--available-height,32rem)-3.5rem))]", children: notifications.length > 0 ? /* @__PURE__ */ jsx301("div", { className: "divide-border divide-y", children: notifications.map((notification) => /* @__PURE__ */ jsx301(Fragment62, { children: generateNotification(notification, () => setIsOpen(false)) }, notification.id)) }) : /* @__PURE__ */ jsx301("div", { className: "text-muted-foreground p-6 text-center text-sm", children: t(`notification.empty`) }) })
27251
+ /* @__PURE__ */ jsx301(ScrollArea, { className: "[&_[data-slot=scroll-area-scrollbar]]:w-2.5 [&_[data-slot=scroll-area-thumb]]:bg-muted-foreground/40 [&>[data-slot=scroll-area-viewport]]:max-h-[min(32rem,calc(var(--available-height,32rem)-3.5rem))]", children: notifications.length > 0 ? /* @__PURE__ */ jsx301("div", { className: "divide-border divide-y", children: notifications.map((notification) => /* @__PURE__ */ jsx301(Fragment63, { children: generateNotification(notification, () => setIsOpen(false)) }, notification.id)) }) : /* @__PURE__ */ jsx301("div", { className: "text-muted-foreground p-6 text-center text-sm", children: t(`notification.empty`) }) })
27218
27252
  ] })
27219
27253
  ] });
27220
27254
  }
@@ -27225,7 +27259,7 @@ function NotificationModal(props) {
27225
27259
  __name(NotificationModal, "NotificationModal");
27226
27260
 
27227
27261
  // src/features/notification/components/notifications/PushNotificationProvider.tsx
27228
- import { Fragment as Fragment63, jsx as jsx302 } from "react/jsx-runtime";
27262
+ import { Fragment as Fragment64, jsx as jsx302 } from "react/jsx-runtime";
27229
27263
  function PushNotificationProvider({
27230
27264
  children,
27231
27265
  excludedRoleIds = []
@@ -27233,7 +27267,7 @@ function PushNotificationProvider({
27233
27267
  const { currentUser, hasRole } = useCurrentUserContext();
27234
27268
  const canSubscribe = !hasRole(getRoleId().Administrator) && !excludedRoleIds.some((roleId) => hasRole(roleId));
27235
27269
  usePushNotifications_default({ currentUser: currentUser ?? void 0, canSubscribe });
27236
- return /* @__PURE__ */ jsx302(Fragment63, { children });
27270
+ return /* @__PURE__ */ jsx302(Fragment64, { children });
27237
27271
  }
27238
27272
  __name(PushNotificationProvider, "PushNotificationProvider");
27239
27273
 
@@ -27287,9 +27321,9 @@ __name(ReferralCodeCapture, "ReferralCodeCapture");
27287
27321
  import { useTranslations as useTranslations165 } from "next-intl";
27288
27322
 
27289
27323
  // src/features/referral/components/ReferralWidget.tsx
27290
- import { Copy as Copy2, Loader2 as Loader27, Mail, Users } from "lucide-react";
27324
+ import { Copy as Copy2, Loader2 as Loader28, Mail, Users } from "lucide-react";
27291
27325
  import { useTranslations as useTranslations164 } from "next-intl";
27292
- import { useCallback as useCallback55, useRef as useRef47, useState as useState121 } from "react";
27326
+ import { useCallback as useCallback56, useRef as useRef47, useState as useState121 } from "react";
27293
27327
 
27294
27328
  // src/features/referral/hooks/useReferralInvite.ts
27295
27329
  import { useState as useState119 } from "react";
@@ -27409,7 +27443,7 @@ function ReferralWidget({
27409
27443
  if (!isReferralEnabled()) {
27410
27444
  return null;
27411
27445
  }
27412
- const handleCopyLink = useCallback55(async () => {
27446
+ const handleCopyLink = useCallback56(async () => {
27413
27447
  if (!referralUrl) return;
27414
27448
  const success = await copyToClipboard(referralUrl);
27415
27449
  if (success) {
@@ -27421,7 +27455,7 @@ function ReferralWidget({
27421
27455
  showError(text.copyError);
27422
27456
  }
27423
27457
  }, [referralUrl, text.copiedMessage, text.copyError, onLinkCopied]);
27424
- const handleSendInvite = useCallback55(async () => {
27458
+ const handleSendInvite = useCallback56(async () => {
27425
27459
  if (!email || !email.includes("@")) {
27426
27460
  showError(text.invalidEmail);
27427
27461
  return;
@@ -27449,7 +27483,7 @@ function ReferralWidget({
27449
27483
  onInviteSent,
27450
27484
  onInviteError
27451
27485
  ]);
27452
- const handleEmailKeyDown = useCallback55(
27486
+ const handleEmailKeyDown = useCallback56(
27453
27487
  (e) => {
27454
27488
  if (e.key === "Enter" && !sending) {
27455
27489
  e.preventDefault();
@@ -27460,9 +27494,9 @@ function ReferralWidget({
27460
27494
  );
27461
27495
  if (loading) {
27462
27496
  if (isDialog) {
27463
- return /* @__PURE__ */ jsx303("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ jsx303(Loader27, { className: "text-muted-foreground h-6 w-6 animate-spin" }) });
27497
+ return /* @__PURE__ */ jsx303("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ jsx303(Loader28, { className: "text-muted-foreground h-6 w-6 animate-spin" }) });
27464
27498
  }
27465
- return /* @__PURE__ */ jsx303(Card, { className: `p-6 ${className ?? ""}`, children: /* @__PURE__ */ jsx303("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ jsx303(Loader27, { className: "text-muted-foreground h-6 w-6 animate-spin" }) }) });
27499
+ return /* @__PURE__ */ jsx303(Card, { className: `p-6 ${className ?? ""}`, children: /* @__PURE__ */ jsx303("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ jsx303(Loader28, { className: "text-muted-foreground h-6 w-6 animate-spin" }) }) });
27466
27500
  }
27467
27501
  if (error) {
27468
27502
  const errorMessage = text.loadError;
@@ -27521,7 +27555,7 @@ function ReferralWidget({
27521
27555
  onClick: handleSendInvite,
27522
27556
  disabled: sending || !email,
27523
27557
  "aria-label": sending ? text.sendingButton : text.sendButton,
27524
- children: sending ? /* @__PURE__ */ jsx303(Loader27, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx303(Mail, { className: "h-4 w-4" })
27558
+ children: sending ? /* @__PURE__ */ jsx303(Loader28, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx303(Mail, { className: "h-4 w-4" })
27525
27559
  }
27526
27560
  )
27527
27561
  ] })
@@ -28230,11 +28264,11 @@ function RoleDetails() {
28230
28264
  __name(RoleDetails, "RoleDetails");
28231
28265
 
28232
28266
  // src/features/role/components/containers/RoleContainer.tsx
28233
- import { Fragment as Fragment64, jsx as jsx311, jsxs as jsxs187 } from "react/jsx-runtime";
28267
+ import { Fragment as Fragment65, jsx as jsx311, jsxs as jsxs187 } from "react/jsx-runtime";
28234
28268
  function RoleContainer() {
28235
28269
  const { role } = useRoleContext();
28236
28270
  if (!role) return null;
28237
- return /* @__PURE__ */ jsxs187(Fragment64, { children: [
28271
+ return /* @__PURE__ */ jsxs187(Fragment65, { children: [
28238
28272
  /* @__PURE__ */ jsx311(RoleDetails, {}),
28239
28273
  /* @__PURE__ */ jsx311(RoleUsersList, { role })
28240
28274
  ] });
@@ -28279,7 +28313,7 @@ __name(FormRoles, "FormRoles");
28279
28313
  // src/features/role/components/forms/RemoveUserFromRole.tsx
28280
28314
  import { useTranslations as useTranslations173 } from "next-intl";
28281
28315
  import { useEffect as useEffect90, useState as useState123 } from "react";
28282
- import { Fragment as Fragment65, jsx as jsx313, jsxs as jsxs189 } from "react/jsx-runtime";
28316
+ import { Fragment as Fragment66, jsx as jsx313, jsxs as jsxs189 } from "react/jsx-runtime";
28283
28317
  function RemoveUserFromRole({ role, user, refresh }) {
28284
28318
  const [open, setOpen] = useState123(false);
28285
28319
  const [canRemove, setCanRemove] = useState123(false);
@@ -28328,7 +28362,7 @@ function RemoveUserFromRole({ role, user, refresh }) {
28328
28362
  /* @__PURE__ */ jsx313(DialogTitle, { children: t(`role.remove_user.title`) }),
28329
28363
  /* @__PURE__ */ jsx313(DialogDescription, { children: canRemove ? t(`role.remove_user.subtitle_allowed`) : t(`role.remove_user.subtitle_not_allowed`) })
28330
28364
  ] }),
28331
- canRemove ? /* @__PURE__ */ jsxs189(Fragment65, { children: [
28365
+ canRemove ? /* @__PURE__ */ jsxs189(Fragment66, { children: [
28332
28366
  t(`role.remove_user.description_allowed`, { role: roleName, user: user.name }),
28333
28367
  /* @__PURE__ */ jsxs189("div", { className: "flex justify-end", children: [
28334
28368
  /* @__PURE__ */ jsx313(Button, { className: "me-2", variant: "outline", type: `button`, onClick: () => setOpen(false), children: t(`ui.buttons.cancel`) }),
@@ -28345,7 +28379,7 @@ function RemoveUserFromRole({ role, user, refresh }) {
28345
28379
  }
28346
28380
  )
28347
28381
  ] })
28348
- ] }) : /* @__PURE__ */ jsx313(Fragment65, { children: t(`role.remove_user.description_not_allowed`, { role: roleName, user: user.name }) })
28382
+ ] }) : /* @__PURE__ */ jsx313(Fragment66, { children: t(`role.remove_user.description_not_allowed`, { role: roleName, user: user.name }) })
28349
28383
  ] })
28350
28384
  ] });
28351
28385
  }
@@ -28354,8 +28388,8 @@ __name(RemoveUserFromRole, "RemoveUserFromRole");
28354
28388
  // src/features/role/components/forms/UserRoleAdd.tsx
28355
28389
  import { PlusCircle as PlusCircle2 } from "lucide-react";
28356
28390
  import { useTranslations as useTranslations174 } from "next-intl";
28357
- import { useCallback as useCallback56, useEffect as useEffect91, useRef as useRef49, useState as useState124 } from "react";
28358
- import { Fragment as Fragment66, jsx as jsx314, jsxs as jsxs190 } from "react/jsx-runtime";
28391
+ import { useCallback as useCallback57, useEffect as useEffect91, useRef as useRef49, useState as useState124 } from "react";
28392
+ import { Fragment as Fragment67, jsx as jsx314, jsxs as jsxs190 } from "react/jsx-runtime";
28359
28393
  function UserRoleAdd({ user, refresh }) {
28360
28394
  const [open, setOpen] = useState124(false);
28361
28395
  const inputRef = useRef49(null);
@@ -28384,7 +28418,7 @@ function UserRoleAdd({ user, refresh }) {
28384
28418
  );
28385
28419
  refresh();
28386
28420
  }, "addUserToRole");
28387
- const searchRoles = useCallback56(
28421
+ const searchRoles = useCallback57(
28388
28422
  async (term) => {
28389
28423
  setRoles(
28390
28424
  await RoleService.findAllRolesUserNotIn({
@@ -28402,7 +28436,7 @@ function UserRoleAdd({ user, refresh }) {
28402
28436
  useEffect91(() => {
28403
28437
  if (open) searchRoles("");
28404
28438
  }, [open]);
28405
- return /* @__PURE__ */ jsxs190(Fragment66, { children: [
28439
+ return /* @__PURE__ */ jsxs190(Fragment67, { children: [
28406
28440
  /* @__PURE__ */ jsxs190(Button, { size: "sm", onClick: () => setOpen(true), children: [
28407
28441
  /* @__PURE__ */ jsx314(PlusCircle2, { className: "me-3 h-3.5 w-3.5" }),
28408
28442
  t(`common.association.label`, {
@@ -28496,7 +28530,7 @@ __name(UserRolesList, "UserRolesList");
28496
28530
 
28497
28531
  // src/features/oauth/components/OAuthRedirectUriInput.tsx
28498
28532
  import { useTranslations as useTranslations177 } from "next-intl";
28499
- import { useCallback as useCallback57 } from "react";
28533
+ import { useCallback as useCallback58 } from "react";
28500
28534
  import { Plus as Plus3, Trash2 as Trash23 } from "lucide-react";
28501
28535
  import { jsx as jsx317, jsxs as jsxs191 } from "react/jsx-runtime";
28502
28536
  function isValidRedirectUri(uri) {
@@ -28528,17 +28562,17 @@ function OAuthRedirectUriInput({
28528
28562
  }) {
28529
28563
  const t = useTranslations177();
28530
28564
  const label = labelProp ?? t("oauth.ui.redirect_uris.label");
28531
- const handleAdd = useCallback57(() => {
28565
+ const handleAdd = useCallback58(() => {
28532
28566
  onChange([...value, ""]);
28533
28567
  }, [value, onChange]);
28534
- const handleRemove = useCallback57(
28568
+ const handleRemove = useCallback58(
28535
28569
  (index) => {
28536
28570
  const newUris = value.filter((_, i) => i !== index);
28537
28571
  onChange(newUris.length > 0 ? newUris : [""]);
28538
28572
  },
28539
28573
  [value, onChange]
28540
28574
  );
28541
- const handleChange = useCallback57(
28575
+ const handleChange = useCallback58(
28542
28576
  (index, newValue) => {
28543
28577
  const newUris = [...value];
28544
28578
  newUris[index] = newValue;
@@ -28593,7 +28627,7 @@ __name(OAuthRedirectUriInput, "OAuthRedirectUriInput");
28593
28627
 
28594
28628
  // src/features/oauth/components/OAuthScopeSelector.tsx
28595
28629
  import { useTranslations as useTranslations178 } from "next-intl";
28596
- import { useCallback as useCallback58 } from "react";
28630
+ import { useCallback as useCallback59 } from "react";
28597
28631
  import { jsx as jsx318, jsxs as jsxs192 } from "react/jsx-runtime";
28598
28632
  function OAuthScopeSelector({
28599
28633
  value,
@@ -28606,7 +28640,7 @@ function OAuthScopeSelector({
28606
28640
  const t = useTranslations178();
28607
28641
  const scopeText = useOAuthScopeText();
28608
28642
  const label = labelProp ?? t("oauth.ui.scope_selector.label");
28609
- const handleToggle = useCallback58(
28643
+ const handleToggle = useCallback59(
28610
28644
  (scope, checked) => {
28611
28645
  if (checked) {
28612
28646
  onChange([...value, scope]);
@@ -28675,13 +28709,13 @@ __name(OAuthScopeSelector, "OAuthScopeSelector");
28675
28709
 
28676
28710
  // src/features/oauth/components/OAuthClientSecretDisplay.tsx
28677
28711
  import { useTranslations as useTranslations179 } from "next-intl";
28678
- import { useState as useState125, useCallback as useCallback59 } from "react";
28712
+ import { useState as useState125, useCallback as useCallback60 } from "react";
28679
28713
  import { Copy as Copy3, Check, AlertTriangle } from "lucide-react";
28680
28714
  import { jsx as jsx319, jsxs as jsxs193 } from "react/jsx-runtime";
28681
28715
  function OAuthClientSecretDisplay({ secret, onDismiss, open, clientName }) {
28682
28716
  const t = useTranslations179();
28683
28717
  const [copied, setCopied] = useState125(false);
28684
- const handleCopy = useCallback59(async () => {
28718
+ const handleCopy = useCallback60(async () => {
28685
28719
  try {
28686
28720
  await navigator.clipboard.writeText(secret);
28687
28721
  setCopied(true);
@@ -28690,7 +28724,7 @@ function OAuthClientSecretDisplay({ secret, onDismiss, open, clientName }) {
28690
28724
  console.error("Failed to copy to clipboard:", err);
28691
28725
  }
28692
28726
  }, [secret]);
28693
- const handleDismiss = useCallback59(() => {
28727
+ const handleDismiss = useCallback60(() => {
28694
28728
  setCopied(false);
28695
28729
  onDismiss();
28696
28730
  }, [onDismiss]);
@@ -28878,7 +28912,7 @@ __name(OAuthClientList, "OAuthClientList");
28878
28912
 
28879
28913
  // src/features/oauth/components/OAuthClientForm.tsx
28880
28914
  import { useTranslations as useTranslations182 } from "next-intl";
28881
- import { useState as useState126, useCallback as useCallback60 } from "react";
28915
+ import { useState as useState126, useCallback as useCallback61 } from "react";
28882
28916
  import { jsx as jsx322, jsxs as jsxs196 } from "react/jsx-runtime";
28883
28917
  function OAuthClientForm({
28884
28918
  client,
@@ -28898,7 +28932,7 @@ function OAuthClientForm({
28898
28932
  isConfidential: client?.isConfidential ?? true
28899
28933
  });
28900
28934
  const [errors, setErrors] = useState126({});
28901
- const validate = useCallback60(() => {
28935
+ const validate = useCallback61(() => {
28902
28936
  const newErrors = {};
28903
28937
  if (!formState.name.trim()) {
28904
28938
  newErrors.name = t("oauth.ui.form.errors.name_required");
@@ -28913,7 +28947,7 @@ function OAuthClientForm({
28913
28947
  setErrors(newErrors);
28914
28948
  return Object.keys(newErrors).length === 0;
28915
28949
  }, [formState, t]);
28916
- const handleSubmit = useCallback60(
28950
+ const handleSubmit = useCallback61(
28917
28951
  async (e) => {
28918
28952
  e.preventDefault();
28919
28953
  if (!validate()) return;
@@ -29025,9 +29059,9 @@ __name(OAuthClientForm, "OAuthClientForm");
29025
29059
 
29026
29060
  // src/features/oauth/components/OAuthClientDetail.tsx
29027
29061
  import { useTranslations as useTranslations183 } from "next-intl";
29028
- import { useState as useState127, useCallback as useCallback61 } from "react";
29062
+ import { useState as useState127, useCallback as useCallback62 } from "react";
29029
29063
  import { Copy as Copy4, Check as Check2, RefreshCw as RefreshCw3, Pencil as Pencil2, Trash2 as Trash25, ExternalLink } from "lucide-react";
29030
- import { Fragment as Fragment67, jsx as jsx323, jsxs as jsxs197 } from "react/jsx-runtime";
29064
+ import { Fragment as Fragment68, jsx as jsx323, jsxs as jsxs197 } from "react/jsx-runtime";
29031
29065
  function OAuthClientDetail({
29032
29066
  client,
29033
29067
  isLoading = false,
@@ -29043,7 +29077,7 @@ function OAuthClientDetail({
29043
29077
  const [showRegenerateConfirm, setShowRegenerateConfirm] = useState127(false);
29044
29078
  const [isDeleting, setIsDeleting] = useState127(false);
29045
29079
  const [isRegenerating, setIsRegenerating] = useState127(false);
29046
- const copyToClipboard2 = useCallback61(async (text, field) => {
29080
+ const copyToClipboard2 = useCallback62(async (text, field) => {
29047
29081
  try {
29048
29082
  await navigator.clipboard.writeText(text);
29049
29083
  setCopiedField(field);
@@ -29052,7 +29086,7 @@ function OAuthClientDetail({
29052
29086
  console.error("Failed to copy:", err);
29053
29087
  }
29054
29088
  }, []);
29055
- const handleDelete = useCallback61(async () => {
29089
+ const handleDelete = useCallback62(async () => {
29056
29090
  if (!onDelete) return;
29057
29091
  setIsDeleting(true);
29058
29092
  try {
@@ -29062,7 +29096,7 @@ function OAuthClientDetail({
29062
29096
  setShowDeleteConfirm(false);
29063
29097
  }
29064
29098
  }, [onDelete]);
29065
- const handleRegenerateSecret = useCallback61(async () => {
29099
+ const handleRegenerateSecret = useCallback62(async () => {
29066
29100
  if (!onRegenerateSecret) return;
29067
29101
  setIsRegenerating(true);
29068
29102
  try {
@@ -29073,7 +29107,7 @@ function OAuthClientDetail({
29073
29107
  }
29074
29108
  }, [onRegenerateSecret]);
29075
29109
  const createdDate = client.createdAt ? format(new Date(client.createdAt), "dateLong") : t("oauth.ui.card.unknown");
29076
- return /* @__PURE__ */ jsxs197(Fragment67, { children: [
29110
+ return /* @__PURE__ */ jsxs197(Fragment68, { children: [
29077
29111
  /* @__PURE__ */ jsxs197(Card, { children: [
29078
29112
  /* @__PURE__ */ jsx323(CardHeader, { children: /* @__PURE__ */ jsxs197("div", { className: "flex items-start justify-between", children: [
29079
29113
  /* @__PURE__ */ jsxs197("div", { children: [
@@ -29247,7 +29281,7 @@ function OAuthConsentActions({ onApprove, onDeny, isLoading = false }) {
29247
29281
  __name(OAuthConsentActions, "OAuthConsentActions");
29248
29282
 
29249
29283
  // src/features/oauth/components/consent/OAuthConsentScreen.tsx
29250
- import { ExternalLink as ExternalLink2, AlertTriangle as AlertTriangle2, Loader2 as Loader28 } from "lucide-react";
29284
+ import { ExternalLink as ExternalLink2, AlertTriangle as AlertTriangle2, Loader2 as Loader29 } from "lucide-react";
29251
29285
  import { useTranslations as useTranslations188 } from "next-intl";
29252
29286
 
29253
29287
  // src/features/oauth/components/consent/OAuthCompanySelector.tsx
@@ -29282,7 +29316,7 @@ function OAuthCompanySelector({ companies, value, onChange }) {
29282
29316
  __name(OAuthCompanySelector, "OAuthCompanySelector");
29283
29317
 
29284
29318
  // src/features/oauth/components/consent/OAuthConsentScreen.tsx
29285
- import { Fragment as Fragment68, jsx as jsx328, jsxs as jsxs202 } from "react/jsx-runtime";
29319
+ import { Fragment as Fragment69, jsx as jsx328, jsxs as jsxs202 } from "react/jsx-runtime";
29286
29320
  function OAuthConsentScreen({
29287
29321
  params,
29288
29322
  logoUrl,
@@ -29298,7 +29332,7 @@ function OAuthConsentScreen({
29298
29332
  );
29299
29333
  if (isLoading) {
29300
29334
  return /* @__PURE__ */ jsx328("div", { className: "min-h-dvh flex items-center justify-center p-4", children: /* @__PURE__ */ jsx328(Card, { className: "w-full max-w-md", children: /* @__PURE__ */ jsxs202(CardContent, { className: "flex flex-col items-center justify-center py-12", children: [
29301
- /* @__PURE__ */ jsx328(Loader28, { className: "h-8 w-8 animate-spin text-muted-foreground" }),
29335
+ /* @__PURE__ */ jsx328(Loader29, { className: "h-8 w-8 animate-spin text-muted-foreground" }),
29302
29336
  /* @__PURE__ */ jsx328("p", { className: "mt-4 text-muted-foreground text-sm", children: t("oauth.consent.loading") })
29303
29337
  ] }) }) });
29304
29338
  }
@@ -29316,7 +29350,7 @@ function OAuthConsentScreen({
29316
29350
  /* @__PURE__ */ jsx328(Separator, {}),
29317
29351
  /* @__PURE__ */ jsx328(OAuthScopeList, { scopes }),
29318
29352
  /* @__PURE__ */ jsx328(Separator, {}),
29319
- companies.length > 1 && /* @__PURE__ */ jsxs202(Fragment68, { children: [
29353
+ companies.length > 1 && /* @__PURE__ */ jsxs202(Fragment69, { children: [
29320
29354
  /* @__PURE__ */ jsx328(OAuthCompanySelector, { companies, value: companyId, onChange: setCompanyId }),
29321
29355
  /* @__PURE__ */ jsx328(Separator, {})
29322
29356
  ] }),
@@ -29446,7 +29480,7 @@ function WaitlistQuestionnaireRenderer({
29446
29480
  __name(WaitlistQuestionnaireRenderer, "WaitlistQuestionnaireRenderer");
29447
29481
 
29448
29482
  // src/features/waitlist/components/forms/WaitlistForm.tsx
29449
- import { Fragment as Fragment69, jsx as jsx330, jsxs as jsxs204 } from "react/jsx-runtime";
29483
+ import { Fragment as Fragment70, jsx as jsx330, jsxs as jsxs204 } from "react/jsx-runtime";
29450
29484
  function WaitlistForm({ onSuccess }) {
29451
29485
  const t = useTranslations189();
29452
29486
  const [isSubmitting, setIsSubmitting] = useState128(false);
@@ -29566,7 +29600,7 @@ function WaitlistForm({ onSuccess }) {
29566
29600
  {
29567
29601
  form,
29568
29602
  id: "gdprConsent",
29569
- label: /* @__PURE__ */ jsxs204(Fragment69, { children: [
29603
+ label: /* @__PURE__ */ jsxs204(Fragment70, { children: [
29570
29604
  t("auth.gdpr.terms_prefix"),
29571
29605
  /* @__PURE__ */ jsx330(Link, { href: "/terms", target: "_blank", rel: "noopener", children: t("auth.gdpr.terms_of_service") }),
29572
29606
  t("auth.gdpr.and"),
@@ -29629,7 +29663,7 @@ function WaitlistSuccessState() {
29629
29663
  __name(WaitlistSuccessState, "WaitlistSuccessState");
29630
29664
 
29631
29665
  // src/features/waitlist/components/sections/WaitlistConfirmation.tsx
29632
- import { CheckCircle as CheckCircle5, Loader2 as Loader29, XCircle as XCircle3 } from "lucide-react";
29666
+ import { CheckCircle as CheckCircle5, Loader2 as Loader210, XCircle as XCircle3 } from "lucide-react";
29633
29667
  import { useTranslations as useTranslations191 } from "next-intl";
29634
29668
  import { useEffect as useEffect92, useState as useState129 } from "react";
29635
29669
  import { jsx as jsx333, jsxs as jsxs207 } from "react/jsx-runtime";
@@ -29652,7 +29686,7 @@ function WaitlistConfirmation({ code }) {
29652
29686
  }, [code, t]);
29653
29687
  if (state === "loading") {
29654
29688
  return /* @__PURE__ */ jsxs207("div", { className: "flex flex-col items-center justify-center space-y-4 py-16 text-center", children: [
29655
- /* @__PURE__ */ jsx333(Loader29, { className: "text-primary h-12 w-12 animate-spin" }),
29689
+ /* @__PURE__ */ jsx333(Loader210, { className: "text-primary h-12 w-12 animate-spin" }),
29656
29690
  /* @__PURE__ */ jsx333("p", { className: "text-muted-foreground", children: t("waitlist.confirmation.loading") })
29657
29691
  ] });
29658
29692
  }
@@ -29676,7 +29710,7 @@ __name(WaitlistConfirmation, "WaitlistConfirmation");
29676
29710
  // src/features/waitlist/components/lists/WaitlistList.tsx
29677
29711
  import { RefreshCw as RefreshCw4 } from "lucide-react";
29678
29712
  import { useTranslations as useTranslations192 } from "next-intl";
29679
- import { useCallback as useCallback62, useEffect as useEffect93, useMemo as useMemo69, useState as useState130 } from "react";
29713
+ import { useCallback as useCallback63, useEffect as useEffect93, useMemo as useMemo69, useState as useState130 } from "react";
29680
29714
  import { jsx as jsx334, jsxs as jsxs208 } from "react/jsx-runtime";
29681
29715
  function WaitlistList({ fullWidth } = {}) {
29682
29716
  const t = useTranslations192();
@@ -29687,7 +29721,7 @@ function WaitlistList({ fullWidth } = {}) {
29687
29721
  retrieverParams: {},
29688
29722
  module: Modules.Waitlist
29689
29723
  });
29690
- const loadStats = useCallback62(async () => {
29724
+ const loadStats = useCallback63(async () => {
29691
29725
  try {
29692
29726
  setStats(await WaitlistService.getStats());
29693
29727
  } catch (error) {
@@ -29778,7 +29812,7 @@ __name(WaitlistList, "WaitlistList");
29778
29812
  // src/features/rbac/components/RbacContainer.tsx
29779
29813
  import { Loader2Icon as Loader2Icon4 } from "lucide-react";
29780
29814
  import { useTranslations as useTranslations194 } from "next-intl";
29781
- import { memo as memo2, useCallback as useCallback64, useEffect as useEffect95, useMemo as useMemo70, useRef as useRef50, useState as useState132 } from "react";
29815
+ import { memo as memo2, useCallback as useCallback65, useEffect as useEffect95, useMemo as useMemo70, useRef as useRef50, useState as useState132 } from "react";
29782
29816
 
29783
29817
  // src/features/rbac/components/RbacPermissionCell.tsx
29784
29818
  import { CheckIcon as CheckIcon9, MinusIcon as MinusIcon2, XIcon as XIcon14 } from "lucide-react";
@@ -29859,8 +29893,8 @@ __name(RbacPermissionCell, "RbacPermissionCell");
29859
29893
  import { Popover as PopoverPrimitive2 } from "@base-ui/react/popover";
29860
29894
  import { CheckIcon as CheckIcon10, MinusIcon as MinusIcon3, XIcon as XIcon15 } from "lucide-react";
29861
29895
  import { useTranslations as useTranslations193 } from "next-intl";
29862
- import { useCallback as useCallback63, useEffect as useEffect94, useState as useState131 } from "react";
29863
- import { Fragment as Fragment70, jsx as jsx336, jsxs as jsxs210 } from "react/jsx-runtime";
29896
+ import { useCallback as useCallback64, useEffect as useEffect94, useState as useState131 } from "react";
29897
+ import { Fragment as Fragment71, jsx as jsx336, jsxs as jsxs210 } from "react/jsx-runtime";
29864
29898
  function RbacPermissionPicker({
29865
29899
  open,
29866
29900
  anchor,
@@ -29877,7 +29911,7 @@ function RbacPermissionPicker({
29877
29911
  if (!open) setCustomSegment("");
29878
29912
  }, [open]);
29879
29913
  const currentSegments = typeof value === "string" ? value.split("|").filter(Boolean) : [];
29880
- const toggleSegment = useCallback63(
29914
+ const toggleSegment = useCallback64(
29881
29915
  (segment) => {
29882
29916
  const next = currentSegments.includes(segment) ? currentSegments.filter((s) => s !== segment) : [...currentSegments, segment];
29883
29917
  if (next.length === 0) onSetValue(false);
@@ -29885,7 +29919,7 @@ function RbacPermissionPicker({
29885
29919
  },
29886
29920
  [currentSegments, onSetValue]
29887
29921
  );
29888
- const addCustomSegment = useCallback63(() => {
29922
+ const addCustomSegment = useCallback64(() => {
29889
29923
  const segment = customSegment.trim();
29890
29924
  if (!segment) return;
29891
29925
  if (!currentSegments.includes(segment)) {
@@ -29946,7 +29980,7 @@ function RbacPermissionPicker({
29946
29980
  )
29947
29981
  ] })
29948
29982
  ] }),
29949
- isRoleColumn && onClear && /* @__PURE__ */ jsxs210(Fragment70, { children: [
29983
+ isRoleColumn && onClear && /* @__PURE__ */ jsxs210(Fragment71, { children: [
29950
29984
  /* @__PURE__ */ jsx336(Separator, {}),
29951
29985
  /* @__PURE__ */ jsxs210(
29952
29986
  Button,
@@ -30049,7 +30083,7 @@ var CellButton = memo2(/* @__PURE__ */ __name(function CellButton2({
30049
30083
  }) {
30050
30084
  const ref = useRef50(null);
30051
30085
  const value = cellValue(tokens, action);
30052
- const handleClick = useCallback64(() => {
30086
+ const handleClick = useCallback65(() => {
30053
30087
  if (!ref.current) return;
30054
30088
  onOpen({ moduleId, rowKey, action, isRoleColumn, anchor: ref.current });
30055
30089
  }, [onOpen, moduleId, rowKey, action, isRoleColumn]);
@@ -30123,13 +30157,13 @@ function RbacContainer() {
30123
30157
  const { matrix, modulePaths, loading, error, roleNames, moduleNames, updateCell, clearCell } = useRbacContext();
30124
30158
  const [selectedModuleId, setSelectedModuleId] = useState132(null);
30125
30159
  const [activePicker, setActivePicker] = useState132(null);
30126
- const openPicker = useCallback64((picker) => {
30160
+ const openPicker = useCallback65((picker) => {
30127
30161
  setActivePicker(picker);
30128
30162
  }, []);
30129
- const closePicker = useCallback64(() => {
30163
+ const closePicker = useCallback65(() => {
30130
30164
  setActivePicker(null);
30131
30165
  }, []);
30132
- const handleSelectModule = useCallback64((id) => {
30166
+ const handleSelectModule = useCallback65((id) => {
30133
30167
  setSelectedModuleId(id);
30134
30168
  setActivePicker(null);
30135
30169
  }, []);
@@ -30166,14 +30200,14 @@ function RbacContainer() {
30166
30200
  if (!activePicker) return [];
30167
30201
  return modulePaths[activePicker.moduleId] ?? [];
30168
30202
  }, [activePicker, modulePaths]);
30169
- const handleSetValue = useCallback64(
30203
+ const handleSetValue = useCallback65(
30170
30204
  (value) => {
30171
30205
  if (!activePicker) return;
30172
30206
  updateCell(activePicker.moduleId, activePicker.rowKey, activePicker.action, value);
30173
30207
  },
30174
30208
  [activePicker, updateCell]
30175
30209
  );
30176
- const handleClear = useCallback64(() => {
30210
+ const handleClear = useCallback65(() => {
30177
30211
  if (!activePicker || !activePicker.isRoleColumn) return;
30178
30212
  clearCell(activePicker.moduleId, activePicker.rowKey, activePicker.action);
30179
30213
  }, [activePicker, clearCell]);
@@ -30233,7 +30267,7 @@ __name(RbacContainer, "RbacContainer");
30233
30267
  // src/features/rbac/components/RbacByRoleContainer.tsx
30234
30268
  import { Loader2Icon as Loader2Icon5 } from "lucide-react";
30235
30269
  import { useTranslations as useTranslations195 } from "next-intl";
30236
- import { Fragment as Fragment71, memo as memo3, useCallback as useCallback65, useEffect as useEffect96, useMemo as useMemo71, useRef as useRef51, useState as useState133 } from "react";
30270
+ import { Fragment as Fragment72, memo as memo3, useCallback as useCallback66, useEffect as useEffect96, useMemo as useMemo71, useRef as useRef51, useState as useState133 } from "react";
30237
30271
  import { jsx as jsx338, jsxs as jsxs212 } from "react/jsx-runtime";
30238
30272
  function findToken2(tokens, action) {
30239
30273
  if (!tokens) return void 0;
@@ -30256,7 +30290,7 @@ var CellButton3 = memo3(/* @__PURE__ */ __name(function CellButton4({
30256
30290
  }) {
30257
30291
  const ref = useRef51(null);
30258
30292
  const value = cellValue2(tokens, action);
30259
- const handleClick = useCallback65(() => {
30293
+ const handleClick = useCallback66(() => {
30260
30294
  if (!ref.current) return;
30261
30295
  onOpen({ moduleId, rowKey, action, isRoleColumn, anchor: ref.current });
30262
30296
  }, [onOpen, moduleId, rowKey, action, isRoleColumn]);
@@ -30273,13 +30307,13 @@ function RbacByRoleContainer() {
30273
30307
  const { matrix, modulePaths, loading, error, roleNames, moduleNames, updateCell, clearCell } = useRbacContext();
30274
30308
  const [selectedRoleId, setSelectedRoleId] = useState133(null);
30275
30309
  const [activePicker, setActivePicker] = useState133(null);
30276
- const openPicker = useCallback65((picker) => {
30310
+ const openPicker = useCallback66((picker) => {
30277
30311
  setActivePicker(picker);
30278
30312
  }, []);
30279
- const closePicker = useCallback65(() => {
30313
+ const closePicker = useCallback66(() => {
30280
30314
  setActivePicker(null);
30281
30315
  }, []);
30282
- const handleSelectRole = useCallback65((id) => {
30316
+ const handleSelectRole = useCallback66((id) => {
30283
30317
  setSelectedRoleId(id);
30284
30318
  setActivePicker(null);
30285
30319
  }, []);
@@ -30307,14 +30341,14 @@ function RbacByRoleContainer() {
30307
30341
  if (!activePicker) return [];
30308
30342
  return modulePaths[activePicker.moduleId] ?? [];
30309
30343
  }, [activePicker, modulePaths]);
30310
- const handleSetValue = useCallback65(
30344
+ const handleSetValue = useCallback66(
30311
30345
  (value) => {
30312
30346
  if (!activePicker) return;
30313
30347
  updateCell(activePicker.moduleId, activePicker.rowKey, activePicker.action, value);
30314
30348
  },
30315
30349
  [activePicker, updateCell]
30316
30350
  );
30317
- const handleClear = useCallback65(() => {
30351
+ const handleClear = useCallback66(() => {
30318
30352
  if (!activePicker || !activePicker.isRoleColumn) return;
30319
30353
  clearCell(activePicker.moduleId, activePicker.rowKey, activePicker.action);
30320
30354
  }, [activePicker, clearCell]);
@@ -30359,7 +30393,7 @@ function RbacByRoleContainer() {
30359
30393
  const defaultTokens = block.default ?? [];
30360
30394
  const roleTokens = block[selectedRoleId];
30361
30395
  const moduleLabel = moduleNames?.[moduleId] ?? moduleId;
30362
- return /* @__PURE__ */ jsxs212(Fragment71, { children: [
30396
+ return /* @__PURE__ */ jsxs212(Fragment72, { children: [
30363
30397
  /* @__PURE__ */ jsx338("tr", { className: "border-b bg-muted/40", children: /* @__PURE__ */ jsx338(
30364
30398
  "td",
30365
30399
  {
@@ -31063,4 +31097,4 @@ export {
31063
31097
  useOAuthClients,
31064
31098
  useOAuthClient
31065
31099
  };
31066
- //# sourceMappingURL=chunk-OVSR72CZ.mjs.map
31100
+ //# sourceMappingURL=chunk-BT3VFB3I.mjs.map