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