@pdf-viewer/react 1.5.0-beta.4 → 1.5.0-beta.5

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 (61) hide show
  1. package/dist/Popover-b7402893.js +1445 -0
  2. package/dist/{RPDefaultLayout-6ad40e50.js → RPDefaultLayout-6f52691a.js} +146 -144
  3. package/dist/component-1da194e8.js +337 -0
  4. package/dist/components/RPController.js +1 -1
  5. package/dist/components/RPPages.js +1 -1
  6. package/dist/components/RPProvider.js +1 -1
  7. package/dist/components/layout/LayoutContainer.js +1 -1
  8. package/dist/components/layout/RPDefaultLayout.js +1 -1
  9. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  10. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  11. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  12. package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
  13. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  14. package/dist/components/layout/toolbar/MenuItem.js +1 -1
  15. package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
  16. package/dist/components/layout/toolbar/MostPageTool.js +2 -2
  17. package/dist/components/layout/toolbar/OtherTool.js +2 -2
  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/RotateTool.js +1 -1
  23. package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
  24. package/dist/components/layout/toolbar/SearchTool.js +2 -2
  25. package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
  26. package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
  27. package/dist/components/layout/toolbar/ZoomTool.js +2 -2
  28. package/dist/components/page/AnnotationLayer.js +1 -1
  29. package/dist/components/page/CanvasLayer.js +1 -1
  30. package/dist/components/page/DualPage.js +1 -1
  31. package/dist/components/page/RPPage.js +1 -1
  32. package/dist/components/page/SinglePage.js +1 -1
  33. package/dist/components/page/TextHighlightLayer.js +1 -1
  34. package/dist/components/page/TextLayer.js +1 -1
  35. package/dist/components/ui/Checkbox.js +1 -1
  36. package/dist/components/ui/DropDown.js +1 -1
  37. package/dist/components/ui/LoadingIndicator.js +1 -1
  38. package/dist/components/ui/Popover.js +1 -1
  39. package/dist/components/ui/RPTooltip.js +47 -46
  40. package/dist/contexts/PaginationContext.js +1 -1
  41. package/dist/contexts/PrintContext.js +1 -1
  42. package/dist/contexts/SearchContext.js +1 -1
  43. package/dist/contexts/ThumbnailsContext.js +1 -1
  44. package/dist/floating-ui.react-dom-15b9b819.js +1310 -0
  45. package/dist/{index-48ca3f30.js → index-1cb41342.js} +9 -9
  46. package/dist/index-7279fb4e.js +1557 -0
  47. package/dist/index-aa2d3884.js +140 -0
  48. package/dist/main.js +1 -1
  49. package/dist/utils/hooks/useFileDownload.js +1 -1
  50. package/dist/utils/hooks/useLicense.js +1 -1
  51. package/dist/utils/hooks/usePaginate.js +1 -1
  52. package/dist/utils/hooks/usePresentPage.js +1 -1
  53. package/dist/utils/hooks/usePrint.js +1 -1
  54. package/dist/utils/hooks/useScrollToPage.js +1 -1
  55. package/dist/utils/hooks/useSearch.js +1 -1
  56. package/dist/utils/hooks/useThumbnail.js +1 -1
  57. package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
  58. package/package.json +1 -1
  59. package/dist/Popover-d11ec15c.js +0 -3061
  60. package/dist/floating-ui.react-dom-88a86594.js +0 -1447
  61. package/dist/index-4ba3ab9a.js +0 -1877
@@ -47,7 +47,7 @@ import { useViewportContext as ye, ViewportProvider as xr } from "./contexts/Vie
47
47
  import { useThemeContext as Ir } from "./contexts/ThemeContext.js";
48
48
  import { SimpleLinkService as yr } from "./utils/link_service.js";
49
49
  import { annotationsEvents as Lr, annotationEventsHandler as Rr, handleClick as Ft, handleAnnotationWidget as Nr, handleAnnotationLink as Er, bindLayerEvents as Or, unbindLayerEvents as kt } from "./utils/annotations.js";
50
- import { _ as Dr, U as zr } from "./Popover-d11ec15c.js";
50
+ import { _ as Dr, U as zr } from "./Popover-b7402893.js";
51
51
  import { useMousePressed as Ar } from "./utils/hooks/useMousePressed.js";
52
52
  import { useGrabScroll as Fr } from "./utils/hooks/useGrabScroll.js";
53
53
  import { usePinch as kr } from "./utils/hooks/usePinch.js";
@@ -60,9 +60,10 @@ import { FileUploadTool as hn } from "./components/layout/toolbar/FileUploadTool
60
60
  import { DarkModeTool as $r } from "./components/layout/toolbar/DarkModeTool.js";
61
61
  import { ThreeDotIcon as Gr } from "./components/icons/ThreeDotIcon.js";
62
62
  import { UIDropDown as mn } from "./components/ui/DropDown.js";
63
- import { c as Vr, u as xt, P as Me, b as Fe, d as It, i as Ur, k as qr, a as Zr } from "./index-48ca3f30.js";
64
- import { D as jr, d as at } from "./floating-ui.react-dom-88a86594.js";
65
- import { a as Br, h as Kr, u as Xr, F as Yr, b as Jr, G as qe } from "./index-4ba3ab9a.js";
63
+ import { e as Vr, a as xt, P as Me, c as Fe, g as It, i as Ur, k as qr, f as Zr } from "./index-1cb41342.js";
64
+ import { D as jr, u as at } from "./index-aa2d3884.js";
65
+ import { a as Br, u as Kr, F as Xr, b as Yr, G as qe } from "./index-7279fb4e.js";
66
+ import { h as Jr } from "./component-1da194e8.js";
66
67
  import { CloseIcon as fn } from "./components/icons/CloseIcon.js";
67
68
  import { dateFormatter as Mt } from "./utils/dateFormatter.js";
68
69
  import { PropertyItem as Qr } from "./components/layout/toolbar/PropertyItem.js";
@@ -96,10 +97,10 @@ import './assets/RPDefaultLayout.css';const _n = () => {
96
97
  (_, m) => {
97
98
  if (!r)
98
99
  return;
99
- const C = Math.ceil(_ / 2) * 2 - 1;
100
- if (_ === C + 1) {
100
+ const T = Math.ceil(_ / 2) * 2 - 1;
101
+ if (_ === T + 1) {
101
102
  const p = {
102
- left: l[C],
103
+ left: l[T],
103
104
  top: 0
104
105
  };
105
106
  return g.current = p, new Promise(
@@ -123,8 +124,8 @@ import './assets/RPDefaultLayout.css';const _n = () => {
123
124
  h.current = s;
124
125
  }, [s]), { scrollToPage: L(
125
126
  (_, m = "smooth") => {
126
- const C = _ - 1;
127
- let S = C, p = 0;
127
+ const T = _ - 1;
128
+ let S = T, p = 0;
128
129
  if (f.current === Ue.DUAL_PAGE && u.current === X.PAGE_SCROLLING) {
129
130
  w(_, m);
130
131
  return;
@@ -137,9 +138,9 @@ import './assets/RPDefaultLayout.css';const _n = () => {
137
138
  return;
138
139
  const P = o;
139
140
  if (b.current = !0, u.current === X.HORIZONTAL_SCROLLING) {
140
- p = C;
141
+ p = T;
141
142
  const I = {
142
- left: C * (l[C] ?? 0),
143
+ left: T * (l[T] ?? 0),
143
144
  top: 0
144
145
  };
145
146
  return g.current = I, P.scrollTo({
@@ -148,7 +149,7 @@ import './assets/RPDefaultLayout.css';const _n = () => {
148
149
  });
149
150
  }
150
151
  if (f.current === Ue.DUAL_PAGE) {
151
- p = C % 2, S = Math.floor(C / 2);
152
+ p = T % 2, S = Math.floor(T / 2);
152
153
  const I = S * (d[S] ?? 0), R = {
153
154
  left: p * (l[p] ?? 0),
154
155
  top: I
@@ -223,7 +224,7 @@ import './assets/RPDefaultLayout.css';const _n = () => {
223
224
  }), ie = () => {
224
225
  const e = Be(wn);
225
226
  return typeof (e == null ? void 0 : e.focusedPage) > "u" && Hr.error("Please use this hooks inside children component of RPProvider"), e;
226
- }, ws = ({ children: e }) => {
227
+ }, bs = ({ children: e }) => {
227
228
  const { pdf: t } = K(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: i, goToPage: c, nextPage: s, prevPage: l } = mo();
228
229
  return A(() => {
229
230
  t != null && t.numPages && (i(t.numPages), r(1));
@@ -254,8 +255,8 @@ const fo = () => {
254
255
  }, [u]);
255
256
  const f = L(() => {
256
257
  document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
257
- const C = document.querySelector(".rp-print-zone");
258
- C && C.remove();
258
+ const T = document.querySelector(".rp-print-zone");
259
+ T && T.remove();
259
260
  }, []), h = L(() => {
260
261
  u.current = !1, i(!1), s(!1), d(null), o({
261
262
  loadedPages: 0,
@@ -265,11 +266,11 @@ const fo = () => {
265
266
  }, []), g = () => {
266
267
  u.current = !0;
267
268
  }, b = async ({
268
- scratchCanvas: C,
269
+ scratchCanvas: T,
269
270
  pdfDocument: S,
270
271
  pageNumber: p,
271
272
  viewerPdfPage: P,
272
- printResolution: T,
273
+ printResolution: C,
273
274
  optionalContentConfigPromise: x,
274
275
  printAnnotationStoragePromise: E
275
276
  }) => {
@@ -277,10 +278,10 @@ const fo = () => {
277
278
  h();
278
279
  return;
279
280
  }
280
- const I = T / ur.PDF;
281
- C.width = Math.floor(P.width * I), C.height = Math.floor(P.height * I);
282
- const O = C.getContext("2d");
283
- O.save(), O.fillStyle = "rgb(255, 255, 255)", O.fillRect(0, 0, C.width, C.height), O.restore();
281
+ const I = C / ur.PDF;
282
+ T.width = Math.floor(P.width * I), T.height = Math.floor(P.height * I);
283
+ const O = T.getContext("2d");
284
+ O.save(), O.fillStyle = "rgb(255, 255, 255)", O.fillRect(0, 0, T.width, T.height), O.restore();
284
285
  const [R, k] = await Promise.all([
285
286
  S.getPage(p),
286
287
  E
@@ -304,49 +305,49 @@ const fo = () => {
304
305
  throw y instanceof hr || console.error(y), y;
305
306
  }
306
307
  }, w = L(() => {
307
- const C = window.print;
308
+ const T = window.print;
308
309
  return new Promise((S) => {
309
310
  const p = (x) => {
310
311
  setTimeout(() => {
311
- C.call(window), setTimeout(() => x(), 20);
312
+ T.call(window), setTimeout(() => x(), 20);
312
313
  }, 0);
313
314
  };
314
315
  if (document.querySelector(".rp-print-zone")) {
315
316
  p(S);
316
317
  return;
317
318
  }
318
- const T = new MutationObserver(() => {
319
- document.querySelector(".rp-print-zone") && (p(S), T.disconnect());
319
+ const C = new MutationObserver(() => {
320
+ document.querySelector(".rp-print-zone") && (p(S), C.disconnect());
320
321
  });
321
- T.observe(document.body, { childList: !0, subtree: !0 });
322
+ C.observe(document.body, { childList: !0, subtree: !0 });
322
323
  });
323
- }, []), v = async (C) => {
324
+ }, []), v = async (T) => {
324
325
  const S = document.createElement("img"), p = document.createElement("div");
325
- return p.classList.add("rp-print-page"), await new Promise((P, T) => {
326
- C.toBlob((x) => {
326
+ return p.classList.add("rp-print-page"), await new Promise((P, C) => {
327
+ T.toBlob((x) => {
327
328
  x ? (S.src = URL.createObjectURL(x), S.onload = () => {
328
329
  URL.revokeObjectURL(S.src), P();
329
- }, S.onerror = T) : T(new Error("Failed to create blob"));
330
+ }, S.onerror = C) : C(new Error("Failed to create blob"));
330
331
  });
331
332
  }).catch(() => {
332
333
  }), p.appendChild(S), p;
333
- }, _ = (C, S) => {
334
+ }, _ = (T, S) => {
334
335
  const p = document.createElement("div");
335
336
  p.classList.add("rp-print-zone");
336
- const P = document.createElement("style"), T = S.get(1);
337
- if (T) {
338
- const { width: x, height: E } = T == null ? void 0 : T.page.getViewport({ scale: 1 });
337
+ const P = document.createElement("style"), C = S.get(1);
338
+ if (C) {
339
+ const { width: x, height: E } = C == null ? void 0 : C.page.getViewport({ scale: 1 });
339
340
  P.innerHTML = `@page { size: ${x}px ${E}px }`;
340
341
  }
341
- return p.appendChild(P), p.append(...C), p;
342
+ return p.appendChild(P), p.append(...T), p;
342
343
  }, m = L(async () => {
343
344
  if (!e)
344
345
  return;
345
346
  h();
346
- const C = document.createElement("canvas"), S = [];
347
+ const T = document.createElement("canvas"), S = [];
347
348
  try {
348
349
  e.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
349
- const P = e.getOptionalContentConfig({ intent: "print" }), T = Promise.resolve(
350
+ const P = e.getOptionalContentConfig({ intent: "print" }), C = Promise.resolve(
350
351
  e.annotationStorage.print ?? void 0
351
352
  ), x = t.size;
352
353
  for (const [I, O] of t) {
@@ -356,18 +357,18 @@ const fo = () => {
356
357
  }
357
358
  const R = O.page.getViewport({ scale: 1 });
358
359
  if (await b({
359
- scratchCanvas: C,
360
+ scratchCanvas: T,
360
361
  pdfDocument: e,
361
362
  pageNumber: I,
362
363
  viewerPdfPage: R,
363
364
  printResolution: 150,
364
365
  optionalContentConfigPromise: P,
365
- printAnnotationStoragePromise: T
366
+ printAnnotationStoragePromise: C
366
367
  }), u.current) {
367
368
  h();
368
369
  return;
369
370
  }
370
- const k = await v(C);
371
+ const k = await v(T);
371
372
  S.push(k);
372
373
  const z = parseFloat((S.length / x * 100).toFixed(2));
373
374
  o({
@@ -385,15 +386,15 @@ const fo = () => {
385
386
  } catch (p) {
386
387
  s(!0), p instanceof Error && d(p);
387
388
  } finally {
388
- C.height = 0, C.width = 0;
389
+ T.height = 0, T.width = 0;
389
390
  }
390
391
  }, [e, t, u]);
391
392
  return A(() => {
392
- const C = () => {
393
+ const T = () => {
393
394
  h(), f();
394
395
  };
395
- return window.addEventListener("afterprint", C, !0), () => {
396
- window.removeEventListener("afterprint", C, !0);
396
+ return window.addEventListener("afterprint", T, !0), () => {
397
+ window.removeEventListener("afterprint", T, !0);
397
398
  };
398
399
  }, [f, h]), {
399
400
  print: m,
@@ -420,7 +421,7 @@ const fo = () => {
420
421
  console.error("Error in setOnError callback:", t);
421
422
  }
422
423
  }
423
- }), bs = ({ children: e }) => {
424
+ }), Cs = ({ children: e }) => {
424
425
  const [t, n] = $(null), [o, r] = $(null), { print: i, cancel: c, progress: s, isComplete: l, isError: d, error: u } = fo(), f = L((v) => {
425
426
  v && typeof v == "function" && r(() => v);
426
427
  }, []), h = (v) => {
@@ -459,7 +460,7 @@ const fo = () => {
459
460
  }, go = () => {
460
461
  const [e, t] = $({}), { pages: n } = K(), { rotate: o } = Ke(), r = F(() => Object.keys(e).length, [e]), i = L(
461
462
  (s) => {
462
- if (!n.size)
463
+ if (!n.size || s > n.size)
463
464
  return;
464
465
  const l = Array.from(n.values()).slice(0, s).map((f) => {
465
466
  const { thumbnailViewport: h, scale: g } = Wt(f.page, o);
@@ -543,7 +544,7 @@ const fo = () => {
543
544
  setActive: (e) => {
544
545
  },
545
546
  active: !1
546
- }), Tn = () => Be(Cn), Cs = ({
547
+ }), Tn = () => Be(Cn), Ts = ({
547
548
  children: e,
548
549
  initialThumbnailsVisible: t
549
550
  }) => {
@@ -556,32 +557,32 @@ const fo = () => {
556
557
  }
557
558
  );
558
559
  }, vo = (e = {}, t = "") => {
559
- const [n, o] = $(t), [r, i] = $(!1), { pdf: c, pages: s } = K(), l = Qe(), d = W(!n), { currentZoom: u } = Xe(), [f, h] = $([]), { setFocusedPage: g } = ie(), [b, w] = $(0), { pageScrollElementRef: v, virtualScrollableElementRef: _ } = Je(), { scrollMode: m } = Ee(), { pagesRef: C } = be(), [S, p] = $(null), P = W({}), T = F(() => b === 0 ? null : f[b - 1], [b, f]), x = F(() => f.length, [f]);
560
+ const [n, o] = $(t), [r, i] = $(!1), { pdf: c, pages: s } = K(), l = Qe(), d = W(!n), { currentZoom: u } = Xe(), [f, h] = $([]), { setFocusedPage: g } = ie(), [b, w] = $(0), { pageScrollElementRef: v, virtualScrollableElementRef: _ } = Je(), { scrollMode: m } = Ee(), { pagesRef: T } = be(), [S, p] = $(null), P = W({}), C = F(() => b === 0 ? null : f[b - 1], [b, f]), x = F(() => f.length, [f]);
560
561
  A(() => {
561
- if (!T || !s)
562
+ if (!C || !s)
562
563
  return;
563
564
  const R = _ || v;
564
- if (!R || !C)
565
+ if (!R || !T)
565
566
  return;
566
- const k = s.get(T.page), z = C.clientHeight / 2, y = C.clientWidth / 2;
567
+ const k = s.get(C.page), z = T.clientHeight / 2, y = T.clientWidth / 2;
567
568
  let N = 0, M = 0;
568
- m === X.PAGE_SCROLLING && g(T.page), m === X.VERTICAL_SCROLLING && (N = l.heights.slice(0, T.page - 1).reduce((B, j) => B + j, 0)), m === X.HORIZONTAL_SCROLLING && (M = l.widths.slice(0, T.page - 1).reduce((B, j) => B + j, 0));
569
+ m === X.PAGE_SCROLLING && g(C.page), m === X.VERTICAL_SCROLLING && (N = l.heights.slice(0, C.page - 1).reduce((B, j) => B + j, 0)), m === X.HORIZONTAL_SCROLLING && (M = l.widths.slice(0, C.page - 1).reduce((B, j) => B + j, 0));
569
570
  let V;
570
571
  if (!k)
571
572
  return;
572
- const Z = P.current[T.page], Y = k.page.getViewport({ scale: 1 });
573
+ const Z = P.current[C.page], Y = k.page.getViewport({ scale: 1 });
573
574
  V = new Ct.TextLayer({
574
575
  viewport: Y,
575
576
  textContentSource: Z,
576
577
  container: document.createElement("div")
577
578
  }), V.render().then(() => {
578
- const B = V.textDivs[T.start.idx], [j] = dn([T], Z, V.textDivs), te = l.widths[T.page - 1], ae = l.heights[T.page - 1], J = document.createElement("div"), ne = document.createElement("div");
579
- B.style.position = "absolute", B.style.color = "transparent", ne.style.position = "absolute", ne.style.top = "0", ne.style.setProperty("--scale-factor", `${u}`), J.style.position = "relative", J.style.width = `${te}px`, J.style.height = `${ae}px`, J.style.zIndex = "-1", J.appendChild(B), ne.appendChild(J), C.prepend(ne);
579
+ const B = V.textDivs[C.start.idx], [j] = dn([C], Z, V.textDivs), te = l.widths[C.page - 1], ae = l.heights[C.page - 1], J = document.createElement("div"), ne = document.createElement("div");
580
+ B.style.position = "absolute", B.style.color = "transparent", ne.style.position = "absolute", ne.style.top = "0", ne.style.setProperty("--scale-factor", `${u}`), J.style.position = "relative", J.style.width = `${te}px`, J.style.height = `${ae}px`, J.style.zIndex = "-1", J.appendChild(B), ne.appendChild(J), T.prepend(ne);
580
581
  const he = j.element.getBoundingClientRect(), ce = ne.getBoundingClientRect(), Oe = he.top - ce.top, ve = he.left - ce.left, me = N + Oe - z + he.height / 2, le = M + ve - y + he.width / 2, De = {
581
582
  left: Math.max(le, 0),
582
583
  top: Math.max(me, 0)
583
584
  };
584
- C.removeChild(ne), R.scrollTo({
585
+ T.removeChild(ne), R.scrollTo({
585
586
  ...De
586
587
  });
587
588
  });
@@ -589,11 +590,11 @@ const fo = () => {
589
590
  s,
590
591
  g,
591
592
  l,
592
- T,
593
+ C,
593
594
  m,
594
595
  _,
595
596
  v,
596
- C
597
+ T
597
598
  ]);
598
599
  const E = L(() => {
599
600
  w((R) => x ? R + 1 > x ? 1 : R + 1 : 0);
@@ -638,7 +639,7 @@ const fo = () => {
638
639
  matches: f,
639
640
  totalMatches: x,
640
641
  currentMatchPosition: b,
641
- currentMatch: T,
642
+ currentMatch: C,
642
643
  nextMatch: E,
643
644
  prevMatch: I,
644
645
  currentMatchElement: S,
@@ -662,7 +663,7 @@ const fo = () => {
662
663
  currentMatchElement: null,
663
664
  setCurrentMatchElement: (e) => {
664
665
  }
665
- }), Ts = ({
666
+ }), Ps = ({
666
667
  children: e,
667
668
  initialSearch: t
668
669
  }) => {
@@ -781,8 +782,8 @@ const fo = () => {
781
782
  }), u.current = v, w && (w.innerText = ""), d.current.render();
782
783
  }).then(() => {
783
784
  var m;
784
- [].slice.call(w.children).forEach((C) => {
785
- C.classList.add(ct["rp-text-layer-text"]);
785
+ [].slice.call(w.children).forEach((T) => {
786
+ T.classList.add(ct["rp-text-layer-text"]);
786
787
  });
787
788
  const _ = (m = d.current) == null ? void 0 : m.textDivs;
788
789
  _ && u.current && g(u.current, _);
@@ -822,8 +823,8 @@ const To = (e) => {
822
823
  const w = L(
823
824
  (v) => {
824
825
  !c || !r || (Lr(v), Rr(v, r, c).then((_) => {
825
- var m, C;
826
- ((m = _ == null ? void 0 : _.data) == null ? void 0 : m.action) === "Print" ? f() : ((C = _ == null ? void 0 : _.data) == null ? void 0 : C.action) === "SaveAs" && h();
826
+ var m, T;
827
+ ((m = _ == null ? void 0 : _.data) == null ? void 0 : m.action) === "Print" ? f() : ((T = _ == null ? void 0 : _.data) == null ? void 0 : T.action) === "SaveAs" && h();
827
828
  }), u === X.PAGE_SCROLLING ? Ft(v, c, r, (_) => l(_.pageIndex + 1)) : Ft(v, c, r, (_) => d(_.pageIndex + 1)));
828
829
  },
829
830
  [r, c, d, l, u, f, h]
@@ -852,6 +853,7 @@ const To = (e) => {
852
853
  }
853
854
  const m = new AbortController();
854
855
  return (async () => {
856
+ var P;
855
857
  i.current && (i.current.div.replaceChildren(), i.current = void 0), n.current && (n.current.innerText = ""), i.current = new mr({
856
858
  div: n.current,
857
859
  accessibilityManager: void 0,
@@ -864,7 +866,7 @@ const To = (e) => {
864
866
  const S = await (r == null ? void 0 : r.hasJSActions()), p = await (r == null ? void 0 : r.getFieldObjects());
865
867
  if (m.signal.aborted)
866
868
  throw "abort";
867
- return i.current.render({
869
+ return (P = i.current) == null ? void 0 : P.render({
868
870
  annotations: c,
869
871
  annotationStorage: r == null ? void 0 : r.annotationStorage,
870
872
  hasJSActions: S,
@@ -1110,10 +1112,10 @@ function Oo(e) {
1110
1112
  scrollTop: typeof p.props.initialScrollTop == "number" ? p.props.initialScrollTop : 0,
1111
1113
  scrollUpdateWasRequested: !1,
1112
1114
  verticalScrollDirection: "forward"
1113
- }, p._callOnItemsRendered = void 0, p._callOnItemsRendered = dt(function(P, T, x, E, I, O, R, k) {
1115
+ }, p._callOnItemsRendered = void 0, p._callOnItemsRendered = dt(function(P, C, x, E, I, O, R, k) {
1114
1116
  return p.props.onItemsRendered({
1115
1117
  overscanColumnStartIndex: P,
1116
- overscanColumnStopIndex: T,
1118
+ overscanColumnStopIndex: C,
1117
1119
  overscanRowStartIndex: x,
1118
1120
  overscanRowStopIndex: E,
1119
1121
  visibleColumnStartIndex: I,
@@ -1121,34 +1123,34 @@ function Oo(e) {
1121
1123
  visibleRowStartIndex: R,
1122
1124
  visibleRowStopIndex: k
1123
1125
  });
1124
- }), p._callOnScroll = void 0, p._callOnScroll = dt(function(P, T, x, E, I) {
1126
+ }), p._callOnScroll = void 0, p._callOnScroll = dt(function(P, C, x, E, I) {
1125
1127
  return p.props.onScroll({
1126
1128
  horizontalScrollDirection: x,
1127
1129
  scrollLeft: P,
1128
- scrollTop: T,
1130
+ scrollTop: C,
1129
1131
  verticalScrollDirection: E,
1130
1132
  scrollUpdateWasRequested: I
1131
1133
  });
1132
- }), p._getItemStyle = void 0, p._getItemStyle = function(P, T) {
1133
- var x = p.props, E = x.columnWidth, I = x.direction, O = x.rowHeight, R = p._getItemStyleCache(w && E, w && I, w && O), k = P + ":" + T, z;
1134
+ }), p._getItemStyle = void 0, p._getItemStyle = function(P, C) {
1135
+ var x = p.props, E = x.columnWidth, I = x.direction, O = x.rowHeight, R = p._getItemStyleCache(w && E, w && I, w && O), k = P + ":" + C, z;
1134
1136
  if (R.hasOwnProperty(k))
1135
1137
  z = R[k];
1136
1138
  else {
1137
- var y = n(p.props, T, p._instanceProps), N = I === "rtl";
1139
+ var y = n(p.props, C, p._instanceProps), N = I === "rtl";
1138
1140
  R[k] = z = {
1139
1141
  position: "absolute",
1140
1142
  left: N ? void 0 : y,
1141
1143
  right: N ? y : void 0,
1142
1144
  top: f(p.props, P, p._instanceProps),
1143
1145
  height: u(p.props, P, p._instanceProps),
1144
- width: i(p.props, T, p._instanceProps)
1146
+ width: i(p.props, C, p._instanceProps)
1145
1147
  };
1146
1148
  }
1147
1149
  return z;
1148
- }, p._getItemStyleCache = void 0, p._getItemStyleCache = dt(function(P, T, x) {
1150
+ }, p._getItemStyleCache = void 0, p._getItemStyleCache = dt(function(P, C, x) {
1149
1151
  return {};
1150
1152
  }), p._onScroll = function(P) {
1151
- var T = P.currentTarget, x = T.clientHeight, E = T.clientWidth, I = T.scrollLeft, O = T.scrollTop, R = T.scrollHeight, k = T.scrollWidth;
1153
+ var C = P.currentTarget, x = C.clientHeight, E = C.clientWidth, I = C.scrollLeft, O = C.scrollTop, R = C.scrollHeight, k = C.scrollWidth;
1152
1154
  p.setState(function(z) {
1153
1155
  if (z.scrollLeft === I && z.scrollTop === O)
1154
1156
  return null;
@@ -1174,8 +1176,8 @@ function Oo(e) {
1174
1176
  };
1175
1177
  }, p._resetIsScrollingDebounced);
1176
1178
  }, p._outerRefSetter = function(P) {
1177
- var T = p.props.outerRef;
1178
- p._outerRef = P, typeof T == "function" ? T(P) : T != null && typeof T == "object" && T.hasOwnProperty("current") && (T.current = P);
1179
+ var C = p.props.outerRef;
1180
+ p._outerRef = P, typeof C == "function" ? C(P) : C != null && typeof C == "object" && C.hasOwnProperty("current") && (C.current = P);
1179
1181
  }, p._resetIsScrollingDebounced = function() {
1180
1182
  p._resetIsScrollingTimeoutId !== null && jt(p._resetIsScrollingTimeoutId), p._resetIsScrollingTimeoutId = Lo(p._resetIsScrolling, No);
1181
1183
  }, p._resetIsScrolling = function() {
@@ -1189,59 +1191,59 @@ function Oo(e) {
1189
1191
  m.getDerivedStateFromProps = function(p, P) {
1190
1192
  return Do(p, P), v(p), null;
1191
1193
  };
1192
- var C = m.prototype;
1193
- return C.scrollTo = function(p) {
1194
- var P = p.scrollLeft, T = p.scrollTop;
1195
- P !== void 0 && (P = Math.max(0, P)), T !== void 0 && (T = Math.max(0, T)), this.setState(function(x) {
1196
- return P === void 0 && (P = x.scrollLeft), T === void 0 && (T = x.scrollTop), x.scrollLeft === P && x.scrollTop === T ? null : {
1194
+ var T = m.prototype;
1195
+ return T.scrollTo = function(p) {
1196
+ var P = p.scrollLeft, C = p.scrollTop;
1197
+ P !== void 0 && (P = Math.max(0, P)), C !== void 0 && (C = Math.max(0, C)), this.setState(function(x) {
1198
+ return P === void 0 && (P = x.scrollLeft), C === void 0 && (C = x.scrollTop), x.scrollLeft === P && x.scrollTop === C ? null : {
1197
1199
  horizontalScrollDirection: x.scrollLeft < P ? "forward" : "backward",
1198
1200
  scrollLeft: P,
1199
- scrollTop: T,
1201
+ scrollTop: C,
1200
1202
  scrollUpdateWasRequested: !0,
1201
- verticalScrollDirection: x.scrollTop < T ? "forward" : "backward"
1203
+ verticalScrollDirection: x.scrollTop < C ? "forward" : "backward"
1202
1204
  };
1203
1205
  }, this._resetIsScrollingDebounced);
1204
- }, C.scrollToItem = function(p) {
1205
- var P = p.align, T = P === void 0 ? "auto" : P, x = p.columnIndex, E = p.rowIndex, I = this.props, O = I.columnCount, R = I.height, k = I.rowCount, z = I.width, y = this.state, N = y.scrollLeft, M = y.scrollTop, V = Ro();
1206
+ }, T.scrollToItem = function(p) {
1207
+ var P = p.align, C = P === void 0 ? "auto" : P, x = p.columnIndex, E = p.rowIndex, I = this.props, O = I.columnCount, R = I.height, k = I.rowCount, z = I.width, y = this.state, N = y.scrollLeft, M = y.scrollTop, V = Ro();
1206
1208
  x !== void 0 && (x = Math.max(0, Math.min(x, O - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, k - 1)));
1207
1209
  var Z = c(this.props, this._instanceProps), Y = s(this.props, this._instanceProps), B = Y > z ? V : 0, j = Z > R ? V : 0;
1208
1210
  this.scrollTo({
1209
- scrollLeft: x !== void 0 ? l(this.props, x, T, N, this._instanceProps, j) : N,
1210
- scrollTop: E !== void 0 ? d(this.props, E, T, M, this._instanceProps, B) : M
1211
+ scrollLeft: x !== void 0 ? l(this.props, x, C, N, this._instanceProps, j) : N,
1212
+ scrollTop: E !== void 0 ? d(this.props, E, C, M, this._instanceProps, B) : M
1211
1213
  });
1212
- }, C.componentDidMount = function() {
1213
- var p = this.props, P = p.initialScrollLeft, T = p.initialScrollTop;
1214
+ }, T.componentDidMount = function() {
1215
+ var p = this.props, P = p.initialScrollLeft, C = p.initialScrollTop;
1214
1216
  if (this._outerRef != null) {
1215
1217
  var x = this._outerRef;
1216
- typeof P == "number" && (x.scrollLeft = P), typeof T == "number" && (x.scrollTop = T);
1218
+ typeof P == "number" && (x.scrollLeft = P), typeof C == "number" && (x.scrollTop = C);
1217
1219
  }
1218
1220
  this._callPropsCallbacks();
1219
- }, C.componentDidUpdate = function() {
1220
- var p = this.props.direction, P = this.state, T = P.scrollLeft, x = P.scrollTop, E = P.scrollUpdateWasRequested;
1221
+ }, T.componentDidUpdate = function() {
1222
+ var p = this.props.direction, P = this.state, C = P.scrollLeft, x = P.scrollTop, E = P.scrollUpdateWasRequested;
1221
1223
  if (E && this._outerRef != null) {
1222
1224
  var I = this._outerRef;
1223
1225
  if (p === "rtl")
1224
1226
  switch (Bt()) {
1225
1227
  case "negative":
1226
- I.scrollLeft = -T;
1228
+ I.scrollLeft = -C;
1227
1229
  break;
1228
1230
  case "positive-ascending":
1229
- I.scrollLeft = T;
1231
+ I.scrollLeft = C;
1230
1232
  break;
1231
1233
  default:
1232
1234
  var O = I.clientWidth, R = I.scrollWidth;
1233
- I.scrollLeft = R - O - T;
1235
+ I.scrollLeft = R - O - C;
1234
1236
  break;
1235
1237
  }
1236
1238
  else
1237
- I.scrollLeft = Math.max(0, T);
1239
+ I.scrollLeft = Math.max(0, C);
1238
1240
  I.scrollTop = Math.max(0, x);
1239
1241
  }
1240
1242
  this._callPropsCallbacks();
1241
- }, C.componentWillUnmount = function() {
1243
+ }, T.componentWillUnmount = function() {
1242
1244
  this._resetIsScrollingTimeoutId !== null && jt(this._resetIsScrollingTimeoutId);
1243
- }, C.render = function() {
1244
- var p = this.props, P = p.children, T = p.className, x = p.columnCount, E = p.direction, I = p.height, O = p.innerRef, R = p.innerElementType, k = p.innerTagName, z = p.itemData, y = p.itemKey, N = y === void 0 ? Eo : y, M = p.outerElementType, V = p.outerTagName, Z = p.rowCount, Y = p.style, B = p.useIsScrolling, j = p.width, te = this.state.isScrolling, ae = this._getHorizontalRangeToRender(), J = ae[0], ne = ae[1], he = this._getVerticalRangeToRender(), ce = he[0], Oe = he[1], ve = [];
1245
+ }, T.render = function() {
1246
+ var p = this.props, P = p.children, C = p.className, x = p.columnCount, E = p.direction, I = p.height, O = p.innerRef, R = p.innerElementType, k = p.innerTagName, z = p.itemData, y = p.itemKey, N = y === void 0 ? Eo : y, M = p.outerElementType, V = p.outerTagName, Z = p.rowCount, Y = p.style, B = p.useIsScrolling, j = p.width, te = this.state.isScrolling, ae = this._getHorizontalRangeToRender(), J = ae[0], ne = ae[1], he = this._getVerticalRangeToRender(), ce = he[0], Oe = he[1], ve = [];
1245
1247
  if (x > 0 && Z)
1246
1248
  for (var me = ce; me <= Oe; me++)
1247
1249
  for (var le = J; le <= ne; le++)
@@ -1259,7 +1261,7 @@ function Oo(e) {
1259
1261
  }));
1260
1262
  var De = c(this.props, this._instanceProps), tt = s(this.props, this._instanceProps);
1261
1263
  return He(M || V || "div", {
1262
- className: T,
1264
+ className: C,
1263
1265
  onScroll: this._onScroll,
1264
1266
  ref: this._outerRefSetter,
1265
1267
  style: Dr({
@@ -1280,9 +1282,9 @@ function Oo(e) {
1280
1282
  width: tt
1281
1283
  }
1282
1284
  }));
1283
- }, C._callPropsCallbacks = function() {
1284
- var p = this.props, P = p.columnCount, T = p.onItemsRendered, x = p.onScroll, E = p.rowCount;
1285
- if (typeof T == "function" && P > 0 && E > 0) {
1285
+ }, T._callPropsCallbacks = function() {
1286
+ var p = this.props, P = p.columnCount, C = p.onItemsRendered, x = p.onScroll, E = p.rowCount;
1287
+ if (typeof C == "function" && P > 0 && E > 0) {
1286
1288
  var I = this._getHorizontalRangeToRender(), O = I[0], R = I[1], k = I[2], z = I[3], y = this._getVerticalRangeToRender(), N = y[0], M = y[1], V = y[2], Z = y[3];
1287
1289
  this._callOnItemsRendered(O, R, N, M, k, z, V, Z);
1288
1290
  }
@@ -1290,14 +1292,14 @@ function Oo(e) {
1290
1292
  var Y = this.state, B = Y.horizontalScrollDirection, j = Y.scrollLeft, te = Y.scrollTop, ae = Y.scrollUpdateWasRequested, J = Y.verticalScrollDirection;
1291
1293
  this._callOnScroll(j, te, B, J, ae);
1292
1294
  }
1293
- }, C._getHorizontalRangeToRender = function() {
1294
- var p = this.props, P = p.columnCount, T = p.overscanColumnCount, x = p.overscanColumnsCount, E = p.overscanCount, I = p.rowCount, O = this.state, R = O.horizontalScrollDirection, k = O.isScrolling, z = O.scrollLeft, y = T || x || E || 1;
1295
+ }, T._getHorizontalRangeToRender = function() {
1296
+ var p = this.props, P = p.columnCount, C = p.overscanColumnCount, x = p.overscanColumnsCount, E = p.overscanCount, I = p.rowCount, O = this.state, R = O.horizontalScrollDirection, k = O.isScrolling, z = O.scrollLeft, y = C || x || E || 1;
1295
1297
  if (P === 0 || I === 0)
1296
1298
  return [0, 0, 0, 0];
1297
1299
  var N = o(this.props, z, this._instanceProps), M = r(this.props, N, z, this._instanceProps), V = !k || R === "backward" ? Math.max(1, y) : 1, Z = !k || R === "forward" ? Math.max(1, y) : 1;
1298
1300
  return [Math.max(0, N - V), Math.max(0, Math.min(P - 1, M + Z)), N, M];
1299
- }, C._getVerticalRangeToRender = function() {
1300
- var p = this.props, P = p.columnCount, T = p.overscanCount, x = p.overscanRowCount, E = p.overscanRowsCount, I = p.rowCount, O = this.state, R = O.isScrolling, k = O.verticalScrollDirection, z = O.scrollTop, y = x || E || T || 1;
1301
+ }, T._getVerticalRangeToRender = function() {
1302
+ var p = this.props, P = p.columnCount, C = p.overscanCount, x = p.overscanRowCount, E = p.overscanRowsCount, I = p.rowCount, O = this.state, R = O.isScrolling, k = O.verticalScrollDirection, z = O.scrollTop, y = x || E || C || 1;
1301
1303
  if (P === 0 || I === 0)
1302
1304
  return [0, 0, 0, 0];
1303
1305
  var N = h(this.props, z, this._instanceProps), M = g(this.props, N, z, this._instanceProps), V = !R || k === "backward" ? Math.max(1, y) : 1, Z = !R || k === "forward" ? Math.max(1, y) : 1;
@@ -1520,8 +1522,8 @@ function Ho(e) {
1520
1522
  const l = typeof document < "u" && document.attachEvent;
1521
1523
  if (!l) {
1522
1524
  c = function(_) {
1523
- const m = _.__resizeTriggers__, C = m.firstElementChild, S = m.lastElementChild, p = C.firstElementChild;
1524
- S.scrollLeft = S.scrollWidth, S.scrollTop = S.scrollHeight, p.style.width = C.offsetWidth + 1 + "px", p.style.height = C.offsetHeight + 1 + "px", C.scrollLeft = C.scrollWidth, C.scrollTop = C.scrollHeight;
1525
+ const m = _.__resizeTriggers__, T = m.firstElementChild, S = m.lastElementChild, p = T.firstElementChild;
1526
+ S.scrollLeft = S.scrollWidth, S.scrollTop = S.scrollHeight, p.style.width = T.offsetWidth + 1 + "px", p.style.height = T.offsetHeight + 1 + "px", T.scrollLeft = T.scrollWidth, T.scrollTop = T.scrollHeight;
1525
1527
  }, i = function(_) {
1526
1528
  return _.offsetWidth !== _.__resizeLast__.width || _.offsetHeight !== _.__resizeLast__.height;
1527
1529
  }, s = function(_) {
@@ -1567,8 +1569,8 @@ function Ho(e) {
1567
1569
  const v = b.createElement("div");
1568
1570
  v.className = "expand-trigger", v.appendChild(b.createElement("div"));
1569
1571
  const _ = b.createElement("div");
1570
- _.className = "contract-trigger", h.__resizeTriggers__.appendChild(v), h.__resizeTriggers__.appendChild(_), h.appendChild(h.__resizeTriggers__), c(h), h.addEventListener("scroll", s, !0), o && (h.__resizeTriggers__.__animationListener__ = function(C) {
1571
- C.animationName === n && c(h);
1572
+ _.className = "contract-trigger", h.__resizeTriggers__.appendChild(v), h.__resizeTriggers__.appendChild(_), h.appendChild(h.__resizeTriggers__), c(h), h.addEventListener("scroll", s, !0), o && (h.__resizeTriggers__.__animationListener__ = function(T) {
1573
+ T.animationName === n && c(h);
1572
1574
  }, h.__resizeTriggers__.addEventListener(o, h.__resizeTriggers__.__animationListener__));
1573
1575
  }
1574
1576
  h.__resizeListeners__.push(g);
@@ -1708,14 +1710,14 @@ const Go = ({ widths: e, heights: t }) => {
1708
1710
  );
1709
1711
  }, Uo = (e, t, n) => {
1710
1712
  const o = W(), { contentRef: r } = be(), { heights: i, widths: c } = Qe(), { setFocusedPage: s } = ie(), [l, d] = $([]), { smoothScrolling: u } = Tt(), f = St(l, 100, 500), h = F(() => i.map((b, w) => {
1711
- const v = c[w], _ = Wr(w + 1, e), m = v * _.columnIndex, C = b * _.rowIndex, S = m + v, p = C + b;
1713
+ const v = c[w], _ = Wr(w + 1, e), m = v * _.columnIndex, T = b * _.rowIndex, S = m + v, p = T + b;
1712
1714
  return {
1713
1715
  pageNumber: w + 1,
1714
1716
  ..._,
1715
1717
  width: v,
1716
1718
  height: b,
1717
1719
  startX: m,
1718
- startY: C,
1720
+ startY: T,
1719
1721
  endX: S,
1720
1722
  endY: p
1721
1723
  };
@@ -1732,15 +1734,15 @@ const Go = ({ widths: e, heights: t }) => {
1732
1734
  endTop: w.scrollTop + w.clientHeight,
1733
1735
  endLeft: w.scrollLeft + w.clientWidth
1734
1736
  }, _ = h.filter((m) => {
1735
- const C = m.endX >= v.startLeft && m.endY >= v.startTop, S = m.startX <= v.endLeft && m.startY <= v.endTop;
1736
- return C && S;
1737
+ const T = m.endX >= v.startLeft && m.endY >= v.startTop, S = m.startX <= v.endLeft && m.startY <= v.endTop;
1738
+ return T && S;
1737
1739
  }).map((m) => {
1738
- const C = v.startLeft > m.startX ? v.startLeft : m.startX, S = v.startTop > m.startY ? v.startTop : m.startY, p = v.endLeft < m.endX ? v.endLeft : m.endX, P = v.endTop < m.endY ? v.endTop : m.endY, T = p - C, x = P - S, I = +(T * x / (m.width * m.height) * 100).toFixed(2);
1740
+ const T = v.startLeft > m.startX ? v.startLeft : m.startX, S = v.startTop > m.startY ? v.startTop : m.startY, p = v.endLeft < m.endX ? v.endLeft : m.endX, P = v.endTop < m.endY ? v.endTop : m.endY, C = p - T, x = P - S, I = +(C * x / (m.width * m.height) * 100).toFixed(2);
1739
1741
  return {
1740
1742
  pageNumber: m.pageNumber,
1741
1743
  ratio: I
1742
1744
  };
1743
- }).sort((m, C) => C.ratio - m.ratio);
1745
+ }).sort((m, T) => T.ratio - m.ratio);
1744
1746
  d(_);
1745
1747
  });
1746
1748
  },
@@ -1755,7 +1757,7 @@ const Go = ({ widths: e, heights: t }) => {
1755
1757
  }, qo = nr(({ columnIndex: e, rowIndex: t, data: n, style: o }) => {
1756
1758
  const r = Mr(t, e, n.columnCount);
1757
1759
  return /* @__PURE__ */ a(Lt, { style: o, pageNumber: r }, r);
1758
- }, Wo), Ps = () => {
1760
+ }, Wo), Ss = () => {
1759
1761
  const { initialPage: e = 1, initialScrollMode: t } = sr(), { pagesRef: n, setPagesRef: o } = be(), { scrollToPage: r } = _n(), {
1760
1762
  virtualScrollRef: i,
1761
1763
  getVirtualScrollRef: c,
@@ -1765,10 +1767,10 @@ const Go = ({ widths: e, heights: t }) => {
1765
1767
  virtualScrollableElementRef: u,
1766
1768
  totalInnerDimensions: f,
1767
1769
  pageScrollElementRef: h
1768
- } = Je(), g = W(!0), { nextPage: b, prevPage: w, setFocusedPage: v, focusedPage: _ } = ie(), { scrollMode: m } = Ee(), { viewMode: C } = Ye(), S = W(null), { loading: p } = K(), { LoaderImageComponent: P } = pn(), { smoothScrolling: T, targetScrollPosition: x } = Tt(), E = W(
1770
+ } = Je(), g = W(!0), { nextPage: b, prevPage: w, setFocusedPage: v, focusedPage: _ } = ie(), { scrollMode: m } = Ee(), { viewMode: T } = Ye(), S = W(null), { loading: p } = K(), { LoaderImageComponent: P } = pn(), { smoothScrolling: C, targetScrollPosition: x } = Tt(), E = W(
1769
1771
  f
1770
1772
  ), I = W({
1771
- viewMode: C,
1773
+ viewMode: T,
1772
1774
  scrollMode: m
1773
1775
  }), O = W(!1), R = W(), { isFullScreen: k } = cr(), {
1774
1776
  pageDimension: z,
@@ -1821,10 +1823,10 @@ const Go = ({ widths: e, heights: t }) => {
1821
1823
  [u]
1822
1824
  ), le = L(
1823
1825
  (H, G) => {
1824
- if (I.current.viewMode !== C || I.current.scrollMode !== m) {
1826
+ if (I.current.viewMode !== T || I.current.scrollMode !== m) {
1825
1827
  j.current && clearTimeout(j.current), O.current = !0, r(_, "auto"), j.current = setTimeout(() => {
1826
1828
  requestAnimationFrame(() => {
1827
- I.current = { viewMode: C, scrollMode: m };
1829
+ I.current = { viewMode: T, scrollMode: m };
1828
1830
  });
1829
1831
  }, 100);
1830
1832
  return;
@@ -1849,7 +1851,7 @@ const Go = ({ widths: e, heights: t }) => {
1849
1851
  width: G.width
1850
1852
  };
1851
1853
  },
1852
- [i, C, m]
1854
+ [i, T, m]
1853
1855
  );
1854
1856
  A(() => {
1855
1857
  clearTimeout(R.current);
@@ -1869,7 +1871,7 @@ const Go = ({ widths: e, heights: t }) => {
1869
1871
  te.current = {
1870
1872
  scrollTop: H.scrollTop,
1871
1873
  scrollLeft: H.scrollLeft
1872
- }, Math.round(x.current.left) === Math.round(H.scrollLeft) && Math.round(x.current.top) === Math.round(H.scrollTop) && (T.current = !1);
1874
+ }, Math.round(x.current.left) === Math.round(H.scrollLeft) && Math.round(x.current.top) === Math.round(H.scrollTop) && (C.current = !1);
1873
1875
  }, []);
1874
1876
  A(() => () => {
1875
1877
  j.current && clearTimeout(j.current);
@@ -1926,7 +1928,7 @@ const Go = ({ widths: e, heights: t }) => {
1926
1928
  ref: s,
1927
1929
  style: { width: H, height: G },
1928
1930
  className: re(de["rp-pages"], de["rp-page-scrolling-wrapper"]),
1929
- children: C === Ue.DUAL_PAGE ? /* @__PURE__ */ a(Go, { widths: V, heights: N }) : /* @__PURE__ */ a(Vo, { widths: V, heights: N })
1931
+ children: T === Ue.DUAL_PAGE ? /* @__PURE__ */ a(Go, { widths: V, heights: N }) : /* @__PURE__ */ a(Vo, { widths: V, heights: N })
1930
1932
  }
1931
1933
  ) : Z ? /* @__PURE__ */ a(
1932
1934
  Ao,
@@ -2044,7 +2046,7 @@ const Go = ({ widths: e, heights: t }) => {
2044
2046
  ) })
2045
2047
  ] }) : null;
2046
2048
  };
2047
- var Rt = "Dialog", [Ln, Ss] = Vr(Rt), [Ko, se] = Ln(Rt), Rn = (e) => {
2049
+ var Rt = "Dialog", [Ln, xs] = Vr(Rt), [Ko, se] = Ln(Rt), Rn = (e) => {
2048
2050
  const {
2049
2051
  __scopeDialog: t,
2050
2052
  children: n,
@@ -2098,7 +2100,7 @@ var Nt = "DialogPortal", [Yo, En] = Ln(Nt, {
2098
2100
  forceMount: void 0
2099
2101
  }), On = (e) => {
2100
2102
  const { __scopeDialog: t, forceMount: n, children: o, container: r } = e, i = se(Nt, t);
2101
- return /* @__PURE__ */ a(Yo, { scope: t, forceMount: n, children: U.Children.map(o, (c) => /* @__PURE__ */ a(It, { present: n || i.open, children: /* @__PURE__ */ a(Jr, { asChild: !0, container: r, children: c }) })) });
2103
+ return /* @__PURE__ */ a(Yo, { scope: t, forceMount: n, children: U.Children.map(o, (c) => /* @__PURE__ */ a(It, { present: n || i.open, children: /* @__PURE__ */ a(Yr, { asChild: !0, container: r, children: c }) })) });
2102
2104
  };
2103
2105
  On.displayName = Nt;
2104
2106
  var Ze = "DialogOverlay", Dn = U.forwardRef(
@@ -2138,7 +2140,7 @@ var Qo = U.forwardRef(
2138
2140
  return U.useEffect(() => {
2139
2141
  const i = o.current;
2140
2142
  if (i)
2141
- return Kr(i);
2143
+ return Jr(i);
2142
2144
  }, []), /* @__PURE__ */ a(
2143
2145
  An,
2144
2146
  {
@@ -2187,9 +2189,9 @@ var Qo = U.forwardRef(
2187
2189
  ), An = U.forwardRef(
2188
2190
  (e, t) => {
2189
2191
  const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: i, ...c } = e, s = se(Ie, n), l = U.useRef(null), d = xt(t, l);
2190
- return Xr(), /* @__PURE__ */ D(xe, { children: [
2192
+ return Kr(), /* @__PURE__ */ D(xe, { children: [
2191
2193
  /* @__PURE__ */ a(
2192
- Yr,
2194
+ Xr,
2193
2195
  {
2194
2196
  asChild: !0,
2195
2197
  loop: !0,
@@ -2249,7 +2251,7 @@ Mn.displayName = Wn;
2249
2251
  function Ot(e) {
2250
2252
  return e ? "open" : "closed";
2251
2253
  }
2252
- var Hn = "DialogTitleWarning", [xs, $n] = qr(Hn, {
2254
+ var Hn = "DialogTitleWarning", [Is, $n] = qr(Hn, {
2253
2255
  contentName: Ie,
2254
2256
  titleName: Et,
2255
2257
  docsSlug: "dialog"
@@ -2485,7 +2487,7 @@ const Se = {
2485
2487
  return (_ = s.get(i)) == null ? void 0 : _.page.getViewport({ scale: 1, rotation: c });
2486
2488
  }, [s, i, c]), w = L(
2487
2489
  (_) => {
2488
- const m = ((b == null ? void 0 : b.width) || 0) + 2 * Ht, C = ((b == null ? void 0 : b.height) || 0) + 2 * Ht, S = (o == null ? void 0 : o.clientWidth) || 0, p = (o == null ? void 0 : o.clientHeight) || 0, P = uo(_, S, p, m, C);
2490
+ const m = ((b == null ? void 0 : b.width) || 0) + 2 * Ht, T = ((b == null ? void 0 : b.height) || 0) + 2 * Ht, S = (o == null ? void 0 : o.clientWidth) || 0, p = (o == null ? void 0 : o.clientHeight) || 0, P = uo(_, S, p, m, T);
2489
2491
  t(P);
2490
2492
  },
2491
2493
  [t, b]
@@ -2572,7 +2574,7 @@ const Se = {
2572
2574
  nextMatch: h,
2573
2575
  prevMatch: g,
2574
2576
  search: b
2575
- } = Sn(), { searchTool: w = !0 } = ge(), [v, _] = $(b), { localeMessages: m } = ue(), C = L(() => {
2577
+ } = Sn(), { searchTool: w = !0 } = ge(), [v, _] = $(b), { localeMessages: m } = ue(), T = L(() => {
2576
2578
  n(!0);
2577
2579
  }, []), S = L(() => {
2578
2580
  d(""), _(""), n(!1);
@@ -2584,7 +2586,7 @@ const Se = {
2584
2586
  y.key === "Escape" && t && S();
2585
2587
  },
2586
2588
  [t]
2587
- ), T = L(
2589
+ ), C = L(
2588
2590
  (y) => {
2589
2591
  y.shiftKey && y.key === "Enter" ? g() : y.key === "Enter" && b !== v ? d(v) : y.key === "Enter" && h();
2590
2592
  },
@@ -2617,7 +2619,7 @@ const Se = {
2617
2619
  {
2618
2620
  open: t,
2619
2621
  container: e,
2620
- triggerComponent: /* @__PURE__ */ a(q, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ a(ee, { onClick: C, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ a(on, {}) }) }),
2622
+ triggerComponent: /* @__PURE__ */ a(q, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ a(ee, { onClick: T, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ a(on, {}) }) }),
2621
2623
  children: /* @__PURE__ */ D("div", { className: Q["rp-search-tool-content"], children: [
2622
2624
  /* @__PURE__ */ D("div", { className: Q["rp-search-tool-input-wrapper"], children: [
2623
2625
  /* @__PURE__ */ D("div", { className: Q["rp-search-tool-input"], children: [
@@ -2625,7 +2627,7 @@ const Se = {
2625
2627
  cn,
2626
2628
  {
2627
2629
  value: v,
2628
- onKeyDown: T,
2630
+ onKeyDown: C,
2629
2631
  onChange: x,
2630
2632
  icon: /* @__PURE__ */ a(on, {}),
2631
2633
  placeholder: m == null ? void 0 : m.searchInputPlaceholder,
@@ -2854,7 +2856,7 @@ const Se = {
2854
2856
  }
2855
2857
  );
2856
2858
  }
2857
- ), Is = We((e, t) => {
2859
+ ), ys = We((e, t) => {
2858
2860
  const {
2859
2861
  children: n,
2860
2862
  slots: o,
@@ -2923,13 +2925,13 @@ export {
2923
2925
  Oi as L,
2924
2926
  Ti as M,
2925
2927
  Pi as O,
2926
- ws as P,
2927
- Ps as R,
2928
- Ts as S,
2929
- Cs as T,
2928
+ bs as P,
2929
+ Ss as R,
2930
+ Ps as S,
2931
+ Ts as T,
2930
2932
  Ri as Z,
2931
- bs as a,
2932
- Is as b,
2933
+ Cs as a,
2934
+ ys as b,
2933
2935
  Gn as c,
2934
2936
  et as d,
2935
2937
  Sn as e,