@altinn/altinn-components 0.57.3 → 0.58.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/README.md +33 -0
  2. package/dist/Section-DvBigBR1.js +2226 -0
  3. package/dist/assets/BookmarkSettingsItemLabel.css +1 -1
  4. package/dist/assets/DialogContact.css +1 -0
  5. package/dist/assets/DialogHeader.css +1 -0
  6. package/dist/assets/DialogLayout.css +1 -0
  7. package/dist/assets/DialogSection.css +1 -0
  8. package/dist/assets/Link.css +1 -0
  9. package/dist/assets/Section.css +1 -1
  10. package/dist/assets/SettingsItemBase.css +1 -1
  11. package/dist/components/AccessAreaListItem/AccessAreaListItem.js +17 -16
  12. package/dist/components/AccessPackageListItem/AccessPackageListItem.js +9 -8
  13. package/dist/components/Account/AccountList.js +7 -6
  14. package/dist/components/Account/AccountListItem.js +8 -7
  15. package/dist/components/Account/AccountListItemControls.js +11 -10
  16. package/dist/components/Account/AccountListItemDetails.js +12 -11
  17. package/dist/components/Account/AccountListVirtual.js +4 -3
  18. package/dist/components/Account/AccountMenu.js +11 -10
  19. package/dist/components/Account/AccountNotificationSettings.js +10 -9
  20. package/dist/components/Account/AccountOrganization.js +15 -14
  21. package/dist/components/AccountSelector/AccountSelector.js +10 -9
  22. package/dist/components/ActivityLog/ActivityLog.js +4 -3
  23. package/dist/components/ActivityLog/ActivityLogItem.js +4 -3
  24. package/dist/components/ActivityLog/ActivityLogSegment.js +4 -3
  25. package/dist/components/Alert/Alert.js +8 -7
  26. package/dist/components/Article/Article.js +4 -3
  27. package/dist/components/Article/ArticleContact.js +4 -3
  28. package/dist/components/Article/ArticleHeader.js +4 -3
  29. package/dist/components/Attachment/AttachmentLink.js +1 -1
  30. package/dist/components/Banner/Banner.js +6 -5
  31. package/dist/components/Bookmarks/BookmarkModal.js +7 -6
  32. package/dist/components/Bookmarks/BookmarkSettingsItem.js +4 -3
  33. package/dist/components/Bookmarks/BookmarkSettingsItemLabel.js +12 -11
  34. package/dist/components/Bookmarks/BookmarkSettingsList.js +9 -8
  35. package/dist/components/Breadcrumbs/Breadcrumbs.js +4 -3
  36. package/dist/components/Bulk/BulkButton.js +11 -11
  37. package/dist/components/Bulk/BulkHeader.js +8 -7
  38. package/dist/components/Button/ButtonIcon.js +4 -3
  39. package/dist/components/Button/ComboButton.js +4 -3
  40. package/dist/components/Button/FloatingActionButton.js +8 -7
  41. package/dist/components/Button/IconButton.js +5 -4
  42. package/dist/components/Byline/Byline.js +3 -2
  43. package/dist/components/Byline/index.js +1 -1
  44. package/dist/components/ContextMenu/ContextMenu.js +28 -24
  45. package/dist/components/Dashboard/DashboardCard.js +7 -6
  46. package/dist/components/Dashboard/DashboardHeader.js +9 -8
  47. package/dist/components/Datepicker/Datepicker.js +1 -1
  48. package/dist/components/Datepicker/DatepickerHeader.js +4 -3
  49. package/dist/components/Datepicker/DatepickerTable.js +11 -10
  50. package/dist/components/Dialog/Dialog.js +25 -31
  51. package/dist/components/Dialog/DialogActions.js +4 -3
  52. package/dist/components/Dialog/DialogActivityLog.js +4 -3
  53. package/dist/components/Dialog/DialogAttachments.js +6 -5
  54. package/dist/components/Dialog/DialogBody.js +8 -7
  55. package/dist/components/Dialog/DialogByline.js +3 -2
  56. package/dist/components/Dialog/DialogContact.js +47 -11
  57. package/dist/components/Dialog/DialogHeader.js +31 -28
  58. package/dist/components/Dialog/DialogHistory.js +7 -6
  59. package/dist/components/Dialog/DialogHistoryItem.js +4 -3
  60. package/dist/components/Dialog/DialogHistorySegment.js +8 -7
  61. package/dist/components/Dialog/DialogLayout.js +21 -20
  62. package/dist/components/Dialog/DialogList.js +3 -2
  63. package/dist/components/Dialog/DialogListGroup.js +3 -2
  64. package/dist/components/Dialog/DialogListItem.js +3 -2
  65. package/dist/components/Dialog/DialogMetadata.js +3 -2
  66. package/dist/components/Dialog/DialogSection.js +10 -7
  67. package/dist/components/Dialog/DialogSeenBy.js +4 -3
  68. package/dist/components/Dialog/DialogSelect.js +10 -9
  69. package/dist/components/Dialog/DialogStatus.js +4 -3
  70. package/dist/components/Dialog/DialogTabs.js +4 -3
  71. package/dist/components/Dialog/SeenByLog.js +4 -3
  72. package/dist/components/Dialog/SeenByLogButton.js +7 -6
  73. package/dist/components/Dialog/SeenByLogItem.js +12 -11
  74. package/dist/components/Dialog/index.js +1 -1
  75. package/dist/components/Dropdown/DrawerButton.js +4 -3
  76. package/dist/components/Dropdown/DrawerHeader.js +8 -7
  77. package/dist/components/Dropdown/Dropdown.js +3 -2
  78. package/dist/components/Dropdown/DropdownBase.js +8 -7
  79. package/dist/components/Dropdown/FloatingDropdown.js +19 -18
  80. package/dist/components/Dropdown/index.js +5 -7
  81. package/dist/components/DsComponents/index.js +21 -20
  82. package/dist/components/Forms/Checkbox.js +4 -3
  83. package/dist/components/Forms/CheckboxOptions.js +4 -3
  84. package/dist/components/Forms/FieldBase.js +3 -2
  85. package/dist/components/Forms/FieldsetBase.js +4 -3
  86. package/dist/components/Forms/Radio.js +4 -3
  87. package/dist/components/Forms/RadioOptions.js +4 -3
  88. package/dist/components/Forms/SearchField.js +3 -2
  89. package/dist/components/Forms/SelectField.js +5 -4
  90. package/dist/components/Forms/Switch.js +6 -5
  91. package/dist/components/Forms/SwitchOptions.js +4 -3
  92. package/dist/components/Forms/TextField.js +4 -3
  93. package/dist/components/Forms/TextFieldDropdown.js +4 -3
  94. package/dist/components/Forms/TextareaField.js +4 -3
  95. package/dist/components/Forms/index.js +1 -1
  96. package/dist/components/GlobalHeader/GlobalAccountButton.js +8 -7
  97. package/dist/components/GlobalHeader/GlobalHeader.js +10 -9
  98. package/dist/components/GlobalHeader/GlobalMenuButton.js +4 -3
  99. package/dist/components/GlobalHeader/HeaderDrawer.js +9 -8
  100. package/dist/components/GlobalHeader/HeaderDropdown.js +6 -5
  101. package/dist/components/GlobalHeader/HeaderLogo.js +8 -7
  102. package/dist/components/GlobalMenu/GlobalMenu.js +10 -9
  103. package/dist/components/GlobalMenu/LocaleSwitcher.js +13 -12
  104. package/dist/components/GlobalMenu/LogoutButton.js +4 -3
  105. package/dist/components/GlobalMenu_old/BackButton.js +4 -3
  106. package/dist/components/GlobalMenu_old/CurrentAccount.js +4 -3
  107. package/dist/components/GlobalMenu_old/GlobalMenu.js +10 -9
  108. package/dist/components/GlobalMenu_old/GlobalMenuButton.js +12 -11
  109. package/dist/components/GlobalMenu_old/LogoutButton.js +4 -3
  110. package/dist/components/Header/Header.js +4 -3
  111. package/dist/components/Header/HeaderBase.js +7 -6
  112. package/dist/components/Header/HeaderButton.js +18 -17
  113. package/dist/components/Header/LocaleButton.js +12 -11
  114. package/dist/components/Header/LocaleSwitcher.js +9 -8
  115. package/dist/components/Icon/Icon.js +4 -3
  116. package/dist/components/Icon/index.js +1 -1
  117. package/dist/components/Inbox/InboxPage.js +8 -7
  118. package/dist/components/InboxSearch/InboxSearch.js +10 -9
  119. package/dist/components/Item/ItemLabel.js +2 -1
  120. package/dist/components/Item/ItemMedia.js +3 -2
  121. package/dist/components/Item/ItemSelect.js +3 -2
  122. package/dist/components/Item/index.js +1 -1
  123. package/dist/components/Layout/Layout.js +8 -7
  124. package/dist/components/List/List.js +3 -2
  125. package/dist/components/List/ListBase.js +4 -3
  126. package/dist/components/List/ListItem.js +1 -1
  127. package/dist/components/List/ListItemHeader.js +3 -2
  128. package/dist/components/List/ListItemIcon.js +3 -2
  129. package/dist/components/List/ListItemLabel.js +4 -3
  130. package/dist/components/List/index.js +1 -1
  131. package/dist/components/Menu/Menu.js +1 -1
  132. package/dist/components/Menu/MenuItem.js +3 -2
  133. package/dist/components/Menu/MenuItems.js +3 -2
  134. package/dist/components/Menu/MenuListSearch.js +3 -2
  135. package/dist/components/Menu/MenuOption.js +1 -1
  136. package/dist/components/Menu/TabMenu.js +7 -6
  137. package/dist/components/Menu/VirtualizedMenuItems.js +3 -2
  138. package/dist/components/Menu/index.js +1 -1
  139. package/dist/components/Menu/useMenuSearch.js +1 -1
  140. package/dist/components/Metadata/MetaItem.js +3 -2
  141. package/dist/components/Metadata/MetaItemIcon.js +3 -2
  142. package/dist/components/Metadata/MetaProgress.js +3 -2
  143. package/dist/components/Metadata/MetaTimestamp.js +3 -2
  144. package/dist/components/Metadata/Metadata.js +9 -8
  145. package/dist/components/Metadata/index.js +1 -1
  146. package/dist/components/Modal/Modal.js +8 -7
  147. package/dist/components/Modal/ModalBase.js +25 -24
  148. package/dist/components/Modal/ModalHeader.js +10 -9
  149. package/dist/components/Modal/ModalIcon.js +4 -3
  150. package/dist/components/Notifications/NotificationItem.js +4 -3
  151. package/dist/components/Notifications/NotificationItemBase.js +4 -3
  152. package/dist/components/Notifications/NotificationItemControls.js +6 -5
  153. package/dist/components/Notifications/NotificationItemIcon.js +15 -14
  154. package/dist/components/Page/AccordionSection.js +4 -3
  155. package/dist/components/Page/ContactButtons.js +7 -6
  156. package/dist/components/Page/ContactSection.js +7 -6
  157. package/dist/components/Page/PageMenu.js +11 -10
  158. package/dist/components/Page/PageNav.js +7 -6
  159. package/dist/components/Page/Section.js +3 -2
  160. package/dist/components/Page/index.js +1 -1
  161. package/dist/components/ResourceListItem/ResourceListItem.js +8 -7
  162. package/dist/components/RootProvider/RootProvider.js +4 -3
  163. package/dist/components/RootProvider/index.js +1 -1
  164. package/dist/components/Search/SearchItem.js +7 -6
  165. package/dist/components/Searchbar/Autocomplete.js +9 -8
  166. package/dist/components/Searchbar/AutocompleteItem.js +6 -5
  167. package/dist/components/Searchbar/Searchbar.js +4 -3
  168. package/dist/components/Searchbar/SearchbarField.js +4 -3
  169. package/dist/components/Settings/SettingsItem.js +75 -69
  170. package/dist/components/Settings/SettingsItemBase.js +67 -39
  171. package/dist/components/Settings/SettingsList.js +12 -11
  172. package/dist/components/Settings/SettingsModal.js +7 -6
  173. package/dist/components/Settings/SettingsSection.js +10 -9
  174. package/dist/components/Settings/UsedByLog.js +4 -3
  175. package/dist/components/Settings/UsedByLogItem.js +10 -9
  176. package/dist/components/Snackbar/SnackbarItem.js +16 -15
  177. package/dist/components/Timeline/Timeline.js +4 -3
  178. package/dist/components/Timeline/TimelineActivity.js +4 -3
  179. package/dist/components/Timeline/TimelineBase.js +4 -3
  180. package/dist/components/Timeline/TimelineFooter.js +7 -6
  181. package/dist/components/Timeline/TimelineHeader.js +4 -3
  182. package/dist/components/Timeline/TimelineIcon.js +6 -5
  183. package/dist/components/Timeline/TimelineSection.js +4 -3
  184. package/dist/components/Timeline/TimelineSegment.js +7 -6
  185. package/dist/components/Toolbar/DatepickerFilter.js +4 -3
  186. package/dist/components/Toolbar/SelectDateFilter.js +8 -7
  187. package/dist/components/Toolbar/Toolbar.js +1 -1
  188. package/dist/components/Toolbar/ToolbarFilter.js +11 -10
  189. package/dist/components/Toolbar/ToolbarFilterAddMenu.js +18 -17
  190. package/dist/components/Toolbar/ToolbarFilterButton.js +4 -3
  191. package/dist/components/Toolbar/ToolbarFilterMenu.js +11 -10
  192. package/dist/components/Toolbar/ToolbarMenu.js +3 -2
  193. package/dist/components/Toolbar/ToolbarSearch.js +3 -2
  194. package/dist/components/Toolbar/index.js +1 -1
  195. package/dist/components/Transmission/Transmission.js +9 -8
  196. package/dist/components/Transmission/TransmissionList.js +6 -5
  197. package/dist/components/Transmission/TransmissionType.js +4 -3
  198. package/dist/components/Typography/Heading.js +3 -2
  199. package/dist/components/Typography/Link.js +11 -0
  200. package/dist/components/Typography/index.js +4 -2
  201. package/dist/components/UserListItem/UserListItem.js +9 -8
  202. package/dist/components/index.js +255 -254
  203. package/dist/hooks/useAccountSelector.js +18 -17
  204. package/dist/index.js +246 -245
  205. package/dist/link-D1SA3LCe.js +10 -0
  206. package/dist/{textfield-CRXtg-r5.js → textfield-f4Za2qt6.js} +428 -431
  207. package/dist/types/lib/components/Bulk/Bulk.stories.d.ts +4 -1
  208. package/dist/types/lib/components/Bulk/BulkButton.d.ts +2 -1
  209. package/dist/types/lib/components/ContextMenu/ContextMenu.d.ts +3 -2
  210. package/dist/types/lib/components/Dialog/DialogContact.d.ts +12 -3
  211. package/dist/types/lib/components/Dropdown/Dropdown.d.ts +3 -1
  212. package/dist/types/lib/components/Dropdown/Dropdown.stories.d.ts +1 -2
  213. package/dist/types/lib/components/Dropdown/index.d.ts +0 -1
  214. package/dist/types/lib/components/Forms/SearchField.stories.d.ts +1 -0
  215. package/dist/types/lib/components/Menu/VirtualizedMenu.stories.d.ts +24 -3
  216. package/dist/types/lib/components/Settings/SettingsItem.d.ts +1 -1
  217. package/dist/types/lib/components/Settings/SettingsItemBase.d.ts +16 -10
  218. package/dist/types/lib/components/Typography/Link.d.ts +11 -0
  219. package/dist/types/lib/components/Typography/index.d.ts +1 -0
  220. package/dist/types/lib/stories/Profile.stories.d.ts +1 -0
  221. package/dist/types/lib/test-utils/screenshot-compare.d.ts +49 -0
  222. package/package.json +10 -3
  223. package/dist/Section-xbt3ft20.js +0 -2265
  224. package/dist/assets/DrawerOrDropdown.css +0 -1
  225. package/dist/components/Dropdown/DrawerOrDropdown.js +0 -42
  226. package/dist/types/lib/components/Dropdown/DrawerOrDropdown.d.ts +0 -11
  227. package/dist/types/lib/components/Settings/SettingsItem.stories.d.ts +0 -67
@@ -0,0 +1,2226 @@
1
+ "use client";
2
+ import { jsx as a, jsxs as x, Fragment as fe } from "react/jsx-runtime";
3
+ import { c as K } from "./index-p1eeF8LQ.js";
4
+ import * as H from "react";
5
+ import C, { forwardRef as V, useRef as Z, useState as se, useMemo as ce, useEffect as Q, Fragment as vt, useLayoutEffect as je, createContext as bt, useContext as gt, isValidElement as _e, useId as Oe, useCallback as Qe, memo as we, createElement as Me } from "react";
6
+ import { useEscapeKey as yt } from "./hooks/useEscapeKey.js";
7
+ import "./components/Typography/Link.js";
8
+ import { Button as pe } from "./components/Button/Button.js";
9
+ import { createPortal as _t } from "react-dom";
10
+ import { useMenu as Be } from "./hooks/useMenu.js";
11
+ import { Typography as Xe } from "./components/Typography/Typography.js";
12
+ import { Skeleton as Ne } from "./components/Skeleton/Skeleton.js";
13
+ import { useHighlightedText as wt } from "./components/Typography/useHighlightedText.js";
14
+ import { Badge as ye } from "./components/Badge/Badge.js";
15
+ import { isAvatarGroupProps as ke, AvatarGroup as he } from "./components/Avatar/AvatarGroup.js";
16
+ import { ItemControls as Ae } from "./components/Item/ItemControls.js";
17
+ import { ItemBase as It } from "./components/Item/ItemBase.js";
18
+ import { ItemLink as xt } from "./components/Item/ItemLink.js";
19
+ import { Tooltip as Ot } from "./components/Tooltip/Tooltip.js";
20
+ import { MetaBase as Nt } from "./components/Metadata/MetaBase.js";
21
+ import { MetaItemBase as Le } from "./components/Metadata/MetaItemBase.js";
22
+ import { SnackbarProvider as kt } from "./components/Snackbar/useSnackbar.js";
23
+ import { Input as Je } from "./components/Forms/Input.js";
24
+ import { Field as Ct } from "./components/Forms/Field.js";
25
+ import { Label as Et } from "./components/Forms/Label.js";
26
+ import { TypingIcon as Pt } from "./components/Icon/TypingIcon.js";
27
+ import { u as W } from "./useId-BVFxCjkq.js";
28
+ import { isAvatarProps as Ce, Avatar as Se } from "./components/Avatar/Avatar.js";
29
+ import { pickAriaProps as St } from "./components/Menu/aria.js";
30
+ import { MenuList as Ee } from "./components/Menu/MenuList.js";
31
+ import { MenuListItem as Ze } from "./components/Menu/MenuListItem.js";
32
+ import { MenuListGroup as et } from "./components/Menu/MenuListGroup.js";
33
+ import { MenuListDivider as tt } from "./components/Menu/MenuListDivider.js";
34
+ import { MenuListHeading as nt } from "./components/Menu/MenuListHeading.js";
35
+ import { a as zt } from "./useMenuVirtualization-Cs426RCN.js";
36
+ import { S as $t, a as Rt, b as jt, d as Mt, c as At } from "./Trash-BG9YcGIl.js";
37
+ import { useDropdownMenuController as Dt } from "./components/Menu/useDropdownMenuController.js";
38
+ import { ProgressIcon as Bt } from "./components/Icon/ProgressIcon.js";
39
+ import { MetaItemLabel as Fe } from "./components/Metadata/MetaItemLabel.js";
40
+ import { ListItemBase as Lt } from "./components/List/ListItemBase.js";
41
+ import { ListItemLink as Ft } from "./components/List/ListItemLink.js";
42
+ import { ListItemControls as Tt } from "./components/List/ListItemControls.js";
43
+ import { Flex as Te } from "./components/Page/Flex.js";
44
+ import './assets/Section.css';var Gt = function(e, o) {
45
+ var n = {};
46
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
47
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
48
+ for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
49
+ o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
50
+ return n;
51
+ };
52
+ const Ht = V((e, o) => {
53
+ var { title: n, titleId: t } = e, r = Gt(e, ["title", "titleId"]);
54
+ let s = W();
55
+ return s = n ? t || "title-" + s : void 0, C.createElement(
56
+ "svg",
57
+ Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: o, "aria-labelledby": s }, r),
58
+ n ? C.createElement("title", { id: s }, n) : null,
59
+ C.createElement("path", { fill: "currentColor", d: "M12.75 5a.75.75 0 0 0-1.5 0v12.19l-3.22-3.22a.75.75 0 0 0-1.06 1.06l4.5 4.5a.75.75 0 0 0 1.06 0l4.5-4.5a.75.75 0 1 0-1.06-1.06l-3.22 3.22z" })
60
+ );
61
+ });
62
+ var Kt = function(e, o) {
63
+ var n = {};
64
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
65
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
66
+ for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
67
+ o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
68
+ return n;
69
+ };
70
+ const rt = V((e, o) => {
71
+ var { title: n, titleId: t } = e, r = Kt(e, ["title", "titleId"]);
72
+ let s = W();
73
+ return s = n ? t || "title-" + s : void 0, C.createElement(
74
+ "svg",
75
+ Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: o, "aria-labelledby": s }, r),
76
+ n ? C.createElement("title", { id: s }, n) : null,
77
+ C.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M18.998 6.94a.75.75 0 0 1 .063 1.058l-8 9a.75.75 0 0 1-1.091.032l-5-5a.75.75 0 1 1 1.06-1.06l4.438 4.437 7.471-8.405A.75.75 0 0 1 19 6.939", clipRule: "evenodd" })
78
+ );
79
+ });
80
+ var qt = function(e, o) {
81
+ var n = {};
82
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
83
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
84
+ for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
85
+ o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
86
+ return n;
87
+ };
88
+ const Ut = V((e, o) => {
89
+ var { title: n, titleId: t } = e, r = qt(e, ["title", "titleId"]);
90
+ let s = W();
91
+ return s = n ? t || "title-" + s : void 0, C.createElement(
92
+ "svg",
93
+ Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: o, "aria-labelledby": s }, r),
94
+ n ? C.createElement("title", { id: s }, n) : null,
95
+ C.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M5.97 9.47a.75.75 0 0 1 1.06 0L12 14.44l4.97-4.97a.75.75 0 1 1 1.06 1.06l-5.5 5.5a.75.75 0 0 1-1.06 0l-5.5-5.5a.75.75 0 0 1 0-1.06", clipRule: "evenodd" })
96
+ );
97
+ });
98
+ var Vt = function(e, o) {
99
+ var n = {};
100
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
101
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
102
+ for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
103
+ o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
104
+ return n;
105
+ };
106
+ const ot = V((e, o) => {
107
+ var { title: n, titleId: t } = e, r = Vt(e, ["title", "titleId"]);
108
+ let s = W();
109
+ return s = n ? t || "title-" + s : void 0, C.createElement(
110
+ "svg",
111
+ Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: o, "aria-labelledby": s }, r),
112
+ n ? C.createElement("title", { id: s }, n) : null,
113
+ C.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M9.47 5.97a.75.75 0 0 1 1.06 0l5.5 5.5a.75.75 0 0 1 0 1.06l-5.5 5.5a.75.75 0 1 1-1.06-1.06L14.44 12 9.47 7.03a.75.75 0 0 1 0-1.06", clipRule: "evenodd" })
114
+ );
115
+ });
116
+ var Wt = function(e, o) {
117
+ var n = {};
118
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
119
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
120
+ for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
121
+ o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
122
+ return n;
123
+ };
124
+ const Yt = V((e, o) => {
125
+ var { title: n, titleId: t } = e, r = Wt(e, ["title", "titleId"]);
126
+ let s = W();
127
+ return s = n ? t || "title-" + s : void 0, C.createElement(
128
+ "svg",
129
+ Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: o, "aria-labelledby": s }, r),
130
+ n ? C.createElement("title", { id: s }, n) : null,
131
+ C.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M11.47 7.97a.75.75 0 0 1 1.06 0l5.5 5.5a.75.75 0 1 1-1.06 1.06L12 9.56l-4.97 4.97a.75.75 0 0 1-1.06-1.06z", clipRule: "evenodd" })
132
+ );
133
+ });
134
+ var Qt = function(e, o) {
135
+ var n = {};
136
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
137
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
138
+ for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
139
+ o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
140
+ return n;
141
+ };
142
+ const He = V((e, o) => {
143
+ var { title: n, titleId: t } = e, r = Qt(e, ["title", "titleId"]);
144
+ let s = W();
145
+ return s = n ? t || "title-" + s : void 0, C.createElement(
146
+ "svg",
147
+ Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: o, "aria-labelledby": s }, r),
148
+ n ? C.createElement("title", { id: s }, n) : null,
149
+ C.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M12.53 4.47a.75.75 0 0 0-1.06 0l-3.5 3.5a.75.75 0 0 0 1.06 1.06L12 6.06l2.97 2.97a.75.75 0 1 0 1.06-1.06zm-3.5 10.5a.75.75 0 0 0-1.06 1.06l3.5 3.5a.75.75 0 0 0 1.06 0l3.5-3.5a.75.75 0 1 0-1.06-1.06L12 17.94z", clipRule: "evenodd" })
150
+ );
151
+ });
152
+ var Xt = function(e, o) {
153
+ var n = {};
154
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
155
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
156
+ for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
157
+ o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
158
+ return n;
159
+ };
160
+ const Jt = V((e, o) => {
161
+ var { title: n, titleId: t } = e, r = Xt(e, ["title", "titleId"]);
162
+ let s = W();
163
+ return s = n ? t || "title-" + s : void 0, C.createElement(
164
+ "svg",
165
+ Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: o, "aria-labelledby": s }, r),
166
+ n ? C.createElement("title", { id: s }, n) : null,
167
+ C.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M4.5 1.75a.75.75 0 0 1 .75.75v2.464a9.75 9.75 0 1 1 12.342 15.023.75.75 0 1 1-.86-1.229A8.251 8.251 0 1 0 6.084 6.25H9a.75.75 0 0 1 0 1.5H4.5A.75.75 0 0 1 3.75 7V2.5a.75.75 0 0 1 .75-.75M12.75 6a.75.75 0 0 0-1.5 0v6c0 .199.079.39.22.53l2.5 2.5a.75.75 0 1 0 1.06-1.06l-2.28-2.28zM3 11.25a.75.75 0 0 1 .75.75q0 .66.105 1.31a.75.75 0 0 1-1.481.24A10 10 0 0 1 2.25 12a.75.75 0 0 1 .75-.75m1.855 4.875a.75.75 0 0 0-1.299.75q.39.675.882 1.28a.75.75 0 1 0 1.163-.947 8 8 0 0 1-.746-1.083m1.995 3.294a.75.75 0 0 1 1.025-.274q.57.33 1.188.564a.75.75 0 1 1-.535 1.402 10 10 0 0 1-1.403-.667.75.75 0 0 1-.275-1.025m6.7 2.207a.75.75 0 1 0-.24-1.48q-.65.104-1.31.104a.75.75 0 0 0 0 1.5q.78 0 1.55-.124", clipRule: "evenodd" })
168
+ );
169
+ });
170
+ var Zt = function(e, o) {
171
+ var n = {};
172
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
173
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
174
+ for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
175
+ o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
176
+ return n;
177
+ };
178
+ const en = V((e, o) => {
179
+ var { title: n, titleId: t } = e, r = Zt(e, ["title", "titleId"]);
180
+ let s = W();
181
+ return s = n ? t || "title-" + s : void 0, C.createElement(
182
+ "svg",
183
+ Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: o, "aria-labelledby": s }, r),
184
+ n ? C.createElement("title", { id: s }, n) : null,
185
+ C.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M8.25 3.5c0-.69.56-1.25 1.25-1.25H14a.75.75 0 0 1 .53.22l5 5c.141.14.22.331.22.53v8.5c0 .69-.56 1.25-1.25 1.25h-9c-.69 0-1.25-.56-1.25-1.25zm6.25 5.25c-.69 0-1.25-.56-1.25-1.25V3.75h-3.5v12.5h8.5v-7.5zm.25-3.94 2.44 2.44h-2.44zM6.502 7.75H5.75v12.5h8.5v-.748a.75.75 0 0 1 1.5 0v.998c0 .69-.56 1.25-1.25 1.25h-9c-.69 0-1.25-.56-1.25-1.25v-13c0-.69.56-1.25 1.25-1.25h1.002a.75.75 0 1 1 0 1.5", clipRule: "evenodd" })
186
+ );
187
+ });
188
+ var tn = function(e, o) {
189
+ var n = {};
190
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
191
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
192
+ for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
193
+ o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
194
+ return n;
195
+ };
196
+ const nn = V((e, o) => {
197
+ var { title: n, titleId: t } = e, r = tn(e, ["title", "titleId"]);
198
+ let s = W();
199
+ return s = n ? t || "title-" + s : void 0, C.createElement(
200
+ "svg",
201
+ Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: o, "aria-labelledby": s }, r),
202
+ n ? C.createElement("title", { id: s }, n) : null,
203
+ C.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M6 3.25a.75.75 0 0 0 0 1.5h.315c.109 1.966.642 3.846 1.546 5.302.502.81 1.116 1.479 1.81 1.948-.694.47-1.308 1.138-1.81 1.948-.904 1.456-1.437 3.336-1.546 5.302H6a.75.75 0 0 0 0 1.5h12a.75.75 0 0 0 0-1.5h-.298c-.109-1.966-.643-3.846-1.546-5.302-.503-.81-1.116-1.479-1.81-1.948.694-.47 1.307-1.138 1.81-1.948.904-1.456 1.437-3.336 1.546-5.302H18a.75.75 0 0 0 0-1.5zm6.008 8c.972 0 2.027-.624 2.873-1.989.738-1.189 1.211-2.785 1.318-4.511H7.818c.107 1.726.58 3.322 1.318 4.511.846 1.365 1.901 1.989 2.872 1.989m0 1.5c-.971 0-2.026.624-2.872 1.989-.738 1.189-1.211 2.784-1.318 4.511h8.381c-.107-1.727-.58-3.322-1.318-4.511-.846-1.365-1.901-1.989-2.873-1.989", clipRule: "evenodd" })
204
+ );
205
+ });
206
+ var rn = function(e, o) {
207
+ var n = {};
208
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
209
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
210
+ for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
211
+ o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
212
+ return n;
213
+ };
214
+ const on = V((e, o) => {
215
+ var { title: n, titleId: t } = e, r = rn(e, ["title", "titleId"]);
216
+ let s = W();
217
+ return s = n ? t || "title-" + s : void 0, C.createElement(
218
+ "svg",
219
+ Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: o, "aria-labelledby": s }, r),
220
+ n ? C.createElement("title", { id: s }, n) : null,
221
+ C.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M10.5 3.25a7.25 7.25 0 1 0 4.569 12.88l5.411 5.41a.75.75 0 1 0 1.06-1.06l-5.41-5.411A7.25 7.25 0 0 0 10.5 3.25M4.75 10.5a5.75 5.75 0 1 1 11.5 0 5.75 5.75 0 0 1-11.5 0", clipRule: "evenodd" })
222
+ );
223
+ });
224
+ var an = function(e, o) {
225
+ var n = {};
226
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
227
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
228
+ for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
229
+ o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
230
+ return n;
231
+ };
232
+ const sn = V((e, o) => {
233
+ var { title: n, titleId: t } = e, r = an(e, ["title", "titleId"]);
234
+ let s = W();
235
+ return s = n ? t || "title-" + s : void 0, C.createElement(
236
+ "svg",
237
+ Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: o, "aria-labelledby": s }, r),
238
+ n ? C.createElement("title", { id: s }, n) : null,
239
+ C.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M4.75 12a.75.75 0 0 1 .75-.75h13a.75.75 0 1 1 0 1.5h-13a.75.75 0 0 1-.75-.75", clipRule: "evenodd" })
240
+ );
241
+ });
242
+ var ln = function(e, o) {
243
+ var n = {};
244
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
245
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
246
+ for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
247
+ o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
248
+ return n;
249
+ };
250
+ const ze = V((e, o) => {
251
+ var { title: n, titleId: t } = e, r = ln(e, ["title", "titleId"]);
252
+ let s = W();
253
+ return s = n ? t || "title-" + s : void 0, C.createElement(
254
+ "svg",
255
+ Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: o, "aria-labelledby": s }, r),
256
+ n ? C.createElement("title", { id: s }, n) : null,
257
+ C.createElement("path", { fill: "currentColor", d: "M6.53 5.47a.75.75 0 0 0-1.06 1.06L10.94 12l-5.47 5.47a.75.75 0 1 0 1.06 1.06L12 13.06l5.47 5.47a.75.75 0 1 0 1.06-1.06L13.06 12l5.47-5.47a.75.75 0 0 0-1.06-1.06L12 10.94z" })
258
+ );
259
+ }), cn = "_icon_1y3dz_1", dn = "_shape_1y3dz_9", un = "_svg_1y3dz_14", mn = "_image_1y3dz_15", ve = {
260
+ icon: cn,
261
+ shape: dn,
262
+ svg: un,
263
+ image: mn
264
+ }, Pe = (e) => typeof e == "object" && e !== null && ("svgElement" in e || "iconUrl" in e), X = ({
265
+ loading: e,
266
+ altText: o,
267
+ svgElement: n,
268
+ size: t,
269
+ color: r,
270
+ iconUrl: s,
271
+ className: c,
272
+ style: u,
273
+ children: d
274
+ }) => /* @__PURE__ */ a("span", { "data-ui": "icon", "data-size": t, "data-color": r, className: K(ve.icon, c), style: u, children: /* @__PURE__ */ x(Ne, { loading: e, variant: "circle", className: ve.shape, children: [
275
+ /* @__PURE__ */ a("span", { className: ve.shape }),
276
+ n && /* @__PURE__ */ a(n, { "aria-hidden": "true", "alt-label": o, className: ve.svg }),
277
+ s && /* @__PURE__ */ a("img", { src: s, alt: o, className: ve.image }),
278
+ d
279
+ ] }) }), fn = ({ size: e, color: o, label: n, helperText: t, children: r, ...s }) => /* @__PURE__ */ x(Ct, { size: e, color: o, ...s, children: [
280
+ n && /* @__PURE__ */ a(Et, { size: e, children: n }),
281
+ r,
282
+ t && /* @__PURE__ */ a(Xe, { size: "xs", children: t })
283
+ ] }), pn = "_search_18jfe_1", hn = "_searchInput_18jfe_8", Re = {
284
+ search: pn,
285
+ searchInput: hn
286
+ }, at = ({
287
+ style: e,
288
+ index: o,
289
+ name: n,
290
+ value: t,
291
+ placeholder: r = "Search",
292
+ clearButtonAltText: s = "Clear search",
293
+ onChange: c,
294
+ onClear: u,
295
+ onNavigate: d,
296
+ combobox: l = !1,
297
+ listId: f,
298
+ "aria-activedescendant": i,
299
+ onKeyDown: y,
300
+ onInput: b,
301
+ onFocus: _,
302
+ ...N
303
+ }) => /* @__PURE__ */ a("li", { className: Re.search, style: e, "data-index": o, "data-menu-search": "true", children: l ? (
304
+ // biome-ignore lint/a11y/useFocusableInteractive: <explanation>
305
+ // biome-ignore lint/a11y/useAriaPropsForRole: <explanation>
306
+ // biome-ignore lint/a11y/useSemanticElements: <explanation>
307
+ /* @__PURE__ */ a("div", { role: "combobox", "aria-expanded": !0, "aria-haspopup": "listbox", "aria-owns": f, children: /* @__PURE__ */ a(
308
+ De,
309
+ {
310
+ size: "xs",
311
+ className: Re.searchInput,
312
+ name: n,
313
+ value: t,
314
+ placeholder: r,
315
+ onChange: c,
316
+ onClear: u,
317
+ clearButtonAltText: s,
318
+ autoComplete: "off",
319
+ autoCorrect: "off",
320
+ autoCapitalize: "off",
321
+ "aria-autocomplete": "list",
322
+ "aria-controls": f,
323
+ "aria-activedescendant": i,
324
+ autoFocus: !0,
325
+ onKeyDown: (v) => {
326
+ (v.key === "ArrowUp" || v.key === "ArrowDown") && (v.preventDefault(), d?.()), y?.(v);
327
+ },
328
+ onInput: b,
329
+ onFocus: _,
330
+ ...N
331
+ }
332
+ ) })
333
+ ) : /* @__PURE__ */ a(
334
+ De,
335
+ {
336
+ size: "xs",
337
+ className: Re.searchInput,
338
+ name: n,
339
+ value: t,
340
+ placeholder: r,
341
+ onChange: c,
342
+ onClear: u,
343
+ clearButtonAltText: s,
344
+ autoComplete: "off",
345
+ autoCorrect: "off",
346
+ autoCapitalize: "off",
347
+ autoFocus: !0,
348
+ onKeyDown: (v) => {
349
+ (v.key === "ArrowUp" || v.key === "ArrowDown") && (v.preventDefault(), d?.()), y?.(v);
350
+ },
351
+ onInput: b,
352
+ onFocus: _,
353
+ ...N
354
+ }
355
+ ) }), st = ({
356
+ level: e = 0,
357
+ maxLevels: o,
358
+ expanded: n,
359
+ a11yMode: t = "menu",
360
+ open: r,
361
+ scrollToTopOnOpen: s = !1,
362
+ autoActivateFirstItem: c = !0,
363
+ autoFocusList: u = !0,
364
+ announceNoResults: d = !1,
365
+ search: l,
366
+ items: f,
367
+ groups: i = {},
368
+ size: y,
369
+ id: b,
370
+ color: _,
371
+ variant: N,
372
+ scrollRefStyles: v = {},
373
+ keyboardEvents: E = !1,
374
+ onSelect: j = () => {
375
+ },
376
+ onActiveItemIdChange: O
377
+ }) => {
378
+ if (o && e >= o)
379
+ return null;
380
+ const h = t === "combobox", m = h && b ? `${b}-listbox` : b, M = Z(r), S = Z(r), [A, $] = se(!1), R = ce(
381
+ () => f.map((p, P) => ({
382
+ ...p,
383
+ id: p.id || `${b}-item-${P}`
384
+ })),
385
+ [f, b]
386
+ ), D = Z(null), { menu: z, setActiveIndex: g, activeItem: w } = Be({
387
+ items: R,
388
+ groups: i,
389
+ groupByKey: "groupId",
390
+ keyboardEvents: E,
391
+ autoActivateFirstItem: c,
392
+ onSelect: j,
393
+ ref: D
394
+ });
395
+ return Q(() => {
396
+ O?.(w?.id);
397
+ }, [w?.id, O]), Q(() => {
398
+ if (!s) {
399
+ M.current = r;
400
+ return;
401
+ }
402
+ const p = M.current;
403
+ M.current = r, r && !p && D.current?.scrollTo({ top: 0 });
404
+ }, [r, s]), Q(() => {
405
+ const p = S.current;
406
+ S.current = r, !(!E || l || !u) && r && !p && requestAnimationFrame(() => D.current?.focus?.({ preventScroll: !0 }));
407
+ }, [r, E, l]), Q(() => {
408
+ if (h && d) {
409
+ g(0), $(!0);
410
+ return;
411
+ }
412
+ }, [d, h, g]), /* @__PURE__ */ x(
413
+ Ee,
414
+ {
415
+ variant: N,
416
+ expanded: n,
417
+ ref: D,
418
+ style: v,
419
+ id: m,
420
+ role: h ? "listbox" : void 0,
421
+ tabIndex: E ? -1 : void 0,
422
+ children: [
423
+ l && /* @__PURE__ */ a(
424
+ at,
425
+ {
426
+ ...l,
427
+ combobox: h,
428
+ listId: m,
429
+ "aria-activedescendant": h && A ? w?.id : void 0,
430
+ onNavigate: h ? () => $(!0) : void 0,
431
+ onChange: (p) => {
432
+ $(!1), l.onChange?.(p);
433
+ },
434
+ onFocus: (p) => {
435
+ $(!1), l.onFocus?.(p);
436
+ },
437
+ onInput: (p) => {
438
+ $(!1), l.onInput?.(p);
439
+ },
440
+ onKeyDown: (p) => {
441
+ const P = p.key === "ArrowUp" || p.key === "ArrowDown", F = p.key.length === 1 || p.key === "Backspace" || p.key === "Delete";
442
+ h && !P && F && $(!1), l.onKeyDown?.(p);
443
+ }
444
+ }
445
+ ),
446
+ z.map((p, P) => {
447
+ const F = p?.props || {}, { title: T, hidden: G = !1, divider: U = !0 } = F;
448
+ return /* @__PURE__ */ x(vt, { children: [
449
+ (e > 0 || P) && U ? /* @__PURE__ */ a(tt, {}) : "",
450
+ /* @__PURE__ */ a(et, { hidden: G, children: /* @__PURE__ */ x(Ee, { role: "presentation", children: [
451
+ T && /* @__PURE__ */ a(nt, { title: T, level: e }),
452
+ p?.items.filter((ee) => !ee.props?.hidden).map((ee, I) => {
453
+ const { active: k, onMouseEnter: L } = ee, { groupId: te, ...B } = ee.props || {}, { expanded: ae } = B, de = Array.isArray(B?.items) && B.items.length > 0, Ie = B.role === "checkbox" || B.role === "radio", $e = h && !Ie ? "option" : B.role;
454
+ return /* @__PURE__ */ x(
455
+ Ze,
456
+ {
457
+ expanded: ae,
458
+ onMouseLeave: () => g(-1),
459
+ role: h || Ie ? "presentation" : void 0,
460
+ children: [
461
+ /* @__PURE__ */ a(
462
+ ct,
463
+ {
464
+ ...B,
465
+ size: B?.size || F?.size || y,
466
+ color: B?.color || F?.color || _,
467
+ variant: B?.variant || F?.variant || N,
468
+ active: k,
469
+ role: $e,
470
+ selected: B.selected,
471
+ tabIndex: B?.disabled || E ? -1 : B.tabIndex ?? 0,
472
+ onMouseEnter: L,
473
+ "aria-haspopup": de ? "menu" : void 0,
474
+ "aria-expanded": de ? ae : void 0,
475
+ "aria-controls": de ? B.id + "-menu" : void 0
476
+ }
477
+ ),
478
+ ae && B?.items && /* @__PURE__ */ a(
479
+ st,
480
+ {
481
+ id: B.id + "-menu",
482
+ expanded: ae,
483
+ level: e + 1,
484
+ maxLevels: o,
485
+ items: B?.items,
486
+ groups: i,
487
+ size: y,
488
+ color: _,
489
+ variant: N
490
+ }
491
+ )
492
+ ]
493
+ },
494
+ I
495
+ );
496
+ })
497
+ ] }) }, P)
498
+ ] }, P);
499
+ })
500
+ ]
501
+ }
502
+ );
503
+ }, vn = (e) => {
504
+ const o = Z(null), n = Z(null), [t, r] = se(0), {
505
+ search: s,
506
+ items: c,
507
+ groups: u = {},
508
+ size: d,
509
+ color: l,
510
+ variant: f,
511
+ keyboardEvents: i,
512
+ scrollRefStyles: y = {},
513
+ id: b,
514
+ expanded: _,
515
+ a11yMode: N = "menu",
516
+ open: v,
517
+ scrollToTopOnOpen: E = !1,
518
+ autoActivateFirstItem: j = !0,
519
+ announceNoResults: O = !1,
520
+ onActiveItemIdChange: h
521
+ } = e, m = N === "combobox", M = m && b ? `${b}-listbox` : b, S = Z(v), [A, $] = se(!1), R = ce(
522
+ () => c.map((I, k) => ({
523
+ ...I,
524
+ id: I.id || `${b}-item-${k}`
525
+ })),
526
+ [c, b]
527
+ ), { menu: D, activeItem: z, setActiveIndex: g, activeIndex: w } = Be({
528
+ items: R,
529
+ groups: u,
530
+ groupByKey: "groupId",
531
+ keyboardEvents: i,
532
+ autoActivateFirstItem: j,
533
+ ref: o
534
+ }), { flatMenu: p, virtualizer: P, scrollMaxHeight: F } = zt({
535
+ menu: D,
536
+ scrollRef: o
537
+ });
538
+ je(() => {
539
+ const I = n.current;
540
+ if (!I) return;
541
+ const k = Math.round(I.offsetTop);
542
+ r((L) => L === k ? L : k);
543
+ });
544
+ const T = ce(() => {
545
+ const I = z?.id;
546
+ if (I)
547
+ return p.findIndex((L) => L.type === "item" && L.itemProps?.id === I);
548
+ if (w < 0) return -1;
549
+ let k = -1;
550
+ for (let L = 0; L < p.length; L++)
551
+ if (p[L]?.type === "item" && (k += 1, k === w))
552
+ return L;
553
+ return -1;
554
+ }, [z?.id, w, p]), G = Z(null);
555
+ je(() => {
556
+ const I = G?.current, k = typeof I == "number" ? T <= I : !1;
557
+ G.current = T;
558
+ const L = k ? T : T + 2;
559
+ if (!k) {
560
+ const de = P.getOffsetForIndex(L, "auto");
561
+ if (!de) return;
562
+ const [Ie, $e] = de;
563
+ if ($e === "auto") return;
564
+ P.scrollToOffset(Ie + t + 10, { align: "start" });
565
+ return;
566
+ }
567
+ if (T <= 3) {
568
+ P.scrollToOffset(0);
569
+ return;
570
+ }
571
+ const te = P.getOffsetForIndex(T - 1, "auto");
572
+ if (!te) return;
573
+ const [B, ae] = te;
574
+ ae !== "auto" && P.scrollToOffset(B + t + 10, { align: "start" });
575
+ }, [T, t, P, G]);
576
+ const U = ce(() => {
577
+ const I = /* @__PURE__ */ new Map();
578
+ let k = 0;
579
+ return p.forEach((L, te) => {
580
+ L.type === "item" && (k += 1, I.set(te, k));
581
+ }), { positions: I, total: k };
582
+ }, [p]);
583
+ Q(() => {
584
+ h?.(z?.id);
585
+ }, [z?.id, h]), Q(() => {
586
+ if (m && O) {
587
+ g(0), $(!0);
588
+ return;
589
+ }
590
+ }, [O, m, g]), Q(() => {
591
+ if (!E) {
592
+ S.current = v;
593
+ return;
594
+ }
595
+ const I = S.current;
596
+ S.current = v, v && !I && o.current?.scrollTo({ top: 0 });
597
+ }, [v, E]);
598
+ const ee = {
599
+ position: "relative",
600
+ maxHeight: y?.maxHeight || F,
601
+ margin: "-0.5rem",
602
+ padding: "0.5rem",
603
+ minWidth: y?.minWidth ?? "20rem",
604
+ overflowY: "auto",
605
+ ...y
606
+ };
607
+ return /* @__PURE__ */ x(
608
+ Ee,
609
+ {
610
+ ref: o,
611
+ style: ee,
612
+ variant: f,
613
+ color: l,
614
+ expanded: _,
615
+ id: M,
616
+ role: m ? "listbox" : void 0,
617
+ children: [
618
+ s && /* @__PURE__ */ a(
619
+ at,
620
+ {
621
+ ...s,
622
+ combobox: m,
623
+ listId: M,
624
+ "aria-activedescendant": m && A ? z?.id : void 0,
625
+ onNavigate: m ? () => $(!0) : void 0,
626
+ onChange: (I) => {
627
+ $(!1), s.onChange?.(I);
628
+ },
629
+ onFocus: (I) => {
630
+ $(!1), s.onFocus?.(I);
631
+ },
632
+ onInput: (I) => {
633
+ $(!1), s.onInput?.(I);
634
+ },
635
+ onKeyDown: (I) => {
636
+ const k = I.key === "ArrowUp" || I.key === "ArrowDown", L = I.key.length === 1 || I.key === "Backspace" || I.key === "Delete";
637
+ m && !k && L && $(!1), s.onKeyDown?.(I);
638
+ }
639
+ }
640
+ ),
641
+ /* @__PURE__ */ a(
642
+ et,
643
+ {
644
+ ref: n,
645
+ style: {
646
+ position: "relative",
647
+ height: `${P.getTotalSize()}px`,
648
+ width: "100%"
649
+ },
650
+ children: /* @__PURE__ */ a(Ee, { style: { width: "100%", minWidth: "100%" }, children: P.getVirtualItems().map((I) => {
651
+ const k = p[I.index];
652
+ if (!k) return null;
653
+ const L = {
654
+ position: "absolute",
655
+ top: 0,
656
+ left: 0,
657
+ width: "100%",
658
+ transform: `translateY(${I.start}px)`
659
+ }, te = {
660
+ style: L,
661
+ index: I.index,
662
+ "data-index": I.index,
663
+ ref: P.measureElement
664
+ };
665
+ switch (k.type) {
666
+ case "divider":
667
+ return /* @__PURE__ */ a(
668
+ tt,
669
+ {
670
+ ...te,
671
+ style: { ...L, padding: "0.25rem 0" }
672
+ },
673
+ I.key
674
+ );
675
+ case "header":
676
+ return /* @__PURE__ */ a(nt, { ...te, title: k.title || "", level: 1 }, I.key);
677
+ default: {
678
+ const B = k.itemProps?.role === "checkbox" || k.itemProps?.role === "radio", ae = m && !B ? "option" : k.itemProps?.role;
679
+ return /* @__PURE__ */ a(
680
+ Ze,
681
+ {
682
+ ...te,
683
+ role: m || B ? "presentation" : "menuitem",
684
+ children: /* @__PURE__ */ a(
685
+ ct,
686
+ {
687
+ ...k.itemProps || {},
688
+ size: k.itemProps?.size || d,
689
+ color: k.itemProps?.color || l,
690
+ variant: k.itemProps?.variant || f,
691
+ active: k.active,
692
+ role: ae,
693
+ selected: k.itemProps?.selected,
694
+ "aria-posinset": m ? U.positions.get(I.index) : void 0,
695
+ "aria-setsize": m ? U.total : void 0,
696
+ tabIndex: k.itemProps?.disabled || i ? -1 : 0
697
+ }
698
+ )
699
+ },
700
+ I.key
701
+ );
702
+ }
703
+ }
704
+ }) })
705
+ }
706
+ )
707
+ ]
708
+ }
709
+ );
710
+ }, bn = {
711
+ currentId: "",
712
+ previousId: "",
713
+ debug: !1,
714
+ setCurrentId: () => {
715
+ console.warn("setCurrentId called outside of RootProvider context");
716
+ },
717
+ setPreviousId: () => {
718
+ console.warn("setPreviousId called outside of RootProvider context");
719
+ },
720
+ languageCode: "nb"
721
+ }, lt = bt(bn), To = ({ children: e, initialValue: o, debug: n, languageCode: t }) => {
722
+ const [r, s] = se(o?.currentId || ""), [c, u] = se(o?.previousId || "");
723
+ return /* @__PURE__ */ a(
724
+ lt.Provider,
725
+ {
726
+ value: {
727
+ currentId: r,
728
+ setCurrentId: s,
729
+ setPreviousId: u,
730
+ previousId: c,
731
+ debug: n,
732
+ languageCode: t
733
+ },
734
+ children: /* @__PURE__ */ a(kt, { children: e })
735
+ }
736
+ );
737
+ }, gn = () => {
738
+ const e = gt(lt);
739
+ if (!e)
740
+ throw new Error("useRootContext must be used within a RootProvider.");
741
+ const { currentId: o, setCurrentId: n, debug: t, setPreviousId: r, previousId: s, languageCode: c } = e, u = (i) => {
742
+ o && r(o), n(i);
743
+ }, d = (i) => {
744
+ t && console.debug(`useRootContext: toggleId called with value: ${i}`), u(o === i ? "" : i);
745
+ }, l = () => {
746
+ t && console.debug("useRootContext: closeAll called"), u("");
747
+ };
748
+ return yt(l), {
749
+ currentId: o,
750
+ previousId: s,
751
+ toggleId: d,
752
+ closeAll: l,
753
+ openId: (i) => {
754
+ t && console.debug(`useRootContext: openId called with value: ${i}`), u(i);
755
+ },
756
+ languageCode: c
757
+ };
758
+ }, yn = (e) => {
759
+ switch (e) {
760
+ case "nn":
761
+ return {
762
+ placeholder: "Søk ...",
763
+ hits: (o) => `${o} treff`,
764
+ selected: (o) => `${o} valt`,
765
+ noResults: "Ingen treff"
766
+ };
767
+ case "en":
768
+ return {
769
+ placeholder: "Search ...",
770
+ hits: (o) => `${o} hit${o === 1 ? "" : "s"}`,
771
+ selected: (o) => `${o} selected`,
772
+ noResults: "No results"
773
+ };
774
+ default:
775
+ return {
776
+ placeholder: "Søk ...",
777
+ hits: (o) => `${o} treff`,
778
+ selected: (o) => `${o} valgt`,
779
+ noResults: "Ingen treff"
780
+ };
781
+ }
782
+ }, _n = (e) => {
783
+ const o = /* @__PURE__ */ new Set(), n = [];
784
+ for (const t of e) {
785
+ const r = t.id;
786
+ if (!r) {
787
+ n.push(t);
788
+ continue;
789
+ }
790
+ o.has(r) || (o.add(r), n.push(t));
791
+ }
792
+ return n;
793
+ }, wn = ({
794
+ placeholder: e,
795
+ name: o,
796
+ onChange: n,
797
+ onClear: t,
798
+ clearButtonAltText: r,
799
+ items: s = [],
800
+ groups: c = {}
801
+ }) => {
802
+ const { languageCode: u } = gn(), d = H.useMemo(() => yn(u), [u]), [l, f] = H.useState(""), i = H.useCallback(
803
+ (w) => {
804
+ f(w.target.value), n?.(w);
805
+ },
806
+ [n]
807
+ ), y = H.useCallback(() => {
808
+ f(""), t?.();
809
+ }, [t]), b = H.useMemo(() => l.trim().replace(/\s+/g, " "), [l]), _ = b.length > 0, N = H.useMemo(() => b.toLowerCase(), [b]), v = H.useMemo(() => b ? b.split(" ") : [], [b]), E = H.useMemo(
810
+ () => ({
811
+ placeholder: e ?? d.placeholder,
812
+ name: o ?? "search",
813
+ value: l,
814
+ onChange: i,
815
+ onClear: y,
816
+ clearButtonAltText: r
817
+ }),
818
+ [e, d.placeholder, o, l, i, y, r]
819
+ ), j = H.useMemo(
820
+ () => s.map((w) => {
821
+ const p = w?.searchWords?.length ? w.searchWords : [w?.title, w?.description].filter(Boolean);
822
+ return {
823
+ ...w,
824
+ searchWords: p ?? []
825
+ };
826
+ }),
827
+ [s]
828
+ ), O = H.useMemo(
829
+ () => [
830
+ {
831
+ id: "emptySearch",
832
+ "aria-disabled": !0,
833
+ title: d.noResults,
834
+ groupId: "emptySearch",
835
+ icon: $t,
836
+ size: "sm",
837
+ as: "div"
838
+ }
839
+ ],
840
+ [d.noResults]
841
+ ), h = H.useMemo(() => {
842
+ const w = s.filter((p) => p.groupId === "emptySearch").map((p) => ({ ...p, hidden: !1 }));
843
+ return w.length ? w : O;
844
+ }, [s, O]), { selectedItems: m, results: M } = H.useMemo(() => {
845
+ if (!_) return { selectedItems: [], results: [] };
846
+ const w = [], p = [];
847
+ for (const P of j)
848
+ P.checked === !0 && w.push({ ...P, groupId: "selected" }), (P.searchWords ?? []).some((G) => String(G).toLowerCase().includes(N)) && p.push({
849
+ ...P,
850
+ groupId: "search",
851
+ highlightWords: v
852
+ });
853
+ return { selectedItems: w, results: p };
854
+ }, [_, j, N, v]), S = M.length, A = m.length, $ = H.useMemo(
855
+ () => ({
856
+ search: {
857
+ hidden: !0,
858
+ title: d.hits(S)
859
+ },
860
+ selected: {
861
+ hidden: !0,
862
+ title: d.selected(A)
863
+ },
864
+ emptySearch: {
865
+ hidden: !0,
866
+ title: d.noResults
867
+ },
868
+ ...c
869
+ }),
870
+ [d, S, A, c]
871
+ ), R = H.useMemo(
872
+ () => ({
873
+ ...$,
874
+ search: {
875
+ hidden: !_,
876
+ title: d.hits(S)
877
+ },
878
+ selected: {
879
+ hidden: A === 0,
880
+ title: d.selected(A)
881
+ },
882
+ emptySearch: {
883
+ hidden: _ && (S > 0 || A > 0),
884
+ title: d.noResults
885
+ }
886
+ }),
887
+ [$, _, d, S, A]
888
+ ), D = H.useMemo(() => _ ? _n([...M, ...m]) : [], [_, M, m]), z = H.useMemo(() => [...h || [], ...m || []], [h, m]), g = H.useMemo(() => _ ? S ? D : z : s, [_, s, S, D, z]);
889
+ return {
890
+ search: E,
891
+ results: M,
892
+ resultCount: S,
893
+ hasQuery: _,
894
+ items: g,
895
+ groups: R
896
+ };
897
+ }, it = ({
898
+ searchable: e,
899
+ search: o,
900
+ items: n = [],
901
+ groups: t = {},
902
+ variant: r = "default",
903
+ size: s,
904
+ level: c = 0,
905
+ maxLevels: u = 3,
906
+ virtualized: d = !1,
907
+ keyboardEvents: l = !1,
908
+ scrollRefStyles: f = {},
909
+ onActiveItemIdChange: i,
910
+ a11yMode: y = "menu",
911
+ open: b,
912
+ scrollToTopOnOpen: _,
913
+ autoFocusList: N,
914
+ id: v
915
+ }) => {
916
+ const E = wn({ ...o, items: n, groups: t }), j = e ? E.search : o, O = e && E.hasQuery && E.resultCount === 0, h = e ? E.items : n, m = e ? { ...t, ...E.groups } : t, M = y !== "combobox";
917
+ return d ? /* @__PURE__ */ a(
918
+ vn,
919
+ {
920
+ id: v,
921
+ search: j,
922
+ announceNoResults: O,
923
+ items: h,
924
+ groups: m,
925
+ variant: r,
926
+ size: s,
927
+ level: c,
928
+ maxLevels: u,
929
+ keyboardEvents: l,
930
+ scrollRefStyles: f,
931
+ onActiveItemIdChange: i,
932
+ a11yMode: y,
933
+ open: b,
934
+ scrollToTopOnOpen: _,
935
+ autoActivateFirstItem: M,
936
+ autoFocusList: N
937
+ }
938
+ ) : /* @__PURE__ */ a(
939
+ st,
940
+ {
941
+ id: v,
942
+ search: j,
943
+ announceNoResults: O,
944
+ items: h,
945
+ groups: m,
946
+ variant: r,
947
+ size: s,
948
+ level: c,
949
+ maxLevels: u,
950
+ keyboardEvents: l,
951
+ scrollRefStyles: f,
952
+ onActiveItemIdChange: i,
953
+ a11yMode: y,
954
+ open: b,
955
+ scrollToTopOnOpen: _,
956
+ autoActivateFirstItem: M,
957
+ autoFocusList: N
958
+ }
959
+ );
960
+ }, In = "_media_1089b_3", xn = "_icon_1089b_10", On = "_avatar_1089b_14", Nn = "_avatarGroup_1089b_18", le = {
961
+ media: In,
962
+ icon: xn,
963
+ avatar: On,
964
+ avatarGroup: Nn
965
+ };
966
+ function kn(e) {
967
+ return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null || _e(e);
968
+ }
969
+ const Ke = ({ className: e, loading: o, icon: n, children: t }) => {
970
+ if (!n)
971
+ return null;
972
+ if (o)
973
+ return /* @__PURE__ */ a("div", { className: K(le.icon, e), children: /* @__PURE__ */ a(X, { svgElement: ze, loading: !0 }) });
974
+ const r = Ce(n) ? "avatar" : ke(n) ? "avatarGroup" : (Pe(n), "icon");
975
+ return /* @__PURE__ */ x("div", { className: K(le.media, e), "data-variant": r, children: [
976
+ Ce(n) && /* @__PURE__ */ a(Se, { ...n, className: le.avatar }) || ke(n) && /* @__PURE__ */ a(he, { ...n, className: le.avatarGroup }) || Pe(n) && /* @__PURE__ */ a(X, { ...n, className: le.icon }) || kn(n) && /* @__PURE__ */ a(X, { className: le.icon, children: n }) || /* @__PURE__ */ a(X, { className: le.icon, svgElement: n }),
977
+ t
978
+ ] });
979
+ }, Cn = "_heading_1dyne_1", En = {
980
+ heading: Cn
981
+ }, oe = ({
982
+ id: e,
983
+ loading: o,
984
+ highlightWords: n = [],
985
+ as: t = "h2",
986
+ size: r,
987
+ leading: s = "tight",
988
+ weight: c = "medium",
989
+ color: u,
990
+ variant: d,
991
+ maxRows: l,
992
+ className: f,
993
+ style: i,
994
+ children: y
995
+ }) => {
996
+ const b = t, _ = wt(y, n || []);
997
+ return /* @__PURE__ */ a(
998
+ b,
999
+ {
1000
+ id: e,
1001
+ className: K(En.heading, f),
1002
+ style: i,
1003
+ "data-size": r,
1004
+ "data-leading": s,
1005
+ "data-weight": c,
1006
+ "data-color": u,
1007
+ "data-variant": r === "xxs" && "default" || d,
1008
+ "data-max-rows": l,
1009
+ children: /* @__PURE__ */ a(Ne, { loading: o, children: _ })
1010
+ }
1011
+ );
1012
+ }, Pn = "_label_e5q28_3", Sn = {
1013
+ label: Pn
1014
+ }, qe = ({
1015
+ className: e,
1016
+ title: o,
1017
+ titleProps: n = {},
1018
+ description: t,
1019
+ descriptionProps: r = {},
1020
+ highlightWords: s,
1021
+ loading: c,
1022
+ children: u
1023
+ }) => /* @__PURE__ */ a("span", { className: K(Sn.label, e), children: u || /* @__PURE__ */ x(fe, { children: [
1024
+ o && /* @__PURE__ */ a(oe, { ...n, as: "span", loading: c, highlightWords: s, maxRows: 2, children: o }),
1025
+ t && /* @__PURE__ */ a(
1026
+ oe,
1027
+ {
1028
+ ...r,
1029
+ as: "span",
1030
+ weight: "normal",
1031
+ leading: "inherit",
1032
+ loading: c,
1033
+ highlightWords: s,
1034
+ maxRows: 2,
1035
+ children: t
1036
+ }
1037
+ )
1038
+ ] }) }), zn = ({ className: e, onClick: o, checked: n, onChange: t, ...r }) => /* @__PURE__ */ a(pe, { className: e, size: "xs", variant: "ghost", icon: !0, rounded: !0, onClick: o, children: /* @__PURE__ */ a(Je, { ...r, type: "checkbox", size: "xs", checked: n, onChange: t }) }), $n = "_item_h7sxa_3", Rn = "_media_h7sxa_136", jn = "_label_h7sxa_157", Mn = "_title_h7sxa_172", An = "_description_h7sxa_176", Dn = "_count_h7sxa_188", Bn = "_linkIcon_h7sxa_196", q = {
1039
+ item: $n,
1040
+ media: Rn,
1041
+ label: jn,
1042
+ title: Mn,
1043
+ description: An,
1044
+ count: Dn,
1045
+ linkIcon: Bn
1046
+ }, ct = ({
1047
+ id: e,
1048
+ groupId: o,
1049
+ role: n = "menuItem",
1050
+ as: t,
1051
+ href: r,
1052
+ onClick: s,
1053
+ onChange: c,
1054
+ onKeyPress: u,
1055
+ onMouseEnter: d,
1056
+ size: l = "sm",
1057
+ variant: f,
1058
+ color: i,
1059
+ name: y,
1060
+ value: b,
1061
+ checked: _,
1062
+ icon: N,
1063
+ label: v,
1064
+ badge: E,
1065
+ controls: j,
1066
+ title: O,
1067
+ description: h,
1068
+ highlightWords: m,
1069
+ count: M,
1070
+ linkIcon: S = !1,
1071
+ disabled: A,
1072
+ selected: $,
1073
+ active: R,
1074
+ tabIndex: D = 0,
1075
+ className: z,
1076
+ "data-testid": g,
1077
+ ...w
1078
+ }) => {
1079
+ const p = typeof v == "function" ? v() : v, P = St(w);
1080
+ if (n === "checkbox" || n === "radio") {
1081
+ const G = N || (_ ? rt : sn);
1082
+ return /* @__PURE__ */ x(
1083
+ "label",
1084
+ {
1085
+ ...P,
1086
+ className: K(q.item, z),
1087
+ id: e,
1088
+ "data-id": e,
1089
+ "data-group-id": o,
1090
+ "data-size": l,
1091
+ "data-variant": f,
1092
+ "data-color": i,
1093
+ "data-active": R,
1094
+ role: n,
1095
+ "aria-disabled": A,
1096
+ "aria-checked": _,
1097
+ "aria-selected": _,
1098
+ "data-selected": _,
1099
+ "aria-label": O,
1100
+ "data-testid": g,
1101
+ onKeyUp: (U) => {
1102
+ A || (U.key === "Enter" && s?.(), u?.(U));
1103
+ },
1104
+ onClick: s,
1105
+ onMouseEnter: d,
1106
+ tabIndex: D,
1107
+ children: [
1108
+ /* @__PURE__ */ a(
1109
+ "input",
1110
+ {
1111
+ name: y,
1112
+ value: b,
1113
+ type: n,
1114
+ checked: !!_,
1115
+ onChange: c,
1116
+ readOnly: !c,
1117
+ style: { opacity: 0, position: "absolute" },
1118
+ tabIndex: -1
1119
+ }
1120
+ ),
1121
+ /* @__PURE__ */ a(Ke, { icon: G, className: q.media }),
1122
+ /* @__PURE__ */ a(
1123
+ qe,
1124
+ {
1125
+ className: q.label,
1126
+ highlightWords: m,
1127
+ title: /* @__PURE__ */ x(fe, { children: [
1128
+ O,
1129
+ " ",
1130
+ M && /* @__PURE__ */ a("i", { className: q.count, children: M })
1131
+ ] }),
1132
+ titleProps: {
1133
+ weight: "medium",
1134
+ className: q.title
1135
+ },
1136
+ description: h,
1137
+ descriptionProps: {
1138
+ weight: "normal",
1139
+ variant: "subtle",
1140
+ className: q.description
1141
+ },
1142
+ children: p
1143
+ }
1144
+ ),
1145
+ /* @__PURE__ */ x(Ae, { children: [
1146
+ E && /* @__PURE__ */ a(ye, { ...E }),
1147
+ !A && j
1148
+ ] })
1149
+ ]
1150
+ }
1151
+ );
1152
+ }
1153
+ const F = t || (r ? "a" : "button"), T = S && ot;
1154
+ return /* @__PURE__ */ x(
1155
+ F,
1156
+ {
1157
+ href: r,
1158
+ className: K(q.item, z),
1159
+ id: e,
1160
+ "data-id": e,
1161
+ "data-group-id": o,
1162
+ "data-size": l,
1163
+ "data-variant": f,
1164
+ "data-color": i,
1165
+ "data-active": R,
1166
+ "aria-disabled": A,
1167
+ ...A ? { disabled: A } : {},
1168
+ "aria-selected": $,
1169
+ "data-selected": $,
1170
+ "aria-label": O,
1171
+ "data-testid": g,
1172
+ onKeyUp: (G) => {
1173
+ A || (G.key === "Enter" && s?.(), u?.(G));
1174
+ },
1175
+ onClick: s,
1176
+ onMouseEnter: d,
1177
+ tabIndex: A ? -1 : D ?? 0,
1178
+ role: n === "menuItem" ? "menuitem" : n,
1179
+ ...P,
1180
+ children: [
1181
+ N && /* @__PURE__ */ a(Ke, { icon: N, className: q.media }),
1182
+ /* @__PURE__ */ a(
1183
+ qe,
1184
+ {
1185
+ className: q.label,
1186
+ highlightWords: m,
1187
+ title: /* @__PURE__ */ x(fe, { children: [
1188
+ O,
1189
+ " ",
1190
+ M && /* @__PURE__ */ a("i", { className: q.count, children: M })
1191
+ ] }),
1192
+ titleProps: {
1193
+ weight: "medium",
1194
+ className: q.title
1195
+ },
1196
+ description: h,
1197
+ descriptionProps: {
1198
+ variant: "subtle",
1199
+ className: q.description
1200
+ },
1201
+ children: p
1202
+ }
1203
+ ),
1204
+ /* @__PURE__ */ x(Ae, { children: [
1205
+ E && /* @__PURE__ */ a(ye, { ...E }),
1206
+ !A && j,
1207
+ S && /* @__PURE__ */ a(X, { svgElement: T, className: q.linkIcon })
1208
+ ] })
1209
+ ]
1210
+ }
1211
+ );
1212
+ }, Ln = "_fieldContainer_zxswz_1", Fn = "_field_zxswz_1", Tn = "_input_zxswz_16", Gn = "_hiddenInput_zxswz_17", Hn = "_icon_zxswz_50", Kn = "_clear_zxswz_68", qn = "_clearButton_zxswz_81", Un = "_autocomplete_zxswz_108", ne = {
1213
+ fieldContainer: Ln,
1214
+ field: Fn,
1215
+ input: Tn,
1216
+ hiddenInput: Gn,
1217
+ icon: Hn,
1218
+ clear: Kn,
1219
+ clearButton: qn,
1220
+ autocomplete: Un
1221
+ }, De = ({
1222
+ className: e,
1223
+ collapsible: o,
1224
+ loading: n,
1225
+ loadingLabel: t = "Loading ...",
1226
+ size: r,
1227
+ color: s = "neutral",
1228
+ label: c,
1229
+ value: u,
1230
+ onClear: d,
1231
+ clearButtonAltText: l = "Clear search",
1232
+ menu: f,
1233
+ minLength: i,
1234
+ ...y
1235
+ }) => {
1236
+ const b = Oe(), [_, N] = se(!1), v = y.id || `search-field-${b}`, E = `${v}-listbox`, [j, O] = se(void 0), h = "searchfield-clear-button-" + Oe(), m = ce(() => !f || !u || typeof i == "number" && typeof u == "string" && u.length < i ? !1 : _, [f, _, i, u]), M = ce(() => (f?.items ?? []).map((g) => ({
1237
+ ...g,
1238
+ onClick: () => {
1239
+ g.onClick?.(), N(!1);
1240
+ }
1241
+ })), [f]), S = (g) => {
1242
+ if (g.key === "Enter" && m) {
1243
+ f?.items?.[0]?.onClick?.(), N(!1);
1244
+ return;
1245
+ }
1246
+ if (g.key === "Escape" && m) {
1247
+ g.preventDefault(), g.stopPropagation(), N(!1), f?.onClose(), document.getElementById(v)?.focus();
1248
+ return;
1249
+ }
1250
+ y.onKeyDown?.(g), N(!0);
1251
+ }, A = () => {
1252
+ N(!0);
1253
+ }, $ = (g) => {
1254
+ if (!_) return;
1255
+ const w = g.relatedTarget;
1256
+ w && g.currentTarget.contains(w) || N(!1);
1257
+ }, R = (g) => {
1258
+ g.preventDefault();
1259
+ }, D = (g) => {
1260
+ g.relatedTarget?.id === h && O(void 0), y.onBlur?.(g);
1261
+ }, z = /* @__PURE__ */ x(
1262
+ fn,
1263
+ {
1264
+ size: r,
1265
+ color: s,
1266
+ label: c,
1267
+ className: K(ne.field, e),
1268
+ "data-collapsible": o,
1269
+ onBlurCapture: $,
1270
+ children: [
1271
+ /* @__PURE__ */ a("span", { className: ne.hiddenInput, "aria-hidden": "true", children: u + " " }),
1272
+ /* @__PURE__ */ a(
1273
+ Je,
1274
+ {
1275
+ ...y,
1276
+ id: v,
1277
+ inputSize: 5,
1278
+ type: "search",
1279
+ value: u,
1280
+ className: ne.input,
1281
+ "data-collapsible": o,
1282
+ autoCapitalize: "off",
1283
+ autoComplete: "off",
1284
+ minLength: i,
1285
+ onKeyDown: S,
1286
+ onBlur: D,
1287
+ ...f && {
1288
+ role: "combobox",
1289
+ "aria-autocomplete": "list",
1290
+ "aria-expanded": !!m,
1291
+ "aria-haspopup": "listbox",
1292
+ "aria-controls": E,
1293
+ "aria-activedescendant": m ? j : void 0,
1294
+ onFocus: A
1295
+ }
1296
+ }
1297
+ ),
1298
+ n ? /* @__PURE__ */ a(Pt, { "aria-hidden": !0, className: ne.icon }) : /* @__PURE__ */ a(on, { "aria-hidden": !0, className: ne.icon }),
1299
+ d && !!u && /* @__PURE__ */ a("span", { className: ne.clear, children: /* @__PURE__ */ a(
1300
+ pe,
1301
+ {
1302
+ id: h,
1303
+ "data-testid": "clear-button",
1304
+ size: "xs",
1305
+ rounded: !0,
1306
+ icon: !0,
1307
+ variant: "tinted",
1308
+ className: ne.clearButton,
1309
+ onClick: () => {
1310
+ d?.(), document.getElementById(v)?.focus();
1311
+ },
1312
+ "aria-label": l,
1313
+ "data-action": "clear-input",
1314
+ children: /* @__PURE__ */ a(ze, {})
1315
+ }
1316
+ ) })
1317
+ ]
1318
+ }
1319
+ );
1320
+ return f ? /* @__PURE__ */ x("div", { className: ne.fieldContainer, children: [
1321
+ z,
1322
+ m && /* @__PURE__ */ a("div", { className: ne.autocomplete, "aria-hidden": !m, onMouseDown: R, children: /* @__PURE__ */ a(
1323
+ it,
1324
+ {
1325
+ ...f,
1326
+ id: E,
1327
+ items: M,
1328
+ groups: f?.groups,
1329
+ keyboardEvents: !0,
1330
+ a11yMode: "combobox",
1331
+ open: m,
1332
+ autoFocusList: !1,
1333
+ onActiveItemIdChange: O
1334
+ }
1335
+ ) })
1336
+ ] }) : z;
1337
+ }, Vn = "_byline_fzp7k_1", Wn = "_avatar_fzp7k_7", Yn = "_avatarGroup_fzp7k_12", Qn = "_label_fzp7k_26", be = {
1338
+ byline: Vn,
1339
+ avatar: Wn,
1340
+ avatarGroup: Yn,
1341
+ label: Qn
1342
+ }, Xn = ({
1343
+ loading: e,
1344
+ color: o = "neutral",
1345
+ size: n = "xs",
1346
+ avatar: t,
1347
+ avatarGroup: r,
1348
+ datetime: s,
1349
+ children: c,
1350
+ as: u,
1351
+ ...d
1352
+ }) => {
1353
+ const l = u || "div", f = s ? "time" : "span";
1354
+ return /* @__PURE__ */ x(l, { ...d, className: be.byline, "data-color": o, "data-size": n, children: [
1355
+ (r || t) && /* @__PURE__ */ a(Ne, { variant: "circle", className: be.avatar, loading: e, children: r ? /* @__PURE__ */ a(he, { ...r, size: n, className: be.avatarGroup }) : t && /* @__PURE__ */ a(Se, { ...t, size: n, className: be.avatar }) }),
1356
+ /* @__PURE__ */ a(f, { "data-size": n, dateTime: s, className: be.label, children: /* @__PURE__ */ a(Ne, { loading: e, children: c }) })
1357
+ ] });
1358
+ }, Jn = "_dropdown_1mtdm_1", Zn = "_content_1mtdm_17", er = "_backdrop_1mtdm_47", tr = "_header_1mtdm_76", nr = "_footer_1mtdm_77", rr = "_title_1mtdm_148", ue = {
1359
+ dropdown: Jn,
1360
+ content: Zn,
1361
+ backdrop: er,
1362
+ header: tr,
1363
+ footer: nr,
1364
+ title: rr
1365
+ }, or = "data-focus-guard", dt = (e) => {
1366
+ const o = [
1367
+ "a[href]",
1368
+ "button:not([disabled])",
1369
+ "input:not([disabled])",
1370
+ "select:not([disabled])",
1371
+ "textarea:not([disabled])",
1372
+ '[tabindex]:not([tabindex="-1"])',
1373
+ '[contenteditable="true"]'
1374
+ ].join(",");
1375
+ return Array.from(e.querySelectorAll(o)).filter((n) => !n.hasAttribute(or)).filter((n) => !n.hasAttribute("disabled")).filter((n) => n.getAttribute("aria-hidden") !== "true").filter((n) => n.tabIndex !== -1).filter((n) => {
1376
+ const t = n.getClientRects();
1377
+ return t.length > 0 && t[0].width > 0 && t[0].height > 0;
1378
+ });
1379
+ }, ar = (e) => {
1380
+ dt(e)[0]?.focus({ preventScroll: !0 });
1381
+ }, sr = ({
1382
+ id: e = "dropdown",
1383
+ size: o = "sm",
1384
+ className: n,
1385
+ backdrop: t = !0,
1386
+ placement: r = "bottom-left",
1387
+ variant: s = "dropdown",
1388
+ title: c = "Title",
1389
+ closeLabel: u = "Close",
1390
+ submitLabel: d,
1391
+ trigger: l,
1392
+ children: f,
1393
+ open: i,
1394
+ onClose: y,
1395
+ color: b,
1396
+ onSubmit: _,
1397
+ activeDescendantId: N,
1398
+ useFixedPosition: v = !1,
1399
+ expanded: E = !1
1400
+ }) => {
1401
+ const j = Z(null), O = Z(null), h = Z(i);
1402
+ Q(() => {
1403
+ h.current = i;
1404
+ }, [i]);
1405
+ const [m, M] = se({
1406
+ yDir: r.includes("top") ? "top" : "bottom",
1407
+ xDir: r.includes("right") ? "right" : "left",
1408
+ maxHeight: 300
1409
+ }), S = Qe(() => {
1410
+ if (i && j.current && O.current) {
1411
+ const R = j.current.getBoundingClientRect(), D = O.current.getBoundingClientRect(), z = window.innerHeight, g = window.innerWidth, w = 16, p = z - R.bottom, P = R.top, F = g - R.right - D.width, T = p < 250 && P > p, G = T ? "top" : "bottom", U = (T ? P : p) - w, I = F < w ? "right" : "left";
1412
+ M((k) => ({
1413
+ ...k,
1414
+ yDir: G,
1415
+ maxHeight: U,
1416
+ xDir: I,
1417
+ triggerRect: v ? R : void 0
1418
+ }));
1419
+ }
1420
+ }, [i, v]);
1421
+ je(() => (S(), window.addEventListener("resize", S), v && window.addEventListener("scroll", S, !0), () => {
1422
+ window.removeEventListener("resize", S), v && window.removeEventListener("scroll", S, !0);
1423
+ }), [S, v]), Q(() => {
1424
+ if (!i) return;
1425
+ const R = requestAnimationFrame(() => {
1426
+ const D = O.current;
1427
+ if (!D) return;
1428
+ const z = D.querySelector(
1429
+ 'input[type="search"]:not([disabled]), input[role="searchbox"]:not([disabled]), input[data-dropdown-search]:not([disabled])'
1430
+ );
1431
+ if (z) {
1432
+ const g = z.value.length;
1433
+ z.focus({ preventScroll: !0 });
1434
+ try {
1435
+ z.setSelectionRange(g, g);
1436
+ } catch {
1437
+ }
1438
+ return;
1439
+ }
1440
+ D.focus?.({ preventScroll: !0 });
1441
+ });
1442
+ return () => cancelAnimationFrame(R);
1443
+ }, [i]), Q(() => {
1444
+ const R = (z) => {
1445
+ z.key === "Escape" && y();
1446
+ }, D = (z) => {
1447
+ const g = z.target, w = j.current?.contains(g), p = O.current?.contains(g);
1448
+ !w && !p && y();
1449
+ };
1450
+ return i && (document.addEventListener("mousedown", D), document.addEventListener("keydown", R)), () => {
1451
+ document.removeEventListener("mousedown", D), document.removeEventListener("keydown", R);
1452
+ };
1453
+ }, [i, y]), Q(() => {
1454
+ if (!i) return;
1455
+ const R = O.current;
1456
+ if (!R) return;
1457
+ const D = (g) => {
1458
+ if (!h.current)
1459
+ return;
1460
+ const w = g.target;
1461
+ w && !R.contains(w) && ar(R);
1462
+ }, z = (g) => {
1463
+ if (g.key !== "Tab") return;
1464
+ const w = dt(R);
1465
+ if (w.length === 0) {
1466
+ g.preventDefault(), R.focus?.({ preventScroll: !0 });
1467
+ return;
1468
+ }
1469
+ const p = w[0], P = w[w.length - 1], F = document.activeElement;
1470
+ g.shiftKey ? F === p && (g.preventDefault(), P.focus({ preventScroll: !0 })) : F === P && (g.preventDefault(), p.focus({ preventScroll: !0 }));
1471
+ };
1472
+ return document.addEventListener("focusin", D), document.addEventListener("keydown", z), () => {
1473
+ document.removeEventListener("focusin", D), document.removeEventListener("keydown", z);
1474
+ };
1475
+ }, [i]);
1476
+ const A = v && m.triggerRect ? {
1477
+ position: "fixed",
1478
+ zIndex: 1e3,
1479
+ width: "max-content",
1480
+ maxHeight: `${m.maxHeight}px`,
1481
+ overflowY: "auto",
1482
+ [m.xDir === "left" ? "left" : "right"]: m.xDir === "left" ? m.triggerRect.left : window.innerWidth - m.triggerRect.right,
1483
+ [m.yDir === "bottom" ? "top" : "bottom"]: m.yDir === "bottom" ? m.triggerRect.bottom + 8 : window.innerHeight - m.triggerRect.top + 8
1484
+ } : {
1485
+ position: "absolute",
1486
+ zIndex: 50,
1487
+ width: "max-content",
1488
+ maxHeight: `${m.maxHeight}px`,
1489
+ overflowY: "auto",
1490
+ [m.xDir]: 0,
1491
+ [m.yDir === "bottom" ? "top" : "bottom"]: "100%"
1492
+ }, $ = /* @__PURE__ */ x(
1493
+ "div",
1494
+ {
1495
+ ref: O,
1496
+ className: K(ue.dropdown, n),
1497
+ style: A,
1498
+ "aria-hidden": !i,
1499
+ "data-variant": s,
1500
+ "data-color": b,
1501
+ "data-expanded": E,
1502
+ "data-size": o,
1503
+ tabIndex: -1,
1504
+ role: "menu",
1505
+ "aria-modal": s === "drawer-dropdown" ? !0 : void 0,
1506
+ "aria-activedescendant": N,
1507
+ children: [
1508
+ /* @__PURE__ */ x("header", { className: ue.header, children: [
1509
+ /* @__PURE__ */ a("h2", { className: ue.title, children: c }),
1510
+ /* @__PURE__ */ a(pe, { size: "sm", variant: "outline", onClick: y, "aria-label": u, children: /* @__PURE__ */ a(ze, {}) })
1511
+ ] }),
1512
+ /* @__PURE__ */ a("div", { className: ue.content, children: f }),
1513
+ d && /* @__PURE__ */ a("footer", { className: ue.footer, children: /* @__PURE__ */ a(pe, { size: "lg", variant: "solid", onClick: _ || y, rounded: !0, children: /* @__PURE__ */ a("span", { "data-size": "md", children: d }) }) })
1514
+ ]
1515
+ }
1516
+ );
1517
+ return /* @__PURE__ */ x(fe, { children: [
1518
+ t && /* @__PURE__ */ a("div", { className: ue.backdrop, "aria-hidden": !i }),
1519
+ /* @__PURE__ */ x("div", { id: e + "-root", ref: j, style: { position: "relative", display: "inline-block" }, children: [
1520
+ l,
1521
+ v ? _t($, document.body) : $
1522
+ ] })
1523
+ ] });
1524
+ }, lr = we(({ items: e, groups: o = {}, sortGroupBy: n, highlightWords: t, isLoading: r }) => {
1525
+ const { menu: s } = Be({
1526
+ items: e,
1527
+ groups: o,
1528
+ groupByKey: "groupId",
1529
+ keyboardEvents: !1,
1530
+ sortGroupBy: n
1531
+ });
1532
+ return /* @__PURE__ */ a(ht, { spacing: 6, "aria-busy": r, children: s?.map((c, u) => {
1533
+ const d = c.props || {};
1534
+ return /* @__PURE__ */ Me(ut, { ...d, key: "dialog-list-item" + u }, c?.items.map((l, f) => {
1535
+ const i = l.props || {};
1536
+ return /* @__PURE__ */ Me(mt, { ...i, highlightWords: t, key: "dialog-list-item" + f });
1537
+ }));
1538
+ }) });
1539
+ });
1540
+ lr.displayName = "DialogList";
1541
+ const ut = we(({ title: e, description: o, children: n }) => /* @__PURE__ */ x(ht, { spacing: 4, children: [
1542
+ /* @__PURE__ */ x(Te, { direction: "col", spacing: 2, children: [
1543
+ e && /* @__PURE__ */ a(oe, { size: "lg", children: e }),
1544
+ o && /* @__PURE__ */ a(Xe, { size: "sm", style: { marginBottom: ".5em" }, children: o })
1545
+ ] }),
1546
+ /* @__PURE__ */ a(Vr, { spacing: 3, children: n })
1547
+ ] }));
1548
+ ut.displayName = "DialogListGroup";
1549
+ const ir = "_item_1uioh_3", cr = "_border_1uioh_68", dr = "_header_1uioh_79", ur = "_summary_1uioh_95", mr = "_controls_1uioh_109", fr = "_footer_1uioh_116", pr = "_seenBy_1uioh_121", hr = "_link_1uioh_131", vr = "_title_1uioh_136", br = "_badge_1uioh_150", Y = {
1550
+ item: ir,
1551
+ border: cr,
1552
+ header: dr,
1553
+ summary: ur,
1554
+ controls: mr,
1555
+ footer: fr,
1556
+ seenBy: pr,
1557
+ link: hr,
1558
+ title: vr,
1559
+ badge: br
1560
+ }, mt = we(
1561
+ ({
1562
+ as: e = "a",
1563
+ size: o = "xl",
1564
+ variant: n = "default",
1565
+ color: t,
1566
+ loading: r,
1567
+ controls: s,
1568
+ selectable: c,
1569
+ selected: u,
1570
+ status: d,
1571
+ extendedStatusLabel: l,
1572
+ sender: f,
1573
+ recipient: i,
1574
+ recipientLabel: y = "to",
1575
+ grouped: b = !1,
1576
+ updatedAt: _,
1577
+ updatedAtLabel: N,
1578
+ archived: v,
1579
+ archivedAt: E,
1580
+ archivedAtLabel: j,
1581
+ trashed: O,
1582
+ trashedAt: h,
1583
+ trashedAtLabel: m,
1584
+ badge: M,
1585
+ dueAt: S,
1586
+ dueAtLabel: A,
1587
+ unread: $,
1588
+ seenByLog: R,
1589
+ draftsLabel: D,
1590
+ sentCount: z,
1591
+ receivedCount: g,
1592
+ attachmentsCount: w,
1593
+ attachmentsLabel: p,
1594
+ tooltips: P = {},
1595
+ title: F,
1596
+ description: T,
1597
+ summary: G,
1598
+ highlightWords: U,
1599
+ id: ee,
1600
+ ...I
1601
+ }) => {
1602
+ const k = c ? "select" : n;
1603
+ return /* @__PURE__ */ x(
1604
+ It,
1605
+ {
1606
+ as: "li",
1607
+ id: ee,
1608
+ className: Y.item,
1609
+ size: o,
1610
+ color: t,
1611
+ variant: k,
1612
+ "data-unread": $ ? "true" : "false",
1613
+ "data-selected": u,
1614
+ "data-trashed": O,
1615
+ "data-archived": v,
1616
+ "data-loading": r,
1617
+ children: [
1618
+ /* @__PURE__ */ a(xt, { ...I, className: Y.link, as: e, children: /* @__PURE__ */ x("div", { className: Y.border, children: [
1619
+ /* @__PURE__ */ x("header", { className: Y.header, children: [
1620
+ /* @__PURE__ */ x(
1621
+ oe,
1622
+ {
1623
+ as: "h2",
1624
+ highlightWords: U,
1625
+ weight: $ ? "bold" : "normal",
1626
+ loading: r,
1627
+ maxRows: 2,
1628
+ className: Y.title,
1629
+ children: [
1630
+ F,
1631
+ M && /* @__PURE__ */ a(ye, { className: Y.badge, variant: "tinted", size: "xs", ...M })
1632
+ ]
1633
+ }
1634
+ ),
1635
+ /* @__PURE__ */ a(
1636
+ yr,
1637
+ {
1638
+ size: "xs",
1639
+ loading: r,
1640
+ sender: f,
1641
+ recipient: i,
1642
+ recipientLabel: y,
1643
+ grouped: b
1644
+ }
1645
+ ),
1646
+ G && /* @__PURE__ */ a(
1647
+ oe,
1648
+ {
1649
+ as: "h3",
1650
+ highlightWords: U,
1651
+ weight: "normal",
1652
+ className: Y.summary,
1653
+ loading: r,
1654
+ maxRows: 2,
1655
+ children: G
1656
+ }
1657
+ )
1658
+ ] }),
1659
+ /* @__PURE__ */ a(
1660
+ gr,
1661
+ {
1662
+ className: Y.footer,
1663
+ loading: r,
1664
+ status: d,
1665
+ extendedStatusLabel: l,
1666
+ draftsLabel: D,
1667
+ sentCount: z,
1668
+ receivedCount: g,
1669
+ updatedAt: _,
1670
+ updatedAtLabel: N,
1671
+ archivedAt: E,
1672
+ archivedAtLabel: j,
1673
+ trashedAt: h,
1674
+ trashedAtLabel: m,
1675
+ dueAt: S,
1676
+ dueAtLabel: A,
1677
+ attachmentsCount: w,
1678
+ attachmentsLabel: p,
1679
+ tooltips: P
1680
+ }
1681
+ ),
1682
+ R && P?.seenBy ? /* @__PURE__ */ a(Ot, { placement: "bottom", content: P?.seenBy, children: /* @__PURE__ */ a("span", { className: Y.seenBy, children: /* @__PURE__ */ a(he, { items: R.items }) }) }) : R && /* @__PURE__ */ a(he, { items: R.items, className: Y.seenBy })
1683
+ ] }) }),
1684
+ /* @__PURE__ */ a(Ae, { className: Y.controls, children: s })
1685
+ ]
1686
+ }
1687
+ );
1688
+ }
1689
+ );
1690
+ mt.displayName = "DialogListItem";
1691
+ const gr = ({
1692
+ className: e,
1693
+ loading: o,
1694
+ status: n,
1695
+ sender: t,
1696
+ updatedAt: r,
1697
+ updatedAtLabel: s,
1698
+ dueAt: c,
1699
+ dueAtLabel: u,
1700
+ archivedAt: d,
1701
+ archivedAtLabel: l,
1702
+ trashedAt: f,
1703
+ trashedAtLabel: i,
1704
+ draftsLabel: y,
1705
+ sentCount: b = 0,
1706
+ receivedCount: _ = 0,
1707
+ attachmentsCount: N = 0,
1708
+ attachmentsLabel: v,
1709
+ transmissionsLabel: E,
1710
+ activityLog: j,
1711
+ extendedStatusLabel: O,
1712
+ tooltips: h = {}
1713
+ }) => /* @__PURE__ */ x(Nt, { className: e, size: "xs", children: [
1714
+ n && /* @__PURE__ */ a(Nr, { tooltip: h.status, loading: o, size: "xs", ...n }),
1715
+ O && /* @__PURE__ */ a(J, { tooltip: h.extendedStatus, size: "xs", variant: "outline", children: O }),
1716
+ y && /* @__PURE__ */ a(J, { tooltip: h.drafts, size: "xs", variant: "dotted", children: y }),
1717
+ b > 0 && /* @__PURE__ */ a(J, { tooltip: h.sent, size: "xs", variant: "outline", icon: rt, children: b }),
1718
+ _ > 0 && /* @__PURE__ */ a(J, { tooltip: h.received, size: "xs", variant: "outline", icon: Ht, children: _ }),
1719
+ r && /* @__PURE__ */ x(xe, { tooltip: h.updatedAt, loading: o, datetime: r, size: "xs", children: [
1720
+ /* @__PURE__ */ a("strong", { children: t && t.name + ", " }),
1721
+ s
1722
+ ] }),
1723
+ c && u && /* @__PURE__ */ a(xe, { tooltip: h.dueAt, loading: o, datetime: c, size: "xs", icon: Rt, children: u }),
1724
+ N > 0 && /* @__PURE__ */ a(J, { tooltip: h.attachments, loading: o, size: "xs", icon: jt, children: v || N }),
1725
+ E && /* @__PURE__ */ a(J, { tooltip: h.transmissions, loading: o, size: "xs", icon: en, children: E }),
1726
+ f && i && /* @__PURE__ */ a(xe, { tooltip: h.trashedAt, loading: o, datetime: f, size: "xs", icon: Mt, children: i }) || d && l && /* @__PURE__ */ a(
1727
+ xe,
1728
+ {
1729
+ tooltip: h.archivedAt,
1730
+ loading: o,
1731
+ datetime: d,
1732
+ size: "xs",
1733
+ icon: At,
1734
+ children: l
1735
+ }
1736
+ ),
1737
+ j && /* @__PURE__ */ a(
1738
+ J,
1739
+ {
1740
+ tooltip: h.activityLog,
1741
+ loading: o,
1742
+ size: "xs",
1743
+ icon: Jt,
1744
+ as: j?.onClick ? "button" : "span",
1745
+ onClick: j?.onClick,
1746
+ children: j?.label || "Activity log"
1747
+ }
1748
+ )
1749
+ ] }), yr = ({
1750
+ sender: e,
1751
+ recipient: o,
1752
+ recipientLabel: n = "to",
1753
+ grouped: t = !1,
1754
+ loading: r,
1755
+ size: s = "xs"
1756
+ }) => !e && !o ? null : /* @__PURE__ */ x(Xn, { loading: r, size: s, avatar: e, avatarGroup: !r && t && e && o ? {
1757
+ items: [o, e]
1758
+ } : void 0, children: [
1759
+ /* @__PURE__ */ a("strong", { children: e?.name }),
1760
+ " ",
1761
+ o && n + " " + o?.name
1762
+ ] }), _r = "_media_1x8z9_1", wr = "_icon_1x8z9_10", Ir = "_avatarGroup_1x8z9_17", me = {
1763
+ media: _r,
1764
+ icon: wr,
1765
+ avatarGroup: Ir
1766
+ };
1767
+ function xr(e) {
1768
+ return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null || _e(e);
1769
+ }
1770
+ const Ge = ({ size: e = "xs", icon: o, progress: n }) => !o && typeof n != "number" ? !1 : /* @__PURE__ */ x("span", { className: me.media, "data-size": e, children: [
1771
+ Ce(o) && /* @__PURE__ */ a(Se, { ...o, className: me.avatar }) || ke(o) && /* @__PURE__ */ a(he, { ...o, className: me.avatarGroup }) || Pe(o) && /* @__PURE__ */ a(X, { ...o, className: me.icon }) || xr(o) && o || /* @__PURE__ */ a(X, { svgElement: o, className: me.icon }),
1772
+ n && /* @__PURE__ */ a(Bt, { value: n, className: me.icon })
1773
+ ] }), J = ({
1774
+ loading: e,
1775
+ reverse: o,
1776
+ size: n = "xs",
1777
+ variant: t = "text",
1778
+ icon: r,
1779
+ children: s,
1780
+ tooltip: c,
1781
+ ...u
1782
+ }) => /* @__PURE__ */ x(Le, { loading: e, reverse: o, variant: t, tooltip: c, size: n, ...u, children: [
1783
+ !e && r && /* @__PURE__ */ a(Ge, { icon: r }),
1784
+ /* @__PURE__ */ a(Fe, { variant: t, size: n, children: s })
1785
+ ] }), Ue = ({ size: e = "xs", variant: o = "text", progress: n = 0, tooltip: t, children: r }) => /* @__PURE__ */ x(Le, { variant: o, size: e, tooltip: t, children: [
1786
+ /* @__PURE__ */ a(Ge, { size: e, progress: n }),
1787
+ /* @__PURE__ */ a(Fe, { variant: o, size: e, children: r })
1788
+ ] }), xe = ({
1789
+ loading: e,
1790
+ size: o = "xs",
1791
+ variant: n = "text",
1792
+ datetime: t,
1793
+ icon: r,
1794
+ tooltip: s,
1795
+ children: c
1796
+ }) => /* @__PURE__ */ x(Le, { tooltip: s, loading: e, as: "time", variant: n, datetime: t, size: o, children: [
1797
+ !e && r && /* @__PURE__ */ a(Ge, { size: o, icon: r }),
1798
+ /* @__PURE__ */ a(Fe, { variant: n, size: o, children: c })
1799
+ ] });
1800
+ var Or = /* @__PURE__ */ ((e) => (e["not-applicable"] = "NOT_APPLICABLE", e.draft = "DRAFT", e.awaiting = "AWAITING", e.completed = "COMPLETED", e["in-progress"] = "IN_PROGRESS", e["requires-attention"] = "REQUIRES_ATTENTION", e))(Or || {});
1801
+ const Nr = ({ loading: e, size: o = "xs", value: n = "not-applicable", label: t, tooltip: r }) => {
1802
+ if (e)
1803
+ return null;
1804
+ switch (n) {
1805
+ case "draft":
1806
+ return /* @__PURE__ */ a(J, { tooltip: r, size: o, variant: "dotted", children: t || n });
1807
+ case "requires-attention":
1808
+ return /* @__PURE__ */ a(J, { tooltip: r, variant: "solid", children: t || n });
1809
+ case "awaiting":
1810
+ return /* @__PURE__ */ a(J, { tooltip: r, size: o, variant: "outline", icon: nn, children: t || n });
1811
+ case "in-progress":
1812
+ return /* @__PURE__ */ a(Ue, { tooltip: r, size: o, variant: "outline", progress: 75, children: t || n });
1813
+ case "completed":
1814
+ return /* @__PURE__ */ a(Ue, { tooltip: r, size: o, variant: "outline", progress: 100, children: t || n });
1815
+ default:
1816
+ return null;
1817
+ }
1818
+ }, kr = "_header_29hv7_1", Cr = "_label_29hv7_27", Er = "_link_29hv7_43", Pr = "_badge_29hv7_47", Sr = "_linkIcon_29hv7_51", zr = "_linkFocus_29hv7_61", $r = "_controls_29hv7_69", re = {
1819
+ header: kr,
1820
+ label: Cr,
1821
+ link: Er,
1822
+ badge: Pr,
1823
+ linkIcon: Sr,
1824
+ linkFocus: zr,
1825
+ controls: $r
1826
+ }, Rr = ({
1827
+ as: e,
1828
+ highlightWords: o,
1829
+ interactive: n = !0,
1830
+ color: t,
1831
+ loading: r,
1832
+ disabled: s,
1833
+ collapsible: c,
1834
+ linkIcon: u,
1835
+ expanded: d,
1836
+ select: l,
1837
+ href: f,
1838
+ onClick: i,
1839
+ onKeyPress: y,
1840
+ tabIndex: b,
1841
+ size: _,
1842
+ title: N,
1843
+ description: v,
1844
+ icon: E,
1845
+ active: j,
1846
+ badge: O,
1847
+ controls: h,
1848
+ className: m,
1849
+ children: M,
1850
+ ariaLabel: S,
1851
+ ariaControlsId: A
1852
+ }) => {
1853
+ const $ = c ? d ? Yt : Ut : u ? ot : void 0, R = () => O && !r && typeof O == "object" && "label" in O ? /* @__PURE__ */ a(ye, { ...O, className: re.badge }) : _e(O) ? O : null, D = S !== void 0 ? S : typeof N == "string" ? N : void 0, z = Oe();
1854
+ return /* @__PURE__ */ x(
1855
+ "div",
1856
+ {
1857
+ className: K(re.header, m),
1858
+ "data-color": t,
1859
+ "data-interactive": n,
1860
+ "data-size": _,
1861
+ "data-has-active-child": j,
1862
+ "aria-disabled": s,
1863
+ children: [
1864
+ /* @__PURE__ */ x(
1865
+ Ft,
1866
+ {
1867
+ as: e,
1868
+ href: f,
1869
+ onClick: i,
1870
+ onKeyPress: y,
1871
+ tabIndex: b,
1872
+ loading: r,
1873
+ disabled: s || r,
1874
+ active: j,
1875
+ ariaLabel: D,
1876
+ className: re.link,
1877
+ expanded: d,
1878
+ ariaControlsId: A,
1879
+ collapsible: c,
1880
+ children: [
1881
+ n && /* @__PURE__ */ a("div", { className: re.linkFocus, "aria-hidden": "true" }),
1882
+ l && /* @__PURE__ */ a(zn, { ...l, className: re.select }),
1883
+ /* @__PURE__ */ a(Tr, { loading: r, icon: E }),
1884
+ /* @__PURE__ */ a(
1885
+ Mr,
1886
+ {
1887
+ size: _,
1888
+ loading: r,
1889
+ highlightWords: o,
1890
+ title: N,
1891
+ description: v,
1892
+ id: z,
1893
+ className: re.label,
1894
+ children: M
1895
+ }
1896
+ )
1897
+ ]
1898
+ }
1899
+ ),
1900
+ /* @__PURE__ */ x(Tt, { className: re.controls, children: [
1901
+ h && !r && /* @__PURE__ */ a("span", { className: re.customControls, children: h }),
1902
+ R(),
1903
+ $ && !s && /* @__PURE__ */ a("span", { className: re.linkIcon, children: /* @__PURE__ */ a(
1904
+ X,
1905
+ {
1906
+ svgElement: $,
1907
+ style: {
1908
+ fontSize: "1.5rem"
1909
+ }
1910
+ }
1911
+ ) })
1912
+ ] })
1913
+ ]
1914
+ }
1915
+ );
1916
+ }, jr = "_label_1tmg6_1", Ve = {
1917
+ label: jr
1918
+ }, ft = (e) => typeof e == "object" && e !== null && "children" in e;
1919
+ function pt(e) {
1920
+ return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null || _e(e);
1921
+ }
1922
+ const We = (e) => {
1923
+ const o = {
1924
+ as: "h3",
1925
+ size: "sm"
1926
+ };
1927
+ return ft(e) ? { ...o, ...e } : pt(e) ? {
1928
+ ...o,
1929
+ children: e
1930
+ } : null;
1931
+ }, Ye = (e) => {
1932
+ const o = {
1933
+ as: "span",
1934
+ size: "xs",
1935
+ weight: "normal",
1936
+ variant: "subtle"
1937
+ };
1938
+ return ft(e) ? { ...o, ...e } : pt(e) ? {
1939
+ ...o,
1940
+ children: e
1941
+ } : null;
1942
+ }, Mr = ({
1943
+ loading: e = !1,
1944
+ highlightWords: o,
1945
+ size: n,
1946
+ title: t,
1947
+ value: r,
1948
+ description: s,
1949
+ children: c,
1950
+ id: u,
1951
+ className: d
1952
+ }) => {
1953
+ if (t && r) {
1954
+ const i = t && Ye(t), y = r && We(r);
1955
+ return /* @__PURE__ */ a("span", { className: K(Ve.label, d), id: u, "data-size": n, children: c || /* @__PURE__ */ x(fe, { children: [
1956
+ i && /* @__PURE__ */ a(oe, { ...i, loading: e, highlightWords: o }),
1957
+ y && /* @__PURE__ */ a(oe, { ...y, loading: e, highlightWords: o })
1958
+ ] }) });
1959
+ }
1960
+ const l = t && We(t), f = s && Ye(s);
1961
+ return /* @__PURE__ */ a("span", { className: K(Ve.label, d), id: u, "data-size": n, children: c || /* @__PURE__ */ x(fe, { children: [
1962
+ l && /* @__PURE__ */ a(oe, { ...l, loading: e, highlightWords: o }),
1963
+ f && /* @__PURE__ */ a(oe, { ...f, loading: e, highlightWords: o })
1964
+ ] }) });
1965
+ }, Ar = "_wrapper_rcjve_1", Dr = "_icon_rcjve_11", Br = "_avatar_rcjve_19", Lr = "_avatarGroup_rcjve_23", ie = {
1966
+ wrapper: Ar,
1967
+ icon: Dr,
1968
+ avatar: Br,
1969
+ avatarGroup: Lr
1970
+ };
1971
+ function Fr(e) {
1972
+ return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null || _e(e);
1973
+ }
1974
+ const Tr = ({ loading: e, size: o, icon: n, theme: t, badge: r }) => n ? e ? /* @__PURE__ */ a(X, { className: ie.wrapper, svgElement: ze, loading: !0 }) : /* @__PURE__ */ x("div", { className: ie.wrapper, "data-size": o, children: [
1975
+ Ce(n) && /* @__PURE__ */ a(Se, { ...n, className: ie.avatar }) || ke(n) && /* @__PURE__ */ a(he, { ...n, className: ie.avatarGroup }) || Pe(n) && /* @__PURE__ */ a(X, { ...n, theme: n.theme || t, className: ie.icon }) || Fr(n) && n || /* @__PURE__ */ a(X, { theme: t, svgElement: n, className: ie.icon }),
1976
+ r && /* @__PURE__ */ a(ye, { ...r, className: ie.badge })
1977
+ ] }) : null, Gr = "_item_1nwey_3", Hr = {
1978
+ item: Gr
1979
+ }, Kr = ({
1980
+ className: e,
1981
+ color: o,
1982
+ variant: n = "default",
1983
+ shadow: t = "xs",
1984
+ border: r = "none",
1985
+ loading: s,
1986
+ disabled: c,
1987
+ collapsible: u,
1988
+ expanded: d,
1989
+ size: l,
1990
+ icon: f,
1991
+ label: i,
1992
+ title: y,
1993
+ description: b,
1994
+ badge: _,
1995
+ linkIcon: N = !1,
1996
+ select: v,
1997
+ selected: E,
1998
+ controls: j,
1999
+ children: O,
2000
+ interactive: h,
2001
+ id: m,
2002
+ containerAs: M,
2003
+ ...S
2004
+ }) => {
2005
+ const A = typeof i == "function" ? i() : i, $ = Oe();
2006
+ return /* @__PURE__ */ x(
2007
+ Lt,
2008
+ {
2009
+ className: K(Hr.item, e),
2010
+ size: l,
2011
+ color: o,
2012
+ variant: n,
2013
+ shadow: t,
2014
+ border: r,
2015
+ disabled: c,
2016
+ selected: E,
2017
+ expanded: d,
2018
+ loading: s,
2019
+ interactive: h,
2020
+ id: m,
2021
+ as: M,
2022
+ children: [
2023
+ /* @__PURE__ */ a(
2024
+ Rr,
2025
+ {
2026
+ color: o,
2027
+ loading: s,
2028
+ linkIcon: N,
2029
+ disabled: c,
2030
+ collapsible: u,
2031
+ expanded: d,
2032
+ select: v,
2033
+ title: y,
2034
+ size: l,
2035
+ description: b,
2036
+ icon: f,
2037
+ badge: _,
2038
+ controls: j,
2039
+ interactive: h,
2040
+ ariaControlsId: d ? $ : void 0,
2041
+ ...S,
2042
+ children: A
2043
+ }
2044
+ ),
2045
+ d ? /* @__PURE__ */ a("div", { id: $, children: O }) : null
2046
+ ]
2047
+ }
2048
+ );
2049
+ }, qr = "_list_14rag_1", Ur = {
2050
+ list: qr
2051
+ }, Vr = ({ children: e, className: o, spacing: n, items: t = [], ...r }) => /* @__PURE__ */ a(Te, { direction: "col", as: "ul", spacing: n, className: K(Ur.list, o), ...r, children: e || t.map((s, c) => /* @__PURE__ */ Me(Kr, { ...s, key: `item-${s.id ?? c}` })) }), Wr = "_menu_16mue_4", Yr = "_button_16mue_12", Qr = "_label_16mue_16", ge = {
2052
+ menu: Wr,
2053
+ button: Yr,
2054
+ label: Qr
2055
+ }, Go = we(
2056
+ ({
2057
+ disabled: e,
2058
+ label: o = "Label",
2059
+ variant: n = "solid",
2060
+ title: t = "Title",
2061
+ items: r = [],
2062
+ dropdownSize: s = "sm",
2063
+ id: c = "toolbar-menu",
2064
+ onSelectId: u,
2065
+ ...d
2066
+ }) => {
2067
+ const l = Dt({ id: c, returnFocusOnClose: !0 }), f = d.searchable ? "combobox" : "menu", i = Qe(
2068
+ (b) => {
2069
+ u?.(b?.id ?? ""), b?.role !== "checkbox" && l.setOpen(!1);
2070
+ },
2071
+ [u, l]
2072
+ ), y = ce(
2073
+ () => r.map((b) => ({
2074
+ ...b,
2075
+ onClick: () => i(b)
2076
+ })),
2077
+ [r, i]
2078
+ );
2079
+ return e ? /* @__PURE__ */ x(pe, { className: ge.button, variant: n, disabled: !0, children: [
2080
+ /* @__PURE__ */ a("span", { className: ge.label, children: o }),
2081
+ /* @__PURE__ */ a(He, { "aria-hidden": "true", focusable: "false" })
2082
+ ] }) : /* @__PURE__ */ a("span", { className: ge.menu, children: /* @__PURE__ */ a(
2083
+ sr,
2084
+ {
2085
+ id: c,
2086
+ variant: "drawer-dropdown",
2087
+ title: t,
2088
+ size: s,
2089
+ trigger: /* @__PURE__ */ x(
2090
+ pe,
2091
+ {
2092
+ className: ge.button,
2093
+ variant: n,
2094
+ onClick: l.toggleMenu,
2095
+ "aria-expanded": l.open,
2096
+ "aria-haspopup": "menu",
2097
+ "aria-controls": l.open ? l.menuId : void 0,
2098
+ ref: l.triggerRef,
2099
+ children: [
2100
+ /* @__PURE__ */ a("span", { className: ge.label, children: o }),
2101
+ /* @__PURE__ */ a(He, { "aria-hidden": "true", focusable: "false" })
2102
+ ]
2103
+ }
2104
+ ),
2105
+ open: l.open,
2106
+ onClose: () => l.setOpen(!1),
2107
+ ...d?.searchable ? {} : l.dropdownA11yProps,
2108
+ children: /* @__PURE__ */ a(
2109
+ it,
2110
+ {
2111
+ ...d,
2112
+ items: y,
2113
+ keyboardEvents: l.open,
2114
+ a11yMode: f,
2115
+ open: l.open,
2116
+ scrollToTopOnOpen: d.virtualized,
2117
+ ...f === "combobox" ? { id: l.menuId } : l.menuA11yProps
2118
+ }
2119
+ )
2120
+ }
2121
+ ) });
2122
+ }
2123
+ ), Ho = we(
2124
+ ({
2125
+ value: e,
2126
+ name: o,
2127
+ placeholder: n = "Search",
2128
+ loading: t,
2129
+ collapsible: r,
2130
+ clearButtonAltText: s = "Clear search",
2131
+ onChange: c,
2132
+ onClear: u,
2133
+ onKeyDown: d,
2134
+ menu: l,
2135
+ minLength: f,
2136
+ disabled: i
2137
+ }) => /* @__PURE__ */ a(
2138
+ De,
2139
+ {
2140
+ size: "xs",
2141
+ value: e,
2142
+ name: o,
2143
+ placeholder: n,
2144
+ clearButtonAltText: s,
2145
+ onChange: c,
2146
+ onClear: u,
2147
+ onKeyDown: d,
2148
+ collapsible: r,
2149
+ autoComplete: "off",
2150
+ autoCapitalize: "off",
2151
+ type: "search",
2152
+ minLength: f,
2153
+ loading: t,
2154
+ menu: l,
2155
+ disabled: i
2156
+ }
2157
+ )
2158
+ ), Xr = "_section_1w6kc_1", Jr = {
2159
+ section: Xr
2160
+ }, ht = ({
2161
+ as: e = "section",
2162
+ direction: o = "col",
2163
+ align: n = "initial",
2164
+ variant: t,
2165
+ className: r,
2166
+ children: s,
2167
+ ...c
2168
+ }) => /* @__PURE__ */ a(
2169
+ Te,
2170
+ {
2171
+ as: e,
2172
+ align: n,
2173
+ direction: o,
2174
+ theme: t,
2175
+ className: K(Jr.section, r),
2176
+ ...c,
2177
+ children: s
2178
+ }
2179
+ );
2180
+ export {
2181
+ on as A,
2182
+ Xn as B,
2183
+ rt as C,
2184
+ lr as D,
2185
+ ze as E,
2186
+ fn as F,
2187
+ He as G,
2188
+ oe as H,
2189
+ X as I,
2190
+ Yt as J,
2191
+ Ut as K,
2192
+ Rr as L,
2193
+ it as M,
2194
+ ot as N,
2195
+ wn as O,
2196
+ To as R,
2197
+ ht as S,
2198
+ Ho as T,
2199
+ vn as V,
2200
+ ut as a,
2201
+ mt as b,
2202
+ gr as c,
2203
+ yr as d,
2204
+ Or as e,
2205
+ Nr as f,
2206
+ sr as g,
2207
+ Ke as h,
2208
+ Pe as i,
2209
+ qe as j,
2210
+ zn as k,
2211
+ ft as l,
2212
+ Mr as m,
2213
+ Tr as n,
2214
+ Kr as o,
2215
+ Vr as p,
2216
+ ct as q,
2217
+ st as r,
2218
+ at as s,
2219
+ Ge as t,
2220
+ J as u,
2221
+ Ue as v,
2222
+ xe as w,
2223
+ gn as x,
2224
+ Go as y,
2225
+ De as z
2226
+ };