@altinn/altinn-components 0.68.3 → 0.68.4

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