@pdf-viewer/react 1.8.0-beta.0 → 1.8.0-beta.1

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/{Popover-b7402893.js → Popover-1faa77f6.js} +80 -80
  2. package/dist/RPDefaultLayout-129bfdfc.js +3262 -0
  3. package/dist/assets/DropDown.css +1 -1
  4. package/dist/assets/Popover.css +1 -1
  5. package/dist/assets/RPDefaultLayout.css +1 -1
  6. package/dist/components/RPController.js +26 -19
  7. package/dist/components/RPPages.js +3 -2
  8. package/dist/components/RPProvider.js +9 -23
  9. package/dist/components/layout/LayoutContainer.js +3 -2
  10. package/dist/components/layout/RPDefaultLayout.js +2 -2
  11. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  12. package/dist/components/layout/sidebar/Thumbnail.js +4 -2
  13. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  14. package/dist/components/layout/toolbar/DocumentDialog.js +3 -2
  15. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  16. package/dist/components/layout/toolbar/MostPageTool.js +3 -2
  17. package/dist/components/layout/toolbar/OtherTool.js +1 -1
  18. package/dist/components/layout/toolbar/Paginate.js +1 -1
  19. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  20. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  21. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  22. package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
  23. package/dist/components/layout/toolbar/SearchTool.js +4 -3
  24. package/dist/components/layout/toolbar/ZoomTool.js +3 -2
  25. package/dist/components/page/AnnotationLayer.js +3 -2
  26. package/dist/components/page/CanvasLayer.js +3 -2
  27. package/dist/components/page/DualPage.js +1 -1
  28. package/dist/components/page/RPPage.js +3 -2
  29. package/dist/components/page/SinglePage.js +1 -1
  30. package/dist/components/page/TextHighlightLayer.js +3 -2
  31. package/dist/components/page/TextLayer.js +3 -2
  32. package/dist/components/ui/DropDown.js +10 -10
  33. package/dist/components/ui/LoadingIndicator.js +1 -1
  34. package/dist/components/ui/Popover.js +1 -1
  35. package/dist/contexts/DimensionPagesContext.js +27 -26
  36. package/dist/contexts/PaginationContext.js +1 -1
  37. package/dist/contexts/PrintContext.js +3 -3
  38. package/dist/contexts/RotationContext.js +21 -16
  39. package/dist/contexts/SearchContext.js +1 -1
  40. package/dist/contexts/SinglePageRotateContext.js +21 -0
  41. package/dist/contexts/ThumbnailsContext.js +1 -1
  42. package/dist/main.js +18 -16
  43. package/dist/{th_TH-4af60d36.js → th_TH-f515b3ad.js} +1 -1
  44. package/dist/types/components/layout/sidebar/Thumbnail.d.ts +1 -0
  45. package/dist/types/contexts/SinglePageRotateContext.d.ts +13 -0
  46. package/dist/types/locales/zh_CN.json.d.ts +2 -2
  47. package/dist/types/main.d.ts +2 -1
  48. package/dist/types/utils/hooks/useSinglePageRotate.d.ts +4 -0
  49. package/dist/types/utils/types.d.ts +5 -0
  50. package/dist/utils/getWordPositionInPage.js +21 -14
  51. package/dist/utils/hooks/useFileDownload.js +3 -2
  52. package/dist/utils/hooks/useLicense.js +1 -1
  53. package/dist/utils/hooks/useLocalization.js +1 -1
  54. package/dist/utils/hooks/usePaginate.js +3 -2
  55. package/dist/utils/hooks/usePresentPage.js +3 -2
  56. package/dist/utils/hooks/usePrint.js +3 -2
  57. package/dist/utils/hooks/useScrollToPage.js +3 -2
  58. package/dist/utils/hooks/useSearch.js +3 -2
  59. package/dist/utils/hooks/useSinglePageRotate.js +18 -0
  60. package/dist/utils/hooks/useThumbnail.js +3 -2
  61. package/dist/utils/hooks/useVirtualReactWindow.js +3 -2
  62. package/dist/utils/hooks/useWatermark.js +1 -1
  63. package/dist/utils/types.js +11 -10
  64. package/package.json +1 -1
  65. package/dist/RPDefaultLayout-f02500c9.js +0 -3205
@@ -1,9 +1,9 @@
1
1
  import { jsxs as _t, jsx as ie } from "react/jsx-runtime";
2
2
  import * as P from "react";
3
- import { useCallback as L, createContext as Y, useMemo as D, createElement as h, useContext as me, forwardRef as A, Children as _, isValidElement as k, cloneElement as V, Fragment as Be, useEffect as S, useRef as O, useState as N, useLayoutEffect as be, useReducer as Nt } from "react";
3
+ import { useCallback as L, createContext as Y, useMemo as D, createElement as h, useContext as be, forwardRef as A, Children as _, isValidElement as k, cloneElement as V, Fragment as Be, useEffect as S, useRef as O, useState as N, useLayoutEffect as me, useReducer as Nt } from "react";
4
4
  import Tt, { flushSync as Ue } from "react-dom";
5
5
  import { u as Dt, a as Ft, o as Rt, s as It, l as Lt, f as kt, b as Mt, c as Bt, h as Ut } from "./floating-ui.react-dom-15b9b819.js";
6
- import { c as Wt, _ as Ht, u as zt, a as K, f as Kt, z as Xt, s as Yt, b as jt, R as Vt, e as Zt, h as Gt } from "./component-1da194e8.js";
6
+ import { c as Wt, _ as zt, u as Ht, a as K, f as Kt, z as Xt, s as Yt, b as jt, R as Vt, e as Zt, h as Gt } from "./component-1da194e8.js";
7
7
  import { c as qt } from "./clsx-0c6e471a.js";
8
8
  import './assets/Popover.css';function x() {
9
9
  return x = Object.assign ? Object.assign.bind() : function(e) {
@@ -50,7 +50,7 @@ function Jt(e, t = []) {
50
50
  }, f);
51
51
  }
52
52
  function v(d, $) {
53
- const f = ($ == null ? void 0 : $[e][s]) || c, y = me(f);
53
+ const f = ($ == null ? void 0 : $[e][s]) || c, y = be(f);
54
54
  if (y)
55
55
  return y;
56
56
  if (i !== void 0)
@@ -230,12 +230,12 @@ const un = /* @__PURE__ */ Y({
230
230
  branches: /* @__PURE__ */ new Set()
231
231
  }), dn = /* @__PURE__ */ A((e, t) => {
232
232
  var n;
233
- const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: r, onPointerDownOutside: a, onFocusOutside: i, onInteractOutside: c, onDismiss: s, ...u } = e, v = me(un), [d, $] = N(null), f = (n = d == null ? void 0 : d.ownerDocument) !== null && n !== void 0 ? n : globalThis == null ? void 0 : globalThis.document, [, y] = N({}), l = Z(
233
+ const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: r, onPointerDownOutside: a, onFocusOutside: i, onInteractOutside: c, onDismiss: s, ...u } = e, v = be(un), [d, $] = N(null), f = (n = d == null ? void 0 : d.ownerDocument) !== null && n !== void 0 ? n : globalThis == null ? void 0 : globalThis.document, [, y] = N({}), l = Z(
234
234
  t,
235
235
  (w) => $(w)
236
- ), p = Array.from(v.layers), [m] = [
236
+ ), p = Array.from(v.layers), [b] = [
237
237
  ...v.layersWithOutsidePointerEventsDisabled
238
- ].slice(-1), E = p.indexOf(m), g = d ? p.indexOf(d) : -1, b = v.layersWithOutsidePointerEventsDisabled.size > 0, C = g >= E, R = fn((w) => {
238
+ ].slice(-1), E = p.indexOf(b), g = d ? p.indexOf(d) : -1, m = v.layersWithOutsidePointerEventsDisabled.size > 0, C = g >= E, R = fn((w) => {
239
239
  const F = w.target, G = [
240
240
  ...v.branches
241
241
  ].some(
@@ -273,7 +273,7 @@ const un = /* @__PURE__ */ Y({
273
273
  }, []), /* @__PURE__ */ h(oe.div, x({}, u, {
274
274
  ref: l,
275
275
  style: {
276
- pointerEvents: b ? C ? "auto" : "none" : void 0,
276
+ pointerEvents: m ? C ? "auto" : "none" : void 0,
277
277
  ...e.style
278
278
  },
279
279
  onFocusCapture: B(e.onFocusCapture, T.onFocusCapture),
@@ -288,7 +288,7 @@ function fn(e, t = globalThis == null ? void 0 : globalThis.document) {
288
288
  const a = (c) => {
289
289
  if (c.target && !o.current) {
290
290
  let u = function() {
291
- He(sn, n, s, {
291
+ ze(sn, n, s, {
292
292
  discrete: !0
293
293
  });
294
294
  };
@@ -318,7 +318,7 @@ function vn(e, t = globalThis == null ? void 0 : globalThis.document) {
318
318
  const n = Pe(e), o = O(!1);
319
319
  return S(() => {
320
320
  const r = (a) => {
321
- a.target && !o.current && He(ln, n, {
321
+ a.target && !o.current && ze(ln, n, {
322
322
  originalEvent: a
323
323
  }, {
324
324
  discrete: !1
@@ -337,7 +337,7 @@ function Ae() {
337
337
  const e = new CustomEvent(ve);
338
338
  document.dispatchEvent(e);
339
339
  }
340
- function He(e, t, n, { discrete: o }) {
340
+ function ze(e, t, n, { discrete: o }) {
341
341
  const r = n.originalEvent.target, a = new CustomEvent(e, {
342
342
  bubbles: !1,
343
343
  cancelable: !0,
@@ -396,24 +396,24 @@ const le = "focusScope.autoFocusOnMount", ue = "focusScope.autoFocusOnUnmount",
396
396
  let l = function(g) {
397
397
  if (f.paused || !c)
398
398
  return;
399
- const b = g.target;
400
- c.contains(b) ? d.current = b : I(d.current, {
399
+ const m = g.target;
400
+ c.contains(m) ? d.current = m : I(d.current, {
401
401
  select: !0
402
402
  });
403
403
  }, p = function(g) {
404
404
  if (f.paused || !c)
405
405
  return;
406
- const b = g.relatedTarget;
407
- b !== null && (c.contains(b) || I(d.current, {
406
+ const m = g.relatedTarget;
407
+ m !== null && (c.contains(m) || I(d.current, {
408
408
  select: !0
409
409
  }));
410
- }, m = function(g) {
411
- const b = document.activeElement;
410
+ }, b = function(g) {
411
+ const m = document.activeElement;
412
412
  for (const C of g)
413
- C.removedNodes.length > 0 && (c != null && c.contains(b) || I(c));
413
+ C.removedNodes.length > 0 && (c != null && c.contains(m) || I(c));
414
414
  };
415
415
  document.addEventListener("focusin", l), document.addEventListener("focusout", p);
416
- const E = new MutationObserver(m);
416
+ const E = new MutationObserver(b);
417
417
  return c && E.observe(c, {
418
418
  childList: !0,
419
419
  subtree: !0
@@ -430,15 +430,15 @@ const le = "focusScope.autoFocusOnMount", ue = "focusScope.autoFocusOnUnmount",
430
430
  Fe.add(f);
431
431
  const l = document.activeElement;
432
432
  if (!c.contains(l)) {
433
- const m = new CustomEvent(le, Te);
434
- c.addEventListener(le, u), c.dispatchEvent(m), m.defaultPrevented || (hn(yn(ze(c)), {
433
+ const b = new CustomEvent(le, Te);
434
+ c.addEventListener(le, u), c.dispatchEvent(b), b.defaultPrevented || (hn(yn(He(c)), {
435
435
  select: !0
436
436
  }), document.activeElement === l && I(c));
437
437
  }
438
438
  return () => {
439
439
  c.removeEventListener(le, u), setTimeout(() => {
440
- const m = new CustomEvent(ue, Te);
441
- c.addEventListener(ue, v), c.dispatchEvent(m), m.defaultPrevented || I(l ?? document.body, {
440
+ const b = new CustomEvent(ue, Te);
441
+ c.addEventListener(ue, v), c.dispatchEvent(b), b.defaultPrevented || I(l ?? document.body, {
442
442
  select: !0
443
443
  }), c.removeEventListener(ue, v), Fe.remove(f);
444
444
  }, 0);
@@ -453,14 +453,14 @@ const le = "focusScope.autoFocusOnMount", ue = "focusScope.autoFocusOnUnmount",
453
453
  const y = L((l) => {
454
454
  if (!n && !o || f.paused)
455
455
  return;
456
- const p = l.key === "Tab" && !l.altKey && !l.ctrlKey && !l.metaKey, m = document.activeElement;
457
- if (p && m) {
458
- const E = l.currentTarget, [g, b] = mn(E);
459
- g && b ? !l.shiftKey && m === b ? (l.preventDefault(), n && I(g, {
456
+ const p = l.key === "Tab" && !l.altKey && !l.ctrlKey && !l.metaKey, b = document.activeElement;
457
+ if (p && b) {
458
+ const E = l.currentTarget, [g, m] = bn(E);
459
+ g && m ? !l.shiftKey && b === m ? (l.preventDefault(), n && I(g, {
460
460
  select: !0
461
- })) : l.shiftKey && m === g && (l.preventDefault(), n && I(b, {
461
+ })) : l.shiftKey && b === g && (l.preventDefault(), n && I(m, {
462
462
  select: !0
463
- })) : m === E && l.preventDefault();
463
+ })) : b === E && l.preventDefault();
464
464
  }
465
465
  }, [
466
466
  n,
@@ -482,14 +482,14 @@ function hn(e, { select: t = !1 } = {}) {
482
482
  }), document.activeElement !== n)
483
483
  return;
484
484
  }
485
- function mn(e) {
486
- const t = ze(e), n = De(t, e), o = De(t.reverse(), e);
485
+ function bn(e) {
486
+ const t = He(e), n = De(t, e), o = De(t.reverse(), e);
487
487
  return [
488
488
  n,
489
489
  o
490
490
  ];
491
491
  }
492
- function ze(e) {
492
+ function He(e) {
493
493
  const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
494
494
  acceptNode: (o) => {
495
495
  const r = o.tagName === "INPUT" && o.type === "hidden";
@@ -502,12 +502,12 @@ function ze(e) {
502
502
  }
503
503
  function De(e, t) {
504
504
  for (const n of e)
505
- if (!bn(n, {
505
+ if (!mn(n, {
506
506
  upTo: t
507
507
  }))
508
508
  return n;
509
509
  }
510
- function bn(e, { upTo: t }) {
510
+ function mn(e, { upTo: t }) {
511
511
  if (getComputedStyle(e).visibility === "hidden")
512
512
  return !0;
513
513
  for (; e; ) {
@@ -555,7 +555,7 @@ function yn(e) {
555
555
  (t) => t.tagName !== "A"
556
556
  );
557
557
  }
558
- const wn = globalThis != null && globalThis.document ? be : () => {
558
+ const wn = globalThis != null && globalThis.document ? me : () => {
559
559
  }, En = P["useId".toString()] || (() => {
560
560
  });
561
561
  let Cn = 0;
@@ -598,7 +598,7 @@ function On(e, t = []) {
598
598
  }, f);
599
599
  }
600
600
  function v(d, $) {
601
- const f = ($ == null ? void 0 : $[e][s]) || c, y = me(f);
601
+ const f = ($ == null ? void 0 : $[e][s]) || c, y = be(f);
602
602
  if (y)
603
603
  return y;
604
604
  if (i !== void 0)
@@ -753,7 +753,7 @@ function Fn(e) {
753
753
  []
754
754
  );
755
755
  }
756
- const $e = globalThis != null && globalThis.document ? be : () => {
756
+ const $e = globalThis != null && globalThis.document ? me : () => {
757
757
  };
758
758
  function Rn(e) {
759
759
  const [t, n] = N(void 0);
@@ -803,15 +803,15 @@ const Ve = "Popper", [Ze, Ge] = On(Ve), [In, qe] = Ze(Ve), Ln = (e) => {
803
803
  }));
804
804
  }), Qe = "PopperContent", [Bn, Lo] = Ze(Qe), Un = /* @__PURE__ */ A((e, t) => {
805
805
  var n, o, r, a, i, c, s, u;
806
- const { __scopePopper: v, side: d = "bottom", sideOffset: $ = 0, align: f = "center", alignOffset: y = 0, arrowPadding: l = 0, collisionBoundary: p = [], collisionPadding: m = 0, sticky: E = "partial", hideWhenDetached: g = !1, avoidCollisions: b = !0, onPlaced: C, ...R } = e, T = qe(Qe, v), [w, F] = N(null), G = Xe(
806
+ const { __scopePopper: v, side: d = "bottom", sideOffset: $ = 0, align: f = "center", alignOffset: y = 0, arrowPadding: l = 0, collisionBoundary: p = [], collisionPadding: b = 0, sticky: E = "partial", hideWhenDetached: g = !1, avoidCollisions: m = !0, onPlaced: C, ...R } = e, T = qe(Qe, v), [w, F] = N(null), G = Xe(
807
807
  t,
808
808
  (ae) => F(ae)
809
- ), [M, dt] = N(null), U = Rn(M), ft = (n = U == null ? void 0 : U.width) !== null && n !== void 0 ? n : 0, Ee = (o = U == null ? void 0 : U.height) !== null && o !== void 0 ? o : 0, vt = d + (f !== "center" ? "-" + f : ""), pt = typeof m == "number" ? m : {
809
+ ), [M, dt] = N(null), U = Rn(M), ft = (n = U == null ? void 0 : U.width) !== null && n !== void 0 ? n : 0, Ee = (o = U == null ? void 0 : U.height) !== null && o !== void 0 ? o : 0, vt = d + (f !== "center" ? "-" + f : ""), pt = typeof b == "number" ? b : {
810
810
  top: 0,
811
811
  right: 0,
812
812
  bottom: 0,
813
813
  left: 0,
814
- ...m
814
+ ...b
815
815
  }, Ce = Array.isArray(p) ? p : [
816
816
  p
817
817
  ], $t = Ce.length > 0, ce = {
@@ -819,7 +819,7 @@ const Ve = "Popper", [Ze, Ge] = On(Ve), [In, qe] = Ze(Ve), Ln = (e) => {
819
819
  boundary: Ce.filter(Wn),
820
820
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
821
821
  altBoundary: $t
822
- }, { refs: ht, floatingStyles: xe, placement: mt, isPositioned: q, middlewareData: W } = Dt({
822
+ }, { refs: ht, floatingStyles: xe, placement: bt, isPositioned: q, middlewareData: W } = Dt({
823
823
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
824
824
  strategy: "fixed",
825
825
  placement: vt,
@@ -832,13 +832,13 @@ const Ve = "Popper", [Ze, Ge] = On(Ve), [In, qe] = Ze(Ve), Ln = (e) => {
832
832
  mainAxis: $ + Ee,
833
833
  alignmentAxis: y
834
834
  }),
835
- b && It({
835
+ m && It({
836
836
  mainAxis: !0,
837
837
  crossAxis: !1,
838
838
  limiter: E === "partial" ? Lt() : void 0,
839
839
  ...ce
840
840
  }),
841
- b && kt({
841
+ m && kt({
842
842
  ...ce
843
843
  }),
844
844
  Mt({
@@ -852,7 +852,7 @@ const Ve = "Popper", [Ze, Ge] = On(Ve), [In, qe] = Ze(Ve), Ln = (e) => {
852
852
  element: M,
853
853
  padding: l
854
854
  }),
855
- Hn({
855
+ zn({
856
856
  arrowWidth: ft,
857
857
  arrowHeight: Ee
858
858
  }),
@@ -860,7 +860,7 @@ const Ve = "Popper", [Ze, Ge] = On(Ve), [In, qe] = Ze(Ve), Ln = (e) => {
860
860
  strategy: "referenceHidden"
861
861
  })
862
862
  ]
863
- }), [Se, bt] = Je(mt), Q = Fn(C);
863
+ }), [Se, mt] = Je(bt), Q = Fn(C);
864
864
  $e(() => {
865
865
  q && (Q == null || Q());
866
866
  }, [
@@ -896,7 +896,7 @@ const Ve = "Popper", [Ze, Ge] = On(Ve), [In, qe] = Ze(Ve), Ln = (e) => {
896
896
  shouldHideArrow: yt
897
897
  }, /* @__PURE__ */ h(je.div, x({
898
898
  "data-side": Se,
899
- "data-align": bt
899
+ "data-align": mt
900
900
  }, R, {
901
901
  ref: G,
902
902
  style: {
@@ -912,7 +912,7 @@ const Ve = "Popper", [Ze, Ge] = On(Ve), [In, qe] = Ze(Ve), Ln = (e) => {
912
912
  function Wn(e) {
913
913
  return e !== null;
914
914
  }
915
- const Hn = (e) => ({
915
+ const zn = (e) => ({
916
916
  name: "transformOrigin",
917
917
  options: e,
918
918
  fn(t) {
@@ -921,12 +921,12 @@ const Hn = (e) => ({
921
921
  start: "0%",
922
922
  center: "50%",
923
923
  end: "100%"
924
- }[l], m = ((o = (r = u.arrow) === null || r === void 0 ? void 0 : r.x) !== null && o !== void 0 ? o : 0) + $ / 2, E = ((a = (i = u.arrow) === null || i === void 0 ? void 0 : i.y) !== null && a !== void 0 ? a : 0) + f / 2;
925
- let g = "", b = "";
926
- return y === "bottom" ? (g = d ? p : `${m}px`, b = `${-f}px`) : y === "top" ? (g = d ? p : `${m}px`, b = `${s.floating.height + f}px`) : y === "right" ? (g = `${-f}px`, b = d ? p : `${E}px`) : y === "left" && (g = `${s.floating.width + f}px`, b = d ? p : `${E}px`), {
924
+ }[l], b = ((o = (r = u.arrow) === null || r === void 0 ? void 0 : r.x) !== null && o !== void 0 ? o : 0) + $ / 2, E = ((a = (i = u.arrow) === null || i === void 0 ? void 0 : i.y) !== null && a !== void 0 ? a : 0) + f / 2;
925
+ let g = "", m = "";
926
+ return y === "bottom" ? (g = d ? p : `${b}px`, m = `${-f}px`) : y === "top" ? (g = d ? p : `${b}px`, m = `${s.floating.height + f}px`) : y === "right" ? (g = `${-f}px`, m = d ? p : `${E}px`) : y === "left" && (g = `${s.floating.width + f}px`, m = d ? p : `${E}px`), {
927
927
  data: {
928
928
  x: g,
929
- y: b
929
+ y: m
930
930
  }
931
931
  };
932
932
  }
@@ -938,13 +938,13 @@ function Je(e) {
938
938
  n
939
939
  ];
940
940
  }
941
- const zn = Ln, Kn = Mn, Xn = Un, Yn = /* @__PURE__ */ A((e, t) => {
941
+ const Hn = Ln, Kn = Mn, Xn = Un, Yn = /* @__PURE__ */ A((e, t) => {
942
942
  var n;
943
943
  const { container: o = globalThis == null || (n = globalThis.document) === null || n === void 0 ? void 0 : n.body, ...r } = e;
944
944
  return o ? /* @__PURE__ */ Tt.createPortal(/* @__PURE__ */ h(oe.div, x({}, r, {
945
945
  ref: t
946
946
  })), o) : null;
947
- }), Ie = globalThis != null && globalThis.document ? be : () => {
947
+ }), Ie = globalThis != null && globalThis.document ? me : () => {
948
948
  };
949
949
  function jn(e, t) {
950
950
  return Nt((n, o) => {
@@ -1070,12 +1070,12 @@ var tt = Wt(), de = function() {
1070
1070
  onScrollCapture: de,
1071
1071
  onWheelCapture: de,
1072
1072
  onTouchMoveCapture: de
1073
- }), r = o[0], a = o[1], i = e.forwardProps, c = e.children, s = e.className, u = e.removeScrollBar, v = e.enabled, d = e.shards, $ = e.sideCar, f = e.noIsolation, y = e.inert, l = e.allowPinchZoom, p = e.as, m = p === void 0 ? "div" : p, E = Ht(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), g = $, b = zt([n, t]), C = K(K({}, E), r);
1073
+ }), r = o[0], a = o[1], i = e.forwardProps, c = e.children, s = e.className, u = e.removeScrollBar, v = e.enabled, d = e.shards, $ = e.sideCar, f = e.noIsolation, y = e.inert, l = e.allowPinchZoom, p = e.as, b = p === void 0 ? "div" : p, E = zt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), g = $, m = Ht([n, t]), C = K(K({}, E), r);
1074
1074
  return P.createElement(
1075
1075
  P.Fragment,
1076
1076
  null,
1077
1077
  v && P.createElement(g, { sideCar: tt, removeScrollBar: u, shards: d, noIsolation: f, inert: y, setCallbacks: a, allowPinchZoom: !!l, lockRef: n }),
1078
- i ? P.cloneElement(P.Children.only(c), K(K({}, C), { ref: b })) : P.createElement(m, K({}, C, { className: s, ref: b }), c)
1078
+ i ? P.cloneElement(P.Children.only(c), K(K({}, C), { ref: m })) : P.createElement(b, K({}, C, { className: s, ref: m }), c)
1079
1079
  );
1080
1080
  });
1081
1081
  re.defaultProps = {
@@ -1099,7 +1099,7 @@ if (typeof window < "u")
1099
1099
  } catch {
1100
1100
  he = !1;
1101
1101
  }
1102
- var H = he ? { passive: !1 } : !1, qn = function(e) {
1102
+ var z = he ? { passive: !1 } : !1, qn = function(e) {
1103
1103
  return e.tagName === "TEXTAREA";
1104
1104
  }, nt = function(e, t) {
1105
1105
  var n = window.getComputedStyle(e);
@@ -1148,8 +1148,8 @@ var H = he ? { passive: !1 } : !1, qn = function(e) {
1148
1148
  }, oo = function(e, t, n, o, r) {
1149
1149
  var a = no(e, window.getComputedStyle(t).direction), i = a * o, c = n.target, s = t.contains(c), u = !1, v = i > 0, d = 0, $ = 0;
1150
1150
  do {
1151
- var f = rt(e, c), y = f[0], l = f[1], p = f[2], m = l - p - a * y;
1152
- (y || m) && ot(e, c) && (d += m, $ += y), c = c.parentNode;
1151
+ var f = rt(e, c), y = f[0], l = f[1], p = f[2], b = l - p - a * y;
1152
+ (y || b) && ot(e, c) && (d += b, $ += y), c = c.parentNode;
1153
1153
  } while (
1154
1154
  // portaled content
1155
1155
  !s && c !== document.body || // self content
@@ -1169,7 +1169,7 @@ var H = he ? { passive: !1 } : !1, qn = function(e) {
1169
1169
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
1170
1170
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
1171
1171
  `);
1172
- }, ao = 0, z = [];
1172
+ }, ao = 0, H = [];
1173
1173
  function io(e) {
1174
1174
  var t = P.useRef([]), n = P.useRef([0, 0]), o = P.useRef(), r = P.useState(ao++)[0], a = P.useState(function() {
1175
1175
  return Yt();
@@ -1192,7 +1192,7 @@ function io(e) {
1192
1192
  var c = P.useCallback(function(l, p) {
1193
1193
  if ("touches" in l && l.touches.length === 2)
1194
1194
  return !i.current.allowPinchZoom;
1195
- var m = ne(l), E = n.current, g = "deltaX" in l ? l.deltaX : E[0] - m[0], b = "deltaY" in l ? l.deltaY : E[1] - m[1], C, R = l.target, T = Math.abs(g) > Math.abs(b) ? "h" : "v";
1195
+ var b = ne(l), E = n.current, g = "deltaX" in l ? l.deltaX : E[0] - b[0], m = "deltaY" in l ? l.deltaY : E[1] - b[1], C, R = l.target, T = Math.abs(g) > Math.abs(m) ? "h" : "v";
1196
1196
  if ("touches" in l && T === "h" && R.type === "range")
1197
1197
  return !1;
1198
1198
  var w = Le(T, R);
@@ -1200,15 +1200,15 @@ function io(e) {
1200
1200
  return !0;
1201
1201
  if (w ? C = T : (C = T === "v" ? "h" : "v", w = Le(T, R)), !w)
1202
1202
  return !1;
1203
- if (!o.current && "changedTouches" in l && (g || b) && (o.current = C), !C)
1203
+ if (!o.current && "changedTouches" in l && (g || m) && (o.current = C), !C)
1204
1204
  return !0;
1205
1205
  var F = o.current || C;
1206
- return oo(F, p, l, F === "h" ? g : b, !0);
1206
+ return oo(F, p, l, F === "h" ? g : m, !0);
1207
1207
  }, []), s = P.useCallback(function(l) {
1208
1208
  var p = l;
1209
- if (!(!z.length || z[z.length - 1] !== a)) {
1210
- var m = "deltaY" in p ? ke(p) : ne(p), E = t.current.filter(function(C) {
1211
- return C.name === p.type && C.target === p.target && ro(C.delta, m);
1209
+ if (!(!H.length || H[H.length - 1] !== a)) {
1210
+ var b = "deltaY" in p ? ke(p) : ne(p), E = t.current.filter(function(C) {
1211
+ return C.name === p.type && C.target === p.target && ro(C.delta, b);
1212
1212
  })[0];
1213
1213
  if (E && E.should) {
1214
1214
  p.cancelable && p.preventDefault();
@@ -1217,15 +1217,15 @@ function io(e) {
1217
1217
  if (!E) {
1218
1218
  var g = (i.current.shards || []).map(Me).filter(Boolean).filter(function(C) {
1219
1219
  return C.contains(p.target);
1220
- }), b = g.length > 0 ? c(p, g[0]) : !i.current.noIsolation;
1221
- b && p.cancelable && p.preventDefault();
1220
+ }), m = g.length > 0 ? c(p, g[0]) : !i.current.noIsolation;
1221
+ m && p.cancelable && p.preventDefault();
1222
1222
  }
1223
1223
  }
1224
- }, []), u = P.useCallback(function(l, p, m, E) {
1225
- var g = { name: l, delta: p, target: m, should: E };
1224
+ }, []), u = P.useCallback(function(l, p, b, E) {
1225
+ var g = { name: l, delta: p, target: b, should: E };
1226
1226
  t.current.push(g), setTimeout(function() {
1227
- t.current = t.current.filter(function(b) {
1228
- return b !== g;
1227
+ t.current = t.current.filter(function(m) {
1228
+ return m !== g;
1229
1229
  });
1230
1230
  }, 1);
1231
1231
  }, []), v = P.useCallback(function(l) {
@@ -1236,14 +1236,14 @@ function io(e) {
1236
1236
  u(l.type, ne(l), l.target, c(l, e.lockRef.current));
1237
1237
  }, []);
1238
1238
  P.useEffect(function() {
1239
- return z.push(a), e.setCallbacks({
1239
+ return H.push(a), e.setCallbacks({
1240
1240
  onScrollCapture: d,
1241
1241
  onWheelCapture: d,
1242
1242
  onTouchMoveCapture: $
1243
- }), document.addEventListener("wheel", s, H), document.addEventListener("touchmove", s, H), document.addEventListener("touchstart", v, H), function() {
1244
- z = z.filter(function(l) {
1243
+ }), document.addEventListener("wheel", s, z), document.addEventListener("touchmove", s, z), document.addEventListener("touchstart", v, z), function() {
1244
+ H = H.filter(function(l) {
1245
1245
  return l !== a;
1246
- }), document.removeEventListener("wheel", s, H), document.removeEventListener("touchmove", s, H), document.removeEventListener("touchstart", v, H);
1246
+ }), document.removeEventListener("wheel", s, z), document.removeEventListener("touchmove", s, z), document.removeEventListener("touchstart", v, z);
1247
1247
  };
1248
1248
  }, []);
1249
1249
  var f = e.removeScrollBar, y = e.inert;
@@ -1267,7 +1267,7 @@ const lo = ct, at = "Popover", [it, ko] = Jt(at, [
1267
1267
  defaultProp: r,
1268
1268
  onChange: a
1269
1269
  });
1270
- return /* @__PURE__ */ h(zn, c, /* @__PURE__ */ h(uo, {
1270
+ return /* @__PURE__ */ h(Hn, c, /* @__PURE__ */ h(uo, {
1271
1271
  scope: t,
1272
1272
  contentId: xn(),
1273
1273
  triggerRef: s,
@@ -1308,7 +1308,7 @@ const lo = ct, at = "Popover", [it, ko] = Jt(at, [
1308
1308
  }, a), c);
1309
1309
  }), st = "PopoverPortal", [$o, ho] = it(st, {
1310
1310
  forceMount: void 0
1311
- }), mo = (e) => {
1311
+ }), bo = (e) => {
1312
1312
  const { __scopePopover: t, forceMount: n, children: o, container: r } = e, a = X(st, t);
1313
1313
  return /* @__PURE__ */ h($o, {
1314
1314
  scope: t,
@@ -1319,7 +1319,7 @@ const lo = ct, at = "Popover", [it, ko] = Jt(at, [
1319
1319
  asChild: !0,
1320
1320
  container: r
1321
1321
  }, o)));
1322
- }, j = "PopoverContent", bo = /* @__PURE__ */ A((e, t) => {
1322
+ }, j = "PopoverContent", mo = /* @__PURE__ */ A((e, t) => {
1323
1323
  const n = ho(j, e.__scopePopover), { forceMount: o = n.forceMount, ...r } = e, a = X(j, e.__scopePopover);
1324
1324
  return /* @__PURE__ */ h(ye, {
1325
1325
  present: o || a.open
@@ -1415,13 +1415,13 @@ const lo = ct, at = "Popover", [it, ko] = Jt(at, [
1415
1415
  function ut(e) {
1416
1416
  return e ? "open" : "closed";
1417
1417
  }
1418
- const yo = fo, wo = po, Eo = mo, Co = bo, xo = "_slideDownAndFade_18ma9_1", So = "_slideLeftAndFade_18ma9_1", Oo = "_slideUpAndFade_18ma9_1", Ao = "_slideRightAndFade_18ma9_1", _o = {
1419
- "rp-popover-content": "_rp-popover-content_18ma9_1",
1418
+ const yo = fo, wo = po, Eo = bo, Co = mo, xo = "_slideDownAndFade_v492z_1", So = "_slideLeftAndFade_v492z_1", Oo = "_slideUpAndFade_v492z_1", Ao = "_slideRightAndFade_v492z_1", _o = {
1419
+ "rp-popover-content": "_rp-popover-content_v492z_1",
1420
1420
  slideDownAndFade: xo,
1421
1421
  slideLeftAndFade: So,
1422
1422
  slideUpAndFade: Oo,
1423
1423
  slideRightAndFade: Ao,
1424
- "rp-popover-arrow": "_rp-popover-arrow_18ma9_31"
1424
+ "rp-popover-arrow": "_rp-popover-arrow_v492z_31"
1425
1425
  }, Mo = (e) => {
1426
1426
  const { triggerComponent: t, children: n, container: o, className: r, open: a, ...i } = e;
1427
1427
  return /* @__PURE__ */ _t(yo, { modal: !1, open: a, children: [