@servicetitan/anvil2 1.3.4 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/{Alert-85a791c2.js → Alert-097d82a2.js} +2 -2
  2. package/Alert-097d82a2.js.map +1 -0
  3. package/Alert-d2a2976a.cjs +2 -0
  4. package/Alert-d2a2976a.cjs.map +1 -0
  5. package/Alert.cjs +1 -1
  6. package/Alert.js +1 -1
  7. package/Announcement.cjs +1 -1
  8. package/Announcement.cjs.map +1 -1
  9. package/Announcement.js +1 -1
  10. package/Announcement.js.map +1 -1
  11. package/AnvilProvider.cjs +1 -1
  12. package/AnvilProvider.js +1 -1
  13. package/Avatar.cjs +1 -1
  14. package/Avatar.cjs.map +1 -1
  15. package/Avatar.js +14 -14
  16. package/Avatar.js.map +1 -1
  17. package/Badge.cjs.map +1 -1
  18. package/Badge.js +7 -7
  19. package/Badge.js.map +1 -1
  20. package/Button.cjs +1 -1
  21. package/Button.js +1 -1
  22. package/ButtonCompound.cjs +1 -1
  23. package/ButtonCompound.js +1 -1
  24. package/ButtonLink.cjs +1 -1
  25. package/ButtonLink.js +1 -1
  26. package/ButtonToggle.cjs +1 -1
  27. package/ButtonToggle.js +1 -1
  28. package/Calendar.cjs +1 -1
  29. package/Calendar.cjs.map +1 -1
  30. package/Calendar.js +935 -936
  31. package/Calendar.js.map +1 -1
  32. package/Card.cjs.map +1 -1
  33. package/Card.js.map +1 -1
  34. package/{Checkbox-d1db5a71.cjs → Checkbox-38b018dd.cjs} +2 -2
  35. package/Checkbox-38b018dd.cjs.map +1 -0
  36. package/{Checkbox-634c4d3d.js → Checkbox-80900b39.js} +3 -3
  37. package/Checkbox-80900b39.js.map +1 -0
  38. package/Checkbox.cjs +1 -1
  39. package/Checkbox.js +5 -5
  40. package/{Chip-73b032eb.js → Chip-68233f63.js} +3 -3
  41. package/Chip-68233f63.js.map +1 -0
  42. package/Chip-c32236d6.cjs +2 -0
  43. package/Chip-c32236d6.cjs.map +1 -0
  44. package/Chip.cjs +1 -1
  45. package/Chip.js +1 -1
  46. package/Combobox.cjs +6 -6
  47. package/Combobox.cjs.map +1 -1
  48. package/Combobox.js +12 -12
  49. package/Combobox.js.map +1 -1
  50. package/Details.cjs +1 -1
  51. package/Details.cjs.map +1 -1
  52. package/Details.js +9 -9
  53. package/Details.js.map +1 -1
  54. package/{Dialog-1984afe2.js → Dialog-893ed36b.js} +3 -3
  55. package/Dialog-893ed36b.js.map +1 -0
  56. package/Dialog-bf33c086.cjs +2 -0
  57. package/{Dialog-1984afe2.js.map → Dialog-bf33c086.cjs.map} +1 -1
  58. package/Dialog.cjs +1 -1
  59. package/Dialog.js +1 -1
  60. package/Divider.cjs.map +1 -1
  61. package/Divider.js.map +1 -1
  62. package/Drawer.cjs +1 -1
  63. package/Drawer.cjs.map +1 -1
  64. package/Drawer.js +8 -8
  65. package/Drawer.js.map +1 -1
  66. package/Flex-d06c75c0.js.map +1 -1
  67. package/Flex-da1ad9db.cjs.map +1 -1
  68. package/Grid.cjs.map +1 -1
  69. package/Grid.js.map +1 -1
  70. package/Icon-847b3515.cjs.map +1 -1
  71. package/Icon-be690f0b.js.map +1 -1
  72. package/InputMask.cjs +2 -0
  73. package/InputMask.cjs.map +1 -0
  74. package/InputMask.d.ts +13 -0
  75. package/InputMask.js +126 -0
  76. package/InputMask.js.map +1 -0
  77. package/{Label-e2593298.cjs → Label-aca119f2.cjs} +2 -2
  78. package/{Label-e2593298.cjs.map → Label-aca119f2.cjs.map} +1 -1
  79. package/{Label-854a39e4.js → Label-ed5cd8a7.js} +2 -2
  80. package/{Label-854a39e4.js.map → Label-ed5cd8a7.js.map} +1 -1
  81. package/Link.cjs +1 -1
  82. package/Link.js +1 -1
  83. package/ListView.cjs +1 -1
  84. package/ListView.cjs.map +1 -1
  85. package/ListView.js +2 -2
  86. package/ListView.js.map +1 -1
  87. package/Listbox.cjs +1 -1
  88. package/Listbox.cjs.map +1 -1
  89. package/Listbox.js +10 -10
  90. package/Listbox.js.map +1 -1
  91. package/LocalizationProvider.cjs.map +1 -1
  92. package/LocalizationProvider.js.map +1 -1
  93. package/Menu.cjs +1 -1
  94. package/Menu.cjs.map +1 -1
  95. package/Menu.js +28 -28
  96. package/Menu.js.map +1 -1
  97. package/{Overflow-a026904d.js → Overflow-a2f48366.js} +2 -2
  98. package/Overflow-a2f48366.js.map +1 -0
  99. package/{Overflow-057bbf4e.cjs → Overflow-b4d706e8.cjs} +2 -2
  100. package/Overflow-b4d706e8.cjs.map +1 -0
  101. package/Overflow.cjs +1 -1
  102. package/Overflow.js +15 -15
  103. package/Page.cjs +1 -1
  104. package/Page.cjs.map +1 -1
  105. package/Page.js +6 -5
  106. package/Page.js.map +1 -1
  107. package/Popover-44119105.js +276 -0
  108. package/Popover-44119105.js.map +1 -0
  109. package/Popover-665147d6.cjs +2 -0
  110. package/Popover-665147d6.cjs.map +1 -0
  111. package/Popover.cjs +1 -1
  112. package/Popover.js +15 -15
  113. package/ProgressBar.cjs +1 -1
  114. package/ProgressBar.cjs.map +1 -1
  115. package/ProgressBar.js +1 -1
  116. package/ProgressBar.js.map +1 -1
  117. package/Radio.cjs +1 -1
  118. package/Radio.cjs.map +1 -1
  119. package/Radio.js +25 -25
  120. package/Radio.js.map +1 -1
  121. package/SegmentedControl.cjs +1 -1
  122. package/SegmentedControl.cjs.map +1 -1
  123. package/SegmentedControl.js +28 -28
  124. package/SegmentedControl.js.map +1 -1
  125. package/SideNav.cjs +1 -1
  126. package/SideNav.cjs.map +1 -1
  127. package/SideNav.js +10 -10
  128. package/SideNav.js.map +1 -1
  129. package/SrOnly-0c7fd87a.js.map +1 -1
  130. package/SrOnly-91a467dc.cjs.map +1 -1
  131. package/Stepper.cjs +1 -1
  132. package/Stepper.cjs.map +1 -1
  133. package/Stepper.js +12 -12
  134. package/Stepper.js.map +1 -1
  135. package/Switch.cjs.map +1 -1
  136. package/Switch.js.map +1 -1
  137. package/Tab.cjs +1 -1
  138. package/Tab.cjs.map +1 -1
  139. package/Tab.js +14 -14
  140. package/Tab.js.map +1 -1
  141. package/Text-08c90c22.js.map +1 -1
  142. package/Text-8ed03ac7.cjs.map +1 -1
  143. package/TextField-7d04b45f.js +142 -0
  144. package/TextField-7d04b45f.js.map +1 -0
  145. package/TextField-bd5f664e.cjs +2 -0
  146. package/TextField-bd5f664e.cjs.map +1 -0
  147. package/TextField.cjs +1 -1
  148. package/TextField.cjs.map +1 -1
  149. package/TextField.css +1 -0
  150. package/TextField.js +21 -156
  151. package/TextField.js.map +1 -1
  152. package/Textarea.cjs +1 -1
  153. package/Textarea.cjs.map +1 -1
  154. package/Textarea.js +30 -30
  155. package/Textarea.js.map +1 -1
  156. package/ThemeProvider.cjs +1 -1
  157. package/ThemeProvider.js +1 -1
  158. package/Toast.cjs +3 -3
  159. package/Toast.cjs.map +1 -1
  160. package/Toast.js +9 -9
  161. package/Toast.js.map +1 -1
  162. package/{Tooltip-dcc5d45c.js → Tooltip-13761a78.js} +28 -28
  163. package/Tooltip-13761a78.js.map +1 -0
  164. package/Tooltip-ea2b58dc.cjs +2 -0
  165. package/Tooltip-ea2b58dc.cjs.map +1 -0
  166. package/Tooltip.cjs +1 -1
  167. package/Tooltip.js +1 -1
  168. package/anvil2.cjs +1 -1
  169. package/anvil2.d.ts +19 -0
  170. package/anvil2.js +110 -105
  171. package/anvil2.js.map +1 -1
  172. package/{index-11b6ca91-d30fd1d3.cjs → index-16923f36-13f8775f.cjs} +2 -2
  173. package/index-16923f36-13f8775f.cjs.map +1 -0
  174. package/{index-11b6ca91-14b4e485.js → index-16923f36-b76f5ccb.js} +6 -6
  175. package/index-16923f36-b76f5ccb.js.map +1 -0
  176. package/{index-04060912.js → index-204e7e78.js} +1115 -1062
  177. package/index-204e7e78.js.map +1 -0
  178. package/{index-902bf2b0.js → index-3df95505.js} +4 -4
  179. package/index-3df95505.js.map +1 -0
  180. package/index-628a2685.cjs +5 -0
  181. package/index-628a2685.cjs.map +1 -0
  182. package/{index-dcf78e3f.cjs → index-98c0e500.cjs} +2 -2
  183. package/index-98c0e500.cjs.map +1 -0
  184. package/{index-eb2e706f-03380994.js → index-f6869ed6-10ae0c3c.js} +2 -2
  185. package/index-f6869ed6-10ae0c3c.js.map +1 -0
  186. package/{index-eb2e706f-ff6c4157.cjs → index-f6869ed6-8e47d5d4.cjs} +2 -2
  187. package/index-f6869ed6-8e47d5d4.cjs.map +1 -0
  188. package/index21.css +1 -1
  189. package/index22.css +1 -1
  190. package/index23.css +1 -1
  191. package/package.json +2 -2
  192. package/useLinkStyles.cjs +1 -1
  193. package/useLinkStyles.js +1 -1
  194. package/useMergeRefs.cjs +1 -1
  195. package/useMergeRefs.cjs.map +1 -1
  196. package/useMergeRefs.js +9 -2
  197. package/useMergeRefs.js.map +1 -1
  198. package/Alert-673d75aa.cjs +0 -2
  199. package/Alert-673d75aa.cjs.map +0 -1
  200. package/Alert-85a791c2.js.map +0 -1
  201. package/Checkbox-634c4d3d.js.map +0 -1
  202. package/Checkbox-d1db5a71.cjs.map +0 -1
  203. package/Chip-73b032eb.js.map +0 -1
  204. package/Chip-88873569.cjs +0 -2
  205. package/Chip-88873569.cjs.map +0 -1
  206. package/Dialog-de6969a2.cjs +0 -2
  207. package/Dialog-de6969a2.cjs.map +0 -1
  208. package/Overflow-057bbf4e.cjs.map +0 -1
  209. package/Overflow-a026904d.js.map +0 -1
  210. package/Popover-aaeea980.js +0 -272
  211. package/Popover-aaeea980.js.map +0 -1
  212. package/Popover-e336dabc.cjs +0 -2
  213. package/Popover-e336dabc.cjs.map +0 -1
  214. package/Tooltip-2ecbf35e.cjs +0 -2
  215. package/Tooltip-2ecbf35e.cjs.map +0 -1
  216. package/Tooltip-dcc5d45c.js.map +0 -1
  217. package/index-04060912.js.map +0 -1
  218. package/index-11b6ca91-14b4e485.js.map +0 -1
  219. package/index-11b6ca91-d30fd1d3.cjs.map +0 -1
  220. package/index-40821bc4.cjs +0 -2
  221. package/index-40821bc4.cjs.map +0 -1
  222. package/index-49242812.js +0 -59
  223. package/index-49242812.js.map +0 -1
  224. package/index-69174413.cjs +0 -5
  225. package/index-69174413.cjs.map +0 -1
  226. package/index-902bf2b0.js.map +0 -1
  227. package/index-dcf78e3f.cjs.map +0 -1
  228. package/index-eb2e706f-03380994.js.map +0 -1
  229. package/index-eb2e706f-ff6c4157.cjs.map +0 -1
  230. package/index24.css +0 -1
  231. /package/{index-eb2e706f.css → index-f6869ed6.css} +0 -0
@@ -1,8 +1,16 @@
1
- import * as d from "react";
2
- import { useLayoutEffect as Tn, useEffect as On, useRef as sr } from "react";
3
- import * as Sn from "react-dom";
1
+ import { f as We } from "./jsx-runtime-944c88e2-e73fa629.js";
2
+ import { x as ar } from "./index-47e4931c.js";
3
+ import { E as fr, C as dr } from "./index-16923f36-b76f5ccb.js";
4
+ import * as m from "react";
5
+ import { useLayoutEffect as Sn, useEffect as Mn, useRef as mr, createContext as Pn, useState as gr, useMemo as pr, useContext as hr } from "react";
6
+ import * as An from "react-dom";
7
+ import { G as vr } from "./index-c6e22bb9.js";
8
+ import "./tinycolor-d415b1fd.js";
9
+ import { J as br, H as yr } from "./useLayoutPropsUtil-f34e9597.js";
10
+ import { LocalizationProvider as en } from "./LocalizationProvider.js";
11
+ import { p as xr } from "./primitive-90e4e69c.js";
4
12
  function Le(e) {
5
- return Mn(e) ? (e.nodeName || "").toLowerCase() : "#document";
13
+ return kn(e) ? (e.nodeName || "").toLowerCase() : "#document";
6
14
  }
7
15
  function ae(e) {
8
16
  var t;
@@ -10,9 +18,9 @@ function ae(e) {
10
18
  }
11
19
  function Ce(e) {
12
20
  var t;
13
- return (t = (Mn(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
21
+ return (t = (kn(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
14
22
  }
15
- function Mn(e) {
23
+ function kn(e) {
16
24
  return e instanceof Node || e instanceof ae(e).Node;
17
25
  }
18
26
  function Y(e) {
@@ -21,10 +29,10 @@ function Y(e) {
21
29
  function te(e) {
22
30
  return e instanceof HTMLElement || e instanceof ae(e).HTMLElement;
23
31
  }
24
- function kt(e) {
32
+ function Dt(e) {
25
33
  return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof ae(e).ShadowRoot;
26
34
  }
27
- function tt(e) {
35
+ function nt(e) {
28
36
  const {
29
37
  overflow: t,
30
38
  overflowX: n,
@@ -33,10 +41,10 @@ function tt(e) {
33
41
  } = me(e);
34
42
  return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
35
43
  }
36
- function cr(e) {
44
+ function wr(e) {
37
45
  return ["table", "td", "th"].includes(Le(e));
38
46
  }
39
- function Rt(e) {
47
+ function Et(e) {
40
48
  return [":popover-open", ":modal"].some((t) => {
41
49
  try {
42
50
  return e.matches(t);
@@ -45,22 +53,22 @@ function Rt(e) {
45
53
  }
46
54
  });
47
55
  }
48
- function _t(e) {
49
- const t = Wt(), n = Y(e) ? me(e) : e;
56
+ function Wt(e) {
57
+ const t = Bt(), n = Y(e) ? me(e) : e;
50
58
  return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
51
59
  }
52
- function lr(e) {
60
+ function Rr(e) {
53
61
  let t = Re(e);
54
62
  for (; te(t) && !Me(t); ) {
55
- if (_t(t))
63
+ if (Wt(t))
56
64
  return t;
57
- if (Rt(t))
65
+ if (Et(t))
58
66
  return null;
59
67
  t = Re(t);
60
68
  }
61
69
  return null;
62
70
  }
63
- function Wt() {
71
+ function Bt() {
64
72
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
65
73
  }
66
74
  function Me(e) {
@@ -69,7 +77,7 @@ function Me(e) {
69
77
  function me(e) {
70
78
  return ae(e).getComputedStyle(e);
71
79
  }
72
- function Et(e) {
80
+ function Ct(e) {
73
81
  return Y(e) ? {
74
82
  scrollLeft: e.scrollLeft,
75
83
  scrollTop: e.scrollTop
@@ -85,20 +93,20 @@ function Re(e) {
85
93
  // Step into the shadow DOM of the parent of a slotted node.
86
94
  e.assignedSlot || // DOM Element detected.
87
95
  e.parentNode || // ShadowRoot detected.
88
- kt(e) && e.host || // Fallback.
96
+ Dt(e) && e.host || // Fallback.
89
97
  Ce(e)
90
98
  );
91
- return kt(t) ? t.host : t;
99
+ return Dt(t) ? t.host : t;
92
100
  }
93
- function An(e) {
101
+ function Dn(e) {
94
102
  const t = Re(e);
95
- return Me(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : te(t) && tt(t) ? t : An(t);
103
+ return Me(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : te(t) && nt(t) ? t : Dn(t);
96
104
  }
97
105
  function Se(e, t, n) {
98
106
  var r;
99
107
  t === void 0 && (t = []), n === void 0 && (n = !0);
100
- const o = An(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), s = ae(o);
101
- return i ? t.concat(s, s.visualViewport || [], tt(o) ? o : [], s.frameElement && n ? Se(s.frameElement) : []) : t.concat(o, Se(o, [], n));
108
+ const o = Dn(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), s = ae(o);
109
+ return i ? t.concat(s, s.visualViewport || [], nt(o) ? o : [], s.frameElement && n ? Se(s.frameElement) : []) : t.concat(o, Se(o, [], n));
102
110
  }
103
111
  function he(e) {
104
112
  let t = e.activeElement;
@@ -114,7 +122,7 @@ function ee(e, t) {
114
122
  const n = t.getRootNode == null ? void 0 : t.getRootNode();
115
123
  if (e.contains(t))
116
124
  return !0;
117
- if (n && kt(n)) {
125
+ if (n && Dt(n)) {
118
126
  let r = t;
119
127
  for (; r; ) {
120
128
  if (e === r)
@@ -124,11 +132,11 @@ function ee(e, t) {
124
132
  }
125
133
  return !1;
126
134
  }
127
- function Pn() {
135
+ function Ln() {
128
136
  const e = navigator.userAgentData;
129
137
  return e != null && e.platform ? e.platform : navigator.platform;
130
138
  }
131
- function kn() {
139
+ function Fn() {
132
140
  const e = navigator.userAgentData;
133
141
  return e && Array.isArray(e.brands) ? e.brands.map((t) => {
134
142
  let {
@@ -138,40 +146,40 @@ function kn() {
138
146
  return n + "/" + r;
139
147
  }).join(" ") : navigator.userAgent;
140
148
  }
141
- function Dn(e) {
142
- return e.mozInputSource === 0 && e.isTrusted ? !0 : Dt() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
149
+ function Nn(e) {
150
+ return e.mozInputSource === 0 && e.isTrusted ? !0 : Lt() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
143
151
  }
144
- function Bt(e) {
145
- return ur() ? !1 : !Dt() && e.width === 0 && e.height === 0 || Dt() && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse" || // iOS VoiceOver returns 0.333• for width/height.
152
+ function Kt(e) {
153
+ return Er() ? !1 : !Lt() && e.width === 0 && e.height === 0 || Lt() && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse" || // iOS VoiceOver returns 0.333• for width/height.
146
154
  e.width < 1 && e.height < 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "touch";
147
155
  }
148
- function Kt() {
156
+ function $t() {
149
157
  return /apple/i.test(navigator.vendor);
150
158
  }
151
- function Dt() {
159
+ function Lt() {
152
160
  const e = /android/i;
153
- return e.test(Pn()) || e.test(kn());
161
+ return e.test(Ln()) || e.test(Fn());
154
162
  }
155
- function Ln() {
156
- return Pn().toLowerCase().startsWith("mac") && !navigator.maxTouchPoints;
163
+ function Vn() {
164
+ return Ln().toLowerCase().startsWith("mac") && !navigator.maxTouchPoints;
157
165
  }
158
- function ur() {
159
- return kn().includes("jsdom/");
166
+ function Er() {
167
+ return Fn().includes("jsdom/");
160
168
  }
161
- function Ze(e, t) {
169
+ function Je(e, t) {
162
170
  const n = ["mouse", "pen"];
163
171
  return t || n.push("", void 0), n.includes(e);
164
172
  }
165
- function ar(e) {
173
+ function Cr(e) {
166
174
  return "nativeEvent" in e;
167
175
  }
168
- function fr(e) {
176
+ function Ir(e) {
169
177
  return e.matches("html,body");
170
178
  }
171
179
  function ne(e) {
172
180
  return (e == null ? void 0 : e.ownerDocument) || document;
173
181
  }
174
- function It(e, t) {
182
+ function Tt(e, t) {
175
183
  if (t == null)
176
184
  return !1;
177
185
  if ("composedPath" in e)
@@ -182,32 +190,32 @@ function It(e, t) {
182
190
  function we(e) {
183
191
  return "composedPath" in e ? e.composedPath()[0] : e.target;
184
192
  }
185
- const dr = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
186
- function $t(e) {
187
- return te(e) && e.matches(dr);
193
+ const Tr = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
194
+ function Ht(e) {
195
+ return te(e) && e.matches(Tr);
188
196
  }
189
197
  function oe(e) {
190
198
  e.preventDefault(), e.stopPropagation();
191
199
  }
192
- function Fn(e) {
193
- return e ? e.getAttribute("role") === "combobox" && $t(e) : !1;
200
+ function _n(e) {
201
+ return e ? e.getAttribute("role") === "combobox" && Ht(e) : !1;
194
202
  }
195
- const ye = Math.min, fe = Math.max, gt = Math.round, Be = Math.floor, Ae = (e) => ({
203
+ const ye = Math.min, fe = Math.max, pt = Math.round, Ke = Math.floor, Pe = (e) => ({
196
204
  x: e,
197
205
  y: e
198
- }), mr = {
206
+ }), Or = {
199
207
  left: "right",
200
208
  right: "left",
201
209
  bottom: "top",
202
210
  top: "bottom"
203
- }, gr = {
211
+ }, Sr = {
204
212
  start: "end",
205
213
  end: "start"
206
214
  };
207
- function Lt(e, t, n) {
215
+ function Ft(e, t, n) {
208
216
  return fe(e, ye(t, n));
209
217
  }
210
- function Pe(e, t) {
218
+ function Ae(e, t) {
211
219
  return typeof e == "function" ? e(t) : e;
212
220
  }
213
221
  function Ee(e) {
@@ -216,32 +224,32 @@ function Ee(e) {
216
224
  function qe(e) {
217
225
  return e.split("-")[1];
218
226
  }
219
- function Ht(e) {
227
+ function zt(e) {
220
228
  return e === "x" ? "y" : "x";
221
229
  }
222
- function zt(e) {
230
+ function jt(e) {
223
231
  return e === "y" ? "height" : "width";
224
232
  }
225
233
  function ke(e) {
226
234
  return ["top", "bottom"].includes(Ee(e)) ? "y" : "x";
227
235
  }
228
236
  function qt(e) {
229
- return Ht(ke(e));
237
+ return zt(ke(e));
230
238
  }
231
- function pr(e, t, n) {
239
+ function Mr(e, t, n) {
232
240
  n === void 0 && (n = !1);
233
- const r = qe(e), o = qt(e), i = zt(o);
241
+ const r = qe(e), o = qt(e), i = jt(o);
234
242
  let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
235
- return t.reference[i] > t.floating[i] && (s = pt(s)), [s, pt(s)];
243
+ return t.reference[i] > t.floating[i] && (s = ht(s)), [s, ht(s)];
236
244
  }
237
- function hr(e) {
238
- const t = pt(e);
239
- return [Ft(e), t, Ft(t)];
245
+ function Pr(e) {
246
+ const t = ht(e);
247
+ return [Nt(e), t, Nt(t)];
240
248
  }
241
- function Ft(e) {
242
- return e.replace(/start|end/g, (t) => gr[t]);
249
+ function Nt(e) {
250
+ return e.replace(/start|end/g, (t) => Sr[t]);
243
251
  }
244
- function vr(e, t, n) {
252
+ function Ar(e, t, n) {
245
253
  const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
246
254
  switch (e) {
247
255
  case "top":
@@ -254,15 +262,15 @@ function vr(e, t, n) {
254
262
  return [];
255
263
  }
256
264
  }
257
- function br(e, t, n, r) {
265
+ function kr(e, t, n, r) {
258
266
  const o = qe(e);
259
- let i = vr(Ee(e), n === "start", r);
260
- return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(Ft)))), i;
267
+ let i = Ar(Ee(e), n === "start", r);
268
+ return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(Nt)))), i;
261
269
  }
262
- function pt(e) {
263
- return e.replace(/left|right|bottom|top/g, (t) => mr[t]);
270
+ function ht(e) {
271
+ return e.replace(/left|right|bottom|top/g, (t) => Or[t]);
264
272
  }
265
- function yr(e) {
273
+ function Dr(e) {
266
274
  return {
267
275
  top: 0,
268
276
  right: 0,
@@ -271,15 +279,15 @@ function yr(e) {
271
279
  ...e
272
280
  };
273
281
  }
274
- function Nn(e) {
275
- return typeof e != "number" ? yr(e) : {
282
+ function Wn(e) {
283
+ return typeof e != "number" ? Dr(e) : {
276
284
  top: e,
277
285
  right: e,
278
286
  bottom: e,
279
287
  left: e
280
288
  };
281
289
  }
282
- function ht(e) {
290
+ function vt(e) {
283
291
  const {
284
292
  x: t,
285
293
  y: n,
@@ -301,29 +309,29 @@ function ht(e) {
301
309
  * tabbable 6.2.0
302
310
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
303
311
  */
304
- var xr = ["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])"], vt = /* @__PURE__ */ xr.join(","), Vn = typeof Element > "u", $e = Vn ? function() {
305
- } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, bt = !Vn && Element.prototype.getRootNode ? function(e) {
312
+ var Lr = ["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__ */ Lr.join(","), Bn = typeof Element > "u", He = Bn ? function() {
313
+ } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, yt = !Bn && Element.prototype.getRootNode ? function(e) {
306
314
  var t;
307
315
  return e == null || (t = e.getRootNode) === null || t === void 0 ? void 0 : t.call(e);
308
316
  } : function(e) {
309
317
  return e == null ? void 0 : e.ownerDocument;
310
- }, yt = function e(t, n) {
318
+ }, xt = function e(t, n) {
311
319
  var r;
312
320
  n === void 0 && (n = !0);
313
321
  var o = t == null || (r = t.getAttribute) === null || r === void 0 ? void 0 : r.call(t, "inert"), i = o === "" || o === "true", s = i || n && t && e(t.parentNode);
314
322
  return s;
315
- }, wr = function(t) {
323
+ }, Fr = function(t) {
316
324
  var n, r = t == null || (n = t.getAttribute) === null || n === void 0 ? void 0 : n.call(t, "contenteditable");
317
325
  return r === "" || r === "true";
318
- }, Rr = function(t, n, r) {
319
- if (yt(t))
326
+ }, Nr = function(t, n, r) {
327
+ if (xt(t))
320
328
  return [];
321
- var o = Array.prototype.slice.apply(t.querySelectorAll(vt));
322
- return n && $e.call(t, vt) && o.unshift(t), o = o.filter(r), o;
323
- }, Er = function e(t, n, r) {
329
+ var o = Array.prototype.slice.apply(t.querySelectorAll(bt));
330
+ return n && He.call(t, bt) && o.unshift(t), o = o.filter(r), o;
331
+ }, Vr = function e(t, n, r) {
324
332
  for (var o = [], i = Array.from(t); i.length; ) {
325
333
  var s = i.shift();
326
- if (!yt(s, !1))
334
+ if (!xt(s, !1))
327
335
  if (s.tagName === "SLOT") {
328
336
  var c = s.assignedElements(), u = c.length ? c : s.children, l = e(u, !0, r);
329
337
  r.flatten ? o.push.apply(o, l) : o.push({
@@ -331,10 +339,10 @@ var xr = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
331
339
  candidates: l
332
340
  });
333
341
  } else {
334
- var g = $e.call(s, vt);
342
+ var g = He.call(s, bt);
335
343
  g && r.filter(s) && (n || !t.includes(s)) && o.push(s);
336
344
  var f = s.shadowRoot || // check for an undisclosed shadow
337
- typeof r.getShadowRoot == "function" && r.getShadowRoot(s), h = !yt(f, !1) && (!r.shadowRootFilter || r.shadowRootFilter(s));
345
+ typeof r.getShadowRoot == "function" && r.getShadowRoot(s), h = !xt(f, !1) && (!r.shadowRootFilter || r.shadowRootFilter(s));
338
346
  if (f && h) {
339
347
  var a = e(f === !0 ? s.children : f.children, !0, r);
340
348
  r.flatten ? o.push.apply(o, a) : o.push({
@@ -346,34 +354,34 @@ var xr = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
346
354
  }
347
355
  }
348
356
  return o;
349
- }, _n = function(t) {
357
+ }, Kn = function(t) {
350
358
  return !isNaN(parseInt(t.getAttribute("tabindex"), 10));
351
- }, Wn = function(t) {
359
+ }, $n = function(t) {
352
360
  if (!t)
353
361
  throw new Error("No node provided");
354
- return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || wr(t)) && !_n(t) ? 0 : t.tabIndex;
355
- }, Cr = function(t, n) {
356
- var r = Wn(t);
357
- return r < 0 && n && !_n(t) ? 0 : r;
358
- }, Ir = function(t, n) {
362
+ return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || Fr(t)) && !Kn(t) ? 0 : t.tabIndex;
363
+ }, _r = function(t, n) {
364
+ var r = $n(t);
365
+ return r < 0 && n && !Kn(t) ? 0 : r;
366
+ }, Wr = function(t, n) {
359
367
  return t.tabIndex === n.tabIndex ? t.documentOrder - n.documentOrder : t.tabIndex - n.tabIndex;
360
- }, Bn = function(t) {
368
+ }, Hn = function(t) {
361
369
  return t.tagName === "INPUT";
362
- }, Tr = function(t) {
363
- return Bn(t) && t.type === "hidden";
364
- }, Or = function(t) {
370
+ }, Br = function(t) {
371
+ return Hn(t) && t.type === "hidden";
372
+ }, Kr = function(t) {
365
373
  var n = t.tagName === "DETAILS" && Array.prototype.slice.apply(t.children).some(function(r) {
366
374
  return r.tagName === "SUMMARY";
367
375
  });
368
376
  return n;
369
- }, Sr = function(t, n) {
377
+ }, $r = function(t, n) {
370
378
  for (var r = 0; r < t.length; r++)
371
379
  if (t[r].checked && t[r].form === n)
372
380
  return t[r];
373
- }, Mr = function(t) {
381
+ }, Hr = function(t) {
374
382
  if (!t.name)
375
383
  return !0;
376
- var n = t.form || bt(t), r = function(c) {
384
+ var n = t.form || yt(t), r = function(c) {
377
385
  return n.querySelectorAll('input[type="radio"][name="' + c + '"]');
378
386
  }, o;
379
387
  if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
@@ -384,78 +392,78 @@ var xr = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
384
392
  } catch (s) {
385
393
  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
394
  }
387
- var i = Sr(o, t.form);
395
+ var i = $r(o, t.form);
388
396
  return !i || i === t;
389
- }, Ar = function(t) {
390
- return Bn(t) && t.type === "radio";
391
- }, Pr = function(t) {
392
- return Ar(t) && !Mr(t);
393
- }, kr = function(t) {
394
- var n, r = t && bt(t), o = (n = r) === null || n === void 0 ? void 0 : n.host, i = !1;
397
+ }, zr = function(t) {
398
+ return Hn(t) && t.type === "radio";
399
+ }, jr = function(t) {
400
+ return zr(t) && !Hr(t);
401
+ }, qr = function(t) {
402
+ var n, r = t && yt(t), o = (n = r) === null || n === void 0 ? void 0 : n.host, i = !1;
395
403
  if (r && r !== t) {
396
404
  var s, c, u;
397
405
  for (i = !!((s = o) !== null && s !== void 0 && (c = s.ownerDocument) !== null && c !== void 0 && c.contains(o) || t != null && (u = t.ownerDocument) !== null && u !== void 0 && u.contains(t)); !i && o; ) {
398
406
  var l, g, f;
399
- r = bt(o), o = (l = r) === null || l === void 0 ? void 0 : l.host, i = !!((g = o) !== null && g !== void 0 && (f = g.ownerDocument) !== null && f !== void 0 && f.contains(o));
407
+ r = yt(o), o = (l = r) === null || l === void 0 ? void 0 : l.host, i = !!((g = o) !== null && g !== void 0 && (f = g.ownerDocument) !== null && f !== void 0 && f.contains(o));
400
408
  }
401
409
  }
402
410
  return i;
403
- }, Qt = function(t) {
411
+ }, tn = function(t) {
404
412
  var n = t.getBoundingClientRect(), r = n.width, o = n.height;
405
413
  return r === 0 && o === 0;
406
- }, Dr = function(t, n) {
414
+ }, Ur = function(t, n) {
407
415
  var r = n.displayCheck, o = n.getShadowRoot;
408
416
  if (getComputedStyle(t).visibility === "hidden")
409
417
  return !0;
410
- var i = $e.call(t, "details>summary:first-of-type"), s = i ? t.parentElement : t;
411
- if ($e.call(s, "details:not([open]) *"))
418
+ var i = He.call(t, "details>summary:first-of-type"), s = i ? t.parentElement : t;
419
+ if (He.call(s, "details:not([open]) *"))
412
420
  return !0;
413
421
  if (!r || r === "full" || r === "legacy-full") {
414
422
  if (typeof o == "function") {
415
423
  for (var c = t; t; ) {
416
- var u = t.parentElement, l = bt(t);
424
+ var u = t.parentElement, l = yt(t);
417
425
  if (u && !u.shadowRoot && o(u) === !0)
418
- return Qt(t);
426
+ return tn(t);
419
427
  t.assignedSlot ? t = t.assignedSlot : !u && l !== t.ownerDocument ? t = l.host : t = u;
420
428
  }
421
429
  t = c;
422
430
  }
423
- if (kr(t))
431
+ if (qr(t))
424
432
  return !t.getClientRects().length;
425
433
  if (r !== "legacy-full")
426
434
  return !0;
427
435
  } else if (r === "non-zero-area")
428
- return Qt(t);
436
+ return tn(t);
429
437
  return !1;
430
- }, Lr = function(t) {
438
+ }, Yr = function(t) {
431
439
  if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))
432
440
  for (var n = t.parentElement; n; ) {
433
441
  if (n.tagName === "FIELDSET" && n.disabled) {
434
442
  for (var r = 0; r < n.children.length; r++) {
435
443
  var o = n.children.item(r);
436
444
  if (o.tagName === "LEGEND")
437
- return $e.call(n, "fieldset[disabled] *") ? !0 : !o.contains(t);
445
+ return He.call(n, "fieldset[disabled] *") ? !0 : !o.contains(t);
438
446
  }
439
447
  return !0;
440
448
  }
441
449
  n = n.parentElement;
442
450
  }
443
451
  return !1;
444
- }, Fr = function(t, n) {
452
+ }, Gr = function(t, n) {
445
453
  return !(n.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
446
454
  // because we're limited in the type of selectors we can use in JSDom (see related
447
455
  // note related to `candidateSelectors`)
448
- yt(n) || Tr(n) || Dr(n, t) || // For a details element with a summary, the summary element gets the focus
449
- Or(n) || Lr(n));
450
- }, Nt = function(t, n) {
451
- return !(Pr(n) || Wn(n) < 0 || !Fr(t, n));
452
- }, Nr = function(t) {
456
+ xt(n) || Br(n) || Ur(n, t) || // For a details element with a summary, the summary element gets the focus
457
+ Kr(n) || Yr(n));
458
+ }, Vt = function(t, n) {
459
+ return !(jr(n) || $n(n) < 0 || !Gr(t, n));
460
+ }, Xr = function(t) {
453
461
  var n = parseInt(t.getAttribute("tabindex"), 10);
454
462
  return !!(isNaN(n) || n >= 0);
455
- }, Vr = function e(t) {
463
+ }, Zr = function e(t) {
456
464
  var n = [], r = [];
457
465
  return t.forEach(function(o, i) {
458
- var s = !!o.scopeParent, c = s ? o.scopeParent : o, u = Cr(c, s), l = s ? e(o.candidates) : c;
466
+ var s = !!o.scopeParent, c = s ? o.scopeParent : o, u = _r(c, s), l = s ? e(o.candidates) : c;
459
467
  u === 0 ? s ? n.push.apply(n, l) : n.push(c) : r.push({
460
468
  documentOrder: i,
461
469
  tabIndex: u,
@@ -463,29 +471,29 @@ var xr = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
463
471
  isScope: s,
464
472
  content: l
465
473
  });
466
- }), r.sort(Ir).reduce(function(o, i) {
474
+ }), r.sort(Wr).reduce(function(o, i) {
467
475
  return i.isScope ? o.push.apply(o, i.content) : o.push(i.content), o;
468
476
  }, []).concat(n);
469
- }, Je = function(t, n) {
477
+ }, Qe = function(t, n) {
470
478
  n = n || {};
471
479
  var r;
472
- return n.getShadowRoot ? r = Er([t], n.includeContainer, {
473
- filter: Nt.bind(null, n),
480
+ return n.getShadowRoot ? r = Vr([t], n.includeContainer, {
481
+ filter: Vt.bind(null, n),
474
482
  flatten: !1,
475
483
  getShadowRoot: n.getShadowRoot,
476
- shadowRootFilter: Nr
477
- }) : r = Rr(t, n.includeContainer, Nt.bind(null, n)), Vr(r);
478
- }, _r = function(t, n) {
484
+ shadowRootFilter: Xr
485
+ }) : r = Nr(t, n.includeContainer, Vt.bind(null, n)), Zr(r);
486
+ }, Jr = function(t, n) {
479
487
  if (n = n || {}, !t)
480
488
  throw new Error("No node provided");
481
- return $e.call(t, vt) === !1 ? !1 : Nt(n, t);
489
+ return He.call(t, bt) === !1 ? !1 : Vt(n, t);
482
490
  };
483
- function en(e, t, n) {
491
+ function nn(e, t, n) {
484
492
  let {
485
493
  reference: r,
486
494
  floating: o
487
495
  } = e;
488
- const i = ke(t), s = qt(t), c = zt(s), u = Ee(t), l = i === "y", g = r.x + r.width / 2 - o.width / 2, f = r.y + r.height / 2 - o.height / 2, h = r[c] / 2 - o[c] / 2;
496
+ const i = ke(t), s = qt(t), c = jt(s), u = Ee(t), l = i === "y", g = r.x + r.width / 2 - o.width / 2, f = r.y + r.height / 2 - o.height / 2, h = r[c] / 2 - o[c] / 2;
489
497
  let a;
490
498
  switch (u) {
491
499
  case "top":
@@ -528,7 +536,7 @@ function en(e, t, n) {
528
536
  }
529
537
  return a;
530
538
  }
531
- const Wr = async (e, t, n) => {
539
+ const Qr = async (e, t, n) => {
532
540
  const {
533
541
  placement: r = "bottom",
534
542
  strategy: o = "absolute",
@@ -542,17 +550,17 @@ const Wr = async (e, t, n) => {
542
550
  }), {
543
551
  x: g,
544
552
  y: f
545
- } = en(l, r, u), h = r, a = {}, m = 0;
553
+ } = nn(l, r, u), h = r, a = {}, d = 0;
546
554
  for (let p = 0; p < c.length; p++) {
547
555
  const {
548
- name: R,
549
- fn: E
556
+ name: w,
557
+ fn: x
550
558
  } = c[p], {
551
- x: C,
559
+ x: E,
552
560
  y: b,
553
561
  data: y,
554
- reset: A
555
- } = await E({
562
+ reset: P
563
+ } = await x({
556
564
  x: g,
557
565
  y: f,
558
566
  initialPlacement: r,
@@ -566,20 +574,20 @@ const Wr = async (e, t, n) => {
566
574
  floating: t
567
575
  }
568
576
  });
569
- g = C ?? g, f = b ?? f, a = {
577
+ g = E ?? g, f = b ?? f, a = {
570
578
  ...a,
571
- [R]: {
572
- ...a[R],
579
+ [w]: {
580
+ ...a[w],
573
581
  ...y
574
582
  }
575
- }, A && m <= 50 && (m++, typeof A == "object" && (A.placement && (h = A.placement), A.rects && (l = A.rects === !0 ? await s.getElementRects({
583
+ }, P && d <= 50 && (d++, typeof P == "object" && (P.placement && (h = P.placement), P.rects && (l = P.rects === !0 ? await s.getElementRects({
576
584
  reference: e,
577
585
  floating: t,
578
586
  strategy: o
579
- }) : A.rects), {
587
+ }) : P.rects), {
580
588
  x: g,
581
589
  y: f
582
- } = en(l, h, u)), p = -1);
590
+ } = nn(l, h, u)), p = -1);
583
591
  }
584
592
  return {
585
593
  x: g,
@@ -605,12 +613,12 @@ async function Ut(e, t) {
605
613
  elementContext: f = "floating",
606
614
  altBoundary: h = !1,
607
615
  padding: a = 0
608
- } = Pe(t, e), m = Nn(a), R = c[h ? f === "floating" ? "reference" : "floating" : f], E = ht(await i.getClippingRect({
609
- element: (n = await (i.isElement == null ? void 0 : i.isElement(R))) == null || n ? R : R.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
616
+ } = Ae(t, e), d = Wn(a), w = c[h ? f === "floating" ? "reference" : "floating" : f], x = vt(await i.getClippingRect({
617
+ element: (n = await (i.isElement == null ? void 0 : i.isElement(w))) == null || n ? w : w.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
610
618
  boundary: l,
611
619
  rootBoundary: g,
612
620
  strategy: u
613
- })), C = f === "floating" ? {
621
+ })), E = f === "floating" ? {
614
622
  x: r,
615
623
  y: o,
616
624
  width: s.floating.width,
@@ -621,20 +629,20 @@ async function Ut(e, t) {
621
629
  } : {
622
630
  x: 1,
623
631
  y: 1
624
- }, A = ht(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
632
+ }, P = vt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
625
633
  elements: c,
626
- rect: C,
634
+ rect: E,
627
635
  offsetParent: b,
628
636
  strategy: u
629
- }) : C);
637
+ }) : E);
630
638
  return {
631
- top: (E.top - A.top + m.top) / y.y,
632
- bottom: (A.bottom - E.bottom + m.bottom) / y.y,
633
- left: (E.left - A.left + m.left) / y.x,
634
- right: (A.right - E.right + m.right) / y.x
639
+ top: (x.top - P.top + d.top) / y.y,
640
+ bottom: (P.bottom - x.bottom + d.bottom) / y.y,
641
+ left: (x.left - P.left + d.left) / y.x,
642
+ right: (P.right - x.right + d.right) / y.x
635
643
  };
636
644
  }
637
- const Br = (e) => ({
645
+ const eo = (e) => ({
638
646
  name: "arrow",
639
647
  options: e,
640
648
  async fn(t) {
@@ -649,29 +657,29 @@ const Br = (e) => ({
649
657
  } = t, {
650
658
  element: l,
651
659
  padding: g = 0
652
- } = Pe(e, t) || {};
660
+ } = Ae(e, t) || {};
653
661
  if (l == null)
654
662
  return {};
655
- const f = Nn(g), h = {
663
+ const f = Wn(g), h = {
656
664
  x: n,
657
665
  y: r
658
- }, a = qt(o), m = zt(a), p = await s.getDimensions(l), R = a === "y", E = R ? "top" : "left", C = R ? "bottom" : "right", b = R ? "clientHeight" : "clientWidth", y = i.reference[m] + i.reference[a] - h[a] - i.floating[m], A = h[a] - i.reference[a], P = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
659
- let V = P ? P[b] : 0;
660
- (!V || !await (s.isElement == null ? void 0 : s.isElement(P))) && (V = c.floating[b] || i.floating[m]);
661
- const B = y / 2 - A / 2, H = V / 2 - p[m] / 2 - 1, O = ye(f[E], H), D = ye(f[C], H), M = O, S = V - p[m] - D, v = V / 2 - p[m] / 2 + B, w = Lt(M, v, S), I = !u.arrow && qe(o) != null && v !== w && i.reference[m] / 2 - (v < M ? O : D) - p[m] / 2 < 0, x = I ? v < M ? v - M : v - S : 0;
666
+ }, a = qt(o), d = jt(a), p = await s.getDimensions(l), w = a === "y", x = w ? "top" : "left", E = w ? "bottom" : "right", b = w ? "clientHeight" : "clientWidth", y = i.reference[d] + i.reference[a] - h[a] - i.floating[d], P = h[a] - i.reference[a], A = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
667
+ let V = A ? A[b] : 0;
668
+ (!V || !await (s.isElement == null ? void 0 : s.isElement(A))) && (V = c.floating[b] || i.floating[d]);
669
+ const B = y / 2 - P / 2, H = V / 2 - p[d] / 2 - 1, O = ye(f[x], H), D = ye(f[E], H), M = O, S = V - p[d] - D, v = V / 2 - p[d] / 2 + B, C = Ft(M, v, S), I = !u.arrow && qe(o) != null && v !== C && i.reference[d] / 2 - (v < M ? O : D) - p[d] / 2 < 0, R = I ? v < M ? v - M : v - S : 0;
662
670
  return {
663
- [a]: h[a] + x,
671
+ [a]: h[a] + R,
664
672
  data: {
665
- [a]: w,
666
- centerOffset: v - w - x,
673
+ [a]: C,
674
+ centerOffset: v - C - R,
667
675
  ...I && {
668
- alignmentOffset: x
676
+ alignmentOffset: R
669
677
  }
670
678
  },
671
679
  reset: I
672
680
  };
673
681
  }
674
- }), Kr = function(e) {
682
+ }), to = function(e) {
675
683
  return e === void 0 && (e = {}), {
676
684
  name: "flip",
677
685
  options: e,
@@ -689,18 +697,18 @@ const Br = (e) => ({
689
697
  crossAxis: f = !0,
690
698
  fallbackPlacements: h,
691
699
  fallbackStrategy: a = "bestFit",
692
- fallbackAxisSideDirection: m = "none",
700
+ fallbackAxisSideDirection: d = "none",
693
701
  flipAlignment: p = !0,
694
- ...R
695
- } = Pe(e, t);
702
+ ...w
703
+ } = Ae(e, t);
696
704
  if ((n = i.arrow) != null && n.alignmentOffset)
697
705
  return {};
698
- const E = Ee(o), C = ke(c), b = Ee(c) === c, y = await (u.isRTL == null ? void 0 : u.isRTL(l.floating)), A = h || (b || !p ? [pt(c)] : hr(c)), P = m !== "none";
699
- !h && P && A.push(...br(c, p, m, y));
700
- const V = [c, ...A], B = await Ut(t, R), H = [];
706
+ const x = Ee(o), E = ke(c), b = Ee(c) === c, y = await (u.isRTL == null ? void 0 : u.isRTL(l.floating)), P = h || (b || !p ? [ht(c)] : Pr(c)), A = d !== "none";
707
+ !h && A && P.push(...kr(c, p, d, y));
708
+ const V = [c, ...P], B = await Ut(t, w), H = [];
701
709
  let O = ((r = i.flip) == null ? void 0 : r.overflows) || [];
702
- if (g && H.push(B[E]), f) {
703
- const v = pr(o, s, y);
710
+ if (g && H.push(B[x]), f) {
711
+ const v = Mr(o, s, y);
704
712
  H.push(B[v[0]], B[v[1]]);
705
713
  }
706
714
  if (O = [...O, {
@@ -708,32 +716,32 @@ const Br = (e) => ({
708
716
  overflows: H
709
717
  }], !H.every((v) => v <= 0)) {
710
718
  var D, M;
711
- const v = (((D = i.flip) == null ? void 0 : D.index) || 0) + 1, w = V[v];
712
- if (w)
719
+ const v = (((D = i.flip) == null ? void 0 : D.index) || 0) + 1, C = V[v];
720
+ if (C)
713
721
  return {
714
722
  data: {
715
723
  index: v,
716
724
  overflows: O
717
725
  },
718
726
  reset: {
719
- placement: w
727
+ placement: C
720
728
  }
721
729
  };
722
- let I = (M = O.filter((x) => x.overflows[0] <= 0).sort((x, k) => x.overflows[1] - k.overflows[1])[0]) == null ? void 0 : M.placement;
730
+ let I = (M = O.filter((R) => R.overflows[0] <= 0).sort((R, k) => R.overflows[1] - k.overflows[1])[0]) == null ? void 0 : M.placement;
723
731
  if (!I)
724
732
  switch (a) {
725
733
  case "bestFit": {
726
734
  var S;
727
- const x = (S = O.filter((k) => {
728
- if (P) {
735
+ const R = (S = O.filter((k) => {
736
+ if (A) {
729
737
  const _ = ke(k.placement);
730
- return _ === C || // Create a bias to the `y` side axis due to horizontal
738
+ return _ === E || // Create a bias to the `y` side axis due to horizontal
731
739
  // reading directions favoring greater width.
732
740
  _ === "y";
733
741
  }
734
742
  return !0;
735
743
  }).map((k) => [k.placement, k.overflows.filter((_) => _ > 0).reduce((_, T) => _ + T, 0)]).sort((k, _) => k[1] - _[1])[0]) == null ? void 0 : S[0];
736
- x && (I = x);
744
+ R && (I = R);
737
745
  break;
738
746
  }
739
747
  case "initialPlacement":
@@ -751,16 +759,16 @@ const Br = (e) => ({
751
759
  }
752
760
  };
753
761
  };
754
- async function $r(e, t) {
762
+ async function no(e, t) {
755
763
  const {
756
764
  placement: n,
757
765
  platform: r,
758
766
  elements: o
759
- } = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = Ee(n), c = qe(n), u = ke(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1, g = i && u ? -1 : 1, f = Pe(t, e);
767
+ } = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = Ee(n), c = qe(n), u = ke(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1, g = i && u ? -1 : 1, f = Ae(t, e);
760
768
  let {
761
769
  mainAxis: h,
762
770
  crossAxis: a,
763
- alignmentAxis: m
771
+ alignmentAxis: d
764
772
  } = typeof f == "number" ? {
765
773
  mainAxis: f,
766
774
  crossAxis: 0,
@@ -771,7 +779,7 @@ async function $r(e, t) {
771
779
  alignmentAxis: null,
772
780
  ...f
773
781
  };
774
- return c && typeof m == "number" && (a = c === "end" ? m * -1 : m), u ? {
782
+ return c && typeof d == "number" && (a = c === "end" ? d * -1 : d), u ? {
775
783
  x: a * g,
776
784
  y: h * l
777
785
  } : {
@@ -779,7 +787,7 @@ async function $r(e, t) {
779
787
  y: a * g
780
788
  };
781
789
  }
782
- const Hr = function(e) {
790
+ const ro = function(e) {
783
791
  return e === void 0 && (e = 0), {
784
792
  name: "offset",
785
793
  options: e,
@@ -790,7 +798,7 @@ const Hr = function(e) {
790
798
  y: i,
791
799
  placement: s,
792
800
  middlewareData: c
793
- } = t, u = await $r(t, e);
801
+ } = t, u = await no(t, e);
794
802
  return s === ((n = c.offset) == null ? void 0 : n.placement) && (r = c.arrow) != null && r.alignmentOffset ? {} : {
795
803
  x: o + u.x,
796
804
  y: i + u.y,
@@ -801,7 +809,7 @@ const Hr = function(e) {
801
809
  };
802
810
  }
803
811
  };
804
- }, zr = function(e) {
812
+ }, oo = function(e) {
805
813
  return e === void 0 && (e = {}), {
806
814
  name: "shift",
807
815
  options: e,
@@ -814,35 +822,35 @@ const Hr = function(e) {
814
822
  mainAxis: i = !0,
815
823
  crossAxis: s = !1,
816
824
  limiter: c = {
817
- fn: (R) => {
825
+ fn: (w) => {
818
826
  let {
819
- x: E,
820
- y: C
821
- } = R;
827
+ x,
828
+ y: E
829
+ } = w;
822
830
  return {
823
- x: E,
824
- y: C
831
+ x,
832
+ y: E
825
833
  };
826
834
  }
827
835
  },
828
836
  ...u
829
- } = Pe(e, t), l = {
837
+ } = Ae(e, t), l = {
830
838
  x: n,
831
839
  y: r
832
- }, g = await Ut(t, u), f = ke(Ee(o)), h = Ht(f);
833
- let a = l[h], m = l[f];
840
+ }, g = await Ut(t, u), f = ke(Ee(o)), h = zt(f);
841
+ let a = l[h], d = l[f];
834
842
  if (i) {
835
- const R = h === "y" ? "top" : "left", E = h === "y" ? "bottom" : "right", C = a + g[R], b = a - g[E];
836
- a = Lt(C, a, b);
843
+ const w = h === "y" ? "top" : "left", x = h === "y" ? "bottom" : "right", E = a + g[w], b = a - g[x];
844
+ a = Ft(E, a, b);
837
845
  }
838
846
  if (s) {
839
- const R = f === "y" ? "top" : "left", E = f === "y" ? "bottom" : "right", C = m + g[R], b = m - g[E];
840
- m = Lt(C, m, b);
847
+ const w = f === "y" ? "top" : "left", x = f === "y" ? "bottom" : "right", E = d + g[w], b = d - g[x];
848
+ d = Ft(E, d, b);
841
849
  }
842
850
  const p = c.fn({
843
851
  ...t,
844
852
  [h]: a,
845
- [f]: m
853
+ [f]: d
846
854
  });
847
855
  return {
848
856
  ...p,
@@ -853,7 +861,7 @@ const Hr = function(e) {
853
861
  };
854
862
  }
855
863
  };
856
- }, qr = function(e) {
864
+ }, io = function(e) {
857
865
  return e === void 0 && (e = {}), {
858
866
  options: e,
859
867
  fn(t) {
@@ -867,12 +875,12 @@ const Hr = function(e) {
867
875
  offset: c = 0,
868
876
  mainAxis: u = !0,
869
877
  crossAxis: l = !0
870
- } = Pe(e, t), g = {
878
+ } = Ae(e, t), g = {
871
879
  x: n,
872
880
  y: r
873
- }, f = ke(o), h = Ht(f);
874
- let a = g[h], m = g[f];
875
- const p = Pe(c, t), R = typeof p == "number" ? {
881
+ }, f = ke(o), h = zt(f);
882
+ let a = g[h], d = g[f];
883
+ const p = Ae(c, t), w = typeof p == "number" ? {
876
884
  mainAxis: p,
877
885
  crossAxis: 0
878
886
  } : {
@@ -881,21 +889,21 @@ const Hr = function(e) {
881
889
  ...p
882
890
  };
883
891
  if (u) {
884
- const b = h === "y" ? "height" : "width", y = i.reference[h] - i.floating[b] + R.mainAxis, A = i.reference[h] + i.reference[b] - R.mainAxis;
885
- a < y ? a = y : a > A && (a = A);
892
+ const b = h === "y" ? "height" : "width", y = i.reference[h] - i.floating[b] + w.mainAxis, P = i.reference[h] + i.reference[b] - w.mainAxis;
893
+ a < y ? a = y : a > P && (a = P);
886
894
  }
887
895
  if (l) {
888
- var E, C;
889
- const b = h === "y" ? "width" : "height", y = ["top", "left"].includes(Ee(o)), A = i.reference[f] - i.floating[b] + (y && ((E = s.offset) == null ? void 0 : E[f]) || 0) + (y ? 0 : R.crossAxis), P = i.reference[f] + i.reference[b] + (y ? 0 : ((C = s.offset) == null ? void 0 : C[f]) || 0) - (y ? R.crossAxis : 0);
890
- m < A ? m = A : m > P && (m = P);
896
+ var x, E;
897
+ const b = h === "y" ? "width" : "height", y = ["top", "left"].includes(Ee(o)), P = i.reference[f] - i.floating[b] + (y && ((x = s.offset) == null ? void 0 : x[f]) || 0) + (y ? 0 : w.crossAxis), A = i.reference[f] + i.reference[b] + (y ? 0 : ((E = s.offset) == null ? void 0 : E[f]) || 0) - (y ? w.crossAxis : 0);
898
+ d < P ? d = P : d > A && (d = A);
891
899
  }
892
900
  return {
893
901
  [h]: a,
894
- [f]: m
902
+ [f]: d
895
903
  };
896
904
  }
897
905
  };
898
- }, Ur = function(e) {
906
+ }, so = function(e) {
899
907
  return e === void 0 && (e = {}), {
900
908
  name: "size",
901
909
  options: e,
@@ -909,22 +917,22 @@ const Hr = function(e) {
909
917
  apply: s = () => {
910
918
  },
911
919
  ...c
912
- } = Pe(e, t), u = await Ut(t, c), l = Ee(n), g = qe(n), f = ke(n) === "y", {
920
+ } = Ae(e, t), u = await Ut(t, c), l = Ee(n), g = qe(n), f = ke(n) === "y", {
913
921
  width: h,
914
922
  height: a
915
923
  } = r.floating;
916
- let m, p;
917
- l === "top" || l === "bottom" ? (m = l, p = g === (await (o.isRTL == null ? void 0 : o.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (p = l, m = g === "end" ? "top" : "bottom");
918
- const R = a - u.top - u.bottom, E = h - u.left - u.right, C = ye(a - u[m], R), b = ye(h - u[p], E), y = !t.middlewareData.shift;
919
- let A = C, P = b;
920
- if (f ? P = g || y ? ye(b, E) : E : A = g || y ? ye(C, R) : R, y && !g) {
924
+ let d, p;
925
+ l === "top" || l === "bottom" ? (d = l, p = g === (await (o.isRTL == null ? void 0 : o.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (p = l, d = g === "end" ? "top" : "bottom");
926
+ const w = a - u.top - u.bottom, x = h - u.left - u.right, E = ye(a - u[d], w), b = ye(h - u[p], x), y = !t.middlewareData.shift;
927
+ let P = E, A = b;
928
+ if (f ? A = g || y ? ye(b, x) : x : P = g || y ? ye(E, w) : w, y && !g) {
921
929
  const B = fe(u.left, 0), H = fe(u.right, 0), O = fe(u.top, 0), D = fe(u.bottom, 0);
922
- f ? P = h - 2 * (B !== 0 || H !== 0 ? B + H : fe(u.left, u.right)) : A = a - 2 * (O !== 0 || D !== 0 ? O + D : fe(u.top, u.bottom));
930
+ f ? A = h - 2 * (B !== 0 || H !== 0 ? B + H : fe(u.left, u.right)) : P = a - 2 * (O !== 0 || D !== 0 ? O + D : fe(u.top, u.bottom));
923
931
  }
924
932
  await s({
925
933
  ...t,
926
- availableWidth: P,
927
- availableHeight: A
934
+ availableWidth: A,
935
+ availableHeight: P
928
936
  });
929
937
  const V = await o.getDimensions(i.floating);
930
938
  return h !== V.width || a !== V.height ? {
@@ -935,85 +943,85 @@ const Hr = function(e) {
935
943
  }
936
944
  };
937
945
  };
938
- function Kn(e) {
946
+ function zn(e) {
939
947
  const t = me(e);
940
948
  let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
941
- const o = te(e), i = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, c = gt(n) !== i || gt(r) !== s;
949
+ const o = te(e), i = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, c = pt(n) !== i || pt(r) !== s;
942
950
  return c && (n = i, r = s), {
943
951
  width: n,
944
952
  height: r,
945
953
  $: c
946
954
  };
947
955
  }
948
- function jt(e) {
956
+ function Yt(e) {
949
957
  return Y(e) ? e : e.contextElement;
950
958
  }
951
- function Ke(e) {
952
- const t = jt(e);
959
+ function $e(e) {
960
+ const t = Yt(e);
953
961
  if (!te(t))
954
- return Ae(1);
962
+ return Pe(1);
955
963
  const n = t.getBoundingClientRect(), {
956
964
  width: r,
957
965
  height: o,
958
966
  $: i
959
- } = Kn(t);
960
- let s = (i ? gt(n.width) : n.width) / r, c = (i ? gt(n.height) : n.height) / o;
967
+ } = zn(t);
968
+ let s = (i ? pt(n.width) : n.width) / r, c = (i ? pt(n.height) : n.height) / o;
961
969
  return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
962
970
  x: s,
963
971
  y: c
964
972
  };
965
973
  }
966
- const jr = /* @__PURE__ */ Ae(0);
967
- function $n(e) {
974
+ const co = /* @__PURE__ */ Pe(0);
975
+ function jn(e) {
968
976
  const t = ae(e);
969
- return !Wt() || !t.visualViewport ? jr : {
977
+ return !Bt() || !t.visualViewport ? co : {
970
978
  x: t.visualViewport.offsetLeft,
971
979
  y: t.visualViewport.offsetTop
972
980
  };
973
981
  }
974
- function Yr(e, t, n) {
982
+ function lo(e, t, n) {
975
983
  return t === void 0 && (t = !1), !n || t && n !== ae(e) ? !1 : t;
976
984
  }
977
985
  function Ve(e, t, n, r) {
978
986
  t === void 0 && (t = !1), n === void 0 && (n = !1);
979
- const o = e.getBoundingClientRect(), i = jt(e);
980
- let s = Ae(1);
981
- t && (r ? Y(r) && (s = Ke(r)) : s = Ke(e));
982
- const c = Yr(i, n, r) ? $n(i) : Ae(0);
987
+ const o = e.getBoundingClientRect(), i = Yt(e);
988
+ let s = Pe(1);
989
+ t && (r ? Y(r) && (s = $e(r)) : s = $e(e));
990
+ const c = lo(i, n, r) ? jn(i) : Pe(0);
983
991
  let u = (o.left + c.x) / s.x, l = (o.top + c.y) / s.y, g = o.width / s.x, f = o.height / s.y;
984
992
  if (i) {
985
993
  const h = ae(i), a = r && Y(r) ? ae(r) : r;
986
- let m = h, p = m.frameElement;
987
- for (; p && r && a !== m; ) {
988
- const R = Ke(p), E = p.getBoundingClientRect(), C = me(p), b = E.left + (p.clientLeft + parseFloat(C.paddingLeft)) * R.x, y = E.top + (p.clientTop + parseFloat(C.paddingTop)) * R.y;
989
- u *= R.x, l *= R.y, g *= R.x, f *= R.y, u += b, l += y, m = ae(p), p = m.frameElement;
994
+ let d = h, p = d.frameElement;
995
+ for (; p && r && a !== d; ) {
996
+ const w = $e(p), x = p.getBoundingClientRect(), E = me(p), b = x.left + (p.clientLeft + parseFloat(E.paddingLeft)) * w.x, y = x.top + (p.clientTop + parseFloat(E.paddingTop)) * w.y;
997
+ u *= w.x, l *= w.y, g *= w.x, f *= w.y, u += b, l += y, d = ae(p), p = d.frameElement;
990
998
  }
991
999
  }
992
- return ht({
1000
+ return vt({
993
1001
  width: g,
994
1002
  height: f,
995
1003
  x: u,
996
1004
  y: l
997
1005
  });
998
1006
  }
999
- function Gr(e) {
1007
+ function uo(e) {
1000
1008
  let {
1001
1009
  elements: t,
1002
1010
  rect: n,
1003
1011
  offsetParent: r,
1004
1012
  strategy: o
1005
1013
  } = e;
1006
- const i = o === "fixed", s = Ce(r), c = t ? Rt(t.floating) : !1;
1014
+ const i = o === "fixed", s = Ce(r), c = t ? Et(t.floating) : !1;
1007
1015
  if (r === s || c && i)
1008
1016
  return n;
1009
1017
  let u = {
1010
1018
  scrollLeft: 0,
1011
1019
  scrollTop: 0
1012
- }, l = Ae(1);
1013
- const g = Ae(0), f = te(r);
1014
- if ((f || !f && !i) && ((Le(r) !== "body" || tt(s)) && (u = Et(r)), te(r))) {
1020
+ }, l = Pe(1);
1021
+ const g = Pe(0), f = te(r);
1022
+ if ((f || !f && !i) && ((Le(r) !== "body" || nt(s)) && (u = Ct(r)), te(r))) {
1015
1023
  const h = Ve(r);
1016
- l = Ke(r), g.x = h.x + r.clientLeft, g.y = h.y + r.clientTop;
1024
+ l = $e(r), g.x = h.x + r.clientLeft, g.y = h.y + r.clientTop;
1017
1025
  }
1018
1026
  return {
1019
1027
  width: n.width * l.x,
@@ -1022,15 +1030,15 @@ function Gr(e) {
1022
1030
  y: n.y * l.y - u.scrollTop * l.y + g.y
1023
1031
  };
1024
1032
  }
1025
- function Xr(e) {
1033
+ function ao(e) {
1026
1034
  return Array.from(e.getClientRects());
1027
1035
  }
1028
- function Hn(e) {
1029
- return Ve(Ce(e)).left + Et(e).scrollLeft;
1036
+ function qn(e) {
1037
+ return Ve(Ce(e)).left + Ct(e).scrollLeft;
1030
1038
  }
1031
- function Zr(e) {
1032
- const t = Ce(e), n = Et(e), r = e.ownerDocument.body, o = fe(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = fe(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
1033
- let s = -n.scrollLeft + Hn(e);
1039
+ function fo(e) {
1040
+ const t = Ce(e), n = Ct(e), r = e.ownerDocument.body, o = fe(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = fe(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
1041
+ let s = -n.scrollLeft + qn(e);
1034
1042
  const c = -n.scrollTop;
1035
1043
  return me(r).direction === "rtl" && (s += fe(t.clientWidth, r.clientWidth) - o), {
1036
1044
  width: o,
@@ -1039,12 +1047,12 @@ function Zr(e) {
1039
1047
  y: c
1040
1048
  };
1041
1049
  }
1042
- function Jr(e, t) {
1050
+ function mo(e, t) {
1043
1051
  const n = ae(e), r = Ce(e), o = n.visualViewport;
1044
1052
  let i = r.clientWidth, s = r.clientHeight, c = 0, u = 0;
1045
1053
  if (o) {
1046
1054
  i = o.width, s = o.height;
1047
- const l = Wt();
1055
+ const l = Bt();
1048
1056
  (!l || l && t === "fixed") && (c = o.offsetLeft, u = o.offsetTop);
1049
1057
  }
1050
1058
  return {
@@ -1054,8 +1062,8 @@ function Jr(e, t) {
1054
1062
  y: u
1055
1063
  };
1056
1064
  }
1057
- function Qr(e, t) {
1058
- const n = Ve(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = te(e) ? Ke(e) : Ae(1), s = e.clientWidth * i.x, c = e.clientHeight * i.y, u = o * i.x, l = r * i.y;
1065
+ function go(e, t) {
1066
+ const n = Ve(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = te(e) ? $e(e) : Pe(1), s = e.clientWidth * i.x, c = e.clientHeight * i.y, u = o * i.x, l = r * i.y;
1059
1067
  return {
1060
1068
  width: s,
1061
1069
  height: c,
@@ -1063,29 +1071,29 @@ function Qr(e, t) {
1063
1071
  y: l
1064
1072
  };
1065
1073
  }
1066
- function tn(e, t, n) {
1074
+ function rn(e, t, n) {
1067
1075
  let r;
1068
1076
  if (t === "viewport")
1069
- r = Jr(e, n);
1077
+ r = mo(e, n);
1070
1078
  else if (t === "document")
1071
- r = Zr(Ce(e));
1079
+ r = fo(Ce(e));
1072
1080
  else if (Y(t))
1073
- r = Qr(t, n);
1081
+ r = go(t, n);
1074
1082
  else {
1075
- const o = $n(e);
1083
+ const o = jn(e);
1076
1084
  r = {
1077
1085
  ...t,
1078
1086
  x: t.x - o.x,
1079
1087
  y: t.y - o.y
1080
1088
  };
1081
1089
  }
1082
- return ht(r);
1090
+ return vt(r);
1083
1091
  }
1084
- function zn(e, t) {
1092
+ function Un(e, t) {
1085
1093
  const n = Re(e);
1086
- return n === t || !Y(n) || Me(n) ? !1 : me(n).position === "fixed" || zn(n, t);
1094
+ return n === t || !Y(n) || Me(n) ? !1 : me(n).position === "fixed" || Un(n, t);
1087
1095
  }
1088
- function eo(e, t) {
1096
+ function po(e, t) {
1089
1097
  const n = t.get(e);
1090
1098
  if (n)
1091
1099
  return n;
@@ -1093,22 +1101,22 @@ function eo(e, t) {
1093
1101
  const i = me(e).position === "fixed";
1094
1102
  let s = i ? Re(e) : e;
1095
1103
  for (; Y(s) && !Me(s); ) {
1096
- const c = me(s), u = _t(s);
1097
- !u && c.position === "fixed" && (o = null), (i ? !u && !o : !u && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || tt(s) && !u && zn(e, s)) ? r = r.filter((g) => g !== s) : o = c, s = Re(s);
1104
+ const c = me(s), u = Wt(s);
1105
+ !u && c.position === "fixed" && (o = null), (i ? !u && !o : !u && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || nt(s) && !u && Un(e, s)) ? r = r.filter((g) => g !== s) : o = c, s = Re(s);
1098
1106
  }
1099
1107
  return t.set(e, r), r;
1100
1108
  }
1101
- function to(e) {
1109
+ function ho(e) {
1102
1110
  let {
1103
1111
  element: t,
1104
1112
  boundary: n,
1105
1113
  rootBoundary: r,
1106
1114
  strategy: o
1107
1115
  } = e;
1108
- const s = [...n === "clippingAncestors" ? Rt(t) ? [] : eo(t, this._c) : [].concat(n), r], c = s[0], u = s.reduce((l, g) => {
1109
- const f = tn(t, g, o);
1116
+ const s = [...n === "clippingAncestors" ? Et(t) ? [] : po(t, this._c) : [].concat(n), r], c = s[0], u = s.reduce((l, g) => {
1117
+ const f = rn(t, g, o);
1110
1118
  return l.top = fe(f.top, l.top), l.right = ye(f.right, l.right), l.bottom = ye(f.bottom, l.bottom), l.left = fe(f.left, l.left), l;
1111
- }, tn(t, c, o));
1119
+ }, rn(t, c, o));
1112
1120
  return {
1113
1121
  width: u.right - u.left,
1114
1122
  height: u.bottom - u.top,
@@ -1116,29 +1124,29 @@ function to(e) {
1116
1124
  y: u.top
1117
1125
  };
1118
1126
  }
1119
- function no(e) {
1127
+ function vo(e) {
1120
1128
  const {
1121
1129
  width: t,
1122
1130
  height: n
1123
- } = Kn(e);
1131
+ } = zn(e);
1124
1132
  return {
1125
1133
  width: t,
1126
1134
  height: n
1127
1135
  };
1128
1136
  }
1129
- function ro(e, t, n) {
1137
+ function bo(e, t, n) {
1130
1138
  const r = te(t), o = Ce(t), i = n === "fixed", s = Ve(e, !0, i, t);
1131
1139
  let c = {
1132
1140
  scrollLeft: 0,
1133
1141
  scrollTop: 0
1134
1142
  };
1135
- const u = Ae(0);
1143
+ const u = Pe(0);
1136
1144
  if (r || !r && !i)
1137
- if ((Le(t) !== "body" || tt(o)) && (c = Et(t)), r) {
1145
+ if ((Le(t) !== "body" || nt(o)) && (c = Ct(t)), r) {
1138
1146
  const f = Ve(t, !0, i, t);
1139
1147
  u.x = f.x + t.clientLeft, u.y = f.y + t.clientTop;
1140
1148
  } else
1141
- o && (u.x = Hn(o));
1149
+ o && (u.x = qn(o));
1142
1150
  const l = s.left + c.scrollLeft - u.x, g = s.top + c.scrollTop - u.y;
1143
1151
  return {
1144
1152
  x: l,
@@ -1147,34 +1155,34 @@ function ro(e, t, n) {
1147
1155
  height: s.height
1148
1156
  };
1149
1157
  }
1150
- function Tt(e) {
1158
+ function Ot(e) {
1151
1159
  return me(e).position === "static";
1152
1160
  }
1153
- function nn(e, t) {
1161
+ function on(e, t) {
1154
1162
  return !te(e) || me(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
1155
1163
  }
1156
- function qn(e, t) {
1164
+ function Yn(e, t) {
1157
1165
  const n = ae(e);
1158
- if (Rt(e))
1166
+ if (Et(e))
1159
1167
  return n;
1160
1168
  if (!te(e)) {
1161
1169
  let o = Re(e);
1162
1170
  for (; o && !Me(o); ) {
1163
- if (Y(o) && !Tt(o))
1171
+ if (Y(o) && !Ot(o))
1164
1172
  return o;
1165
1173
  o = Re(o);
1166
1174
  }
1167
1175
  return n;
1168
1176
  }
1169
- let r = nn(e, t);
1170
- for (; r && cr(r) && Tt(r); )
1171
- r = nn(r, t);
1172
- return r && Me(r) && Tt(r) && !_t(r) ? n : r || lr(e) || n;
1177
+ let r = on(e, t);
1178
+ for (; r && wr(r) && Ot(r); )
1179
+ r = on(r, t);
1180
+ return r && Me(r) && Ot(r) && !Wt(r) ? n : r || Rr(e) || n;
1173
1181
  }
1174
- const oo = async function(e) {
1175
- const t = this.getOffsetParent || qn, n = this.getDimensions, r = await n(e.floating);
1182
+ const yo = async function(e) {
1183
+ const t = this.getOffsetParent || Yn, n = this.getDimensions, r = await n(e.floating);
1176
1184
  return {
1177
- reference: ro(e.reference, await t(e.floating), e.strategy),
1185
+ reference: bo(e.reference, await t(e.floating), e.strategy),
1178
1186
  floating: {
1179
1187
  x: 0,
1180
1188
  y: 0,
@@ -1183,22 +1191,22 @@ const oo = async function(e) {
1183
1191
  }
1184
1192
  };
1185
1193
  };
1186
- function io(e) {
1194
+ function xo(e) {
1187
1195
  return me(e).direction === "rtl";
1188
1196
  }
1189
- const so = {
1190
- convertOffsetParentRelativeRectToViewportRelativeRect: Gr,
1197
+ const wo = {
1198
+ convertOffsetParentRelativeRectToViewportRelativeRect: uo,
1191
1199
  getDocumentElement: Ce,
1192
- getClippingRect: to,
1193
- getOffsetParent: qn,
1194
- getElementRects: oo,
1195
- getClientRects: Xr,
1196
- getDimensions: no,
1197
- getScale: Ke,
1200
+ getClippingRect: ho,
1201
+ getOffsetParent: Yn,
1202
+ getElementRects: yo,
1203
+ getClientRects: ao,
1204
+ getDimensions: vo,
1205
+ getScale: $e,
1198
1206
  isElement: Y,
1199
- isRTL: io
1207
+ isRTL: xo
1200
1208
  };
1201
- function co(e, t) {
1209
+ function Ro(e, t) {
1202
1210
  let n = null, r;
1203
1211
  const o = Ce(e);
1204
1212
  function i() {
@@ -1215,17 +1223,17 @@ function co(e, t) {
1215
1223
  } = e.getBoundingClientRect();
1216
1224
  if (c || t(), !f || !h)
1217
1225
  return;
1218
- const a = Be(g), m = Be(o.clientWidth - (l + f)), p = Be(o.clientHeight - (g + h)), R = Be(l), C = {
1219
- rootMargin: -a + "px " + -m + "px " + -p + "px " + -R + "px",
1226
+ const a = Ke(g), d = Ke(o.clientWidth - (l + f)), p = Ke(o.clientHeight - (g + h)), w = Ke(l), E = {
1227
+ rootMargin: -a + "px " + -d + "px " + -p + "px " + -w + "px",
1220
1228
  threshold: fe(0, ye(1, u)) || 1
1221
1229
  };
1222
1230
  let b = !0;
1223
- function y(A) {
1224
- const P = A[0].intersectionRatio;
1225
- if (P !== u) {
1231
+ function y(P) {
1232
+ const A = P[0].intersectionRatio;
1233
+ if (A !== u) {
1226
1234
  if (!b)
1227
1235
  return s();
1228
- P ? s(!1, P) : r = setTimeout(() => {
1236
+ A ? s(!1, A) : r = setTimeout(() => {
1229
1237
  s(!1, 1e-7);
1230
1238
  }, 1e3);
1231
1239
  }
@@ -1233,18 +1241,18 @@ function co(e, t) {
1233
1241
  }
1234
1242
  try {
1235
1243
  n = new IntersectionObserver(y, {
1236
- ...C,
1244
+ ...E,
1237
1245
  // Handle <iframe>s
1238
1246
  root: o.ownerDocument
1239
1247
  });
1240
1248
  } catch {
1241
- n = new IntersectionObserver(y, C);
1249
+ n = new IntersectionObserver(y, E);
1242
1250
  }
1243
1251
  n.observe(e);
1244
1252
  }
1245
1253
  return s(!0), i;
1246
1254
  }
1247
- function Yo(e, t, n, r) {
1255
+ function bi(e, t, n, r) {
1248
1256
  r === void 0 && (r = {});
1249
1257
  const {
1250
1258
  ancestorScroll: o = !0,
@@ -1252,49 +1260,49 @@ function Yo(e, t, n, r) {
1252
1260
  elementResize: s = typeof ResizeObserver == "function",
1253
1261
  layoutShift: c = typeof IntersectionObserver == "function",
1254
1262
  animationFrame: u = !1
1255
- } = r, l = jt(e), g = o || i ? [...l ? Se(l) : [], ...Se(t)] : [];
1256
- g.forEach((E) => {
1257
- o && E.addEventListener("scroll", n, {
1263
+ } = r, l = Yt(e), g = o || i ? [...l ? Se(l) : [], ...Se(t)] : [];
1264
+ g.forEach((x) => {
1265
+ o && x.addEventListener("scroll", n, {
1258
1266
  passive: !0
1259
- }), i && E.addEventListener("resize", n);
1267
+ }), i && x.addEventListener("resize", n);
1260
1268
  });
1261
- const f = l && c ? co(l, n) : null;
1269
+ const f = l && c ? Ro(l, n) : null;
1262
1270
  let h = -1, a = null;
1263
- s && (a = new ResizeObserver((E) => {
1264
- let [C] = E;
1265
- C && C.target === l && a && (a.unobserve(t), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
1271
+ s && (a = new ResizeObserver((x) => {
1272
+ let [E] = x;
1273
+ E && E.target === l && a && (a.unobserve(t), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
1266
1274
  var b;
1267
1275
  (b = a) == null || b.observe(t);
1268
1276
  })), n();
1269
1277
  }), l && !u && a.observe(l), a.observe(t));
1270
- let m, p = u ? Ve(e) : null;
1271
- u && R();
1272
- function R() {
1273
- const E = Ve(e);
1274
- p && (E.x !== p.x || E.y !== p.y || E.width !== p.width || E.height !== p.height) && n(), p = E, m = requestAnimationFrame(R);
1278
+ let d, p = u ? Ve(e) : null;
1279
+ u && w();
1280
+ function w() {
1281
+ const x = Ve(e);
1282
+ p && (x.x !== p.x || x.y !== p.y || x.width !== p.width || x.height !== p.height) && n(), p = x, d = requestAnimationFrame(w);
1275
1283
  }
1276
1284
  return n(), () => {
1277
- var E;
1278
- g.forEach((C) => {
1279
- o && C.removeEventListener("scroll", n), i && C.removeEventListener("resize", n);
1280
- }), f == null || f(), (E = a) == null || E.disconnect(), a = null, u && cancelAnimationFrame(m);
1285
+ var x;
1286
+ g.forEach((E) => {
1287
+ o && E.removeEventListener("scroll", n), i && E.removeEventListener("resize", n);
1288
+ }), f == null || f(), (x = a) == null || x.disconnect(), a = null, u && cancelAnimationFrame(d);
1281
1289
  };
1282
1290
  }
1283
- const lo = Hr, uo = zr, ao = Kr, fo = Ur, rn = Br, mo = qr, go = (e, t, n) => {
1291
+ const Eo = ro, Co = oo, Io = to, To = so, sn = eo, Oo = io, So = (e, t, n) => {
1284
1292
  const r = /* @__PURE__ */ new Map(), o = {
1285
- platform: so,
1293
+ platform: wo,
1286
1294
  ...n
1287
1295
  }, i = {
1288
1296
  ...o.platform,
1289
1297
  _c: r
1290
1298
  };
1291
- return Wr(e, t, {
1299
+ return Qr(e, t, {
1292
1300
  ...o,
1293
1301
  platform: i
1294
1302
  });
1295
1303
  };
1296
- var at = typeof document < "u" ? Tn : On;
1297
- function xt(e, t) {
1304
+ var ft = typeof document < "u" ? Sn : Mn;
1305
+ function wt(e, t) {
1298
1306
  if (e === t)
1299
1307
  return !0;
1300
1308
  if (typeof e != typeof t)
@@ -1307,7 +1315,7 @@ function xt(e, t) {
1307
1315
  if (n = e.length, n !== t.length)
1308
1316
  return !1;
1309
1317
  for (r = n; r-- !== 0; )
1310
- if (!xt(e[r], t[r]))
1318
+ if (!wt(e[r], t[r]))
1311
1319
  return !1;
1312
1320
  return !0;
1313
1321
  }
@@ -1318,27 +1326,27 @@ function xt(e, t) {
1318
1326
  return !1;
1319
1327
  for (r = n; r-- !== 0; ) {
1320
1328
  const i = o[r];
1321
- if (!(i === "_owner" && e.$$typeof) && !xt(e[i], t[i]))
1329
+ if (!(i === "_owner" && e.$$typeof) && !wt(e[i], t[i]))
1322
1330
  return !1;
1323
1331
  }
1324
1332
  return !0;
1325
1333
  }
1326
1334
  return e !== e && t !== t;
1327
1335
  }
1328
- function Un(e) {
1336
+ function Gn(e) {
1329
1337
  return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
1330
1338
  }
1331
- function on(e, t) {
1332
- const n = Un(e);
1339
+ function cn(e, t) {
1340
+ const n = Gn(e);
1333
1341
  return Math.round(t * n) / n;
1334
1342
  }
1335
- function sn(e) {
1336
- const t = d.useRef(e);
1337
- return at(() => {
1343
+ function ln(e) {
1344
+ const t = m.useRef(e);
1345
+ return ft(() => {
1338
1346
  t.current = e;
1339
1347
  }), t;
1340
1348
  }
1341
- function po(e) {
1349
+ function Mo(e) {
1342
1350
  e === void 0 && (e = {});
1343
1351
  const {
1344
1352
  placement: t = "bottom",
@@ -1352,74 +1360,74 @@ function po(e) {
1352
1360
  transform: c = !0,
1353
1361
  whileElementsMounted: u,
1354
1362
  open: l
1355
- } = e, [g, f] = d.useState({
1363
+ } = e, [g, f] = m.useState({
1356
1364
  x: 0,
1357
1365
  y: 0,
1358
1366
  strategy: n,
1359
1367
  placement: t,
1360
1368
  middlewareData: {},
1361
1369
  isPositioned: !1
1362
- }), [h, a] = d.useState(r);
1363
- xt(h, r) || a(r);
1364
- const [m, p] = d.useState(null), [R, E] = d.useState(null), C = d.useCallback((x) => {
1365
- x !== P.current && (P.current = x, p(x));
1366
- }, []), b = d.useCallback((x) => {
1367
- x !== V.current && (V.current = x, E(x));
1368
- }, []), y = i || m, A = s || R, P = d.useRef(null), V = d.useRef(null), B = d.useRef(g), H = u != null, O = sn(u), D = sn(o), M = d.useCallback(() => {
1369
- if (!P.current || !V.current)
1370
+ }), [h, a] = m.useState(r);
1371
+ wt(h, r) || a(r);
1372
+ const [d, p] = m.useState(null), [w, x] = m.useState(null), E = m.useCallback((R) => {
1373
+ R !== A.current && (A.current = R, p(R));
1374
+ }, []), b = m.useCallback((R) => {
1375
+ R !== V.current && (V.current = R, x(R));
1376
+ }, []), y = i || d, P = s || w, A = m.useRef(null), V = m.useRef(null), B = m.useRef(g), H = u != null, O = ln(u), D = ln(o), M = m.useCallback(() => {
1377
+ if (!A.current || !V.current)
1370
1378
  return;
1371
- const x = {
1379
+ const R = {
1372
1380
  placement: t,
1373
1381
  strategy: n,
1374
1382
  middleware: h
1375
1383
  };
1376
- D.current && (x.platform = D.current), go(P.current, V.current, x).then((k) => {
1384
+ D.current && (R.platform = D.current), So(A.current, V.current, R).then((k) => {
1377
1385
  const _ = {
1378
1386
  ...k,
1379
1387
  isPositioned: !0
1380
1388
  };
1381
- S.current && !xt(B.current, _) && (B.current = _, Sn.flushSync(() => {
1389
+ S.current && !wt(B.current, _) && (B.current = _, An.flushSync(() => {
1382
1390
  f(_);
1383
1391
  }));
1384
1392
  });
1385
1393
  }, [h, t, n, D]);
1386
- at(() => {
1387
- l === !1 && B.current.isPositioned && (B.current.isPositioned = !1, f((x) => ({
1388
- ...x,
1394
+ ft(() => {
1395
+ l === !1 && B.current.isPositioned && (B.current.isPositioned = !1, f((R) => ({
1396
+ ...R,
1389
1397
  isPositioned: !1
1390
1398
  })));
1391
1399
  }, [l]);
1392
- const S = d.useRef(!1);
1393
- at(() => (S.current = !0, () => {
1400
+ const S = m.useRef(!1);
1401
+ ft(() => (S.current = !0, () => {
1394
1402
  S.current = !1;
1395
- }), []), at(() => {
1396
- if (y && (P.current = y), A && (V.current = A), y && A) {
1403
+ }), []), ft(() => {
1404
+ if (y && (A.current = y), P && (V.current = P), y && P) {
1397
1405
  if (O.current)
1398
- return O.current(y, A, M);
1406
+ return O.current(y, P, M);
1399
1407
  M();
1400
1408
  }
1401
- }, [y, A, M, O, H]);
1402
- const v = d.useMemo(() => ({
1403
- reference: P,
1409
+ }, [y, P, M, O, H]);
1410
+ const v = m.useMemo(() => ({
1411
+ reference: A,
1404
1412
  floating: V,
1405
- setReference: C,
1413
+ setReference: E,
1406
1414
  setFloating: b
1407
- }), [C, b]), w = d.useMemo(() => ({
1415
+ }), [E, b]), C = m.useMemo(() => ({
1408
1416
  reference: y,
1409
- floating: A
1410
- }), [y, A]), I = d.useMemo(() => {
1411
- const x = {
1417
+ floating: P
1418
+ }), [y, P]), I = m.useMemo(() => {
1419
+ const R = {
1412
1420
  position: n,
1413
1421
  left: 0,
1414
1422
  top: 0
1415
1423
  };
1416
- if (!w.floating)
1417
- return x;
1418
- const k = on(w.floating, g.x), _ = on(w.floating, g.y);
1424
+ if (!C.floating)
1425
+ return R;
1426
+ const k = cn(C.floating, g.x), _ = cn(C.floating, g.y);
1419
1427
  return c ? {
1420
- ...x,
1428
+ ...R,
1421
1429
  transform: "translate(" + k + "px, " + _ + "px)",
1422
- ...Un(w.floating) >= 1.5 && {
1430
+ ...Gn(C.floating) >= 1.5 && {
1423
1431
  willChange: "transform"
1424
1432
  }
1425
1433
  } : {
@@ -1427,16 +1435,16 @@ function po(e) {
1427
1435
  left: k,
1428
1436
  top: _
1429
1437
  };
1430
- }, [n, c, w.floating, g.x, g.y]);
1431
- return d.useMemo(() => ({
1438
+ }, [n, c, C.floating, g.x, g.y]);
1439
+ return m.useMemo(() => ({
1432
1440
  ...g,
1433
1441
  update: M,
1434
1442
  refs: v,
1435
- elements: w,
1443
+ elements: C,
1436
1444
  floatingStyles: I
1437
- }), [g, M, v, w, I]);
1445
+ }), [g, M, v, C, I]);
1438
1446
  }
1439
- const ho = (e) => {
1447
+ const Po = (e) => {
1440
1448
  function t(n) {
1441
1449
  return {}.hasOwnProperty.call(n, "current");
1442
1450
  }
@@ -1448,70 +1456,70 @@ const ho = (e) => {
1448
1456
  element: r,
1449
1457
  padding: o
1450
1458
  } = typeof e == "function" ? e(n) : e;
1451
- return r && t(r) ? r.current != null ? rn({
1459
+ return r && t(r) ? r.current != null ? sn({
1452
1460
  element: r.current,
1453
1461
  padding: o
1454
- }).fn(n) : {} : r ? rn({
1462
+ }).fn(n) : {} : r ? sn({
1455
1463
  element: r,
1456
1464
  padding: o
1457
1465
  }).fn(n) : {};
1458
1466
  }
1459
1467
  };
1460
- }, Go = (e, t) => ({
1461
- ...lo(e),
1468
+ }, yi = (e, t) => ({
1469
+ ...Eo(e),
1462
1470
  options: [e, t]
1463
- }), Xo = (e, t) => ({
1464
- ...uo(e),
1471
+ }), xi = (e, t) => ({
1472
+ ...Co(e),
1465
1473
  options: [e, t]
1466
- }), Zo = (e, t) => ({
1467
- ...mo(e),
1474
+ }), wi = (e, t) => ({
1475
+ ...Oo(e),
1468
1476
  options: [e, t]
1469
- }), Jo = (e, t) => ({
1470
- ...ao(e),
1477
+ }), Ri = (e, t) => ({
1478
+ ...Io(e),
1471
1479
  options: [e, t]
1472
- }), Qo = (e, t) => ({
1473
- ...fo(e),
1480
+ }), Ei = (e, t) => ({
1481
+ ...To(e),
1474
1482
  options: [e, t]
1475
- }), ei = (e, t) => ({
1476
- ...ho(e),
1483
+ }), Ci = (e, t) => ({
1484
+ ...Po(e),
1477
1485
  options: [e, t]
1478
1486
  });
1479
- function ti(e) {
1480
- return d.useMemo(() => e.every((t) => t == null) ? null : (t) => {
1487
+ function Ii(e) {
1488
+ return m.useMemo(() => e.every((t) => t == null) ? null : (t) => {
1481
1489
  e.forEach((n) => {
1482
1490
  typeof n == "function" ? n(t) : n != null && (n.current = t);
1483
1491
  });
1484
1492
  }, e);
1485
1493
  }
1486
- const jn = {
1487
- ...d
1488
- }, vo = jn.useInsertionEffect, bo = vo || ((e) => e());
1494
+ const Xn = {
1495
+ ...m
1496
+ }, Ao = Xn.useInsertionEffect, ko = Ao || ((e) => e());
1489
1497
  function ie(e) {
1490
- const t = d.useRef(() => {
1498
+ const t = m.useRef(() => {
1491
1499
  if (process.env.NODE_ENV !== "production")
1492
1500
  throw new Error("Cannot call an event handler while rendering.");
1493
1501
  });
1494
- return bo(() => {
1502
+ return ko(() => {
1495
1503
  t.current = e;
1496
- }), d.useCallback(function() {
1504
+ }), m.useCallback(function() {
1497
1505
  for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
1498
1506
  r[o] = arguments[o];
1499
1507
  return t.current == null ? void 0 : t.current(...r);
1500
1508
  }, []);
1501
1509
  }
1502
- const Yt = "ArrowUp", nt = "ArrowDown", He = "ArrowLeft", Ue = "ArrowRight";
1503
- function ct(e, t, n) {
1510
+ const Gt = "ArrowUp", rt = "ArrowDown", ze = "ArrowLeft", Ue = "ArrowRight";
1511
+ function lt(e, t, n) {
1504
1512
  return Math.floor(e / t) !== n;
1505
1513
  }
1506
- function Ge(e, t) {
1514
+ function Xe(e, t) {
1507
1515
  return t < 0 || t >= e.current.length;
1508
1516
  }
1509
- function Ot(e, t) {
1517
+ function St(e, t) {
1510
1518
  return se(e, {
1511
1519
  disabledIndices: t
1512
1520
  });
1513
1521
  }
1514
- function cn(e, t) {
1522
+ function un(e, t) {
1515
1523
  return se(e, {
1516
1524
  decrement: !0,
1517
1525
  startingIndex: e.current.length,
@@ -1529,10 +1537,10 @@ function se(e, t) {
1529
1537
  let c = n;
1530
1538
  do
1531
1539
  c += r ? -i : i;
1532
- while (c >= 0 && c <= s.length - 1 && ft(s, c, o));
1540
+ while (c >= 0 && c <= s.length - 1 && dt(s, c, o));
1533
1541
  return c;
1534
1542
  }
1535
- function yo(e, t) {
1543
+ function Do(e, t) {
1536
1544
  let {
1537
1545
  event: n,
1538
1546
  orientation: r,
@@ -1544,7 +1552,7 @@ function yo(e, t) {
1544
1552
  prevIndex: l,
1545
1553
  stopEvent: g = !1
1546
1554
  } = t, f = l;
1547
- if (n.key === Yt) {
1555
+ if (n.key === Gt) {
1548
1556
  if (g && oe(n), l === -1)
1549
1557
  f = u;
1550
1558
  else if (f = se(e, {
@@ -1553,12 +1561,12 @@ function yo(e, t) {
1553
1561
  decrement: !0,
1554
1562
  disabledIndices: s
1555
1563
  }), o && (l - i < c || f < 0)) {
1556
- const h = l % i, a = u % i, m = u - (a - h);
1557
- a === h ? f = u : f = a > h ? m : m - i;
1564
+ const h = l % i, a = u % i, d = u - (a - h);
1565
+ a === h ? f = u : f = a > h ? d : d - i;
1558
1566
  }
1559
- Ge(e, f) && (f = l);
1567
+ Xe(e, f) && (f = l);
1560
1568
  }
1561
- if (n.key === nt && (g && oe(n), l === -1 ? f = c : (f = se(e, {
1569
+ if (n.key === rt && (g && oe(n), l === -1 ? f = c : (f = se(e, {
1562
1570
  startingIndex: l,
1563
1571
  amount: i,
1564
1572
  disabledIndices: s
@@ -1566,22 +1574,22 @@ function yo(e, t) {
1566
1574
  startingIndex: l % i - i,
1567
1575
  amount: i,
1568
1576
  disabledIndices: s
1569
- }))), Ge(e, f) && (f = l)), r === "both") {
1570
- const h = Be(l / i);
1577
+ }))), Xe(e, f) && (f = l)), r === "both") {
1578
+ const h = Ke(l / i);
1571
1579
  n.key === Ue && (g && oe(n), l % i !== i - 1 ? (f = se(e, {
1572
1580
  startingIndex: l,
1573
1581
  disabledIndices: s
1574
- }), o && ct(f, i, h) && (f = se(e, {
1582
+ }), o && lt(f, i, h) && (f = se(e, {
1575
1583
  startingIndex: l - l % i - 1,
1576
1584
  disabledIndices: s
1577
1585
  }))) : o && (f = se(e, {
1578
1586
  startingIndex: l - l % i - 1,
1579
1587
  disabledIndices: s
1580
- })), ct(f, i, h) && (f = l)), n.key === He && (g && oe(n), l % i !== 0 ? (f = se(e, {
1588
+ })), lt(f, i, h) && (f = l)), n.key === ze && (g && oe(n), l % i !== 0 ? (f = se(e, {
1581
1589
  startingIndex: l,
1582
1590
  decrement: !0,
1583
1591
  disabledIndices: s
1584
- }), o && ct(f, i, h) && (f = se(e, {
1592
+ }), o && lt(f, i, h) && (f = se(e, {
1585
1593
  startingIndex: l + (i - l % i),
1586
1594
  decrement: !0,
1587
1595
  disabledIndices: s
@@ -1589,16 +1597,16 @@ function yo(e, t) {
1589
1597
  startingIndex: l + (i - l % i),
1590
1598
  decrement: !0,
1591
1599
  disabledIndices: s
1592
- })), ct(f, i, h) && (f = l));
1593
- const a = Be(u / i) === h;
1594
- Ge(e, f) && (o && a ? f = n.key === He ? u : se(e, {
1600
+ })), lt(f, i, h) && (f = l));
1601
+ const a = Ke(u / i) === h;
1602
+ Xe(e, f) && (o && a ? f = n.key === ze ? u : se(e, {
1595
1603
  startingIndex: l - l % i - 1,
1596
1604
  disabledIndices: s
1597
1605
  }) : f = l);
1598
1606
  }
1599
1607
  return f;
1600
1608
  }
1601
- function xo(e, t, n) {
1609
+ function Lo(e, t, n) {
1602
1610
  const r = [];
1603
1611
  let o = 0;
1604
1612
  return e.forEach((i, s) => {
@@ -1620,7 +1628,7 @@ function xo(e, t, n) {
1620
1628
  }
1621
1629
  }), [...r];
1622
1630
  }
1623
- function wo(e, t, n, r, o) {
1631
+ function Fo(e, t, n, r, o) {
1624
1632
  if (e === -1)
1625
1633
  return -1;
1626
1634
  const i = n.indexOf(e), s = t[e];
@@ -1635,16 +1643,16 @@ function wo(e, t, n, r, o) {
1635
1643
  return n.lastIndexOf(e);
1636
1644
  }
1637
1645
  }
1638
- function Ro(e, t) {
1646
+ function No(e, t) {
1639
1647
  return t.flatMap((n, r) => e.includes(n) ? [r] : []);
1640
1648
  }
1641
- function ft(e, t, n) {
1649
+ function dt(e, t, n) {
1642
1650
  if (n)
1643
1651
  return n.includes(t);
1644
1652
  const r = e[t];
1645
1653
  return r == null || r.hasAttribute("disabled") || r.getAttribute("aria-disabled") === "true";
1646
1654
  }
1647
- let ln = 0;
1655
+ let an = 0;
1648
1656
  function Oe(e, t) {
1649
1657
  t === void 0 && (t = {});
1650
1658
  const {
@@ -1652,18 +1660,18 @@ function Oe(e, t) {
1652
1660
  cancelPrevious: r = !0,
1653
1661
  sync: o = !1
1654
1662
  } = t;
1655
- r && cancelAnimationFrame(ln);
1663
+ r && cancelAnimationFrame(an);
1656
1664
  const i = () => e == null ? void 0 : e.focus({
1657
1665
  preventScroll: n
1658
1666
  });
1659
- o ? i() : ln = requestAnimationFrame(i);
1667
+ o ? i() : an = requestAnimationFrame(i);
1660
1668
  }
1661
- var U = typeof document < "u" ? Tn : On;
1662
- function Eo(e, t) {
1669
+ var q = typeof document < "u" ? Sn : Mn;
1670
+ function Vo(e, t) {
1663
1671
  const n = e.compareDocumentPosition(t);
1664
1672
  return n & Node.DOCUMENT_POSITION_FOLLOWING || n & Node.DOCUMENT_POSITION_CONTAINED_BY ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING || n & Node.DOCUMENT_POSITION_CONTAINS ? 1 : 0;
1665
1673
  }
1666
- function Co(e, t) {
1674
+ function _o(e, t) {
1667
1675
  if (e.size !== t.size)
1668
1676
  return !1;
1669
1677
  for (const [n, r] of e.entries())
@@ -1671,7 +1679,7 @@ function Co(e, t) {
1671
1679
  return !1;
1672
1680
  return !0;
1673
1681
  }
1674
- const Yn = /* @__PURE__ */ d.createContext({
1682
+ const Zn = /* @__PURE__ */ m.createContext({
1675
1683
  register: () => {
1676
1684
  },
1677
1685
  unregister: () => {
@@ -1681,26 +1689,26 @@ const Yn = /* @__PURE__ */ d.createContext({
1681
1689
  current: []
1682
1690
  }
1683
1691
  });
1684
- function ni(e) {
1692
+ function Ti(e) {
1685
1693
  const {
1686
1694
  children: t,
1687
1695
  elementsRef: n,
1688
1696
  labelsRef: r
1689
- } = e, [o, i] = d.useState(() => /* @__PURE__ */ new Map()), s = d.useCallback((u) => {
1697
+ } = e, [o, i] = m.useState(() => /* @__PURE__ */ new Map()), s = m.useCallback((u) => {
1690
1698
  i((l) => new Map(l).set(u, null));
1691
- }, []), c = d.useCallback((u) => {
1699
+ }, []), c = m.useCallback((u) => {
1692
1700
  i((l) => {
1693
1701
  const g = new Map(l);
1694
1702
  return g.delete(u), g;
1695
1703
  });
1696
1704
  }, []);
1697
- return U(() => {
1705
+ return q(() => {
1698
1706
  const u = new Map(o);
1699
- Array.from(u.keys()).sort(Eo).forEach((g, f) => {
1707
+ Array.from(u.keys()).sort(Vo).forEach((g, f) => {
1700
1708
  u.set(g, f);
1701
- }), Co(o, u) || i(u);
1702
- }, [o]), /* @__PURE__ */ d.createElement(Yn.Provider, {
1703
- value: d.useMemo(() => ({
1709
+ }), _o(o, u) || i(u);
1710
+ }, [o]), /* @__PURE__ */ m.createElement(Zn.Provider, {
1711
+ value: m.useMemo(() => ({
1704
1712
  register: s,
1705
1713
  unregister: c,
1706
1714
  map: o,
@@ -1709,7 +1717,7 @@ function ni(e) {
1709
1717
  }), [s, c, o, n, r])
1710
1718
  }, t);
1711
1719
  }
1712
- function ri(e) {
1720
+ function Oi(e) {
1713
1721
  e === void 0 && (e = {});
1714
1722
  const {
1715
1723
  label: t
@@ -1719,73 +1727,73 @@ function ri(e) {
1719
1727
  map: o,
1720
1728
  elementsRef: i,
1721
1729
  labelsRef: s
1722
- } = d.useContext(Yn), [c, u] = d.useState(null), l = d.useRef(null), g = d.useCallback((f) => {
1730
+ } = m.useContext(Zn), [c, u] = m.useState(null), l = m.useRef(null), g = m.useCallback((f) => {
1723
1731
  if (l.current = f, c !== null && (i.current[c] = f, s)) {
1724
1732
  var h;
1725
1733
  const a = t !== void 0;
1726
1734
  s.current[c] = a ? t : (h = f == null ? void 0 : f.textContent) != null ? h : null;
1727
1735
  }
1728
1736
  }, [c, i, s, t]);
1729
- return U(() => {
1737
+ return q(() => {
1730
1738
  const f = l.current;
1731
1739
  if (f)
1732
1740
  return n(f), () => {
1733
1741
  r(f);
1734
1742
  };
1735
- }, [n, r]), U(() => {
1743
+ }, [n, r]), q(() => {
1736
1744
  const f = l.current ? o.get(l.current) : null;
1737
1745
  f != null && u(f);
1738
- }, [o]), d.useMemo(() => ({
1746
+ }, [o]), m.useMemo(() => ({
1739
1747
  ref: g,
1740
1748
  index: c ?? -1
1741
1749
  }), [c, g]);
1742
1750
  }
1743
- function Qe() {
1744
- return Qe = Object.assign ? Object.assign.bind() : function(e) {
1751
+ function et() {
1752
+ return et = Object.assign ? Object.assign.bind() : function(e) {
1745
1753
  for (var t = 1; t < arguments.length; t++) {
1746
1754
  var n = arguments[t];
1747
1755
  for (var r in n)
1748
1756
  Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
1749
1757
  }
1750
1758
  return e;
1751
- }, Qe.apply(this, arguments);
1759
+ }, et.apply(this, arguments);
1752
1760
  }
1753
- let un = !1, Io = 0;
1754
- const an = () => (
1761
+ let fn = !1, Wo = 0;
1762
+ const dn = () => (
1755
1763
  // Ensure the id is unique with multiple independent versions of Floating UI
1756
1764
  // on <React 18
1757
- "floating-ui-" + Math.random().toString(36).slice(2, 6) + Io++
1765
+ "floating-ui-" + Math.random().toString(36).slice(2, 6) + Wo++
1758
1766
  );
1759
- function To() {
1760
- const [e, t] = d.useState(() => un ? an() : void 0);
1761
- return U(() => {
1762
- e == null && t(an());
1763
- }, []), d.useEffect(() => {
1764
- un = !0;
1767
+ function Bo() {
1768
+ const [e, t] = m.useState(() => fn ? dn() : void 0);
1769
+ return q(() => {
1770
+ e == null && t(dn());
1771
+ }, []), m.useEffect(() => {
1772
+ fn = !0;
1765
1773
  }, []), e;
1766
1774
  }
1767
- const Oo = jn.useId, rt = Oo || To;
1768
- let et;
1769
- process.env.NODE_ENV !== "production" && (et = /* @__PURE__ */ new Set());
1770
- function dt() {
1775
+ const Ko = Xn.useId, ot = Ko || Bo;
1776
+ let tt;
1777
+ process.env.NODE_ENV !== "production" && (tt = /* @__PURE__ */ new Set());
1778
+ function mt() {
1771
1779
  for (var e, t = arguments.length, n = new Array(t), r = 0; r < t; r++)
1772
1780
  n[r] = arguments[r];
1773
1781
  const o = "Floating UI: " + n.join(" ");
1774
- if (!((e = et) != null && e.has(o))) {
1782
+ if (!((e = tt) != null && e.has(o))) {
1775
1783
  var i;
1776
- (i = et) == null || i.add(o), console.warn(o);
1784
+ (i = tt) == null || i.add(o), console.warn(o);
1777
1785
  }
1778
1786
  }
1779
- function So() {
1787
+ function $o() {
1780
1788
  for (var e, t = arguments.length, n = new Array(t), r = 0; r < t; r++)
1781
1789
  n[r] = arguments[r];
1782
1790
  const o = "Floating UI: " + n.join(" ");
1783
- if (!((e = et) != null && e.has(o))) {
1791
+ if (!((e = tt) != null && e.has(o))) {
1784
1792
  var i;
1785
- (i = et) == null || i.add(o), console.error(o);
1793
+ (i = tt) == null || i.add(o), console.error(o);
1786
1794
  }
1787
1795
  }
1788
- const oi = /* @__PURE__ */ d.forwardRef(function(t, n) {
1796
+ const Si = /* @__PURE__ */ m.forwardRef(function(t, n) {
1789
1797
  const {
1790
1798
  context: {
1791
1799
  placement: r,
@@ -1805,28 +1813,28 @@ const oi = /* @__PURE__ */ d.forwardRef(function(t, n) {
1805
1813
  d: h,
1806
1814
  style: {
1807
1815
  transform: a,
1808
- ...m
1816
+ ...d
1809
1817
  } = {},
1810
1818
  ...p
1811
1819
  } = t;
1812
- process.env.NODE_ENV !== "production" && (n || dt("The `ref` prop is required for `FloatingArrow`."));
1813
- const R = rt(), [E, C] = d.useState(!1);
1814
- if (U(() => {
1820
+ process.env.NODE_ENV !== "production" && (n || mt("The `ref` prop is required for `FloatingArrow`."));
1821
+ const w = ot(), [x, E] = m.useState(!1);
1822
+ if (q(() => {
1815
1823
  if (!o)
1816
1824
  return;
1817
- me(o).direction === "rtl" && C(!0);
1825
+ me(o).direction === "rtl" && E(!0);
1818
1826
  }, [o]), !o)
1819
1827
  return null;
1820
- const b = l * 2, y = b / 2, A = s / 2 * (u / -8 + 1), P = c / 2 * u / 4, [V, B] = r.split("-"), H = !!h, O = V === "top" || V === "bottom", D = g && B === "end" ? "bottom" : "top";
1828
+ const b = l * 2, y = b / 2, P = s / 2 * (u / -8 + 1), A = c / 2 * u / 4, [V, B] = r.split("-"), H = !!h, O = V === "top" || V === "bottom", D = g && B === "end" ? "bottom" : "top";
1821
1829
  let M = g && B === "end" ? "right" : "left";
1822
- g && E && (M = B === "end" ? "left" : "right");
1823
- const S = (i == null ? void 0 : i.x) != null ? g || i.x : "", v = (i == null ? void 0 : i.y) != null ? g || i.y : "", w = h || "M0,0" + (" H" + s) + (" L" + (s - A) + "," + (c - P)) + (" Q" + s / 2 + "," + c + " " + A + "," + (c - P)) + " Z", I = {
1830
+ g && x && (M = B === "end" ? "left" : "right");
1831
+ const S = (i == null ? void 0 : i.x) != null ? g || i.x : "", v = (i == null ? void 0 : i.y) != null ? g || i.y : "", C = h || "M0,0" + (" H" + s) + (" L" + (s - P) + "," + (c - A)) + (" Q" + s / 2 + "," + c + " " + P + "," + (c - A)) + " Z", I = {
1824
1832
  top: H ? "rotate(180deg)" : "",
1825
1833
  left: H ? "rotate(90deg)" : "rotate(-90deg)",
1826
1834
  bottom: H ? "" : "rotate(180deg)",
1827
1835
  right: H ? "rotate(-90deg)" : "rotate(90deg)"
1828
1836
  }[V];
1829
- return /* @__PURE__ */ d.createElement("svg", Qe({}, p, {
1837
+ return /* @__PURE__ */ m.createElement("svg", et({}, p, {
1830
1838
  "aria-hidden": !0,
1831
1839
  ref: n,
1832
1840
  width: H ? s : s + b,
@@ -1839,27 +1847,27 @@ const oi = /* @__PURE__ */ d.forwardRef(function(t, n) {
1839
1847
  [D]: v,
1840
1848
  [V]: O || H ? "100%" : "calc(100% - " + b / 2 + "px)",
1841
1849
  transform: "" + I + (a ?? ""),
1842
- ...m
1850
+ ...d
1843
1851
  }
1844
- }), b > 0 && /* @__PURE__ */ d.createElement("path", {
1845
- clipPath: "url(#" + R + ")",
1852
+ }), b > 0 && /* @__PURE__ */ m.createElement("path", {
1853
+ clipPath: "url(#" + w + ")",
1846
1854
  fill: "none",
1847
1855
  stroke: f,
1848
1856
  strokeWidth: b + (h ? 0 : 1),
1849
- d: w
1850
- }), /* @__PURE__ */ d.createElement("path", {
1857
+ d: C
1858
+ }), /* @__PURE__ */ m.createElement("path", {
1851
1859
  stroke: b && !h ? p.fill : "none",
1852
- d: w
1853
- }), /* @__PURE__ */ d.createElement("clipPath", {
1854
- id: R
1855
- }, /* @__PURE__ */ d.createElement("rect", {
1860
+ d: C
1861
+ }), /* @__PURE__ */ m.createElement("clipPath", {
1862
+ id: w
1863
+ }, /* @__PURE__ */ m.createElement("rect", {
1856
1864
  x: -y,
1857
1865
  y: y * (H ? -1 : 1),
1858
1866
  width: s + b,
1859
1867
  height: s
1860
1868
  })));
1861
1869
  });
1862
- function Gn() {
1870
+ function Jn() {
1863
1871
  const e = /* @__PURE__ */ new Map();
1864
1872
  return {
1865
1873
  emit(t, n) {
@@ -1875,13 +1883,13 @@ function Gn() {
1875
1883
  }
1876
1884
  };
1877
1885
  }
1878
- const Xn = /* @__PURE__ */ d.createContext(null), Zn = /* @__PURE__ */ d.createContext(null), je = () => {
1886
+ const Qn = /* @__PURE__ */ m.createContext(null), er = /* @__PURE__ */ m.createContext(null), Ye = () => {
1879
1887
  var e;
1880
- return ((e = d.useContext(Xn)) == null ? void 0 : e.id) || null;
1881
- }, Ye = () => d.useContext(Zn);
1882
- function ii(e) {
1883
- const t = rt(), n = Ye(), r = je(), o = e || r;
1884
- return U(() => {
1888
+ return ((e = m.useContext(Qn)) == null ? void 0 : e.id) || null;
1889
+ }, Ge = () => m.useContext(er);
1890
+ function Mi(e) {
1891
+ const t = ot(), n = Ge(), r = Ye(), o = e || r;
1892
+ return q(() => {
1885
1893
  const i = {
1886
1894
  id: t,
1887
1895
  parentId: o
@@ -1891,28 +1899,28 @@ function ii(e) {
1891
1899
  };
1892
1900
  }, [n, t, o]), t;
1893
1901
  }
1894
- function si(e) {
1902
+ function Pi(e) {
1895
1903
  const {
1896
1904
  children: t,
1897
1905
  id: n
1898
- } = e, r = je();
1899
- return /* @__PURE__ */ d.createElement(Xn.Provider, {
1900
- value: d.useMemo(() => ({
1906
+ } = e, r = Ye();
1907
+ return /* @__PURE__ */ m.createElement(Qn.Provider, {
1908
+ value: m.useMemo(() => ({
1901
1909
  id: n,
1902
1910
  parentId: r
1903
1911
  }), [n, r])
1904
1912
  }, t);
1905
1913
  }
1906
- function ci(e) {
1914
+ function Ai(e) {
1907
1915
  const {
1908
1916
  children: t
1909
- } = e, n = d.useRef([]), r = d.useCallback((s) => {
1917
+ } = e, n = m.useRef([]), r = m.useCallback((s) => {
1910
1918
  n.current = [...n.current, s];
1911
- }, []), o = d.useCallback((s) => {
1919
+ }, []), o = m.useCallback((s) => {
1912
1920
  n.current = n.current.filter((c) => c !== s);
1913
- }, []), i = d.useState(() => Gn())[0];
1914
- return /* @__PURE__ */ d.createElement(Zn.Provider, {
1915
- value: d.useMemo(() => ({
1921
+ }, []), i = m.useState(() => Jn())[0];
1922
+ return /* @__PURE__ */ m.createElement(er.Provider, {
1923
+ value: m.useMemo(() => ({
1916
1924
  nodesRef: n,
1917
1925
  addNode: r,
1918
1926
  removeNode: o,
@@ -1924,16 +1932,16 @@ function De(e) {
1924
1932
  return "data-floating-ui-" + e;
1925
1933
  }
1926
1934
  function de(e) {
1927
- const t = sr(e);
1928
- return U(() => {
1935
+ const t = mr(e);
1936
+ return q(() => {
1929
1937
  t.current = e;
1930
1938
  }), t;
1931
1939
  }
1932
- const fn = /* @__PURE__ */ De("safe-polygon");
1933
- function mt(e, t, n) {
1934
- return n && !Ze(n) ? 0 : typeof e == "number" ? e : e == null ? void 0 : e[t];
1940
+ const mn = /* @__PURE__ */ De("safe-polygon");
1941
+ function gt(e, t, n) {
1942
+ return n && !Je(n) ? 0 : typeof e == "number" ? e : e == null ? void 0 : e[t];
1935
1943
  }
1936
- function li(e, t) {
1944
+ function ki(e, t) {
1937
1945
  t === void 0 && (t = {});
1938
1946
  const {
1939
1947
  open: n,
@@ -1948,67 +1956,67 @@ function li(e, t) {
1948
1956
  mouseOnly: g = !1,
1949
1957
  restMs: f = 0,
1950
1958
  move: h = !0
1951
- } = t, a = Ye(), m = je(), p = de(l), R = de(u), E = de(n), C = d.useRef(), b = d.useRef(-1), y = d.useRef(), A = d.useRef(-1), P = d.useRef(!0), V = d.useRef(!1), B = d.useRef(() => {
1952
- }), H = d.useCallback(() => {
1953
- var w;
1954
- const I = (w = o.current.openEvent) == null ? void 0 : w.type;
1959
+ } = t, a = Ge(), d = Ye(), p = de(l), w = de(u), x = de(n), E = m.useRef(), b = m.useRef(-1), y = m.useRef(), P = m.useRef(-1), A = m.useRef(!0), V = m.useRef(!1), B = m.useRef(() => {
1960
+ }), H = m.useCallback(() => {
1961
+ var C;
1962
+ const I = (C = o.current.openEvent) == null ? void 0 : C.type;
1955
1963
  return (I == null ? void 0 : I.includes("mouse")) && I !== "mousedown";
1956
1964
  }, [o]);
1957
- d.useEffect(() => {
1965
+ m.useEffect(() => {
1958
1966
  if (!c)
1959
1967
  return;
1960
- function w(I) {
1968
+ function C(I) {
1961
1969
  let {
1962
- open: x
1970
+ open: R
1963
1971
  } = I;
1964
- x || (clearTimeout(b.current), clearTimeout(A.current), P.current = !0);
1972
+ R || (clearTimeout(b.current), clearTimeout(P.current), A.current = !0);
1965
1973
  }
1966
- return i.on("openchange", w), () => {
1967
- i.off("openchange", w);
1974
+ return i.on("openchange", C), () => {
1975
+ i.off("openchange", C);
1968
1976
  };
1969
- }, [c, i]), d.useEffect(() => {
1977
+ }, [c, i]), m.useEffect(() => {
1970
1978
  if (!c || !p.current || !n)
1971
1979
  return;
1972
- function w(x) {
1973
- H() && r(!1, x, "hover");
1980
+ function C(R) {
1981
+ H() && r(!1, R, "hover");
1974
1982
  }
1975
1983
  const I = ne(s.floating).documentElement;
1976
- return I.addEventListener("mouseleave", w), () => {
1977
- I.removeEventListener("mouseleave", w);
1984
+ return I.addEventListener("mouseleave", C), () => {
1985
+ I.removeEventListener("mouseleave", C);
1978
1986
  };
1979
1987
  }, [s.floating, n, r, c, p, H]);
1980
- const O = d.useCallback(function(w, I, x) {
1981
- I === void 0 && (I = !0), x === void 0 && (x = "hover");
1982
- const k = mt(R.current, "close", C.current);
1983
- k && !y.current ? (clearTimeout(b.current), b.current = window.setTimeout(() => r(!1, w, x), k)) : I && (clearTimeout(b.current), r(!1, w, x));
1984
- }, [R, r]), D = ie(() => {
1988
+ const O = m.useCallback(function(C, I, R) {
1989
+ I === void 0 && (I = !0), R === void 0 && (R = "hover");
1990
+ const k = gt(w.current, "close", E.current);
1991
+ k && !y.current ? (clearTimeout(b.current), b.current = window.setTimeout(() => r(!1, C, R), k)) : I && (clearTimeout(b.current), r(!1, C, R));
1992
+ }, [w, r]), D = ie(() => {
1985
1993
  B.current(), y.current = void 0;
1986
1994
  }), M = ie(() => {
1987
1995
  if (V.current) {
1988
- const w = ne(s.floating).body;
1989
- w.style.pointerEvents = "", w.removeAttribute(fn), V.current = !1;
1996
+ const C = ne(s.floating).body;
1997
+ C.style.pointerEvents = "", C.removeAttribute(mn), V.current = !1;
1990
1998
  }
1991
1999
  });
1992
- d.useEffect(() => {
2000
+ m.useEffect(() => {
1993
2001
  if (!c)
1994
2002
  return;
1995
- function w() {
2003
+ function C() {
1996
2004
  return o.current.openEvent ? ["click", "mousedown"].includes(o.current.openEvent.type) : !1;
1997
2005
  }
1998
2006
  function I(T) {
1999
- if (clearTimeout(b.current), P.current = !1, g && !Ze(C.current) || f > 0 && !mt(R.current, "open"))
2007
+ if (clearTimeout(b.current), A.current = !1, g && !Je(E.current) || f > 0 && !gt(w.current, "open"))
2000
2008
  return;
2001
- const q = mt(R.current, "open", C.current);
2002
- q ? b.current = window.setTimeout(() => {
2003
- E.current || r(!0, T, "hover");
2004
- }, q) : r(!0, T, "hover");
2009
+ const j = gt(w.current, "open", E.current);
2010
+ j ? b.current = window.setTimeout(() => {
2011
+ x.current || r(!0, T, "hover");
2012
+ }, j) : r(!0, T, "hover");
2005
2013
  }
2006
- function x(T) {
2007
- if (w())
2014
+ function R(T) {
2015
+ if (C())
2008
2016
  return;
2009
2017
  B.current();
2010
- const q = ne(s.floating);
2011
- if (clearTimeout(A.current), p.current && o.current.floatingContext) {
2018
+ const j = ne(s.floating);
2019
+ if (clearTimeout(P.current), p.current && o.current.floatingContext) {
2012
2020
  n || clearTimeout(b.current), y.current = p.current({
2013
2021
  ...o.current.floatingContext,
2014
2022
  tree: a,
@@ -2019,15 +2027,15 @@ function li(e, t) {
2019
2027
  }
2020
2028
  });
2021
2029
  const ce = y.current;
2022
- q.addEventListener("mousemove", ce), B.current = () => {
2023
- q.removeEventListener("mousemove", ce);
2030
+ j.addEventListener("mousemove", ce), B.current = () => {
2031
+ j.removeEventListener("mousemove", ce);
2024
2032
  };
2025
2033
  return;
2026
2034
  }
2027
- (C.current === "touch" ? !ee(s.floating, T.relatedTarget) : !0) && O(T);
2035
+ (E.current === "touch" ? !ee(s.floating, T.relatedTarget) : !0) && O(T);
2028
2036
  }
2029
2037
  function k(T) {
2030
- w() || o.current.floatingContext && (p.current == null || p.current({
2038
+ C() || o.current.floatingContext && (p.current == null || p.current({
2031
2039
  ...o.current.floatingContext,
2032
2040
  tree: a,
2033
2041
  x: T.clientX,
@@ -2042,76 +2050,76 @@ function li(e, t) {
2042
2050
  const T = s.domReference;
2043
2051
  return n && T.addEventListener("mouseleave", k), (_ = s.floating) == null || _.addEventListener("mouseleave", k), h && T.addEventListener("mousemove", I, {
2044
2052
  once: !0
2045
- }), T.addEventListener("mouseenter", I), T.addEventListener("mouseleave", x), () => {
2046
- var q;
2047
- n && T.removeEventListener("mouseleave", k), (q = s.floating) == null || q.removeEventListener("mouseleave", k), h && T.removeEventListener("mousemove", I), T.removeEventListener("mouseenter", I), T.removeEventListener("mouseleave", x);
2053
+ }), T.addEventListener("mouseenter", I), T.addEventListener("mouseleave", R), () => {
2054
+ var j;
2055
+ n && T.removeEventListener("mouseleave", k), (j = s.floating) == null || j.removeEventListener("mouseleave", k), h && T.removeEventListener("mousemove", I), T.removeEventListener("mouseenter", I), T.removeEventListener("mouseleave", R);
2048
2056
  };
2049
2057
  }
2050
- }, [s, c, e, g, f, h, O, D, M, r, n, E, a, R, p, o]), U(() => {
2051
- var w;
2052
- if (c && n && (w = p.current) != null && w.__options.blockPointerEvents && H()) {
2053
- const x = ne(s.floating).body;
2054
- x.setAttribute(fn, ""), x.style.pointerEvents = "none", V.current = !0;
2058
+ }, [s, c, e, g, f, h, O, D, M, r, n, x, a, w, p, o]), q(() => {
2059
+ var C;
2060
+ if (c && n && (C = p.current) != null && C.__options.blockPointerEvents && H()) {
2061
+ const R = ne(s.floating).body;
2062
+ R.setAttribute(mn, ""), R.style.pointerEvents = "none", V.current = !0;
2055
2063
  const k = s.floating;
2056
2064
  if (Y(s.domReference) && k) {
2057
2065
  var I;
2058
- const _ = s.domReference, T = a == null || (I = a.nodesRef.current.find((q) => q.id === m)) == null || (I = I.context) == null ? void 0 : I.elements.floating;
2066
+ const _ = s.domReference, T = a == null || (I = a.nodesRef.current.find((j) => j.id === d)) == null || (I = I.context) == null ? void 0 : I.elements.floating;
2059
2067
  return T && (T.style.pointerEvents = ""), _.style.pointerEvents = "auto", k.style.pointerEvents = "auto", () => {
2060
2068
  _.style.pointerEvents = "", k.style.pointerEvents = "";
2061
2069
  };
2062
2070
  }
2063
2071
  }
2064
- }, [c, n, m, s, a, p, H]), U(() => {
2065
- n || (C.current = void 0, D(), M());
2066
- }, [n, D, M]), d.useEffect(() => () => {
2067
- D(), clearTimeout(b.current), clearTimeout(A.current), M();
2072
+ }, [c, n, d, s, a, p, H]), q(() => {
2073
+ n || (E.current = void 0, D(), M());
2074
+ }, [n, D, M]), m.useEffect(() => () => {
2075
+ D(), clearTimeout(b.current), clearTimeout(P.current), M();
2068
2076
  }, [c, s.domReference, D, M]);
2069
- const S = d.useMemo(() => {
2070
- function w(I) {
2071
- C.current = I.pointerType;
2077
+ const S = m.useMemo(() => {
2078
+ function C(I) {
2079
+ E.current = I.pointerType;
2072
2080
  }
2073
2081
  return {
2074
- onPointerDown: w,
2075
- onPointerEnter: w,
2082
+ onPointerDown: C,
2083
+ onPointerEnter: C,
2076
2084
  onMouseMove(I) {
2077
2085
  const {
2078
- nativeEvent: x
2086
+ nativeEvent: R
2079
2087
  } = I;
2080
2088
  function k() {
2081
- !P.current && !E.current && r(!0, x, "hover");
2089
+ !A.current && !x.current && r(!0, R, "hover");
2082
2090
  }
2083
- g && !Ze(C.current) || n || f === 0 || (clearTimeout(A.current), C.current === "touch" ? k() : A.current = window.setTimeout(k, f));
2091
+ g && !Je(E.current) || n || f === 0 || (clearTimeout(P.current), E.current === "touch" ? k() : P.current = window.setTimeout(k, f));
2084
2092
  }
2085
2093
  };
2086
- }, [g, r, n, E, f]), v = d.useMemo(() => ({
2094
+ }, [g, r, n, x, f]), v = m.useMemo(() => ({
2087
2095
  onMouseEnter() {
2088
2096
  clearTimeout(b.current);
2089
2097
  },
2090
- onMouseLeave(w) {
2091
- O(w.nativeEvent, !1);
2098
+ onMouseLeave(C) {
2099
+ O(C.nativeEvent, !1);
2092
2100
  }
2093
2101
  }), [O]);
2094
- return d.useMemo(() => c ? {
2102
+ return m.useMemo(() => c ? {
2095
2103
  reference: S,
2096
2104
  floating: v
2097
2105
  } : {}, [c, S, v]);
2098
2106
  }
2099
- const Vt = () => {
2100
- }, Jn = /* @__PURE__ */ d.createContext({
2107
+ const _t = () => {
2108
+ }, tr = /* @__PURE__ */ m.createContext({
2101
2109
  delay: 0,
2102
2110
  initialDelay: 0,
2103
2111
  timeoutMs: 0,
2104
2112
  currentId: null,
2105
- setCurrentId: Vt,
2106
- setState: Vt,
2113
+ setCurrentId: _t,
2114
+ setState: _t,
2107
2115
  isInstantPhase: !1
2108
- }), Mo = () => d.useContext(Jn);
2109
- function ui(e) {
2116
+ }), Ho = () => m.useContext(tr);
2117
+ function zo(e) {
2110
2118
  const {
2111
2119
  children: t,
2112
2120
  delay: n,
2113
2121
  timeoutMs: r = 0
2114
- } = e, [o, i] = d.useReducer((u, l) => ({
2122
+ } = e, [o, i] = m.useReducer((u, l) => ({
2115
2123
  ...u,
2116
2124
  ...l
2117
2125
  }), {
@@ -2120,26 +2128,26 @@ function ui(e) {
2120
2128
  initialDelay: n,
2121
2129
  currentId: null,
2122
2130
  isInstantPhase: !1
2123
- }), s = d.useRef(null), c = d.useCallback((u) => {
2131
+ }), s = m.useRef(null), c = m.useCallback((u) => {
2124
2132
  i({
2125
2133
  currentId: u
2126
2134
  });
2127
2135
  }, []);
2128
- return U(() => {
2136
+ return q(() => {
2129
2137
  o.currentId ? s.current === null ? s.current = o.currentId : o.isInstantPhase || i({
2130
2138
  isInstantPhase: !0
2131
2139
  }) : (o.isInstantPhase && i({
2132
2140
  isInstantPhase: !1
2133
2141
  }), s.current = null);
2134
- }, [o.currentId, o.isInstantPhase]), /* @__PURE__ */ d.createElement(Jn.Provider, {
2135
- value: d.useMemo(() => ({
2142
+ }, [o.currentId, o.isInstantPhase]), /* @__PURE__ */ m.createElement(tr.Provider, {
2143
+ value: m.useMemo(() => ({
2136
2144
  ...o,
2137
2145
  setState: i,
2138
2146
  setCurrentId: c
2139
2147
  }), [o, c])
2140
2148
  }, t);
2141
2149
  }
2142
- function ai(e, t) {
2150
+ function Di(e, t) {
2143
2151
  t === void 0 && (t = {});
2144
2152
  const {
2145
2153
  open: n,
@@ -2147,21 +2155,21 @@ function ai(e, t) {
2147
2155
  floatingId: o
2148
2156
  } = e, {
2149
2157
  id: i
2150
- } = t, s = i ?? o, c = Mo(), {
2158
+ } = t, s = i ?? o, c = Ho(), {
2151
2159
  currentId: u,
2152
2160
  setCurrentId: l,
2153
2161
  initialDelay: g,
2154
2162
  setState: f,
2155
2163
  timeoutMs: h
2156
2164
  } = c;
2157
- return U(() => {
2165
+ return q(() => {
2158
2166
  u && (f({
2159
2167
  delay: {
2160
2168
  open: 1,
2161
- close: mt(g, "close")
2169
+ close: gt(g, "close")
2162
2170
  }
2163
2171
  }), u !== s && r(!1));
2164
- }, [s, r, f, u, g]), U(() => {
2172
+ }, [s, r, f, u, g]), q(() => {
2165
2173
  function a() {
2166
2174
  r(!1), f({
2167
2175
  delay: g,
@@ -2170,18 +2178,18 @@ function ai(e, t) {
2170
2178
  }
2171
2179
  if (u && !n && u === s) {
2172
2180
  if (h) {
2173
- const m = window.setTimeout(a, h);
2181
+ const d = window.setTimeout(a, h);
2174
2182
  return () => {
2175
- clearTimeout(m);
2183
+ clearTimeout(d);
2176
2184
  };
2177
2185
  }
2178
2186
  a();
2179
2187
  }
2180
- }, [n, f, u, s, r, g, h]), U(() => {
2181
- l === Vt || !n || l(s);
2188
+ }, [n, f, u, s, r, g, h]), q(() => {
2189
+ l === _t || !n || l(s);
2182
2190
  }, [n, l, s]), c;
2183
2191
  }
2184
- function Ao(e, t) {
2192
+ function jo(e, t) {
2185
2193
  var n;
2186
2194
  let r = [], o = (n = e.find((i) => i.id === t)) == null ? void 0 : n.parentId;
2187
2195
  for (; o; ) {
@@ -2205,7 +2213,7 @@ function Ne(e, t) {
2205
2213
  }), n = n.concat(r);
2206
2214
  return n;
2207
2215
  }
2208
- function Po(e, t) {
2216
+ function qo(e, t) {
2209
2217
  let n, r = -1;
2210
2218
  function o(i, s) {
2211
2219
  s > r && (n = i, r = s), Ne(e, i).forEach((u) => {
@@ -2214,45 +2222,45 @@ function Po(e, t) {
2214
2222
  }
2215
2223
  return o(t, 0), e.find((i) => i.id === n);
2216
2224
  }
2217
- let We = /* @__PURE__ */ new WeakMap(), lt = /* @__PURE__ */ new WeakSet(), ut = {}, St = 0;
2218
- const ko = () => typeof HTMLElement < "u" && "inert" in HTMLElement.prototype, Qn = (e) => e && (e.host || Qn(e.parentNode)), Do = (e, t) => t.map((n) => {
2225
+ let Be = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakSet(), at = {}, Mt = 0;
2226
+ const Uo = () => typeof HTMLElement < "u" && "inert" in HTMLElement.prototype, nr = (e) => e && (e.host || nr(e.parentNode)), Yo = (e, t) => t.map((n) => {
2219
2227
  if (e.contains(n))
2220
2228
  return n;
2221
- const r = Qn(n);
2229
+ const r = nr(n);
2222
2230
  return e.contains(r) ? r : null;
2223
2231
  }).filter((n) => n != null);
2224
- function Lo(e, t, n, r) {
2225
- const o = "data-floating-ui-inert", i = r ? "inert" : n ? "aria-hidden" : null, s = Do(t, e), c = /* @__PURE__ */ new Set(), u = new Set(s), l = [];
2226
- ut[o] || (ut[o] = /* @__PURE__ */ new WeakMap());
2227
- const g = ut[o];
2232
+ function Go(e, t, n, r) {
2233
+ const o = "data-floating-ui-inert", i = r ? "inert" : n ? "aria-hidden" : null, s = Yo(t, e), c = /* @__PURE__ */ new Set(), u = new Set(s), l = [];
2234
+ at[o] || (at[o] = /* @__PURE__ */ new WeakMap());
2235
+ const g = at[o];
2228
2236
  s.forEach(f), h(t), c.clear();
2229
2237
  function f(a) {
2230
2238
  !a || c.has(a) || (c.add(a), a.parentNode && f(a.parentNode));
2231
2239
  }
2232
2240
  function h(a) {
2233
- !a || u.has(a) || [].forEach.call(a.children, (m) => {
2234
- if (Le(m) !== "script")
2235
- if (c.has(m))
2236
- h(m);
2241
+ !a || u.has(a) || [].forEach.call(a.children, (d) => {
2242
+ if (Le(d) !== "script")
2243
+ if (c.has(d))
2244
+ h(d);
2237
2245
  else {
2238
- const p = i ? m.getAttribute(i) : null, R = p !== null && p !== "false", E = (We.get(m) || 0) + 1, C = (g.get(m) || 0) + 1;
2239
- We.set(m, E), g.set(m, C), l.push(m), E === 1 && R && lt.add(m), C === 1 && m.setAttribute(o, ""), !R && i && m.setAttribute(i, "true");
2246
+ const p = i ? d.getAttribute(i) : null, w = p !== null && p !== "false", x = (Be.get(d) || 0) + 1, E = (g.get(d) || 0) + 1;
2247
+ Be.set(d, x), g.set(d, E), l.push(d), x === 1 && w && ut.add(d), E === 1 && d.setAttribute(o, ""), !w && i && d.setAttribute(i, "true");
2240
2248
  }
2241
2249
  });
2242
2250
  }
2243
- return St++, () => {
2251
+ return Mt++, () => {
2244
2252
  l.forEach((a) => {
2245
- const m = (We.get(a) || 0) - 1, p = (g.get(a) || 0) - 1;
2246
- We.set(a, m), g.set(a, p), m || (!lt.has(a) && i && a.removeAttribute(i), lt.delete(a)), p || a.removeAttribute(o);
2247
- }), St--, St || (We = /* @__PURE__ */ new WeakMap(), We = /* @__PURE__ */ new WeakMap(), lt = /* @__PURE__ */ new WeakSet(), ut = {});
2253
+ const d = (Be.get(a) || 0) - 1, p = (g.get(a) || 0) - 1;
2254
+ Be.set(a, d), g.set(a, p), d || (!ut.has(a) && i && a.removeAttribute(i), ut.delete(a)), p || a.removeAttribute(o);
2255
+ }), Mt--, Mt || (Be = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakSet(), at = {});
2248
2256
  };
2249
2257
  }
2250
- function dn(e, t, n) {
2258
+ function gn(e, t, n) {
2251
2259
  t === void 0 && (t = !1), n === void 0 && (n = !1);
2252
2260
  const r = ne(e[0]).body;
2253
- return Lo(e.concat(Array.from(r.querySelectorAll("[aria-live]"))), r, t, n);
2261
+ return Go(e.concat(Array.from(r.querySelectorAll("[aria-live]"))), r, t, n);
2254
2262
  }
2255
- const ze = () => ({
2263
+ const je = () => ({
2256
2264
  getShadowRoot: !0,
2257
2265
  displayCheck: (
2258
2266
  // JSDOM does not support the `tabbable` library. To solve this we can
@@ -2261,34 +2269,34 @@ const ze = () => ({
2261
2269
  typeof ResizeObserver == "function" && ResizeObserver.toString().includes("[native code]") ? "full" : "none"
2262
2270
  )
2263
2271
  });
2264
- function er(e, t) {
2265
- const n = Je(e, ze());
2272
+ function rr(e, t) {
2273
+ const n = Qe(e, je());
2266
2274
  t === "prev" && n.reverse();
2267
2275
  const r = n.indexOf(he(ne(e)));
2268
2276
  return n.slice(r + 1)[0];
2269
2277
  }
2270
- function tr() {
2271
- return er(document.body, "next");
2278
+ function or() {
2279
+ return rr(document.body, "next");
2272
2280
  }
2273
- function nr() {
2274
- return er(document.body, "prev");
2281
+ function ir() {
2282
+ return rr(document.body, "prev");
2275
2283
  }
2276
- function Xe(e, t) {
2284
+ function Ze(e, t) {
2277
2285
  const n = t || e.currentTarget, r = e.relatedTarget;
2278
2286
  return !r || !ee(n, r);
2279
2287
  }
2280
- function Fo(e) {
2281
- Je(e, ze()).forEach((n) => {
2288
+ function Xo(e) {
2289
+ Qe(e, je()).forEach((n) => {
2282
2290
  n.dataset.tabindex = n.getAttribute("tabindex") || "", n.setAttribute("tabindex", "-1");
2283
2291
  });
2284
2292
  }
2285
- function No(e) {
2293
+ function Zo(e) {
2286
2294
  e.querySelectorAll("[data-tabindex]").forEach((n) => {
2287
2295
  const r = n.dataset.tabindex;
2288
2296
  delete n.dataset.tabindex, r ? n.setAttribute("tabindex", r) : n.removeAttribute("tabindex");
2289
2297
  });
2290
2298
  }
2291
- function Vo(e, t, n) {
2299
+ function Jo(e, t, n) {
2292
2300
  const r = e.indexOf(t);
2293
2301
  function o(s) {
2294
2302
  const c = De("focus-guard");
@@ -2300,7 +2308,7 @@ function Vo(e, t, n) {
2300
2308
  const i = o(!0);
2301
2309
  return i || o(!1);
2302
2310
  }
2303
- const Gt = {
2311
+ const Xt = {
2304
2312
  border: 0,
2305
2313
  clip: "rect(0 0 0 0)",
2306
2314
  height: "1px",
@@ -2313,14 +2321,14 @@ const Gt = {
2313
2321
  top: 0,
2314
2322
  left: 0
2315
2323
  };
2316
- let _o;
2317
- function mn(e) {
2318
- e.key === "Tab" && (e.target, clearTimeout(_o));
2319
- }
2320
- const wt = /* @__PURE__ */ d.forwardRef(function(t, n) {
2321
- const [r, o] = d.useState();
2322
- U(() => (Kt() && o("button"), document.addEventListener("keydown", mn), () => {
2323
- document.removeEventListener("keydown", mn);
2324
+ let Qo;
2325
+ function pn(e) {
2326
+ e.key === "Tab" && (e.target, clearTimeout(Qo));
2327
+ }
2328
+ const Rt = /* @__PURE__ */ m.forwardRef(function(t, n) {
2329
+ const [r, o] = m.useState();
2330
+ q(() => ($t() && o("button"), document.addEventListener("keydown", pn), () => {
2331
+ document.removeEventListener("keydown", pn);
2324
2332
  }), []);
2325
2333
  const i = {
2326
2334
  ref: n,
@@ -2329,29 +2337,29 @@ const wt = /* @__PURE__ */ d.forwardRef(function(t, n) {
2329
2337
  role: r,
2330
2338
  "aria-hidden": r ? void 0 : !0,
2331
2339
  [De("focus-guard")]: "",
2332
- style: Gt
2340
+ style: Xt
2333
2341
  };
2334
- return /* @__PURE__ */ d.createElement("span", Qe({}, t, i));
2335
- }), rr = /* @__PURE__ */ d.createContext(null), gn = /* @__PURE__ */ De("portal");
2336
- function Wo(e) {
2342
+ return /* @__PURE__ */ m.createElement("span", et({}, t, i));
2343
+ }), sr = /* @__PURE__ */ m.createContext(null), hn = /* @__PURE__ */ De("portal");
2344
+ function ei(e) {
2337
2345
  e === void 0 && (e = {});
2338
2346
  const {
2339
2347
  id: t,
2340
2348
  root: n
2341
- } = e, r = rt(), o = or(), [i, s] = d.useState(null), c = d.useRef(null);
2342
- return U(() => () => {
2349
+ } = e, r = ot(), o = cr(), [i, s] = m.useState(null), c = m.useRef(null);
2350
+ return q(() => () => {
2343
2351
  i == null || i.remove(), queueMicrotask(() => {
2344
2352
  c.current = null;
2345
2353
  });
2346
- }, [i]), U(() => {
2354
+ }, [i]), q(() => {
2347
2355
  if (!r || c.current)
2348
2356
  return;
2349
2357
  const u = t ? document.getElementById(t) : null;
2350
2358
  if (!u)
2351
2359
  return;
2352
2360
  const l = document.createElement("div");
2353
- l.id = r, l.setAttribute(gn, ""), u.appendChild(l), c.current = l, s(l);
2354
- }, [t, r]), U(() => {
2361
+ l.id = r, l.setAttribute(hn, ""), u.appendChild(l), c.current = l, s(l);
2362
+ }, [t, r]), q(() => {
2355
2363
  if (!r || c.current)
2356
2364
  return;
2357
2365
  let u = n || (o == null ? void 0 : o.portalNode);
@@ -2359,36 +2367,36 @@ function Wo(e) {
2359
2367
  let l = null;
2360
2368
  t && (l = document.createElement("div"), l.id = t, u.appendChild(l));
2361
2369
  const g = document.createElement("div");
2362
- g.id = r, g.setAttribute(gn, ""), u = l || u, u.appendChild(g), c.current = g, s(g);
2370
+ g.id = r, g.setAttribute(hn, ""), u = l || u, u.appendChild(g), c.current = g, s(g);
2363
2371
  }, [t, n, r, o]), i;
2364
2372
  }
2365
- function fi(e) {
2373
+ function Li(e) {
2366
2374
  const {
2367
2375
  children: t,
2368
2376
  id: n,
2369
2377
  root: r = null,
2370
2378
  preserveTabOrder: o = !0
2371
- } = e, i = Wo({
2379
+ } = e, i = ei({
2372
2380
  id: n,
2373
2381
  root: r
2374
- }), [s, c] = d.useState(null), u = d.useRef(null), l = d.useRef(null), g = d.useRef(null), f = d.useRef(null), h = (
2382
+ }), [s, c] = m.useState(null), u = m.useRef(null), l = m.useRef(null), g = m.useRef(null), f = m.useRef(null), h = (
2375
2383
  // The FocusManager and therefore floating element are currently open/
2376
2384
  // rendered.
2377
2385
  !!s && // Guards are only for non-modal focus management.
2378
2386
  !s.modal && // Don't render if unmount is transitioning.
2379
2387
  s.open && o && !!(r || i)
2380
2388
  );
2381
- return d.useEffect(() => {
2389
+ return m.useEffect(() => {
2382
2390
  if (!i || !o || s != null && s.modal)
2383
2391
  return;
2384
- function a(m) {
2385
- i && Xe(m) && (m.type === "focusin" ? No : Fo)(i);
2392
+ function a(d) {
2393
+ i && Ze(d) && (d.type === "focusin" ? Zo : Xo)(i);
2386
2394
  }
2387
2395
  return i.addEventListener("focusin", a, !0), i.addEventListener("focusout", a, !0), () => {
2388
2396
  i.removeEventListener("focusin", a, !0), i.removeEventListener("focusout", a, !0);
2389
2397
  };
2390
- }, [i, o, s == null ? void 0 : s.modal]), /* @__PURE__ */ d.createElement(rr.Provider, {
2391
- value: d.useMemo(() => ({
2398
+ }, [i, o, s == null ? void 0 : s.modal]), /* @__PURE__ */ m.createElement(sr.Provider, {
2399
+ value: m.useMemo(() => ({
2392
2400
  preserveTabOrder: o,
2393
2401
  beforeOutsideRef: u,
2394
2402
  afterOutsideRef: l,
@@ -2397,60 +2405,60 @@ function fi(e) {
2397
2405
  portalNode: i,
2398
2406
  setFocusManagerState: c
2399
2407
  }), [o, i])
2400
- }, h && i && /* @__PURE__ */ d.createElement(wt, {
2408
+ }, h && i && /* @__PURE__ */ m.createElement(Rt, {
2401
2409
  "data-type": "outside",
2402
2410
  ref: u,
2403
2411
  onFocus: (a) => {
2404
- if (Xe(a, i)) {
2405
- var m;
2406
- (m = g.current) == null || m.focus();
2412
+ if (Ze(a, i)) {
2413
+ var d;
2414
+ (d = g.current) == null || d.focus();
2407
2415
  } else {
2408
- const p = nr() || (s == null ? void 0 : s.refs.domReference.current);
2416
+ const p = ir() || (s == null ? void 0 : s.refs.domReference.current);
2409
2417
  p == null || p.focus();
2410
2418
  }
2411
2419
  }
2412
- }), h && i && /* @__PURE__ */ d.createElement("span", {
2420
+ }), h && i && /* @__PURE__ */ m.createElement("span", {
2413
2421
  "aria-owns": i.id,
2414
- style: Gt
2415
- }), i && /* @__PURE__ */ Sn.createPortal(t, i), h && i && /* @__PURE__ */ d.createElement(wt, {
2422
+ style: Xt
2423
+ }), i && /* @__PURE__ */ An.createPortal(t, i), h && i && /* @__PURE__ */ m.createElement(Rt, {
2416
2424
  "data-type": "outside",
2417
2425
  ref: l,
2418
2426
  onFocus: (a) => {
2419
- if (Xe(a, i)) {
2420
- var m;
2421
- (m = f.current) == null || m.focus();
2427
+ if (Ze(a, i)) {
2428
+ var d;
2429
+ (d = f.current) == null || d.focus();
2422
2430
  } else {
2423
- const p = tr() || (s == null ? void 0 : s.refs.domReference.current);
2431
+ const p = or() || (s == null ? void 0 : s.refs.domReference.current);
2424
2432
  p == null || p.focus(), s != null && s.closeOnFocusOut && (s == null || s.onOpenChange(!1, a.nativeEvent));
2425
2433
  }
2426
2434
  }
2427
2435
  }));
2428
2436
  }
2429
- const or = () => d.useContext(rr), pn = 20;
2437
+ const cr = () => m.useContext(sr), vn = 20;
2430
2438
  let Fe = [];
2431
- function Mt(e) {
2439
+ function Pt(e) {
2432
2440
  Fe = Fe.filter((n) => n.isConnected);
2433
2441
  let t = e;
2434
2442
  if (!(!t || Le(t) === "body")) {
2435
- if (!_r(t, ze())) {
2436
- const n = Je(t, ze())[0];
2443
+ if (!Jr(t, je())) {
2444
+ const n = Qe(t, je())[0];
2437
2445
  n && (t = n);
2438
2446
  }
2439
- Fe.push(t), Fe.length > pn && (Fe = Fe.slice(-pn));
2447
+ Fe.push(t), Fe.length > vn && (Fe = Fe.slice(-vn));
2440
2448
  }
2441
2449
  }
2442
- function hn() {
2450
+ function bn() {
2443
2451
  return Fe.slice().reverse().find((e) => e.isConnected);
2444
2452
  }
2445
- const Bo = /* @__PURE__ */ d.forwardRef(function(t, n) {
2446
- return /* @__PURE__ */ d.createElement("button", Qe({}, t, {
2453
+ const ti = /* @__PURE__ */ m.forwardRef(function(t, n) {
2454
+ return /* @__PURE__ */ m.createElement("button", et({}, t, {
2447
2455
  type: "button",
2448
2456
  ref: n,
2449
2457
  tabIndex: -1,
2450
- style: Gt
2458
+ style: Xt
2451
2459
  }));
2452
2460
  });
2453
- function di(e) {
2461
+ function Fi(e) {
2454
2462
  const {
2455
2463
  context: t,
2456
2464
  children: n,
@@ -2466,27 +2474,27 @@ function di(e) {
2466
2474
  } = e, {
2467
2475
  open: h,
2468
2476
  refs: a,
2469
- nodeId: m,
2477
+ nodeId: d,
2470
2478
  onOpenChange: p,
2471
- events: R,
2472
- dataRef: E,
2473
- floatingId: C,
2479
+ events: w,
2480
+ dataRef: x,
2481
+ floatingId: E,
2474
2482
  elements: {
2475
2483
  domReference: b,
2476
2484
  floating: y
2477
2485
  }
2478
- } = t, A = typeof s == "number" && s < 0, P = Fn(b) && A, V = ko() ? i : !0, B = de(o), H = de(s), O = de(c), D = Ye(), M = or(), S = d.useRef(null), v = d.useRef(null), w = d.useRef(!1), I = d.useRef(!1), x = d.useRef(-1), k = M != null, _ = y == null ? void 0 : y.firstElementChild, T = (_ == null ? void 0 : _.id) === C ? _ : y, q = ie(function(L) {
2479
- return L === void 0 && (L = T), L ? Je(L, ze()) : [];
2486
+ } = t, P = typeof s == "number" && s < 0, A = _n(b) && P, V = Uo() ? i : !0, B = de(o), H = de(s), O = de(c), D = Ge(), M = cr(), S = m.useRef(null), v = m.useRef(null), C = m.useRef(!1), I = m.useRef(!1), R = m.useRef(-1), k = M != null, _ = y == null ? void 0 : y.firstElementChild, T = (_ == null ? void 0 : _.id) === E ? _ : y, j = ie(function(L) {
2487
+ return L === void 0 && (L = T), L ? Qe(L, je()) : [];
2480
2488
  }), re = ie((L) => {
2481
- const K = q(L);
2489
+ const K = j(L);
2482
2490
  return B.current.map((N) => b && N === "reference" ? b : T && N === "floating" ? T : K).filter(Boolean).flat();
2483
2491
  });
2484
- d.useEffect(() => {
2492
+ m.useEffect(() => {
2485
2493
  if (r || !l)
2486
2494
  return;
2487
2495
  function L(N) {
2488
2496
  if (N.key === "Tab") {
2489
- ee(T, he(ne(T))) && q().length === 0 && !P && oe(N);
2497
+ ee(T, he(ne(T))) && j().length === 0 && !A && oe(N);
2490
2498
  const F = re(), z = we(N);
2491
2499
  B.current[0] === "reference" && z === b && (oe(N), N.shiftKey ? Oe(F[F.length - 1]) : Oe(F[1])), B.current[1] === "floating" && z === T && N.shiftKey && (oe(N), Oe(F[0]));
2492
2500
  }
@@ -2495,17 +2503,17 @@ function di(e) {
2495
2503
  return K.addEventListener("keydown", L), () => {
2496
2504
  K.removeEventListener("keydown", L);
2497
2505
  };
2498
- }, [r, b, T, l, B, P, q, re]), d.useEffect(() => {
2506
+ }, [r, b, T, l, B, A, j, re]), m.useEffect(() => {
2499
2507
  if (r || !y)
2500
2508
  return;
2501
2509
  function L(K) {
2502
- const N = we(K), z = q().indexOf(N);
2503
- z !== -1 && (x.current = z);
2510
+ const N = we(K), z = j().indexOf(N);
2511
+ z !== -1 && (R.current = z);
2504
2512
  }
2505
2513
  return y.addEventListener("focusin", L), () => {
2506
2514
  y.removeEventListener("focusin", L);
2507
2515
  };
2508
- }, [r, y, q]), d.useEffect(() => {
2516
+ }, [r, y, j]), m.useEffect(() => {
2509
2517
  if (r || !f)
2510
2518
  return;
2511
2519
  function L() {
@@ -2516,55 +2524,55 @@ function di(e) {
2516
2524
  function K(N) {
2517
2525
  const F = N.relatedTarget;
2518
2526
  queueMicrotask(() => {
2519
- const z = !(ee(b, F) || ee(y, F) || ee(F, y) || ee(M == null ? void 0 : M.portalNode, F) || F != null && F.hasAttribute(De("focus-guard")) || D && (Ne(D.nodesRef.current, m).find((j) => {
2527
+ const z = !(ee(b, F) || ee(y, F) || ee(F, y) || ee(M == null ? void 0 : M.portalNode, F) || F != null && F.hasAttribute(De("focus-guard")) || D && (Ne(D.nodesRef.current, d).find((U) => {
2520
2528
  var Q, G;
2521
- return ee((Q = j.context) == null ? void 0 : Q.elements.floating, F) || ee((G = j.context) == null ? void 0 : G.elements.domReference, F);
2522
- }) || Ao(D.nodesRef.current, m).find((j) => {
2529
+ return ee((Q = U.context) == null ? void 0 : Q.elements.floating, F) || ee((G = U.context) == null ? void 0 : G.elements.domReference, F);
2530
+ }) || jo(D.nodesRef.current, d).find((U) => {
2523
2531
  var Q, G;
2524
- return ((Q = j.context) == null ? void 0 : Q.elements.floating) === F || ((G = j.context) == null ? void 0 : G.elements.domReference) === F;
2532
+ return ((Q = U.context) == null ? void 0 : Q.elements.floating) === F || ((G = U.context) == null ? void 0 : G.elements.domReference) === F;
2525
2533
  })));
2526
2534
  if (u && z && he(ne(T)) === ne(T).body) {
2527
2535
  te(T) && (T == null || T.focus());
2528
- const j = x.current, Q = q(), G = Q[j] || Q[Q.length - 1] || T;
2536
+ const U = R.current, Q = j(), G = Q[U] || Q[Q.length - 1] || T;
2529
2537
  te(G) && G.focus();
2530
2538
  }
2531
- (P || !l) && F && z && !I.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
2532
- F !== hn() && (w.current = !0, p(!1, N));
2539
+ (A || !l) && F && z && !I.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
2540
+ F !== bn() && (C.current = !0, p(!1, N));
2533
2541
  });
2534
2542
  }
2535
2543
  if (y && te(b))
2536
2544
  return b.addEventListener("focusout", K), b.addEventListener("pointerdown", L), y.addEventListener("focusout", K), () => {
2537
2545
  b.removeEventListener("focusout", K), b.removeEventListener("pointerdown", L), y.removeEventListener("focusout", K);
2538
2546
  };
2539
- }, [r, b, y, T, l, m, D, M, p, f, u, q, P]), d.useEffect(() => {
2547
+ }, [r, b, y, T, l, d, D, M, p, f, u, j, A]), m.useEffect(() => {
2540
2548
  var L;
2541
2549
  if (r)
2542
2550
  return;
2543
2551
  const K = Array.from((M == null || (L = M.portalNode) == null ? void 0 : L.querySelectorAll("[" + De("portal") + "]")) || []);
2544
2552
  if (y) {
2545
- const N = [y, ...K, S.current, v.current, B.current.includes("reference") || P ? b : null].filter((z) => z != null), F = l || P ? dn(N, V, !V) : dn(N);
2553
+ const N = [y, ...K, S.current, v.current, B.current.includes("reference") || A ? b : null].filter((z) => z != null), F = l || A ? gn(N, V, !V) : gn(N);
2546
2554
  return () => {
2547
2555
  F();
2548
2556
  };
2549
2557
  }
2550
- }, [r, b, y, l, B, M, P, V]), U(() => {
2558
+ }, [r, b, y, l, B, M, A, V]), q(() => {
2551
2559
  if (r || !te(T))
2552
2560
  return;
2553
2561
  const L = ne(T), K = he(L);
2554
2562
  queueMicrotask(() => {
2555
- const N = re(T), F = H.current, z = (typeof F == "number" ? N[F] : F.current) || T, j = ee(T, K);
2556
- !A && !j && h && Oe(z, {
2563
+ const N = re(T), F = H.current, z = (typeof F == "number" ? N[F] : F.current) || T, U = ee(T, K);
2564
+ !P && !U && h && Oe(z, {
2557
2565
  preventScroll: z === T
2558
2566
  });
2559
2567
  });
2560
- }, [r, h, T, A, re, H]), U(() => {
2568
+ }, [r, h, T, P, re, H]), q(() => {
2561
2569
  if (r || !T)
2562
2570
  return;
2563
2571
  let L = !1;
2564
2572
  const K = ne(T), N = he(K);
2565
- let z = E.current.openEvent;
2566
- const j = a.domReference.current;
2567
- Mt(N);
2573
+ let z = x.current.openEvent;
2574
+ const U = a.domReference.current;
2575
+ Pt(N);
2568
2576
  function Q(G) {
2569
2577
  let {
2570
2578
  open: ve,
@@ -2572,20 +2580,20 @@ function di(e) {
2572
2580
  event: ge,
2573
2581
  nested: _e
2574
2582
  } = G;
2575
- ve && (z = ge), xe === "escape-key" && a.domReference.current && Mt(a.domReference.current), xe === "hover" && ge.type === "mouseleave" && (w.current = !0), xe === "outside-press" && (_e ? (w.current = !1, L = !0) : w.current = !(Dn(ge) || Bt(ge)));
2583
+ ve && (z = ge), xe === "escape-key" && a.domReference.current && Pt(a.domReference.current), xe === "hover" && ge.type === "mouseleave" && (C.current = !0), xe === "outside-press" && (_e ? (C.current = !1, L = !0) : C.current = !(Nn(ge) || Kt(ge)));
2576
2584
  }
2577
- return R.on("openchange", Q), () => {
2578
- R.off("openchange", Q);
2579
- const G = he(K), ve = ee(y, G) || D && Ne(D.nodesRef.current, m).some(($) => {
2585
+ return w.on("openchange", Q), () => {
2586
+ w.off("openchange", Q);
2587
+ const G = he(K), ve = ee(y, G) || D && Ne(D.nodesRef.current, d).some(($) => {
2580
2588
  var X;
2581
2589
  return ee((X = $.context) == null ? void 0 : X.elements.floating, G);
2582
2590
  });
2583
- (ve || z && ["click", "mousedown"].includes(z.type)) && a.domReference.current && Mt(a.domReference.current);
2584
- const ge = j || N, _e = Je(ne(ge).body, ze());
2591
+ (ve || z && ["click", "mousedown"].includes(z.type)) && a.domReference.current && Pt(a.domReference.current);
2592
+ const ge = U || N, _e = Qe(ne(ge).body, je());
2585
2593
  queueMicrotask(() => {
2586
- let $ = hn();
2587
- !$ && te(ge) && y && ($ = Vo(_e, ge, y)), // eslint-disable-next-line react-hooks/exhaustive-deps
2588
- O.current && !w.current && te($) && // If the focus moved somewhere else after mount, avoid returning focus
2594
+ let $ = bn();
2595
+ !$ && te(ge) && y && ($ = Jo(_e, ge, y)), // eslint-disable-next-line react-hooks/exhaustive-deps
2596
+ O.current && !C.current && te($) && // If the focus moved somewhere else after mount, avoid returning focus
2589
2597
  // since it likely entered a different element which should be
2590
2598
  // respected: https://github.com/floating-ui/floating-ui/issues/2607
2591
2599
  (!($ !== G && G !== K.body) || ve) && $.focus({
@@ -2593,7 +2601,7 @@ function di(e) {
2593
2601
  });
2594
2602
  });
2595
2603
  };
2596
- }, [r, y, T, O, E, a, R, D, m]), U(() => {
2604
+ }, [r, y, T, O, x, a, w, D, d]), q(() => {
2597
2605
  if (!r && M)
2598
2606
  return M.setFocusManagerState({
2599
2607
  modal: l,
@@ -2604,12 +2612,12 @@ function di(e) {
2604
2612
  }), () => {
2605
2613
  M.setFocusManagerState(null);
2606
2614
  };
2607
- }, [r, M, l, h, p, a, f]), U(() => {
2608
- if (r || !T || typeof MutationObserver != "function" || A)
2615
+ }, [r, M, l, h, p, a, f]), q(() => {
2616
+ if (r || !T || typeof MutationObserver != "function" || P)
2609
2617
  return;
2610
2618
  const L = () => {
2611
- const N = T.getAttribute("tabindex"), F = q(), z = he(ne(y)), j = F.indexOf(z);
2612
- j !== -1 && (x.current = j), B.current.includes("floating") || z !== a.domReference.current && F.length === 0 ? N !== "0" && T.setAttribute("tabindex", "0") : N !== "-1" && T.setAttribute("tabindex", "-1");
2619
+ const N = T.getAttribute("tabindex"), F = j(), z = he(ne(y)), U = F.indexOf(z);
2620
+ U !== -1 && (R.current = U), B.current.includes("floating") || z !== a.domReference.current && F.length === 0 ? N !== "0" && T.setAttribute("tabindex", "0") : N !== "-1" && T.setAttribute("tabindex", "-1");
2613
2621
  };
2614
2622
  L();
2615
2623
  const K = new MutationObserver(L);
@@ -2620,15 +2628,15 @@ function di(e) {
2620
2628
  }), () => {
2621
2629
  K.disconnect();
2622
2630
  };
2623
- }, [r, y, T, a, B, q, A]);
2631
+ }, [r, y, T, a, B, j, P]);
2624
2632
  function ce(L) {
2625
- return r || !g || !l ? null : /* @__PURE__ */ d.createElement(Bo, {
2633
+ return r || !g || !l ? null : /* @__PURE__ */ m.createElement(ti, {
2626
2634
  ref: L === "start" ? S : v,
2627
2635
  onClick: (K) => p(!1, K.nativeEvent)
2628
2636
  }, typeof g == "string" ? g : "Dismiss");
2629
2637
  }
2630
- const le = !r && V && (l ? !P : !0) && (k || l);
2631
- return /* @__PURE__ */ d.createElement(d.Fragment, null, le && /* @__PURE__ */ d.createElement(wt, {
2638
+ const le = !r && V && (l ? !A : !0) && (k || l);
2639
+ return /* @__PURE__ */ m.createElement(m.Fragment, null, le && /* @__PURE__ */ m.createElement(Rt, {
2632
2640
  "data-type": "inside",
2633
2641
  ref: M == null ? void 0 : M.beforeInsideRef,
2634
2642
  onFocus: (L) => {
@@ -2636,23 +2644,23 @@ function di(e) {
2636
2644
  const N = re();
2637
2645
  Oe(o[0] === "reference" ? N[0] : N[N.length - 1]);
2638
2646
  } else if (M != null && M.preserveTabOrder && M.portalNode)
2639
- if (w.current = !1, Xe(L, M.portalNode)) {
2640
- const N = tr() || b;
2647
+ if (C.current = !1, Ze(L, M.portalNode)) {
2648
+ const N = or() || b;
2641
2649
  N == null || N.focus();
2642
2650
  } else {
2643
2651
  var K;
2644
2652
  (K = M.beforeOutsideRef.current) == null || K.focus();
2645
2653
  }
2646
2654
  }
2647
- }), !P && ce("start"), n, ce("end"), le && /* @__PURE__ */ d.createElement(wt, {
2655
+ }), !A && ce("start"), n, ce("end"), le && /* @__PURE__ */ m.createElement(Rt, {
2648
2656
  "data-type": "inside",
2649
2657
  ref: M == null ? void 0 : M.afterInsideRef,
2650
2658
  onFocus: (L) => {
2651
2659
  if (l)
2652
2660
  Oe(re()[0]);
2653
2661
  else if (M != null && M.preserveTabOrder && M.portalNode)
2654
- if (f && (w.current = !0), Xe(L, M.portalNode)) {
2655
- const N = nr() || b;
2662
+ if (f && (C.current = !0), Ze(L, M.portalNode)) {
2663
+ const N = ir() || b;
2656
2664
  N == null || N.focus();
2657
2665
  } else {
2658
2666
  var K;
@@ -2661,13 +2669,13 @@ function di(e) {
2661
2669
  }
2662
2670
  }));
2663
2671
  }
2664
- function vn(e) {
2672
+ function yn(e) {
2665
2673
  return te(e.target) && e.target.tagName === "BUTTON";
2666
2674
  }
2667
- function bn(e) {
2668
- return $t(e);
2675
+ function xn(e) {
2676
+ return Ht(e);
2669
2677
  }
2670
- function mi(e, t) {
2678
+ function Ni(e, t) {
2671
2679
  t === void 0 && (t = {});
2672
2680
  const {
2673
2681
  open: n,
@@ -2682,49 +2690,49 @@ function mi(e, t) {
2682
2690
  toggle: u = !0,
2683
2691
  ignoreMouse: l = !1,
2684
2692
  keyboardHandlers: g = !0
2685
- } = t, f = d.useRef(), h = d.useRef(!1), a = d.useMemo(() => ({
2686
- onPointerDown(m) {
2687
- f.current = m.pointerType;
2693
+ } = t, f = m.useRef(), h = m.useRef(!1), a = m.useMemo(() => ({
2694
+ onPointerDown(d) {
2695
+ f.current = d.pointerType;
2688
2696
  },
2689
- onMouseDown(m) {
2697
+ onMouseDown(d) {
2690
2698
  const p = f.current;
2691
- m.button === 0 && c !== "click" && (Ze(p, !0) && l || (n && u && (!o.current.openEvent || o.current.openEvent.type === "mousedown") ? r(!1, m.nativeEvent, "click") : (m.preventDefault(), r(!0, m.nativeEvent, "click"))));
2699
+ d.button === 0 && c !== "click" && (Je(p, !0) && l || (n && u && (!o.current.openEvent || o.current.openEvent.type === "mousedown") ? r(!1, d.nativeEvent, "click") : (d.preventDefault(), r(!0, d.nativeEvent, "click"))));
2692
2700
  },
2693
- onClick(m) {
2701
+ onClick(d) {
2694
2702
  const p = f.current;
2695
2703
  if (c === "mousedown" && f.current) {
2696
2704
  f.current = void 0;
2697
2705
  return;
2698
2706
  }
2699
- Ze(p, !0) && l || (n && u && (!o.current.openEvent || o.current.openEvent.type === "click") ? r(!1, m.nativeEvent, "click") : r(!0, m.nativeEvent, "click"));
2707
+ Je(p, !0) && l || (n && u && (!o.current.openEvent || o.current.openEvent.type === "click") ? r(!1, d.nativeEvent, "click") : r(!0, d.nativeEvent, "click"));
2700
2708
  },
2701
- onKeyDown(m) {
2702
- f.current = void 0, !(m.defaultPrevented || !g || vn(m)) && (m.key === " " && !bn(i) && (m.preventDefault(), h.current = !0), m.key === "Enter" && r(!(n && u), m.nativeEvent, "click"));
2709
+ onKeyDown(d) {
2710
+ f.current = void 0, !(d.defaultPrevented || !g || yn(d)) && (d.key === " " && !xn(i) && (d.preventDefault(), h.current = !0), d.key === "Enter" && r(!(n && u), d.nativeEvent, "click"));
2703
2711
  },
2704
- onKeyUp(m) {
2705
- m.defaultPrevented || !g || vn(m) || bn(i) || m.key === " " && h.current && (h.current = !1, r(!(n && u), m.nativeEvent, "click"));
2712
+ onKeyUp(d) {
2713
+ d.defaultPrevented || !g || yn(d) || xn(i) || d.key === " " && h.current && (h.current = !1, r(!(n && u), d.nativeEvent, "click"));
2706
2714
  }
2707
2715
  }), [o, i, c, l, g, r, n, u]);
2708
- return d.useMemo(() => s ? {
2716
+ return m.useMemo(() => s ? {
2709
2717
  reference: a
2710
2718
  } : {}, [s, a]);
2711
2719
  }
2712
- const Ko = {
2720
+ const ni = {
2713
2721
  pointerdown: "onPointerDown",
2714
2722
  mousedown: "onMouseDown",
2715
2723
  click: "onClick"
2716
- }, $o = {
2724
+ }, ri = {
2717
2725
  pointerdown: "onPointerDownCapture",
2718
2726
  mousedown: "onMouseDownCapture",
2719
2727
  click: "onClickCapture"
2720
- }, yn = (e) => {
2728
+ }, wn = (e) => {
2721
2729
  var t, n;
2722
2730
  return {
2723
2731
  escapeKey: typeof e == "boolean" ? e : (t = e == null ? void 0 : e.escapeKey) != null ? t : !1,
2724
2732
  outsidePress: typeof e == "boolean" ? e : (n = e == null ? void 0 : e.outsidePress) != null ? n : !0
2725
2733
  };
2726
2734
  };
2727
- function gi(e, t) {
2735
+ function Vi(e, t) {
2728
2736
  t === void 0 && (t = {});
2729
2737
  const {
2730
2738
  open: n,
@@ -2740,21 +2748,21 @@ function gi(e, t) {
2740
2748
  referencePressEvent: f = "pointerdown",
2741
2749
  ancestorScroll: h = !1,
2742
2750
  bubbles: a,
2743
- capture: m
2744
- } = t, p = Ye(), R = ie(typeof u == "function" ? u : () => !1), E = typeof u == "function" ? R : u, C = d.useRef(!1), b = d.useRef(!1), {
2751
+ capture: d
2752
+ } = t, p = Ge(), w = ie(typeof u == "function" ? u : () => !1), x = typeof u == "function" ? w : u, E = m.useRef(!1), b = m.useRef(!1), {
2745
2753
  escapeKey: y,
2746
- outsidePress: A
2747
- } = yn(a), {
2748
- escapeKey: P,
2754
+ outsidePress: P
2755
+ } = wn(a), {
2756
+ escapeKey: A,
2749
2757
  outsidePress: V
2750
- } = yn(m), B = ie((v) => {
2751
- var w;
2758
+ } = wn(d), B = ie((v) => {
2759
+ var C;
2752
2760
  if (!n || !s || !c || v.key !== "Escape")
2753
2761
  return;
2754
- const I = (w = i.current.floatingContext) == null ? void 0 : w.nodeId, x = p ? Ne(p.nodesRef.current, I) : [];
2755
- if (!y && (v.stopPropagation(), x.length > 0)) {
2762
+ const I = (C = i.current.floatingContext) == null ? void 0 : C.nodeId, R = p ? Ne(p.nodesRef.current, I) : [];
2763
+ if (!y && (v.stopPropagation(), R.length > 0)) {
2756
2764
  let k = !0;
2757
- if (x.forEach((_) => {
2765
+ if (R.forEach((_) => {
2758
2766
  var T;
2759
2767
  if ((T = _.context) != null && T.open && !_.context.dataRef.current.__escapeKeyBubbles) {
2760
2768
  k = !1;
@@ -2763,33 +2771,33 @@ function gi(e, t) {
2763
2771
  }), !k)
2764
2772
  return;
2765
2773
  }
2766
- r(!1, ar(v) ? v.nativeEvent : v, "escape-key");
2774
+ r(!1, Cr(v) ? v.nativeEvent : v, "escape-key");
2767
2775
  }), H = ie((v) => {
2768
- var w;
2776
+ var C;
2769
2777
  const I = () => {
2770
- var x;
2771
- B(v), (x = we(v)) == null || x.removeEventListener("keydown", I);
2778
+ var R;
2779
+ B(v), (R = we(v)) == null || R.removeEventListener("keydown", I);
2772
2780
  };
2773
- (w = we(v)) == null || w.addEventListener("keydown", I);
2781
+ (C = we(v)) == null || C.addEventListener("keydown", I);
2774
2782
  }), O = ie((v) => {
2775
- var w;
2776
- const I = C.current;
2777
- C.current = !1;
2778
- const x = b.current;
2779
- if (b.current = !1, l === "click" && x || I || typeof E == "function" && !E(v))
2783
+ var C;
2784
+ const I = E.current;
2785
+ E.current = !1;
2786
+ const R = b.current;
2787
+ if (b.current = !1, l === "click" && R || I || typeof x == "function" && !x(v))
2780
2788
  return;
2781
2789
  const k = we(v), _ = "[" + De("inert") + "]", T = ne(o.floating).querySelectorAll(_);
2782
- let q = Y(k) ? k : null;
2783
- for (; q && !Me(q); ) {
2784
- const L = Re(q);
2790
+ let j = Y(k) ? k : null;
2791
+ for (; j && !Me(j); ) {
2792
+ const L = Re(j);
2785
2793
  if (Me(L) || !Y(L))
2786
2794
  break;
2787
- q = L;
2795
+ j = L;
2788
2796
  }
2789
- if (T.length && Y(k) && !fr(k) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
2797
+ if (T.length && Y(k) && !Ir(k) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
2790
2798
  !ee(k, o.floating) && // If the target root element contains none of the markers, then the
2791
2799
  // element was injected after the floating element rendered.
2792
- Array.from(T).every((L) => !ee(q, L)))
2800
+ Array.from(T).every((L) => !ee(j, L)))
2793
2801
  return;
2794
2802
  if (te(k) && S) {
2795
2803
  const L = k.clientWidth > 0 && k.scrollWidth > k.clientWidth, K = k.clientHeight > 0 && k.scrollHeight > k.clientHeight;
@@ -2797,11 +2805,11 @@ function gi(e, t) {
2797
2805
  if (K && me(k).direction === "rtl" && (N = v.offsetX <= k.offsetWidth - k.clientWidth), N || L && v.offsetY > k.clientHeight)
2798
2806
  return;
2799
2807
  }
2800
- const re = (w = i.current.floatingContext) == null ? void 0 : w.nodeId, ce = p && Ne(p.nodesRef.current, re).some((L) => {
2808
+ const re = (C = i.current.floatingContext) == null ? void 0 : C.nodeId, ce = p && Ne(p.nodesRef.current, re).some((L) => {
2801
2809
  var K;
2802
- return It(v, (K = L.context) == null ? void 0 : K.elements.floating);
2810
+ return Tt(v, (K = L.context) == null ? void 0 : K.elements.floating);
2803
2811
  });
2804
- if (It(v, o.floating) || It(v, o.domReference) || ce)
2812
+ if (Tt(v, o.floating) || Tt(v, o.domReference) || ce)
2805
2813
  return;
2806
2814
  const le = p ? Ne(p.nodesRef.current, re) : [];
2807
2815
  if (le.length > 0) {
@@ -2817,44 +2825,44 @@ function gi(e, t) {
2817
2825
  }
2818
2826
  r(!1, v, "outside-press");
2819
2827
  }), D = ie((v) => {
2820
- var w;
2828
+ var C;
2821
2829
  const I = () => {
2822
- var x;
2823
- O(v), (x = we(v)) == null || x.removeEventListener(l, I);
2830
+ var R;
2831
+ O(v), (R = we(v)) == null || R.removeEventListener(l, I);
2824
2832
  };
2825
- (w = we(v)) == null || w.addEventListener(l, I);
2833
+ (C = we(v)) == null || C.addEventListener(l, I);
2826
2834
  });
2827
- d.useEffect(() => {
2835
+ m.useEffect(() => {
2828
2836
  if (!n || !s)
2829
2837
  return;
2830
- i.current.__escapeKeyBubbles = y, i.current.__outsidePressBubbles = A;
2831
- function v(x) {
2832
- r(!1, x, "ancestor-scroll");
2838
+ i.current.__escapeKeyBubbles = y, i.current.__outsidePressBubbles = P;
2839
+ function v(R) {
2840
+ r(!1, R, "ancestor-scroll");
2833
2841
  }
2834
- const w = ne(o.floating);
2835
- c && w.addEventListener("keydown", P ? H : B, P), E && w.addEventListener(l, V ? D : O, V);
2842
+ const C = ne(o.floating);
2843
+ c && C.addEventListener("keydown", A ? H : B, A), x && C.addEventListener(l, V ? D : O, V);
2836
2844
  let I = [];
2837
- return h && (Y(o.domReference) && (I = Se(o.domReference)), Y(o.floating) && (I = I.concat(Se(o.floating))), !Y(o.reference) && o.reference && o.reference.contextElement && (I = I.concat(Se(o.reference.contextElement)))), I = I.filter((x) => {
2845
+ return h && (Y(o.domReference) && (I = Se(o.domReference)), Y(o.floating) && (I = I.concat(Se(o.floating))), !Y(o.reference) && o.reference && o.reference.contextElement && (I = I.concat(Se(o.reference.contextElement)))), I = I.filter((R) => {
2838
2846
  var k;
2839
- return x !== ((k = w.defaultView) == null ? void 0 : k.visualViewport);
2840
- }), I.forEach((x) => {
2841
- x.addEventListener("scroll", v, {
2847
+ return R !== ((k = C.defaultView) == null ? void 0 : k.visualViewport);
2848
+ }), I.forEach((R) => {
2849
+ R.addEventListener("scroll", v, {
2842
2850
  passive: !0
2843
2851
  });
2844
2852
  }), () => {
2845
- c && w.removeEventListener("keydown", P ? H : B, P), E && w.removeEventListener(l, V ? D : O, V), I.forEach((x) => {
2846
- x.removeEventListener("scroll", v);
2853
+ c && C.removeEventListener("keydown", A ? H : B, A), x && C.removeEventListener(l, V ? D : O, V), I.forEach((R) => {
2854
+ R.removeEventListener("scroll", v);
2847
2855
  });
2848
2856
  };
2849
- }, [i, o, c, E, l, n, r, h, s, y, A, B, P, H, O, V, D]), d.useEffect(() => {
2850
- C.current = !1;
2851
- }, [E, l]);
2852
- const M = d.useMemo(() => ({
2857
+ }, [i, o, c, x, l, n, r, h, s, y, P, B, A, H, O, V, D]), m.useEffect(() => {
2858
+ E.current = !1;
2859
+ }, [x, l]);
2860
+ const M = m.useMemo(() => ({
2853
2861
  onKeyDown: B,
2854
- [Ko[f]]: (v) => {
2862
+ [ni[f]]: (v) => {
2855
2863
  g && r(!1, v.nativeEvent, "reference-press");
2856
2864
  }
2857
- }), [B, r, g, f]), S = d.useMemo(() => ({
2865
+ }), [B, r, g, f]), S = m.useMemo(() => ({
2858
2866
  onKeyDown: B,
2859
2867
  onMouseDown() {
2860
2868
  b.current = !0;
@@ -2862,40 +2870,40 @@ function gi(e, t) {
2862
2870
  onMouseUp() {
2863
2871
  b.current = !0;
2864
2872
  },
2865
- [$o[l]]: () => {
2866
- C.current = !0;
2873
+ [ri[l]]: () => {
2874
+ E.current = !0;
2867
2875
  }
2868
2876
  }), [B, l]);
2869
- return d.useMemo(() => s ? {
2877
+ return m.useMemo(() => s ? {
2870
2878
  reference: M,
2871
2879
  floating: S
2872
2880
  } : {}, [s, M, S]);
2873
2881
  }
2874
- function Ho(e) {
2882
+ function oi(e) {
2875
2883
  const {
2876
2884
  open: t = !1,
2877
2885
  onOpenChange: n,
2878
2886
  elements: r
2879
- } = e, o = rt(), i = d.useRef({}), [s] = d.useState(() => Gn()), c = je() != null;
2887
+ } = e, o = ot(), i = m.useRef({}), [s] = m.useState(() => Jn()), c = Ye() != null;
2880
2888
  if (process.env.NODE_ENV !== "production") {
2881
2889
  const a = r.reference;
2882
- a && !Y(a) && So("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
2890
+ a && !Y(a) && $o("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
2883
2891
  }
2884
- const [u, l] = d.useState(r.reference), g = ie((a, m, p) => {
2885
- i.current.openEvent = a ? m : void 0, s.emit("openchange", {
2892
+ const [u, l] = m.useState(r.reference), g = ie((a, d, p) => {
2893
+ i.current.openEvent = a ? d : void 0, s.emit("openchange", {
2886
2894
  open: a,
2887
- event: m,
2895
+ event: d,
2888
2896
  reason: p,
2889
2897
  nested: c
2890
- }), n == null || n(a, m, p);
2891
- }), f = d.useMemo(() => ({
2898
+ }), n == null || n(a, d, p);
2899
+ }), f = m.useMemo(() => ({
2892
2900
  setPositionReference: l
2893
- }), []), h = d.useMemo(() => ({
2901
+ }), []), h = m.useMemo(() => ({
2894
2902
  reference: u || r.reference || null,
2895
2903
  floating: r.floating || null,
2896
2904
  domReference: r.reference
2897
2905
  }), [u, r.reference, r.floating]);
2898
- return d.useMemo(() => ({
2906
+ return m.useMemo(() => ({
2899
2907
  dataRef: i,
2900
2908
  open: t,
2901
2909
  onOpenChange: g,
@@ -2905,22 +2913,22 @@ function Ho(e) {
2905
2913
  refs: f
2906
2914
  }), [t, g, h, s, o, f]);
2907
2915
  }
2908
- function pi(e) {
2916
+ function _i(e) {
2909
2917
  e === void 0 && (e = {});
2910
2918
  const {
2911
2919
  nodeId: t
2912
- } = e, n = Ho({
2920
+ } = e, n = oi({
2913
2921
  ...e,
2914
2922
  elements: {
2915
2923
  reference: null,
2916
2924
  floating: null,
2917
2925
  ...e.elements
2918
2926
  }
2919
- }), r = e.rootContext || n, o = r.elements, [i, s] = d.useState(null), [c, u] = d.useState(null), g = (o == null ? void 0 : o.reference) || i, f = d.useRef(null), h = Ye();
2920
- U(() => {
2927
+ }), r = e.rootContext || n, o = r.elements, [i, s] = m.useState(null), [c, u] = m.useState(null), g = (o == null ? void 0 : o.reference) || i, f = m.useRef(null), h = Ge();
2928
+ q(() => {
2921
2929
  g && (f.current = g);
2922
2930
  }, [g]);
2923
- const a = po({
2931
+ const a = Mo({
2924
2932
  ...e,
2925
2933
  elements: {
2926
2934
  ...o,
@@ -2928,44 +2936,44 @@ function pi(e) {
2928
2936
  reference: c
2929
2937
  }
2930
2938
  }
2931
- }), m = d.useCallback((b) => {
2939
+ }), d = m.useCallback((b) => {
2932
2940
  const y = Y(b) ? {
2933
2941
  getBoundingClientRect: () => b.getBoundingClientRect(),
2934
2942
  contextElement: b
2935
2943
  } : b;
2936
2944
  u(y), a.refs.setReference(y);
2937
- }, [a.refs]), p = d.useCallback((b) => {
2945
+ }, [a.refs]), p = m.useCallback((b) => {
2938
2946
  (Y(b) || b === null) && (f.current = b, s(b)), (Y(a.refs.reference.current) || a.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
2939
2947
  // `null` to support `positionReference` + an unstable `reference`
2940
2948
  // callback ref.
2941
2949
  b !== null && !Y(b)) && a.refs.setReference(b);
2942
- }, [a.refs]), R = d.useMemo(() => ({
2950
+ }, [a.refs]), w = m.useMemo(() => ({
2943
2951
  ...a.refs,
2944
2952
  setReference: p,
2945
- setPositionReference: m,
2953
+ setPositionReference: d,
2946
2954
  domReference: f
2947
- }), [a.refs, p, m]), E = d.useMemo(() => ({
2955
+ }), [a.refs, p, d]), x = m.useMemo(() => ({
2948
2956
  ...a.elements,
2949
2957
  domReference: g
2950
- }), [a.elements, g]), C = d.useMemo(() => ({
2958
+ }), [a.elements, g]), E = m.useMemo(() => ({
2951
2959
  ...a,
2952
2960
  ...r,
2953
- refs: R,
2954
- elements: E,
2961
+ refs: w,
2962
+ elements: x,
2955
2963
  nodeId: t
2956
- }), [a, R, E, t, r]);
2957
- return U(() => {
2958
- r.dataRef.current.floatingContext = C;
2964
+ }), [a, w, x, t, r]);
2965
+ return q(() => {
2966
+ r.dataRef.current.floatingContext = E;
2959
2967
  const b = h == null ? void 0 : h.nodesRef.current.find((y) => y.id === t);
2960
- b && (b.context = C);
2961
- }), d.useMemo(() => ({
2968
+ b && (b.context = E);
2969
+ }), m.useMemo(() => ({
2962
2970
  ...a,
2963
- context: C,
2964
- refs: R,
2965
- elements: E
2966
- }), [a, R, E, C]);
2971
+ context: E,
2972
+ refs: w,
2973
+ elements: x
2974
+ }), [a, w, x, E]);
2967
2975
  }
2968
- function hi(e, t) {
2976
+ function Wi(e, t) {
2969
2977
  t === void 0 && (t = {});
2970
2978
  const {
2971
2979
  open: n,
@@ -2976,38 +2984,38 @@ function hi(e, t) {
2976
2984
  } = e, {
2977
2985
  enabled: c = !0,
2978
2986
  visibleOnly: u = !0
2979
- } = t, l = d.useRef(!1), g = d.useRef(), f = d.useRef(!0);
2980
- d.useEffect(() => {
2987
+ } = t, l = m.useRef(!1), g = m.useRef(), f = m.useRef(!0);
2988
+ m.useEffect(() => {
2981
2989
  if (!c)
2982
2990
  return;
2983
2991
  const a = ae(s.domReference);
2984
- function m() {
2992
+ function d() {
2985
2993
  !n && te(s.domReference) && s.domReference === he(ne(s.domReference)) && (l.current = !0);
2986
2994
  }
2987
2995
  function p() {
2988
2996
  f.current = !0;
2989
2997
  }
2990
- return a.addEventListener("blur", m), a.addEventListener("keydown", p, !0), () => {
2991
- a.removeEventListener("blur", m), a.removeEventListener("keydown", p, !0);
2998
+ return a.addEventListener("blur", d), a.addEventListener("keydown", p, !0), () => {
2999
+ a.removeEventListener("blur", d), a.removeEventListener("keydown", p, !0);
2992
3000
  };
2993
- }, [s.domReference, n, c]), d.useEffect(() => {
3001
+ }, [s.domReference, n, c]), m.useEffect(() => {
2994
3002
  if (!c)
2995
3003
  return;
2996
- function a(m) {
3004
+ function a(d) {
2997
3005
  let {
2998
3006
  reason: p
2999
- } = m;
3007
+ } = d;
3000
3008
  (p === "reference-press" || p === "escape-key") && (l.current = !0);
3001
3009
  }
3002
3010
  return o.on("openchange", a), () => {
3003
3011
  o.off("openchange", a);
3004
3012
  };
3005
- }, [o, c]), d.useEffect(() => () => {
3013
+ }, [o, c]), m.useEffect(() => () => {
3006
3014
  clearTimeout(g.current);
3007
3015
  }, []);
3008
- const h = d.useMemo(() => ({
3016
+ const h = m.useMemo(() => ({
3009
3017
  onPointerDown(a) {
3010
- Bt(a.nativeEvent) || (f.current = !1);
3018
+ Kt(a.nativeEvent) || (f.current = !1);
3011
3019
  },
3012
3020
  onMouseLeave() {
3013
3021
  l.current = !1;
@@ -3015,41 +3023,41 @@ function hi(e, t) {
3015
3023
  onFocus(a) {
3016
3024
  if (l.current)
3017
3025
  return;
3018
- const m = we(a.nativeEvent);
3019
- if (u && Y(m))
3026
+ const d = we(a.nativeEvent);
3027
+ if (u && Y(d))
3020
3028
  try {
3021
- if (Kt() && Ln())
3029
+ if ($t() && Vn())
3022
3030
  throw Error();
3023
- if (!m.matches(":focus-visible"))
3031
+ if (!d.matches(":focus-visible"))
3024
3032
  return;
3025
3033
  } catch {
3026
- if (!f.current && !$t(m))
3034
+ if (!f.current && !Ht(d))
3027
3035
  return;
3028
3036
  }
3029
3037
  r(!0, a.nativeEvent, "focus");
3030
3038
  },
3031
3039
  onBlur(a) {
3032
3040
  l.current = !1;
3033
- const m = a.relatedTarget, p = a.nativeEvent, R = Y(m) && m.hasAttribute(De("focus-guard")) && m.getAttribute("data-type") === "outside";
3041
+ const d = a.relatedTarget, p = a.nativeEvent, w = Y(d) && d.hasAttribute(De("focus-guard")) && d.getAttribute("data-type") === "outside";
3034
3042
  g.current = window.setTimeout(() => {
3035
- var E;
3036
- const C = he(s.domReference ? s.domReference.ownerDocument : document);
3037
- !m && C === s.domReference || ee((E = i.current.floatingContext) == null ? void 0 : E.refs.floating.current, C) || ee(s.domReference, C) || R || r(!1, p, "focus");
3043
+ var x;
3044
+ const E = he(s.domReference ? s.domReference.ownerDocument : document);
3045
+ !d && E === s.domReference || ee((x = i.current.floatingContext) == null ? void 0 : x.refs.floating.current, E) || ee(s.domReference, E) || w || r(!1, p, "focus");
3038
3046
  });
3039
3047
  }
3040
3048
  }), [i, s.domReference, r, u]);
3041
- return d.useMemo(() => c ? {
3049
+ return m.useMemo(() => c ? {
3042
3050
  reference: h
3043
3051
  } : {}, [c, h]);
3044
3052
  }
3045
- const xn = "active", wn = "selected";
3053
+ const Rn = "active", En = "selected";
3046
3054
  function At(e, t, n) {
3047
3055
  const r = /* @__PURE__ */ new Map(), o = n === "item";
3048
3056
  let i = e;
3049
3057
  if (o && e) {
3050
3058
  const {
3051
- [xn]: s,
3052
- [wn]: c,
3059
+ [Rn]: s,
3060
+ [En]: c,
3053
3061
  ...u
3054
3062
  } = e;
3055
3063
  i = u;
@@ -3064,14 +3072,14 @@ function At(e, t, n) {
3064
3072
  return typeof c == "function" ? e ? c(e) : null : c;
3065
3073
  }).concat(e).reduce((s, c) => (c && Object.entries(c).forEach((u) => {
3066
3074
  let [l, g] = u;
3067
- if (!(o && [xn, wn].includes(l)))
3075
+ if (!(o && [Rn, En].includes(l)))
3068
3076
  if (l.indexOf("on") === 0) {
3069
3077
  if (r.has(l) || r.set(l, []), typeof g == "function") {
3070
3078
  var f;
3071
3079
  (f = r.get(l)) == null || f.push(g), s[l] = function() {
3072
- for (var h, a = arguments.length, m = new Array(a), p = 0; p < a; p++)
3073
- m[p] = arguments[p];
3074
- return (h = r.get(l)) == null ? void 0 : h.map((R) => R(...m)).find((R) => R !== void 0);
3080
+ for (var h, a = arguments.length, d = new Array(a), p = 0; p < a; p++)
3081
+ d[p] = arguments[p];
3082
+ return (h = r.get(l)) == null ? void 0 : h.map((w) => w(...d)).find((w) => w !== void 0);
3075
3083
  };
3076
3084
  }
3077
3085
  } else
@@ -3079,29 +3087,29 @@ function At(e, t, n) {
3079
3087
  }), s), {})
3080
3088
  };
3081
3089
  }
3082
- function vi(e) {
3090
+ function Bi(e) {
3083
3091
  e === void 0 && (e = []);
3084
- const t = e.map((c) => c == null ? void 0 : c.reference), n = e.map((c) => c == null ? void 0 : c.floating), r = e.map((c) => c == null ? void 0 : c.item), o = d.useCallback(
3092
+ const t = e.map((c) => c == null ? void 0 : c.reference), n = e.map((c) => c == null ? void 0 : c.floating), r = e.map((c) => c == null ? void 0 : c.item), o = m.useCallback(
3085
3093
  (c) => At(c, e, "reference"),
3086
3094
  // eslint-disable-next-line react-hooks/exhaustive-deps
3087
3095
  t
3088
- ), i = d.useCallback(
3096
+ ), i = m.useCallback(
3089
3097
  (c) => At(c, e, "floating"),
3090
3098
  // eslint-disable-next-line react-hooks/exhaustive-deps
3091
3099
  n
3092
- ), s = d.useCallback(
3100
+ ), s = m.useCallback(
3093
3101
  (c) => At(c, e, "item"),
3094
3102
  // eslint-disable-next-line react-hooks/exhaustive-deps
3095
3103
  r
3096
3104
  );
3097
- return d.useMemo(() => ({
3105
+ return m.useMemo(() => ({
3098
3106
  getReferenceProps: o,
3099
3107
  getFloatingProps: i,
3100
3108
  getItemProps: s
3101
3109
  }), [o, i, s]);
3102
3110
  }
3103
- let Rn = !1;
3104
- function Ct(e, t, n) {
3111
+ let Cn = !1;
3112
+ function It(e, t, n) {
3105
3113
  switch (e) {
3106
3114
  case "vertical":
3107
3115
  return t;
@@ -3111,19 +3119,19 @@ function Ct(e, t, n) {
3111
3119
  return t || n;
3112
3120
  }
3113
3121
  }
3114
- function En(e, t) {
3115
- return Ct(t, e === Yt || e === nt, e === He || e === Ue);
3122
+ function In(e, t) {
3123
+ return It(t, e === Gt || e === rt, e === ze || e === Ue);
3116
3124
  }
3117
- function Pt(e, t, n) {
3118
- return Ct(t, e === nt, n ? e === He : e === Ue) || e === "Enter" || e === " " || e === "";
3125
+ function kt(e, t, n) {
3126
+ return It(t, e === rt, n ? e === ze : e === Ue) || e === "Enter" || e === " " || e === "";
3119
3127
  }
3120
- function zo(e, t, n) {
3121
- return Ct(t, n ? e === He : e === Ue, e === nt);
3128
+ function ii(e, t, n) {
3129
+ return It(t, n ? e === ze : e === Ue, e === rt);
3122
3130
  }
3123
- function Cn(e, t, n) {
3124
- return Ct(t, n ? e === Ue : e === He, e === Yt);
3131
+ function Tn(e, t, n) {
3132
+ return It(t, n ? e === Ue : e === ze, e === Gt);
3125
3133
  }
3126
- function bi(e, t) {
3134
+ function Ki(e, t) {
3127
3135
  const {
3128
3136
  open: n,
3129
3137
  onOpenChange: r,
@@ -3139,23 +3147,23 @@ function bi(e, t) {
3139
3147
  loop: f = !1,
3140
3148
  nested: h = !1,
3141
3149
  rtl: a = !1,
3142
- virtual: m = !1,
3150
+ virtual: d = !1,
3143
3151
  focusItemOnOpen: p = "auto",
3144
- focusItemOnHover: R = !0,
3145
- openOnArrowKeyDown: E = !0,
3146
- disabledIndices: C = void 0,
3152
+ focusItemOnHover: w = !0,
3153
+ openOnArrowKeyDown: x = !0,
3154
+ disabledIndices: E = void 0,
3147
3155
  orientation: b = "vertical",
3148
3156
  cols: y = 1,
3149
- scrollItemIntoView: A = !0,
3150
- virtualItemRef: P,
3157
+ scrollItemIntoView: P = !0,
3158
+ virtualItemRef: A,
3151
3159
  itemSizes: V,
3152
3160
  dense: B = !1
3153
3161
  } = t;
3154
- process.env.NODE_ENV !== "production" && (g && (f || dt("`useListNavigation` looping must be enabled to allow escaping."), m || dt("`useListNavigation` must be virtual to allow escaping.")), b === "vertical" && y > 1 && dt("In grid list navigation mode (`cols` > 1), the `orientation` should", 'be either "horizontal" or "both".'));
3155
- const H = je(), O = Ye(), D = ie(c), M = d.useRef(p), S = d.useRef(l ?? -1), v = d.useRef(null), w = d.useRef(!0), I = d.useRef(D), x = d.useRef(!!o.floating), k = d.useRef(n), _ = d.useRef(!1), T = d.useRef(!1), q = de(C), re = de(n), ce = de(A), le = de(o.floating), L = de(l), [K, N] = d.useState(), [F, z] = d.useState(), j = ie(function($, X, W) {
3162
+ process.env.NODE_ENV !== "production" && (g && (f || mt("`useListNavigation` looping must be enabled to allow escaping."), d || mt("`useListNavigation` must be virtual to allow escaping.")), b === "vertical" && y > 1 && mt("In grid list navigation mode (`cols` > 1), the `orientation` should", 'be either "horizontal" or "both".'));
3163
+ const H = Ye(), O = Ge(), D = ie(c), M = m.useRef(p), S = m.useRef(l ?? -1), v = m.useRef(null), C = m.useRef(!0), I = m.useRef(D), R = m.useRef(!!o.floating), k = m.useRef(n), _ = m.useRef(!1), T = m.useRef(!1), j = de(E), re = de(n), ce = de(P), le = de(o.floating), L = de(l), [K, N] = m.useState(), [F, z] = m.useState(), U = ie(function($, X, W) {
3156
3164
  W === void 0 && (W = !1);
3157
3165
  function Z(J) {
3158
- m ? (N(J.id), O == null || O.events.emit("virtualfocus", J), P && (P.current = J)) : Oe(J, {
3166
+ d ? (N(J.id), O == null || O.events.emit("virtualfocus", J), A && (A.current = J)) : Oe(J, {
3159
3167
  preventScroll: !0,
3160
3168
  // Mac Safari does not move the virtual cursor unless the focus call
3161
3169
  // is sync. However, for the very first focus call, we need to wait
@@ -3165,7 +3173,7 @@ function bi(e, t) {
3165
3173
  // subsequent calls. `preventScroll` is supported in modern Safari,
3166
3174
  // so we can use that instead.
3167
3175
  // iOS Safari must be async or the first item will not be focused.
3168
- sync: Ln() && Kt() ? Rn || _.current : !1
3176
+ sync: Vn() && $t() ? Cn || _.current : !1
3169
3177
  });
3170
3178
  }
3171
3179
  const ue = $.current[X.current];
@@ -3175,59 +3183,59 @@ function bi(e, t) {
3175
3183
  return;
3176
3184
  ue || Z(J);
3177
3185
  const be = ce.current;
3178
- be && G && (W || !w.current) && (J.scrollIntoView == null || J.scrollIntoView(typeof be == "boolean" ? {
3186
+ be && G && (W || !C.current) && (J.scrollIntoView == null || J.scrollIntoView(typeof be == "boolean" ? {
3179
3187
  block: "nearest",
3180
3188
  inline: "nearest"
3181
3189
  } : be));
3182
3190
  });
3183
3191
  });
3184
- U(() => {
3192
+ q(() => {
3185
3193
  document.createElement("div").focus({
3186
3194
  get preventScroll() {
3187
- return Rn = !0, !1;
3195
+ return Cn = !0, !1;
3188
3196
  }
3189
3197
  });
3190
- }, []), U(() => {
3191
- u && (n && o.floating ? M.current && l != null && (T.current = !0, S.current = l, D(l)) : x.current && (S.current = -1, I.current(null)));
3192
- }, [u, n, o.floating, l, D]), U(() => {
3198
+ }, []), q(() => {
3199
+ u && (n && o.floating ? M.current && l != null && (T.current = !0, S.current = l, D(l)) : R.current && (S.current = -1, I.current(null)));
3200
+ }, [u, n, o.floating, l, D]), q(() => {
3193
3201
  if (u && n && o.floating)
3194
3202
  if (s == null) {
3195
3203
  if (_.current = !1, L.current != null)
3196
3204
  return;
3197
- if (x.current && (S.current = -1, j(i, S)), (!k.current || !x.current) && M.current && (v.current != null || M.current === !0 && v.current == null)) {
3205
+ if (R.current && (S.current = -1, U(i, S)), (!k.current || !R.current) && M.current && (v.current != null || M.current === !0 && v.current == null)) {
3198
3206
  let $ = 0;
3199
3207
  const X = () => {
3200
- i.current[0] == null ? ($ < 2 && ($ ? requestAnimationFrame : queueMicrotask)(X), $++) : (S.current = v.current == null || Pt(v.current, b, a) || h ? Ot(i, q.current) : cn(i, q.current), v.current = null, D(S.current));
3208
+ i.current[0] == null ? ($ < 2 && ($ ? requestAnimationFrame : queueMicrotask)(X), $++) : (S.current = v.current == null || kt(v.current, b, a) || h ? St(i, j.current) : un(i, j.current), v.current = null, D(S.current));
3201
3209
  };
3202
3210
  X();
3203
3211
  }
3204
3212
  } else
3205
- Ge(i, s) || (S.current = s, j(i, S, T.current), T.current = !1);
3206
- }, [u, n, o.floating, s, L, h, i, b, a, D, j, q]), U(() => {
3213
+ Xe(i, s) || (S.current = s, U(i, S, T.current), T.current = !1);
3214
+ }, [u, n, o.floating, s, L, h, i, b, a, D, U, j]), q(() => {
3207
3215
  var $;
3208
- if (!u || o.floating || !O || m || !x.current)
3216
+ if (!u || o.floating || !O || d || !R.current)
3209
3217
  return;
3210
3218
  const X = O.nodesRef.current, W = ($ = X.find((J) => J.id === H)) == null || ($ = $.context) == null ? void 0 : $.elements.floating, Z = he(ne(o.floating)), ue = X.some((J) => J.context && ee(J.context.elements.floating, Z));
3211
- W && !ue && w.current && W.focus({
3219
+ W && !ue && C.current && W.focus({
3212
3220
  preventScroll: !0
3213
3221
  });
3214
- }, [u, o.floating, O, H, m]), U(() => {
3215
- if (!u || !O || !m || H)
3222
+ }, [u, o.floating, O, H, d]), q(() => {
3223
+ if (!u || !O || !d || H)
3216
3224
  return;
3217
3225
  function $(X) {
3218
- z(X.id), P && (P.current = X);
3226
+ z(X.id), A && (A.current = X);
3219
3227
  }
3220
3228
  return O.events.on("virtualfocus", $), () => {
3221
3229
  O.events.off("virtualfocus", $);
3222
3230
  };
3223
- }, [u, O, m, H, P]), U(() => {
3224
- I.current = D, x.current = !!o.floating;
3225
- }), U(() => {
3231
+ }, [u, O, d, H, A]), q(() => {
3232
+ I.current = D, R.current = !!o.floating;
3233
+ }), q(() => {
3226
3234
  n || (v.current = null);
3227
- }, [n]), U(() => {
3235
+ }, [n]), q(() => {
3228
3236
  k.current = n;
3229
3237
  }, [n]);
3230
- const Q = s != null, G = d.useMemo(() => {
3238
+ const Q = s != null, G = m.useMemo(() => {
3231
3239
  function $(W) {
3232
3240
  if (!n)
3233
3241
  return;
@@ -3250,7 +3258,7 @@ function bi(e, t) {
3250
3258
  });
3251
3259
  },
3252
3260
  // Safari
3253
- ...R && {
3261
+ ...w && {
3254
3262
  onMouseMove(W) {
3255
3263
  let {
3256
3264
  currentTarget: Z
@@ -3261,28 +3269,28 @@ function bi(e, t) {
3261
3269
  let {
3262
3270
  pointerType: Z
3263
3271
  } = W;
3264
- !w.current || Z === "touch" || (S.current = -1, j(i, S), D(null), m || Oe(le.current, {
3272
+ !C.current || Z === "touch" || (S.current = -1, U(i, S), D(null), d || Oe(le.current, {
3265
3273
  preventScroll: !0
3266
3274
  }));
3267
3275
  }
3268
3276
  }
3269
3277
  };
3270
- }, [n, le, j, R, i, D, m]), ve = ie(($) => {
3271
- if (w.current = !1, _.current = !0, !re.current && $.currentTarget === le.current)
3278
+ }, [n, le, U, w, i, D, d]), ve = ie(($) => {
3279
+ if (C.current = !1, _.current = !0, !re.current && $.currentTarget === le.current)
3272
3280
  return;
3273
- if (h && Cn($.key, b, a)) {
3274
- oe($), r(!1, $.nativeEvent, "list-navigation"), te(o.domReference) && !m && o.domReference.focus();
3281
+ if (h && Tn($.key, b, a)) {
3282
+ oe($), r(!1, $.nativeEvent, "list-navigation"), te(o.domReference) && !d && o.domReference.focus();
3275
3283
  return;
3276
3284
  }
3277
- const X = S.current, W = Ot(i, C), Z = cn(i, C);
3285
+ const X = S.current, W = St(i, E), Z = un(i, E);
3278
3286
  if ($.key === "Home" && (oe($), S.current = W, D(S.current)), $.key === "End" && (oe($), S.current = Z, D(S.current)), y > 1) {
3279
3287
  const ue = V || Array.from({
3280
3288
  length: i.current.length
3281
3289
  }, () => ({
3282
3290
  width: 1,
3283
3291
  height: 1
3284
- })), J = xo(ue, y, B), be = J.findIndex((pe) => pe != null && !ft(i.current, pe, C)), ot = J.reduce((pe, Ie, it) => Ie != null && !ft(i.current, Ie, C) ? it : pe, -1);
3285
- if (S.current = J[yo({
3292
+ })), J = Lo(ue, y, B), be = J.findIndex((pe) => pe != null && !dt(i.current, pe, E)), it = J.reduce((pe, Ie, st) => Ie != null && !dt(i.current, Ie, E) ? st : pe, -1);
3293
+ if (S.current = J[Do({
3286
3294
  current: J.map((pe) => pe != null ? i.current[pe] : null)
3287
3295
  }, {
3288
3296
  event: $,
@@ -3291,10 +3299,10 @@ function bi(e, t) {
3291
3299
  cols: y,
3292
3300
  // treat undefined (empty grid spaces) as disabled indices so we
3293
3301
  // don't end up in them
3294
- disabledIndices: Ro([...C || i.current.map((pe, Ie) => ft(i.current, Ie) ? Ie : void 0), void 0], J),
3302
+ disabledIndices: No([...E || i.current.map((pe, Ie) => dt(i.current, Ie) ? Ie : void 0), void 0], J),
3295
3303
  minIndex: be,
3296
- maxIndex: ot,
3297
- prevIndex: wo(
3304
+ maxIndex: it,
3305
+ prevIndex: Fo(
3298
3306
  S.current > Z ? W : S.current,
3299
3307
  ue,
3300
3308
  J,
@@ -3302,98 +3310,98 @@ function bi(e, t) {
3302
3310
  // use a corner matching the edge closest to the direction
3303
3311
  // we're moving in so we don't end up in the same item. Prefer
3304
3312
  // top/left over bottom/right.
3305
- $.key === nt ? "bl" : $.key === Ue ? "tr" : "tl"
3313
+ $.key === rt ? "bl" : $.key === Ue ? "tr" : "tl"
3306
3314
  ),
3307
3315
  stopEvent: !0
3308
3316
  })], D(S.current), b === "both")
3309
3317
  return;
3310
3318
  }
3311
- if (En($.key, b)) {
3312
- if (oe($), n && !m && he($.currentTarget.ownerDocument) === $.currentTarget) {
3313
- S.current = Pt($.key, b, a) ? W : Z, D(S.current);
3319
+ if (In($.key, b)) {
3320
+ if (oe($), n && !d && he($.currentTarget.ownerDocument) === $.currentTarget) {
3321
+ S.current = kt($.key, b, a) ? W : Z, D(S.current);
3314
3322
  return;
3315
3323
  }
3316
- Pt($.key, b, a) ? f ? S.current = X >= Z ? g && X !== i.current.length ? -1 : W : se(i, {
3324
+ kt($.key, b, a) ? f ? S.current = X >= Z ? g && X !== i.current.length ? -1 : W : se(i, {
3317
3325
  startingIndex: X,
3318
- disabledIndices: C
3326
+ disabledIndices: E
3319
3327
  }) : S.current = Math.min(Z, se(i, {
3320
3328
  startingIndex: X,
3321
- disabledIndices: C
3329
+ disabledIndices: E
3322
3330
  })) : f ? S.current = X <= W ? g && X !== -1 ? i.current.length : Z : se(i, {
3323
3331
  startingIndex: X,
3324
3332
  decrement: !0,
3325
- disabledIndices: C
3333
+ disabledIndices: E
3326
3334
  }) : S.current = Math.max(W, se(i, {
3327
3335
  startingIndex: X,
3328
3336
  decrement: !0,
3329
- disabledIndices: C
3330
- })), Ge(i, S.current) ? D(null) : D(S.current);
3337
+ disabledIndices: E
3338
+ })), Xe(i, S.current) ? D(null) : D(S.current);
3331
3339
  }
3332
- }), xe = d.useMemo(() => m && n && Q && {
3340
+ }), xe = m.useMemo(() => d && n && Q && {
3333
3341
  "aria-activedescendant": F || K
3334
- }, [m, n, Q, F, K]), ge = d.useMemo(() => ({
3342
+ }, [d, n, Q, F, K]), ge = m.useMemo(() => ({
3335
3343
  "aria-orientation": b === "both" ? void 0 : b,
3336
- ...!Fn(o.domReference) && xe,
3344
+ ...!_n(o.domReference) && xe,
3337
3345
  onKeyDown: ve,
3338
3346
  onPointerMove() {
3339
- w.current = !0;
3347
+ C.current = !0;
3340
3348
  }
3341
- }), [xe, ve, o.domReference, b]), _e = d.useMemo(() => {
3349
+ }), [xe, ve, o.domReference, b]), _e = m.useMemo(() => {
3342
3350
  function $(W) {
3343
- p === "auto" && Dn(W.nativeEvent) && (M.current = !0);
3351
+ p === "auto" && Nn(W.nativeEvent) && (M.current = !0);
3344
3352
  }
3345
3353
  function X(W) {
3346
- M.current = p, p === "auto" && Bt(W.nativeEvent) && (M.current = !0);
3354
+ M.current = p, p === "auto" && Kt(W.nativeEvent) && (M.current = !0);
3347
3355
  }
3348
3356
  return {
3349
3357
  ...xe,
3350
3358
  onKeyDown(W) {
3351
- w.current = !1;
3352
- const Z = W.key.indexOf("Arrow") === 0, ue = zo(W.key, b, a), J = Cn(W.key, b, a), be = En(W.key, b), ot = (h ? ue : be) || W.key === "Enter" || W.key.trim() === "";
3353
- if (m && n) {
3354
- const Xt = O == null ? void 0 : O.nodesRef.current.find((st) => st.parentId == null), Te = O && Xt ? Po(O.nodesRef.current, Xt.id) : null;
3355
- if (Z && Te && P) {
3356
- const st = new KeyboardEvent("keydown", {
3359
+ C.current = !1;
3360
+ const Z = W.key.indexOf("Arrow") === 0, ue = ii(W.key, b, a), J = Tn(W.key, b, a), be = In(W.key, b), it = (h ? ue : be) || W.key === "Enter" || W.key.trim() === "";
3361
+ if (d && n) {
3362
+ const Zt = O == null ? void 0 : O.nodesRef.current.find((ct) => ct.parentId == null), Te = O && Zt ? qo(O.nodesRef.current, Zt.id) : null;
3363
+ if (Z && Te && A) {
3364
+ const ct = new KeyboardEvent("keydown", {
3357
3365
  key: W.key,
3358
3366
  bubbles: !0
3359
3367
  });
3360
3368
  if (ue || J) {
3361
3369
  var pe, Ie;
3362
- const ir = ((pe = Te.context) == null ? void 0 : pe.elements.domReference) === W.currentTarget, Zt = J && !ir ? (Ie = Te.context) == null ? void 0 : Ie.elements.domReference : ue ? i.current.find((Jt) => (Jt == null ? void 0 : Jt.id) === K) : null;
3363
- Zt && (oe(W), Zt.dispatchEvent(st), z(void 0));
3370
+ const ur = ((pe = Te.context) == null ? void 0 : pe.elements.domReference) === W.currentTarget, Jt = J && !ur ? (Ie = Te.context) == null ? void 0 : Ie.elements.domReference : ue ? i.current.find((Qt) => (Qt == null ? void 0 : Qt.id) === K) : null;
3371
+ Jt && (oe(W), Jt.dispatchEvent(ct), z(void 0));
3364
3372
  }
3365
3373
  if (be && Te.context && Te.context.open && Te.parentId && W.currentTarget !== Te.context.elements.domReference) {
3366
- var it;
3367
- oe(W), (it = Te.context.elements.domReference) == null || it.dispatchEvent(st);
3374
+ var st;
3375
+ oe(W), (st = Te.context.elements.domReference) == null || st.dispatchEvent(ct);
3368
3376
  return;
3369
3377
  }
3370
3378
  }
3371
3379
  return ve(W);
3372
3380
  }
3373
- if (!(!n && !E && Z)) {
3374
- if (ot && (v.current = h && be ? null : W.key), h) {
3375
- ue && (oe(W), n ? (S.current = Ot(i, q.current), D(S.current)) : r(!0, W.nativeEvent, "list-navigation"));
3381
+ if (!(!n && !x && Z)) {
3382
+ if (it && (v.current = h && be ? null : W.key), h) {
3383
+ ue && (oe(W), n ? (S.current = St(i, j.current), D(S.current)) : r(!0, W.nativeEvent, "list-navigation"));
3376
3384
  return;
3377
3385
  }
3378
- be && (l != null && (S.current = l), oe(W), !n && E ? r(!0, W.nativeEvent, "list-navigation") : ve(W), n && D(S.current));
3386
+ be && (l != null && (S.current = l), oe(W), !n && x ? r(!0, W.nativeEvent, "list-navigation") : ve(W), n && D(S.current));
3379
3387
  }
3380
3388
  },
3381
3389
  onFocus() {
3382
- n && !m && D(null);
3390
+ n && !d && D(null);
3383
3391
  },
3384
3392
  onPointerDown: X,
3385
3393
  onMouseDown: $,
3386
3394
  onClick: $
3387
3395
  };
3388
- }, [K, xe, ve, q, p, i, h, D, r, n, E, b, a, l, O, m, P]);
3389
- return d.useMemo(() => u ? {
3396
+ }, [K, xe, ve, j, p, i, h, D, r, n, x, b, a, l, O, d, A]);
3397
+ return m.useMemo(() => u ? {
3390
3398
  reference: _e,
3391
3399
  floating: ge,
3392
3400
  item: G
3393
3401
  } : {}, [u, _e, ge, G]);
3394
3402
  }
3395
- const qo = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
3396
- function yi(e, t) {
3403
+ const si = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
3404
+ function $i(e, t) {
3397
3405
  var n;
3398
3406
  t === void 0 && (t = {});
3399
3407
  const {
@@ -3402,7 +3410,7 @@ function yi(e, t) {
3402
3410
  } = e, {
3403
3411
  enabled: i = !0,
3404
3412
  role: s = "dialog"
3405
- } = t, c = (n = qo.get(s)) != null ? n : s, u = rt(), g = je() != null, f = d.useMemo(() => c === "tooltip" || s === "label" ? {
3413
+ } = t, c = (n = si.get(s)) != null ? n : s, u = ot(), g = Ye() != null, f = m.useMemo(() => c === "tooltip" || s === "label" ? {
3406
3414
  ["aria-" + (s === "label" ? "labelledby" : "describedby")]: r ? o : void 0
3407
3415
  } : {
3408
3416
  "aria-expanded": r ? "true" : "false",
@@ -3423,25 +3431,25 @@ function yi(e, t) {
3423
3431
  ...s === "combobox" && {
3424
3432
  "aria-autocomplete": "list"
3425
3433
  }
3426
- }, [c, o, g, r, u, s]), h = d.useMemo(() => {
3427
- const m = {
3434
+ }, [c, o, g, r, u, s]), h = m.useMemo(() => {
3435
+ const d = {
3428
3436
  id: o,
3429
3437
  ...c && {
3430
3438
  role: c
3431
3439
  }
3432
3440
  };
3433
- return c === "tooltip" || s === "label" ? m : {
3434
- ...m,
3441
+ return c === "tooltip" || s === "label" ? d : {
3442
+ ...d,
3435
3443
  ...c === "menu" && {
3436
3444
  "aria-labelledby": u
3437
3445
  }
3438
3446
  };
3439
- }, [c, o, u, s]), a = d.useCallback((m) => {
3447
+ }, [c, o, u, s]), a = m.useCallback((d) => {
3440
3448
  let {
3441
3449
  active: p,
3442
- selected: R
3443
- } = m;
3444
- const E = {
3450
+ selected: w
3451
+ } = d;
3452
+ const x = {
3445
3453
  role: "option",
3446
3454
  ...p && {
3447
3455
  id: o + "-option"
@@ -3450,12 +3458,12 @@ function yi(e, t) {
3450
3458
  switch (s) {
3451
3459
  case "select":
3452
3460
  return {
3453
- ...E,
3454
- "aria-selected": p && R
3461
+ ...x,
3462
+ "aria-selected": p && w
3455
3463
  };
3456
3464
  case "combobox":
3457
3465
  return {
3458
- ...E,
3466
+ ...x,
3459
3467
  ...p && {
3460
3468
  "aria-selected": !0
3461
3469
  }
@@ -3463,13 +3471,13 @@ function yi(e, t) {
3463
3471
  }
3464
3472
  return {};
3465
3473
  }, [o, s]);
3466
- return d.useMemo(() => i ? {
3474
+ return m.useMemo(() => i ? {
3467
3475
  reference: f,
3468
3476
  floating: h,
3469
3477
  item: a
3470
3478
  } : {}, [i, f, h, a]);
3471
3479
  }
3472
- function xi(e, t) {
3480
+ function Hi(e, t) {
3473
3481
  var n;
3474
3482
  const {
3475
3483
  open: r,
@@ -3484,49 +3492,49 @@ function xi(e, t) {
3484
3492
  resetMs: f = 750,
3485
3493
  ignoreKeys: h = [],
3486
3494
  selectedIndex: a = null
3487
- } = t, m = d.useRef(), p = d.useRef(""), R = d.useRef((n = a ?? s) != null ? n : -1), E = d.useRef(null), C = ie(c), b = ie(u), y = de(g), A = de(h);
3488
- U(() => {
3489
- r && (clearTimeout(m.current), E.current = null, p.current = "");
3490
- }, [r]), U(() => {
3495
+ } = t, d = m.useRef(), p = m.useRef(""), w = m.useRef((n = a ?? s) != null ? n : -1), x = m.useRef(null), E = ie(c), b = ie(u), y = de(g), P = de(h);
3496
+ q(() => {
3497
+ r && (clearTimeout(d.current), x.current = null, p.current = "");
3498
+ }, [r]), q(() => {
3491
3499
  if (r && p.current === "") {
3492
3500
  var O;
3493
- R.current = (O = a ?? s) != null ? O : -1;
3501
+ w.current = (O = a ?? s) != null ? O : -1;
3494
3502
  }
3495
3503
  }, [r, a, s]);
3496
- const P = ie((O) => {
3504
+ const A = ie((O) => {
3497
3505
  O ? o.current.typing || (o.current.typing = O, b(O)) : o.current.typing && (o.current.typing = O, b(O));
3498
3506
  }), V = ie((O) => {
3499
- function D(I, x, k) {
3500
- const _ = y.current ? y.current(x, k) : x.find((T) => (T == null ? void 0 : T.toLocaleLowerCase().indexOf(k.toLocaleLowerCase())) === 0);
3507
+ function D(I, R, k) {
3508
+ const _ = y.current ? y.current(R, k) : R.find((T) => (T == null ? void 0 : T.toLocaleLowerCase().indexOf(k.toLocaleLowerCase())) === 0);
3501
3509
  return _ ? I.indexOf(_) : -1;
3502
3510
  }
3503
3511
  const M = i.current;
3504
- if (p.current.length > 0 && p.current[0] !== " " && (D(M, M, p.current) === -1 ? P(!1) : O.key === " " && oe(O)), M == null || A.current.includes(O.key) || // Character key.
3512
+ if (p.current.length > 0 && p.current[0] !== " " && (D(M, M, p.current) === -1 ? A(!1) : O.key === " " && oe(O)), M == null || P.current.includes(O.key) || // Character key.
3505
3513
  O.key.length !== 1 || // Modifier key.
3506
3514
  O.ctrlKey || O.metaKey || O.altKey)
3507
3515
  return;
3508
- r && O.key !== " " && (oe(O), P(!0)), M.every((I) => {
3509
- var x, k;
3510
- return I ? ((x = I[0]) == null ? void 0 : x.toLocaleLowerCase()) !== ((k = I[1]) == null ? void 0 : k.toLocaleLowerCase()) : !0;
3511
- }) && p.current === O.key && (p.current = "", R.current = E.current), p.current += O.key, clearTimeout(m.current), m.current = setTimeout(() => {
3512
- p.current = "", R.current = E.current, P(!1);
3516
+ r && O.key !== " " && (oe(O), A(!0)), M.every((I) => {
3517
+ var R, k;
3518
+ return I ? ((R = I[0]) == null ? void 0 : R.toLocaleLowerCase()) !== ((k = I[1]) == null ? void 0 : k.toLocaleLowerCase()) : !0;
3519
+ }) && p.current === O.key && (p.current = "", w.current = x.current), p.current += O.key, clearTimeout(d.current), d.current = setTimeout(() => {
3520
+ p.current = "", w.current = x.current, A(!1);
3513
3521
  }, f);
3514
- const v = R.current, w = D(M, [...M.slice((v || 0) + 1), ...M.slice(0, (v || 0) + 1)], p.current);
3515
- w !== -1 ? (C(w), E.current = w) : O.key !== " " && (p.current = "", P(!1));
3516
- }), B = d.useMemo(() => ({
3522
+ const v = w.current, C = D(M, [...M.slice((v || 0) + 1), ...M.slice(0, (v || 0) + 1)], p.current);
3523
+ C !== -1 ? (E(C), x.current = C) : O.key !== " " && (p.current = "", A(!1));
3524
+ }), B = m.useMemo(() => ({
3517
3525
  onKeyDown: V
3518
- }), [V]), H = d.useMemo(() => ({
3526
+ }), [V]), H = m.useMemo(() => ({
3519
3527
  onKeyDown: V,
3520
3528
  onKeyUp(O) {
3521
- O.key === " " && P(!1);
3529
+ O.key === " " && A(!1);
3522
3530
  }
3523
- }), [V, P]);
3524
- return d.useMemo(() => l ? {
3531
+ }), [V, A]);
3532
+ return m.useMemo(() => l ? {
3525
3533
  reference: B,
3526
3534
  floating: H
3527
3535
  } : {}, [l, B, H]);
3528
3536
  }
3529
- function In(e, t) {
3537
+ function On(e, t) {
3530
3538
  const [n, r] = e;
3531
3539
  let o = !1;
3532
3540
  const i = t.length;
@@ -3536,10 +3544,10 @@ function In(e, t) {
3536
3544
  }
3537
3545
  return o;
3538
3546
  }
3539
- function Uo(e, t) {
3547
+ function ci(e, t) {
3540
3548
  return e[0] >= t.x && e[0] <= t.x + t.width && e[1] >= t.y && e[1] <= t.y + t.height;
3541
3549
  }
3542
- function wi(e) {
3550
+ function zi(e) {
3543
3551
  e === void 0 && (e = {});
3544
3552
  const {
3545
3553
  buffer: t = 0.5,
@@ -3548,54 +3556,54 @@ function wi(e) {
3548
3556
  } = e;
3549
3557
  let o, i = !1, s = null, c = null, u = performance.now();
3550
3558
  function l(f, h) {
3551
- const a = performance.now(), m = a - u;
3552
- if (s === null || c === null || m === 0)
3559
+ const a = performance.now(), d = a - u;
3560
+ if (s === null || c === null || d === 0)
3553
3561
  return s = f, c = h, u = a, null;
3554
- const p = f - s, R = h - c, C = Math.sqrt(p * p + R * R) / m;
3555
- return s = f, c = h, u = a, C;
3562
+ const p = f - s, w = h - c, E = Math.sqrt(p * p + w * w) / d;
3563
+ return s = f, c = h, u = a, E;
3556
3564
  }
3557
3565
  const g = (f) => {
3558
3566
  let {
3559
3567
  x: h,
3560
3568
  y: a,
3561
- placement: m,
3569
+ placement: d,
3562
3570
  elements: p,
3563
- onClose: R,
3564
- nodeId: E,
3565
- tree: C
3571
+ onClose: w,
3572
+ nodeId: x,
3573
+ tree: E
3566
3574
  } = f;
3567
3575
  return function(y) {
3568
- function A() {
3569
- clearTimeout(o), R();
3576
+ function P() {
3577
+ clearTimeout(o), w();
3570
3578
  }
3571
- if (clearTimeout(o), !p.domReference || !p.floating || m == null || h == null || a == null)
3579
+ if (clearTimeout(o), !p.domReference || !p.floating || d == null || h == null || a == null)
3572
3580
  return;
3573
3581
  const {
3574
- clientX: P,
3582
+ clientX: A,
3575
3583
  clientY: V
3576
- } = y, B = [P, V], H = we(y), O = y.type === "mouseleave", D = ee(p.floating, H), M = ee(p.domReference, H), S = p.domReference.getBoundingClientRect(), v = p.floating.getBoundingClientRect(), w = m.split("-")[0], I = h > v.right - v.width / 2, x = a > v.bottom - v.height / 2, k = Uo(B, S), _ = v.width > S.width, T = v.height > S.height, q = (_ ? S : v).left, re = (_ ? S : v).right, ce = (T ? S : v).top, le = (T ? S : v).bottom;
3584
+ } = y, B = [A, V], H = we(y), O = y.type === "mouseleave", D = ee(p.floating, H), M = ee(p.domReference, H), S = p.domReference.getBoundingClientRect(), v = p.floating.getBoundingClientRect(), C = d.split("-")[0], I = h > v.right - v.width / 2, R = a > v.bottom - v.height / 2, k = ci(B, S), _ = v.width > S.width, T = v.height > S.height, j = (_ ? S : v).left, re = (_ ? S : v).right, ce = (T ? S : v).top, le = (T ? S : v).bottom;
3577
3585
  if (D && (i = !0, !O))
3578
3586
  return;
3579
3587
  if (M && (i = !1), M && !O) {
3580
3588
  i = !0;
3581
3589
  return;
3582
3590
  }
3583
- if (O && Y(y.relatedTarget) && ee(p.floating, y.relatedTarget) || C && Ne(C.nodesRef.current, E).some((N) => {
3591
+ if (O && Y(y.relatedTarget) && ee(p.floating, y.relatedTarget) || E && Ne(E.nodesRef.current, x).some((N) => {
3584
3592
  let {
3585
3593
  context: F
3586
3594
  } = N;
3587
3595
  return F == null ? void 0 : F.open;
3588
3596
  }))
3589
3597
  return;
3590
- if (w === "top" && a >= S.bottom - 1 || w === "bottom" && a <= S.top + 1 || w === "left" && h >= S.right - 1 || w === "right" && h <= S.left + 1)
3591
- return A();
3598
+ if (C === "top" && a >= S.bottom - 1 || C === "bottom" && a <= S.top + 1 || C === "left" && h >= S.right - 1 || C === "right" && h <= S.left + 1)
3599
+ return P();
3592
3600
  let L = [];
3593
- switch (w) {
3601
+ switch (C) {
3594
3602
  case "top":
3595
- L = [[q, S.top + 1], [q, v.bottom - 1], [re, v.bottom - 1], [re, S.top + 1]];
3603
+ L = [[j, S.top + 1], [j, v.bottom - 1], [re, v.bottom - 1], [re, S.top + 1]];
3596
3604
  break;
3597
3605
  case "bottom":
3598
- L = [[q, v.top + 1], [q, S.bottom - 1], [re, S.bottom - 1], [re, v.top + 1]];
3606
+ L = [[j, v.top + 1], [j, S.bottom - 1], [re, S.bottom - 1], [re, v.top + 1]];
3599
3607
  break;
3600
3608
  case "left":
3601
3609
  L = [[v.right - 1, le], [v.right - 1, ce], [S.left + 1, ce], [S.left + 1, le]];
@@ -3606,34 +3614,34 @@ function wi(e) {
3606
3614
  }
3607
3615
  function K(N) {
3608
3616
  let [F, z] = N;
3609
- switch (w) {
3617
+ switch (C) {
3610
3618
  case "top": {
3611
- const j = [_ ? F + t / 2 : I ? F + t * 4 : F - t * 4, z + t + 1], Q = [_ ? F - t / 2 : I ? F + t * 4 : F - t * 4, z + t + 1], G = [[v.left, I || _ ? v.bottom - t : v.top], [v.right, I ? _ ? v.bottom - t : v.top : v.bottom - t]];
3612
- return [j, Q, ...G];
3619
+ const U = [_ ? F + t / 2 : I ? F + t * 4 : F - t * 4, z + t + 1], Q = [_ ? F - t / 2 : I ? F + t * 4 : F - t * 4, z + t + 1], G = [[v.left, I || _ ? v.bottom - t : v.top], [v.right, I ? _ ? v.bottom - t : v.top : v.bottom - t]];
3620
+ return [U, Q, ...G];
3613
3621
  }
3614
3622
  case "bottom": {
3615
- const j = [_ ? F + t / 2 : I ? F + t * 4 : F - t * 4, z - t], Q = [_ ? F - t / 2 : I ? F + t * 4 : F - t * 4, z - t], G = [[v.left, I || _ ? v.top + t : v.bottom], [v.right, I ? _ ? v.top + t : v.bottom : v.top + t]];
3616
- return [j, Q, ...G];
3623
+ const U = [_ ? F + t / 2 : I ? F + t * 4 : F - t * 4, z - t], Q = [_ ? F - t / 2 : I ? F + t * 4 : F - t * 4, z - t], G = [[v.left, I || _ ? v.top + t : v.bottom], [v.right, I ? _ ? v.top + t : v.bottom : v.top + t]];
3624
+ return [U, Q, ...G];
3617
3625
  }
3618
3626
  case "left": {
3619
- const j = [F + t + 1, T ? z + t / 2 : x ? z + t * 4 : z - t * 4], Q = [F + t + 1, T ? z - t / 2 : x ? z + t * 4 : z - t * 4];
3620
- return [...[[x || T ? v.right - t : v.left, v.top], [x ? T ? v.right - t : v.left : v.right - t, v.bottom]], j, Q];
3627
+ const U = [F + t + 1, T ? z + t / 2 : R ? z + t * 4 : z - t * 4], Q = [F + t + 1, T ? z - t / 2 : R ? z + t * 4 : z - t * 4];
3628
+ return [...[[R || T ? v.right - t : v.left, v.top], [R ? T ? v.right - t : v.left : v.right - t, v.bottom]], U, Q];
3621
3629
  }
3622
3630
  case "right": {
3623
- const j = [F - t, T ? z + t / 2 : x ? z + t * 4 : z - t * 4], Q = [F - t, T ? z - t / 2 : x ? z + t * 4 : z - t * 4], G = [[x || T ? v.left + t : v.right, v.top], [x ? T ? v.left + t : v.right : v.left + t, v.bottom]];
3624
- return [j, Q, ...G];
3631
+ const U = [F - t, T ? z + t / 2 : R ? z + t * 4 : z - t * 4], Q = [F - t, T ? z - t / 2 : R ? z + t * 4 : z - t * 4], G = [[R || T ? v.left + t : v.right, v.top], [R ? T ? v.left + t : v.right : v.left + t, v.bottom]];
3632
+ return [U, Q, ...G];
3625
3633
  }
3626
3634
  }
3627
3635
  }
3628
- if (!In([P, V], L)) {
3636
+ if (!On([A, V], L)) {
3629
3637
  if (i && !k)
3630
- return A();
3638
+ return P();
3631
3639
  if (!O && r) {
3632
3640
  const N = l(y.clientX, y.clientY);
3633
3641
  if (N !== null && N < 0.1)
3634
- return A();
3642
+ return P();
3635
3643
  }
3636
- In([P, V], K([h, a])) ? !i && r && (o = window.setTimeout(A, 40)) : A();
3644
+ On([A, V], K([h, a])) ? !i && r && (o = window.setTimeout(P, 40)) : P();
3637
3645
  }
3638
3646
  };
3639
3647
  };
@@ -3641,37 +3649,82 @@ function wi(e) {
3641
3649
  blockPointerEvents: n
3642
3650
  }, g;
3643
3651
  }
3652
+ const li = Pn(
3653
+ {}
3654
+ ), lr = Pn(null), ji = () => {
3655
+ const e = hr(lr);
3656
+ if (e == null)
3657
+ throw new Error(
3658
+ "Tooltip components must be wrapped in <HammerProvider /> or <TooltipGroupContext.Provider />"
3659
+ );
3660
+ return e;
3661
+ }, qi = (e) => {
3662
+ var t, n;
3663
+ const { layoutStyles: r, componentProps: o } = br(e), { themeData: i, localizationData: s, children: c, className: u, style: l, ...g } = o, { theme: f = ar, mode: h = "light" } = i ?? {}, {
3664
+ locale: a = "en",
3665
+ dir: d = "ltr",
3666
+ translations: p = {}
3667
+ } = s ?? {}, { className: w } = fr({ theme: f, mode: h }), x = vr(w, u), E = { ...l, ...r }, b = yr(), [y, P] = gr(!1), A = parseInt(
3668
+ ((n = (t = xr) == null ? void 0 : t.Duration) == null ? void 0 : n.value.replace("ms", "")) ?? "200",
3669
+ 10
3670
+ ), V = pr(
3671
+ () => ({ disableDelayGroup: P }),
3672
+ // eslint-disable-next-line react-hooks/exhaustive-deps
3673
+ [y]
3674
+ );
3675
+ return /* @__PURE__ */ We.jsx(li.Provider, { value: { breakpoint: b }, children: /* @__PURE__ */ We.jsx(dr.Provider, { value: { theme: f, mode: h }, children: /* @__PURE__ */ We.jsx(lr.Provider, { value: V, children: y ? /* @__PURE__ */ We.jsx(
3676
+ en,
3677
+ {
3678
+ translationData: { locale: a, dir: d, translations: p },
3679
+ className: x,
3680
+ style: E,
3681
+ ...g,
3682
+ children: c
3683
+ }
3684
+ ) : /* @__PURE__ */ We.jsx(zo, { delay: A, children: /* @__PURE__ */ We.jsx(
3685
+ en,
3686
+ {
3687
+ translationData: { locale: a, dir: d, translations: p },
3688
+ className: x,
3689
+ style: E,
3690
+ ...g,
3691
+ children: c
3692
+ }
3693
+ ) }) }) }) });
3694
+ };
3644
3695
  export {
3645
- si as A,
3646
- ni as B,
3647
- ci as C,
3648
- ui as D,
3649
- fi as F,
3650
- di as a,
3651
- oi as b,
3652
- pi as c,
3653
- Yo as d,
3654
- Xo as e,
3655
- Jo as f,
3656
- ei as g,
3657
- mi as h,
3658
- li as i,
3659
- wi as j,
3660
- gi as k,
3661
- Zo as l,
3662
- yi as m,
3663
- vi as n,
3664
- Go as o,
3665
- ai as p,
3666
- Mo as q,
3667
- hi as r,
3668
- Qo as s,
3669
- ri as t,
3670
- ti as u,
3671
- Ye as v,
3672
- ii as w,
3673
- je as x,
3674
- bi as y,
3675
- xi as z
3696
+ Pi as A,
3697
+ Ti as B,
3698
+ Ai as C,
3699
+ Li as F,
3700
+ li as M,
3701
+ ji as X,
3702
+ qi as Y,
3703
+ Fi as a,
3704
+ Si as b,
3705
+ bi as c,
3706
+ xi as d,
3707
+ Ci as e,
3708
+ Ri as f,
3709
+ Ni as g,
3710
+ ki as h,
3711
+ zi as i,
3712
+ Vi as j,
3713
+ $i as k,
3714
+ wi as l,
3715
+ Bi as m,
3716
+ Di as n,
3717
+ yi as o,
3718
+ Ho as p,
3719
+ Wi as q,
3720
+ Ii as r,
3721
+ Ei as s,
3722
+ Oi as t,
3723
+ _i as u,
3724
+ Ge as v,
3725
+ Mi as w,
3726
+ Ye as x,
3727
+ Ki as y,
3728
+ Hi as z
3676
3729
  };
3677
- //# sourceMappingURL=index-04060912.js.map
3730
+ //# sourceMappingURL=index-204e7e78.js.map