@altinn/altinn-components 0.58.0 → 0.58.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/dist/{Section-DPj8jAL1.js → Section-DvBigBR1.js} +122 -121
  2. package/dist/assets/BookmarkSettingsItemLabel.css +1 -1
  3. package/dist/assets/DialogContact.css +1 -0
  4. package/dist/assets/DialogHeader.css +1 -0
  5. package/dist/assets/DialogLayout.css +1 -0
  6. package/dist/assets/DialogSection.css +1 -0
  7. package/dist/assets/Link.css +1 -0
  8. package/dist/assets/Section.css +1 -1
  9. package/dist/assets/SettingsItemBase.css +1 -1
  10. package/dist/components/AccessAreaListItem/AccessAreaListItem.js +17 -16
  11. package/dist/components/AccessPackageListItem/AccessPackageListItem.js +9 -8
  12. package/dist/components/Account/AccountList.js +7 -6
  13. package/dist/components/Account/AccountListItem.js +8 -7
  14. package/dist/components/Account/AccountListItemControls.js +11 -10
  15. package/dist/components/Account/AccountListItemDetails.js +12 -11
  16. package/dist/components/Account/AccountListVirtual.js +4 -3
  17. package/dist/components/Account/AccountMenu.js +11 -10
  18. package/dist/components/Account/AccountNotificationSettings.js +10 -9
  19. package/dist/components/Account/AccountOrganization.js +15 -14
  20. package/dist/components/AccountSelector/AccountSelector.js +10 -9
  21. package/dist/components/ActivityLog/ActivityLog.js +4 -3
  22. package/dist/components/ActivityLog/ActivityLogItem.js +4 -3
  23. package/dist/components/ActivityLog/ActivityLogSegment.js +4 -3
  24. package/dist/components/Alert/Alert.js +8 -7
  25. package/dist/components/Article/Article.js +4 -3
  26. package/dist/components/Article/ArticleContact.js +4 -3
  27. package/dist/components/Article/ArticleHeader.js +4 -3
  28. package/dist/components/Attachment/AttachmentLink.js +1 -1
  29. package/dist/components/Banner/Banner.js +6 -5
  30. package/dist/components/Bookmarks/BookmarkModal.js +7 -6
  31. package/dist/components/Bookmarks/BookmarkSettingsItem.js +4 -3
  32. package/dist/components/Bookmarks/BookmarkSettingsItemLabel.js +12 -11
  33. package/dist/components/Bookmarks/BookmarkSettingsList.js +9 -8
  34. package/dist/components/Breadcrumbs/Breadcrumbs.js +4 -3
  35. package/dist/components/Bulk/BulkHeader.js +8 -7
  36. package/dist/components/Button/ButtonIcon.js +4 -3
  37. package/dist/components/Button/ComboButton.js +4 -3
  38. package/dist/components/Button/FloatingActionButton.js +8 -7
  39. package/dist/components/Button/IconButton.js +5 -4
  40. package/dist/components/Byline/Byline.js +3 -2
  41. package/dist/components/Byline/index.js +1 -1
  42. package/dist/components/ContextMenu/ContextMenu.js +11 -10
  43. package/dist/components/Dashboard/DashboardCard.js +7 -6
  44. package/dist/components/Dashboard/DashboardHeader.js +9 -8
  45. package/dist/components/Datepicker/Datepicker.js +1 -1
  46. package/dist/components/Datepicker/DatepickerHeader.js +4 -3
  47. package/dist/components/Datepicker/DatepickerTable.js +11 -10
  48. package/dist/components/Dialog/Dialog.js +25 -31
  49. package/dist/components/Dialog/DialogActions.js +4 -3
  50. package/dist/components/Dialog/DialogActivityLog.js +4 -3
  51. package/dist/components/Dialog/DialogAttachments.js +6 -5
  52. package/dist/components/Dialog/DialogBody.js +8 -7
  53. package/dist/components/Dialog/DialogByline.js +3 -2
  54. package/dist/components/Dialog/DialogContact.js +47 -11
  55. package/dist/components/Dialog/DialogHeader.js +31 -28
  56. package/dist/components/Dialog/DialogHistory.js +7 -6
  57. package/dist/components/Dialog/DialogHistoryItem.js +4 -3
  58. package/dist/components/Dialog/DialogHistorySegment.js +8 -7
  59. package/dist/components/Dialog/DialogLayout.js +22 -21
  60. package/dist/components/Dialog/DialogList.js +3 -2
  61. package/dist/components/Dialog/DialogListGroup.js +3 -2
  62. package/dist/components/Dialog/DialogListItem.js +3 -2
  63. package/dist/components/Dialog/DialogMetadata.js +3 -2
  64. package/dist/components/Dialog/DialogSection.js +10 -7
  65. package/dist/components/Dialog/DialogSeenBy.js +4 -3
  66. package/dist/components/Dialog/DialogSelect.js +10 -9
  67. package/dist/components/Dialog/DialogStatus.js +4 -3
  68. package/dist/components/Dialog/DialogTabs.js +4 -3
  69. package/dist/components/Dialog/SeenByLog.js +4 -3
  70. package/dist/components/Dialog/SeenByLogButton.js +7 -6
  71. package/dist/components/Dialog/SeenByLogItem.js +12 -11
  72. package/dist/components/Dialog/index.js +1 -1
  73. package/dist/components/Dropdown/DrawerButton.js +4 -3
  74. package/dist/components/Dropdown/DrawerHeader.js +8 -7
  75. package/dist/components/Dropdown/Dropdown.js +3 -2
  76. package/dist/components/Dropdown/DropdownBase.js +8 -7
  77. package/dist/components/Dropdown/FloatingDropdown.js +19 -18
  78. package/dist/components/Dropdown/index.js +1 -1
  79. package/dist/components/DsComponents/index.js +21 -20
  80. package/dist/components/Forms/Checkbox.js +4 -3
  81. package/dist/components/Forms/CheckboxOptions.js +4 -3
  82. package/dist/components/Forms/FieldBase.js +3 -2
  83. package/dist/components/Forms/FieldsetBase.js +4 -3
  84. package/dist/components/Forms/Radio.js +4 -3
  85. package/dist/components/Forms/RadioOptions.js +4 -3
  86. package/dist/components/Forms/SearchField.js +3 -2
  87. package/dist/components/Forms/SelectField.js +5 -4
  88. package/dist/components/Forms/Switch.js +6 -5
  89. package/dist/components/Forms/SwitchOptions.js +4 -3
  90. package/dist/components/Forms/TextField.js +4 -3
  91. package/dist/components/Forms/TextFieldDropdown.js +4 -3
  92. package/dist/components/Forms/TextareaField.js +4 -3
  93. package/dist/components/Forms/index.js +1 -1
  94. package/dist/components/GlobalHeader/GlobalAccountButton.js +8 -7
  95. package/dist/components/GlobalHeader/GlobalHeader.js +10 -9
  96. package/dist/components/GlobalHeader/GlobalMenuButton.js +4 -3
  97. package/dist/components/GlobalHeader/HeaderDrawer.js +9 -8
  98. package/dist/components/GlobalHeader/HeaderDropdown.js +6 -5
  99. package/dist/components/GlobalHeader/HeaderLogo.js +8 -7
  100. package/dist/components/GlobalMenu/GlobalMenu.js +10 -9
  101. package/dist/components/GlobalMenu/LocaleSwitcher.js +13 -12
  102. package/dist/components/GlobalMenu/LogoutButton.js +4 -3
  103. package/dist/components/GlobalMenu_old/BackButton.js +4 -3
  104. package/dist/components/GlobalMenu_old/CurrentAccount.js +4 -3
  105. package/dist/components/GlobalMenu_old/GlobalMenu.js +10 -9
  106. package/dist/components/GlobalMenu_old/GlobalMenuButton.js +12 -11
  107. package/dist/components/GlobalMenu_old/LogoutButton.js +4 -3
  108. package/dist/components/Header/Header.js +4 -3
  109. package/dist/components/Header/HeaderBase.js +7 -6
  110. package/dist/components/Header/HeaderButton.js +18 -17
  111. package/dist/components/Header/LocaleButton.js +12 -11
  112. package/dist/components/Header/LocaleSwitcher.js +9 -8
  113. package/dist/components/Icon/Icon.js +4 -3
  114. package/dist/components/Icon/index.js +1 -1
  115. package/dist/components/Inbox/InboxPage.js +8 -7
  116. package/dist/components/InboxSearch/InboxSearch.js +10 -9
  117. package/dist/components/Item/ItemLabel.js +2 -1
  118. package/dist/components/Item/ItemMedia.js +3 -2
  119. package/dist/components/Item/ItemSelect.js +3 -2
  120. package/dist/components/Item/index.js +1 -1
  121. package/dist/components/Layout/Layout.js +8 -7
  122. package/dist/components/List/List.js +3 -2
  123. package/dist/components/List/ListBase.js +4 -3
  124. package/dist/components/List/ListItem.js +1 -1
  125. package/dist/components/List/ListItemHeader.js +3 -2
  126. package/dist/components/List/ListItemIcon.js +3 -2
  127. package/dist/components/List/ListItemLabel.js +4 -3
  128. package/dist/components/List/index.js +1 -1
  129. package/dist/components/Menu/Menu.js +1 -1
  130. package/dist/components/Menu/MenuItem.js +3 -2
  131. package/dist/components/Menu/MenuItems.js +3 -2
  132. package/dist/components/Menu/MenuListSearch.js +3 -2
  133. package/dist/components/Menu/MenuOption.js +1 -1
  134. package/dist/components/Menu/TabMenu.js +7 -6
  135. package/dist/components/Menu/VirtualizedMenuItems.js +3 -2
  136. package/dist/components/Menu/index.js +1 -1
  137. package/dist/components/Menu/useMenuSearch.js +1 -1
  138. package/dist/components/Metadata/MetaItem.js +3 -2
  139. package/dist/components/Metadata/MetaItemIcon.js +3 -2
  140. package/dist/components/Metadata/MetaProgress.js +3 -2
  141. package/dist/components/Metadata/MetaTimestamp.js +3 -2
  142. package/dist/components/Metadata/Metadata.js +9 -8
  143. package/dist/components/Metadata/index.js +1 -1
  144. package/dist/components/Modal/Modal.js +8 -7
  145. package/dist/components/Modal/ModalBase.js +25 -24
  146. package/dist/components/Modal/ModalHeader.js +10 -9
  147. package/dist/components/Modal/ModalIcon.js +4 -3
  148. package/dist/components/Notifications/NotificationItem.js +4 -3
  149. package/dist/components/Notifications/NotificationItemBase.js +4 -3
  150. package/dist/components/Notifications/NotificationItemControls.js +6 -5
  151. package/dist/components/Notifications/NotificationItemIcon.js +15 -14
  152. package/dist/components/Page/AccordionSection.js +4 -3
  153. package/dist/components/Page/ContactButtons.js +7 -6
  154. package/dist/components/Page/ContactSection.js +7 -6
  155. package/dist/components/Page/PageMenu.js +11 -10
  156. package/dist/components/Page/PageNav.js +7 -6
  157. package/dist/components/Page/Section.js +3 -2
  158. package/dist/components/Page/index.js +1 -1
  159. package/dist/components/ResourceListItem/ResourceListItem.js +8 -7
  160. package/dist/components/RootProvider/RootProvider.js +4 -3
  161. package/dist/components/RootProvider/index.js +1 -1
  162. package/dist/components/Search/SearchItem.js +7 -6
  163. package/dist/components/Searchbar/Autocomplete.js +9 -8
  164. package/dist/components/Searchbar/AutocompleteItem.js +6 -5
  165. package/dist/components/Searchbar/Searchbar.js +4 -3
  166. package/dist/components/Searchbar/SearchbarField.js +4 -3
  167. package/dist/components/Settings/SettingsItem.js +72 -61
  168. package/dist/components/Settings/SettingsItemBase.js +67 -39
  169. package/dist/components/Settings/SettingsList.js +12 -11
  170. package/dist/components/Settings/SettingsModal.js +7 -6
  171. package/dist/components/Settings/SettingsSection.js +10 -9
  172. package/dist/components/Settings/UsedByLog.js +4 -3
  173. package/dist/components/Settings/UsedByLogItem.js +10 -9
  174. package/dist/components/Snackbar/SnackbarItem.js +16 -15
  175. package/dist/components/Timeline/Timeline.js +4 -3
  176. package/dist/components/Timeline/TimelineActivity.js +4 -3
  177. package/dist/components/Timeline/TimelineBase.js +4 -3
  178. package/dist/components/Timeline/TimelineFooter.js +7 -6
  179. package/dist/components/Timeline/TimelineHeader.js +4 -3
  180. package/dist/components/Timeline/TimelineIcon.js +6 -5
  181. package/dist/components/Timeline/TimelineSection.js +4 -3
  182. package/dist/components/Timeline/TimelineSegment.js +7 -6
  183. package/dist/components/Toolbar/DatepickerFilter.js +4 -3
  184. package/dist/components/Toolbar/SelectDateFilter.js +8 -7
  185. package/dist/components/Toolbar/Toolbar.js +1 -1
  186. package/dist/components/Toolbar/ToolbarFilter.js +11 -10
  187. package/dist/components/Toolbar/ToolbarFilterAddMenu.js +18 -17
  188. package/dist/components/Toolbar/ToolbarFilterButton.js +4 -3
  189. package/dist/components/Toolbar/ToolbarFilterMenu.js +11 -10
  190. package/dist/components/Toolbar/ToolbarMenu.js +3 -2
  191. package/dist/components/Toolbar/ToolbarSearch.js +3 -2
  192. package/dist/components/Toolbar/index.js +1 -1
  193. package/dist/components/Transmission/Transmission.js +9 -8
  194. package/dist/components/Transmission/TransmissionList.js +6 -5
  195. package/dist/components/Transmission/TransmissionType.js +4 -3
  196. package/dist/components/Typography/Heading.js +3 -2
  197. package/dist/components/Typography/Link.js +11 -0
  198. package/dist/components/Typography/index.js +4 -2
  199. package/dist/components/UserListItem/UserListItem.js +9 -8
  200. package/dist/components/index.js +137 -134
  201. package/dist/hooks/useAccountSelector.js +18 -17
  202. package/dist/index.js +152 -149
  203. package/dist/link-D1SA3LCe.js +10 -0
  204. package/dist/{textfield-CRXtg-r5.js → textfield-f4Za2qt6.js} +428 -431
  205. package/dist/types/lib/components/Dialog/DialogContact.d.ts +12 -3
  206. package/dist/types/lib/components/Settings/SettingsItem.d.ts +1 -1
  207. package/dist/types/lib/components/Settings/SettingsItemBase.d.ts +16 -10
  208. package/dist/types/lib/components/Typography/Link.d.ts +11 -0
  209. package/dist/types/lib/components/Typography/index.d.ts +1 -0
  210. package/dist/types/lib/stories/Profile.stories.d.ts +1 -0
  211. package/package.json +1 -1
  212. package/dist/types/lib/components/Settings/SettingsItem.stories.d.ts +0 -67
@@ -1,17 +1,17 @@
1
1
  "use client";
2
2
  import * as p from "react";
3
- import ce, { forwardRef as A, useState as ye, useRef as ve, useEffect as ue, createContext as De, useContext as oe, useMemo as ze, useLayoutEffect as jn, useReducer as Vr, useId as Ve, isValidElement as $n, memo as Br, useCallback as jr, Children as fn, version as $r } from "react";
3
+ import le, { forwardRef as A, useState as ye, useRef as ve, useEffect as ce, createContext as De, useContext as oe, useMemo as ze, useLayoutEffect as jn, useReducer as Vr, useId as Ve, isValidElement as $n, memo as Br, useCallback as jr, Children as fn, version as $r } from "react";
4
4
  import { jsx as v, jsxs as ie, Fragment as Ut } from "react/jsx-runtime";
5
- import { c as X } from "./lite-1fxw3LjI.js";
6
- import { S as se, a as Kr } from "./index-D7FJjvrv.js";
5
+ import { c as G } from "./lite-1fxw3LjI.js";
7
6
  import * as Kn from "react-dom";
8
7
  import { flushSync as Wn } from "react-dom";
9
- import { S as Wr, B as Ye, u as qr } from "./button-BB5sYVKY.js";
10
- import { V as Xt, u as Gt, F as pt, a as Hr, b as Ur, c as hn } from "./index-z82sbSVU.js";
8
+ import { S as Kr, B as Ye, u as Wr } from "./button-BB5sYVKY.js";
9
+ import { V as Xt, u as Gt, F as pt, a as qr, b as Hr, c as hn } from "./index-z82sbSVU.js";
11
10
  import { P as jt } from "./paragraph-BRiIBpbY.js";
11
+ import { S as ue, a as Ur } from "./index-D7FJjvrv.js";
12
12
  import { I as ot } from "./input-wBv_FkEV.js";
13
13
  import { L as Te } from "./label-xTmTyPhk.js";
14
- import { f as qn, b as Xr, o as Hn, c as Un, g as Mt, a as Xn, s as Gr } from "./floating-ui.dom-bEgaHJCq.js";
14
+ import { f as qn, b as Xr, o as Hn, c as Un, g as kt, a as Xn, s as Gr } from "./floating-ui.dom-bEgaHJCq.js";
15
15
  import { u as Be } from "./use-merge-refs-Cj4kTYVj.js";
16
16
  import { T as Yr } from "./textarea-BBstVlPT.js";
17
17
  const qe = (e, r) => {
@@ -33,13 +33,13 @@ const qe = (e, r) => {
33
33
  focusableValue: null,
34
34
  orientation: "horizontal"
35
35
  }), Zr = A(({ activeValue: e, asChild: r, orientation: t = "horizontal", onBlur: n, onFocus: o, ...i }, s) => {
36
- const a = r ? se : "div", l = e ?? null, [c, f] = ye(l), [d, h] = ye(!1), u = ve(/* @__PURE__ */ new Map()), m = ve(null), g = Be([s, m]), C = () => {
36
+ const a = r ? ue : "div", l = e ?? null, [c, f] = ye(l), [d, h] = ye(!1), u = ve(/* @__PURE__ */ new Map()), m = ve(null), g = Be([s, m]), C = () => {
37
37
  if (!m.current)
38
38
  return [];
39
39
  const x = Array.from(m.current.querySelectorAll("[data-roving-tabindex-item]"));
40
40
  return Array.from(u.current).sort((y, b) => x.indexOf(y[1]) - x.indexOf(b[1])).map(([y, b]) => ({ value: y, element: b }));
41
41
  };
42
- return ue(() => {
42
+ return ce(() => {
43
43
  f(l);
44
44
  }, [l]), v(Gn.Provider, { value: {
45
45
  elements: u,
@@ -92,7 +92,7 @@ function Pt(e, r) {
92
92
  return e.at(t === 0 ? -1 : t - 1);
93
93
  }
94
94
  const Qr = A(({ value: e, asChild: r, ...t }, n) => {
95
- const o = r ? se : "div", i = e ?? (typeof t.children == "string" ? t.children : ""), { getOrderedItems: s, getRovingProps: a, orientation: l } = Jr(i), c = a({
95
+ const o = r ? ue : "div", i = e ?? (typeof t.children == "string" ? t.children : ""), { getOrderedItems: s, getRovingProps: a, orientation: l } = Jr(i), c = a({
96
96
  onKeyDown: (d) => {
97
97
  t?.onKeyDown?.(d);
98
98
  const h = s();
@@ -114,7 +114,7 @@ const Qr = A(({ value: e, asChild: r, ...t }, n) => {
114
114
  }), eo = (e, r, t) => {
115
115
  const n = (t - 1) / 2, o = Math.max(1, Math.min(Math.max(e - Math.floor(n), 1), r - t + 1)), i = Math.min(Math.max(e + Math.ceil(n), t), r), s = Array.from({ length: i + 1 - o }, (a, l) => l + o);
116
116
  return t > 4 && o > 1 && s.splice(0, 2, 1, 0), t > 3 && i < r && s.splice(-2, 2, 0, r), s;
117
- }, Ds = ({ currentPage: e = 1, setCurrentPage: r, onChange: t, totalPages: n = 1, showPages: o = 7 }) => ze(() => {
117
+ }, Ps = ({ currentPage: e = 1, setCurrentPage: r, onChange: t, totalPages: n = 1, showPages: o = 7 }) => ze(() => {
118
118
  const i = e < n, s = e !== 1, a = (l) => (c) => {
119
119
  if (l < 1 || l > n)
120
120
  return c.preventDefault();
@@ -161,13 +161,11 @@ const Qr = A(({ value: e, asChild: r, ...t }, n) => {
161
161
  hasNext: i
162
162
  };
163
163
  }, [e, n, o]), to = A(function({ className: r, count: t, maxCount: n, variant: o = "base", ...i }, s) {
164
- return v("span", { className: X("ds-badge", r), "data-count": t && n && t > n ? `${n}+` : t, "data-variant": o, ref: s, ...i });
164
+ return v("span", { className: G("ds-badge", r), "data-count": t && n && t > n ? `${n}+` : t, "data-variant": o, ref: s, ...i });
165
165
  }), no = A(function({ className: r, overlap: t = "rectangle", placement: n = "top-right", ...o }, i) {
166
- return v("span", { className: X("ds-badge--position", r), "data-overlap": t, "data-placement": n, ref: i, ...o });
166
+ return v("span", { className: G("ds-badge--position", r), "data-overlap": t, "data-placement": n, ref: i, ...o });
167
167
  }), ro = Object.assign(to, { Position: no });
168
168
  ro.Position.displayName = "Badge.Position";
169
- const oo = A(({ asChild: e, className: r, ...t }, n) => v(e ? se : "a", { className: X("ds-link", r), ref: n, ...t }));
170
- oo.displayName = "Link";
171
169
  function Ct() {
172
170
  return typeof window < "u";
173
171
  }
@@ -178,7 +176,7 @@ function it(e) {
178
176
  var r;
179
177
  return (e == null || (r = e.ownerDocument) == null ? void 0 : r.defaultView) || window;
180
178
  }
181
- function io(e) {
179
+ function oo(e) {
182
180
  var r;
183
181
  return (r = (Yn(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : r.documentElement;
184
182
  }
@@ -197,10 +195,10 @@ function $t(e) {
197
195
  function mn(e) {
198
196
  return ["html", "body", "#document"].includes(Et(e));
199
197
  }
200
- function so(e) {
198
+ function io(e) {
201
199
  return it(e).getComputedStyle(e);
202
200
  }
203
- function ao(e) {
201
+ function so(e) {
204
202
  if (Et(e) === "html")
205
203
  return e;
206
204
  const r = (
@@ -208,7 +206,7 @@ function ao(e) {
208
206
  e.assignedSlot || // DOM Element detected.
209
207
  e.parentNode || // ShadowRoot detected.
210
208
  $t(e) && e.host || // Fallback.
211
- io(e)
209
+ oo(e)
212
210
  );
213
211
  return $t(r) ? r.host : r;
214
212
  }
@@ -254,7 +252,7 @@ function Qn(e) {
254
252
  return e.mozInputSource === 0 && e.isTrusted ? !0 : Kt() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
255
253
  }
256
254
  function er(e) {
257
- return co() ? !1 : !Kt() && e.width === 0 && e.height === 0 || Kt() && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse" || // iOS VoiceOver returns 0.333• for width/height.
255
+ return lo() ? !1 : !Kt() && e.width === 0 && e.height === 0 || Kt() && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse" || // iOS VoiceOver returns 0.333• for width/height.
258
256
  e.width < 1 && e.height < 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "touch";
259
257
  }
260
258
  function tr() {
@@ -264,16 +262,16 @@ function Kt() {
264
262
  const e = /android/i;
265
263
  return e.test(Zn()) || e.test(Jn());
266
264
  }
267
- function lo() {
265
+ function ao() {
268
266
  return Zn().toLowerCase().startsWith("mac") && !navigator.maxTouchPoints;
269
267
  }
270
- function co() {
268
+ function lo() {
271
269
  return Jn().includes("jsdom/");
272
270
  }
273
- function uo(e) {
271
+ function co(e) {
274
272
  return "nativeEvent" in e;
275
273
  }
276
- function fo(e) {
274
+ function uo(e) {
277
275
  return e.matches("html,body");
278
276
  }
279
277
  function be(e) {
@@ -290,18 +288,18 @@ function Dt(e, r) {
290
288
  function Le(e) {
291
289
  return "composedPath" in e ? e.composedPath()[0] : e.target;
292
290
  }
293
- const ho = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
294
- function mo(e) {
295
- return Oe(e) && e.matches(ho);
291
+ const fo = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
292
+ function ho(e) {
293
+ return Oe(e) && e.matches(fo);
296
294
  }
297
295
  function fe(e) {
298
296
  e.preventDefault(), e.stopPropagation();
299
297
  }
300
298
  function nr(e) {
301
- return e ? e.getAttribute("role") === "combobox" && mo(e) : !1;
299
+ return e ? e.getAttribute("role") === "combobox" && ho(e) : !1;
302
300
  }
303
301
  const pn = Math.floor;
304
- var po = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], bt = /* @__PURE__ */ po.join(","), rr = typeof Element > "u", He = rr ? function() {
302
+ var mo = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], bt = /* @__PURE__ */ mo.join(","), rr = typeof Element > "u", He = rr ? function() {
305
303
  } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, gt = !rr && Element.prototype.getRootNode ? function(e) {
306
304
  var r;
307
305
  return e == null || (r = e.getRootNode) === null || r === void 0 ? void 0 : r.call(e);
@@ -312,15 +310,15 @@ var po = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
312
310
  t === void 0 && (t = !0);
313
311
  var o = r == null || (n = r.getAttribute) === null || n === void 0 ? void 0 : n.call(r, "inert"), i = o === "" || o === "true", s = i || t && r && e(r.parentNode);
314
312
  return s;
315
- }, bo = function(r) {
313
+ }, po = function(r) {
316
314
  var t, n = r == null || (t = r.getAttribute) === null || t === void 0 ? void 0 : t.call(r, "contenteditable");
317
315
  return n === "" || n === "true";
318
- }, go = function(r, t, n) {
316
+ }, bo = function(r, t, n) {
319
317
  if (vt(r))
320
318
  return [];
321
319
  var o = Array.prototype.slice.apply(r.querySelectorAll(bt));
322
320
  return t && He.call(r, bt) && o.unshift(r), o = o.filter(n), o;
323
- }, vo = function e(r, t, n) {
321
+ }, go = function e(r, t, n) {
324
322
  for (var o = [], i = Array.from(r); i.length; ) {
325
323
  var s = i.shift();
326
324
  if (!vt(s, !1))
@@ -351,26 +349,26 @@ var po = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
351
349
  }, ir = function(r) {
352
350
  if (!r)
353
351
  throw new Error("No node provided");
354
- return r.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(r.tagName) || bo(r)) && !or(r) ? 0 : r.tabIndex;
355
- }, yo = function(r, t) {
352
+ return r.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(r.tagName) || po(r)) && !or(r) ? 0 : r.tabIndex;
353
+ }, vo = function(r, t) {
356
354
  var n = ir(r);
357
355
  return n < 0 && t && !or(r) ? 0 : n;
358
- }, xo = function(r, t) {
356
+ }, yo = function(r, t) {
359
357
  return r.tabIndex === t.tabIndex ? r.documentOrder - t.documentOrder : r.tabIndex - t.tabIndex;
360
358
  }, sr = function(r) {
361
359
  return r.tagName === "INPUT";
362
- }, wo = function(r) {
360
+ }, xo = function(r) {
363
361
  return sr(r) && r.type === "hidden";
364
- }, Co = function(r) {
362
+ }, wo = function(r) {
365
363
  var t = r.tagName === "DETAILS" && Array.prototype.slice.apply(r.children).some(function(n) {
366
364
  return n.tagName === "SUMMARY";
367
365
  });
368
366
  return t;
369
- }, Eo = function(r, t) {
367
+ }, Co = function(r, t) {
370
368
  for (var n = 0; n < r.length; n++)
371
369
  if (r[n].checked && r[n].form === t)
372
370
  return r[n];
373
- }, Io = function(r) {
371
+ }, Eo = function(r) {
374
372
  if (!r.name)
375
373
  return !0;
376
374
  var t = r.form || gt(r), n = function(a) {
@@ -384,13 +382,13 @@ var po = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
384
382
  } catch (s) {
385
383
  return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", s.message), !1;
386
384
  }
387
- var i = Eo(o, r.form);
385
+ var i = Co(o, r.form);
388
386
  return !i || i === r;
389
- }, Ro = function(r) {
387
+ }, Io = function(r) {
390
388
  return sr(r) && r.type === "radio";
389
+ }, Ro = function(r) {
390
+ return Io(r) && !Eo(r);
391
391
  }, Oo = function(r) {
392
- return Ro(r) && !Io(r);
393
- }, So = function(r) {
394
392
  var t, n = r && gt(r), o = (t = n) === null || t === void 0 ? void 0 : t.host, i = !1;
395
393
  if (n && n !== r) {
396
394
  var s, a, l;
@@ -403,7 +401,7 @@ var po = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
403
401
  }, bn = function(r) {
404
402
  var t = r.getBoundingClientRect(), n = t.width, o = t.height;
405
403
  return n === 0 && o === 0;
406
- }, To = function(r, t) {
404
+ }, So = function(r, t) {
407
405
  var n = t.displayCheck, o = t.getShadowRoot;
408
406
  if (getComputedStyle(r).visibility === "hidden")
409
407
  return !0;
@@ -420,14 +418,14 @@ var po = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
420
418
  }
421
419
  r = a;
422
420
  }
423
- if (So(r))
421
+ if (Oo(r))
424
422
  return !r.getClientRects().length;
425
423
  if (n !== "legacy-full")
426
424
  return !0;
427
425
  } else if (n === "non-zero-area")
428
426
  return bn(r);
429
427
  return !1;
430
- }, ko = function(r) {
428
+ }, To = function(r) {
431
429
  if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(r.tagName))
432
430
  for (var t = r.parentElement; t; ) {
433
431
  if (t.tagName === "FIELDSET" && t.disabled) {
@@ -445,17 +443,17 @@ var po = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
445
443
  return !(t.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
446
444
  // because we're limited in the type of selectors we can use in JSDom (see related
447
445
  // note related to `candidateSelectors`)
448
- vt(t) || wo(t) || To(t, r) || // For a details element with a summary, the summary element gets the focus
449
- Co(t) || ko(t));
446
+ vt(t) || xo(t) || So(t, r) || // For a details element with a summary, the summary element gets the focus
447
+ wo(t) || To(t));
450
448
  }, Wt = function(r, t) {
451
- return !(Oo(t) || ir(t) < 0 || !Mo(r, t));
452
- }, No = function(r) {
449
+ return !(Ro(t) || ir(t) < 0 || !Mo(r, t));
450
+ }, ko = function(r) {
453
451
  var t = parseInt(r.getAttribute("tabindex"), 10);
454
452
  return !!(isNaN(t) || t >= 0);
455
- }, Po = function e(r) {
453
+ }, No = function e(r) {
456
454
  var t = [], n = [];
457
455
  return r.forEach(function(o, i) {
458
- var s = !!o.scopeParent, a = s ? o.scopeParent : o, l = yo(a, s), c = s ? e(o.candidates) : a;
456
+ var s = !!o.scopeParent, a = s ? o.scopeParent : o, l = vo(a, s), c = s ? e(o.candidates) : a;
459
457
  l === 0 ? s ? t.push.apply(t, c) : t.push(a) : n.push({
460
458
  documentOrder: i,
461
459
  tabIndex: l,
@@ -463,23 +461,23 @@ var po = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
463
461
  isScope: s,
464
462
  content: c
465
463
  });
466
- }), n.sort(xo).reduce(function(o, i) {
464
+ }), n.sort(yo).reduce(function(o, i) {
467
465
  return i.isScope ? o.push.apply(o, i.content) : o.push(i.content), o;
468
466
  }, []).concat(t);
469
467
  }, nt = function(r, t) {
470
468
  t = t || {};
471
469
  var n;
472
- return t.getShadowRoot ? n = vo([r], t.includeContainer, {
470
+ return t.getShadowRoot ? n = go([r], t.includeContainer, {
473
471
  filter: Wt.bind(null, t),
474
472
  flatten: !1,
475
473
  getShadowRoot: t.getShadowRoot,
476
- shadowRootFilter: No
477
- }) : n = go(r, t.includeContainer, Wt.bind(null, t)), Po(n);
478
- }, Do = function(r, t) {
474
+ shadowRootFilter: ko
475
+ }) : n = bo(r, t.includeContainer, Wt.bind(null, t)), No(n);
476
+ }, Po = function(r, t) {
479
477
  if (t = t || {}, !r)
480
478
  throw new Error("No node provided");
481
479
  return He.call(r, bt) === !1 ? !1 : Wt(t, r);
482
- }, ht = typeof document < "u" ? jn : ue;
480
+ }, ht = typeof document < "u" ? jn : ce;
483
481
  function yt(e, r) {
484
482
  if (e === r)
485
483
  return !0;
@@ -523,7 +521,7 @@ function At(e) {
523
521
  r.current = e;
524
522
  }), r;
525
523
  }
526
- function Ao(e) {
524
+ function Do(e) {
527
525
  e === void 0 && (e = {});
528
526
  const {
529
527
  placement: r = "bottom",
@@ -546,19 +544,19 @@ function Ao(e) {
546
544
  isPositioned: !1
547
545
  }), [h, u] = p.useState(n);
548
546
  yt(h, n) || u(n);
549
- const [m, g] = p.useState(null), [C, x] = p.useState(null), y = p.useCallback((k) => {
550
- k !== M.current && (M.current = k, g(k));
551
- }, []), b = p.useCallback((k) => {
552
- k !== j.current && (j.current = k, x(k));
553
- }, []), w = i || m, _ = s || C, M = p.useRef(null), j = p.useRef(null), $ = p.useRef(f), Z = l != null, G = At(l), q = At(o), S = At(c), N = p.useCallback(() => {
554
- if (!M.current || !j.current)
547
+ const [m, g] = p.useState(null), [C, x] = p.useState(null), y = p.useCallback((M) => {
548
+ M !== k.current && (k.current = M, g(M));
549
+ }, []), b = p.useCallback((M) => {
550
+ M !== j.current && (j.current = M, x(M));
551
+ }, []), w = i || m, _ = s || C, k = p.useRef(null), j = p.useRef(null), $ = p.useRef(f), Z = l != null, X = At(l), q = At(o), S = At(c), N = p.useCallback(() => {
552
+ if (!k.current || !j.current)
555
553
  return;
556
- const k = {
554
+ const M = {
557
555
  placement: r,
558
556
  strategy: t,
559
557
  middleware: h
560
558
  };
561
- q.current && (k.platform = q.current), Un(M.current, j.current, k).then((R) => {
559
+ q.current && (M.platform = q.current), Un(k.current, j.current, M).then((R) => {
562
560
  const U = {
563
561
  ...R,
564
562
  // The floating element's position may be recomputed while it's closed
@@ -573,8 +571,8 @@ function Ao(e) {
573
571
  });
574
572
  }, [h, r, t, q, S]);
575
573
  ht(() => {
576
- c === !1 && $.current.isPositioned && ($.current.isPositioned = !1, d((k) => ({
577
- ...k,
574
+ c === !1 && $.current.isPositioned && ($.current.isPositioned = !1, d((M) => ({
575
+ ...M,
578
576
  isPositioned: !1
579
577
  })));
580
578
  }, [c]);
@@ -582,14 +580,14 @@ function Ao(e) {
582
580
  ht(() => (P.current = !0, () => {
583
581
  P.current = !1;
584
582
  }), []), ht(() => {
585
- if (w && (M.current = w), _ && (j.current = _), w && _) {
586
- if (G.current)
587
- return G.current(w, _, N);
583
+ if (w && (k.current = w), _ && (j.current = _), w && _) {
584
+ if (X.current)
585
+ return X.current(w, _, N);
588
586
  N();
589
587
  }
590
- }, [w, _, N, G, Z]);
588
+ }, [w, _, N, X, Z]);
591
589
  const E = p.useMemo(() => ({
592
- reference: M,
590
+ reference: k,
593
591
  floating: j,
594
592
  setReference: y,
595
593
  setFloating: b
@@ -597,16 +595,16 @@ function Ao(e) {
597
595
  reference: w,
598
596
  floating: _
599
597
  }), [w, _]), B = p.useMemo(() => {
600
- const k = {
598
+ const M = {
601
599
  position: t,
602
600
  left: 0,
603
601
  top: 0
604
602
  };
605
603
  if (!D.floating)
606
- return k;
604
+ return M;
607
605
  const R = gn(D.floating, f.x), U = gn(D.floating, f.y);
608
606
  return a ? {
609
- ...k,
607
+ ...M,
610
608
  transform: "translate(" + R + "px, " + U + "px)",
611
609
  ...ar(D.floating) >= 1.5 && {
612
610
  willChange: "transform"
@@ -625,13 +623,13 @@ function Ao(e) {
625
623
  floatingStyles: B
626
624
  }), [f, N, E, D, B]);
627
625
  }
628
- const _o = (e, r) => ({
626
+ const Ao = (e, r) => ({
629
627
  ...Hn(e),
630
628
  options: [e, r]
631
- }), Fo = (e, r) => ({
629
+ }), _o = (e, r) => ({
632
630
  ...qn(e),
633
631
  options: [e, r]
634
- }), Lo = (e, r) => ({
632
+ }), Fo = (e, r) => ({
635
633
  ...Xr(e),
636
634
  options: [e, r]
637
635
  });
@@ -644,13 +642,13 @@ function Yt(e) {
644
642
  }
645
643
  const lr = {
646
644
  ...p
647
- }, zo = lr.useInsertionEffect, Vo = zo || ((e) => e());
645
+ }, Lo = lr.useInsertionEffect, zo = Lo || ((e) => e());
648
646
  function Ce(e) {
649
647
  const r = p.useRef(() => {
650
648
  if (process.env.NODE_ENV !== "production")
651
649
  throw new Error("Cannot call an event handler while rendering.");
652
650
  });
653
- return Vo(() => {
651
+ return zo(() => {
654
652
  r.current = e;
655
653
  }), p.useCallback(function() {
656
654
  for (var t = arguments.length, n = new Array(t), o = 0; o < t; o++)
@@ -666,18 +664,18 @@ function et(e, r) {
666
664
  return r < 0 || r >= e.current.length;
667
665
  }
668
666
  function _t(e, r) {
669
- return le(e, {
667
+ return ae(e, {
670
668
  disabledIndices: r
671
669
  });
672
670
  }
673
671
  function vn(e, r) {
674
- return le(e, {
672
+ return ae(e, {
675
673
  decrement: !0,
676
674
  startingIndex: e.current.length,
677
675
  disabledIndices: r
678
676
  });
679
677
  }
680
- function le(e, r) {
678
+ function ae(e, r) {
681
679
  let {
682
680
  startingIndex: t = -1,
683
681
  decrement: n = !1,
@@ -691,7 +689,7 @@ function le(e, r) {
691
689
  while (a >= 0 && a <= s.length - 1 && mt(s, a, o));
692
690
  return a;
693
691
  }
694
- function Bo(e, r) {
692
+ function Vo(e, r) {
695
693
  let {
696
694
  event: t,
697
695
  orientation: n,
@@ -706,7 +704,7 @@ function Bo(e, r) {
706
704
  if (t.key === Zt) {
707
705
  if (f && fe(t), c === -1)
708
706
  d = l;
709
- else if (d = le(e, {
707
+ else if (d = ae(e, {
710
708
  startingIndex: d,
711
709
  amount: i,
712
710
  decrement: !0,
@@ -717,47 +715,47 @@ function Bo(e, r) {
717
715
  }
718
716
  et(e, d) && (d = c);
719
717
  }
720
- if (t.key === st && (f && fe(t), c === -1 ? d = a : (d = le(e, {
718
+ if (t.key === st && (f && fe(t), c === -1 ? d = a : (d = ae(e, {
721
719
  startingIndex: c,
722
720
  amount: i,
723
721
  disabledIndices: s
724
- }), o && c + i > l && (d = le(e, {
722
+ }), o && c + i > l && (d = ae(e, {
725
723
  startingIndex: c % i - i,
726
724
  amount: i,
727
725
  disabledIndices: s
728
726
  }))), et(e, d) && (d = c)), n === "both") {
729
727
  const h = pn(c / i);
730
- t.key === Ze && (f && fe(t), c % i !== i - 1 ? (d = le(e, {
728
+ t.key === Ze && (f && fe(t), c % i !== i - 1 ? (d = ae(e, {
731
729
  startingIndex: c,
732
730
  disabledIndices: s
733
- }), o && ut(d, i, h) && (d = le(e, {
731
+ }), o && ut(d, i, h) && (d = ae(e, {
734
732
  startingIndex: c - c % i - 1,
735
733
  disabledIndices: s
736
- }))) : o && (d = le(e, {
734
+ }))) : o && (d = ae(e, {
737
735
  startingIndex: c - c % i - 1,
738
736
  disabledIndices: s
739
- })), ut(d, i, h) && (d = c)), t.key === Ue && (f && fe(t), c % i !== 0 ? (d = le(e, {
737
+ })), ut(d, i, h) && (d = c)), t.key === Ue && (f && fe(t), c % i !== 0 ? (d = ae(e, {
740
738
  startingIndex: c,
741
739
  decrement: !0,
742
740
  disabledIndices: s
743
- }), o && ut(d, i, h) && (d = le(e, {
741
+ }), o && ut(d, i, h) && (d = ae(e, {
744
742
  startingIndex: c + (i - c % i),
745
743
  decrement: !0,
746
744
  disabledIndices: s
747
- }))) : o && (d = le(e, {
745
+ }))) : o && (d = ae(e, {
748
746
  startingIndex: c + (i - c % i),
749
747
  decrement: !0,
750
748
  disabledIndices: s
751
749
  })), ut(d, i, h) && (d = c));
752
750
  const u = pn(l / i) === h;
753
- et(e, d) && (o && u ? d = t.key === Ue ? l : le(e, {
751
+ et(e, d) && (o && u ? d = t.key === Ue ? l : ae(e, {
754
752
  startingIndex: c - c % i - 1,
755
753
  disabledIndices: s
756
754
  }) : d = c);
757
755
  }
758
756
  return d;
759
757
  }
760
- function jo(e, r, t) {
758
+ function Bo(e, r, t) {
761
759
  const n = [];
762
760
  let o = 0;
763
761
  return e.forEach((i, s) => {
@@ -779,7 +777,7 @@ function jo(e, r, t) {
779
777
  }
780
778
  }), [...n];
781
779
  }
782
- function $o(e, r, t, n, o) {
780
+ function jo(e, r, t, n, o) {
783
781
  if (e === -1) return -1;
784
782
  const i = t.indexOf(e), s = r[e];
785
783
  switch (o) {
@@ -793,7 +791,7 @@ function $o(e, r, t, n, o) {
793
791
  return t.lastIndexOf(e);
794
792
  }
795
793
  }
796
- function Ko(e, r) {
794
+ function $o(e, r) {
797
795
  return r.flatMap((t, n) => e.includes(t) ? [n] : []);
798
796
  }
799
797
  function mt(e, r, t) {
@@ -816,7 +814,7 @@ function Ne(e, r) {
816
814
  });
817
815
  o ? i() : yn = requestAnimationFrame(i);
818
816
  }
819
- var Q = typeof document < "u" ? jn : ue;
817
+ var Q = typeof document < "u" ? jn : ce;
820
818
  function xt() {
821
819
  return xt = Object.assign ? Object.assign.bind() : function(e) {
822
820
  for (var r = 1; r < arguments.length; r++) {
@@ -827,13 +825,13 @@ function xt() {
827
825
  return e;
828
826
  }, xt.apply(this, arguments);
829
827
  }
830
- let xn = !1, Wo = 0;
828
+ let xn = !1, Ko = 0;
831
829
  const wn = () => (
832
830
  // Ensure the id is unique with multiple independent versions of Floating UI
833
831
  // on <React 18
834
- "floating-ui-" + Math.random().toString(36).slice(2, 6) + Wo++
832
+ "floating-ui-" + Math.random().toString(36).slice(2, 6) + Ko++
835
833
  );
836
- function qo() {
834
+ function Wo() {
837
835
  const [e, r] = p.useState(() => xn ? wn() : void 0);
838
836
  return Q(() => {
839
837
  e == null && r(wn());
@@ -841,7 +839,7 @@ function qo() {
841
839
  xn = !0;
842
840
  }, []), e;
843
841
  }
844
- const Ho = lr.useId, Jt = Ho || qo;
842
+ const qo = lr.useId, Jt = qo || Wo;
845
843
  let rt;
846
844
  process.env.NODE_ENV !== "production" && (rt = /* @__PURE__ */ new Set());
847
845
  function Ft() {
@@ -853,7 +851,7 @@ function Ft() {
853
851
  (i = rt) == null || i.add(o), console.warn(o);
854
852
  }
855
853
  }
856
- function Uo() {
854
+ function Ho() {
857
855
  for (var e, r = arguments.length, t = new Array(r), n = 0; n < r; n++)
858
856
  t[n] = arguments[n];
859
857
  const o = "Floating UI: " + t.join(" ");
@@ -862,7 +860,7 @@ function Uo() {
862
860
  (i = rt) == null || i.add(o), console.error(o);
863
861
  }
864
862
  }
865
- function Xo() {
863
+ function Uo() {
866
864
  const e = /* @__PURE__ */ new Map();
867
865
  return {
868
866
  emit(r, t) {
@@ -878,10 +876,10 @@ function Xo() {
878
876
  }
879
877
  };
880
878
  }
881
- const Go = /* @__PURE__ */ p.createContext(null), Yo = /* @__PURE__ */ p.createContext(null), Qt = () => {
879
+ const Xo = /* @__PURE__ */ p.createContext(null), Go = /* @__PURE__ */ p.createContext(null), Qt = () => {
882
880
  var e;
883
- return ((e = p.useContext(Go)) == null ? void 0 : e.id) || null;
884
- }, It = () => p.useContext(Yo);
881
+ return ((e = p.useContext(Xo)) == null ? void 0 : e.id) || null;
882
+ }, It = () => p.useContext(Go);
885
883
  function Xe(e) {
886
884
  return "data-floating-ui-" + e;
887
885
  }
@@ -891,7 +889,7 @@ function Pe(e) {
891
889
  r.current = e;
892
890
  }), r;
893
891
  }
894
- function Zo(e, r) {
892
+ function Yo(e, r) {
895
893
  var t;
896
894
  let n = [], o = (t = e.find((i) => i.id === r)) == null ? void 0 : t.parentId;
897
895
  for (; o; ) {
@@ -915,7 +913,7 @@ function We(e, r) {
915
913
  }), t = t.concat(n);
916
914
  return t;
917
915
  }
918
- function Jo(e, r) {
916
+ function Zo(e, r) {
919
917
  let t, n = -1;
920
918
  function o(i, s) {
921
919
  s > n && (t = i, n = s), We(e, i).forEach((l) => {
@@ -925,14 +923,14 @@ function Jo(e, r) {
925
923
  return o(r, 0), e.find((i) => i.id === t);
926
924
  }
927
925
  let $e = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakSet(), ft = {}, Lt = 0;
928
- const Qo = () => typeof HTMLElement < "u" && "inert" in HTMLElement.prototype, cr = (e) => e && (e.host || cr(e.parentNode)), ei = (e, r) => r.map((t) => {
926
+ const Jo = () => typeof HTMLElement < "u" && "inert" in HTMLElement.prototype, cr = (e) => e && (e.host || cr(e.parentNode)), Qo = (e, r) => r.map((t) => {
929
927
  if (e.contains(t))
930
928
  return t;
931
929
  const n = cr(t);
932
930
  return e.contains(n) ? n : null;
933
931
  }).filter((t) => t != null);
934
- function ti(e, r, t, n) {
935
- const o = "data-floating-ui-inert", i = n ? "inert" : t ? "aria-hidden" : null, s = ei(r, e), a = /* @__PURE__ */ new Set(), l = new Set(s), c = [];
932
+ function ei(e, r, t, n) {
933
+ const o = "data-floating-ui-inert", i = n ? "inert" : t ? "aria-hidden" : null, s = Qo(r, e), a = /* @__PURE__ */ new Set(), l = new Set(s), c = [];
936
934
  ft[o] || (ft[o] = /* @__PURE__ */ new WeakMap());
937
935
  const f = ft[o];
938
936
  s.forEach(d), h(r), a.clear();
@@ -960,7 +958,7 @@ function ti(e, r, t, n) {
960
958
  function Cn(e, r, t) {
961
959
  r === void 0 && (r = !1), t === void 0 && (t = !1);
962
960
  const n = be(e[0]).body;
963
- return ti(e.concat(Array.from(n.querySelectorAll("[aria-live]"))), n, r, t);
961
+ return ei(e.concat(Array.from(n.querySelectorAll("[aria-live]"))), n, r, t);
964
962
  }
965
963
  const Ge = () => ({
966
964
  getShadowRoot: !0,
@@ -987,7 +985,7 @@ function tt(e, r) {
987
985
  const t = r || e.currentTarget, n = e.relatedTarget;
988
986
  return !n || !de(t, n);
989
987
  }
990
- function ni(e) {
988
+ function ti(e) {
991
989
  nt(e, Ge()).forEach((t) => {
992
990
  t.dataset.tabindex = t.getAttribute("tabindex") || "", t.setAttribute("tabindex", "-1");
993
991
  });
@@ -998,7 +996,7 @@ function En(e) {
998
996
  delete t.dataset.tabindex, n ? t.setAttribute("tabindex", n) : t.removeAttribute("tabindex");
999
997
  });
1000
998
  }
1001
- function ri(e, r, t) {
999
+ function ni(e, r, t) {
1002
1000
  const n = e.indexOf(r);
1003
1001
  function o(s) {
1004
1002
  const a = Xe("focus-guard");
@@ -1023,9 +1021,9 @@ const en = {
1023
1021
  top: 0,
1024
1022
  left: 0
1025
1023
  };
1026
- let oi;
1024
+ let ri;
1027
1025
  function In(e) {
1028
- e.key === "Tab" && (e.target, clearTimeout(oi));
1026
+ e.key === "Tab" && (e.target, clearTimeout(ri));
1029
1027
  }
1030
1028
  const wt = /* @__PURE__ */ p.forwardRef(function(r, t) {
1031
1029
  const [n, o] = p.useState();
@@ -1043,7 +1041,7 @@ const wt = /* @__PURE__ */ p.forwardRef(function(r, t) {
1043
1041
  };
1044
1042
  return /* @__PURE__ */ p.createElement("span", xt({}, r, i));
1045
1043
  }), hr = /* @__PURE__ */ p.createContext(null), Rn = /* @__PURE__ */ Xe("portal");
1046
- function ii(e) {
1044
+ function oi(e) {
1047
1045
  e === void 0 && (e = {});
1048
1046
  const {
1049
1047
  id: r,
@@ -1069,13 +1067,13 @@ function ii(e) {
1069
1067
  f.id = n, f.setAttribute(Rn, ""), l = c || l, l.appendChild(f), a.current = f, s(f);
1070
1068
  }, [r, t, n, o]), i;
1071
1069
  }
1072
- function si(e) {
1070
+ function ii(e) {
1073
1071
  const {
1074
1072
  children: r,
1075
1073
  id: t,
1076
1074
  root: n = null,
1077
1075
  preserveTabOrder: o = !0
1078
- } = e, i = ii({
1076
+ } = e, i = oi({
1079
1077
  id: t,
1080
1078
  root: n
1081
1079
  }), [s, a] = p.useState(null), l = p.useRef(null), c = p.useRef(null), f = p.useRef(null), d = p.useRef(null), h = s?.modal, u = s?.open, m = (
@@ -1089,7 +1087,7 @@ function si(e) {
1089
1087
  if (!i || !o || h)
1090
1088
  return;
1091
1089
  function g(C) {
1092
- i && tt(C) && (C.type === "focusin" ? En : ni)(i);
1090
+ i && tt(C) && (C.type === "focusin" ? En : ti)(i);
1093
1091
  }
1094
1092
  return i.addEventListener("focusin", g, !0), i.addEventListener("focusout", g, !0), () => {
1095
1093
  i.removeEventListener("focusin", g, !0), i.removeEventListener("focusout", g, !0);
@@ -1145,7 +1143,7 @@ function zt(e) {
1145
1143
  Fe = Fe.filter((t) => t.isConnected);
1146
1144
  let r = e;
1147
1145
  if (!(!r || Et(r) === "body")) {
1148
- if (!Do(r, Ge())) {
1146
+ if (!Po(r, Ge())) {
1149
1147
  const t = nt(r, Ge())[0];
1150
1148
  t && (r = t);
1151
1149
  }
@@ -1155,7 +1153,7 @@ function zt(e) {
1155
1153
  function Sn() {
1156
1154
  return Fe.slice().reverse().find((e) => e.isConnected);
1157
1155
  }
1158
- const ai = /* @__PURE__ */ p.forwardRef(function(r, t) {
1156
+ const si = /* @__PURE__ */ p.forwardRef(function(r, t) {
1159
1157
  return /* @__PURE__ */ p.createElement("button", xt({}, r, {
1160
1158
  type: "button",
1161
1159
  ref: t,
@@ -1163,7 +1161,7 @@ const ai = /* @__PURE__ */ p.forwardRef(function(r, t) {
1163
1161
  style: en
1164
1162
  }));
1165
1163
  });
1166
- function li(e) {
1164
+ function ai(e) {
1167
1165
  const {
1168
1166
  context: r,
1169
1167
  children: t,
@@ -1188,7 +1186,7 @@ function li(e) {
1188
1186
  domReference: b,
1189
1187
  floating: w
1190
1188
  }
1191
- } = r, _ = typeof s == "number" && s < 0, M = nr(b) && _, j = Qo() ? i : !0, $ = Pe(o), Z = Pe(s), G = Pe(a), q = It(), S = mr(), N = p.useRef(null), P = p.useRef(null), E = p.useRef(!1), D = p.useRef(!1), B = p.useRef(-1), k = S != null, R = pr(w), U = Ce(function(z) {
1189
+ } = r, _ = typeof s == "number" && s < 0, k = nr(b) && _, j = Jo() ? i : !0, $ = Pe(o), Z = Pe(s), X = Pe(a), q = It(), S = mr(), N = p.useRef(null), P = p.useRef(null), E = p.useRef(!1), D = p.useRef(!1), B = p.useRef(-1), M = S != null, R = pr(w), U = Ce(function(z) {
1192
1190
  return z === void 0 && (z = R), z ? nt(z, Ge()) : [];
1193
1191
  }), te = Ce((z) => {
1194
1192
  const T = U(z);
@@ -1200,7 +1198,7 @@ function li(e) {
1200
1198
  if (n || !c) return;
1201
1199
  function z(O) {
1202
1200
  if (O.key === "Tab") {
1203
- de(R, Se(be(R))) && U().length === 0 && !M && fe(O);
1201
+ de(R, Se(be(R))) && U().length === 0 && !k && fe(O);
1204
1202
  const F = te(), H = Le(O);
1205
1203
  $.current[0] === "reference" && H === b && (fe(O), O.shiftKey ? Ne(F[F.length - 1]) : Ne(F[1])), $.current[1] === "floating" && H === R && O.shiftKey && (fe(O), Ne(F[0]));
1206
1204
  }
@@ -1209,7 +1207,7 @@ function li(e) {
1209
1207
  return T.addEventListener("keydown", z), () => {
1210
1208
  T.removeEventListener("keydown", z);
1211
1209
  };
1212
- }, [n, b, R, c, $, M, U, te]), p.useEffect(() => {
1210
+ }, [n, b, R, c, $, k, U, te]), p.useEffect(() => {
1213
1211
  if (n || !w) return;
1214
1212
  function z(T) {
1215
1213
  const O = Le(T), H = U().indexOf(O);
@@ -1231,7 +1229,7 @@ function li(e) {
1231
1229
  const H = !(de(b, F) || de(w, F) || de(F, w) || de(S?.portalNode, F) || F != null && F.hasAttribute(Xe("focus-guard")) || q && (We(q.nodesRef.current, m).find((ee) => {
1232
1230
  var ne, Y;
1233
1231
  return de((ne = ee.context) == null ? void 0 : ne.elements.floating, F) || de((Y = ee.context) == null ? void 0 : Y.elements.domReference, F);
1234
- }) || Zo(q.nodesRef.current, m).find((ee) => {
1232
+ }) || Yo(q.nodesRef.current, m).find((ee) => {
1235
1233
  var ne, Y;
1236
1234
  return ((ne = ee.context) == null ? void 0 : ne.elements.floating) === F || ((Y = ee.context) == null ? void 0 : Y.elements.domReference) === F;
1237
1235
  })));
@@ -1240,7 +1238,7 @@ function li(e) {
1240
1238
  const ee = B.current, ne = U(), Y = ne[ee] || ne[ne.length - 1] || R;
1241
1239
  Oe(Y) && Y.focus();
1242
1240
  }
1243
- (M || !c) && F && H && !D.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
1241
+ (k || !c) && F && H && !D.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
1244
1242
  F !== Sn() && (E.current = !0, g(!1, O, "focus-out"));
1245
1243
  });
1246
1244
  }
@@ -1248,17 +1246,17 @@ function li(e) {
1248
1246
  return b.addEventListener("focusout", T), b.addEventListener("pointerdown", z), w.addEventListener("focusout", T), () => {
1249
1247
  b.removeEventListener("focusout", T), b.removeEventListener("pointerdown", z), w.removeEventListener("focusout", T);
1250
1248
  };
1251
- }, [n, b, w, R, c, m, q, S, g, d, l, U, M]), p.useEffect(() => {
1249
+ }, [n, b, w, R, c, m, q, S, g, d, l, U, k]), p.useEffect(() => {
1252
1250
  var z;
1253
1251
  if (n) return;
1254
1252
  const T = Array.from((S == null || (z = S.portalNode) == null ? void 0 : z.querySelectorAll("[" + Xe("portal") + "]")) || []);
1255
1253
  if (w) {
1256
- const O = [w, ...T, N.current, P.current, $.current.includes("reference") || M ? b : null].filter((H) => H != null), F = c || M ? Cn(O, j, !j) : Cn(O);
1254
+ const O = [w, ...T, N.current, P.current, $.current.includes("reference") || k ? b : null].filter((H) => H != null), F = c || k ? Cn(O, j, !j) : Cn(O);
1257
1255
  return () => {
1258
1256
  F();
1259
1257
  };
1260
1258
  }
1261
- }, [n, b, w, c, $, S, M, j]), Q(() => {
1259
+ }, [n, b, w, c, $, S, k, j]), Q(() => {
1262
1260
  if (n || !Oe(R)) return;
1263
1261
  const z = be(R), T = Se(z);
1264
1262
  queueMicrotask(() => {
@@ -1293,8 +1291,8 @@ function li(e) {
1293
1291
  const J = ee || O, Re = nt(be(J).body, Ge());
1294
1292
  queueMicrotask(() => {
1295
1293
  let me = Sn();
1296
- !me && Oe(J) && w && (me = ri(Re, J, w)), // eslint-disable-next-line react-hooks/exhaustive-deps
1297
- G.current && !E.current && Oe(me) && // If the focus moved somewhere else after mount, avoid returning focus
1294
+ !me && Oe(J) && w && (me = ni(Re, J, w)), // eslint-disable-next-line react-hooks/exhaustive-deps
1295
+ X.current && !E.current && Oe(me) && // If the focus moved somewhere else after mount, avoid returning focus
1298
1296
  // since it likely entered a different element which should be
1299
1297
  // respected: https://github.com/floating-ui/floating-ui/issues/2607
1300
1298
  (!(me !== Y && Y !== T.body) || Ie) && me.focus({
@@ -1302,7 +1300,7 @@ function li(e) {
1302
1300
  });
1303
1301
  });
1304
1302
  };
1305
- }, [n, w, R, G, x, u, C, q, m]), Q(() => {
1303
+ }, [n, w, R, X, x, u, C, q, m]), Q(() => {
1306
1304
  if (!n && S)
1307
1305
  return S.setFocusManagerState({
1308
1306
  modal: c,
@@ -1330,12 +1328,12 @@ function li(e) {
1330
1328
  };
1331
1329
  }, [n, w, R, u, $, U, _]);
1332
1330
  function xe(z) {
1333
- return n || !f || !c ? null : /* @__PURE__ */ p.createElement(ai, {
1331
+ return n || !f || !c ? null : /* @__PURE__ */ p.createElement(si, {
1334
1332
  ref: z === "start" ? N : P,
1335
1333
  onClick: (T) => g(!1, T.nativeEvent)
1336
1334
  }, typeof f == "string" ? f : "Dismiss");
1337
1335
  }
1338
- const he = !n && j && (c ? !M : !0) && (k || c);
1336
+ const he = !n && j && (c ? !k : !0) && (M || c);
1339
1337
  return /* @__PURE__ */ p.createElement(p.Fragment, null, he && /* @__PURE__ */ p.createElement(wt, {
1340
1338
  "data-type": "inside",
1341
1339
  ref: S?.beforeInsideRef,
@@ -1352,7 +1350,7 @@ function li(e) {
1352
1350
  (T = S.beforeOutsideRef.current) == null || T.focus();
1353
1351
  }
1354
1352
  }
1355
- }), !M && xe("start"), t, xe("end"), he && /* @__PURE__ */ p.createElement(wt, {
1353
+ }), !k && xe("start"), t, xe("end"), he && /* @__PURE__ */ p.createElement(wt, {
1356
1354
  "data-type": "inside",
1357
1355
  ref: S?.afterInsideRef,
1358
1356
  onFocus: (z) => {
@@ -1369,11 +1367,11 @@ function li(e) {
1369
1367
  }
1370
1368
  }));
1371
1369
  }
1372
- const ci = {
1370
+ const li = {
1373
1371
  pointerdown: "onPointerDown",
1374
1372
  mousedown: "onMouseDown",
1375
1373
  click: "onClick"
1376
- }, ui = {
1374
+ }, ci = {
1377
1375
  pointerdown: "onPointerDownCapture",
1378
1376
  mousedown: "onMouseDownCapture",
1379
1377
  click: "onClickCapture"
@@ -1384,7 +1382,7 @@ const ci = {
1384
1382
  outsidePress: typeof e == "boolean" ? e : (t = e?.outsidePress) != null ? t : !0
1385
1383
  };
1386
1384
  };
1387
- function di(e, r) {
1385
+ function ui(e, r) {
1388
1386
  r === void 0 && (r = {});
1389
1387
  const {
1390
1388
  open: t,
@@ -1405,7 +1403,7 @@ function di(e, r) {
1405
1403
  escapeKey: w,
1406
1404
  outsidePress: _
1407
1405
  } = Tn(u), {
1408
- escapeKey: M,
1406
+ escapeKey: k,
1409
1407
  outsidePress: j
1410
1408
  } = Tn(m), $ = Ce((P) => {
1411
1409
  var E;
@@ -1413,17 +1411,17 @@ function di(e, r) {
1413
1411
  return;
1414
1412
  const D = (E = i.current.floatingContext) == null ? void 0 : E.nodeId, B = g ? We(g.nodesRef.current, D) : [];
1415
1413
  if (!w && (P.stopPropagation(), B.length > 0)) {
1416
- let k = !0;
1414
+ let M = !0;
1417
1415
  if (B.forEach((R) => {
1418
1416
  var U;
1419
1417
  if ((U = R.context) != null && U.open && !R.context.dataRef.current.__escapeKeyBubbles) {
1420
- k = !1;
1418
+ M = !1;
1421
1419
  return;
1422
1420
  }
1423
- }), !k)
1421
+ }), !M)
1424
1422
  return;
1425
1423
  }
1426
- n(!1, uo(P) ? P.nativeEvent : P, "escape-key");
1424
+ n(!1, co(P) ? P.nativeEvent : P, "escape-key");
1427
1425
  }), Z = Ce((P) => {
1428
1426
  var E;
1429
1427
  const D = () => {
@@ -1431,30 +1429,30 @@ function di(e, r) {
1431
1429
  $(P), (B = Le(P)) == null || B.removeEventListener("keydown", D);
1432
1430
  };
1433
1431
  (E = Le(P)) == null || E.addEventListener("keydown", D);
1434
- }), G = Ce((P) => {
1432
+ }), X = Ce((P) => {
1435
1433
  var E;
1436
1434
  const D = y.current;
1437
1435
  y.current = !1;
1438
1436
  const B = b.current;
1439
1437
  if (b.current = !1, c === "click" && B || D || typeof x == "function" && !x(P))
1440
1438
  return;
1441
- const k = Le(P), R = "[" + Xe("inert") + "]", U = be(o.floating).querySelectorAll(R);
1442
- let te = ge(k) ? k : null;
1439
+ const M = Le(P), R = "[" + Xe("inert") + "]", U = be(o.floating).querySelectorAll(R);
1440
+ let te = ge(M) ? M : null;
1443
1441
  for (; te && !mn(te); ) {
1444
- const T = ao(te);
1442
+ const T = so(te);
1445
1443
  if (mn(T) || !ge(T))
1446
1444
  break;
1447
1445
  te = T;
1448
1446
  }
1449
- if (U.length && ge(k) && !fo(k) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
1450
- !de(k, o.floating) && // If the target root element contains none of the markers, then the
1447
+ if (U.length && ge(M) && !uo(M) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
1448
+ !de(M, o.floating) && // If the target root element contains none of the markers, then the
1451
1449
  // element was injected after the floating element rendered.
1452
1450
  Array.from(U).every((T) => !de(te, T)))
1453
1451
  return;
1454
- if (Oe(k) && N) {
1455
- const T = k.clientWidth > 0 && k.scrollWidth > k.clientWidth, O = k.clientHeight > 0 && k.scrollHeight > k.clientHeight;
1456
- let F = O && P.offsetX > k.clientWidth;
1457
- if (O && so(k).direction === "rtl" && (F = P.offsetX <= k.offsetWidth - k.clientWidth), F || T && P.offsetY > k.clientHeight)
1452
+ if (Oe(M) && N) {
1453
+ const T = M.clientWidth > 0 && M.scrollWidth > M.clientWidth, O = M.clientHeight > 0 && M.scrollHeight > M.clientHeight;
1454
+ let F = O && P.offsetX > M.clientWidth;
1455
+ if (O && io(M).direction === "rtl" && (F = P.offsetX <= M.offsetWidth - M.clientWidth), F || T && P.offsetY > M.clientHeight)
1458
1456
  return;
1459
1457
  }
1460
1458
  const xe = (E = i.current.floatingContext) == null ? void 0 : E.nodeId, he = g && We(g.nodesRef.current, xe).some((T) => {
@@ -1480,7 +1478,7 @@ function di(e, r) {
1480
1478
  var E;
1481
1479
  const D = () => {
1482
1480
  var B;
1483
- G(P), (B = Le(P)) == null || B.removeEventListener(c, D);
1481
+ X(P), (B = Le(P)) == null || B.removeEventListener(c, D);
1484
1482
  };
1485
1483
  (E = Le(P)) == null || E.addEventListener(c, D);
1486
1484
  });
@@ -1492,26 +1490,26 @@ function di(e, r) {
1492
1490
  n(!1, B, "ancestor-scroll");
1493
1491
  }
1494
1492
  const E = be(o.floating);
1495
- a && E.addEventListener("keydown", M ? Z : $, M), x && E.addEventListener(c, j ? q : G, j);
1493
+ a && E.addEventListener("keydown", k ? Z : $, k), x && E.addEventListener(c, j ? q : X, j);
1496
1494
  let D = [];
1497
- return h && (ge(o.domReference) && (D = Mt(o.domReference)), ge(o.floating) && (D = D.concat(Mt(o.floating))), !ge(o.reference) && o.reference && o.reference.contextElement && (D = D.concat(Mt(o.reference.contextElement)))), D = D.filter((B) => {
1498
- var k;
1499
- return B !== ((k = E.defaultView) == null ? void 0 : k.visualViewport);
1495
+ return h && (ge(o.domReference) && (D = kt(o.domReference)), ge(o.floating) && (D = D.concat(kt(o.floating))), !ge(o.reference) && o.reference && o.reference.contextElement && (D = D.concat(kt(o.reference.contextElement)))), D = D.filter((B) => {
1496
+ var M;
1497
+ return B !== ((M = E.defaultView) == null ? void 0 : M.visualViewport);
1500
1498
  }), D.forEach((B) => {
1501
1499
  B.addEventListener("scroll", P, {
1502
1500
  passive: !0
1503
1501
  });
1504
1502
  }), () => {
1505
- a && E.removeEventListener("keydown", M ? Z : $, M), x && E.removeEventListener(c, j ? q : G, j), D.forEach((B) => {
1503
+ a && E.removeEventListener("keydown", k ? Z : $, k), x && E.removeEventListener(c, j ? q : X, j), D.forEach((B) => {
1506
1504
  B.removeEventListener("scroll", P);
1507
1505
  });
1508
1506
  };
1509
- }, [i, o, a, x, c, t, n, h, s, w, _, $, M, Z, G, j, q]), p.useEffect(() => {
1507
+ }, [i, o, a, x, c, t, n, h, s, w, _, $, k, Z, X, j, q]), p.useEffect(() => {
1510
1508
  y.current = !1;
1511
1509
  }, [x, c]);
1512
1510
  const S = p.useMemo(() => ({
1513
1511
  onKeyDown: $,
1514
- [ci[d]]: (P) => {
1512
+ [li[d]]: (P) => {
1515
1513
  f && n(!1, P.nativeEvent, "reference-press");
1516
1514
  }
1517
1515
  }), [$, n, f, d]), N = p.useMemo(() => ({
@@ -1522,7 +1520,7 @@ function di(e, r) {
1522
1520
  onMouseUp() {
1523
1521
  b.current = !0;
1524
1522
  },
1525
- [ui[c]]: () => {
1523
+ [ci[c]]: () => {
1526
1524
  y.current = !0;
1527
1525
  }
1528
1526
  }), [$, c]);
@@ -1531,15 +1529,15 @@ function di(e, r) {
1531
1529
  floating: N
1532
1530
  } : {}, [s, S, N]);
1533
1531
  }
1534
- function fi(e) {
1532
+ function di(e) {
1535
1533
  const {
1536
1534
  open: r = !1,
1537
1535
  onOpenChange: t,
1538
1536
  elements: n
1539
- } = e, o = Jt(), i = p.useRef({}), [s] = p.useState(() => Xo()), a = Qt() != null;
1537
+ } = e, o = Jt(), i = p.useRef({}), [s] = p.useState(() => Uo()), a = Qt() != null;
1540
1538
  if (process.env.NODE_ENV !== "production") {
1541
1539
  const u = n.reference;
1542
- u && !ge(u) && Uo("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
1540
+ u && !ge(u) && Ho("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
1543
1541
  }
1544
1542
  const [l, c] = p.useState(n.reference), f = Ce((u, m, g) => {
1545
1543
  i.current.openEvent = u ? m : void 0, s.emit("openchange", {
@@ -1565,11 +1563,11 @@ function fi(e) {
1565
1563
  refs: d
1566
1564
  }), [r, f, h, s, o, d]);
1567
1565
  }
1568
- function hi(e) {
1566
+ function fi(e) {
1569
1567
  e === void 0 && (e = {});
1570
1568
  const {
1571
1569
  nodeId: r
1572
- } = e, t = fi({
1570
+ } = e, t = di({
1573
1571
  ...e,
1574
1572
  elements: {
1575
1573
  reference: null,
@@ -1580,7 +1578,7 @@ function hi(e) {
1580
1578
  Q(() => {
1581
1579
  f && (d.current = f);
1582
1580
  }, [f]);
1583
- const u = Ao({
1581
+ const u = Do({
1584
1582
  ...e,
1585
1583
  elements: {
1586
1584
  ...o,
@@ -1625,14 +1623,14 @@ function hi(e) {
1625
1623
  elements: x
1626
1624
  }), [u, C, x, y]);
1627
1625
  }
1628
- const kn = "active", Mn = "selected";
1626
+ const Mn = "active", kn = "selected";
1629
1627
  function Vt(e, r, t) {
1630
1628
  const n = /* @__PURE__ */ new Map(), o = t === "item";
1631
1629
  let i = e;
1632
1630
  if (o && e) {
1633
1631
  const {
1634
- [kn]: s,
1635
- [Mn]: a,
1632
+ [Mn]: s,
1633
+ [kn]: a,
1636
1634
  ...l
1637
1635
  } = e;
1638
1636
  i = l;
@@ -1648,7 +1646,7 @@ function Vt(e, r, t) {
1648
1646
  return typeof a == "function" ? e ? a(e) : null : a;
1649
1647
  }).concat(e).reduce((s, a) => (a && Object.entries(a).forEach((l) => {
1650
1648
  let [c, f] = l;
1651
- if (!(o && [kn, Mn].includes(c)))
1649
+ if (!(o && [Mn, kn].includes(c)))
1652
1650
  if (c.indexOf("on") === 0) {
1653
1651
  if (n.has(c) || n.set(c, []), typeof f == "function") {
1654
1652
  var d;
@@ -1663,7 +1661,7 @@ function Vt(e, r, t) {
1663
1661
  }), s), {})
1664
1662
  };
1665
1663
  }
1666
- function mi(e) {
1664
+ function hi(e) {
1667
1665
  e === void 0 && (e = []);
1668
1666
  const r = e.map((a) => a?.reference), t = e.map((a) => a?.floating), n = e.map((a) => a?.item), o = p.useCallback(
1669
1667
  (a) => Vt(a, e, "reference"),
@@ -1701,13 +1699,13 @@ function Pn(e, r) {
1701
1699
  function Bt(e, r, t) {
1702
1700
  return Rt(r, e === st, t ? e === Ue : e === Ze) || e === "Enter" || e === " " || e === "";
1703
1701
  }
1704
- function pi(e, r, t) {
1702
+ function mi(e, r, t) {
1705
1703
  return Rt(r, t ? e === Ue : e === Ze, e === st);
1706
1704
  }
1707
1705
  function Dn(e, r, t) {
1708
1706
  return Rt(r, t ? e === Ze : e === Ue, e === Zt);
1709
1707
  }
1710
- function bi(e, r) {
1708
+ function pi(e, r) {
1711
1709
  const {
1712
1710
  open: t,
1713
1711
  onOpenChange: n,
@@ -1731,15 +1729,15 @@ function bi(e, r) {
1731
1729
  orientation: b = "vertical",
1732
1730
  cols: w = 1,
1733
1731
  scrollItemIntoView: _ = !0,
1734
- virtualItemRef: M,
1732
+ virtualItemRef: k,
1735
1733
  itemSizes: j,
1736
1734
  dense: $ = !1
1737
1735
  } = r;
1738
1736
  process.env.NODE_ENV !== "production" && (f && (d || Ft("`useListNavigation` looping must be enabled to allow escaping."), m || Ft("`useListNavigation` must be virtual to allow escaping.")), b === "vertical" && w > 1 && Ft("In grid list navigation mode (`cols` > 1), the `orientation` should", 'be either "horizontal" or "both".'));
1739
- const Z = pr(o.floating), G = Pe(Z), q = Qt(), S = It(), N = Ce(a), P = p.useRef(g), E = p.useRef(c ?? -1), D = p.useRef(null), B = p.useRef(!0), k = p.useRef(N), R = p.useRef(!!o.floating), U = p.useRef(t), te = p.useRef(!1), xe = p.useRef(!1), he = Pe(y), z = Pe(t), T = Pe(_), O = Pe(c), [F, H] = p.useState(), [ee, ne] = p.useState(), Y = Ce(function(L, V, I) {
1737
+ const Z = pr(o.floating), X = Pe(Z), q = Qt(), S = It(), N = Ce(a), P = p.useRef(g), E = p.useRef(c ?? -1), D = p.useRef(null), B = p.useRef(!0), M = p.useRef(N), R = p.useRef(!!o.floating), U = p.useRef(t), te = p.useRef(!1), xe = p.useRef(!1), he = Pe(y), z = Pe(t), T = Pe(_), O = Pe(c), [F, H] = p.useState(), [ee, ne] = p.useState(), Y = Ce(function(L, V, I) {
1740
1738
  I === void 0 && (I = !1);
1741
1739
  function W(K) {
1742
- m ? (H(K.id), S?.events.emit("virtualfocus", K), M && (M.current = K)) : Ne(K, {
1740
+ m ? (H(K.id), S?.events.emit("virtualfocus", K), k && (k.current = K)) : Ne(K, {
1743
1741
  preventScroll: !0,
1744
1742
  // Mac Safari does not move the virtual cursor unless the focus call
1745
1743
  // is sync. However, for the very first focus call, we need to wait
@@ -1749,14 +1747,14 @@ function bi(e, r) {
1749
1747
  // subsequent calls. `preventScroll` is supported in modern Safari,
1750
1748
  // so we can use that instead.
1751
1749
  // iOS Safari must be async or the first item will not be focused.
1752
- sync: lo() && tr() ? Nn || te.current : !1
1750
+ sync: ao() && tr() ? Nn || te.current : !1
1753
1751
  });
1754
1752
  }
1755
- const ae = L.current[V.current];
1756
- ae && W(ae), requestAnimationFrame(() => {
1757
- const K = L.current[V.current] || ae;
1753
+ const se = L.current[V.current];
1754
+ se && W(se), requestAnimationFrame(() => {
1755
+ const K = L.current[V.current] || se;
1758
1756
  if (!K) return;
1759
- ae || W(K);
1757
+ se || W(K);
1760
1758
  const re = T.current;
1761
1759
  re && Ee && (I || !B.current) && (K.scrollIntoView == null || K.scrollIntoView(typeof re == "boolean" ? {
1762
1760
  block: "nearest",
@@ -1771,7 +1769,7 @@ function bi(e, r) {
1771
1769
  }
1772
1770
  });
1773
1771
  }, []), Q(() => {
1774
- l && (t && o.floating ? P.current && c != null && (xe.current = !0, E.current = c, N(c)) : R.current && (E.current = -1, k.current(null)));
1772
+ l && (t && o.floating ? P.current && c != null && (xe.current = !0, E.current = c, N(c)) : R.current && (E.current = -1, M.current(null)));
1775
1773
  }, [l, t, o.floating, c, N]), Q(() => {
1776
1774
  if (l && t && o.floating)
1777
1775
  if (s == null) {
@@ -1789,20 +1787,20 @@ function bi(e, r) {
1789
1787
  var L;
1790
1788
  if (!l || o.floating || !S || m || !R.current)
1791
1789
  return;
1792
- const V = S.nodesRef.current, I = (L = V.find((K) => K.id === q)) == null || (L = L.context) == null ? void 0 : L.elements.floating, W = Se(be(o.floating)), ae = V.some((K) => K.context && de(K.context.elements.floating, W));
1793
- I && !ae && B.current && I.focus({
1790
+ const V = S.nodesRef.current, I = (L = V.find((K) => K.id === q)) == null || (L = L.context) == null ? void 0 : L.elements.floating, W = Se(be(o.floating)), se = V.some((K) => K.context && de(K.context.elements.floating, W));
1791
+ I && !se && B.current && I.focus({
1794
1792
  preventScroll: !0
1795
1793
  });
1796
1794
  }, [l, o.floating, S, q, m]), Q(() => {
1797
1795
  if (!l || !S || !m || q) return;
1798
1796
  function L(V) {
1799
- ne(V.id), M && (M.current = V);
1797
+ ne(V.id), k && (k.current = V);
1800
1798
  }
1801
1799
  return S.events.on("virtualfocus", L), () => {
1802
1800
  S.events.off("virtualfocus", L);
1803
1801
  };
1804
- }, [l, S, m, q, M]), Q(() => {
1805
- k.current = N, R.current = !!o.floating;
1802
+ }, [l, S, m, q, k]), Q(() => {
1803
+ M.current = N, R.current = !!o.floating;
1806
1804
  }), Q(() => {
1807
1805
  t || (D.current = null);
1808
1806
  }, [t]), Q(() => {
@@ -1841,14 +1839,14 @@ function bi(e, r) {
1841
1839
  let {
1842
1840
  pointerType: W
1843
1841
  } = I;
1844
- !B.current || W === "touch" || (E.current = -1, Y(i, E), N(null), m || Ne(G.current, {
1842
+ !B.current || W === "touch" || (E.current = -1, Y(i, E), N(null), m || Ne(X.current, {
1845
1843
  preventScroll: !0
1846
1844
  }));
1847
1845
  }
1848
1846
  }
1849
1847
  };
1850
- }, [t, G, Y, C, i, N, m]), J = Ce((L) => {
1851
- if (B.current = !1, te.current = !0, !z.current && L.currentTarget === G.current)
1848
+ }, [t, X, Y, C, i, N, m]), J = Ce((L) => {
1849
+ if (B.current = !1, te.current = !0, !z.current && L.currentTarget === X.current)
1852
1850
  return;
1853
1851
  if (h && Dn(L.key, b, u)) {
1854
1852
  fe(L), n(!1, L.nativeEvent, "list-navigation"), Oe(o.domReference) && !m && o.domReference.focus();
@@ -1856,12 +1854,12 @@ function bi(e, r) {
1856
1854
  }
1857
1855
  const V = E.current, I = _t(i, y), W = vn(i, y);
1858
1856
  if (L.key === "Home" && (fe(L), E.current = I, N(E.current)), L.key === "End" && (fe(L), E.current = W, N(E.current)), w > 1) {
1859
- const ae = j || Array.from({
1857
+ const se = j || Array.from({
1860
1858
  length: i.current.length
1861
1859
  }, () => ({
1862
1860
  width: 1,
1863
1861
  height: 1
1864
- })), K = jo(ae, w, $), re = K.findIndex((we) => we != null && !mt(i.current, we, y)), je = K.reduce((we, ke, lt) => ke != null && !mt(i.current, ke, y) ? lt : we, -1), Je = K[Bo({
1862
+ })), K = Bo(se, w, $), re = K.findIndex((we) => we != null && !mt(i.current, we, y)), je = K.reduce((we, Me, lt) => Me != null && !mt(i.current, Me, y) ? lt : we, -1), Je = K[Vo({
1865
1863
  current: K.map((we) => we != null ? i.current[we] : null)
1866
1864
  }, {
1867
1865
  event: L,
@@ -1870,12 +1868,12 @@ function bi(e, r) {
1870
1868
  cols: w,
1871
1869
  // treat undefined (empty grid spaces) as disabled indices so we
1872
1870
  // don't end up in them
1873
- disabledIndices: Ko([...y || i.current.map((we, ke) => mt(i.current, ke) ? ke : void 0), void 0], K),
1871
+ disabledIndices: $o([...y || i.current.map((we, Me) => mt(i.current, Me) ? Me : void 0), void 0], K),
1874
1872
  minIndex: re,
1875
1873
  maxIndex: je,
1876
- prevIndex: $o(
1874
+ prevIndex: jo(
1877
1875
  E.current > W ? I : E.current,
1878
- ae,
1876
+ se,
1879
1877
  K,
1880
1878
  w,
1881
1879
  // use a corner matching the edge closest to the direction
@@ -1893,17 +1891,17 @@ function bi(e, r) {
1893
1891
  E.current = Bt(L.key, b, u) ? I : W, N(E.current);
1894
1892
  return;
1895
1893
  }
1896
- Bt(L.key, b, u) ? d ? E.current = V >= W ? f && V !== i.current.length ? -1 : I : le(i, {
1894
+ Bt(L.key, b, u) ? d ? E.current = V >= W ? f && V !== i.current.length ? -1 : I : ae(i, {
1897
1895
  startingIndex: V,
1898
1896
  disabledIndices: y
1899
- }) : E.current = Math.min(W, le(i, {
1897
+ }) : E.current = Math.min(W, ae(i, {
1900
1898
  startingIndex: V,
1901
1899
  disabledIndices: y
1902
- })) : d ? E.current = V <= I ? f && V !== -1 ? i.current.length : W : le(i, {
1900
+ })) : d ? E.current = V <= I ? f && V !== -1 ? i.current.length : W : ae(i, {
1903
1901
  startingIndex: V,
1904
1902
  decrement: !0,
1905
1903
  disabledIndices: y
1906
- }) : E.current = Math.max(I, le(i, {
1904
+ }) : E.current = Math.max(I, ae(i, {
1907
1905
  startingIndex: V,
1908
1906
  decrement: !0,
1909
1907
  disabledIndices: y
@@ -1929,22 +1927,22 @@ function bi(e, r) {
1929
1927
  ...Re,
1930
1928
  onKeyDown(I) {
1931
1929
  B.current = !1;
1932
- const W = I.key.indexOf("Arrow") === 0, ae = pi(I.key, b, u), K = Dn(I.key, b, u), re = Pn(I.key, b), je = (h ? ae : re) || I.key === "Enter" || I.key.trim() === "";
1930
+ const W = I.key.indexOf("Arrow") === 0, se = mi(I.key, b, u), K = Dn(I.key, b, u), re = Pn(I.key, b), je = (h ? se : re) || I.key === "Enter" || I.key.trim() === "";
1933
1931
  if (m && t) {
1934
- const lt = S?.nodesRef.current.find((ct) => ct.parentId == null), Me = S && lt ? Jo(S.nodesRef.current, lt.id) : null;
1935
- if (W && Me && M) {
1932
+ const lt = S?.nodesRef.current.find((ct) => ct.parentId == null), ke = S && lt ? Zo(S.nodesRef.current, lt.id) : null;
1933
+ if (W && ke && k) {
1936
1934
  const ct = new KeyboardEvent("keydown", {
1937
1935
  key: I.key,
1938
1936
  bubbles: !0
1939
1937
  });
1940
- if (ae || K) {
1938
+ if (se || K) {
1941
1939
  var Je, we;
1942
- const zr = ((Je = Me.context) == null ? void 0 : Je.elements.domReference) === I.currentTarget, un = K && !zr ? (we = Me.context) == null ? void 0 : we.elements.domReference : ae ? i.current.find((dn) => dn?.id === F) : null;
1940
+ const zr = ((Je = ke.context) == null ? void 0 : Je.elements.domReference) === I.currentTarget, un = K && !zr ? (we = ke.context) == null ? void 0 : we.elements.domReference : se ? i.current.find((dn) => dn?.id === F) : null;
1943
1941
  un && (fe(I), un.dispatchEvent(ct), ne(void 0));
1944
1942
  }
1945
- if (re && Me.context && Me.context.open && Me.parentId && I.currentTarget !== Me.context.elements.domReference) {
1946
- var ke;
1947
- fe(I), (ke = Me.context.elements.domReference) == null || ke.dispatchEvent(ct);
1943
+ if (re && ke.context && ke.context.open && ke.parentId && I.currentTarget !== ke.context.elements.domReference) {
1944
+ var Me;
1945
+ fe(I), (Me = ke.context.elements.domReference) == null || Me.dispatchEvent(ct);
1948
1946
  return;
1949
1947
  }
1950
1948
  }
@@ -1952,7 +1950,7 @@ function bi(e, r) {
1952
1950
  }
1953
1951
  if (!(!t && !x && W)) {
1954
1952
  if (je && (D.current = h && re ? null : I.key), h) {
1955
- ae && (fe(I), t ? (E.current = _t(i, he.current), N(E.current)) : n(!0, I.nativeEvent, "list-navigation"));
1953
+ se && (fe(I), t ? (E.current = _t(i, he.current), N(E.current)) : n(!0, I.nativeEvent, "list-navigation"));
1956
1954
  return;
1957
1955
  }
1958
1956
  re && (c != null && (E.current = c), fe(I), !t && x ? n(!0, I.nativeEvent, "list-navigation") : J(I), t && N(E.current));
@@ -1965,15 +1963,15 @@ function bi(e, r) {
1965
1963
  onMouseDown: L,
1966
1964
  onClick: L
1967
1965
  };
1968
- }, [F, Re, J, he, g, i, h, N, n, t, x, b, u, c, S, m, M]);
1966
+ }, [F, Re, J, he, g, i, h, N, n, t, x, b, u, c, S, m, k]);
1969
1967
  return p.useMemo(() => l ? {
1970
1968
  reference: _e,
1971
1969
  floating: me,
1972
1970
  item: Ee
1973
1971
  } : {}, [l, _e, me, Ee]);
1974
1972
  }
1975
- const gi = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
1976
- function vi(e, r) {
1973
+ const bi = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
1974
+ function gi(e, r) {
1977
1975
  var t;
1978
1976
  r === void 0 && (r = {});
1979
1977
  const {
@@ -1982,7 +1980,7 @@ function vi(e, r) {
1982
1980
  } = e, {
1983
1981
  enabled: i = !0,
1984
1982
  role: s = "dialog"
1985
- } = r, a = (t = gi.get(s)) != null ? t : s, l = Jt(), f = Qt() != null, d = p.useMemo(() => a === "tooltip" || s === "label" ? {
1983
+ } = r, a = (t = bi.get(s)) != null ? t : s, l = Jt(), f = Qt() != null, d = p.useMemo(() => a === "tooltip" || s === "label" ? {
1986
1984
  ["aria-" + (s === "label" ? "labelledby" : "describedby")]: n ? o : void 0
1987
1985
  } : {
1988
1986
  "aria-expanded": n ? "true" : "false",
@@ -2089,7 +2087,7 @@ function An(e, r) {
2089
2087
  throw new Error("Unexpected undefined");
2090
2088
  return e;
2091
2089
  }
2092
- const yi = (e, r) => Math.abs(e - r) < 1.01, xi = (e, r, t) => {
2090
+ const vi = (e, r) => Math.abs(e - r) < 1.01, yi = (e, r, t) => {
2093
2091
  let n;
2094
2092
  return function(...o) {
2095
2093
  e.clearTimeout(n), n = e.setTimeout(() => r.apply(this, o), t);
@@ -2097,12 +2095,12 @@ const yi = (e, r) => Math.abs(e - r) < 1.01, xi = (e, r, t) => {
2097
2095
  }, _n = (e) => {
2098
2096
  const { offsetWidth: r, offsetHeight: t } = e;
2099
2097
  return { width: r, height: t };
2100
- }, wi = (e) => e, Ci = (e) => {
2098
+ }, xi = (e) => e, wi = (e) => {
2101
2099
  const r = Math.max(e.startIndex - e.overscan, 0), t = Math.min(e.endIndex + e.overscan, e.count - 1), n = [];
2102
2100
  for (let o = r; o <= t; o++)
2103
2101
  n.push(o);
2104
2102
  return n;
2105
- }, Ei = (e, r) => {
2103
+ }, Ci = (e, r) => {
2106
2104
  const t = e.scrollElement;
2107
2105
  if (!t)
2108
2106
  return;
@@ -2135,7 +2133,7 @@ const yi = (e, r) => Math.abs(e - r) < 1.01, xi = (e, r, t) => {
2135
2133
  };
2136
2134
  }, Fn = {
2137
2135
  passive: !0
2138
- }, Ln = typeof window > "u" ? !0 : "onscrollend" in window, Ii = (e, r) => {
2136
+ }, Ln = typeof window > "u" ? !0 : "onscrollend" in window, Ei = (e, r) => {
2139
2137
  const t = e.scrollElement;
2140
2138
  if (!t)
2141
2139
  return;
@@ -2144,7 +2142,7 @@ const yi = (e, r) => Math.abs(e - r) < 1.01, xi = (e, r, t) => {
2144
2142
  return;
2145
2143
  let o = 0;
2146
2144
  const i = e.options.useScrollendEvent && Ln ? () => {
2147
- } : xi(
2145
+ } : yi(
2148
2146
  n,
2149
2147
  () => {
2150
2148
  r(o, !1);
@@ -2159,7 +2157,7 @@ const yi = (e, r) => Math.abs(e - r) < 1.01, xi = (e, r, t) => {
2159
2157
  return c && t.addEventListener("scrollend", l, Fn), () => {
2160
2158
  t.removeEventListener("scroll", a), c && t.removeEventListener("scrollend", l);
2161
2159
  };
2162
- }, Ri = (e, r, t) => {
2160
+ }, Ii = (e, r, t) => {
2163
2161
  if (r?.borderBoxSize) {
2164
2162
  const n = r.borderBoxSize[0];
2165
2163
  if (n)
@@ -2168,7 +2166,7 @@ const yi = (e, r) => Math.abs(e - r) < 1.01, xi = (e, r, t) => {
2168
2166
  );
2169
2167
  }
2170
2168
  return e[t.options.horizontal ? "offsetWidth" : "offsetHeight"];
2171
- }, Oi = (e, {
2169
+ }, Ri = (e, {
2172
2170
  adjustments: r = 0,
2173
2171
  behavior: t
2174
2172
  }, n) => {
@@ -2179,7 +2177,7 @@ const yi = (e, r) => Math.abs(e - r) < 1.01, xi = (e, r, t) => {
2179
2177
  behavior: t
2180
2178
  });
2181
2179
  };
2182
- class Si {
2180
+ class Oi {
2183
2181
  constructor(r) {
2184
2182
  this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.currentScrollToIndex = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.laneAssignments = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.prevLanes = void 0, this.lanesChangedFlag = !1, this.lanesSettling = !1, this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
2185
2183
  let t = null;
@@ -2217,11 +2215,11 @@ class Si {
2217
2215
  scrollPaddingStart: 0,
2218
2216
  scrollPaddingEnd: 0,
2219
2217
  horizontal: !1,
2220
- getItemKey: wi,
2221
- rangeExtractor: Ci,
2218
+ getItemKey: xi,
2219
+ rangeExtractor: wi,
2222
2220
  onChange: () => {
2223
2221
  },
2224
- measureElement: Ri,
2222
+ measureElement: Ii,
2225
2223
  initialRect: { width: 0, height: 0 },
2226
2224
  scrollMargin: 0,
2227
2225
  gap: 0,
@@ -2370,7 +2368,7 @@ class Si {
2370
2368
  this.getScrollOffset(),
2371
2369
  this.options.lanes
2372
2370
  ],
2373
- (t, n, o, i) => this.range = t.length > 0 && n > 0 ? Ti({
2371
+ (t, n, o, i) => this.range = t.length > 0 && n > 0 ? Si({
2374
2372
  measurements: t,
2375
2373
  outerSize: n,
2376
2374
  scrollOffset: o,
@@ -2517,7 +2515,7 @@ class Si {
2517
2515
  console.warn("Failed to get offset for index:", t);
2518
2516
  return;
2519
2517
  }
2520
- yi(g[0], m) || l(h);
2518
+ vi(g[0], m) || l(h);
2521
2519
  };
2522
2520
  this.isDynamicMode() ? this.targetWindow.requestAnimationFrame(u) : u();
2523
2521
  });
@@ -2577,7 +2575,7 @@ const br = (e, r, t, n) => {
2577
2575
  }
2578
2576
  return e > 0 ? e - 1 : 0;
2579
2577
  };
2580
- function Ti({
2578
+ function Si({
2581
2579
  measurements: e,
2582
2580
  outerSize: r,
2583
2581
  scrollOffset: t,
@@ -2614,7 +2612,7 @@ function Ti({
2614
2612
  return { startIndex: s, endIndex: a };
2615
2613
  }
2616
2614
  const zn = typeof document < "u" ? p.useLayoutEffect : p.useEffect;
2617
- function ki({
2615
+ function Ti({
2618
2616
  useFlushSync: e = !0,
2619
2617
  ...r
2620
2618
  }) {
@@ -2625,27 +2623,27 @@ function ki({
2625
2623
  e && s ? Wn(t) : t(), (a = r.onChange) == null || a.call(r, i, s);
2626
2624
  }
2627
2625
  }, [o] = p.useState(
2628
- () => new Si(n)
2626
+ () => new Oi(n)
2629
2627
  );
2630
2628
  return o.setOptions(n), zn(() => o._didMount(), []), zn(() => o._willUpdate()), o;
2631
2629
  }
2632
2630
  function Mi(e) {
2633
- return ki({
2634
- observeElementRect: Ei,
2635
- observeElementOffset: Ii,
2636
- scrollToFn: Oi,
2631
+ return Ti({
2632
+ observeElementRect: Ci,
2633
+ observeElementOffset: Ei,
2634
+ scrollToFn: Ri,
2637
2635
  ...e
2638
2636
  });
2639
2637
  }
2640
2638
  const Ae = De(void 0), gr = De({
2641
2639
  activeIndex: 0
2642
- }), Ni = (e, r) => r.type === "SET_ACTIVE_INDEX" ? {
2640
+ }), ki = (e, r) => r.type === "SET_ACTIVE_INDEX" ? {
2643
2641
  ...e,
2644
2642
  activeIndex: r.payload
2645
2643
  } : e, vr = De(() => {
2646
2644
  throw new Error("ComboboxIdDispatch must be used within a provider");
2647
- }), Pi = ({ children: e }) => {
2648
- const [r, t] = Vr(Ni, {
2645
+ }), Ni = ({ children: e }) => {
2646
+ const [r, t] = Vr(ki, {
2649
2647
  activeIndex: 0
2650
2648
  });
2651
2649
  return v(gr.Provider, { value: r, children: v(vr.Provider, { value: t, children: e }) });
@@ -2659,7 +2657,7 @@ function Ot() {
2659
2657
  const yr = A(({ asChild: e, interactive: r, id: t, className: n, ...o }, i) => {
2660
2658
  if (r && !t)
2661
2659
  throw new Error("If ComboboxCustom is interactive, it must have an id");
2662
- const s = e ? se : "div", a = Ve(), { activeIndex: l } = Ot(), c = oe(Ae);
2660
+ const s = e ? ue : "div", a = Ve(), { activeIndex: l } = Ot(), c = oe(Ae);
2663
2661
  if (!c)
2664
2662
  throw new Error("ComboboxCustom must be used within a Combobox");
2665
2663
  const { customIds: f, setListRef: d, getItemProps: h, size: u } = c, m = ze(() => t && f.indexOf(t) || 0, [t, f]), g = Yt([
@@ -2668,22 +2666,22 @@ const yr = A(({ asChild: e, interactive: r, id: t, className: n, ...o }, i) => {
2668
2666
  },
2669
2667
  i
2670
2668
  ]);
2671
- return v(Te, { "data-size": u, asChild: !0, children: v(s, { ref: g, tabIndex: -1, className: X("ds-combobox__custom", n), id: t || a, role: "option", "aria-selected": l === m, "data-active": l === m, ...qe(["interactive"], o), ...qe(["onClick", "onPointerLeave"], h()) }) });
2669
+ return v(Te, { "data-size": u, asChild: !0, children: v(s, { ref: g, tabIndex: -1, className: G("ds-combobox__custom", n), id: t || a, role: "option", "aria-selected": l === m, "data-active": l === m, ...qe(["interactive"], o), ...qe(["onClick", "onPointerLeave"], h()) }) });
2672
2670
  }), xr = ({ size: e, error: r, formFieldProps: t }) => v("div", { className: "ds-combobox__error-message", id: t.errorId, "aria-live": "polite", "aria-relevant": "additions removals", children: r && v(Xt, { "data-size": e, children: r }) });
2673
2671
  xr.displayName = "ComboboxError";
2674
2672
  let Vn = 0;
2675
- function Di(e) {
2673
+ function Pi(e) {
2676
2674
  const [r, t] = ye(e), n = e || r;
2677
- return ue(() => {
2675
+ return ce(() => {
2678
2676
  r == null && (Vn += 1, t(`aksel-icon-${Vn}`));
2679
2677
  }, [r]), n;
2680
2678
  }
2681
- const Bn = ce.useId;
2679
+ const Bn = le.useId;
2682
2680
  function at(e) {
2683
2681
  var r;
2684
- return Bn !== void 0 ? Bn().replace(/(:)/g, "") : (r = Di(e)) !== null && r !== void 0 ? r : "";
2682
+ return Bn !== void 0 ? Bn().replace(/(:)/g, "") : (r = Pi(e)) !== null && r !== void 0 ? r : "";
2685
2683
  }
2686
- var Ai = function(e, r) {
2684
+ var Di = function(e, r) {
2687
2685
  var t = {};
2688
2686
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && r.indexOf(n) < 0 && (t[n] = e[n]);
2689
2687
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
@@ -2691,17 +2689,17 @@ var Ai = function(e, r) {
2691
2689
  r.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (t[n[o]] = e[n[o]]);
2692
2690
  return t;
2693
2691
  };
2694
- const _i = A((e, r) => {
2695
- var { title: t, titleId: n } = e, o = Ai(e, ["title", "titleId"]);
2692
+ const Ai = A((e, r) => {
2693
+ var { title: t, titleId: n } = e, o = Di(e, ["title", "titleId"]);
2696
2694
  let i = at();
2697
- return i = t ? n || "title-" + i : void 0, ce.createElement(
2695
+ return i = t ? n || "title-" + i : void 0, le.createElement(
2698
2696
  "svg",
2699
2697
  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: r, "aria-labelledby": i }, o),
2700
- t ? ce.createElement("title", { id: i }, t) : null,
2701
- ce.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" })
2698
+ t ? le.createElement("title", { id: i }, t) : null,
2699
+ le.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" })
2702
2700
  );
2703
2701
  });
2704
- var Fi = function(e, r) {
2702
+ var _i = function(e, r) {
2705
2703
  var t = {};
2706
2704
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && r.indexOf(n) < 0 && (t[n] = e[n]);
2707
2705
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
@@ -2709,17 +2707,17 @@ var Fi = function(e, r) {
2709
2707
  r.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (t[n[o]] = e[n[o]]);
2710
2708
  return t;
2711
2709
  };
2712
- const Li = A((e, r) => {
2713
- var { title: t, titleId: n } = e, o = Fi(e, ["title", "titleId"]);
2710
+ const Fi = A((e, r) => {
2711
+ var { title: t, titleId: n } = e, o = _i(e, ["title", "titleId"]);
2714
2712
  let i = at();
2715
- return i = t ? n || "title-" + i : void 0, ce.createElement(
2713
+ return i = t ? n || "title-" + i : void 0, le.createElement(
2716
2714
  "svg",
2717
2715
  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: r, "aria-labelledby": i }, o),
2718
- t ? ce.createElement("title", { id: i }, t) : null,
2719
- ce.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" })
2716
+ t ? le.createElement("title", { id: i }, t) : null,
2717
+ le.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" })
2720
2718
  );
2721
2719
  });
2722
- var zi = function(e, r) {
2720
+ var Li = function(e, r) {
2723
2721
  var t = {};
2724
2722
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && r.indexOf(n) < 0 && (t[n] = e[n]);
2725
2723
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
@@ -2727,17 +2725,17 @@ var zi = function(e, r) {
2727
2725
  r.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (t[n[o]] = e[n[o]]);
2728
2726
  return t;
2729
2727
  };
2730
- const Vi = A((e, r) => {
2731
- var { title: t, titleId: n } = e, o = zi(e, ["title", "titleId"]);
2728
+ const zi = A((e, r) => {
2729
+ var { title: t, titleId: n } = e, o = Li(e, ["title", "titleId"]);
2732
2730
  let i = at();
2733
- return i = t ? n || "title-" + i : void 0, ce.createElement(
2731
+ return i = t ? n || "title-" + i : void 0, le.createElement(
2734
2732
  "svg",
2735
2733
  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: r, "aria-labelledby": i }, o),
2736
- t ? ce.createElement("title", { id: i }, t) : null,
2737
- ce.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" })
2734
+ t ? le.createElement("title", { id: i }, t) : null,
2735
+ le.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" })
2738
2736
  );
2739
2737
  });
2740
- var Bi = function(e, r) {
2738
+ var Vi = function(e, r) {
2741
2739
  var t = {};
2742
2740
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && r.indexOf(n) < 0 && (t[n] = e[n]);
2743
2741
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
@@ -2745,17 +2743,17 @@ var Bi = function(e, r) {
2745
2743
  r.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (t[n[o]] = e[n[o]]);
2746
2744
  return t;
2747
2745
  };
2748
- const ji = A((e, r) => {
2749
- var { title: t, titleId: n } = e, o = Bi(e, ["title", "titleId"]);
2746
+ const Bi = A((e, r) => {
2747
+ var { title: t, titleId: n } = e, o = Vi(e, ["title", "titleId"]);
2750
2748
  let i = at();
2751
- return i = t ? n || "title-" + i : void 0, ce.createElement(
2749
+ return i = t ? n || "title-" + i : void 0, le.createElement(
2752
2750
  "svg",
2753
2751
  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: r, "aria-labelledby": i }, o),
2754
- t ? ce.createElement("title", { id: i }, t) : null,
2755
- ce.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M12 2.25A4.75 4.75 0 0 0 7.25 7v2.25H7A1.75 1.75 0 0 0 5.25 11v9c0 .414.336.75.75.75h12a.75.75 0 0 0 .75-.75v-9A1.75 1.75 0 0 0 17 9.25h-.25V7A4.75 4.75 0 0 0 12 2.25m3.25 7V7a3.25 3.25 0 0 0-6.5 0v2.25zM12 13a1.5 1.5 0 0 0-.75 2.8V17a.75.75 0 0 0 1.5 0v-1.2A1.5 1.5 0 0 0 12 13", clipRule: "evenodd" })
2752
+ t ? le.createElement("title", { id: i }, t) : null,
2753
+ le.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M12 2.25A4.75 4.75 0 0 0 7.25 7v2.25H7A1.75 1.75 0 0 0 5.25 11v9c0 .414.336.75.75.75h12a.75.75 0 0 0 .75-.75v-9A1.75 1.75 0 0 0 17 9.25h-.25V7A4.75 4.75 0 0 0 12 2.25m3.25 7V7a3.25 3.25 0 0 0-6.5 0v2.25zM12 13a1.5 1.5 0 0 0-.75 2.8V17a.75.75 0 0 0 1.5 0v-1.2A1.5 1.5 0 0 0 12 13", clipRule: "evenodd" })
2756
2754
  );
2757
2755
  });
2758
- var $i = function(e, r) {
2756
+ var ji = function(e, r) {
2759
2757
  var t = {};
2760
2758
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && r.indexOf(n) < 0 && (t[n] = e[n]);
2761
2759
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
@@ -2763,21 +2761,21 @@ var $i = function(e, r) {
2763
2761
  r.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (t[n[o]] = e[n[o]]);
2764
2762
  return t;
2765
2763
  };
2766
- const Ki = A((e, r) => {
2767
- var { title: t, titleId: n } = e, o = $i(e, ["title", "titleId"]);
2764
+ const $i = A((e, r) => {
2765
+ var { title: t, titleId: n } = e, o = ji(e, ["title", "titleId"]);
2768
2766
  let i = at();
2769
- return i = t ? n || "title-" + i : void 0, ce.createElement(
2767
+ return i = t ? n || "title-" + i : void 0, le.createElement(
2770
2768
  "svg",
2771
2769
  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: r, "aria-labelledby": i }, o),
2772
- t ? ce.createElement("title", { id: i }, t) : null,
2773
- ce.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" })
2770
+ t ? le.createElement("title", { id: i }, t) : null,
2771
+ le.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" })
2774
2772
  );
2775
2773
  });
2776
- function Wi(e) {
2774
+ function Ki(e) {
2777
2775
  return $n(e) && e.type === yr;
2778
2776
  }
2779
- function qi(e) {
2780
- return Wi(e) && e.props.interactive === !0;
2777
+ function Wi(e) {
2778
+ return Ki(e) && e.props.interactive === !0;
2781
2779
  }
2782
2780
  const wr = "internal-option-", pe = (e) => wr + e, Ht = (e) => e.slice(wr.length), Qe = (e, r) => {
2783
2781
  const t = e.value;
@@ -2785,18 +2783,18 @@ const wr = "internal-option-", pe = (e) => wr + e, Ht = (e) => e.slice(wr.length
2785
2783
  const n = e._valueTracker;
2786
2784
  typeof n < "u" && n.setValue(t), e.dispatchEvent(new Event("change", { bubbles: !0 }));
2787
2785
  }, Cr = A(function({ asChild: r, className: t, ...n }, o) {
2788
- return v(r ? se : "button", { className: X("ds-chip", t), type: r ? void 0 : "button", ref: o, ...n });
2786
+ return v(r ? ue : "button", { className: G("ds-chip", t), type: r ? void 0 : "button", ref: o, ...n });
2789
2787
  }), Er = A(function(r, t) {
2790
2788
  return v(Cr, { "data-removable": !0, ref: t, ...r });
2791
2789
  }), Ir = A(function({ asChild: r, children: t, className: n, "data-size": o, "data-color": i, ...s }, a) {
2792
2790
  const l = s.type ?? "checkbox";
2793
- return ie(r ? se : "label", { className: X("ds-chip", n), "data-size": o, "data-color": i, ref: a, children: [v(ot, { ...s, type: l }), v(Kr, { children: t })] });
2794
- }), Hi = A(function(r, t) {
2791
+ return ie(r ? ue : "label", { className: G("ds-chip", n), "data-size": o, "data-color": i, ref: a, children: [v(ot, { ...s, type: l }), v(Ur, { children: t })] });
2792
+ }), qi = A(function(r, t) {
2795
2793
  return v(Ir, { ref: t, type: "radio", ...r });
2796
2794
  }), St = {
2797
2795
  Button: Cr,
2798
2796
  Checkbox: Ir,
2799
- Radio: Hi,
2797
+ Radio: qi,
2800
2798
  Removable: Er
2801
2799
  };
2802
2800
  St.Button.displayName = "Chip.Button";
@@ -2826,11 +2824,11 @@ const Or = A((e, r) => {
2826
2824
  if (!t)
2827
2825
  throw new Error("ComboboxContext is missing");
2828
2826
  const { readOnly: n, disabled: o, clearButtonLabel: i, handleSelectOption: s } = t;
2829
- return v("button", { ...e, ref: r, disabled: o, className: X("ds-combobox__clear-button", "ds-focus"), onClick: () => {
2827
+ return v("button", { ...e, ref: r, disabled: o, className: G("ds-combobox__clear-button", "ds-focus"), onClick: () => {
2830
2828
  n || o || s({ option: null, clear: !0 });
2831
2829
  }, onKeyDown: (a) => {
2832
2830
  n || o || a.key === "Enter" && (a.stopPropagation(), s({ option: null, clear: !0 }));
2833
- }, type: "button", "aria-label": i, children: v(Ki, { fontSize: "1.5em", title: "Clear selection" }) });
2831
+ }, type: "button", "aria-label": i, children: v($i, { fontSize: "1.5em", title: "Clear selection" }) });
2834
2832
  });
2835
2833
  Or.displayName = "ComboboxClearButton";
2836
2834
  const Sr = ({ hideClearButton: e, listId: r, error: t, hideChips: n, handleKeyDown: o, ...i }) => {
@@ -2839,7 +2837,7 @@ const Sr = ({ hideClearButton: e, listId: r, error: t, hideChips: n, handleKeyDo
2839
2837
  throw new Error("ComboboxContext is missing");
2840
2838
  const c = (E) => {
2841
2839
  a?.({ type: "SET_ACTIVE_INDEX", payload: E });
2842
- }, { forwareddRef: f, readOnly: d, disabled: h, open: u, inputRef: m, refs: g, inputValue: C, multiple: x, selectedOptions: y, formFieldProps: b, htmlSize: w, options: _, setOpen: M, getReferenceProps: j, setInputValue: $, handleSelectOption: Z, size: G } = s, q = Yt([f, m]), S = (E) => {
2840
+ }, { forwareddRef: f, readOnly: d, disabled: h, open: u, inputRef: m, refs: g, inputValue: C, multiple: x, selectedOptions: y, formFieldProps: b, htmlSize: w, options: _, setOpen: k, getReferenceProps: j, setInputValue: $, handleSelectOption: Z, size: X } = s, q = Yt([f, m]), S = (E) => {
2843
2841
  const D = E.target.value;
2844
2842
  $(D), c(0);
2845
2843
  for (const B of Object.values(_))
@@ -2856,7 +2854,7 @@ const Sr = ({ hideClearButton: e, listId: r, error: t, hideChips: n, handleKeyDo
2856
2854
  "aria-haspopup": null,
2857
2855
  /* If we click the wrapper, toggle open, set index to first option, and focus the input */
2858
2856
  onClick(E) {
2859
- h || d || l.current?.contains(E.target) || (M(!u), c(0), m.current?.focus());
2857
+ h || d || l.current?.contains(E.target) || (k(!u), c(0), m.current?.focus());
2860
2858
  },
2861
2859
  /* Handles list navigation */
2862
2860
  onKeyDown: o,
@@ -2865,24 +2863,24 @@ const Sr = ({ hideClearButton: e, listId: r, error: t, hideChips: n, handleKeyDo
2865
2863
  E.key === "Enter" && E.preventDefault();
2866
2864
  }
2867
2865
  });
2868
- return v(jt, { "data-size": G, asChild: !0, children: ie("div", { ...P, "aria-disabled": h ? "true" : void 0, className: X("ds-textfield__input", "ds-combobox__input__wrapper", d && "ds-combobox--readonly", t && "ds-combobox--error"), children: [ie("div", { className: "ds-combobox__chip-and-input", children: [x && !n && v(Rr, {}), v(jt, { "data-size": G, asChild: !0, children: v("input", { ref: q, "aria-activedescendant": P["aria-activedescendant"], readOnly: d, "aria-autocomplete": "list", role: "combobox", "aria-expanded": u, "aria-controls": u ? r : void 0, autoComplete: "off", size: w, value: C, ...qe(["style", "className"], i), ...b.inputProps, className: "ds-combobox__input", onChange: (E) => {
2869
- S(E), !u && M(!0), i.onChange?.(E);
2870
- } }) })] }), N && v(Or, { ref: l }), v("div", { className: "ds-combobox__arrow", children: u ? v(Vi, { title: "arrow up", fontSize: "1.5em" }) : v(Li, { title: "arrow down", fontSize: "1.5em" }) })] }) });
2866
+ return v(jt, { "data-size": X, asChild: !0, children: ie("div", { ...P, "aria-disabled": h ? "true" : void 0, className: G("ds-textfield__input", "ds-combobox__input__wrapper", d && "ds-combobox--readonly", t && "ds-combobox--error"), children: [ie("div", { className: "ds-combobox__chip-and-input", children: [x && !n && v(Rr, {}), v(jt, { "data-size": X, asChild: !0, children: v("input", { ref: q, "aria-activedescendant": P["aria-activedescendant"], readOnly: d, "aria-autocomplete": "list", role: "combobox", "aria-expanded": u, "aria-controls": u ? r : void 0, autoComplete: "off", size: w, value: C, ...qe(["style", "className"], i), ...b.inputProps, className: "ds-combobox__input", onChange: (E) => {
2867
+ S(E), !u && k(!0), i.onChange?.(E);
2868
+ } }) })] }), N && v(Or, { ref: l }), v("div", { className: "ds-combobox__arrow", children: u ? v(zi, { title: "arrow up", fontSize: "1.5em" }) : v(Fi, { title: "arrow down", fontSize: "1.5em" }) })] }) });
2871
2869
  };
2872
2870
  Sr.displayName = "ComboboxInput";
2873
- const Tr = ({ label: e, description: r, hideLabel: t, size: n, readOnly: o, formFieldProps: i }) => ie(Ut, { children: [e && ie(Te, { "data-size": n, htmlFor: i.inputProps.id, className: X("ds-combobox__label", t && "ds-sr-only"), children: [o && v(ji, { "aria-hidden": !0, className: "ds-combobox__readonly__icon" }), e] }), r && v(jt, { asChild: !0, "data-size": n, children: v("div", { id: i.descriptionId, className: X("ds-combobox__description", t && "ds-sr-only"), children: r }) })] });
2871
+ const Tr = ({ label: e, description: r, hideLabel: t, size: n, readOnly: o, formFieldProps: i }) => ie(Ut, { children: [e && ie(Te, { "data-size": n, htmlFor: i.inputProps.id, className: G("ds-combobox__label", t && "ds-sr-only"), children: [o && v(Bi, { "aria-hidden": !0, className: "ds-combobox__readonly__icon" }), e] }), r && v(jt, { asChild: !0, "data-size": n, children: v("div", { id: i.descriptionId, className: G("ds-combobox__description", t && "ds-sr-only"), children: r }) })] });
2874
2872
  Tr.displayName = "ComboboxLabel";
2875
- const kr = ({ selectedOptions: e, multiple: r, name: t }) => {
2873
+ const Mr = ({ selectedOptions: e, multiple: r, name: t }) => {
2876
2874
  const n = Object.keys(e).map((o) => Ht(o));
2877
2875
  return v("select", { name: t, multiple: r, style: { display: "none" }, value: r ? n : n[0], onChange: () => {
2878
2876
  }, children: n.map((o) => v("option", { value: o }, o)) });
2879
2877
  };
2880
- kr.displayName = "ComboboxNative";
2881
- const Mr = A(({ children: e, className: r, ...t }, n) => v("span", { className: X("ds-combobox__option__description", r), ref: n, ...t, children: e }));
2882
- Mr.displayName = "ComboboxOptionDescription";
2883
- const Nr = ({ multiple: e, selected: r }) => v("div", { className: X(e && "ds-combobox__option__icon-wrapper", r && "ds-combobox__option__icon-wrapper--selected"), children: r && v(_i, { className: "ds-combobox__option__icon-wrapper__icon", "aria-hidden": !0 }) });
2878
+ Mr.displayName = "ComboboxNative";
2879
+ const kr = A(({ children: e, className: r, ...t }, n) => v("span", { className: G("ds-combobox__option__description", r), ref: n, ...t, children: e }));
2880
+ kr.displayName = "ComboboxOptionDescription";
2881
+ const Nr = ({ multiple: e, selected: r }) => v("div", { className: G(e && "ds-combobox__option__icon-wrapper", r && "ds-combobox__option__icon-wrapper--selected"), children: r && v(Ai, { className: "ds-combobox__option__icon-wrapper__icon", "aria-hidden": !0 }) });
2884
2882
  Nr.displayName = "SelectedIcon";
2885
- const Ui = ({ id: e, ref: r, value: t }) => {
2883
+ const Hi = ({ id: e, ref: r, value: t }) => {
2886
2884
  const n = Ve(), o = e || n, i = oe(Ae), { activeIndex: s } = Ot(), a = tn();
2887
2885
  if (!i)
2888
2886
  throw new Error("ComboboxOption must be used within a Combobox");
@@ -2895,7 +2893,7 @@ const Ui = ({ id: e, ref: r, value: t }) => {
2895
2893
  if (u === -1)
2896
2894
  throw new Error("Internal error: ComboboxOption did not find index");
2897
2895
  const g = l[pe(t)], C = s === u;
2898
- ue(() => {
2896
+ ce(() => {
2899
2897
  C && a?.({ type: "SET_ACTIVE_INDEX", payload: u });
2900
2898
  }, [n, e, a, C, u]);
2901
2899
  const x = Gt(() => c(t), 50);
@@ -2907,7 +2905,7 @@ const Ui = ({ id: e, ref: r, value: t }) => {
2907
2905
  onOptionClick: x
2908
2906
  };
2909
2907
  }, nn = Br(A(({ value: e, description: r, children: t, className: n, ...o }, i) => {
2910
- const s = Ve(), { id: a, ref: l, selected: c, active: f, onOptionClick: d } = Ui({
2908
+ const s = Ve(), { id: a, ref: l, selected: c, active: f, onOptionClick: d } = Hi({
2911
2909
  id: o.id,
2912
2910
  ref: i,
2913
2911
  value: e
@@ -2917,18 +2915,18 @@ const Ui = ({ id: e, ref: r, value: t }) => {
2917
2915
  const { size: u, multiple: m, getItemProps: g } = h, C = g();
2918
2916
  return v(Te, { "data-size": "md", asChild: !0, children: ie("button", { ref: l, id: a, role: "option", type: "button", "aria-selected": !!c, "aria-labelledby": s, tabIndex: -1, onClick: (x) => {
2919
2917
  d(), o.onClick?.(x);
2920
- }, className: X("ds-combobox__option", f && "ds-combobox__option--active", m && "ds-combobox__option--multiple", n), ...qe(["displayValue"], o), ...qe(["onClick", "onPointerLeave"], C), children: [v(Te, { asChild: !0, "data-size": u, children: v("span", { children: v(Nr, { multiple: m, selected: !!c }) }) }), ie(Te, { className: "ds-combobox__option__label", "data-size": u, id: s, children: [t, r && v(Mr, { children: r })] })] }) });
2918
+ }, className: G("ds-combobox__option", f && "ds-combobox__option--active", m && "ds-combobox__option--multiple", n), ...qe(["displayValue"], o), ...qe(["onClick", "onPointerLeave"], C), children: [v(Te, { asChild: !0, "data-size": u, children: v("span", { children: v(Nr, { multiple: m, selected: !!c }) }) }), ie(Te, { className: "ds-combobox__option__label", "data-size": u, id: s, children: [t, r && v(kr, { children: r })] })] }) });
2921
2919
  }));
2922
2920
  nn.displayName = "ComboboxOption";
2923
- function Xi(e) {
2921
+ function Ui(e) {
2924
2922
  return $n(e) && e.type === nn;
2925
2923
  }
2926
- const Gi = (e) => !!e;
2927
- function Yi({ children: e, inputValue: r, multiple: t, filter: n = (i, s) => s.label.toLowerCase().startsWith(i.toLowerCase()), initialValue: o }) {
2924
+ const Xi = (e) => !!e;
2925
+ function Gi({ children: e, inputValue: r, multiple: t, filter: n = (i, s) => s.label.toLowerCase().startsWith(i.toLowerCase()), initialValue: o }) {
2928
2926
  const i = jr(n, [n]), { optionsChildren: s, customIds: a, restChildren: l, interactiveChildren: c } = ze(() => fn.toArray(e).reduce((y, b) => {
2929
- if (Xi(b))
2927
+ if (Ui(b))
2930
2928
  y.optionsChildren.push(b);
2931
- else if (y.restChildren.push(b), qi(b)) {
2929
+ else if (y.restChildren.push(b), Wi(b)) {
2932
2930
  const w = b;
2933
2931
  if (y.interactiveChildren.push(w), !w.props.id)
2934
2932
  throw new Error("If ComboboxCustom is interactive, it must have an id");
@@ -2947,9 +2945,9 @@ function Yi({ children: e, inputValue: r, multiple: t, filter: n = (i, s) => s.l
2947
2945
  let w = b.displayValue || "";
2948
2946
  if (!b.displayValue) {
2949
2947
  let _ = "";
2950
- fn.forEach(b.children, (M) => {
2951
- if (typeof M == "string")
2952
- _ += M;
2948
+ fn.forEach(b.children, (k) => {
2949
+ if (typeof k == "string")
2950
+ _ += k;
2953
2951
  else
2954
2952
  throw new Error("If ComboboxOption is not a string, it must have a displayValue prop");
2955
2953
  }), w = _;
@@ -2963,7 +2961,7 @@ function Yi({ children: e, inputValue: r, multiple: t, filter: n = (i, s) => s.l
2963
2961
  }), x;
2964
2962
  }, [s]), d = ze(() => (o?.map((C) => pe(C)) || []).reduce((C, x) => {
2965
2963
  const y = f[x];
2966
- return Gi(y) && (C[x] = y), C;
2964
+ return Xi(y) && (C[x] = y), C;
2967
2965
  }, {}), [o, f]), [h, u] = ye(d), { filteredOptions: m, filteredOptionsChildren: g } = ze(() => {
2968
2966
  const C = [], x = Object.keys(f).map((y, b) => !t && Object.keys(h).length === 1 || t && h[y] || i(r, f[y]) ? (C.push(y), s[b]) : null).filter((y) => y);
2969
2967
  return { filteredOptions: C, filteredOptionsChildren: x };
@@ -2986,7 +2984,7 @@ function Yi({ children: e, inputValue: r, multiple: t, filter: n = (i, s) => s.l
2986
2984
  setSelectedOptions: u
2987
2985
  };
2988
2986
  }
2989
- const Zi = ({ readOnly: e, disabled: r, interactiveChildren: t, filteredOptions: n, inputValue: o, selectedOptions: i, multiple: s, open: a, options: l, setOpen: c, handleSelectOption: f }) => {
2987
+ const Yi = ({ readOnly: e, disabled: r, interactiveChildren: t, filteredOptions: n, inputValue: o, selectedOptions: i, multiple: s, open: a, options: l, setOpen: c, handleSelectOption: f }) => {
2990
2988
  const { activeIndex: d } = Ot();
2991
2989
  return Gt((m) => {
2992
2990
  if (!(e || r) && m)
@@ -3034,8 +3032,8 @@ const Zi = ({ readOnly: e, disabled: r, interactiveChildren: t, filteredOptions:
3034
3032
  break;
3035
3033
  }
3036
3034
  }, 20);
3037
- }, Ji = ({ listRef: e }) => {
3038
- const [r, t] = ye(!1), { activeIndex: n } = Ot(), o = tn(), { refs: i, floatingStyles: s, context: a } = hi({
3035
+ }, Zi = ({ listRef: e }) => {
3036
+ const [r, t] = ye(!1), { activeIndex: n } = Ot(), o = tn(), { refs: i, floatingStyles: s, context: a } = fi({
3039
3037
  open: r,
3040
3038
  onOpenChange: (m) => {
3041
3039
  m || o?.({ type: "SET_ACTIVE_INDEX", payload: 0 }), Wn(() => {
@@ -3048,8 +3046,8 @@ const Zi = ({ readOnly: e, disabled: r, interactiveChildren: t, filteredOptions:
3048
3046
  g.scrollTop = 0;
3049
3047
  }),
3050
3048
  middleware: [
3051
- Fo({ padding: 10 }),
3052
- Lo({
3049
+ _o({ padding: 10 }),
3050
+ Fo({
3053
3051
  apply({ rects: m, elements: g }) {
3054
3052
  requestAnimationFrame(() => {
3055
3053
  Object.assign(g.floating.style, {
@@ -3059,9 +3057,9 @@ const Zi = ({ readOnly: e, disabled: r, interactiveChildren: t, filteredOptions:
3059
3057
  });
3060
3058
  }
3061
3059
  }),
3062
- _o(10)
3060
+ Ao(10)
3063
3061
  ]
3064
- }), l = vi(a, { role: "listbox" }), c = di(a), f = bi(a, {
3062
+ }), l = gi(a, { role: "listbox" }), c = ui(a), f = pi(a, {
3065
3063
  listRef: e,
3066
3064
  activeIndex: n,
3067
3065
  virtual: !0,
@@ -3071,7 +3069,7 @@ const Zi = ({ readOnly: e, disabled: r, interactiveChildren: t, filteredOptions:
3071
3069
  onNavigate: (m) => {
3072
3070
  o?.({ type: "SET_ACTIVE_INDEX", payload: m || 0 });
3073
3071
  }
3074
- }), { getReferenceProps: d, getFloatingProps: h, getItemProps: u } = mi([l, c, f]);
3072
+ }), { getReferenceProps: d, getFloatingProps: h, getItemProps: u } = hi([l, c, f]);
3075
3073
  return {
3076
3074
  open: r,
3077
3075
  setOpen: t,
@@ -3083,8 +3081,8 @@ const Zi = ({ readOnly: e, disabled: r, interactiveChildren: t, filteredOptions:
3083
3081
  getFloatingProps: h,
3084
3082
  getItemProps: u
3085
3083
  };
3086
- }, Qi = De(null), es = (e, r) => {
3087
- const t = oe(Qi), n = Ve(), o = e.id ?? `${r}-${n}`, i = e.errorId ?? `${r}-error-${n}`, s = `${r}-description-${n}`, a = e.size ?? t?.size ?? "md", l = t?.disabled || e?.disabled, c = !l && !!(e.error || t?.error);
3084
+ }, Ji = De(null), Qi = (e, r) => {
3085
+ const t = oe(Ji), n = Ve(), o = e.id ?? `${r}-${n}`, i = e.errorId ?? `${r}-error-${n}`, s = `${r}-description-${n}`, a = e.size ?? t?.size ?? "md", l = t?.disabled || e?.disabled, c = !l && !!(e.error || t?.error);
3088
3086
  return {
3089
3087
  hasError: c,
3090
3088
  errorId: i,
@@ -3094,23 +3092,23 @@ const Zi = ({ readOnly: e, disabled: r, interactiveChildren: t, filteredOptions:
3094
3092
  id: o,
3095
3093
  disabled: l,
3096
3094
  "aria-invalid": c ? !0 : void 0,
3097
- "aria-describedby": X(e["aria-describedby"], !!e?.description && typeof e?.description == "string" && s, c && !t?.error && i, c && !!t?.error && t?.errorId) || void 0
3095
+ "aria-describedby": G(e["aria-describedby"], !!e?.description && typeof e?.description == "string" && s, c && !t?.error && i, c && !!t?.error && t?.errorId) || void 0
3098
3096
  }
3099
3097
  };
3100
- }, ts = A(({ value: e, initialValue: r = [], onValueChange: t, label: n, hideLabel: o = !1, description: i, multiple: s = !1, disabled: a = !1, readOnly: l = !1, hideChips: c = !1, clearButtonLabel: f = "Fjern alt", hideClearButton: d = !1, error: h, errorId: u, id: m, name: g, portal: C = !0, htmlSize: x = 0, virtual: y = !1, children: b, style: w, size: _ = "md", loading: M, loadingLabel: j = "Laster...", filter: $, chipSrLabel: Z = (N) => "Slett " + N.label, className: G, ...q }, S) => {
3098
+ }, es = A(({ value: e, initialValue: r = [], onValueChange: t, label: n, hideLabel: o = !1, description: i, multiple: s = !1, disabled: a = !1, readOnly: l = !1, hideChips: c = !1, clearButtonLabel: f = "Fjern alt", hideClearButton: d = !1, error: h, errorId: u, id: m, name: g, portal: C = !0, htmlSize: x = 0, virtual: y = !1, children: b, style: w, size: _ = "md", loading: k, loadingLabel: j = "Laster...", filter: $, chipSrLabel: Z = (N) => "Slett " + N.label, className: X, ...q }, S) => {
3101
3099
  const N = ve(null), P = ve(null), E = ve([]), [D, B] = ye(q.inputValue || "");
3102
- ue(() => {
3100
+ ce(() => {
3103
3101
  typeof q.inputValue == "string" && B(q.inputValue);
3104
3102
  }, [q.inputValue]);
3105
- const { selectedOptions: k, options: R, restChildren: U, interactiveChildren: te, customIds: xe, filteredOptionsChildren: he, filteredOptions: z, setSelectedOptions: T } = Yi({
3103
+ const { selectedOptions: M, options: R, restChildren: U, interactiveChildren: te, customIds: xe, filteredOptionsChildren: he, filteredOptions: z, setSelectedOptions: T } = Gi({
3106
3104
  children: b,
3107
3105
  inputValue: D,
3108
3106
  filter: $,
3109
3107
  multiple: s,
3110
3108
  initialValue: r
3111
- }), { open: O, setOpen: F, refs: H, floatingStyles: ee, context: ne, getReferenceProps: Y, getFloatingProps: Ie, getItemProps: Ee } = Ji({
3109
+ }), { open: O, setOpen: F, refs: H, floatingStyles: ee, context: ne, getReferenceProps: Y, getFloatingProps: Ie, getItemProps: Ee } = Zi({
3112
3110
  listRef: E
3113
- }), J = es({
3111
+ }), J = Qi({
3114
3112
  disabled: a,
3115
3113
  error: h,
3116
3114
  errorId: u,
@@ -3118,31 +3116,31 @@ const Zi = ({ readOnly: e, disabled: r, interactiveChildren: t, filteredOptions:
3118
3116
  description: i,
3119
3117
  id: m
3120
3118
  }, "combobox");
3121
- ue(() => {
3119
+ ce(() => {
3122
3120
  if (e && e.length > 0 && !s) {
3123
3121
  const V = R[pe(e[0])];
3124
3122
  N.current && Qe(N.current, V?.label || "");
3125
3123
  }
3126
- }, [s, e, R]), ue(() => {
3124
+ }, [s, e, R]), ce(() => {
3127
3125
  if (e && Object.keys(R).length >= 0) {
3128
3126
  const V = e.map((I) => R[pe(I)]);
3129
3127
  T(V.reduce((I, W) => (I[pe(W.value)] = W, I), {}));
3130
3128
  }
3131
3129
  }, [s, e, R, T]);
3132
3130
  const me = Gt((V) => {
3133
- const { option: I, clear: W, remove: ae } = V;
3131
+ const { option: I, clear: W, remove: se } = V;
3134
3132
  if (W) {
3135
3133
  T({}), N.current && Qe(N.current, ""), t?.([]);
3136
3134
  return;
3137
3135
  }
3138
3136
  if (!I)
3139
3137
  return;
3140
- if (ae) {
3141
- const re = { ...k };
3138
+ if (se) {
3139
+ const re = { ...M };
3142
3140
  delete re[pe(I.value)], T(re), t?.(Object.keys(re).map((je) => Ht(je)));
3143
3141
  return;
3144
3142
  }
3145
- const K = { ...k };
3143
+ const K = { ...M };
3146
3144
  if (s)
3147
3145
  K[pe(I.value)] ? delete K[pe(I.value)] : K[pe(I.value)] = I, N.current && Qe(N.current, ""), N.current?.focus();
3148
3146
  else {
@@ -3153,9 +3151,9 @@ const Zi = ({ readOnly: e, disabled: r, interactiveChildren: t, filteredOptions:
3153
3151
  }, 0);
3154
3152
  }
3155
3153
  T(K), t?.(Object.keys(K).map((re) => Ht(re))), !s && F(!1), H.domReference.current?.focus();
3156
- }, 50), _e = Zi({
3154
+ }, 50), _e = Yi({
3157
3155
  filteredOptions: z,
3158
- selectedOptions: k,
3156
+ selectedOptions: M,
3159
3157
  readOnly: J.readOnly || !1,
3160
3158
  disabled: a,
3161
3159
  multiple: s,
@@ -3175,7 +3173,7 @@ const Zi = ({ readOnly: e, disabled: r, interactiveChildren: t, filteredOptions:
3175
3173
  return ie(Ae.Provider, { value: {
3176
3174
  size: _,
3177
3175
  options: R,
3178
- selectedOptions: k,
3176
+ selectedOptions: M,
3179
3177
  multiple: s,
3180
3178
  disabled: a,
3181
3179
  readOnly: l,
@@ -3206,12 +3204,12 @@ const Zi = ({ readOnly: e, disabled: r, interactiveChildren: t, filteredOptions:
3206
3204
  setListRef: (V, I) => {
3207
3205
  E.current[V] = I;
3208
3206
  }
3209
- }, children: [ie("div", { className: X("ds-combobox", `ds-combobox--${_}`, a && "ds-combobox__disabled", G), style: w, ref: P, children: [g && v(kr, { name: g, selectedOptions: k, multiple: s }), v(Tr, { label: n, description: i, size: _, readOnly: l, hideLabel: o, formFieldProps: J }), v(Sr, { ...qe(["inputValue"], q), hideClearButton: d, listId: ne.floatingId || "", error: h, hideChips: c, handleKeyDown: _e, "aria-busy": M }), v(xr, { size: _, error: h, formFieldProps: J })] }), O && v(si, { root: C ? null : P, children: v(li, { context: ne, initialFocus: -1, visuallyHiddenDismiss: !0, children: ie("div", { "aria-labelledby": J.inputProps.id, "aria-autocomplete": "list", tabIndex: -1, ...Ie({
3207
+ }, children: [ie("div", { className: G("ds-combobox", `ds-combobox--${_}`, a && "ds-combobox__disabled", X), style: w, ref: P, children: [g && v(Mr, { name: g, selectedOptions: M, multiple: s }), v(Tr, { label: n, description: i, size: _, readOnly: l, hideLabel: o, formFieldProps: J }), v(Sr, { ...qe(["inputValue"], q), hideClearButton: d, listId: ne.floatingId || "", error: h, hideChips: c, handleKeyDown: _e, "aria-busy": k }), v(xr, { size: _, error: h, formFieldProps: J })] }), O && v(ii, { root: C ? null : P, children: v(ai, { context: ne, initialFocus: -1, visuallyHiddenDismiss: !0, children: ie("div", { "aria-labelledby": J.inputProps.id, "aria-autocomplete": "list", tabIndex: -1, ...Ie({
3210
3208
  ref: H.setFloating,
3211
3209
  style: {
3212
3210
  ...ee
3213
3211
  }
3214
- }), className: X("ds-combobox__options-wrapper", `ds-combobox--${_}`), children: [y && v("div", { style: {
3212
+ }), className: G("ds-combobox__options-wrapper", `ds-combobox--${_}`), children: [y && v("div", { style: {
3215
3213
  height: `${L.getTotalSize()}px`,
3216
3214
  width: "100%",
3217
3215
  position: "relative"
@@ -3221,15 +3219,15 @@ const Zi = ({ readOnly: e, disabled: r, interactiveChildren: t, filteredOptions:
3221
3219
  left: 0,
3222
3220
  width: "100%",
3223
3221
  transform: `translateY(${V.start}px)`
3224
- }, children: he[V.index] }, V.index)) }), M ? ie(yr, { className: "ds-combobox__loading", children: [v(Wr, { "aria-label": "Laster", "data-size": "sm" }), j] }) : ie(Ut, { children: [U, !y && he] })] }) }) })] });
3225
- }), Pr = A((e, r) => v(Pi, { children: v(ts, { ...e, ref: r }) }));
3222
+ }, children: he[V.index] }, V.index)) }), k ? ie(yr, { className: "ds-combobox__loading", children: [v(Kr, { "aria-label": "Laster", "data-size": "sm" }), j] }) : ie(Ut, { children: [U, !y && he] })] }) }) })] });
3223
+ }), Pr = A((e, r) => v(Ni, { children: v(es, { ...e, ref: r }) }));
3226
3224
  Pr.displayName = "Combobox";
3227
3225
  const Dr = A(({ children: e, className: r, ...t }, n) => {
3228
3226
  const o = oe(Ae);
3229
3227
  if (!o)
3230
3228
  throw new Error("ComboboxEmpty must be used within a Combobox");
3231
3229
  const { filteredOptions: i, size: s } = o;
3232
- return i.length === 0 && v(Te, { "data-size": s, asChild: !0, children: v("div", { ref: n, className: X("ds-combobox__empty", r), ...t, children: e }) });
3230
+ return i.length === 0 && v(Te, { "data-size": s, asChild: !0, children: v("div", { ref: n, className: G("ds-combobox__empty", r), ...t, children: e }) });
3233
3231
  });
3234
3232
  Dr.displayName = "ComboboxEmpty";
3235
3233
  const Tt = Pr;
@@ -3237,7 +3235,7 @@ Tt.Option = nn;
3237
3235
  Tt.Empty = Dr;
3238
3236
  Tt.Option.displayName = "Combobox.Option";
3239
3237
  Tt.Empty.displayName = "Combobox.Empty";
3240
- const As = A(function({ "data-size": r, className: t, style: n, children: o, label: i, description: s, error: a, ...l }, c) {
3238
+ const Ds = A(function({ "data-size": r, className: t, style: n, children: o, label: i, description: s, error: a, ...l }, c) {
3241
3239
  return ie(pt, { "data-size": r, className: t, style: n, children: [v(ot, { type: "checkbox", ref: c, ...l }), !!i && v(Te, { weight: "regular", children: i }), !!s && v("div", { "data-field": "description", children: s }), !!a && v(Xt, { children: a })] });
3242
3240
  }), rn = De({
3243
3241
  current: null
@@ -3246,21 +3244,21 @@ const As = A(function({ "data-size": r, className: t, style: n, children: o, lab
3246
3244
  return v(rn.Provider, { value: r, children: e });
3247
3245
  };
3248
3246
  Ar.displayName = "DialogTriggerContext";
3249
- const ns = A(function({ asChild: r, children: t, className: n, placement: o = "center", closeButton: i = "Lukk dialogvindu", closedby: s = "closerequest", modal: a = !0, onClose: l, open: c, ...f }, d) {
3250
- const h = oe(rn), u = ve(null), m = r ? se : "dialog", g = Be([h, d, u]), C = a ? "showModal" : "show";
3251
- return ue(() => u.current?.[c ? C : "close"](), [c]), ue(() => {
3247
+ const ts = A(function({ asChild: r, children: t, className: n, placement: o = "center", closeButton: i = "Lukk dialogvindu", closedby: s = "closerequest", modal: a = !0, onClose: l, open: c, ...f }, d) {
3248
+ const h = oe(rn), u = ve(null), m = r ? ue : "dialog", g = Be([h, d, u]), C = a ? "showModal" : "show";
3249
+ return ce(() => u.current?.[c ? C : "close"](), [c]), ce(() => {
3252
3250
  const x = u.current, y = (w) => {
3253
3251
  if (w.defaultPrevented)
3254
3252
  return;
3255
- const { clientY: _, clientX: M, target: j } = w;
3253
+ const { clientY: _, clientX: k, target: j } = w;
3256
3254
  if (j instanceof Element && w.type === "click" && j.closest('[data-command="close"]'))
3257
3255
  return x?.close();
3258
3256
  if (!(x && "closedBy" in x)) {
3259
3257
  if (w instanceof KeyboardEvent)
3260
3258
  return s === "none" && w.key === "Escape" && w.preventDefault();
3261
3259
  if (!window.getSelection()?.toString() && x && j === x && s === "any") {
3262
- const { top: $, left: Z, right: G, bottom: q } = x.getBoundingClientRect();
3263
- $ <= _ && _ <= q && Z <= M && M <= G || x?.close();
3260
+ const { top: $, left: Z, right: X, bottom: q } = x.getBoundingClientRect();
3261
+ $ <= _ && _ <= q && Z <= k && k <= X || x?.close();
3264
3262
  }
3265
3263
  }
3266
3264
  }, b = () => {
@@ -3270,21 +3268,21 @@ const ns = A(function({ asChild: r, children: t, className: n, placement: o = "c
3270
3268
  return x?.addEventListener("animationend", b), x?.addEventListener("click", y), x?.addEventListener("keydown", y), () => {
3271
3269
  x?.removeEventListener("animationend", b), x?.removeEventListener("click", y), x?.removeEventListener("keydown", y);
3272
3270
  };
3273
- }, [s]), ue(() => {
3271
+ }, [s]), ce(() => {
3274
3272
  const x = (b) => l?.(b), y = u.current;
3275
3273
  return y?.addEventListener("close", x), () => y?.removeEventListener("close", x);
3276
- }, [l]), ie(m, { className: X("ds-dialog", n), ref: g, "data-placement": o, "data-modal": a, closedby: s, ...f, children: [i !== !1 && v(Ye, { "aria-label": i, "data-color": "neutral", icon: !0, variant: "tertiary", "data-command": "close" }), t] });
3277
- }), rs = A(function({ asChild: r, className: t, ...n }, o) {
3278
- return v(r ? se : "div", { className: X("ds-dialog__block", t), ref: o, ...n });
3279
- }), os = A(function({ asChild: r, ...t }, n) {
3274
+ }, [l]), ie(m, { className: G("ds-dialog", n), ref: g, "data-placement": o, "data-modal": a, closedby: s, ...f, children: [i !== !1 && v(Ye, { "aria-label": i, "data-color": "neutral", icon: !0, variant: "tertiary", "data-command": "close" }), t] });
3275
+ }), ns = A(function({ asChild: r, className: t, ...n }, o) {
3276
+ return v(r ? ue : "div", { className: G("ds-dialog__block", t), ref: o, ...n });
3277
+ }), rs = A(function({ asChild: r, ...t }, n) {
3280
3278
  const o = oe(rn);
3281
- return v(r ? se : Ye, { "aria-haspopup": "dialog", onClick: () => {
3279
+ return v(r ? ue : Ye, { "aria-haspopup": "dialog", onClick: () => {
3282
3280
  o.current?.getAttribute("data-modal") === "true" ? o.current?.showModal() : o.current?.show();
3283
3281
  }, ref: n, ...t });
3284
- }), on = Object.assign(ns, {
3285
- Block: rs,
3282
+ }), on = Object.assign(ts, {
3283
+ Block: ns,
3286
3284
  TriggerContext: Ar,
3287
- Trigger: os
3285
+ Trigger: rs
3288
3286
  });
3289
3287
  on.Block.displayName = "Dialog.Block";
3290
3288
  on.TriggerContext.displayName = "Dialog.TriggerContext";
@@ -3294,19 +3292,19 @@ const _r = ({ children: e }) => {
3294
3292
  return v(sn.Provider, { value: { popoverId: t, setPopoverId: n }, children: e });
3295
3293
  };
3296
3294
  _r.displayName = "PopoverTriggerContext";
3297
- const sn = De({}), is = A(function({ id: r, className: t, onClose: n, onOpen: o, open: i, variant: s = "default", placement: a = "top", autoPlacement: l = !0, asChild: c = !1, ...f }, d) {
3298
- const h = c ? se : "div", u = ve(null), m = Be([u, d]), { popoverId: g, setPopoverId: C } = oe(sn), [x, y] = ye(!1), b = i ?? x;
3299
- return ue(() => {
3295
+ const sn = De({}), os = A(function({ id: r, className: t, onClose: n, onOpen: o, open: i, variant: s = "default", placement: a = "top", autoPlacement: l = !0, asChild: c = !1, ...f }, d) {
3296
+ const h = c ? ue : "div", u = ve(null), m = Be([u, d]), { popoverId: g, setPopoverId: C } = oe(sn), [x, y] = ye(!1), b = i ?? x;
3297
+ return ce(() => {
3300
3298
  const w = u.current, _ = (j) => {
3301
- const $ = j.target, Z = $?.closest?.(`[popovertarget="${w?.id}"]`), G = !Z && !w?.contains($);
3302
- Z && j.preventDefault(), b && (Z || G) ? (y(!1), n?.()) : !b && Z && (y(!0), o?.());
3303
- }, M = (j) => {
3299
+ const $ = j.target, Z = $?.closest?.(`[popovertarget="${w?.id}"]`), X = !Z && !w?.contains($);
3300
+ Z && j.preventDefault(), b && (Z || X) ? (y(!1), n?.()) : !b && Z && (y(!0), o?.());
3301
+ }, k = (j) => {
3304
3302
  j.key !== "Escape" || !b || (j.preventDefault(), y(!1), n?.());
3305
3303
  };
3306
- return w?.togglePopover?.(b), document.addEventListener("click", _, !0), document.addEventListener("keydown", M), () => {
3307
- document.removeEventListener("click", _, !0), document.removeEventListener("keydown", M);
3304
+ return w?.togglePopover?.(b), document.addEventListener("click", _, !0), document.addEventListener("keydown", k), () => {
3305
+ document.removeEventListener("click", _, !0), document.removeEventListener("keydown", k);
3308
3306
  };
3309
- }, [b]), ue(() => {
3307
+ }, [b]), ce(() => {
3310
3308
  const w = u.current, _ = document.querySelector(`[popovertarget="${w?.id}"]`);
3311
3309
  if (w && _ && b)
3312
3310
  return Xn(_, w, () => {
@@ -3314,21 +3312,21 @@ const sn = De({}), is = A(function({ id: r, className: t, onClose: n, onOpen: o,
3314
3312
  placement: a,
3315
3313
  strategy: "fixed",
3316
3314
  middleware: [
3317
- Hn((M) => {
3318
- const j = getComputedStyle(M.elements.floating, "::before");
3315
+ Hn((k) => {
3316
+ const j = getComputedStyle(k.elements.floating, "::before");
3319
3317
  return parseFloat(j.height);
3320
3318
  }),
3321
3319
  ...l ? [qn({ fallbackAxisSideDirection: "start" }), Gr()] : [],
3322
- ss
3320
+ is
3323
3321
  ]
3324
- }).then(({ x: M, y: j }) => {
3325
- w.style.translate = `${Math.round(M)}px ${Math.round(j)}px`;
3322
+ }).then(({ x: k, y: j }) => {
3323
+ w.style.translate = `${Math.round(k)}px ${Math.round(j)}px`;
3326
3324
  });
3327
3325
  });
3328
- }, [b, a, r, l]), ue(() => {
3326
+ }, [b, a, r, l]), ce(() => {
3329
3327
  r && C?.(r);
3330
- }, [r]), v(h, { className: X("ds-popover", t), id: r || g, popover: "manual", "data-variant": s, ref: m, ...f });
3331
- }), ss = {
3328
+ }, [r]), v(h, { className: G("ds-popover", t), id: r || g, popover: "manual", "data-variant": s, ref: m, ...f });
3329
+ }), is = {
3332
3330
  name: "ArrowPseudoElement",
3333
3331
  fn(e) {
3334
3332
  const { elements: r, rects: t, placement: n } = e;
@@ -3349,49 +3347,49 @@ const sn = De({}), is = A(function({ id: r, className: t, onClose: n, onOpen: o,
3349
3347
  }
3350
3348
  return r.floating.setAttribute("data-placement", n.split("-")[0]), r.floating.style.setProperty("--ds-popover-arrow-x", o), r.floating.style.setProperty("--ds-popover-arrow-y", i), e;
3351
3349
  }
3352
- }, as = A(function({ id: r, inline: t, asChild: n, ...o }, i) {
3353
- const { popoverId: s } = oe(sn), a = n ? se : t ? "button" : Ye, l = Object.assign({
3350
+ }, ss = A(function({ id: r, inline: t, asChild: n, ...o }, i) {
3351
+ const { popoverId: s } = oe(sn), a = n ? ue : t ? "button" : Ye, l = Object.assign({
3354
3352
  [$r.startsWith("19") ? "popoverTarget" : "popovertarget"]: s,
3355
3353
  ...t ? {
3356
3354
  "data-popover": "inline"
3357
3355
  } : {}
3358
3356
  }, o);
3359
3357
  return v(a, { ref: i, ...l });
3360
- }), _s = A(function({ asChild: r, ...t }, n) {
3361
- return v(r ? se : "li", { ...t, ref: n });
3362
- }), Fr = (e, { asChild: r, className: t, ...n }, o) => v(r ? se : e, { className: X("ds-list", t), ref: o, ...n }), Fs = A(function(r, t) {
3358
+ }), As = A(function({ asChild: r, ...t }, n) {
3359
+ return v(r ? ue : "li", { ...t, ref: n });
3360
+ }), Fr = (e, { asChild: r, className: t, ...n }, o) => v(r ? ue : e, { className: G("ds-list", t), ref: o, ...n }), _s = A(function(r, t) {
3363
3361
  return Fr("ul", r, t);
3364
3362
  });
3365
3363
  A(function(r, t) {
3366
3364
  return Fr("ol", r, t);
3367
3365
  });
3368
- const ls = A(function({ "aria-label": r = "Sidenavigering", asChild: t, className: n, ...o }, i) {
3369
- return v(t ? se : "nav", { "aria-label": r, className: X("ds-pagination", n), ref: i, ...o });
3370
- }), cs = A(function(r, t) {
3366
+ const as = A(function({ "aria-label": r = "Sidenavigering", asChild: t, className: n, ...o }, i) {
3367
+ return v(t ? ue : "nav", { "aria-label": r, className: G("ds-pagination", n), ref: i, ...o });
3368
+ }), ls = A(function(r, t) {
3371
3369
  return v(Ye, { ref: t, ...r });
3372
- }), us = A(function({ asChild: r, className: t, ...n }, o) {
3373
- return v(r ? se : "li", { ref: o, ...n });
3374
- }), ds = A(function({ asChild: r, ...t }, n) {
3375
- return v(r ? se : "ul", { ref: n, ...t });
3376
- }), an = Object.assign(ls, {
3377
- List: ds,
3378
- Item: us,
3379
- Button: cs
3370
+ }), cs = A(function({ asChild: r, className: t, ...n }, o) {
3371
+ return v(r ? ue : "li", { ref: o, ...n });
3372
+ }), us = A(function({ asChild: r, ...t }, n) {
3373
+ return v(r ? ue : "ul", { ref: n, ...t });
3374
+ }), an = Object.assign(as, {
3375
+ List: us,
3376
+ Item: cs,
3377
+ Button: ls
3380
3378
  });
3381
3379
  an.List.displayName = "Pagination.List";
3382
3380
  an.Item.displayName = "Pagination.Item";
3383
3381
  an.Button.displayName = "Pagination.Button";
3384
- const Lr = Object.assign(is, {
3382
+ const Lr = Object.assign(os, {
3385
3383
  TriggerContext: _r,
3386
- Trigger: as
3384
+ Trigger: ss
3387
3385
  });
3388
3386
  Lr.TriggerContext.displayName = "Popover.TriggerContext";
3389
3387
  Lr.Trigger.displayName = "Popover.Trigger";
3390
- const fs = A(function({ className: r, ...t }, n) {
3391
- return v("div", { ref: n, className: X("ds-search", r), ...t });
3392
- }), hs = A(function({ children: r = "Søk", ...t }, n) {
3388
+ const ds = A(function({ className: r, ...t }, n) {
3389
+ return v("div", { ref: n, className: G("ds-search", r), ...t });
3390
+ }), fs = A(function({ children: r = "Søk", ...t }, n) {
3393
3391
  return v(Ye, { ref: n, type: "submit", ...t, children: r });
3394
- }), ms = A(function({ "aria-label": r = "Tøm", onClick: t, ...n }, o) {
3392
+ }), hs = A(function({ "aria-label": r = "Tøm", onClick: t, ...n }, o) {
3395
3393
  return v(Ye, { ref: o, variant: "tertiary", type: "reset", "aria-label": r, onClick: (s) => {
3396
3394
  const a = s.target;
3397
3395
  let l = null;
@@ -3401,7 +3399,7 @@ const fs = A(function({ className: r, ...t }, n) {
3401
3399
  throw new Error("Input is not an input element");
3402
3400
  s.preventDefault(), Qe(l, ""), l.focus(), t?.(s);
3403
3401
  }, icon: !0, ...n });
3404
- }), ps = A(function({ ...r }, t) {
3402
+ }), ms = A(function({ ...r }, t) {
3405
3403
  return v(ot, {
3406
3404
  ref: t,
3407
3405
  type: "search",
@@ -3409,79 +3407,78 @@ const fs = A(function({ className: r, ...t }, n) {
3409
3407
  placeholder: "",
3410
3408
  ...r
3411
3409
  });
3412
- }), ln = Object.assign(fs, {
3413
- Clear: ms,
3414
- Button: hs,
3415
- Input: ps
3410
+ }), ln = Object.assign(ds, {
3411
+ Clear: hs,
3412
+ Button: fs,
3413
+ Input: ms
3416
3414
  });
3417
3415
  ln.Clear.displayName = "Search.Clear";
3418
3416
  ln.Button.displayName = "Search.Button";
3419
3417
  ln.Input.displayName = "Search.Input";
3420
- const Ls = A(function({ asChild: r, className: t, height: n, style: o, variant: i = "rectangle", width: s, ...a }, l) {
3421
- const c = r ? se : "span", f = i === "text", d = qr("ds-skeleton-opacity-fade"), h = Be([d, l]);
3422
- return v(c, { "aria-hidden": "true", className: X("ds-skeleton", t), "data-text": f ? "-".repeat(Number(s) || 1) : void 0, "data-variant": i, ref: h, style: f ? o : { width: s, height: n, ...o }, ...a });
3423
- }), zs = A(function({ "data-size": r, children: t, className: n, description: o, label: i, position: s, style: a, ...l }, c) {
3418
+ const Fs = A(function({ asChild: r, className: t, height: n, style: o, variant: i = "rectangle", width: s, ...a }, l) {
3419
+ const c = r ? ue : "span", f = i === "text", d = Wr("ds-skeleton-opacity-fade"), h = Be([d, l]);
3420
+ return v(c, { "aria-hidden": "true", className: G("ds-skeleton", t), "data-text": f ? "-".repeat(Number(s) || 1) : void 0, "data-variant": i, ref: h, style: f ? o : { width: s, height: n, ...o }, ...a });
3421
+ }), Ls = A(function({ "data-size": r, children: t, className: n, description: o, label: i, position: s, style: a, ...l }, c) {
3424
3422
  return ie(pt, { className: n, "data-position": s, "data-size": r, style: a, children: [v(ot, { type: "checkbox", role: "switch", ref: c, ...l }), !!i && v(Te, { weight: "regular", children: i }), !!o && v("div", { "data-field": "description", children: o })] });
3425
- }), kt = De({}), bs = A(function({ value: r, defaultValue: t, className: n, onChange: o, ...i }, s) {
3423
+ }), Mt = De({}), ps = A(function({ value: r, defaultValue: t, className: n, onChange: o, ...i }, s) {
3426
3424
  const a = ve(null), l = r !== void 0, [c, f] = ye(t), [d, h] = ye(/* @__PURE__ */ new Map());
3427
3425
  let u = o;
3428
3426
  return l || (u = (m) => {
3429
3427
  f(m), o?.(m);
3430
- }, r = c), v(kt.Provider, { value: {
3428
+ }, r = c), v(Mt.Provider, { value: {
3431
3429
  value: r,
3432
3430
  defaultValue: t,
3433
3431
  onChange: u,
3434
3432
  tablistRef: a,
3435
3433
  panelButtonMap: d,
3436
3434
  setPanelButtonMap: h
3437
- }, children: v("div", { className: X("ds-tabs", n), ref: s, ...i }) });
3438
- }), gs = A(function({ children: r, ...t }, n) {
3439
- const { value: o, tablistRef: i } = oe(kt), s = Be([n, i]);
3435
+ }, children: v("div", { className: G("ds-tabs", n), ref: s, ...i }) });
3436
+ }), bs = A(function({ children: r, ...t }, n) {
3437
+ const { value: o, tablistRef: i } = oe(Mt), s = Be([n, i]);
3440
3438
  return v(Zr, { role: "tablist", activeValue: o, orientation: "ambiguous", ref: s, ...t, children: r });
3441
- }), vs = A(function({ children: r, value: t, id: n, ...o }, i) {
3442
- const { value: s, tablistRef: a, setPanelButtonMap: l } = oe(kt), c = t === s, f = Ve(), d = n ?? `tabpanel-${f}`, [h, u] = ye(!1), [m, g] = ye(void 0), C = ve(null), x = Be([i, C]);
3443
- return ue(() => {
3439
+ }), gs = A(function({ children: r, value: t, id: n, ...o }, i) {
3440
+ const { value: s, tablistRef: a, setPanelButtonMap: l } = oe(Mt), c = t === s, f = Ve(), d = n ?? `tabpanel-${f}`, [h, u] = ye(!1), [m, g] = ye(void 0), C = ve(null), x = Be([i, C]);
3441
+ return ce(() => {
3444
3442
  if (!C.current)
3445
3443
  return;
3446
3444
  const y = C.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
3447
3445
  u(y.length > 0);
3448
- }, [r]), ue(() => {
3446
+ }, [r]), ce(() => {
3449
3447
  if (!a)
3450
3448
  return;
3451
3449
  const y = a.current?.querySelector(`[role="tab"][data-value="${t}"]`);
3452
3450
  g(y ? y.id : void 0), y && l?.((b) => new Map(b).set(y.id, d));
3453
3451
  }, [a]), v("div", { ref: x, id: d, role: "tabpanel", tabIndex: h ? void 0 : 0, "aria-labelledby": m, hidden: !c, ...o, children: r });
3454
- }), ys = A(function({ value: r, id: t, onClick: n, ...o }, i) {
3455
- const s = oe(kt), a = Ve(), l = t ?? `tab-${a}`;
3452
+ }), vs = A(function({ value: r, id: t, onClick: n, ...o }, i) {
3453
+ const s = oe(Mt), a = Ve(), l = t ?? `tab-${a}`;
3456
3454
  return v(Qr, { value: r, ...o, asChild: !0, children: v("button", { ref: i, id: l, "aria-selected": s.value === r, "data-value": r, role: "tab", type: "button", onClick: (c) => {
3457
3455
  s.onChange?.(r), n?.(c);
3458
3456
  }, "aria-controls": s.panelButtonMap?.get(l), ...o }) });
3459
- }), cn = Object.assign(bs, {
3460
- List: gs,
3461
- Tab: ys,
3462
- Panel: vs
3457
+ }), cn = Object.assign(ps, {
3458
+ List: bs,
3459
+ Tab: vs,
3460
+ Panel: gs
3463
3461
  });
3464
3462
  cn.Tab.displayName = "Tabs.Tab";
3465
3463
  cn.List.displayName = "Tabs.List";
3466
3464
  cn.Panel.displayName = "Tabs.Panel";
3467
- const Vs = A(function({ label: r, description: t, error: n, multiline: o, prefix: i, suffix: s, "data-size": a, counter: l, style: c, className: f, ...d }, h) {
3468
- return ie(pt, { className: f, "data-size": a, style: c, children: [!!r && v(Te, { children: r }), !!t && v(Hr, { children: t }), ie(Ur, { children: [i === void 0 || v(hn, { children: i }), o === !0 ? v(Yr, { ref: h, "aria-invalid": !!n || void 0, ...d }) : v(ot, { ref: h, "aria-invalid": !!n || void 0, ...d }), s === void 0 || v(hn, { children: s })] }), !!l && v(pt.Counter, { ...typeof l == "number" ? { limit: l } : l }), !!n && v(Xt, { children: n })] });
3465
+ const zs = A(function({ label: r, description: t, error: n, multiline: o, prefix: i, suffix: s, "data-size": a, counter: l, style: c, className: f, ...d }, h) {
3466
+ return ie(pt, { className: f, "data-size": a, style: c, children: [!!r && v(Te, { children: r }), !!t && v(qr, { children: t }), ie(Hr, { children: [i === void 0 || v(hn, { children: i }), o === !0 ? v(Yr, { ref: h, "aria-invalid": !!n || void 0, ...d }) : v(ot, { ref: h, "aria-invalid": !!n || void 0, ...d }), s === void 0 || v(hn, { children: s })] }), !!l && v(pt.Counter, { ...typeof l == "number" ? { limit: l } : l }), !!n && v(Xt, { children: n })] });
3469
3467
  });
3470
3468
  export {
3471
3469
  ro as B,
3472
- As as C,
3470
+ Ds as C,
3473
3471
  on as D,
3474
- oo as L,
3472
+ As as L,
3475
3473
  an as P,
3476
- zs as S,
3477
- Vs as T,
3474
+ Ls as S,
3475
+ zs as T,
3478
3476
  St as a,
3479
3477
  Tt as b,
3480
3478
  _s as c,
3481
- Fs as d,
3482
- Lr as e,
3483
- ln as f,
3484
- Ls as g,
3485
- cn as h,
3486
- Ds as u
3479
+ Lr as d,
3480
+ ln as e,
3481
+ Fs as f,
3482
+ cn as g,
3483
+ Ps as u
3487
3484
  };