@pdf-viewer/react 1.6.0-beta.3 → 1.6.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/{RPDefaultLayout-f579f051.js → RPDefaultLayout-eb8d9898.js} +699 -694
  2. package/dist/assets/PasswordModal.css +1 -0
  3. package/dist/assets/RPDefaultLayout.css +1 -1
  4. package/dist/components/RPController.js +1 -1
  5. package/dist/components/RPPages.js +4 -2
  6. package/dist/components/RPProvider.js +13 -12
  7. package/dist/components/layout/LayoutContainer.js +3 -2
  8. package/dist/components/layout/RPDefaultLayout.js +1 -1
  9. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  10. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  11. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  12. package/dist/components/layout/toolbar/DocumentDialog.js +3 -2
  13. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  14. package/dist/components/layout/toolbar/MostPageTool.js +3 -2
  15. package/dist/components/layout/toolbar/OtherTool.js +1 -1
  16. package/dist/components/layout/toolbar/Paginate.js +1 -1
  17. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  18. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  19. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  20. package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
  21. package/dist/components/layout/toolbar/SearchTool.js +3 -2
  22. package/dist/components/layout/toolbar/ZoomTool.js +1 -1
  23. package/dist/components/page/AnnotationLayer.js +3 -2
  24. package/dist/components/page/CanvasLayer.js +3 -2
  25. package/dist/components/page/DualPage.js +1 -1
  26. package/dist/components/page/RPPage.js +3 -2
  27. package/dist/components/page/SinglePage.js +1 -1
  28. package/dist/components/page/TextHighlightLayer.js +3 -2
  29. package/dist/components/page/TextLayer.js +3 -2
  30. package/dist/components/ui/LoadingIndicator.js +1 -1
  31. package/dist/components/ui/PasswordModal.js +58 -0
  32. package/dist/contexts/DocumentPasswordContext.js +40 -0
  33. package/dist/contexts/PaginationContext.js +1 -1
  34. package/dist/contexts/PrintContext.js +1 -1
  35. package/dist/contexts/RPDocumentContext.js +11 -8
  36. package/dist/contexts/SearchContext.js +1 -1
  37. package/dist/contexts/ThumbnailsContext.js +1 -1
  38. package/dist/main.js +1 -1
  39. package/dist/types/components/ui/PasswordModal.d.ts +3 -0
  40. package/dist/types/contexts/DocumentPasswordContext.d.ts +14 -0
  41. package/dist/types/utils/hooks/useLoadPdf.d.ts +2 -0
  42. package/dist/types/utils/types.d.ts +8 -0
  43. package/dist/utils/getZoomLevel.js +13 -14
  44. package/dist/utils/hooks/useFileDownload.js +3 -2
  45. package/dist/utils/hooks/useLicense.js +1 -1
  46. package/dist/utils/hooks/useLoadPdf.js +52 -40
  47. package/dist/utils/hooks/usePaginate.js +3 -2
  48. package/dist/utils/hooks/usePresentPage.js +3 -2
  49. package/dist/utils/hooks/usePrint.js +3 -2
  50. package/dist/utils/hooks/useScrollToPage.js +3 -2
  51. package/dist/utils/hooks/useSearch.js +3 -2
  52. package/dist/utils/hooks/useThumbnail.js +3 -2
  53. package/dist/utils/hooks/useVirtualReactWindow.js +3 -2
  54. package/dist/utils/types.js +7 -7
  55. package/package.json +1 -1
@@ -1,98 +1,100 @@
1
- import { jsx as i, Fragment as _e, jsxs as A } from "react/jsx-runtime";
2
- import * as U from "react";
3
- import { useRef as W, useEffect as F, useCallback as L, useState as H, createContext as Xe, useContext as Ye, useMemo as M, forwardRef as We, useImperativeHandle as dn, createElement as Ve, PureComponent as tr, Component as nr, memo as rr } from "react";
1
+ import { jsx as i, Fragment as ge, jsxs as A } from "react/jsx-runtime";
2
+ import * as q from "react";
3
+ import { useRef as W, useEffect as k, useCallback as L, useState as $, createContext as Xe, useContext as Ye, useMemo as M, forwardRef as We, useImperativeHandle as dn, createElement as Ve, PureComponent as nr, Component as rr, memo as or } from "react";
4
4
  import { ChevronUpIcon as Me } from "./components/icons/ChevronUpIcon.js";
5
- import { UIButton as ne } from "./components/ui/Button.js";
5
+ import { UIButton as re } from "./components/ui/Button.js";
6
6
  import { UIInput as un } from "./components/ui/Input.js";
7
- import { useScrollModeContext as Oe } from "./contexts/ScrollModeContext.js";
7
+ import { useScrollModeContext as Ne } from "./contexts/ScrollModeContext.js";
8
8
  import { useDocumentContext as X } from "./contexts/RPDocumentContext.js";
9
- import { useDarkModeContext as or } from "./contexts/DarkModeContext.js";
10
- import { ViewMode as Be, ScrollMode as ee, AnnotationSubType as Ft, SelectionMode as ir, ZoomLevel as at } from "./utils/types.js";
9
+ import { useDocumentPasswordContext as ir } from "./contexts/DocumentPasswordContext.js";
10
+ import { useDarkModeContext as ar } from "./contexts/DarkModeContext.js";
11
+ import { ViewMode as Be, ScrollMode as Q, AnnotationSubType as Ft, SelectionMode as sr, ZoomLevel as at } from "./utils/types.js";
11
12
  import { useRotationContext as Je } from "./contexts/RotationContext.js";
12
- import { useLayerContext as ar } from "./contexts/LayerContext.js";
13
+ import { useLayerContext as cr } from "./contexts/LayerContext.js";
13
14
  import { useZoomContext as Qe } from "./contexts/ZoomContext.js";
14
15
  import { useViewModeContext as He } from "./contexts/ViewModeContext.js";
15
16
  import { useVirtualScrollContext as et } from "./contexts/VirtualScrollContext.js";
16
17
  import { useVirtualGridContext as pn } from "./contexts/VirtualGridContext.js";
17
- import { useSelectionModeContext as sr } from "./contexts/SelectionModeContext.js";
18
- import { useInitialStateContext as cr } from "./contexts/InitialStateContext.js";
19
- import { useFullScreenContext as lr } from "./contexts/FullScreenContext.js";
18
+ import { useSelectionModeContext as lr } from "./contexts/SelectionModeContext.js";
19
+ import { useInitialStateContext as dr } from "./contexts/InitialStateContext.js";
20
+ import { useFullScreenContext as ur } from "./contexts/FullScreenContext.js";
20
21
  import "./contexts/FileInputContext.js";
21
22
  import "./contexts/DropFileZoneContext.js";
22
23
  import { renderPage as _t } from "./utils/renderPage.js";
23
- import { highlightMatches as hn, findMatches as dr, resetDivs as mn, highlightMultipleColorMatches as ur } from "./utils/highlight.js";
24
+ import { highlightMatches as hn, findMatches as pr, resetDivs as mn, highlightMultipleColorMatches as hr } from "./utils/highlight.js";
24
25
  import * as Tt from "pdfjs-dist";
25
- import { PixelsPerInch as pr, AnnotationMode as hr, RenderingCancelledException as mr, AnnotationLayer as fr } from "pdfjs-dist";
26
- import { useLayoutContainer as we } from "./contexts/LayoutContainerContext.js";
26
+ import { PixelsPerInch as mr, AnnotationMode as fr, RenderingCancelledException as gr, AnnotationLayer as vr } from "pdfjs-dist";
27
+ import { useLayoutContainer as Ce } from "./contexts/LayoutContainerContext.js";
27
28
  import { useDimensionPagesContext as tt } from "./contexts/DimensionPagesContext.js";
28
29
  import { useLocalizationContext as se } from "./contexts/LocalizationContext.js";
29
- import { useHighlightContext as gr } from "./contexts/HighlightContext.js";
30
+ import { useHighlightContext as _r } from "./contexts/HighlightContext.js";
30
31
  import "./contexts/LicenseContext.js";
31
- import { useDownloadContext as vr } from "./contexts/DownloadContext.js";
32
+ import { useDownloadContext as wr } from "./contexts/DownloadContext.js";
32
33
  import { useSmoothScrollContext as fn } from "./contexts/SmoothScrollContext.js";
33
34
  import { useLoaderContext as gn } from "./contexts/LoaderContext.js";
34
35
  import "./components/RPConfig.js";
35
- import { ThumbnailIcon as _r } from "./components/icons/Thumbnail.js";
36
- import { c as te } from "./clsx-0c6e471a.js";
36
+ import { ThumbnailIcon as br } from "./components/icons/Thumbnail.js";
37
+ import { c as ne } from "./clsx-0c6e471a.js";
37
38
  import { LoaderIcon as Pt } from "./components/icons/LoaderIcon.js";
38
- import { useInfiniteScroll as wr } from "./utils/hooks/useInfiniteScroll.js";
39
- import { RPSplitter as br } from "./components/layout/sidebar/RPSplitter.js";
40
- import { useToolbarComponentContext as fe, ToolbarComponentProvider as Cr } from "./contexts/ToolbarComponentContext.js";
41
- import { useIconContext as ue, IconProvider as Tr } from "./contexts/IconContext.js";
42
- import Z from "./components/ui/RPTooltip.js";
43
- import { Container as Pr } from "./components/layout/Container.js";
44
- import { WrapperLayout as Sr } from "./components/layout/WrapperLayout.js";
45
- import { RPDropFileZone as yr } from "./components/RPDropFileZone.js";
46
- import { useViewportContext as be, ViewportProvider as xr } from "./contexts/ViewportContext.js";
47
- import { useThemeContext as Ir } from "./contexts/ThemeContext.js";
48
- import { SimpleLinkService as Lr } from "./utils/link_service.js";
49
- import { annotationsEvents as Rr, annotationEventsHandler as Er, handleClick as kt, handleAnnotationWidget as Nr, handleAnnotationLink as Or, bindLayerEvents as Dr, unbindLayerEvents as Mt } from "./utils/annotations.js";
50
- import { _ as zr, U as Ar } from "./Popover-b7402893.js";
51
- import { useMousePressed as Fr } from "./utils/hooks/useMousePressed.js";
52
- import { useGrabScroll as kr } from "./utils/hooks/useGrabScroll.js";
53
- import { usePinch as Mr } from "./utils/hooks/usePinch.js";
39
+ import { useInfiniteScroll as Cr } from "./utils/hooks/useInfiniteScroll.js";
40
+ import { RPSplitter as Tr } from "./components/layout/sidebar/RPSplitter.js";
41
+ import { useToolbarComponentContext as ve, ToolbarComponentProvider as Pr } from "./contexts/ToolbarComponentContext.js";
42
+ import { useIconContext as pe, IconProvider as Sr } from "./contexts/IconContext.js";
43
+ import U from "./components/ui/RPTooltip.js";
44
+ import { Container as yr } from "./components/layout/Container.js";
45
+ import { WrapperLayout as xr } from "./components/layout/WrapperLayout.js";
46
+ import { RPDropFileZone as Ir } from "./components/RPDropFileZone.js";
47
+ import { useViewportContext as Te, ViewportProvider as Lr } from "./contexts/ViewportContext.js";
48
+ import { useThemeContext as Rr } from "./contexts/ThemeContext.js";
49
+ import { SimpleLinkService as Er } from "./utils/link_service.js";
50
+ import { annotationsEvents as Nr, annotationEventsHandler as Or, handleClick as kt, handleAnnotationWidget as Dr, handleAnnotationLink as zr, bindLayerEvents as Ar, unbindLayerEvents as Mt } from "./utils/annotations.js";
51
+ import { _ as Fr, U as kr } from "./Popover-b7402893.js";
52
+ import { useMousePressed as Mr } from "./utils/hooks/useMousePressed.js";
53
+ import { useGrabScroll as Wr } from "./utils/hooks/useGrabScroll.js";
54
+ import { usePinch as Hr } from "./utils/hooks/usePinch.js";
54
55
  import { useDebounce as St } from "./utils/hooks/useDebounce.js";
55
- import { getPositionFromPage as Wr, getPageFromPosition as Hr } from "./utils/calculatePage.js";
56
+ import $r from "./components/ui/PasswordModal.js";
57
+ import { getPositionFromPage as Gr, getPageFromPosition as Vr } from "./utils/calculatePage.js";
56
58
  import { getThumbnailViewport as Wt } from "./utils/getThumbnailViewport.js";
57
59
  import { smoothScrollTo as st } from "./utils/smoothScrollTo.js";
58
- import { appConsole as $r } from "./utils/appConsole.js";
60
+ import { appConsole as qr } from "./utils/appConsole.js";
59
61
  import { FileUploadTool as vn } from "./components/layout/toolbar/FileUploadTool.js";
60
- import { DarkModeTool as Gr } from "./components/layout/toolbar/DarkModeTool.js";
61
- import { ThreeDotIcon as Vr } from "./components/icons/ThreeDotIcon.js";
62
+ import { DarkModeTool as Ur } from "./components/layout/toolbar/DarkModeTool.js";
63
+ import { ThreeDotIcon as Zr } from "./components/icons/ThreeDotIcon.js";
62
64
  import { UIDropDown as _n } from "./components/ui/DropDown.js";
63
- import { e as Ur, a as yt, P as $e, c as ke, g as xt, i as qr, k as Zr, f as Br } from "./index-1cb41342.js";
64
- import { D as jr, u as ct } from "./index-aa2d3884.js";
65
- import { a as Kr, u as Xr, F as Yr, b as Jr, G as je } from "./index-7279fb4e.js";
66
- import { h as Qr } from "./component-1da194e8.js";
67
- import { CloseIcon as eo } from "./components/icons/CloseIcon.js";
65
+ import { e as Br, a as yt, P as $e, c as ke, g as xt, i as jr, k as Kr, f as Xr } from "./index-1cb41342.js";
66
+ import { D as Yr, u as ct } from "./index-aa2d3884.js";
67
+ import { a as Jr, u as Qr, F as eo, b as to, G as je } from "./index-7279fb4e.js";
68
+ import { h as no } from "./component-1da194e8.js";
69
+ import { CloseIcon as ro } from "./components/icons/CloseIcon.js";
68
70
  import { dateFormatter as Ht } from "./utils/dateFormatter.js";
69
- import { PropertyItem as to } from "./components/layout/toolbar/PropertyItem.js";
70
- import { useOtherToolContext as no, OtherToolProvider as ro } from "./contexts/OtherToolContext.js";
71
- import { DocumentProperties as oo } from "./components/layout/toolbar/DocumentProperties.js";
72
- import { RotateTool as io } from "./components/layout/toolbar/RotateTool.js";
73
- import { ViewModeTool as ao } from "./components/layout/toolbar/ViewModeTool.js";
74
- import { ScrollModeTool as so } from "./components/layout/toolbar/ScrollModeTool.js";
71
+ import { PropertyItem as oo } from "./components/layout/toolbar/PropertyItem.js";
72
+ import { useOtherToolContext as io, OtherToolProvider as ao } from "./contexts/OtherToolContext.js";
73
+ import { DocumentProperties as so } from "./components/layout/toolbar/DocumentProperties.js";
74
+ import { RotateTool as co } from "./components/layout/toolbar/RotateTool.js";
75
+ import { ViewModeTool as lo } from "./components/layout/toolbar/ViewModeTool.js";
76
+ import { ScrollModeTool as uo } from "./components/layout/toolbar/ScrollModeTool.js";
75
77
  import { MenuSeparator as It } from "./components/layout/toolbar/MenuSeparator.js";
76
- import { FileDownloadDefaultIcon as co } from "./components/icons/FileDownloadDefaultIcon.js";
77
- import { MenuItem as ve } from "./components/layout/toolbar/MenuItem.js";
78
- import { PrintDefaultTool as lo } from "./components/icons/PrintDefaultIcon.js";
78
+ import { FileDownloadDefaultIcon as po } from "./components/icons/FileDownloadDefaultIcon.js";
79
+ import { MenuItem as be } from "./components/layout/toolbar/MenuItem.js";
80
+ import { PrintDefaultTool as ho } from "./components/icons/PrintDefaultIcon.js";
79
81
  import { FullScreenTool as wn } from "./components/layout/toolbar/FullScreenTool.js";
80
82
  import { GoToDownIcon as bn } from "./components/icons/GoToDownIcon.js";
81
- import { SelectionModeTool as uo } from "./components/layout/toolbar/SelectionModeTool.js";
82
- import { ZoomInIcon as po } from "./components/icons/ZoomInIcon.js";
83
- import { ZoomOutIcon as ho } from "./components/icons/ZoomOutIcon.js";
83
+ import { SelectionModeTool as mo } from "./components/layout/toolbar/SelectionModeTool.js";
84
+ import { ZoomInIcon as fo } from "./components/icons/ZoomInIcon.js";
85
+ import { ZoomOutIcon as go } from "./components/icons/ZoomOutIcon.js";
84
86
  import { PAGE_PADDING as $t } from "./utils/constants.js";
85
- import { getZoomLevel as mo } from "./utils/getZoomLevel.js";
86
- import { SearchIcon as fo } from "./components/icons/SearchIcon.js";
87
+ import { getZoomLevel as vo } from "./utils/getZoomLevel.js";
88
+ import { SearchIcon as _o } from "./components/icons/SearchIcon.js";
87
89
  import { c as K, S as Gt } from "./SearchCloseButton-959cc1ed.js";
88
90
  import { UICheckbox as Vt } from "./components/ui/Checkbox.js";
89
- import { ClearIcon as go } from "./components/icons/ClearIcon.js";
90
- import { InfoIcon as Ut } from "./components/icons/InfoIcon.js";
91
+ import { ClearIcon as wo } from "./components/icons/ClearIcon.js";
92
+ import { InfoIcon as qt } from "./components/icons/InfoIcon.js";
91
93
  import './assets/RPDefaultLayout.css';const Ge = (e, t) => e.reduce((n, o, r) => r < t ? n + o : n, 0), Cn = () => {
92
- const { viewMode: e } = He(), { scrollMode: t } = Oe(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = oe(), c = W(), { columnCount: s } = pn(), { widths: d, heights: u } = tt(), p = W(t), f = W(e), h = W(s), { targetScrollPage: g } = fn();
93
- F(() => {
94
+ const { viewMode: e } = He(), { scrollMode: t } = Ne(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), c = W(), { columnCount: s } = pn(), { widths: d, heights: u } = tt(), p = W(t), f = W(e), h = W(s), { targetScrollPage: g } = fn();
95
+ k(() => {
94
96
  n != null && n.scrollToItem && (c.current = n);
95
- }, [n]), F(() => {
97
+ }, [n]), k(() => {
96
98
  p.current = t, f.current = e;
97
99
  }, [t, e]);
98
100
  const P = L(
@@ -120,27 +122,27 @@ import './assets/RPDefaultLayout.css';const Ge = (e, t) => e.reduce((n, o, r) =>
120
122
  },
121
123
  [r, d, st]
122
124
  );
123
- return F(() => {
125
+ return k(() => {
124
126
  p.current = t, f.current = e;
125
- }, [t, e]), F(() => {
127
+ }, [t, e]), k(() => {
126
128
  h.current = s;
127
129
  }, [s]), { scrollToPage: L(
128
130
  (v, S = "smooth") => {
129
131
  a(v);
130
132
  const m = v - 1;
131
133
  let w = m, C = 0;
132
- if (f.current === Be.DUAL_PAGE && p.current === ee.PAGE_SCROLLING) {
134
+ if (f.current === Be.DUAL_PAGE && p.current === Q.PAGE_SCROLLING) {
133
135
  P(v, S);
134
136
  return;
135
137
  }
136
- if (p.current === ee.PAGE_SCROLLING) {
138
+ if (p.current === Q.PAGE_SCROLLING) {
137
139
  a(v);
138
140
  return;
139
141
  }
140
142
  if (!c.current || !o)
141
143
  return;
142
144
  const l = o;
143
- if (g.current = v, p.current === ee.HORIZONTAL_SCROLLING) {
145
+ if (g.current = v, p.current === Q.HORIZONTAL_SCROLLING) {
144
146
  C = m;
145
147
  const y = {
146
148
  left: Ge(d, C),
@@ -181,8 +183,8 @@ import './assets/RPDefaultLayout.css';const Ge = (e, t) => e.reduce((n, o, r) =>
181
183
  d
182
184
  ]
183
185
  ) };
184
- }, vo = (e = 1) => {
185
- const [t, n] = H(e), [o, r] = H(0), { scrollToPage: a } = Cn(), c = W(1), { viewMode: s } = He(), { scrollMode: d } = Oe(), u = St(t, 100), p = L(
186
+ }, bo = (e = 1) => {
187
+ const [t, n] = $(e), [o, r] = $(0), { scrollToPage: a } = Cn(), c = W(1), { viewMode: s } = He(), { scrollMode: d } = Ne(), u = St(t, 100), p = L(
186
188
  (b) => {
187
189
  if (!/^[0-9]*$/g.test(b.toString()) || !b)
188
190
  return { success: !1, currentPage: c.current };
@@ -224,12 +226,12 @@ import './assets/RPDefaultLayout.css';const Ge = (e, t) => e.reduce((n, o, r) =>
224
226
  },
225
227
  nextPage: () => {
226
228
  }
227
- }), oe = () => {
229
+ }), ie = () => {
228
230
  const e = Ye(Tn);
229
- return typeof (e == null ? void 0 : e.focusedPage) > "u" && $r.error("Please use this hooks inside children component of RPProvider"), e;
230
- }, Is = ({ children: e }) => {
231
- const { pdf: t } = X(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: c, nextPage: s, prevPage: d } = vo();
232
- return F(() => {
231
+ return typeof (e == null ? void 0 : e.focusedPage) > "u" && qr.error("Please use this hooks inside children component of RPProvider"), e;
232
+ }, Os = ({ children: e }) => {
233
+ const { pdf: t } = X(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: c, nextPage: s, prevPage: d } = bo();
234
+ return k(() => {
233
235
  t != null && t.numPages && (a(t.numPages), r(1));
234
236
  }, [t, a, r]), /* @__PURE__ */ i(
235
237
  Tn.Provider,
@@ -247,13 +249,13 @@ import './assets/RPDefaultLayout.css';const Ge = (e, t) => e.reduce((n, o, r) =>
247
249
  }
248
250
  );
249
251
  };
250
- const _o = () => {
251
- const { pdf: e, pages: t } = X(), [n, o] = H({
252
+ const Co = () => {
253
+ const { pdf: e, pages: t } = X(), [n, o] = $({
252
254
  loadedPages: 0,
253
255
  totalPages: 0,
254
256
  percentage: 0
255
- }), [r, a] = H(!1), [c, s] = H(!1), [d, u] = H(null), p = W(!1);
256
- F(() => {
257
+ }), [r, a] = $(!1), [c, s] = $(!1), [d, u] = $(null), p = W(!1);
258
+ k(() => {
257
259
  p.current;
258
260
  }, [p]);
259
261
  const f = L(() => {
@@ -281,11 +283,11 @@ const _o = () => {
281
283
  h();
282
284
  return;
283
285
  }
284
- const I = _ / pr.PDF;
286
+ const I = _ / mr.PDF;
285
287
  w.width = Math.floor(T.width * I), w.height = Math.floor(T.height * I);
286
- const N = w.getContext("2d");
287
- N.save(), N.fillStyle = "rgb(255, 255, 255)", N.fillRect(0, 0, w.width, w.height), N.restore();
288
- const [R, z] = await Promise.all([
288
+ const O = w.getContext("2d");
289
+ O.save(), O.fillStyle = "rgb(255, 255, 255)", O.fillRect(0, 0, w.width, w.height), O.restore();
290
+ const [R, F] = await Promise.all([
289
291
  C.getPage(l),
290
292
  E
291
293
  ]);
@@ -293,19 +295,19 @@ const _o = () => {
293
295
  h();
294
296
  return;
295
297
  }
296
- const O = {
297
- canvasContext: N,
298
+ const z = {
299
+ canvasContext: O,
298
300
  transform: [I, 0, 0, I, 0, 0],
299
301
  viewport: R.getViewport({ scale: 1, rotation: T.rotation }),
300
302
  intent: "print",
301
- annotationMode: hr.ENABLE_STORAGE,
303
+ annotationMode: fr.ENABLE_STORAGE,
302
304
  optionalContentConfigPromise: y,
303
- printAnnotationStorage: z
305
+ printAnnotationStorage: F
304
306
  };
305
307
  try {
306
- return R.render(O).promise;
307
- } catch (D) {
308
- throw D instanceof mr || console.error(D), D;
308
+ return R.render(z).promise;
309
+ } catch (N) {
310
+ throw N instanceof gr || console.error(N), N;
309
311
  }
310
312
  }, b = L(() => {
311
313
  const w = window.print;
@@ -353,12 +355,12 @@ const _o = () => {
353
355
  const T = e.getOptionalContentConfig({ intent: "print" }), _ = Promise.resolve(
354
356
  e.annotationStorage.print ?? void 0
355
357
  ), y = t.size;
356
- for (const [I, N] of t) {
358
+ for (const [I, O] of t) {
357
359
  if (p.current) {
358
360
  h();
359
361
  return;
360
362
  }
361
- const R = N.page.getViewport({ scale: 1 });
363
+ const R = O.page.getViewport({ scale: 1 });
362
364
  if (await P({
363
365
  scratchCanvas: w,
364
366
  pdfDocument: e,
@@ -371,13 +373,13 @@ const _o = () => {
371
373
  h();
372
374
  return;
373
375
  }
374
- const z = await v(w);
375
- C.push(z);
376
- const O = parseFloat((C.length / y * 100).toFixed(2));
376
+ const F = await v(w);
377
+ C.push(F);
378
+ const z = parseFloat((C.length / y * 100).toFixed(2));
377
379
  o({
378
380
  loadedPages: I,
379
381
  totalPages: y,
380
- percentage: O
382
+ percentage: z
381
383
  });
382
384
  }
383
385
  if (p.current) {
@@ -392,7 +394,7 @@ const _o = () => {
392
394
  w.height = 0, w.width = 0;
393
395
  }
394
396
  }, [e, t, p]);
395
- return F(() => {
397
+ return k(() => {
396
398
  const w = () => {
397
399
  h(), f();
398
400
  };
@@ -424,8 +426,8 @@ const _o = () => {
424
426
  console.error("Error in setOnError callback:", t);
425
427
  }
426
428
  }
427
- }), Ls = ({ children: e }) => {
428
- const [t, n] = H(null), [o, r] = H(null), { print: a, cancel: c, progress: s, isComplete: d, isError: u, error: p } = _o(), f = L((v) => {
429
+ }), Ds = ({ children: e }) => {
430
+ const [t, n] = $(null), [o, r] = $(null), { print: a, cancel: c, progress: s, isComplete: d, isError: u, error: p } = Co(), f = L((v) => {
429
431
  v && typeof v == "function" && r(() => v);
430
432
  }, []), h = (v) => {
431
433
  p && v(p);
@@ -435,13 +437,13 @@ const _o = () => {
435
437
  },
436
438
  [s, t]
437
439
  );
438
- F(() => {
440
+ k(() => {
439
441
  d && o && P();
440
- }, [d, o]), F(() => {
442
+ }, [d, o]), k(() => {
441
443
  u && h((v) => {
442
444
  console.error(v);
443
445
  });
444
- }, [u]), F(() => {
446
+ }, [u]), k(() => {
445
447
  s && t && t(s);
446
448
  }, [s, t]);
447
449
  const P = () => {
@@ -460,8 +462,8 @@ const _o = () => {
460
462
  if (!e)
461
463
  throw new Error("usePrintContext must be used within a PrintProvider");
462
464
  return e;
463
- }, wo = () => {
464
- const [e, t] = H({}), { pages: n } = X(), { rotate: o } = Je(), r = M(() => Object.keys(e).length, [e]), a = L(
465
+ }, To = () => {
466
+ const [e, t] = $({}), { pages: n } = X(), { rotate: o } = Je(), r = M(() => Object.keys(e).length, [e]), a = L(
465
467
  (s) => {
466
468
  if (!n.size || s > n.size)
467
469
  return;
@@ -501,7 +503,7 @@ const _o = () => {
501
503
  },
502
504
  [n, o]
503
505
  );
504
- F(() => {
506
+ k(() => {
505
507
  a(10);
506
508
  }, [a]);
507
509
  const c = L(
@@ -547,11 +549,11 @@ const _o = () => {
547
549
  setActive: (e) => {
548
550
  },
549
551
  active: !1
550
- }), yn = () => Ye(Sn), Rs = ({
552
+ }), yn = () => Ye(Sn), zs = ({
551
553
  children: e,
552
554
  initialThumbnailsVisible: t
553
555
  }) => {
554
- const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = wo(), [c, s] = H(t);
556
+ const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = To(), [c, s] = $(t);
555
557
  return /* @__PURE__ */ i(
556
558
  Sn.Provider,
557
559
  {
@@ -559,33 +561,33 @@ const _o = () => {
559
561
  children: e
560
562
  }
561
563
  );
562
- }, bo = (e = {}, t = "") => {
563
- const [n, o] = H(t), [r, a] = H(!1), { pdf: c, pages: s } = X(), d = tt(), u = W(!n), { currentZoom: p } = Qe(), [f, h] = H([]), { setFocusedPage: g } = oe(), [P, b] = H(0), { pageScrollElementRef: v, virtualScrollableElementRef: S } = et(), { scrollMode: m } = Oe(), { pagesRef: w } = we(), [C, l] = H(null), T = W({}), _ = M(() => P === 0 ? null : f[P - 1], [P, f]), y = M(() => f.length, [f]);
564
- F(() => {
564
+ }, Po = (e = {}, t = "") => {
565
+ const [n, o] = $(t), [r, a] = $(!1), { pdf: c, pages: s } = X(), d = tt(), u = W(!n), { currentZoom: p } = Qe(), [f, h] = $([]), { setFocusedPage: g } = ie(), [P, b] = $(0), { pageScrollElementRef: v, virtualScrollableElementRef: S } = et(), { scrollMode: m } = Ne(), { pagesRef: w } = Ce(), [C, l] = $(null), T = W({}), _ = M(() => P === 0 ? null : f[P - 1], [P, f]), y = M(() => f.length, [f]);
566
+ k(() => {
565
567
  if (!_ || !s)
566
568
  return;
567
569
  const R = S || v;
568
570
  if (!R || !w)
569
571
  return;
570
- const z = s.get(_.page), O = w.clientHeight / 2, D = w.clientWidth / 2;
571
- let x = 0, k = 0;
572
- m === ee.PAGE_SCROLLING && g(_.page), m === ee.VERTICAL_SCROLLING && (x = d.heights.slice(0, _.page - 1).reduce((q, B) => q + B, 0)), m === ee.HORIZONTAL_SCROLLING && (k = d.widths.slice(0, _.page - 1).reduce((q, B) => q + B, 0));
573
- let $;
574
- if (!z)
572
+ const F = s.get(_.page), z = w.clientHeight / 2, N = w.clientWidth / 2;
573
+ let x = 0, D = 0;
574
+ m === Q.PAGE_SCROLLING && g(_.page), m === Q.VERTICAL_SCROLLING && (x = d.heights.slice(0, _.page - 1).reduce((j, B) => j + B, 0)), m === Q.HORIZONTAL_SCROLLING && (D = d.widths.slice(0, _.page - 1).reduce((j, B) => j + B, 0));
575
+ let H;
576
+ if (!F)
575
577
  return;
576
- const j = T.current[_.page], Y = z.page.getViewport({ scale: 1 });
577
- $ = new Tt.TextLayer({
578
+ const Z = T.current[_.page], Y = F.page.getViewport({ scale: 1 });
579
+ H = new Tt.TextLayer({
578
580
  viewport: Y,
579
- textContentSource: j,
581
+ textContentSource: Z,
580
582
  container: document.createElement("div")
581
- }), $.render().then(() => {
582
- const q = $.textDivs[_.start.idx], [B] = hn([_], j, $.textDivs), ie = d.widths[_.page - 1], pe = d.heights[_.page - 1], J = document.createElement("div"), ae = document.createElement("div");
583
- q.style.position = "absolute", q.style.color = "transparent", ae.style.position = "absolute", ae.style.top = "0", ae.style.setProperty("--scale-factor", `${p}`), J.style.position = "relative", J.style.width = `${ie}px`, J.style.height = `${pe}px`, J.style.zIndex = "-1", J.appendChild(q), ae.appendChild(J), w.prepend(ae);
584
- const Q = B.element.getBoundingClientRect(), Ie = ae.getBoundingClientRect(), Ce = Q.top - Ie.top, Le = Q.left - Ie.left, le = x + Ce - O + Q.height / 2, he = k + Le - D + Q.width / 2, De = {
585
- left: Math.max(he, 0),
586
- top: Math.max(le, 0)
583
+ }), H.render().then(() => {
584
+ const j = H.textDivs[_.start.idx], [B] = hn([_], Z, H.textDivs), ee = d.widths[_.page - 1], ae = d.heights[_.page - 1], J = document.createElement("div"), te = document.createElement("div");
585
+ j.style.position = "absolute", j.style.color = "transparent", te.style.position = "absolute", te.style.top = "0", te.style.setProperty("--scale-factor", `${p}`), J.style.position = "relative", J.style.width = `${ee}px`, J.style.height = `${ae}px`, J.style.zIndex = "-1", J.appendChild(j), te.appendChild(J), w.prepend(te);
586
+ const he = B.element.getBoundingClientRect(), le = te.getBoundingClientRect(), Oe = he.top - le.top, _e = he.left - le.left, me = x + Oe - z + he.height / 2, de = D + _e - N + he.width / 2, De = {
587
+ left: Math.max(de, 0),
588
+ top: Math.max(me, 0)
587
589
  };
588
- w.removeChild(ae), R.scrollTo({
590
+ w.removeChild(te), R.scrollTo({
589
591
  ...De
590
592
  });
591
593
  });
@@ -603,39 +605,39 @@ const _o = () => {
603
605
  b((R) => y ? R + 1 > y ? 1 : R + 1 : 0);
604
606
  }, [y]), I = L(() => {
605
607
  b((R) => y ? R - 1 <= 0 ? y : R - 1 : 0);
606
- }, [y]), N = L(async (R) => {
608
+ }, [y]), O = L(async (R) => {
607
609
  if (!R)
608
610
  return {};
609
- const z = R.numPages, O = {};
610
- for (let D = 1; D <= z; D++) {
611
+ const F = R.numPages, z = {};
612
+ for (let N = 1; N <= F; N++) {
611
613
  if (u.current)
612
614
  throw "close pop over";
613
- const x = await R.getPage(D);
614
- O[D.toString()] = await x.getTextContent();
615
+ const x = await R.getPage(N);
616
+ z[N.toString()] = await x.getTextContent();
615
617
  }
616
- return O;
618
+ return z;
617
619
  }, []);
618
- return F(() => {
620
+ return k(() => {
619
621
  if (!n) {
620
622
  u.current = !0, h([]), b(0);
621
623
  return;
622
624
  }
623
- u.current = !1, a(!0), h([]), b(0), N(c).then((R) => {
625
+ u.current = !1, a(!0), h([]), b(0), O(c).then((R) => {
624
626
  T.current = R;
625
- const O = Object.keys(R).reduce((D, x) => {
626
- const k = dr(
627
+ const z = Object.keys(R).reduce((N, x) => {
628
+ const D = pr(
627
629
  [n],
628
630
  R[x],
629
631
  Number(x) - 1,
630
632
  e
631
- ).map(($, j) => ({ ...$, page: Number(x), pageMatchIdx: j }));
632
- return [...D, ...k];
633
+ ).map((H, Z) => ({ ...H, page: Number(x), pageMatchIdx: Z }));
634
+ return [...N, ...D];
633
635
  }, []);
634
- h(O), b(O.length ? 1 : 0);
636
+ h(z), b(z.length ? 1 : 0);
635
637
  }).catch(() => {
636
638
  h([]), b(0);
637
639
  }).finally(() => a(!1));
638
- }, [n, N, c, e]), {
640
+ }, [n, O, c, e]), {
639
641
  search: n,
640
642
  setSearch: o,
641
643
  loading: r,
@@ -666,11 +668,11 @@ const _o = () => {
666
668
  currentMatchElement: null,
667
669
  setCurrentMatchElement: (e) => {
668
670
  }
669
- }), Es = ({
671
+ }), As = ({
670
672
  children: e,
671
673
  initialSearch: t
672
674
  }) => {
673
- const [n, o] = H({}), {
675
+ const [n, o] = $({}), {
674
676
  loading: r,
675
677
  setSearch: a,
676
678
  totalMatches: c,
@@ -682,7 +684,7 @@ const _o = () => {
682
684
  prevMatch: h,
683
685
  currentMatchElement: g,
684
686
  setCurrentMatchElement: P
685
- } = bo(n, t);
687
+ } = Po(n, t);
686
688
  return /* @__PURE__ */ i(
687
689
  xn.Provider,
688
690
  {
@@ -704,7 +706,7 @@ const _o = () => {
704
706
  children: e
705
707
  }
706
708
  );
707
- }, Lt = () => Ye(xn), de = {
709
+ }, Lt = () => Ye(xn), ue = {
708
710
  "rp-pages": "_rp-pages_1776r_1",
709
711
  "rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_1776r_7",
710
712
  "rp-pages-container": "_rp-pages-container_1776r_11",
@@ -717,9 +719,9 @@ const _o = () => {
717
719
  "rp-page-wrapper": "_rp-page-wrapper_h7a2q_1",
718
720
  "rp-page": "_rp-page_h7a2q_1",
719
721
  "rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
720
- }, Co = (e) => {
722
+ }, So = (e) => {
721
723
  const { pageNumber: t, onLoaded: n, onLoading: o } = e, r = W(null), { pages: a } = X(), { rotate: c } = Je(), s = W(), { currentZoom: d } = Qe();
722
- return F(() => {
724
+ return k(() => {
723
725
  if (!a || d === 0)
724
726
  return;
725
727
  const u = a.get(t);
@@ -743,13 +745,13 @@ const _o = () => {
743
745
  (p = s.current) == null || p.cancel();
744
746
  };
745
747
  }, [a, t, c, d, o, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${t}-canvas`, ref: r });
746
- }, To = "_selecting_1x8te_9", Po = "_endOfContent_1x8te_24", ze = {
748
+ }, yo = "_selecting_1x8te_9", xo = "_endOfContent_1x8te_24", ze = {
747
749
  "rp-text-layer": "_rp-text-layer_1x8te_1",
748
- selecting: To,
749
- endOfContent: Po,
750
+ selecting: yo,
751
+ endOfContent: xo,
750
752
  "rp-text-layer-text": "_rp-text-layer-text_1x8te_38"
751
- }, So = (e) => {
752
- const { pageNumber: t } = e, { pages: n } = X(), o = W(null), { matches: r, currentMatch: a, setCurrentMatchElement: c } = Lt(), [s, d] = H(
753
+ }, Io = (e) => {
754
+ const { pageNumber: t } = e, { pages: n } = X(), o = W(null), { matches: r, currentMatch: a, setCurrentMatchElement: c } = Lt(), [s, d] = $(
753
755
  []
754
756
  ), u = W(), p = W(), f = W(), h = M(() => r.filter((w) => w.pageIndex === t - 1), [r, t]), g = L(
755
757
  (w, C, l = !1) => {
@@ -762,7 +764,7 @@ const _o = () => {
762
764
  },
763
765
  [h]
764
766
  ), P = W(), b = W(!1), v = L(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
765
- F(() => ((() => {
767
+ k(() => ((() => {
766
768
  if (P.current)
767
769
  return;
768
770
  P.current = new AbortController();
@@ -801,7 +803,7 @@ const _o = () => {
801
803
  document.addEventListener(
802
804
  "selectionchange",
803
805
  () => {
804
- var O, D;
806
+ var z, N;
805
807
  const _ = document.getSelection();
806
808
  if (!_)
807
809
  return;
@@ -811,26 +813,26 @@ const _o = () => {
811
813
  }
812
814
  const y = /* @__PURE__ */ new Set();
813
815
  for (let x = 0; x < _.rangeCount; x++) {
814
- const k = _.getRangeAt(x);
815
- v().forEach(($) => {
816
- k.intersectsNode($) && !y.has($) && y.add($);
816
+ const D = _.getRangeAt(x);
817
+ v().forEach((H) => {
818
+ D.intersectsNode(H) && !y.has(H) && y.add(H);
817
819
  });
818
820
  }
819
821
  v().forEach((x) => {
820
822
  if (y.has(x))
821
823
  x.classList.add("selecting");
822
824
  else {
823
- const k = x.querySelector(".endOfContent");
824
- k && (x.appendChild(k), k.style.width = "", k.style.height = "", x.classList.remove("selecting"));
825
+ const D = x.querySelector(".endOfContent");
826
+ D && (x.appendChild(D), D.style.width = "", D.style.height = "", x.classList.remove("selecting"));
825
827
  }
826
828
  });
827
829
  const E = _.getRangeAt(0);
828
- let N = T && (E.compareBoundaryPoints(Range.END_TO_END, T) === 0 || E.compareBoundaryPoints(Range.START_TO_END, T) === 0) ? E.startContainer : E.endContainer;
829
- N.nodeType === Node.TEXT_NODE && (N = N.parentNode);
830
- const R = (O = N.parentElement) == null ? void 0 : O.closest(
830
+ let O = T && (E.compareBoundaryPoints(Range.END_TO_END, T) === 0 || E.compareBoundaryPoints(Range.START_TO_END, T) === 0) ? E.startContainer : E.endContainer;
831
+ O.nodeType === Node.TEXT_NODE && (O = O.parentNode);
832
+ const R = (z = O.parentElement) == null ? void 0 : z.closest(
831
833
  ze["rp-text-layer"]
832
- ), z = R == null ? void 0 : R.querySelector(".endOfContent");
833
- z && R && (z.style.width = R.style.width, z.style.height = R.style.height, (D = N.parentElement) == null || D.insertBefore(z, N.nextSibling)), T = E.cloneRange();
834
+ ), F = R == null ? void 0 : R.querySelector(".endOfContent");
835
+ F && R && (F.style.width = R.style.width, F.style.height = R.style.height, (N = O.parentElement) == null || N.insertBefore(F, O.nextSibling)), T = E.cloneRange();
834
836
  },
835
837
  { signal: C }
836
838
  );
@@ -843,7 +845,7 @@ const _o = () => {
843
845
  }, []), m = L(() => {
844
846
  o.current && o.current.classList.remove("selecting");
845
847
  }, []);
846
- return F(() => {
848
+ return k(() => {
847
849
  var l;
848
850
  if ((l = f.current) == null || l.classList.remove("selected"), !s.length || !a || a.pageIndex !== t - 1)
849
851
  return;
@@ -854,7 +856,7 @@ const _o = () => {
854
856
  return;
855
857
  const C = s.find((T) => T.index === w);
856
858
  C && (f.current = C.element, c(C.element), C.element.classList.add("selected"));
857
- }, [a, s, h]), F(() => {
859
+ }, [a, s, h]), k(() => {
858
860
  const w = n.get(t);
859
861
  if (!w || !o.current)
860
862
  return;
@@ -880,7 +882,7 @@ const _o = () => {
880
882
  var l;
881
883
  (l = u.current) == null || l.cancel();
882
884
  };
883
- }, [n, t]), F(() => {
885
+ }, [n, t]), k(() => {
884
886
  var l;
885
887
  [].slice.call(o.current.children).forEach((T) => {
886
888
  T.classList.add(ze["rp-text-layer-text"]);
@@ -897,29 +899,29 @@ const _o = () => {
897
899
  onMouseUp: m
898
900
  }
899
901
  );
900
- }, yo = {
902
+ }, Lo = {
901
903
  "rp-annotation-layer": "_rp-annotation-layer_o0ksd_1"
902
904
  };
903
- let xo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
904
- const Io = (e) => {
905
- const { pageNumber: t } = e, n = W(null), { pages: o, pdf: r } = X(), a = W(), [c, s] = H(), { setFocusedPage: d, goToPage: u } = oe(), { scrollMode: p } = Oe(), { print: f } = nt(), { download: h } = Un(), g = M(() => o.get(t), [o, t]), P = M(() => g == null ? void 0 : g.page.getViewport(), [g]);
906
- F(() => {
905
+ let Ro = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
906
+ const Eo = (e) => {
907
+ const { pageNumber: t } = e, n = W(null), { pages: o, pdf: r } = X(), a = W(), [c, s] = $(), { setFocusedPage: d, goToPage: u } = ie(), { scrollMode: p } = Ne(), { print: f } = nt(), { download: h } = qn(), g = M(() => o.get(t), [o, t]), P = M(() => g == null ? void 0 : g.page.getViewport(), [g]);
908
+ k(() => {
907
909
  a.current && (a.current.div.replaceChildren(), a.current = void 0);
908
- }, [r]), F(() => {
910
+ }, [r]), k(() => {
909
911
  g && g.page.getAnnotations().then((v) => {
910
912
  a.current = void 0, s(v), n.current && (n.current.innerText = "");
911
913
  });
912
914
  }, [g]);
913
915
  const b = L(
914
916
  (v) => {
915
- !c || !r || (Rr(v), Er(v, r, c).then((S) => {
917
+ !c || !r || (Nr(v), Or(v, r, c).then((S) => {
916
918
  var m, w;
917
919
  ((m = S == null ? void 0 : S.data) == null ? void 0 : m.action) === "Print" ? f() : ((w = S == null ? void 0 : S.data) == null ? void 0 : w.action) === "SaveAs" && h();
918
- }), p === ee.PAGE_SCROLLING ? kt(v, c, r, (S) => d(S.pageIndex + 1)) : kt(v, c, r, (S) => u(S.pageIndex + 1)));
920
+ }), p === Q.PAGE_SCROLLING ? kt(v, c, r, (S) => d(S.pageIndex + 1)) : kt(v, c, r, (S) => u(S.pageIndex + 1)));
919
921
  },
920
922
  [r, c, u, d, p, f, h]
921
923
  );
922
- return F(() => {
924
+ return k(() => {
923
925
  if (!g || !c)
924
926
  return;
925
927
  const v = g.page.getViewport();
@@ -934,17 +936,17 @@ const Io = (e) => {
934
936
  const { annotationType: l } = C;
935
937
  switch (l) {
936
938
  case Ft.Link:
937
- Or(C);
939
+ zr(C);
938
940
  break;
939
941
  case Ft.Widget:
940
- Nr(C, v, S);
942
+ Dr(C, v, S);
941
943
  break;
942
944
  }
943
945
  }
944
946
  const m = new AbortController();
945
947
  return (async () => {
946
948
  var T;
947
- a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new fr({
949
+ a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new vr({
948
950
  div: n.current,
949
951
  accessibilityManager: void 0,
950
952
  annotationCanvasMap: void 0,
@@ -964,14 +966,14 @@ const Io = (e) => {
964
966
  div: n.current,
965
967
  viewport: v.clone({ dontFlip: !0 }),
966
968
  page: g.page,
967
- imageResourcesPath: xo,
969
+ imageResourcesPath: Ro,
968
970
  renderForms: !0,
969
- linkService: new Lr(),
971
+ linkService: new Er(),
970
972
  downloadManager: null,
971
973
  enableScripting: !1
972
974
  });
973
975
  })().then(() => {
974
- n.current && Dr(n.current, b);
976
+ n.current && Ar(n.current, b);
975
977
  }).catch((C) => {
976
978
  if (C !== "abort")
977
979
  throw C;
@@ -983,21 +985,21 @@ const Io = (e) => {
983
985
  {
984
986
  "data-rp": `page-${t}-annotationLayer`,
985
987
  style: { width: `${P == null ? void 0 : P.width}px`, height: `${P == null ? void 0 : P.height}px` },
986
- className: yo["rp-annotation-layer"],
988
+ className: Lo["rp-annotation-layer"],
987
989
  ref: n
988
990
  }
989
991
  );
990
992
  }, dt = {
991
993
  "rp-text-highlight-layer": "_rp-text-highlight-layer_1fxd3_1",
992
994
  "rp-text-highlight-layer-text": "_rp-text-highlight-layer-text_1fxd3_14"
993
- }, Lo = ({ pageNumber: e }) => {
994
- const t = W(null), n = W(), o = W(), { pages: r } = X(), { highlightMatches: a } = gr(), c = M(() => a.filter((u) => u.pageIndex === e - 1), [a]), s = L(
995
+ }, No = ({ pageNumber: e }) => {
996
+ const t = W(null), n = W(), o = W(), { pages: r } = X(), { highlightMatches: a } = _r(), c = M(() => a.filter((u) => u.pageIndex === e - 1), [a]), s = L(
995
997
  (d, u, p = !1) => {
996
- p && mn(d, u), ur(c, d, u);
998
+ p && mn(d, u), hr(c, d, u);
997
999
  },
998
1000
  [c, r, e]
999
1001
  );
1000
- return F(() => {
1002
+ return k(() => {
1001
1003
  const d = r.get(e);
1002
1004
  if (!d || !t.current)
1003
1005
  return;
@@ -1021,14 +1023,14 @@ const Io = (e) => {
1021
1023
  var p;
1022
1024
  (p = n.current) == null || p.cancel();
1023
1025
  };
1024
- }, [r, e]), F(() => {
1026
+ }, [r, e]), k(() => {
1025
1027
  var p;
1026
1028
  [].slice.call(t.current.children).forEach((f) => {
1027
1029
  f.classList.add(dt["rp-text-highlight-layer-text"]);
1028
1030
  });
1029
1031
  const u = (p = n.current) == null ? void 0 : p.textDivs;
1030
1032
  u && o.current && s(o.current, u, !0);
1031
- }, [s]), /* @__PURE__ */ i(_e, { children: /* @__PURE__ */ i(
1033
+ }, [s]), /* @__PURE__ */ i(ge, { children: /* @__PURE__ */ i(
1032
1034
  "div",
1033
1035
  {
1034
1036
  "data-rp": `page-${e}-textHighlightLayer`,
@@ -1037,11 +1039,11 @@ const Io = (e) => {
1037
1039
  }
1038
1040
  ) });
1039
1041
  }, Rt = We((e, t) => {
1040
- const { pageNumber: n, style: o, ...r } = e, { pages: a } = X(), { rotate: c } = Je(), { textLayer: s } = ar(), { currentZoom: d } = Qe(), u = W(a.get(n)), [p, f] = H(!1), h = W(null), [g, P] = H({
1042
+ const { pageNumber: n, style: o, ...r } = e, { pages: a } = X(), { rotate: c } = Je(), { textLayer: s } = cr(), { currentZoom: d } = Qe(), u = W(a.get(n)), [p, f] = $(!1), h = W(null), [g, P] = $({
1041
1043
  width: 0,
1042
1044
  height: 0
1043
1045
  });
1044
- dn(t, () => h.current), F(() => {
1046
+ dn(t, () => h.current), k(() => {
1045
1047
  if (a && (u.current = a.get(n), u.current)) {
1046
1048
  const m = u.current.page.getViewport({ scale: d, rotation: c });
1047
1049
  P(m);
@@ -1085,18 +1087,18 @@ const Io = (e) => {
1085
1087
  },
1086
1088
  className: lt["rp-page"],
1087
1089
  children: [
1088
- /* @__PURE__ */ i(Co, { onLoading: v, onLoaded: S, pageNumber: n }),
1090
+ /* @__PURE__ */ i(So, { onLoading: v, onLoaded: S, pageNumber: n }),
1089
1091
  p && /* @__PURE__ */ i("div", { className: lt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Pt, {}) }),
1090
- s && /* @__PURE__ */ i(So, { pageNumber: n }),
1091
- /* @__PURE__ */ i(Lo, { pageNumber: n }),
1092
- /* @__PURE__ */ i(Io, { pageNumber: n })
1092
+ s && /* @__PURE__ */ i(Io, { pageNumber: n }),
1093
+ /* @__PURE__ */ i(No, { pageNumber: n }),
1094
+ /* @__PURE__ */ i(Eo, { pageNumber: n })
1093
1095
  ]
1094
1096
  }
1095
1097
  )
1096
1098
  }
1097
1099
  );
1098
1100
  });
1099
- function qt(e) {
1101
+ function Ut(e) {
1100
1102
  if (e === void 0)
1101
1103
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1102
1104
  return e;
@@ -1106,25 +1108,25 @@ function wt(e, t) {
1106
1108
  return n.__proto__ = o, n;
1107
1109
  }, wt(e, t);
1108
1110
  }
1109
- function Ro(e, t) {
1111
+ function Oo(e, t) {
1110
1112
  e.prototype = Object.create(t.prototype), e.prototype.constructor = e, wt(e, t);
1111
1113
  }
1112
1114
  var Zt = Number.isNaN || function(t) {
1113
1115
  return typeof t == "number" && t !== t;
1114
1116
  };
1115
- function Eo(e, t) {
1117
+ function Do(e, t) {
1116
1118
  return !!(e === t || Zt(e) && Zt(t));
1117
1119
  }
1118
- function No(e, t) {
1120
+ function zo(e, t) {
1119
1121
  if (e.length !== t.length)
1120
1122
  return !1;
1121
1123
  for (var n = 0; n < e.length; n++)
1122
- if (!Eo(e[n], t[n]))
1124
+ if (!Do(e[n], t[n]))
1123
1125
  return !1;
1124
1126
  return !0;
1125
1127
  }
1126
1128
  function ut(e, t) {
1127
- t === void 0 && (t = No);
1129
+ t === void 0 && (t = zo);
1128
1130
  var n, o = [], r, a = !1;
1129
1131
  function c() {
1130
1132
  for (var s = [], d = 0; d < arguments.length; d++)
@@ -1145,7 +1147,7 @@ function Bt(e, t) {
1145
1147
  }
1146
1148
  return n;
1147
1149
  }
1148
- var Oo = typeof performance == "object" && typeof performance.now == "function", jt = Oo ? function() {
1150
+ var Ao = typeof performance == "object" && typeof performance.now == "function", jt = Ao ? function() {
1149
1151
  return performance.now();
1150
1152
  } : function() {
1151
1153
  return Date.now();
@@ -1153,7 +1155,7 @@ var Oo = typeof performance == "object" && typeof performance.now == "function",
1153
1155
  function Kt(e) {
1154
1156
  cancelAnimationFrame(e.id);
1155
1157
  }
1156
- function Do(e, t) {
1158
+ function Fo(e, t) {
1157
1159
  var n = jt();
1158
1160
  function o() {
1159
1161
  jt() - n >= t ? e.call(null) : r.id = requestAnimationFrame(o);
@@ -1164,54 +1166,54 @@ function Do(e, t) {
1164
1166
  return r;
1165
1167
  }
1166
1168
  var pt = -1;
1167
- function zo(e) {
1169
+ function ko(e) {
1168
1170
  if (e === void 0 && (e = !1), pt === -1 || e) {
1169
1171
  var t = document.createElement("div"), n = t.style;
1170
1172
  n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), pt = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
1171
1173
  }
1172
1174
  return pt;
1173
1175
  }
1174
- var Re = null;
1176
+ var Le = null;
1175
1177
  function Xt(e) {
1176
- if (e === void 0 && (e = !1), Re === null || e) {
1178
+ if (e === void 0 && (e = !1), Le === null || e) {
1177
1179
  var t = document.createElement("div"), n = t.style;
1178
1180
  n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
1179
1181
  var o = document.createElement("div"), r = o.style;
1180
- return r.width = "100px", r.height = "100px", t.appendChild(o), document.body.appendChild(t), t.scrollLeft > 0 ? Re = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? Re = "negative" : Re = "positive-ascending"), document.body.removeChild(t), Re;
1182
+ return r.width = "100px", r.height = "100px", t.appendChild(o), document.body.appendChild(t), t.scrollLeft > 0 ? Le = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? Le = "negative" : Le = "positive-ascending"), document.body.removeChild(t), Le;
1181
1183
  }
1182
- return Re;
1184
+ return Le;
1183
1185
  }
1184
- var Ao = 150, Fo = function(t) {
1186
+ var Mo = 150, Wo = function(t) {
1185
1187
  var n = t.columnIndex;
1186
1188
  t.data;
1187
1189
  var o = t.rowIndex;
1188
1190
  return o + ":" + n;
1189
- }, Ue = null, qe = null, Ze = null;
1190
- process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Ue = /* @__PURE__ */ new WeakSet(), qe = /* @__PURE__ */ new WeakSet(), Ze = /* @__PURE__ */ new WeakSet());
1191
- function ko(e) {
1191
+ }, qe = null, Ue = null, Ze = null;
1192
+ process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (qe = /* @__PURE__ */ new WeakSet(), Ue = /* @__PURE__ */ new WeakSet(), Ze = /* @__PURE__ */ new WeakSet());
1193
+ function Ho(e) {
1192
1194
  var t, n = e.getColumnOffset, o = e.getColumnStartIndexForOffset, r = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, c = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, d = e.getOffsetForColumnAndAlignment, u = e.getOffsetForRowAndAlignment, p = e.getRowHeight, f = e.getRowOffset, h = e.getRowStartIndexForOffset, g = e.getRowStopIndexForStartIndex, P = e.initInstanceProps, b = e.shouldResetStyleCacheOnItemSizeChange, v = e.validateProps;
1193
1195
  return t = /* @__PURE__ */ function(S) {
1194
- Ro(m, S);
1196
+ Oo(m, S);
1195
1197
  function m(C) {
1196
1198
  var l;
1197
- return l = S.call(this, C) || this, l._instanceProps = P(l.props, qt(l)), l._resetIsScrollingTimeoutId = null, l._outerRef = void 0, l.state = {
1198
- instance: qt(l),
1199
+ return l = S.call(this, C) || this, l._instanceProps = P(l.props, Ut(l)), l._resetIsScrollingTimeoutId = null, l._outerRef = void 0, l.state = {
1200
+ instance: Ut(l),
1199
1201
  isScrolling: !1,
1200
1202
  horizontalScrollDirection: "forward",
1201
1203
  scrollLeft: typeof l.props.initialScrollLeft == "number" ? l.props.initialScrollLeft : 0,
1202
1204
  scrollTop: typeof l.props.initialScrollTop == "number" ? l.props.initialScrollTop : 0,
1203
1205
  scrollUpdateWasRequested: !1,
1204
1206
  verticalScrollDirection: "forward"
1205
- }, l._callOnItemsRendered = void 0, l._callOnItemsRendered = ut(function(T, _, y, E, I, N, R, z) {
1207
+ }, l._callOnItemsRendered = void 0, l._callOnItemsRendered = ut(function(T, _, y, E, I, O, R, F) {
1206
1208
  return l.props.onItemsRendered({
1207
1209
  overscanColumnStartIndex: T,
1208
1210
  overscanColumnStopIndex: _,
1209
1211
  overscanRowStartIndex: y,
1210
1212
  overscanRowStopIndex: E,
1211
1213
  visibleColumnStartIndex: I,
1212
- visibleColumnStopIndex: N,
1214
+ visibleColumnStopIndex: O,
1213
1215
  visibleRowStartIndex: R,
1214
- visibleRowStopIndex: z
1216
+ visibleRowStopIndex: F
1215
1217
  });
1216
1218
  }), l._callOnScroll = void 0, l._callOnScroll = ut(function(T, _, y, E, I) {
1217
1219
  return l.props.onScroll({
@@ -1222,46 +1224,46 @@ function ko(e) {
1222
1224
  scrollUpdateWasRequested: I
1223
1225
  });
1224
1226
  }), l._getItemStyle = void 0, l._getItemStyle = function(T, _) {
1225
- var y = l.props, E = y.columnWidth, I = y.direction, N = y.rowHeight, R = l._getItemStyleCache(b && E, b && I, b && N), z = T + ":" + _, O;
1226
- if (R.hasOwnProperty(z))
1227
- O = R[z];
1227
+ var y = l.props, E = y.columnWidth, I = y.direction, O = y.rowHeight, R = l._getItemStyleCache(b && E, b && I, b && O), F = T + ":" + _, z;
1228
+ if (R.hasOwnProperty(F))
1229
+ z = R[F];
1228
1230
  else {
1229
- var D = n(l.props, _, l._instanceProps), x = I === "rtl";
1230
- R[z] = O = {
1231
+ var N = n(l.props, _, l._instanceProps), x = I === "rtl";
1232
+ R[F] = z = {
1231
1233
  position: "absolute",
1232
- left: x ? void 0 : D,
1233
- right: x ? D : void 0,
1234
+ left: x ? void 0 : N,
1235
+ right: x ? N : void 0,
1234
1236
  top: f(l.props, T, l._instanceProps),
1235
1237
  height: p(l.props, T, l._instanceProps),
1236
1238
  width: a(l.props, _, l._instanceProps)
1237
1239
  };
1238
1240
  }
1239
- return O;
1241
+ return z;
1240
1242
  }, l._getItemStyleCache = void 0, l._getItemStyleCache = ut(function(T, _, y) {
1241
1243
  return {};
1242
1244
  }), l._onScroll = function(T) {
1243
- var _ = T.currentTarget, y = _.clientHeight, E = _.clientWidth, I = _.scrollLeft, N = _.scrollTop, R = _.scrollHeight, z = _.scrollWidth;
1244
- l.setState(function(O) {
1245
- if (O.scrollLeft === I && O.scrollTop === N)
1245
+ var _ = T.currentTarget, y = _.clientHeight, E = _.clientWidth, I = _.scrollLeft, O = _.scrollTop, R = _.scrollHeight, F = _.scrollWidth;
1246
+ l.setState(function(z) {
1247
+ if (z.scrollLeft === I && z.scrollTop === O)
1246
1248
  return null;
1247
- var D = l.props.direction, x = I;
1248
- if (D === "rtl")
1249
+ var N = l.props.direction, x = I;
1250
+ if (N === "rtl")
1249
1251
  switch (Xt()) {
1250
1252
  case "negative":
1251
1253
  x = -I;
1252
1254
  break;
1253
1255
  case "positive-descending":
1254
- x = z - E - I;
1256
+ x = F - E - I;
1255
1257
  break;
1256
1258
  }
1257
- x = Math.max(0, Math.min(x, z - E));
1258
- var k = Math.max(0, Math.min(N, R - y));
1259
+ x = Math.max(0, Math.min(x, F - E));
1260
+ var D = Math.max(0, Math.min(O, R - y));
1259
1261
  return {
1260
1262
  isScrolling: !0,
1261
- horizontalScrollDirection: O.scrollLeft < I ? "forward" : "backward",
1263
+ horizontalScrollDirection: z.scrollLeft < I ? "forward" : "backward",
1262
1264
  scrollLeft: x,
1263
- scrollTop: k,
1264
- verticalScrollDirection: O.scrollTop < N ? "forward" : "backward",
1265
+ scrollTop: D,
1266
+ verticalScrollDirection: z.scrollTop < O ? "forward" : "backward",
1265
1267
  scrollUpdateWasRequested: !1
1266
1268
  };
1267
1269
  }, l._resetIsScrollingDebounced);
@@ -1269,7 +1271,7 @@ function ko(e) {
1269
1271
  var _ = l.props.outerRef;
1270
1272
  l._outerRef = T, typeof _ == "function" ? _(T) : _ != null && typeof _ == "object" && _.hasOwnProperty("current") && (_.current = T);
1271
1273
  }, l._resetIsScrollingDebounced = function() {
1272
- l._resetIsScrollingTimeoutId !== null && Kt(l._resetIsScrollingTimeoutId), l._resetIsScrollingTimeoutId = Do(l._resetIsScrolling, Ao);
1274
+ l._resetIsScrollingTimeoutId !== null && Kt(l._resetIsScrollingTimeoutId), l._resetIsScrollingTimeoutId = Fo(l._resetIsScrolling, Mo);
1273
1275
  }, l._resetIsScrolling = function() {
1274
1276
  l._resetIsScrollingTimeoutId = null, l.setState({
1275
1277
  isScrolling: !1
@@ -1279,7 +1281,7 @@ function ko(e) {
1279
1281
  }, l;
1280
1282
  }
1281
1283
  m.getDerivedStateFromProps = function(l, T) {
1282
- return Mo(l, T), v(l), null;
1284
+ return $o(l, T), v(l), null;
1283
1285
  };
1284
1286
  var w = m.prototype;
1285
1287
  return w.scrollTo = function(l) {
@@ -1294,12 +1296,12 @@ function ko(e) {
1294
1296
  };
1295
1297
  }, this._resetIsScrollingDebounced);
1296
1298
  }, w.scrollToItem = function(l) {
1297
- var T = l.align, _ = T === void 0 ? "auto" : T, y = l.columnIndex, E = l.rowIndex, I = this.props, N = I.columnCount, R = I.height, z = I.rowCount, O = I.width, D = this.state, x = D.scrollLeft, k = D.scrollTop, $ = zo();
1298
- y !== void 0 && (y = Math.max(0, Math.min(y, N - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, z - 1)));
1299
- var j = c(this.props, this._instanceProps), Y = s(this.props, this._instanceProps), q = Y > O ? $ : 0, B = j > R ? $ : 0;
1299
+ var T = l.align, _ = T === void 0 ? "auto" : T, y = l.columnIndex, E = l.rowIndex, I = this.props, O = I.columnCount, R = I.height, F = I.rowCount, z = I.width, N = this.state, x = N.scrollLeft, D = N.scrollTop, H = ko();
1300
+ y !== void 0 && (y = Math.max(0, Math.min(y, O - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, F - 1)));
1301
+ var Z = c(this.props, this._instanceProps), Y = s(this.props, this._instanceProps), j = Y > z ? H : 0, B = Z > R ? H : 0;
1300
1302
  this.scrollTo({
1301
1303
  scrollLeft: y !== void 0 ? d(this.props, y, _, x, this._instanceProps, B) : x,
1302
- scrollTop: E !== void 0 ? u(this.props, E, _, k, this._instanceProps, q) : k
1304
+ scrollTop: E !== void 0 ? u(this.props, E, _, D, this._instanceProps, j) : D
1303
1305
  });
1304
1306
  }, w.componentDidMount = function() {
1305
1307
  var l = this.props, T = l.initialScrollLeft, _ = l.initialScrollTop;
@@ -1321,8 +1323,8 @@ function ko(e) {
1321
1323
  I.scrollLeft = _;
1322
1324
  break;
1323
1325
  default:
1324
- var N = I.clientWidth, R = I.scrollWidth;
1325
- I.scrollLeft = R - N - _;
1326
+ var O = I.clientWidth, R = I.scrollWidth;
1327
+ I.scrollLeft = R - O - _;
1326
1328
  break;
1327
1329
  }
1328
1330
  else
@@ -1333,28 +1335,28 @@ function ko(e) {
1333
1335
  }, w.componentWillUnmount = function() {
1334
1336
  this._resetIsScrollingTimeoutId !== null && Kt(this._resetIsScrollingTimeoutId);
1335
1337
  }, w.render = function() {
1336
- var l = this.props, T = l.children, _ = l.className, y = l.columnCount, E = l.direction, I = l.height, N = l.innerRef, R = l.innerElementType, z = l.innerTagName, O = l.itemData, D = l.itemKey, x = D === void 0 ? Fo : D, k = l.outerElementType, $ = l.outerTagName, j = l.rowCount, Y = l.style, q = l.useIsScrolling, B = l.width, ie = this.state.isScrolling, pe = this._getHorizontalRangeToRender(), J = pe[0], ae = pe[1], Q = this._getVerticalRangeToRender(), Ie = Q[0], Ce = Q[1], Le = [];
1337
- if (y > 0 && j)
1338
- for (var le = Ie; le <= Ce; le++)
1339
- for (var he = J; he <= ae; he++)
1340
- Le.push(Ve(T, {
1341
- columnIndex: he,
1342
- data: O,
1343
- isScrolling: q ? ie : void 0,
1338
+ var l = this.props, T = l.children, _ = l.className, y = l.columnCount, E = l.direction, I = l.height, O = l.innerRef, R = l.innerElementType, F = l.innerTagName, z = l.itemData, N = l.itemKey, x = N === void 0 ? Wo : N, D = l.outerElementType, H = l.outerTagName, Z = l.rowCount, Y = l.style, j = l.useIsScrolling, B = l.width, ee = this.state.isScrolling, ae = this._getHorizontalRangeToRender(), J = ae[0], te = ae[1], he = this._getVerticalRangeToRender(), le = he[0], Oe = he[1], _e = [];
1339
+ if (y > 0 && Z)
1340
+ for (var me = le; me <= Oe; me++)
1341
+ for (var de = J; de <= te; de++)
1342
+ _e.push(Ve(T, {
1343
+ columnIndex: de,
1344
+ data: z,
1345
+ isScrolling: j ? ee : void 0,
1344
1346
  key: x({
1345
- columnIndex: he,
1346
- data: O,
1347
- rowIndex: le
1347
+ columnIndex: de,
1348
+ data: z,
1349
+ rowIndex: me
1348
1350
  }),
1349
- rowIndex: le,
1350
- style: this._getItemStyle(le, he)
1351
+ rowIndex: me,
1352
+ style: this._getItemStyle(me, de)
1351
1353
  }));
1352
1354
  var De = c(this.props, this._instanceProps), rt = s(this.props, this._instanceProps);
1353
- return Ve(k || $ || "div", {
1355
+ return Ve(D || H || "div", {
1354
1356
  className: _,
1355
1357
  onScroll: this._onScroll,
1356
1358
  ref: this._outerRefSetter,
1357
- style: zr({
1359
+ style: Fr({
1358
1360
  position: "relative",
1359
1361
  height: I,
1360
1362
  width: B,
@@ -1363,48 +1365,48 @@ function ko(e) {
1363
1365
  willChange: "transform",
1364
1366
  direction: E
1365
1367
  }, Y)
1366
- }, Ve(R || z || "div", {
1367
- children: Le,
1368
- ref: N,
1368
+ }, Ve(R || F || "div", {
1369
+ children: _e,
1370
+ ref: O,
1369
1371
  style: {
1370
1372
  height: De,
1371
- pointerEvents: ie ? "none" : void 0,
1373
+ pointerEvents: ee ? "none" : void 0,
1372
1374
  width: rt
1373
1375
  }
1374
1376
  }));
1375
1377
  }, w._callPropsCallbacks = function() {
1376
1378
  var l = this.props, T = l.columnCount, _ = l.onItemsRendered, y = l.onScroll, E = l.rowCount;
1377
1379
  if (typeof _ == "function" && T > 0 && E > 0) {
1378
- var I = this._getHorizontalRangeToRender(), N = I[0], R = I[1], z = I[2], O = I[3], D = this._getVerticalRangeToRender(), x = D[0], k = D[1], $ = D[2], j = D[3];
1379
- this._callOnItemsRendered(N, R, x, k, z, O, $, j);
1380
+ var I = this._getHorizontalRangeToRender(), O = I[0], R = I[1], F = I[2], z = I[3], N = this._getVerticalRangeToRender(), x = N[0], D = N[1], H = N[2], Z = N[3];
1381
+ this._callOnItemsRendered(O, R, x, D, F, z, H, Z);
1380
1382
  }
1381
1383
  if (typeof y == "function") {
1382
- var Y = this.state, q = Y.horizontalScrollDirection, B = Y.scrollLeft, ie = Y.scrollTop, pe = Y.scrollUpdateWasRequested, J = Y.verticalScrollDirection;
1383
- this._callOnScroll(B, ie, q, J, pe);
1384
+ var Y = this.state, j = Y.horizontalScrollDirection, B = Y.scrollLeft, ee = Y.scrollTop, ae = Y.scrollUpdateWasRequested, J = Y.verticalScrollDirection;
1385
+ this._callOnScroll(B, ee, j, J, ae);
1384
1386
  }
1385
1387
  }, w._getHorizontalRangeToRender = function() {
1386
- var l = this.props, T = l.columnCount, _ = l.overscanColumnCount, y = l.overscanColumnsCount, E = l.overscanCount, I = l.rowCount, N = this.state, R = N.horizontalScrollDirection, z = N.isScrolling, O = N.scrollLeft, D = _ || y || E || 1;
1388
+ var l = this.props, T = l.columnCount, _ = l.overscanColumnCount, y = l.overscanColumnsCount, E = l.overscanCount, I = l.rowCount, O = this.state, R = O.horizontalScrollDirection, F = O.isScrolling, z = O.scrollLeft, N = _ || y || E || 1;
1387
1389
  if (T === 0 || I === 0)
1388
1390
  return [0, 0, 0, 0];
1389
- var x = o(this.props, O, this._instanceProps), k = r(this.props, x, O, this._instanceProps), $ = !z || R === "backward" ? Math.max(1, D) : 1, j = !z || R === "forward" ? Math.max(1, D) : 1;
1390
- return [Math.max(0, x - $), Math.max(0, Math.min(T - 1, k + j)), x, k];
1391
+ var x = o(this.props, z, this._instanceProps), D = r(this.props, x, z, this._instanceProps), H = !F || R === "backward" ? Math.max(1, N) : 1, Z = !F || R === "forward" ? Math.max(1, N) : 1;
1392
+ return [Math.max(0, x - H), Math.max(0, Math.min(T - 1, D + Z)), x, D];
1391
1393
  }, w._getVerticalRangeToRender = function() {
1392
- var l = this.props, T = l.columnCount, _ = l.overscanCount, y = l.overscanRowCount, E = l.overscanRowsCount, I = l.rowCount, N = this.state, R = N.isScrolling, z = N.verticalScrollDirection, O = N.scrollTop, D = y || E || _ || 1;
1394
+ var l = this.props, T = l.columnCount, _ = l.overscanCount, y = l.overscanRowCount, E = l.overscanRowsCount, I = l.rowCount, O = this.state, R = O.isScrolling, F = O.verticalScrollDirection, z = O.scrollTop, N = y || E || _ || 1;
1393
1395
  if (T === 0 || I === 0)
1394
1396
  return [0, 0, 0, 0];
1395
- var x = h(this.props, O, this._instanceProps), k = g(this.props, x, O, this._instanceProps), $ = !R || z === "backward" ? Math.max(1, D) : 1, j = !R || z === "forward" ? Math.max(1, D) : 1;
1396
- return [Math.max(0, x - $), Math.max(0, Math.min(I - 1, k + j)), x, k];
1397
+ var x = h(this.props, z, this._instanceProps), D = g(this.props, x, z, this._instanceProps), H = !R || F === "backward" ? Math.max(1, N) : 1, Z = !R || F === "forward" ? Math.max(1, N) : 1;
1398
+ return [Math.max(0, x - H), Math.max(0, Math.min(I - 1, D + Z)), x, D];
1397
1399
  }, m;
1398
- }(tr), t.defaultProps = {
1400
+ }(nr), t.defaultProps = {
1399
1401
  direction: "ltr",
1400
1402
  itemData: void 0,
1401
1403
  useIsScrolling: !1
1402
1404
  }, t;
1403
1405
  }
1404
- var Mo = function(t, n) {
1406
+ var $o = function(t, n) {
1405
1407
  var o = t.children, r = t.direction, a = t.height, c = t.innerTagName, s = t.outerTagName, d = t.overscanColumnsCount, u = t.overscanCount, p = t.overscanRowsCount, f = t.width, h = n.instance;
1406
1408
  if (process.env.NODE_ENV !== "production") {
1407
- if (typeof u == "number" && Ue && !Ue.has(h) && (Ue.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof p == "number") && qe && !qe.has(h) && (qe.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || s != null) && Ze && !Ze.has(h) && (Ze.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
1409
+ if (typeof u == "number" && qe && !qe.has(h) && (qe.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof p == "number") && Ue && !Ue.has(h) && (Ue.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || s != null) && Ze && !Ze.has(h) && (Ze.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
1408
1410
  throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
1409
1411
  switch (r) {
1410
1412
  case "ltr":
@@ -1434,7 +1436,7 @@ var Mo = function(t, n) {
1434
1436
  }
1435
1437
  var u = o - c - 1, p = u * a;
1436
1438
  return s + p;
1437
- }, me = function(t, n, o, r) {
1439
+ }, fe = function(t, n, o, r) {
1438
1440
  var a, c, s;
1439
1441
  if (t === "column" ? (a = r.columnMetadataMap, c = n.columnWidth, s = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, c = n.rowHeight, s = r.lastMeasuredRowIndex), o > s) {
1440
1442
  var d = 0;
@@ -1456,21 +1458,21 @@ var Mo = function(t, n) {
1456
1458
  var a, c;
1457
1459
  t === "column" ? (a = o.columnMetadataMap, c = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, c = o.lastMeasuredRowIndex);
1458
1460
  var s = c > 0 ? a[c].offset : 0;
1459
- return s >= r ? Rn(t, n, o, c, 0, r) : Wo(t, n, o, Math.max(0, c), r);
1461
+ return s >= r ? Rn(t, n, o, c, 0, r) : Go(t, n, o, Math.max(0, c), r);
1460
1462
  }, Rn = function(t, n, o, r, a, c) {
1461
1463
  for (; a <= r; ) {
1462
- var s = a + Math.floor((r - a) / 2), d = me(t, n, s, o).offset;
1464
+ var s = a + Math.floor((r - a) / 2), d = fe(t, n, s, o).offset;
1463
1465
  if (d === c)
1464
1466
  return s;
1465
1467
  d < c ? a = s + 1 : d > c && (r = s - 1);
1466
1468
  }
1467
1469
  return a > 0 ? a - 1 : 0;
1468
- }, Wo = function(t, n, o, r, a) {
1469
- for (var c = t === "column" ? n.columnCount : n.rowCount, s = 1; r < c && me(t, n, r, o).offset < a; )
1470
+ }, Go = function(t, n, o, r, a) {
1471
+ for (var c = t === "column" ? n.columnCount : n.rowCount, s = 1; r < c && fe(t, n, r, o).offset < a; )
1470
1472
  r += s, s *= 2;
1471
1473
  return Rn(t, n, o, Math.min(r, c - 1), Math.floor(r / 2), a);
1472
1474
  }, Qt = function(t, n, o, r, a, c, s) {
1473
- var d = t === "column" ? n.width : n.height, u = me(t, n, o, c), p = t === "column" ? Ln(n, c) : In(n, c), f = Math.max(0, Math.min(p - d, u.offset)), h = Math.max(0, u.offset - d + s + u.size);
1475
+ var d = t === "column" ? n.width : n.height, u = fe(t, n, o, c), p = t === "column" ? Ln(n, c) : In(n, c), f = Math.max(0, Math.min(p - d, u.offset)), h = Math.max(0, u.offset - d + s + u.size);
1474
1476
  switch (r === "smart" && (a >= h - d && a <= f + d ? r = "auto" : r = "center"), r) {
1475
1477
  case "start":
1476
1478
  return f;
@@ -1482,16 +1484,16 @@ var Mo = function(t, n) {
1482
1484
  default:
1483
1485
  return a >= h && a <= f ? a : h > f || a < h ? h : f;
1484
1486
  }
1485
- }, Ho = /* @__PURE__ */ ko({
1487
+ }, Vo = /* @__PURE__ */ Ho({
1486
1488
  getColumnOffset: function(t, n, o) {
1487
- return me("column", t, n, o).offset;
1489
+ return fe("column", t, n, o).offset;
1488
1490
  },
1489
1491
  getColumnStartIndexForOffset: function(t, n, o) {
1490
1492
  return Jt("column", t, o, n);
1491
1493
  },
1492
1494
  getColumnStopIndexForStartIndex: function(t, n, o, r) {
1493
- for (var a = t.columnCount, c = t.width, s = me("column", t, n, r), d = o + c, u = s.offset + s.size, p = n; p < a - 1 && u < d; )
1494
- p++, u += me("column", t, p, r).size;
1495
+ for (var a = t.columnCount, c = t.width, s = fe("column", t, n, r), d = o + c, u = s.offset + s.size, p = n; p < a - 1 && u < d; )
1496
+ p++, u += fe("column", t, p, r).size;
1495
1497
  return p;
1496
1498
  },
1497
1499
  getColumnWidth: function(t, n, o) {
@@ -1506,7 +1508,7 @@ var Mo = function(t, n) {
1506
1508
  return Qt("row", t, n, o, r, a, c);
1507
1509
  },
1508
1510
  getRowOffset: function(t, n, o) {
1509
- return me("row", t, n, o).offset;
1511
+ return fe("row", t, n, o).offset;
1510
1512
  },
1511
1513
  getRowHeight: function(t, n, o) {
1512
1514
  return o.rowMetadataMap[n].size;
@@ -1515,8 +1517,8 @@ var Mo = function(t, n) {
1515
1517
  return Jt("row", t, o, n);
1516
1518
  },
1517
1519
  getRowStopIndexForStartIndex: function(t, n, o, r) {
1518
- for (var a = t.rowCount, c = t.height, s = me("row", t, n, r), d = o + c, u = s.offset + s.size, p = n; p < a - 1 && u < d; )
1519
- p++, u += me("row", t, p, r).size;
1520
+ for (var a = t.rowCount, c = t.height, s = fe("row", t, n, r), d = o + c, u = s.offset + s.size, p = n; p < a - 1 && u < d; )
1521
+ p++, u += fe("row", t, p, r).size;
1520
1522
  return p;
1521
1523
  },
1522
1524
  initInstanceProps: function(t, n) {
@@ -1564,23 +1566,23 @@ function en(e, t) {
1564
1566
  return !0;
1565
1567
  return !1;
1566
1568
  }
1567
- var $o = ["style"], Go = ["style"];
1568
- function Vo(e, t) {
1569
- var n = e.style, o = Bt(e, $o), r = t.style, a = Bt(t, Go);
1569
+ var qo = ["style"], Uo = ["style"];
1570
+ function Zo(e, t) {
1571
+ var n = e.style, o = Bt(e, qo), r = t.style, a = Bt(t, Uo);
1570
1572
  return !en(n, r) && !en(o, a);
1571
1573
  }
1572
- const Uo = () => {
1573
- const { viewMode: e } = He(), { scrollMode: t } = Oe(), { setColumnCount: n } = pn(), { virtualScrollableElementRef: o } = et(), r = tt(), a = L(
1574
+ const Bo = () => {
1575
+ const { viewMode: e } = He(), { scrollMode: t } = Ne(), { setColumnCount: n } = pn(), { virtualScrollableElementRef: o } = et(), r = tt(), a = L(
1574
1576
  (g) => r.widths[g] || 0,
1575
1577
  [r.widths]
1576
1578
  ), c = L(
1577
1579
  (g) => r.heights[g] || 0,
1578
1580
  [r.heights]
1579
- ), s = M(() => r.heights.length, [r.heights]), d = M(() => Math.max(...r.widths), [r.widths]), u = M(() => t === ee.HORIZONTAL_SCROLLING ? s : e === Be.DUAL_PAGE ? 2 : 1, [e, t, t, s, o, d]);
1580
- F(() => {
1581
+ ), s = M(() => r.heights.length, [r.heights]), d = M(() => Math.max(...r.widths), [r.widths]), u = M(() => t === Q.HORIZONTAL_SCROLLING ? s : e === Be.DUAL_PAGE ? 2 : 1, [e, t, t, s, o, d]);
1582
+ k(() => {
1581
1583
  n(u);
1582
1584
  }, [u, n]);
1583
- const p = M(() => t === ee.HORIZONTAL_SCROLLING || t === ee.PAGE_SCROLLING ? 1 : Math.round(s / u), [u, s, t]), f = M(() => r.heights.reduce((g, P) => g + P, 0) / r.heights.length || 0, [r]), h = M(() => r.widths.reduce((g, P) => g + P, 0) / r.heights.length || 0, [r]);
1585
+ const p = M(() => t === Q.HORIZONTAL_SCROLLING || t === Q.PAGE_SCROLLING ? 1 : Math.round(s / u), [u, s, t]), f = M(() => r.heights.reduce((g, P) => g + P, 0) / r.heights.length || 0, [r]), h = M(() => r.widths.reduce((g, P) => g + P, 0) / r.heights.length || 0, [r]);
1584
1586
  return {
1585
1587
  rowCount: p,
1586
1588
  rowHeight: c,
@@ -1591,10 +1593,10 @@ const Uo = () => {
1591
1593
  estimatedColumnWidth: h
1592
1594
  };
1593
1595
  };
1594
- let re;
1595
- typeof window < "u" ? re = window : typeof self < "u" ? re = self : re = global;
1596
+ let oe;
1597
+ typeof window < "u" ? oe = window : typeof self < "u" ? oe = self : oe = global;
1596
1598
  let bt = null, Ct = null;
1597
- const tn = 20, ht = re.clearTimeout, nn = re.setTimeout, mt = re.cancelAnimationFrame || re.mozCancelAnimationFrame || re.webkitCancelAnimationFrame, rn = re.requestAnimationFrame || re.mozRequestAnimationFrame || re.webkitRequestAnimationFrame;
1599
+ const tn = 20, ht = oe.clearTimeout, nn = oe.setTimeout, mt = oe.cancelAnimationFrame || oe.mozCancelAnimationFrame || oe.webkitCancelAnimationFrame, rn = oe.requestAnimationFrame || oe.mozRequestAnimationFrame || oe.webkitRequestAnimationFrame;
1598
1600
  mt == null || rn == null ? (bt = ht, Ct = function(t) {
1599
1601
  return nn(t, tn);
1600
1602
  }) : (bt = function([t, n]) {
@@ -1607,7 +1609,7 @@ mt == null || rn == null ? (bt = ht, Ct = function(t) {
1607
1609
  }, tn);
1608
1610
  return [n, o];
1609
1611
  });
1610
- function qo(e) {
1612
+ function jo(e) {
1611
1613
  let t, n, o, r, a, c, s;
1612
1614
  const d = typeof document < "u" && document.attachEvent;
1613
1615
  if (!d) {
@@ -1654,7 +1656,7 @@ function qo(e) {
1654
1656
  h.attachEvent("onresize", g);
1655
1657
  else {
1656
1658
  if (!h.__resizeTriggers__) {
1657
- const P = h.ownerDocument, b = re.getComputedStyle(h);
1659
+ const P = h.ownerDocument, b = oe.getComputedStyle(h);
1658
1660
  b && b.position === "static" && (h.style.position = "relative"), u(P), h.__resizeLast__ = {}, h.__resizeListeners__ = [], (h.__resizeTriggers__ = P.createElement("div")).className = "resize-triggers";
1659
1661
  const v = P.createElement("div");
1660
1662
  v.className = "expand-trigger", v.appendChild(P.createElement("div"));
@@ -1679,7 +1681,7 @@ function qo(e) {
1679
1681
  }
1680
1682
  };
1681
1683
  }
1682
- class Zo extends nr {
1684
+ class Ko extends rr {
1683
1685
  constructor(...t) {
1684
1686
  super(...t), this.state = {
1685
1687
  height: this.props.defaultHeight || 0,
@@ -1720,7 +1722,7 @@ class Zo extends nr {
1720
1722
  const o = n.ownerDocument.defaultView.ResizeObserver;
1721
1723
  o != null ? (this._resizeObserver = new o(() => {
1722
1724
  this._timeoutId = setTimeout(this._onResize, 0);
1723
- }), this._resizeObserver.observe(n)) : (this._detectElementResize = qo(t), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
1725
+ }), this._resizeObserver.observe(n)) : (this._detectElementResize = jo(t), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
1724
1726
  }
1725
1727
  }
1726
1728
  componentWillUnmount() {
@@ -1758,8 +1760,8 @@ class Zo extends nr {
1758
1760
  }, !m && t(S));
1759
1761
  }
1760
1762
  }
1761
- const Bo = ({ widths: e, heights: t }) => {
1762
- const { focusedPage: n, totalPages: o } = oe(), r = M(() => {
1763
+ const Xo = ({ widths: e, heights: t }) => {
1764
+ const { focusedPage: n, totalPages: o } = ie(), r = M(() => {
1763
1765
  const s = [], d = Math.ceil(n / 2) * 2 - 1;
1764
1766
  if (s.push(d), d + 1 < o) {
1765
1767
  const u = d + 1;
@@ -1782,8 +1784,8 @@ const Bo = ({ widths: e, heights: t }) => {
1782
1784
  }
1783
1785
  ], [e, t, r]), c = M(() => a.reduce((s, d) => s + Number(d.width || 0), 0), [a]);
1784
1786
  return /* @__PURE__ */ i("div", { style: { width: c, position: "relative" }, children: r.map((s, d) => /* @__PURE__ */ i(Rt, { style: a[d], pageNumber: s }, s)) });
1785
- }, jo = ({ widths: e, heights: t }) => {
1786
- const { focusedPage: n } = oe(), o = M(() => ({
1787
+ }, Yo = ({ widths: e, heights: t }) => {
1788
+ const { focusedPage: n } = ie(), o = M(() => ({
1787
1789
  position: "absolute",
1788
1790
  width: e(n - 1),
1789
1791
  height: t(n - 1)
@@ -1798,9 +1800,9 @@ const Bo = ({ widths: e, heights: t }) => {
1798
1800
  children: /* @__PURE__ */ i(Rt, { style: o, pageNumber: n }, n)
1799
1801
  }
1800
1802
  );
1801
- }, Ko = (e, t, n) => {
1802
- const o = W(), { contentRef: r } = we(), { heights: a, widths: c } = tt(), { setFocusedPage: s } = oe(), [d, u] = H([]), { targetScrollPage: p } = fn(), f = St(d, 0, 500), h = M(() => a.map((P, b) => {
1803
- const v = c[b], S = Wr(b + 1, e), m = v * S.columnIndex, w = P * S.rowIndex, C = m + v, l = w + P;
1803
+ }, Jo = (e, t, n) => {
1804
+ const o = W(), { contentRef: r } = Ce(), { heights: a, widths: c } = tt(), { setFocusedPage: s } = ie(), [d, u] = $([]), { targetScrollPage: p } = fn(), f = St(d, 0, 500), h = M(() => a.map((P, b) => {
1805
+ const v = c[b], S = Gr(b + 1, e), m = v * S.columnIndex, w = P * S.rowIndex, C = m + v, l = w + P;
1804
1806
  return {
1805
1807
  pageNumber: b + 1,
1806
1808
  ...S,
@@ -1812,7 +1814,7 @@ const Bo = ({ widths: e, heights: t }) => {
1812
1814
  endY: l
1813
1815
  };
1814
1816
  }), [a, c, e, t]);
1815
- F(() => {
1817
+ k(() => {
1816
1818
  var b;
1817
1819
  f.length > 0 && !p.current && s(f[0].pageNumber);
1818
1820
  let P = (b = f[0]) == null ? void 0 : b.ratio;
@@ -1841,17 +1843,17 @@ const Bo = ({ widths: e, heights: t }) => {
1841
1843
  },
1842
1844
  [r, h]
1843
1845
  );
1844
- F(() => {
1846
+ k(() => {
1845
1847
  if (n)
1846
1848
  return n == null || n.addEventListener("scroll", g), () => {
1847
1849
  n == null || n.removeEventListener("scroll", g);
1848
1850
  };
1849
1851
  }, [n, g]);
1850
- }, Xo = rr(({ columnIndex: e, rowIndex: t, data: n, style: o }) => {
1851
- const r = Hr(t, e, n.columnCount);
1852
+ }, Qo = or(({ columnIndex: e, rowIndex: t, data: n, style: o }) => {
1853
+ const r = Vr(t, e, n.columnCount);
1852
1854
  return /* @__PURE__ */ i(Rt, { style: o, pageNumber: r }, r);
1853
- }, Vo), Ns = () => {
1854
- const { initialPage: e = 1, initialScrollMode: t, instanceId: n } = cr(), { pagesRef: o, setPagesRef: r } = we(), { scrollToPage: a } = Cn(), {
1855
+ }, Zo), Fs = () => {
1856
+ const { initialPage: e = 1, initialScrollMode: t, instanceId: n } = dr(), { pagesRef: o, setPagesRef: r } = Ce(), { scrollToPage: a } = Cn(), {
1855
1857
  virtualScrollRef: c,
1856
1858
  getVirtualScrollRef: s,
1857
1859
  getPageScrollElementRef: d,
@@ -1860,135 +1862,135 @@ const Bo = ({ widths: e, heights: t }) => {
1860
1862
  virtualScrollableElementRef: f,
1861
1863
  totalInnerDimensions: h,
1862
1864
  pageScrollElementRef: g
1863
- } = et(), P = W(!0), { nextPage: b, prevPage: v, setFocusedPage: S, focusedPage: m } = oe(), { scrollMode: w } = Oe(), { viewMode: C } = He(), l = W(null), { loading: T } = X(), { LoaderImageComponent: _ } = gn(), y = W(
1865
+ } = et(), P = W(!0), { nextPage: b, prevPage: v, setFocusedPage: S, focusedPage: m } = ie(), { scrollMode: w } = Ne(), { viewMode: C } = He(), l = W(null), { loading: T } = X(), { passwordRequired: _ } = ir(), { LoaderImageComponent: y } = gn(), E = W(
1864
1866
  h
1865
- ), E = W({
1867
+ ), I = W({
1866
1868
  viewMode: C,
1867
1869
  scrollMode: w
1868
- }), I = W(!1), N = W(), { isFullScreen: R } = lr(), {
1870
+ }), O = W(!1), R = W(), { isFullScreen: F } = ur(), {
1869
1871
  pageDimension: z,
1870
- rowCount: O,
1871
- rowHeight: D,
1872
- columnCount: x,
1873
- columnWidth: k,
1874
- estimatedColumnWidth: $,
1875
- estimatedRowHeight: j
1876
- } = Uo(), Y = St(h, 100), q = W();
1877
- Ko(x, O, f);
1878
- const B = W({
1872
+ rowCount: N,
1873
+ rowHeight: x,
1874
+ columnCount: D,
1875
+ columnWidth: H,
1876
+ estimatedColumnWidth: Z,
1877
+ estimatedRowHeight: Y
1878
+ } = Bo(), j = St(h, 100), B = W();
1879
+ Jo(D, N, f);
1880
+ const ee = W({
1879
1881
  scrollTop: 0,
1880
1882
  scrollLeft: 0
1881
1883
  });
1882
- Mr(o);
1883
- const { isPressed: ie } = Fr(), { selectionMode: pe } = sr(), { initializeGrabScroll: J, resetGrabState: ae } = kr({
1884
- isPressed: ie
1885
- }), Q = M(() => pe === ir.HAND, [pe]), Ie = M(() => ({
1886
- columnCount: x
1887
- }), [x]), Ce = L(
1884
+ Hr(o);
1885
+ const { isPressed: ae } = Mr(), { selectionMode: J } = lr(), { initializeGrabScroll: te, resetGrabState: he } = Wr({
1886
+ isPressed: ae
1887
+ }), le = M(() => J === sr.HAND, [J]), Oe = M(() => ({
1888
+ columnCount: D
1889
+ }), [D]), _e = L(
1888
1890
  (G) => {
1889
1891
  const V = document.activeElement !== o;
1890
- !R && V || (["ArrowUp", "ArrowLeft"].includes(G.key) ? (G.preventDefault(), v()) : ["ArrowDown", "ArrowRight"].includes(G.key) && (G.preventDefault(), b()));
1892
+ !F && V || (["ArrowUp", "ArrowLeft"].includes(G.key) ? (G.preventDefault(), v()) : ["ArrowDown", "ArrowRight"].includes(G.key) && (G.preventDefault(), b()));
1891
1893
  },
1892
- [b, v, R, w]
1894
+ [b, v, F, w]
1893
1895
  );
1894
- F(() => (window.addEventListener("keydown", Ce), () => {
1895
- window.removeEventListener("keydown", Ce);
1896
- }), [Ce]), F(() => {
1896
+ k(() => (window.addEventListener("keydown", _e), () => {
1897
+ window.removeEventListener("keydown", _e);
1898
+ }), [_e]), k(() => {
1897
1899
  if (l.current && (l.current.style.position = "relative"), !!c)
1898
- for (let G = 0; G < O; G++)
1899
- for (let V = 0; V < x; V++)
1900
+ for (let G = 0; G < N; G++)
1901
+ for (let V = 0; V < D; V++)
1900
1902
  c.resetAfterIndices({
1901
1903
  columnIndex: V,
1902
1904
  rowIndex: G,
1903
1905
  shouldForceUpdate: !0
1904
1906
  });
1905
- }, [O, x, z, c]);
1906
- const Le = L(
1907
+ }, [N, D, z, c]);
1908
+ const me = L(
1907
1909
  (G, V) => {
1908
1910
  if (!f)
1909
1911
  return { scrollTop: 0, scrollLeft: 0 };
1910
- const Te = B.current.scrollTop > V, Pe = B.current.scrollLeft > G;
1911
- return Te || Pe ? B.current : {
1912
+ const Pe = ee.current.scrollTop > V, Se = ee.current.scrollLeft > G;
1913
+ return Pe || Se ? ee.current : {
1912
1914
  scrollTop: f.scrollTop,
1913
1915
  scrollLeft: f.scrollLeft
1914
1916
  };
1915
1917
  },
1916
1918
  [f]
1917
- ), le = L(
1919
+ ), de = L(
1918
1920
  (G, V) => {
1919
- if (E.current.viewMode !== C || E.current.scrollMode !== w) {
1920
- q.current && clearTimeout(q.current), I.current = !0, a(m, "auto"), q.current = setTimeout(() => {
1921
+ if (I.current.viewMode !== C || I.current.scrollMode !== w) {
1922
+ B.current && clearTimeout(B.current), O.current = !0, a(m, "auto"), B.current = setTimeout(() => {
1921
1923
  requestAnimationFrame(() => {
1922
- E.current = { viewMode: C, scrollMode: w };
1924
+ I.current = { viewMode: C, scrollMode: w };
1923
1925
  });
1924
1926
  }, 100);
1925
1927
  return;
1926
1928
  }
1927
- const Pe = G.scrollTop, ot = G.scrollLeft;
1929
+ const Se = G.scrollTop, ot = G.scrollLeft;
1928
1930
  if (!V.height || !V.width)
1929
1931
  return;
1930
- I.current = !0;
1931
- const { height: Se, width: it } = V, { height: zt, width: At } = y.current;
1932
- if (zt === Se && At === it)
1932
+ O.current = !0;
1933
+ const { height: ye, width: it } = V, { height: zt, width: At } = E.current;
1934
+ if (zt === ye && At === it)
1933
1935
  return;
1934
- const Yn = Pe / zt * Se, Jn = ot / At * it, Qn = Math.round(Math.min(Yn, Se)) || 0, er = Math.round(Math.min(Jn, it)) || 0;
1935
- N.current = setTimeout(() => {
1936
+ const Jn = Se / zt * ye, Qn = ot / At * it, er = Math.round(Math.min(Jn, ye)) || 0, tr = Math.round(Math.min(Qn, it)) || 0;
1937
+ R.current = setTimeout(() => {
1936
1938
  requestAnimationFrame(() => {
1937
1939
  c == null || c.scrollTo({
1938
- scrollTop: Qn,
1939
- scrollLeft: er
1940
+ scrollTop: er,
1941
+ scrollLeft: tr
1940
1942
  });
1941
1943
  });
1942
- }, 0), y.current = {
1944
+ }, 0), E.current = {
1943
1945
  height: V.height,
1944
1946
  width: V.width
1945
1947
  };
1946
1948
  },
1947
1949
  [c, C, w, a]
1948
1950
  );
1949
- F(() => {
1950
- clearTimeout(N.current);
1951
- const G = Array.from({ length: O }).reduce(
1952
- (Pe, ot, Se) => Pe + D(Se),
1951
+ k(() => {
1952
+ clearTimeout(R.current);
1953
+ const G = Array.from({ length: N }).reduce(
1954
+ (Se, ot, ye) => Se + x(ye),
1953
1955
  0
1954
- ), V = Array.from({ length: x }).reduce(
1955
- (Pe, ot, Se) => Pe + k(Se),
1956
+ ), V = Array.from({ length: D }).reduce(
1957
+ (Se, ot, ye) => Se + H(ye),
1956
1958
  0
1957
- ), Te = Le(V, G);
1958
- B.current = Te, le(Te, { height: G, width: V }), p({
1959
+ ), Pe = me(V, G);
1960
+ ee.current = Pe, de(Pe, { height: G, width: V }), p({
1959
1961
  height: G,
1960
1962
  width: V
1961
1963
  });
1962
- }, [z, O, x, le]);
1963
- const he = L(
1964
+ }, [z, N, D, de]);
1965
+ const De = L(
1964
1966
  (G) => {
1965
- B.current = {
1967
+ ee.current = {
1966
1968
  scrollTop: G.scrollTop,
1967
1969
  scrollLeft: G.scrollLeft
1968
1970
  };
1969
1971
  },
1970
1972
  [f]
1971
1973
  );
1972
- F(() => () => {
1973
- q.current && clearTimeout(q.current);
1974
+ k(() => () => {
1975
+ B.current && clearTimeout(B.current);
1974
1976
  }, []);
1975
- const De = M(() => te(de["rp-pages-container"], {
1976
- [de["rp-cursor-grab"]]: Q && !ie,
1977
- [de["rp-cursor-grabbing"]]: Q && ie
1978
- }), [Q, ie]), rt = L(
1977
+ const rt = M(() => ne(ue["rp-pages-container"], {
1978
+ [ue["rp-cursor-grab"]]: le && !ae,
1979
+ [ue["rp-cursor-grabbing"]]: le && ae
1980
+ }), [le, ae]), Yn = L(
1979
1981
  (G) => {
1980
- if (Q && G) {
1981
- const V = te(de["rp-pages"]), Te = document.querySelector(`.${V}`);
1982
- J(Te);
1982
+ if (le && G) {
1983
+ const V = ne(ue["rp-pages"]), Pe = document.querySelector(`.${V}`);
1984
+ te(Pe);
1983
1985
  }
1984
1986
  },
1985
- [Q, J, de]
1987
+ [le, te, ue]
1986
1988
  );
1987
- return F(() => {
1988
- T && ae();
1989
- }, [T]), F(() => {
1990
- if (!(Y.height === 0 || !P.current)) {
1991
- if (t === ee.PAGE_SCROLLING) {
1989
+ return k(() => {
1990
+ T && he();
1991
+ }, [T]), k(() => {
1992
+ if (!(j.height === 0 || !P.current)) {
1993
+ if (t === Q.PAGE_SCROLLING) {
1992
1994
  e !== m && g && S(e), P.current = !1;
1993
1995
  return;
1994
1996
  }
@@ -1999,51 +2001,54 @@ const Bo = ({ widths: e, heights: t }) => {
1999
2001
  t,
2000
2002
  g,
2001
2003
  S,
2002
- Y
2003
- ]), /* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: De, children: /* @__PURE__ */ i(Zo, { style: { minHeight: "50px" }, children: ({ width: G, height: V }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: rt, style: { width: G, height: V }, children: w === ee.PAGE_SCROLLING ? /* @__PURE__ */ i(
2004
- "div",
2005
- {
2006
- ref: d,
2007
- style: { width: G, height: V },
2008
- className: te(de["rp-pages"], de["rp-page-scrolling-wrapper"]),
2009
- children: C === Be.DUAL_PAGE ? /* @__PURE__ */ i(Bo, { widths: k, heights: D }) : /* @__PURE__ */ i(jo, { widths: k, heights: D })
2010
- }
2011
- ) : $ ? /* @__PURE__ */ i(
2012
- Ho,
2013
- {
2014
- ref: s,
2015
- itemData: Ie,
2016
- outerRef: u,
2017
- innerRef: l,
2018
- onScroll: he,
2019
- columnCount: x,
2020
- columnWidth: k,
2021
- rowHeight: D,
2022
- height: V,
2023
- width: G,
2024
- estimatedColumnWidth: $,
2025
- estimatedRowHeight: j,
2026
- rowCount: O,
2027
- className: te(
2028
- de["rp-pages"],
2029
- w === ee.HORIZONTAL_SCROLLING ? de["rp-pages-horizontal-scroll"] : ""
2030
- ),
2031
- children: Xo
2032
- }
2033
- ) : T ? null : /* @__PURE__ */ i(
2034
- "div",
2035
- {
2036
- className: de["rp-loader"],
2037
- style: {
2038
- display: "flex",
2039
- justifyContent: "center",
2040
- alignItems: "center",
2041
- height: "100%",
2042
- width: "100%"
2043
- },
2044
- children: _ && /* @__PURE__ */ i(_, {})
2045
- }
2046
- ) }) }) });
2004
+ j
2005
+ ]), /* @__PURE__ */ A(ge, { children: [
2006
+ /* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: rt, children: /* @__PURE__ */ i(Ko, { style: { minHeight: "50px" }, children: ({ width: G, height: V }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: Yn, style: { width: G, height: V }, children: w === Q.PAGE_SCROLLING ? /* @__PURE__ */ i(
2007
+ "div",
2008
+ {
2009
+ ref: d,
2010
+ style: { width: G, height: V },
2011
+ className: ne(ue["rp-pages"], ue["rp-page-scrolling-wrapper"]),
2012
+ children: C === Be.DUAL_PAGE ? /* @__PURE__ */ i(Xo, { widths: H, heights: x }) : /* @__PURE__ */ i(Yo, { widths: H, heights: x })
2013
+ }
2014
+ ) : Z ? /* @__PURE__ */ i(
2015
+ Vo,
2016
+ {
2017
+ ref: s,
2018
+ itemData: Oe,
2019
+ outerRef: u,
2020
+ innerRef: l,
2021
+ onScroll: De,
2022
+ columnCount: D,
2023
+ columnWidth: H,
2024
+ rowHeight: x,
2025
+ height: V,
2026
+ width: G,
2027
+ estimatedColumnWidth: Z,
2028
+ estimatedRowHeight: Y,
2029
+ rowCount: N,
2030
+ className: ne(
2031
+ ue["rp-pages"],
2032
+ w === Q.HORIZONTAL_SCROLLING ? ue["rp-pages-horizontal-scroll"] : ""
2033
+ ),
2034
+ children: Qo
2035
+ }
2036
+ ) : T ? null : /* @__PURE__ */ i(
2037
+ "div",
2038
+ {
2039
+ className: ue["rp-loader"],
2040
+ style: {
2041
+ display: "flex",
2042
+ justifyContent: "center",
2043
+ alignItems: "center",
2044
+ height: "100%",
2045
+ width: "100%"
2046
+ },
2047
+ children: y && /* @__PURE__ */ i(y, {})
2048
+ }
2049
+ ) }) }) }),
2050
+ _ && /* @__PURE__ */ i($r, {})
2051
+ ] });
2047
2052
  }, Ae = {
2048
2053
  "rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
2049
2054
  "rp-toolbar-wrapper": "_rp-toolbar-wrapper_sz31z_10",
@@ -2054,15 +2059,15 @@ const Bo = ({ widths: e, heights: t }) => {
2054
2059
  "rp-paginate": "_rp-paginate_1y9vo_1",
2055
2060
  "rp-page-input": "_rp-page-input_1y9vo_6",
2056
2061
  "rp-total-page": "_rp-total-page_1y9vo_11"
2057
- }, Yo = () => {
2058
- const { prevIcon: e } = ue();
2062
+ }, ei = () => {
2063
+ const { prevIcon: e } = pe();
2059
2064
  return e || /* @__PURE__ */ i(Me, {});
2060
- }, Jo = () => {
2061
- const { nextIcon: e } = ue();
2065
+ }, ti = () => {
2066
+ const { nextIcon: e } = pe();
2062
2067
  return e || /* @__PURE__ */ i(Me, { style: { transform: "rotate(180deg" } });
2063
- }, Qo = () => {
2064
- const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = oe(), [c, s] = H(e.toString()), { pageNavigationTool: d = !0 } = fe(), { isSmallScreen: u } = be(), { localeMessages: p } = se();
2065
- F(() => {
2068
+ }, ni = () => {
2069
+ const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [c, s] = $(e.toString()), { pageNavigationTool: d = !0 } = ve(), { isSmallScreen: u } = Te(), { localeMessages: p } = se();
2070
+ k(() => {
2066
2071
  s(e.toString());
2067
2072
  }, [e]);
2068
2073
  const f = L((b) => {
@@ -2090,16 +2095,16 @@ const Bo = ({ widths: e, heights: t }) => {
2090
2095
  changePage: n
2091
2096
  }
2092
2097
  ) : d ? /* @__PURE__ */ A("div", { className: ft["rp-paginate"], children: [
2093
- !u && /* @__PURE__ */ i(Z, { content: p == null ? void 0 : p.previousPageTooltip, children: /* @__PURE__ */ i(
2094
- ne,
2098
+ !u && /* @__PURE__ */ i(U, { content: p == null ? void 0 : p.previousPageTooltip, children: /* @__PURE__ */ i(
2099
+ re,
2095
2100
  {
2096
2101
  onClick: r,
2097
2102
  "aria-label": p == null ? void 0 : p.previousPageTooltip,
2098
2103
  "aria-disabled": e === 1,
2099
- children: /* @__PURE__ */ i(Yo, {})
2104
+ children: /* @__PURE__ */ i(ei, {})
2100
2105
  }
2101
2106
  ) }),
2102
- /* @__PURE__ */ i(Z, { content: p == null ? void 0 : p.currentPageTooltip, children: /* @__PURE__ */ i(
2107
+ /* @__PURE__ */ i(U, { content: p == null ? void 0 : p.currentPageTooltip, children: /* @__PURE__ */ i(
2103
2108
  un,
2104
2109
  {
2105
2110
  onKeyDown: P,
@@ -2113,18 +2118,18 @@ const Bo = ({ widths: e, heights: t }) => {
2113
2118
  "/",
2114
2119
  t
2115
2120
  ] }),
2116
- !u && /* @__PURE__ */ i(Z, { content: p == null ? void 0 : p.nextPageTooltip, children: /* @__PURE__ */ i(
2117
- ne,
2121
+ !u && /* @__PURE__ */ i(U, { content: p == null ? void 0 : p.nextPageTooltip, children: /* @__PURE__ */ i(
2122
+ re,
2118
2123
  {
2119
2124
  onClick: o,
2120
2125
  "aria-label": p == null ? void 0 : p.nextPageTooltip,
2121
2126
  "aria-disabled": e === t,
2122
- children: /* @__PURE__ */ i(Jo, {})
2127
+ children: /* @__PURE__ */ i(ti, {})
2123
2128
  }
2124
2129
  ) })
2125
2130
  ] }) : null;
2126
2131
  };
2127
- var Et = "Dialog", [En, Os] = Ur(Et), [ei, ce] = En(Et), Nn = (e) => {
2132
+ var Et = "Dialog", [En, ks] = Br(Et), [ri, ce] = En(Et), Nn = (e) => {
2128
2133
  const {
2129
2134
  __scopeDialog: t,
2130
2135
  children: n,
@@ -2132,13 +2137,13 @@ var Et = "Dialog", [En, Os] = Ur(Et), [ei, ce] = En(Et), Nn = (e) => {
2132
2137
  defaultOpen: r,
2133
2138
  onOpenChange: a,
2134
2139
  modal: c = !0
2135
- } = e, s = U.useRef(null), d = U.useRef(null), [u = !1, p] = Br({
2140
+ } = e, s = q.useRef(null), d = q.useRef(null), [u = !1, p] = Xr({
2136
2141
  prop: o,
2137
2142
  defaultProp: r,
2138
2143
  onChange: a
2139
2144
  });
2140
2145
  return /* @__PURE__ */ i(
2141
- ei,
2146
+ ri,
2142
2147
  {
2143
2148
  scope: t,
2144
2149
  triggerRef: s,
@@ -2148,14 +2153,14 @@ var Et = "Dialog", [En, Os] = Ur(Et), [ei, ce] = En(Et), Nn = (e) => {
2148
2153
  descriptionId: ct(),
2149
2154
  open: u,
2150
2155
  onOpenChange: p,
2151
- onOpenToggle: U.useCallback(() => p((f) => !f), [p]),
2156
+ onOpenToggle: q.useCallback(() => p((f) => !f), [p]),
2152
2157
  modal: c,
2153
2158
  children: n
2154
2159
  }
2155
2160
  );
2156
2161
  };
2157
2162
  Nn.displayName = Et;
2158
- var On = "DialogTrigger", ti = U.forwardRef(
2163
+ var On = "DialogTrigger", oi = q.forwardRef(
2159
2164
  (e, t) => {
2160
2165
  const { __scopeDialog: n, ...o } = e, r = ce(On, n), a = yt(t, r.triggerRef);
2161
2166
  return /* @__PURE__ */ i(
@@ -2173,28 +2178,28 @@ var On = "DialogTrigger", ti = U.forwardRef(
2173
2178
  );
2174
2179
  }
2175
2180
  );
2176
- ti.displayName = On;
2177
- var Nt = "DialogPortal", [ni, Dn] = En(Nt, {
2181
+ oi.displayName = On;
2182
+ var Nt = "DialogPortal", [ii, Dn] = En(Nt, {
2178
2183
  forceMount: void 0
2179
2184
  }), zn = (e) => {
2180
2185
  const { __scopeDialog: t, forceMount: n, children: o, container: r } = e, a = ce(Nt, t);
2181
- return /* @__PURE__ */ i(ni, { scope: t, forceMount: n, children: U.Children.map(o, (c) => /* @__PURE__ */ i(xt, { present: n || a.open, children: /* @__PURE__ */ i(Jr, { asChild: !0, container: r, children: c }) })) });
2186
+ return /* @__PURE__ */ i(ii, { scope: t, forceMount: n, children: q.Children.map(o, (c) => /* @__PURE__ */ i(xt, { present: n || a.open, children: /* @__PURE__ */ i(to, { asChild: !0, container: r, children: c }) })) });
2182
2187
  };
2183
2188
  zn.displayName = Nt;
2184
- var Ke = "DialogOverlay", An = U.forwardRef(
2189
+ var Ke = "DialogOverlay", An = q.forwardRef(
2185
2190
  (e, t) => {
2186
2191
  const n = Dn(Ke, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = ce(Ke, e.__scopeDialog);
2187
- return a.modal ? /* @__PURE__ */ i(xt, { present: o || a.open, children: /* @__PURE__ */ i(ri, { ...r, ref: t }) }) : null;
2192
+ return a.modal ? /* @__PURE__ */ i(xt, { present: o || a.open, children: /* @__PURE__ */ i(ai, { ...r, ref: t }) }) : null;
2188
2193
  }
2189
2194
  );
2190
2195
  An.displayName = Ke;
2191
- var ri = U.forwardRef(
2196
+ var ai = q.forwardRef(
2192
2197
  (e, t) => {
2193
2198
  const { __scopeDialog: n, ...o } = e, r = ce(Ke, n);
2194
2199
  return (
2195
2200
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
2196
2201
  // ie. when `Overlay` and `Content` are siblings
2197
- /* @__PURE__ */ i(Kr, { as: qr, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
2202
+ /* @__PURE__ */ i(Jr, { as: jr, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
2198
2203
  $e.div,
2199
2204
  {
2200
2205
  "data-state": Dt(r.open),
@@ -2205,20 +2210,20 @@ var ri = U.forwardRef(
2205
2210
  ) })
2206
2211
  );
2207
2212
  }
2208
- ), xe = "DialogContent", Fn = U.forwardRef(
2213
+ ), Ie = "DialogContent", Fn = q.forwardRef(
2209
2214
  (e, t) => {
2210
- const n = Dn(xe, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = ce(xe, e.__scopeDialog);
2211
- return /* @__PURE__ */ i(xt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(oi, { ...r, ref: t }) : /* @__PURE__ */ i(ii, { ...r, ref: t }) });
2215
+ const n = Dn(Ie, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = ce(Ie, e.__scopeDialog);
2216
+ return /* @__PURE__ */ i(xt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(si, { ...r, ref: t }) : /* @__PURE__ */ i(ci, { ...r, ref: t }) });
2212
2217
  }
2213
2218
  );
2214
- Fn.displayName = xe;
2215
- var oi = U.forwardRef(
2219
+ Fn.displayName = Ie;
2220
+ var si = q.forwardRef(
2216
2221
  (e, t) => {
2217
- const n = ce(xe, e.__scopeDialog), o = U.useRef(null), r = yt(t, n.contentRef, o);
2218
- return U.useEffect(() => {
2222
+ const n = ce(Ie, e.__scopeDialog), o = q.useRef(null), r = yt(t, n.contentRef, o);
2223
+ return q.useEffect(() => {
2219
2224
  const a = o.current;
2220
2225
  if (a)
2221
- return Qr(a);
2226
+ return no(a);
2222
2227
  }, []), /* @__PURE__ */ i(
2223
2228
  kn,
2224
2229
  {
@@ -2241,9 +2246,9 @@ var oi = U.forwardRef(
2241
2246
  }
2242
2247
  );
2243
2248
  }
2244
- ), ii = U.forwardRef(
2249
+ ), ci = q.forwardRef(
2245
2250
  (e, t) => {
2246
- const n = ce(xe, e.__scopeDialog), o = U.useRef(!1), r = U.useRef(!1);
2251
+ const n = ce(Ie, e.__scopeDialog), o = q.useRef(!1), r = q.useRef(!1);
2247
2252
  return /* @__PURE__ */ i(
2248
2253
  kn,
2249
2254
  {
@@ -2264,12 +2269,12 @@ var oi = U.forwardRef(
2264
2269
  }
2265
2270
  );
2266
2271
  }
2267
- ), kn = U.forwardRef(
2272
+ ), kn = q.forwardRef(
2268
2273
  (e, t) => {
2269
- const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...c } = e, s = ce(xe, n), d = U.useRef(null), u = yt(t, d);
2270
- return Xr(), /* @__PURE__ */ A(_e, { children: [
2274
+ const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...c } = e, s = ce(Ie, n), d = q.useRef(null), u = yt(t, d);
2275
+ return Qr(), /* @__PURE__ */ A(ge, { children: [
2271
2276
  /* @__PURE__ */ i(
2272
- Yr,
2277
+ eo,
2273
2278
  {
2274
2279
  asChild: !0,
2275
2280
  loop: !0,
@@ -2277,7 +2282,7 @@ var oi = U.forwardRef(
2277
2282
  onMountAutoFocus: r,
2278
2283
  onUnmountAutoFocus: a,
2279
2284
  children: /* @__PURE__ */ i(
2280
- jr,
2285
+ Yr,
2281
2286
  {
2282
2287
  role: "dialog",
2283
2288
  id: s.contentId,
@@ -2291,27 +2296,27 @@ var oi = U.forwardRef(
2291
2296
  )
2292
2297
  }
2293
2298
  ),
2294
- /* @__PURE__ */ A(_e, { children: [
2295
- /* @__PURE__ */ i(si, { titleId: s.titleId }),
2296
- /* @__PURE__ */ i(li, { contentRef: d, descriptionId: s.descriptionId })
2299
+ /* @__PURE__ */ A(ge, { children: [
2300
+ /* @__PURE__ */ i(di, { titleId: s.titleId }),
2301
+ /* @__PURE__ */ i(pi, { contentRef: d, descriptionId: s.descriptionId })
2297
2302
  ] })
2298
2303
  ] });
2299
2304
  }
2300
- ), Ot = "DialogTitle", Mn = U.forwardRef(
2305
+ ), Ot = "DialogTitle", Mn = q.forwardRef(
2301
2306
  (e, t) => {
2302
2307
  const { __scopeDialog: n, ...o } = e, r = ce(Ot, n);
2303
2308
  return /* @__PURE__ */ i($e.h2, { id: r.titleId, ...o, ref: t });
2304
2309
  }
2305
2310
  );
2306
2311
  Mn.displayName = Ot;
2307
- var Wn = "DialogDescription", ai = U.forwardRef(
2312
+ var Wn = "DialogDescription", li = q.forwardRef(
2308
2313
  (e, t) => {
2309
2314
  const { __scopeDialog: n, ...o } = e, r = ce(Wn, n);
2310
2315
  return /* @__PURE__ */ i($e.p, { id: r.descriptionId, ...o, ref: t });
2311
2316
  }
2312
2317
  );
2313
- ai.displayName = Wn;
2314
- var Hn = "DialogClose", $n = U.forwardRef(
2318
+ li.displayName = Wn;
2319
+ var Hn = "DialogClose", $n = q.forwardRef(
2315
2320
  (e, t) => {
2316
2321
  const { __scopeDialog: n, ...o } = e, r = ce(Hn, n);
2317
2322
  return /* @__PURE__ */ i(
@@ -2329,28 +2334,28 @@ $n.displayName = Hn;
2329
2334
  function Dt(e) {
2330
2335
  return e ? "open" : "closed";
2331
2336
  }
2332
- var Gn = "DialogTitleWarning", [Ds, Vn] = Zr(Gn, {
2333
- contentName: xe,
2337
+ var Gn = "DialogTitleWarning", [Ms, Vn] = Kr(Gn, {
2338
+ contentName: Ie,
2334
2339
  titleName: Ot,
2335
2340
  docsSlug: "dialog"
2336
- }), si = ({ titleId: e }) => {
2341
+ }), di = ({ titleId: e }) => {
2337
2342
  const t = Vn(Gn), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2338
2343
 
2339
2344
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
2340
2345
 
2341
2346
  For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
2342
- return U.useEffect(() => {
2347
+ return q.useEffect(() => {
2343
2348
  e && (document.getElementById(e) || console.error(n));
2344
2349
  }, [n, e]), null;
2345
- }, ci = "DialogDescriptionWarning", li = ({ contentRef: e, descriptionId: t }) => {
2346
- const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vn(ci).contentName}}.`;
2347
- return U.useEffect(() => {
2350
+ }, ui = "DialogDescriptionWarning", pi = ({ contentRef: e, descriptionId: t }) => {
2351
+ const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vn(ui).contentName}}.`;
2352
+ return q.useEffect(() => {
2348
2353
  var a;
2349
2354
  const r = (a = e.current) == null ? void 0 : a.getAttribute("aria-describedby");
2350
2355
  t && r && (document.getElementById(t) || console.warn(o));
2351
2356
  }, [o, e, t]), null;
2352
- }, di = Nn, ui = zn, pi = An, hi = Fn, mi = Mn, fi = $n;
2353
- const ye = {
2357
+ }, hi = Nn, mi = zn, fi = An, gi = Fn, vi = Mn, _i = $n;
2358
+ const xe = {
2354
2359
  "rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
2355
2360
  "rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
2356
2361
  "rp-document-dialog": "_rp-document-dialog_slqo7_13",
@@ -2358,8 +2363,8 @@ const ye = {
2358
2363
  "rp-dialog-title": "_rp-dialog-title_slqo7_39",
2359
2364
  "rp-dialog-close": "_rp-dialog-close_slqo7_47",
2360
2365
  "rp-properties-divider": "_rp-properties-divider_slqo7_55"
2361
- }, gi = () => {
2362
- const { pdfProperties: e } = X(), { container: t } = we(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = no(), { localeMessages: r } = se(), a = M(() => {
2366
+ }, wi = () => {
2367
+ const { pdfProperties: e } = X(), { container: t } = Ce(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = io(), { localeMessages: r } = se(), a = M(() => {
2363
2368
  if (!e)
2364
2369
  return [];
2365
2370
  const {
@@ -2399,21 +2404,21 @@ const ye = {
2399
2404
  { label: r == null ? void 0 : r.propertiesPageCountLabel, value: S }
2400
2405
  ];
2401
2406
  }, [e, r]);
2402
- return /* @__PURE__ */ i(di, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(ui, { container: t, children: /* @__PURE__ */ A("div", { className: ye["rp-dialog-wrapper"], children: [
2403
- /* @__PURE__ */ i(pi, { className: ye["rp-dialog-overlay"] }),
2404
- /* @__PURE__ */ A(hi, { className: ye["rp-document-dialog"], children: [
2405
- /* @__PURE__ */ i(mi, { className: ye["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
2406
- /* @__PURE__ */ i("div", { className: ye["rp-document-properties"], children: a.map((c, s) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: ye["rp-properties-divider"] }) : /* @__PURE__ */ i(to, { label: c.label, value: c.value }) }, s)) }),
2407
- /* @__PURE__ */ i(fi, { asChild: !0, className: ye["rp-dialog-close"], children: /* @__PURE__ */ i(eo, {}) })
2407
+ return /* @__PURE__ */ i(hi, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(mi, { container: t, children: /* @__PURE__ */ A("div", { className: xe["rp-dialog-wrapper"], children: [
2408
+ /* @__PURE__ */ i(fi, { className: xe["rp-dialog-overlay"] }),
2409
+ /* @__PURE__ */ A(gi, { className: xe["rp-document-dialog"], children: [
2410
+ /* @__PURE__ */ i(vi, { className: xe["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
2411
+ /* @__PURE__ */ i("div", { className: xe["rp-document-properties"], children: a.map((c, s) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: xe["rp-properties-divider"] }) : /* @__PURE__ */ i(oo, { label: c.label, value: c.value }) }, s)) }),
2412
+ /* @__PURE__ */ i(_i, { asChild: !0, className: xe["rp-dialog-close"], children: /* @__PURE__ */ i(ro, {}) })
2408
2413
  ] })
2409
2414
  ] }) }) });
2410
- }, vi = {
2415
+ }, bi = {
2411
2416
  "rp-other-tool-content": "_rp-other-tool-content_su718_1"
2412
- }, on = ".pdf", _i = (e) => URL.createObjectURL(e), wi = async (e) => {
2417
+ }, on = ".pdf", Ci = (e) => URL.createObjectURL(e), Ti = async (e) => {
2413
2418
  const n = await (await fetch(e)).blob();
2414
- return _i(n);
2415
- }, Un = () => {
2416
- const { filename: e, pdfSrc: t } = X(), { downloadFilename: n } = vr(), o = (a) => {
2419
+ return Ci(n);
2420
+ }, qn = () => {
2421
+ const { filename: e, pdfSrc: t } = X(), { downloadFilename: n } = wr(), o = (a) => {
2417
2422
  const c = n || a;
2418
2423
  return c.endsWith(on) ? c : `${c}${on}`;
2419
2424
  };
@@ -2421,26 +2426,26 @@ const ye = {
2421
2426
  if (!e || !t)
2422
2427
  throw new Error("There is no PDF source to download");
2423
2428
  const a = document.createElement("a");
2424
- a.href = await wi(t), a.download = o(e), document.body.appendChild(a), a.click(), document.body.removeChild(a);
2429
+ a.href = await Ti(t), a.download = o(e), document.body.appendChild(a), a.click(), document.body.removeChild(a);
2425
2430
  }, [e, t]) };
2426
- }, qn = () => {
2427
- const { downloadIcon: e } = ue();
2428
- return e || /* @__PURE__ */ i(co, {});
2429
- }, Zn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(Z, { className: t, content: n == null ? void 0 : n.downloadFileTooltip, children: e }), bi = ({ download: e, localeMessages: t }) => /* @__PURE__ */ i(Zn, { localeMessages: t, children: /* @__PURE__ */ i(ne, { onClick: e, "aria-label": t == null ? void 0 : t.downloadFileTooltip, children: /* @__PURE__ */ i(qn, {}) }) }), Ci = ({ download: e, localeMessages: t }) => /* @__PURE__ */ i(ve, { onClick: e, children: /* @__PURE__ */ A(Zn, { className: "rp-menu-item", localeMessages: t, children: [
2430
- /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(qn, {}) }),
2431
+ }, Un = () => {
2432
+ const { downloadIcon: e } = pe();
2433
+ return e || /* @__PURE__ */ i(po, {});
2434
+ }, Zn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(U, { className: t, content: n == null ? void 0 : n.downloadFileTooltip, children: e }), Pi = ({ download: e, localeMessages: t }) => /* @__PURE__ */ i(Zn, { localeMessages: t, children: /* @__PURE__ */ i(re, { onClick: e, "aria-label": t == null ? void 0 : t.downloadFileTooltip, children: /* @__PURE__ */ i(Un, {}) }) }), Si = ({ download: e, localeMessages: t }) => /* @__PURE__ */ i(be, { onClick: e, children: /* @__PURE__ */ A(Zn, { className: "rp-menu-item", localeMessages: t, children: [
2435
+ /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Un, {}) }),
2431
2436
  t == null ? void 0 : t.downloadFileLabel
2432
2437
  ] }) }), Bn = () => {
2433
- const { download: e } = Un(), { downloadTool: t = !0 } = fe(), { isSmallScreen: n } = be(), { localeMessages: o } = se();
2434
- return t ? n ? /* @__PURE__ */ i(Ci, { download: e, localeMessages: o }) : typeof t == "function" ? /* @__PURE__ */ i(t, { download: e }) : t ? /* @__PURE__ */ i(bi, { download: e, localeMessages: o }) : null : null;
2438
+ const { download: e } = qn(), { downloadTool: t = !0 } = ve(), { isSmallScreen: n } = Te(), { localeMessages: o } = se();
2439
+ return t ? n ? /* @__PURE__ */ i(Si, { download: e, localeMessages: o }) : typeof t == "function" ? /* @__PURE__ */ i(t, { download: e }) : t ? /* @__PURE__ */ i(Pi, { download: e, localeMessages: o }) : null : null;
2435
2440
  }, jn = () => {
2436
- const { printIcon: e } = ue();
2437
- return e || /* @__PURE__ */ i(lo, {});
2438
- }, Kn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(Z, { className: t, content: n == null ? void 0 : n.printTooltip, children: e }), Ti = ({ print: e, localeMessages: t }) => /* @__PURE__ */ i(Kn, { localeMessages: t, children: /* @__PURE__ */ i(ne, { onClick: e, "aria-label": t == null ? void 0 : t.printTooltip, children: /* @__PURE__ */ i(jn, {}) }) }), Pi = ({ print: e, localeMessages: t }) => /* @__PURE__ */ i(ve, { onClick: e, children: /* @__PURE__ */ A(Kn, { className: "rp-menu-item", localeMessages: t, children: [
2441
+ const { printIcon: e } = pe();
2442
+ return e || /* @__PURE__ */ i(ho, {});
2443
+ }, Kn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(U, { className: t, content: n == null ? void 0 : n.printTooltip, children: e }), yi = ({ print: e, localeMessages: t }) => /* @__PURE__ */ i(Kn, { localeMessages: t, children: /* @__PURE__ */ i(re, { onClick: e, "aria-label": t == null ? void 0 : t.printTooltip, children: /* @__PURE__ */ i(jn, {}) }) }), xi = ({ print: e, localeMessages: t }) => /* @__PURE__ */ i(be, { onClick: e, children: /* @__PURE__ */ A(Kn, { className: "rp-menu-item", localeMessages: t, children: [
2439
2444
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(jn, {}) }),
2440
2445
  t == null ? void 0 : t.printLabel
2441
2446
  ] }) }), Xn = () => {
2442
- const { print: e, cancel: t, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = nt(), { printTool: c = !0 } = fe(), { isSmallScreen: s } = be(), { localeMessages: d } = se();
2443
- return c ? s ? /* @__PURE__ */ i(Pi, { print: e, localeMessages: d }) : typeof c == "function" ? /* @__PURE__ */ i(
2447
+ const { print: e, cancel: t, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = nt(), { printTool: c = !0 } = ve(), { isSmallScreen: s } = Te(), { localeMessages: d } = se();
2448
+ return c ? s ? /* @__PURE__ */ i(xi, { print: e, localeMessages: d }) : typeof c == "function" ? /* @__PURE__ */ i(
2444
2449
  c,
2445
2450
  {
2446
2451
  print: e,
@@ -2450,34 +2455,34 @@ const ye = {
2450
2455
  setOnComplete: o,
2451
2456
  progress: a
2452
2457
  }
2453
- ) : c ? /* @__PURE__ */ i(Ti, { print: e, localeMessages: d }) : null : null;
2454
- }, Si = {
2458
+ ) : c ? /* @__PURE__ */ i(yi, { print: e, localeMessages: d }) : null : null;
2459
+ }, Ii = {
2455
2460
  "rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
2456
- }, yi = () => {
2457
- const { goToFirstPageIcon: e } = ue();
2458
- return e || /* @__PURE__ */ i(bn, { className: Si["rp-go-to-Top"] });
2459
- }, xi = () => {
2460
- const { goToLastPageIcon: e } = ue();
2461
+ }, Li = () => {
2462
+ const { goToFirstPageIcon: e } = pe();
2463
+ return e || /* @__PURE__ */ i(bn, { className: Ii["rp-go-to-Top"] });
2464
+ }, Ri = () => {
2465
+ const { goToLastPageIcon: e } = pe();
2461
2466
  return e || /* @__PURE__ */ i(bn, {});
2462
- }, an = { width: "100%" }, Ii = () => {
2463
- const { goToPage: e, totalPages: t, focusedPage: n } = oe(), { jumpNavigationTool: o = !0 } = fe(), { localeMessages: r } = se(), a = M(() => n === 1, [n]), c = M(() => n === t, [n, t]), s = L(() => {
2467
+ }, an = { width: "100%" }, Ei = () => {
2468
+ const { goToPage: e, totalPages: t, focusedPage: n } = ie(), { jumpNavigationTool: o = !0 } = ve(), { localeMessages: r } = se(), a = M(() => n === 1, [n]), c = M(() => n === t, [n, t]), s = L(() => {
2464
2469
  e(1);
2465
2470
  }, [e]), d = L(() => {
2466
2471
  e(t);
2467
2472
  }, [e, t]);
2468
2473
  return o ? /* @__PURE__ */ A(je, { children: [
2469
- /* @__PURE__ */ i(ve, { onClick: s, children: /* @__PURE__ */ i(Z, { content: r == null ? void 0 : r.firstPageTooltip, style: an, children: /* @__PURE__ */ A("div", { className: "rp-menu-item", "aria-disabled": a, children: [
2470
- /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(yi, {}) }),
2474
+ /* @__PURE__ */ i(be, { onClick: s, children: /* @__PURE__ */ i(U, { content: r == null ? void 0 : r.firstPageTooltip, style: an, children: /* @__PURE__ */ A("div", { className: "rp-menu-item", "aria-disabled": a, children: [
2475
+ /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Li, {}) }),
2471
2476
  /* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
2472
2477
  ] }) }) }),
2473
- /* @__PURE__ */ i(ve, { onClick: d, children: /* @__PURE__ */ i(Z, { content: r == null ? void 0 : r.lastPageTooltip, style: an, children: /* @__PURE__ */ A("div", { className: "rp-menu-item", "aria-disabled": c, children: [
2474
- /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(xi, {}) }),
2478
+ /* @__PURE__ */ i(be, { onClick: d, children: /* @__PURE__ */ i(U, { content: r == null ? void 0 : r.lastPageTooltip, style: an, children: /* @__PURE__ */ A("div", { className: "rp-menu-item", "aria-disabled": c, children: [
2479
+ /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Ri, {}) }),
2475
2480
  /* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
2476
2481
  ] }) }) }),
2477
2482
  /* @__PURE__ */ i(It, {})
2478
2483
  ] }) : null;
2479
- }, Li = () => {
2480
- const { container: e } = we(), { isSmallScreen: t } = be(), {
2484
+ }, Ni = () => {
2485
+ const { container: e } = Ce(), { isSmallScreen: t } = Te(), {
2481
2486
  openFileTool: n,
2482
2487
  downloadTool: o,
2483
2488
  documentProperties: r,
@@ -2487,7 +2492,7 @@ const ye = {
2487
2492
  jumpNavigationTool: d,
2488
2493
  printTool: u,
2489
2494
  fullscreenTool: p
2490
- } = fe(), { localeMessages: f } = se();
2495
+ } = ve(), { localeMessages: f } = se();
2491
2496
  return M(() => {
2492
2497
  const g = d || c || s || a || r;
2493
2498
  let P = !1;
@@ -2501,13 +2506,13 @@ const ye = {
2501
2506
  s,
2502
2507
  d,
2503
2508
  t
2504
- ]) ? /* @__PURE__ */ A(ro, { children: [
2509
+ ]) ? /* @__PURE__ */ A(ao, { children: [
2505
2510
  /* @__PURE__ */ i(
2506
2511
  _n,
2507
2512
  {
2508
2513
  container: e,
2509
- triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(Z, { content: f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(ne, { "aria-label": f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(Vr, {}) }) }) }),
2510
- children: /* @__PURE__ */ A("div", { className: vi["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
2514
+ triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(U, { content: f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(re, { "aria-label": f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(Zr, {}) }) }) }),
2515
+ children: /* @__PURE__ */ A("div", { className: bi["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
2511
2516
  t && /* @__PURE__ */ A(je, { children: [
2512
2517
  /* @__PURE__ */ i(vn, {}),
2513
2518
  /* @__PURE__ */ i(Bn, {}),
@@ -2515,43 +2520,43 @@ const ye = {
2515
2520
  /* @__PURE__ */ i(wn, {}),
2516
2521
  /* @__PURE__ */ i(It, {})
2517
2522
  ] }),
2518
- /* @__PURE__ */ i(Ii, {}),
2519
- /* @__PURE__ */ i(io, {}),
2523
+ /* @__PURE__ */ i(Ei, {}),
2524
+ /* @__PURE__ */ i(co, {}),
2525
+ /* @__PURE__ */ i(mo, {}),
2526
+ /* @__PURE__ */ i(lo, {}),
2520
2527
  /* @__PURE__ */ i(uo, {}),
2521
- /* @__PURE__ */ i(ao, {}),
2522
- /* @__PURE__ */ i(so, {}),
2523
- /* @__PURE__ */ i(oo, {})
2528
+ /* @__PURE__ */ i(so, {})
2524
2529
  ] })
2525
2530
  }
2526
2531
  ),
2527
- /* @__PURE__ */ i(gi, {})
2532
+ /* @__PURE__ */ i(wi, {})
2528
2533
  ] }) : null;
2529
- }, Ri = () => {
2530
- const { isSmallScreen: e } = be();
2531
- return /* @__PURE__ */ A(_e, { children: [
2532
- /* @__PURE__ */ i(Gr, {}),
2533
- !e && /* @__PURE__ */ A(_e, { children: [
2534
+ }, Oi = () => {
2535
+ const { isSmallScreen: e } = Te();
2536
+ return /* @__PURE__ */ A(ge, { children: [
2537
+ /* @__PURE__ */ i(Ur, {}),
2538
+ !e && /* @__PURE__ */ A(ge, { children: [
2534
2539
  /* @__PURE__ */ i(vn, {}),
2535
2540
  /* @__PURE__ */ i(Bn, {}),
2536
2541
  /* @__PURE__ */ i(Xn, {}),
2537
2542
  /* @__PURE__ */ i(wn, {})
2538
2543
  ] }),
2539
- /* @__PURE__ */ i(Li, {})
2544
+ /* @__PURE__ */ i(Ni, {})
2540
2545
  ] });
2541
- }, Ee = {
2546
+ }, Re = {
2542
2547
  "rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
2543
2548
  "rp-current-zoom-wrapper": "_rp-current-zoom-wrapper_cocqs_6",
2544
2549
  "rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
2545
2550
  "rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
2546
2551
  "rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
2547
- }, Ei = 25, gt = 1e3, Ni = [50, 75, 100, 125, 150, 200, 300, 400], Oi = () => {
2548
- const { zoomInIcon: e } = ue();
2549
- return e || /* @__PURE__ */ i(po, {});
2550
- }, Di = () => {
2551
- const { zoomOutIcon: e } = ue();
2552
- return e || /* @__PURE__ */ i(ho, {});
2553
- }, zi = () => {
2554
- const { zoomLevel: e, setZoomLevel: t } = Qe(), { container: n, contentRef: o } = we(), { zoomTool: r = !0 } = fe(), { focusedPage: a } = oe(), { rotate: c } = Je(), { pages: s } = X(), { isSmallScreen: d } = be(), { localeMessages: u } = se(), { viewMode: p } = He(), f = L(() => {
2552
+ }, Di = 25, gt = 1e3, zi = [50, 75, 100, 125, 150, 200, 300, 400], Ai = () => {
2553
+ const { zoomInIcon: e } = pe();
2554
+ return e || /* @__PURE__ */ i(fo, {});
2555
+ }, Fi = () => {
2556
+ const { zoomOutIcon: e } = pe();
2557
+ return e || /* @__PURE__ */ i(go, {});
2558
+ }, ki = () => {
2559
+ const { zoomLevel: e, setZoomLevel: t } = Qe(), { container: n, contentRef: o } = Ce(), { zoomTool: r = !0 } = ve(), { focusedPage: a } = ie(), { rotate: c } = Je(), { pages: s } = X(), { isSmallScreen: d } = Te(), { localeMessages: u } = se(), { viewMode: p } = He(), f = L(() => {
2555
2560
  t((m) => {
2556
2561
  const w = Math.floor(m / 25) * 25;
2557
2562
  return Math.min(w + 25, gt);
@@ -2561,12 +2566,12 @@ const ye = {
2561
2566
  const w = Math.ceil(m / 25) * 25;
2562
2567
  return Math.min(w - 25, gt);
2563
2568
  });
2564
- }, [t]), g = M(() => e === Ei, [e]), P = M(() => e === gt, [e]), b = M(() => {
2569
+ }, [t]), g = M(() => e === Di, [e]), P = M(() => e === gt, [e]), b = M(() => {
2565
2570
  var m;
2566
2571
  return (m = s.get(a)) == null ? void 0 : m.page.getViewport({ scale: 1, rotation: c });
2567
2572
  }, [s, a, c]), v = L(
2568
2573
  (m) => {
2569
- const w = ((b == null ? void 0 : b.width) || 0) + 2 * $t, C = ((b == null ? void 0 : b.height) || 0) + 2 * $t, l = (o == null ? void 0 : o.clientWidth) || 0, T = (o == null ? void 0 : o.clientHeight) || 0, _ = mo(
2574
+ const w = ((b == null ? void 0 : b.width) || 0) + 2 * $t, C = ((b == null ? void 0 : b.height) || 0) + 2 * $t, l = (o == null ? void 0 : o.clientWidth) || 0, T = (o == null ? void 0 : o.clientHeight) || 0, _ = vo(
2570
2575
  m,
2571
2576
  l,
2572
2577
  T,
@@ -2583,55 +2588,55 @@ const ye = {
2583
2588
  },
2584
2589
  [t, v]
2585
2590
  );
2586
- return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: e, setZoomLevel: t }) : r ? /* @__PURE__ */ A("div", { className: Ee["rp-zoom-wrapper"], children: [
2587
- /* @__PURE__ */ i(Z, { content: u == null ? void 0 : u.zoomOutTooltip, children: /* @__PURE__ */ i(
2588
- ne,
2591
+ return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: e, setZoomLevel: t }) : r ? /* @__PURE__ */ A("div", { className: Re["rp-zoom-wrapper"], children: [
2592
+ /* @__PURE__ */ i(U, { content: u == null ? void 0 : u.zoomOutTooltip, children: /* @__PURE__ */ i(
2593
+ re,
2589
2594
  {
2590
2595
  disabled: g,
2591
2596
  onClick: h,
2592
2597
  "aria-label": u == null ? void 0 : u.zoomOutTooltip,
2593
- children: /* @__PURE__ */ i(Di, {})
2598
+ children: /* @__PURE__ */ i(Fi, {})
2594
2599
  }
2595
2600
  ) }),
2596
2601
  !d && /* @__PURE__ */ i(
2597
2602
  _n,
2598
2603
  {
2599
2604
  container: n,
2600
- triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(Z, { content: u == null ? void 0 : u.zoomSelectTooltip, children: /* @__PURE__ */ A(
2601
- ne,
2605
+ triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(U, { content: u == null ? void 0 : u.zoomSelectTooltip, children: /* @__PURE__ */ A(
2606
+ re,
2602
2607
  {
2603
- className: Ee["rp-current-zoom-wrapper"],
2608
+ className: Re["rp-current-zoom-wrapper"],
2604
2609
  "aria-label": u == null ? void 0 : u.zoomSelectTooltip,
2605
2610
  children: [
2606
- /* @__PURE__ */ i("span", { className: Ee["rp-current-zoom-text"], children: e }),
2607
- /* @__PURE__ */ i("span", { className: Ee["rp-current-zoom-text"], children: "%" }),
2608
- /* @__PURE__ */ i(Me, { className: Ee["rp-current-zoom-icon"] })
2611
+ /* @__PURE__ */ i("span", { className: Re["rp-current-zoom-text"], children: e }),
2612
+ /* @__PURE__ */ i("span", { className: Re["rp-current-zoom-text"], children: "%" }),
2613
+ /* @__PURE__ */ i(Me, { className: Re["rp-current-zoom-icon"] })
2609
2614
  ]
2610
2615
  }
2611
2616
  ) }) }),
2612
2617
  style: { minWidth: "200px" },
2613
2618
  align: "center",
2614
- children: /* @__PURE__ */ A("div", { className: Ee["rp-zoom-dropdown-content"], children: [
2619
+ children: /* @__PURE__ */ A("div", { className: Re["rp-zoom-dropdown-content"], children: [
2615
2620
  /* @__PURE__ */ A(je, { children: [
2616
- /* @__PURE__ */ i(ve, { onClick: () => S(at.ACTUAL), children: u == null ? void 0 : u.zoomActualSize }),
2617
- /* @__PURE__ */ i(ve, { onClick: () => S(at.PAGE_FIT), children: u == null ? void 0 : u.zoomPageFit }),
2618
- /* @__PURE__ */ i(ve, { onClick: () => S(at.PAGE_WIDTH), children: u == null ? void 0 : u.zoomPageWidth })
2621
+ /* @__PURE__ */ i(be, { onClick: () => S(at.ACTUAL), children: u == null ? void 0 : u.zoomActualSize }),
2622
+ /* @__PURE__ */ i(be, { onClick: () => S(at.PAGE_FIT), children: u == null ? void 0 : u.zoomPageFit }),
2623
+ /* @__PURE__ */ i(be, { onClick: () => S(at.PAGE_WIDTH), children: u == null ? void 0 : u.zoomPageWidth })
2619
2624
  ] }),
2620
2625
  /* @__PURE__ */ i(It, {}),
2621
- /* @__PURE__ */ i(je, { children: Ni.map((m) => /* @__PURE__ */ A(ve, { onClick: () => S(m), children: [
2626
+ /* @__PURE__ */ i(je, { children: zi.map((m) => /* @__PURE__ */ A(be, { onClick: () => S(m), children: [
2622
2627
  m,
2623
2628
  " %"
2624
2629
  ] }, m)) })
2625
2630
  ] })
2626
2631
  }
2627
2632
  ),
2628
- /* @__PURE__ */ i(Z, { content: u == null ? void 0 : u.zoomInTooltip, children: /* @__PURE__ */ i(
2629
- ne,
2633
+ /* @__PURE__ */ i(U, { content: u == null ? void 0 : u.zoomInTooltip, children: /* @__PURE__ */ i(
2634
+ re,
2630
2635
  {
2631
2636
  disabled: P,
2632
2637
  onClick: f,
2633
2638
  "aria-label": u == null ? void 0 : u.zoomInTooltip,
2634
- children: /* @__PURE__ */ i(Oi, {})
2639
+ children: /* @__PURE__ */ i(Ai, {})
2635
2640
  }
2636
2641
  ) })
2637
2642
  ] }) : null;
@@ -2641,15 +2646,15 @@ const ye = {
2641
2646
  nextMatch: t,
2642
2647
  prevMatch: n
2643
2648
  } = Lt(), { localeMessages: o } = se();
2644
- return /* @__PURE__ */ A(_e, { children: [
2645
- /* @__PURE__ */ i(Z, { content: o == null ? void 0 : o.searchPrevTooltip, className: K["rp-search-tool-result-navigator"], children: /* @__PURE__ */ i(ne, { onClick: n, "aria-label": o == null ? void 0 : o.searchPrevTooltip, children: /* @__PURE__ */ i(
2649
+ return /* @__PURE__ */ A(ge, { children: [
2650
+ /* @__PURE__ */ i(U, { content: o == null ? void 0 : o.searchPrevTooltip, className: K["rp-search-tool-result-navigator"], children: /* @__PURE__ */ i(re, { onClick: n, "aria-label": o == null ? void 0 : o.searchPrevTooltip, children: /* @__PURE__ */ i(
2646
2651
  Me,
2647
2652
  {
2648
2653
  className: K["rp-search-tool-input-icon"],
2649
2654
  "aria-disabled": !e
2650
2655
  }
2651
2656
  ) }) }),
2652
- /* @__PURE__ */ i(Z, { content: o == null ? void 0 : o.searchNextTooltip, className: K["rp-search-tool-result-navigator"], children: /* @__PURE__ */ i(ne, { onClick: t, "aria-label": o == null ? void 0 : o.searchNextTooltip, children: /* @__PURE__ */ i(
2657
+ /* @__PURE__ */ i(U, { content: o == null ? void 0 : o.searchNextTooltip, className: K["rp-search-tool-result-navigator"], children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": o == null ? void 0 : o.searchNextTooltip, children: /* @__PURE__ */ i(
2653
2658
  Me,
2654
2659
  {
2655
2660
  style: { transform: "rotate(180deg" },
@@ -2659,10 +2664,10 @@ const ye = {
2659
2664
  ) }) })
2660
2665
  ] });
2661
2666
  }, cn = () => {
2662
- const { searchIcon: e } = ue();
2663
- return e || /* @__PURE__ */ i(fo, {});
2664
- }, Ai = () => {
2665
- const { container: e } = we(), [t, n] = H(!1), { pdf: o } = X(), [r, a] = H(null), {
2667
+ const { searchIcon: e } = pe();
2668
+ return e || /* @__PURE__ */ i(_o, {});
2669
+ }, Mi = () => {
2670
+ const { container: e } = Ce(), [t, n] = $(!1), { pdf: o } = X(), [r, a] = $(null), {
2666
2671
  searchOptions: c,
2667
2672
  setSearchOptions: s,
2668
2673
  loading: d,
@@ -2672,13 +2677,13 @@ const ye = {
2672
2677
  nextMatch: h,
2673
2678
  prevMatch: g,
2674
2679
  search: P
2675
- } = Lt(), { searchTool: b = !0 } = fe(), [v, S] = H(P), { localeMessages: m } = se(), { isSmallScreen: w } = be(), C = L(() => {
2680
+ } = Lt(), { searchTool: b = !0 } = ve(), [v, S] = $(P), { localeMessages: m } = se(), { isSmallScreen: w } = Te(), C = L(() => {
2676
2681
  n(!0);
2677
2682
  }, []), l = L(() => {
2678
2683
  u(""), S(""), n(!1);
2679
2684
  }, [u]), T = (x) => {
2680
- const k = x.key === "Enter", $ = x.key === " ";
2681
- (k || $) && l();
2685
+ const D = x.key === "Enter", H = x.key === " ";
2686
+ (D || H) && l();
2682
2687
  }, _ = L(
2683
2688
  (x) => {
2684
2689
  x.key === "Escape" && t && l();
@@ -2690,38 +2695,38 @@ const ye = {
2690
2695
  },
2691
2696
  [v, g, h, u, P]
2692
2697
  );
2693
- F(() => (window.addEventListener("keydown", _), () => {
2698
+ k(() => (window.addEventListener("keydown", _), () => {
2694
2699
  window.removeEventListener("keydown", _);
2695
- }), [_]), F(() => {
2700
+ }), [_]), k(() => {
2696
2701
  r && r.focus();
2697
2702
  }, [r]);
2698
2703
  const E = L((x) => {
2699
2704
  S(x.target.value);
2700
2705
  }, []), I = L(() => {
2701
2706
  S(""), u("");
2702
- }, [u]), N = M(() => `${f} / ${p}`, [f, p]), { wholeWords: R, matchCase: z } = M(() => c, [c]), O = L(
2707
+ }, [u]), O = M(() => `${f} / ${p}`, [f, p]), { wholeWords: R, matchCase: F } = M(() => c, [c]), z = L(
2703
2708
  (x) => {
2704
- s((k) => ({ ...k, matchCase: x }));
2709
+ s((D) => ({ ...D, matchCase: x }));
2705
2710
  },
2706
2711
  [s]
2707
- ), D = L(
2712
+ ), N = L(
2708
2713
  (x) => {
2709
- s((k) => ({ ...k, wholeWords: x }));
2714
+ s((D) => ({ ...D, wholeWords: x }));
2710
2715
  },
2711
2716
  [s]
2712
2717
  );
2713
- return F(() => {
2718
+ return k(() => {
2714
2719
  l();
2715
- }, [o, l]), b ? /* @__PURE__ */ i(_e, { children: /* @__PURE__ */ i(
2716
- Ar,
2720
+ }, [o, l]), b ? /* @__PURE__ */ i(ge, { children: /* @__PURE__ */ i(
2721
+ kr,
2717
2722
  {
2718
2723
  open: t,
2719
2724
  container: e,
2720
- triggerComponent: /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(ne, { onClick: C, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(cn, {}) }) }),
2725
+ triggerComponent: /* @__PURE__ */ i(U, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(re, { onClick: C, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(cn, {}) }) }),
2721
2726
  children: /* @__PURE__ */ A("div", { className: K["rp-search-tool-content"], children: [
2722
2727
  /* @__PURE__ */ A("div", { className: K["rp-search-tool-input-wrapper"], children: [
2723
2728
  /* @__PURE__ */ A("div", { className: K["rp-search-tool-input"], children: [
2724
- /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchInputTooltip, children: /* @__PURE__ */ i(
2729
+ /* @__PURE__ */ i(U, { content: m == null ? void 0 : m.searchInputTooltip, children: /* @__PURE__ */ i(
2725
2730
  un,
2726
2731
  {
2727
2732
  value: v,
@@ -2731,18 +2736,18 @@ const ye = {
2731
2736
  placeholder: m == null ? void 0 : m.searchInputPlaceholder,
2732
2737
  className: K["rp-search-input"],
2733
2738
  ref: a,
2734
- children: !!v && /* @__PURE__ */ i("span", { className: K["rp-search-tool-input-clear"], onClick: I, children: /* @__PURE__ */ i(go, {}) })
2739
+ children: !!v && /* @__PURE__ */ i("span", { className: K["rp-search-tool-input-clear"], onClick: I, children: /* @__PURE__ */ i(wo, {}) })
2735
2740
  }
2736
2741
  ) }),
2737
- d ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Pt, { className: K["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: N }),
2742
+ d ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Pt, { className: K["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: O }),
2738
2743
  w && /* @__PURE__ */ i("div", { className: K["rp-search-tool-controls"], children: /* @__PURE__ */ i(Gt, { onKeyPress: T, handleClose: l }) })
2739
2744
  ] }),
2740
2745
  /* @__PURE__ */ A("div", { className: K["rp-search-tool-input-checkboxes"], children: [
2741
2746
  w && /* @__PURE__ */ i(sn, {}),
2742
- /* @__PURE__ */ i(Vt, { name: "matchCase", value: z, onChange: O, children: m == null ? void 0 : m.searchMatchCaseLabel }),
2743
- !w && /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: K["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Ut, {}) }) }),
2744
- /* @__PURE__ */ i(Vt, { name: "wholeWord", value: R, onChange: D, children: m == null ? void 0 : m.searchWholeWordsLabel }),
2745
- !w && /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: K["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Ut, {}) }) })
2747
+ /* @__PURE__ */ i(Vt, { name: "matchCase", value: F, onChange: z, children: m == null ? void 0 : m.searchMatchCaseLabel }),
2748
+ !w && /* @__PURE__ */ i(U, { content: m == null ? void 0 : m.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: K["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(qt, {}) }) }),
2749
+ /* @__PURE__ */ i(Vt, { name: "wholeWord", value: R, onChange: N, children: m == null ? void 0 : m.searchWholeWordsLabel }),
2750
+ !w && /* @__PURE__ */ i(U, { content: m == null ? void 0 : m.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: K["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(qt, {}) }) })
2746
2751
  ] })
2747
2752
  ] }),
2748
2753
  !w && /* @__PURE__ */ A("div", { className: K["rp-search-tool-controls"], children: [
@@ -2752,42 +2757,42 @@ const ye = {
2752
2757
  ] })
2753
2758
  }
2754
2759
  ) }) : null;
2755
- }, Fi = "_loading_vpexk_1", Ne = {
2760
+ }, Wi = "_loading_vpexk_1", Ee = {
2756
2761
  "rp-loading-overlay": "_rp-loading-overlay_vpexk_1",
2757
2762
  "rp-loading-modal": "_rp-loading-modal_vpexk_14",
2758
2763
  "rp-loading-title": "_rp-loading-title_vpexk_27",
2759
2764
  "rp-loading-progress-bar": "_rp-loading-progress-bar_vpexk_35",
2760
2765
  "rp-loading-progress": "_rp-loading-progress_vpexk_35",
2761
2766
  "rp-loading-cancel-button": "_rp-loading-cancel-button_vpexk_55",
2762
- loading: Fi
2763
- }, ki = ({ percentage: e }) => {
2767
+ loading: Wi
2768
+ }, Hi = ({ percentage: e }) => {
2764
2769
  const { cancel: t } = nt(), { localeMessages: n } = se();
2765
- return e < 1 ? null : /* @__PURE__ */ i("div", { className: te(Ne["rp-loading-overlay"]), children: /* @__PURE__ */ A("div", { className: te(Ne["rp-loading-modal"]), children: [
2766
- /* @__PURE__ */ A("div", { className: te(Ne["rp-loading-title"]), children: [
2770
+ return e < 1 ? null : /* @__PURE__ */ i("div", { className: ne(Ee["rp-loading-overlay"]), children: /* @__PURE__ */ A("div", { className: ne(Ee["rp-loading-modal"]), children: [
2771
+ /* @__PURE__ */ A("div", { className: ne(Ee["rp-loading-title"]), children: [
2767
2772
  n == null ? void 0 : n.printLoadingMessage,
2768
2773
  "..."
2769
2774
  ] }),
2770
- /* @__PURE__ */ i("div", { className: te(Ne["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
2775
+ /* @__PURE__ */ i("div", { className: ne(Ee["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
2771
2776
  "div",
2772
2777
  {
2773
- className: te(Ne["rp-loading-progress"]),
2778
+ className: ne(Ee["rp-loading-progress"]),
2774
2779
  style: { width: `${e}%` }
2775
2780
  }
2776
2781
  ) }),
2777
- /* @__PURE__ */ i("button", { className: te(Ne["rp-loading-cancel-button"]), onClick: t, children: n == null ? void 0 : n.printCancelLabel })
2782
+ /* @__PURE__ */ i("button", { className: ne(Ee["rp-loading-cancel-button"]), onClick: t, children: n == null ? void 0 : n.printCancelLabel })
2778
2783
  ] }) });
2779
- }, Mi = We((e, t) => {
2780
- const { showPrintProgress: n } = fe(), { progress: o } = nt(), { isSmallScreen: r } = be(), { percentage: a } = o || {}, c = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
2784
+ }, $i = We((e, t) => {
2785
+ const { showPrintProgress: n } = ve(), { progress: o } = nt(), { isSmallScreen: r } = Te(), { percentage: a } = o || {}, c = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
2781
2786
  return /* @__PURE__ */ A("div", { children: [
2782
2787
  /* @__PURE__ */ i("div", { "data-rp": "topBar", ref: t, className: Ae["rp-toolbar-content"], children: /* @__PURE__ */ A("div", { className: Ae["rp-toolbar-wrapper"], style: c(), children: [
2783
2788
  /* @__PURE__ */ A("div", { "data-rp": "topBarLeft", className: Ae["rp-toolbar-start"], children: [
2784
- /* @__PURE__ */ i(Ai, {}),
2785
- /* @__PURE__ */ i(Qo, {})
2789
+ /* @__PURE__ */ i(Mi, {}),
2790
+ /* @__PURE__ */ i(ni, {})
2786
2791
  ] }),
2787
- /* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: Ae["rp-toolbar-middle"], children: /* @__PURE__ */ i(zi, {}) }),
2788
- /* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: Ae["rp-toolbar-end"], children: /* @__PURE__ */ i(Ri, {}) })
2792
+ /* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: Ae["rp-toolbar-middle"], children: /* @__PURE__ */ i(ki, {}) }),
2793
+ /* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: Ae["rp-toolbar-end"], children: /* @__PURE__ */ i(Oi, {}) })
2789
2794
  ] }) }),
2790
- n && a ? /* @__PURE__ */ i(ki, { percentage: a }) : null
2795
+ n && a ? /* @__PURE__ */ i(Hi, { percentage: a }) : null
2791
2796
  ] });
2792
2797
  }), vt = {
2793
2798
  "rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1sdl6_1",
@@ -2800,8 +2805,8 @@ const ye = {
2800
2805
  "rp-thumbnail": "_rp-thumbnail_3fenb_1",
2801
2806
  "rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
2802
2807
  "rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
2803
- }, Wi = (e) => {
2804
- const { thumbnailSrc: t, pageNumber: n, isFocused: o, viewport: r } = e, { goToPage: a } = oe(), c = M(() => o ? Fe["rp-thumbnail-active"] : "", [o]), s = M(() => ({
2808
+ }, Gi = (e) => {
2809
+ const { thumbnailSrc: t, pageNumber: n, isFocused: o, viewport: r } = e, { goToPage: a } = ie(), c = M(() => o ? Fe["rp-thumbnail-active"] : "", [o]), s = M(() => ({
2805
2810
  width: Math.round(r.width),
2806
2811
  height: Math.round(r.height)
2807
2812
  }), [r]), d = L(() => {
@@ -2814,7 +2819,7 @@ const ye = {
2814
2819
  id: `page-${n}`,
2815
2820
  className: Fe["rp-thumbnail-wrapper"],
2816
2821
  children: [
2817
- /* @__PURE__ */ i("div", { className: te(c, Fe["rp-thumbnail"]), children: t ? /* @__PURE__ */ i(
2822
+ /* @__PURE__ */ i("div", { className: ne(c, Fe["rp-thumbnail"]), children: t ? /* @__PURE__ */ i(
2818
2823
  "img",
2819
2824
  {
2820
2825
  src: t,
@@ -2840,22 +2845,22 @@ const ye = {
2840
2845
  }, ln = {
2841
2846
  "rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
2842
2847
  "rp-thumbnails": "_rp-thumbnails_16vqr_1"
2843
- }, Hi = 16, $i = (e, t) => {
2848
+ }, Vi = 16, qi = (e, t) => {
2844
2849
  const n = e == null ? void 0 : e.querySelector(`#page-${t}`);
2845
- e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) - Hi);
2846
- }, Gi = We((e, t) => {
2847
- const { show: n } = e, { focusedPage: o, totalPages: r } = oe(), { thumbnailPages: a, addPage: c, thumbnailLength: s, addToPage: d } = yn(), u = W(null), p = W(1);
2850
+ e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) - Vi);
2851
+ }, Ui = We((e, t) => {
2852
+ const { show: n } = e, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: c, thumbnailLength: s, addToPage: d } = yn(), u = W(null), p = W(1);
2848
2853
  dn(t, () => u.current);
2849
2854
  const f = M(() => Object.values(a), [a]), h = L(() => {
2850
2855
  const g = s + 1;
2851
2856
  g <= r && c(g);
2852
2857
  }, [c, r, s]);
2853
- return F(() => {
2854
- o > s ? d(o) : n && p.current !== o && ($i(u.current, o), p.current = o);
2855
- }, [o, s, d, n, f]), wr(u.current, h), /* @__PURE__ */ i("div", { ref: u, className: ln["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: ln["rp-thumbnails"], children: n ? f.map((g, P) => {
2858
+ return k(() => {
2859
+ o > s ? d(o) : n && p.current !== o && (qi(u.current, o), p.current = o);
2860
+ }, [o, s, d, n, f]), Cr(u.current, h), /* @__PURE__ */ i("div", { ref: u, className: ln["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: ln["rp-thumbnails"], children: n ? f.map((g, P) => {
2856
2861
  var b, v;
2857
2862
  return /* @__PURE__ */ i(
2858
- Wi,
2863
+ Gi,
2859
2864
  {
2860
2865
  isFocused: o === ((b = g.page) == null ? void 0 : b.pageNumber),
2861
2866
  pageNumber: (v = g.page) == null ? void 0 : v.pageNumber,
@@ -2866,22 +2871,22 @@ const ye = {
2866
2871
  P
2867
2872
  );
2868
2873
  }) : null }) });
2869
- }), Vi = () => {
2870
- const { thumbnailIcon: e } = ue();
2871
- return e || /* @__PURE__ */ i(_r, {});
2872
- }, Ui = () => {
2873
- const { active: e, setActive: t } = yn(), [n, o] = H(200), r = W(null), { thumbnailTool: a, sidebarEnable: c } = fe(), { localeMessages: s } = se(), d = L(() => {
2874
+ }), Zi = () => {
2875
+ const { thumbnailIcon: e } = pe();
2876
+ return e || /* @__PURE__ */ i(br, {});
2877
+ }, Bi = () => {
2878
+ const { active: e, setActive: t } = yn(), [n, o] = $(200), r = W(null), { thumbnailTool: a, sidebarEnable: c } = ve(), { localeMessages: s } = se(), d = L(() => {
2874
2879
  t((p) => !p);
2875
- }, []), u = M(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: d, active: e }) : a ? /* @__PURE__ */ i(Z, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
2876
- ne,
2880
+ }, []), u = M(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: d, active: e }) : a ? /* @__PURE__ */ i(U, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
2881
+ re,
2877
2882
  {
2878
2883
  onClick: d,
2879
2884
  active: e,
2880
2885
  "aria-label": s == null ? void 0 : s.thumbnailTooltip,
2881
- children: /* @__PURE__ */ i(Vi, {})
2886
+ children: /* @__PURE__ */ i(Zi, {})
2882
2887
  }
2883
2888
  ) }) : null, [a, e, d, s]);
2884
- return /* @__PURE__ */ i(_e, { children: c && /* @__PURE__ */ A(
2889
+ return /* @__PURE__ */ i(ge, { children: c && /* @__PURE__ */ A(
2885
2890
  "div",
2886
2891
  {
2887
2892
  style: { "--rp-thumbnail-width": `${n}px` },
@@ -2896,33 +2901,33 @@ const ye = {
2896
2901
  hidden: !e,
2897
2902
  className: vt["rp-thumbnails-wrapper"],
2898
2903
  children: [
2899
- /* @__PURE__ */ i(Gi, { show: e, ref: r }),
2900
- /* @__PURE__ */ i(br, { onWidthChange: o, thumbnailRef: r })
2904
+ /* @__PURE__ */ i(Ui, { show: e, ref: r }),
2905
+ /* @__PURE__ */ i(Tr, { onWidthChange: o, thumbnailRef: r })
2901
2906
  ]
2902
2907
  }
2903
2908
  )
2904
2909
  ]
2905
2910
  }
2906
2911
  ) });
2907
- }, ge = {
2908
- "rp-layout": "_rp-layout_vutcr_1",
2909
- "rp-content": "_rp-content_vutcr_5",
2910
- "rp-pages": "_rp-pages_vutcr_11",
2911
- "rp-container": "_rp-container_vutcr_16",
2912
- "rp-loader": "_rp-loader_vutcr_52",
2913
- "rp-theme-variables": "_rp-theme-variables_vutcr_56",
2914
- "rp-dark-mode": "_rp-dark-mode_vutcr_151"
2915
- }, qi = We(
2912
+ }, we = {
2913
+ "rp-layout": "_rp-layout_bfglg_1",
2914
+ "rp-content": "_rp-content_bfglg_5",
2915
+ "rp-pages": "_rp-pages_bfglg_11",
2916
+ "rp-container": "_rp-container_bfglg_16",
2917
+ "rp-loader": "_rp-loader_bfglg_52",
2918
+ "rp-theme-variables": "_rp-theme-variables_bfglg_56",
2919
+ "rp-dark-mode": "_rp-dark-mode_bfglg_161"
2920
+ }, ji = We(
2916
2921
  (e, t) => {
2917
- const { children: n, toolbarRef: o, style: r, className: a } = e, { customVariables: c, customDarkVariables: s } = Ir(), { darkMode: d } = or();
2922
+ const { children: n, toolbarRef: o, style: r, className: a } = e, { customVariables: c, customDarkVariables: s } = Rr(), { darkMode: d } = ar();
2918
2923
  return /* @__PURE__ */ i(
2919
2924
  "div",
2920
2925
  {
2921
2926
  ref: t,
2922
- className: te(
2923
- ge["rp-theme-variables"],
2924
- ge["rp-container"],
2925
- d ? ge["rp-dark-mode"] : "",
2927
+ className: ne(
2928
+ we["rp-theme-variables"],
2929
+ we["rp-container"],
2930
+ d ? we["rp-dark-mode"] : "",
2926
2931
  a
2927
2932
  ),
2928
2933
  style: {
@@ -2935,7 +2940,7 @@ const ye = {
2935
2940
  }
2936
2941
  );
2937
2942
  }
2938
- ), zs = We((e, t) => {
2943
+ ), Ws = We((e, t) => {
2939
2944
  const {
2940
2945
  children: n,
2941
2946
  slots: o,
@@ -2946,24 +2951,24 @@ const ye = {
2946
2951
  onLoaded: d,
2947
2952
  cleanupOnLoaded: u,
2948
2953
  onLayoutWidthChange: p
2949
- } = e, [f, h] = H(null), { setContainer: g, setContentRef: P } = we(), { loading: b } = X(), { LoaderImageComponent: v } = gn();
2950
- return F(() => (d && d(), () => {
2954
+ } = e, [f, h] = $(null), { setContainer: g, setContentRef: P } = Ce(), { loading: b } = X(), { LoaderImageComponent: v } = gn();
2955
+ return k(() => (d && d(), () => {
2951
2956
  u && u();
2952
- }), [d, u]), /* @__PURE__ */ i(qi, { toolbarRef: f, ref: t, children: /* @__PURE__ */ i(xr, { mobileWidth: s, onLayoutWidthChange: p, children: /* @__PURE__ */ i(Cr, { slots: o, children: /* @__PURE__ */ i(Tr, { icons: r, children: /* @__PURE__ */ A(Pr, { getContainerRef: g, style: a, className: c, children: [
2953
- /* @__PURE__ */ A(Sr, { children: [
2954
- /* @__PURE__ */ A("div", { className: ge["rp-layout"], children: [
2955
- /* @__PURE__ */ i(Mi, { ref: h }),
2956
- /* @__PURE__ */ A("div", { className: ge["rp-content"], children: [
2957
- /* @__PURE__ */ i("div", { className: ge["rp-sidebar"], children: /* @__PURE__ */ i(Ui, {}) }),
2958
- /* @__PURE__ */ i("div", { ref: P, className: ge["rp-pages"], children: n })
2957
+ }), [d, u]), /* @__PURE__ */ i(ji, { toolbarRef: f, ref: t, children: /* @__PURE__ */ i(Lr, { mobileWidth: s, onLayoutWidthChange: p, children: /* @__PURE__ */ i(Pr, { slots: o, children: /* @__PURE__ */ i(Sr, { icons: r, children: /* @__PURE__ */ A(yr, { getContainerRef: g, style: a, className: c, children: [
2958
+ /* @__PURE__ */ A(xr, { children: [
2959
+ /* @__PURE__ */ A("div", { className: we["rp-layout"], children: [
2960
+ /* @__PURE__ */ i($i, { ref: h }),
2961
+ /* @__PURE__ */ A("div", { className: we["rp-content"], children: [
2962
+ /* @__PURE__ */ i("div", { className: we["rp-sidebar"], children: /* @__PURE__ */ i(Bi, {}) }),
2963
+ /* @__PURE__ */ i("div", { ref: P, className: we["rp-pages"], children: n })
2959
2964
  ] })
2960
2965
  ] }),
2961
- /* @__PURE__ */ i(yr, {})
2966
+ /* @__PURE__ */ i(Ir, {})
2962
2967
  ] }),
2963
2968
  b ? /* @__PURE__ */ i(
2964
2969
  "div",
2965
2970
  {
2966
- className: ge["rp-loader"],
2971
+ className: we["rp-loader"],
2967
2972
  style: {
2968
2973
  position: "absolute",
2969
2974
  top: 0,
@@ -2991,49 +2996,49 @@ const ye = {
2991
2996
  ] }) }) }) }) });
2992
2997
  });
2993
2998
  export {
2994
- Io as A,
2999
+ Eo as A,
2995
3000
  sn as B,
2996
- Co as C,
2997
- Bo as D,
2998
- Ai as E,
3001
+ So as C,
3002
+ Xo as D,
3003
+ Mi as E,
2999
3004
  Bn as F,
3000
- Mi as G,
3001
- Wi as H,
3002
- Gi as I,
3003
- Ui as J,
3004
- qi as K,
3005
- ki as L,
3006
- Ii as M,
3007
- Li as O,
3008
- Is as P,
3009
- Ns as R,
3010
- Es as S,
3011
- Rs as T,
3012
- zi as Z,
3013
- Ls as a,
3014
- zs as b,
3015
- Un as c,
3005
+ $i as G,
3006
+ Gi as H,
3007
+ Ui as I,
3008
+ Bi as J,
3009
+ ji as K,
3010
+ Hi as L,
3011
+ Ei as M,
3012
+ Ni as O,
3013
+ Os as P,
3014
+ Fs as R,
3015
+ As as S,
3016
+ zs as T,
3017
+ ki as Z,
3018
+ Ds as a,
3019
+ Ws as b,
3020
+ qn as c,
3016
3021
  nt as d,
3017
3022
  Lt as e,
3018
3023
  Cn as f,
3019
- vo as g,
3024
+ bo as g,
3020
3025
  Tn as h,
3021
- _o as i,
3026
+ Co as i,
3022
3027
  Pn as j,
3023
- wo as k,
3028
+ To as k,
3024
3029
  Sn as l,
3025
3030
  yn as m,
3026
- bo as n,
3031
+ Po as n,
3027
3032
  xn as o,
3028
- So as p,
3029
- Lo as q,
3033
+ Io as p,
3034
+ No as q,
3030
3035
  Rt as r,
3031
- Uo as s,
3032
- jo as t,
3033
- oe as u,
3034
- Ko as v,
3035
- Qo as w,
3036
- gi as x,
3036
+ Bo as s,
3037
+ Yo as t,
3038
+ ie as u,
3039
+ Jo as v,
3040
+ ni as w,
3041
+ wi as x,
3037
3042
  Xn as y,
3038
- Ri as z
3043
+ Oi as z
3039
3044
  };