@pdf-viewer/react 1.1.0-rc.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/{RPDefaultLayout-69712c15.js → RPDefaultLayout-651c2426.js} +133 -133
  2. package/dist/components/RPConfig.js +318 -340
  3. package/dist/components/RPController.js +1 -1
  4. package/dist/components/RPPages.js +1 -1
  5. package/dist/components/RPProvider.js +1 -1
  6. package/dist/components/layout/RPDefaultLayout.js +1 -1
  7. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  8. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  9. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  10. package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
  11. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  12. package/dist/components/layout/toolbar/MenuItem.js +1 -1
  13. package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
  14. package/dist/components/layout/toolbar/MostPageTool.js +2 -2
  15. package/dist/components/layout/toolbar/OtherTool.js +2 -2
  16. package/dist/components/layout/toolbar/Paginate.js +1 -1
  17. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  18. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  19. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  20. package/dist/components/layout/toolbar/RotateTool.js +1 -1
  21. package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
  22. package/dist/components/layout/toolbar/SearchTool.js +1 -1
  23. package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
  24. package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
  25. package/dist/components/layout/toolbar/ZoomTool.js +2 -2
  26. package/dist/components/page/AnnotationLayer.js +1 -1
  27. package/dist/components/page/CanvasLayer.js +1 -1
  28. package/dist/components/page/DualPage.js +1 -1
  29. package/dist/components/page/RPPage.js +1 -1
  30. package/dist/components/page/SinglePage.js +1 -1
  31. package/dist/components/page/TextLayer.js +1 -1
  32. package/dist/components/ui/Checkbox.js +252 -92
  33. package/dist/components/ui/DropDown.js +1 -1
  34. package/dist/components/ui/LoadingIndicator.js +1 -1
  35. package/dist/components/ui/RPTooltip.js +961 -224
  36. package/dist/contexts/PaginationContext.js +1 -1
  37. package/dist/contexts/PrintContext.js +1 -1
  38. package/dist/contexts/SearchContext.js +1 -1
  39. package/dist/contexts/ThumbnailsContext.js +1 -1
  40. package/dist/floating-ui.react-dom-e6d5fe8f.js +1327 -0
  41. package/dist/index-316854c1.js +2299 -0
  42. package/dist/index-71898eb9.js +139 -0
  43. package/dist/main.js +1 -1
  44. package/dist/utils/hooks/useFileDownload.js +1 -1
  45. package/dist/utils/hooks/useGrabScroll.js +17 -18
  46. package/dist/utils/hooks/useLicense.js +40 -32
  47. package/dist/utils/hooks/usePaginate.js +1 -1
  48. package/dist/utils/hooks/usePrint.js +1 -1
  49. package/dist/utils/hooks/useScrollToPage.js +1 -1
  50. package/dist/utils/hooks/useSearch.js +1 -1
  51. package/dist/utils/hooks/useThumbnail.js +1 -1
  52. package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
  53. package/package.json +1 -1
  54. package/dist/index-1db49c1a.js +0 -1664
  55. package/dist/index-3dff3fa8.js +0 -307
  56. package/dist/index-4f17fe4d.js +0 -1657
@@ -52,12 +52,12 @@ import { getThumbnailViewport as Rt } from "./utils/getThumbnailViewport.js";
52
52
  import { useDimensionPages as Cr } from "./utils/hooks/useDimensionPages.js";
53
53
  import { appConsole as Tr } from "./utils/appConsole.js";
54
54
  import { FileUploadTool as nn } from "./components/layout/toolbar/FileUploadTool.js";
55
- import { DarkModeTool as Pr } from "./components/layout/toolbar/DarkModeTool.js";
56
- import { ThreeDotIcon as Sr } from "./components/icons/ThreeDotIcon.js";
55
+ import { DarkModeTool as Sr } from "./components/layout/toolbar/DarkModeTool.js";
56
+ import { ThreeDotIcon as Pr } from "./components/icons/ThreeDotIcon.js";
57
57
  import { UIDropDown as vt } from "./components/ui/DropDown.js";
58
- import { c as Ir, a as _t, P as Ae, b as Ee, d as wt, i as yr, k as xr, u as Rr } from "./index-3dff3fa8.js";
59
- import { D as Lr, u as Qe } from "./index-4f17fe4d.js";
60
- import { a as Nr, h as Mr, u as Er, F as Or, b as Dr, G as Ge } from "./index-1db49c1a.js";
58
+ import { u as _t, a as Ae, c as Ee, b as wt, d as Ir, e as yr, h as xr, f as Rr, F as Lr, D as Nr, g as Mr, G as Ge } from "./index-316854c1.js";
59
+ import { c as Er, e as Or, b as Dr } from "./index-71898eb9.js";
60
+ import { e as Qe } from "./floating-ui.react-dom-e6d5fe8f.js";
61
61
  import { CloseIcon as rn } from "./components/icons/CloseIcon.js";
62
62
  import { PropertyItem as Ar } from "./components/layout/toolbar/PropertyItem.js";
63
63
  import { useOtherToolContext as zr, OtherToolProvider as Fr } from "./contexts/OtherToolContext.js";
@@ -85,10 +85,10 @@ import './assets/RPDefaultLayout.css';const an = () => {
85
85
  }, [n]), E(() => {
86
86
  m.current = t, u.current = e;
87
87
  }, [t, e]);
88
- const f = R((b, P, C) => {
88
+ const f = R((b, S, C) => {
89
89
  c.current && cancelAnimationFrame(c.current), c.current = requestAnimationFrame(() => {
90
90
  b.scrollTo({
91
- left: P,
91
+ left: S,
92
92
  top: C,
93
93
  behavior: "instant"
94
94
  });
@@ -97,8 +97,8 @@ import './assets/RPDefaultLayout.css';const an = () => {
97
97
  (b) => {
98
98
  if (!o)
99
99
  return;
100
- const P = Math.ceil(b / 2) * 2 - 1;
101
- b === P + 1 ? f(o, p[P], 0) : f(o, 0, 0);
100
+ const S = Math.ceil(b / 2) * 2 - 1;
101
+ b === S + 1 ? f(o, p[S], 0) : f(o, 0, 0);
102
102
  },
103
103
  [o, p, f]
104
104
  );
@@ -109,8 +109,8 @@ import './assets/RPDefaultLayout.css';const an = () => {
109
109
  }, [l]);
110
110
  const v = R(
111
111
  (b) => {
112
- const P = b - 1;
113
- let C = P, y = 0;
112
+ const S = b - 1;
113
+ let C = S, y = 0;
114
114
  if (u.current === $e.DUAL_PAGE && m.current === X.PAGE_SCROLLING) {
115
115
  w(b);
116
116
  return;
@@ -123,13 +123,13 @@ import './assets/RPDefaultLayout.css';const an = () => {
123
123
  return;
124
124
  const d = r;
125
125
  if (m.current === X.HORIZONTAL_SCROLLING) {
126
- y = P;
127
- const T = P * (p[P] ?? 0);
126
+ y = S;
127
+ const T = S * (p[S] ?? 0);
128
128
  f(d, T, 0);
129
129
  } else if (u.current === $e.DUAL_PAGE) {
130
- y = P % 2, C = Math.floor(P / 2);
131
- const _ = C * (h[C] ?? 0), S = y * (p[y] ?? 0);
132
- f(d, S, _);
130
+ y = S % 2, C = Math.floor(S / 2);
131
+ const _ = C * (h[C] ?? 0), P = y * (p[y] ?? 0);
132
+ f(d, P, _);
133
133
  } else {
134
134
  const T = C * (h[C] ?? 0);
135
135
  f(d, 0, T);
@@ -153,8 +153,8 @@ import './assets/RPDefaultLayout.css';const an = () => {
153
153
  (v) => {
154
154
  if (!/^[0-9]*$/g.test(v.toString()) || !v)
155
155
  return { success: !1, currentPage: i.current };
156
- const P = +v;
157
- return P < 0 || P > r ? { success: !1, currentPage: i.current } : (n(P), i.current = P, { success: !0, currentPage: +v });
156
+ const S = +v;
157
+ return S < 0 || S > r ? { success: !1, currentPage: i.current } : (n(S), i.current = S, { success: !0, currentPage: +v });
158
158
  },
159
159
  [r]
160
160
  ), u = R(m, [m]), g = R(
@@ -241,7 +241,7 @@ const Xr = () => {
241
241
  pageNumber: d,
242
242
  viewerPdfPage: T,
243
243
  printResolution: _,
244
- optionalContentConfigPromise: S,
244
+ optionalContentConfigPromise: P,
245
245
  printAnnotationStoragePromise: A
246
246
  }) => {
247
247
  if (h.current) {
@@ -266,7 +266,7 @@ const Xr = () => {
266
266
  viewport: x.getViewport({ scale: 1, rotation: T.rotation }),
267
267
  intent: "print",
268
268
  annotationMode: rr.ENABLE_STORAGE,
269
- optionalContentConfigPromise: S,
269
+ optionalContentConfigPromise: P,
270
270
  printAnnotationStorage: L
271
271
  };
272
272
  try {
@@ -277,9 +277,9 @@ const Xr = () => {
277
277
  }, w = R(() => {
278
278
  const C = window.print;
279
279
  return new Promise((y) => {
280
- const d = (S) => {
280
+ const d = (P) => {
281
281
  setTimeout(() => {
282
- C.call(window), setTimeout(() => S(), 20);
282
+ C.call(window), setTimeout(() => P(), 20);
283
283
  }, 0);
284
284
  };
285
285
  if (document.querySelector(".rp-print-zone")) {
@@ -294,8 +294,8 @@ const Xr = () => {
294
294
  }, []), v = async (C) => {
295
295
  const y = document.createElement("img"), d = document.createElement("div");
296
296
  return d.classList.add("rp-print-page"), await new Promise((T, _) => {
297
- C.toBlob((S) => {
298
- S ? (y.src = URL.createObjectURL(S), y.onload = () => {
297
+ C.toBlob((P) => {
298
+ P ? (y.src = URL.createObjectURL(P), y.onload = () => {
299
299
  URL.revokeObjectURL(y.src), T();
300
300
  }, y.onerror = _) : _(new Error("Failed to create blob"));
301
301
  });
@@ -306,11 +306,11 @@ const Xr = () => {
306
306
  d.classList.add("rp-print-zone");
307
307
  const T = document.createElement("style"), _ = y.get(1);
308
308
  if (_) {
309
- const { width: S, height: A } = _ == null ? void 0 : _.page.getViewport({ scale: 1 });
310
- T.innerHTML = `@page { size: ${S}px ${A}px }`;
309
+ const { width: P, height: A } = _ == null ? void 0 : _.page.getViewport({ scale: 1 });
310
+ T.innerHTML = `@page { size: ${P}px ${A}px }`;
311
311
  }
312
312
  return d.appendChild(T), d.append(...C), d;
313
- }, P = R(async () => {
313
+ }, S = R(async () => {
314
314
  if (!e)
315
315
  return;
316
316
  u();
@@ -319,7 +319,7 @@ const Xr = () => {
319
319
  e.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
320
320
  const T = e.getOptionalContentConfig({ intent: "print" }), _ = Promise.resolve(
321
321
  e.annotationStorage.print ?? void 0
322
- ), S = t.size;
322
+ ), P = t.size;
323
323
  for (const [I, N] of t) {
324
324
  if (h.current) {
325
325
  u();
@@ -340,10 +340,10 @@ const Xr = () => {
340
340
  }
341
341
  const L = await v(C);
342
342
  y.push(L);
343
- const M = parseFloat((y.length / S * 100).toFixed(2));
343
+ const M = parseFloat((y.length / P * 100).toFixed(2));
344
344
  r({
345
345
  loadedPages: I,
346
- totalPages: S,
346
+ totalPages: P,
347
347
  percentage: M
348
348
  });
349
349
  }
@@ -367,7 +367,7 @@ const Xr = () => {
367
367
  window.removeEventListener("afterprint", C, !0);
368
368
  };
369
369
  }, [m, u]), {
370
- print: P,
370
+ print: S,
371
371
  cancel: g,
372
372
  progress: n,
373
373
  isComplete: o,
@@ -528,7 +528,7 @@ const Xr = () => {
528
528
  }
529
529
  );
530
530
  }, Yr = (e = {}, t = "") => {
531
- const [n, r] = H(t), [o, s] = H(!1), { pdf: i, pages: c } = Y(), l = en(), p = W(!n), { currentZoom: h } = Be(), [m, u] = H([]), { setFocusedPage: g } = oe(), [f, w] = H(0), { pageScrollElementRef: v, virtualScrollableElementRef: b } = Xe(), { scrollMode: P } = Le(), { pagesRef: C } = be(), [y, d] = H(null), T = W({}), _ = z(() => f === 0 ? null : m[f - 1], [f, m]), S = z(() => m.length, [m]);
531
+ const [n, r] = H(t), [o, s] = H(!1), { pdf: i, pages: c } = Y(), l = en(), p = W(!n), { currentZoom: h } = Be(), [m, u] = H([]), { setFocusedPage: g } = oe(), [f, w] = H(0), { pageScrollElementRef: v, virtualScrollableElementRef: b } = Xe(), { scrollMode: S } = Le(), { pagesRef: C } = be(), [y, d] = H(null), T = W({}), _ = z(() => f === 0 ? null : m[f - 1], [f, m]), P = z(() => m.length, [m]);
532
532
  E(() => {
533
533
  if (!_ || !c)
534
534
  return;
@@ -537,7 +537,7 @@ const Xr = () => {
537
537
  return;
538
538
  const L = c.get(_.page), M = C.clientHeight / 2, D = C.clientWidth / 2;
539
539
  let F = 0, G = 0;
540
- P === X.PAGE_SCROLLING && g(_.page), P === X.VERTICAL_SCROLLING && (F = l.heights.slice(0, _.page - 1).reduce((Z, B) => Z + B, 0)), P === X.HORIZONTAL_SCROLLING && (G = l.widths.slice(0, _.page - 1).reduce((Z, B) => Z + B, 0));
540
+ S === X.PAGE_SCROLLING && g(_.page), S === X.VERTICAL_SCROLLING && (F = l.heights.slice(0, _.page - 1).reduce((Z, B) => Z + B, 0)), S === X.HORIZONTAL_SCROLLING && (G = l.widths.slice(0, _.page - 1).reduce((Z, B) => Z + B, 0));
541
541
  let U;
542
542
  if (!L)
543
543
  return;
@@ -549,7 +549,7 @@ const Xr = () => {
549
549
  }), U.render().then(() => {
550
550
  const Z = U.textDivs[_.start.idx], [B] = Yt([_], q, U.textDivs), le = l.widths[_.page - 1], ue = l.heights[_.page - 1], ee = document.createElement("div"), K = document.createElement("div");
551
551
  Z.style.position = "absolute", Z.style.color = "transparent", K.style.position = "absolute", K.style.top = "0", K.style.setProperty("--scale-factor", `${h}`), ee.style.position = "relative", ee.style.width = `${le}px`, ee.style.height = `${ue}px`, ee.style.zIndex = "-1", ee.appendChild(Z), K.appendChild(ee), C.prepend(K);
552
- const ae = B.element.getBoundingClientRect(), Te = K.getBoundingClientRect(), ve = ae.top - Te.top, Pe = ae.left - Te.left, de = F + ve - M + ae.height / 2, pe = G + Pe - D + ae.width / 2, k = {
552
+ const ae = B.element.getBoundingClientRect(), Te = K.getBoundingClientRect(), ve = ae.top - Te.top, Se = ae.left - Te.left, de = F + ve - M + ae.height / 2, pe = G + Se - D + ae.width / 2, k = {
553
553
  left: Math.max(pe, 0),
554
554
  top: Math.max(de, 0)
555
555
  };
@@ -562,16 +562,16 @@ const Xr = () => {
562
562
  g,
563
563
  l,
564
564
  _,
565
- P,
565
+ S,
566
566
  b,
567
567
  v,
568
568
  C
569
569
  ]);
570
570
  const A = R(() => {
571
- w((x) => S ? x + 1 > S ? 1 : x + 1 : 0);
572
- }, [S]), I = R(() => {
573
- w((x) => S ? x - 1 <= 0 ? S : x - 1 : 0);
574
- }, [S]), N = R(async (x) => {
571
+ w((x) => P ? x + 1 > P ? 1 : x + 1 : 0);
572
+ }, [P]), I = R(() => {
573
+ w((x) => P ? x - 1 <= 0 ? P : x - 1 : 0);
574
+ }, [P]), N = R(async (x) => {
575
575
  if (!x)
576
576
  return {};
577
577
  const L = x.numPages, M = {};
@@ -608,7 +608,7 @@ const Xr = () => {
608
608
  setSearch: r,
609
609
  loading: o,
610
610
  matches: m,
611
- totalMatches: S,
611
+ totalMatches: P,
612
612
  currentMatchPosition: f,
613
613
  currentMatch: _,
614
614
  nextMatch: A,
@@ -742,8 +742,8 @@ const Xr = () => {
742
742
  }), h.current = w, r.current && (r.current.innerText = ""), p.current.render();
743
743
  }).then(() => {
744
744
  var b;
745
- [].slice.call(r.current.children).forEach((P) => {
746
- P.classList.add(tt["rp-text-layer-text"]);
745
+ [].slice.call(r.current.children).forEach((S) => {
746
+ S.classList.add(tt["rp-text-layer-text"]);
747
747
  });
748
748
  const v = (b = p.current) == null ? void 0 : b.textDivs;
749
749
  v && h.current && g(h.current, v);
@@ -908,8 +908,8 @@ const co = (e) => {
908
908
  return;
909
909
  }
910
910
  for (const b of i) {
911
- const { annotationType: P } = b;
912
- switch (P) {
911
+ const { annotationType: S } = b;
912
+ switch (S) {
913
913
  case lt.Link:
914
914
  so(b);
915
915
  break;
@@ -927,12 +927,12 @@ const co = (e) => {
927
927
  page: m.page,
928
928
  viewport: w.clone({ dontFlip: !0 })
929
929
  }), n.current && Ot(n.current, f);
930
- const b = await (o == null ? void 0 : o.hasJSActions()), P = await (o == null ? void 0 : o.getFieldObjects());
930
+ const b = await (o == null ? void 0 : o.hasJSActions()), S = await (o == null ? void 0 : o.getFieldObjects());
931
931
  return s.current.render({
932
932
  annotations: i,
933
933
  annotationStorage: g,
934
934
  hasJSActions: b,
935
- fieldObjects: P,
935
+ fieldObjects: S,
936
936
  div: n.current,
937
937
  viewport: w.clone({ dontFlip: !0 }),
938
938
  page: m.page,
@@ -979,7 +979,7 @@ const co = (e) => {
979
979
  }
980
980
  }, [c, f]), b = R(() => {
981
981
  u(!0);
982
- }, []), P = R(() => {
982
+ }, []), S = R(() => {
983
983
  u(!1);
984
984
  }, []);
985
985
  return E(() => {
@@ -1015,7 +1015,7 @@ const co = (e) => {
1015
1015
  },
1016
1016
  className: et["rp-page"],
1017
1017
  children: [
1018
- /* @__PURE__ */ a(Qr, { onLoading: b, onLoaded: P, pageNumber: n }),
1018
+ /* @__PURE__ */ a(Qr, { onLoading: b, onLoaded: S, pageNumber: n }),
1019
1019
  m && /* @__PURE__ */ a("div", { className: et["rp-loader-wrapper"], children: /* @__PURE__ */ a(De, {}) }),
1020
1020
  l && /* @__PURE__ */ a(eo, { pageNumber: n }),
1021
1021
  /* @__PURE__ */ a(co, { pageNumber: n })
@@ -1078,7 +1078,7 @@ function zt(e, t) {
1078
1078
  var n = {};
1079
1079
  for (var r in e)
1080
1080
  if ({}.hasOwnProperty.call(e, r)) {
1081
- if (t.indexOf(r) !== -1)
1081
+ if (t.includes(r))
1082
1082
  continue;
1083
1083
  n[r] = e[r];
1084
1084
  }
@@ -1130,8 +1130,8 @@ process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.We
1130
1130
  function wo(e) {
1131
1131
  var t, n = e.getColumnOffset, r = e.getColumnStartIndexForOffset, o = e.getColumnStopIndexForStartIndex, s = e.getColumnWidth, i = e.getEstimatedTotalHeight, c = e.getEstimatedTotalWidth, l = e.getOffsetForColumnAndAlignment, p = e.getOffsetForRowAndAlignment, h = e.getRowHeight, m = e.getRowOffset, u = e.getRowStartIndexForOffset, g = e.getRowStopIndexForStartIndex, f = e.initInstanceProps, w = e.shouldResetStyleCacheOnItemSizeChange, v = e.validateProps;
1132
1132
  return t = /* @__PURE__ */ function(b) {
1133
- uo(P, b);
1134
- function P(y) {
1133
+ uo(S, b);
1134
+ function S(y) {
1135
1135
  var d;
1136
1136
  return d = b.call(this, y) || this, d._instanceProps = f(d.props, Dt(d)), d._resetIsScrollingTimeoutId = null, d._outerRef = void 0, d.state = {
1137
1137
  instance: Dt(d),
@@ -1141,27 +1141,27 @@ function wo(e) {
1141
1141
  scrollTop: typeof d.props.initialScrollTop == "number" ? d.props.initialScrollTop : 0,
1142
1142
  scrollUpdateWasRequested: !1,
1143
1143
  verticalScrollDirection: "forward"
1144
- }, d._callOnItemsRendered = void 0, d._callOnItemsRendered = nt(function(T, _, S, A, I, N, x, L) {
1144
+ }, d._callOnItemsRendered = void 0, d._callOnItemsRendered = nt(function(T, _, P, A, I, N, x, L) {
1145
1145
  return d.props.onItemsRendered({
1146
1146
  overscanColumnStartIndex: T,
1147
1147
  overscanColumnStopIndex: _,
1148
- overscanRowStartIndex: S,
1148
+ overscanRowStartIndex: P,
1149
1149
  overscanRowStopIndex: A,
1150
1150
  visibleColumnStartIndex: I,
1151
1151
  visibleColumnStopIndex: N,
1152
1152
  visibleRowStartIndex: x,
1153
1153
  visibleRowStopIndex: L
1154
1154
  });
1155
- }), d._callOnScroll = void 0, d._callOnScroll = nt(function(T, _, S, A, I) {
1155
+ }), d._callOnScroll = void 0, d._callOnScroll = nt(function(T, _, P, A, I) {
1156
1156
  return d.props.onScroll({
1157
- horizontalScrollDirection: S,
1157
+ horizontalScrollDirection: P,
1158
1158
  scrollLeft: T,
1159
1159
  scrollTop: _,
1160
1160
  verticalScrollDirection: A,
1161
1161
  scrollUpdateWasRequested: I
1162
1162
  });
1163
1163
  }), d._getItemStyle = void 0, d._getItemStyle = function(T, _) {
1164
- var S = d.props, A = S.columnWidth, I = S.direction, N = S.rowHeight, x = d._getItemStyleCache(w && A, w && I, w && N), L = T + ":" + _, M;
1164
+ var P = d.props, A = P.columnWidth, I = P.direction, N = P.rowHeight, x = d._getItemStyleCache(w && A, w && I, w && N), L = T + ":" + _, M;
1165
1165
  if (x.hasOwnProperty(L))
1166
1166
  M = x[L];
1167
1167
  else {
@@ -1176,10 +1176,10 @@ function wo(e) {
1176
1176
  };
1177
1177
  }
1178
1178
  return M;
1179
- }, d._getItemStyleCache = void 0, d._getItemStyleCache = nt(function(T, _, S) {
1179
+ }, d._getItemStyleCache = void 0, d._getItemStyleCache = nt(function(T, _, P) {
1180
1180
  return {};
1181
1181
  }), d._onScroll = function(T) {
1182
- var _ = T.currentTarget, S = _.clientHeight, A = _.clientWidth, I = _.scrollLeft, N = _.scrollTop, x = _.scrollHeight, L = _.scrollWidth;
1182
+ var _ = T.currentTarget, P = _.clientHeight, A = _.clientWidth, I = _.scrollLeft, N = _.scrollTop, x = _.scrollHeight, L = _.scrollWidth;
1183
1183
  d.setState(function(M) {
1184
1184
  if (M.scrollLeft === I && M.scrollTop === N)
1185
1185
  return null;
@@ -1194,7 +1194,7 @@ function wo(e) {
1194
1194
  break;
1195
1195
  }
1196
1196
  F = Math.max(0, Math.min(F, L - A));
1197
- var G = Math.max(0, Math.min(N, x - S));
1197
+ var G = Math.max(0, Math.min(N, x - P));
1198
1198
  return {
1199
1199
  isScrolling: !0,
1200
1200
  horizontalScrollDirection: M.scrollLeft < I ? "forward" : "backward",
@@ -1217,38 +1217,38 @@ function wo(e) {
1217
1217
  });
1218
1218
  }, d;
1219
1219
  }
1220
- P.getDerivedStateFromProps = function(d, T) {
1220
+ S.getDerivedStateFromProps = function(d, T) {
1221
1221
  return bo(d, T), v(d), null;
1222
1222
  };
1223
- var C = P.prototype;
1223
+ var C = S.prototype;
1224
1224
  return C.scrollTo = function(d) {
1225
1225
  var T = d.scrollLeft, _ = d.scrollTop;
1226
- T !== void 0 && (T = Math.max(0, T)), _ !== void 0 && (_ = Math.max(0, _)), this.setState(function(S) {
1227
- return T === void 0 && (T = S.scrollLeft), _ === void 0 && (_ = S.scrollTop), S.scrollLeft === T && S.scrollTop === _ ? null : {
1228
- horizontalScrollDirection: S.scrollLeft < T ? "forward" : "backward",
1226
+ T !== void 0 && (T = Math.max(0, T)), _ !== void 0 && (_ = Math.max(0, _)), this.setState(function(P) {
1227
+ return T === void 0 && (T = P.scrollLeft), _ === void 0 && (_ = P.scrollTop), P.scrollLeft === T && P.scrollTop === _ ? null : {
1228
+ horizontalScrollDirection: P.scrollLeft < T ? "forward" : "backward",
1229
1229
  scrollLeft: T,
1230
1230
  scrollTop: _,
1231
1231
  scrollUpdateWasRequested: !0,
1232
- verticalScrollDirection: S.scrollTop < _ ? "forward" : "backward"
1232
+ verticalScrollDirection: P.scrollTop < _ ? "forward" : "backward"
1233
1233
  };
1234
1234
  }, this._resetIsScrollingDebounced);
1235
1235
  }, C.scrollToItem = function(d) {
1236
- var T = d.align, _ = T === void 0 ? "auto" : T, S = d.columnIndex, A = d.rowIndex, I = this.props, N = I.columnCount, x = I.height, L = I.rowCount, M = I.width, D = this.state, F = D.scrollLeft, G = D.scrollTop, U = go();
1237
- S !== void 0 && (S = Math.max(0, Math.min(S, N - 1))), A !== void 0 && (A = Math.max(0, Math.min(A, L - 1)));
1236
+ var T = d.align, _ = T === void 0 ? "auto" : T, P = d.columnIndex, A = d.rowIndex, I = this.props, N = I.columnCount, x = I.height, L = I.rowCount, M = I.width, D = this.state, F = D.scrollLeft, G = D.scrollTop, U = go();
1237
+ P !== void 0 && (P = Math.max(0, Math.min(P, N - 1))), A !== void 0 && (A = Math.max(0, Math.min(A, L - 1)));
1238
1238
  var q = i(this.props, this._instanceProps), j = c(this.props, this._instanceProps), Z = j > M ? U : 0, B = q > x ? U : 0;
1239
1239
  this.scrollTo({
1240
- scrollLeft: S !== void 0 ? l(this.props, S, _, F, this._instanceProps, B) : F,
1240
+ scrollLeft: P !== void 0 ? l(this.props, P, _, F, this._instanceProps, B) : F,
1241
1241
  scrollTop: A !== void 0 ? p(this.props, A, _, G, this._instanceProps, Z) : G
1242
1242
  });
1243
1243
  }, C.componentDidMount = function() {
1244
1244
  var d = this.props, T = d.initialScrollLeft, _ = d.initialScrollTop;
1245
1245
  if (this._outerRef != null) {
1246
- var S = this._outerRef;
1247
- typeof T == "number" && (S.scrollLeft = T), typeof _ == "number" && (S.scrollTop = _);
1246
+ var P = this._outerRef;
1247
+ typeof T == "number" && (P.scrollLeft = T), typeof _ == "number" && (P.scrollTop = _);
1248
1248
  }
1249
1249
  this._callPropsCallbacks();
1250
1250
  }, C.componentDidUpdate = function() {
1251
- var d = this.props.direction, T = this.state, _ = T.scrollLeft, S = T.scrollTop, A = T.scrollUpdateWasRequested;
1251
+ var d = this.props.direction, T = this.state, _ = T.scrollLeft, P = T.scrollTop, A = T.scrollUpdateWasRequested;
1252
1252
  if (A && this._outerRef != null) {
1253
1253
  var I = this._outerRef;
1254
1254
  if (d === "rtl")
@@ -1266,17 +1266,17 @@ function wo(e) {
1266
1266
  }
1267
1267
  else
1268
1268
  I.scrollLeft = Math.max(0, _);
1269
- I.scrollTop = Math.max(0, S);
1269
+ I.scrollTop = Math.max(0, P);
1270
1270
  }
1271
1271
  this._callPropsCallbacks();
1272
1272
  }, C.componentWillUnmount = function() {
1273
1273
  this._resetIsScrollingTimeoutId !== null && kt(this._resetIsScrollingTimeoutId);
1274
1274
  }, C.render = function() {
1275
- var d = this.props, T = d.children, _ = d.className, S = d.columnCount, A = d.direction, I = d.height, N = d.innerRef, x = d.innerElementType, L = d.innerTagName, M = d.itemData, D = d.itemKey, F = D === void 0 ? _o : D, G = d.outerElementType, U = d.outerTagName, q = d.rowCount, j = d.style, Z = d.useIsScrolling, B = d.width, le = this.state.isScrolling, ue = this._getHorizontalRangeToRender(), ee = ue[0], K = ue[1], ae = this._getVerticalRangeToRender(), Te = ae[0], ve = ae[1], Pe = [];
1276
- if (S > 0 && q)
1275
+ var d = this.props, T = d.children, _ = d.className, P = d.columnCount, A = d.direction, I = d.height, N = d.innerRef, x = d.innerElementType, L = d.innerTagName, M = d.itemData, D = d.itemKey, F = D === void 0 ? _o : D, G = d.outerElementType, U = d.outerTagName, q = d.rowCount, j = d.style, Z = d.useIsScrolling, B = d.width, le = this.state.isScrolling, ue = this._getHorizontalRangeToRender(), ee = ue[0], K = ue[1], ae = this._getVerticalRangeToRender(), Te = ae[0], ve = ae[1], Se = [];
1276
+ if (P > 0 && q)
1277
1277
  for (var de = Te; de <= ve; de++)
1278
1278
  for (var pe = ee; pe <= K; pe++)
1279
- Pe.push(ze(T, {
1279
+ Se.push(ze(T, {
1280
1280
  columnIndex: pe,
1281
1281
  data: M,
1282
1282
  isScrolling: Z ? le : void 0,
@@ -1303,7 +1303,7 @@ function wo(e) {
1303
1303
  direction: A
1304
1304
  }, j)
1305
1305
  }, ze(x || L || "div", {
1306
- children: Pe,
1306
+ children: Se,
1307
1307
  ref: N,
1308
1308
  style: {
1309
1309
  height: k,
@@ -1312,28 +1312,28 @@ function wo(e) {
1312
1312
  }
1313
1313
  }));
1314
1314
  }, C._callPropsCallbacks = function() {
1315
- var d = this.props, T = d.columnCount, _ = d.onItemsRendered, S = d.onScroll, A = d.rowCount;
1315
+ var d = this.props, T = d.columnCount, _ = d.onItemsRendered, P = d.onScroll, A = d.rowCount;
1316
1316
  if (typeof _ == "function" && T > 0 && A > 0) {
1317
1317
  var I = this._getHorizontalRangeToRender(), N = I[0], x = I[1], L = I[2], M = I[3], D = this._getVerticalRangeToRender(), F = D[0], G = D[1], U = D[2], q = D[3];
1318
1318
  this._callOnItemsRendered(N, x, F, G, L, M, U, q);
1319
1319
  }
1320
- if (typeof S == "function") {
1320
+ if (typeof P == "function") {
1321
1321
  var j = this.state, Z = j.horizontalScrollDirection, B = j.scrollLeft, le = j.scrollTop, ue = j.scrollUpdateWasRequested, ee = j.verticalScrollDirection;
1322
1322
  this._callOnScroll(B, le, Z, ee, ue);
1323
1323
  }
1324
1324
  }, C._getHorizontalRangeToRender = function() {
1325
- var d = this.props, T = d.columnCount, _ = d.overscanColumnCount, S = d.overscanColumnsCount, A = d.overscanCount, I = d.rowCount, N = this.state, x = N.horizontalScrollDirection, L = N.isScrolling, M = N.scrollLeft, D = _ || S || A || 1;
1325
+ var d = this.props, T = d.columnCount, _ = d.overscanColumnCount, P = d.overscanColumnsCount, A = d.overscanCount, I = d.rowCount, N = this.state, x = N.horizontalScrollDirection, L = N.isScrolling, M = N.scrollLeft, D = _ || P || A || 1;
1326
1326
  if (T === 0 || I === 0)
1327
1327
  return [0, 0, 0, 0];
1328
1328
  var F = r(this.props, M, this._instanceProps), G = o(this.props, F, M, this._instanceProps), U = !L || x === "backward" ? Math.max(1, D) : 1, q = !L || x === "forward" ? Math.max(1, D) : 1;
1329
1329
  return [Math.max(0, F - U), Math.max(0, Math.min(T - 1, G + q)), F, G];
1330
1330
  }, C._getVerticalRangeToRender = function() {
1331
- var d = this.props, T = d.columnCount, _ = d.overscanCount, S = d.overscanRowCount, A = d.overscanRowsCount, I = d.rowCount, N = this.state, x = N.isScrolling, L = N.verticalScrollDirection, M = N.scrollTop, D = S || A || _ || 1;
1331
+ var d = this.props, T = d.columnCount, _ = d.overscanCount, P = d.overscanRowCount, A = d.overscanRowsCount, I = d.rowCount, N = this.state, x = N.isScrolling, L = N.verticalScrollDirection, M = N.scrollTop, D = P || A || _ || 1;
1332
1332
  if (T === 0 || I === 0)
1333
1333
  return [0, 0, 0, 0];
1334
1334
  var F = u(this.props, M, this._instanceProps), G = g(this.props, F, M, this._instanceProps), U = !x || L === "backward" ? Math.max(1, D) : 1, q = !x || L === "forward" ? Math.max(1, D) : 1;
1335
1335
  return [Math.max(0, F - U), Math.max(0, Math.min(I - 1, G + q)), F, G];
1336
- }, P;
1336
+ }, S;
1337
1337
  }(jn), t.defaultProps = {
1338
1338
  direction: "ltr",
1339
1339
  itemData: void 0,
@@ -1503,9 +1503,9 @@ function Vt(e, t) {
1503
1503
  return !0;
1504
1504
  return !1;
1505
1505
  }
1506
- var Po = ["style"], So = ["style"];
1506
+ var So = ["style"], Po = ["style"];
1507
1507
  function Io(e, t) {
1508
- var n = e.style, r = zt(e, Po), o = t.style, s = zt(t, So);
1508
+ var n = e.style, r = zt(e, So), o = t.style, s = zt(t, Po);
1509
1509
  return !Vt(n, o) && !Vt(r, s);
1510
1510
  }
1511
1511
  const yo = () => {
@@ -1551,17 +1551,17 @@ function xo(e) {
1551
1551
  const l = typeof document < "u" && document.attachEvent;
1552
1552
  if (!l) {
1553
1553
  i = function(b) {
1554
- const P = b.__resizeTriggers__, C = P.firstElementChild, y = P.lastElementChild, d = C.firstElementChild;
1554
+ const S = b.__resizeTriggers__, C = S.firstElementChild, y = S.lastElementChild, d = C.firstElementChild;
1555
1555
  y.scrollLeft = y.scrollWidth, y.scrollTop = y.scrollHeight, d.style.width = C.offsetWidth + 1 + "px", d.style.height = C.offsetHeight + 1 + "px", C.scrollLeft = C.scrollWidth, C.scrollTop = C.scrollHeight;
1556
1556
  }, s = function(b) {
1557
1557
  return b.offsetWidth !== b.__resizeLast__.width || b.offsetHeight !== b.__resizeLast__.height;
1558
1558
  }, c = function(b) {
1559
1559
  if (b.target.className && typeof b.target.className.indexOf == "function" && b.target.className.indexOf("contract-trigger") < 0 && b.target.className.indexOf("expand-trigger") < 0)
1560
1560
  return;
1561
- const P = this;
1561
+ const S = this;
1562
1562
  i(this), this.__resizeRAF__ && ft(this.__resizeRAF__), this.__resizeRAF__ = gt(function() {
1563
- s(P) && (P.__resizeLast__.width = P.offsetWidth, P.__resizeLast__.height = P.offsetHeight, P.__resizeListeners__.forEach(function(d) {
1564
- d.call(P, b);
1563
+ s(S) && (S.__resizeLast__.width = S.offsetWidth, S.__resizeLast__.height = S.offsetHeight, S.__resizeListeners__.forEach(function(d) {
1564
+ d.call(S, b);
1565
1565
  }));
1566
1566
  });
1567
1567
  };
@@ -1572,9 +1572,9 @@ function xo(e) {
1572
1572
  {
1573
1573
  const b = document.createElement("fakeelement");
1574
1574
  if (b.style.animationName !== void 0 && (u = !0), u === !1) {
1575
- for (let P = 0; P < f.length; P++)
1576
- if (b.style[f[P] + "AnimationName"] !== void 0) {
1577
- v = f[P], g = "-" + v.toLowerCase() + "-", r = w[P], u = !0;
1575
+ for (let S = 0; S < f.length; S++)
1576
+ if (b.style[f[S] + "AnimationName"] !== void 0) {
1577
+ v = f[S], g = "-" + v.toLowerCase() + "-", r = w[S], u = !0;
1578
1578
  break;
1579
1579
  }
1580
1580
  }
@@ -1686,15 +1686,15 @@ class Ro extends Zn {
1686
1686
  } = this.state, v = {
1687
1687
  overflow: "visible"
1688
1688
  }, b = {};
1689
- let P = !1;
1690
- return o || (u === 0 && (P = !0), v.height = 0, b.height = u, b.scaledHeight = g), s || (w === 0 && (P = !0), v.width = 0, b.width = w, b.scaledWidth = f), i && (P = !1), ze(h, {
1689
+ let S = !1;
1690
+ return o || (u === 0 && (S = !0), v.height = 0, b.height = u, b.scaledHeight = g), s || (w === 0 && (S = !0), v.width = 0, b.width = w, b.scaledWidth = f), i && (S = !1), ze(h, {
1691
1691
  ref: this._setRef,
1692
1692
  style: {
1693
1693
  ...v,
1694
1694
  ...p
1695
1695
  },
1696
1696
  ...m
1697
- }, !P && t(b));
1697
+ }, !S && t(b));
1698
1698
  }
1699
1699
  }
1700
1700
  const Lo = ({ widths: e, heights: t }) => {
@@ -1777,12 +1777,12 @@ const Lo = ({ widths: e, heights: t }) => {
1777
1777
  setTotalInnerDimensions: p,
1778
1778
  totalInnerDimensions: h,
1779
1779
  pageScrollElementRef: m
1780
- } = Xe(), { nextPage: u, prevPage: g, setFocusedPage: f, focusedPage: w } = oe(), { scrollMode: v } = Le(), { viewMode: b } = Ke(), P = W(null), { loading: C } = Y(), y = W(
1780
+ } = Xe(), { nextPage: u, prevPage: g, setFocusedPage: f, focusedPage: w } = oe(), { scrollMode: v } = Le(), { viewMode: b } = Ke(), S = W(null), { loading: C } = Y(), y = W(
1781
1781
  h
1782
1782
  ), d = W({
1783
1783
  viewMode: b,
1784
1784
  scrollMode: v
1785
- }), T = W(!1), _ = W(), { isFullScreen: S } = Qn(), {
1785
+ }), T = W(!1), _ = W(), { isFullScreen: P } = Qn(), {
1786
1786
  pageDimension: A,
1787
1787
  rowCount: I,
1788
1788
  rowHeight: N,
@@ -1805,10 +1805,10 @@ const Lo = ({ widths: e, heights: t }) => {
1805
1805
  }), [x, ae]), ve = R(
1806
1806
  (k) => {
1807
1807
  const $ = document.activeElement !== n;
1808
- !S && $ || (["ArrowUp", "ArrowLeft"].includes(k.key) ? (k.preventDefault(), g()) : ["ArrowDown", "ArrowRight"].includes(k.key) && (k.preventDefault(), u()));
1808
+ !P && $ || (["ArrowUp", "ArrowLeft"].includes(k.key) ? (k.preventDefault(), g()) : ["ArrowDown", "ArrowRight"].includes(k.key) && (k.preventDefault(), u()));
1809
1809
  },
1810
- [u, g, S, v]
1811
- ), Pe = R((k) => {
1810
+ [u, g, P, v]
1811
+ ), Se = R((k) => {
1812
1812
  Z.current = {
1813
1813
  scrollTop: k.scrollTop,
1814
1814
  scrollLeft: k.scrollLeft
@@ -1817,7 +1817,7 @@ const Lo = ({ widths: e, heights: t }) => {
1817
1817
  E(() => (window.addEventListener("keydown", ve), () => {
1818
1818
  window.removeEventListener("keydown", ve);
1819
1819
  }), [ve]), E(() => {
1820
- if (P.current && (P.current.style.position = "relative"), !!s) {
1820
+ if (S.current && (S.current.style.position = "relative"), !!s) {
1821
1821
  y.current = {
1822
1822
  height: h.height,
1823
1823
  width: h.width
@@ -1855,7 +1855,7 @@ const Lo = ({ widths: e, heights: t }) => {
1855
1855
  const $ = Z.current.scrollTop, J = Z.current.scrollLeft;
1856
1856
  if (h.height && h.width) {
1857
1857
  T.current = !0;
1858
- const { height: Se, width: xt } = h, { height: Hn, width: $n } = y.current, Gn = $ / Hn * Se, Vn = J / $n * xt, Un = Math.min(Gn, Se) || 0, qn = Math.min(Vn, xt) || 0;
1858
+ const { height: Pe, width: xt } = h, { height: Hn, width: $n } = y.current, Gn = $ / Hn * Pe, Vn = J / $n * xt, Un = Math.min(Gn, Pe) || 0, qn = Math.min(Vn, xt) || 0;
1859
1859
  s == null || s.scrollTo({
1860
1860
  scrollTop: Un,
1861
1861
  scrollLeft: qn
@@ -1868,8 +1868,8 @@ const Lo = ({ widths: e, heights: t }) => {
1868
1868
  return;
1869
1869
  const k = Object.entries(U);
1870
1870
  let $ = 0, J = -1;
1871
- k.forEach((Se) => {
1872
- J < Se[1] && ($ = Number(Se[0]), J = Se[1]);
1871
+ k.forEach((Pe) => {
1872
+ J < Pe[1] && ($ = Number(Pe[0]), J = Pe[1]);
1873
1873
  }), $ && f($);
1874
1874
  }, [U, f]), E(() => () => {
1875
1875
  j.current && clearTimeout(j.current), _.current && clearTimeout(_.current);
@@ -1926,8 +1926,8 @@ const Lo = ({ widths: e, heights: t }) => {
1926
1926
  ref: i,
1927
1927
  itemData: Te,
1928
1928
  outerRef: l,
1929
- innerRef: P,
1930
- onScroll: Pe,
1929
+ innerRef: S,
1930
+ onScroll: Se,
1931
1931
  columnCount: x,
1932
1932
  columnWidth: L,
1933
1933
  rowHeight: N,
@@ -2019,7 +2019,7 @@ const Lo = ({ widths: e, heights: t }) => {
2019
2019
  !p && /* @__PURE__ */ a(ne, { content: "Next page", children: /* @__PURE__ */ a(Q, { onClick: r, disabled: e === t, children: /* @__PURE__ */ a(Oo, {}) }) })
2020
2020
  ] }) : null;
2021
2021
  };
2022
- var Pt = "Dialog", [bn, ni] = Ir(Pt), [Ao, se] = bn(Pt), Cn = (e) => {
2022
+ var St = "Dialog", [bn, ni] = Er(St), [Ao, se] = bn(St), Cn = (e) => {
2023
2023
  const {
2024
2024
  __scopeDialog: t,
2025
2025
  children: n,
@@ -2027,7 +2027,7 @@ var Pt = "Dialog", [bn, ni] = Ir(Pt), [Ao, se] = bn(Pt), Cn = (e) => {
2027
2027
  defaultOpen: o,
2028
2028
  onOpenChange: s,
2029
2029
  modal: i = !0
2030
- } = e, c = V.useRef(null), l = V.useRef(null), [p = !1, h] = Rr({
2030
+ } = e, c = V.useRef(null), l = V.useRef(null), [p = !1, h] = Dr({
2031
2031
  prop: r,
2032
2032
  defaultProp: o,
2033
2033
  onChange: s
@@ -2049,7 +2049,7 @@ var Pt = "Dialog", [bn, ni] = Ir(Pt), [Ao, se] = bn(Pt), Cn = (e) => {
2049
2049
  }
2050
2050
  );
2051
2051
  };
2052
- Cn.displayName = Pt;
2052
+ Cn.displayName = St;
2053
2053
  var Tn = "DialogTrigger", zo = V.forwardRef(
2054
2054
  (e, t) => {
2055
2055
  const { __scopeDialog: n, ...r } = e, o = se(Tn, n), s = _t(t, o.triggerRef);
@@ -2069,16 +2069,16 @@ var Tn = "DialogTrigger", zo = V.forwardRef(
2069
2069
  }
2070
2070
  );
2071
2071
  zo.displayName = Tn;
2072
- var St = "DialogPortal", [Fo, Pn] = bn(St, {
2072
+ var Pt = "DialogPortal", [Fo, Sn] = bn(Pt, {
2073
2073
  forceMount: void 0
2074
- }), Sn = (e) => {
2075
- const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = se(St, t);
2076
- return /* @__PURE__ */ a(Fo, { scope: t, forceMount: n, children: V.Children.map(r, (i) => /* @__PURE__ */ a(wt, { present: n || s.open, children: /* @__PURE__ */ a(Dr, { asChild: !0, container: o, children: i }) })) });
2074
+ }), Pn = (e) => {
2075
+ const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = se(Pt, t);
2076
+ return /* @__PURE__ */ a(Fo, { scope: t, forceMount: n, children: V.Children.map(r, (i) => /* @__PURE__ */ a(wt, { present: n || s.open, children: /* @__PURE__ */ a(Mr, { asChild: !0, container: o, children: i }) })) });
2077
2077
  };
2078
- Sn.displayName = St;
2078
+ Pn.displayName = Pt;
2079
2079
  var Ve = "DialogOverlay", In = V.forwardRef(
2080
2080
  (e, t) => {
2081
- const n = Pn(Ve, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = se(Ve, e.__scopeDialog);
2081
+ const n = Sn(Ve, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = se(Ve, e.__scopeDialog);
2082
2082
  return s.modal ? /* @__PURE__ */ a(wt, { present: r || s.open, children: /* @__PURE__ */ a(ko, { ...o, ref: t }) }) : null;
2083
2083
  }
2084
2084
  );
@@ -2089,7 +2089,7 @@ var ko = V.forwardRef(
2089
2089
  return (
2090
2090
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
2091
2091
  // ie. when `Overlay` and `Content` are siblings
2092
- /* @__PURE__ */ a(Nr, { as: yr, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ a(
2092
+ /* @__PURE__ */ a(Ir, { as: yr, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ a(
2093
2093
  Ae.div,
2094
2094
  {
2095
2095
  "data-state": yt(o.open),
@@ -2102,7 +2102,7 @@ var ko = V.forwardRef(
2102
2102
  }
2103
2103
  ), we = "DialogContent", yn = V.forwardRef(
2104
2104
  (e, t) => {
2105
- const n = Pn(we, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = se(we, e.__scopeDialog);
2105
+ const n = Sn(we, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = se(we, e.__scopeDialog);
2106
2106
  return /* @__PURE__ */ a(wt, { present: r || s.open, children: s.modal ? /* @__PURE__ */ a(Wo, { ...o, ref: t }) : /* @__PURE__ */ a(Ho, { ...o, ref: t }) });
2107
2107
  }
2108
2108
  );
@@ -2113,7 +2113,7 @@ var Wo = V.forwardRef(
2113
2113
  return V.useEffect(() => {
2114
2114
  const s = r.current;
2115
2115
  if (s)
2116
- return Mr(s);
2116
+ return xr(s);
2117
2117
  }, []), /* @__PURE__ */ a(
2118
2118
  xn,
2119
2119
  {
@@ -2162,9 +2162,9 @@ var Wo = V.forwardRef(
2162
2162
  ), xn = V.forwardRef(
2163
2163
  (e, t) => {
2164
2164
  const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, c = se(we, n), l = V.useRef(null), p = _t(t, l);
2165
- return Er(), /* @__PURE__ */ O(He, { children: [
2165
+ return Rr(), /* @__PURE__ */ O(He, { children: [
2166
2166
  /* @__PURE__ */ a(
2167
- Or,
2167
+ Lr,
2168
2168
  {
2169
2169
  asChild: !0,
2170
2170
  loop: !0,
@@ -2172,7 +2172,7 @@ var Wo = V.forwardRef(
2172
2172
  onMountAutoFocus: o,
2173
2173
  onUnmountAutoFocus: s,
2174
2174
  children: /* @__PURE__ */ a(
2175
- Lr,
2175
+ Nr,
2176
2176
  {
2177
2177
  role: "dialog",
2178
2178
  id: c.contentId,
@@ -2224,7 +2224,7 @@ Mn.displayName = Nn;
2224
2224
  function yt(e) {
2225
2225
  return e ? "open" : "closed";
2226
2226
  }
2227
- var En = "DialogTitleWarning", [ri, On] = xr(En, {
2227
+ var En = "DialogTitleWarning", [ri, On] = Or(En, {
2228
2228
  contentName: we,
2229
2229
  titleName: It,
2230
2230
  docsSlug: "dialog"
@@ -2244,7 +2244,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
2244
2244
  const o = (s = e.current) == null ? void 0 : s.getAttribute("aria-describedby");
2245
2245
  t && o && (document.getElementById(t) || console.warn(r));
2246
2246
  }, [r, e, t]), null;
2247
- }, qo = Cn, jo = Sn, Zo = In, Bo = yn, Ko = Rn, Xo = Mn;
2247
+ }, qo = Cn, jo = Pn, Zo = In, Bo = yn, Ko = Rn, Xo = Mn;
2248
2248
  const _e = {
2249
2249
  "rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
2250
2250
  "rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
@@ -2398,7 +2398,7 @@ const _e = {
2398
2398
  vt,
2399
2399
  {
2400
2400
  container: e,
2401
- triggerComponent: /* @__PURE__ */ a("div", { role: "button", children: /* @__PURE__ */ a(ne, { content: "More options", children: /* @__PURE__ */ a(Q, { children: /* @__PURE__ */ a(Sr, {}) }) }) }),
2401
+ triggerComponent: /* @__PURE__ */ a("div", { role: "button", children: /* @__PURE__ */ a(ne, { content: "More options", children: /* @__PURE__ */ a(Q, { children: /* @__PURE__ */ a(Pr, {}) }) }) }),
2402
2402
  children: /* @__PURE__ */ O("div", { className: Yo["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
2403
2403
  t && /* @__PURE__ */ O(Ge, { children: [
2404
2404
  /* @__PURE__ */ a(nn, {}),
@@ -2420,7 +2420,7 @@ const _e = {
2420
2420
  }, ds = () => {
2421
2421
  const { isSmallScreen: e } = Ce();
2422
2422
  return /* @__PURE__ */ O(He, { children: [
2423
- /* @__PURE__ */ a(Pr, {}),
2423
+ /* @__PURE__ */ a(Sr, {}),
2424
2424
  !e && /* @__PURE__ */ O(He, { children: [
2425
2425
  /* @__PURE__ */ a(nn, {}),
2426
2426
  /* @__PURE__ */ a(zn, {}),
@@ -2457,7 +2457,7 @@ const _e = {
2457
2457
  return (v = c.get(s)) == null ? void 0 : v.page.getViewport({ scale: 1, rotation: i });
2458
2458
  }, [c, s, i]), f = R(
2459
2459
  (v) => {
2460
- const b = ((g == null ? void 0 : g.width) || 0) + 2 * Lt, P = ((g == null ? void 0 : g.height) || 0) + 2 * Lt, C = (r == null ? void 0 : r.clientWidth) || 0, y = (r == null ? void 0 : r.clientHeight) || 0, d = jr(v, C, y, b, P);
2460
+ const b = ((g == null ? void 0 : g.width) || 0) + 2 * Lt, S = ((g == null ? void 0 : g.height) || 0) + 2 * Lt, C = (r == null ? void 0 : r.clientWidth) || 0, y = (r == null ? void 0 : r.clientHeight) || 0, d = jr(v, C, y, b, S);
2461
2461
  t(d);
2462
2462
  },
2463
2463
  [t, g]
@@ -2519,7 +2519,7 @@ const _e = {
2519
2519
  nextMatch: u,
2520
2520
  prevMatch: g,
2521
2521
  search: f
2522
- } = hn(), { searchTool: w = !0 } = fe(), [v, b] = H(f), P = R(() => {
2522
+ } = hn(), { searchTool: w = !0 } = fe(), [v, b] = H(f), S = R(() => {
2523
2523
  n(!0);
2524
2524
  }, []), C = R(() => {
2525
2525
  p(""), b(""), n(!1);
@@ -2543,7 +2543,7 @@ const _e = {
2543
2543
  b(L.target.value);
2544
2544
  }, []), _ = R(() => {
2545
2545
  b(""), p("");
2546
- }, [p]), S = z(() => `${m} / ${h}`, [m, h]), { wholeWords: A, matchCase: I } = z(() => i, [i]), N = R(
2546
+ }, [p]), P = z(() => `${m} / ${h}`, [m, h]), { wholeWords: A, matchCase: I } = z(() => i, [i]), N = R(
2547
2547
  (L) => {
2548
2548
  c((M) => ({ ...M, matchCase: L }));
2549
2549
  },
@@ -2562,7 +2562,7 @@ const _e = {
2562
2562
  open: t,
2563
2563
  container: e,
2564
2564
  align: "start",
2565
- triggerComponent: /* @__PURE__ */ a(ne, { content: "Search in document", children: /* @__PURE__ */ a(Q, { onClick: P, children: /* @__PURE__ */ a(Zt, {}) }) }),
2565
+ triggerComponent: /* @__PURE__ */ a(ne, { content: "Search in document", children: /* @__PURE__ */ a(Q, { onClick: S, children: /* @__PURE__ */ a(Zt, {}) }) }),
2566
2566
  children: /* @__PURE__ */ O("div", { className: ie["rp-search-tool-content"], children: [
2567
2567
  /* @__PURE__ */ O("div", { className: ie["rp-search-tool-input-wrapper"], children: [
2568
2568
  /* @__PURE__ */ O("div", { className: ie["rp-search-tool-input"], children: [
@@ -2579,7 +2579,7 @@ const _e = {
2579
2579
  children: !!v && /* @__PURE__ */ a("span", { className: ie["rp-search-tool-input-clear"], onClick: _, children: /* @__PURE__ */ a(Br, {}) })
2580
2580
  }
2581
2581
  ),
2582
- l ? /* @__PURE__ */ a("span", { children: /* @__PURE__ */ a(De, {}) }) : /* @__PURE__ */ a("span", { children: S })
2582
+ l ? /* @__PURE__ */ a("span", { children: /* @__PURE__ */ a(De, {}) }) : /* @__PURE__ */ a("span", { children: P })
2583
2583
  ] }),
2584
2584
  /* @__PURE__ */ O("div", { className: ie["rp-search-tool-input-checkboxes"], children: [
2585
2585
  /* @__PURE__ */ a(Nt, { name: "matchCase", value: I, onChange: N, children: "Match Case" }),
@@ -2685,10 +2685,10 @@ const _e = {
2685
2685
  }, Bt = {
2686
2686
  "rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
2687
2687
  "rp-thumbnails": "_rp-thumbnails_16vqr_1"
2688
- }, Ts = 16, Ps = (e, t) => {
2688
+ }, Ts = 16, Ss = (e, t) => {
2689
2689
  const n = e == null ? void 0 : e.querySelector(`#page-${t}`);
2690
2690
  e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) - Ts);
2691
- }, Ss = je((e, t) => {
2691
+ }, Ps = je((e, t) => {
2692
2692
  const { show: n } = e, { focusedPage: r, totalPages: o } = oe(), { thumbnailPages: s, addPage: i, thumbnailLength: c, addToPage: l } = dn(), p = W(null), h = W(1);
2693
2693
  Kt(t, () => p.current);
2694
2694
  const m = z(() => Object.values(s), [s]), u = R(() => {
@@ -2696,7 +2696,7 @@ const _e = {
2696
2696
  g <= o && i(g);
2697
2697
  }, [i, o, c]);
2698
2698
  return E(() => {
2699
- r > c ? l(r) : n && h.current !== r && (Ps(p.current, r), h.current = r);
2699
+ r > c ? l(r) : n && h.current !== r && (Ss(p.current, r), h.current = r);
2700
2700
  }, [r, c, l, n, m]), ir(p.current, u), /* @__PURE__ */ a("div", { ref: p, className: Bt["rp-thumbnails-container"], children: /* @__PURE__ */ a("div", { className: Bt["rp-thumbnails"], children: n ? m.map((g, f) => {
2701
2701
  var w, v;
2702
2702
  return /* @__PURE__ */ a(
@@ -2727,7 +2727,7 @@ const _e = {
2727
2727
  children: [
2728
2728
  /* @__PURE__ */ a("div", { className: ct["rp-sidebar-content"], children: c }),
2729
2729
  /* @__PURE__ */ O("div", { "data-rp": "thumbnailSidebar", hidden: !e, className: ct["rp-thumbnails-wrapper"], children: [
2730
- /* @__PURE__ */ a(Ss, { show: e, ref: o }),
2730
+ /* @__PURE__ */ a(Ps, { show: e, ref: o }),
2731
2731
  /* @__PURE__ */ a(cr, { onWidthChange: r, thumbnailRef: o })
2732
2732
  ] })
2733
2733
  ]
@@ -2792,7 +2792,7 @@ export {
2792
2792
  Cs as B,
2793
2793
  Qr as C,
2794
2794
  Lo as D,
2795
- Ss as E,
2795
+ Ps as E,
2796
2796
  zn as F,
2797
2797
  ys as G,
2798
2798
  ws as L,