@pdf-viewer/react 1.4.2 → 1.4.3

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 (64) hide show
  1. package/dist/Popover-b7402893.js +1445 -0
  2. package/dist/{RPDefaultLayout-e27ef121.js → RPDefaultLayout-f9017f0e.js} +606 -601
  3. package/dist/component-1da194e8.js +337 -0
  4. package/dist/components/RPConfig.js +270 -259
  5. package/dist/components/RPController.js +1 -1
  6. package/dist/components/RPPages.js +2 -2
  7. package/dist/components/RPProvider.js +12 -11
  8. package/dist/components/layout/LayoutContainer.js +3 -2
  9. package/dist/components/layout/RPDefaultLayout.js +1 -1
  10. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  11. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  12. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  13. package/dist/components/layout/toolbar/DocumentDialog.js +3 -2
  14. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  15. package/dist/components/layout/toolbar/MenuItem.js +1 -1
  16. package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
  17. package/dist/components/layout/toolbar/MostPageTool.js +4 -3
  18. package/dist/components/layout/toolbar/OtherTool.js +2 -2
  19. package/dist/components/layout/toolbar/Paginate.js +1 -1
  20. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  21. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  22. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  23. package/dist/components/layout/toolbar/RotateTool.js +1 -1
  24. package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
  25. package/dist/components/layout/toolbar/SearchTool.js +4 -3
  26. package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
  27. package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
  28. package/dist/components/layout/toolbar/ZoomTool.js +4 -3
  29. package/dist/components/page/AnnotationLayer.js +3 -2
  30. package/dist/components/page/CanvasLayer.js +3 -2
  31. package/dist/components/page/DualPage.js +1 -1
  32. package/dist/components/page/RPPage.js +3 -2
  33. package/dist/components/page/SinglePage.js +1 -1
  34. package/dist/components/page/TextHighlightLayer.js +3 -2
  35. package/dist/components/page/TextLayer.js +3 -2
  36. package/dist/components/ui/Checkbox.js +111 -94
  37. package/dist/components/ui/DropDown.js +1 -1
  38. package/dist/components/ui/LoadingIndicator.js +1 -1
  39. package/dist/components/ui/Popover.js +1 -1
  40. package/dist/components/ui/RPTooltip.js +206 -205
  41. package/dist/contexts/PaginationContext.js +1 -1
  42. package/dist/contexts/PrintContext.js +1 -1
  43. package/dist/contexts/SearchContext.js +1 -1
  44. package/dist/contexts/ThumbnailsContext.js +1 -1
  45. package/dist/floating-ui.react-dom-15b9b819.js +1310 -0
  46. package/dist/index-0f08882b.js +1561 -0
  47. package/dist/index-10ac1200.js +150 -0
  48. package/dist/index-271658fe.js +331 -0
  49. package/dist/main.js +1 -1
  50. package/dist/types/utils/hooks/useWatermark.d.ts +1 -1
  51. package/dist/utils/hooks/useFileDownload.js +3 -2
  52. package/dist/utils/hooks/useLicense.js +1 -1
  53. package/dist/utils/hooks/usePaginate.js +3 -2
  54. package/dist/utils/hooks/usePrint.js +3 -2
  55. package/dist/utils/hooks/useScrollToPage.js +3 -2
  56. package/dist/utils/hooks/useSearch.js +3 -2
  57. package/dist/utils/hooks/useThumbnail.js +3 -2
  58. package/dist/utils/hooks/useVirtualReactWindow.js +3 -2
  59. package/dist/utils/hooks/useWatermark.js +59 -28
  60. package/package.json +2 -2
  61. package/dist/Popover-d11ec15c.js +0 -3061
  62. package/dist/floating-ui.react-dom-88a86594.js +0 -1447
  63. package/dist/index-48ca3f30.js +0 -307
  64. package/dist/index-4ba3ab9a.js +0 -1877
@@ -0,0 +1,1561 @@
1
+ import * as o from "react";
2
+ import V from "react";
3
+ import { g as Te, P as D, c as de, u as K, i as Ne, e as gn, a as ot, b, d as Ee, j as at, f as wn } from "./index-271658fe.js";
4
+ import { jsx as l } from "react/jsx-runtime";
5
+ import { u as ne, a as De, D as Cn } from "./index-10ac1200.js";
6
+ import { u as Mn, a as En, o as Rn, s as Sn, l as bn, f as yn, b as _n, c as Pn, h as In } from "./floating-ui.react-dom-15b9b819.js";
7
+ import An from "react-dom";
8
+ import { c as xn, _ as Tn, u as Nn, a as te, f as Dn, z as On, s as Fn, b as kn, R as Ln, e as Kn, h as Gn } from "./component-1da194e8.js";
9
+ var $n = "Portal", ct = o.forwardRef((e, t) => {
10
+ var s;
11
+ const { container: n, ...r } = e, [a, c] = o.useState(!1);
12
+ Te(() => c(!0), []);
13
+ const u = n || a && ((s = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : s.body);
14
+ return u ? An.createPortal(/* @__PURE__ */ l(D.div, { ...r, ref: t }), u) : null;
15
+ });
16
+ ct.displayName = $n;
17
+ function st(e) {
18
+ const t = e + "CollectionProvider", [n, r] = de(t), [a, c] = n(
19
+ t,
20
+ { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
21
+ ), u = (i) => {
22
+ const { scope: f, children: g } = i, S = V.useRef(null), w = V.useRef(/* @__PURE__ */ new Map()).current;
23
+ return /* @__PURE__ */ l(a, { scope: f, itemMap: w, collectionRef: S, children: g });
24
+ };
25
+ u.displayName = t;
26
+ const s = e + "CollectionSlot", h = Ne(s), m = V.forwardRef(
27
+ (i, f) => {
28
+ const { scope: g, children: S } = i, w = c(s, g), E = K(f, w.collectionRef);
29
+ return /* @__PURE__ */ l(h, { ref: E, children: S });
30
+ }
31
+ );
32
+ m.displayName = s;
33
+ const p = e + "CollectionItemSlot", d = "data-radix-collection-item", v = Ne(p), C = V.forwardRef(
34
+ (i, f) => {
35
+ const { scope: g, children: S, ...w } = i, E = V.useRef(null), y = K(f, E), _ = c(p, g);
36
+ return V.useEffect(() => (_.itemMap.set(E, { ref: E, ...w }), () => void _.itemMap.delete(E))), /* @__PURE__ */ l(v, { [d]: "", ref: y, children: S });
37
+ }
38
+ );
39
+ C.displayName = p;
40
+ function M(i) {
41
+ const f = c(e + "CollectionConsumer", i);
42
+ return V.useCallback(() => {
43
+ const S = f.collectionRef.current;
44
+ if (!S)
45
+ return [];
46
+ const w = Array.from(S.querySelectorAll(`[${d}]`));
47
+ return Array.from(f.itemMap.values()).sort(
48
+ (_, I) => w.indexOf(_.ref.current) - w.indexOf(I.ref.current)
49
+ );
50
+ }, [f.collectionRef, f.itemMap]);
51
+ }
52
+ return [
53
+ { Provider: u, Slot: m, ItemSlot: C },
54
+ M,
55
+ r
56
+ ];
57
+ }
58
+ var Un = o.createContext(void 0);
59
+ function it(e) {
60
+ const t = o.useContext(Un);
61
+ return e || t || "ltr";
62
+ }
63
+ var _e = 0;
64
+ function Bn() {
65
+ o.useEffect(() => {
66
+ const e = document.querySelectorAll("[data-radix-focus-guard]");
67
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? ze()), document.body.insertAdjacentElement("beforeend", e[1] ?? ze()), _e++, () => {
68
+ _e === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), _e--;
69
+ };
70
+ }, []);
71
+ }
72
+ function ze() {
73
+ const e = document.createElement("span");
74
+ return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
75
+ }
76
+ var Pe = "focusScope.autoFocusOnMount", Ie = "focusScope.autoFocusOnUnmount", Ze = { bubbles: !1, cancelable: !0 }, Yn = "FocusScope", ut = o.forwardRef((e, t) => {
77
+ const {
78
+ loop: n = !1,
79
+ trapped: r = !1,
80
+ onMountAutoFocus: a,
81
+ onUnmountAutoFocus: c,
82
+ ...u
83
+ } = e, [s, h] = o.useState(null), m = ne(a), p = ne(c), d = o.useRef(null), v = K(t, (i) => h(i)), C = o.useRef({
84
+ paused: !1,
85
+ pause() {
86
+ this.paused = !0;
87
+ },
88
+ resume() {
89
+ this.paused = !1;
90
+ }
91
+ }).current;
92
+ o.useEffect(() => {
93
+ if (r) {
94
+ let i = function(w) {
95
+ if (C.paused || !s)
96
+ return;
97
+ const E = w.target;
98
+ s.contains(E) ? d.current = E : H(d.current, { select: !0 });
99
+ }, f = function(w) {
100
+ if (C.paused || !s)
101
+ return;
102
+ const E = w.relatedTarget;
103
+ E !== null && (s.contains(E) || H(d.current, { select: !0 }));
104
+ }, g = function(w) {
105
+ if (document.activeElement === document.body)
106
+ for (const y of w)
107
+ y.removedNodes.length > 0 && H(s);
108
+ };
109
+ document.addEventListener("focusin", i), document.addEventListener("focusout", f);
110
+ const S = new MutationObserver(g);
111
+ return s && S.observe(s, { childList: !0, subtree: !0 }), () => {
112
+ document.removeEventListener("focusin", i), document.removeEventListener("focusout", f), S.disconnect();
113
+ };
114
+ }
115
+ }, [r, s, C.paused]), o.useEffect(() => {
116
+ if (s) {
117
+ Qe.add(C);
118
+ const i = document.activeElement;
119
+ if (!s.contains(i)) {
120
+ const g = new CustomEvent(Pe, Ze);
121
+ s.addEventListener(Pe, m), s.dispatchEvent(g), g.defaultPrevented || (Hn(zn(lt(s)), { select: !0 }), document.activeElement === i && H(s));
122
+ }
123
+ return () => {
124
+ s.removeEventListener(Pe, m), setTimeout(() => {
125
+ const g = new CustomEvent(Ie, Ze);
126
+ s.addEventListener(Ie, p), s.dispatchEvent(g), g.defaultPrevented || H(i ?? document.body, { select: !0 }), s.removeEventListener(Ie, p), Qe.remove(C);
127
+ }, 0);
128
+ };
129
+ }
130
+ }, [s, m, p, C]);
131
+ const M = o.useCallback(
132
+ (i) => {
133
+ if (!n && !r || C.paused)
134
+ return;
135
+ const f = i.key === "Tab" && !i.altKey && !i.ctrlKey && !i.metaKey, g = document.activeElement;
136
+ if (f && g) {
137
+ const S = i.currentTarget, [w, E] = Wn(S);
138
+ w && E ? !i.shiftKey && g === E ? (i.preventDefault(), n && H(w, { select: !0 })) : i.shiftKey && g === w && (i.preventDefault(), n && H(E, { select: !0 })) : g === S && i.preventDefault();
139
+ }
140
+ },
141
+ [n, r, C.paused]
142
+ );
143
+ return /* @__PURE__ */ l(D.div, { tabIndex: -1, ...u, ref: v, onKeyDown: M });
144
+ });
145
+ ut.displayName = Yn;
146
+ function Hn(e, { select: t = !1 } = {}) {
147
+ const n = document.activeElement;
148
+ for (const r of e)
149
+ if (H(r, { select: t }), document.activeElement !== n)
150
+ return;
151
+ }
152
+ function Wn(e) {
153
+ const t = lt(e), n = qe(t, e), r = qe(t.reverse(), e);
154
+ return [n, r];
155
+ }
156
+ function lt(e) {
157
+ const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
158
+ acceptNode: (r) => {
159
+ const a = r.tagName === "INPUT" && r.type === "hidden";
160
+ return r.disabled || r.hidden || a ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
161
+ }
162
+ });
163
+ for (; n.nextNode(); )
164
+ t.push(n.currentNode);
165
+ return t;
166
+ }
167
+ function qe(e, t) {
168
+ for (const n of e)
169
+ if (!Xn(n, { upTo: t }))
170
+ return n;
171
+ }
172
+ function Xn(e, { upTo: t }) {
173
+ if (getComputedStyle(e).visibility === "hidden")
174
+ return !0;
175
+ for (; e; ) {
176
+ if (t !== void 0 && e === t)
177
+ return !1;
178
+ if (getComputedStyle(e).display === "none")
179
+ return !0;
180
+ e = e.parentElement;
181
+ }
182
+ return !1;
183
+ }
184
+ function Vn(e) {
185
+ return e instanceof HTMLInputElement && "select" in e;
186
+ }
187
+ function H(e, { select: t = !1 } = {}) {
188
+ if (e && e.focus) {
189
+ const n = document.activeElement;
190
+ e.focus({ preventScroll: !0 }), e !== n && Vn(e) && t && e.select();
191
+ }
192
+ }
193
+ var Qe = jn();
194
+ function jn() {
195
+ let e = [];
196
+ return {
197
+ add(t) {
198
+ const n = e[0];
199
+ t !== n && (n == null || n.pause()), e = Je(e, t), e.unshift(t);
200
+ },
201
+ remove(t) {
202
+ var n;
203
+ e = Je(e, t), (n = e[0]) == null || n.resume();
204
+ }
205
+ };
206
+ }
207
+ function Je(e, t) {
208
+ const n = [...e], r = n.indexOf(t);
209
+ return r !== -1 && n.splice(r, 1), n;
210
+ }
211
+ function zn(e) {
212
+ return e.filter((t) => t.tagName !== "A");
213
+ }
214
+ var Zn = "Arrow", dt = o.forwardRef((e, t) => {
215
+ const { children: n, width: r = 10, height: a = 5, ...c } = e;
216
+ return /* @__PURE__ */ l(
217
+ D.svg,
218
+ {
219
+ ...c,
220
+ ref: t,
221
+ width: r,
222
+ height: a,
223
+ viewBox: "0 0 30 10",
224
+ preserveAspectRatio: "none",
225
+ children: e.asChild ? n : /* @__PURE__ */ l("polygon", { points: "0,0 30,0 15,10" })
226
+ }
227
+ );
228
+ });
229
+ dt.displayName = Zn;
230
+ var qn = dt, Le = "Popper", [ft, pt] = de(Le), [Qn, mt] = ft(Le), vt = (e) => {
231
+ const { __scopePopper: t, children: n } = e, [r, a] = o.useState(null);
232
+ return /* @__PURE__ */ l(Qn, { scope: t, anchor: r, onAnchorChange: a, children: n });
233
+ };
234
+ vt.displayName = Le;
235
+ var ht = "PopperAnchor", gt = o.forwardRef(
236
+ (e, t) => {
237
+ const { __scopePopper: n, virtualRef: r, ...a } = e, c = mt(ht, n), u = o.useRef(null), s = K(t, u);
238
+ return o.useEffect(() => {
239
+ c.onAnchorChange((r == null ? void 0 : r.current) || u.current);
240
+ }), r ? null : /* @__PURE__ */ l(D.div, { ...a, ref: s });
241
+ }
242
+ );
243
+ gt.displayName = ht;
244
+ var Ke = "PopperContent", [Jn, er] = ft(Ke), wt = o.forwardRef(
245
+ (e, t) => {
246
+ var B, ae, O, ce, Xe, Ve;
247
+ const {
248
+ __scopePopper: n,
249
+ side: r = "bottom",
250
+ sideOffset: a = 0,
251
+ align: c = "center",
252
+ alignOffset: u = 0,
253
+ arrowPadding: s = 0,
254
+ avoidCollisions: h = !0,
255
+ collisionBoundary: m = [],
256
+ collisionPadding: p = 0,
257
+ sticky: d = "partial",
258
+ hideWhenDetached: v = !1,
259
+ updatePositionStrategy: C = "optimized",
260
+ onPlaced: M,
261
+ ...i
262
+ } = e, f = mt(Ke, n), [g, S] = o.useState(null), w = K(t, (se) => S(se)), [E, y] = o.useState(null), _ = gn(E), I = (_ == null ? void 0 : _.width) ?? 0, P = (_ == null ? void 0 : _.height) ?? 0, k = r + (c !== "center" ? "-" + c : ""), $ = typeof p == "number" ? p : { top: 0, right: 0, bottom: 0, left: 0, ...p }, Y = Array.isArray(m) ? m : [m], W = Y.length > 0, U = {
263
+ padding: $,
264
+ boundary: Y.filter(nr),
265
+ // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
266
+ altBoundary: W
267
+ }, { refs: Z, floatingStyles: q, placement: L, isPositioned: Q, middlewareData: N } = Mn({
268
+ // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
269
+ strategy: "fixed",
270
+ placement: k,
271
+ whileElementsMounted: (...se) => En(...se, {
272
+ animationFrame: C === "always"
273
+ }),
274
+ elements: {
275
+ reference: f.anchor
276
+ },
277
+ middleware: [
278
+ Rn({ mainAxis: a + P, alignmentAxis: u }),
279
+ h && Sn({
280
+ mainAxis: !0,
281
+ crossAxis: !1,
282
+ limiter: d === "partial" ? bn() : void 0,
283
+ ...U
284
+ }),
285
+ h && yn({ ...U }),
286
+ _n({
287
+ ...U,
288
+ apply: ({ elements: se, rects: je, availableWidth: pn, availableHeight: mn }) => {
289
+ const { width: vn, height: hn } = je.reference, he = se.floating.style;
290
+ he.setProperty("--radix-popper-available-width", `${pn}px`), he.setProperty("--radix-popper-available-height", `${mn}px`), he.setProperty("--radix-popper-anchor-width", `${vn}px`), he.setProperty("--radix-popper-anchor-height", `${hn}px`);
291
+ }
292
+ }),
293
+ E && Pn({ element: E, padding: s }),
294
+ rr({ arrowWidth: I, arrowHeight: P }),
295
+ v && In({ strategy: "referenceHidden", ...U })
296
+ ]
297
+ }), [R, T] = Et(L), A = ne(M);
298
+ Te(() => {
299
+ Q && (A == null || A());
300
+ }, [Q, A]);
301
+ const G = (B = N.arrow) == null ? void 0 : B.x, re = (ae = N.arrow) == null ? void 0 : ae.y, oe = ((O = N.arrow) == null ? void 0 : O.centerOffset) !== 0, [ve, X] = o.useState();
302
+ return Te(() => {
303
+ g && X(window.getComputedStyle(g).zIndex);
304
+ }, [g]), /* @__PURE__ */ l(
305
+ "div",
306
+ {
307
+ ref: Z.setFloating,
308
+ "data-radix-popper-content-wrapper": "",
309
+ style: {
310
+ ...q,
311
+ transform: Q ? q.transform : "translate(0, -200%)",
312
+ // keep off the page when measuring
313
+ minWidth: "max-content",
314
+ zIndex: ve,
315
+ "--radix-popper-transform-origin": [
316
+ (ce = N.transformOrigin) == null ? void 0 : ce.x,
317
+ (Xe = N.transformOrigin) == null ? void 0 : Xe.y
318
+ ].join(" "),
319
+ // hide the content if using the hide middleware and should be hidden
320
+ // set visibility to hidden and disable pointer events so the UI behaves
321
+ // as if the PopperContent isn't there at all
322
+ ...((Ve = N.hide) == null ? void 0 : Ve.referenceHidden) && {
323
+ visibility: "hidden",
324
+ pointerEvents: "none"
325
+ }
326
+ },
327
+ dir: e.dir,
328
+ children: /* @__PURE__ */ l(
329
+ Jn,
330
+ {
331
+ scope: n,
332
+ placedSide: R,
333
+ onArrowChange: y,
334
+ arrowX: G,
335
+ arrowY: re,
336
+ shouldHideArrow: oe,
337
+ children: /* @__PURE__ */ l(
338
+ D.div,
339
+ {
340
+ "data-side": R,
341
+ "data-align": T,
342
+ ...i,
343
+ ref: w,
344
+ style: {
345
+ ...i.style,
346
+ // if the PopperContent hasn't been placed yet (not all measurements done)
347
+ // we prevent animations so that users's animation don't kick in too early referring wrong sides
348
+ animation: Q ? void 0 : "none"
349
+ }
350
+ }
351
+ )
352
+ }
353
+ )
354
+ }
355
+ );
356
+ }
357
+ );
358
+ wt.displayName = Ke;
359
+ var Ct = "PopperArrow", tr = {
360
+ top: "bottom",
361
+ right: "left",
362
+ bottom: "top",
363
+ left: "right"
364
+ }, Mt = o.forwardRef(function(t, n) {
365
+ const { __scopePopper: r, ...a } = t, c = er(Ct, r), u = tr[c.placedSide];
366
+ return (
367
+ // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
368
+ // doesn't report size as we'd expect on SVG elements.
369
+ // it reports their bounding box which is effectively the largest path inside the SVG.
370
+ /* @__PURE__ */ l(
371
+ "span",
372
+ {
373
+ ref: c.onArrowChange,
374
+ style: {
375
+ position: "absolute",
376
+ left: c.arrowX,
377
+ top: c.arrowY,
378
+ [u]: 0,
379
+ transformOrigin: {
380
+ top: "",
381
+ right: "0 0",
382
+ bottom: "center 0",
383
+ left: "100% 0"
384
+ }[c.placedSide],
385
+ transform: {
386
+ top: "translateY(100%)",
387
+ right: "translateY(50%) rotate(90deg) translateX(-50%)",
388
+ bottom: "rotate(180deg)",
389
+ left: "translateY(50%) rotate(-90deg) translateX(50%)"
390
+ }[c.placedSide],
391
+ visibility: c.shouldHideArrow ? "hidden" : void 0
392
+ },
393
+ children: /* @__PURE__ */ l(
394
+ qn,
395
+ {
396
+ ...a,
397
+ ref: n,
398
+ style: {
399
+ ...a.style,
400
+ // ensures the element can be measured correctly (mostly for if SVG)
401
+ display: "block"
402
+ }
403
+ }
404
+ )
405
+ }
406
+ )
407
+ );
408
+ });
409
+ Mt.displayName = Ct;
410
+ function nr(e) {
411
+ return e !== null;
412
+ }
413
+ var rr = (e) => ({
414
+ name: "transformOrigin",
415
+ options: e,
416
+ fn(t) {
417
+ var f, g, S;
418
+ const { placement: n, rects: r, middlewareData: a } = t, u = ((f = a.arrow) == null ? void 0 : f.centerOffset) !== 0, s = u ? 0 : e.arrowWidth, h = u ? 0 : e.arrowHeight, [m, p] = Et(n), d = { start: "0%", center: "50%", end: "100%" }[p], v = (((g = a.arrow) == null ? void 0 : g.x) ?? 0) + s / 2, C = (((S = a.arrow) == null ? void 0 : S.y) ?? 0) + h / 2;
419
+ let M = "", i = "";
420
+ return m === "bottom" ? (M = u ? d : `${v}px`, i = `${-h}px`) : m === "top" ? (M = u ? d : `${v}px`, i = `${r.floating.height + h}px`) : m === "right" ? (M = `${-h}px`, i = u ? d : `${C}px`) : m === "left" && (M = `${r.floating.width + h}px`, i = u ? d : `${C}px`), { data: { x: M, y: i } };
421
+ }
422
+ });
423
+ function Et(e) {
424
+ const [t, n = "center"] = e.split("-");
425
+ return [t, n];
426
+ }
427
+ var or = vt, ar = gt, cr = wt, sr = Mt, Ae = "rovingFocusGroup.onEntryFocus", ir = { bubbles: !1, cancelable: !0 }, fe = "RovingFocusGroup", [Oe, Rt, ur] = st(fe), [lr, St] = de(
428
+ fe,
429
+ [ur]
430
+ ), [dr, fr] = lr(fe), bt = o.forwardRef(
431
+ (e, t) => /* @__PURE__ */ l(Oe.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(Oe.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(pr, { ...e, ref: t }) }) })
432
+ );
433
+ bt.displayName = fe;
434
+ var pr = o.forwardRef((e, t) => {
435
+ const {
436
+ __scopeRovingFocusGroup: n,
437
+ orientation: r,
438
+ loop: a = !1,
439
+ dir: c,
440
+ currentTabStopId: u,
441
+ defaultCurrentTabStopId: s,
442
+ onCurrentTabStopIdChange: h,
443
+ onEntryFocus: m,
444
+ preventScrollOnEntryFocus: p = !1,
445
+ ...d
446
+ } = e, v = o.useRef(null), C = K(t, v), M = it(c), [i, f] = ot({
447
+ prop: u,
448
+ defaultProp: s ?? null,
449
+ onChange: h,
450
+ caller: fe
451
+ }), [g, S] = o.useState(!1), w = ne(m), E = Rt(n), y = o.useRef(!1), [_, I] = o.useState(0);
452
+ return o.useEffect(() => {
453
+ const P = v.current;
454
+ if (P)
455
+ return P.addEventListener(Ae, w), () => P.removeEventListener(Ae, w);
456
+ }, [w]), /* @__PURE__ */ l(
457
+ dr,
458
+ {
459
+ scope: n,
460
+ orientation: r,
461
+ dir: M,
462
+ loop: a,
463
+ currentTabStopId: i,
464
+ onItemFocus: o.useCallback(
465
+ (P) => f(P),
466
+ [f]
467
+ ),
468
+ onItemShiftTab: o.useCallback(() => S(!0), []),
469
+ onFocusableItemAdd: o.useCallback(
470
+ () => I((P) => P + 1),
471
+ []
472
+ ),
473
+ onFocusableItemRemove: o.useCallback(
474
+ () => I((P) => P - 1),
475
+ []
476
+ ),
477
+ children: /* @__PURE__ */ l(
478
+ D.div,
479
+ {
480
+ tabIndex: g || _ === 0 ? -1 : 0,
481
+ "data-orientation": r,
482
+ ...d,
483
+ ref: C,
484
+ style: { outline: "none", ...e.style },
485
+ onMouseDown: b(e.onMouseDown, () => {
486
+ y.current = !0;
487
+ }),
488
+ onFocus: b(e.onFocus, (P) => {
489
+ const k = !y.current;
490
+ if (P.target === P.currentTarget && k && !g) {
491
+ const $ = new CustomEvent(Ae, ir);
492
+ if (P.currentTarget.dispatchEvent($), !$.defaultPrevented) {
493
+ const Y = E().filter((L) => L.focusable), W = Y.find((L) => L.active), U = Y.find((L) => L.id === i), q = [W, U, ...Y].filter(
494
+ Boolean
495
+ ).map((L) => L.ref.current);
496
+ Pt(q, p);
497
+ }
498
+ }
499
+ y.current = !1;
500
+ }),
501
+ onBlur: b(e.onBlur, () => S(!1))
502
+ }
503
+ )
504
+ }
505
+ );
506
+ }), yt = "RovingFocusGroupItem", _t = o.forwardRef(
507
+ (e, t) => {
508
+ const {
509
+ __scopeRovingFocusGroup: n,
510
+ focusable: r = !0,
511
+ active: a = !1,
512
+ tabStopId: c,
513
+ children: u,
514
+ ...s
515
+ } = e, h = De(), m = c || h, p = fr(yt, n), d = p.currentTabStopId === m, v = Rt(n), { onFocusableItemAdd: C, onFocusableItemRemove: M, currentTabStopId: i } = p;
516
+ return o.useEffect(() => {
517
+ if (r)
518
+ return C(), () => M();
519
+ }, [r, C, M]), /* @__PURE__ */ l(
520
+ Oe.ItemSlot,
521
+ {
522
+ scope: n,
523
+ id: m,
524
+ focusable: r,
525
+ active: a,
526
+ children: /* @__PURE__ */ l(
527
+ D.span,
528
+ {
529
+ tabIndex: d ? 0 : -1,
530
+ "data-orientation": p.orientation,
531
+ ...s,
532
+ ref: t,
533
+ onMouseDown: b(e.onMouseDown, (f) => {
534
+ r ? p.onItemFocus(m) : f.preventDefault();
535
+ }),
536
+ onFocus: b(e.onFocus, () => p.onItemFocus(m)),
537
+ onKeyDown: b(e.onKeyDown, (f) => {
538
+ if (f.key === "Tab" && f.shiftKey) {
539
+ p.onItemShiftTab();
540
+ return;
541
+ }
542
+ if (f.target !== f.currentTarget)
543
+ return;
544
+ const g = hr(f, p.orientation, p.dir);
545
+ if (g !== void 0) {
546
+ if (f.metaKey || f.ctrlKey || f.altKey || f.shiftKey)
547
+ return;
548
+ f.preventDefault();
549
+ let w = v().filter((E) => E.focusable).map((E) => E.ref.current);
550
+ if (g === "last")
551
+ w.reverse();
552
+ else if (g === "prev" || g === "next") {
553
+ g === "prev" && w.reverse();
554
+ const E = w.indexOf(f.currentTarget);
555
+ w = p.loop ? gr(w, E + 1) : w.slice(E + 1);
556
+ }
557
+ setTimeout(() => Pt(w));
558
+ }
559
+ }),
560
+ children: typeof u == "function" ? u({ isCurrentTabStop: d, hasTabStop: i != null }) : u
561
+ }
562
+ )
563
+ }
564
+ );
565
+ }
566
+ );
567
+ _t.displayName = yt;
568
+ var mr = {
569
+ ArrowLeft: "prev",
570
+ ArrowUp: "prev",
571
+ ArrowRight: "next",
572
+ ArrowDown: "next",
573
+ PageUp: "first",
574
+ Home: "first",
575
+ PageDown: "last",
576
+ End: "last"
577
+ };
578
+ function vr(e, t) {
579
+ return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
580
+ }
581
+ function hr(e, t, n) {
582
+ const r = vr(e.key, n);
583
+ if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
584
+ return mr[r];
585
+ }
586
+ function Pt(e, t = !1) {
587
+ const n = document.activeElement;
588
+ for (const r of e)
589
+ if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n))
590
+ return;
591
+ }
592
+ function gr(e, t) {
593
+ return e.map((n, r) => e[(t + r) % e.length]);
594
+ }
595
+ var wr = bt, Cr = _t, It = xn(), xe = function() {
596
+ }, Re = o.forwardRef(function(e, t) {
597
+ var n = o.useRef(null), r = o.useState({
598
+ onScrollCapture: xe,
599
+ onWheelCapture: xe,
600
+ onTouchMoveCapture: xe
601
+ }), a = r[0], c = r[1], u = e.forwardProps, s = e.children, h = e.className, m = e.removeScrollBar, p = e.enabled, d = e.shards, v = e.sideCar, C = e.noIsolation, M = e.inert, i = e.allowPinchZoom, f = e.as, g = f === void 0 ? "div" : f, S = e.gapMode, w = Tn(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = v, y = Nn([n, t]), _ = te(te({}, w), a);
602
+ return o.createElement(
603
+ o.Fragment,
604
+ null,
605
+ p && o.createElement(E, { sideCar: It, removeScrollBar: m, shards: d, noIsolation: C, inert: M, setCallbacks: c, allowPinchZoom: !!i, lockRef: n, gapMode: S }),
606
+ u ? o.cloneElement(o.Children.only(s), te(te({}, _), { ref: y })) : o.createElement(g, te({}, _, { className: h, ref: y }), s)
607
+ );
608
+ });
609
+ Re.defaultProps = {
610
+ enabled: !0,
611
+ removeScrollBar: !0,
612
+ inert: !1
613
+ };
614
+ Re.classNames = {
615
+ fullWidth: Dn,
616
+ zeroRight: On
617
+ };
618
+ var Fe = !1;
619
+ if (typeof window < "u")
620
+ try {
621
+ var ge = Object.defineProperty({}, "passive", {
622
+ get: function() {
623
+ return Fe = !0, !0;
624
+ }
625
+ });
626
+ window.addEventListener("test", ge, ge), window.removeEventListener("test", ge, ge);
627
+ } catch {
628
+ Fe = !1;
629
+ }
630
+ var J = Fe ? { passive: !1 } : !1, Mr = function(e) {
631
+ return e.tagName === "TEXTAREA";
632
+ }, At = function(e, t) {
633
+ if (!(e instanceof Element))
634
+ return !1;
635
+ var n = window.getComputedStyle(e);
636
+ return (
637
+ // not-not-scrollable
638
+ n[t] !== "hidden" && // contains scroll inside self
639
+ !(n.overflowY === n.overflowX && !Mr(e) && n[t] === "visible")
640
+ );
641
+ }, Er = function(e) {
642
+ return At(e, "overflowY");
643
+ }, Rr = function(e) {
644
+ return At(e, "overflowX");
645
+ }, et = function(e, t) {
646
+ var n = t.ownerDocument, r = t;
647
+ do {
648
+ typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
649
+ var a = xt(e, r);
650
+ if (a) {
651
+ var c = Tt(e, r), u = c[1], s = c[2];
652
+ if (u > s)
653
+ return !0;
654
+ }
655
+ r = r.parentNode;
656
+ } while (r && r !== n.body);
657
+ return !1;
658
+ }, Sr = function(e) {
659
+ var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
660
+ return [
661
+ t,
662
+ n,
663
+ r
664
+ ];
665
+ }, br = function(e) {
666
+ var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
667
+ return [
668
+ t,
669
+ n,
670
+ r
671
+ ];
672
+ }, xt = function(e, t) {
673
+ return e === "v" ? Er(t) : Rr(t);
674
+ }, Tt = function(e, t) {
675
+ return e === "v" ? Sr(t) : br(t);
676
+ }, yr = function(e, t) {
677
+ return e === "h" && t === "rtl" ? -1 : 1;
678
+ }, _r = function(e, t, n, r, a) {
679
+ var c = yr(e, window.getComputedStyle(t).direction), u = c * r, s = n.target, h = t.contains(s), m = !1, p = u > 0, d = 0, v = 0;
680
+ do {
681
+ var C = Tt(e, s), M = C[0], i = C[1], f = C[2], g = i - f - c * M;
682
+ (M || g) && xt(e, s) && (d += g, v += M), s instanceof ShadowRoot ? s = s.host : s = s.parentNode;
683
+ } while (
684
+ // portaled content
685
+ !h && s !== document.body || // self content
686
+ h && (t.contains(s) || t === s)
687
+ );
688
+ return (p && (a && Math.abs(d) < 1 || !a && u > d) || !p && (a && Math.abs(v) < 1 || !a && -u > v)) && (m = !0), m;
689
+ }, we = function(e) {
690
+ return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
691
+ }, tt = function(e) {
692
+ return [e.deltaX, e.deltaY];
693
+ }, nt = function(e) {
694
+ return e && "current" in e ? e.current : e;
695
+ }, Pr = function(e, t) {
696
+ return e[0] === t[0] && e[1] === t[1];
697
+ }, Ir = function(e) {
698
+ return `
699
+ .block-interactivity-`.concat(e, ` {pointer-events: none;}
700
+ .allow-interactivity-`).concat(e, ` {pointer-events: all;}
701
+ `);
702
+ }, Ar = 0, ee = [];
703
+ function xr(e) {
704
+ var t = o.useRef([]), n = o.useRef([0, 0]), r = o.useRef(), a = o.useState(Ar++)[0], c = o.useState(Fn)[0], u = o.useRef(e);
705
+ o.useEffect(function() {
706
+ u.current = e;
707
+ }, [e]), o.useEffect(function() {
708
+ if (e.inert) {
709
+ document.body.classList.add("block-interactivity-".concat(a));
710
+ var i = kn([e.lockRef.current], (e.shards || []).map(nt), !0).filter(Boolean);
711
+ return i.forEach(function(f) {
712
+ return f.classList.add("allow-interactivity-".concat(a));
713
+ }), function() {
714
+ document.body.classList.remove("block-interactivity-".concat(a)), i.forEach(function(f) {
715
+ return f.classList.remove("allow-interactivity-".concat(a));
716
+ });
717
+ };
718
+ }
719
+ }, [e.inert, e.lockRef.current, e.shards]);
720
+ var s = o.useCallback(function(i, f) {
721
+ if ("touches" in i && i.touches.length === 2 || i.type === "wheel" && i.ctrlKey)
722
+ return !u.current.allowPinchZoom;
723
+ var g = we(i), S = n.current, w = "deltaX" in i ? i.deltaX : S[0] - g[0], E = "deltaY" in i ? i.deltaY : S[1] - g[1], y, _ = i.target, I = Math.abs(w) > Math.abs(E) ? "h" : "v";
724
+ if ("touches" in i && I === "h" && _.type === "range")
725
+ return !1;
726
+ var P = et(I, _);
727
+ if (!P)
728
+ return !0;
729
+ if (P ? y = I : (y = I === "v" ? "h" : "v", P = et(I, _)), !P)
730
+ return !1;
731
+ if (!r.current && "changedTouches" in i && (w || E) && (r.current = y), !y)
732
+ return !0;
733
+ var k = r.current || y;
734
+ return _r(k, f, i, k === "h" ? w : E, !0);
735
+ }, []), h = o.useCallback(function(i) {
736
+ var f = i;
737
+ if (!(!ee.length || ee[ee.length - 1] !== c)) {
738
+ var g = "deltaY" in f ? tt(f) : we(f), S = t.current.filter(function(y) {
739
+ return y.name === f.type && (y.target === f.target || f.target === y.shadowParent) && Pr(y.delta, g);
740
+ })[0];
741
+ if (S && S.should) {
742
+ f.cancelable && f.preventDefault();
743
+ return;
744
+ }
745
+ if (!S) {
746
+ var w = (u.current.shards || []).map(nt).filter(Boolean).filter(function(y) {
747
+ return y.contains(f.target);
748
+ }), E = w.length > 0 ? s(f, w[0]) : !u.current.noIsolation;
749
+ E && f.cancelable && f.preventDefault();
750
+ }
751
+ }
752
+ }, []), m = o.useCallback(function(i, f, g, S) {
753
+ var w = { name: i, delta: f, target: g, should: S, shadowParent: Tr(g) };
754
+ t.current.push(w), setTimeout(function() {
755
+ t.current = t.current.filter(function(E) {
756
+ return E !== w;
757
+ });
758
+ }, 1);
759
+ }, []), p = o.useCallback(function(i) {
760
+ n.current = we(i), r.current = void 0;
761
+ }, []), d = o.useCallback(function(i) {
762
+ m(i.type, tt(i), i.target, s(i, e.lockRef.current));
763
+ }, []), v = o.useCallback(function(i) {
764
+ m(i.type, we(i), i.target, s(i, e.lockRef.current));
765
+ }, []);
766
+ o.useEffect(function() {
767
+ return ee.push(c), e.setCallbacks({
768
+ onScrollCapture: d,
769
+ onWheelCapture: d,
770
+ onTouchMoveCapture: v
771
+ }), document.addEventListener("wheel", h, J), document.addEventListener("touchmove", h, J), document.addEventListener("touchstart", p, J), function() {
772
+ ee = ee.filter(function(i) {
773
+ return i !== c;
774
+ }), document.removeEventListener("wheel", h, J), document.removeEventListener("touchmove", h, J), document.removeEventListener("touchstart", p, J);
775
+ };
776
+ }, []);
777
+ var C = e.removeScrollBar, M = e.inert;
778
+ return o.createElement(
779
+ o.Fragment,
780
+ null,
781
+ M ? o.createElement(c, { styles: Ir(a) }) : null,
782
+ C ? o.createElement(Ln, { gapMode: e.gapMode }) : null
783
+ );
784
+ }
785
+ function Tr(e) {
786
+ for (var t = null; e !== null; )
787
+ e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
788
+ return t;
789
+ }
790
+ const Nr = Kn(It, xr);
791
+ var Nt = o.forwardRef(function(e, t) {
792
+ return o.createElement(Re, te({}, e, { ref: t, sideCar: Nr }));
793
+ });
794
+ Nt.classNames = Re.classNames;
795
+ const Dr = Nt;
796
+ var ke = ["Enter", " "], Or = ["ArrowDown", "PageUp", "Home"], Dt = ["ArrowUp", "PageDown", "End"], Fr = [...Or, ...Dt], kr = {
797
+ ltr: [...ke, "ArrowRight"],
798
+ rtl: [...ke, "ArrowLeft"]
799
+ }, Lr = {
800
+ ltr: ["ArrowLeft"],
801
+ rtl: ["ArrowRight"]
802
+ }, pe = "Menu", [ue, Kr, Gr] = st(pe), [j, Ot] = de(pe, [
803
+ Gr,
804
+ pt,
805
+ St
806
+ ]), Se = pt(), Ft = St(), [$r, z] = j(pe), [Ur, me] = j(pe), kt = (e) => {
807
+ const { __scopeMenu: t, open: n = !1, children: r, dir: a, onOpenChange: c, modal: u = !0 } = e, s = Se(t), [h, m] = o.useState(null), p = o.useRef(!1), d = ne(c), v = it(a);
808
+ return o.useEffect(() => {
809
+ const C = () => {
810
+ p.current = !0, document.addEventListener("pointerdown", M, { capture: !0, once: !0 }), document.addEventListener("pointermove", M, { capture: !0, once: !0 });
811
+ }, M = () => p.current = !1;
812
+ return document.addEventListener("keydown", C, { capture: !0 }), () => {
813
+ document.removeEventListener("keydown", C, { capture: !0 }), document.removeEventListener("pointerdown", M, { capture: !0 }), document.removeEventListener("pointermove", M, { capture: !0 });
814
+ };
815
+ }, []), /* @__PURE__ */ l(or, { ...s, children: /* @__PURE__ */ l(
816
+ $r,
817
+ {
818
+ scope: t,
819
+ open: n,
820
+ onOpenChange: d,
821
+ content: h,
822
+ onContentChange: m,
823
+ children: /* @__PURE__ */ l(
824
+ Ur,
825
+ {
826
+ scope: t,
827
+ onClose: o.useCallback(() => d(!1), [d]),
828
+ isUsingKeyboardRef: p,
829
+ dir: v,
830
+ modal: u,
831
+ children: r
832
+ }
833
+ )
834
+ }
835
+ ) });
836
+ };
837
+ kt.displayName = pe;
838
+ var Br = "MenuAnchor", Ge = o.forwardRef(
839
+ (e, t) => {
840
+ const { __scopeMenu: n, ...r } = e, a = Se(n);
841
+ return /* @__PURE__ */ l(ar, { ...a, ...r, ref: t });
842
+ }
843
+ );
844
+ Ge.displayName = Br;
845
+ var $e = "MenuPortal", [Yr, Lt] = j($e, {
846
+ forceMount: void 0
847
+ }), Kt = (e) => {
848
+ const { __scopeMenu: t, forceMount: n, children: r, container: a } = e, c = z($e, t);
849
+ return /* @__PURE__ */ l(Yr, { scope: t, forceMount: n, children: /* @__PURE__ */ l(Ee, { present: n || c.open, children: /* @__PURE__ */ l(ct, { asChild: !0, container: a, children: r }) }) });
850
+ };
851
+ Kt.displayName = $e;
852
+ var F = "MenuContent", [Hr, Ue] = j(F), Gt = o.forwardRef(
853
+ (e, t) => {
854
+ const n = Lt(F, e.__scopeMenu), { forceMount: r = n.forceMount, ...a } = e, c = z(F, e.__scopeMenu), u = me(F, e.__scopeMenu);
855
+ return /* @__PURE__ */ l(ue.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l(Ee, { present: r || c.open, children: /* @__PURE__ */ l(ue.Slot, { scope: e.__scopeMenu, children: u.modal ? /* @__PURE__ */ l(Wr, { ...a, ref: t }) : /* @__PURE__ */ l(Xr, { ...a, ref: t }) }) }) });
856
+ }
857
+ ), Wr = o.forwardRef(
858
+ (e, t) => {
859
+ const n = z(F, e.__scopeMenu), r = o.useRef(null), a = K(t, r);
860
+ return o.useEffect(() => {
861
+ const c = r.current;
862
+ if (c)
863
+ return Gn(c);
864
+ }, []), /* @__PURE__ */ l(
865
+ Be,
866
+ {
867
+ ...e,
868
+ ref: a,
869
+ trapFocus: n.open,
870
+ disableOutsidePointerEvents: n.open,
871
+ disableOutsideScroll: !0,
872
+ onFocusOutside: b(
873
+ e.onFocusOutside,
874
+ (c) => c.preventDefault(),
875
+ { checkForDefaultPrevented: !1 }
876
+ ),
877
+ onDismiss: () => n.onOpenChange(!1)
878
+ }
879
+ );
880
+ }
881
+ ), Xr = o.forwardRef((e, t) => {
882
+ const n = z(F, e.__scopeMenu);
883
+ return /* @__PURE__ */ l(
884
+ Be,
885
+ {
886
+ ...e,
887
+ ref: t,
888
+ trapFocus: !1,
889
+ disableOutsidePointerEvents: !1,
890
+ disableOutsideScroll: !1,
891
+ onDismiss: () => n.onOpenChange(!1)
892
+ }
893
+ );
894
+ }), Vr = Ne("MenuContent.ScrollLock"), Be = o.forwardRef(
895
+ (e, t) => {
896
+ const {
897
+ __scopeMenu: n,
898
+ loop: r = !1,
899
+ trapFocus: a,
900
+ onOpenAutoFocus: c,
901
+ onCloseAutoFocus: u,
902
+ disableOutsidePointerEvents: s,
903
+ onEntryFocus: h,
904
+ onEscapeKeyDown: m,
905
+ onPointerDownOutside: p,
906
+ onFocusOutside: d,
907
+ onInteractOutside: v,
908
+ onDismiss: C,
909
+ disableOutsideScroll: M,
910
+ ...i
911
+ } = e, f = z(F, n), g = me(F, n), S = Se(n), w = Ft(n), E = Kr(n), [y, _] = o.useState(null), I = o.useRef(null), P = K(t, I, f.onContentChange), k = o.useRef(0), $ = o.useRef(""), Y = o.useRef(0), W = o.useRef(null), U = o.useRef("right"), Z = o.useRef(0), q = M ? Dr : o.Fragment, L = M ? { as: Vr, allowPinchZoom: !0 } : void 0, Q = (R) => {
912
+ var B, ae;
913
+ const T = $.current + R, A = E().filter((O) => !O.disabled), G = document.activeElement, re = (B = A.find((O) => O.ref.current === G)) == null ? void 0 : B.textValue, oe = A.map((O) => O.textValue), ve = ao(oe, T, re), X = (ae = A.find((O) => O.textValue === ve)) == null ? void 0 : ae.ref.current;
914
+ (function O(ce) {
915
+ $.current = ce, window.clearTimeout(k.current), ce !== "" && (k.current = window.setTimeout(() => O(""), 1e3));
916
+ })(T), X && setTimeout(() => X.focus());
917
+ };
918
+ o.useEffect(() => () => window.clearTimeout(k.current), []), Bn();
919
+ const N = o.useCallback((R) => {
920
+ var A, G;
921
+ return U.current === ((A = W.current) == null ? void 0 : A.side) && so(R, (G = W.current) == null ? void 0 : G.area);
922
+ }, []);
923
+ return /* @__PURE__ */ l(
924
+ Hr,
925
+ {
926
+ scope: n,
927
+ searchRef: $,
928
+ onItemEnter: o.useCallback(
929
+ (R) => {
930
+ N(R) && R.preventDefault();
931
+ },
932
+ [N]
933
+ ),
934
+ onItemLeave: o.useCallback(
935
+ (R) => {
936
+ var T;
937
+ N(R) || ((T = I.current) == null || T.focus(), _(null));
938
+ },
939
+ [N]
940
+ ),
941
+ onTriggerLeave: o.useCallback(
942
+ (R) => {
943
+ N(R) && R.preventDefault();
944
+ },
945
+ [N]
946
+ ),
947
+ pointerGraceTimerRef: Y,
948
+ onPointerGraceIntentChange: o.useCallback((R) => {
949
+ W.current = R;
950
+ }, []),
951
+ children: /* @__PURE__ */ l(q, { ...L, children: /* @__PURE__ */ l(
952
+ ut,
953
+ {
954
+ asChild: !0,
955
+ trapped: a,
956
+ onMountAutoFocus: b(c, (R) => {
957
+ var T;
958
+ R.preventDefault(), (T = I.current) == null || T.focus({ preventScroll: !0 });
959
+ }),
960
+ onUnmountAutoFocus: u,
961
+ children: /* @__PURE__ */ l(
962
+ Cn,
963
+ {
964
+ asChild: !0,
965
+ disableOutsidePointerEvents: s,
966
+ onEscapeKeyDown: m,
967
+ onPointerDownOutside: p,
968
+ onFocusOutside: d,
969
+ onInteractOutside: v,
970
+ onDismiss: C,
971
+ children: /* @__PURE__ */ l(
972
+ wr,
973
+ {
974
+ asChild: !0,
975
+ ...w,
976
+ dir: g.dir,
977
+ orientation: "vertical",
978
+ loop: r,
979
+ currentTabStopId: y,
980
+ onCurrentTabStopIdChange: _,
981
+ onEntryFocus: b(h, (R) => {
982
+ g.isUsingKeyboardRef.current || R.preventDefault();
983
+ }),
984
+ preventScrollOnEntryFocus: !0,
985
+ children: /* @__PURE__ */ l(
986
+ cr,
987
+ {
988
+ role: "menu",
989
+ "aria-orientation": "vertical",
990
+ "data-state": tn(f.open),
991
+ "data-radix-menu-content": "",
992
+ dir: g.dir,
993
+ ...S,
994
+ ...i,
995
+ ref: P,
996
+ style: { outline: "none", ...i.style },
997
+ onKeyDown: b(i.onKeyDown, (R) => {
998
+ const A = R.target.closest("[data-radix-menu-content]") === R.currentTarget, G = R.ctrlKey || R.altKey || R.metaKey, re = R.key.length === 1;
999
+ A && (R.key === "Tab" && R.preventDefault(), !G && re && Q(R.key));
1000
+ const oe = I.current;
1001
+ if (R.target !== oe || !Fr.includes(R.key))
1002
+ return;
1003
+ R.preventDefault();
1004
+ const X = E().filter((B) => !B.disabled).map((B) => B.ref.current);
1005
+ Dt.includes(R.key) && X.reverse(), ro(X);
1006
+ }),
1007
+ onBlur: b(e.onBlur, (R) => {
1008
+ R.currentTarget.contains(R.target) || (window.clearTimeout(k.current), $.current = "");
1009
+ }),
1010
+ onPointerMove: b(
1011
+ e.onPointerMove,
1012
+ le((R) => {
1013
+ const T = R.target, A = Z.current !== R.clientX;
1014
+ if (R.currentTarget.contains(T) && A) {
1015
+ const G = R.clientX > Z.current ? "right" : "left";
1016
+ U.current = G, Z.current = R.clientX;
1017
+ }
1018
+ })
1019
+ )
1020
+ }
1021
+ )
1022
+ }
1023
+ )
1024
+ }
1025
+ )
1026
+ }
1027
+ ) })
1028
+ }
1029
+ );
1030
+ }
1031
+ );
1032
+ Gt.displayName = F;
1033
+ var jr = "MenuGroup", Ye = o.forwardRef(
1034
+ (e, t) => {
1035
+ const { __scopeMenu: n, ...r } = e;
1036
+ return /* @__PURE__ */ l(D.div, { role: "group", ...r, ref: t });
1037
+ }
1038
+ );
1039
+ Ye.displayName = jr;
1040
+ var zr = "MenuLabel", $t = o.forwardRef(
1041
+ (e, t) => {
1042
+ const { __scopeMenu: n, ...r } = e;
1043
+ return /* @__PURE__ */ l(D.div, { ...r, ref: t });
1044
+ }
1045
+ );
1046
+ $t.displayName = zr;
1047
+ var Ce = "MenuItem", rt = "menu.itemSelect", be = o.forwardRef(
1048
+ (e, t) => {
1049
+ const { disabled: n = !1, onSelect: r, ...a } = e, c = o.useRef(null), u = me(Ce, e.__scopeMenu), s = Ue(Ce, e.__scopeMenu), h = K(t, c), m = o.useRef(!1), p = () => {
1050
+ const d = c.current;
1051
+ if (!n && d) {
1052
+ const v = new CustomEvent(rt, { bubbles: !0, cancelable: !0 });
1053
+ d.addEventListener(rt, (C) => r == null ? void 0 : r(C), { once: !0 }), wn(d, v), v.defaultPrevented ? m.current = !1 : u.onClose();
1054
+ }
1055
+ };
1056
+ return /* @__PURE__ */ l(
1057
+ Ut,
1058
+ {
1059
+ ...a,
1060
+ ref: h,
1061
+ disabled: n,
1062
+ onClick: b(e.onClick, p),
1063
+ onPointerDown: (d) => {
1064
+ var v;
1065
+ (v = e.onPointerDown) == null || v.call(e, d), m.current = !0;
1066
+ },
1067
+ onPointerUp: b(e.onPointerUp, (d) => {
1068
+ var v;
1069
+ m.current || (v = d.currentTarget) == null || v.click();
1070
+ }),
1071
+ onKeyDown: b(e.onKeyDown, (d) => {
1072
+ const v = s.searchRef.current !== "";
1073
+ n || v && d.key === " " || ke.includes(d.key) && (d.currentTarget.click(), d.preventDefault());
1074
+ })
1075
+ }
1076
+ );
1077
+ }
1078
+ );
1079
+ be.displayName = Ce;
1080
+ var Ut = o.forwardRef(
1081
+ (e, t) => {
1082
+ const { __scopeMenu: n, disabled: r = !1, textValue: a, ...c } = e, u = Ue(Ce, n), s = Ft(n), h = o.useRef(null), m = K(t, h), [p, d] = o.useState(!1), [v, C] = o.useState("");
1083
+ return o.useEffect(() => {
1084
+ const M = h.current;
1085
+ M && C((M.textContent ?? "").trim());
1086
+ }, [c.children]), /* @__PURE__ */ l(
1087
+ ue.ItemSlot,
1088
+ {
1089
+ scope: n,
1090
+ disabled: r,
1091
+ textValue: a ?? v,
1092
+ children: /* @__PURE__ */ l(Cr, { asChild: !0, ...s, focusable: !r, children: /* @__PURE__ */ l(
1093
+ D.div,
1094
+ {
1095
+ role: "menuitem",
1096
+ "data-highlighted": p ? "" : void 0,
1097
+ "aria-disabled": r || void 0,
1098
+ "data-disabled": r ? "" : void 0,
1099
+ ...c,
1100
+ ref: m,
1101
+ onPointerMove: b(
1102
+ e.onPointerMove,
1103
+ le((M) => {
1104
+ r ? u.onItemLeave(M) : (u.onItemEnter(M), M.defaultPrevented || M.currentTarget.focus({ preventScroll: !0 }));
1105
+ })
1106
+ ),
1107
+ onPointerLeave: b(
1108
+ e.onPointerLeave,
1109
+ le((M) => u.onItemLeave(M))
1110
+ ),
1111
+ onFocus: b(e.onFocus, () => d(!0)),
1112
+ onBlur: b(e.onBlur, () => d(!1))
1113
+ }
1114
+ ) })
1115
+ }
1116
+ );
1117
+ }
1118
+ ), Zr = "MenuCheckboxItem", Bt = o.forwardRef(
1119
+ (e, t) => {
1120
+ const { checked: n = !1, onCheckedChange: r, ...a } = e;
1121
+ return /* @__PURE__ */ l(Vt, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ l(
1122
+ be,
1123
+ {
1124
+ role: "menuitemcheckbox",
1125
+ "aria-checked": Me(n) ? "mixed" : n,
1126
+ ...a,
1127
+ ref: t,
1128
+ "data-state": We(n),
1129
+ onSelect: b(
1130
+ a.onSelect,
1131
+ () => r == null ? void 0 : r(Me(n) ? !0 : !n),
1132
+ { checkForDefaultPrevented: !1 }
1133
+ )
1134
+ }
1135
+ ) });
1136
+ }
1137
+ );
1138
+ Bt.displayName = Zr;
1139
+ var Yt = "MenuRadioGroup", [qr, Qr] = j(
1140
+ Yt,
1141
+ { value: void 0, onValueChange: () => {
1142
+ } }
1143
+ ), Ht = o.forwardRef(
1144
+ (e, t) => {
1145
+ const { value: n, onValueChange: r, ...a } = e, c = ne(r);
1146
+ return /* @__PURE__ */ l(qr, { scope: e.__scopeMenu, value: n, onValueChange: c, children: /* @__PURE__ */ l(Ye, { ...a, ref: t }) });
1147
+ }
1148
+ );
1149
+ Ht.displayName = Yt;
1150
+ var Wt = "MenuRadioItem", Xt = o.forwardRef(
1151
+ (e, t) => {
1152
+ const { value: n, ...r } = e, a = Qr(Wt, e.__scopeMenu), c = n === a.value;
1153
+ return /* @__PURE__ */ l(Vt, { scope: e.__scopeMenu, checked: c, children: /* @__PURE__ */ l(
1154
+ be,
1155
+ {
1156
+ role: "menuitemradio",
1157
+ "aria-checked": c,
1158
+ ...r,
1159
+ ref: t,
1160
+ "data-state": We(c),
1161
+ onSelect: b(
1162
+ r.onSelect,
1163
+ () => {
1164
+ var u;
1165
+ return (u = a.onValueChange) == null ? void 0 : u.call(a, n);
1166
+ },
1167
+ { checkForDefaultPrevented: !1 }
1168
+ )
1169
+ }
1170
+ ) });
1171
+ }
1172
+ );
1173
+ Xt.displayName = Wt;
1174
+ var He = "MenuItemIndicator", [Vt, Jr] = j(
1175
+ He,
1176
+ { checked: !1 }
1177
+ ), jt = o.forwardRef(
1178
+ (e, t) => {
1179
+ const { __scopeMenu: n, forceMount: r, ...a } = e, c = Jr(He, n);
1180
+ return /* @__PURE__ */ l(
1181
+ Ee,
1182
+ {
1183
+ present: r || Me(c.checked) || c.checked === !0,
1184
+ children: /* @__PURE__ */ l(
1185
+ D.span,
1186
+ {
1187
+ ...a,
1188
+ ref: t,
1189
+ "data-state": We(c.checked)
1190
+ }
1191
+ )
1192
+ }
1193
+ );
1194
+ }
1195
+ );
1196
+ jt.displayName = He;
1197
+ var eo = "MenuSeparator", zt = o.forwardRef(
1198
+ (e, t) => {
1199
+ const { __scopeMenu: n, ...r } = e;
1200
+ return /* @__PURE__ */ l(
1201
+ D.div,
1202
+ {
1203
+ role: "separator",
1204
+ "aria-orientation": "horizontal",
1205
+ ...r,
1206
+ ref: t
1207
+ }
1208
+ );
1209
+ }
1210
+ );
1211
+ zt.displayName = eo;
1212
+ var to = "MenuArrow", Zt = o.forwardRef(
1213
+ (e, t) => {
1214
+ const { __scopeMenu: n, ...r } = e, a = Se(n);
1215
+ return /* @__PURE__ */ l(sr, { ...a, ...r, ref: t });
1216
+ }
1217
+ );
1218
+ Zt.displayName = to;
1219
+ var no = "MenuSub", [Jo, qt] = j(no), ie = "MenuSubTrigger", Qt = o.forwardRef(
1220
+ (e, t) => {
1221
+ const n = z(ie, e.__scopeMenu), r = me(ie, e.__scopeMenu), a = qt(ie, e.__scopeMenu), c = Ue(ie, e.__scopeMenu), u = o.useRef(null), { pointerGraceTimerRef: s, onPointerGraceIntentChange: h } = c, m = { __scopeMenu: e.__scopeMenu }, p = o.useCallback(() => {
1222
+ u.current && window.clearTimeout(u.current), u.current = null;
1223
+ }, []);
1224
+ return o.useEffect(() => p, [p]), o.useEffect(() => {
1225
+ const d = s.current;
1226
+ return () => {
1227
+ window.clearTimeout(d), h(null);
1228
+ };
1229
+ }, [s, h]), /* @__PURE__ */ l(Ge, { asChild: !0, ...m, children: /* @__PURE__ */ l(
1230
+ Ut,
1231
+ {
1232
+ id: a.triggerId,
1233
+ "aria-haspopup": "menu",
1234
+ "aria-expanded": n.open,
1235
+ "aria-controls": a.contentId,
1236
+ "data-state": tn(n.open),
1237
+ ...e,
1238
+ ref: at(t, a.onTriggerChange),
1239
+ onClick: (d) => {
1240
+ var v;
1241
+ (v = e.onClick) == null || v.call(e, d), !(e.disabled || d.defaultPrevented) && (d.currentTarget.focus(), n.open || n.onOpenChange(!0));
1242
+ },
1243
+ onPointerMove: b(
1244
+ e.onPointerMove,
1245
+ le((d) => {
1246
+ c.onItemEnter(d), !d.defaultPrevented && !e.disabled && !n.open && !u.current && (c.onPointerGraceIntentChange(null), u.current = window.setTimeout(() => {
1247
+ n.onOpenChange(!0), p();
1248
+ }, 100));
1249
+ })
1250
+ ),
1251
+ onPointerLeave: b(
1252
+ e.onPointerLeave,
1253
+ le((d) => {
1254
+ var C, M;
1255
+ p();
1256
+ const v = (C = n.content) == null ? void 0 : C.getBoundingClientRect();
1257
+ if (v) {
1258
+ const i = (M = n.content) == null ? void 0 : M.dataset.side, f = i === "right", g = f ? -5 : 5, S = v[f ? "left" : "right"], w = v[f ? "right" : "left"];
1259
+ c.onPointerGraceIntentChange({
1260
+ area: [
1261
+ // Apply a bleed on clientX to ensure that our exit point is
1262
+ // consistently within polygon bounds
1263
+ { x: d.clientX + g, y: d.clientY },
1264
+ { x: S, y: v.top },
1265
+ { x: w, y: v.top },
1266
+ { x: w, y: v.bottom },
1267
+ { x: S, y: v.bottom }
1268
+ ],
1269
+ side: i
1270
+ }), window.clearTimeout(s.current), s.current = window.setTimeout(
1271
+ () => c.onPointerGraceIntentChange(null),
1272
+ 300
1273
+ );
1274
+ } else {
1275
+ if (c.onTriggerLeave(d), d.defaultPrevented)
1276
+ return;
1277
+ c.onPointerGraceIntentChange(null);
1278
+ }
1279
+ })
1280
+ ),
1281
+ onKeyDown: b(e.onKeyDown, (d) => {
1282
+ var C;
1283
+ const v = c.searchRef.current !== "";
1284
+ e.disabled || v && d.key === " " || kr[r.dir].includes(d.key) && (n.onOpenChange(!0), (C = n.content) == null || C.focus(), d.preventDefault());
1285
+ })
1286
+ }
1287
+ ) });
1288
+ }
1289
+ );
1290
+ Qt.displayName = ie;
1291
+ var Jt = "MenuSubContent", en = o.forwardRef(
1292
+ (e, t) => {
1293
+ const n = Lt(F, e.__scopeMenu), { forceMount: r = n.forceMount, ...a } = e, c = z(F, e.__scopeMenu), u = me(F, e.__scopeMenu), s = qt(Jt, e.__scopeMenu), h = o.useRef(null), m = K(t, h);
1294
+ return /* @__PURE__ */ l(ue.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l(Ee, { present: r || c.open, children: /* @__PURE__ */ l(ue.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ l(
1295
+ Be,
1296
+ {
1297
+ id: s.contentId,
1298
+ "aria-labelledby": s.triggerId,
1299
+ ...a,
1300
+ ref: m,
1301
+ align: "start",
1302
+ side: u.dir === "rtl" ? "left" : "right",
1303
+ disableOutsidePointerEvents: !1,
1304
+ disableOutsideScroll: !1,
1305
+ trapFocus: !1,
1306
+ onOpenAutoFocus: (p) => {
1307
+ var d;
1308
+ u.isUsingKeyboardRef.current && ((d = h.current) == null || d.focus()), p.preventDefault();
1309
+ },
1310
+ onCloseAutoFocus: (p) => p.preventDefault(),
1311
+ onFocusOutside: b(e.onFocusOutside, (p) => {
1312
+ p.target !== s.trigger && c.onOpenChange(!1);
1313
+ }),
1314
+ onEscapeKeyDown: b(e.onEscapeKeyDown, (p) => {
1315
+ u.onClose(), p.preventDefault();
1316
+ }),
1317
+ onKeyDown: b(e.onKeyDown, (p) => {
1318
+ var C;
1319
+ const d = p.currentTarget.contains(p.target), v = Lr[u.dir].includes(p.key);
1320
+ d && v && (c.onOpenChange(!1), (C = s.trigger) == null || C.focus(), p.preventDefault());
1321
+ })
1322
+ }
1323
+ ) }) }) });
1324
+ }
1325
+ );
1326
+ en.displayName = Jt;
1327
+ function tn(e) {
1328
+ return e ? "open" : "closed";
1329
+ }
1330
+ function Me(e) {
1331
+ return e === "indeterminate";
1332
+ }
1333
+ function We(e) {
1334
+ return Me(e) ? "indeterminate" : e ? "checked" : "unchecked";
1335
+ }
1336
+ function ro(e) {
1337
+ const t = document.activeElement;
1338
+ for (const n of e)
1339
+ if (n === t || (n.focus(), document.activeElement !== t))
1340
+ return;
1341
+ }
1342
+ function oo(e, t) {
1343
+ return e.map((n, r) => e[(t + r) % e.length]);
1344
+ }
1345
+ function ao(e, t, n) {
1346
+ const a = t.length > 1 && Array.from(t).every((m) => m === t[0]) ? t[0] : t, c = n ? e.indexOf(n) : -1;
1347
+ let u = oo(e, Math.max(c, 0));
1348
+ a.length === 1 && (u = u.filter((m) => m !== n));
1349
+ const h = u.find(
1350
+ (m) => m.toLowerCase().startsWith(a.toLowerCase())
1351
+ );
1352
+ return h !== n ? h : void 0;
1353
+ }
1354
+ function co(e, t) {
1355
+ const { x: n, y: r } = e;
1356
+ let a = !1;
1357
+ for (let c = 0, u = t.length - 1; c < t.length; u = c++) {
1358
+ const s = t[c], h = t[u], m = s.x, p = s.y, d = h.x, v = h.y;
1359
+ p > r != v > r && n < (d - m) * (r - p) / (v - p) + m && (a = !a);
1360
+ }
1361
+ return a;
1362
+ }
1363
+ function so(e, t) {
1364
+ if (!t)
1365
+ return !1;
1366
+ const n = { x: e.clientX, y: e.clientY };
1367
+ return co(n, t);
1368
+ }
1369
+ function le(e) {
1370
+ return (t) => t.pointerType === "mouse" ? e(t) : void 0;
1371
+ }
1372
+ var io = kt, uo = Ge, lo = Kt, fo = Gt, po = Ye, mo = $t, vo = be, ho = Bt, go = Ht, wo = Xt, Co = jt, Mo = zt, Eo = Zt, Ro = Qt, So = en, ye = "DropdownMenu", [bo, ea] = de(
1373
+ ye,
1374
+ [Ot]
1375
+ ), x = Ot(), [yo, nn] = bo(ye), rn = (e) => {
1376
+ const {
1377
+ __scopeDropdownMenu: t,
1378
+ children: n,
1379
+ dir: r,
1380
+ open: a,
1381
+ defaultOpen: c,
1382
+ onOpenChange: u,
1383
+ modal: s = !0
1384
+ } = e, h = x(t), m = o.useRef(null), [p, d] = ot({
1385
+ prop: a,
1386
+ defaultProp: c ?? !1,
1387
+ onChange: u,
1388
+ caller: ye
1389
+ });
1390
+ return /* @__PURE__ */ l(
1391
+ yo,
1392
+ {
1393
+ scope: t,
1394
+ triggerId: De(),
1395
+ triggerRef: m,
1396
+ contentId: De(),
1397
+ open: p,
1398
+ onOpenChange: d,
1399
+ onOpenToggle: o.useCallback(() => d((v) => !v), [d]),
1400
+ modal: s,
1401
+ children: /* @__PURE__ */ l(io, { ...h, open: p, onOpenChange: d, dir: r, modal: s, children: n })
1402
+ }
1403
+ );
1404
+ };
1405
+ rn.displayName = ye;
1406
+ var on = "DropdownMenuTrigger", an = o.forwardRef(
1407
+ (e, t) => {
1408
+ const { __scopeDropdownMenu: n, disabled: r = !1, ...a } = e, c = nn(on, n), u = x(n);
1409
+ return /* @__PURE__ */ l(uo, { asChild: !0, ...u, children: /* @__PURE__ */ l(
1410
+ D.button,
1411
+ {
1412
+ type: "button",
1413
+ id: c.triggerId,
1414
+ "aria-haspopup": "menu",
1415
+ "aria-expanded": c.open,
1416
+ "aria-controls": c.open ? c.contentId : void 0,
1417
+ "data-state": c.open ? "open" : "closed",
1418
+ "data-disabled": r ? "" : void 0,
1419
+ disabled: r,
1420
+ ...a,
1421
+ ref: at(t, c.triggerRef),
1422
+ onPointerDown: b(e.onPointerDown, (s) => {
1423
+ !r && s.button === 0 && s.ctrlKey === !1 && (c.onOpenToggle(), c.open || s.preventDefault());
1424
+ }),
1425
+ onKeyDown: b(e.onKeyDown, (s) => {
1426
+ r || (["Enter", " "].includes(s.key) && c.onOpenToggle(), s.key === "ArrowDown" && c.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(s.key) && s.preventDefault());
1427
+ })
1428
+ }
1429
+ ) });
1430
+ }
1431
+ );
1432
+ an.displayName = on;
1433
+ var _o = "DropdownMenuPortal", cn = (e) => {
1434
+ const { __scopeDropdownMenu: t, ...n } = e, r = x(t);
1435
+ return /* @__PURE__ */ l(lo, { ...r, ...n });
1436
+ };
1437
+ cn.displayName = _o;
1438
+ var sn = "DropdownMenuContent", un = o.forwardRef(
1439
+ (e, t) => {
1440
+ const { __scopeDropdownMenu: n, ...r } = e, a = nn(sn, n), c = x(n), u = o.useRef(!1);
1441
+ return /* @__PURE__ */ l(
1442
+ fo,
1443
+ {
1444
+ id: a.contentId,
1445
+ "aria-labelledby": a.triggerId,
1446
+ ...c,
1447
+ ...r,
1448
+ ref: t,
1449
+ onCloseAutoFocus: b(e.onCloseAutoFocus, (s) => {
1450
+ var h;
1451
+ u.current || (h = a.triggerRef.current) == null || h.focus(), u.current = !1, s.preventDefault();
1452
+ }),
1453
+ onInteractOutside: b(e.onInteractOutside, (s) => {
1454
+ const h = s.detail.originalEvent, m = h.button === 0 && h.ctrlKey === !0, p = h.button === 2 || m;
1455
+ (!a.modal || p) && (u.current = !0);
1456
+ }),
1457
+ style: {
1458
+ ...e.style,
1459
+ "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
1460
+ "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
1461
+ "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
1462
+ "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
1463
+ "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
1464
+ }
1465
+ }
1466
+ );
1467
+ }
1468
+ );
1469
+ un.displayName = sn;
1470
+ var Po = "DropdownMenuGroup", ln = o.forwardRef(
1471
+ (e, t) => {
1472
+ const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1473
+ return /* @__PURE__ */ l(po, { ...a, ...r, ref: t });
1474
+ }
1475
+ );
1476
+ ln.displayName = Po;
1477
+ var Io = "DropdownMenuLabel", Ao = o.forwardRef(
1478
+ (e, t) => {
1479
+ const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1480
+ return /* @__PURE__ */ l(mo, { ...a, ...r, ref: t });
1481
+ }
1482
+ );
1483
+ Ao.displayName = Io;
1484
+ var xo = "DropdownMenuItem", dn = o.forwardRef(
1485
+ (e, t) => {
1486
+ const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1487
+ return /* @__PURE__ */ l(vo, { ...a, ...r, ref: t });
1488
+ }
1489
+ );
1490
+ dn.displayName = xo;
1491
+ var To = "DropdownMenuCheckboxItem", No = o.forwardRef((e, t) => {
1492
+ const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1493
+ return /* @__PURE__ */ l(ho, { ...a, ...r, ref: t });
1494
+ });
1495
+ No.displayName = To;
1496
+ var Do = "DropdownMenuRadioGroup", Oo = o.forwardRef((e, t) => {
1497
+ const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1498
+ return /* @__PURE__ */ l(go, { ...a, ...r, ref: t });
1499
+ });
1500
+ Oo.displayName = Do;
1501
+ var Fo = "DropdownMenuRadioItem", ko = o.forwardRef((e, t) => {
1502
+ const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1503
+ return /* @__PURE__ */ l(wo, { ...a, ...r, ref: t });
1504
+ });
1505
+ ko.displayName = Fo;
1506
+ var Lo = "DropdownMenuItemIndicator", Ko = o.forwardRef((e, t) => {
1507
+ const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1508
+ return /* @__PURE__ */ l(Co, { ...a, ...r, ref: t });
1509
+ });
1510
+ Ko.displayName = Lo;
1511
+ var Go = "DropdownMenuSeparator", fn = o.forwardRef((e, t) => {
1512
+ const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1513
+ return /* @__PURE__ */ l(Mo, { ...a, ...r, ref: t });
1514
+ });
1515
+ fn.displayName = Go;
1516
+ var $o = "DropdownMenuArrow", Uo = o.forwardRef(
1517
+ (e, t) => {
1518
+ const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1519
+ return /* @__PURE__ */ l(Eo, { ...a, ...r, ref: t });
1520
+ }
1521
+ );
1522
+ Uo.displayName = $o;
1523
+ var Bo = "DropdownMenuSubTrigger", Yo = o.forwardRef((e, t) => {
1524
+ const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1525
+ return /* @__PURE__ */ l(Ro, { ...a, ...r, ref: t });
1526
+ });
1527
+ Yo.displayName = Bo;
1528
+ var Ho = "DropdownMenuSubContent", Wo = o.forwardRef((e, t) => {
1529
+ const { __scopeDropdownMenu: n, ...r } = e, a = x(n);
1530
+ return /* @__PURE__ */ l(
1531
+ So,
1532
+ {
1533
+ ...a,
1534
+ ...r,
1535
+ ref: t,
1536
+ style: {
1537
+ ...e.style,
1538
+ "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
1539
+ "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
1540
+ "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
1541
+ "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
1542
+ "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
1543
+ }
1544
+ }
1545
+ );
1546
+ });
1547
+ Wo.displayName = Ho;
1548
+ var ta = rn, na = an, ra = cn, oa = un, aa = ln, ca = dn, sa = fn;
1549
+ export {
1550
+ oa as C,
1551
+ ut as F,
1552
+ aa as G,
1553
+ ca as I,
1554
+ ra as P,
1555
+ ta as R,
1556
+ sa as S,
1557
+ na as T,
1558
+ Dr as a,
1559
+ ct as b,
1560
+ Bn as u
1561
+ };