@pdf-viewer/react 1.7.2 → 1.7.3-rc.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/{Popover-b7402893.js → Popover-1faa77f6.js} +80 -80
  2. package/dist/{RPDefaultLayout-8b0d26d6.js → RPDefaultLayout-7af301cf.js} +915 -901
  3. package/dist/assets/DropDown.css +1 -1
  4. package/dist/assets/Popover.css +1 -1
  5. package/dist/assets/RPDefaultLayout.css +1 -1
  6. package/dist/assets/RotateTool.css +1 -1
  7. package/dist/components/RPController.js +1 -1
  8. package/dist/components/RPPages.js +1 -1
  9. package/dist/components/RPProvider.js +1 -1
  10. package/dist/components/layout/LayoutContainer.js +1 -1
  11. package/dist/components/layout/RPDefaultLayout.js +1 -1
  12. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  13. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  14. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  15. package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
  16. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  17. package/dist/components/layout/toolbar/MostPageTool.js +1 -1
  18. package/dist/components/layout/toolbar/OtherTool.js +1 -1
  19. package/dist/components/layout/toolbar/Paginate.js +1 -1
  20. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  21. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  22. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  23. package/dist/components/layout/toolbar/RotateTool.js +5 -5
  24. package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
  25. package/dist/components/layout/toolbar/SearchTool.js +2 -2
  26. package/dist/components/layout/toolbar/ZoomTool.js +1 -1
  27. package/dist/components/page/AnnotationLayer.js +1 -1
  28. package/dist/components/page/CanvasLayer.js +1 -1
  29. package/dist/components/page/DualPage.js +1 -1
  30. package/dist/components/page/RPPage.js +1 -1
  31. package/dist/components/page/SinglePage.js +1 -1
  32. package/dist/components/page/TextHighlightLayer.js +1 -1
  33. package/dist/components/page/TextLayer.js +1 -1
  34. package/dist/components/ui/DropDown.js +10 -10
  35. package/dist/components/ui/LoadingIndicator.js +1 -1
  36. package/dist/components/ui/Popover.js +1 -1
  37. package/dist/contexts/DimensionPagesContext.js +18 -18
  38. package/dist/contexts/PaginationContext.js +1 -1
  39. package/dist/contexts/PrintContext.js +1 -1
  40. package/dist/contexts/SearchContext.js +1 -1
  41. package/dist/contexts/ThumbnailsContext.js +1 -1
  42. package/dist/contexts/ZoomContext.js +10 -10
  43. package/dist/main.js +1 -1
  44. package/dist/types/utils/types.d.ts +1 -0
  45. package/dist/utils/hooks/useFileDownload.js +1 -1
  46. package/dist/utils/hooks/useLicense.js +1 -1
  47. package/dist/utils/hooks/useLoadPdf.js +29 -24
  48. package/dist/utils/hooks/usePaginate.js +1 -1
  49. package/dist/utils/hooks/usePresentPage.js +1 -1
  50. package/dist/utils/hooks/usePrint.js +1 -1
  51. package/dist/utils/hooks/useScrollToPage.js +1 -1
  52. package/dist/utils/hooks/useSearch.js +1 -1
  53. package/dist/utils/hooks/useThumbnail.js +1 -1
  54. package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
  55. package/dist/utils/hooks/useWatermark.js +1 -1
  56. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
- import { jsx as i, Fragment as fe, jsxs as F } from "react/jsx-runtime";
1
+ import { jsx as i, Fragment as me, jsxs as W } from "react/jsx-runtime";
2
2
  import * as B from "react";
3
- import { useRef as H, useEffect as W, useCallback as N, useState as $, useMemo as k, createContext as Ye, useContext as Je, forwardRef as $e, useImperativeHandle as cn, createElement as qe, PureComponent as Qn, Component as er, memo as ln } from "react";
3
+ import { useRef as H, useEffect as F, useCallback as N, useState as $, useMemo as k, createContext as Ye, useContext as Je, forwardRef as $e, useImperativeHandle as cn, createElement as qe, PureComponent as Qn, Component as er, memo as ln } from "react";
4
4
  import { ChevronUpIcon as He } from "./components/icons/ChevronUpIcon.js";
5
5
  import { UIButton as re } from "./components/ui/Button.js";
6
6
  import { UIInput as dn } from "./components/ui/Input.js";
7
- import { ViewMode as xe, ScrollMode as J, AnnotationSubType as zt, SelectionMode as tr, ZoomLevel as at } from "./utils/types.js";
8
- import { useScrollModeContext as Re } from "./contexts/ScrollModeContext.js";
7
+ import { ViewMode as Ie, ScrollMode as J, AnnotationSubType as zt, SelectionMode as tr, ZoomLevel as at } from "./utils/types.js";
8
+ import { useScrollModeContext as Le } from "./contexts/ScrollModeContext.js";
9
9
  import { useDocumentContext as Q } from "./contexts/RPDocumentContext.js";
10
10
  import { useDocumentPasswordContext as nr } from "./contexts/DocumentPasswordContext.js";
11
11
  import { useDarkModeContext as rr } from "./contexts/DarkModeContext.js";
@@ -31,10 +31,10 @@ import { useDownloadContext as hr } from "./contexts/DownloadContext.js";
31
31
  import { useSmoothScrollContext as pn } from "./contexts/SmoothScrollContext.js";
32
32
  import { useLoaderContext as hn } from "./contexts/LoaderContext.js";
33
33
  import "./components/RPConfig.js";
34
- import { ThumbnailIcon as mr } from "./components/icons/Thumbnail.js";
34
+ import { ThumbnailIcon as fr } from "./components/icons/Thumbnail.js";
35
35
  import { c as ne } from "./clsx-0c6e471a.js";
36
36
  import { LoaderIcon as Ct } from "./components/icons/LoaderIcon.js";
37
- import { useInfiniteScroll as fr } from "./utils/hooks/useInfiniteScroll.js";
37
+ import { useInfiniteScroll as mr } from "./utils/hooks/useInfiniteScroll.js";
38
38
  import { RPSplitter as gr } from "./components/layout/sidebar/RPSplitter.js";
39
39
  import { useToolbarComponentContext as ve, ToolbarComponentProvider as vr } from "./contexts/ToolbarComponentContext.js";
40
40
  import { useIconContext as pe, IconProvider as wr } from "./contexts/IconContext.js";
@@ -45,11 +45,11 @@ import { RPDropFileZone as Cr } from "./components/RPDropFileZone.js";
45
45
  import { useViewportContext as Ce, ViewportProvider as Pr } from "./contexts/ViewportContext.js";
46
46
  import { useThemeContext as Tr } from "./contexts/ThemeContext.js";
47
47
  import * as Sr from "pdfjs-dist";
48
- import { PixelsPerInch as yr, AnnotationMode as Ir, RenderingCancelledException as xr, AnnotationLayer as Lr } from "pdfjs-dist";
49
- import { SimpleLinkService as Rr } from "./utils/link_service.js";
48
+ import { PixelsPerInch as yr, AnnotationMode as xr, RenderingCancelledException as Ir, AnnotationLayer as Rr } from "pdfjs-dist";
49
+ import { SimpleLinkService as Lr } from "./utils/link_service.js";
50
50
  import { annotationsEvents as Er, annotationEventsHandler as Nr, handleClick as At, handleAnnotationWidget as Or, handleAnnotationLink as Dr, bindLayerEvents as zr, unbindLayerEvents as Ft } from "./utils/annotations.js";
51
51
  import { normalizeSingleKeyword as Ar, sortHighlightPosition as Fr, unwrap as Wr } from "./components/page/searchHighlight.js";
52
- import { _ as kr, U as Mr } from "./Popover-b7402893.js";
52
+ import { _ as kr, U as Mr } from "./Popover-1faa77f6.js";
53
53
  import { useMousePressed as Hr } from "./utils/hooks/useMousePressed.js";
54
54
  import { useGrabScroll as $r } from "./utils/hooks/useGrabScroll.js";
55
55
  import { usePinch as Gr } from "./utils/hooks/usePinch.js";
@@ -61,10 +61,10 @@ import { getWordPositionInPage as Br } from "./utils/getWordPositionInPage.js";
61
61
  import { getThumbnailViewport as Wt } from "./utils/getThumbnailViewport.js";
62
62
  import { smoothScrollTo as st } from "./utils/smoothScrollTo.js";
63
63
  import { appConsole as Zr } from "./utils/appConsole.js";
64
- import { FileUploadTool as mn } from "./components/layout/toolbar/FileUploadTool.js";
64
+ import { FileUploadTool as fn } from "./components/layout/toolbar/FileUploadTool.js";
65
65
  import { DarkModeTool as jr } from "./components/layout/toolbar/DarkModeTool.js";
66
66
  import { ThreeDotIcon as Kr } from "./components/icons/ThreeDotIcon.js";
67
- import { UIDropDown as fn } from "./components/ui/DropDown.js";
67
+ import { UIDropDown as mn } from "./components/ui/DropDown.js";
68
68
  import { e as Xr, a as Tt, P as Ve, c as Me, g as St, i as Yr, k as Jr, f as Qr } from "./index-1cb41342.js";
69
69
  import { D as eo, u as ct } from "./index-aa2d3884.js";
70
70
  import { a as to, u as no, F as ro, b as oo, G as Ke } from "./index-7279fb4e.js";
@@ -76,9 +76,9 @@ import { useOtherToolContext as co, OtherToolProvider as lo } from "./contexts/O
76
76
  import { DocumentProperties as uo } from "./components/layout/toolbar/DocumentProperties.js";
77
77
  import { RotateTool as po } from "./components/layout/toolbar/RotateTool.js";
78
78
  import { ViewModeTool as ho } from "./components/layout/toolbar/ViewModeTool.js";
79
- import { ScrollModeTool as mo } from "./components/layout/toolbar/ScrollModeTool.js";
79
+ import { ScrollModeTool as fo } from "./components/layout/toolbar/ScrollModeTool.js";
80
80
  import { MenuSeparator as yt } from "./components/layout/toolbar/MenuSeparator.js";
81
- import { FileDownloadDefaultIcon as fo } from "./components/icons/FileDownloadDefaultIcon.js";
81
+ import { FileDownloadDefaultIcon as mo } from "./components/icons/FileDownloadDefaultIcon.js";
82
82
  import { MenuItem as be } from "./components/layout/toolbar/MenuItem.js";
83
83
  import { PrintDefaultTool as go } from "./components/icons/PrintDefaultIcon.js";
84
84
  import { FullScreenTool as gn } from "./components/layout/toolbar/FullScreenTool.js";
@@ -94,18 +94,18 @@ import { UICheckbox as $t } from "./components/ui/Checkbox.js";
94
94
  import { ClearIcon as Po } from "./components/icons/ClearIcon.js";
95
95
  import { InfoIcon as Gt } from "./components/icons/InfoIcon.js";
96
96
  import './assets/RPDefaultLayout.css';const wn = () => {
97
- const { viewMode: t } = Ee(), { scrollMode: e } = Re(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), l = H(), { columnCount: c } = un(), { widths: d, heights: p } = Ue(), f = H(e), _ = H(t), h = H(c), { targetScrollPage: v } = pn();
98
- W(() => {
97
+ const { viewMode: t } = Ee(), { scrollMode: e } = Le(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), l = H(), { columnCount: c } = un(), { widths: d, heights: h } = Ue(), m = H(e), P = H(t), p = H(c), { targetScrollPage: v } = pn();
98
+ F(() => {
99
99
  n != null && n.scrollToItem && (l.current = n);
100
- }, [n]), W(() => {
101
- f.current = e, _.current = t;
100
+ }, [n]), F(() => {
101
+ m.current = e, P.current = t;
102
102
  }, [e, t]);
103
103
  const w = N(
104
- (P, S) => {
104
+ (b, T) => {
105
105
  if (!r)
106
106
  return;
107
- const u = Math.ceil(P / 2) * 2 - 1;
108
- if (P === u + 1) {
107
+ const u = Math.ceil(b / 2) * 2 - 1;
108
+ if (b === u + 1) {
109
109
  const g = {
110
110
  left: d[u],
111
111
  top: 0
@@ -114,38 +114,38 @@ import './assets/RPDefaultLayout.css';const wn = () => {
114
114
  (s) => st(r, g, s)
115
115
  );
116
116
  }
117
- const m = {
117
+ const f = {
118
118
  left: 0,
119
119
  top: 0
120
120
  };
121
121
  return r == null ? void 0 : r.scrollTo({
122
- ...m,
123
- behavior: S
122
+ ...f,
123
+ behavior: T
124
124
  });
125
125
  },
126
126
  [r, d, st]
127
127
  );
128
- return W(() => {
129
- f.current = e, _.current = t;
130
- }, [e, t]), W(() => {
131
- h.current = c;
128
+ return F(() => {
129
+ m.current = e, P.current = t;
130
+ }, [e, t]), F(() => {
131
+ p.current = c;
132
132
  }, [c]), { scrollToPage: N(
133
- (P, S = "smooth") => {
134
- a(P);
135
- const u = P - 1;
136
- let m = u, g = 0;
137
- if (_.current === xe.DUAL_PAGE && f.current === J.PAGE_SCROLLING) {
138
- w(P, S);
133
+ (b, T = "smooth") => {
134
+ a(b);
135
+ const u = b - 1;
136
+ let f = u, g = 0;
137
+ if (P.current === Ie.DUAL_PAGE && m.current === J.PAGE_SCROLLING) {
138
+ w(b, T);
139
139
  return;
140
140
  }
141
- if (f.current === J.PAGE_SCROLLING) {
142
- a(P);
141
+ if (m.current === J.PAGE_SCROLLING) {
142
+ a(b);
143
143
  return;
144
144
  }
145
145
  if (!l.current || !o)
146
146
  return;
147
147
  const s = o;
148
- if (v.current = P, f.current === J.HORIZONTAL_SCROLLING) {
148
+ if (v.current = b, m.current === J.HORIZONTAL_SCROLLING) {
149
149
  g = u;
150
150
  const y = {
151
151
  left: Ae(d, g),
@@ -153,27 +153,27 @@ import './assets/RPDefaultLayout.css';const wn = () => {
153
153
  };
154
154
  return s.scrollTo({
155
155
  ...y,
156
- behavior: S
156
+ behavior: T
157
157
  });
158
158
  }
159
- if (_.current === xe.DUAL_PAGE) {
160
- g = u % 2, m = Math.floor(u / 2);
159
+ if (P.current === Ie.DUAL_PAGE) {
160
+ g = u % 2, f = Math.floor(u / 2);
161
161
  const y = {
162
162
  left: Ae(d, g),
163
- top: Ae(p, m)
163
+ top: Ae(h, f)
164
164
  };
165
165
  return s.scrollTo({
166
166
  ...y,
167
- behavior: S
167
+ behavior: T
168
168
  });
169
169
  }
170
170
  const C = {
171
171
  left: 0,
172
- top: Ae(p, m)
172
+ top: Ae(h, f)
173
173
  };
174
174
  return s.scrollTo({
175
175
  ...C,
176
- behavior: S
176
+ behavior: T
177
177
  });
178
178
  },
179
179
  [
@@ -182,47 +182,47 @@ import './assets/RPDefaultLayout.css';const wn = () => {
182
182
  w,
183
183
  a,
184
184
  st,
185
- p,
185
+ h,
186
186
  d
187
187
  ]
188
188
  ) };
189
189
  }, To = (t = 1) => {
190
- const [e, n] = $(t), [o, r] = $(0), { scrollToPage: a } = wn(), l = H(1), { viewMode: c } = Ee(), { scrollMode: d } = Re(), { widths: p } = Ue(), { pagesRef: f } = ge(), _ = Pt(e, 100), h = N(
191
- (m) => {
192
- if (!/^[0-9]*$/g.test(m.toString()) || !m)
190
+ const [e, n] = $(t), [o, r] = $(0), { scrollToPage: a } = wn(), l = H(1), { viewMode: c } = Ee(), { scrollMode: d } = Le(), { widths: h } = Ue(), { pagesRef: m } = ge(), P = Pt(e, 100), p = N(
191
+ (f) => {
192
+ if (!/^[0-9]*$/g.test(f.toString()) || !f)
193
193
  return { success: !1, currentPage: l.current };
194
- const s = +m;
195
- return s < 0 || s > o ? { success: !1, currentPage: l.current } : (n(s), l.current = s, { success: !0, currentPage: +m });
194
+ const s = +f;
195
+ return s < 0 || s > o ? { success: !1, currentPage: l.current } : (n(s), l.current = s, { success: !0, currentPage: +f });
196
196
  },
197
197
  [o]
198
- ), v = N(h, [h]), w = N(
199
- (m) => {
200
- const g = h(m);
198
+ ), v = N(p, [p]), w = N(
199
+ (f) => {
200
+ const g = p(f);
201
201
  return g.success && a(g.currentPage), g;
202
202
  },
203
- [h, a]
204
- ), T = N((m) => {
205
- const g = m % 2 === 1;
206
- if (!f || g)
203
+ [p, a]
204
+ ), S = N((f) => {
205
+ const g = f % 2 === 1;
206
+ if (!m || g)
207
207
  return !1;
208
- const s = g ? p[m] : p[m - 1], C = g ? p[m + 1] : p[m];
209
- return c === xe.DUAL_PAGE && s + C < f.clientWidth;
210
- }, [c, p, f, o]), P = N(() => {
211
- let m = e - 1;
212
- T(m) && (m = e - 2), w(m);
213
- }, [w, e, c, d, T]), S = k(() => c === xe.DUAL_PAGE && d === J.PAGE_SCROLLING ? e === o - 1 : e === o, [e, o, c, d]), u = N(() => {
214
- if (S)
208
+ const s = g ? h[f] : h[f - 1], C = g ? h[f + 1] : h[f];
209
+ return c === Ie.DUAL_PAGE && s + C < m.clientWidth;
210
+ }, [c, h, m, o]), b = N(() => {
211
+ let f = e - 1;
212
+ S(f) && (f = e - 2), w(f);
213
+ }, [w, e, c, d, S]), T = k(() => c === Ie.DUAL_PAGE && d === J.PAGE_SCROLLING ? e === o - 1 : e === o, [e, o, c, d]), u = N(() => {
214
+ if (T)
215
215
  return;
216
- let m = e + 1;
217
- T(m) && (m = e + 2), w(m);
218
- }, [w, e, T, c, d, S]);
216
+ let f = e + 1;
217
+ S(f) && (f = e + 2), w(f);
218
+ }, [w, e, S, c, d, T]);
219
219
  return {
220
- focusedPage: _,
220
+ focusedPage: P,
221
221
  totalPages: o,
222
222
  setFocusedPage: v,
223
223
  setTotalPages: r,
224
224
  nextPage: u,
225
- prevPage: P,
225
+ prevPage: b,
226
226
  goToPage: w
227
227
  };
228
228
  }, _n = Ye({
@@ -242,7 +242,7 @@ import './assets/RPDefaultLayout.css';const wn = () => {
242
242
  return typeof (t == null ? void 0 : t.focusedPage) > "u" && Zr.error("Please use this hooks inside children component of RPProvider"), t;
243
243
  }, ks = ({ children: t }) => {
244
244
  const { pdf: e } = Q(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: l, nextPage: c, prevPage: d } = To();
245
- return W(() => {
245
+ return F(() => {
246
246
  e != null && e.numPages && (a(e.numPages), r(1));
247
247
  }, [e, a, r]), /* @__PURE__ */ i(
248
248
  _n.Provider,
@@ -265,154 +265,154 @@ const So = () => {
265
265
  loadedPages: 0,
266
266
  totalPages: 0,
267
267
  percentage: 0
268
- }), [r, a] = $(!1), [l, c] = $(!1), [d, p] = $(null), f = H(!1);
269
- W(() => {
270
- f.current;
271
- }, [f]);
272
- const _ = N(() => {
268
+ }), [r, a] = $(!1), [l, c] = $(!1), [d, h] = $(null), m = H(!1);
269
+ F(() => {
270
+ m.current;
271
+ }, [m]);
272
+ const P = N(() => {
273
273
  document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
274
- const m = document.querySelector(".rp-print-zone");
275
- m && m.remove();
276
- }, []), h = N(() => {
277
- f.current = !1, a(!1), c(!1), p(null), o({
274
+ const f = document.querySelector(".rp-print-zone");
275
+ f && f.remove();
276
+ }, []), p = N(() => {
277
+ m.current = !1, a(!1), c(!1), h(null), o({
278
278
  loadedPages: 0,
279
279
  totalPages: 0,
280
280
  percentage: 0
281
281
  });
282
282
  }, []), v = () => {
283
- f.current = !0;
283
+ m.current = !0;
284
284
  }, w = async ({
285
- scratchCanvas: m,
285
+ scratchCanvas: f,
286
286
  pdfDocument: g,
287
287
  pageNumber: s,
288
288
  viewerPdfPage: C,
289
- printResolution: b,
289
+ printResolution: _,
290
290
  optionalContentConfigPromise: y,
291
291
  printAnnotationStoragePromise: E
292
292
  }) => {
293
- if (f.current) {
294
- h();
293
+ if (m.current) {
294
+ p();
295
295
  return;
296
296
  }
297
- const I = b / yr.PDF;
298
- m.width = Math.floor(C.width * I), m.height = Math.floor(C.height * I);
299
- const L = m.getContext("2d");
300
- L.save(), L.fillStyle = "rgb(255, 255, 255)", L.fillRect(0, 0, m.width, m.height), L.restore();
297
+ const x = _ / yr.PDF;
298
+ f.width = Math.floor(C.width * x), f.height = Math.floor(C.height * x);
299
+ const R = f.getContext("2d");
300
+ R.save(), R.fillStyle = "rgb(255, 255, 255)", R.fillRect(0, 0, f.width, f.height), R.restore();
301
301
  const [D, z] = await Promise.all([
302
302
  g.getPage(s),
303
303
  E
304
304
  ]);
305
- if (f.current) {
306
- h();
305
+ if (m.current) {
306
+ p();
307
307
  return;
308
308
  }
309
309
  const A = {
310
- canvasContext: L,
311
- transform: [I, 0, 0, I, 0, 0],
310
+ canvasContext: R,
311
+ transform: [x, 0, 0, x, 0, 0],
312
312
  viewport: D.getViewport({ scale: 1, rotation: C.rotation }),
313
313
  intent: "print",
314
- annotationMode: Ir.ENABLE_STORAGE,
314
+ annotationMode: xr.ENABLE_STORAGE,
315
315
  optionalContentConfigPromise: y,
316
316
  printAnnotationStorage: z
317
317
  };
318
318
  try {
319
319
  return D.render(A).promise;
320
- } catch (R) {
321
- throw R instanceof xr || console.error(R), R;
320
+ } catch (L) {
321
+ throw L instanceof Ir || console.error(L), L;
322
322
  }
323
- }, T = N(() => {
324
- const m = window.print;
323
+ }, S = N(() => {
324
+ const f = window.print;
325
325
  return new Promise((g) => {
326
326
  const s = (y) => {
327
327
  setTimeout(() => {
328
- m.call(window), setTimeout(() => y(), 20);
328
+ f.call(window), setTimeout(() => y(), 20);
329
329
  }, 0);
330
330
  };
331
331
  if (document.querySelector(".rp-print-zone")) {
332
332
  s(g);
333
333
  return;
334
334
  }
335
- const b = new MutationObserver(() => {
336
- document.querySelector(".rp-print-zone") && (s(g), b.disconnect());
335
+ const _ = new MutationObserver(() => {
336
+ document.querySelector(".rp-print-zone") && (s(g), _.disconnect());
337
337
  });
338
- b.observe(document.body, { childList: !0, subtree: !0 });
338
+ _.observe(document.body, { childList: !0, subtree: !0 });
339
339
  });
340
- }, []), P = async (m) => {
340
+ }, []), b = async (f) => {
341
341
  const g = document.createElement("img"), s = document.createElement("div");
342
- return s.classList.add("rp-print-page"), await new Promise((C, b) => {
343
- m.toBlob((y) => {
342
+ return s.classList.add("rp-print-page"), await new Promise((C, _) => {
343
+ f.toBlob((y) => {
344
344
  y ? (g.src = URL.createObjectURL(y), g.onload = () => {
345
345
  URL.revokeObjectURL(g.src), C();
346
- }, g.onerror = b) : b(new Error("Failed to create blob"));
346
+ }, g.onerror = _) : _(new Error("Failed to create blob"));
347
347
  });
348
348
  }).catch(() => {
349
349
  }), s.appendChild(g), s;
350
- }, S = (m, g) => {
350
+ }, T = (f, g) => {
351
351
  const s = document.createElement("div");
352
352
  s.classList.add("rp-print-zone");
353
- const C = document.createElement("style"), b = g.get(1);
354
- if (b) {
355
- const { width: y, height: E } = b == null ? void 0 : b.page.getViewport({ scale: 1 });
353
+ const C = document.createElement("style"), _ = g.get(1);
354
+ if (_) {
355
+ const { width: y, height: E } = _ == null ? void 0 : _.page.getViewport({ scale: 1 });
356
356
  C.innerHTML = `@page { size: ${y}px ${E}px }`;
357
357
  }
358
- return s.appendChild(C), s.append(...m), s;
358
+ return s.appendChild(C), s.append(...f), s;
359
359
  }, u = N(async () => {
360
360
  if (!t)
361
361
  return;
362
- h();
363
- const m = document.createElement("canvas"), g = [];
362
+ p();
363
+ const f = document.createElement("canvas"), g = [];
364
364
  try {
365
365
  t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
366
- const C = t.getOptionalContentConfig({ intent: "print" }), b = Promise.resolve(
366
+ const C = t.getOptionalContentConfig({ intent: "print" }), _ = Promise.resolve(
367
367
  t.annotationStorage.print ?? void 0
368
368
  ), y = e.size;
369
- for (const [I, L] of e) {
370
- if (f.current) {
371
- h();
369
+ for (const [x, R] of e) {
370
+ if (m.current) {
371
+ p();
372
372
  return;
373
373
  }
374
- const D = L.page.getViewport({ scale: 1 });
374
+ const D = R.page.getViewport({ scale: 1 });
375
375
  if (await w({
376
- scratchCanvas: m,
376
+ scratchCanvas: f,
377
377
  pdfDocument: t,
378
- pageNumber: I,
378
+ pageNumber: x,
379
379
  viewerPdfPage: D,
380
380
  printResolution: 150,
381
381
  optionalContentConfigPromise: C,
382
- printAnnotationStoragePromise: b
383
- }), f.current) {
384
- h();
382
+ printAnnotationStoragePromise: _
383
+ }), m.current) {
384
+ p();
385
385
  return;
386
386
  }
387
- const z = await P(m);
387
+ const z = await b(f);
388
388
  g.push(z);
389
389
  const A = parseFloat((g.length / y * 100).toFixed(2));
390
390
  o({
391
- loadedPages: I,
391
+ loadedPages: x,
392
392
  totalPages: y,
393
393
  percentage: A
394
394
  });
395
395
  }
396
- if (f.current) {
397
- h();
396
+ if (m.current) {
397
+ p();
398
398
  return;
399
399
  }
400
- const E = S(g, e);
401
- document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await T();
400
+ const E = T(g, e);
401
+ document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await S();
402
402
  } catch (s) {
403
- c(!0), s instanceof Error && p(s);
403
+ c(!0), s instanceof Error && h(s);
404
404
  } finally {
405
- m.height = 0, m.width = 0;
405
+ f.height = 0, f.width = 0;
406
406
  }
407
- }, [t, e, f]);
408
- return W(() => {
409
- const m = () => {
410
- h(), _();
407
+ }, [t, e, m]);
408
+ return F(() => {
409
+ const f = () => {
410
+ p(), P();
411
411
  };
412
- return window.addEventListener("afterprint", m, !0), () => {
413
- window.removeEventListener("afterprint", m, !0);
412
+ return window.addEventListener("afterprint", f, !0), () => {
413
+ window.removeEventListener("afterprint", f, !0);
414
414
  };
415
- }, [_, h]), {
415
+ }, [P, p]), {
416
416
  print: u,
417
417
  cancel: v,
418
418
  progress: n,
@@ -438,36 +438,36 @@ const So = () => {
438
438
  }
439
439
  }
440
440
  }), Ms = ({ children: t }) => {
441
- const [e, n] = $(null), [o, r] = $(null), { print: a, cancel: l, progress: c, isComplete: d, isError: p, error: f } = So(), _ = N((P) => {
442
- P && typeof P == "function" && r(() => P);
443
- }, []), h = (P) => {
444
- f && P(f);
441
+ const [e, n] = $(null), [o, r] = $(null), { print: a, cancel: l, progress: c, isComplete: d, isError: h, error: m } = So(), P = N((b) => {
442
+ b && typeof b == "function" && r(() => b);
443
+ }, []), p = (b) => {
444
+ m && b(m);
445
445
  }, v = N(
446
- (P) => {
447
- n(() => P);
446
+ (b) => {
447
+ n(() => b);
448
448
  },
449
449
  [c, e]
450
450
  );
451
- W(() => {
451
+ F(() => {
452
452
  d && o && w();
453
- }, [d, o]), W(() => {
454
- p && h((P) => {
455
- console.error(P);
453
+ }, [d, o]), F(() => {
454
+ h && p((b) => {
455
+ console.error(b);
456
456
  });
457
- }, [p]), W(() => {
457
+ }, [h]), F(() => {
458
458
  c && e && e(c);
459
459
  }, [c, e]);
460
460
  const w = () => {
461
461
  o && (o(), r(null));
462
- }, T = {
462
+ }, S = {
463
463
  print: a,
464
464
  cancel: l,
465
465
  setOnProgress: v,
466
- setOnComplete: _,
467
- setOnError: h,
466
+ setOnComplete: P,
467
+ setOnError: p,
468
468
  progress: c
469
469
  };
470
- return /* @__PURE__ */ i(bn.Provider, { value: T, children: t });
470
+ return /* @__PURE__ */ i(bn.Provider, { value: S, children: t });
471
471
  }, tt = () => {
472
472
  const t = Je(bn);
473
473
  if (!t)
@@ -478,34 +478,38 @@ const So = () => {
478
478
  (c) => {
479
479
  if (!n.size)
480
480
  return;
481
- const d = c > n.size ? n.size : c, p = Array.from(n.values()).slice(0, d).map((h) => {
482
- const { thumbnailViewport: v, scale: w } = Wt(h.page, o);
481
+ const d = c > n.size ? n.size : c, h = Array.from(n.values()).slice(0, d).map((p) => {
482
+ const { thumbnailViewport: v, scale: w } = Wt(
483
+ p.page,
484
+ o + p.defaultRotation
485
+ );
483
486
  return {
484
487
  scale: w,
485
- page: h.page,
488
+ page: p.page,
486
489
  loading: !0,
487
- viewport: v
490
+ viewport: v,
491
+ defaultRotation: p.defaultRotation
488
492
  };
489
- }), f = p.reduce((h, v) => (h[v.page.pageNumber] = v, h), {});
490
- e(f);
491
- const _ = [];
492
- for (const h of p) {
493
- const v = document.createElement("canvas"), w = vt(h.page, v, {
494
- scale: h.scale,
495
- rotate: o
493
+ }), m = h.reduce((p, v) => (p[v.page.pageNumber] = v, p), {});
494
+ e(m);
495
+ const P = [];
496
+ for (const p of h) {
497
+ const v = document.createElement("canvas"), w = vt(p.page, v, {
498
+ scale: p.scale,
499
+ rotate: o + p.defaultRotation
496
500
  }).promise.then(() => {
497
- const T = v.toDataURL();
501
+ const S = v.toDataURL();
498
502
  return {
499
- ...h,
500
- thumbnailSrc: T,
503
+ ...p,
504
+ thumbnailSrc: S,
501
505
  loading: !1
502
506
  };
503
507
  });
504
- _.push(w);
508
+ P.push(w);
505
509
  }
506
- Promise.all(_).then((h) => {
507
- const v = h.reduce(
508
- (w, T) => (w[T.page.pageNumber] = T, w),
510
+ Promise.all(P).then((p) => {
511
+ const v = p.reduce(
512
+ (w, S) => (w[S.page.pageNumber] = S, w),
509
513
  {}
510
514
  );
511
515
  e((w) => ({ ...w, ...v }));
@@ -514,7 +518,7 @@ const So = () => {
514
518
  },
515
519
  [n, o]
516
520
  );
517
- W(() => {
521
+ F(() => {
518
522
  a(10);
519
523
  }, [a]);
520
524
  const l = N(
@@ -524,8 +528,8 @@ const So = () => {
524
528
  const d = n.get(c);
525
529
  if (!d)
526
530
  return;
527
- e((f) => ({
528
- ...f,
531
+ e((m) => ({
532
+ ...m,
529
533
  [c]: {
530
534
  loading: !0,
531
535
  page: d.page,
@@ -533,18 +537,18 @@ const So = () => {
533
537
  scale: d.thumbnailScale
534
538
  }
535
539
  }));
536
- const p = document.createElement("canvas");
537
- vt(d.page, p, { scale: d.thumbnailScale, rotate: o }).promise.then(() => {
538
- const f = p.toDataURL(), { thumbnailViewport: _, scale: h } = Wt(d.page, o);
540
+ const h = document.createElement("canvas");
541
+ vt(d.page, h, { scale: d.thumbnailScale, rotate: o }).promise.then(() => {
542
+ const m = h.toDataURL(), { thumbnailViewport: P, scale: p } = Wt(d.page, o);
539
543
  return {
540
- scale: h,
541
- thumbnailSrc: f,
544
+ scale: p,
545
+ thumbnailSrc: m,
542
546
  page: d.page,
543
547
  loading: !1,
544
- viewport: _
548
+ viewport: P
545
549
  };
546
- }).then((f) => {
547
- e((_) => ({ ..._, [c]: f }));
550
+ }).then((m) => {
551
+ e((P) => ({ ...P, [c]: m }));
548
552
  });
549
553
  },
550
554
  [n, o]
@@ -572,80 +576,80 @@ const So = () => {
572
576
  children: t
573
577
  }
574
578
  );
575
- }, Io = (t = {}, e = "") => {
576
- const [n, o] = $(e), [r, a] = $(!1), { pdf: l, pages: c } = Q(), { widths: d, heights: p } = Ue(), f = H(!n), { currentZoom: _ } = Qe(), [h, v] = $([]), { setFocusedPage: w } = ie(), { columnCount: T } = Ee(), { rotate: P } = Ge(), [S, u] = $(0), { pageScrollElementRef: m, virtualScrollableElementRef: g } = et(), { scrollMode: s } = Re(), { pagesRef: C } = ge(), [b, y] = $(null), E = H({}), I = k(() => S === 0 ? null : h[S - 1], [S, h]), L = k(() => h.length, [h]);
577
- W(() => {
578
- if (!I || !c)
579
+ }, xo = (t = {}, e = "") => {
580
+ const [n, o] = $(e), [r, a] = $(!1), { pdf: l, pages: c } = Q(), { widths: d, heights: h } = Ue(), m = H(!n), { currentZoom: P } = Qe(), [p, v] = $([]), { setFocusedPage: w } = ie(), { columnCount: S } = Ee(), { rotate: b } = Ge(), [T, u] = $(0), { pageScrollElementRef: f, virtualScrollableElementRef: g } = et(), { scrollMode: s } = Le(), { pagesRef: C } = ge(), [_, y] = $(null), E = H({}), x = k(() => T === 0 ? null : p[T - 1], [T, p]), R = k(() => p.length, [p]);
581
+ F(() => {
582
+ if (!x || !c)
579
583
  return;
580
- const R = g || m;
581
- if (!R || !C)
584
+ const L = g || f;
585
+ if (!L || !C)
582
586
  return;
583
- const x = c.get(I.page);
584
- if (s === J.PAGE_SCROLLING && w(I.page), !x)
587
+ const I = c.get(x.page);
588
+ if (s === J.PAGE_SCROLLING && w(x.page), !I)
585
589
  return;
586
590
  let O = 0, M = 0;
587
591
  if (s === J.VERTICAL_SCROLLING) {
588
- const ae = I.page - 1, de = T, te = ae % de, Fe = Math.floor(ae / de);
589
- O = Ae(p, Fe), M = Ae(d, te);
592
+ const ae = x.page - 1, de = S, te = ae % de, Fe = Math.floor(ae / de);
593
+ O = Ae(h, Fe), M = Ae(d, te);
590
594
  }
591
- s === J.HORIZONTAL_SCROLLING && (M = d.slice(0, I.page - 1).reduce((ae, de) => ae + de, 0));
595
+ s === J.HORIZONTAL_SCROLLING && (M = d.slice(0, x.page - 1).reduce((ae, de) => ae + de, 0));
592
596
  const G = {
593
597
  top: C.clientHeight / 2,
594
598
  left: C.clientWidth / 2
595
599
  }, Z = {
596
- height: p[I.page - 1],
597
- width: d[I.page - 1]
600
+ height: h[x.page - 1],
601
+ width: d[x.page - 1]
598
602
  }, { leftInPage: j, topInPage: q } = Br(
599
603
  Z,
600
604
  G,
601
- I.rect,
602
- _,
603
- P
605
+ x.rect,
606
+ P,
607
+ b
604
608
  ), ee = M + j, X = O + q, le = {
605
609
  left: Math.max(ee, 0),
606
610
  top: Math.max(X, 0)
607
611
  };
608
- R.scrollTo({
612
+ L.scrollTo({
609
613
  ...le
610
614
  });
611
615
  }, [
612
616
  c,
613
617
  w,
614
618
  d,
615
- p,
616
- I,
619
+ h,
620
+ x,
617
621
  s,
618
622
  g,
619
- m,
623
+ f,
620
624
  C
621
625
  ]);
622
626
  const D = N(() => {
623
- u((R) => L ? R + 1 > L ? 1 : R + 1 : 0);
624
- }, [L]), z = N(() => {
625
- u((R) => L ? R - 1 <= 0 ? L : R - 1 : 0);
626
- }, [L]), A = N(async (R) => {
627
- if (!R)
627
+ u((L) => R ? L + 1 > R ? 1 : L + 1 : 0);
628
+ }, [R]), z = N(() => {
629
+ u((L) => R ? L - 1 <= 0 ? R : L - 1 : 0);
630
+ }, [R]), A = N(async (L) => {
631
+ if (!L)
628
632
  return {};
629
- const x = R.numPages, O = {};
630
- for (let M = 1; M <= x; M++) {
631
- if (f.current)
633
+ const I = L.numPages, O = {};
634
+ for (let M = 1; M <= I; M++) {
635
+ if (m.current)
632
636
  throw "close pop over";
633
- const G = await R.getPage(M);
637
+ const G = await L.getPage(M);
634
638
  O[M.toString()] = await G.getTextContent();
635
639
  }
636
640
  return O;
637
641
  }, []);
638
- return W(() => {
642
+ return F(() => {
639
643
  if (!n) {
640
- f.current = !0, v([]), u(0);
644
+ m.current = !0, v([]), u(0);
641
645
  return;
642
646
  }
643
- f.current = !1, a(!0), v([]), u(0), A(l).then((R) => {
644
- E.current = R;
645
- const O = Object.keys(R).reduce((M, G) => {
647
+ m.current = !1, a(!0), v([]), u(0), A(l).then((L) => {
648
+ E.current = L;
649
+ const O = Object.keys(L).reduce((M, G) => {
646
650
  const Z = cr(
647
651
  [n],
648
- R[G],
652
+ L[G],
649
653
  Number(G) - 1,
650
654
  t
651
655
  ).map((j, q) => ({ ...j, page: Number(G), pageMatchIdx: q }));
@@ -659,13 +663,13 @@ const So = () => {
659
663
  search: n,
660
664
  setSearch: o,
661
665
  loading: r,
662
- matches: h,
663
- totalMatches: L,
664
- currentMatchPosition: S,
665
- currentMatch: I,
666
+ matches: p,
667
+ totalMatches: R,
668
+ currentMatchPosition: T,
669
+ currentMatch: x,
666
670
  nextMatch: D,
667
671
  prevMatch: z,
668
- currentMatchElement: b,
672
+ currentMatchElement: _,
669
673
  setCurrentMatchElement: y
670
674
  };
671
675
  }, Tn = Ye({
@@ -696,13 +700,13 @@ const So = () => {
696
700
  totalMatches: l,
697
701
  currentMatchPosition: c,
698
702
  currentMatch: d,
699
- search: p,
700
- matches: f,
701
- nextMatch: _,
702
- prevMatch: h,
703
+ search: h,
704
+ matches: m,
705
+ nextMatch: P,
706
+ prevMatch: p,
703
707
  currentMatchElement: v,
704
708
  setCurrentMatchElement: w
705
- } = Io(n, e);
709
+ } = xo(n, e);
706
710
  return /* @__PURE__ */ i(
707
711
  Tn.Provider,
708
712
  {
@@ -714,17 +718,17 @@ const So = () => {
714
718
  totalMatches: l,
715
719
  currentMatchPosition: c,
716
720
  currentMatch: d,
717
- nextMatch: _,
718
- prevMatch: h,
719
- search: p,
720
- matches: f,
721
+ nextMatch: P,
722
+ prevMatch: p,
723
+ search: h,
724
+ matches: m,
721
725
  currentMatchElement: v,
722
726
  setCurrentMatchElement: w
723
727
  },
724
728
  children: t
725
729
  }
726
730
  );
727
- }, It = () => Je(Tn), ue = {
731
+ }, xt = () => Je(Tn), ue = {
728
732
  "rp-pages": "_rp-pages_1776r_1",
729
733
  "rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_1776r_7",
730
734
  "rp-pages-container": "_rp-pages-container_1776r_11",
@@ -737,82 +741,82 @@ const So = () => {
737
741
  "rp-page-wrapper": "_rp-page-wrapper_14ohm_1",
738
742
  "rp-page": "_rp-page_14ohm_1",
739
743
  "rp-loader-wrapper": "_rp-loader-wrapper_14ohm_15"
740
- }, xo = (t) => {
744
+ }, Io = (t) => {
741
745
  const { pageNumber: e, onLoaded: n, onLoading: o } = t, r = H(null), { pages: a } = Q(), { rotate: l } = Ge(), c = H(), { currentZoom: d } = Qe();
742
- return W(() => {
746
+ return F(() => {
743
747
  if (!a || d === 0)
744
748
  return;
745
- const p = a.get(e);
746
- if (r.current && p) {
747
- const f = r.current;
748
- f.hidden = !0;
749
- const _ = c.current;
750
- _ && _.cancel(), o && o(), c.current = vt(p.page, f, {
749
+ const h = a.get(e);
750
+ if (r.current && h) {
751
+ const m = r.current;
752
+ m.hidden = !0;
753
+ const P = c.current;
754
+ P && P.cancel(), o && o(), c.current = vt(h.page, m, {
751
755
  scale: d,
752
- rotate: l,
756
+ rotate: l + h.defaultRotation,
753
757
  renderForms: !0
754
758
  }), c.current.promise.then(() => {
755
- f.hidden = !1;
759
+ m.hidden = !1;
756
760
  }).catch(() => {
757
761
  }).finally(() => {
758
762
  n && n();
759
763
  });
760
764
  }
761
765
  return () => {
762
- var f;
763
- (f = c.current) == null || f.cancel();
766
+ var m;
767
+ (m = c.current) == null || m.cancel();
764
768
  };
765
769
  }, [a, e, l, d, o, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: r });
766
- }, Lo = "_selecting_usdup_9", he = {
770
+ }, Ro = "_selecting_usdup_9", he = {
767
771
  "rp-text-layer": "_rp-text-layer_usdup_1",
768
- selecting: Lo,
772
+ selecting: Ro,
769
773
  "rp-text-layer-text": "_rp-text-layer-text_usdup_39"
770
- }, Ro = (t) => {
771
- const { pageNumber: e } = t, { pages: n } = Q(), o = H(null), { matches: r, currentMatch: a, setCurrentMatchElement: l } = It(), [c, d] = $(
774
+ }, Lo = (t) => {
775
+ const { pageNumber: e } = t, { pages: n } = Q(), o = H(null), { matches: r, currentMatch: a, setCurrentMatchElement: l } = xt(), [c, d] = $(
772
776
  []
773
- ), p = H(), f = H(), _ = H([]), h = k(() => r.filter((m) => m.pageIndex === e - 1), [r, e]), v = N(
774
- (m, g, s = !1) => {
775
- if (s && lr(m, g), !h.length) {
776
- _.current = [], d([]);
777
+ ), h = H(), m = H(), P = H([]), p = k(() => r.filter((f) => f.pageIndex === e - 1), [r, e]), v = N(
778
+ (f, g, s = !1) => {
779
+ if (s && lr(f, g), !p.length) {
780
+ P.current = [], d([]);
777
781
  return;
778
782
  }
779
- const C = dr(h, m, g);
783
+ const C = dr(p, f, g);
780
784
  d(C);
781
785
  },
782
- [h]
783
- ), w = H(), T = H(!1), P = N(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
784
- W(() => ((() => {
786
+ [p]
787
+ ), w = H(), S = H(!1), b = N(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
788
+ F(() => ((() => {
785
789
  if (w.current)
786
790
  return;
787
791
  w.current = new AbortController();
788
792
  const { signal: g } = w.current, s = () => {
789
- P().forEach((b) => {
790
- const y = b.querySelector(".endOfContent");
791
- y && (b.appendChild(y), y.style.width = "", y.style.height = "", b.classList.remove(he.selecting));
793
+ b().forEach((_) => {
794
+ const y = _.querySelector(".endOfContent");
795
+ y && (_.appendChild(y), y.style.width = "", y.style.height = "", _.classList.remove(he.selecting));
792
796
  });
793
797
  };
794
798
  document.addEventListener(
795
799
  "pointerdown",
796
800
  () => {
797
- T.current = !0;
801
+ S.current = !0;
798
802
  },
799
803
  { signal: g }
800
804
  ), document.addEventListener(
801
805
  "pointerup",
802
806
  () => {
803
- T.current = !1, s();
807
+ S.current = !1, s();
804
808
  },
805
809
  { signal: g }
806
810
  ), window.addEventListener(
807
811
  "blur",
808
812
  () => {
809
- T.current = !1, s();
813
+ S.current = !1, s();
810
814
  },
811
815
  { signal: g }
812
816
  ), document.addEventListener(
813
817
  "keyup",
814
818
  () => {
815
- T.current || s();
819
+ S.current || s();
816
820
  },
817
821
  { signal: g }
818
822
  );
@@ -820,138 +824,138 @@ const So = () => {
820
824
  document.addEventListener(
821
825
  "selectionchange",
822
826
  () => {
823
- var A, R;
824
- const b = document.getSelection();
825
- if (!b)
827
+ var A, L;
828
+ const _ = document.getSelection();
829
+ if (!_)
826
830
  return;
827
- if (b.rangeCount === 0) {
831
+ if (_.rangeCount === 0) {
828
832
  s();
829
833
  return;
830
834
  }
831
835
  const y = /* @__PURE__ */ new Set();
832
- for (let x = 0; x < b.rangeCount; x++) {
833
- const O = b.getRangeAt(x);
834
- P().forEach((M) => {
836
+ for (let I = 0; I < _.rangeCount; I++) {
837
+ const O = _.getRangeAt(I);
838
+ b().forEach((M) => {
835
839
  O.intersectsNode(M) && !y.has(M) && y.add(M);
836
840
  });
837
841
  }
838
- P().forEach((x) => {
839
- if (y.has(x))
840
- x.classList.add(he.selecting);
842
+ b().forEach((I) => {
843
+ if (y.has(I))
844
+ I.classList.add(he.selecting);
841
845
  else {
842
- const O = x.querySelector(".endOfContent");
843
- O && (x.appendChild(O), O.style.width = "", O.style.height = "", x.classList.remove(he.selecting));
846
+ const O = I.querySelector(".endOfContent");
847
+ O && (I.appendChild(O), O.style.width = "", O.style.height = "", I.classList.remove(he.selecting));
844
848
  }
845
849
  });
846
- const E = b.getRangeAt(0);
847
- let L = C && (E.compareBoundaryPoints(Range.END_TO_END, C) === 0 || E.compareBoundaryPoints(Range.START_TO_END, C) === 0) ? E.startContainer : E.endContainer;
848
- L.nodeType === Node.TEXT_NODE && (L = L.parentNode);
849
- const D = (A = L.parentElement) == null ? void 0 : A.closest(
850
+ const E = _.getRangeAt(0);
851
+ let R = C && (E.compareBoundaryPoints(Range.END_TO_END, C) === 0 || E.compareBoundaryPoints(Range.START_TO_END, C) === 0) ? E.startContainer : E.endContainer;
852
+ R.nodeType === Node.TEXT_NODE && (R = R.parentNode);
853
+ const D = (A = R.parentElement) == null ? void 0 : A.closest(
850
854
  he["rp-text-layer"]
851
855
  ), z = D == null ? void 0 : D.querySelector(".endOfContent");
852
- z && D && (z.style.width = D.style.width, z.style.height = D.style.height, (R = L.parentElement) == null || R.insertBefore(z, L.nextSibling)), C = E.cloneRange();
856
+ z && D && (z.style.width = D.style.width, z.style.height = D.style.height, (L = R.parentElement) == null || L.insertBefore(z, R.nextSibling)), C = E.cloneRange();
853
857
  },
854
858
  { signal: g }
855
859
  );
856
860
  })(), () => {
857
861
  var g;
858
862
  (g = w.current) == null || g.abort(), w.current = void 0;
859
- }), [P]);
860
- const S = N(() => {
863
+ }), [b]);
864
+ const T = N(() => {
861
865
  o.current && o.current.classList.add(he.selecting);
862
866
  }, []), u = N(() => {
863
867
  o.current && o.current.classList.remove(he.selecting);
864
868
  }, []);
865
- return W(() => {
866
- if (_.current.forEach((s) => {
869
+ return F(() => {
870
+ if (P.current.forEach((s) => {
867
871
  s.classList.remove("selected");
868
872
  }), !c.length || !a || a.pageIndex !== e - 1)
869
873
  return;
870
- const m = h.findIndex(
874
+ const f = p.findIndex(
871
875
  (s) => JSON.stringify(s) === JSON.stringify(a)
872
876
  );
873
- if (m === -1)
877
+ if (f === -1)
874
878
  return;
875
- const g = c.filter((s) => s.index === m);
876
- g.length && (_.current = g.map((s) => s.element), l(g[0].element), g.forEach((s) => {
879
+ const g = c.filter((s) => s.index === f);
880
+ g.length && (P.current = g.map((s) => s.element), l(g[0].element), g.forEach((s) => {
877
881
  s.element.classList.add("selected");
878
882
  }));
879
- }, [a, c, h]), W(() => {
880
- const m = n.get(e);
881
- if (!m || !o.current)
883
+ }, [a, c, p]), F(() => {
884
+ const f = n.get(e);
885
+ if (!f || !o.current)
882
886
  return;
883
887
  const g = o.current;
884
- return p.current && p.current.cancel(), m.page.getTextContent().then((s) => {
885
- const C = m.page.getViewport({ scale: 1 });
886
- return p.current = new Sr.TextLayer({
888
+ return h.current && h.current.cancel(), f.page.getTextContent().then((s) => {
889
+ const C = f.page.getViewport({ scale: 1 });
890
+ return h.current = new Sr.TextLayer({
887
891
  viewport: C,
888
892
  textContentSource: s,
889
893
  container: g
890
- }), f.current = s, g && (g.innerText = ""), p.current.render();
894
+ }), m.current = s, g && (g.innerText = ""), h.current.render();
891
895
  }).then(() => {
892
896
  var y, E;
893
- [].slice.call(g.children).forEach((I) => {
894
- I.classList.add(he["rp-text-layer-text"]), I.setAttribute("data-rp", "rp-text-layer-text");
897
+ [].slice.call(g.children).forEach((x) => {
898
+ x.classList.add(he["rp-text-layer-text"]), x.setAttribute("data-rp", "rp-text-layer-text");
895
899
  });
896
- const C = (y = p.current) == null ? void 0 : y.textDivs;
897
- C && f.current && v(f.current, C);
898
- const b = document.createElement("div");
899
- b.className = "endOfContent", (E = o.current) == null || E.appendChild(b);
900
+ const C = (y = h.current) == null ? void 0 : y.textDivs;
901
+ C && m.current && v(m.current, C);
902
+ const _ = document.createElement("div");
903
+ _.className = "endOfContent", (E = o.current) == null || E.appendChild(_);
900
904
  }).catch(() => {
901
905
  }), () => {
902
906
  var s;
903
- (s = p.current) == null || s.cancel();
907
+ (s = h.current) == null || s.cancel();
904
908
  };
905
- }, [n, e]), W(() => {
909
+ }, [n, e]), F(() => {
906
910
  var s;
907
911
  [].slice.call(o.current.children).forEach((C) => {
908
912
  C.classList.add(he["rp-text-layer-text"]);
909
913
  });
910
- const g = (s = p.current) == null ? void 0 : s.textDivs;
911
- g && f.current && v(f.current, g, !0);
914
+ const g = (s = h.current) == null ? void 0 : s.textDivs;
915
+ g && m.current && v(m.current, g, !0);
912
916
  }, [v]), /* @__PURE__ */ i(
913
917
  "div",
914
918
  {
915
919
  "data-rp": `page-${e}-textLayer`,
916
920
  className: he["rp-text-layer"],
917
921
  ref: o,
918
- onMouseDown: S,
922
+ onMouseDown: T,
919
923
  onMouseUp: u
920
924
  }
921
925
  );
922
926
  }, Eo = {
923
- "rp-annotation-layer": "_rp-annotation-layer_o0ksd_1"
927
+ "rp-annotation-layer": "_rp-annotation-layer_1udza_1"
924
928
  };
925
929
  let No = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
926
930
  const Oo = (t) => {
927
- const { pageNumber: e } = t, n = H(null), { pages: o, pdf: r } = Q(), a = H(), [l, c] = $(), { setFocusedPage: d, goToPage: p } = ie(), { scrollMode: f } = Re(), { print: _ } = tt(), { download: h } = $n(), v = k(() => o.get(e), [o, e]), w = k(() => v == null ? void 0 : v.page.getViewport(), [v]);
928
- W(() => {
931
+ const { pageNumber: e } = t, n = H(null), { pages: o, pdf: r } = Q(), a = H(), [l, c] = $(), { setFocusedPage: d, goToPage: h } = ie(), { scrollMode: m } = Le(), { print: P } = tt(), { download: p } = $n(), v = k(() => o.get(e), [o, e]), w = k(() => v == null ? void 0 : v.page.getViewport(), [v]);
932
+ F(() => {
929
933
  a.current && (a.current.div.replaceChildren(), a.current = void 0);
930
- }, [r]), W(() => {
931
- v && v.page.getAnnotations().then((P) => {
932
- a.current = void 0, c(P), n.current && (n.current.innerText = "");
934
+ }, [r]), F(() => {
935
+ v && v.page.getAnnotations().then((b) => {
936
+ a.current = void 0, c(b), n.current && (n.current.innerText = "");
933
937
  });
934
938
  }, [v]);
935
- const T = N(
936
- (P) => {
937
- !l || !r || (Er(P), Nr(P, r, l).then((S) => {
938
- var u, m;
939
- ((u = S == null ? void 0 : S.data) == null ? void 0 : u.action) === "Print" ? _() : ((m = S == null ? void 0 : S.data) == null ? void 0 : m.action) === "SaveAs" && h();
940
- }), f === J.PAGE_SCROLLING ? At(P, l, r, (S) => d(S.pageIndex + 1)) : At(P, l, r, (S) => p(S.pageIndex + 1)));
939
+ const S = N(
940
+ (b) => {
941
+ !l || !r || (Er(b), Nr(b, r, l).then((T) => {
942
+ var u, f;
943
+ ((u = T == null ? void 0 : T.data) == null ? void 0 : u.action) === "Print" ? P() : ((f = T == null ? void 0 : T.data) == null ? void 0 : f.action) === "SaveAs" && p();
944
+ }), m === J.PAGE_SCROLLING ? At(b, l, r, (T) => d(T.pageIndex + 1)) : At(b, l, r, (T) => h(T.pageIndex + 1)));
941
945
  },
942
- [r, l, p, d, f, _, h]
946
+ [r, l, h, d, m, P, p]
943
947
  );
944
- return W(() => {
948
+ return F(() => {
945
949
  if (!v || !l)
946
950
  return;
947
- const P = v.page.getViewport();
951
+ const b = v.page.getViewport();
948
952
  if (a.current) {
949
953
  a.current.update({
950
- viewport: P.clone({ dontFlip: !0 })
954
+ viewport: b.clone({ dontFlip: !0 })
951
955
  });
952
956
  return;
953
957
  }
954
- const S = /* @__PURE__ */ new Map([]);
958
+ const T = /* @__PURE__ */ new Map([]);
955
959
  for (const g of l) {
956
960
  const { annotationType: s } = g;
957
961
  switch (s) {
@@ -959,22 +963,22 @@ const Oo = (t) => {
959
963
  Dr(g);
960
964
  break;
961
965
  case zt.Widget:
962
- Or(g, P, S);
966
+ Or(g, b, T);
963
967
  break;
964
968
  }
965
969
  }
966
970
  const u = new AbortController();
967
971
  return (async () => {
968
972
  var C;
969
- a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new Lr({
973
+ a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new Rr({
970
974
  div: n.current,
971
975
  accessibilityManager: void 0,
972
976
  annotationCanvasMap: void 0,
973
977
  annotationEditorUIManager: void 0,
974
978
  structTreeLayer: null,
975
979
  page: v.page,
976
- viewport: P.clone({ dontFlip: !0 })
977
- }), n.current && Ft(n.current, T);
980
+ viewport: b.clone({ dontFlip: !0 })
981
+ }), n.current && Ft(n.current, S);
978
982
  const g = await (r == null ? void 0 : r.hasJSActions()), s = await (r == null ? void 0 : r.getFieldObjects());
979
983
  if (u.signal.aborted)
980
984
  throw "abort";
@@ -984,23 +988,23 @@ const Oo = (t) => {
984
988
  hasJSActions: g,
985
989
  fieldObjects: s,
986
990
  div: n.current,
987
- viewport: P.clone({ dontFlip: !0 }),
991
+ viewport: b.clone({ dontFlip: !0 }),
988
992
  page: v.page,
989
993
  imageResourcesPath: No,
990
994
  renderForms: !0,
991
- linkService: new Rr(),
995
+ linkService: new Lr(),
992
996
  downloadManager: null,
993
997
  enableScripting: !1
994
998
  });
995
999
  })().then(() => {
996
- n.current && zr(n.current, T);
1000
+ n.current && zr(n.current, S);
997
1001
  }).catch((g) => {
998
1002
  if (g !== "abort")
999
1003
  throw g;
1000
1004
  }), () => {
1001
- u.abort("clear"), n.current && Ft(n.current, T);
1005
+ u.abort("clear"), n.current && Ft(n.current, S);
1002
1006
  };
1003
- }, [r, l, T]), /* @__PURE__ */ i(
1007
+ }, [r, l, S]), /* @__PURE__ */ i(
1004
1008
  "div",
1005
1009
  {
1006
1010
  "data-rp": `page-${e}-annotationLayer`,
@@ -1012,29 +1016,29 @@ const Oo = (t) => {
1012
1016
  }, Do = {
1013
1017
  "rp-text-highlight": "_rp-text-highlight_jdkf8_1"
1014
1018
  }, zo = ({ pageNumber: t, viewport: e }) => {
1015
- const [n, o] = $(), { pages: r } = Q(), { highlightKeywords: a } = pr(), l = !0, c = H(null), [d, p] = $(null), [f, _] = $([]);
1016
- W(() => {
1017
- c.current && p(c.current.parentElement);
1018
- }, [c]), W(() => {
1019
+ const [n, o] = $(), { pages: r } = Q(), { highlightKeywords: a } = pr(), l = !0, c = H(null), [d, h] = $(null), [m, P] = $([]);
1020
+ F(() => {
1021
+ c.current && h(c.current.parentElement);
1022
+ }, [c]), F(() => {
1019
1023
  (async () => {
1020
- const m = r.get(t);
1021
- if (!m || !c.current)
1024
+ const f = r.get(t);
1025
+ if (!f || !c.current)
1022
1026
  return;
1023
- const g = await m.page.getTextContent();
1027
+ const g = await f.page.getTextContent();
1024
1028
  o(g);
1025
1029
  })();
1026
1030
  }, [r, t]);
1027
- const h = k(() => a ? a.map((u) => {
1028
- var m, g;
1031
+ const p = k(() => a ? a.map((u) => {
1032
+ var f, g;
1029
1033
  return {
1030
- ...Ar(u.keyword, (m = u.options) == null ? void 0 : m.matchCase, (g = u.options) == null ? void 0 : g.wholeWords),
1034
+ ...Ar(u.keyword, (f = u.options) == null ? void 0 : f.matchCase, (g = u.options) == null ? void 0 : g.wholeWords),
1031
1035
  color: u.highlightColor
1032
1036
  };
1033
1037
  }) : [], [a]);
1034
- function v(u, m) {
1038
+ function v(u, f) {
1035
1039
  if (!u)
1036
1040
  return;
1037
- const g = `[data-rp="page-${m}-textLayer"]`;
1041
+ const g = `[data-rp="page-${f}-textLayer"]`;
1038
1042
  return new Promise((s) => {
1039
1043
  const C = u.querySelector(g);
1040
1044
  if (C) {
@@ -1042,62 +1046,62 @@ const Oo = (t) => {
1042
1046
  return;
1043
1047
  }
1044
1048
  new MutationObserver((y, E) => {
1045
- const I = u.querySelector(g);
1046
- I && (s(I), E.disconnect());
1049
+ const x = u.querySelector(g);
1050
+ x && (s(x), E.disconnect());
1047
1051
  }).observe(u, { childList: !0, subtree: !0 });
1048
1052
  });
1049
1053
  }
1050
1054
  function w(u) {
1051
- return new Promise((m) => {
1055
+ return new Promise((f) => {
1052
1056
  const g = u.querySelectorAll(
1053
1057
  '[data-rp="rp-text-layer-text"]'
1054
1058
  );
1055
1059
  if (g.length) {
1056
- m(Array.from(g));
1060
+ f(Array.from(g));
1057
1061
  return;
1058
1062
  }
1059
- new MutationObserver((C, b) => {
1063
+ new MutationObserver((C, _) => {
1060
1064
  const y = u.querySelectorAll(
1061
- ".vpv-text-layer-text"
1065
+ ".rp-text-layer-text"
1062
1066
  );
1063
- y.length && (m(Array.from(y)), b.disconnect());
1067
+ y.length && (f(Array.from(y)), _.disconnect());
1064
1068
  }).observe(u, { childList: !0, subtree: !0 });
1065
1069
  });
1066
1070
  }
1067
- const T = (u, m, g, s) => {
1071
+ const S = (u, f, g, s) => {
1068
1072
  var Z;
1069
- const C = document.createRange(), b = g.firstChild;
1070
- if (!b || b.nodeType !== Node.TEXT_NODE)
1073
+ const C = document.createRange(), _ = g.firstChild;
1074
+ if (!_ || _.nodeType !== Node.TEXT_NODE)
1071
1075
  return null;
1072
- const y = ((Z = b.textContent) == null ? void 0 : Z.length) ?? 0, E = s[0].charIdxInSpan, I = s.length === 1 ? E : s[s.length - 1].charIdxInSpan;
1073
- if (E > y || I + 1 > y)
1076
+ const y = ((Z = _.textContent) == null ? void 0 : Z.length) ?? 0, E = s[0].charIdxInSpan, x = s.length === 1 ? E : s[s.length - 1].charIdxInSpan;
1077
+ if (E > y || x + 1 > y)
1074
1078
  return null;
1075
- C.setStart(b, E), C.setEnd(b, I + 1);
1076
- const L = document.createElement("span");
1077
- L.style.width = "auto", C.surroundContents(L);
1078
- const D = L.getBoundingClientRect(), z = u.getBoundingClientRect(), A = z.height, R = z.width, x = 100 * (D.left - z.left) / R, O = 100 * (D.top - z.top) / A, M = 100 * D.height / A, G = 100 * D.width / R;
1079
- return Wr(L), {
1080
- keywordStr: m,
1081
- left: x,
1079
+ C.setStart(_, E), C.setEnd(_, x + 1);
1080
+ const R = document.createElement("span");
1081
+ R.style.width = "auto", C.surroundContents(R);
1082
+ const D = R.getBoundingClientRect(), z = u.getBoundingClientRect(), A = z.height, L = z.width, I = 100 * (D.left - z.left) / L, O = 100 * (D.top - z.top) / A, M = 100 * D.height / A, G = 100 * D.width / L;
1083
+ return Wr(R), {
1084
+ keywordStr: f,
1085
+ left: I,
1082
1086
  top: O,
1083
1087
  height: M,
1084
1088
  width: G,
1085
1089
  pageHeight: A,
1086
- pageWidth: R
1090
+ pageWidth: L
1087
1091
  };
1088
1092
  };
1089
- async function P(u, m) {
1093
+ async function b(u, f) {
1090
1094
  const g = await v(d, u);
1091
1095
  if (!g)
1092
1096
  return;
1093
1097
  const s = await w(g);
1094
1098
  if (s.length) {
1095
1099
  const C = s.map((y) => y.tagName === "BR" ? " " : y.textContent).reduce(
1096
- (y, E, I) => y.concat(
1097
- E.split("").map((L, D) => ({
1098
- char: L,
1100
+ (y, E, x) => y.concat(
1101
+ E.split("").map((R, D) => ({
1102
+ char: R,
1099
1103
  charIdxInSpan: D,
1100
- spanIdx: I
1104
+ spanIdx: x
1101
1105
  }))
1102
1106
  ),
1103
1107
  [
@@ -1107,27 +1111,27 @@ const Oo = (t) => {
1107
1111
  spanIdx: 0
1108
1112
  }
1109
1113
  ]
1110
- ).slice(1), b = S(g, m, s, C);
1111
- _(b);
1114
+ ).slice(1), _ = T(g, f, s, C);
1115
+ P(_);
1112
1116
  }
1113
1117
  }
1114
- const S = (u, m, g, s) => {
1115
- const C = m.length;
1118
+ const T = (u, f, g, s) => {
1119
+ const C = f.length;
1116
1120
  if (!s.length || !C)
1117
1121
  return [];
1118
- const b = [], y = s.map((E) => E.char).join("");
1119
- return h.forEach((E) => {
1120
- const { keyword: I, regExp: L, wholeWords: D, color: z } = E, A = I;
1122
+ const _ = [], y = s.map((E) => E.char).join("");
1123
+ return p.forEach((E) => {
1124
+ const { keyword: x, regExp: R, wholeWords: D, color: z } = E, A = x;
1121
1125
  if (!A.trim())
1122
1126
  return;
1123
- const R = L.flags.indexOf("g") === -1 ? new RegExp(L, `${L.flags}g`) : L;
1124
- let x;
1127
+ const L = R.flags.indexOf("g") === -1 ? new RegExp(R, `${R.flags}g`) : R;
1128
+ let I;
1125
1129
  const O = [];
1126
- for (; (x = R.exec(y)) !== null; )
1127
- D && !ur(y, x.index, x[0].length) || O.push({
1128
- keyword: R,
1129
- startIndex: x.index,
1130
- endIndex: R.lastIndex
1130
+ for (; (I = L.exec(y)) !== null; )
1131
+ D && !ur(y, I.index, I[0].length) || O.push({
1132
+ keyword: L,
1133
+ startIndex: I.index,
1134
+ endIndex: L.lastIndex
1131
1135
  });
1132
1136
  const M = O.map((G) => ({
1133
1137
  keyword: G.keyword,
@@ -1141,7 +1145,7 @@ const Oo = (t) => {
1141
1145
  );
1142
1146
  for (const j of Object.values(Z))
1143
1147
  if (j.length !== 1 || j[0].char.trim() !== "") {
1144
- const q = j, ee = g[q[0].spanIdx], X = T(
1148
+ const q = j, ee = g[q[0].spanIdx], X = S(
1145
1149
  u,
1146
1150
  A,
1147
1151
  ee,
@@ -1149,24 +1153,24 @@ const Oo = (t) => {
1149
1153
  );
1150
1154
  if (X) {
1151
1155
  const { left: le, top: ae } = X;
1152
- if (b.find((te) => te.left === le && te.top === ae))
1156
+ if (_.find((te) => te.left === le && te.top === ae))
1153
1157
  continue;
1154
- b.push({ ...X, highlightColor: G.color });
1158
+ _.push({ ...X, highlightColor: G.color });
1155
1159
  }
1156
1160
  }
1157
1161
  }
1158
- }), b.sort(Fr), b;
1162
+ }), _.sort(Fr), _;
1159
1163
  };
1160
- return W(() => {
1164
+ return F(() => {
1161
1165
  (async () => {
1162
1166
  if (!(!a || a.length === 0))
1163
1167
  try {
1164
- await P(t, a);
1165
- } catch (m) {
1166
- console.error(m);
1168
+ await b(t, a);
1169
+ } catch (f) {
1170
+ console.error(f);
1167
1171
  }
1168
1172
  })();
1169
- }, [l, a, t, n, e]), /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i("div", { ref: c, "data-rp": `page-${t}-textHighlightLayer`, children: f.map((u, m) => /* @__PURE__ */ i(
1173
+ }, [l, a, t, n, e]), /* @__PURE__ */ i(me, { children: /* @__PURE__ */ i("div", { ref: c, "data-rp": `page-${t}-textHighlightLayer`, children: m.map((u, f) => /* @__PURE__ */ i(
1170
1174
  "div",
1171
1175
  {
1172
1176
  className: Do["rp-text-highlight"],
@@ -1178,20 +1182,23 @@ const Oo = (t) => {
1178
1182
  backgroundColor: u.highlightColor
1179
1183
  }
1180
1184
  },
1181
- m
1185
+ f
1182
1186
  )) }) });
1183
- }, xt = $e((t, e) => {
1184
- const { pageNumber: n, style: o, ...r } = t, { pages: a } = Q(), { rotate: l } = Ge(), { textLayer: c } = or(), { currentZoom: d } = Qe(), p = H(a.get(n)), [f, _] = $(!1), h = H(null), [v, w] = $({
1187
+ }, It = $e((t, e) => {
1188
+ const { pageNumber: n, style: o, ...r } = t, { pages: a } = Q(), { rotate: l } = Ge(), { textLayer: c } = or(), { currentZoom: d } = Qe(), h = H(a.get(n)), [m, P] = $(!1), p = H(null), [v, w] = $({
1185
1189
  width: 0,
1186
1190
  height: 0
1187
1191
  });
1188
- cn(e, () => h.current), W(() => {
1189
- if (a && (p.current = a.get(n), p.current)) {
1190
- const u = p.current.page.getViewport({ scale: d, rotation: l });
1192
+ cn(e, () => p.current), F(() => {
1193
+ if (a && (h.current = a.get(n), h.current)) {
1194
+ const u = h.current.page.getViewport({
1195
+ scale: d,
1196
+ rotation: l + h.current.defaultRotation
1197
+ });
1191
1198
  w(u);
1192
1199
  }
1193
1200
  }, [a, n, l, d]);
1194
- const T = k(() => {
1201
+ const S = k(() => {
1195
1202
  switch (l) {
1196
1203
  case 90:
1197
1204
  return `${v.width / 2}px ${v.width / 2}px`;
@@ -1201,26 +1208,26 @@ const Oo = (t) => {
1201
1208
  default:
1202
1209
  return "center";
1203
1210
  }
1204
- }, [l, v]), P = N(() => {
1205
- _(!0);
1206
- }, []), S = N(() => {
1207
- _(!1);
1211
+ }, [l, v]), b = N(() => {
1212
+ P(!0);
1213
+ }, []), T = N(() => {
1214
+ P(!1);
1208
1215
  }, []);
1209
1216
  return /* @__PURE__ */ i(
1210
1217
  "div",
1211
1218
  {
1212
- ref: h,
1219
+ ref: p,
1213
1220
  id: `page-${n}`,
1214
1221
  "data-rp": `page-${n}`,
1215
1222
  ...r,
1216
1223
  style: {
1217
1224
  ...o,
1218
1225
  "--rp-rotate": `${l}deg`,
1219
- "--rp-page-rotate-translate": `${T}`,
1226
+ "--rp-page-rotate-translate": `${S}`,
1220
1227
  "--scale-factor": d
1221
1228
  },
1222
1229
  className: lt["rp-page-wrapper"],
1223
- children: /* @__PURE__ */ F(
1230
+ children: /* @__PURE__ */ W(
1224
1231
  "div",
1225
1232
  {
1226
1233
  style: {
@@ -1229,9 +1236,9 @@ const Oo = (t) => {
1229
1236
  },
1230
1237
  className: lt["rp-page"],
1231
1238
  children: [
1232
- /* @__PURE__ */ i(xo, { onLoading: P, onLoaded: S, pageNumber: n }),
1233
- f && /* @__PURE__ */ i("div", { className: lt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Ct, {}) }),
1234
- c && /* @__PURE__ */ i(Ro, { pageNumber: n }),
1239
+ /* @__PURE__ */ i(Io, { onLoading: b, onLoaded: T, pageNumber: n }),
1240
+ m && /* @__PURE__ */ i("div", { className: lt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Ct, {}) }),
1241
+ c && /* @__PURE__ */ i(Lo, { pageNumber: n }),
1235
1242
  /* @__PURE__ */ i(zo, { pageNumber: n, viewport: v }),
1236
1243
  /* @__PURE__ */ i(Oo, { pageNumber: n })
1237
1244
  ]
@@ -1333,12 +1340,12 @@ var $o = 150, Go = function(e) {
1333
1340
  }, Be = null, Ze = null, je = null;
1334
1341
  process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Be = /* @__PURE__ */ new WeakSet(), Ze = /* @__PURE__ */ new WeakSet(), je = /* @__PURE__ */ new WeakSet());
1335
1342
  function Uo(t) {
1336
- var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, l = t.getEstimatedTotalHeight, c = t.getEstimatedTotalWidth, d = t.getOffsetForColumnAndAlignment, p = t.getOffsetForRowAndAlignment, f = t.getRowHeight, _ = t.getRowOffset, h = t.getRowStartIndexForOffset, v = t.getRowStopIndexForStartIndex, w = t.initInstanceProps, T = t.shouldResetStyleCacheOnItemSizeChange, P = t.validateProps;
1337
- return e = /* @__PURE__ */ function(S) {
1338
- Ao(u, S);
1343
+ var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, l = t.getEstimatedTotalHeight, c = t.getEstimatedTotalWidth, d = t.getOffsetForColumnAndAlignment, h = t.getOffsetForRowAndAlignment, m = t.getRowHeight, P = t.getRowOffset, p = t.getRowStartIndexForOffset, v = t.getRowStopIndexForStartIndex, w = t.initInstanceProps, S = t.shouldResetStyleCacheOnItemSizeChange, b = t.validateProps;
1344
+ return e = /* @__PURE__ */ function(T) {
1345
+ Ao(u, T);
1339
1346
  function u(g) {
1340
1347
  var s;
1341
- return s = S.call(this, g) || this, s._instanceProps = w(s.props, Ut(s)), s._resetIsScrollingTimeoutId = null, s._outerRef = void 0, s.state = {
1348
+ return s = T.call(this, g) || this, s._instanceProps = w(s.props, Ut(s)), s._resetIsScrollingTimeoutId = null, s._outerRef = void 0, s.state = {
1342
1349
  instance: Ut(s),
1343
1350
  isScrolling: !1,
1344
1351
  horizontalScrollDirection: "forward",
@@ -1346,72 +1353,72 @@ function Uo(t) {
1346
1353
  scrollTop: typeof s.props.initialScrollTop == "number" ? s.props.initialScrollTop : 0,
1347
1354
  scrollUpdateWasRequested: !1,
1348
1355
  verticalScrollDirection: "forward"
1349
- }, s._callOnItemsRendered = void 0, s._callOnItemsRendered = dt(function(C, b, y, E, I, L, D, z) {
1356
+ }, s._callOnItemsRendered = void 0, s._callOnItemsRendered = dt(function(C, _, y, E, x, R, D, z) {
1350
1357
  return s.props.onItemsRendered({
1351
1358
  overscanColumnStartIndex: C,
1352
- overscanColumnStopIndex: b,
1359
+ overscanColumnStopIndex: _,
1353
1360
  overscanRowStartIndex: y,
1354
1361
  overscanRowStopIndex: E,
1355
- visibleColumnStartIndex: I,
1356
- visibleColumnStopIndex: L,
1362
+ visibleColumnStartIndex: x,
1363
+ visibleColumnStopIndex: R,
1357
1364
  visibleRowStartIndex: D,
1358
1365
  visibleRowStopIndex: z
1359
1366
  });
1360
- }), s._callOnScroll = void 0, s._callOnScroll = dt(function(C, b, y, E, I) {
1367
+ }), s._callOnScroll = void 0, s._callOnScroll = dt(function(C, _, y, E, x) {
1361
1368
  return s.props.onScroll({
1362
1369
  horizontalScrollDirection: y,
1363
1370
  scrollLeft: C,
1364
- scrollTop: b,
1371
+ scrollTop: _,
1365
1372
  verticalScrollDirection: E,
1366
- scrollUpdateWasRequested: I
1373
+ scrollUpdateWasRequested: x
1367
1374
  });
1368
- }), s._getItemStyle = void 0, s._getItemStyle = function(C, b) {
1369
- var y = s.props, E = y.columnWidth, I = y.direction, L = y.rowHeight, D = s._getItemStyleCache(T && E, T && I, T && L), z = C + ":" + b, A;
1375
+ }), s._getItemStyle = void 0, s._getItemStyle = function(C, _) {
1376
+ var y = s.props, E = y.columnWidth, x = y.direction, R = y.rowHeight, D = s._getItemStyleCache(S && E, S && x, S && R), z = C + ":" + _, A;
1370
1377
  if (D.hasOwnProperty(z))
1371
1378
  A = D[z];
1372
1379
  else {
1373
- var R = n(s.props, b, s._instanceProps), x = I === "rtl";
1380
+ var L = n(s.props, _, s._instanceProps), I = x === "rtl";
1374
1381
  D[z] = A = {
1375
1382
  position: "absolute",
1376
- left: x ? void 0 : R,
1377
- right: x ? R : void 0,
1378
- top: _(s.props, C, s._instanceProps),
1379
- height: f(s.props, C, s._instanceProps),
1380
- width: a(s.props, b, s._instanceProps)
1383
+ left: I ? void 0 : L,
1384
+ right: I ? L : void 0,
1385
+ top: P(s.props, C, s._instanceProps),
1386
+ height: m(s.props, C, s._instanceProps),
1387
+ width: a(s.props, _, s._instanceProps)
1381
1388
  };
1382
1389
  }
1383
1390
  return A;
1384
- }, s._getItemStyleCache = void 0, s._getItemStyleCache = dt(function(C, b, y) {
1391
+ }, s._getItemStyleCache = void 0, s._getItemStyleCache = dt(function(C, _, y) {
1385
1392
  return {};
1386
1393
  }), s._onScroll = function(C) {
1387
- var b = C.currentTarget, y = b.clientHeight, E = b.clientWidth, I = b.scrollLeft, L = b.scrollTop, D = b.scrollHeight, z = b.scrollWidth;
1394
+ var _ = C.currentTarget, y = _.clientHeight, E = _.clientWidth, x = _.scrollLeft, R = _.scrollTop, D = _.scrollHeight, z = _.scrollWidth;
1388
1395
  s.setState(function(A) {
1389
- if (A.scrollLeft === I && A.scrollTop === L)
1396
+ if (A.scrollLeft === x && A.scrollTop === R)
1390
1397
  return null;
1391
- var R = s.props.direction, x = I;
1392
- if (R === "rtl")
1398
+ var L = s.props.direction, I = x;
1399
+ if (L === "rtl")
1393
1400
  switch (jt()) {
1394
1401
  case "negative":
1395
- x = -I;
1402
+ I = -x;
1396
1403
  break;
1397
1404
  case "positive-descending":
1398
- x = z - E - I;
1405
+ I = z - E - x;
1399
1406
  break;
1400
1407
  }
1401
- x = Math.max(0, Math.min(x, z - E));
1402
- var O = Math.max(0, Math.min(L, D - y));
1408
+ I = Math.max(0, Math.min(I, z - E));
1409
+ var O = Math.max(0, Math.min(R, D - y));
1403
1410
  return {
1404
1411
  isScrolling: !0,
1405
- horizontalScrollDirection: A.scrollLeft < I ? "forward" : "backward",
1406
- scrollLeft: x,
1412
+ horizontalScrollDirection: A.scrollLeft < x ? "forward" : "backward",
1413
+ scrollLeft: I,
1407
1414
  scrollTop: O,
1408
- verticalScrollDirection: A.scrollTop < L ? "forward" : "backward",
1415
+ verticalScrollDirection: A.scrollTop < R ? "forward" : "backward",
1409
1416
  scrollUpdateWasRequested: !1
1410
1417
  };
1411
1418
  }, s._resetIsScrollingDebounced);
1412
1419
  }, s._outerRefSetter = function(C) {
1413
- var b = s.props.outerRef;
1414
- s._outerRef = C, typeof b == "function" ? b(C) : b != null && typeof b == "object" && b.hasOwnProperty("current") && (b.current = C);
1420
+ var _ = s.props.outerRef;
1421
+ s._outerRef = C, typeof _ == "function" ? _(C) : _ != null && typeof _ == "object" && _.hasOwnProperty("current") && (_.current = C);
1415
1422
  }, s._resetIsScrollingDebounced = function() {
1416
1423
  s._resetIsScrollingTimeoutId !== null && Zt(s._resetIsScrollingTimeoutId), s._resetIsScrollingTimeoutId = Mo(s._resetIsScrolling, $o);
1417
1424
  }, s._resetIsScrolling = function() {
@@ -1423,61 +1430,61 @@ function Uo(t) {
1423
1430
  }, s;
1424
1431
  }
1425
1432
  u.getDerivedStateFromProps = function(s, C) {
1426
- return Vo(s, C), P(s), null;
1433
+ return Vo(s, C), b(s), null;
1427
1434
  };
1428
- var m = u.prototype;
1429
- return m.scrollTo = function(s) {
1430
- var C = s.scrollLeft, b = s.scrollTop;
1431
- C !== void 0 && (C = Math.max(0, C)), b !== void 0 && (b = Math.max(0, b)), this.setState(function(y) {
1432
- return C === void 0 && (C = y.scrollLeft), b === void 0 && (b = y.scrollTop), y.scrollLeft === C && y.scrollTop === b ? null : {
1435
+ var f = u.prototype;
1436
+ return f.scrollTo = function(s) {
1437
+ var C = s.scrollLeft, _ = s.scrollTop;
1438
+ C !== void 0 && (C = Math.max(0, C)), _ !== void 0 && (_ = Math.max(0, _)), this.setState(function(y) {
1439
+ return C === void 0 && (C = y.scrollLeft), _ === void 0 && (_ = y.scrollTop), y.scrollLeft === C && y.scrollTop === _ ? null : {
1433
1440
  horizontalScrollDirection: y.scrollLeft < C ? "forward" : "backward",
1434
1441
  scrollLeft: C,
1435
- scrollTop: b,
1442
+ scrollTop: _,
1436
1443
  scrollUpdateWasRequested: !0,
1437
- verticalScrollDirection: y.scrollTop < b ? "forward" : "backward"
1444
+ verticalScrollDirection: y.scrollTop < _ ? "forward" : "backward"
1438
1445
  };
1439
1446
  }, this._resetIsScrollingDebounced);
1440
- }, m.scrollToItem = function(s) {
1441
- var C = s.align, b = C === void 0 ? "auto" : C, y = s.columnIndex, E = s.rowIndex, I = this.props, L = I.columnCount, D = I.height, z = I.rowCount, A = I.width, R = this.state, x = R.scrollLeft, O = R.scrollTop, M = Ho();
1442
- y !== void 0 && (y = Math.max(0, Math.min(y, L - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, z - 1)));
1447
+ }, f.scrollToItem = function(s) {
1448
+ var C = s.align, _ = C === void 0 ? "auto" : C, y = s.columnIndex, E = s.rowIndex, x = this.props, R = x.columnCount, D = x.height, z = x.rowCount, A = x.width, L = this.state, I = L.scrollLeft, O = L.scrollTop, M = Ho();
1449
+ y !== void 0 && (y = Math.max(0, Math.min(y, R - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, z - 1)));
1443
1450
  var G = l(this.props, this._instanceProps), Z = c(this.props, this._instanceProps), j = Z > A ? M : 0, q = G > D ? M : 0;
1444
1451
  this.scrollTo({
1445
- scrollLeft: y !== void 0 ? d(this.props, y, b, x, this._instanceProps, q) : x,
1446
- scrollTop: E !== void 0 ? p(this.props, E, b, O, this._instanceProps, j) : O
1452
+ scrollLeft: y !== void 0 ? d(this.props, y, _, I, this._instanceProps, q) : I,
1453
+ scrollTop: E !== void 0 ? h(this.props, E, _, O, this._instanceProps, j) : O
1447
1454
  });
1448
- }, m.componentDidMount = function() {
1449
- var s = this.props, C = s.initialScrollLeft, b = s.initialScrollTop;
1455
+ }, f.componentDidMount = function() {
1456
+ var s = this.props, C = s.initialScrollLeft, _ = s.initialScrollTop;
1450
1457
  if (this._outerRef != null) {
1451
1458
  var y = this._outerRef;
1452
- typeof C == "number" && (y.scrollLeft = C), typeof b == "number" && (y.scrollTop = b);
1459
+ typeof C == "number" && (y.scrollLeft = C), typeof _ == "number" && (y.scrollTop = _);
1453
1460
  }
1454
1461
  this._callPropsCallbacks();
1455
- }, m.componentDidUpdate = function() {
1456
- var s = this.props.direction, C = this.state, b = C.scrollLeft, y = C.scrollTop, E = C.scrollUpdateWasRequested;
1462
+ }, f.componentDidUpdate = function() {
1463
+ var s = this.props.direction, C = this.state, _ = C.scrollLeft, y = C.scrollTop, E = C.scrollUpdateWasRequested;
1457
1464
  if (E && this._outerRef != null) {
1458
- var I = this._outerRef;
1465
+ var x = this._outerRef;
1459
1466
  if (s === "rtl")
1460
1467
  switch (jt()) {
1461
1468
  case "negative":
1462
- I.scrollLeft = -b;
1469
+ x.scrollLeft = -_;
1463
1470
  break;
1464
1471
  case "positive-ascending":
1465
- I.scrollLeft = b;
1472
+ x.scrollLeft = _;
1466
1473
  break;
1467
1474
  default:
1468
- var L = I.clientWidth, D = I.scrollWidth;
1469
- I.scrollLeft = D - L - b;
1475
+ var R = x.clientWidth, D = x.scrollWidth;
1476
+ x.scrollLeft = D - R - _;
1470
1477
  break;
1471
1478
  }
1472
1479
  else
1473
- I.scrollLeft = Math.max(0, b);
1474
- I.scrollTop = Math.max(0, y);
1480
+ x.scrollLeft = Math.max(0, _);
1481
+ x.scrollTop = Math.max(0, y);
1475
1482
  }
1476
1483
  this._callPropsCallbacks();
1477
- }, m.componentWillUnmount = function() {
1484
+ }, f.componentWillUnmount = function() {
1478
1485
  this._resetIsScrollingTimeoutId !== null && Zt(this._resetIsScrollingTimeoutId);
1479
- }, m.render = function() {
1480
- var s = this.props, C = s.children, b = s.className, y = s.columnCount, E = s.direction, I = s.height, L = s.innerRef, D = s.innerElementType, z = s.innerTagName, A = s.itemData, R = s.itemKey, x = R === void 0 ? Go : R, O = s.outerElementType, M = s.outerTagName, G = s.rowCount, Z = s.style, j = s.useIsScrolling, q = s.width, ee = this.state.isScrolling, X = this._getHorizontalRangeToRender(), le = X[0], ae = X[1], de = this._getVerticalRangeToRender(), te = de[0], Fe = de[1], Ne = [];
1486
+ }, f.render = function() {
1487
+ var s = this.props, C = s.children, _ = s.className, y = s.columnCount, E = s.direction, x = s.height, R = s.innerRef, D = s.innerElementType, z = s.innerTagName, A = s.itemData, L = s.itemKey, I = L === void 0 ? Go : L, O = s.outerElementType, M = s.outerTagName, G = s.rowCount, Z = s.style, j = s.useIsScrolling, q = s.width, ee = this.state.isScrolling, X = this._getHorizontalRangeToRender(), le = X[0], ae = X[1], de = this._getVerticalRangeToRender(), te = de[0], Fe = de[1], Ne = [];
1481
1488
  if (y > 0 && G)
1482
1489
  for (var Pe = te; Pe <= Fe; Pe++)
1483
1490
  for (var we = le; we <= ae; we++)
@@ -1485,7 +1492,7 @@ function Uo(t) {
1485
1492
  columnIndex: we,
1486
1493
  data: A,
1487
1494
  isScrolling: j ? ee : void 0,
1488
- key: x({
1495
+ key: I({
1489
1496
  columnIndex: we,
1490
1497
  data: A,
1491
1498
  rowIndex: Pe
@@ -1495,12 +1502,12 @@ function Uo(t) {
1495
1502
  }));
1496
1503
  var nt = l(this.props, this._instanceProps), rt = c(this.props, this._instanceProps);
1497
1504
  return qe(O || M || "div", {
1498
- className: b,
1505
+ className: _,
1499
1506
  onScroll: this._onScroll,
1500
1507
  ref: this._outerRefSetter,
1501
1508
  style: kr({
1502
1509
  position: "relative",
1503
- height: I,
1510
+ height: x,
1504
1511
  width: q,
1505
1512
  overflow: "auto",
1506
1513
  WebkitOverflowScrolling: "touch",
@@ -1509,35 +1516,35 @@ function Uo(t) {
1509
1516
  }, Z)
1510
1517
  }, qe(D || z || "div", {
1511
1518
  children: Ne,
1512
- ref: L,
1519
+ ref: R,
1513
1520
  style: {
1514
1521
  height: nt,
1515
1522
  pointerEvents: ee ? "none" : void 0,
1516
1523
  width: rt
1517
1524
  }
1518
1525
  }));
1519
- }, m._callPropsCallbacks = function() {
1520
- var s = this.props, C = s.columnCount, b = s.onItemsRendered, y = s.onScroll, E = s.rowCount;
1521
- if (typeof b == "function" && C > 0 && E > 0) {
1522
- var I = this._getHorizontalRangeToRender(), L = I[0], D = I[1], z = I[2], A = I[3], R = this._getVerticalRangeToRender(), x = R[0], O = R[1], M = R[2], G = R[3];
1523
- this._callOnItemsRendered(L, D, x, O, z, A, M, G);
1526
+ }, f._callPropsCallbacks = function() {
1527
+ var s = this.props, C = s.columnCount, _ = s.onItemsRendered, y = s.onScroll, E = s.rowCount;
1528
+ if (typeof _ == "function" && C > 0 && E > 0) {
1529
+ var x = this._getHorizontalRangeToRender(), R = x[0], D = x[1], z = x[2], A = x[3], L = this._getVerticalRangeToRender(), I = L[0], O = L[1], M = L[2], G = L[3];
1530
+ this._callOnItemsRendered(R, D, I, O, z, A, M, G);
1524
1531
  }
1525
1532
  if (typeof y == "function") {
1526
1533
  var Z = this.state, j = Z.horizontalScrollDirection, q = Z.scrollLeft, ee = Z.scrollTop, X = Z.scrollUpdateWasRequested, le = Z.verticalScrollDirection;
1527
1534
  this._callOnScroll(q, ee, j, le, X);
1528
1535
  }
1529
- }, m._getHorizontalRangeToRender = function() {
1530
- var s = this.props, C = s.columnCount, b = s.overscanColumnCount, y = s.overscanColumnsCount, E = s.overscanCount, I = s.rowCount, L = this.state, D = L.horizontalScrollDirection, z = L.isScrolling, A = L.scrollLeft, R = b || y || E || 1;
1531
- if (C === 0 || I === 0)
1536
+ }, f._getHorizontalRangeToRender = function() {
1537
+ var s = this.props, C = s.columnCount, _ = s.overscanColumnCount, y = s.overscanColumnsCount, E = s.overscanCount, x = s.rowCount, R = this.state, D = R.horizontalScrollDirection, z = R.isScrolling, A = R.scrollLeft, L = _ || y || E || 1;
1538
+ if (C === 0 || x === 0)
1532
1539
  return [0, 0, 0, 0];
1533
- var x = o(this.props, A, this._instanceProps), O = r(this.props, x, A, this._instanceProps), M = !z || D === "backward" ? Math.max(1, R) : 1, G = !z || D === "forward" ? Math.max(1, R) : 1;
1534
- return [Math.max(0, x - M), Math.max(0, Math.min(C - 1, O + G)), x, O];
1535
- }, m._getVerticalRangeToRender = function() {
1536
- var s = this.props, C = s.columnCount, b = s.overscanCount, y = s.overscanRowCount, E = s.overscanRowsCount, I = s.rowCount, L = this.state, D = L.isScrolling, z = L.verticalScrollDirection, A = L.scrollTop, R = y || E || b || 1;
1537
- if (C === 0 || I === 0)
1540
+ var I = o(this.props, A, this._instanceProps), O = r(this.props, I, A, this._instanceProps), M = !z || D === "backward" ? Math.max(1, L) : 1, G = !z || D === "forward" ? Math.max(1, L) : 1;
1541
+ return [Math.max(0, I - M), Math.max(0, Math.min(C - 1, O + G)), I, O];
1542
+ }, f._getVerticalRangeToRender = function() {
1543
+ var s = this.props, C = s.columnCount, _ = s.overscanCount, y = s.overscanRowCount, E = s.overscanRowsCount, x = s.rowCount, R = this.state, D = R.isScrolling, z = R.verticalScrollDirection, A = R.scrollTop, L = y || E || _ || 1;
1544
+ if (C === 0 || x === 0)
1538
1545
  return [0, 0, 0, 0];
1539
- var x = h(this.props, A, this._instanceProps), O = v(this.props, x, A, this._instanceProps), M = !D || z === "backward" ? Math.max(1, R) : 1, G = !D || z === "forward" ? Math.max(1, R) : 1;
1540
- return [Math.max(0, x - M), Math.max(0, Math.min(I - 1, O + G)), x, O];
1546
+ var I = p(this.props, A, this._instanceProps), O = v(this.props, I, A, this._instanceProps), M = !D || z === "backward" ? Math.max(1, L) : 1, G = !D || z === "forward" ? Math.max(1, L) : 1;
1547
+ return [Math.max(0, I - M), Math.max(0, Math.min(x - 1, O + G)), I, O];
1541
1548
  }, u;
1542
1549
  }(Qn), e.defaultProps = {
1543
1550
  direction: "ltr",
@@ -1546,9 +1553,9 @@ function Uo(t) {
1546
1553
  }, e;
1547
1554
  }
1548
1555
  var Vo = function(e, n) {
1549
- var o = e.children, r = e.direction, a = e.height, l = e.innerTagName, c = e.outerTagName, d = e.overscanColumnsCount, p = e.overscanCount, f = e.overscanRowsCount, _ = e.width, h = n.instance;
1556
+ var o = e.children, r = e.direction, a = e.height, l = e.innerTagName, c = e.outerTagName, d = e.overscanColumnsCount, h = e.overscanCount, m = e.overscanRowsCount, P = e.width, p = n.instance;
1550
1557
  if (process.env.NODE_ENV !== "production") {
1551
- if (typeof p == "number" && Be && !Be.has(h) && (Be.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof f == "number") && Ze && !Ze.has(h) && (Ze.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (l != null || c != null) && je && !je.has(h) && (je.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
1558
+ if (typeof h == "number" && Be && !Be.has(p) && (Be.add(p), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof m == "number") && Ze && !Ze.has(p) && (Ze.add(p), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (l != null || c != null) && je && !je.has(p) && (je.add(p), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
1552
1559
  throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
1553
1560
  switch (r) {
1554
1561
  case "ltr":
@@ -1557,8 +1564,8 @@ var Vo = function(e, n) {
1557
1564
  default:
1558
1565
  throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + r + '" was specified.'));
1559
1566
  }
1560
- if (typeof _ != "number")
1561
- throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (_ === null ? "null" : typeof _) + '" was specified.'));
1567
+ if (typeof P != "number")
1568
+ throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (P === null ? "null" : typeof P) + '" was specified.'));
1562
1569
  if (typeof a != "number")
1563
1570
  throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
1564
1571
  }
@@ -1568,30 +1575,30 @@ var Vo = function(e, n) {
1568
1575
  var d = r[l];
1569
1576
  c = d.offset + d.size;
1570
1577
  }
1571
- var p = o - l - 1, f = p * a;
1572
- return c + f;
1578
+ var h = o - l - 1, m = h * a;
1579
+ return c + m;
1573
1580
  }, yn = function(e, n) {
1574
1581
  var o = e.columnCount, r = n.columnMetadataMap, a = n.estimatedColumnWidth, l = n.lastMeasuredColumnIndex, c = 0;
1575
1582
  if (l >= o && (l = o - 1), l >= 0) {
1576
1583
  var d = r[l];
1577
1584
  c = d.offset + d.size;
1578
1585
  }
1579
- var p = o - l - 1, f = p * a;
1580
- return c + f;
1581
- }, me = function(e, n, o, r) {
1586
+ var h = o - l - 1, m = h * a;
1587
+ return c + m;
1588
+ }, fe = function(e, n, o, r) {
1582
1589
  var a, l, c;
1583
1590
  if (e === "column" ? (a = r.columnMetadataMap, l = n.columnWidth, c = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, l = n.rowHeight, c = r.lastMeasuredRowIndex), o > c) {
1584
1591
  var d = 0;
1585
1592
  if (c >= 0) {
1586
- var p = a[c];
1587
- d = p.offset + p.size;
1593
+ var h = a[c];
1594
+ d = h.offset + h.size;
1588
1595
  }
1589
- for (var f = c + 1; f <= o; f++) {
1590
- var _ = l(f);
1591
- a[f] = {
1596
+ for (var m = c + 1; m <= o; m++) {
1597
+ var P = l(m);
1598
+ a[m] = {
1592
1599
  offset: d,
1593
- size: _
1594
- }, d += _;
1600
+ size: P
1601
+ }, d += P;
1595
1602
  }
1596
1603
  e === "column" ? r.lastMeasuredColumnIndex = o : r.lastMeasuredRowIndex = o;
1597
1604
  }
@@ -1600,43 +1607,43 @@ var Vo = function(e, n) {
1600
1607
  var a, l;
1601
1608
  e === "column" ? (a = o.columnMetadataMap, l = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, l = o.lastMeasuredRowIndex);
1602
1609
  var c = l > 0 ? a[l].offset : 0;
1603
- return c >= r ? In(e, n, o, l, 0, r) : qo(e, n, o, Math.max(0, l), r);
1604
- }, In = function(e, n, o, r, a, l) {
1610
+ return c >= r ? xn(e, n, o, l, 0, r) : qo(e, n, o, Math.max(0, l), r);
1611
+ }, xn = function(e, n, o, r, a, l) {
1605
1612
  for (; a <= r; ) {
1606
- var c = a + Math.floor((r - a) / 2), d = me(e, n, c, o).offset;
1613
+ var c = a + Math.floor((r - a) / 2), d = fe(e, n, c, o).offset;
1607
1614
  if (d === l)
1608
1615
  return c;
1609
1616
  d < l ? a = c + 1 : d > l && (r = c - 1);
1610
1617
  }
1611
1618
  return a > 0 ? a - 1 : 0;
1612
1619
  }, qo = function(e, n, o, r, a) {
1613
- for (var l = e === "column" ? n.columnCount : n.rowCount, c = 1; r < l && me(e, n, r, o).offset < a; )
1620
+ for (var l = e === "column" ? n.columnCount : n.rowCount, c = 1; r < l && fe(e, n, r, o).offset < a; )
1614
1621
  r += c, c *= 2;
1615
- return In(e, n, o, Math.min(r, l - 1), Math.floor(r / 2), a);
1622
+ return xn(e, n, o, Math.min(r, l - 1), Math.floor(r / 2), a);
1616
1623
  }, Yt = function(e, n, o, r, a, l, c) {
1617
- var d = e === "column" ? n.width : n.height, p = me(e, n, o, l), f = e === "column" ? yn(n, l) : Sn(n, l), _ = Math.max(0, Math.min(f - d, p.offset)), h = Math.max(0, p.offset - d + c + p.size);
1618
- switch (r === "smart" && (a >= h - d && a <= _ + d ? r = "auto" : r = "center"), r) {
1624
+ var d = e === "column" ? n.width : n.height, h = fe(e, n, o, l), m = e === "column" ? yn(n, l) : Sn(n, l), P = Math.max(0, Math.min(m - d, h.offset)), p = Math.max(0, h.offset - d + c + h.size);
1625
+ switch (r === "smart" && (a >= p - d && a <= P + d ? r = "auto" : r = "center"), r) {
1619
1626
  case "start":
1620
- return _;
1627
+ return P;
1621
1628
  case "end":
1622
- return h;
1629
+ return p;
1623
1630
  case "center":
1624
- return Math.round(h + (_ - h) / 2);
1631
+ return Math.round(p + (P - p) / 2);
1625
1632
  case "auto":
1626
1633
  default:
1627
- return a >= h && a <= _ ? a : h > _ || a < h ? h : _;
1634
+ return a >= p && a <= P ? a : p > P || a < p ? p : P;
1628
1635
  }
1629
1636
  }, Bo = /* @__PURE__ */ Uo({
1630
1637
  getColumnOffset: function(e, n, o) {
1631
- return me("column", e, n, o).offset;
1638
+ return fe("column", e, n, o).offset;
1632
1639
  },
1633
1640
  getColumnStartIndexForOffset: function(e, n, o) {
1634
1641
  return Xt("column", e, o, n);
1635
1642
  },
1636
1643
  getColumnStopIndexForStartIndex: function(e, n, o, r) {
1637
- for (var a = e.columnCount, l = e.width, c = me("column", e, n, r), d = o + l, p = c.offset + c.size, f = n; f < a - 1 && p < d; )
1638
- f++, p += me("column", e, f, r).size;
1639
- return f;
1644
+ for (var a = e.columnCount, l = e.width, c = fe("column", e, n, r), d = o + l, h = c.offset + c.size, m = n; m < a - 1 && h < d; )
1645
+ m++, h += fe("column", e, m, r).size;
1646
+ return m;
1640
1647
  },
1641
1648
  getColumnWidth: function(e, n, o) {
1642
1649
  return o.columnMetadataMap[n].size;
@@ -1650,7 +1657,7 @@ var Vo = function(e, n) {
1650
1657
  return Yt("row", e, n, o, r, a, l);
1651
1658
  },
1652
1659
  getRowOffset: function(e, n, o) {
1653
- return me("row", e, n, o).offset;
1660
+ return fe("row", e, n, o).offset;
1654
1661
  },
1655
1662
  getRowHeight: function(e, n, o) {
1656
1663
  return o.rowMetadataMap[n].size;
@@ -1659,9 +1666,9 @@ var Vo = function(e, n) {
1659
1666
  return Xt("row", e, o, n);
1660
1667
  },
1661
1668
  getRowStopIndexForStartIndex: function(e, n, o, r) {
1662
- for (var a = e.rowCount, l = e.height, c = me("row", e, n, r), d = o + l, p = c.offset + c.size, f = n; f < a - 1 && p < d; )
1663
- f++, p += me("row", e, f, r).size;
1664
- return f;
1669
+ for (var a = e.rowCount, l = e.height, c = fe("row", e, n, r), d = o + l, h = c.offset + c.size, m = n; m < a - 1 && h < d; )
1670
+ m++, h += fe("row", e, m, r).size;
1671
+ return m;
1665
1672
  },
1666
1673
  initInstanceProps: function(e, n) {
1667
1674
  var o = e, r = o.estimatedColumnWidth, a = o.estimatedRowHeight, l = {
@@ -1683,8 +1690,8 @@ var Vo = function(e, n) {
1683
1690
  shouldForceUpdate: d
1684
1691
  });
1685
1692
  }, n.resetAfterIndices = function(c) {
1686
- var d = c.columnIndex, p = c.rowIndex, f = c.shouldForceUpdate, _ = f === void 0 ? !0 : f;
1687
- typeof d == "number" && (l.lastMeasuredColumnIndex = Math.min(l.lastMeasuredColumnIndex, d - 1)), typeof p == "number" && (l.lastMeasuredRowIndex = Math.min(l.lastMeasuredRowIndex, p - 1)), n._getItemStyleCache(-1), _ && n.forceUpdate();
1693
+ var d = c.columnIndex, h = c.rowIndex, m = c.shouldForceUpdate, P = m === void 0 ? !0 : m;
1694
+ typeof d == "number" && (l.lastMeasuredColumnIndex = Math.min(l.lastMeasuredColumnIndex, d - 1)), typeof h == "number" && (l.lastMeasuredRowIndex = Math.min(l.lastMeasuredRowIndex, h - 1)), n._getItemStyleCache(-1), P && n.forceUpdate();
1688
1695
  }, l;
1689
1696
  },
1690
1697
  shouldResetStyleCacheOnItemSizeChange: !1,
@@ -1714,31 +1721,31 @@ function Ko(t, e) {
1714
1721
  return !Jt(n, r) && !Jt(o, a);
1715
1722
  }
1716
1723
  const Xo = () => {
1717
- const { viewMode: t } = Ee(), { scrollMode: e } = Re(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r = Ue(), a = k(() => r.heights.length, [r.heights]), l = k(() => e === J.HORIZONTAL_SCROLLING ? a : t === xe.DUAL_PAGE ? 2 : 1, [t, e, e, a, o]), c = k(() => r.widths.reduce((w, T, P) => {
1718
- const S = P % l;
1719
- return (!w[S] || T > w[S]) && (w[S] = T), w;
1724
+ const { viewMode: t } = Ee(), { scrollMode: e } = Le(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r = Ue(), a = k(() => r.heights.length, [r.heights]), l = k(() => e === J.HORIZONTAL_SCROLLING ? a : t === Ie.DUAL_PAGE ? 2 : 1, [t, e, e, a, o]), c = k(() => r.widths.reduce((w, S, b) => {
1725
+ const T = b % l;
1726
+ return (!w[T] || S > w[T]) && (w[T] = S), w;
1720
1727
  }, []), [r.widths, l]), d = N(
1721
1728
  (v) => {
1722
1729
  const w = v % c.length;
1723
1730
  return c[w] || 0;
1724
1731
  },
1725
1732
  [c]
1726
- ), p = N(
1733
+ ), h = N(
1727
1734
  (v) => r.heights[v] || 0,
1728
1735
  [r.heights]
1729
1736
  );
1730
- W(() => {
1737
+ F(() => {
1731
1738
  n(l);
1732
1739
  }, [l, n]);
1733
- const f = k(() => e === J.HORIZONTAL_SCROLLING || e === J.PAGE_SCROLLING ? 1 : Math.round(a / l), [l, a, e]), _ = k(() => r.heights.reduce((v, w) => v + w, 0) / r.heights.length || 0, [r]), h = k(() => r.widths.reduce((v, w) => v + w, 0) / r.heights.length || 0, [r]);
1740
+ const m = k(() => e === J.HORIZONTAL_SCROLLING || e === J.PAGE_SCROLLING ? 1 : Math.round(a / l), [l, a, e]), P = k(() => r.heights.reduce((v, w) => v + w, 0) / r.heights.length || 0, [r]), p = k(() => r.widths.reduce((v, w) => v + w, 0) / r.heights.length || 0, [r]);
1734
1741
  return {
1735
- rowCount: f,
1736
- rowHeight: p,
1742
+ rowCount: m,
1743
+ rowHeight: h,
1737
1744
  columnCount: l,
1738
1745
  columnWidth: d,
1739
1746
  pageDimension: r,
1740
- estimatedRowHeight: _,
1741
- estimatedColumnWidth: h
1747
+ estimatedRowHeight: P,
1748
+ estimatedColumnWidth: p
1742
1749
  };
1743
1750
  };
1744
1751
  let oe;
@@ -1761,68 +1768,68 @@ function Yo(t) {
1761
1768
  let e, n, o, r, a, l, c;
1762
1769
  const d = typeof document < "u" && document.attachEvent;
1763
1770
  if (!d) {
1764
- l = function(S) {
1765
- const u = S.__resizeTriggers__, m = u.firstElementChild, g = u.lastElementChild, s = m.firstElementChild;
1766
- g.scrollLeft = g.scrollWidth, g.scrollTop = g.scrollHeight, s.style.width = m.offsetWidth + 1 + "px", s.style.height = m.offsetHeight + 1 + "px", m.scrollLeft = m.scrollWidth, m.scrollTop = m.scrollHeight;
1767
- }, a = function(S) {
1768
- return S.offsetWidth !== S.__resizeLast__.width || S.offsetHeight !== S.__resizeLast__.height;
1769
- }, c = function(S) {
1770
- if (S.target.className && typeof S.target.className.indexOf == "function" && S.target.className.indexOf("contract-trigger") < 0 && S.target.className.indexOf("expand-trigger") < 0)
1771
+ l = function(T) {
1772
+ const u = T.__resizeTriggers__, f = u.firstElementChild, g = u.lastElementChild, s = f.firstElementChild;
1773
+ g.scrollLeft = g.scrollWidth, g.scrollTop = g.scrollHeight, s.style.width = f.offsetWidth + 1 + "px", s.style.height = f.offsetHeight + 1 + "px", f.scrollLeft = f.scrollWidth, f.scrollTop = f.scrollHeight;
1774
+ }, a = function(T) {
1775
+ return T.offsetWidth !== T.__resizeLast__.width || T.offsetHeight !== T.__resizeLast__.height;
1776
+ }, c = function(T) {
1777
+ if (T.target.className && typeof T.target.className.indexOf == "function" && T.target.className.indexOf("contract-trigger") < 0 && T.target.className.indexOf("expand-trigger") < 0)
1771
1778
  return;
1772
1779
  const u = this;
1773
1780
  l(this), this.__resizeRAF__ && _t(this.__resizeRAF__), this.__resizeRAF__ = bt(function() {
1774
1781
  a(u) && (u.__resizeLast__.width = u.offsetWidth, u.__resizeLast__.height = u.offsetHeight, u.__resizeListeners__.forEach(function(s) {
1775
- s.call(u, S);
1782
+ s.call(u, T);
1776
1783
  }));
1777
1784
  });
1778
1785
  };
1779
- let h = !1, v = "";
1786
+ let p = !1, v = "";
1780
1787
  o = "animationstart";
1781
1788
  const w = "Webkit Moz O ms".split(" ");
1782
- let T = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), P = "";
1789
+ let S = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), b = "";
1783
1790
  {
1784
- const S = document.createElement("fakeelement");
1785
- if (S.style.animationName !== void 0 && (h = !0), h === !1) {
1791
+ const T = document.createElement("fakeelement");
1792
+ if (T.style.animationName !== void 0 && (p = !0), p === !1) {
1786
1793
  for (let u = 0; u < w.length; u++)
1787
- if (S.style[w[u] + "AnimationName"] !== void 0) {
1788
- P = w[u], v = "-" + P.toLowerCase() + "-", o = T[u], h = !0;
1794
+ if (T.style[w[u] + "AnimationName"] !== void 0) {
1795
+ b = w[u], v = "-" + b.toLowerCase() + "-", o = S[u], p = !0;
1789
1796
  break;
1790
1797
  }
1791
1798
  }
1792
1799
  }
1793
1800
  n = "resizeanim", e = "@" + v + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = v + "animation: 1ms " + n + "; ";
1794
1801
  }
1795
- const p = function(h) {
1796
- if (!h.getElementById("detectElementResize")) {
1797
- const v = (e || "") + ".resize-triggers { " + (r || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', w = h.head || h.getElementsByTagName("head")[0], T = h.createElement("style");
1798
- T.id = "detectElementResize", T.type = "text/css", t != null && T.setAttribute("nonce", t), T.styleSheet ? T.styleSheet.cssText = v : T.appendChild(h.createTextNode(v)), w.appendChild(T);
1802
+ const h = function(p) {
1803
+ if (!p.getElementById("detectElementResize")) {
1804
+ const v = (e || "") + ".resize-triggers { " + (r || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', w = p.head || p.getElementsByTagName("head")[0], S = p.createElement("style");
1805
+ S.id = "detectElementResize", S.type = "text/css", t != null && S.setAttribute("nonce", t), S.styleSheet ? S.styleSheet.cssText = v : S.appendChild(p.createTextNode(v)), w.appendChild(S);
1799
1806
  }
1800
1807
  };
1801
1808
  return {
1802
- addResizeListener: function(h, v) {
1809
+ addResizeListener: function(p, v) {
1803
1810
  if (d)
1804
- h.attachEvent("onresize", v);
1811
+ p.attachEvent("onresize", v);
1805
1812
  else {
1806
- if (!h.__resizeTriggers__) {
1807
- const w = h.ownerDocument, T = oe.getComputedStyle(h);
1808
- T && T.position === "static" && (h.style.position = "relative"), p(w), h.__resizeLast__ = {}, h.__resizeListeners__ = [], (h.__resizeTriggers__ = w.createElement("div")).className = "resize-triggers";
1809
- const P = w.createElement("div");
1810
- P.className = "expand-trigger", P.appendChild(w.createElement("div"));
1811
- const S = w.createElement("div");
1812
- S.className = "contract-trigger", h.__resizeTriggers__.appendChild(P), h.__resizeTriggers__.appendChild(S), h.appendChild(h.__resizeTriggers__), l(h), h.addEventListener("scroll", c, !0), o && (h.__resizeTriggers__.__animationListener__ = function(m) {
1813
- m.animationName === n && l(h);
1814
- }, h.__resizeTriggers__.addEventListener(o, h.__resizeTriggers__.__animationListener__));
1813
+ if (!p.__resizeTriggers__) {
1814
+ const w = p.ownerDocument, S = oe.getComputedStyle(p);
1815
+ S && S.position === "static" && (p.style.position = "relative"), h(w), p.__resizeLast__ = {}, p.__resizeListeners__ = [], (p.__resizeTriggers__ = w.createElement("div")).className = "resize-triggers";
1816
+ const b = w.createElement("div");
1817
+ b.className = "expand-trigger", b.appendChild(w.createElement("div"));
1818
+ const T = w.createElement("div");
1819
+ T.className = "contract-trigger", p.__resizeTriggers__.appendChild(b), p.__resizeTriggers__.appendChild(T), p.appendChild(p.__resizeTriggers__), l(p), p.addEventListener("scroll", c, !0), o && (p.__resizeTriggers__.__animationListener__ = function(f) {
1820
+ f.animationName === n && l(p);
1821
+ }, p.__resizeTriggers__.addEventListener(o, p.__resizeTriggers__.__animationListener__));
1815
1822
  }
1816
- h.__resizeListeners__.push(v);
1823
+ p.__resizeListeners__.push(v);
1817
1824
  }
1818
1825
  },
1819
- removeResizeListener: function(h, v) {
1826
+ removeResizeListener: function(p, v) {
1820
1827
  if (d)
1821
- h.detachEvent("onresize", v);
1822
- else if (h.__resizeListeners__.splice(h.__resizeListeners__.indexOf(v), 1), !h.__resizeListeners__.length) {
1823
- h.removeEventListener("scroll", c, !0), h.__resizeTriggers__.__animationListener__ && (h.__resizeTriggers__.removeEventListener(o, h.__resizeTriggers__.__animationListener__), h.__resizeTriggers__.__animationListener__ = null);
1828
+ p.detachEvent("onresize", v);
1829
+ else if (p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(v), 1), !p.__resizeListeners__.length) {
1830
+ p.removeEventListener("scroll", c, !0), p.__resizeTriggers__.__animationListener__ && (p.__resizeTriggers__.removeEventListener(o, p.__resizeTriggers__.__animationListener__), p.__resizeTriggers__.__animationListener__ = null);
1824
1831
  try {
1825
- h.__resizeTriggers__ = !h.removeChild(h.__resizeTriggers__);
1832
+ p.__resizeTriggers__ = !p.removeChild(p.__resizeTriggers__);
1826
1833
  } catch {
1827
1834
  }
1828
1835
  }
@@ -1844,16 +1851,16 @@ class Jo extends er {
1844
1851
  onResize: r
1845
1852
  } = this.props;
1846
1853
  if (this._parentNode) {
1847
- const a = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(a.paddingLeft || "0"), c = parseFloat(a.paddingRight || "0"), d = parseFloat(a.paddingTop || "0"), p = parseFloat(a.paddingBottom || "0"), f = this._parentNode.getBoundingClientRect(), _ = f.height - d - p, h = f.width - l - c, v = this._parentNode.offsetHeight - d - p, w = this._parentNode.offsetWidth - l - c;
1848
- (!n && (this.state.height !== v || this.state.scaledHeight !== _) || !o && (this.state.width !== w || this.state.scaledWidth !== h)) && (this.setState({
1854
+ const a = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(a.paddingLeft || "0"), c = parseFloat(a.paddingRight || "0"), d = parseFloat(a.paddingTop || "0"), h = parseFloat(a.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), P = m.height - d - h, p = m.width - l - c, v = this._parentNode.offsetHeight - d - h, w = this._parentNode.offsetWidth - l - c;
1855
+ (!n && (this.state.height !== v || this.state.scaledHeight !== P) || !o && (this.state.width !== w || this.state.scaledWidth !== p)) && (this.setState({
1849
1856
  height: v,
1850
1857
  width: w,
1851
- scaledHeight: _,
1852
- scaledWidth: h
1858
+ scaledHeight: P,
1859
+ scaledWidth: p
1853
1860
  }), typeof r == "function" && r({
1854
1861
  height: v,
1855
- scaledHeight: _,
1856
- scaledWidth: h,
1862
+ scaledHeight: P,
1863
+ scaledWidth: p,
1857
1864
  width: w
1858
1865
  }));
1859
1866
  }
@@ -1886,56 +1893,56 @@ class Jo extends er {
1886
1893
  doNotBailOutOnEmptyChildren: l = !1,
1887
1894
  nonce: c,
1888
1895
  onResize: d,
1889
- style: p = {},
1890
- tagName: f = "div",
1891
- ..._
1896
+ style: h = {},
1897
+ tagName: m = "div",
1898
+ ...P
1892
1899
  } = this.props, {
1893
- height: h,
1900
+ height: p,
1894
1901
  scaledHeight: v,
1895
1902
  scaledWidth: w,
1896
- width: T
1897
- } = this.state, P = {
1903
+ width: S
1904
+ } = this.state, b = {
1898
1905
  overflow: "visible"
1899
- }, S = {};
1906
+ }, T = {};
1900
1907
  let u = !1;
1901
- return r || (h === 0 && (u = !0), P.height = 0, S.height = h, S.scaledHeight = v), a || (T === 0 && (u = !0), P.width = 0, S.width = T, S.scaledWidth = w), l && (u = !1), qe(f, {
1908
+ return r || (p === 0 && (u = !0), b.height = 0, T.height = p, T.scaledHeight = v), a || (S === 0 && (u = !0), b.width = 0, T.width = S, T.scaledWidth = w), l && (u = !1), qe(m, {
1902
1909
  ref: this._setRef,
1903
1910
  style: {
1904
- ...P,
1905
- ...p
1911
+ ...b,
1912
+ ...h
1906
1913
  },
1907
- ..._
1908
- }, !u && e(S));
1914
+ ...P
1915
+ }, !u && e(T));
1909
1916
  }
1910
1917
  }
1911
1918
  const Qo = ln(({ widths: t, heights: e }) => {
1912
1919
  const { focusedPage: n, totalPages: o } = ie(), r = k(() => {
1913
1920
  const c = [], d = Math.ceil(n / 2) * 2 - 1;
1914
1921
  if (c.push(d), d + 1 <= o) {
1915
- const p = d + 1;
1916
- c.push(p);
1922
+ const h = d + 1;
1923
+ c.push(h);
1917
1924
  }
1918
1925
  return c;
1919
1926
  }, [n, o]), a = k(() => {
1920
- const c = n % 2 === 1 ? n - 1 : n - 2, d = t(c), p = e(c), f = t(c + 1), _ = e(c + 1), h = p > _ ? p : _, v = p < _ ? p : _, w = h / 2 - v / 2;
1927
+ const c = n % 2 === 1 ? n - 1 : n - 2, d = t(c), h = e(c), m = t(c + 1), P = e(c + 1), p = h > P ? h : P, v = h < P ? h : P, w = p / 2 - v / 2;
1921
1928
  return [
1922
1929
  {
1923
1930
  position: "absolute",
1924
1931
  left: 0,
1925
- top: h === p ? 0 : w,
1932
+ top: p === h ? 0 : w,
1926
1933
  width: d,
1927
- height: p
1934
+ height: h
1928
1935
  },
1929
1936
  {
1930
1937
  position: "absolute",
1931
1938
  left: d,
1932
- top: h === _ ? 0 : w,
1933
- width: f,
1934
- height: _
1939
+ top: p === P ? 0 : w,
1940
+ width: m,
1941
+ height: P
1935
1942
  }
1936
1943
  ];
1937
1944
  }, [t, e, r]), l = k(() => a.reduce((c, d) => c + Number(d.width || 0), 0), [a]);
1938
- return /* @__PURE__ */ i("div", { style: { width: l, position: "relative" }, children: r.map((c, d) => /* @__PURE__ */ i(xt, { style: a[d], pageNumber: c }, c)) });
1945
+ return /* @__PURE__ */ i("div", { style: { width: l, position: "relative" }, children: r.map((c, d) => /* @__PURE__ */ i(It, { style: a[d], pageNumber: c }, c)) });
1939
1946
  }), ei = ({ widths: t, heights: e }) => {
1940
1947
  const { focusedPage: n } = ie(), o = k(() => ({
1941
1948
  position: "absolute",
@@ -1949,55 +1956,55 @@ const Qo = ln(({ widths: t, heights: e }) => {
1949
1956
  width: r,
1950
1957
  position: "relative"
1951
1958
  },
1952
- children: /* @__PURE__ */ i(xt, { style: o, pageNumber: n }, n)
1959
+ children: /* @__PURE__ */ i(It, { style: o, pageNumber: n }, n)
1953
1960
  }
1954
1961
  );
1955
1962
  }, ti = (t, e, n) => {
1956
- const o = H(), { contentRef: r } = ge(), { heights: a, widths: l } = Ue(), { setFocusedPage: c } = ie(), [d, p] = $([]), { targetScrollPage: f } = pn(), _ = Pt(d, 0, 500), h = k(() => a.map((w, T) => {
1957
- const P = l[T], S = Vr(T + 1, t), u = P * S.columnIndex, m = w * S.rowIndex, g = u + P, s = m + w;
1963
+ const o = H(), { contentRef: r } = ge(), { heights: a, widths: l } = Ue(), { setFocusedPage: c } = ie(), [d, h] = $([]), { targetScrollPage: m } = pn(), P = Pt(d, 0, 500), p = k(() => a.map((w, S) => {
1964
+ const b = l[S], T = Vr(S + 1, t), u = b * T.columnIndex, f = w * T.rowIndex, g = u + b, s = f + w;
1958
1965
  return {
1959
- pageNumber: T + 1,
1960
- ...S,
1961
- width: P,
1966
+ pageNumber: S + 1,
1967
+ ...T,
1968
+ width: b,
1962
1969
  height: w,
1963
1970
  startX: u,
1964
- startY: m,
1971
+ startY: f,
1965
1972
  endX: g,
1966
1973
  endY: s
1967
1974
  };
1968
1975
  }), [a, l, t, e]);
1969
- W(() => {
1970
- var T;
1971
- _.length > 0 && !f.current && c(_[0].pageNumber);
1972
- let w = (T = _[0]) == null ? void 0 : T.ratio;
1973
- w && _.filter((P) => Math.round(P.ratio) === Math.round(w)).some((P) => P.pageNumber === f.current) && setTimeout(() => {
1974
- f.current = void 0;
1976
+ F(() => {
1977
+ var S;
1978
+ P.length > 0 && !m.current && c(P[0].pageNumber);
1979
+ let w = (S = P[0]) == null ? void 0 : S.ratio;
1980
+ w && P.filter((b) => Math.round(b.ratio) === Math.round(w)).some((b) => b.pageNumber === m.current) && setTimeout(() => {
1981
+ m.current = void 0;
1975
1982
  }, 500);
1976
- }, [_, c]);
1983
+ }, [P, c]);
1977
1984
  const v = N(
1978
1985
  (w) => {
1979
1986
  o.current && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => {
1980
- const T = w.target, P = {
1981
- startTop: T.scrollTop,
1982
- startLeft: T.scrollLeft,
1983
- endTop: T.scrollTop + T.clientHeight,
1984
- endLeft: T.scrollLeft + T.clientWidth
1985
- }, S = h.filter((u) => {
1986
- const m = u.endX >= P.startLeft && u.endY >= P.startTop, g = u.startX <= P.endLeft && u.startY <= P.endTop;
1987
- return m && g;
1987
+ const S = w.target, b = {
1988
+ startTop: S.scrollTop,
1989
+ startLeft: S.scrollLeft,
1990
+ endTop: S.scrollTop + S.clientHeight,
1991
+ endLeft: S.scrollLeft + S.clientWidth
1992
+ }, T = p.filter((u) => {
1993
+ const f = u.endX >= b.startLeft && u.endY >= b.startTop, g = u.startX <= b.endLeft && u.startY <= b.endTop;
1994
+ return f && g;
1988
1995
  }).map((u) => {
1989
- const m = P.startLeft > u.startX ? P.startLeft : u.startX, g = P.startTop > u.startY ? P.startTop : u.startY, s = P.endLeft < u.endX ? P.endLeft : u.endX, C = P.endTop < u.endY ? P.endTop : u.endY, b = s - m, y = C - g, I = +(b * y / (u.width * u.height) * 100).toFixed(2);
1996
+ const f = b.startLeft > u.startX ? b.startLeft : u.startX, g = b.startTop > u.startY ? b.startTop : u.startY, s = b.endLeft < u.endX ? b.endLeft : u.endX, C = b.endTop < u.endY ? b.endTop : u.endY, _ = s - f, y = C - g, x = +(_ * y / (u.width * u.height) * 100).toFixed(2);
1990
1997
  return {
1991
1998
  pageNumber: u.pageNumber,
1992
- ratio: I
1999
+ ratio: x
1993
2000
  };
1994
- }).sort((u, m) => m.ratio - u.ratio);
1995
- p(S);
2001
+ }).sort((u, f) => f.ratio - u.ratio);
2002
+ h(T);
1996
2003
  });
1997
2004
  },
1998
- [r, h]
2005
+ [r, p]
1999
2006
  );
2000
- W(() => {
2007
+ F(() => {
2001
2008
  if (n)
2002
2009
  return n == null || n.addEventListener("scroll", v), () => {
2003
2010
  n == null || n.removeEventListener("scroll", v);
@@ -2005,32 +2012,32 @@ const Qo = ln(({ widths: t, heights: e }) => {
2005
2012
  }, [n, v]);
2006
2013
  }, ni = ln(({ columnIndex: t, rowIndex: e, data: n, style: o }) => {
2007
2014
  const r = qr(e, t, n.columnCount);
2008
- return /* @__PURE__ */ i(xt, { style: o, pageNumber: r }, r);
2015
+ return /* @__PURE__ */ i(It, { style: o, pageNumber: r }, r);
2009
2016
  }, Ko), Gs = () => {
2010
2017
  const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = ar(), { pagesRef: o, setPagesRef: r } = ge(), { scrollToPage: a } = wn(), {
2011
2018
  virtualScrollRef: l,
2012
2019
  getVirtualScrollRef: c,
2013
2020
  getPageScrollElementRef: d,
2014
- getVirtualScrollableElementRef: p,
2015
- setTotalInnerDimensions: f,
2016
- virtualScrollableElementRef: _,
2017
- totalInnerDimensions: h,
2021
+ getVirtualScrollableElementRef: h,
2022
+ setTotalInnerDimensions: m,
2023
+ virtualScrollableElementRef: P,
2024
+ totalInnerDimensions: p,
2018
2025
  pageScrollElementRef: v
2019
- } = et(), w = H(!0), { nextPage: T, prevPage: P, setFocusedPage: S, focusedPage: u } = ie(), { scrollMode: m } = Re(), { viewMode: g } = Ee(), s = H(null), { loading: C } = Q(), { passwordRequired: b } = nr(), { LoaderImageComponent: y } = hn(), E = H(
2020
- h
2021
- ), I = H({
2026
+ } = et(), w = H(!0), { nextPage: S, prevPage: b, setFocusedPage: T, focusedPage: u } = ie(), { scrollMode: f } = Le(), { viewMode: g } = Ee(), s = H(null), { loading: C } = Q(), { passwordRequired: _ } = nr(), { LoaderImageComponent: y } = hn(), E = H(
2027
+ p
2028
+ ), x = H({
2022
2029
  viewMode: g,
2023
- scrollMode: m
2024
- }), L = H(!1), D = H(), { isFullScreen: z } = sr(), {
2030
+ scrollMode: f
2031
+ }), R = H(!1), D = H(), { isFullScreen: z } = sr(), {
2025
2032
  pageDimension: A,
2026
- rowCount: R,
2027
- rowHeight: x,
2033
+ rowCount: L,
2034
+ rowHeight: I,
2028
2035
  columnCount: O,
2029
2036
  columnWidth: M,
2030
2037
  estimatedColumnWidth: G,
2031
2038
  estimatedRowHeight: Z
2032
- } = Xo(), j = Pt(h, 100), q = H();
2033
- ti(O, R, _);
2039
+ } = Xo(), j = Pt(p, 100), q = H();
2040
+ ti(O, L, P);
2034
2041
  const ee = H({
2035
2042
  scrollTop: 0,
2036
2043
  scrollLeft: 0
@@ -2043,39 +2050,39 @@ const Qo = ln(({ widths: t, heights: e }) => {
2043
2050
  }), [O]), Ne = N(
2044
2051
  (U) => {
2045
2052
  const V = document.activeElement !== o;
2046
- !z && V || (["ArrowUp", "ArrowLeft"].includes(U.key) ? (U.preventDefault(), P()) : ["ArrowDown", "ArrowRight"].includes(U.key) && (U.preventDefault(), T()));
2053
+ !z && V || (["ArrowUp", "ArrowLeft"].includes(U.key) ? (U.preventDefault(), b()) : ["ArrowDown", "ArrowRight"].includes(U.key) && (U.preventDefault(), S()));
2047
2054
  },
2048
- [T, P, z, m]
2055
+ [S, b, z, f]
2049
2056
  );
2050
- W(() => (window.addEventListener("keydown", Ne), () => {
2057
+ F(() => (window.addEventListener("keydown", Ne), () => {
2051
2058
  window.removeEventListener("keydown", Ne);
2052
- }), [Ne]), W(() => {
2059
+ }), [Ne]), F(() => {
2053
2060
  if (s.current && (s.current.style.position = "relative"), !!l)
2054
- for (let U = 0; U < R; U++)
2061
+ for (let U = 0; U < L; U++)
2055
2062
  for (let V = 0; V < O; V++)
2056
2063
  l.resetAfterIndices({
2057
2064
  columnIndex: V,
2058
2065
  rowIndex: U,
2059
2066
  shouldForceUpdate: !0
2060
2067
  });
2061
- }, [R, O, A, l]);
2068
+ }, [L, O, A, l]);
2062
2069
  const Pe = N(
2063
2070
  (U, V) => {
2064
- if (!_)
2071
+ if (!P)
2065
2072
  return { scrollTop: 0, scrollLeft: 0 };
2066
2073
  const Te = ee.current.scrollTop > V, Se = ee.current.scrollLeft > U;
2067
2074
  return Te || Se ? ee.current : {
2068
- scrollTop: _.scrollTop,
2069
- scrollLeft: _.scrollLeft
2075
+ scrollTop: P.scrollTop,
2076
+ scrollLeft: P.scrollLeft
2070
2077
  };
2071
2078
  },
2072
- [_]
2079
+ [P]
2073
2080
  ), we = N(
2074
2081
  (U, V) => {
2075
- if (I.current.viewMode !== g || I.current.scrollMode !== m) {
2076
- q.current && clearTimeout(q.current), L.current = !0, a(u, "auto"), q.current = setTimeout(() => {
2082
+ if (x.current.viewMode !== g || x.current.scrollMode !== f) {
2083
+ q.current && clearTimeout(q.current), R.current = !0, a(u, "auto"), q.current = setTimeout(() => {
2077
2084
  requestAnimationFrame(() => {
2078
- I.current = { viewMode: g, scrollMode: m };
2085
+ x.current = { viewMode: g, scrollMode: f };
2079
2086
  });
2080
2087
  }, 100);
2081
2088
  return;
@@ -2083,7 +2090,7 @@ const Qo = ln(({ widths: t, heights: e }) => {
2083
2090
  const Se = U.scrollTop, ot = U.scrollLeft;
2084
2091
  if (!V.height || !V.width)
2085
2092
  return;
2086
- L.current = !0;
2093
+ R.current = !0;
2087
2094
  const { height: ye, width: it } = V, { height: Ot, width: Dt } = E.current;
2088
2095
  if (Ot === ye && Dt === it)
2089
2096
  return;
@@ -2100,22 +2107,22 @@ const Qo = ln(({ widths: t, heights: e }) => {
2100
2107
  width: V.width
2101
2108
  };
2102
2109
  },
2103
- [l, g, m, a]
2110
+ [l, g, f, a]
2104
2111
  );
2105
- W(() => {
2112
+ F(() => {
2106
2113
  clearTimeout(D.current);
2107
- const U = Array.from({ length: R }).reduce(
2108
- (Se, ot, ye) => Se + x(ye),
2114
+ const U = Array.from({ length: L }).reduce(
2115
+ (Se, ot, ye) => Se + I(ye),
2109
2116
  0
2110
2117
  ), V = Array.from({ length: O }).reduce(
2111
2118
  (Se, ot, ye) => Se + M(ye),
2112
2119
  0
2113
2120
  ), Te = Pe(V, U);
2114
- ee.current = Te, we(Te, { height: U, width: V }), f({
2121
+ ee.current = Te, we(Te, { height: U, width: V }), m({
2115
2122
  height: U,
2116
2123
  width: V
2117
2124
  });
2118
- }, [A, R, O, we]);
2125
+ }, [A, L, O, we]);
2119
2126
  const nt = N(
2120
2127
  (U) => {
2121
2128
  ee.current = {
@@ -2123,9 +2130,9 @@ const Qo = ln(({ widths: t, heights: e }) => {
2123
2130
  scrollLeft: U.scrollLeft
2124
2131
  };
2125
2132
  },
2126
- [_]
2133
+ [P]
2127
2134
  );
2128
- W(() => () => {
2135
+ F(() => () => {
2129
2136
  q.current && clearTimeout(q.current);
2130
2137
  }, []);
2131
2138
  const rt = k(() => ne(ue["rp-pages-container"], {
@@ -2140,50 +2147,50 @@ const Qo = ln(({ widths: t, heights: e }) => {
2140
2147
  },
2141
2148
  [te, ae, ue]
2142
2149
  );
2143
- return W(() => {
2150
+ return F(() => {
2144
2151
  C && de();
2145
- }, [C]), W(() => {
2152
+ }, [C]), F(() => {
2146
2153
  if (!(j.height === 0 || !w.current)) {
2147
2154
  if (e === J.PAGE_SCROLLING) {
2148
- t !== u && v && S(t), w.current = !1;
2155
+ t !== u && v && T(t), w.current = !1;
2149
2156
  return;
2150
2157
  }
2151
- a(t, "auto"), S(t), w.current = !1;
2158
+ a(t, "auto"), T(t), w.current = !1;
2152
2159
  }
2153
2160
  }, [
2154
2161
  a,
2155
2162
  e,
2156
2163
  v,
2157
- S,
2164
+ T,
2158
2165
  j
2159
- ]), /* @__PURE__ */ F(fe, { children: [
2160
- /* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: rt, children: /* @__PURE__ */ i(Jo, { style: { minHeight: "50px" }, children: ({ width: U, height: V }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: jn, style: { width: U, height: V }, children: m === J.PAGE_SCROLLING ? /* @__PURE__ */ i(
2166
+ ]), /* @__PURE__ */ W(me, { children: [
2167
+ /* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: rt, children: /* @__PURE__ */ i(Jo, { style: { minHeight: "50px" }, children: ({ width: U, height: V }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: jn, style: { width: U, height: V }, children: f === J.PAGE_SCROLLING ? /* @__PURE__ */ i(
2161
2168
  "div",
2162
2169
  {
2163
2170
  ref: d,
2164
2171
  style: { width: U, height: V },
2165
2172
  className: ne(ue["rp-pages"], ue["rp-page-scrolling-wrapper"]),
2166
- children: g === xe.DUAL_PAGE ? /* @__PURE__ */ i(Qo, { widths: M, heights: x }) : /* @__PURE__ */ i(ei, { widths: M, heights: x })
2173
+ children: g === Ie.DUAL_PAGE ? /* @__PURE__ */ i(Qo, { widths: M, heights: I }) : /* @__PURE__ */ i(ei, { widths: M, heights: I })
2167
2174
  }
2168
2175
  ) : G ? /* @__PURE__ */ i(
2169
2176
  Bo,
2170
2177
  {
2171
2178
  ref: c,
2172
2179
  itemData: Fe,
2173
- outerRef: p,
2180
+ outerRef: h,
2174
2181
  innerRef: s,
2175
2182
  onScroll: nt,
2176
2183
  columnCount: O,
2177
2184
  columnWidth: M,
2178
- rowHeight: x,
2185
+ rowHeight: I,
2179
2186
  height: V,
2180
2187
  width: U,
2181
2188
  estimatedColumnWidth: G,
2182
2189
  estimatedRowHeight: Z,
2183
- rowCount: R,
2190
+ rowCount: L,
2184
2191
  className: ne(
2185
2192
  ue["rp-pages"],
2186
- m === J.HORIZONTAL_SCROLLING ? ue["rp-pages-horizontal-scroll"] : ""
2193
+ f === J.HORIZONTAL_SCROLLING ? ue["rp-pages-horizontal-scroll"] : ""
2187
2194
  ),
2188
2195
  children: ni
2189
2196
  }
@@ -2201,7 +2208,7 @@ const Qo = ln(({ widths: t, heights: e }) => {
2201
2208
  children: y && /* @__PURE__ */ i(y, {})
2202
2209
  }
2203
2210
  ) }) }) }),
2204
- b && /* @__PURE__ */ i(Ur, {})
2211
+ _ && /* @__PURE__ */ i(Ur, {})
2205
2212
  ] });
2206
2213
  }, We = {
2207
2214
  "rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
@@ -2209,7 +2216,7 @@ const Qo = ln(({ widths: t, heights: e }) => {
2209
2216
  "rp-toolbar-start": "_rp-toolbar-start_sz31z_33",
2210
2217
  "rp-toolbar-middle": "_rp-toolbar-middle_sz31z_39",
2211
2218
  "rp-toolbar-end": "_rp-toolbar-end_sz31z_46"
2212
- }, mt = {
2219
+ }, ft = {
2213
2220
  "rp-paginate": "_rp-paginate_1y9vo_1",
2214
2221
  "rp-page-input": "_rp-page-input_1y9vo_6",
2215
2222
  "rp-total-page": "_rp-total-page_1y9vo_11"
@@ -2220,24 +2227,24 @@ const Qo = ln(({ widths: t, heights: e }) => {
2220
2227
  const { nextIcon: t } = pe();
2221
2228
  return t || /* @__PURE__ */ i(He, { style: { transform: "rotate(180deg" } });
2222
2229
  }, ii = () => {
2223
- const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [l, c] = $(t.toString()), { pageNavigationTool: d = !0 } = ve(), { isSmallScreen: p } = Ce(), { localeMessages: f } = se(), { viewMode: _ } = Ee(), { scrollMode: h } = Re();
2224
- W(() => {
2230
+ const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [l, c] = $(t.toString()), { pageNavigationTool: d = !0 } = ve(), { isSmallScreen: h } = Ce(), { localeMessages: m } = se(), { viewMode: P } = Ee(), { scrollMode: p } = Le();
2231
+ F(() => {
2225
2232
  c(t.toString());
2226
2233
  }, [t]);
2227
2234
  const v = N((u) => {
2228
- const m = u.target.value;
2229
- c(m);
2235
+ const f = u.target.value;
2236
+ c(f);
2230
2237
  }, []), w = N(async () => {
2231
2238
  const u = a(l);
2232
2239
  u.success || c(u.currentPage.toString());
2233
- }, [a, l, e]), T = N(() => {
2240
+ }, [a, l, e]), S = N(() => {
2234
2241
  c(t.toString());
2235
- }, [t]), P = N(
2242
+ }, [t]), b = N(
2236
2243
  (u) => {
2237
2244
  u.key === "Enter" && w();
2238
2245
  },
2239
2246
  [w]
2240
- ), S = k(() => _ === xe.DUAL_PAGE && h === J.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, _, h]);
2247
+ ), T = k(() => P === Ie.DUAL_PAGE && p === J.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, P, p]);
2241
2248
  return typeof d != "boolean" ? /* @__PURE__ */ i(
2242
2249
  d,
2243
2250
  {
@@ -2248,42 +2255,42 @@ const Qo = ln(({ widths: t, heights: e }) => {
2248
2255
  goToPage: a,
2249
2256
  changePage: n
2250
2257
  }
2251
- ) : d ? /* @__PURE__ */ F("div", { className: mt["rp-paginate"], children: [
2252
- !p && /* @__PURE__ */ i(K, { content: f == null ? void 0 : f.previousPageTooltip, children: /* @__PURE__ */ i(
2258
+ ) : d ? /* @__PURE__ */ W("div", { className: ft["rp-paginate"], children: [
2259
+ !h && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.previousPageTooltip, children: /* @__PURE__ */ i(
2253
2260
  re,
2254
2261
  {
2255
2262
  onClick: r,
2256
- "aria-label": f == null ? void 0 : f.previousPageTooltip,
2263
+ "aria-label": m == null ? void 0 : m.previousPageTooltip,
2257
2264
  "aria-disabled": t === 1,
2258
2265
  children: /* @__PURE__ */ i(ri, {})
2259
2266
  }
2260
2267
  ) }),
2261
- /* @__PURE__ */ i(K, { content: f == null ? void 0 : f.currentPageTooltip, children: /* @__PURE__ */ i(
2268
+ /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.currentPageTooltip, children: /* @__PURE__ */ i(
2262
2269
  dn,
2263
2270
  {
2264
- onKeyDown: P,
2265
- onBlur: T,
2271
+ onKeyDown: b,
2272
+ onBlur: S,
2266
2273
  onChange: v,
2267
2274
  value: l,
2268
- className: mt["rp-page-input"]
2275
+ className: ft["rp-page-input"]
2269
2276
  }
2270
2277
  ) }),
2271
- /* @__PURE__ */ F("span", { className: mt["rp-total-page"], children: [
2278
+ /* @__PURE__ */ W("span", { className: ft["rp-total-page"], children: [
2272
2279
  "/",
2273
2280
  e
2274
2281
  ] }),
2275
- !p && /* @__PURE__ */ i(K, { content: f == null ? void 0 : f.nextPageTooltip, children: /* @__PURE__ */ i(
2282
+ !h && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.nextPageTooltip, children: /* @__PURE__ */ i(
2276
2283
  re,
2277
2284
  {
2278
2285
  onClick: o,
2279
- "aria-label": f == null ? void 0 : f.nextPageTooltip,
2280
- "aria-disabled": S,
2286
+ "aria-label": m == null ? void 0 : m.nextPageTooltip,
2287
+ "aria-disabled": T,
2281
2288
  children: /* @__PURE__ */ i(oi, {})
2282
2289
  }
2283
2290
  ) })
2284
2291
  ] }) : null;
2285
2292
  };
2286
- var Lt = "Dialog", [xn, Us] = Xr(Lt), [ai, ce] = xn(Lt), Ln = (t) => {
2293
+ var Rt = "Dialog", [In, Us] = Xr(Rt), [ai, ce] = In(Rt), Rn = (t) => {
2287
2294
  const {
2288
2295
  __scopeDialog: e,
2289
2296
  children: n,
@@ -2291,7 +2298,7 @@ var Lt = "Dialog", [xn, Us] = Xr(Lt), [ai, ce] = xn(Lt), Ln = (t) => {
2291
2298
  defaultOpen: r,
2292
2299
  onOpenChange: a,
2293
2300
  modal: l = !0
2294
- } = t, c = B.useRef(null), d = B.useRef(null), [p = !1, f] = Qr({
2301
+ } = t, c = B.useRef(null), d = B.useRef(null), [h = !1, m] = Qr({
2295
2302
  prop: o,
2296
2303
  defaultProp: r,
2297
2304
  onChange: a
@@ -2305,18 +2312,18 @@ var Lt = "Dialog", [xn, Us] = Xr(Lt), [ai, ce] = xn(Lt), Ln = (t) => {
2305
2312
  contentId: ct(),
2306
2313
  titleId: ct(),
2307
2314
  descriptionId: ct(),
2308
- open: p,
2309
- onOpenChange: f,
2310
- onOpenToggle: B.useCallback(() => f((_) => !_), [f]),
2315
+ open: h,
2316
+ onOpenChange: m,
2317
+ onOpenToggle: B.useCallback(() => m((P) => !P), [m]),
2311
2318
  modal: l,
2312
2319
  children: n
2313
2320
  }
2314
2321
  );
2315
2322
  };
2316
- Ln.displayName = Lt;
2317
- var Rn = "DialogTrigger", si = B.forwardRef(
2323
+ Rn.displayName = Rt;
2324
+ var Ln = "DialogTrigger", si = B.forwardRef(
2318
2325
  (t, e) => {
2319
- const { __scopeDialog: n, ...o } = t, r = ce(Rn, n), a = Tt(e, r.triggerRef);
2326
+ const { __scopeDialog: n, ...o } = t, r = ce(Ln, n), a = Tt(e, r.triggerRef);
2320
2327
  return /* @__PURE__ */ i(
2321
2328
  Ve.button,
2322
2329
  {
@@ -2332,14 +2339,14 @@ var Rn = "DialogTrigger", si = B.forwardRef(
2332
2339
  );
2333
2340
  }
2334
2341
  );
2335
- si.displayName = Rn;
2336
- var Rt = "DialogPortal", [ci, En] = xn(Rt, {
2342
+ si.displayName = Ln;
2343
+ var Lt = "DialogPortal", [ci, En] = In(Lt, {
2337
2344
  forceMount: void 0
2338
2345
  }), Nn = (t) => {
2339
- const { __scopeDialog: e, forceMount: n, children: o, container: r } = t, a = ce(Rt, e);
2346
+ const { __scopeDialog: e, forceMount: n, children: o, container: r } = t, a = ce(Lt, e);
2340
2347
  return /* @__PURE__ */ i(ci, { scope: e, forceMount: n, children: B.Children.map(o, (l) => /* @__PURE__ */ i(St, { present: n || a.open, children: /* @__PURE__ */ i(oo, { asChild: !0, container: r, children: l }) })) });
2341
2348
  };
2342
- Nn.displayName = Rt;
2349
+ Nn.displayName = Lt;
2343
2350
  var Xe = "DialogOverlay", On = B.forwardRef(
2344
2351
  (t, e) => {
2345
2352
  const n = En(Xe, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = ce(Xe, t.__scopeDialog);
@@ -2364,16 +2371,16 @@ var li = B.forwardRef(
2364
2371
  ) })
2365
2372
  );
2366
2373
  }
2367
- ), Le = "DialogContent", Dn = B.forwardRef(
2374
+ ), Re = "DialogContent", Dn = B.forwardRef(
2368
2375
  (t, e) => {
2369
- const n = En(Le, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = ce(Le, t.__scopeDialog);
2376
+ const n = En(Re, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = ce(Re, t.__scopeDialog);
2370
2377
  return /* @__PURE__ */ i(St, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(di, { ...r, ref: e }) : /* @__PURE__ */ i(ui, { ...r, ref: e }) });
2371
2378
  }
2372
2379
  );
2373
- Dn.displayName = Le;
2380
+ Dn.displayName = Re;
2374
2381
  var di = B.forwardRef(
2375
2382
  (t, e) => {
2376
- const n = ce(Le, t.__scopeDialog), o = B.useRef(null), r = Tt(e, n.contentRef, o);
2383
+ const n = ce(Re, t.__scopeDialog), o = B.useRef(null), r = Tt(e, n.contentRef, o);
2377
2384
  return B.useEffect(() => {
2378
2385
  const a = o.current;
2379
2386
  if (a)
@@ -2402,7 +2409,7 @@ var di = B.forwardRef(
2402
2409
  }
2403
2410
  ), ui = B.forwardRef(
2404
2411
  (t, e) => {
2405
- const n = ce(Le, t.__scopeDialog), o = B.useRef(!1), r = B.useRef(!1);
2412
+ const n = ce(Re, t.__scopeDialog), o = B.useRef(!1), r = B.useRef(!1);
2406
2413
  return /* @__PURE__ */ i(
2407
2414
  zn,
2408
2415
  {
@@ -2415,18 +2422,18 @@ var di = B.forwardRef(
2415
2422
  (l = t.onCloseAutoFocus) == null || l.call(t, a), a.defaultPrevented || (o.current || (c = n.triggerRef.current) == null || c.focus(), a.preventDefault()), o.current = !1, r.current = !1;
2416
2423
  },
2417
2424
  onInteractOutside: (a) => {
2418
- var d, p;
2425
+ var d, h;
2419
2426
  (d = t.onInteractOutside) == null || d.call(t, a), a.defaultPrevented || (o.current = !0, a.detail.originalEvent.type === "pointerdown" && (r.current = !0));
2420
2427
  const l = a.target;
2421
- ((p = n.triggerRef.current) == null ? void 0 : p.contains(l)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && r.current && a.preventDefault();
2428
+ ((h = n.triggerRef.current) == null ? void 0 : h.contains(l)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && r.current && a.preventDefault();
2422
2429
  }
2423
2430
  }
2424
2431
  );
2425
2432
  }
2426
2433
  ), zn = B.forwardRef(
2427
2434
  (t, e) => {
2428
- const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...l } = t, c = ce(Le, n), d = B.useRef(null), p = Tt(e, d);
2429
- return no(), /* @__PURE__ */ F(fe, { children: [
2435
+ const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...l } = t, c = ce(Re, n), d = B.useRef(null), h = Tt(e, d);
2436
+ return no(), /* @__PURE__ */ W(me, { children: [
2430
2437
  /* @__PURE__ */ i(
2431
2438
  ro,
2432
2439
  {
@@ -2444,15 +2451,15 @@ var di = B.forwardRef(
2444
2451
  "aria-labelledby": c.titleId,
2445
2452
  "data-state": Nt(c.open),
2446
2453
  ...l,
2447
- ref: p,
2454
+ ref: h,
2448
2455
  onDismiss: () => c.onOpenChange(!1)
2449
2456
  }
2450
2457
  )
2451
2458
  }
2452
2459
  ),
2453
- /* @__PURE__ */ F(fe, { children: [
2460
+ /* @__PURE__ */ W(me, { children: [
2454
2461
  /* @__PURE__ */ i(hi, { titleId: c.titleId }),
2455
- /* @__PURE__ */ i(fi, { contentRef: d, descriptionId: c.descriptionId })
2462
+ /* @__PURE__ */ i(mi, { contentRef: d, descriptionId: c.descriptionId })
2456
2463
  ] })
2457
2464
  ] });
2458
2465
  }
@@ -2489,7 +2496,7 @@ function Nt(t) {
2489
2496
  return t ? "open" : "closed";
2490
2497
  }
2491
2498
  var Mn = "DialogTitleWarning", [Vs, Hn] = Jr(Mn, {
2492
- contentName: Le,
2499
+ contentName: Re,
2493
2500
  titleName: Et,
2494
2501
  docsSlug: "dialog"
2495
2502
  }), hi = ({ titleId: t }) => {
@@ -2501,15 +2508,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
2501
2508
  return B.useEffect(() => {
2502
2509
  t && (document.getElementById(t) || console.error(n));
2503
2510
  }, [n, t]), null;
2504
- }, mi = "DialogDescriptionWarning", fi = ({ contentRef: t, descriptionId: e }) => {
2505
- const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Hn(mi).contentName}}.`;
2511
+ }, fi = "DialogDescriptionWarning", mi = ({ contentRef: t, descriptionId: e }) => {
2512
+ const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Hn(fi).contentName}}.`;
2506
2513
  return B.useEffect(() => {
2507
2514
  var a;
2508
2515
  const r = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
2509
2516
  e && r && (document.getElementById(e) || console.warn(o));
2510
2517
  }, [o, t, e]), null;
2511
- }, gi = Ln, vi = Nn, wi = On, _i = Dn, bi = An, Ci = kn;
2512
- const Ie = {
2518
+ }, gi = Rn, vi = Nn, wi = On, _i = Dn, bi = An, Ci = kn;
2519
+ const xe = {
2513
2520
  "rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
2514
2521
  "rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
2515
2522
  "rp-document-dialog": "_rp-document-dialog_slqo7_13",
@@ -2525,45 +2532,45 @@ const Ie = {
2525
2532
  fileSize: l,
2526
2533
  filename: c,
2527
2534
  title: d,
2528
- author: p,
2529
- subject: f,
2530
- createdOn: _,
2531
- creator: h,
2535
+ author: h,
2536
+ subject: m,
2537
+ createdOn: P,
2538
+ creator: p,
2532
2539
  keywords: v,
2533
2540
  modifiedOn: w,
2534
- pdfProducer: T,
2535
- pdfVersion: P,
2536
- pageCount: S
2541
+ pdfProducer: S,
2542
+ pdfVersion: b,
2543
+ pageCount: T
2537
2544
  } = t;
2538
2545
  return [
2539
2546
  { label: r == null ? void 0 : r.propertiesFilenameLabel, value: c },
2540
2547
  { label: r == null ? void 0 : r.propertiesFileSizeLabel, value: l },
2541
2548
  { separate: !0 },
2542
2549
  { label: r == null ? void 0 : r.propertiesTitleLabel, value: d },
2543
- { label: r == null ? void 0 : r.propertiesAuthorLabel, value: p },
2544
- { label: r == null ? void 0 : r.propertiesSubjectLabel, value: f },
2550
+ { label: r == null ? void 0 : r.propertiesAuthorLabel, value: h },
2551
+ { label: r == null ? void 0 : r.propertiesSubjectLabel, value: m },
2545
2552
  { label: r == null ? void 0 : r.propertiesKeywordLabel, value: v },
2546
- { label: r == null ? void 0 : r.propertiesCreatorLabel, value: h },
2553
+ { label: r == null ? void 0 : r.propertiesCreatorLabel, value: p },
2547
2554
  {
2548
2555
  label: r == null ? void 0 : r.propertiesCreateOnLabel,
2549
- value: _ ? kt(_) : ""
2556
+ value: P ? kt(P) : ""
2550
2557
  },
2551
2558
  {
2552
2559
  label: r == null ? void 0 : r.propertiesModifiedOnLabel,
2553
2560
  value: w ? kt(w) : ""
2554
2561
  },
2555
2562
  { separate: !0 },
2556
- { label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: T },
2557
- { label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: P },
2558
- { label: r == null ? void 0 : r.propertiesPageCountLabel, value: S }
2563
+ { label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: S },
2564
+ { label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: b },
2565
+ { label: r == null ? void 0 : r.propertiesPageCountLabel, value: T }
2559
2566
  ];
2560
2567
  }, [t, r]);
2561
- return /* @__PURE__ */ i(gi, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(vi, { container: e, children: /* @__PURE__ */ F("div", { className: Ie["rp-dialog-wrapper"], children: [
2562
- /* @__PURE__ */ i(wi, { className: Ie["rp-dialog-overlay"] }),
2563
- /* @__PURE__ */ F(_i, { className: Ie["rp-document-dialog"], children: [
2564
- /* @__PURE__ */ i(bi, { className: Ie["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
2565
- /* @__PURE__ */ i("div", { className: Ie["rp-document-properties"], children: a.map((l, c) => /* @__PURE__ */ i("div", { children: l.separate ? /* @__PURE__ */ i("div", { className: Ie["rp-properties-divider"] }) : /* @__PURE__ */ i(so, { label: l.label, value: l.value }) }, c)) }),
2566
- /* @__PURE__ */ i(Ci, { asChild: !0, className: Ie["rp-dialog-close"], children: /* @__PURE__ */ i(ao, {}) })
2568
+ return /* @__PURE__ */ i(gi, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(vi, { container: e, children: /* @__PURE__ */ W("div", { className: xe["rp-dialog-wrapper"], children: [
2569
+ /* @__PURE__ */ i(wi, { className: xe["rp-dialog-overlay"] }),
2570
+ /* @__PURE__ */ W(_i, { className: xe["rp-document-dialog"], children: [
2571
+ /* @__PURE__ */ i(bi, { className: xe["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
2572
+ /* @__PURE__ */ i("div", { className: xe["rp-document-properties"], children: a.map((l, c) => /* @__PURE__ */ i("div", { children: l.separate ? /* @__PURE__ */ i("div", { className: xe["rp-properties-divider"] }) : /* @__PURE__ */ i(so, { label: l.label, value: l.value }) }, c)) }),
2573
+ /* @__PURE__ */ i(Ci, { asChild: !0, className: xe["rp-dialog-close"], children: /* @__PURE__ */ i(ao, {}) })
2567
2574
  ] })
2568
2575
  ] }) }) });
2569
2576
  }, Ti = {
@@ -2584,22 +2591,22 @@ const Ie = {
2584
2591
  }, [t, e]) };
2585
2592
  }, Gn = () => {
2586
2593
  const { downloadIcon: t } = pe();
2587
- return t || /* @__PURE__ */ i(fo, {});
2588
- }, Un = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Ii = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Un, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Gn, {}) }) }), xi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(be, { onClick: t, children: /* @__PURE__ */ F(Un, { className: "rp-menu-item", localeMessages: e, children: [
2594
+ return t || /* @__PURE__ */ i(mo, {});
2595
+ }, Un = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), xi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Un, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Gn, {}) }) }), Ii = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(be, { onClick: t, children: /* @__PURE__ */ W(Un, { className: "rp-menu-item", localeMessages: e, children: [
2589
2596
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Gn, {}) }),
2590
2597
  e == null ? void 0 : e.downloadFileLabel
2591
2598
  ] }) }), Vn = () => {
2592
2599
  const { download: t } = $n(), { downloadTool: e = !0 } = ve(), { isSmallScreen: n } = Ce(), { localeMessages: o } = se();
2593
- return e ? n ? /* @__PURE__ */ i(xi, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(Ii, { download: t, localeMessages: o }) : null : null;
2600
+ return e ? n ? /* @__PURE__ */ i(Ii, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(xi, { download: t, localeMessages: o }) : null : null;
2594
2601
  }, qn = () => {
2595
2602
  const { printIcon: t } = pe();
2596
2603
  return t || /* @__PURE__ */ i(go, {});
2597
- }, Bn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Li = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Bn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(qn, {}) }) }), Ri = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(be, { onClick: t, children: /* @__PURE__ */ F(Bn, { className: "rp-menu-item", localeMessages: e, children: [
2604
+ }, Bn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Ri = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Bn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(qn, {}) }) }), Li = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(be, { onClick: t, children: /* @__PURE__ */ W(Bn, { className: "rp-menu-item", localeMessages: e, children: [
2598
2605
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(qn, {}) }),
2599
2606
  e == null ? void 0 : e.printLabel
2600
2607
  ] }) }), Zn = () => {
2601
2608
  const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = tt(), { printTool: l = !0 } = ve(), { isSmallScreen: c } = Ce(), { localeMessages: d } = se();
2602
- return l ? c ? /* @__PURE__ */ i(Ri, { print: t, localeMessages: d }) : typeof l == "function" ? /* @__PURE__ */ i(
2609
+ return l ? c ? /* @__PURE__ */ i(Li, { print: t, localeMessages: d }) : typeof l == "function" ? /* @__PURE__ */ i(
2603
2610
  l,
2604
2611
  {
2605
2612
  print: t,
@@ -2609,7 +2616,7 @@ const Ie = {
2609
2616
  setOnComplete: o,
2610
2617
  progress: a
2611
2618
  }
2612
- ) : l ? /* @__PURE__ */ i(Li, { print: t, localeMessages: d }) : null : null;
2619
+ ) : l ? /* @__PURE__ */ i(Ri, { print: t, localeMessages: d }) : null : null;
2613
2620
  }, Ei = {
2614
2621
  "rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
2615
2622
  }, Ni = () => {
@@ -2624,51 +2631,58 @@ const Ie = {
2624
2631
  }, [t]), d = N(() => {
2625
2632
  t(e);
2626
2633
  }, [t, e]);
2627
- return o ? /* @__PURE__ */ F(Ke, { children: [
2628
- /* @__PURE__ */ i(be, { onClick: c, children: /* @__PURE__ */ i(K, { content: r == null ? void 0 : r.firstPageTooltip, style: rn, children: /* @__PURE__ */ F("div", { className: "rp-menu-item", "aria-disabled": a, children: [
2634
+ return o ? /* @__PURE__ */ W(Ke, { children: [
2635
+ /* @__PURE__ */ i(be, { onClick: c, children: /* @__PURE__ */ i(K, { content: r == null ? void 0 : r.firstPageTooltip, style: rn, children: /* @__PURE__ */ W("div", { className: "rp-menu-item", "aria-disabled": a, children: [
2629
2636
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Ni, {}) }),
2630
2637
  /* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
2631
2638
  ] }) }) }),
2632
- /* @__PURE__ */ i(be, { onClick: d, children: /* @__PURE__ */ i(K, { content: r == null ? void 0 : r.lastPageTooltip, style: rn, children: /* @__PURE__ */ F("div", { className: "rp-menu-item", "aria-disabled": l, children: [
2639
+ /* @__PURE__ */ i(be, { onClick: d, children: /* @__PURE__ */ i(K, { content: r == null ? void 0 : r.lastPageTooltip, style: rn, children: /* @__PURE__ */ W("div", { className: "rp-menu-item", "aria-disabled": l, children: [
2633
2640
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Oi, {}) }),
2634
2641
  /* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
2635
2642
  ] }) }) }),
2636
2643
  /* @__PURE__ */ i(yt, {})
2637
2644
  ] }) : null;
2638
2645
  }, zi = () => {
2639
- const { container: t } = ge(), { isSmallScreen: e } = Ce(), {
2640
- openFileTool: n,
2641
- downloadTool: o,
2642
- documentProperties: r,
2643
- scrollModeTool: a,
2644
- rotateTool: l,
2645
- selectionModeTool: c,
2646
- jumpNavigationTool: d,
2647
- printTool: p,
2648
- fullscreenTool: f
2649
- } = ve(), { localeMessages: _ } = se();
2650
- return k(() => {
2651
- const v = d || l || c || a || r;
2652
- let w = !1;
2653
- return e && (w = !(!n && !o && !p && !f)), v || w;
2646
+ const { container: t, pagesRef: e } = ge(), { isSmallScreen: n } = Ce(), {
2647
+ openFileTool: o,
2648
+ downloadTool: r,
2649
+ documentProperties: a,
2650
+ scrollModeTool: l,
2651
+ rotateTool: c,
2652
+ selectionModeTool: d,
2653
+ jumpNavigationTool: h,
2654
+ printTool: m,
2655
+ fullscreenTool: P
2656
+ } = ve(), { localeMessages: p } = se(), [v, w] = $(0), S = H(
2657
+ new ResizeObserver((T) => {
2658
+ w(T[0].contentRect.height);
2659
+ })
2660
+ ), b = k(() => {
2661
+ const T = h || c || d || l || a;
2662
+ let u = !1;
2663
+ return n && (u = !(!o && !r && !m && !P)), T || u;
2654
2664
  }, [
2655
- n,
2656
2665
  o,
2657
2666
  r,
2658
2667
  a,
2659
2668
  l,
2660
2669
  c,
2661
2670
  d,
2662
- e
2663
- ]) ? /* @__PURE__ */ F(lo, { children: [
2671
+ h,
2672
+ n
2673
+ ]);
2674
+ return F(() => (e && S.current.observe(e), () => {
2675
+ S.current.disconnect();
2676
+ }), [e]), b ? /* @__PURE__ */ W(lo, { children: [
2664
2677
  /* @__PURE__ */ i(
2665
- fn,
2678
+ mn,
2666
2679
  {
2667
2680
  container: t,
2668
- triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: _ == null ? void 0 : _.moreOptionTooltip, children: /* @__PURE__ */ i(re, { "aria-label": _ == null ? void 0 : _.moreOptionTooltip, children: /* @__PURE__ */ i(Kr, {}) }) }) }),
2669
- children: /* @__PURE__ */ F("div", { className: Ti["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
2670
- e && /* @__PURE__ */ F(Ke, { children: [
2671
- /* @__PURE__ */ i(mn, {}),
2681
+ style: { maxHeight: `${v}px`, overflow: "auto" },
2682
+ triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.moreOptionTooltip, children: /* @__PURE__ */ i(re, { "aria-label": p == null ? void 0 : p.moreOptionTooltip, children: /* @__PURE__ */ i(Kr, {}) }) }) }),
2683
+ children: /* @__PURE__ */ W("div", { className: Ti["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
2684
+ n && /* @__PURE__ */ W(Ke, { children: [
2685
+ /* @__PURE__ */ i(fn, {}),
2672
2686
  /* @__PURE__ */ i(Vn, {}),
2673
2687
  /* @__PURE__ */ i(Zn, {}),
2674
2688
  /* @__PURE__ */ i(gn, {}),
@@ -2678,7 +2692,7 @@ const Ie = {
2678
2692
  /* @__PURE__ */ i(po, {}),
2679
2693
  /* @__PURE__ */ i(vo, {}),
2680
2694
  /* @__PURE__ */ i(ho, {}),
2681
- /* @__PURE__ */ i(mo, {}),
2695
+ /* @__PURE__ */ i(fo, {}),
2682
2696
  /* @__PURE__ */ i(uo, {})
2683
2697
  ] })
2684
2698
  }
@@ -2687,10 +2701,10 @@ const Ie = {
2687
2701
  ] }) : null;
2688
2702
  }, Ai = () => {
2689
2703
  const { isSmallScreen: t } = Ce();
2690
- return /* @__PURE__ */ F(fe, { children: [
2704
+ return /* @__PURE__ */ W(me, { children: [
2691
2705
  /* @__PURE__ */ i(jr, {}),
2692
- !t && /* @__PURE__ */ F(fe, { children: [
2693
- /* @__PURE__ */ i(mn, {}),
2706
+ !t && /* @__PURE__ */ W(me, { children: [
2707
+ /* @__PURE__ */ i(fn, {}),
2694
2708
  /* @__PURE__ */ i(Vn, {}),
2695
2709
  /* @__PURE__ */ i(Zn, {}),
2696
2710
  /* @__PURE__ */ i(gn, {})
@@ -2703,64 +2717,64 @@ const Ie = {
2703
2717
  "rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
2704
2718
  "rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
2705
2719
  "rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
2706
- }, Fi = 25, ft = 1e3, Wi = [50, 75, 100, 125, 150, 200, 300, 400], ki = () => {
2720
+ }, Fi = 25, mt = 1e3, Wi = [50, 75, 100, 125, 150, 200, 300, 400], ki = () => {
2707
2721
  const { zoomInIcon: t } = pe();
2708
2722
  return t || /* @__PURE__ */ i(wo, {});
2709
2723
  }, Mi = () => {
2710
2724
  const { zoomOutIcon: t } = pe();
2711
2725
  return t || /* @__PURE__ */ i(_o, {});
2712
2726
  }, Hi = () => {
2713
- const { zoomLevel: t, setZoomLevel: e } = Qe(), { container: n, pagesRef: o } = ge(), { zoomTool: r = !0 } = ve(), { focusedPage: a } = ie(), { rotate: l } = Ge(), { pages: c } = Q(), { isSmallScreen: d } = Ce(), { localeMessages: p } = se(), { viewMode: f } = Ee(), _ = N(() => {
2727
+ const { zoomLevel: t, setZoomLevel: e } = Qe(), { container: n, pagesRef: o } = ge(), { zoomTool: r = !0 } = ve(), { focusedPage: a } = ie(), { rotate: l } = Ge(), { pages: c } = Q(), { isSmallScreen: d } = Ce(), { localeMessages: h } = se(), { viewMode: m } = Ee(), P = N(() => {
2714
2728
  e((u) => {
2715
- const m = Math.floor(u / 25) * 25;
2716
- return Math.min(m + 25, ft);
2729
+ const f = Math.floor(u / 25) * 25;
2730
+ return Math.min(f + 25, mt);
2717
2731
  });
2718
- }, [e]), h = N(() => {
2732
+ }, [e]), p = N(() => {
2719
2733
  e((u) => {
2720
- const m = Math.ceil(u / 25) * 25;
2721
- return Math.min(m - 25, ft);
2734
+ const f = Math.ceil(u / 25) * 25;
2735
+ return Math.min(f - 25, mt);
2722
2736
  });
2723
- }, [e]), v = k(() => t === Fi, [t]), w = k(() => t === ft, [t]), T = k(() => {
2724
- var u;
2725
- return (u = c.get(a)) == null ? void 0 : u.page.getViewport({ scale: 1, rotation: l });
2726
- }, [c, a, l]), P = N(
2737
+ }, [e]), v = k(() => t === Fi, [t]), w = k(() => t === mt, [t]), S = k(() => {
2738
+ const u = c.get(a);
2739
+ return u ? u.page.getViewport({ scale: 1, rotation: l + u.defaultRotation }) : null;
2740
+ }, [c, a, l]), b = N(
2727
2741
  (u) => {
2728
- const m = ((T == null ? void 0 : T.width) || 0) + 2 * Mt, g = ((T == null ? void 0 : T.height) || 0) + 2 * Mt, s = (o == null ? void 0 : o.clientWidth) || 0, C = (o == null ? void 0 : o.clientHeight) || 0, b = bo(
2742
+ const f = ((S == null ? void 0 : S.width) || 0) + 2 * Mt, g = ((S == null ? void 0 : S.height) || 0) + 2 * Mt, s = (o == null ? void 0 : o.clientWidth) || 0, C = (o == null ? void 0 : o.clientHeight) || 0, _ = bo(
2729
2743
  u,
2730
2744
  s,
2731
2745
  C,
2732
- m,
2746
+ f,
2733
2747
  g,
2734
- f
2748
+ m
2735
2749
  );
2736
- e(b);
2750
+ e(_);
2737
2751
  },
2738
- [e, T, o]
2739
- ), S = N(
2752
+ [e, S, o]
2753
+ ), T = N(
2740
2754
  (u) => {
2741
- typeof u == "number" ? e(u) : P(u);
2755
+ typeof u == "number" ? e(u) : b(u);
2742
2756
  },
2743
- [e, P]
2757
+ [e, b]
2744
2758
  );
2745
- return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: t, setZoomLevel: e }) : r ? /* @__PURE__ */ F("div", { className: De["rp-zoom-wrapper"], children: [
2746
- /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.zoomOutTooltip, children: /* @__PURE__ */ i(
2759
+ return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: t, setZoomLevel: e }) : r ? /* @__PURE__ */ W("div", { className: De["rp-zoom-wrapper"], children: [
2760
+ /* @__PURE__ */ i(K, { content: h == null ? void 0 : h.zoomOutTooltip, children: /* @__PURE__ */ i(
2747
2761
  re,
2748
2762
  {
2749
2763
  disabled: v,
2750
- onClick: h,
2751
- "aria-label": p == null ? void 0 : p.zoomOutTooltip,
2764
+ onClick: p,
2765
+ "aria-label": h == null ? void 0 : h.zoomOutTooltip,
2752
2766
  children: /* @__PURE__ */ i(Mi, {})
2753
2767
  }
2754
2768
  ) }),
2755
2769
  !d && /* @__PURE__ */ i(
2756
- fn,
2770
+ mn,
2757
2771
  {
2758
2772
  container: n,
2759
- triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.zoomSelectTooltip, children: /* @__PURE__ */ F(
2773
+ triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: h == null ? void 0 : h.zoomSelectTooltip, children: /* @__PURE__ */ W(
2760
2774
  re,
2761
2775
  {
2762
2776
  className: De["rp-current-zoom-wrapper"],
2763
- "aria-label": p == null ? void 0 : p.zoomSelectTooltip,
2777
+ "aria-label": h == null ? void 0 : h.zoomSelectTooltip,
2764
2778
  children: [
2765
2779
  /* @__PURE__ */ i("span", { className: De["rp-current-zoom-text"], children: t }),
2766
2780
  /* @__PURE__ */ i("span", { className: De["rp-current-zoom-text"], children: "%" }),
@@ -2770,26 +2784,26 @@ const Ie = {
2770
2784
  ) }) }),
2771
2785
  style: { minWidth: "200px" },
2772
2786
  align: "center",
2773
- children: /* @__PURE__ */ F("div", { className: De["rp-zoom-dropdown-content"], children: [
2774
- /* @__PURE__ */ F(Ke, { children: [
2775
- /* @__PURE__ */ i(be, { onClick: () => S(at.ACTUAL), children: p == null ? void 0 : p.zoomActualSize }),
2776
- /* @__PURE__ */ i(be, { onClick: () => S(at.PAGE_FIT), children: p == null ? void 0 : p.zoomPageFit }),
2777
- /* @__PURE__ */ i(be, { onClick: () => S(at.PAGE_WIDTH), children: p == null ? void 0 : p.zoomPageWidth })
2787
+ children: /* @__PURE__ */ W("div", { className: De["rp-zoom-dropdown-content"], children: [
2788
+ /* @__PURE__ */ W(Ke, { children: [
2789
+ /* @__PURE__ */ i(be, { onClick: () => T(at.ACTUAL), children: h == null ? void 0 : h.zoomActualSize }),
2790
+ /* @__PURE__ */ i(be, { onClick: () => T(at.PAGE_FIT), children: h == null ? void 0 : h.zoomPageFit }),
2791
+ /* @__PURE__ */ i(be, { onClick: () => T(at.PAGE_WIDTH), children: h == null ? void 0 : h.zoomPageWidth })
2778
2792
  ] }),
2779
2793
  /* @__PURE__ */ i(yt, {}),
2780
- /* @__PURE__ */ i(Ke, { children: Wi.map((u) => /* @__PURE__ */ F(be, { onClick: () => S(u), children: [
2794
+ /* @__PURE__ */ i(Ke, { children: Wi.map((u) => /* @__PURE__ */ W(be, { onClick: () => T(u), children: [
2781
2795
  u,
2782
2796
  " %"
2783
2797
  ] }, u)) })
2784
2798
  ] })
2785
2799
  }
2786
2800
  ),
2787
- /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.zoomInTooltip, children: /* @__PURE__ */ i(
2801
+ /* @__PURE__ */ i(K, { content: h == null ? void 0 : h.zoomInTooltip, children: /* @__PURE__ */ i(
2788
2802
  re,
2789
2803
  {
2790
2804
  disabled: w,
2791
- onClick: _,
2792
- "aria-label": p == null ? void 0 : p.zoomInTooltip,
2805
+ onClick: P,
2806
+ "aria-label": h == null ? void 0 : h.zoomInTooltip,
2793
2807
  children: /* @__PURE__ */ i(ki, {})
2794
2808
  }
2795
2809
  ) })
@@ -2799,8 +2813,8 @@ const Ie = {
2799
2813
  totalMatches: t,
2800
2814
  nextMatch: e,
2801
2815
  prevMatch: n
2802
- } = It(), { localeMessages: o } = se();
2803
- return /* @__PURE__ */ F(fe, { children: [
2816
+ } = xt(), { localeMessages: o } = se();
2817
+ return /* @__PURE__ */ W(me, { children: [
2804
2818
  /* @__PURE__ */ i(K, { content: o == null ? void 0 : o.searchPrevTooltip, className: Y["rp-search-tool-result-navigator"], children: /* @__PURE__ */ i(re, { onClick: n, "aria-label": o == null ? void 0 : o.searchPrevTooltip, children: /* @__PURE__ */ i(
2805
2819
  He,
2806
2820
  {
@@ -2825,86 +2839,86 @@ const Ie = {
2825
2839
  searchOptions: l,
2826
2840
  setSearchOptions: c,
2827
2841
  loading: d,
2828
- setSearch: p,
2829
- totalMatches: f,
2830
- currentMatchPosition: _,
2831
- nextMatch: h,
2842
+ setSearch: h,
2843
+ totalMatches: m,
2844
+ currentMatchPosition: P,
2845
+ nextMatch: p,
2832
2846
  prevMatch: v,
2833
2847
  search: w
2834
- } = It(), { searchTool: T = !0 } = ve(), [P, S] = $(w), { localeMessages: u } = se(), { isSmallScreen: m } = Ce(), g = N(() => {
2848
+ } = xt(), { searchTool: S = !0 } = ve(), [b, T] = $(w), { localeMessages: u } = se(), { isSmallScreen: f } = Ce(), g = N(() => {
2835
2849
  n(!0);
2836
2850
  }, []), s = N(() => {
2837
- p(""), S(""), n(!1);
2838
- }, [p]), C = (x) => {
2839
- const O = x.key === "Enter", M = x.key === " ";
2851
+ h(""), T(""), n(!1);
2852
+ }, [h]), C = (I) => {
2853
+ const O = I.key === "Enter", M = I.key === " ";
2840
2854
  (O || M) && s();
2841
- }, b = N(
2842
- (x) => {
2843
- x.key === "Escape" && e && s();
2855
+ }, _ = N(
2856
+ (I) => {
2857
+ I.key === "Escape" && e && s();
2844
2858
  },
2845
2859
  [e]
2846
2860
  ), y = N(
2847
- (x) => {
2848
- x.shiftKey && x.key === "Enter" ? v() : x.key === "Enter" && w !== P ? p(P) : x.key === "Enter" && h();
2861
+ (I) => {
2862
+ I.shiftKey && I.key === "Enter" ? v() : I.key === "Enter" && w !== b ? h(b) : I.key === "Enter" && p();
2849
2863
  },
2850
- [P, v, h, p, w]
2864
+ [b, v, p, h, w]
2851
2865
  );
2852
- W(() => (window.addEventListener("keydown", b), () => {
2853
- window.removeEventListener("keydown", b);
2854
- }), [b]), W(() => {
2866
+ F(() => (window.addEventListener("keydown", _), () => {
2867
+ window.removeEventListener("keydown", _);
2868
+ }), [_]), F(() => {
2855
2869
  r && r.focus();
2856
2870
  }, [r]);
2857
- const E = N((x) => {
2858
- S(x.target.value);
2859
- }, []), I = N(() => {
2860
- S(""), p("");
2861
- }, [p]), L = k(() => `${_} / ${f}`, [_, f]), { wholeWords: D, matchCase: z } = k(() => l, [l]), A = N(
2862
- (x) => {
2863
- c((O) => ({ ...O, matchCase: x }));
2871
+ const E = N((I) => {
2872
+ T(I.target.value);
2873
+ }, []), x = N(() => {
2874
+ T(""), h("");
2875
+ }, [h]), R = k(() => `${P} / ${m}`, [P, m]), { wholeWords: D, matchCase: z } = k(() => l, [l]), A = N(
2876
+ (I) => {
2877
+ c((O) => ({ ...O, matchCase: I }));
2864
2878
  },
2865
2879
  [c]
2866
- ), R = N(
2867
- (x) => {
2868
- c((O) => ({ ...O, wholeWords: x }));
2880
+ ), L = N(
2881
+ (I) => {
2882
+ c((O) => ({ ...O, wholeWords: I }));
2869
2883
  },
2870
2884
  [c]
2871
2885
  );
2872
- return W(() => {
2886
+ return F(() => {
2873
2887
  s();
2874
- }, [o, s]), T ? /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(
2888
+ }, [o, s]), S ? /* @__PURE__ */ i(me, { children: /* @__PURE__ */ i(
2875
2889
  Mr,
2876
2890
  {
2877
2891
  open: e,
2878
2892
  container: t,
2879
2893
  triggerComponent: /* @__PURE__ */ i(K, { content: u == null ? void 0 : u.searchButtonTooltip, children: /* @__PURE__ */ i(re, { onClick: g, "aria-label": u == null ? void 0 : u.searchButtonTooltip, children: /* @__PURE__ */ i(an, {}) }) }),
2880
- children: /* @__PURE__ */ F("div", { className: Y["rp-search-tool-content"], children: [
2881
- /* @__PURE__ */ F("div", { className: Y["rp-search-tool-input-wrapper"], children: [
2882
- /* @__PURE__ */ F("div", { className: Y["rp-search-tool-input"], children: [
2894
+ children: /* @__PURE__ */ W("div", { className: Y["rp-search-tool-content"], children: [
2895
+ /* @__PURE__ */ W("div", { className: Y["rp-search-tool-input-wrapper"], children: [
2896
+ /* @__PURE__ */ W("div", { className: Y["rp-search-tool-input"], children: [
2883
2897
  /* @__PURE__ */ i(K, { content: u == null ? void 0 : u.searchInputTooltip, children: /* @__PURE__ */ i(
2884
2898
  dn,
2885
2899
  {
2886
- value: P,
2900
+ value: b,
2887
2901
  onKeyDown: y,
2888
2902
  onChange: E,
2889
2903
  icon: /* @__PURE__ */ i(an, {}),
2890
2904
  placeholder: u == null ? void 0 : u.searchInputPlaceholder,
2891
2905
  className: Y["rp-search-input"],
2892
2906
  ref: a,
2893
- children: !!P && /* @__PURE__ */ i("span", { className: Y["rp-search-tool-input-clear"], onClick: I, children: /* @__PURE__ */ i(Po, {}) })
2907
+ children: !!b && /* @__PURE__ */ i("span", { className: Y["rp-search-tool-input-clear"], onClick: x, children: /* @__PURE__ */ i(Po, {}) })
2894
2908
  }
2895
2909
  ) }),
2896
- d ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Ct, { className: Y["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: L }),
2897
- m && /* @__PURE__ */ i("div", { className: Y["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ht, { onKeyPress: C, handleClose: s }) })
2910
+ d ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Ct, { className: Y["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: R }),
2911
+ f && /* @__PURE__ */ i("div", { className: Y["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ht, { onKeyPress: C, handleClose: s }) })
2898
2912
  ] }),
2899
- /* @__PURE__ */ F("div", { className: Y["rp-search-tool-input-checkboxes"], children: [
2900
- m && /* @__PURE__ */ i(on, {}),
2913
+ /* @__PURE__ */ W("div", { className: Y["rp-search-tool-input-checkboxes"], children: [
2914
+ f && /* @__PURE__ */ i(on, {}),
2901
2915
  /* @__PURE__ */ i($t, { name: "matchCase", value: z, onChange: A, children: u == null ? void 0 : u.searchMatchCaseLabel }),
2902
- !m && /* @__PURE__ */ i(K, { content: u == null ? void 0 : u.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: Y["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) }),
2903
- /* @__PURE__ */ i($t, { name: "wholeWord", value: D, onChange: R, children: u == null ? void 0 : u.searchWholeWordsLabel }),
2904
- !m && /* @__PURE__ */ i(K, { content: u == null ? void 0 : u.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: Y["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) })
2916
+ !f && /* @__PURE__ */ i(K, { content: u == null ? void 0 : u.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: Y["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) }),
2917
+ /* @__PURE__ */ i($t, { name: "wholeWord", value: D, onChange: L, children: u == null ? void 0 : u.searchWholeWordsLabel }),
2918
+ !f && /* @__PURE__ */ i(K, { content: u == null ? void 0 : u.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: Y["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) })
2905
2919
  ] })
2906
2920
  ] }),
2907
- !m && /* @__PURE__ */ F("div", { className: Y["rp-search-tool-controls"], children: [
2921
+ !f && /* @__PURE__ */ W("div", { className: Y["rp-search-tool-controls"], children: [
2908
2922
  /* @__PURE__ */ i(on, {}),
2909
2923
  /* @__PURE__ */ i(Ht, { onKeyPress: C, handleClose: s })
2910
2924
  ] })
@@ -2921,8 +2935,8 @@ const Ie = {
2921
2935
  loading: Gi
2922
2936
  }, Ui = ({ percentage: t }) => {
2923
2937
  const { cancel: e } = tt(), { localeMessages: n } = se();
2924
- return t < 1 ? null : /* @__PURE__ */ i("div", { className: ne(ze["rp-loading-overlay"]), children: /* @__PURE__ */ F("div", { className: ne(ze["rp-loading-modal"]), children: [
2925
- /* @__PURE__ */ F("div", { className: ne(ze["rp-loading-title"]), children: [
2938
+ return t < 1 ? null : /* @__PURE__ */ i("div", { className: ne(ze["rp-loading-overlay"]), children: /* @__PURE__ */ W("div", { className: ne(ze["rp-loading-modal"]), children: [
2939
+ /* @__PURE__ */ W("div", { className: ne(ze["rp-loading-title"]), children: [
2926
2940
  n == null ? void 0 : n.printLoadingMessage,
2927
2941
  "..."
2928
2942
  ] }),
@@ -2937,9 +2951,9 @@ const Ie = {
2937
2951
  ] }) });
2938
2952
  }, Vi = $e((t, e) => {
2939
2953
  const { showPrintProgress: n } = ve(), { progress: o } = tt(), { isSmallScreen: r } = Ce(), { percentage: a } = o || {}, l = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
2940
- return /* @__PURE__ */ F("div", { children: [
2941
- /* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: We["rp-toolbar-content"], children: /* @__PURE__ */ F("div", { className: We["rp-toolbar-wrapper"], style: l(), children: [
2942
- /* @__PURE__ */ F("div", { "data-rp": "topBarLeft", className: We["rp-toolbar-start"], children: [
2954
+ return /* @__PURE__ */ W("div", { children: [
2955
+ /* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: We["rp-toolbar-content"], children: /* @__PURE__ */ W("div", { className: We["rp-toolbar-wrapper"], style: l(), children: [
2956
+ /* @__PURE__ */ W("div", { "data-rp": "topBarLeft", className: We["rp-toolbar-start"], children: [
2943
2957
  /* @__PURE__ */ i($i, {}),
2944
2958
  /* @__PURE__ */ i(ii, {})
2945
2959
  ] }),
@@ -2966,7 +2980,7 @@ const Ie = {
2966
2980
  }), [r]), d = N(() => {
2967
2981
  n && a(n);
2968
2982
  }, [a, n]);
2969
- return /* @__PURE__ */ F(
2983
+ return /* @__PURE__ */ W(
2970
2984
  "div",
2971
2985
  {
2972
2986
  onClick: d,
@@ -3003,21 +3017,21 @@ const Ie = {
3003
3017
  const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
3004
3018
  t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - Bi);
3005
3019
  }, ji = $e((t, e) => {
3006
- const { show: n } = t, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: l, thumbnailLength: c, addToPage: d } = Pn(), p = H(null), f = H(1);
3007
- cn(e, () => p.current);
3008
- const _ = k(() => Object.values(a), [a]), h = N(() => {
3020
+ const { show: n } = t, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: l, thumbnailLength: c, addToPage: d } = Pn(), h = H(null), m = H(1);
3021
+ cn(e, () => h.current);
3022
+ const P = k(() => Object.values(a), [a]), p = N(() => {
3009
3023
  const v = c + 1;
3010
3024
  v <= r && l(v);
3011
3025
  }, [l, r, c]);
3012
- return W(() => {
3013
- o > c ? d(o) : n && f.current !== o && (Zi(p.current, o), f.current = o);
3014
- }, [o, c, d, n, _]), fr(p.current, h), /* @__PURE__ */ i("div", { ref: p, className: sn["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: sn["rp-thumbnails"], children: n ? _.map((v, w) => {
3015
- var T, P;
3026
+ return F(() => {
3027
+ o > c ? d(o) : n && m.current !== o && (Zi(h.current, o), m.current = o);
3028
+ }, [o, c, d, n, P]), mr(h.current, p), /* @__PURE__ */ i("div", { ref: h, className: sn["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: sn["rp-thumbnails"], children: n ? P.map((v, w) => {
3029
+ var S, b;
3016
3030
  return /* @__PURE__ */ i(
3017
3031
  qi,
3018
3032
  {
3019
- isFocused: o === ((T = v.page) == null ? void 0 : T.pageNumber),
3020
- pageNumber: (P = v.page) == null ? void 0 : P.pageNumber,
3033
+ isFocused: o === ((S = v.page) == null ? void 0 : S.pageNumber),
3034
+ pageNumber: (b = v.page) == null ? void 0 : b.pageNumber,
3021
3035
  thumbnailSrc: v.thumbnailSrc,
3022
3036
  loading: v.loading,
3023
3037
  viewport: v.viewport
@@ -3027,11 +3041,11 @@ const Ie = {
3027
3041
  }) : null }) });
3028
3042
  }), Ki = () => {
3029
3043
  const { thumbnailIcon: t } = pe();
3030
- return t || /* @__PURE__ */ i(mr, {});
3044
+ return t || /* @__PURE__ */ i(fr, {});
3031
3045
  }, Xi = () => {
3032
3046
  const { active: t, setActive: e } = Pn(), [n, o] = $(200), r = H(null), { thumbnailTool: a, sidebarEnable: l } = ve(), { localeMessages: c } = se(), d = N(() => {
3033
- e((f) => !f);
3034
- }, []), p = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: d, active: t }) : a ? /* @__PURE__ */ i(K, { content: c == null ? void 0 : c.thumbnailTooltip, children: /* @__PURE__ */ i(
3047
+ e((m) => !m);
3048
+ }, []), h = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: d, active: t }) : a ? /* @__PURE__ */ i(K, { content: c == null ? void 0 : c.thumbnailTooltip, children: /* @__PURE__ */ i(
3035
3049
  re,
3036
3050
  {
3037
3051
  onClick: d,
@@ -3040,15 +3054,15 @@ const Ie = {
3040
3054
  children: /* @__PURE__ */ i(Ki, {})
3041
3055
  }
3042
3056
  ) }) : null, [a, t, d, c]);
3043
- return /* @__PURE__ */ i(fe, { children: l && /* @__PURE__ */ F(
3057
+ return /* @__PURE__ */ i(me, { children: l && /* @__PURE__ */ W(
3044
3058
  "div",
3045
3059
  {
3046
3060
  style: { "--rp-thumbnail-width": `${n}px` },
3047
3061
  className: gt["rp-sidebar-content-wrapper"],
3048
3062
  "data-rp": "sidebar",
3049
3063
  children: [
3050
- /* @__PURE__ */ i("div", { className: gt["rp-sidebar-content"], children: p }),
3051
- /* @__PURE__ */ F(
3064
+ /* @__PURE__ */ i("div", { className: gt["rp-sidebar-content"], children: h }),
3065
+ /* @__PURE__ */ W(
3052
3066
  "div",
3053
3067
  {
3054
3068
  "data-rp": "thumbnailSidebar",
@@ -3064,13 +3078,13 @@ const Ie = {
3064
3078
  }
3065
3079
  ) });
3066
3080
  }, _e = {
3067
- "rp-layout": "_rp-layout_ah61i_1",
3068
- "rp-content": "_rp-content_ah61i_5",
3069
- "rp-pages": "_rp-pages_ah61i_11",
3070
- "rp-container": "_rp-container_ah61i_16",
3071
- "rp-loader": "_rp-loader_ah61i_52",
3072
- "rp-theme-variables": "_rp-theme-variables_ah61i_56",
3073
- "rp-dark-mode": "_rp-dark-mode_ah61i_167"
3081
+ "rp-layout": "_rp-layout_1ixt5_1",
3082
+ "rp-content": "_rp-content_1ixt5_5",
3083
+ "rp-pages": "_rp-pages_1ixt5_11",
3084
+ "rp-container": "_rp-container_1ixt5_16",
3085
+ "rp-loader": "_rp-loader_1ixt5_52",
3086
+ "rp-theme-variables": "_rp-theme-variables_1ixt5_56",
3087
+ "rp-dark-mode": "_rp-dark-mode_1ixt5_167"
3074
3088
  }, Yi = $e(
3075
3089
  (t, e) => {
3076
3090
  const { children: n, toolbarRef: o, style: r, className: a } = t, { customVariables: l, customDarkVariables: c } = Tr(), { darkMode: d } = rr();
@@ -3103,23 +3117,23 @@ const Ie = {
3103
3117
  className: l,
3104
3118
  mobileWidth: c,
3105
3119
  onLoaded: d,
3106
- cleanupOnLoaded: p,
3107
- onLayoutWidthChange: f
3108
- } = t, [_, h] = $(null), { setContainer: v, setContentRef: w } = ge(), { loading: T } = Q(), { LoaderImageComponent: P } = hn();
3109
- return W(() => (d && d(), () => {
3110
- p && p();
3111
- }), [d, p]), /* @__PURE__ */ i(Yi, { toolbarRef: _, ref: e, children: /* @__PURE__ */ i(Pr, { mobileWidth: c, onLayoutWidthChange: f, children: /* @__PURE__ */ i(vr, { slots: o, children: /* @__PURE__ */ i(wr, { icons: r, children: /* @__PURE__ */ F(_r, { getContainerRef: v, style: a, className: l, children: [
3112
- /* @__PURE__ */ F(br, { children: [
3113
- /* @__PURE__ */ F("div", { className: _e["rp-layout"], children: [
3114
- /* @__PURE__ */ i(Vi, { ref: h }),
3115
- /* @__PURE__ */ F("div", { className: _e["rp-content"], children: [
3120
+ cleanupOnLoaded: h,
3121
+ onLayoutWidthChange: m
3122
+ } = t, [P, p] = $(null), { setContainer: v, setContentRef: w } = ge(), { loading: S } = Q(), { LoaderImageComponent: b } = hn();
3123
+ return F(() => (d && d(), () => {
3124
+ h && h();
3125
+ }), [d, h]), /* @__PURE__ */ i(Yi, { toolbarRef: P, ref: e, children: /* @__PURE__ */ i(Pr, { mobileWidth: c, onLayoutWidthChange: m, children: /* @__PURE__ */ i(vr, { slots: o, children: /* @__PURE__ */ i(wr, { icons: r, children: /* @__PURE__ */ W(_r, { getContainerRef: v, style: a, className: l, children: [
3126
+ /* @__PURE__ */ W(br, { children: [
3127
+ /* @__PURE__ */ W("div", { className: _e["rp-layout"], children: [
3128
+ /* @__PURE__ */ i(Vi, { ref: p }),
3129
+ /* @__PURE__ */ W("div", { className: _e["rp-content"], children: [
3116
3130
  /* @__PURE__ */ i("div", { className: _e["rp-sidebar"], children: /* @__PURE__ */ i(Xi, {}) }),
3117
3131
  /* @__PURE__ */ i("div", { ref: w, className: _e["rp-pages"], children: n })
3118
3132
  ] })
3119
3133
  ] }),
3120
3134
  /* @__PURE__ */ i(Cr, {})
3121
3135
  ] }),
3122
- T ? /* @__PURE__ */ i(
3136
+ S ? /* @__PURE__ */ i(
3123
3137
  "div",
3124
3138
  {
3125
3139
  className: _e["rp-loader"],
@@ -3142,7 +3156,7 @@ const Ie = {
3142
3156
  height: "100%",
3143
3157
  width: "100%"
3144
3158
  },
3145
- children: P && /* @__PURE__ */ i(P, {})
3159
+ children: b && /* @__PURE__ */ i(b, {})
3146
3160
  }
3147
3161
  )
3148
3162
  }
@@ -3152,7 +3166,7 @@ const Ie = {
3152
3166
  export {
3153
3167
  Oo as A,
3154
3168
  on as B,
3155
- xo as C,
3169
+ Io as C,
3156
3170
  Qo as D,
3157
3171
  $i as E,
3158
3172
  Vn as F,
@@ -3173,7 +3187,7 @@ export {
3173
3187
  qs as b,
3174
3188
  $n as c,
3175
3189
  tt as d,
3176
- It as e,
3190
+ xt as e,
3177
3191
  wn as f,
3178
3192
  To as g,
3179
3193
  _n as h,
@@ -3182,11 +3196,11 @@ export {
3182
3196
  yo as k,
3183
3197
  Cn as l,
3184
3198
  Pn as m,
3185
- Io as n,
3199
+ xo as n,
3186
3200
  Tn as o,
3187
- Ro as p,
3201
+ Lo as p,
3188
3202
  zo as q,
3189
- xt as r,
3203
+ It as r,
3190
3204
  Xo as s,
3191
3205
  ei as t,
3192
3206
  ie as u,