@fluid-app/fluid-cli-theme-dev 0.1.534 → 0.1.536

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/dist-cli-preview/.vite/manifest.json +276 -295
  2. package/dist/dist-cli-preview/account-screens.js +1 -1
  3. package/dist/dist-cli-preview/chunks/{Combobox-CJDvxjNn.js → Combobox-D4l7DbBy.js} +54 -53
  4. package/dist/dist-cli-preview/chunks/{ContactsScreen-DD3XWK3Q.js → ContactsScreen-CEtA3-1c.js} +903 -850
  5. package/dist/dist-cli-preview/chunks/MediaScreen-C2rOxuuv.js +8 -0
  6. package/dist/dist-cli-preview/chunks/{MemberManagementProviders-iVdfo0DH.js → MemberManagementProviders-B_YXVcDi.js} +13 -13
  7. package/dist/dist-cli-preview/chunks/{MemberShareablesScreen-BulCAnNO.js → MemberShareablesScreen-UNjYr5R6.js} +4207 -3757
  8. package/dist/dist-cli-preview/chunks/{MessagingScreen-DlDsOy19.js → MessagingScreen-Btga_V0H.js} +24118 -21933
  9. package/dist/dist-cli-preview/chunks/MobileActionSheet-CrEH2vO7.js +1384 -0
  10. package/dist/dist-cli-preview/chunks/{MySiteScreen-BfPfyV4m.js → MySiteScreen-B1fGtPDj.js} +177 -163
  11. package/dist/dist-cli-preview/chunks/OrdersScreen-Bf9DtOCA.js +9 -0
  12. package/dist/dist-cli-preview/chunks/{OrdersScreen-C4yi3z2p.js → OrdersScreen-DyyL-P7j.js} +35 -34
  13. package/dist/dist-cli-preview/chunks/PlaylistsScreen-tws56I3H.js +8 -0
  14. package/dist/dist-cli-preview/chunks/{PortalTenantClientProvider-Clys_Bme.js → PortalTenantClientProvider-DUOOCXfW.js} +1 -1
  15. package/dist/dist-cli-preview/chunks/{ProfileScreen-e4QhExeS.js → ProfileScreen-wZO6QMrU.js} +259 -234
  16. package/dist/dist-cli-preview/chunks/ResponsiveDialog-DSDcOjhm.js +731 -0
  17. package/dist/dist-cli-preview/chunks/Select-DmRoXIkQ.js +2499 -0
  18. package/dist/dist-cli-preview/chunks/{SubscriptionsScreen-DysTJ6w_.js → SubscriptionsScreen-BR2C0m7M.js} +3 -3
  19. package/dist/dist-cli-preview/chunks/Textarea-C59p5Cek.js +365 -0
  20. package/dist/dist-cli-preview/chunks/{account-screen-runtime-B3e0JV6I.js → account-screen-runtime-BqMndJcu.js} +1389 -1409
  21. package/dist/dist-cli-preview/chunks/{arrow-left-BOYuYcvT.js → arrow-left-CFy5J6Id.js} +1 -1
  22. package/dist/dist-cli-preview/chunks/{cli-preview-cY0EPyxC.js → cli-preview-DZOhxtLy.js} +10 -10
  23. package/dist/dist-cli-preview/chunks/{client.gen-jwIybX1j.js → client.gen-DTVKCFco.js} +12 -12
  24. package/dist/dist-cli-preview/chunks/{copy-Cm_EKxcg.js → copy-Da4VLOCZ.js} +1 -1
  25. package/dist/dist-cli-preview/chunks/{countries-api-adapter-BCS0247N.js → countries-api-adapter-Bh5QfCO1.js} +2 -2
  26. package/dist/dist-cli-preview/chunks/{create-card-entry-container-CZi7shLR.js → create-card-entry-container-ohrRYgww.js} +1939 -1929
  27. package/dist/dist-cli-preview/chunks/{hey-api-client-B6n5a7q-.js → hey-api-client-BIjWueui.js} +1 -1
  28. package/dist/dist-cli-preview/chunks/{index-CfLLmITa.js → index-BMWjXC9i.js} +405 -869
  29. package/dist/dist-cli-preview/chunks/{index-DFIsiT9r.js → index-BVehJyDQ.js} +2080 -2372
  30. package/dist/dist-cli-preview/chunks/index-_r1wSvno.js +427 -0
  31. package/dist/dist-cli-preview/chunks/{isAfter-D0zQuNEJ.js → isAfter-BR4uNpua.js} +145 -156
  32. package/dist/dist-cli-preview/chunks/{map-pin-Vt1smsNu.js → map-pin-C_cK_i_W.js} +1 -1
  33. package/dist/dist-cli-preview/chunks/messaging-B1UjYRdl.js +4 -0
  34. package/dist/dist-cli-preview/chunks/{mount-account-screen-BOVvR3Og.js → mount-account-screen-JJGALFRE.js} +8 -8
  35. package/dist/dist-cli-preview/chunks/{navigate-account-screen-D756rD78.js → navigate-account-screen-C0VoUNOi.js} +1 -1
  36. package/dist/dist-cli-preview/chunks/schemas-D0s3rDQw.js +4851 -0
  37. package/dist/dist-cli-preview/chunks/{screen-route-slug-utils-HNXiCpo6.js → screen-route-slug-utils-n2BiDZmp.js} +205 -260
  38. package/dist/dist-cli-preview/chunks/search-zEnxG69C.js +14 -0
  39. package/dist/dist-cli-preview/chunks/sheet-haptics-context-p5ZPxslK.js +133 -0
  40. package/dist/dist-cli-preview/chunks/{sidebar-BDgHluGp.js → sidebar-CjPHl33n.js} +8 -8
  41. package/dist/dist-cli-preview/chunks/{sortable.esm-Cw91KlVU.js → sortable.esm-CrxUZkb-.js} +373 -362
  42. package/dist/dist-cli-preview/chunks/{store-api-context-BCaEZBlj.js → store-api-context-0k_ECvSE.js} +1 -1
  43. package/dist/dist-cli-preview/chunks/translation-api-context-factory-CP0LBb-M.js +74 -0
  44. package/dist/dist-cli-preview/chunks/{use-mobile-BztyG-mE.js → use-mobile-DIhDH3dI.js} +1 -1
  45. package/dist/dist-cli-preview/chunks/{use-optional-store-Dl6PSQur.js → use-optional-store-t4xzc2Rl.js} +2 -2
  46. package/dist/dist-cli-preview/chunks/use-store-YC0Ovzht.js +76 -0
  47. package/dist/dist-cli-preview/chunks/{useInfiniteQuery-fL_VYHHr.js → useInfiniteQuery-Bnzu0kZa.js} +9 -20
  48. package/dist/dist-cli-preview/chunks/{users-B3YJ3D1U.js → users-CabXl4EL.js} +1 -1
  49. package/package.json +2 -2
  50. package/dist/dist-cli-preview/chunks/Breadcrumb-ixf0cTR_.js +0 -91
  51. package/dist/dist-cli-preview/chunks/MediaScreen-D8WSOaze.js +0 -8
  52. package/dist/dist-cli-preview/chunks/MobileActionSheet-aGr-nGxu.js +0 -3884
  53. package/dist/dist-cli-preview/chunks/OrdersScreen-hidM-JR_.js +0 -9
  54. package/dist/dist-cli-preview/chunks/PlaylistsScreen-BIqSXZ5B.js +0 -8
  55. package/dist/dist-cli-preview/chunks/ellipsis-C1sJRT_T.js +0 -15
  56. package/dist/dist-cli-preview/chunks/eye-BHBOtWLw.js +0 -20
  57. package/dist/dist-cli-preview/chunks/index-COIiY5Im.js +0 -135
  58. package/dist/dist-cli-preview/chunks/log-out-segl_UhK.js +0 -30
  59. package/dist/dist-cli-preview/chunks/messaging-C_IkzF0O.js +0 -4
  60. package/dist/dist-cli-preview/chunks/pause-YWP8mWBs.js +0 -41
  61. package/dist/dist-cli-preview/chunks/schemas-BiM-ImW1.js +0 -5565
  62. package/dist/dist-cli-preview/chunks/sheet-haptics-context-d9udqor0.js +0 -116
  63. package/dist/dist-cli-preview/chunks/trash-2-CZEbdFT_.js +0 -17
  64. package/dist/dist-cli-preview/chunks/use-store-aahN8SDp.js +0 -400
  65. package/dist/dist-cli-preview/chunks/user-B4pULYRZ.js +0 -14
@@ -0,0 +1,2499 @@
1
+ import { c as Et, l as p, j as w, J as z, ai as rt, G as Ot, H as q, aG as On, al as It, am as ne, as as In, N as ht, M as st, aZ as Nn, K as $, R as _n, aF as Mn, a_ as Dn, a$ as Ln, b0 as jn, b1 as kn, b2 as Hn, U as Bn, at as gt, X as ye, W as Vn } from "./account-screen-runtime-BqMndJcu.js";
2
+ import { C as Fn } from "./schemas-D0s3rDQw.js";
3
+ /**
4
+ * @license lucide-react v0.575.0 - ISC
5
+ *
6
+ * This source code is licensed under the ISC license.
7
+ * See the LICENSE file in the root directory of this source tree.
8
+ */
9
+ const Wn = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Nt = Et("chevron-down", Wn);
10
+ /**
11
+ * @license lucide-react v0.575.0 - ISC
12
+ *
13
+ * This source code is licensed under the ISC license.
14
+ * See the LICENSE file in the root directory of this source tree.
15
+ */
16
+ const $n = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], zn = Et("chevron-up", $n);
17
+ var _t = Object.freeze({
18
+ // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
19
+ position: "absolute",
20
+ border: 0,
21
+ width: 1,
22
+ height: 1,
23
+ padding: 0,
24
+ margin: -1,
25
+ overflow: "hidden",
26
+ clip: "rect(0, 0, 0, 0)",
27
+ whiteSpace: "nowrap",
28
+ wordWrap: "normal"
29
+ }), Un = "VisuallyHidden", Mt = p.forwardRef(
30
+ (e, t) => /* @__PURE__ */ w.jsx(
31
+ z.span,
32
+ {
33
+ ...e,
34
+ ref: t,
35
+ style: { ..._t, ...e.style }
36
+ }
37
+ )
38
+ );
39
+ Mt.displayName = Un;
40
+ var es = Mt;
41
+ const Kn = ["top", "right", "bottom", "left"], le = Math.min, Y = Math.max, Me = Math.round, Ne = Math.floor, te = (e) => ({
42
+ x: e,
43
+ y: e
44
+ }), Yn = {
45
+ left: "right",
46
+ right: "left",
47
+ bottom: "top",
48
+ top: "bottom"
49
+ }, Xn = {
50
+ start: "end",
51
+ end: "start"
52
+ };
53
+ function qe(e, t, n) {
54
+ return Y(e, le(t, n));
55
+ }
56
+ function se(e, t) {
57
+ return typeof e == "function" ? e(t) : e;
58
+ }
59
+ function ie(e) {
60
+ return e.split("-")[0];
61
+ }
62
+ function be(e) {
63
+ return e.split("-")[1];
64
+ }
65
+ function it(e) {
66
+ return e === "x" ? "y" : "x";
67
+ }
68
+ function ct(e) {
69
+ return e === "y" ? "height" : "width";
70
+ }
71
+ const Gn = /* @__PURE__ */ new Set(["top", "bottom"]);
72
+ function ee(e) {
73
+ return Gn.has(ie(e)) ? "y" : "x";
74
+ }
75
+ function lt(e) {
76
+ return it(ee(e));
77
+ }
78
+ function qn(e, t, n) {
79
+ n === void 0 && (n = !1);
80
+ const o = be(e), r = lt(e), i = ct(r);
81
+ let s = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
82
+ return t.reference[i] > t.floating[i] && (s = De(s)), [s, De(s)];
83
+ }
84
+ function Zn(e) {
85
+ const t = De(e);
86
+ return [Ze(e), t, Ze(t)];
87
+ }
88
+ function Ze(e) {
89
+ return e.replace(/start|end/g, (t) => Xn[t]);
90
+ }
91
+ const xt = ["left", "right"], wt = ["right", "left"], Jn = ["top", "bottom"], Qn = ["bottom", "top"];
92
+ function eo(e, t, n) {
93
+ switch (e) {
94
+ case "top":
95
+ case "bottom":
96
+ return n ? t ? wt : xt : t ? xt : wt;
97
+ case "left":
98
+ case "right":
99
+ return t ? Jn : Qn;
100
+ default:
101
+ return [];
102
+ }
103
+ }
104
+ function to(e, t, n, o) {
105
+ const r = be(e);
106
+ let i = eo(ie(e), n === "start", o);
107
+ return r && (i = i.map((s) => s + "-" + r), t && (i = i.concat(i.map(Ze)))), i;
108
+ }
109
+ function De(e) {
110
+ return e.replace(/left|right|bottom|top/g, (t) => Yn[t]);
111
+ }
112
+ function no(e) {
113
+ return {
114
+ top: 0,
115
+ right: 0,
116
+ bottom: 0,
117
+ left: 0,
118
+ ...e
119
+ };
120
+ }
121
+ function Dt(e) {
122
+ return typeof e != "number" ? no(e) : {
123
+ top: e,
124
+ right: e,
125
+ bottom: e,
126
+ left: e
127
+ };
128
+ }
129
+ function Le(e) {
130
+ const {
131
+ x: t,
132
+ y: n,
133
+ width: o,
134
+ height: r
135
+ } = e;
136
+ return {
137
+ width: o,
138
+ height: r,
139
+ top: n,
140
+ left: t,
141
+ right: t + o,
142
+ bottom: n + r,
143
+ x: t,
144
+ y: n
145
+ };
146
+ }
147
+ function vt(e, t, n) {
148
+ let {
149
+ reference: o,
150
+ floating: r
151
+ } = e;
152
+ const i = ee(t), s = lt(t), c = ct(s), l = ie(t), a = i === "y", d = o.x + o.width / 2 - r.width / 2, u = o.y + o.height / 2 - r.height / 2, x = o[c] / 2 - r[c] / 2;
153
+ let m;
154
+ switch (l) {
155
+ case "top":
156
+ m = {
157
+ x: d,
158
+ y: o.y - r.height
159
+ };
160
+ break;
161
+ case "bottom":
162
+ m = {
163
+ x: d,
164
+ y: o.y + o.height
165
+ };
166
+ break;
167
+ case "right":
168
+ m = {
169
+ x: o.x + o.width,
170
+ y: u
171
+ };
172
+ break;
173
+ case "left":
174
+ m = {
175
+ x: o.x - r.width,
176
+ y: u
177
+ };
178
+ break;
179
+ default:
180
+ m = {
181
+ x: o.x,
182
+ y: o.y
183
+ };
184
+ }
185
+ switch (be(t)) {
186
+ case "start":
187
+ m[s] -= x * (n && a ? -1 : 1);
188
+ break;
189
+ case "end":
190
+ m[s] += x * (n && a ? -1 : 1);
191
+ break;
192
+ }
193
+ return m;
194
+ }
195
+ const oo = async (e, t, n) => {
196
+ const {
197
+ placement: o = "bottom",
198
+ strategy: r = "absolute",
199
+ middleware: i = [],
200
+ platform: s
201
+ } = n, c = i.filter(Boolean), l = await (s.isRTL == null ? void 0 : s.isRTL(t));
202
+ let a = await s.getElementRects({
203
+ reference: e,
204
+ floating: t,
205
+ strategy: r
206
+ }), {
207
+ x: d,
208
+ y: u
209
+ } = vt(a, o, l), x = o, m = {}, h = 0;
210
+ for (let f = 0; f < c.length; f++) {
211
+ const {
212
+ name: v,
213
+ fn: y
214
+ } = c[f], {
215
+ x: g,
216
+ y: S,
217
+ data: C,
218
+ reset: b
219
+ } = await y({
220
+ x: d,
221
+ y: u,
222
+ initialPlacement: o,
223
+ placement: x,
224
+ strategy: r,
225
+ middlewareData: m,
226
+ rects: a,
227
+ platform: s,
228
+ elements: {
229
+ reference: e,
230
+ floating: t
231
+ }
232
+ });
233
+ d = g ?? d, u = S ?? u, m = {
234
+ ...m,
235
+ [v]: {
236
+ ...m[v],
237
+ ...C
238
+ }
239
+ }, b && h <= 50 && (h++, typeof b == "object" && (b.placement && (x = b.placement), b.rects && (a = b.rects === !0 ? await s.getElementRects({
240
+ reference: e,
241
+ floating: t,
242
+ strategy: r
243
+ }) : b.rects), {
244
+ x: d,
245
+ y: u
246
+ } = vt(a, x, l)), f = -1);
247
+ }
248
+ return {
249
+ x: d,
250
+ y: u,
251
+ placement: x,
252
+ strategy: r,
253
+ middlewareData: m
254
+ };
255
+ };
256
+ async function Ee(e, t) {
257
+ var n;
258
+ t === void 0 && (t = {});
259
+ const {
260
+ x: o,
261
+ y: r,
262
+ platform: i,
263
+ rects: s,
264
+ elements: c,
265
+ strategy: l
266
+ } = e, {
267
+ boundary: a = "clippingAncestors",
268
+ rootBoundary: d = "viewport",
269
+ elementContext: u = "floating",
270
+ altBoundary: x = !1,
271
+ padding: m = 0
272
+ } = se(t, e), h = Dt(m), v = c[x ? u === "floating" ? "reference" : "floating" : u], y = Le(await i.getClippingRect({
273
+ element: (n = await (i.isElement == null ? void 0 : i.isElement(v))) == null || n ? v : v.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
274
+ boundary: a,
275
+ rootBoundary: d,
276
+ strategy: l
277
+ })), g = u === "floating" ? {
278
+ x: o,
279
+ y: r,
280
+ width: s.floating.width,
281
+ height: s.floating.height
282
+ } : s.reference, S = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), C = await (i.isElement == null ? void 0 : i.isElement(S)) ? await (i.getScale == null ? void 0 : i.getScale(S)) || {
283
+ x: 1,
284
+ y: 1
285
+ } : {
286
+ x: 1,
287
+ y: 1
288
+ }, b = Le(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
289
+ elements: c,
290
+ rect: g,
291
+ offsetParent: S,
292
+ strategy: l
293
+ }) : g);
294
+ return {
295
+ top: (y.top - b.top + h.top) / C.y,
296
+ bottom: (b.bottom - y.bottom + h.bottom) / C.y,
297
+ left: (y.left - b.left + h.left) / C.x,
298
+ right: (b.right - y.right + h.right) / C.x
299
+ };
300
+ }
301
+ const ro = (e) => ({
302
+ name: "arrow",
303
+ options: e,
304
+ async fn(t) {
305
+ const {
306
+ x: n,
307
+ y: o,
308
+ placement: r,
309
+ rects: i,
310
+ platform: s,
311
+ elements: c,
312
+ middlewareData: l
313
+ } = t, {
314
+ element: a,
315
+ padding: d = 0
316
+ } = se(e, t) || {};
317
+ if (a == null)
318
+ return {};
319
+ const u = Dt(d), x = {
320
+ x: n,
321
+ y: o
322
+ }, m = lt(r), h = ct(m), f = await s.getDimensions(a), v = m === "y", y = v ? "top" : "left", g = v ? "bottom" : "right", S = v ? "clientHeight" : "clientWidth", C = i.reference[h] + i.reference[m] - x[m] - i.floating[h], b = x[m] - i.reference[m], O = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a));
323
+ let A = O ? O[S] : 0;
324
+ (!A || !await (s.isElement == null ? void 0 : s.isElement(O))) && (A = c.floating[S] || i.floating[h]);
325
+ const N = C / 2 - b / 2, B = A / 2 - f[h] / 2 - 1, M = le(u[y], B), D = le(u[g], B), L = M, _ = A - f[h] - D, E = A / 2 - f[h] / 2 + N, V = qe(L, E, _), T = !l.arrow && be(r) != null && E !== V && i.reference[h] / 2 - (E < L ? M : D) - f[h] / 2 < 0, I = T ? E < L ? E - L : E - _ : 0;
326
+ return {
327
+ [m]: x[m] + I,
328
+ data: {
329
+ [m]: V,
330
+ centerOffset: E - V - I,
331
+ ...T && {
332
+ alignmentOffset: I
333
+ }
334
+ },
335
+ reset: T
336
+ };
337
+ }
338
+ }), so = function(e) {
339
+ return e === void 0 && (e = {}), {
340
+ name: "flip",
341
+ options: e,
342
+ async fn(t) {
343
+ var n, o;
344
+ const {
345
+ placement: r,
346
+ middlewareData: i,
347
+ rects: s,
348
+ initialPlacement: c,
349
+ platform: l,
350
+ elements: a
351
+ } = t, {
352
+ mainAxis: d = !0,
353
+ crossAxis: u = !0,
354
+ fallbackPlacements: x,
355
+ fallbackStrategy: m = "bestFit",
356
+ fallbackAxisSideDirection: h = "none",
357
+ flipAlignment: f = !0,
358
+ ...v
359
+ } = se(e, t);
360
+ if ((n = i.arrow) != null && n.alignmentOffset)
361
+ return {};
362
+ const y = ie(r), g = ee(c), S = ie(c) === c, C = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), b = x || (S || !f ? [De(c)] : Zn(c)), O = h !== "none";
363
+ !x && O && b.push(...to(c, f, h, C));
364
+ const A = [c, ...b], N = await Ee(t, v), B = [];
365
+ let M = ((o = i.flip) == null ? void 0 : o.overflows) || [];
366
+ if (d && B.push(N[y]), u) {
367
+ const E = qn(r, s, C);
368
+ B.push(N[E[0]], N[E[1]]);
369
+ }
370
+ if (M = [...M, {
371
+ placement: r,
372
+ overflows: B
373
+ }], !B.every((E) => E <= 0)) {
374
+ var D, L;
375
+ const E = (((D = i.flip) == null ? void 0 : D.index) || 0) + 1, V = A[E];
376
+ if (V && (!(u === "alignment" ? g !== ee(V) : !1) || // We leave the current main axis only if every placement on that axis
377
+ // overflows the main axis.
378
+ M.every((P) => ee(P.placement) === g ? P.overflows[0] > 0 : !0)))
379
+ return {
380
+ data: {
381
+ index: E,
382
+ overflows: M
383
+ },
384
+ reset: {
385
+ placement: V
386
+ }
387
+ };
388
+ let T = (L = M.filter((I) => I.overflows[0] <= 0).sort((I, P) => I.overflows[1] - P.overflows[1])[0]) == null ? void 0 : L.placement;
389
+ if (!T)
390
+ switch (m) {
391
+ case "bestFit": {
392
+ var _;
393
+ const I = (_ = M.filter((P) => {
394
+ if (O) {
395
+ const j = ee(P.placement);
396
+ return j === g || // Create a bias to the `y` side axis due to horizontal
397
+ // reading directions favoring greater width.
398
+ j === "y";
399
+ }
400
+ return !0;
401
+ }).map((P) => [P.placement, P.overflows.filter((j) => j > 0).reduce((j, K) => j + K, 0)]).sort((P, j) => P[1] - j[1])[0]) == null ? void 0 : _[0];
402
+ I && (T = I);
403
+ break;
404
+ }
405
+ case "initialPlacement":
406
+ T = c;
407
+ break;
408
+ }
409
+ if (r !== T)
410
+ return {
411
+ reset: {
412
+ placement: T
413
+ }
414
+ };
415
+ }
416
+ return {};
417
+ }
418
+ };
419
+ };
420
+ function yt(e, t) {
421
+ return {
422
+ top: e.top - t.height,
423
+ right: e.right - t.width,
424
+ bottom: e.bottom - t.height,
425
+ left: e.left - t.width
426
+ };
427
+ }
428
+ function St(e) {
429
+ return Kn.some((t) => e[t] >= 0);
430
+ }
431
+ const io = function(e) {
432
+ return e === void 0 && (e = {}), {
433
+ name: "hide",
434
+ options: e,
435
+ async fn(t) {
436
+ const {
437
+ rects: n
438
+ } = t, {
439
+ strategy: o = "referenceHidden",
440
+ ...r
441
+ } = se(e, t);
442
+ switch (o) {
443
+ case "referenceHidden": {
444
+ const i = await Ee(t, {
445
+ ...r,
446
+ elementContext: "reference"
447
+ }), s = yt(i, n.reference);
448
+ return {
449
+ data: {
450
+ referenceHiddenOffsets: s,
451
+ referenceHidden: St(s)
452
+ }
453
+ };
454
+ }
455
+ case "escaped": {
456
+ const i = await Ee(t, {
457
+ ...r,
458
+ altBoundary: !0
459
+ }), s = yt(i, n.floating);
460
+ return {
461
+ data: {
462
+ escapedOffsets: s,
463
+ escaped: St(s)
464
+ }
465
+ };
466
+ }
467
+ default:
468
+ return {};
469
+ }
470
+ }
471
+ };
472
+ }, Lt = /* @__PURE__ */ new Set(["left", "top"]);
473
+ async function co(e, t) {
474
+ const {
475
+ placement: n,
476
+ platform: o,
477
+ elements: r
478
+ } = e, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = ie(n), c = be(n), l = ee(n) === "y", a = Lt.has(s) ? -1 : 1, d = i && l ? -1 : 1, u = se(t, e);
479
+ let {
480
+ mainAxis: x,
481
+ crossAxis: m,
482
+ alignmentAxis: h
483
+ } = typeof u == "number" ? {
484
+ mainAxis: u,
485
+ crossAxis: 0,
486
+ alignmentAxis: null
487
+ } : {
488
+ mainAxis: u.mainAxis || 0,
489
+ crossAxis: u.crossAxis || 0,
490
+ alignmentAxis: u.alignmentAxis
491
+ };
492
+ return c && typeof h == "number" && (m = c === "end" ? h * -1 : h), l ? {
493
+ x: m * d,
494
+ y: x * a
495
+ } : {
496
+ x: x * a,
497
+ y: m * d
498
+ };
499
+ }
500
+ const lo = function(e) {
501
+ return e === void 0 && (e = 0), {
502
+ name: "offset",
503
+ options: e,
504
+ async fn(t) {
505
+ var n, o;
506
+ const {
507
+ x: r,
508
+ y: i,
509
+ placement: s,
510
+ middlewareData: c
511
+ } = t, l = await co(t, e);
512
+ return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
513
+ x: r + l.x,
514
+ y: i + l.y,
515
+ data: {
516
+ ...l,
517
+ placement: s
518
+ }
519
+ };
520
+ }
521
+ };
522
+ }, ao = function(e) {
523
+ return e === void 0 && (e = {}), {
524
+ name: "shift",
525
+ options: e,
526
+ async fn(t) {
527
+ const {
528
+ x: n,
529
+ y: o,
530
+ placement: r
531
+ } = t, {
532
+ mainAxis: i = !0,
533
+ crossAxis: s = !1,
534
+ limiter: c = {
535
+ fn: (v) => {
536
+ let {
537
+ x: y,
538
+ y: g
539
+ } = v;
540
+ return {
541
+ x: y,
542
+ y: g
543
+ };
544
+ }
545
+ },
546
+ ...l
547
+ } = se(e, t), a = {
548
+ x: n,
549
+ y: o
550
+ }, d = await Ee(t, l), u = ee(ie(r)), x = it(u);
551
+ let m = a[x], h = a[u];
552
+ if (i) {
553
+ const v = x === "y" ? "top" : "left", y = x === "y" ? "bottom" : "right", g = m + d[v], S = m - d[y];
554
+ m = qe(g, m, S);
555
+ }
556
+ if (s) {
557
+ const v = u === "y" ? "top" : "left", y = u === "y" ? "bottom" : "right", g = h + d[v], S = h - d[y];
558
+ h = qe(g, h, S);
559
+ }
560
+ const f = c.fn({
561
+ ...t,
562
+ [x]: m,
563
+ [u]: h
564
+ });
565
+ return {
566
+ ...f,
567
+ data: {
568
+ x: f.x - n,
569
+ y: f.y - o,
570
+ enabled: {
571
+ [x]: i,
572
+ [u]: s
573
+ }
574
+ }
575
+ };
576
+ }
577
+ };
578
+ }, fo = function(e) {
579
+ return e === void 0 && (e = {}), {
580
+ options: e,
581
+ fn(t) {
582
+ const {
583
+ x: n,
584
+ y: o,
585
+ placement: r,
586
+ rects: i,
587
+ middlewareData: s
588
+ } = t, {
589
+ offset: c = 0,
590
+ mainAxis: l = !0,
591
+ crossAxis: a = !0
592
+ } = se(e, t), d = {
593
+ x: n,
594
+ y: o
595
+ }, u = ee(r), x = it(u);
596
+ let m = d[x], h = d[u];
597
+ const f = se(c, t), v = typeof f == "number" ? {
598
+ mainAxis: f,
599
+ crossAxis: 0
600
+ } : {
601
+ mainAxis: 0,
602
+ crossAxis: 0,
603
+ ...f
604
+ };
605
+ if (l) {
606
+ const S = x === "y" ? "height" : "width", C = i.reference[x] - i.floating[S] + v.mainAxis, b = i.reference[x] + i.reference[S] - v.mainAxis;
607
+ m < C ? m = C : m > b && (m = b);
608
+ }
609
+ if (a) {
610
+ var y, g;
611
+ const S = x === "y" ? "width" : "height", C = Lt.has(ie(r)), b = i.reference[u] - i.floating[S] + (C && ((y = s.offset) == null ? void 0 : y[u]) || 0) + (C ? 0 : v.crossAxis), O = i.reference[u] + i.reference[S] + (C ? 0 : ((g = s.offset) == null ? void 0 : g[u]) || 0) - (C ? v.crossAxis : 0);
612
+ h < b ? h = b : h > O && (h = O);
613
+ }
614
+ return {
615
+ [x]: m,
616
+ [u]: h
617
+ };
618
+ }
619
+ };
620
+ }, uo = function(e) {
621
+ return e === void 0 && (e = {}), {
622
+ name: "size",
623
+ options: e,
624
+ async fn(t) {
625
+ var n, o;
626
+ const {
627
+ placement: r,
628
+ rects: i,
629
+ platform: s,
630
+ elements: c
631
+ } = t, {
632
+ apply: l = () => {
633
+ },
634
+ ...a
635
+ } = se(e, t), d = await Ee(t, a), u = ie(r), x = be(r), m = ee(r) === "y", {
636
+ width: h,
637
+ height: f
638
+ } = i.floating;
639
+ let v, y;
640
+ u === "top" || u === "bottom" ? (v = u, y = x === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (y = u, v = x === "end" ? "top" : "bottom");
641
+ const g = f - d.top - d.bottom, S = h - d.left - d.right, C = le(f - d[v], g), b = le(h - d[y], S), O = !t.middlewareData.shift;
642
+ let A = C, N = b;
643
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (N = S), (o = t.middlewareData.shift) != null && o.enabled.y && (A = g), O && !x) {
644
+ const M = Y(d.left, 0), D = Y(d.right, 0), L = Y(d.top, 0), _ = Y(d.bottom, 0);
645
+ m ? N = h - 2 * (M !== 0 || D !== 0 ? M + D : Y(d.left, d.right)) : A = f - 2 * (L !== 0 || _ !== 0 ? L + _ : Y(d.top, d.bottom));
646
+ }
647
+ await l({
648
+ ...t,
649
+ availableWidth: N,
650
+ availableHeight: A
651
+ });
652
+ const B = await s.getDimensions(c.floating);
653
+ return h !== B.width || f !== B.height ? {
654
+ reset: {
655
+ rects: !0
656
+ }
657
+ } : {};
658
+ }
659
+ };
660
+ };
661
+ function He() {
662
+ return typeof window < "u";
663
+ }
664
+ function Ce(e) {
665
+ return jt(e) ? (e.nodeName || "").toLowerCase() : "#document";
666
+ }
667
+ function X(e) {
668
+ var t;
669
+ return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
670
+ }
671
+ function re(e) {
672
+ var t;
673
+ return (t = (jt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
674
+ }
675
+ function jt(e) {
676
+ return He() ? e instanceof Node || e instanceof X(e).Node : !1;
677
+ }
678
+ function J(e) {
679
+ return He() ? e instanceof Element || e instanceof X(e).Element : !1;
680
+ }
681
+ function oe(e) {
682
+ return He() ? e instanceof HTMLElement || e instanceof X(e).HTMLElement : !1;
683
+ }
684
+ function bt(e) {
685
+ return !He() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof X(e).ShadowRoot;
686
+ }
687
+ const po = /* @__PURE__ */ new Set(["inline", "contents"]);
688
+ function Ie(e) {
689
+ const {
690
+ overflow: t,
691
+ overflowX: n,
692
+ overflowY: o,
693
+ display: r
694
+ } = Q(e);
695
+ return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !po.has(r);
696
+ }
697
+ const mo = /* @__PURE__ */ new Set(["table", "td", "th"]);
698
+ function ho(e) {
699
+ return mo.has(Ce(e));
700
+ }
701
+ const go = [":popover-open", ":modal"];
702
+ function Be(e) {
703
+ return go.some((t) => {
704
+ try {
705
+ return e.matches(t);
706
+ } catch {
707
+ return !1;
708
+ }
709
+ });
710
+ }
711
+ const xo = ["transform", "translate", "scale", "rotate", "perspective"], wo = ["transform", "translate", "scale", "rotate", "perspective", "filter"], vo = ["paint", "layout", "strict", "content"];
712
+ function at(e) {
713
+ const t = dt(), n = J(e) ? Q(e) : e;
714
+ return xo.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || wo.some((o) => (n.willChange || "").includes(o)) || vo.some((o) => (n.contain || "").includes(o));
715
+ }
716
+ function yo(e) {
717
+ let t = ae(e);
718
+ for (; oe(t) && !Se(t); ) {
719
+ if (at(t))
720
+ return t;
721
+ if (Be(t))
722
+ return null;
723
+ t = ae(t);
724
+ }
725
+ return null;
726
+ }
727
+ function dt() {
728
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
729
+ }
730
+ const So = /* @__PURE__ */ new Set(["html", "body", "#document"]);
731
+ function Se(e) {
732
+ return So.has(Ce(e));
733
+ }
734
+ function Q(e) {
735
+ return X(e).getComputedStyle(e);
736
+ }
737
+ function Ve(e) {
738
+ return J(e) ? {
739
+ scrollLeft: e.scrollLeft,
740
+ scrollTop: e.scrollTop
741
+ } : {
742
+ scrollLeft: e.scrollX,
743
+ scrollTop: e.scrollY
744
+ };
745
+ }
746
+ function ae(e) {
747
+ if (Ce(e) === "html")
748
+ return e;
749
+ const t = (
750
+ // Step into the shadow DOM of the parent of a slotted node.
751
+ e.assignedSlot || // DOM Element detected.
752
+ e.parentNode || // ShadowRoot detected.
753
+ bt(e) && e.host || // Fallback.
754
+ re(e)
755
+ );
756
+ return bt(t) ? t.host : t;
757
+ }
758
+ function kt(e) {
759
+ const t = ae(e);
760
+ return Se(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : oe(t) && Ie(t) ? t : kt(t);
761
+ }
762
+ function Oe(e, t, n) {
763
+ var o;
764
+ t === void 0 && (t = []), n === void 0 && (n = !0);
765
+ const r = kt(e), i = r === ((o = e.ownerDocument) == null ? void 0 : o.body), s = X(r);
766
+ if (i) {
767
+ const c = Je(s);
768
+ return t.concat(s, s.visualViewport || [], Ie(r) ? r : [], c && n ? Oe(c) : []);
769
+ }
770
+ return t.concat(r, Oe(r, [], n));
771
+ }
772
+ function Je(e) {
773
+ return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
774
+ }
775
+ function Ht(e) {
776
+ const t = Q(e);
777
+ let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
778
+ const r = oe(e), i = r ? e.offsetWidth : n, s = r ? e.offsetHeight : o, c = Me(n) !== i || Me(o) !== s;
779
+ return c && (n = i, o = s), {
780
+ width: n,
781
+ height: o,
782
+ $: c
783
+ };
784
+ }
785
+ function ft(e) {
786
+ return J(e) ? e : e.contextElement;
787
+ }
788
+ function ve(e) {
789
+ const t = ft(e);
790
+ if (!oe(t))
791
+ return te(1);
792
+ const n = t.getBoundingClientRect(), {
793
+ width: o,
794
+ height: r,
795
+ $: i
796
+ } = Ht(t);
797
+ let s = (i ? Me(n.width) : n.width) / o, c = (i ? Me(n.height) : n.height) / r;
798
+ return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
799
+ x: s,
800
+ y: c
801
+ };
802
+ }
803
+ const bo = /* @__PURE__ */ te(0);
804
+ function Bt(e) {
805
+ const t = X(e);
806
+ return !dt() || !t.visualViewport ? bo : {
807
+ x: t.visualViewport.offsetLeft,
808
+ y: t.visualViewport.offsetTop
809
+ };
810
+ }
811
+ function Co(e, t, n) {
812
+ return t === void 0 && (t = !1), !n || t && n !== X(e) ? !1 : t;
813
+ }
814
+ function he(e, t, n, o) {
815
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
816
+ const r = e.getBoundingClientRect(), i = ft(e);
817
+ let s = te(1);
818
+ t && (o ? J(o) && (s = ve(o)) : s = ve(e));
819
+ const c = Co(i, n, o) ? Bt(i) : te(0);
820
+ let l = (r.left + c.x) / s.x, a = (r.top + c.y) / s.y, d = r.width / s.x, u = r.height / s.y;
821
+ if (i) {
822
+ const x = X(i), m = o && J(o) ? X(o) : o;
823
+ let h = x, f = Je(h);
824
+ for (; f && o && m !== h; ) {
825
+ const v = ve(f), y = f.getBoundingClientRect(), g = Q(f), S = y.left + (f.clientLeft + parseFloat(g.paddingLeft)) * v.x, C = y.top + (f.clientTop + parseFloat(g.paddingTop)) * v.y;
826
+ l *= v.x, a *= v.y, d *= v.x, u *= v.y, l += S, a += C, h = X(f), f = Je(h);
827
+ }
828
+ }
829
+ return Le({
830
+ width: d,
831
+ height: u,
832
+ x: l,
833
+ y: a
834
+ });
835
+ }
836
+ function Fe(e, t) {
837
+ const n = Ve(e).scrollLeft;
838
+ return t ? t.left + n : he(re(e)).left + n;
839
+ }
840
+ function Vt(e, t) {
841
+ const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - Fe(e, n), r = n.top + t.scrollTop;
842
+ return {
843
+ x: o,
844
+ y: r
845
+ };
846
+ }
847
+ function Ro(e) {
848
+ let {
849
+ elements: t,
850
+ rect: n,
851
+ offsetParent: o,
852
+ strategy: r
853
+ } = e;
854
+ const i = r === "fixed", s = re(o), c = t ? Be(t.floating) : !1;
855
+ if (o === s || c && i)
856
+ return n;
857
+ let l = {
858
+ scrollLeft: 0,
859
+ scrollTop: 0
860
+ }, a = te(1);
861
+ const d = te(0), u = oe(o);
862
+ if ((u || !u && !i) && ((Ce(o) !== "body" || Ie(s)) && (l = Ve(o)), oe(o))) {
863
+ const m = he(o);
864
+ a = ve(o), d.x = m.x + o.clientLeft, d.y = m.y + o.clientTop;
865
+ }
866
+ const x = s && !u && !i ? Vt(s, l) : te(0);
867
+ return {
868
+ width: n.width * a.x,
869
+ height: n.height * a.y,
870
+ x: n.x * a.x - l.scrollLeft * a.x + d.x + x.x,
871
+ y: n.y * a.y - l.scrollTop * a.y + d.y + x.y
872
+ };
873
+ }
874
+ function Po(e) {
875
+ return Array.from(e.getClientRects());
876
+ }
877
+ function Ao(e) {
878
+ const t = re(e), n = Ve(e), o = e.ownerDocument.body, r = Y(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), i = Y(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
879
+ let s = -n.scrollLeft + Fe(e);
880
+ const c = -n.scrollTop;
881
+ return Q(o).direction === "rtl" && (s += Y(t.clientWidth, o.clientWidth) - r), {
882
+ width: r,
883
+ height: i,
884
+ x: s,
885
+ y: c
886
+ };
887
+ }
888
+ const Ct = 25;
889
+ function To(e, t) {
890
+ const n = X(e), o = re(e), r = n.visualViewport;
891
+ let i = o.clientWidth, s = o.clientHeight, c = 0, l = 0;
892
+ if (r) {
893
+ i = r.width, s = r.height;
894
+ const d = dt();
895
+ (!d || d && t === "fixed") && (c = r.offsetLeft, l = r.offsetTop);
896
+ }
897
+ const a = Fe(o);
898
+ if (a <= 0) {
899
+ const d = o.ownerDocument, u = d.body, x = getComputedStyle(u), m = d.compatMode === "CSS1Compat" && parseFloat(x.marginLeft) + parseFloat(x.marginRight) || 0, h = Math.abs(o.clientWidth - u.clientWidth - m);
900
+ h <= Ct && (i -= h);
901
+ } else a <= Ct && (i += a);
902
+ return {
903
+ width: i,
904
+ height: s,
905
+ x: c,
906
+ y: l
907
+ };
908
+ }
909
+ const Eo = /* @__PURE__ */ new Set(["absolute", "fixed"]);
910
+ function Oo(e, t) {
911
+ const n = he(e, !0, t === "fixed"), o = n.top + e.clientTop, r = n.left + e.clientLeft, i = oe(e) ? ve(e) : te(1), s = e.clientWidth * i.x, c = e.clientHeight * i.y, l = r * i.x, a = o * i.y;
912
+ return {
913
+ width: s,
914
+ height: c,
915
+ x: l,
916
+ y: a
917
+ };
918
+ }
919
+ function Rt(e, t, n) {
920
+ let o;
921
+ if (t === "viewport")
922
+ o = To(e, n);
923
+ else if (t === "document")
924
+ o = Ao(re(e));
925
+ else if (J(t))
926
+ o = Oo(t, n);
927
+ else {
928
+ const r = Bt(e);
929
+ o = {
930
+ x: t.x - r.x,
931
+ y: t.y - r.y,
932
+ width: t.width,
933
+ height: t.height
934
+ };
935
+ }
936
+ return Le(o);
937
+ }
938
+ function Ft(e, t) {
939
+ const n = ae(e);
940
+ return n === t || !J(n) || Se(n) ? !1 : Q(n).position === "fixed" || Ft(n, t);
941
+ }
942
+ function Io(e, t) {
943
+ const n = t.get(e);
944
+ if (n)
945
+ return n;
946
+ let o = Oe(e, [], !1).filter((c) => J(c) && Ce(c) !== "body"), r = null;
947
+ const i = Q(e).position === "fixed";
948
+ let s = i ? ae(e) : e;
949
+ for (; J(s) && !Se(s); ) {
950
+ const c = Q(s), l = at(s);
951
+ !l && c.position === "fixed" && (r = null), (i ? !l && !r : !l && c.position === "static" && !!r && Eo.has(r.position) || Ie(s) && !l && Ft(e, s)) ? o = o.filter((d) => d !== s) : r = c, s = ae(s);
952
+ }
953
+ return t.set(e, o), o;
954
+ }
955
+ function No(e) {
956
+ let {
957
+ element: t,
958
+ boundary: n,
959
+ rootBoundary: o,
960
+ strategy: r
961
+ } = e;
962
+ const s = [...n === "clippingAncestors" ? Be(t) ? [] : Io(t, this._c) : [].concat(n), o], c = s[0], l = s.reduce((a, d) => {
963
+ const u = Rt(t, d, r);
964
+ return a.top = Y(u.top, a.top), a.right = le(u.right, a.right), a.bottom = le(u.bottom, a.bottom), a.left = Y(u.left, a.left), a;
965
+ }, Rt(t, c, r));
966
+ return {
967
+ width: l.right - l.left,
968
+ height: l.bottom - l.top,
969
+ x: l.left,
970
+ y: l.top
971
+ };
972
+ }
973
+ function _o(e) {
974
+ const {
975
+ width: t,
976
+ height: n
977
+ } = Ht(e);
978
+ return {
979
+ width: t,
980
+ height: n
981
+ };
982
+ }
983
+ function Mo(e, t, n) {
984
+ const o = oe(t), r = re(t), i = n === "fixed", s = he(e, !0, i, t);
985
+ let c = {
986
+ scrollLeft: 0,
987
+ scrollTop: 0
988
+ };
989
+ const l = te(0);
990
+ function a() {
991
+ l.x = Fe(r);
992
+ }
993
+ if (o || !o && !i)
994
+ if ((Ce(t) !== "body" || Ie(r)) && (c = Ve(t)), o) {
995
+ const m = he(t, !0, i, t);
996
+ l.x = m.x + t.clientLeft, l.y = m.y + t.clientTop;
997
+ } else r && a();
998
+ i && !o && r && a();
999
+ const d = r && !o && !i ? Vt(r, c) : te(0), u = s.left + c.scrollLeft - l.x - d.x, x = s.top + c.scrollTop - l.y - d.y;
1000
+ return {
1001
+ x: u,
1002
+ y: x,
1003
+ width: s.width,
1004
+ height: s.height
1005
+ };
1006
+ }
1007
+ function Xe(e) {
1008
+ return Q(e).position === "static";
1009
+ }
1010
+ function Pt(e, t) {
1011
+ if (!oe(e) || Q(e).position === "fixed")
1012
+ return null;
1013
+ if (t)
1014
+ return t(e);
1015
+ let n = e.offsetParent;
1016
+ return re(e) === n && (n = n.ownerDocument.body), n;
1017
+ }
1018
+ function Wt(e, t) {
1019
+ const n = X(e);
1020
+ if (Be(e))
1021
+ return n;
1022
+ if (!oe(e)) {
1023
+ let r = ae(e);
1024
+ for (; r && !Se(r); ) {
1025
+ if (J(r) && !Xe(r))
1026
+ return r;
1027
+ r = ae(r);
1028
+ }
1029
+ return n;
1030
+ }
1031
+ let o = Pt(e, t);
1032
+ for (; o && ho(o) && Xe(o); )
1033
+ o = Pt(o, t);
1034
+ return o && Se(o) && Xe(o) && !at(o) ? n : o || yo(e) || n;
1035
+ }
1036
+ const Do = async function(e) {
1037
+ const t = this.getOffsetParent || Wt, n = this.getDimensions, o = await n(e.floating);
1038
+ return {
1039
+ reference: Mo(e.reference, await t(e.floating), e.strategy),
1040
+ floating: {
1041
+ x: 0,
1042
+ y: 0,
1043
+ width: o.width,
1044
+ height: o.height
1045
+ }
1046
+ };
1047
+ };
1048
+ function Lo(e) {
1049
+ return Q(e).direction === "rtl";
1050
+ }
1051
+ const jo = {
1052
+ convertOffsetParentRelativeRectToViewportRelativeRect: Ro,
1053
+ getDocumentElement: re,
1054
+ getClippingRect: No,
1055
+ getOffsetParent: Wt,
1056
+ getElementRects: Do,
1057
+ getClientRects: Po,
1058
+ getDimensions: _o,
1059
+ getScale: ve,
1060
+ isElement: J,
1061
+ isRTL: Lo
1062
+ };
1063
+ function $t(e, t) {
1064
+ return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
1065
+ }
1066
+ function ko(e, t) {
1067
+ let n = null, o;
1068
+ const r = re(e);
1069
+ function i() {
1070
+ var c;
1071
+ clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
1072
+ }
1073
+ function s(c, l) {
1074
+ c === void 0 && (c = !1), l === void 0 && (l = 1), i();
1075
+ const a = e.getBoundingClientRect(), {
1076
+ left: d,
1077
+ top: u,
1078
+ width: x,
1079
+ height: m
1080
+ } = a;
1081
+ if (c || t(), !x || !m)
1082
+ return;
1083
+ const h = Ne(u), f = Ne(r.clientWidth - (d + x)), v = Ne(r.clientHeight - (u + m)), y = Ne(d), S = {
1084
+ rootMargin: -h + "px " + -f + "px " + -v + "px " + -y + "px",
1085
+ threshold: Y(0, le(1, l)) || 1
1086
+ };
1087
+ let C = !0;
1088
+ function b(O) {
1089
+ const A = O[0].intersectionRatio;
1090
+ if (A !== l) {
1091
+ if (!C)
1092
+ return s();
1093
+ A ? s(!1, A) : o = setTimeout(() => {
1094
+ s(!1, 1e-7);
1095
+ }, 1e3);
1096
+ }
1097
+ A === 1 && !$t(a, e.getBoundingClientRect()) && s(), C = !1;
1098
+ }
1099
+ try {
1100
+ n = new IntersectionObserver(b, {
1101
+ ...S,
1102
+ // Handle <iframe>s
1103
+ root: r.ownerDocument
1104
+ });
1105
+ } catch {
1106
+ n = new IntersectionObserver(b, S);
1107
+ }
1108
+ n.observe(e);
1109
+ }
1110
+ return s(!0), i;
1111
+ }
1112
+ function Ho(e, t, n, o) {
1113
+ o === void 0 && (o = {});
1114
+ const {
1115
+ ancestorScroll: r = !0,
1116
+ ancestorResize: i = !0,
1117
+ elementResize: s = typeof ResizeObserver == "function",
1118
+ layoutShift: c = typeof IntersectionObserver == "function",
1119
+ animationFrame: l = !1
1120
+ } = o, a = ft(e), d = r || i ? [...a ? Oe(a) : [], ...Oe(t)] : [];
1121
+ d.forEach((y) => {
1122
+ r && y.addEventListener("scroll", n, {
1123
+ passive: !0
1124
+ }), i && y.addEventListener("resize", n);
1125
+ });
1126
+ const u = a && c ? ko(a, n) : null;
1127
+ let x = -1, m = null;
1128
+ s && (m = new ResizeObserver((y) => {
1129
+ let [g] = y;
1130
+ g && g.target === a && m && (m.unobserve(t), cancelAnimationFrame(x), x = requestAnimationFrame(() => {
1131
+ var S;
1132
+ (S = m) == null || S.observe(t);
1133
+ })), n();
1134
+ }), a && !l && m.observe(a), m.observe(t));
1135
+ let h, f = l ? he(e) : null;
1136
+ l && v();
1137
+ function v() {
1138
+ const y = he(e);
1139
+ f && !$t(f, y) && n(), f = y, h = requestAnimationFrame(v);
1140
+ }
1141
+ return n(), () => {
1142
+ var y;
1143
+ d.forEach((g) => {
1144
+ r && g.removeEventListener("scroll", n), i && g.removeEventListener("resize", n);
1145
+ }), u?.(), (y = m) == null || y.disconnect(), m = null, l && cancelAnimationFrame(h);
1146
+ };
1147
+ }
1148
+ const Bo = lo, Vo = ao, Fo = so, Wo = uo, $o = io, At = ro, zo = fo, Uo = (e, t, n) => {
1149
+ const o = /* @__PURE__ */ new Map(), r = {
1150
+ platform: jo,
1151
+ ...n
1152
+ }, i = {
1153
+ ...r.platform,
1154
+ _c: o
1155
+ };
1156
+ return oo(e, t, {
1157
+ ...r,
1158
+ platform: i
1159
+ });
1160
+ };
1161
+ var Ko = typeof document < "u", Yo = function() {
1162
+ }, _e = Ko ? p.useLayoutEffect : Yo;
1163
+ function je(e, t) {
1164
+ if (e === t)
1165
+ return !0;
1166
+ if (typeof e != typeof t)
1167
+ return !1;
1168
+ if (typeof e == "function" && e.toString() === t.toString())
1169
+ return !0;
1170
+ let n, o, r;
1171
+ if (e && t && typeof e == "object") {
1172
+ if (Array.isArray(e)) {
1173
+ if (n = e.length, n !== t.length) return !1;
1174
+ for (o = n; o-- !== 0; )
1175
+ if (!je(e[o], t[o]))
1176
+ return !1;
1177
+ return !0;
1178
+ }
1179
+ if (r = Object.keys(e), n = r.length, n !== Object.keys(t).length)
1180
+ return !1;
1181
+ for (o = n; o-- !== 0; )
1182
+ if (!{}.hasOwnProperty.call(t, r[o]))
1183
+ return !1;
1184
+ for (o = n; o-- !== 0; ) {
1185
+ const i = r[o];
1186
+ if (!(i === "_owner" && e.$$typeof) && !je(e[i], t[i]))
1187
+ return !1;
1188
+ }
1189
+ return !0;
1190
+ }
1191
+ return e !== e && t !== t;
1192
+ }
1193
+ function zt(e) {
1194
+ return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
1195
+ }
1196
+ function Tt(e, t) {
1197
+ const n = zt(e);
1198
+ return Math.round(t * n) / n;
1199
+ }
1200
+ function Ge(e) {
1201
+ const t = p.useRef(e);
1202
+ return _e(() => {
1203
+ t.current = e;
1204
+ }), t;
1205
+ }
1206
+ function Xo(e) {
1207
+ e === void 0 && (e = {});
1208
+ const {
1209
+ placement: t = "bottom",
1210
+ strategy: n = "absolute",
1211
+ middleware: o = [],
1212
+ platform: r,
1213
+ elements: {
1214
+ reference: i,
1215
+ floating: s
1216
+ } = {},
1217
+ transform: c = !0,
1218
+ whileElementsMounted: l,
1219
+ open: a
1220
+ } = e, [d, u] = p.useState({
1221
+ x: 0,
1222
+ y: 0,
1223
+ strategy: n,
1224
+ placement: t,
1225
+ middlewareData: {},
1226
+ isPositioned: !1
1227
+ }), [x, m] = p.useState(o);
1228
+ je(x, o) || m(o);
1229
+ const [h, f] = p.useState(null), [v, y] = p.useState(null), g = p.useCallback((P) => {
1230
+ P !== O.current && (O.current = P, f(P));
1231
+ }, []), S = p.useCallback((P) => {
1232
+ P !== A.current && (A.current = P, y(P));
1233
+ }, []), C = i || h, b = s || v, O = p.useRef(null), A = p.useRef(null), N = p.useRef(d), B = l != null, M = Ge(l), D = Ge(r), L = Ge(a), _ = p.useCallback(() => {
1234
+ if (!O.current || !A.current)
1235
+ return;
1236
+ const P = {
1237
+ placement: t,
1238
+ strategy: n,
1239
+ middleware: x
1240
+ };
1241
+ D.current && (P.platform = D.current), Uo(O.current, A.current, P).then((j) => {
1242
+ const K = {
1243
+ ...j,
1244
+ // The floating element's position may be recomputed while it's closed
1245
+ // but still mounted (such as when transitioning out). To ensure
1246
+ // `isPositioned` will be `false` initially on the next open, avoid
1247
+ // setting it to `true` when `open === false` (must be specified).
1248
+ isPositioned: L.current !== !1
1249
+ };
1250
+ E.current && !je(N.current, K) && (N.current = K, rt.flushSync(() => {
1251
+ u(K);
1252
+ }));
1253
+ });
1254
+ }, [x, t, n, D, L]);
1255
+ _e(() => {
1256
+ a === !1 && N.current.isPositioned && (N.current.isPositioned = !1, u((P) => ({
1257
+ ...P,
1258
+ isPositioned: !1
1259
+ })));
1260
+ }, [a]);
1261
+ const E = p.useRef(!1);
1262
+ _e(() => (E.current = !0, () => {
1263
+ E.current = !1;
1264
+ }), []), _e(() => {
1265
+ if (C && (O.current = C), b && (A.current = b), C && b) {
1266
+ if (M.current)
1267
+ return M.current(C, b, _);
1268
+ _();
1269
+ }
1270
+ }, [C, b, _, M, B]);
1271
+ const V = p.useMemo(() => ({
1272
+ reference: O,
1273
+ floating: A,
1274
+ setReference: g,
1275
+ setFloating: S
1276
+ }), [g, S]), T = p.useMemo(() => ({
1277
+ reference: C,
1278
+ floating: b
1279
+ }), [C, b]), I = p.useMemo(() => {
1280
+ const P = {
1281
+ position: n,
1282
+ left: 0,
1283
+ top: 0
1284
+ };
1285
+ if (!T.floating)
1286
+ return P;
1287
+ const j = Tt(T.floating, d.x), K = Tt(T.floating, d.y);
1288
+ return c ? {
1289
+ ...P,
1290
+ transform: "translate(" + j + "px, " + K + "px)",
1291
+ ...zt(T.floating) >= 1.5 && {
1292
+ willChange: "transform"
1293
+ }
1294
+ } : {
1295
+ position: n,
1296
+ left: j,
1297
+ top: K
1298
+ };
1299
+ }, [n, c, T.floating, d.x, d.y]);
1300
+ return p.useMemo(() => ({
1301
+ ...d,
1302
+ update: _,
1303
+ refs: V,
1304
+ elements: T,
1305
+ floatingStyles: I
1306
+ }), [d, _, V, T, I]);
1307
+ }
1308
+ const Go = (e) => {
1309
+ function t(n) {
1310
+ return {}.hasOwnProperty.call(n, "current");
1311
+ }
1312
+ return {
1313
+ name: "arrow",
1314
+ options: e,
1315
+ fn(n) {
1316
+ const {
1317
+ element: o,
1318
+ padding: r
1319
+ } = typeof e == "function" ? e(n) : e;
1320
+ return o && t(o) ? o.current != null ? At({
1321
+ element: o.current,
1322
+ padding: r
1323
+ }).fn(n) : {} : o ? At({
1324
+ element: o,
1325
+ padding: r
1326
+ }).fn(n) : {};
1327
+ }
1328
+ };
1329
+ }, qo = (e, t) => ({
1330
+ ...Bo(e),
1331
+ options: [e, t]
1332
+ }), Zo = (e, t) => ({
1333
+ ...Vo(e),
1334
+ options: [e, t]
1335
+ }), Jo = (e, t) => ({
1336
+ ...zo(e),
1337
+ options: [e, t]
1338
+ }), Qo = (e, t) => ({
1339
+ ...Fo(e),
1340
+ options: [e, t]
1341
+ }), er = (e, t) => ({
1342
+ ...Wo(e),
1343
+ options: [e, t]
1344
+ }), tr = (e, t) => ({
1345
+ ...$o(e),
1346
+ options: [e, t]
1347
+ }), nr = (e, t) => ({
1348
+ ...Go(e),
1349
+ options: [e, t]
1350
+ });
1351
+ var or = "Arrow", Ut = p.forwardRef((e, t) => {
1352
+ const { children: n, width: o = 10, height: r = 5, ...i } = e;
1353
+ return /* @__PURE__ */ w.jsx(
1354
+ z.svg,
1355
+ {
1356
+ ...i,
1357
+ ref: t,
1358
+ width: o,
1359
+ height: r,
1360
+ viewBox: "0 0 30 10",
1361
+ preserveAspectRatio: "none",
1362
+ children: e.asChild ? n : /* @__PURE__ */ w.jsx("polygon", { points: "0,0 30,0 15,10" })
1363
+ }
1364
+ );
1365
+ });
1366
+ Ut.displayName = or;
1367
+ var rr = Ut, ut = "Popper", [Kt, Yt] = Ot(ut), [sr, Xt] = Kt(ut), Gt = (e) => {
1368
+ const { __scopePopper: t, children: n } = e, [o, r] = p.useState(null);
1369
+ return /* @__PURE__ */ w.jsx(sr, { scope: t, anchor: o, onAnchorChange: r, children: n });
1370
+ };
1371
+ Gt.displayName = ut;
1372
+ var qt = "PopperAnchor", Zt = p.forwardRef(
1373
+ (e, t) => {
1374
+ const { __scopePopper: n, virtualRef: o, ...r } = e, i = Xt(qt, n), s = p.useRef(null), c = q(t, s), l = p.useRef(null);
1375
+ return p.useEffect(() => {
1376
+ const a = l.current;
1377
+ l.current = o?.current || s.current, a !== l.current && i.onAnchorChange(l.current);
1378
+ }), o ? null : /* @__PURE__ */ w.jsx(z.div, { ...r, ref: c });
1379
+ }
1380
+ );
1381
+ Zt.displayName = qt;
1382
+ var pt = "PopperContent", [ir, cr] = Kt(pt), Jt = p.forwardRef(
1383
+ (e, t) => {
1384
+ const {
1385
+ __scopePopper: n,
1386
+ side: o = "bottom",
1387
+ sideOffset: r = 0,
1388
+ align: i = "center",
1389
+ alignOffset: s = 0,
1390
+ arrowPadding: c = 0,
1391
+ avoidCollisions: l = !0,
1392
+ collisionBoundary: a = [],
1393
+ collisionPadding: d = 0,
1394
+ sticky: u = "partial",
1395
+ hideWhenDetached: x = !1,
1396
+ updatePositionStrategy: m = "optimized",
1397
+ onPlaced: h,
1398
+ ...f
1399
+ } = e, v = Xt(pt, n), [y, g] = p.useState(null), S = q(t, (R) => g(R)), [C, b] = p.useState(null), O = On(C), A = O?.width ?? 0, N = O?.height ?? 0, B = o + (i !== "center" ? "-" + i : ""), M = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, D = Array.isArray(a) ? a : [a], L = D.length > 0, _ = {
1400
+ padding: M,
1401
+ boundary: D.filter(ar),
1402
+ // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
1403
+ altBoundary: L
1404
+ }, { refs: E, floatingStyles: V, placement: T, isPositioned: I, middlewareData: P } = Xo({
1405
+ // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
1406
+ strategy: "fixed",
1407
+ placement: B,
1408
+ whileElementsMounted: (...R) => Ho(...R, {
1409
+ animationFrame: m === "always"
1410
+ }),
1411
+ elements: {
1412
+ reference: v.anchor
1413
+ },
1414
+ middleware: [
1415
+ qo({ mainAxis: r + N, alignmentAxis: s }),
1416
+ l && Zo({
1417
+ mainAxis: !0,
1418
+ crossAxis: !1,
1419
+ limiter: u === "partial" ? Jo() : void 0,
1420
+ ..._
1421
+ }),
1422
+ l && Qo({ ..._ }),
1423
+ er({
1424
+ ..._,
1425
+ apply: ({ elements: R, rects: F, availableWidth: U, availableHeight: k }) => {
1426
+ const { width: H, height: W } = F.reference, G = R.floating.style;
1427
+ G.setProperty("--radix-popper-available-width", `${U}px`), G.setProperty("--radix-popper-available-height", `${k}px`), G.setProperty("--radix-popper-anchor-width", `${H}px`), G.setProperty("--radix-popper-anchor-height", `${W}px`);
1428
+ }
1429
+ }),
1430
+ C && nr({ element: C, padding: c }),
1431
+ dr({ arrowWidth: A, arrowHeight: N }),
1432
+ x && tr({ strategy: "referenceHidden", ..._ })
1433
+ ]
1434
+ }), [j, K] = tn(T), ue = It(h);
1435
+ ne(() => {
1436
+ I && ue?.();
1437
+ }, [I, ue]);
1438
+ const Pe = P.arrow?.x, Ae = P.arrow?.y, ce = P.arrow?.centerOffset !== 0, [we, pe] = p.useState();
1439
+ return ne(() => {
1440
+ y && pe(window.getComputedStyle(y).zIndex);
1441
+ }, [y]), /* @__PURE__ */ w.jsx(
1442
+ "div",
1443
+ {
1444
+ ref: E.setFloating,
1445
+ "data-radix-popper-content-wrapper": "",
1446
+ style: {
1447
+ ...V,
1448
+ transform: I ? V.transform : "translate(0, -200%)",
1449
+ // keep off the page when measuring
1450
+ minWidth: "max-content",
1451
+ zIndex: we,
1452
+ "--radix-popper-transform-origin": [
1453
+ P.transformOrigin?.x,
1454
+ P.transformOrigin?.y
1455
+ ].join(" "),
1456
+ // hide the content if using the hide middleware and should be hidden
1457
+ // set visibility to hidden and disable pointer events so the UI behaves
1458
+ // as if the PopperContent isn't there at all
1459
+ ...P.hide?.referenceHidden && {
1460
+ visibility: "hidden",
1461
+ pointerEvents: "none"
1462
+ }
1463
+ },
1464
+ dir: e.dir,
1465
+ children: /* @__PURE__ */ w.jsx(
1466
+ ir,
1467
+ {
1468
+ scope: n,
1469
+ placedSide: j,
1470
+ onArrowChange: b,
1471
+ arrowX: Pe,
1472
+ arrowY: Ae,
1473
+ shouldHideArrow: ce,
1474
+ children: /* @__PURE__ */ w.jsx(
1475
+ z.div,
1476
+ {
1477
+ "data-side": j,
1478
+ "data-align": K,
1479
+ ...f,
1480
+ ref: S,
1481
+ style: {
1482
+ ...f.style,
1483
+ // if the PopperContent hasn't been placed yet (not all measurements done)
1484
+ // we prevent animations so that users's animation don't kick in too early referring wrong sides
1485
+ animation: I ? void 0 : "none"
1486
+ }
1487
+ }
1488
+ )
1489
+ }
1490
+ )
1491
+ }
1492
+ );
1493
+ }
1494
+ );
1495
+ Jt.displayName = pt;
1496
+ var Qt = "PopperArrow", lr = {
1497
+ top: "bottom",
1498
+ right: "left",
1499
+ bottom: "top",
1500
+ left: "right"
1501
+ }, en = p.forwardRef(function(t, n) {
1502
+ const { __scopePopper: o, ...r } = t, i = cr(Qt, o), s = lr[i.placedSide];
1503
+ return (
1504
+ // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
1505
+ // doesn't report size as we'd expect on SVG elements.
1506
+ // it reports their bounding box which is effectively the largest path inside the SVG.
1507
+ /* @__PURE__ */ w.jsx(
1508
+ "span",
1509
+ {
1510
+ ref: i.onArrowChange,
1511
+ style: {
1512
+ position: "absolute",
1513
+ left: i.arrowX,
1514
+ top: i.arrowY,
1515
+ [s]: 0,
1516
+ transformOrigin: {
1517
+ top: "",
1518
+ right: "0 0",
1519
+ bottom: "center 0",
1520
+ left: "100% 0"
1521
+ }[i.placedSide],
1522
+ transform: {
1523
+ top: "translateY(100%)",
1524
+ right: "translateY(50%) rotate(90deg) translateX(-50%)",
1525
+ bottom: "rotate(180deg)",
1526
+ left: "translateY(50%) rotate(-90deg) translateX(50%)"
1527
+ }[i.placedSide],
1528
+ visibility: i.shouldHideArrow ? "hidden" : void 0
1529
+ },
1530
+ children: /* @__PURE__ */ w.jsx(
1531
+ rr,
1532
+ {
1533
+ ...r,
1534
+ ref: n,
1535
+ style: {
1536
+ ...r.style,
1537
+ // ensures the element can be measured correctly (mostly for if SVG)
1538
+ display: "block"
1539
+ }
1540
+ }
1541
+ )
1542
+ }
1543
+ )
1544
+ );
1545
+ });
1546
+ en.displayName = Qt;
1547
+ function ar(e) {
1548
+ return e !== null;
1549
+ }
1550
+ var dr = (e) => ({
1551
+ name: "transformOrigin",
1552
+ options: e,
1553
+ fn(t) {
1554
+ const { placement: n, rects: o, middlewareData: r } = t, s = r.arrow?.centerOffset !== 0, c = s ? 0 : e.arrowWidth, l = s ? 0 : e.arrowHeight, [a, d] = tn(n), u = { start: "0%", center: "50%", end: "100%" }[d], x = (r.arrow?.x ?? 0) + c / 2, m = (r.arrow?.y ?? 0) + l / 2;
1555
+ let h = "", f = "";
1556
+ return a === "bottom" ? (h = s ? u : `${x}px`, f = `${-l}px`) : a === "top" ? (h = s ? u : `${x}px`, f = `${o.floating.height + l}px`) : a === "right" ? (h = `${-l}px`, f = s ? u : `${m}px`) : a === "left" && (h = `${o.floating.width + l}px`, f = s ? u : `${m}px`), { data: { x: h, y: f } };
1557
+ }
1558
+ });
1559
+ function tn(e) {
1560
+ const [t, n = "center"] = e.split("-");
1561
+ return [t, n];
1562
+ }
1563
+ var fr = Gt, ur = Zt, pr = Jt, mr = en, hr = [" ", "Enter", "ArrowUp", "ArrowDown"], gr = [" ", "Enter"], ge = "Select", [We, $e, xr] = Nn(ge), [Re] = Ot(ge, [
1564
+ xr,
1565
+ Yt
1566
+ ]), ze = Yt(), [wr, de] = Re(ge), [vr, yr] = Re(ge), nn = (e) => {
1567
+ const {
1568
+ __scopeSelect: t,
1569
+ children: n,
1570
+ open: o,
1571
+ defaultOpen: r,
1572
+ onOpenChange: i,
1573
+ value: s,
1574
+ defaultValue: c,
1575
+ onValueChange: l,
1576
+ dir: a,
1577
+ name: d,
1578
+ autoComplete: u,
1579
+ disabled: x,
1580
+ required: m,
1581
+ form: h
1582
+ } = e, f = ze(t), [v, y] = p.useState(null), [g, S] = p.useState(null), [C, b] = p.useState(!1), O = In(a), [A, N] = ht({
1583
+ prop: o,
1584
+ defaultProp: r ?? !1,
1585
+ onChange: i,
1586
+ caller: ge
1587
+ }), [B, M] = ht({
1588
+ prop: s,
1589
+ defaultProp: c,
1590
+ onChange: l,
1591
+ caller: ge
1592
+ }), D = p.useRef(null), L = v ? h || !!v.closest("form") : !0, [_, E] = p.useState(/* @__PURE__ */ new Set()), V = Array.from(_).map((T) => T.props.value).join(";");
1593
+ return /* @__PURE__ */ w.jsx(fr, { ...f, children: /* @__PURE__ */ w.jsxs(
1594
+ wr,
1595
+ {
1596
+ required: m,
1597
+ scope: t,
1598
+ trigger: v,
1599
+ onTriggerChange: y,
1600
+ valueNode: g,
1601
+ onValueNodeChange: S,
1602
+ valueNodeHasChildren: C,
1603
+ onValueNodeHasChildrenChange: b,
1604
+ contentId: st(),
1605
+ value: B,
1606
+ onValueChange: M,
1607
+ open: A,
1608
+ onOpenChange: N,
1609
+ dir: O,
1610
+ triggerPointerDownPosRef: D,
1611
+ disabled: x,
1612
+ children: [
1613
+ /* @__PURE__ */ w.jsx(We.Provider, { scope: t, children: /* @__PURE__ */ w.jsx(
1614
+ vr,
1615
+ {
1616
+ scope: e.__scopeSelect,
1617
+ onNativeOptionAdd: p.useCallback((T) => {
1618
+ E((I) => new Set(I).add(T));
1619
+ }, []),
1620
+ onNativeOptionRemove: p.useCallback((T) => {
1621
+ E((I) => {
1622
+ const P = new Set(I);
1623
+ return P.delete(T), P;
1624
+ });
1625
+ }, []),
1626
+ children: n
1627
+ }
1628
+ ) }),
1629
+ L ? /* @__PURE__ */ w.jsxs(
1630
+ Pn,
1631
+ {
1632
+ "aria-hidden": !0,
1633
+ required: m,
1634
+ tabIndex: -1,
1635
+ name: d,
1636
+ autoComplete: u,
1637
+ value: B,
1638
+ onChange: (T) => M(T.target.value),
1639
+ disabled: x,
1640
+ form: h,
1641
+ children: [
1642
+ B === void 0 ? /* @__PURE__ */ w.jsx("option", { value: "" }) : null,
1643
+ Array.from(_)
1644
+ ]
1645
+ },
1646
+ V
1647
+ ) : null
1648
+ ]
1649
+ }
1650
+ ) });
1651
+ };
1652
+ nn.displayName = ge;
1653
+ var on = "SelectTrigger", rn = p.forwardRef(
1654
+ (e, t) => {
1655
+ const { __scopeSelect: n, disabled: o = !1, ...r } = e, i = ze(n), s = de(on, n), c = s.disabled || o, l = q(t, s.onTriggerChange), a = $e(n), d = p.useRef("touch"), [u, x, m] = Tn((f) => {
1656
+ const v = a().filter((S) => !S.disabled), y = v.find((S) => S.value === s.value), g = En(v, f, y);
1657
+ g !== void 0 && s.onValueChange(g.value);
1658
+ }), h = (f) => {
1659
+ c || (s.onOpenChange(!0), m()), f && (s.triggerPointerDownPosRef.current = {
1660
+ x: Math.round(f.pageX),
1661
+ y: Math.round(f.pageY)
1662
+ });
1663
+ };
1664
+ return /* @__PURE__ */ w.jsx(ur, { asChild: !0, ...i, children: /* @__PURE__ */ w.jsx(
1665
+ z.button,
1666
+ {
1667
+ type: "button",
1668
+ role: "combobox",
1669
+ "aria-controls": s.contentId,
1670
+ "aria-expanded": s.open,
1671
+ "aria-required": s.required,
1672
+ "aria-autocomplete": "none",
1673
+ dir: s.dir,
1674
+ "data-state": s.open ? "open" : "closed",
1675
+ disabled: c,
1676
+ "data-disabled": c ? "" : void 0,
1677
+ "data-placeholder": An(s.value) ? "" : void 0,
1678
+ ...r,
1679
+ ref: l,
1680
+ onClick: $(r.onClick, (f) => {
1681
+ f.currentTarget.focus(), d.current !== "mouse" && h(f);
1682
+ }),
1683
+ onPointerDown: $(r.onPointerDown, (f) => {
1684
+ d.current = f.pointerType;
1685
+ const v = f.target;
1686
+ v.hasPointerCapture(f.pointerId) && v.releasePointerCapture(f.pointerId), f.button === 0 && f.ctrlKey === !1 && f.pointerType === "mouse" && (h(f), f.preventDefault());
1687
+ }),
1688
+ onKeyDown: $(r.onKeyDown, (f) => {
1689
+ const v = u.current !== "";
1690
+ !(f.ctrlKey || f.altKey || f.metaKey) && f.key.length === 1 && x(f.key), !(v && f.key === " ") && hr.includes(f.key) && (h(), f.preventDefault());
1691
+ })
1692
+ }
1693
+ ) });
1694
+ }
1695
+ );
1696
+ rn.displayName = on;
1697
+ var sn = "SelectValue", cn = p.forwardRef(
1698
+ (e, t) => {
1699
+ const { __scopeSelect: n, className: o, style: r, children: i, placeholder: s = "", ...c } = e, l = de(sn, n), { onValueNodeHasChildrenChange: a } = l, d = i !== void 0, u = q(t, l.onValueNodeChange);
1700
+ return ne(() => {
1701
+ a(d);
1702
+ }, [a, d]), /* @__PURE__ */ w.jsx(
1703
+ z.span,
1704
+ {
1705
+ ...c,
1706
+ ref: u,
1707
+ style: { pointerEvents: "none" },
1708
+ children: An(l.value) ? /* @__PURE__ */ w.jsx(w.Fragment, { children: s }) : i
1709
+ }
1710
+ );
1711
+ }
1712
+ );
1713
+ cn.displayName = sn;
1714
+ var Sr = "SelectIcon", ln = p.forwardRef(
1715
+ (e, t) => {
1716
+ const { __scopeSelect: n, children: o, ...r } = e;
1717
+ return /* @__PURE__ */ w.jsx(z.span, { "aria-hidden": !0, ...r, ref: t, children: o || "▼" });
1718
+ }
1719
+ );
1720
+ ln.displayName = Sr;
1721
+ var br = "SelectPortal", an = (e) => /* @__PURE__ */ w.jsx(_n, { asChild: !0, ...e });
1722
+ an.displayName = br;
1723
+ var xe = "SelectContent", dn = p.forwardRef(
1724
+ (e, t) => {
1725
+ const n = de(xe, e.__scopeSelect), [o, r] = p.useState();
1726
+ if (ne(() => {
1727
+ r(new DocumentFragment());
1728
+ }, []), !n.open) {
1729
+ const i = o;
1730
+ return i ? rt.createPortal(
1731
+ /* @__PURE__ */ w.jsx(fn, { scope: e.__scopeSelect, children: /* @__PURE__ */ w.jsx(We.Slot, { scope: e.__scopeSelect, children: /* @__PURE__ */ w.jsx("div", { children: e.children }) }) }),
1732
+ i
1733
+ ) : null;
1734
+ }
1735
+ return /* @__PURE__ */ w.jsx(un, { ...e, ref: t });
1736
+ }
1737
+ );
1738
+ dn.displayName = xe;
1739
+ var Z = 10, [fn, fe] = Re(xe), Cr = "SelectContentImpl", Rr = kn("SelectContent.RemoveScroll"), un = p.forwardRef(
1740
+ (e, t) => {
1741
+ const {
1742
+ __scopeSelect: n,
1743
+ position: o = "item-aligned",
1744
+ onCloseAutoFocus: r,
1745
+ onEscapeKeyDown: i,
1746
+ onPointerDownOutside: s,
1747
+ //
1748
+ // PopperContent props
1749
+ side: c,
1750
+ sideOffset: l,
1751
+ align: a,
1752
+ alignOffset: d,
1753
+ arrowPadding: u,
1754
+ collisionBoundary: x,
1755
+ collisionPadding: m,
1756
+ sticky: h,
1757
+ hideWhenDetached: f,
1758
+ avoidCollisions: v,
1759
+ //
1760
+ ...y
1761
+ } = e, g = de(xe, n), [S, C] = p.useState(null), [b, O] = p.useState(null), A = q(t, (R) => C(R)), [N, B] = p.useState(null), [M, D] = p.useState(
1762
+ null
1763
+ ), L = $e(n), [_, E] = p.useState(!1), V = p.useRef(!1);
1764
+ p.useEffect(() => {
1765
+ if (S) return Dn(S);
1766
+ }, [S]), Ln();
1767
+ const T = p.useCallback(
1768
+ (R) => {
1769
+ const [F, ...U] = L().map((W) => W.ref.current), [k] = U.slice(-1), H = document.activeElement;
1770
+ for (const W of R)
1771
+ if (W === H || (W?.scrollIntoView({ block: "nearest" }), W === F && b && (b.scrollTop = 0), W === k && b && (b.scrollTop = b.scrollHeight), W?.focus(), document.activeElement !== H)) return;
1772
+ },
1773
+ [L, b]
1774
+ ), I = p.useCallback(
1775
+ () => T([N, S]),
1776
+ [T, N, S]
1777
+ );
1778
+ p.useEffect(() => {
1779
+ _ && I();
1780
+ }, [_, I]);
1781
+ const { onOpenChange: P, triggerPointerDownPosRef: j } = g;
1782
+ p.useEffect(() => {
1783
+ if (S) {
1784
+ let R = { x: 0, y: 0 };
1785
+ const F = (k) => {
1786
+ R = {
1787
+ x: Math.abs(Math.round(k.pageX) - (j.current?.x ?? 0)),
1788
+ y: Math.abs(Math.round(k.pageY) - (j.current?.y ?? 0))
1789
+ };
1790
+ }, U = (k) => {
1791
+ R.x <= 10 && R.y <= 10 ? k.preventDefault() : S.contains(k.target) || P(!1), document.removeEventListener("pointermove", F), j.current = null;
1792
+ };
1793
+ return j.current !== null && (document.addEventListener("pointermove", F), document.addEventListener("pointerup", U, { capture: !0, once: !0 })), () => {
1794
+ document.removeEventListener("pointermove", F), document.removeEventListener("pointerup", U, { capture: !0 });
1795
+ };
1796
+ }
1797
+ }, [S, P, j]), p.useEffect(() => {
1798
+ const R = () => P(!1);
1799
+ return window.addEventListener("blur", R), window.addEventListener("resize", R), () => {
1800
+ window.removeEventListener("blur", R), window.removeEventListener("resize", R);
1801
+ };
1802
+ }, [P]);
1803
+ const [K, ue] = Tn((R) => {
1804
+ const F = L().filter((H) => !H.disabled), U = F.find((H) => H.ref.current === document.activeElement), k = En(F, R, U);
1805
+ k && setTimeout(() => k.ref.current.focus());
1806
+ }), Pe = p.useCallback(
1807
+ (R, F, U) => {
1808
+ const k = !V.current && !U;
1809
+ (g.value !== void 0 && g.value === F || k) && (B(R), k && (V.current = !0));
1810
+ },
1811
+ [g.value]
1812
+ ), Ae = p.useCallback(() => S?.focus(), [S]), ce = p.useCallback(
1813
+ (R, F, U) => {
1814
+ const k = !V.current && !U;
1815
+ (g.value !== void 0 && g.value === F || k) && D(R);
1816
+ },
1817
+ [g.value]
1818
+ ), we = o === "popper" ? Qe : pn, pe = we === Qe ? {
1819
+ side: c,
1820
+ sideOffset: l,
1821
+ align: a,
1822
+ alignOffset: d,
1823
+ arrowPadding: u,
1824
+ collisionBoundary: x,
1825
+ collisionPadding: m,
1826
+ sticky: h,
1827
+ hideWhenDetached: f,
1828
+ avoidCollisions: v
1829
+ } : {};
1830
+ return /* @__PURE__ */ w.jsx(
1831
+ fn,
1832
+ {
1833
+ scope: n,
1834
+ content: S,
1835
+ viewport: b,
1836
+ onViewportChange: O,
1837
+ itemRefCallback: Pe,
1838
+ selectedItem: N,
1839
+ onItemLeave: Ae,
1840
+ itemTextRefCallback: ce,
1841
+ focusSelectedItem: I,
1842
+ selectedItemText: M,
1843
+ position: o,
1844
+ isPositioned: _,
1845
+ searchRef: K,
1846
+ children: /* @__PURE__ */ w.jsx(jn, { as: Rr, allowPinchZoom: !0, children: /* @__PURE__ */ w.jsx(
1847
+ Hn,
1848
+ {
1849
+ asChild: !0,
1850
+ trapped: g.open,
1851
+ onMountAutoFocus: (R) => {
1852
+ R.preventDefault();
1853
+ },
1854
+ onUnmountAutoFocus: $(r, (R) => {
1855
+ g.trigger?.focus({ preventScroll: !0 }), R.preventDefault();
1856
+ }),
1857
+ children: /* @__PURE__ */ w.jsx(
1858
+ Bn,
1859
+ {
1860
+ asChild: !0,
1861
+ disableOutsidePointerEvents: !0,
1862
+ onEscapeKeyDown: i,
1863
+ onPointerDownOutside: s,
1864
+ onFocusOutside: (R) => R.preventDefault(),
1865
+ onDismiss: () => g.onOpenChange(!1),
1866
+ children: /* @__PURE__ */ w.jsx(
1867
+ we,
1868
+ {
1869
+ role: "listbox",
1870
+ id: g.contentId,
1871
+ "data-state": g.open ? "open" : "closed",
1872
+ dir: g.dir,
1873
+ onContextMenu: (R) => R.preventDefault(),
1874
+ ...y,
1875
+ ...pe,
1876
+ onPlaced: () => E(!0),
1877
+ ref: A,
1878
+ style: {
1879
+ // flex layout so we can place the scroll buttons properly
1880
+ display: "flex",
1881
+ flexDirection: "column",
1882
+ // reset the outline by default as the content MAY get focused
1883
+ outline: "none",
1884
+ ...y.style
1885
+ },
1886
+ onKeyDown: $(y.onKeyDown, (R) => {
1887
+ const F = R.ctrlKey || R.altKey || R.metaKey;
1888
+ if (R.key === "Tab" && R.preventDefault(), !F && R.key.length === 1 && ue(R.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(R.key)) {
1889
+ let k = L().filter((H) => !H.disabled).map((H) => H.ref.current);
1890
+ if (["ArrowUp", "End"].includes(R.key) && (k = k.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(R.key)) {
1891
+ const H = R.target, W = k.indexOf(H);
1892
+ k = k.slice(W + 1);
1893
+ }
1894
+ setTimeout(() => T(k)), R.preventDefault();
1895
+ }
1896
+ })
1897
+ }
1898
+ )
1899
+ }
1900
+ )
1901
+ }
1902
+ ) })
1903
+ }
1904
+ );
1905
+ }
1906
+ );
1907
+ un.displayName = Cr;
1908
+ var Pr = "SelectItemAlignedPosition", pn = p.forwardRef((e, t) => {
1909
+ const { __scopeSelect: n, onPlaced: o, ...r } = e, i = de(xe, n), s = fe(xe, n), [c, l] = p.useState(null), [a, d] = p.useState(null), u = q(t, (A) => d(A)), x = $e(n), m = p.useRef(!1), h = p.useRef(!0), { viewport: f, selectedItem: v, selectedItemText: y, focusSelectedItem: g } = s, S = p.useCallback(() => {
1910
+ if (i.trigger && i.valueNode && c && a && f && v && y) {
1911
+ const A = i.trigger.getBoundingClientRect(), N = a.getBoundingClientRect(), B = i.valueNode.getBoundingClientRect(), M = y.getBoundingClientRect();
1912
+ if (i.dir !== "rtl") {
1913
+ const H = M.left - N.left, W = B.left - H, G = A.left - W, me = A.width + G, Ue = Math.max(me, N.width), Ke = window.innerWidth - Z, Ye = gt(W, [
1914
+ Z,
1915
+ // Prevents the content from going off the starting edge of the
1916
+ // viewport. It may still go off the ending edge, but this can be
1917
+ // controlled by the user since they may want to manage overflow in a
1918
+ // specific way.
1919
+ // https://github.com/radix-ui/primitives/issues/2049
1920
+ Math.max(Z, Ke - Ue)
1921
+ ]);
1922
+ c.style.minWidth = me + "px", c.style.left = Ye + "px";
1923
+ } else {
1924
+ const H = N.right - M.right, W = window.innerWidth - B.right - H, G = window.innerWidth - A.right - W, me = A.width + G, Ue = Math.max(me, N.width), Ke = window.innerWidth - Z, Ye = gt(W, [
1925
+ Z,
1926
+ Math.max(Z, Ke - Ue)
1927
+ ]);
1928
+ c.style.minWidth = me + "px", c.style.right = Ye + "px";
1929
+ }
1930
+ const D = x(), L = window.innerHeight - Z * 2, _ = f.scrollHeight, E = window.getComputedStyle(a), V = parseInt(E.borderTopWidth, 10), T = parseInt(E.paddingTop, 10), I = parseInt(E.borderBottomWidth, 10), P = parseInt(E.paddingBottom, 10), j = V + T + _ + P + I, K = Math.min(v.offsetHeight * 5, j), ue = window.getComputedStyle(f), Pe = parseInt(ue.paddingTop, 10), Ae = parseInt(ue.paddingBottom, 10), ce = A.top + A.height / 2 - Z, we = L - ce, pe = v.offsetHeight / 2, R = v.offsetTop + pe, F = V + T + R, U = j - F;
1931
+ if (F <= ce) {
1932
+ const H = D.length > 0 && v === D[D.length - 1].ref.current;
1933
+ c.style.bottom = "0px";
1934
+ const W = a.clientHeight - f.offsetTop - f.offsetHeight, G = Math.max(
1935
+ we,
1936
+ pe + // viewport might have padding bottom, include it to avoid a scrollable viewport
1937
+ (H ? Ae : 0) + W + I
1938
+ ), me = F + G;
1939
+ c.style.height = me + "px";
1940
+ } else {
1941
+ const H = D.length > 0 && v === D[0].ref.current;
1942
+ c.style.top = "0px";
1943
+ const G = Math.max(
1944
+ ce,
1945
+ V + f.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
1946
+ (H ? Pe : 0) + pe
1947
+ ) + U;
1948
+ c.style.height = G + "px", f.scrollTop = F - ce + f.offsetTop;
1949
+ }
1950
+ c.style.margin = `${Z}px 0`, c.style.minHeight = K + "px", c.style.maxHeight = L + "px", o?.(), requestAnimationFrame(() => m.current = !0);
1951
+ }
1952
+ }, [
1953
+ x,
1954
+ i.trigger,
1955
+ i.valueNode,
1956
+ c,
1957
+ a,
1958
+ f,
1959
+ v,
1960
+ y,
1961
+ i.dir,
1962
+ o
1963
+ ]);
1964
+ ne(() => S(), [S]);
1965
+ const [C, b] = p.useState();
1966
+ ne(() => {
1967
+ a && b(window.getComputedStyle(a).zIndex);
1968
+ }, [a]);
1969
+ const O = p.useCallback(
1970
+ (A) => {
1971
+ A && h.current === !0 && (S(), g?.(), h.current = !1);
1972
+ },
1973
+ [S, g]
1974
+ );
1975
+ return /* @__PURE__ */ w.jsx(
1976
+ Tr,
1977
+ {
1978
+ scope: n,
1979
+ contentWrapper: c,
1980
+ shouldExpandOnScrollRef: m,
1981
+ onScrollButtonChange: O,
1982
+ children: /* @__PURE__ */ w.jsx(
1983
+ "div",
1984
+ {
1985
+ ref: l,
1986
+ style: {
1987
+ display: "flex",
1988
+ flexDirection: "column",
1989
+ position: "fixed",
1990
+ zIndex: C
1991
+ },
1992
+ children: /* @__PURE__ */ w.jsx(
1993
+ z.div,
1994
+ {
1995
+ ...r,
1996
+ ref: u,
1997
+ style: {
1998
+ // When we get the height of the content, it includes borders. If we were to set
1999
+ // the height without having `boxSizing: 'border-box'` it would be too big.
2000
+ boxSizing: "border-box",
2001
+ // We need to ensure the content doesn't get taller than the wrapper
2002
+ maxHeight: "100%",
2003
+ ...r.style
2004
+ }
2005
+ }
2006
+ )
2007
+ }
2008
+ )
2009
+ }
2010
+ );
2011
+ });
2012
+ pn.displayName = Pr;
2013
+ var Ar = "SelectPopperPosition", Qe = p.forwardRef((e, t) => {
2014
+ const {
2015
+ __scopeSelect: n,
2016
+ align: o = "start",
2017
+ collisionPadding: r = Z,
2018
+ ...i
2019
+ } = e, s = ze(n);
2020
+ return /* @__PURE__ */ w.jsx(
2021
+ pr,
2022
+ {
2023
+ ...s,
2024
+ ...i,
2025
+ ref: t,
2026
+ align: o,
2027
+ collisionPadding: r,
2028
+ style: {
2029
+ // Ensure border-box for floating-ui calculations
2030
+ boxSizing: "border-box",
2031
+ ...i.style,
2032
+ "--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
2033
+ "--radix-select-content-available-width": "var(--radix-popper-available-width)",
2034
+ "--radix-select-content-available-height": "var(--radix-popper-available-height)",
2035
+ "--radix-select-trigger-width": "var(--radix-popper-anchor-width)",
2036
+ "--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
2037
+ }
2038
+ }
2039
+ );
2040
+ });
2041
+ Qe.displayName = Ar;
2042
+ var [Tr, mt] = Re(xe, {}), et = "SelectViewport", mn = p.forwardRef(
2043
+ (e, t) => {
2044
+ const { __scopeSelect: n, nonce: o, ...r } = e, i = fe(et, n), s = mt(et, n), c = q(t, i.onViewportChange), l = p.useRef(0);
2045
+ return /* @__PURE__ */ w.jsxs(w.Fragment, { children: [
2046
+ /* @__PURE__ */ w.jsx(
2047
+ "style",
2048
+ {
2049
+ dangerouslySetInnerHTML: {
2050
+ __html: "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"
2051
+ },
2052
+ nonce: o
2053
+ }
2054
+ ),
2055
+ /* @__PURE__ */ w.jsx(We.Slot, { scope: n, children: /* @__PURE__ */ w.jsx(
2056
+ z.div,
2057
+ {
2058
+ "data-radix-select-viewport": "",
2059
+ role: "presentation",
2060
+ ...r,
2061
+ ref: c,
2062
+ style: {
2063
+ // we use position: 'relative' here on the `viewport` so that when we call
2064
+ // `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
2065
+ // (independent of the scrollUpButton).
2066
+ position: "relative",
2067
+ flex: 1,
2068
+ // Viewport should only be scrollable in the vertical direction.
2069
+ // This won't work in vertical writing modes, so we'll need to
2070
+ // revisit this if/when that is supported
2071
+ // https://developer.chrome.com/blog/vertical-form-controls
2072
+ overflow: "hidden auto",
2073
+ ...r.style
2074
+ },
2075
+ onScroll: $(r.onScroll, (a) => {
2076
+ const d = a.currentTarget, { contentWrapper: u, shouldExpandOnScrollRef: x } = s;
2077
+ if (x?.current && u) {
2078
+ const m = Math.abs(l.current - d.scrollTop);
2079
+ if (m > 0) {
2080
+ const h = window.innerHeight - Z * 2, f = parseFloat(u.style.minHeight), v = parseFloat(u.style.height), y = Math.max(f, v);
2081
+ if (y < h) {
2082
+ const g = y + m, S = Math.min(h, g), C = g - S;
2083
+ u.style.height = S + "px", u.style.bottom === "0px" && (d.scrollTop = C > 0 ? C : 0, u.style.justifyContent = "flex-end");
2084
+ }
2085
+ }
2086
+ }
2087
+ l.current = d.scrollTop;
2088
+ })
2089
+ }
2090
+ ) })
2091
+ ] });
2092
+ }
2093
+ );
2094
+ mn.displayName = et;
2095
+ var hn = "SelectGroup", [Er, Or] = Re(hn), Ir = p.forwardRef(
2096
+ (e, t) => {
2097
+ const { __scopeSelect: n, ...o } = e, r = st();
2098
+ return /* @__PURE__ */ w.jsx(Er, { scope: n, id: r, children: /* @__PURE__ */ w.jsx(z.div, { role: "group", "aria-labelledby": r, ...o, ref: t }) });
2099
+ }
2100
+ );
2101
+ Ir.displayName = hn;
2102
+ var gn = "SelectLabel", Nr = p.forwardRef(
2103
+ (e, t) => {
2104
+ const { __scopeSelect: n, ...o } = e, r = Or(gn, n);
2105
+ return /* @__PURE__ */ w.jsx(z.div, { id: r.id, ...o, ref: t });
2106
+ }
2107
+ );
2108
+ Nr.displayName = gn;
2109
+ var ke = "SelectItem", [_r, xn] = Re(ke), wn = p.forwardRef(
2110
+ (e, t) => {
2111
+ const {
2112
+ __scopeSelect: n,
2113
+ value: o,
2114
+ disabled: r = !1,
2115
+ textValue: i,
2116
+ ...s
2117
+ } = e, c = de(ke, n), l = fe(ke, n), a = c.value === o, [d, u] = p.useState(i ?? ""), [x, m] = p.useState(!1), h = q(
2118
+ t,
2119
+ (g) => l.itemRefCallback?.(g, o, r)
2120
+ ), f = st(), v = p.useRef("touch"), y = () => {
2121
+ r || (c.onValueChange(o), c.onOpenChange(!1));
2122
+ };
2123
+ if (o === "")
2124
+ throw new Error(
2125
+ "A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
2126
+ );
2127
+ return /* @__PURE__ */ w.jsx(
2128
+ _r,
2129
+ {
2130
+ scope: n,
2131
+ value: o,
2132
+ disabled: r,
2133
+ textId: f,
2134
+ isSelected: a,
2135
+ onItemTextChange: p.useCallback((g) => {
2136
+ u((S) => S || (g?.textContent ?? "").trim());
2137
+ }, []),
2138
+ children: /* @__PURE__ */ w.jsx(
2139
+ We.ItemSlot,
2140
+ {
2141
+ scope: n,
2142
+ value: o,
2143
+ disabled: r,
2144
+ textValue: d,
2145
+ children: /* @__PURE__ */ w.jsx(
2146
+ z.div,
2147
+ {
2148
+ role: "option",
2149
+ "aria-labelledby": f,
2150
+ "data-highlighted": x ? "" : void 0,
2151
+ "aria-selected": a && x,
2152
+ "data-state": a ? "checked" : "unchecked",
2153
+ "aria-disabled": r || void 0,
2154
+ "data-disabled": r ? "" : void 0,
2155
+ tabIndex: r ? void 0 : -1,
2156
+ ...s,
2157
+ ref: h,
2158
+ onFocus: $(s.onFocus, () => m(!0)),
2159
+ onBlur: $(s.onBlur, () => m(!1)),
2160
+ onClick: $(s.onClick, () => {
2161
+ v.current !== "mouse" && y();
2162
+ }),
2163
+ onPointerUp: $(s.onPointerUp, () => {
2164
+ v.current === "mouse" && y();
2165
+ }),
2166
+ onPointerDown: $(s.onPointerDown, (g) => {
2167
+ v.current = g.pointerType;
2168
+ }),
2169
+ onPointerMove: $(s.onPointerMove, (g) => {
2170
+ v.current = g.pointerType, r ? l.onItemLeave?.() : v.current === "mouse" && g.currentTarget.focus({ preventScroll: !0 });
2171
+ }),
2172
+ onPointerLeave: $(s.onPointerLeave, (g) => {
2173
+ g.currentTarget === document.activeElement && l.onItemLeave?.();
2174
+ }),
2175
+ onKeyDown: $(s.onKeyDown, (g) => {
2176
+ l.searchRef?.current !== "" && g.key === " " || (gr.includes(g.key) && y(), g.key === " " && g.preventDefault());
2177
+ })
2178
+ }
2179
+ )
2180
+ }
2181
+ )
2182
+ }
2183
+ );
2184
+ }
2185
+ );
2186
+ wn.displayName = ke;
2187
+ var Te = "SelectItemText", vn = p.forwardRef(
2188
+ (e, t) => {
2189
+ const { __scopeSelect: n, className: o, style: r, ...i } = e, s = de(Te, n), c = fe(Te, n), l = xn(Te, n), a = yr(Te, n), [d, u] = p.useState(null), x = q(
2190
+ t,
2191
+ (y) => u(y),
2192
+ l.onItemTextChange,
2193
+ (y) => c.itemTextRefCallback?.(y, l.value, l.disabled)
2194
+ ), m = d?.textContent, h = p.useMemo(
2195
+ () => /* @__PURE__ */ w.jsx("option", { value: l.value, disabled: l.disabled, children: m }, l.value),
2196
+ [l.disabled, l.value, m]
2197
+ ), { onNativeOptionAdd: f, onNativeOptionRemove: v } = a;
2198
+ return ne(() => (f(h), () => v(h)), [f, v, h]), /* @__PURE__ */ w.jsxs(w.Fragment, { children: [
2199
+ /* @__PURE__ */ w.jsx(z.span, { id: l.textId, ...i, ref: x }),
2200
+ l.isSelected && s.valueNode && !s.valueNodeHasChildren ? rt.createPortal(i.children, s.valueNode) : null
2201
+ ] });
2202
+ }
2203
+ );
2204
+ vn.displayName = Te;
2205
+ var yn = "SelectItemIndicator", Sn = p.forwardRef(
2206
+ (e, t) => {
2207
+ const { __scopeSelect: n, ...o } = e;
2208
+ return xn(yn, n).isSelected ? /* @__PURE__ */ w.jsx(z.span, { "aria-hidden": !0, ...o, ref: t }) : null;
2209
+ }
2210
+ );
2211
+ Sn.displayName = yn;
2212
+ var tt = "SelectScrollUpButton", bn = p.forwardRef((e, t) => {
2213
+ const n = fe(tt, e.__scopeSelect), o = mt(tt, e.__scopeSelect), [r, i] = p.useState(!1), s = q(t, o.onScrollButtonChange);
2214
+ return ne(() => {
2215
+ if (n.viewport && n.isPositioned) {
2216
+ let c = function() {
2217
+ const a = l.scrollTop > 0;
2218
+ i(a);
2219
+ };
2220
+ const l = n.viewport;
2221
+ return c(), l.addEventListener("scroll", c), () => l.removeEventListener("scroll", c);
2222
+ }
2223
+ }, [n.viewport, n.isPositioned]), r ? /* @__PURE__ */ w.jsx(
2224
+ Rn,
2225
+ {
2226
+ ...e,
2227
+ ref: s,
2228
+ onAutoScroll: () => {
2229
+ const { viewport: c, selectedItem: l } = n;
2230
+ c && l && (c.scrollTop = c.scrollTop - l.offsetHeight);
2231
+ }
2232
+ }
2233
+ ) : null;
2234
+ });
2235
+ bn.displayName = tt;
2236
+ var nt = "SelectScrollDownButton", Cn = p.forwardRef((e, t) => {
2237
+ const n = fe(nt, e.__scopeSelect), o = mt(nt, e.__scopeSelect), [r, i] = p.useState(!1), s = q(t, o.onScrollButtonChange);
2238
+ return ne(() => {
2239
+ if (n.viewport && n.isPositioned) {
2240
+ let c = function() {
2241
+ const a = l.scrollHeight - l.clientHeight, d = Math.ceil(l.scrollTop) < a;
2242
+ i(d);
2243
+ };
2244
+ const l = n.viewport;
2245
+ return c(), l.addEventListener("scroll", c), () => l.removeEventListener("scroll", c);
2246
+ }
2247
+ }, [n.viewport, n.isPositioned]), r ? /* @__PURE__ */ w.jsx(
2248
+ Rn,
2249
+ {
2250
+ ...e,
2251
+ ref: s,
2252
+ onAutoScroll: () => {
2253
+ const { viewport: c, selectedItem: l } = n;
2254
+ c && l && (c.scrollTop = c.scrollTop + l.offsetHeight);
2255
+ }
2256
+ }
2257
+ ) : null;
2258
+ });
2259
+ Cn.displayName = nt;
2260
+ var Rn = p.forwardRef((e, t) => {
2261
+ const { __scopeSelect: n, onAutoScroll: o, ...r } = e, i = fe("SelectScrollButton", n), s = p.useRef(null), c = $e(n), l = p.useCallback(() => {
2262
+ s.current !== null && (window.clearInterval(s.current), s.current = null);
2263
+ }, []);
2264
+ return p.useEffect(() => () => l(), [l]), ne(() => {
2265
+ c().find((d) => d.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
2266
+ }, [c]), /* @__PURE__ */ w.jsx(
2267
+ z.div,
2268
+ {
2269
+ "aria-hidden": !0,
2270
+ ...r,
2271
+ ref: t,
2272
+ style: { flexShrink: 0, ...r.style },
2273
+ onPointerDown: $(r.onPointerDown, () => {
2274
+ s.current === null && (s.current = window.setInterval(o, 50));
2275
+ }),
2276
+ onPointerMove: $(r.onPointerMove, () => {
2277
+ i.onItemLeave?.(), s.current === null && (s.current = window.setInterval(o, 50));
2278
+ }),
2279
+ onPointerLeave: $(r.onPointerLeave, () => {
2280
+ l();
2281
+ })
2282
+ }
2283
+ );
2284
+ }), Mr = "SelectSeparator", Dr = p.forwardRef(
2285
+ (e, t) => {
2286
+ const { __scopeSelect: n, ...o } = e;
2287
+ return /* @__PURE__ */ w.jsx(z.div, { "aria-hidden": !0, ...o, ref: t });
2288
+ }
2289
+ );
2290
+ Dr.displayName = Mr;
2291
+ var ot = "SelectArrow", Lr = p.forwardRef(
2292
+ (e, t) => {
2293
+ const { __scopeSelect: n, ...o } = e, r = ze(n), i = de(ot, n), s = fe(ot, n);
2294
+ return i.open && s.position === "popper" ? /* @__PURE__ */ w.jsx(mr, { ...r, ...o, ref: t }) : null;
2295
+ }
2296
+ );
2297
+ Lr.displayName = ot;
2298
+ var jr = "SelectBubbleInput", Pn = p.forwardRef(
2299
+ ({ __scopeSelect: e, value: t, ...n }, o) => {
2300
+ const r = p.useRef(null), i = q(o, r), s = Mn(t);
2301
+ return p.useEffect(() => {
2302
+ const c = r.current;
2303
+ if (!c) return;
2304
+ const l = window.HTMLSelectElement.prototype, d = Object.getOwnPropertyDescriptor(
2305
+ l,
2306
+ "value"
2307
+ ).set;
2308
+ if (s !== t && d) {
2309
+ const u = new Event("change", { bubbles: !0 });
2310
+ d.call(c, t), c.dispatchEvent(u);
2311
+ }
2312
+ }, [s, t]), /* @__PURE__ */ w.jsx(
2313
+ z.select,
2314
+ {
2315
+ ...n,
2316
+ style: { ..._t, ...n.style },
2317
+ ref: i,
2318
+ defaultValue: t
2319
+ }
2320
+ );
2321
+ }
2322
+ );
2323
+ Pn.displayName = jr;
2324
+ function An(e) {
2325
+ return e === "" || e === void 0;
2326
+ }
2327
+ function Tn(e) {
2328
+ const t = It(e), n = p.useRef(""), o = p.useRef(0), r = p.useCallback(
2329
+ (s) => {
2330
+ const c = n.current + s;
2331
+ t(c), (function l(a) {
2332
+ n.current = a, window.clearTimeout(o.current), a !== "" && (o.current = window.setTimeout(() => l(""), 1e3));
2333
+ })(c);
2334
+ },
2335
+ [t]
2336
+ ), i = p.useCallback(() => {
2337
+ n.current = "", window.clearTimeout(o.current);
2338
+ }, []);
2339
+ return p.useEffect(() => () => window.clearTimeout(o.current), []), [n, r, i];
2340
+ }
2341
+ function En(e, t, n) {
2342
+ const r = t.length > 1 && Array.from(t).every((a) => a === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1;
2343
+ let s = kr(e, Math.max(i, 0));
2344
+ r.length === 1 && (s = s.filter((a) => a !== n));
2345
+ const l = s.find(
2346
+ (a) => a.textValue.toLowerCase().startsWith(r.toLowerCase())
2347
+ );
2348
+ return l !== n ? l : void 0;
2349
+ }
2350
+ function kr(e, t) {
2351
+ return e.map((n, o) => e[(t + o) % e.length]);
2352
+ }
2353
+ var Hr = nn, Br = rn, Vr = cn, Fr = ln, Wr = an, $r = dn, zr = mn, Ur = wn, Kr = vn, Yr = Sn, Xr = bn, Gr = Cn;
2354
+ function ts({
2355
+ ...e
2356
+ }) {
2357
+ return /* @__PURE__ */ w.jsx(Hr, { "data-slot": "select", ...e });
2358
+ }
2359
+ function ns({
2360
+ ...e
2361
+ }) {
2362
+ return /* @__PURE__ */ w.jsx(Vr, { "data-slot": "select-value", ...e });
2363
+ }
2364
+ function os({
2365
+ className: e,
2366
+ size: t = "default",
2367
+ children: n,
2368
+ ...o
2369
+ }) {
2370
+ return /* @__PURE__ */ w.jsxs(
2371
+ Br,
2372
+ {
2373
+ "data-slot": "select-trigger",
2374
+ "data-size": t,
2375
+ className: ye(
2376
+ "border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2377
+ e
2378
+ ),
2379
+ ...o,
2380
+ children: [
2381
+ n,
2382
+ /* @__PURE__ */ w.jsx(Fr, { asChild: !0, children: /* @__PURE__ */ w.jsx(Nt, { className: "size-4 opacity-50" }) })
2383
+ ]
2384
+ }
2385
+ );
2386
+ }
2387
+ function rs({
2388
+ className: e,
2389
+ children: t,
2390
+ position: n = "item-aligned",
2391
+ align: o = "center",
2392
+ ...r
2393
+ }) {
2394
+ const i = Vn();
2395
+ return /* @__PURE__ */ w.jsx(Wr, { container: i, children: /* @__PURE__ */ w.jsxs(
2396
+ $r,
2397
+ {
2398
+ "data-slot": "select-content",
2399
+ className: ye(
2400
+ "bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
2401
+ n === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
2402
+ e
2403
+ ),
2404
+ position: n,
2405
+ align: o,
2406
+ ...r,
2407
+ children: [
2408
+ /* @__PURE__ */ w.jsx(qr, {}),
2409
+ /* @__PURE__ */ w.jsx(
2410
+ zr,
2411
+ {
2412
+ className: ye(
2413
+ "p-1",
2414
+ n === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
2415
+ ),
2416
+ children: t
2417
+ }
2418
+ ),
2419
+ /* @__PURE__ */ w.jsx(Zr, {})
2420
+ ]
2421
+ }
2422
+ ) });
2423
+ }
2424
+ function ss({
2425
+ className: e,
2426
+ children: t,
2427
+ ...n
2428
+ }) {
2429
+ return /* @__PURE__ */ w.jsxs(
2430
+ Ur,
2431
+ {
2432
+ "data-slot": "select-item",
2433
+ className: ye(
2434
+ "focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
2435
+ e
2436
+ ),
2437
+ ...n,
2438
+ children: [
2439
+ /* @__PURE__ */ w.jsx(
2440
+ "span",
2441
+ {
2442
+ "data-slot": "select-item-indicator",
2443
+ className: "absolute right-2 flex size-3.5 items-center justify-center",
2444
+ children: /* @__PURE__ */ w.jsx(Yr, { children: /* @__PURE__ */ w.jsx(Fn, { className: "size-4" }) })
2445
+ }
2446
+ ),
2447
+ /* @__PURE__ */ w.jsx(Kr, { children: t })
2448
+ ]
2449
+ }
2450
+ );
2451
+ }
2452
+ function qr({
2453
+ className: e,
2454
+ ...t
2455
+ }) {
2456
+ return /* @__PURE__ */ w.jsx(
2457
+ Xr,
2458
+ {
2459
+ "data-slot": "select-scroll-up-button",
2460
+ className: ye(
2461
+ "flex cursor-default items-center justify-center py-1",
2462
+ e
2463
+ ),
2464
+ ...t,
2465
+ children: /* @__PURE__ */ w.jsx(zn, { className: "size-4" })
2466
+ }
2467
+ );
2468
+ }
2469
+ function Zr({
2470
+ className: e,
2471
+ ...t
2472
+ }) {
2473
+ return /* @__PURE__ */ w.jsx(
2474
+ Gr,
2475
+ {
2476
+ "data-slot": "select-scroll-down-button",
2477
+ className: ye(
2478
+ "flex cursor-default items-center justify-center py-1",
2479
+ e
2480
+ ),
2481
+ ...t,
2482
+ children: /* @__PURE__ */ w.jsx(Nt, { className: "size-4" })
2483
+ }
2484
+ );
2485
+ }
2486
+ export {
2487
+ ur as A,
2488
+ pr as C,
2489
+ fr as R,
2490
+ ts as S,
2491
+ es as a,
2492
+ mr as b,
2493
+ Yt as c,
2494
+ Nt as d,
2495
+ os as e,
2496
+ ns as f,
2497
+ rs as g,
2498
+ ss as h
2499
+ };