mimir-ui-kit 1.35.3 → 1.36.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. package/dist/{Input-B-gKQ9FT.js → Input-DlGNMuUD.js} +67 -64
  2. package/dist/assets/Accordion.css +1 -1
  3. package/dist/assets/Input.css +1 -1
  4. package/dist/assets/ListPhotos.css +1 -1
  5. package/dist/assets/MultiSelectSearch.css +1 -0
  6. package/dist/assets/SelectSearch.css +1 -1
  7. package/dist/combobox-CDU06zJj.js +2855 -0
  8. package/dist/components/Accordion/Accordion.js +180 -174
  9. package/dist/components/Button/Button.d.ts +36 -0
  10. package/dist/components/Button/Button.js +44 -43
  11. package/dist/components/CheckboxMimir/CheckboxMimir.d.ts +2 -0
  12. package/dist/components/CheckboxMimir/CheckboxMimir.js +37 -30
  13. package/dist/components/Chip/Chip.d.ts +5 -1
  14. package/dist/components/Chip/Chip.js +23 -22
  15. package/dist/components/DatePicker/DatePicker.js +1 -1
  16. package/dist/components/Input/Input.js +1 -1
  17. package/dist/components/Input/index.js +1 -1
  18. package/dist/components/InputPassword/InputPassword.js +1 -1
  19. package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
  20. package/dist/components/ListPhotos/ListPhotos.js +4 -4
  21. package/dist/components/MultiSelectSearch/MultiSelectSearch.d.ts +22 -0
  22. package/dist/components/MultiSelectSearch/MultiSelectSearch.js +318 -0
  23. package/dist/components/MultiSelectSearch/constants.d.ts +4 -0
  24. package/dist/components/MultiSelectSearch/constants.js +4 -0
  25. package/dist/components/MultiSelectSearch/index.d.ts +3 -0
  26. package/dist/components/MultiSelectSearch/index.js +6 -0
  27. package/dist/components/MultiSelectSearch/types.d.ts +60 -0
  28. package/dist/components/MultiSelectSearch/utils.d.ts +8 -0
  29. package/dist/components/MultiSelectSearch/utils.js +19 -0
  30. package/dist/components/OtpInput/OtpInput.js +1 -1
  31. package/dist/components/SelectSearch/SelectSearch.js +172 -3017
  32. package/dist/components/SelectSearch/utils.d.ts +5 -0
  33. package/dist/components/SelectSearch/utils.js +17 -0
  34. package/dist/components/Switcher/Switcher.js +48 -48
  35. package/dist/components/TabTrail/TabTrail.js +171 -171
  36. package/dist/components/TextArea/TextArea.js +1 -1
  37. package/dist/components/index.js +1 -1
  38. package/dist/index.js +1 -1
  39. package/dist/open-closed-CdldUPoq.js +86 -0
  40. package/dist/use-resolve-button-type-DhFdPxnv.js +12 -0
  41. package/package.json +3 -2
  42. package/dist/open-closed-Cy6VDfYc.js +0 -93
  43. package/dist/use-resolve-button-type-BAxjHhds.js +0 -19
@@ -0,0 +1,2855 @@
1
+ import { n as B, u as gt, d as Te, s as Me, o as I, p as Xt, t as Mn, e as Le, W as pe, y as Se, T as Pn, H as he, M as Tt, a as Re, $ as Jt, b as Qt, D as vt, I as An, c as Q } from "./keyboard-B0lm_zyn.js";
2
+ import * as y from "react";
3
+ import W, { useReducer as Zt, useMemo as q, useSyncExternalStore as $n, useId as We, useEffect as oe, useCallback as ke, useRef as K, useLayoutEffect as en, createContext as ge, useContext as le, useState as ae, Fragment as tt, createRef as Dn } from "react";
4
+ import * as Ne from "react-dom";
5
+ import { flushSync as we, createPortal as Fn } from "react-dom";
6
+ import { w as Ln } from "./use-active-press-86hajhdd.js";
7
+ import { u as _n } from "./use-by-comparator-CVuf9KBq.js";
8
+ import { K as kn, a as Nn, b as zn, T as Hn, z as Vn, j as Wn, u as Bn, I as bt, G as jn } from "./label-y3ANLTNC.js";
9
+ import { A as Un, h as Yn, f as qn, _ as Kn } from "./focus-management-XwV-9qkO.js";
10
+ import { e as Gn } from "./use-resolve-button-type-DhFdPxnv.js";
11
+ import { c as Xn, i as Xe, u as Jn, R as Qn, H as Zn } from "./open-closed-CdldUPoq.js";
12
+ import { r as eo } from "./bugs-diTMAGNw.js";
13
+ function De(e, t, n) {
14
+ let o = n.initialDeps ?? [], i;
15
+ return () => {
16
+ var r, s, l, a;
17
+ let c;
18
+ n.key && ((r = n.debug) != null && r.call(n)) && (c = Date.now());
19
+ const f = e();
20
+ if (!(f.length !== o.length || f.some((u, m) => o[m] !== u)))
21
+ return i;
22
+ o = f;
23
+ let p;
24
+ if (n.key && ((s = n.debug) != null && s.call(n)) && (p = Date.now()), i = t(...f), n.key && ((l = n.debug) != null && l.call(n))) {
25
+ const u = Math.round((Date.now() - c) * 100) / 100, m = Math.round((Date.now() - p) * 100) / 100, h = m / 16, g = (v, E) => {
26
+ for (v = String(v); v.length < E; )
27
+ v = " " + v;
28
+ return v;
29
+ };
30
+ console.info(
31
+ `%c⏱ ${g(m, 5)} /${g(u, 5)} ms`,
32
+ `
33
+ font-size: .6rem;
34
+ font-weight: bold;
35
+ color: hsl(${Math.max(
36
+ 0,
37
+ Math.min(120 - 120 * h, 120)
38
+ )}deg 100% 31%);`,
39
+ n == null ? void 0 : n.key
40
+ );
41
+ }
42
+ return (a = n == null ? void 0 : n.onChange) == null || a.call(n, i), i;
43
+ };
44
+ }
45
+ function lt(e, t) {
46
+ if (e === void 0)
47
+ throw new Error("Unexpected undefined");
48
+ return e;
49
+ }
50
+ const to = (e, t) => Math.abs(e - t) < 1, no = (e, t, n) => {
51
+ let o;
52
+ return function(...i) {
53
+ e.clearTimeout(o), o = e.setTimeout(() => t.apply(this, i), n);
54
+ };
55
+ }, oo = (e) => e, io = (e) => {
56
+ const t = Math.max(e.startIndex - e.overscan, 0), n = Math.min(e.endIndex + e.overscan, e.count - 1), o = [];
57
+ for (let i = t; i <= n; i++)
58
+ o.push(i);
59
+ return o;
60
+ }, ro = (e, t) => {
61
+ const n = e.scrollElement;
62
+ if (!n)
63
+ return;
64
+ const o = e.targetWindow;
65
+ if (!o)
66
+ return;
67
+ const i = (s) => {
68
+ const { width: l, height: a } = s;
69
+ t({ width: Math.round(l), height: Math.round(a) });
70
+ };
71
+ if (i(n.getBoundingClientRect()), !o.ResizeObserver)
72
+ return () => {
73
+ };
74
+ const r = new o.ResizeObserver((s) => {
75
+ const l = s[0];
76
+ if (l != null && l.borderBoxSize) {
77
+ const a = l.borderBoxSize[0];
78
+ if (a) {
79
+ i({ width: a.inlineSize, height: a.blockSize });
80
+ return;
81
+ }
82
+ }
83
+ i(n.getBoundingClientRect());
84
+ });
85
+ return r.observe(n, { box: "border-box" }), () => {
86
+ r.unobserve(n);
87
+ };
88
+ }, It = {
89
+ passive: !0
90
+ }, lo = typeof window > "u" ? !0 : "onscrollend" in window, so = (e, t) => {
91
+ const n = e.scrollElement;
92
+ if (!n)
93
+ return;
94
+ const o = e.targetWindow;
95
+ if (!o)
96
+ return;
97
+ let i = 0;
98
+ const r = lo ? () => {
99
+ } : no(
100
+ o,
101
+ () => {
102
+ t(i, !1);
103
+ },
104
+ e.options.isScrollingResetDelay
105
+ ), s = (c) => () => {
106
+ i = n[e.options.horizontal ? "scrollLeft" : "scrollTop"], r(), t(i, c);
107
+ }, l = s(!0), a = s(!1);
108
+ return a(), n.addEventListener("scroll", l, It), n.addEventListener("scrollend", a, It), () => {
109
+ n.removeEventListener("scroll", l), n.removeEventListener("scrollend", a);
110
+ };
111
+ }, ao = (e, t, n) => {
112
+ if (t != null && t.borderBoxSize) {
113
+ const o = t.borderBoxSize[0];
114
+ if (o)
115
+ return Math.round(
116
+ o[n.options.horizontal ? "inlineSize" : "blockSize"]
117
+ );
118
+ }
119
+ return Math.round(
120
+ e.getBoundingClientRect()[n.options.horizontal ? "width" : "height"]
121
+ );
122
+ }, co = (e, {
123
+ adjustments: t = 0,
124
+ behavior: n
125
+ }, o) => {
126
+ var i, r;
127
+ const s = e + t;
128
+ (r = (i = o.scrollElement) == null ? void 0 : i.scrollTo) == null || r.call(i, {
129
+ [o.options.horizontal ? "left" : "top"]: s,
130
+ behavior: n
131
+ });
132
+ };
133
+ class uo {
134
+ constructor(t) {
135
+ this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
136
+ let n = null;
137
+ const o = () => n || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : n = new this.targetWindow.ResizeObserver((i) => {
138
+ i.forEach((r) => {
139
+ this._measureElement(r.target, r);
140
+ });
141
+ }));
142
+ return {
143
+ disconnect: () => {
144
+ var i;
145
+ return (i = o()) == null ? void 0 : i.disconnect();
146
+ },
147
+ observe: (i) => {
148
+ var r;
149
+ return (r = o()) == null ? void 0 : r.observe(i, { box: "border-box" });
150
+ },
151
+ unobserve: (i) => {
152
+ var r;
153
+ return (r = o()) == null ? void 0 : r.unobserve(i);
154
+ }
155
+ };
156
+ })(), this.range = null, this.setOptions = (n) => {
157
+ Object.entries(n).forEach(([o, i]) => {
158
+ typeof i > "u" && delete n[o];
159
+ }), this.options = {
160
+ debug: !1,
161
+ initialOffset: 0,
162
+ overscan: 1,
163
+ paddingStart: 0,
164
+ paddingEnd: 0,
165
+ scrollPaddingStart: 0,
166
+ scrollPaddingEnd: 0,
167
+ horizontal: !1,
168
+ getItemKey: oo,
169
+ rangeExtractor: io,
170
+ onChange: () => {
171
+ },
172
+ measureElement: ao,
173
+ initialRect: { width: 0, height: 0 },
174
+ scrollMargin: 0,
175
+ gap: 0,
176
+ indexAttribute: "data-index",
177
+ initialMeasurementsCache: [],
178
+ lanes: 1,
179
+ isScrollingResetDelay: 150,
180
+ enabled: !0,
181
+ ...n
182
+ };
183
+ }, this.notify = (n, o) => {
184
+ var i, r;
185
+ const { startIndex: s, endIndex: l } = this.range ?? {
186
+ startIndex: void 0,
187
+ endIndex: void 0
188
+ }, a = this.calculateRange();
189
+ (n || s !== (a == null ? void 0 : a.startIndex) || l !== (a == null ? void 0 : a.endIndex)) && ((r = (i = this.options).onChange) == null || r.call(i, this, o));
190
+ }, this.cleanup = () => {
191
+ this.unsubs.filter(Boolean).forEach((n) => n()), this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.observer.disconnect(), this.elementsCache.clear();
192
+ }, this._didMount = () => () => {
193
+ this.cleanup();
194
+ }, this._willUpdate = () => {
195
+ var n;
196
+ const o = this.options.enabled ? this.options.getScrollElement() : null;
197
+ if (this.scrollElement !== o) {
198
+ if (this.cleanup(), !o) {
199
+ this.notify(!1, !1);
200
+ return;
201
+ }
202
+ this.scrollElement = o, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((n = this.scrollElement) == null ? void 0 : n.window) ?? null, this._scrollToOffset(this.getScrollOffset(), {
203
+ adjustments: void 0,
204
+ behavior: void 0
205
+ }), this.unsubs.push(
206
+ this.options.observeElementRect(this, (i) => {
207
+ this.scrollRect = i, this.notify(!1, !1);
208
+ })
209
+ ), this.unsubs.push(
210
+ this.options.observeElementOffset(this, (i, r) => {
211
+ this.scrollAdjustments = 0, this.scrollDirection = r ? this.getScrollOffset() < i ? "forward" : "backward" : null, this.scrollOffset = i;
212
+ const s = this.isScrolling;
213
+ this.isScrolling = r, this.notify(s !== r, r);
214
+ })
215
+ );
216
+ }
217
+ }, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getFurthestMeasurement = (n, o) => {
218
+ const i = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
219
+ for (let s = o - 1; s >= 0; s--) {
220
+ const l = n[s];
221
+ if (i.has(l.lane))
222
+ continue;
223
+ const a = r.get(
224
+ l.lane
225
+ );
226
+ if (a == null || l.end > a.end ? r.set(l.lane, l) : l.end < a.end && i.set(l.lane, !0), i.size === this.options.lanes)
227
+ break;
228
+ }
229
+ return r.size === this.options.lanes ? Array.from(r.values()).sort((s, l) => s.end === l.end ? s.index - l.index : s.end - l.end)[0] : void 0;
230
+ }, this.getMeasurementOptions = De(
231
+ () => [
232
+ this.options.count,
233
+ this.options.paddingStart,
234
+ this.options.scrollMargin,
235
+ this.options.getItemKey,
236
+ this.options.enabled
237
+ ],
238
+ (n, o, i, r, s) => (this.pendingMeasuredCacheIndexes = [], {
239
+ count: n,
240
+ paddingStart: o,
241
+ scrollMargin: i,
242
+ getItemKey: r,
243
+ enabled: s
244
+ }),
245
+ {
246
+ key: !1
247
+ }
248
+ ), this.getMeasurements = De(
249
+ () => [this.getMeasurementOptions(), this.itemSizeCache],
250
+ ({ count: n, paddingStart: o, scrollMargin: i, getItemKey: r, enabled: s }, l) => {
251
+ var a;
252
+ if (!s)
253
+ return this.measurementsCache = [], this.itemSizeCache.clear(), [];
254
+ this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((d) => {
255
+ this.itemSizeCache.set(d.key, d.size);
256
+ }));
257
+ const c = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
258
+ this.pendingMeasuredCacheIndexes = [];
259
+ const f = this.measurementsCache.slice(0, c);
260
+ for (let d = c; d < n; d++) {
261
+ let p = (a = this.measurementsCache[d]) == null ? void 0 : a.measureElement;
262
+ p || (p = (x) => {
263
+ const O = r(d), S = this.elementsCache.get(O);
264
+ if (!x) {
265
+ S && (this.observer.unobserve(S), this.elementsCache.delete(O));
266
+ return;
267
+ }
268
+ S !== x && (S && this.observer.unobserve(S), this.observer.observe(x), this.elementsCache.set(O, x)), x.isConnected && this.resizeItem(
269
+ d,
270
+ this.options.measureElement(x, void 0, this)
271
+ );
272
+ });
273
+ const u = r(d), m = this.options.lanes === 1 ? f[d - 1] : this.getFurthestMeasurement(f, d), h = m ? m.end + this.options.gap : o + i, g = l.get(u), v = typeof g == "number" ? g : this.options.estimateSize(d), E = h + v, b = m ? m.lane : d % this.options.lanes;
274
+ f[d] = {
275
+ index: d,
276
+ start: h,
277
+ size: v,
278
+ end: E,
279
+ key: u,
280
+ lane: b,
281
+ measureElement: p
282
+ };
283
+ }
284
+ return this.measurementsCache = f, f;
285
+ },
286
+ {
287
+ key: process.env.NODE_ENV !== "production" && "getMeasurements",
288
+ debug: () => this.options.debug
289
+ }
290
+ ), this.calculateRange = De(
291
+ () => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
292
+ (n, o, i) => this.range = n.length > 0 && o > 0 ? fo({
293
+ measurements: n,
294
+ outerSize: o,
295
+ scrollOffset: i
296
+ }) : null,
297
+ {
298
+ key: process.env.NODE_ENV !== "production" && "calculateRange",
299
+ debug: () => this.options.debug
300
+ }
301
+ ), this.getIndexes = De(
302
+ () => [
303
+ this.options.rangeExtractor,
304
+ this.calculateRange(),
305
+ this.options.overscan,
306
+ this.options.count
307
+ ],
308
+ (n, o, i, r) => o === null ? [] : n({
309
+ startIndex: o.startIndex,
310
+ endIndex: o.endIndex,
311
+ overscan: i,
312
+ count: r
313
+ }),
314
+ {
315
+ key: process.env.NODE_ENV !== "production" && "getIndexes",
316
+ debug: () => this.options.debug
317
+ }
318
+ ), this.indexFromElement = (n) => {
319
+ const o = this.options.indexAttribute, i = n.getAttribute(o);
320
+ return i ? parseInt(i, 10) : (console.warn(
321
+ `Missing attribute name '${o}={index}' on measured element.`
322
+ ), -1);
323
+ }, this._measureElement = (n, o) => {
324
+ const i = this.indexFromElement(n), r = this.getMeasurements()[i];
325
+ if (!r || !n.isConnected) {
326
+ this.elementsCache.forEach((l, a) => {
327
+ l === n && (this.observer.unobserve(n), this.elementsCache.delete(a));
328
+ });
329
+ return;
330
+ }
331
+ const s = this.elementsCache.get(r.key);
332
+ s !== n && (s && this.observer.unobserve(s), this.observer.observe(n), this.elementsCache.set(r.key, n)), this.resizeItem(i, this.options.measureElement(n, o, this));
333
+ }, this.resizeItem = (n, o) => {
334
+ const i = this.getMeasurements()[n];
335
+ if (!i)
336
+ return;
337
+ const r = this.itemSizeCache.get(i.key) ?? i.size, s = o - r;
338
+ s !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(i, s, this) : i.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", s), this._scrollToOffset(this.getScrollOffset(), {
339
+ adjustments: this.scrollAdjustments += s,
340
+ behavior: void 0
341
+ })), this.pendingMeasuredCacheIndexes.push(i.index), this.itemSizeCache = new Map(this.itemSizeCache.set(i.key, o)), this.notify(!0, !1));
342
+ }, this.measureElement = (n) => {
343
+ n && this._measureElement(n, void 0);
344
+ }, this.getVirtualItems = De(
345
+ () => [this.getIndexes(), this.getMeasurements()],
346
+ (n, o) => {
347
+ const i = [];
348
+ for (let r = 0, s = n.length; r < s; r++) {
349
+ const l = n[r], a = o[l];
350
+ i.push(a);
351
+ }
352
+ return i;
353
+ },
354
+ {
355
+ key: process.env.NODE_ENV !== "production" && "getIndexes",
356
+ debug: () => this.options.debug
357
+ }
358
+ ), this.getVirtualItemForOffset = (n) => {
359
+ const o = this.getMeasurements();
360
+ if (o.length !== 0)
361
+ return lt(
362
+ o[tn(
363
+ 0,
364
+ o.length - 1,
365
+ (i) => lt(o[i]).start,
366
+ n
367
+ )]
368
+ );
369
+ }, this.getOffsetForAlignment = (n, o) => {
370
+ const i = this.getSize(), r = this.getScrollOffset();
371
+ o === "auto" && (n <= r ? o = "start" : n >= r + i ? o = "end" : o = "start"), o === "start" ? n = n : o === "end" ? n = n - i : o === "center" && (n = n - i / 2);
372
+ const s = this.options.horizontal ? "scrollWidth" : "scrollHeight", a = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[s] : this.scrollElement[s] : 0) - i;
373
+ return Math.max(Math.min(a, n), 0);
374
+ }, this.getOffsetForIndex = (n, o = "auto") => {
375
+ n = Math.max(0, Math.min(n, this.options.count - 1));
376
+ const i = this.getMeasurements()[n];
377
+ if (!i)
378
+ return;
379
+ const r = this.getSize(), s = this.getScrollOffset();
380
+ if (o === "auto")
381
+ if (i.end >= s + r - this.options.scrollPaddingEnd)
382
+ o = "end";
383
+ else if (i.start <= s + this.options.scrollPaddingStart)
384
+ o = "start";
385
+ else
386
+ return [s, o];
387
+ const l = o === "end" ? i.end + this.options.scrollPaddingEnd : i.start - this.options.scrollPaddingStart;
388
+ return [this.getOffsetForAlignment(l, o), o];
389
+ }, this.isDynamicMode = () => this.elementsCache.size > 0, this.cancelScrollToIndex = () => {
390
+ this.scrollToIndexTimeoutId !== null && this.targetWindow && (this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId), this.scrollToIndexTimeoutId = null);
391
+ }, this.scrollToOffset = (n, { align: o = "start", behavior: i } = {}) => {
392
+ this.cancelScrollToIndex(), i === "smooth" && this.isDynamicMode() && console.warn(
393
+ "The `smooth` scroll behavior is not fully supported with dynamic size."
394
+ ), this._scrollToOffset(this.getOffsetForAlignment(n, o), {
395
+ adjustments: void 0,
396
+ behavior: i
397
+ });
398
+ }, this.scrollToIndex = (n, { align: o = "auto", behavior: i } = {}) => {
399
+ n = Math.max(0, Math.min(n, this.options.count - 1)), this.cancelScrollToIndex(), i === "smooth" && this.isDynamicMode() && console.warn(
400
+ "The `smooth` scroll behavior is not fully supported with dynamic size."
401
+ );
402
+ const r = this.getOffsetForIndex(n, o);
403
+ if (!r) return;
404
+ const [s, l] = r;
405
+ this._scrollToOffset(s, { adjustments: void 0, behavior: i }), i !== "smooth" && this.isDynamicMode() && this.targetWindow && (this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
406
+ if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
407
+ this.options.getItemKey(n)
408
+ )) {
409
+ const [c] = lt(
410
+ this.getOffsetForIndex(n, l)
411
+ );
412
+ to(c, this.getScrollOffset()) || this.scrollToIndex(n, { align: l, behavior: i });
413
+ } else
414
+ this.scrollToIndex(n, { align: l, behavior: i });
415
+ }));
416
+ }, this.scrollBy = (n, { behavior: o } = {}) => {
417
+ this.cancelScrollToIndex(), o === "smooth" && this.isDynamicMode() && console.warn(
418
+ "The `smooth` scroll behavior is not fully supported with dynamic size."
419
+ ), this._scrollToOffset(this.getScrollOffset() + n, {
420
+ adjustments: void 0,
421
+ behavior: o
422
+ });
423
+ }, this.getTotalSize = () => {
424
+ var n;
425
+ const o = this.getMeasurements();
426
+ let i;
427
+ return o.length === 0 ? i = this.options.paddingStart : i = this.options.lanes === 1 ? ((n = o[o.length - 1]) == null ? void 0 : n.end) ?? 0 : Math.max(
428
+ ...o.slice(-this.options.lanes).map((r) => r.end)
429
+ ), i - this.options.scrollMargin + this.options.paddingEnd;
430
+ }, this._scrollToOffset = (n, {
431
+ adjustments: o,
432
+ behavior: i
433
+ }) => {
434
+ this.options.scrollToFn(n, { behavior: i, adjustments: o }, this);
435
+ }, this.measure = () => {
436
+ var n, o;
437
+ this.itemSizeCache = /* @__PURE__ */ new Map(), (o = (n = this.options).onChange) == null || o.call(n, this, !1);
438
+ }, this.setOptions(t);
439
+ }
440
+ }
441
+ const tn = (e, t, n, o) => {
442
+ for (; e <= t; ) {
443
+ const i = (e + t) / 2 | 0, r = n(i);
444
+ if (r < o)
445
+ e = i + 1;
446
+ else if (r > o)
447
+ t = i - 1;
448
+ else
449
+ return i;
450
+ }
451
+ return e > 0 ? e - 1 : 0;
452
+ };
453
+ function fo({
454
+ measurements: e,
455
+ outerSize: t,
456
+ scrollOffset: n
457
+ }) {
458
+ const o = e.length - 1, r = tn(0, o, (l) => e[l].start, n);
459
+ let s = r;
460
+ for (; s < o && e[s].end < n + t; )
461
+ s++;
462
+ return { startIndex: r, endIndex: s };
463
+ }
464
+ const mo = typeof document < "u" ? y.useLayoutEffect : y.useEffect;
465
+ function po(e) {
466
+ const t = y.useReducer(() => ({}), {})[1], n = {
467
+ ...e,
468
+ onChange: (i, r) => {
469
+ var s;
470
+ r ? we(t) : t(), (s = e.onChange) == null || s.call(e, i, r);
471
+ }
472
+ }, [o] = y.useState(
473
+ () => new uo(n)
474
+ );
475
+ return o.setOptions(n), y.useEffect(() => o._didMount(), []), mo(() => o._willUpdate()), o;
476
+ }
477
+ function ho(e) {
478
+ return po({
479
+ observeElementRect: ro,
480
+ observeElementOffset: so,
481
+ scrollToFn: co,
482
+ ...e
483
+ });
484
+ }
485
+ function go(e) {
486
+ if (e === null) return { width: 0, height: 0 };
487
+ let { width: t, height: n } = e.getBoundingClientRect();
488
+ return { width: t, height: n };
489
+ }
490
+ function Mt(e, t = !1) {
491
+ let [n, o] = Zt(() => ({}), {}), i = q(() => go(e), [e, n]);
492
+ return B(() => {
493
+ if (!e) return;
494
+ let r = new ResizeObserver(o);
495
+ return r.observe(e), () => {
496
+ r.disconnect();
497
+ };
498
+ }, [e]), t ? { width: `${i.width}px`, height: `${i.height}px` } : i;
499
+ }
500
+ let vo = class extends Map {
501
+ constructor(t) {
502
+ super(), this.factory = t;
503
+ }
504
+ get(t) {
505
+ let n = super.get(t);
506
+ return n === void 0 && (n = this.factory(t), this.set(t, n)), n;
507
+ }
508
+ };
509
+ function nn(e, t) {
510
+ let n = e(), o = /* @__PURE__ */ new Set();
511
+ return { getSnapshot() {
512
+ return n;
513
+ }, subscribe(i) {
514
+ return o.add(i), () => o.delete(i);
515
+ }, dispatch(i, ...r) {
516
+ let s = t[i].call(n, ...r);
517
+ s && (n = s, o.forEach((l) => l()));
518
+ } };
519
+ }
520
+ function on(e) {
521
+ return $n(e.subscribe, e.getSnapshot, e.getSnapshot);
522
+ }
523
+ let bo = new vo(() => nn(() => [], { ADD(e) {
524
+ return this.includes(e) ? this : [...this, e];
525
+ }, REMOVE(e) {
526
+ let t = this.indexOf(e);
527
+ if (t === -1) return this;
528
+ let n = this.slice();
529
+ return n.splice(t, 1), n;
530
+ } }));
531
+ function xt(e, t) {
532
+ let n = bo.get(t), o = We(), i = on(n);
533
+ if (B(() => {
534
+ if (e) return n.dispatch("ADD", o), () => n.dispatch("REMOVE", o);
535
+ }, [n, e]), !e) return !1;
536
+ let r = i.indexOf(o), s = i.length;
537
+ return r === -1 && (r = s, s += 1), r === s - 1;
538
+ }
539
+ let dt = /* @__PURE__ */ new Map(), _e = /* @__PURE__ */ new Map();
540
+ function Pt(e) {
541
+ var t;
542
+ let n = (t = _e.get(e)) != null ? t : 0;
543
+ return _e.set(e, n + 1), n !== 0 ? () => At(e) : (dt.set(e, { "aria-hidden": e.getAttribute("aria-hidden"), inert: e.inert }), e.setAttribute("aria-hidden", "true"), e.inert = !0, () => At(e));
544
+ }
545
+ function At(e) {
546
+ var t;
547
+ let n = (t = _e.get(e)) != null ? t : 1;
548
+ if (n === 1 ? _e.delete(e) : _e.set(e, n - 1), n !== 1) return;
549
+ let o = dt.get(e);
550
+ o && (o["aria-hidden"] === null ? e.removeAttribute("aria-hidden") : e.setAttribute("aria-hidden", o["aria-hidden"]), e.inert = o.inert, dt.delete(e));
551
+ }
552
+ function xo(e, { allowed: t, disallowed: n } = {}) {
553
+ let o = xt(e, "inert-others");
554
+ B(() => {
555
+ var i, r;
556
+ if (!o) return;
557
+ let s = Te();
558
+ for (let a of (i = n == null ? void 0 : n()) != null ? i : []) a && s.add(Pt(a));
559
+ let l = (r = t == null ? void 0 : t()) != null ? r : [];
560
+ for (let a of l) {
561
+ if (!a) continue;
562
+ let c = gt(a);
563
+ if (!c) continue;
564
+ let f = a.parentElement;
565
+ for (; f && f !== c.body; ) {
566
+ for (let d of f.children) l.some((p) => d.contains(p)) || s.add(Pt(d));
567
+ f = f.parentElement;
568
+ }
569
+ }
570
+ return s.dispose;
571
+ }, [o, t, n]);
572
+ }
573
+ function wo(e, t, n) {
574
+ let o = Me((i) => {
575
+ let r = i.getBoundingClientRect();
576
+ r.x === 0 && r.y === 0 && r.width === 0 && r.height === 0 && n();
577
+ });
578
+ oe(() => {
579
+ if (!e) return;
580
+ let i = t === null ? null : t instanceof HTMLElement ? t : t.current;
581
+ if (!i) return;
582
+ let r = Te();
583
+ if (typeof ResizeObserver < "u") {
584
+ let s = new ResizeObserver(() => o.current(i));
585
+ s.observe(i), r.add(() => s.disconnect());
586
+ }
587
+ if (typeof IntersectionObserver < "u") {
588
+ let s = new IntersectionObserver(() => o.current(i));
589
+ s.observe(i), r.add(() => s.disconnect());
590
+ }
591
+ return () => r.dispose();
592
+ }, [t, o, e]);
593
+ }
594
+ function rn() {
595
+ return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
596
+ }
597
+ function Eo() {
598
+ return /Android/gi.test(window.navigator.userAgent);
599
+ }
600
+ function ln() {
601
+ return rn() || Eo();
602
+ }
603
+ function Fe(e, t, n, o) {
604
+ let i = Me(n);
605
+ oe(() => {
606
+ if (!e) return;
607
+ function r(s) {
608
+ i.current(s);
609
+ }
610
+ return document.addEventListener(t, r, o), () => document.removeEventListener(t, r, o);
611
+ }, [e, t, o]);
612
+ }
613
+ function yo(e, t, n, o) {
614
+ let i = Me(n);
615
+ oe(() => {
616
+ if (!e) return;
617
+ function r(s) {
618
+ i.current(s);
619
+ }
620
+ return window.addEventListener(t, r, o), () => window.removeEventListener(t, r, o);
621
+ }, [e, t, o]);
622
+ }
623
+ const $t = 30;
624
+ function Oo(e, t, n) {
625
+ let o = xt(e, "outside-click"), i = Me(n), r = ke(function(a, c) {
626
+ if (a.defaultPrevented) return;
627
+ let f = c(a);
628
+ if (f === null || !f.getRootNode().contains(f) || !f.isConnected) return;
629
+ let d = function p(u) {
630
+ return typeof u == "function" ? p(u()) : Array.isArray(u) || u instanceof Set ? u : [u];
631
+ }(t);
632
+ for (let p of d) if (p !== null && (p.contains(f) || a.composed && a.composedPath().includes(p))) return;
633
+ return !Un(f, Yn.Loose) && f.tabIndex !== -1 && a.preventDefault(), i.current(a, f);
634
+ }, [i, t]), s = K(null);
635
+ Fe(o, "pointerdown", (a) => {
636
+ var c, f;
637
+ s.current = ((f = (c = a.composedPath) == null ? void 0 : c.call(a)) == null ? void 0 : f[0]) || a.target;
638
+ }, !0), Fe(o, "mousedown", (a) => {
639
+ var c, f;
640
+ s.current = ((f = (c = a.composedPath) == null ? void 0 : c.call(a)) == null ? void 0 : f[0]) || a.target;
641
+ }, !0), Fe(o, "click", (a) => {
642
+ ln() || s.current && (r(a, () => s.current), s.current = null);
643
+ }, !0);
644
+ let l = K({ x: 0, y: 0 });
645
+ Fe(o, "touchstart", (a) => {
646
+ l.current.x = a.touches[0].clientX, l.current.y = a.touches[0].clientY;
647
+ }, !0), Fe(o, "touchend", (a) => {
648
+ let c = { x: a.changedTouches[0].clientX, y: a.changedTouches[0].clientY };
649
+ if (!(Math.abs(c.x - l.current.x) >= $t || Math.abs(c.y - l.current.y) >= $t)) return r(a, () => a.target instanceof HTMLElement ? a.target : null);
650
+ }, !0), yo(o, "blur", (a) => r(a, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
651
+ }
652
+ function nt(...e) {
653
+ return q(() => gt(...e), [...e]);
654
+ }
655
+ function So(e, t, n, o) {
656
+ let i = Me(n);
657
+ oe(() => {
658
+ e = e ?? window;
659
+ function r(s) {
660
+ i.current(s);
661
+ }
662
+ return e.addEventListener(t, r, o), () => e.removeEventListener(t, r, o);
663
+ }, [e, t, o]);
664
+ }
665
+ function sn(e) {
666
+ let t = K({ value: "", selectionStart: null, selectionEnd: null });
667
+ return So(e, "blur", (n) => {
668
+ let o = n.target;
669
+ o instanceof HTMLInputElement && (t.current = { value: o.value, selectionStart: o.selectionStart, selectionEnd: o.selectionEnd });
670
+ }), I(() => {
671
+ if (document.activeElement !== e && e instanceof HTMLInputElement && e.isConnected) {
672
+ if (e.focus({ preventScroll: !0 }), e.value !== t.current.value) e.setSelectionRange(e.value.length, e.value.length);
673
+ else {
674
+ let { selectionStart: n, selectionEnd: o } = t.current;
675
+ n !== null && o !== null && e.setSelectionRange(n, o);
676
+ }
677
+ t.current = { value: "", selectionStart: null, selectionEnd: null };
678
+ }
679
+ });
680
+ }
681
+ function Ro() {
682
+ let e;
683
+ return { before({ doc: t }) {
684
+ var n;
685
+ let o = t.documentElement, i = (n = t.defaultView) != null ? n : window;
686
+ e = Math.max(0, i.innerWidth - o.clientWidth);
687
+ }, after({ doc: t, d: n }) {
688
+ let o = t.documentElement, i = Math.max(0, o.clientWidth - o.offsetWidth), r = Math.max(0, e - i);
689
+ n.style(o, "paddingRight", `${r}px`);
690
+ } };
691
+ }
692
+ function Co() {
693
+ return rn() ? { before({ doc: e, d: t, meta: n }) {
694
+ function o(i) {
695
+ return n.containers.flatMap((r) => r()).some((r) => r.contains(i));
696
+ }
697
+ t.microTask(() => {
698
+ var i;
699
+ if (window.getComputedStyle(e.documentElement).scrollBehavior !== "auto") {
700
+ let l = Te();
701
+ l.style(e.documentElement, "scrollBehavior", "auto"), t.add(() => t.microTask(() => l.dispose()));
702
+ }
703
+ let r = (i = window.scrollY) != null ? i : window.pageYOffset, s = null;
704
+ t.addEventListener(e, "click", (l) => {
705
+ if (l.target instanceof HTMLElement) try {
706
+ let a = l.target.closest("a");
707
+ if (!a) return;
708
+ let { hash: c } = new URL(a.href), f = e.querySelector(c);
709
+ f && !o(f) && (s = f);
710
+ } catch {
711
+ }
712
+ }, !0), t.addEventListener(e, "touchstart", (l) => {
713
+ if (l.target instanceof HTMLElement) if (o(l.target)) {
714
+ let a = l.target;
715
+ for (; a.parentElement && o(a.parentElement); ) a = a.parentElement;
716
+ t.style(a, "overscrollBehavior", "contain");
717
+ } else t.style(l.target, "touchAction", "none");
718
+ }), t.addEventListener(e, "touchmove", (l) => {
719
+ if (l.target instanceof HTMLElement) {
720
+ if (l.target.tagName === "INPUT") return;
721
+ if (o(l.target)) {
722
+ let a = l.target;
723
+ for (; a.parentElement && a.dataset.headlessuiPortal !== "" && !(a.scrollHeight > a.clientHeight || a.scrollWidth > a.clientWidth); ) a = a.parentElement;
724
+ a.dataset.headlessuiPortal === "" && l.preventDefault();
725
+ } else l.preventDefault();
726
+ }
727
+ }, { passive: !1 }), t.add(() => {
728
+ var l;
729
+ let a = (l = window.scrollY) != null ? l : window.pageYOffset;
730
+ r !== a && window.scrollTo(0, r), s && s.isConnected && (s.scrollIntoView({ block: "nearest" }), s = null);
731
+ });
732
+ });
733
+ } } : {};
734
+ }
735
+ function To() {
736
+ return { before({ doc: e, d: t }) {
737
+ t.style(e.documentElement, "overflow", "hidden");
738
+ } };
739
+ }
740
+ function Io(e) {
741
+ let t = {};
742
+ for (let n of e) Object.assign(t, n(t));
743
+ return t;
744
+ }
745
+ let Ee = nn(() => /* @__PURE__ */ new Map(), { PUSH(e, t) {
746
+ var n;
747
+ let o = (n = this.get(e)) != null ? n : { doc: e, count: 0, d: Te(), meta: /* @__PURE__ */ new Set() };
748
+ return o.count++, o.meta.add(t), this.set(e, o), this;
749
+ }, POP(e, t) {
750
+ let n = this.get(e);
751
+ return n && (n.count--, n.meta.delete(t)), this;
752
+ }, SCROLL_PREVENT({ doc: e, d: t, meta: n }) {
753
+ let o = { doc: e, d: t, meta: Io(n) }, i = [Co(), Ro(), To()];
754
+ i.forEach(({ before: r }) => r == null ? void 0 : r(o)), i.forEach(({ after: r }) => r == null ? void 0 : r(o));
755
+ }, SCROLL_ALLOW({ d: e }) {
756
+ e.dispose();
757
+ }, TEARDOWN({ doc: e }) {
758
+ this.delete(e);
759
+ } });
760
+ Ee.subscribe(() => {
761
+ let e = Ee.getSnapshot(), t = /* @__PURE__ */ new Map();
762
+ for (let [n] of e) t.set(n, n.documentElement.style.overflow);
763
+ for (let n of e.values()) {
764
+ let o = t.get(n.doc) === "hidden", i = n.count !== 0;
765
+ (i && !o || !i && o) && Ee.dispatch(n.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", n), n.count === 0 && Ee.dispatch("TEARDOWN", n);
766
+ }
767
+ });
768
+ function Mo(e, t, n = () => ({ containers: [] })) {
769
+ let o = on(Ee), i = t ? o.get(t) : void 0, r = i ? i.count > 0 : !1;
770
+ return B(() => {
771
+ if (!(!t || !e)) return Ee.dispatch("PUSH", t, n), () => Ee.dispatch("POP", t, n);
772
+ }, [e, t]), r;
773
+ }
774
+ function Po(e, t, n = () => [document.body]) {
775
+ let o = xt(e, "scroll-lock");
776
+ Mo(o, t, (i) => {
777
+ var r;
778
+ return { containers: [...(r = i.containers) != null ? r : [], n] };
779
+ });
780
+ }
781
+ function Dt(e) {
782
+ return [e.screenX, e.screenY];
783
+ }
784
+ function Ao() {
785
+ let e = K([-1, -1]);
786
+ return { wasMoved(t) {
787
+ let n = Dt(t);
788
+ return e.current[0] === n[0] && e.current[1] === n[1] ? !1 : (e.current = n, !0);
789
+ }, update(t) {
790
+ e.current = Dt(t);
791
+ } };
792
+ }
793
+ function $o(e, { container: t, accept: n, walk: o }) {
794
+ let i = K(n), r = K(o);
795
+ oe(() => {
796
+ i.current = n, r.current = o;
797
+ }, [n, o]), B(() => {
798
+ if (!t || !e) return;
799
+ let s = gt(t);
800
+ if (!s) return;
801
+ let l = i.current, a = r.current, c = Object.assign((d) => l(d), { acceptNode: l }), f = s.createTreeWalker(t, NodeFilter.SHOW_ELEMENT, c, !1);
802
+ for (; f.nextNode(); ) a(f.currentNode);
803
+ }, [t, e, i, r]);
804
+ }
805
+ function Ft(e, t) {
806
+ let n = K([]), o = I(e);
807
+ oe(() => {
808
+ let i = [...n.current];
809
+ for (let [r, s] of t.entries()) if (n.current[r] !== s) {
810
+ let l = o(t, i);
811
+ return n.current = t, l;
812
+ }
813
+ }, [o, ...t]);
814
+ }
815
+ function Pe(e) {
816
+ return an(e) ? (e.nodeName || "").toLowerCase() : "#document";
817
+ }
818
+ function ee(e) {
819
+ var t;
820
+ return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
821
+ }
822
+ function ce(e) {
823
+ var t;
824
+ return (t = (an(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
825
+ }
826
+ function an(e) {
827
+ return e instanceof Node || e instanceof ee(e).Node;
828
+ }
829
+ function X(e) {
830
+ return e instanceof Element || e instanceof ee(e).Element;
831
+ }
832
+ function se(e) {
833
+ return e instanceof HTMLElement || e instanceof ee(e).HTMLElement;
834
+ }
835
+ function Lt(e) {
836
+ return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof ee(e).ShadowRoot;
837
+ }
838
+ function Be(e) {
839
+ const {
840
+ overflow: t,
841
+ overflowX: n,
842
+ overflowY: o,
843
+ display: i
844
+ } = ie(e);
845
+ return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !["inline", "contents"].includes(i);
846
+ }
847
+ function Do(e) {
848
+ return ["table", "td", "th"].includes(Pe(e));
849
+ }
850
+ function ot(e) {
851
+ return [":popover-open", ":modal"].some((t) => {
852
+ try {
853
+ return e.matches(t);
854
+ } catch {
855
+ return !1;
856
+ }
857
+ });
858
+ }
859
+ function wt(e) {
860
+ const t = Et(), n = ie(e);
861
+ 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((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
862
+ }
863
+ function Fo(e) {
864
+ let t = fe(e);
865
+ for (; se(t) && !Ie(t); ) {
866
+ if (ot(t))
867
+ return null;
868
+ if (wt(t))
869
+ return t;
870
+ t = fe(t);
871
+ }
872
+ return null;
873
+ }
874
+ function Et() {
875
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
876
+ }
877
+ function Ie(e) {
878
+ return ["html", "body", "#document"].includes(Pe(e));
879
+ }
880
+ function ie(e) {
881
+ return ee(e).getComputedStyle(e);
882
+ }
883
+ function it(e) {
884
+ return X(e) ? {
885
+ scrollLeft: e.scrollLeft,
886
+ scrollTop: e.scrollTop
887
+ } : {
888
+ scrollLeft: e.scrollX,
889
+ scrollTop: e.scrollY
890
+ };
891
+ }
892
+ function fe(e) {
893
+ if (Pe(e) === "html")
894
+ return e;
895
+ const t = (
896
+ // Step into the shadow DOM of the parent of a slotted node.
897
+ e.assignedSlot || // DOM Element detected.
898
+ e.parentNode || // ShadowRoot detected.
899
+ Lt(e) && e.host || // Fallback.
900
+ ce(e)
901
+ );
902
+ return Lt(t) ? t.host : t;
903
+ }
904
+ function cn(e) {
905
+ const t = fe(e);
906
+ return Ie(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : se(t) && Be(t) ? t : cn(t);
907
+ }
908
+ function ze(e, t, n) {
909
+ var o;
910
+ t === void 0 && (t = []), n === void 0 && (n = !0);
911
+ const i = cn(e), r = i === ((o = e.ownerDocument) == null ? void 0 : o.body), s = ee(i);
912
+ return r ? t.concat(s, s.visualViewport || [], Be(i) ? i : [], s.frameElement && n ? ze(s.frameElement) : []) : t.concat(i, ze(i, [], n));
913
+ }
914
+ function Lo() {
915
+ const e = navigator.userAgentData;
916
+ return e && Array.isArray(e.brands) ? e.brands.map((t) => {
917
+ let {
918
+ brand: n,
919
+ version: o
920
+ } = t;
921
+ return n + "/" + o;
922
+ }).join(" ") : navigator.userAgent;
923
+ }
924
+ const ue = Math.min, Z = Math.max, Je = Math.round, Ke = Math.floor, de = (e) => ({
925
+ x: e,
926
+ y: e
927
+ }), _o = {
928
+ left: "right",
929
+ right: "left",
930
+ bottom: "top",
931
+ top: "bottom"
932
+ }, ko = {
933
+ start: "end",
934
+ end: "start"
935
+ };
936
+ function _t(e, t, n) {
937
+ return Z(e, ue(t, n));
938
+ }
939
+ function Ae(e, t) {
940
+ return typeof e == "function" ? e(t) : e;
941
+ }
942
+ function me(e) {
943
+ return e.split("-")[0];
944
+ }
945
+ function je(e) {
946
+ return e.split("-")[1];
947
+ }
948
+ function un(e) {
949
+ return e === "x" ? "y" : "x";
950
+ }
951
+ function fn(e) {
952
+ return e === "y" ? "height" : "width";
953
+ }
954
+ function ye(e) {
955
+ return ["top", "bottom"].includes(me(e)) ? "y" : "x";
956
+ }
957
+ function dn(e) {
958
+ return un(ye(e));
959
+ }
960
+ function No(e, t, n) {
961
+ n === void 0 && (n = !1);
962
+ const o = je(e), i = dn(e), r = fn(i);
963
+ let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
964
+ return t.reference[r] > t.floating[r] && (s = Qe(s)), [s, Qe(s)];
965
+ }
966
+ function zo(e) {
967
+ const t = Qe(e);
968
+ return [mt(e), t, mt(t)];
969
+ }
970
+ function mt(e) {
971
+ return e.replace(/start|end/g, (t) => ko[t]);
972
+ }
973
+ function Ho(e, t, n) {
974
+ const o = ["left", "right"], i = ["right", "left"], r = ["top", "bottom"], s = ["bottom", "top"];
975
+ switch (e) {
976
+ case "top":
977
+ case "bottom":
978
+ return n ? t ? i : o : t ? o : i;
979
+ case "left":
980
+ case "right":
981
+ return t ? r : s;
982
+ default:
983
+ return [];
984
+ }
985
+ }
986
+ function Vo(e, t, n, o) {
987
+ const i = je(e);
988
+ let r = Ho(me(e), n === "start", o);
989
+ return i && (r = r.map((s) => s + "-" + i), t && (r = r.concat(r.map(mt)))), r;
990
+ }
991
+ function Qe(e) {
992
+ return e.replace(/left|right|bottom|top/g, (t) => _o[t]);
993
+ }
994
+ function Wo(e) {
995
+ return {
996
+ top: 0,
997
+ right: 0,
998
+ bottom: 0,
999
+ left: 0,
1000
+ ...e
1001
+ };
1002
+ }
1003
+ function Bo(e) {
1004
+ return typeof e != "number" ? Wo(e) : {
1005
+ top: e,
1006
+ right: e,
1007
+ bottom: e,
1008
+ left: e
1009
+ };
1010
+ }
1011
+ function Ze(e) {
1012
+ const {
1013
+ x: t,
1014
+ y: n,
1015
+ width: o,
1016
+ height: i
1017
+ } = e;
1018
+ return {
1019
+ width: o,
1020
+ height: i,
1021
+ top: n,
1022
+ left: t,
1023
+ right: t + o,
1024
+ bottom: n + i,
1025
+ x: t,
1026
+ y: n
1027
+ };
1028
+ }
1029
+ function kt(e, t, n) {
1030
+ let {
1031
+ reference: o,
1032
+ floating: i
1033
+ } = e;
1034
+ const r = ye(t), s = dn(t), l = fn(s), a = me(t), c = r === "y", f = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, p = o[l] / 2 - i[l] / 2;
1035
+ let u;
1036
+ switch (a) {
1037
+ case "top":
1038
+ u = {
1039
+ x: f,
1040
+ y: o.y - i.height
1041
+ };
1042
+ break;
1043
+ case "bottom":
1044
+ u = {
1045
+ x: f,
1046
+ y: o.y + o.height
1047
+ };
1048
+ break;
1049
+ case "right":
1050
+ u = {
1051
+ x: o.x + o.width,
1052
+ y: d
1053
+ };
1054
+ break;
1055
+ case "left":
1056
+ u = {
1057
+ x: o.x - i.width,
1058
+ y: d
1059
+ };
1060
+ break;
1061
+ default:
1062
+ u = {
1063
+ x: o.x,
1064
+ y: o.y
1065
+ };
1066
+ }
1067
+ switch (je(t)) {
1068
+ case "start":
1069
+ u[s] -= p * (n && c ? -1 : 1);
1070
+ break;
1071
+ case "end":
1072
+ u[s] += p * (n && c ? -1 : 1);
1073
+ break;
1074
+ }
1075
+ return u;
1076
+ }
1077
+ const jo = async (e, t, n) => {
1078
+ const {
1079
+ placement: o = "bottom",
1080
+ strategy: i = "absolute",
1081
+ middleware: r = [],
1082
+ platform: s
1083
+ } = n, l = r.filter(Boolean), a = await (s.isRTL == null ? void 0 : s.isRTL(t));
1084
+ let c = await s.getElementRects({
1085
+ reference: e,
1086
+ floating: t,
1087
+ strategy: i
1088
+ }), {
1089
+ x: f,
1090
+ y: d
1091
+ } = kt(c, o, a), p = o, u = {}, m = 0;
1092
+ for (let h = 0; h < l.length; h++) {
1093
+ const {
1094
+ name: g,
1095
+ fn: v
1096
+ } = l[h], {
1097
+ x: E,
1098
+ y: b,
1099
+ data: x,
1100
+ reset: O
1101
+ } = await v({
1102
+ x: f,
1103
+ y: d,
1104
+ initialPlacement: o,
1105
+ placement: p,
1106
+ strategy: i,
1107
+ middlewareData: u,
1108
+ rects: c,
1109
+ platform: s,
1110
+ elements: {
1111
+ reference: e,
1112
+ floating: t
1113
+ }
1114
+ });
1115
+ f = E ?? f, d = b ?? d, u = {
1116
+ ...u,
1117
+ [g]: {
1118
+ ...u[g],
1119
+ ...x
1120
+ }
1121
+ }, O && m <= 50 && (m++, typeof O == "object" && (O.placement && (p = O.placement), O.rects && (c = O.rects === !0 ? await s.getElementRects({
1122
+ reference: e,
1123
+ floating: t,
1124
+ strategy: i
1125
+ }) : O.rects), {
1126
+ x: f,
1127
+ y: d
1128
+ } = kt(c, p, a)), h = -1);
1129
+ }
1130
+ return {
1131
+ x: f,
1132
+ y: d,
1133
+ placement: p,
1134
+ strategy: i,
1135
+ middlewareData: u
1136
+ };
1137
+ };
1138
+ async function rt(e, t) {
1139
+ var n;
1140
+ t === void 0 && (t = {});
1141
+ const {
1142
+ x: o,
1143
+ y: i,
1144
+ platform: r,
1145
+ rects: s,
1146
+ elements: l,
1147
+ strategy: a
1148
+ } = e, {
1149
+ boundary: c = "clippingAncestors",
1150
+ rootBoundary: f = "viewport",
1151
+ elementContext: d = "floating",
1152
+ altBoundary: p = !1,
1153
+ padding: u = 0
1154
+ } = Ae(t, e), m = Bo(u), g = l[p ? d === "floating" ? "reference" : "floating" : d], v = Ze(await r.getClippingRect({
1155
+ element: (n = await (r.isElement == null ? void 0 : r.isElement(g))) == null || n ? g : g.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(l.floating)),
1156
+ boundary: c,
1157
+ rootBoundary: f,
1158
+ strategy: a
1159
+ })), E = d === "floating" ? {
1160
+ x: o,
1161
+ y: i,
1162
+ width: s.floating.width,
1163
+ height: s.floating.height
1164
+ } : s.reference, b = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l.floating)), x = await (r.isElement == null ? void 0 : r.isElement(b)) ? await (r.getScale == null ? void 0 : r.getScale(b)) || {
1165
+ x: 1,
1166
+ y: 1
1167
+ } : {
1168
+ x: 1,
1169
+ y: 1
1170
+ }, O = Ze(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
1171
+ elements: l,
1172
+ rect: E,
1173
+ offsetParent: b,
1174
+ strategy: a
1175
+ }) : E);
1176
+ return {
1177
+ top: (v.top - O.top + m.top) / x.y,
1178
+ bottom: (O.bottom - v.bottom + m.bottom) / x.y,
1179
+ left: (v.left - O.left + m.left) / x.x,
1180
+ right: (O.right - v.right + m.right) / x.x
1181
+ };
1182
+ }
1183
+ const Uo = function(e) {
1184
+ return e === void 0 && (e = {}), {
1185
+ name: "flip",
1186
+ options: e,
1187
+ async fn(t) {
1188
+ var n, o;
1189
+ const {
1190
+ placement: i,
1191
+ middlewareData: r,
1192
+ rects: s,
1193
+ initialPlacement: l,
1194
+ platform: a,
1195
+ elements: c
1196
+ } = t, {
1197
+ mainAxis: f = !0,
1198
+ crossAxis: d = !0,
1199
+ fallbackPlacements: p,
1200
+ fallbackStrategy: u = "bestFit",
1201
+ fallbackAxisSideDirection: m = "none",
1202
+ flipAlignment: h = !0,
1203
+ ...g
1204
+ } = Ae(e, t);
1205
+ if ((n = r.arrow) != null && n.alignmentOffset)
1206
+ return {};
1207
+ const v = me(i), E = ye(l), b = me(l) === l, x = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), O = p || (b || !h ? [Qe(l)] : zo(l)), S = m !== "none";
1208
+ !p && S && O.push(...Vo(l, h, m, x));
1209
+ const M = [l, ...O], C = await rt(t, g), N = [];
1210
+ let $ = ((o = r.flip) == null ? void 0 : o.overflows) || [];
1211
+ if (f && N.push(C[v]), d) {
1212
+ const w = No(i, s, x);
1213
+ N.push(C[w[0]], C[w[1]]);
1214
+ }
1215
+ if ($ = [...$, {
1216
+ placement: i,
1217
+ overflows: N
1218
+ }], !N.every((w) => w <= 0)) {
1219
+ var D, k;
1220
+ const w = (((D = r.flip) == null ? void 0 : D.index) || 0) + 1, F = M[w];
1221
+ if (F)
1222
+ return {
1223
+ data: {
1224
+ index: w,
1225
+ overflows: $
1226
+ },
1227
+ reset: {
1228
+ placement: F
1229
+ }
1230
+ };
1231
+ let j = (k = $.filter((P) => P.overflows[0] <= 0).sort((P, L) => P.overflows[1] - L.overflows[1])[0]) == null ? void 0 : k.placement;
1232
+ if (!j)
1233
+ switch (u) {
1234
+ case "bestFit": {
1235
+ var z;
1236
+ const P = (z = $.filter((L) => {
1237
+ if (S) {
1238
+ const A = ye(L.placement);
1239
+ return A === E || // Create a bias to the `y` side axis due to horizontal
1240
+ // reading directions favoring greater width.
1241
+ A === "y";
1242
+ }
1243
+ return !0;
1244
+ }).map((L) => [L.placement, L.overflows.filter((A) => A > 0).reduce((A, J) => A + J, 0)]).sort((L, A) => L[1] - A[1])[0]) == null ? void 0 : z[0];
1245
+ P && (j = P);
1246
+ break;
1247
+ }
1248
+ case "initialPlacement":
1249
+ j = l;
1250
+ break;
1251
+ }
1252
+ if (i !== j)
1253
+ return {
1254
+ reset: {
1255
+ placement: j
1256
+ }
1257
+ };
1258
+ }
1259
+ return {};
1260
+ }
1261
+ };
1262
+ };
1263
+ async function Yo(e, t) {
1264
+ const {
1265
+ placement: n,
1266
+ platform: o,
1267
+ elements: i
1268
+ } = e, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = me(n), l = je(n), a = ye(n) === "y", c = ["left", "top"].includes(s) ? -1 : 1, f = r && a ? -1 : 1, d = Ae(t, e);
1269
+ let {
1270
+ mainAxis: p,
1271
+ crossAxis: u,
1272
+ alignmentAxis: m
1273
+ } = typeof d == "number" ? {
1274
+ mainAxis: d,
1275
+ crossAxis: 0,
1276
+ alignmentAxis: null
1277
+ } : {
1278
+ mainAxis: 0,
1279
+ crossAxis: 0,
1280
+ alignmentAxis: null,
1281
+ ...d
1282
+ };
1283
+ return l && typeof m == "number" && (u = l === "end" ? m * -1 : m), a ? {
1284
+ x: u * f,
1285
+ y: p * c
1286
+ } : {
1287
+ x: p * c,
1288
+ y: u * f
1289
+ };
1290
+ }
1291
+ const qo = function(e) {
1292
+ return e === void 0 && (e = 0), {
1293
+ name: "offset",
1294
+ options: e,
1295
+ async fn(t) {
1296
+ var n, o;
1297
+ const {
1298
+ x: i,
1299
+ y: r,
1300
+ placement: s,
1301
+ middlewareData: l
1302
+ } = t, a = await Yo(t, e);
1303
+ return s === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
1304
+ x: i + a.x,
1305
+ y: r + a.y,
1306
+ data: {
1307
+ ...a,
1308
+ placement: s
1309
+ }
1310
+ };
1311
+ }
1312
+ };
1313
+ }, Ko = function(e) {
1314
+ return e === void 0 && (e = {}), {
1315
+ name: "shift",
1316
+ options: e,
1317
+ async fn(t) {
1318
+ const {
1319
+ x: n,
1320
+ y: o,
1321
+ placement: i
1322
+ } = t, {
1323
+ mainAxis: r = !0,
1324
+ crossAxis: s = !1,
1325
+ limiter: l = {
1326
+ fn: (g) => {
1327
+ let {
1328
+ x: v,
1329
+ y: E
1330
+ } = g;
1331
+ return {
1332
+ x: v,
1333
+ y: E
1334
+ };
1335
+ }
1336
+ },
1337
+ ...a
1338
+ } = Ae(e, t), c = {
1339
+ x: n,
1340
+ y: o
1341
+ }, f = await rt(t, a), d = ye(me(i)), p = un(d);
1342
+ let u = c[p], m = c[d];
1343
+ if (r) {
1344
+ const g = p === "y" ? "top" : "left", v = p === "y" ? "bottom" : "right", E = u + f[g], b = u - f[v];
1345
+ u = _t(E, u, b);
1346
+ }
1347
+ if (s) {
1348
+ const g = d === "y" ? "top" : "left", v = d === "y" ? "bottom" : "right", E = m + f[g], b = m - f[v];
1349
+ m = _t(E, m, b);
1350
+ }
1351
+ const h = l.fn({
1352
+ ...t,
1353
+ [p]: u,
1354
+ [d]: m
1355
+ });
1356
+ return {
1357
+ ...h,
1358
+ data: {
1359
+ x: h.x - n,
1360
+ y: h.y - o
1361
+ }
1362
+ };
1363
+ }
1364
+ };
1365
+ }, Go = function(e) {
1366
+ return e === void 0 && (e = {}), {
1367
+ name: "size",
1368
+ options: e,
1369
+ async fn(t) {
1370
+ const {
1371
+ placement: n,
1372
+ rects: o,
1373
+ platform: i,
1374
+ elements: r
1375
+ } = t, {
1376
+ apply: s = () => {
1377
+ },
1378
+ ...l
1379
+ } = Ae(e, t), a = await rt(t, l), c = me(n), f = je(n), d = ye(n) === "y", {
1380
+ width: p,
1381
+ height: u
1382
+ } = o.floating;
1383
+ let m, h;
1384
+ c === "top" || c === "bottom" ? (m = c, h = f === (await (i.isRTL == null ? void 0 : i.isRTL(r.floating)) ? "start" : "end") ? "left" : "right") : (h = c, m = f === "end" ? "top" : "bottom");
1385
+ const g = u - a.top - a.bottom, v = p - a.left - a.right, E = ue(u - a[m], g), b = ue(p - a[h], v), x = !t.middlewareData.shift;
1386
+ let O = E, S = b;
1387
+ if (d ? S = f || x ? ue(b, v) : v : O = f || x ? ue(E, g) : g, x && !f) {
1388
+ const C = Z(a.left, 0), N = Z(a.right, 0), $ = Z(a.top, 0), D = Z(a.bottom, 0);
1389
+ d ? S = p - 2 * (C !== 0 || N !== 0 ? C + N : Z(a.left, a.right)) : O = u - 2 * ($ !== 0 || D !== 0 ? $ + D : Z(a.top, a.bottom));
1390
+ }
1391
+ await s({
1392
+ ...t,
1393
+ availableWidth: S,
1394
+ availableHeight: O
1395
+ });
1396
+ const M = await i.getDimensions(r.floating);
1397
+ return p !== M.width || u !== M.height ? {
1398
+ reset: {
1399
+ rects: !0
1400
+ }
1401
+ } : {};
1402
+ }
1403
+ };
1404
+ };
1405
+ function mn(e) {
1406
+ const t = ie(e);
1407
+ let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
1408
+ const i = se(e), r = i ? e.offsetWidth : n, s = i ? e.offsetHeight : o, l = Je(n) !== r || Je(o) !== s;
1409
+ return l && (n = r, o = s), {
1410
+ width: n,
1411
+ height: o,
1412
+ $: l
1413
+ };
1414
+ }
1415
+ function yt(e) {
1416
+ return X(e) ? e : e.contextElement;
1417
+ }
1418
+ function Ce(e) {
1419
+ const t = yt(e);
1420
+ if (!se(t))
1421
+ return de(1);
1422
+ const n = t.getBoundingClientRect(), {
1423
+ width: o,
1424
+ height: i,
1425
+ $: r
1426
+ } = mn(t);
1427
+ let s = (r ? Je(n.width) : n.width) / o, l = (r ? Je(n.height) : n.height) / i;
1428
+ return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
1429
+ x: s,
1430
+ y: l
1431
+ };
1432
+ }
1433
+ const Xo = /* @__PURE__ */ de(0);
1434
+ function pn(e) {
1435
+ const t = ee(e);
1436
+ return !Et() || !t.visualViewport ? Xo : {
1437
+ x: t.visualViewport.offsetLeft,
1438
+ y: t.visualViewport.offsetTop
1439
+ };
1440
+ }
1441
+ function Jo(e, t, n) {
1442
+ return t === void 0 && (t = !1), !n || t && n !== ee(e) ? !1 : t;
1443
+ }
1444
+ function Oe(e, t, n, o) {
1445
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
1446
+ const i = e.getBoundingClientRect(), r = yt(e);
1447
+ let s = de(1);
1448
+ t && (o ? X(o) && (s = Ce(o)) : s = Ce(e));
1449
+ const l = Jo(r, n, o) ? pn(r) : de(0);
1450
+ let a = (i.left + l.x) / s.x, c = (i.top + l.y) / s.y, f = i.width / s.x, d = i.height / s.y;
1451
+ if (r) {
1452
+ const p = ee(r), u = o && X(o) ? ee(o) : o;
1453
+ let m = p, h = m.frameElement;
1454
+ for (; h && o && u !== m; ) {
1455
+ const g = Ce(h), v = h.getBoundingClientRect(), E = ie(h), b = v.left + (h.clientLeft + parseFloat(E.paddingLeft)) * g.x, x = v.top + (h.clientTop + parseFloat(E.paddingTop)) * g.y;
1456
+ a *= g.x, c *= g.y, f *= g.x, d *= g.y, a += b, c += x, m = ee(h), h = m.frameElement;
1457
+ }
1458
+ }
1459
+ return Ze({
1460
+ width: f,
1461
+ height: d,
1462
+ x: a,
1463
+ y: c
1464
+ });
1465
+ }
1466
+ function Qo(e) {
1467
+ let {
1468
+ elements: t,
1469
+ rect: n,
1470
+ offsetParent: o,
1471
+ strategy: i
1472
+ } = e;
1473
+ const r = i === "fixed", s = ce(o), l = t ? ot(t.floating) : !1;
1474
+ if (o === s || l && r)
1475
+ return n;
1476
+ let a = {
1477
+ scrollLeft: 0,
1478
+ scrollTop: 0
1479
+ }, c = de(1);
1480
+ const f = de(0), d = se(o);
1481
+ if ((d || !d && !r) && ((Pe(o) !== "body" || Be(s)) && (a = it(o)), se(o))) {
1482
+ const p = Oe(o);
1483
+ c = Ce(o), f.x = p.x + o.clientLeft, f.y = p.y + o.clientTop;
1484
+ }
1485
+ return {
1486
+ width: n.width * c.x,
1487
+ height: n.height * c.y,
1488
+ x: n.x * c.x - a.scrollLeft * c.x + f.x,
1489
+ y: n.y * c.y - a.scrollTop * c.y + f.y
1490
+ };
1491
+ }
1492
+ function Zo(e) {
1493
+ return Array.from(e.getClientRects());
1494
+ }
1495
+ function hn(e) {
1496
+ return Oe(ce(e)).left + it(e).scrollLeft;
1497
+ }
1498
+ function ei(e) {
1499
+ const t = ce(e), n = it(e), o = e.ownerDocument.body, i = Z(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), r = Z(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
1500
+ let s = -n.scrollLeft + hn(e);
1501
+ const l = -n.scrollTop;
1502
+ return ie(o).direction === "rtl" && (s += Z(t.clientWidth, o.clientWidth) - i), {
1503
+ width: i,
1504
+ height: r,
1505
+ x: s,
1506
+ y: l
1507
+ };
1508
+ }
1509
+ function ti(e, t) {
1510
+ const n = ee(e), o = ce(e), i = n.visualViewport;
1511
+ let r = o.clientWidth, s = o.clientHeight, l = 0, a = 0;
1512
+ if (i) {
1513
+ r = i.width, s = i.height;
1514
+ const c = Et();
1515
+ (!c || c && t === "fixed") && (l = i.offsetLeft, a = i.offsetTop);
1516
+ }
1517
+ return {
1518
+ width: r,
1519
+ height: s,
1520
+ x: l,
1521
+ y: a
1522
+ };
1523
+ }
1524
+ function ni(e, t) {
1525
+ const n = Oe(e, !0, t === "fixed"), o = n.top + e.clientTop, i = n.left + e.clientLeft, r = se(e) ? Ce(e) : de(1), s = e.clientWidth * r.x, l = e.clientHeight * r.y, a = i * r.x, c = o * r.y;
1526
+ return {
1527
+ width: s,
1528
+ height: l,
1529
+ x: a,
1530
+ y: c
1531
+ };
1532
+ }
1533
+ function Nt(e, t, n) {
1534
+ let o;
1535
+ if (t === "viewport")
1536
+ o = ti(e, n);
1537
+ else if (t === "document")
1538
+ o = ei(ce(e));
1539
+ else if (X(t))
1540
+ o = ni(t, n);
1541
+ else {
1542
+ const i = pn(e);
1543
+ o = {
1544
+ ...t,
1545
+ x: t.x - i.x,
1546
+ y: t.y - i.y
1547
+ };
1548
+ }
1549
+ return Ze(o);
1550
+ }
1551
+ function gn(e, t) {
1552
+ const n = fe(e);
1553
+ return n === t || !X(n) || Ie(n) ? !1 : ie(n).position === "fixed" || gn(n, t);
1554
+ }
1555
+ function oi(e, t) {
1556
+ const n = t.get(e);
1557
+ if (n)
1558
+ return n;
1559
+ let o = ze(e, [], !1).filter((l) => X(l) && Pe(l) !== "body"), i = null;
1560
+ const r = ie(e).position === "fixed";
1561
+ let s = r ? fe(e) : e;
1562
+ for (; X(s) && !Ie(s); ) {
1563
+ const l = ie(s), a = wt(s);
1564
+ !a && l.position === "fixed" && (i = null), (r ? !a && !i : !a && l.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || Be(s) && !a && gn(e, s)) ? o = o.filter((f) => f !== s) : i = l, s = fe(s);
1565
+ }
1566
+ return t.set(e, o), o;
1567
+ }
1568
+ function ii(e) {
1569
+ let {
1570
+ element: t,
1571
+ boundary: n,
1572
+ rootBoundary: o,
1573
+ strategy: i
1574
+ } = e;
1575
+ const s = [...n === "clippingAncestors" ? ot(t) ? [] : oi(t, this._c) : [].concat(n), o], l = s[0], a = s.reduce((c, f) => {
1576
+ const d = Nt(t, f, i);
1577
+ return c.top = Z(d.top, c.top), c.right = ue(d.right, c.right), c.bottom = ue(d.bottom, c.bottom), c.left = Z(d.left, c.left), c;
1578
+ }, Nt(t, l, i));
1579
+ return {
1580
+ width: a.right - a.left,
1581
+ height: a.bottom - a.top,
1582
+ x: a.left,
1583
+ y: a.top
1584
+ };
1585
+ }
1586
+ function ri(e) {
1587
+ const {
1588
+ width: t,
1589
+ height: n
1590
+ } = mn(e);
1591
+ return {
1592
+ width: t,
1593
+ height: n
1594
+ };
1595
+ }
1596
+ function li(e, t, n) {
1597
+ const o = se(t), i = ce(t), r = n === "fixed", s = Oe(e, !0, r, t);
1598
+ let l = {
1599
+ scrollLeft: 0,
1600
+ scrollTop: 0
1601
+ };
1602
+ const a = de(0);
1603
+ if (o || !o && !r)
1604
+ if ((Pe(t) !== "body" || Be(i)) && (l = it(t)), o) {
1605
+ const d = Oe(t, !0, r, t);
1606
+ a.x = d.x + t.clientLeft, a.y = d.y + t.clientTop;
1607
+ } else i && (a.x = hn(i));
1608
+ const c = s.left + l.scrollLeft - a.x, f = s.top + l.scrollTop - a.y;
1609
+ return {
1610
+ x: c,
1611
+ y: f,
1612
+ width: s.width,
1613
+ height: s.height
1614
+ };
1615
+ }
1616
+ function st(e) {
1617
+ return ie(e).position === "static";
1618
+ }
1619
+ function zt(e, t) {
1620
+ return !se(e) || ie(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
1621
+ }
1622
+ function vn(e, t) {
1623
+ const n = ee(e);
1624
+ if (ot(e))
1625
+ return n;
1626
+ if (!se(e)) {
1627
+ let i = fe(e);
1628
+ for (; i && !Ie(i); ) {
1629
+ if (X(i) && !st(i))
1630
+ return i;
1631
+ i = fe(i);
1632
+ }
1633
+ return n;
1634
+ }
1635
+ let o = zt(e, t);
1636
+ for (; o && Do(o) && st(o); )
1637
+ o = zt(o, t);
1638
+ return o && Ie(o) && st(o) && !wt(o) ? n : o || Fo(e) || n;
1639
+ }
1640
+ const si = async function(e) {
1641
+ const t = this.getOffsetParent || vn, n = this.getDimensions, o = await n(e.floating);
1642
+ return {
1643
+ reference: li(e.reference, await t(e.floating), e.strategy),
1644
+ floating: {
1645
+ x: 0,
1646
+ y: 0,
1647
+ width: o.width,
1648
+ height: o.height
1649
+ }
1650
+ };
1651
+ };
1652
+ function ai(e) {
1653
+ return ie(e).direction === "rtl";
1654
+ }
1655
+ const ci = {
1656
+ convertOffsetParentRelativeRectToViewportRelativeRect: Qo,
1657
+ getDocumentElement: ce,
1658
+ getClippingRect: ii,
1659
+ getOffsetParent: vn,
1660
+ getElementRects: si,
1661
+ getClientRects: Zo,
1662
+ getDimensions: ri,
1663
+ getScale: Ce,
1664
+ isElement: X,
1665
+ isRTL: ai
1666
+ };
1667
+ function ui(e, t) {
1668
+ let n = null, o;
1669
+ const i = ce(e);
1670
+ function r() {
1671
+ var l;
1672
+ clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
1673
+ }
1674
+ function s(l, a) {
1675
+ l === void 0 && (l = !1), a === void 0 && (a = 1), r();
1676
+ const {
1677
+ left: c,
1678
+ top: f,
1679
+ width: d,
1680
+ height: p
1681
+ } = e.getBoundingClientRect();
1682
+ if (l || t(), !d || !p)
1683
+ return;
1684
+ const u = Ke(f), m = Ke(i.clientWidth - (c + d)), h = Ke(i.clientHeight - (f + p)), g = Ke(c), E = {
1685
+ rootMargin: -u + "px " + -m + "px " + -h + "px " + -g + "px",
1686
+ threshold: Z(0, ue(1, a)) || 1
1687
+ };
1688
+ let b = !0;
1689
+ function x(O) {
1690
+ const S = O[0].intersectionRatio;
1691
+ if (S !== a) {
1692
+ if (!b)
1693
+ return s();
1694
+ S ? s(!1, S) : o = setTimeout(() => {
1695
+ s(!1, 1e-7);
1696
+ }, 1e3);
1697
+ }
1698
+ b = !1;
1699
+ }
1700
+ try {
1701
+ n = new IntersectionObserver(x, {
1702
+ ...E,
1703
+ // Handle <iframe>s
1704
+ root: i.ownerDocument
1705
+ });
1706
+ } catch {
1707
+ n = new IntersectionObserver(x, E);
1708
+ }
1709
+ n.observe(e);
1710
+ }
1711
+ return s(!0), r;
1712
+ }
1713
+ function fi(e, t, n, o) {
1714
+ o === void 0 && (o = {});
1715
+ const {
1716
+ ancestorScroll: i = !0,
1717
+ ancestorResize: r = !0,
1718
+ elementResize: s = typeof ResizeObserver == "function",
1719
+ layoutShift: l = typeof IntersectionObserver == "function",
1720
+ animationFrame: a = !1
1721
+ } = o, c = yt(e), f = i || r ? [...c ? ze(c) : [], ...ze(t)] : [];
1722
+ f.forEach((v) => {
1723
+ i && v.addEventListener("scroll", n, {
1724
+ passive: !0
1725
+ }), r && v.addEventListener("resize", n);
1726
+ });
1727
+ const d = c && l ? ui(c, n) : null;
1728
+ let p = -1, u = null;
1729
+ s && (u = new ResizeObserver((v) => {
1730
+ let [E] = v;
1731
+ E && E.target === c && u && (u.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1732
+ var b;
1733
+ (b = u) == null || b.observe(t);
1734
+ })), n();
1735
+ }), c && !a && u.observe(c), u.observe(t));
1736
+ let m, h = a ? Oe(e) : null;
1737
+ a && g();
1738
+ function g() {
1739
+ const v = Oe(e);
1740
+ h && (v.x !== h.x || v.y !== h.y || v.width !== h.width || v.height !== h.height) && n(), h = v, m = requestAnimationFrame(g);
1741
+ }
1742
+ return n(), () => {
1743
+ var v;
1744
+ f.forEach((E) => {
1745
+ i && E.removeEventListener("scroll", n), r && E.removeEventListener("resize", n);
1746
+ }), d == null || d(), (v = u) == null || v.disconnect(), u = null, a && cancelAnimationFrame(m);
1747
+ };
1748
+ }
1749
+ const at = rt, di = qo, mi = Ko, pi = Uo, hi = Go, gi = (e, t, n) => {
1750
+ const o = /* @__PURE__ */ new Map(), i = {
1751
+ platform: ci,
1752
+ ...n
1753
+ }, r = {
1754
+ ...i.platform,
1755
+ _c: o
1756
+ };
1757
+ return jo(e, t, {
1758
+ ...i,
1759
+ platform: r
1760
+ });
1761
+ };
1762
+ var Ge = typeof document < "u" ? en : oe;
1763
+ function et(e, t) {
1764
+ if (e === t)
1765
+ return !0;
1766
+ if (typeof e != typeof t)
1767
+ return !1;
1768
+ if (typeof e == "function" && e.toString() === t.toString())
1769
+ return !0;
1770
+ let n, o, i;
1771
+ if (e && t && typeof e == "object") {
1772
+ if (Array.isArray(e)) {
1773
+ if (n = e.length, n !== t.length) return !1;
1774
+ for (o = n; o-- !== 0; )
1775
+ if (!et(e[o], t[o]))
1776
+ return !1;
1777
+ return !0;
1778
+ }
1779
+ if (i = Object.keys(e), n = i.length, n !== Object.keys(t).length)
1780
+ return !1;
1781
+ for (o = n; o-- !== 0; )
1782
+ if (!{}.hasOwnProperty.call(t, i[o]))
1783
+ return !1;
1784
+ for (o = n; o-- !== 0; ) {
1785
+ const r = i[o];
1786
+ if (!(r === "_owner" && e.$$typeof) && !et(e[r], t[r]))
1787
+ return !1;
1788
+ }
1789
+ return !0;
1790
+ }
1791
+ return e !== e && t !== t;
1792
+ }
1793
+ function bn(e) {
1794
+ return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
1795
+ }
1796
+ function Ht(e, t) {
1797
+ const n = bn(e);
1798
+ return Math.round(t * n) / n;
1799
+ }
1800
+ function Vt(e) {
1801
+ const t = y.useRef(e);
1802
+ return Ge(() => {
1803
+ t.current = e;
1804
+ }), t;
1805
+ }
1806
+ function vi(e) {
1807
+ e === void 0 && (e = {});
1808
+ const {
1809
+ placement: t = "bottom",
1810
+ strategy: n = "absolute",
1811
+ middleware: o = [],
1812
+ platform: i,
1813
+ elements: {
1814
+ reference: r,
1815
+ floating: s
1816
+ } = {},
1817
+ transform: l = !0,
1818
+ whileElementsMounted: a,
1819
+ open: c
1820
+ } = e, [f, d] = y.useState({
1821
+ x: 0,
1822
+ y: 0,
1823
+ strategy: n,
1824
+ placement: t,
1825
+ middlewareData: {},
1826
+ isPositioned: !1
1827
+ }), [p, u] = y.useState(o);
1828
+ et(p, o) || u(o);
1829
+ const [m, h] = y.useState(null), [g, v] = y.useState(null), E = y.useCallback((P) => {
1830
+ P !== S.current && (S.current = P, h(P));
1831
+ }, []), b = y.useCallback((P) => {
1832
+ P !== M.current && (M.current = P, v(P));
1833
+ }, []), x = r || m, O = s || g, S = y.useRef(null), M = y.useRef(null), C = y.useRef(f), N = a != null, $ = Vt(a), D = Vt(i), k = y.useCallback(() => {
1834
+ if (!S.current || !M.current)
1835
+ return;
1836
+ const P = {
1837
+ placement: t,
1838
+ strategy: n,
1839
+ middleware: p
1840
+ };
1841
+ D.current && (P.platform = D.current), gi(S.current, M.current, P).then((L) => {
1842
+ const A = {
1843
+ ...L,
1844
+ isPositioned: !0
1845
+ };
1846
+ z.current && !et(C.current, A) && (C.current = A, Ne.flushSync(() => {
1847
+ d(A);
1848
+ }));
1849
+ });
1850
+ }, [p, t, n, D]);
1851
+ Ge(() => {
1852
+ c === !1 && C.current.isPositioned && (C.current.isPositioned = !1, d((P) => ({
1853
+ ...P,
1854
+ isPositioned: !1
1855
+ })));
1856
+ }, [c]);
1857
+ const z = y.useRef(!1);
1858
+ Ge(() => (z.current = !0, () => {
1859
+ z.current = !1;
1860
+ }), []), Ge(() => {
1861
+ if (x && (S.current = x), O && (M.current = O), x && O) {
1862
+ if ($.current)
1863
+ return $.current(x, O, k);
1864
+ k();
1865
+ }
1866
+ }, [x, O, k, $, N]);
1867
+ const w = y.useMemo(() => ({
1868
+ reference: S,
1869
+ floating: M,
1870
+ setReference: E,
1871
+ setFloating: b
1872
+ }), [E, b]), F = y.useMemo(() => ({
1873
+ reference: x,
1874
+ floating: O
1875
+ }), [x, O]), j = y.useMemo(() => {
1876
+ const P = {
1877
+ position: n,
1878
+ left: 0,
1879
+ top: 0
1880
+ };
1881
+ if (!F.floating)
1882
+ return P;
1883
+ const L = Ht(F.floating, f.x), A = Ht(F.floating, f.y);
1884
+ return l ? {
1885
+ ...P,
1886
+ transform: "translate(" + L + "px, " + A + "px)",
1887
+ ...bn(F.floating) >= 1.5 && {
1888
+ willChange: "transform"
1889
+ }
1890
+ } : {
1891
+ position: n,
1892
+ left: L,
1893
+ top: A
1894
+ };
1895
+ }, [n, l, F.floating, f.x, f.y]);
1896
+ return y.useMemo(() => ({
1897
+ ...f,
1898
+ update: k,
1899
+ refs: w,
1900
+ elements: F,
1901
+ floatingStyles: j
1902
+ }), [f, k, w, F, j]);
1903
+ }
1904
+ const xn = (e, t) => ({
1905
+ ...di(e),
1906
+ options: [e, t]
1907
+ }), bi = (e, t) => ({
1908
+ ...mi(e),
1909
+ options: [e, t]
1910
+ }), xi = (e, t) => ({
1911
+ ...pi(e),
1912
+ options: [e, t]
1913
+ }), wi = (e, t) => ({
1914
+ ...hi(e),
1915
+ options: [e, t]
1916
+ }), wn = {
1917
+ ...y
1918
+ }, Ei = wn.useInsertionEffect, yi = Ei || ((e) => e());
1919
+ function En(e) {
1920
+ const t = y.useRef(() => {
1921
+ if (process.env.NODE_ENV !== "production")
1922
+ throw new Error("Cannot call an event handler while rendering.");
1923
+ });
1924
+ return yi(() => {
1925
+ t.current = e;
1926
+ }), y.useCallback(function() {
1927
+ for (var n = arguments.length, o = new Array(n), i = 0; i < n; i++)
1928
+ o[i] = arguments[i];
1929
+ return t.current == null ? void 0 : t.current(...o);
1930
+ }, []);
1931
+ }
1932
+ var pt = typeof document < "u" ? en : oe;
1933
+ let Wt = !1, Oi = 0;
1934
+ const Bt = () => (
1935
+ // Ensure the id is unique with multiple independent versions of Floating UI
1936
+ // on <React 18
1937
+ "floating-ui-" + Math.random().toString(36).slice(2, 6) + Oi++
1938
+ );
1939
+ function Si() {
1940
+ const [e, t] = y.useState(() => Wt ? Bt() : void 0);
1941
+ return pt(() => {
1942
+ e == null && t(Bt());
1943
+ }, []), y.useEffect(() => {
1944
+ Wt = !0;
1945
+ }, []), e;
1946
+ }
1947
+ const Ri = wn.useId, Ci = Ri || Si;
1948
+ let He;
1949
+ process.env.NODE_ENV !== "production" && (He = /* @__PURE__ */ new Set());
1950
+ function Ti() {
1951
+ for (var e, t = arguments.length, n = new Array(t), o = 0; o < t; o++)
1952
+ n[o] = arguments[o];
1953
+ const i = "Floating UI: " + n.join(" ");
1954
+ if (!((e = He) != null && e.has(i))) {
1955
+ var r;
1956
+ (r = He) == null || r.add(i), console.warn(i);
1957
+ }
1958
+ }
1959
+ function Ii() {
1960
+ for (var e, t = arguments.length, n = new Array(t), o = 0; o < t; o++)
1961
+ n[o] = arguments[o];
1962
+ const i = "Floating UI: " + n.join(" ");
1963
+ if (!((e = He) != null && e.has(i))) {
1964
+ var r;
1965
+ (r = He) == null || r.add(i), console.error(i);
1966
+ }
1967
+ }
1968
+ function Mi() {
1969
+ const e = /* @__PURE__ */ new Map();
1970
+ return {
1971
+ emit(t, n) {
1972
+ var o;
1973
+ (o = e.get(t)) == null || o.forEach((i) => i(n));
1974
+ },
1975
+ on(t, n) {
1976
+ e.set(t, [...e.get(t) || [], n]);
1977
+ },
1978
+ off(t, n) {
1979
+ var o;
1980
+ e.set(t, ((o = e.get(t)) == null ? void 0 : o.filter((i) => i !== n)) || []);
1981
+ }
1982
+ };
1983
+ }
1984
+ const Pi = /* @__PURE__ */ y.createContext(null), Ai = /* @__PURE__ */ y.createContext(null), $i = () => {
1985
+ var e;
1986
+ return ((e = y.useContext(Pi)) == null ? void 0 : e.id) || null;
1987
+ }, Di = () => y.useContext(Ai);
1988
+ function Fi(e) {
1989
+ const {
1990
+ open: t = !1,
1991
+ onOpenChange: n,
1992
+ elements: o
1993
+ } = e, i = Ci(), r = y.useRef({}), [s] = y.useState(() => Mi()), l = $i() != null;
1994
+ if (process.env.NODE_ENV !== "production") {
1995
+ const u = o.reference;
1996
+ u && !X(u) && Ii("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
1997
+ }
1998
+ const [a, c] = y.useState(o.reference), f = En((u, m, h) => {
1999
+ r.current.openEvent = u ? m : void 0, s.emit("openchange", {
2000
+ open: u,
2001
+ event: m,
2002
+ reason: h,
2003
+ nested: l
2004
+ }), n == null || n(u, m, h);
2005
+ }), d = y.useMemo(() => ({
2006
+ setPositionReference: c
2007
+ }), []), p = y.useMemo(() => ({
2008
+ reference: a || o.reference || null,
2009
+ floating: o.floating || null,
2010
+ domReference: o.reference
2011
+ }), [a, o.reference, o.floating]);
2012
+ return y.useMemo(() => ({
2013
+ dataRef: r,
2014
+ open: t,
2015
+ onOpenChange: f,
2016
+ elements: p,
2017
+ events: s,
2018
+ floatingId: i,
2019
+ refs: d
2020
+ }), [t, f, p, s, i, d]);
2021
+ }
2022
+ function Li(e) {
2023
+ e === void 0 && (e = {});
2024
+ const {
2025
+ nodeId: t
2026
+ } = e, n = Fi({
2027
+ ...e,
2028
+ elements: {
2029
+ reference: null,
2030
+ floating: null,
2031
+ ...e.elements
2032
+ }
2033
+ }), o = e.rootContext || n, i = o.elements, [r, s] = y.useState(null), [l, a] = y.useState(null), f = (i == null ? void 0 : i.reference) || r, d = y.useRef(null), p = Di();
2034
+ pt(() => {
2035
+ f && (d.current = f);
2036
+ }, [f]);
2037
+ const u = vi({
2038
+ ...e,
2039
+ elements: {
2040
+ ...i,
2041
+ ...l && {
2042
+ reference: l
2043
+ }
2044
+ }
2045
+ }), m = y.useCallback((b) => {
2046
+ const x = X(b) ? {
2047
+ getBoundingClientRect: () => b.getBoundingClientRect(),
2048
+ contextElement: b
2049
+ } : b;
2050
+ a(x), u.refs.setReference(x);
2051
+ }, [u.refs]), h = y.useCallback((b) => {
2052
+ (X(b) || b === null) && (d.current = b, s(b)), (X(u.refs.reference.current) || u.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
2053
+ // `null` to support `positionReference` + an unstable `reference`
2054
+ // callback ref.
2055
+ b !== null && !X(b)) && u.refs.setReference(b);
2056
+ }, [u.refs]), g = y.useMemo(() => ({
2057
+ ...u.refs,
2058
+ setReference: h,
2059
+ setPositionReference: m,
2060
+ domReference: d
2061
+ }), [u.refs, h, m]), v = y.useMemo(() => ({
2062
+ ...u.elements,
2063
+ domReference: f
2064
+ }), [u.elements, f]), E = y.useMemo(() => ({
2065
+ ...u,
2066
+ ...o,
2067
+ refs: g,
2068
+ elements: v,
2069
+ nodeId: t
2070
+ }), [u, g, v, t, o]);
2071
+ return pt(() => {
2072
+ o.dataRef.current.floatingContext = E;
2073
+ const b = p == null ? void 0 : p.nodesRef.current.find((x) => x.id === t);
2074
+ b && (b.context = E);
2075
+ }), y.useMemo(() => ({
2076
+ ...u,
2077
+ context: E,
2078
+ refs: g,
2079
+ elements: v
2080
+ }), [u, g, v, E]);
2081
+ }
2082
+ const jt = "active", Ut = "selected";
2083
+ function ct(e, t, n) {
2084
+ const o = /* @__PURE__ */ new Map(), i = n === "item";
2085
+ let r = e;
2086
+ if (i && e) {
2087
+ const {
2088
+ [jt]: s,
2089
+ [Ut]: l,
2090
+ ...a
2091
+ } = e;
2092
+ r = a;
2093
+ }
2094
+ return {
2095
+ ...n === "floating" && {
2096
+ tabIndex: -1
2097
+ },
2098
+ ...r,
2099
+ ...t.map((s) => {
2100
+ const l = s ? s[n] : null;
2101
+ return typeof l == "function" ? e ? l(e) : null : l;
2102
+ }).concat(e).reduce((s, l) => (l && Object.entries(l).forEach((a) => {
2103
+ let [c, f] = a;
2104
+ if (!(i && [jt, Ut].includes(c)))
2105
+ if (c.indexOf("on") === 0) {
2106
+ if (o.has(c) || o.set(c, []), typeof f == "function") {
2107
+ var d;
2108
+ (d = o.get(c)) == null || d.push(f), s[c] = function() {
2109
+ for (var p, u = arguments.length, m = new Array(u), h = 0; h < u; h++)
2110
+ m[h] = arguments[h];
2111
+ return (p = o.get(c)) == null ? void 0 : p.map((g) => g(...m)).find((g) => g !== void 0);
2112
+ };
2113
+ }
2114
+ } else
2115
+ s[c] = f;
2116
+ }), s), {})
2117
+ };
2118
+ }
2119
+ function _i(e) {
2120
+ e === void 0 && (e = []);
2121
+ const t = e.map((l) => l == null ? void 0 : l.reference), n = e.map((l) => l == null ? void 0 : l.floating), o = e.map((l) => l == null ? void 0 : l.item), i = y.useCallback(
2122
+ (l) => ct(l, e, "reference"),
2123
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2124
+ t
2125
+ ), r = y.useCallback(
2126
+ (l) => ct(l, e, "floating"),
2127
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2128
+ n
2129
+ ), s = y.useCallback(
2130
+ (l) => ct(l, e, "item"),
2131
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2132
+ o
2133
+ );
2134
+ return y.useMemo(() => ({
2135
+ getReferenceProps: i,
2136
+ getFloatingProps: r,
2137
+ getItemProps: s
2138
+ }), [i, r, s]);
2139
+ }
2140
+ function Yt(e, t) {
2141
+ return {
2142
+ ...e,
2143
+ rects: {
2144
+ ...e.rects,
2145
+ floating: {
2146
+ ...e.rects.floating,
2147
+ height: t
2148
+ }
2149
+ }
2150
+ };
2151
+ }
2152
+ const ki = (e) => ({
2153
+ name: "inner",
2154
+ options: e,
2155
+ async fn(t) {
2156
+ const {
2157
+ listRef: n,
2158
+ overflowRef: o,
2159
+ onFallbackChange: i,
2160
+ offset: r = 0,
2161
+ index: s = 0,
2162
+ minItemsVisible: l = 4,
2163
+ referenceOverflowThreshold: a = 0,
2164
+ scrollRef: c,
2165
+ ...f
2166
+ } = Ae(e, t), {
2167
+ rects: d,
2168
+ elements: {
2169
+ floating: p
2170
+ }
2171
+ } = t, u = n.current[s];
2172
+ if (process.env.NODE_ENV !== "production" && (t.placement.startsWith("bottom") || Ti('`placement` side must be "bottom" when using the `inner`', "middleware.")), !u)
2173
+ return {};
2174
+ const m = {
2175
+ ...t,
2176
+ ...await xn(-u.offsetTop - p.clientTop - d.reference.height / 2 - u.offsetHeight / 2 - r).fn(t)
2177
+ }, h = (c == null ? void 0 : c.current) || p, g = await at(Yt(m, h.scrollHeight), f), v = await at(m, {
2178
+ ...f,
2179
+ elementContext: "reference"
2180
+ }), E = Math.max(0, g.top), b = m.y + E, x = Math.max(0, h.scrollHeight - E - Math.max(0, g.bottom));
2181
+ return h.style.maxHeight = x + "px", h.scrollTop = E, i && (h.offsetHeight < u.offsetHeight * Math.min(l, n.current.length - 1) - 1 || v.top >= -a || v.bottom >= -a ? Ne.flushSync(() => i(!0)) : Ne.flushSync(() => i(!1))), o && (o.current = await at(Yt({
2182
+ ...m,
2183
+ y: b
2184
+ }, h.offsetHeight), f)), {
2185
+ y: b
2186
+ };
2187
+ }
2188
+ });
2189
+ function Ni(e, t) {
2190
+ const {
2191
+ open: n,
2192
+ elements: o
2193
+ } = e, {
2194
+ enabled: i = !0,
2195
+ overflowRef: r,
2196
+ scrollRef: s,
2197
+ onChange: l
2198
+ } = t, a = En(l), c = y.useRef(!1), f = y.useRef(null), d = y.useRef(null);
2199
+ y.useEffect(() => {
2200
+ if (!i) return;
2201
+ function u(h) {
2202
+ if (h.ctrlKey || !m || r.current == null)
2203
+ return;
2204
+ const g = h.deltaY, v = r.current.top >= -0.5, E = r.current.bottom >= -0.5, b = m.scrollHeight - m.clientHeight, x = g < 0 ? -1 : 1, O = g < 0 ? "max" : "min";
2205
+ m.scrollHeight <= m.clientHeight || (!v && g > 0 || !E && g < 0 ? (h.preventDefault(), Ne.flushSync(() => {
2206
+ a((S) => S + Math[O](g, b * x));
2207
+ })) : /firefox/i.test(Lo()) && (m.scrollTop += g));
2208
+ }
2209
+ const m = (s == null ? void 0 : s.current) || o.floating;
2210
+ if (n && m)
2211
+ return m.addEventListener("wheel", u), requestAnimationFrame(() => {
2212
+ f.current = m.scrollTop, r.current != null && (d.current = {
2213
+ ...r.current
2214
+ });
2215
+ }), () => {
2216
+ f.current = null, d.current = null, m.removeEventListener("wheel", u);
2217
+ };
2218
+ }, [i, n, o.floating, r, s, a]);
2219
+ const p = y.useMemo(() => ({
2220
+ onKeyDown() {
2221
+ c.current = !0;
2222
+ },
2223
+ onWheel() {
2224
+ c.current = !1;
2225
+ },
2226
+ onPointerMove() {
2227
+ c.current = !1;
2228
+ },
2229
+ onScroll() {
2230
+ const u = (s == null ? void 0 : s.current) || o.floating;
2231
+ if (!(!r.current || !u || !c.current)) {
2232
+ if (f.current !== null) {
2233
+ const m = u.scrollTop - f.current;
2234
+ (r.current.bottom < -0.5 && m < -1 || r.current.top < -0.5 && m > 1) && Ne.flushSync(() => a((h) => h + m));
2235
+ }
2236
+ requestAnimationFrame(() => {
2237
+ f.current = u.scrollTop;
2238
+ });
2239
+ }
2240
+ }
2241
+ }), [o.floating, a, r, s]);
2242
+ return y.useMemo(() => i ? {
2243
+ floating: p
2244
+ } : {}, [i, p]);
2245
+ }
2246
+ let Ue = ge({ styles: void 0, setReference: () => {
2247
+ }, setFloating: () => {
2248
+ }, getReferenceProps: () => ({}), getFloatingProps: () => ({}), slot: {} });
2249
+ Ue.displayName = "FloatingContext";
2250
+ let Ot = ge(null);
2251
+ Ot.displayName = "PlacementContext";
2252
+ function zi(e) {
2253
+ return q(() => e ? typeof e == "string" ? { to: e } : e : null, [e]);
2254
+ }
2255
+ function Hi() {
2256
+ return le(Ue).setReference;
2257
+ }
2258
+ function Vi() {
2259
+ let { getFloatingProps: e, slot: t } = le(Ue);
2260
+ return ke((...n) => Object.assign({}, e(...n), { "data-anchor": t.anchor }), [e, t]);
2261
+ }
2262
+ function Wi(e = null) {
2263
+ e === !1 && (e = null), typeof e == "string" && (e = { to: e });
2264
+ let t = le(Ot), n = q(() => e, [JSON.stringify(e, typeof HTMLElement < "u" ? (i, r) => r instanceof HTMLElement ? r.outerHTML : r : void 0)]);
2265
+ B(() => {
2266
+ t == null || t(n ?? null);
2267
+ }, [t, n]);
2268
+ let o = le(Ue);
2269
+ return q(() => [o.setFloating, e ? o.styles : {}], [o.setFloating, e, o.styles]);
2270
+ }
2271
+ let qt = 4;
2272
+ function Bi({ children: e, enabled: t = !0 }) {
2273
+ let [n, o] = ae(null), [i, r] = ae(0), s = K(null), [l, a] = ae(null);
2274
+ ji(l);
2275
+ let c = t && n !== null && l !== null, { to: f = "bottom", gap: d = 0, offset: p = 0, padding: u = 0, inner: m } = Ui(n, l), [h, g = "center"] = f.split(" ");
2276
+ B(() => {
2277
+ c && r(0);
2278
+ }, [c]);
2279
+ let { refs: v, floatingStyles: E, context: b } = Li({ open: c, placement: h === "selection" ? g === "center" ? "bottom" : `bottom-${g}` : g === "center" ? `${h}` : `${h}-${g}`, strategy: "absolute", transform: !1, middleware: [xn({ mainAxis: h === "selection" ? 0 : d, crossAxis: p }), bi({ padding: u }), h !== "selection" && xi({ padding: u }), h === "selection" && m ? ki({ ...m, padding: u, overflowRef: s, offset: i, minItemsVisible: qt, referenceOverflowThreshold: u, onFallbackChange(D) {
2280
+ var k, z;
2281
+ if (!D) return;
2282
+ let w = b.elements.floating;
2283
+ if (!w) return;
2284
+ let F = parseFloat(getComputedStyle(w).scrollPaddingBottom) || 0, j = Math.min(qt, w.childElementCount), P = 0, L = 0;
2285
+ for (let A of (z = (k = b.elements.floating) == null ? void 0 : k.childNodes) != null ? z : []) if (A instanceof HTMLElement) {
2286
+ let J = A.offsetTop, U = J + A.clientHeight + F, ve = w.scrollTop, R = ve + w.clientHeight;
2287
+ if (J >= ve && U <= R) j--;
2288
+ else {
2289
+ L = Math.max(0, Math.min(U, R) - Math.max(J, ve)), P = A.clientHeight;
2290
+ break;
2291
+ }
2292
+ }
2293
+ j >= 1 && r((A) => {
2294
+ let J = P * j - L + F;
2295
+ return A >= J ? A : J;
2296
+ });
2297
+ } }) : null, wi({ padding: u, apply({ availableWidth: D, availableHeight: k, elements: z }) {
2298
+ Object.assign(z.floating.style, { overflow: "auto", maxWidth: `${D}px`, maxHeight: `min(var(--anchor-max-height, 100vh), ${k}px)` });
2299
+ } })].filter(Boolean), whileElementsMounted: fi }), [x = h, O = g] = b.placement.split("-");
2300
+ h === "selection" && (x = "selection");
2301
+ let S = q(() => ({ anchor: [x, O].filter(Boolean).join(" ") }), [x, O]), M = Ni(b, { overflowRef: s, onChange: r }), { getReferenceProps: C, getFloatingProps: N } = _i([M]), $ = I((D) => {
2302
+ a(D), v.setFloating(D);
2303
+ });
2304
+ return y.createElement(Ot.Provider, { value: o }, y.createElement(Ue.Provider, { value: { setFloating: $, setReference: v.setReference, styles: E, getReferenceProps: C, getFloatingProps: N, slot: S } }, e));
2305
+ }
2306
+ function ji(e) {
2307
+ B(() => {
2308
+ if (!e) return;
2309
+ let t = new MutationObserver(() => {
2310
+ let n = window.getComputedStyle(e).maxHeight, o = parseFloat(n);
2311
+ if (isNaN(o)) return;
2312
+ let i = parseInt(n);
2313
+ isNaN(i) || o !== i && (e.style.maxHeight = `${Math.ceil(o)}px`);
2314
+ });
2315
+ return t.observe(e, { attributes: !0, attributeFilter: ["style"] }), () => {
2316
+ t.disconnect();
2317
+ };
2318
+ }, [e]);
2319
+ }
2320
+ function Ui(e, t) {
2321
+ var n, o, i;
2322
+ let r = ut((n = e == null ? void 0 : e.gap) != null ? n : "var(--anchor-gap, 0)", t), s = ut((o = e == null ? void 0 : e.offset) != null ? o : "var(--anchor-offset, 0)", t), l = ut((i = e == null ? void 0 : e.padding) != null ? i : "var(--anchor-padding, 0)", t);
2323
+ return { ...e, gap: r, offset: s, padding: l };
2324
+ }
2325
+ function ut(e, t, n = void 0) {
2326
+ let o = Xt(), i = I((a, c) => {
2327
+ if (a == null) return [n, null];
2328
+ if (typeof a == "number") return [a, null];
2329
+ if (typeof a == "string") {
2330
+ if (!c) return [n, null];
2331
+ let f = Kt(a, c);
2332
+ return [f, (d) => {
2333
+ let p = yn(a);
2334
+ {
2335
+ let u = p.map((m) => window.getComputedStyle(c).getPropertyValue(m));
2336
+ o.requestAnimationFrame(function m() {
2337
+ o.nextFrame(m);
2338
+ let h = !1;
2339
+ for (let [v, E] of p.entries()) {
2340
+ let b = window.getComputedStyle(c).getPropertyValue(E);
2341
+ if (u[v] !== b) {
2342
+ u[v] = b, h = !0;
2343
+ break;
2344
+ }
2345
+ }
2346
+ if (!h) return;
2347
+ let g = Kt(a, c);
2348
+ f !== g && (d(g), f = g);
2349
+ });
2350
+ }
2351
+ return o.dispose;
2352
+ }];
2353
+ }
2354
+ return [n, null];
2355
+ }), r = q(() => i(e, t)[0], [e, t]), [s = r, l] = ae();
2356
+ return B(() => {
2357
+ let [a, c] = i(e, t);
2358
+ if (l(a), !!c) return c(l);
2359
+ }, [e, t]), s;
2360
+ }
2361
+ function yn(e) {
2362
+ let t = /var\((.*)\)/.exec(e);
2363
+ if (t) {
2364
+ let n = t[1].indexOf(",");
2365
+ if (n === -1) return [t[1]];
2366
+ let o = t[1].slice(0, n).trim(), i = t[1].slice(n + 1).trim();
2367
+ return i ? [o, ...yn(i)] : [o];
2368
+ }
2369
+ return [];
2370
+ }
2371
+ function Kt(e, t) {
2372
+ let n = document.createElement("div");
2373
+ t.appendChild(n), n.style.setProperty("margin-top", "0px", "important"), n.style.setProperty("margin-top", e, "important");
2374
+ let o = parseFloat(window.getComputedStyle(n).marginTop) || 0;
2375
+ return t.removeChild(n), o;
2376
+ }
2377
+ function Yi({ children: e, freeze: t }) {
2378
+ let n = ht(t, e);
2379
+ return W.createElement(W.Fragment, null, n);
2380
+ }
2381
+ function ht(e, t) {
2382
+ let [n, o] = ae(t);
2383
+ return !e && n !== t && o(t), e ? n : t;
2384
+ }
2385
+ function qi(e) {
2386
+ function t() {
2387
+ document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", t));
2388
+ }
2389
+ typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", t), t());
2390
+ }
2391
+ let xe = [];
2392
+ qi(() => {
2393
+ function e(t) {
2394
+ if (!(t.target instanceof HTMLElement) || t.target === document.body || xe[0] === t.target) return;
2395
+ let n = t.target;
2396
+ n = n.closest(qn), xe.unshift(n ?? t.target), xe = xe.filter((o) => o != null && o.isConnected), xe.splice(10);
2397
+ }
2398
+ window.addEventListener("click", e, { capture: !0 }), window.addEventListener("mousedown", e, { capture: !0 }), window.addEventListener("focus", e, { capture: !0 }), document.body.addEventListener("click", e, { capture: !0 }), document.body.addEventListener("mousedown", e, { capture: !0 }), document.body.addEventListener("focus", e, { capture: !0 });
2399
+ });
2400
+ function Ki(e) {
2401
+ throw new Error("Unexpected object: " + e);
2402
+ }
2403
+ var H = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(H || {});
2404
+ function Gt(e, t) {
2405
+ let n = t.resolveItems();
2406
+ if (n.length <= 0) return null;
2407
+ let o = t.resolveActiveIndex(), i = o ?? -1;
2408
+ switch (e.focus) {
2409
+ case 0: {
2410
+ for (let r = 0; r < n.length; ++r) if (!t.resolveDisabled(n[r], r, n)) return r;
2411
+ return o;
2412
+ }
2413
+ case 1: {
2414
+ i === -1 && (i = n.length);
2415
+ for (let r = i - 1; r >= 0; --r) if (!t.resolveDisabled(n[r], r, n)) return r;
2416
+ return o;
2417
+ }
2418
+ case 2: {
2419
+ for (let r = i + 1; r < n.length; ++r) if (!t.resolveDisabled(n[r], r, n)) return r;
2420
+ return o;
2421
+ }
2422
+ case 3: {
2423
+ for (let r = n.length - 1; r >= 0; --r) if (!t.resolveDisabled(n[r], r, n)) return r;
2424
+ return o;
2425
+ }
2426
+ case 4: {
2427
+ for (let r = 0; r < n.length; ++r) if (t.resolveId(n[r], r, n) === e.id) return r;
2428
+ return o;
2429
+ }
2430
+ case 5:
2431
+ return null;
2432
+ default:
2433
+ Ki(e);
2434
+ }
2435
+ }
2436
+ var St = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(St || {});
2437
+ function Gi(e) {
2438
+ let t = I(e), n = K(!1);
2439
+ oe(() => (n.current = !1, () => {
2440
+ n.current = !0, Mn(() => {
2441
+ n.current && t();
2442
+ });
2443
+ }), [t]);
2444
+ }
2445
+ function Xi() {
2446
+ let e = typeof document > "u";
2447
+ return "useSyncExternalStore" in y ? ((t) => t.useSyncExternalStore)(y)(() => () => {
2448
+ }, () => !1, () => !e) : !1;
2449
+ }
2450
+ function Ji() {
2451
+ let e = Xi(), [t, n] = y.useState(Le.isHandoffComplete);
2452
+ return t && Le.isHandoffComplete === !1 && n(!1), y.useEffect(() => {
2453
+ t !== !0 && n(!0);
2454
+ }, [t]), y.useEffect(() => Le.handoff(), []), e ? !1 : t;
2455
+ }
2456
+ let Qi = ge(!1);
2457
+ function Zi() {
2458
+ return le(Qi);
2459
+ }
2460
+ function er(e) {
2461
+ let t = Zi(), n = le(Sn), o = nt(e), [i, r] = ae(() => {
2462
+ var s;
2463
+ if (!t && n !== null) return (s = n.current) != null ? s : null;
2464
+ if (Le.isServer) return null;
2465
+ let l = o == null ? void 0 : o.getElementById("headlessui-portal-root");
2466
+ if (l) return l;
2467
+ if (o === null) return null;
2468
+ let a = o.createElement("div");
2469
+ return a.setAttribute("id", "headlessui-portal-root"), o.body.appendChild(a);
2470
+ });
2471
+ return oe(() => {
2472
+ i !== null && (o != null && o.body.contains(i) || o == null || o.body.appendChild(i));
2473
+ }, [i, o]), oe(() => {
2474
+ t || n !== null && r(n.current);
2475
+ }, [n, r, t]), i;
2476
+ }
2477
+ let On = tt, tr = pe(function(e, t) {
2478
+ let n = e, o = K(null), i = Se(Pn((f) => {
2479
+ o.current = f;
2480
+ }), t), r = nt(o), s = er(o), [l] = ae(() => {
2481
+ var f;
2482
+ return Le.isServer ? null : (f = r == null ? void 0 : r.createElement("div")) != null ? f : null;
2483
+ }), a = le(rr), c = Ji();
2484
+ return B(() => {
2485
+ !s || !l || s.contains(l) || (l.setAttribute("data-headlessui-portal", ""), s.appendChild(l));
2486
+ }, [s, l]), B(() => {
2487
+ if (l && a) return a.register(l);
2488
+ }, [a, l]), Gi(() => {
2489
+ var f;
2490
+ !s || !l || (l instanceof Node && s.contains(l) && s.removeChild(l), s.childNodes.length <= 0 && ((f = s.parentElement) == null || f.removeChild(s)));
2491
+ }), c ? !s || !l ? null : Fn(he({ ourProps: { ref: i }, theirProps: n, slot: {}, defaultTag: On, name: "Portal" }), l) : null;
2492
+ });
2493
+ function nr(e, t) {
2494
+ let n = Se(t), { enabled: o = !0, ...i } = e;
2495
+ return o ? W.createElement(tr, { ...i, ref: n }) : he({ ourProps: { ref: n }, theirProps: i, slot: {}, defaultTag: On, name: "Portal" });
2496
+ }
2497
+ let or = tt, Sn = ge(null);
2498
+ function ir(e, t) {
2499
+ let { target: n, ...o } = e, i = { ref: Se(t) };
2500
+ return W.createElement(Sn.Provider, { value: n }, he({ ourProps: i, theirProps: o, defaultTag: or, name: "Popover.Group" }));
2501
+ }
2502
+ let rr = ge(null), lr = pe(nr), sr = pe(ir), ar = Object.assign(lr, { Group: sr });
2503
+ var cr = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(cr || {}), ur = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(ur || {}), fr = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Focus = 1] = "Focus", e[e.Other = 2] = "Other", e))(fr || {}), dr = ((e) => (e[e.OpenCombobox = 0] = "OpenCombobox", e[e.CloseCombobox = 1] = "CloseCombobox", e[e.GoToOption = 2] = "GoToOption", e[e.SetTyping = 3] = "SetTyping", e[e.RegisterOption = 4] = "RegisterOption", e[e.UnregisterOption = 5] = "UnregisterOption", e[e.SetActivationTrigger = 6] = "SetActivationTrigger", e[e.UpdateVirtualConfiguration = 7] = "UpdateVirtualConfiguration", e[e.SetInputElement = 8] = "SetInputElement", e[e.SetButtonElement = 9] = "SetButtonElement", e[e.SetOptionsElement = 10] = "SetOptionsElement", e))(dr || {});
2504
+ function ft(e, t = (n) => n) {
2505
+ let n = e.activeOptionIndex !== null ? e.options[e.activeOptionIndex] : null, o = t(e.options.slice()), i = o.length > 0 && o[0].dataRef.current.order !== null ? o.sort((s, l) => s.dataRef.current.order - l.dataRef.current.order) : Kn(o, (s) => s.dataRef.current.domRef.current), r = n ? i.indexOf(n) : null;
2506
+ return r === -1 && (r = null), { options: i, activeOptionIndex: r };
2507
+ }
2508
+ let mr = { 1(e) {
2509
+ var t;
2510
+ return (t = e.dataRef.current) != null && t.disabled || e.comboboxState === 1 ? e : { ...e, activeOptionIndex: null, comboboxState: 1, isTyping: !1, activationTrigger: 2, __demoMode: !1 };
2511
+ }, 0(e) {
2512
+ var t, n;
2513
+ if ((t = e.dataRef.current) != null && t.disabled || e.comboboxState === 0) return e;
2514
+ if ((n = e.dataRef.current) != null && n.value) {
2515
+ let o = e.dataRef.current.calculateIndex(e.dataRef.current.value);
2516
+ if (o !== -1) return { ...e, activeOptionIndex: o, comboboxState: 0, __demoMode: !1 };
2517
+ }
2518
+ return { ...e, comboboxState: 0, __demoMode: !1 };
2519
+ }, 3(e, t) {
2520
+ return e.isTyping === t.isTyping ? e : { ...e, isTyping: t.isTyping };
2521
+ }, 2(e, t) {
2522
+ var n, o, i, r;
2523
+ if ((n = e.dataRef.current) != null && n.disabled || e.optionsElement && !((o = e.dataRef.current) != null && o.optionsPropsRef.current.static) && e.comboboxState === 1) return e;
2524
+ if (e.virtual) {
2525
+ let { options: c, disabled: f } = e.virtual, d = t.focus === H.Specific ? t.idx : Gt(t, { resolveItems: () => c, resolveActiveIndex: () => {
2526
+ var u, m;
2527
+ return (m = (u = e.activeOptionIndex) != null ? u : c.findIndex((h) => !f(h))) != null ? m : null;
2528
+ }, resolveDisabled: f, resolveId() {
2529
+ throw new Error("Function not implemented.");
2530
+ } }), p = (i = t.trigger) != null ? i : 2;
2531
+ return e.activeOptionIndex === d && e.activationTrigger === p ? e : { ...e, activeOptionIndex: d, activationTrigger: p, isTyping: !1, __demoMode: !1 };
2532
+ }
2533
+ let s = ft(e);
2534
+ if (s.activeOptionIndex === null) {
2535
+ let c = s.options.findIndex((f) => !f.dataRef.current.disabled);
2536
+ c !== -1 && (s.activeOptionIndex = c);
2537
+ }
2538
+ let l = t.focus === H.Specific ? t.idx : Gt(t, { resolveItems: () => s.options, resolveActiveIndex: () => s.activeOptionIndex, resolveId: (c) => c.id, resolveDisabled: (c) => c.dataRef.current.disabled }), a = (r = t.trigger) != null ? r : 2;
2539
+ return e.activeOptionIndex === l && e.activationTrigger === a ? e : { ...e, ...s, isTyping: !1, activeOptionIndex: l, activationTrigger: a, __demoMode: !1 };
2540
+ }, 4: (e, t) => {
2541
+ var n, o, i;
2542
+ if ((n = e.dataRef.current) != null && n.virtual) return { ...e, options: [...e.options, t.payload] };
2543
+ let r = t.payload, s = ft(e, (a) => (a.push(r), a));
2544
+ e.activeOptionIndex === null && (o = e.dataRef.current) != null && o.isSelected(t.payload.dataRef.current.value) && (s.activeOptionIndex = s.options.indexOf(r));
2545
+ let l = { ...e, ...s, activationTrigger: 2 };
2546
+ return (i = e.dataRef.current) != null && i.__demoMode && e.dataRef.current.value === void 0 && (l.activeOptionIndex = 0), l;
2547
+ }, 5: (e, t) => {
2548
+ var n;
2549
+ if ((n = e.dataRef.current) != null && n.virtual) return { ...e, options: e.options.filter((i) => i.id !== t.id) };
2550
+ let o = ft(e, (i) => {
2551
+ let r = i.findIndex((s) => s.id === t.id);
2552
+ return r !== -1 && i.splice(r, 1), i;
2553
+ });
2554
+ return { ...e, ...o, activationTrigger: 2 };
2555
+ }, 6: (e, t) => e.activationTrigger === t.trigger ? e : { ...e, activationTrigger: t.trigger }, 7: (e, t) => {
2556
+ var n, o;
2557
+ if (e.virtual === null) return { ...e, virtual: { options: t.options, disabled: (n = t.disabled) != null ? n : () => !1 } };
2558
+ if (e.virtual.options === t.options && e.virtual.disabled === t.disabled) return e;
2559
+ let i = e.activeOptionIndex;
2560
+ if (e.activeOptionIndex !== null) {
2561
+ let r = t.options.indexOf(e.virtual.options[e.activeOptionIndex]);
2562
+ r !== -1 ? i = r : i = null;
2563
+ }
2564
+ return { ...e, activeOptionIndex: i, virtual: { options: t.options, disabled: (o = t.disabled) != null ? o : () => !1 } };
2565
+ }, 8: (e, t) => e.inputElement === t.element ? e : { ...e, inputElement: t.element }, 9: (e, t) => e.buttonElement === t.element ? e : { ...e, buttonElement: t.element }, 10: (e, t) => e.optionsElement === t.element ? e : { ...e, optionsElement: t.element } }, Rt = ge(null);
2566
+ Rt.displayName = "ComboboxActionsContext";
2567
+ function Ye(e) {
2568
+ let t = le(Rt);
2569
+ if (t === null) {
2570
+ let n = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
2571
+ throw Error.captureStackTrace && Error.captureStackTrace(n, Ye), n;
2572
+ }
2573
+ return t;
2574
+ }
2575
+ let Rn = ge(null);
2576
+ function pr(e) {
2577
+ let t = $e("VirtualProvider"), { options: n } = t.virtual, [o, i] = q(() => {
2578
+ let c = t.optionsElement;
2579
+ if (!c) return [0, 0];
2580
+ let f = window.getComputedStyle(c);
2581
+ return [parseFloat(f.paddingBlockStart || f.paddingTop), parseFloat(f.paddingBlockEnd || f.paddingBottom)];
2582
+ }, [t.optionsElement]), r = ho({ enabled: n.length !== 0, scrollPaddingStart: o, scrollPaddingEnd: i, count: n.length, estimateSize() {
2583
+ return 40;
2584
+ }, getScrollElement() {
2585
+ return t.optionsElement;
2586
+ }, overscan: 12 }), [s, l] = ae(0);
2587
+ B(() => {
2588
+ l((c) => c + 1);
2589
+ }, [n]);
2590
+ let a = r.getVirtualItems();
2591
+ return a.length === 0 ? null : W.createElement(Rn.Provider, { value: r }, W.createElement("div", { style: { position: "relative", width: "100%", height: `${r.getTotalSize()}px` }, ref: (c) => {
2592
+ if (c) {
2593
+ if (typeof process < "u" && process.env.JEST_WORKER_ID !== void 0 || t.activationTrigger === 0) return;
2594
+ t.activeOptionIndex !== null && n.length > t.activeOptionIndex && r.scrollToIndex(t.activeOptionIndex);
2595
+ }
2596
+ } }, a.map((c) => {
2597
+ var f;
2598
+ return W.createElement(tt, { key: c.key }, W.cloneElement((f = e.children) == null ? void 0 : f.call(e, { ...e.slot, option: n[c.index] }), { key: `${s}-${c.key}`, "data-index": c.index, "aria-setsize": n.length, "aria-posinset": c.index + 1, style: { position: "absolute", top: 0, left: 0, transform: `translateY(${c.start}px)`, overflowAnchor: "none" } }));
2599
+ })));
2600
+ }
2601
+ let Ve = ge(null);
2602
+ Ve.displayName = "ComboboxDataContext";
2603
+ function $e(e) {
2604
+ let t = le(Ve);
2605
+ if (t === null) {
2606
+ let n = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
2607
+ throw Error.captureStackTrace && Error.captureStackTrace(n, $e), n;
2608
+ }
2609
+ return t;
2610
+ }
2611
+ function hr(e, t) {
2612
+ return Re(t.type, mr, e, t);
2613
+ }
2614
+ let gr = tt;
2615
+ function vr(e, t) {
2616
+ var n, o;
2617
+ let i = Nn(), { value: r, defaultValue: s, onChange: l, form: a, name: c, by: f, disabled: d = i || !1, onClose: p, __demoMode: u = !1, multiple: m = !1, immediate: h = !1, virtual: g = null, nullable: v, ...E } = e, b = zn(s), [x = m ? [] : void 0, O] = Hn(r, l, b), [S, M] = Zt(hr, { dataRef: Dn(), comboboxState: u ? 0 : 1, isTyping: !1, options: [], virtual: g ? { options: g.options, disabled: (n = g.disabled) != null ? n : () => !1 } : null, activeOptionIndex: null, activationTrigger: 2, inputElement: null, buttonElement: null, optionsElement: null, __demoMode: u }), C = K(!1), N = K({ static: !1, hold: !1 }), $ = _n(f), D = I((T) => g ? f === null ? g.options.indexOf(T) : g.options.findIndex((_) => $(_, T)) : S.options.findIndex((_) => $(_.dataRef.current.value, T))), k = ke((T) => Re(w.mode, { 1: () => x.some((_) => $(_, T)), 0: () => $(x, T) }), [x]), z = I((T) => S.activeOptionIndex === D(T)), w = q(() => ({ ...S, immediate: h, optionsPropsRef: N, value: x, defaultValue: b, disabled: d, mode: m ? 1 : 0, virtual: g ? S.virtual : null, get activeOptionIndex() {
2618
+ if (C.current && S.activeOptionIndex === null && (g ? g.options.length > 0 : S.options.length > 0)) {
2619
+ if (g) {
2620
+ let _ = g.options.findIndex((re) => {
2621
+ var qe, Ct;
2622
+ return !((Ct = (qe = g.disabled) == null ? void 0 : qe.call(g, re)) != null && Ct);
2623
+ });
2624
+ if (_ !== -1) return _;
2625
+ }
2626
+ let T = S.options.findIndex((_) => !_.dataRef.current.disabled);
2627
+ if (T !== -1) return T;
2628
+ }
2629
+ return S.activeOptionIndex;
2630
+ }, calculateIndex: D, compare: $, isSelected: k, isActive: z }), [x, b, d, m, u, S, g]);
2631
+ B(() => {
2632
+ var T;
2633
+ g && M({ type: 7, options: g.options, disabled: (T = g.disabled) != null ? T : null });
2634
+ }, [g, g == null ? void 0 : g.options, g == null ? void 0 : g.disabled]), B(() => {
2635
+ S.dataRef.current = w;
2636
+ }, [w]);
2637
+ let F = w.comboboxState === 0;
2638
+ Oo(F, [w.buttonElement, w.inputElement, w.optionsElement], () => G.closeCombobox());
2639
+ let j = q(() => {
2640
+ var T, _, re;
2641
+ return { open: w.comboboxState === 0, disabled: d, activeIndex: w.activeOptionIndex, activeOption: w.activeOptionIndex === null ? null : w.virtual ? w.virtual.options[(T = w.activeOptionIndex) != null ? T : 0] : (re = (_ = w.options[w.activeOptionIndex]) == null ? void 0 : _.dataRef.current.value) != null ? re : null, value: x };
2642
+ }, [w, d, x]), P = I(() => {
2643
+ if (w.activeOptionIndex !== null) {
2644
+ if (G.setIsTyping(!1), w.virtual) R(w.virtual.options[w.activeOptionIndex]);
2645
+ else {
2646
+ let { dataRef: T } = w.options[w.activeOptionIndex];
2647
+ R(T.current.value);
2648
+ }
2649
+ G.goToOption(H.Specific, w.activeOptionIndex);
2650
+ }
2651
+ }), L = I(() => {
2652
+ M({ type: 0 }), C.current = !0;
2653
+ }), A = I(() => {
2654
+ M({ type: 1 }), C.current = !1, p == null || p();
2655
+ }), J = I((T) => {
2656
+ M({ type: 3, isTyping: T });
2657
+ }), U = I((T, _, re) => (C.current = !1, T === H.Specific ? M({ type: 2, focus: H.Specific, idx: _, trigger: re }) : M({ type: 2, focus: T, trigger: re }))), ve = I((T, _) => (M({ type: 4, payload: { id: T, dataRef: _ } }), () => {
2658
+ w.isActive(_.current.value) && (C.current = !0), M({ type: 5, id: T });
2659
+ })), R = I((T) => Re(w.mode, { 0() {
2660
+ return O == null ? void 0 : O(T);
2661
+ }, 1() {
2662
+ let _ = w.value.slice(), re = _.findIndex((qe) => $(qe, T));
2663
+ return re === -1 ? _.push(T) : _.splice(re, 1), O == null ? void 0 : O(_);
2664
+ } })), te = I((T) => {
2665
+ M({ type: 6, trigger: T });
2666
+ }), Y = I((T) => {
2667
+ M({ type: 8, element: T });
2668
+ }), ne = I((T) => {
2669
+ M({ type: 9, element: T });
2670
+ }), V = I((T) => {
2671
+ M({ type: 10, element: T });
2672
+ }), G = q(() => ({ onChange: R, registerOption: ve, goToOption: U, setIsTyping: J, closeCombobox: A, openCombobox: L, setActivationTrigger: te, selectActiveOption: P, setInputElement: Y, setButtonElement: ne, setOptionsElement: V }), []), [be, Cn] = Vn(), Tn = t === null ? {} : { ref: t }, In = ke(() => {
2673
+ if (b !== void 0) return O == null ? void 0 : O(b);
2674
+ }, [O, b]);
2675
+ return W.createElement(Cn, { value: be, props: { htmlFor: (o = w.inputElement) == null ? void 0 : o.id }, slot: { open: w.comboboxState === 0, disabled: d } }, W.createElement(Bi, null, W.createElement(Rt.Provider, { value: G }, W.createElement(Ve.Provider, { value: w }, W.createElement(Xn, { value: Re(w.comboboxState, { 0: Xe.Open, 1: Xe.Closed }) }, c != null && W.createElement(Wn, { disabled: d, data: x != null ? { [c]: x } : {}, form: a, onReset: In }), he({ ourProps: Tn, theirProps: E, slot: j, defaultTag: gr, name: "Combobox" }))))));
2676
+ }
2677
+ let br = "input";
2678
+ function xr(e, t) {
2679
+ var n, o, i, r, s;
2680
+ let l = $e("Combobox.Input"), a = Ye("Combobox.Input"), c = We(), f = Bn(), { id: d = f || `headlessui-combobox-input-${c}`, onChange: p, displayValue: u, disabled: m = l.disabled || !1, autoFocus: h = !1, type: g = "text", ...v } = e, E = K(null), b = Se(E, t, Hi(), a.setInputElement), x = nt(l.inputElement), O = Xt(), S = I(() => {
2681
+ a.onChange(null), l.optionsElement && (l.optionsElement.scrollTop = 0), a.goToOption(H.Nothing);
2682
+ }), M = q(() => {
2683
+ var R;
2684
+ return typeof u == "function" && l.value !== void 0 ? (R = u(l.value)) != null ? R : "" : typeof l.value == "string" ? l.value : "";
2685
+ }, [l.value, u]);
2686
+ Ft(([R, te], [Y, ne]) => {
2687
+ if (l.isTyping) return;
2688
+ let V = E.current;
2689
+ V && ((ne === 0 && te === 1 || R !== Y) && (V.value = R), requestAnimationFrame(() => {
2690
+ if (l.isTyping || !V || (x == null ? void 0 : x.activeElement) !== V) return;
2691
+ let { selectionStart: G, selectionEnd: be } = V;
2692
+ Math.abs((be ?? 0) - (G ?? 0)) === 0 && G === 0 && V.setSelectionRange(V.value.length, V.value.length);
2693
+ }));
2694
+ }, [M, l.comboboxState, x, l.isTyping]), Ft(([R], [te]) => {
2695
+ if (R === 0 && te === 1) {
2696
+ if (l.isTyping) return;
2697
+ let Y = E.current;
2698
+ if (!Y) return;
2699
+ let ne = Y.value, { selectionStart: V, selectionEnd: G, selectionDirection: be } = Y;
2700
+ Y.value = "", Y.value = ne, be !== null ? Y.setSelectionRange(V, G, be) : Y.setSelectionRange(V, G);
2701
+ }
2702
+ }, [l.comboboxState]);
2703
+ let C = K(!1), N = I(() => {
2704
+ C.current = !0;
2705
+ }), $ = I(() => {
2706
+ O.nextFrame(() => {
2707
+ C.current = !1;
2708
+ });
2709
+ }), D = I((R) => {
2710
+ switch (a.setIsTyping(!0), R.key) {
2711
+ case Q.Enter:
2712
+ if (l.comboboxState !== 0 || C.current) return;
2713
+ if (R.preventDefault(), R.stopPropagation(), l.activeOptionIndex === null) {
2714
+ a.closeCombobox();
2715
+ return;
2716
+ }
2717
+ a.selectActiveOption(), l.mode === 0 && a.closeCombobox();
2718
+ break;
2719
+ case Q.ArrowDown:
2720
+ return R.preventDefault(), R.stopPropagation(), Re(l.comboboxState, { 0: () => a.goToOption(H.Next), 1: () => a.openCombobox() });
2721
+ case Q.ArrowUp:
2722
+ return R.preventDefault(), R.stopPropagation(), Re(l.comboboxState, { 0: () => a.goToOption(H.Previous), 1: () => {
2723
+ we(() => a.openCombobox()), l.value || a.goToOption(H.Last);
2724
+ } });
2725
+ case Q.Home:
2726
+ if (R.shiftKey) break;
2727
+ return R.preventDefault(), R.stopPropagation(), a.goToOption(H.First);
2728
+ case Q.PageUp:
2729
+ return R.preventDefault(), R.stopPropagation(), a.goToOption(H.First);
2730
+ case Q.End:
2731
+ if (R.shiftKey) break;
2732
+ return R.preventDefault(), R.stopPropagation(), a.goToOption(H.Last);
2733
+ case Q.PageDown:
2734
+ return R.preventDefault(), R.stopPropagation(), a.goToOption(H.Last);
2735
+ case Q.Escape:
2736
+ return l.comboboxState !== 0 ? void 0 : (R.preventDefault(), l.optionsElement && !l.optionsPropsRef.current.static && R.stopPropagation(), l.mode === 0 && l.value === null && S(), a.closeCombobox());
2737
+ case Q.Tab:
2738
+ if (l.comboboxState !== 0) return;
2739
+ l.mode === 0 && l.activationTrigger !== 1 && a.selectActiveOption(), a.closeCombobox();
2740
+ break;
2741
+ }
2742
+ }), k = I((R) => {
2743
+ p == null || p(R), l.mode === 0 && R.target.value === "" && S(), a.openCombobox();
2744
+ }), z = I((R) => {
2745
+ var te, Y, ne;
2746
+ let V = (te = R.relatedTarget) != null ? te : xe.find((G) => G !== R.currentTarget);
2747
+ if (!((Y = l.optionsElement) != null && Y.contains(V)) && !((ne = l.buttonElement) != null && ne.contains(V)) && l.comboboxState === 0) return R.preventDefault(), l.mode === 0 && l.value === null && S(), a.closeCombobox();
2748
+ }), w = I((R) => {
2749
+ var te, Y, ne;
2750
+ let V = (te = R.relatedTarget) != null ? te : xe.find((G) => G !== R.currentTarget);
2751
+ (Y = l.buttonElement) != null && Y.contains(V) || (ne = l.optionsElement) != null && ne.contains(V) || l.disabled || l.immediate && l.comboboxState !== 0 && O.microTask(() => {
2752
+ we(() => a.openCombobox()), a.setActivationTrigger(1);
2753
+ });
2754
+ }), F = bt(), j = jn(), { isFocused: P, focusProps: L } = Jt({ autoFocus: h }), { isHovered: A, hoverProps: J } = Qt({ isDisabled: m }), U = q(() => ({ open: l.comboboxState === 0, disabled: m, hover: A, focus: P, autofocus: h }), [l, A, P, h, m]), ve = vt({ ref: b, id: d, role: "combobox", type: g, "aria-controls": (n = l.optionsElement) == null ? void 0 : n.id, "aria-expanded": l.comboboxState === 0, "aria-activedescendant": l.activeOptionIndex === null ? void 0 : l.virtual ? (o = l.options.find((R) => !R.dataRef.current.disabled && l.compare(R.dataRef.current.value, l.virtual.options[l.activeOptionIndex]))) == null ? void 0 : o.id : (i = l.options[l.activeOptionIndex]) == null ? void 0 : i.id, "aria-labelledby": F, "aria-describedby": j, "aria-autocomplete": "list", defaultValue: (s = (r = e.defaultValue) != null ? r : l.defaultValue !== void 0 ? u == null ? void 0 : u(l.defaultValue) : null) != null ? s : l.defaultValue, disabled: m || void 0, autoFocus: h, onCompositionStart: N, onCompositionEnd: $, onKeyDown: D, onChange: k, onFocus: w, onBlur: z }, L, J);
2755
+ return he({ ourProps: ve, theirProps: v, slot: U, defaultTag: br, name: "Combobox.Input" });
2756
+ }
2757
+ let wr = "button";
2758
+ function Er(e, t) {
2759
+ var n;
2760
+ let o = $e("Combobox.Button"), i = Ye("Combobox.Button"), r = Se(t, i.setButtonElement), s = An(), l = We(), { id: a = `headlessui-combobox-button-${l}`, disabled: c = o.disabled || !1, autoFocus: f = !1, ...d } = e, p = sn(o.inputElement), u = I((C) => {
2761
+ switch (C.key) {
2762
+ case Q.Space:
2763
+ case Q.Enter:
2764
+ C.preventDefault(), C.stopPropagation(), o.comboboxState === 1 && we(() => i.openCombobox()), p();
2765
+ return;
2766
+ case Q.ArrowDown:
2767
+ C.preventDefault(), C.stopPropagation(), o.comboboxState === 1 && (we(() => i.openCombobox()), o.value || i.goToOption(H.First)), p();
2768
+ return;
2769
+ case Q.ArrowUp:
2770
+ C.preventDefault(), C.stopPropagation(), o.comboboxState === 1 && (we(() => i.openCombobox()), o.value || i.goToOption(H.Last)), p();
2771
+ return;
2772
+ case Q.Escape:
2773
+ if (o.comboboxState !== 0) return;
2774
+ C.preventDefault(), o.optionsElement && !o.optionsPropsRef.current.static && C.stopPropagation(), we(() => i.closeCombobox()), p();
2775
+ return;
2776
+ default:
2777
+ return;
2778
+ }
2779
+ }), m = I((C) => {
2780
+ C.preventDefault(), !eo(C.currentTarget) && (C.button === St.Left && (o.comboboxState === 0 ? i.closeCombobox() : i.openCombobox()), p());
2781
+ }), h = bt([a]), { isFocusVisible: g, focusProps: v } = Jt({ autoFocus: f }), { isHovered: E, hoverProps: b } = Qt({ isDisabled: c }), { pressed: x, pressProps: O } = Ln({ disabled: c }), S = q(() => ({ open: o.comboboxState === 0, active: x || o.comboboxState === 0, disabled: c, value: o.value, hover: E, focus: g }), [o, E, g, x, c]), M = vt({ ref: r, id: a, type: Gn(e, o.buttonElement), tabIndex: -1, "aria-haspopup": "listbox", "aria-controls": (n = o.optionsElement) == null ? void 0 : n.id, "aria-expanded": o.comboboxState === 0, "aria-labelledby": h, disabled: c || void 0, autoFocus: f, onMouseDown: m, onKeyDown: u }, v, b, O);
2782
+ return he({ mergeRefs: s, ourProps: M, theirProps: d, slot: S, defaultTag: wr, name: "Combobox.Button" });
2783
+ }
2784
+ let yr = "div", Or = Tt.RenderStrategy | Tt.Static;
2785
+ function Sr(e, t) {
2786
+ var n, o, i;
2787
+ let r = We(), { id: s = `headlessui-combobox-options-${r}`, hold: l = !1, anchor: a, portal: c = !1, modal: f = !0, transition: d = !1, ...p } = e, u = $e("Combobox.Options"), m = Ye("Combobox.Options"), h = zi(a);
2788
+ h && (c = !0);
2789
+ let [g, v] = Wi(h), [E, b] = ae(null), x = Vi(), O = Se(t, h ? g : null, m.setOptionsElement, b), S = nt(u.optionsElement), M = Jn(), [C, N] = Qn(d, E, M !== null ? (M & Xe.Open) === Xe.Open : u.comboboxState === 0);
2790
+ wo(C, u.inputElement, m.closeCombobox);
2791
+ let $ = u.__demoMode ? !1 : f && u.comboboxState === 0;
2792
+ Po($, S);
2793
+ let D = u.__demoMode ? !1 : f && u.comboboxState === 0;
2794
+ xo(D, { allowed: ke(() => [u.inputElement, u.buttonElement, u.optionsElement], [u.inputElement, u.buttonElement, u.optionsElement]) }), B(() => {
2795
+ var U;
2796
+ u.optionsPropsRef.current.static = (U = e.static) != null ? U : !1;
2797
+ }, [u.optionsPropsRef, e.static]), B(() => {
2798
+ u.optionsPropsRef.current.hold = l;
2799
+ }, [u.optionsPropsRef, l]), $o(u.comboboxState === 0, { container: u.optionsElement, accept(U) {
2800
+ return U.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : U.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
2801
+ }, walk(U) {
2802
+ U.setAttribute("role", "none");
2803
+ } });
2804
+ let k = bt([(n = u.buttonElement) == null ? void 0 : n.id]), z = q(() => ({ open: u.comboboxState === 0, option: void 0 }), [u.comboboxState]), w = I(() => {
2805
+ m.setActivationTrigger(0);
2806
+ }), F = I((U) => {
2807
+ U.preventDefault(), m.setActivationTrigger(0);
2808
+ }), j = vt(h ? x() : {}, { "aria-labelledby": k, role: "listbox", "aria-multiselectable": u.mode === 1 ? !0 : void 0, id: s, ref: O, style: { ...p.style, ...v, "--input-width": Mt(u.inputElement, !0).width, "--button-width": Mt(u.buttonElement, !0).width }, onWheel: u.activationTrigger === 0 ? void 0 : w, onMouseDown: F, ...Zn(N) }), P = C && u.comboboxState === 1, L = ht(P, (o = u.virtual) == null ? void 0 : o.options), A = ht(P, u.value), J = I((U) => u.compare(A, U));
2809
+ if (u.virtual) {
2810
+ if (L === void 0) throw new Error("Missing `options` in virtual mode");
2811
+ Object.assign(p, { children: W.createElement(Ve.Provider, { value: L !== u.virtual.options ? { ...u, virtual: { ...u.virtual, options: L } } : u }, W.createElement(pr, { slot: z }, p.children)) });
2812
+ }
2813
+ return W.createElement(ar, { enabled: c ? e.static || C : !1 }, W.createElement(Ve.Provider, { value: u.mode === 1 ? u : { ...u, isSelected: J } }, he({ ourProps: j, theirProps: { ...p, children: W.createElement(Yi, { freeze: P }, typeof p.children == "function" ? (i = p.children) == null ? void 0 : i.call(p, z) : p.children) }, slot: z, defaultTag: yr, features: Or, visible: C, name: "Combobox.Options" })));
2814
+ }
2815
+ let Rr = "div";
2816
+ function Cr(e, t) {
2817
+ var n, o, i, r;
2818
+ let s = $e("Combobox.Option"), l = Ye("Combobox.Option"), a = We(), { id: c = `headlessui-combobox-option-${a}`, value: f, disabled: d = (i = (o = (n = s.virtual) == null ? void 0 : n.disabled) == null ? void 0 : o.call(n, f)) != null ? i : !1, order: p = null, ...u } = e, m = sn(s.inputElement), h = s.virtual ? s.activeOptionIndex === s.calculateIndex(f) : s.activeOptionIndex === null ? !1 : ((r = s.options[s.activeOptionIndex]) == null ? void 0 : r.id) === c, g = s.isSelected(f), v = K(null), E = Me({ disabled: d, value: f, domRef: v, order: p }), b = le(Rn), x = Se(t, v, b ? b.measureElement : null), O = I(() => {
2819
+ l.setIsTyping(!1), l.onChange(f);
2820
+ });
2821
+ B(() => l.registerOption(c, E), [E, c]);
2822
+ let S = K(!(s.virtual || s.__demoMode));
2823
+ B(() => {
2824
+ if (!s.virtual && !s.__demoMode) return Te().requestAnimationFrame(() => {
2825
+ S.current = !0;
2826
+ });
2827
+ }, [s.virtual, s.__demoMode]), B(() => {
2828
+ if (S.current && s.comboboxState === 0 && h && s.activationTrigger !== 0) return Te().requestAnimationFrame(() => {
2829
+ var w, F;
2830
+ (F = (w = v.current) == null ? void 0 : w.scrollIntoView) == null || F.call(w, { block: "nearest" });
2831
+ });
2832
+ }, [v, h, s.comboboxState, s.activationTrigger, s.activeOptionIndex]);
2833
+ let M = I((w) => {
2834
+ w.preventDefault(), w.button === St.Left && (d || (O(), ln() || requestAnimationFrame(() => m()), s.mode === 0 && l.closeCombobox()));
2835
+ }), C = I(() => {
2836
+ if (d) return l.goToOption(H.Nothing);
2837
+ let w = s.calculateIndex(f);
2838
+ l.goToOption(H.Specific, w);
2839
+ }), N = Ao(), $ = I((w) => N.update(w)), D = I((w) => {
2840
+ if (!N.wasMoved(w) || d || h) return;
2841
+ let F = s.calculateIndex(f);
2842
+ l.goToOption(H.Specific, F, 0);
2843
+ }), k = I((w) => {
2844
+ N.wasMoved(w) && (d || h && (s.optionsPropsRef.current.hold || l.goToOption(H.Nothing)));
2845
+ }), z = q(() => ({ active: h, focus: h, selected: g, disabled: d }), [h, g, d]);
2846
+ return he({ ourProps: { id: c, ref: x, role: "option", tabIndex: d === !0 ? void 0 : -1, "aria-disabled": d === !0 ? !0 : void 0, "aria-selected": g, disabled: void 0, onMouseDown: M, onFocus: C, onPointerEnter: $, onMouseEnter: $, onPointerMove: D, onMouseMove: D, onPointerLeave: k, onMouseLeave: k }, theirProps: u, slot: z, defaultTag: Rr, name: "Combobox.Option" });
2847
+ }
2848
+ let Tr = pe(vr), Ir = pe(Er), Mr = pe(xr), Pr = kn, Ar = pe(Sr), $r = pe(Cr), jr = Object.assign(Tr, { Input: Mr, Button: Ir, Label: Pr, Options: Ar, Option: $r });
2849
+ export {
2850
+ Mr as G,
2851
+ jr as H,
2852
+ Ar as K,
2853
+ Ir as U,
2854
+ $r as W
2855
+ };