@pdf-viewer/react 1.10.0-beta.2 → 1.10.0-beta.3

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 (62) hide show
  1. package/dist/{ToolbarLayout.module-2e734dc1.js → ToolbarLayout.module-8fc14845.js} +1055 -1066
  2. package/dist/assets/ToolbarLayout.css +1 -1
  3. package/dist/components/RPController.js +1 -1
  4. package/dist/components/RPPages.js +1 -1
  5. package/dist/components/layout/LayoutContainer.js +1 -1
  6. package/dist/components/layout/RPDefaultLayout.js +1 -1
  7. package/dist/components/layout/RPLayout.js +1 -1
  8. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  9. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  10. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  11. package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
  12. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  13. package/dist/components/layout/toolbar/MostPageTool.js +1 -1
  14. package/dist/components/layout/toolbar/OtherTool.js +1 -1
  15. package/dist/components/layout/toolbar/Paginate.js +1 -1
  16. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  17. package/dist/components/layout/toolbar/RPMoreOptions.js +1 -1
  18. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  19. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  20. package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
  21. package/dist/components/layout/toolbar/SearchTool.js +1 -1
  22. package/dist/components/layout/toolbar/ThumbnailTool.js +1 -1
  23. package/dist/components/layout/toolbar/ToolbarCustom.js +1 -1
  24. package/dist/components/layout/toolbar/ToolbarDefault.js +1 -1
  25. package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +1 -1
  26. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +1 -1
  27. package/dist/components/layout/toolbar/tools/InputPageTool.js +1 -1
  28. package/dist/components/layout/toolbar/tools/NextPageTool.js +1 -1
  29. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +1 -1
  30. package/dist/components/layout/toolbar/tools/PrintTool.js +1 -1
  31. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +1 -1
  32. package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +1 -1
  33. package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +1 -1
  34. package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +1 -1
  35. package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +1 -1
  36. package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +1 -1
  37. package/dist/components/page/AnnotationLayer.js +1 -1
  38. package/dist/components/page/CanvasLayer.js +1 -1
  39. package/dist/components/page/DualPage.js +1 -1
  40. package/dist/components/page/RPPage.js +1 -1
  41. package/dist/components/page/SinglePage.js +1 -1
  42. package/dist/components/page/TextHighlightLayer.js +1 -1
  43. package/dist/components/page/TextLayer.js +1 -1
  44. package/dist/components/ui/LoadingIndicator.js +1 -1
  45. package/dist/contexts/PaginationContext.js +1 -1
  46. package/dist/contexts/PrintContext.js +1 -1
  47. package/dist/contexts/RenderQueueProvider.js +1 -1
  48. package/dist/contexts/SearchContext.js +1 -1
  49. package/dist/contexts/ThumbnailsContext.js +1 -1
  50. package/dist/main.js +1 -1
  51. package/dist/types/utils/getWordPositionInPage.d.ts +5 -2
  52. package/dist/utils/getWordPositionInPage.js +21 -20
  53. package/dist/utils/hooks/useFileDownload.js +1 -1
  54. package/dist/utils/hooks/useLicense.js +1 -1
  55. package/dist/utils/hooks/usePaginate.js +1 -1
  56. package/dist/utils/hooks/usePresentPage.js +1 -1
  57. package/dist/utils/hooks/usePrint.js +1 -1
  58. package/dist/utils/hooks/useScrollToPage.js +1 -1
  59. package/dist/utils/hooks/useSearch.js +1 -1
  60. package/dist/utils/hooks/useThumbnail.js +1 -1
  61. package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
  62. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
- import { jsx as s, Fragment as he, jsxs as H } from "react/jsx-runtime";
1
+ import { jsx as a, Fragment as pe, jsxs as H } from "react/jsx-runtime";
2
2
  import * as X from "react";
3
- import { useRef as k, useEffect as A, useCallback as O, useState as $, useMemo as F, createContext as $e, useContext as qe, useImperativeHandle as on, createElement as Ve, PureComponent as oo, Component as ro, memo as rn, forwardRef as io } from "react";
3
+ import { useRef as W, useEffect as D, useCallback as E, useState as q, useMemo as M, createContext as $e, useContext as qe, useImperativeHandle as on, createElement as Ve, PureComponent as oo, Component as ro, memo as rn, forwardRef as io } from "react";
4
4
  import { ChevronUpIcon as Ze } from "./components/icons/ChevronUpIcon.js";
5
- import { UIButton as we } from "./components/ui/Button.js";
6
- import { UIInput as sn } from "./components/ui/Input.js";
7
- import { ViewMode as Re, ScrollMode as ne, AnnotationSubType as Dt, SelectionMode as so, ErrorType as ao } from "./utils/types.js";
5
+ import { UIButton as ge } from "./components/ui/Button.js";
6
+ import { UIInput as an } from "./components/ui/Input.js";
7
+ import { ViewMode as Re, ScrollMode as ne, AnnotationSubType as Dt, SelectionMode as ao, ErrorType as so } from "./utils/types.js";
8
8
  import { useScrollModeContext as Ee } from "./contexts/ScrollModeContext.js";
9
9
  import { useDocumentContext as oe } from "./contexts/RPDocumentContext.js";
10
10
  import { useDocumentPasswordContext as co } from "./contexts/DocumentPasswordContext.js";
@@ -12,18 +12,18 @@ import { useDarkModeContext as lo } from "./contexts/DarkModeContext.js";
12
12
  import "./contexts/RotationContext.js";
13
13
  import { useLayerContext as uo } from "./contexts/LayerContext.js";
14
14
  import { useZoomContext as wt } from "./contexts/ZoomContext.js";
15
- import { useViewModeContext as Me } from "./contexts/ViewModeContext.js";
15
+ import { useViewModeContext as Fe } from "./contexts/ViewModeContext.js";
16
16
  import { useVirtualScrollContext as Ye } from "./contexts/VirtualScrollContext.js";
17
- import { useVirtualGridContext as an } from "./contexts/VirtualGridContext.js";
17
+ import { useVirtualGridContext as sn } from "./contexts/VirtualGridContext.js";
18
18
  import { useSelectionModeContext as po } from "./contexts/SelectionModeContext.js";
19
19
  import { useInitialStateContext as ho } from "./contexts/InitialStateContext.js";
20
20
  import { useFullScreenContext as fo } from "./contexts/FullScreenContext.js";
21
21
  import "./contexts/FileInputContext.js";
22
22
  import "./contexts/DropFileZoneContext.js";
23
23
  import { findMatches as mo, resetDivs as go, highlightMatches as vo, isMatchEntireWord as wo } from "./utils/highlight.js";
24
- import { useLayoutContainer as be } from "./contexts/LayoutContainerContext.js";
24
+ import { useLayoutContainer as _e } from "./contexts/LayoutContainerContext.js";
25
25
  import { useDimensionPagesContext as Ge } from "./contexts/DimensionPagesContext.js";
26
- import { useLocalizationContext as fe } from "./contexts/LocalizationContext.js";
26
+ import { useLocalizationContext as he } from "./contexts/LocalizationContext.js";
27
27
  import { useHighlightContext as _o } from "./contexts/HighlightContext.js";
28
28
  import "./contexts/LicenseContext.js";
29
29
  import { useDownloadContext as bo } from "./contexts/DownloadContext.js";
@@ -35,38 +35,38 @@ import { renderPage as Co } from "./utils/renderPage.js";
35
35
  import { useGlobalCurrentPage as Po } from "./contexts/GlobalCurrentPage.js";
36
36
  import { useLoaderContext as _t } from "./contexts/LoaderContext.js";
37
37
  import { useToolComponentContext as Ne } from "./contexts/ToolComponentContext.js";
38
- import { useIconToolContext as Te } from "./contexts/IconToolContext.js";
38
+ import { useIconToolContext as be } from "./contexts/IconToolContext.js";
39
39
  import { useOtherToolContext as yo } from "./contexts/OtherToolContext.js";
40
40
  import "./components/RPConfig.js";
41
41
  import { ThumbnailIcon as xo } from "./components/icons/Thumbnail.js";
42
- import { c as ce } from "./clsx-0c6e471a.js";
42
+ import { c as se } from "./clsx-0c6e471a.js";
43
43
  import { LoaderIcon as ln } from "./components/icons/LoaderIcon.js";
44
44
  import { Container as So } from "./components/layout/Container.js";
45
45
  import { useViewportContext as Oe, ViewportProvider as Io } from "./contexts/ViewportContext.js";
46
- import { useToolbarComponentContext as Ce, ToolbarComponentProvider as Ro } from "./contexts/ToolbarComponentContext.js";
46
+ import { useToolbarComponentContext as Te, ToolbarComponentProvider as Ro } from "./contexts/ToolbarComponentContext.js";
47
47
  import { RPSplitter as Lo } from "./components/layout/sidebar/RPSplitter.js";
48
48
  import { WrapperLayout as Eo } from "./components/layout/WrapperLayout.js";
49
- import { c as _e, L as No } from "./LayoutWrapper-e99afee2.js";
49
+ import { c as we, L as No } from "./LayoutWrapper-e99afee2.js";
50
50
  import { useThemeContext as Oo } from "./contexts/ThemeContext.js";
51
51
  import { RPDropFileZone as Do } from "./components/RPDropFileZone.js";
52
52
  import { c as te, S as At } from "./SearchCloseButton-cbf182aa.js";
53
53
  import { UICheckbox as zt } from "./components/ui/Checkbox.js";
54
- import { useIconContext as Pe, IconProvider as Ao } from "./contexts/IconContext.js";
54
+ import { useIconContext as Ce, IconProvider as Ao } from "./contexts/IconContext.js";
55
55
  import Q from "./components/ui/RPTooltip.js";
56
56
  import { UIDropDown as dn } from "./components/ui/DropDown.js";
57
57
  import "./ZoomTool.module-6c5eabbb.js";
58
58
  import { MenuItem as Xe } from "./components/layout/toolbar/MenuItem.js";
59
59
  import { MenuSeparator as un } from "./components/layout/toolbar/MenuSeparator.js";
60
- import { dateFormatter as Mt } from "./utils/dateFormatter.js";
60
+ import { dateFormatter as Ft } from "./utils/dateFormatter.js";
61
61
  import { PropertyItem as zo } from "./components/layout/toolbar/PropertyItem.js";
62
62
  import "./RotateTool.module-03987eba.js";
63
63
  import { withRef as et } from "./utils/withRef.js";
64
- import { useInfiniteScroll as Mo } from "./utils/hooks/useInfiniteScroll.js";
65
- import { THUMBNAIL_MIN_WIDTH as Fo } from "./utils/constants.js";
64
+ import { useInfiniteScroll as Fo } from "./utils/hooks/useInfiniteScroll.js";
65
+ import { THUMBNAIL_MIN_WIDTH as Mo } from "./utils/constants.js";
66
66
  import * as ko from "pdfjs-dist";
67
67
  import { PixelsPerInch as Wo, AnnotationMode as Ho, RenderingCancelledException as $o, AnnotationLayer as qo } from "pdfjs-dist";
68
68
  import { SimpleLinkService as Go } from "./utils/link_service.js";
69
- import { annotationsEvents as Uo, annotationEventsHandler as Vo, handleClick as Ft, handleAnnotationWidget as Bo, handleAnnotationLink as jo, bindLayerEvents as Ko, unbindLayerEvents as kt } from "./utils/annotations.js";
69
+ import { annotationsEvents as Uo, annotationEventsHandler as Vo, handleClick as Mt, handleAnnotationWidget as Bo, handleAnnotationLink as jo, bindLayerEvents as Ko, unbindLayerEvents as kt } from "./utils/annotations.js";
70
70
  import { normalizeSingleKeyword as Zo, sortHighlightPosition as Xo, unwrap as Qo } from "./components/page/searchHighlight.js";
71
71
  import { CustomElement as Yo } from "./components/page/CustomElement.js";
72
72
  import { getGridDimension as bt, getPositionFromPage as Jo, getPageFromPosition as er } from "./utils/calculatePage.js";
@@ -77,14 +77,14 @@ import { useDebounce as Tt } from "./utils/hooks/useDebounce.js";
77
77
  import rr from "./components/ui/PasswordModal.js";
78
78
  import { getScrollDistance as ze } from "./utils/getScrollDistance.js";
79
79
  import { getWordPositionInPage as ir } from "./utils/getWordPositionInPage.js";
80
- import { getThumbnailViewport as sr } from "./utils/getThumbnailViewport.js";
80
+ import { getThumbnailViewport as ar } from "./utils/getThumbnailViewport.js";
81
81
  import { smoothScrollTo as it } from "./utils/smoothScrollTo.js";
82
- import { appConsole as ar } from "./utils/appConsole.js";
82
+ import { appConsole as sr } from "./utils/appConsole.js";
83
83
  import { FileUploadTool as pn } from "./components/layout/toolbar/FileUploadTool.js";
84
84
  import { DarkModeTool as cr } from "./components/layout/toolbar/DarkModeTool.js";
85
85
  import { ThreeDotIcon as lr } from "./components/icons/ThreeDotIcon.js";
86
86
  import { c as dr, u as Ct, P as Ue, b as He, d as Pt, i as ur, k as pr, a as hr } from "./index-48ca3f30.js";
87
- import { D as fr, d as st } from "./floating-ui.react-dom-88a86594.js";
87
+ import { D as fr, d as at } from "./floating-ui.react-dom-88a86594.js";
88
88
  import { a as mr, h as gr, u as vr, F as wr, b as _r, G as hn } from "./index-4ba3ab9a.js";
89
89
  import { CloseIcon as br } from "./components/icons/CloseIcon.js";
90
90
  import { DocumentProperties as Tr } from "./components/layout/toolbar/DocumentProperties.js";
@@ -101,13 +101,13 @@ import { SearchIcon as gn } from "./components/icons/SearchIcon.js";
101
101
  import { ClearIcon as Lr } from "./components/icons/ClearIcon.js";
102
102
  import { InfoIcon as Wt } from "./components/icons/InfoIcon.js";
103
103
  import './assets/ToolbarLayout.css';const vn = () => {
104
- const { viewMode: t } = Me(), { scrollMode: e } = Ee(), { virtualScrollRef: n, virtualScrollableElementRef: r, pageScrollElementRef: o } = Ye(), { setFocusedPage: i } = de(), c = k(), { columnCount: l } = an(), { widths: d, heights: f } = Ge(), m = k(e), P = k(t), p = k(l), { targetScrollPage: T } = cn();
105
- A(() => {
104
+ const { viewMode: t } = Fe(), { scrollMode: e } = Ee(), { virtualScrollRef: n, virtualScrollableElementRef: r, pageScrollElementRef: o } = Ye(), { setFocusedPage: i } = le(), c = W(), { columnCount: l } = sn(), { widths: d, heights: f } = Ge(), m = W(e), P = W(t), h = W(l), { targetScrollPage: T } = cn();
105
+ D(() => {
106
106
  n != null && n.scrollToItem && (c.current = n);
107
- }, [n]), A(() => {
107
+ }, [n]), D(() => {
108
108
  m.current = e, P.current = t;
109
109
  }, [e, t]);
110
- const C = O(
110
+ const C = E(
111
111
  (v, y) => {
112
112
  if (!o)
113
113
  return;
@@ -118,29 +118,29 @@ import './assets/ToolbarLayout.css';const vn = () => {
118
118
  top: 0
119
119
  };
120
120
  return new Promise(
121
- (a) => it(o, u, a)
121
+ (s) => it(o, u, s)
122
122
  );
123
123
  }
124
- const h = {
124
+ const p = {
125
125
  left: 0,
126
126
  top: 0
127
127
  };
128
128
  return o == null ? void 0 : o.scrollTo({
129
- ...h,
129
+ ...p,
130
130
  behavior: y
131
131
  });
132
132
  },
133
133
  [o, d, it]
134
134
  );
135
- return A(() => {
135
+ return D(() => {
136
136
  m.current = e, P.current = t;
137
- }, [e, t]), A(() => {
138
- p.current = l;
139
- }, [l]), { scrollToPage: O(
137
+ }, [e, t]), D(() => {
138
+ h.current = l;
139
+ }, [l]), { scrollToPage: E(
140
140
  (v, y = "smooth") => {
141
141
  i(v);
142
142
  const g = v - 1;
143
- let h = g, u = 0;
143
+ let p = g, u = 0;
144
144
  if (P.current === Re.DUAL_PAGE && m.current === ne.PAGE_SCROLLING) {
145
145
  C(v, y);
146
146
  return;
@@ -151,39 +151,39 @@ import './assets/ToolbarLayout.css';const vn = () => {
151
151
  }
152
152
  if (!c.current || !r)
153
153
  return;
154
- const a = r;
154
+ const s = r;
155
155
  y === "smooth" && (T.current = v);
156
- const { columnsWidth: w, rowsHeight: _ } = bt(
156
+ const { columnsWidth: _, rowsHeight: w } = bt(
157
157
  { widths: d, heights: f },
158
158
  l
159
159
  );
160
160
  if (m.current === ne.HORIZONTAL_SCROLLING) {
161
161
  u = g;
162
162
  const S = {
163
- left: ze(w, u),
163
+ left: ze(_, u),
164
164
  top: 0
165
165
  };
166
- return a.scrollTo({
166
+ return s.scrollTo({
167
167
  ...S,
168
168
  behavior: y
169
169
  });
170
170
  }
171
171
  if (P.current === Re.DUAL_PAGE) {
172
- u = g % 2, h = Math.floor(g / 2);
172
+ u = g % 2, p = Math.floor(g / 2);
173
173
  const S = {
174
- left: ze(w, u),
175
- top: ze(_, h)
174
+ left: ze(_, u),
175
+ top: ze(w, p)
176
176
  };
177
- return a.scrollTo({
177
+ return s.scrollTo({
178
178
  ...S,
179
179
  behavior: y
180
180
  });
181
181
  }
182
182
  const x = {
183
183
  left: 0,
184
- top: ze(_, h)
184
+ top: ze(w, p)
185
185
  };
186
- return a.scrollTo({
186
+ return s.scrollTo({
187
187
  ...x,
188
188
  behavior: y
189
189
  });
@@ -199,34 +199,34 @@ import './assets/ToolbarLayout.css';const vn = () => {
199
199
  ]
200
200
  ) };
201
201
  }, Er = (t = 1) => {
202
- const [e, n] = $(t), [r, o] = $(0), { scrollToPage: i } = vn(), c = k(1), { viewMode: l } = Me(), { scrollMode: d } = Ee(), { widths: f } = Ge(), { pagesRef: m } = be(), P = Tt(e, 100), p = O(
203
- (h) => {
204
- if (!/^[0-9]*$/g.test(h.toString()) || !h)
202
+ const [e, n] = q(t), [r, o] = q(0), { scrollToPage: i } = vn(), c = W(1), { viewMode: l } = Fe(), { scrollMode: d } = Ee(), { widths: f } = Ge(), { pagesRef: m } = _e(), P = Tt(e, 100), h = E(
203
+ (p) => {
204
+ if (!/^[0-9]*$/g.test(p.toString()) || !p)
205
205
  return { success: !1, currentPage: c.current };
206
- const a = +h;
207
- return a < 0 || a > r ? { success: !1, currentPage: c.current } : (n(a), c.current = a, { success: !0, currentPage: +h });
206
+ const s = +p;
207
+ return s < 0 || s > r ? { success: !1, currentPage: c.current } : (n(s), c.current = s, { success: !0, currentPage: +p });
208
208
  },
209
209
  [r]
210
- ), T = O(p, [p]), C = O(
211
- (h) => {
212
- const u = p(h);
210
+ ), T = E(h, [h]), C = E(
211
+ (p) => {
212
+ const u = h(p);
213
213
  return u.success && i(u.currentPage), u;
214
214
  },
215
- [p, i]
216
- ), b = O((h) => {
217
- const u = h % 2 === 1;
215
+ [h, i]
216
+ ), b = E((p) => {
217
+ const u = p % 2 === 1;
218
218
  if (!m || u)
219
219
  return !1;
220
- const a = u ? f[h] : f[h - 1], w = u ? f[h + 1] : f[h];
221
- return l === Re.DUAL_PAGE && a + w < m.clientWidth;
222
- }, [l, f, m, r]), v = O(() => {
223
- let h = e - 1;
224
- b(h) && (h = e - 2), C(h);
225
- }, [C, e, l, d, b]), y = F(() => l === Re.DUAL_PAGE && d === ne.PAGE_SCROLLING ? e === r - 1 : e === r, [e, r, l, d]), g = O(() => {
220
+ const s = u ? f[p] : f[p - 1], _ = u ? f[p + 1] : f[p];
221
+ return l === Re.DUAL_PAGE && s + _ < m.clientWidth;
222
+ }, [l, f, m, r]), v = E(() => {
223
+ let p = e - 1;
224
+ b(p) && (p = e - 2), C(p);
225
+ }, [C, e, l, d, b]), y = M(() => l === Re.DUAL_PAGE && d === ne.PAGE_SCROLLING ? e === r - 1 : e === r, [e, r, l, d]), g = E(() => {
226
226
  if (y)
227
227
  return;
228
- let h = e + 1;
229
- b(h) && (h = e + 2), C(h);
228
+ let p = e + 1;
229
+ b(p) && (p = e + 2), C(p);
230
230
  }, [C, e, b, l, d, y]);
231
231
  return {
232
232
  focusedPage: P,
@@ -249,16 +249,16 @@ import './assets/ToolbarLayout.css';const vn = () => {
249
249
  },
250
250
  nextPage: () => {
251
251
  }
252
- }), de = () => {
252
+ }), le = () => {
253
253
  const t = qe(wn);
254
- return typeof (t == null ? void 0 : t.focusedPage) > "u" && ar.error("Please use this hooks inside children component of RPProvider"), t;
255
- }, Ka = ({ children: t }) => {
254
+ return typeof (t == null ? void 0 : t.focusedPage) > "u" && sr.error("Please use this hooks inside children component of RPProvider"), t;
255
+ }, Ks = ({ children: t }) => {
256
256
  const { pdf: e } = oe(), { setCurrentPage: n } = Po(), { focusedPage: r, totalPages: o, setFocusedPage: i, setTotalPages: c, goToPage: l, nextPage: d, prevPage: f } = Er();
257
- return A(() => {
257
+ return D(() => {
258
258
  e != null && e.numPages && (c(e.numPages), i(1));
259
- }, [e, c, i]), A(() => {
259
+ }, [e, c, i]), D(() => {
260
260
  n(r);
261
- }, [r, n]), /* @__PURE__ */ s(
261
+ }, [r, n]), /* @__PURE__ */ a(
262
262
  wn.Provider,
263
263
  {
264
264
  value: {
@@ -275,19 +275,19 @@ import './assets/ToolbarLayout.css';const vn = () => {
275
275
  );
276
276
  };
277
277
  const Nr = () => {
278
- const { pdf: t, pages: e } = oe(), [n, r] = $({
278
+ const { pdf: t, pages: e } = oe(), [n, r] = q({
279
279
  loadedPages: 0,
280
280
  totalPages: 0,
281
281
  percentage: 0
282
- }), [o, i] = $(!1), [c, l] = $(!1), [d, f] = $(null), m = k(!1);
283
- A(() => {
282
+ }), [o, i] = q(!1), [c, l] = q(!1), [d, f] = q(null), m = W(!1);
283
+ D(() => {
284
284
  m.current;
285
285
  }, [m]);
286
- const P = O(() => {
286
+ const P = E(() => {
287
287
  document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
288
- const h = document.querySelector(".rp-print-zone");
289
- h && h.remove();
290
- }, []), p = O(() => {
288
+ const p = document.querySelector(".rp-print-zone");
289
+ p && p.remove();
290
+ }, []), h = E(() => {
291
291
  m.current = !1, i(!1), l(!1), f(null), r({
292
292
  loadedPages: 0,
293
293
  totalPages: 0,
@@ -296,137 +296,137 @@ const Nr = () => {
296
296
  }, []), T = () => {
297
297
  m.current = !0;
298
298
  }, C = async ({
299
- scratchCanvas: h,
299
+ scratchCanvas: p,
300
300
  pdfDocument: u,
301
- pageNumber: a,
302
- viewerPdfPage: w,
303
- printResolution: _,
301
+ pageNumber: s,
302
+ viewerPdfPage: _,
303
+ printResolution: w,
304
304
  optionalContentConfigPromise: x,
305
305
  printAnnotationStoragePromise: I
306
306
  }) => {
307
307
  if (m.current) {
308
- p();
308
+ h();
309
309
  return;
310
310
  }
311
- const S = _ / Wo.PDF;
312
- h.width = Math.floor(w.width * S), h.height = Math.floor(w.height * S);
313
- const R = h.getContext("2d");
314
- R.save(), R.fillStyle = "rgb(255, 255, 255)", R.fillRect(0, 0, h.width, h.height), R.restore();
315
- const [N, z] = await Promise.all([
316
- u.getPage(a),
311
+ const S = w / Wo.PDF;
312
+ p.width = Math.floor(_.width * S), p.height = Math.floor(_.height * S);
313
+ const R = p.getContext("2d");
314
+ R.save(), R.fillStyle = "rgb(255, 255, 255)", R.fillRect(0, 0, p.width, p.height), R.restore();
315
+ const [N, A] = await Promise.all([
316
+ u.getPage(s),
317
317
  I
318
318
  ]);
319
319
  if (m.current) {
320
- p();
320
+ h();
321
321
  return;
322
322
  }
323
- const M = {
323
+ const z = {
324
324
  canvasContext: R,
325
325
  transform: [S, 0, 0, S, 0, 0],
326
- viewport: N.getViewport({ scale: 1, rotation: w.rotation }),
326
+ viewport: N.getViewport({ scale: 1, rotation: _.rotation }),
327
327
  intent: "print",
328
328
  annotationMode: Ho.ENABLE_STORAGE,
329
329
  optionalContentConfigPromise: x,
330
- printAnnotationStorage: z
330
+ printAnnotationStorage: A
331
331
  };
332
332
  try {
333
- return N.render(M).promise;
334
- } catch (D) {
335
- throw D instanceof $o || console.error(D), D;
333
+ return N.render(z).promise;
334
+ } catch (L) {
335
+ throw L instanceof $o || console.error(L), L;
336
336
  }
337
- }, b = O(() => {
338
- const h = window.print;
337
+ }, b = E(() => {
338
+ const p = window.print;
339
339
  return new Promise((u) => {
340
- const a = (x) => {
340
+ const s = (x) => {
341
341
  setTimeout(() => {
342
- h.call(window), setTimeout(() => x(), 20);
342
+ p.call(window), setTimeout(() => x(), 20);
343
343
  }, 0);
344
344
  };
345
345
  if (document.querySelector(".rp-print-zone")) {
346
- a(u);
346
+ s(u);
347
347
  return;
348
348
  }
349
- const _ = new MutationObserver(() => {
350
- document.querySelector(".rp-print-zone") && (a(u), _.disconnect());
349
+ const w = new MutationObserver(() => {
350
+ document.querySelector(".rp-print-zone") && (s(u), w.disconnect());
351
351
  });
352
- _.observe(document.body, { childList: !0, subtree: !0 });
352
+ w.observe(document.body, { childList: !0, subtree: !0 });
353
353
  });
354
- }, []), v = async (h) => {
355
- const u = document.createElement("img"), a = document.createElement("div");
356
- return a.classList.add("rp-print-page"), await new Promise((w, _) => {
357
- h.toBlob((x) => {
354
+ }, []), v = async (p) => {
355
+ const u = document.createElement("img"), s = document.createElement("div");
356
+ return s.classList.add("rp-print-page"), await new Promise((_, w) => {
357
+ p.toBlob((x) => {
358
358
  x ? (u.src = URL.createObjectURL(x), u.onload = () => {
359
- URL.revokeObjectURL(u.src), w();
360
- }, u.onerror = _) : _(new Error("Failed to create blob"));
359
+ URL.revokeObjectURL(u.src), _();
360
+ }, u.onerror = w) : w(new Error("Failed to create blob"));
361
361
  });
362
362
  }).catch(() => {
363
- }), a.appendChild(u), a;
364
- }, y = (h, u) => {
365
- const a = document.createElement("div");
366
- a.classList.add("rp-print-zone");
367
- const w = document.createElement("style"), _ = u.get(1);
368
- if (_) {
369
- const { width: x, height: I } = _ == null ? void 0 : _.page.getViewport({ scale: 1 });
370
- w.innerHTML = `@page { size: ${x}px ${I}px }`;
363
+ }), s.appendChild(u), s;
364
+ }, y = (p, u) => {
365
+ const s = document.createElement("div");
366
+ s.classList.add("rp-print-zone");
367
+ const _ = document.createElement("style"), w = u.get(1);
368
+ if (w) {
369
+ const { width: x, height: I } = w == null ? void 0 : w.page.getViewport({ scale: 1 });
370
+ _.innerHTML = `@page { size: ${x}px ${I}px }`;
371
371
  }
372
- return a.appendChild(w), a.append(...h), a;
373
- }, g = O(async () => {
372
+ return s.appendChild(_), s.append(...p), s;
373
+ }, g = E(async () => {
374
374
  if (!t)
375
375
  return;
376
- p();
377
- const h = document.createElement("canvas"), u = [];
376
+ h();
377
+ const p = document.createElement("canvas"), u = [];
378
378
  try {
379
379
  t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
380
- const w = t.getOptionalContentConfig({ intent: "print" }), _ = Promise.resolve(
380
+ const _ = t.getOptionalContentConfig({ intent: "print" }), w = Promise.resolve(
381
381
  t.annotationStorage.print ?? void 0
382
382
  ), x = e.size;
383
383
  for (const [S, R] of e) {
384
384
  if (m.current) {
385
- p();
385
+ h();
386
386
  return;
387
387
  }
388
388
  const N = R.page.getViewport({ scale: 1 });
389
389
  if (await C({
390
- scratchCanvas: h,
390
+ scratchCanvas: p,
391
391
  pdfDocument: t,
392
392
  pageNumber: S,
393
393
  viewerPdfPage: N,
394
394
  printResolution: 150,
395
- optionalContentConfigPromise: w,
396
- printAnnotationStoragePromise: _
395
+ optionalContentConfigPromise: _,
396
+ printAnnotationStoragePromise: w
397
397
  }), m.current) {
398
- p();
398
+ h();
399
399
  return;
400
400
  }
401
- const z = await v(h);
402
- u.push(z);
403
- const M = parseFloat((u.length / x * 100).toFixed(2));
401
+ const A = await v(p);
402
+ u.push(A);
403
+ const z = parseFloat((u.length / x * 100).toFixed(2));
404
404
  r({
405
405
  loadedPages: S,
406
406
  totalPages: x,
407
- percentage: M
407
+ percentage: z
408
408
  });
409
409
  }
410
410
  if (m.current) {
411
- p();
411
+ h();
412
412
  return;
413
413
  }
414
414
  const I = y(u, e);
415
415
  document.body.appendChild(I), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), i(!0), await b();
416
- } catch (a) {
417
- l(!0), a instanceof Error && f(a);
416
+ } catch (s) {
417
+ l(!0), s instanceof Error && f(s);
418
418
  } finally {
419
- h.height = 0, h.width = 0;
419
+ p.height = 0, p.width = 0;
420
420
  }
421
421
  }, [t, e, m]);
422
- return A(() => {
423
- const h = () => {
424
- p(), P();
422
+ return D(() => {
423
+ const p = () => {
424
+ h(), P();
425
425
  };
426
- return window.addEventListener("afterprint", h, !0), () => {
427
- window.removeEventListener("afterprint", h, !0);
426
+ return window.addEventListener("afterprint", p, !0), () => {
427
+ window.removeEventListener("afterprint", p, !0);
428
428
  };
429
- }, [P, p]), {
429
+ }, [P, h]), {
430
430
  print: g,
431
431
  cancel: T,
432
432
  progress: n,
@@ -451,24 +451,24 @@ const Nr = () => {
451
451
  console.error("Error in setOnError callback:", e);
452
452
  }
453
453
  }
454
- }), Za = ({ children: t }) => {
455
- const [e, n] = $(null), [r, o] = $(null), { print: i, cancel: c, progress: l, isComplete: d, isError: f, error: m } = Nr(), P = O((v) => {
454
+ }), Zs = ({ children: t }) => {
455
+ const [e, n] = q(null), [r, o] = q(null), { print: i, cancel: c, progress: l, isComplete: d, isError: f, error: m } = Nr(), P = E((v) => {
456
456
  v && typeof v == "function" && o(() => v);
457
- }, []), p = (v) => {
457
+ }, []), h = (v) => {
458
458
  m && v(m);
459
- }, T = O(
459
+ }, T = E(
460
460
  (v) => {
461
461
  n(() => v);
462
462
  },
463
463
  [l, e]
464
464
  );
465
- A(() => {
465
+ D(() => {
466
466
  d && r && C();
467
- }, [d, r]), A(() => {
468
- f && p((v) => {
467
+ }, [d, r]), D(() => {
468
+ f && h((v) => {
469
469
  console.error(v);
470
470
  });
471
- }, [f]), A(() => {
471
+ }, [f]), D(() => {
472
472
  l && e && e(l);
473
473
  }, [l, e]);
474
474
  const C = () => {
@@ -478,24 +478,24 @@ const Nr = () => {
478
478
  cancel: c,
479
479
  setOnProgress: T,
480
480
  setOnComplete: P,
481
- setOnError: p,
481
+ setOnError: h,
482
482
  progress: l
483
483
  };
484
- return /* @__PURE__ */ s(_n.Provider, { value: b, children: t });
484
+ return /* @__PURE__ */ a(_n.Provider, { value: b, children: t });
485
485
  }, tt = () => {
486
486
  const t = qe(_n);
487
487
  if (!t)
488
488
  throw new Error("usePrintContext must be used within a PrintProvider");
489
489
  return t;
490
490
  }, Or = () => {
491
- const [t, e] = $({}), { pages: n } = oe(), r = F(() => Object.keys(t).length, [t]), o = O(
491
+ const [t, e] = q({}), { pages: n } = oe(), r = M(() => Object.keys(t).length, [t]), o = E(
492
492
  (c) => {
493
493
  if (!n.size)
494
494
  return;
495
495
  const l = c > n.size ? n.size : c, f = Array.from(n.values()).slice(0, l).map((m) => {
496
- const { thumbnailViewport: P, scale: p } = sr(m.page, m.defaultRotation);
496
+ const { thumbnailViewport: P, scale: h } = ar(m.page, m.defaultRotation);
497
497
  return {
498
- scale: p,
498
+ scale: h,
499
499
  page: m.page,
500
500
  loading: !0,
501
501
  viewport: P,
@@ -506,10 +506,10 @@ const Nr = () => {
506
506
  },
507
507
  [n]
508
508
  );
509
- A(() => {
509
+ D(() => {
510
510
  o(10);
511
511
  }, [o]);
512
- const i = O(
512
+ const i = E(
513
513
  (c) => {
514
514
  if (!n)
515
515
  return;
@@ -538,12 +538,12 @@ const Nr = () => {
538
538
  setActive: (t) => {
539
539
  },
540
540
  active: !1
541
- }), Tn = () => qe(bn), Xa = ({
541
+ }), Tn = () => qe(bn), Xs = ({
542
542
  children: t,
543
543
  initialThumbnailsVisible: e
544
544
  }) => {
545
- const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: i } = Or(), [c, l] = $(e);
546
- return /* @__PURE__ */ s(
545
+ const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: i } = Or(), [c, l] = q(e);
546
+ return /* @__PURE__ */ a(
547
547
  bn.Provider,
548
548
  {
549
549
  value: { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: i, active: c, setActive: l },
@@ -551,111 +551,100 @@ const Nr = () => {
551
551
  }
552
552
  );
553
553
  }, Dr = (t = {}, e = "") => {
554
- const [n, r] = $(e), [o, i] = $(!1), { pdf: c, pages: l } = oe(), { widths: d, heights: f } = Ge(), m = k(!n), { currentZoom: P } = wt(), [p, T] = $([]), { setFocusedPage: C } = de(), { columnCount: b } = Me(), { pageRotate: v } = Je(), [y, g] = $(0), { pageScrollElementRef: h, virtualScrollableElementRef: u } = Ye(), { scrollMode: a } = Ee(), { pagesRef: w } = be(), [_, x] = $(null), I = k({}), S = F(() => y === 0 ? null : p[y - 1], [y, p]), R = F(() => p.length, [p]), N = O(
555
- (L) => {
556
- if (L === 0)
557
- return;
558
- const E = p[L - 1];
559
- if (!E || !l)
560
- return;
561
- const q = u || h;
562
- if (!q || !w)
563
- return;
564
- const W = l.get(E.page);
565
- if (a === ne.PAGE_SCROLLING && C(E.page), !W)
566
- return;
567
- let U = 0, j = 0;
568
- if (a === ne.VERTICAL_SCROLLING) {
569
- const J = E.page - 1, ue = b, ie = J % ue, me = Math.floor(J / ue);
570
- U = ze(f, me), j = ze(d, ie);
571
- }
572
- a === ne.HORIZONTAL_SCROLLING && (j = d.slice(0, E.page - 1).reduce((J, ue) => J + ue, 0));
573
- const V = {
574
- height: f[E.page - 1],
575
- width: d[E.page - 1]
576
- }, ee = v[E.page], { leftInPage: G, topInPage: Z } = ir(
577
- V,
578
- w,
579
- E.rect,
580
- P,
581
- ee
582
- ), Y = j + G, re = U + Z, se = {
583
- left: Math.max(Y, 0),
584
- top: Math.max(re, 0)
585
- };
586
- q.scrollTo({
587
- ...se,
588
- behavior: "smooth"
589
- });
590
- },
591
- [
592
- l,
593
- C,
594
- d,
595
- f,
596
- a,
597
- u,
598
- h,
599
- w,
600
- p
601
- ]
602
- );
603
- A(() => {
604
- y === 1 && N(y);
605
- }, [y]);
606
- const z = O(() => {
607
- g((L) => {
608
- let E;
609
- return R ? L + 1 > R ? E = 1 : E = L + 1 : E = 0, E !== 1 && N(E), E;
610
- });
611
- }, [R, N]), M = O(() => {
612
- g((L) => {
613
- let E;
614
- return R ? L - 1 <= 0 ? E = R : E = L - 1 : E = 0, E !== 1 && N(E), E;
554
+ const [n, r] = q(e), [o, i] = q(!1), { pdf: c, pages: l } = oe(), { widths: d, heights: f } = Ge(), m = W(!n), { currentZoom: P } = wt(), [h, T] = q([]), { setFocusedPage: C } = le(), { columnCount: b } = Fe(), { pageRotate: v } = Je(), [y, g] = q(0), { pageScrollElementRef: p, virtualScrollableElementRef: u } = Ye(), { scrollMode: s } = Ee(), { pagesRef: _ } = _e(), [w, x] = q(null), I = W({}), S = M(() => y === 0 ? null : h[y - 1], [y, h]), R = M(() => h.length, [h]);
555
+ D(() => {
556
+ if (!S || !l)
557
+ return;
558
+ const L = u || p;
559
+ if (!L || !_)
560
+ return;
561
+ const O = l.get(S.page);
562
+ if (s === ne.PAGE_SCROLLING && C(S.page), !O)
563
+ return;
564
+ let F = 0, $ = 0;
565
+ if (s === ne.VERTICAL_SCROLLING) {
566
+ const J = S.page - 1, ee = b, re = J % ee, ve = Math.floor(J / ee);
567
+ F = ze(f, ve), $ = ze(d, re);
568
+ }
569
+ s === ne.HORIZONTAL_SCROLLING && ($ = d.slice(0, S.page - 1).reduce((J, ee) => J + ee, 0));
570
+ const k = {
571
+ height: f[S.page - 1],
572
+ width: d[S.page - 1]
573
+ }, B = {
574
+ top: k.height / 2,
575
+ left: k.width / 2
576
+ }, Z = v[S.page], { leftInPage: U, topInPage: ie } = ir(
577
+ k,
578
+ B,
579
+ S.rect,
580
+ P,
581
+ Z
582
+ ), G = $ + U, K = F + ie, Y = {
583
+ left: Math.max(G, 0),
584
+ top: Math.max(K, 0)
585
+ };
586
+ L.scrollTo({
587
+ ...Y,
588
+ behavior: "smooth"
615
589
  });
616
- }, [R, N]), D = O(async (L) => {
590
+ }, [
591
+ l,
592
+ C,
593
+ d,
594
+ f,
595
+ S,
596
+ s,
597
+ u,
598
+ p,
599
+ _
600
+ ]);
601
+ const N = E(() => {
602
+ g((L) => R ? L + 1 > R ? 1 : L + 1 : 0);
603
+ }, [R]), A = E(() => {
604
+ g((L) => R ? L - 1 <= 0 ? R : L - 1 : 0);
605
+ }, [R]), z = E(async (L) => {
617
606
  if (!L)
618
607
  return {};
619
- const E = L.numPages, q = {};
620
- for (let W = 1; W <= E; W++) {
608
+ const O = L.numPages, F = {};
609
+ for (let $ = 1; $ <= O; $++) {
621
610
  if (m.current)
622
611
  throw "close pop over";
623
- const U = await L.getPage(W);
624
- q[W.toString()] = await U.getTextContent();
612
+ const k = await L.getPage($);
613
+ F[$.toString()] = await k.getTextContent();
625
614
  }
626
- return q;
615
+ return F;
627
616
  }, []);
628
- return A(() => {
617
+ return D(() => {
629
618
  if (!n) {
630
619
  m.current = !0, T([]), g(0);
631
620
  return;
632
621
  }
633
- m.current = !1, i(!0), T([]), g(0), D(c).then((L) => {
622
+ m.current = !1, i(!0), T([]), g(0), z(c).then((L) => {
634
623
  I.current = L;
635
- const q = Object.keys(L).reduce((W, U) => {
636
- const j = mo(
624
+ const F = Object.keys(L).reduce(($, k) => {
625
+ const B = mo(
637
626
  [n],
638
- L[U],
639
- Number(U) - 1,
627
+ L[k],
628
+ Number(k) - 1,
640
629
  t
641
- ).map((V, ee) => ({ ...V, page: Number(U), pageMatchIdx: ee }));
642
- return [...W, ...j];
630
+ ).map((Z, U) => ({ ...Z, page: Number(k), pageMatchIdx: U }));
631
+ return [...$, ...B];
643
632
  }, []);
644
- T(q), g(q.length ? 1 : 0);
633
+ T(F), g(F.length ? 1 : 0);
645
634
  }).catch(() => {
646
635
  T([]), g(0);
647
636
  }).finally(() => i(!1));
648
- }, [n, D, c, t]), {
637
+ }, [n, z, c, t]), {
649
638
  search: n,
650
639
  setSearch: r,
651
640
  loading: o,
652
- matches: p,
641
+ matches: h,
653
642
  totalMatches: R,
654
643
  currentMatchPosition: y,
655
644
  currentMatch: S,
656
- nextMatch: z,
657
- prevMatch: M,
658
- currentMatchElement: _,
645
+ nextMatch: N,
646
+ prevMatch: A,
647
+ currentMatchElement: w,
659
648
  setCurrentMatchElement: x
660
649
  };
661
650
  }, Cn = $e({
@@ -676,11 +665,11 @@ const Nr = () => {
676
665
  currentMatchElement: null,
677
666
  setCurrentMatchElement: (t) => {
678
667
  }
679
- }), Qa = ({
668
+ }), Qs = ({
680
669
  children: t,
681
670
  initialSearch: e
682
671
  }) => {
683
- const [n, r] = $({}), {
672
+ const [n, r] = q({}), {
684
673
  loading: o,
685
674
  setSearch: i,
686
675
  totalMatches: c,
@@ -689,11 +678,11 @@ const Nr = () => {
689
678
  search: f,
690
679
  matches: m,
691
680
  nextMatch: P,
692
- prevMatch: p,
681
+ prevMatch: h,
693
682
  currentMatchElement: T,
694
683
  setCurrentMatchElement: C
695
684
  } = Dr(n, e);
696
- return /* @__PURE__ */ s(
685
+ return /* @__PURE__ */ a(
697
686
  Cn.Provider,
698
687
  {
699
688
  value: {
@@ -705,7 +694,7 @@ const Nr = () => {
705
694
  currentMatchPosition: l,
706
695
  currentMatch: d,
707
696
  nextMatch: P,
708
- prevMatch: p,
697
+ prevMatch: h,
709
698
  search: f,
710
699
  matches: m,
711
700
  currentMatchElement: T,
@@ -714,10 +703,10 @@ const Nr = () => {
714
703
  children: t
715
704
  }
716
705
  );
717
- }, yt = () => qe(Cn), Pn = $e(null), Ya = ({ children: t }) => {
718
- const e = k(!1), [n, r] = $([]), o = O((d) => {
706
+ }, yt = () => qe(Cn), Pn = $e(null), Ys = ({ children: t }) => {
707
+ const e = W(!1), [n, r] = q([]), o = E((d) => {
719
708
  r((f) => [...f, { id: d.page.pageNumber.toString(), data: d, priority: 0 }]);
720
- }, []), i = F(() => new To(o), [o]), { focusedPage: c } = de(), l = O((d) => (e.current = !0, Co(
709
+ }, []), i = M(() => new To(o), [o]), { focusedPage: c } = le(), l = E((d) => (e.current = !0, Co(
721
710
  d.data.page,
722
711
  d.data.canvasElem,
723
712
  d.data.options
@@ -726,9 +715,9 @@ const Nr = () => {
726
715
  }).finally(() => {
727
716
  d.data.onLoaded && d.data.onLoaded();
728
717
  })), []);
729
- return A(() => {
718
+ return D(() => {
730
719
  c && (i.changePagePriority(`^page-${c}`, 0), i.changePagePriority(`^thumbnail-${c}`, 1));
731
- }, [c]), A(() => {
720
+ }, [c]), D(() => {
732
721
  if (i.isEmpty() || e.current)
733
722
  return;
734
723
  const d = () => {
@@ -738,7 +727,7 @@ const Nr = () => {
738
727
  }) : (e.current = !1, r(i.peekAll()));
739
728
  };
740
729
  d();
741
- }, [i, l, n]), /* @__PURE__ */ s(Pn.Provider, { value: i, children: t });
730
+ }, [i, l, n]), /* @__PURE__ */ a(Pn.Provider, { value: i, children: t });
742
731
  }, yn = () => {
743
732
  const t = qe(Pn);
744
733
  if (!t)
@@ -755,25 +744,25 @@ const Nr = () => {
755
744
  "rp-loader": "_rp-loader_1fvmx_78",
756
745
  "rp-not-supported": "_rp-not-supported_1fvmx_86",
757
746
  "rp-not-supported-content": "_rp-not-supported-content_1fvmx_102"
758
- }, at = {
747
+ }, st = {
759
748
  "rp-page-wrapper": "_rp-page-wrapper_14ohm_1",
760
749
  "rp-page": "_rp-page_14ohm_1",
761
750
  "rp-loader-wrapper": "_rp-loader-wrapper_14ohm_15"
762
751
  }, Ar = (t) => {
763
- const { pageNumber: e, onLoaded: n, onLoading: r } = t, o = k(null), { pages: i } = oe(), { pageRotate: c } = Je(), l = k(), { currentZoom: d } = wt(), f = yn(), m = k(`page-${e}`);
764
- return A(() => {
752
+ const { pageNumber: e, onLoaded: n, onLoading: r } = t, o = W(null), { pages: i } = oe(), { pageRotate: c } = Je(), l = W(), { currentZoom: d } = wt(), f = yn(), m = W(`page-${e}`);
753
+ return D(() => {
765
754
  if (!i || d === 0)
766
755
  return;
767
756
  const P = i.get(e);
768
757
  if (o.current && P) {
769
- const p = o.current;
770
- p.hidden = !0;
758
+ const h = o.current;
759
+ h.hidden = !0;
771
760
  const T = l.current;
772
761
  T && T.cancel(), r && r(), f.enqueue(
773
762
  m.current,
774
763
  {
775
764
  page: P.page,
776
- canvasElem: p,
765
+ canvasElem: h,
777
766
  options: {
778
767
  scale: d,
779
768
  rotate: c[e],
@@ -787,34 +776,34 @@ const Nr = () => {
787
776
  return () => {
788
777
  f.removeQueue(m.current);
789
778
  };
790
- }, [i, e, c, d, r, n, f]), /* @__PURE__ */ s("canvas", { "data-rp": `page-${e}-canvas`, ref: o });
791
- }, zr = "_selecting_ppr5g_10", Mr = "_markedContent_ppr5g_33", ge = {
792
- "rp-text-layer": "_rp-text-layer_ppr5g_1",
779
+ }, [i, e, c, d, r, n, f]), /* @__PURE__ */ a("canvas", { "data-rp": `page-${e}-canvas`, ref: o });
780
+ }, zr = "_selecting_1uik2_10", Fr = "_markedContent_1uik2_33", fe = {
781
+ "rp-text-layer": "_rp-text-layer_1uik2_1",
793
782
  selecting: zr,
794
- markedContent: Mr,
795
- "rp-text-layer-text": "_rp-text-layer-text_ppr5g_52"
796
- }, Fr = (t) => {
797
- const { pageNumber: e } = t, { pages: n } = oe(), r = k(null), { matches: o, currentMatch: i, setCurrentMatchElement: c } = yt(), [l, d] = $(
783
+ markedContent: Fr,
784
+ "rp-text-layer-text": "_rp-text-layer-text_1uik2_52"
785
+ }, Mr = (t) => {
786
+ const { pageNumber: e } = t, { pages: n } = oe(), r = W(null), { matches: o, currentMatch: i, setCurrentMatchElement: c } = yt(), [l, d] = q(
798
787
  []
799
- ), f = k(), m = k(), P = k([]), p = F(() => o.filter((h) => h.pageIndex === e - 1), [o, e]), T = O(
800
- (h, u, a = !1) => {
801
- if (a && go(h, u), !p.length) {
788
+ ), f = W(), m = W(), P = W([]), h = M(() => o.filter((p) => p.pageIndex === e - 1), [o, e]), T = E(
789
+ (p, u, s = !1) => {
790
+ if (s && go(p, u), !h.length) {
802
791
  P.current = [], d([]);
803
792
  return;
804
793
  }
805
- const w = vo(p, h, u);
806
- d(w);
794
+ const _ = vo(h, p, u);
795
+ d(_);
807
796
  },
808
- [p]
809
- ), C = k(), b = k(!1), v = O(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
810
- A(() => ((() => {
797
+ [h]
798
+ ), C = W(), b = W(!1), v = E(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
799
+ D(() => ((() => {
811
800
  if (C.current)
812
801
  return;
813
802
  C.current = new AbortController();
814
- const { signal: u } = C.current, a = () => {
815
- v().forEach((_) => {
816
- const x = _.querySelector(".endOfContent");
817
- x && (_.appendChild(x), x.style.width = "", x.style.height = "", _.classList.remove(ge.selecting));
803
+ const { signal: u } = C.current, s = () => {
804
+ v().forEach((w) => {
805
+ const x = w.querySelector(".endOfContent");
806
+ x && (w.appendChild(x), x.style.width = "", x.style.height = "", w.classList.remove(fe.selecting));
818
807
  });
819
808
  };
820
809
  document.addEventListener(
@@ -826,56 +815,56 @@ const Nr = () => {
826
815
  ), document.addEventListener(
827
816
  "pointerup",
828
817
  () => {
829
- b.current = !1, a();
818
+ b.current = !1, s();
830
819
  },
831
820
  { signal: u }
832
821
  ), window.addEventListener(
833
822
  "blur",
834
823
  () => {
835
- b.current = !1, a();
824
+ b.current = !1, s();
836
825
  },
837
826
  { signal: u }
838
827
  ), document.addEventListener(
839
828
  "keyup",
840
829
  () => {
841
- b.current || a();
830
+ b.current || s();
842
831
  },
843
832
  { signal: u }
844
833
  );
845
- let w = null;
834
+ let _ = null;
846
835
  document.addEventListener(
847
836
  "selectionchange",
848
837
  () => {
849
- var M, D;
850
- const _ = document.getSelection();
851
- if (!_)
838
+ var z, L;
839
+ const w = document.getSelection();
840
+ if (!w)
852
841
  return;
853
- if (_.rangeCount === 0) {
854
- a();
842
+ if (w.rangeCount === 0) {
843
+ s();
855
844
  return;
856
845
  }
857
846
  const x = /* @__PURE__ */ new Set();
858
- for (let L = 0; L < _.rangeCount; L++) {
859
- const E = _.getRangeAt(L);
860
- v().forEach((q) => {
861
- E.intersectsNode(q) && !x.has(q) && x.add(q);
847
+ for (let O = 0; O < w.rangeCount; O++) {
848
+ const F = w.getRangeAt(O);
849
+ v().forEach(($) => {
850
+ F.intersectsNode($) && !x.has($) && x.add($);
862
851
  });
863
852
  }
864
- v().forEach((L) => {
865
- if (x.has(L))
866
- L.classList.add(ge.selecting);
853
+ v().forEach((O) => {
854
+ if (x.has(O))
855
+ O.classList.add(fe.selecting);
867
856
  else {
868
- const E = L.querySelector(".endOfContent");
869
- E && (L.appendChild(E), E.style.width = "", E.style.height = "", L.classList.remove(ge.selecting));
857
+ const F = O.querySelector(".endOfContent");
858
+ F && (O.appendChild(F), F.style.width = "", F.style.height = "", O.classList.remove(fe.selecting));
870
859
  }
871
860
  });
872
- const I = _.getRangeAt(0);
873
- let R = w && (I.compareBoundaryPoints(Range.END_TO_END, w) === 0 || I.compareBoundaryPoints(Range.START_TO_END, w) === 0) ? I.startContainer : I.endContainer;
861
+ const I = w.getRangeAt(0);
862
+ let R = _ && (I.compareBoundaryPoints(Range.END_TO_END, _) === 0 || I.compareBoundaryPoints(Range.START_TO_END, _) === 0) ? I.startContainer : I.endContainer;
874
863
  R.nodeType === Node.TEXT_NODE && (R = R.parentNode);
875
- const N = (M = R.parentElement) == null ? void 0 : M.closest(
876
- ge["rp-text-layer"]
877
- ), z = N == null ? void 0 : N.querySelector(".endOfContent");
878
- z && N && (z.style.width = N.style.width, z.style.height = N.style.height, (D = R.parentElement) == null || D.insertBefore(z, R.nextSibling)), w = I.cloneRange();
864
+ const N = (z = R.parentElement) == null ? void 0 : z.closest(
865
+ fe["rp-text-layer"]
866
+ ), A = N == null ? void 0 : N.querySelector(".endOfContent");
867
+ A && N && (A.style.width = N.style.width, A.style.height = N.style.height, (L = R.parentElement) == null || L.insertBefore(A, R.nextSibling)), _ = I.cloneRange();
879
868
  },
880
869
  { signal: u }
881
870
  );
@@ -883,64 +872,64 @@ const Nr = () => {
883
872
  var u;
884
873
  (u = C.current) == null || u.abort(), C.current = void 0;
885
874
  }), [v]);
886
- const y = O(() => {
887
- r.current && r.current.classList.add(ge.selecting);
888
- }, []), g = O(() => {
889
- r.current && r.current.classList.remove(ge.selecting);
875
+ const y = E(() => {
876
+ r.current && r.current.classList.add(fe.selecting);
877
+ }, []), g = E(() => {
878
+ r.current && r.current.classList.remove(fe.selecting);
890
879
  }, []);
891
- return A(() => {
892
- if (P.current.forEach((a) => {
893
- a.classList.remove("selected");
880
+ return D(() => {
881
+ if (P.current.forEach((s) => {
882
+ s.classList.remove("selected");
894
883
  }), !l.length || !i || i.pageIndex !== e - 1)
895
884
  return;
896
- const h = p.findIndex(
897
- (a) => JSON.stringify(a) === JSON.stringify(i)
885
+ const p = h.findIndex(
886
+ (s) => JSON.stringify(s) === JSON.stringify(i)
898
887
  );
899
- if (h === -1)
888
+ if (p === -1)
900
889
  return;
901
- const u = l.filter((a) => a.index === h);
902
- u.length && (P.current = u.map((a) => a.element), c(u[0].element), u.forEach((a) => {
903
- a.element.classList.add("selected");
890
+ const u = l.filter((s) => s.index === p);
891
+ u.length && (P.current = u.map((s) => s.element), c(u[0].element), u.forEach((s) => {
892
+ s.element.classList.add("selected");
904
893
  }));
905
- }, [i, l, p]), A(() => {
906
- const h = n.get(e);
907
- if (!h || !r.current)
894
+ }, [i, l, h]), D(() => {
895
+ const p = n.get(e);
896
+ if (!p || !r.current)
908
897
  return;
909
898
  const u = r.current;
910
- return f.current && f.current.cancel(), h.page.getTextContent().then((a) => {
911
- const w = h.page.getViewport({ scale: 1 });
899
+ return f.current && f.current.cancel(), p.page.getTextContent().then((s) => {
900
+ const _ = p.page.getViewport({ scale: 1 });
912
901
  return f.current = new ko.TextLayer({
913
- viewport: w,
914
- textContentSource: a,
902
+ viewport: _,
903
+ textContentSource: s,
915
904
  container: u
916
- }), m.current = a, u && (u.innerText = ""), f.current.render();
905
+ }), m.current = s, u && (u.innerText = ""), f.current.render();
917
906
  }).then(() => {
918
907
  var x, I;
919
908
  [].slice.call(u.children).forEach((S) => {
920
- S.classList.add(ge["rp-text-layer-text"]), S.setAttribute("data-rp", "rp-text-layer-text");
909
+ S.classList.add(fe["rp-text-layer-text"]), S.setAttribute("data-rp", "rp-text-layer-text");
921
910
  });
922
- const w = (x = f.current) == null ? void 0 : x.textDivs;
923
- w && m.current && T(m.current, w);
924
- const _ = document.createElement("div");
925
- _.className = "endOfContent", (I = r.current) == null || I.appendChild(_);
911
+ const _ = (x = f.current) == null ? void 0 : x.textDivs;
912
+ _ && m.current && T(m.current, _);
913
+ const w = document.createElement("div");
914
+ w.className = "endOfContent", (I = r.current) == null || I.appendChild(w);
926
915
  }).catch(() => {
927
916
  }), () => {
928
- var a;
929
- (a = f.current) == null || a.cancel();
917
+ var s;
918
+ (s = f.current) == null || s.cancel();
930
919
  };
931
- }, [n, e]), A(() => {
932
- var a;
933
- [].slice.call(r.current.children).forEach((w) => {
934
- w.classList.add(ge["rp-text-layer-text"]);
920
+ }, [n, e]), D(() => {
921
+ var s;
922
+ [].slice.call(r.current.children).forEach((_) => {
923
+ _.classList.add(fe["rp-text-layer-text"]);
935
924
  });
936
- const u = (a = f.current) == null ? void 0 : a.textDivs;
925
+ const u = (s = f.current) == null ? void 0 : s.textDivs;
937
926
  u && m.current && T(m.current, u, !0);
938
- }, [T]), /* @__PURE__ */ s(
927
+ }, [T]), /* @__PURE__ */ a(
939
928
  "div",
940
929
  {
941
930
  "data-rp-text-layer": !0,
942
931
  "data-rp": `page-${e}-textLayer`,
943
- className: ge["rp-text-layer"],
932
+ className: fe["rp-text-layer"],
944
933
  ref: r,
945
934
  onMouseDown: y,
946
935
  onMouseUp: g
@@ -951,24 +940,24 @@ const Nr = () => {
951
940
  };
952
941
  let Wr = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
953
942
  const Hr = (t) => {
954
- const { pageNumber: e } = t, n = k(null), { pages: r, pdf: o } = oe(), i = k(), [c, l] = $(), { setFocusedPage: d, goToPage: f } = de(), { scrollMode: m } = Ee(), { print: P } = tt(), { download: p } = Gn(), T = F(() => r.get(e), [r, e]), C = F(() => T == null ? void 0 : T.page.getViewport(), [T]);
955
- A(() => {
943
+ const { pageNumber: e } = t, n = W(null), { pages: r, pdf: o } = oe(), i = W(), [c, l] = q(), { setFocusedPage: d, goToPage: f } = le(), { scrollMode: m } = Ee(), { print: P } = tt(), { download: h } = Gn(), T = M(() => r.get(e), [r, e]), C = M(() => T == null ? void 0 : T.page.getViewport(), [T]);
944
+ D(() => {
956
945
  i.current && (i.current.div.replaceChildren(), i.current = void 0);
957
- }, [o]), A(() => {
946
+ }, [o]), D(() => {
958
947
  T && T.page.getAnnotations().then((v) => {
959
948
  i.current = void 0, l(v), n.current && (n.current.innerText = "");
960
949
  });
961
950
  }, [T]);
962
- const b = O(
951
+ const b = E(
963
952
  (v) => {
964
953
  !c || !o || (Uo(v), Vo(v, o, c).then((y) => {
965
- var g, h;
966
- ((g = y == null ? void 0 : y.data) == null ? void 0 : g.action) === "Print" ? P() : ((h = y == null ? void 0 : y.data) == null ? void 0 : h.action) === "SaveAs" && p();
967
- }), m === ne.PAGE_SCROLLING ? Ft(v, c, o, (y) => d(y.pageIndex + 1)) : Ft(v, c, o, (y) => f(y.pageIndex + 1)));
954
+ var g, p;
955
+ ((g = y == null ? void 0 : y.data) == null ? void 0 : g.action) === "Print" ? P() : ((p = y == null ? void 0 : y.data) == null ? void 0 : p.action) === "SaveAs" && h();
956
+ }), m === ne.PAGE_SCROLLING ? Mt(v, c, o, (y) => d(y.pageIndex + 1)) : Mt(v, c, o, (y) => f(y.pageIndex + 1)));
968
957
  },
969
- [o, c, f, d, m, P, p]
958
+ [o, c, f, d, m, P, h]
970
959
  );
971
- return A(() => {
960
+ return D(() => {
972
961
  if (!T || !c)
973
962
  return;
974
963
  const v = T.page.getViewport();
@@ -980,8 +969,8 @@ const Hr = (t) => {
980
969
  }
981
970
  const y = /* @__PURE__ */ new Map([]);
982
971
  for (const u of c) {
983
- const { annotationType: a } = u;
984
- switch (a) {
972
+ const { annotationType: s } = u;
973
+ switch (s) {
985
974
  case Dt.Link:
986
975
  jo(u);
987
976
  break;
@@ -992,7 +981,7 @@ const Hr = (t) => {
992
981
  }
993
982
  const g = new AbortController();
994
983
  return (async () => {
995
- var w;
984
+ var _;
996
985
  i.current && (i.current.div.replaceChildren(), i.current = void 0), n.current && (n.current.innerText = ""), i.current = new qo({
997
986
  div: n.current,
998
987
  accessibilityManager: void 0,
@@ -1002,14 +991,14 @@ const Hr = (t) => {
1002
991
  page: T.page,
1003
992
  viewport: v.clone({ dontFlip: !0 })
1004
993
  }), n.current && kt(n.current, b);
1005
- const u = await (o == null ? void 0 : o.hasJSActions()), a = await (o == null ? void 0 : o.getFieldObjects());
994
+ const u = await (o == null ? void 0 : o.hasJSActions()), s = await (o == null ? void 0 : o.getFieldObjects());
1006
995
  if (g.signal.aborted)
1007
996
  throw "abort";
1008
- return (w = i.current) == null ? void 0 : w.render({
997
+ return (_ = i.current) == null ? void 0 : _.render({
1009
998
  annotations: c,
1010
999
  annotationStorage: o == null ? void 0 : o.annotationStorage,
1011
1000
  hasJSActions: u,
1012
- fieldObjects: a,
1001
+ fieldObjects: s,
1013
1002
  div: n.current,
1014
1003
  viewport: v.clone({ dontFlip: !0 }),
1015
1004
  page: T.page,
@@ -1027,7 +1016,7 @@ const Hr = (t) => {
1027
1016
  }), () => {
1028
1017
  g.abort("clear"), n.current && kt(n.current, b);
1029
1018
  };
1030
- }, [o, c, b]), /* @__PURE__ */ s(
1019
+ }, [o, c, b]), /* @__PURE__ */ a(
1031
1020
  "div",
1032
1021
  {
1033
1022
  "data-rp": `page-${e}-annotationLayer`,
@@ -1039,87 +1028,87 @@ const Hr = (t) => {
1039
1028
  }, $r = {
1040
1029
  "rp-text-highlight": "_rp-text-highlight_jdkf8_1"
1041
1030
  }, qr = ({ pageNumber: t, viewport: e }) => {
1042
- const [n, r] = $(), { pages: o } = oe(), { highlightKeywords: i } = _o(), c = !0, l = k(null), [d, f] = $(null), [m, P] = $([]);
1043
- A(() => {
1031
+ const [n, r] = q(), { pages: o } = oe(), { highlightKeywords: i } = _o(), c = !0, l = W(null), [d, f] = q(null), [m, P] = q([]);
1032
+ D(() => {
1044
1033
  l.current && f(l.current.parentElement);
1045
- }, [l]), A(() => {
1034
+ }, [l]), D(() => {
1046
1035
  (async () => {
1047
- const h = o.get(t);
1048
- if (!h || !l.current)
1036
+ const p = o.get(t);
1037
+ if (!p || !l.current)
1049
1038
  return;
1050
- const u = await h.page.getTextContent();
1039
+ const u = await p.page.getTextContent();
1051
1040
  r(u);
1052
1041
  })();
1053
1042
  }, [o, t]);
1054
- const p = F(() => i ? i.map((g) => {
1055
- var h, u;
1043
+ const h = M(() => i ? i.map((g) => {
1044
+ var p, u;
1056
1045
  return {
1057
- ...Zo(g.keyword, (h = g.options) == null ? void 0 : h.matchCase, (u = g.options) == null ? void 0 : u.wholeWords),
1046
+ ...Zo(g.keyword, (p = g.options) == null ? void 0 : p.matchCase, (u = g.options) == null ? void 0 : u.wholeWords),
1058
1047
  color: g.highlightColor
1059
1048
  };
1060
1049
  }) : [], [i]);
1061
- function T(g, h) {
1050
+ function T(g, p) {
1062
1051
  if (!g)
1063
1052
  return;
1064
- const u = `[data-rp="page-${h}-textLayer"]`;
1065
- return new Promise((a) => {
1066
- const w = g.querySelector(u);
1067
- if (w) {
1068
- a(w);
1053
+ const u = `[data-rp="page-${p}-textLayer"]`;
1054
+ return new Promise((s) => {
1055
+ const _ = g.querySelector(u);
1056
+ if (_) {
1057
+ s(_);
1069
1058
  return;
1070
1059
  }
1071
1060
  new MutationObserver((x, I) => {
1072
1061
  const S = g.querySelector(u);
1073
- S && (a(S), I.disconnect());
1062
+ S && (s(S), I.disconnect());
1074
1063
  }).observe(g, { childList: !0, subtree: !0 });
1075
1064
  });
1076
1065
  }
1077
1066
  function C(g) {
1078
- return new Promise((h) => {
1067
+ return new Promise((p) => {
1079
1068
  const u = g.querySelectorAll(
1080
1069
  '[data-rp="rp-text-layer-text"]'
1081
1070
  );
1082
1071
  if (u.length) {
1083
- h(Array.from(u));
1072
+ p(Array.from(u));
1084
1073
  return;
1085
1074
  }
1086
- new MutationObserver((w, _) => {
1075
+ new MutationObserver((_, w) => {
1087
1076
  const x = g.querySelectorAll(
1088
1077
  ".rp-text-layer-text"
1089
1078
  );
1090
- x.length && (h(Array.from(x)), _.disconnect());
1079
+ x.length && (p(Array.from(x)), w.disconnect());
1091
1080
  }).observe(g, { childList: !0, subtree: !0 });
1092
1081
  });
1093
1082
  }
1094
- const b = (g, h, u, a) => {
1095
- var U;
1096
- const w = document.createRange(), _ = u.firstChild;
1097
- if (!_ || _.nodeType !== Node.TEXT_NODE)
1083
+ const b = (g, p, u, s) => {
1084
+ var B;
1085
+ const _ = document.createRange(), w = u.firstChild;
1086
+ if (!w || w.nodeType !== Node.TEXT_NODE)
1098
1087
  return null;
1099
- const x = ((U = _.textContent) == null ? void 0 : U.length) ?? 0, I = a[0].charIdxInSpan, S = a.length === 1 ? I : a[a.length - 1].charIdxInSpan;
1088
+ const x = ((B = w.textContent) == null ? void 0 : B.length) ?? 0, I = s[0].charIdxInSpan, S = s.length === 1 ? I : s[s.length - 1].charIdxInSpan;
1100
1089
  if (I > x || S + 1 > x)
1101
1090
  return null;
1102
- w.setStart(_, I), w.setEnd(_, S + 1);
1091
+ _.setStart(w, I), _.setEnd(w, S + 1);
1103
1092
  const R = document.createElement("span");
1104
- R.style.width = "auto", w.surroundContents(R);
1105
- const N = R.getBoundingClientRect(), z = g.getBoundingClientRect(), M = z.height, D = z.width, L = 100 * (N.left - z.left) / D, E = 100 * (N.top - z.top) / M, q = 100 * N.height / M, W = 100 * N.width / D;
1093
+ R.style.width = "auto", _.surroundContents(R);
1094
+ const N = R.getBoundingClientRect(), A = g.getBoundingClientRect(), z = A.height, L = A.width, O = 100 * (N.left - A.left) / L, F = 100 * (N.top - A.top) / z, $ = 100 * N.height / z, k = 100 * N.width / L;
1106
1095
  return Qo(R), {
1107
- keywordStr: h,
1108
- left: L,
1109
- top: E,
1110
- height: q,
1111
- width: W,
1112
- pageHeight: M,
1113
- pageWidth: D
1096
+ keywordStr: p,
1097
+ left: O,
1098
+ top: F,
1099
+ height: $,
1100
+ width: k,
1101
+ pageHeight: z,
1102
+ pageWidth: L
1114
1103
  };
1115
1104
  };
1116
- async function v(g, h) {
1105
+ async function v(g, p) {
1117
1106
  const u = await T(d, g);
1118
1107
  if (!u)
1119
1108
  return;
1120
- const a = await C(u);
1121
- if (a.length) {
1122
- const w = a.map((x) => x.tagName === "BR" ? " " : x.textContent).reduce(
1109
+ const s = await C(u);
1110
+ if (s.length) {
1111
+ const _ = s.map((x) => x.tagName === "BR" ? " " : x.textContent).reduce(
1123
1112
  (x, I, S) => x.concat(
1124
1113
  I.split("").map((R, N) => ({
1125
1114
  char: R,
@@ -1134,66 +1123,66 @@ const Hr = (t) => {
1134
1123
  spanIdx: 0
1135
1124
  }
1136
1125
  ]
1137
- ).slice(1), _ = y(u, h, a, w);
1138
- P(_);
1126
+ ).slice(1), w = y(u, p, s, _);
1127
+ P(w);
1139
1128
  }
1140
1129
  }
1141
- const y = (g, h, u, a) => {
1142
- const w = h.length;
1143
- if (!a.length || !w)
1130
+ const y = (g, p, u, s) => {
1131
+ const _ = p.length;
1132
+ if (!s.length || !_)
1144
1133
  return [];
1145
- const _ = [], x = a.map((I) => I.char).join("");
1146
- return p.forEach((I) => {
1147
- const { keyword: S, regExp: R, wholeWords: N, color: z } = I, M = S;
1148
- if (!M.trim())
1134
+ const w = [], x = s.map((I) => I.char).join("");
1135
+ return h.forEach((I) => {
1136
+ const { keyword: S, regExp: R, wholeWords: N, color: A } = I, z = S;
1137
+ if (!z.trim())
1149
1138
  return;
1150
- const D = R.flags.indexOf("g") === -1 ? new RegExp(R, `${R.flags}g`) : R;
1151
- let L;
1152
- const E = [];
1153
- for (; (L = D.exec(x)) !== null; )
1154
- N && !wo(x, L.index, L[0].length) || E.push({
1155
- keyword: D,
1156
- startIndex: L.index,
1157
- endIndex: D.lastIndex
1139
+ const L = R.flags.indexOf("g") === -1 ? new RegExp(R, `${R.flags}g`) : R;
1140
+ let O;
1141
+ const F = [];
1142
+ for (; (O = L.exec(x)) !== null; )
1143
+ N && !wo(x, O.index, O[0].length) || F.push({
1144
+ keyword: L,
1145
+ startIndex: O.index,
1146
+ endIndex: L.lastIndex
1158
1147
  });
1159
- const q = E.map((W) => ({
1160
- keyword: W.keyword,
1161
- indexes: a.slice(W.startIndex, W.endIndex),
1162
- color: z
1148
+ const $ = F.map((k) => ({
1149
+ keyword: k.keyword,
1150
+ indexes: s.slice(k.startIndex, k.endIndex),
1151
+ color: A
1163
1152
  }));
1164
- for (const W of q) {
1165
- const U = W.indexes.reduce(
1166
- (j, V) => (j[V.spanIdx] = (j[V.spanIdx] || []).concat([V]), j),
1153
+ for (const k of $) {
1154
+ const B = k.indexes.reduce(
1155
+ (Z, U) => (Z[U.spanIdx] = (Z[U.spanIdx] || []).concat([U]), Z),
1167
1156
  {}
1168
1157
  );
1169
- for (const j of Object.values(U))
1170
- if (j.length !== 1 || j[0].char.trim() !== "") {
1171
- const V = j, ee = u[V[0].spanIdx], G = b(
1158
+ for (const Z of Object.values(B))
1159
+ if (Z.length !== 1 || Z[0].char.trim() !== "") {
1160
+ const U = Z, ie = u[U[0].spanIdx], G = b(
1172
1161
  g,
1173
- M,
1174
- ee,
1175
- V
1162
+ z,
1163
+ ie,
1164
+ U
1176
1165
  );
1177
1166
  if (G) {
1178
- const { left: Z, top: Y } = G;
1179
- if (_.find((se) => se.left === Z && se.top === Y))
1167
+ const { left: K, top: Y } = G;
1168
+ if (w.find((ee) => ee.left === K && ee.top === Y))
1180
1169
  continue;
1181
- _.push({ ...G, highlightColor: W.color });
1170
+ w.push({ ...G, highlightColor: k.color });
1182
1171
  }
1183
1172
  }
1184
1173
  }
1185
- }), _.sort(Xo), _;
1174
+ }), w.sort(Xo), w;
1186
1175
  };
1187
- return A(() => {
1176
+ return D(() => {
1188
1177
  (async () => {
1189
1178
  if (!(!i || i.length === 0))
1190
1179
  try {
1191
1180
  await v(t, i);
1192
- } catch (h) {
1193
- console.error(h);
1181
+ } catch (p) {
1182
+ console.error(p);
1194
1183
  }
1195
1184
  })();
1196
- }, [c, i, t, n, e]), /* @__PURE__ */ s(he, { children: /* @__PURE__ */ s("div", { ref: l, "data-rp": `page-${t}-textHighlightLayer`, children: m.map((g, h) => /* @__PURE__ */ s(
1185
+ }, [c, i, t, n, e]), /* @__PURE__ */ a(pe, { children: /* @__PURE__ */ a("div", { ref: l, "data-rp": `page-${t}-textHighlightLayer`, children: m.map((g, p) => /* @__PURE__ */ a(
1197
1186
  "div",
1198
1187
  {
1199
1188
  className: $r["rp-text-highlight"],
@@ -1205,16 +1194,16 @@ const Hr = (t) => {
1205
1194
  backgroundColor: g.highlightColor
1206
1195
  }
1207
1196
  },
1208
- h
1197
+ p
1209
1198
  )) }) });
1210
1199
  }, xt = et((t, e) => {
1211
- const { pageNumber: n, style: r, ...o } = t, { pages: i } = oe(), { pageRotate: c } = Je(), { textLayer: l } = uo(), { currentZoom: d } = wt(), { LoaderImageComponent: f } = _t(), m = k(i.get(n)), [P, p] = $(!1), T = k(null), [C, b] = $({
1200
+ const { pageNumber: n, style: r, ...o } = t, { pages: i } = oe(), { pageRotate: c } = Je(), { textLayer: l } = uo(), { currentZoom: d } = wt(), { LoaderImageComponent: f } = _t(), m = W(i.get(n)), [P, h] = q(!1), T = W(null), [C, b] = q({
1212
1201
  width: 0,
1213
1202
  height: 0
1214
1203
  });
1215
1204
  on(e, () => T.current);
1216
- const v = F(() => m.current ? c[n] : 0, [n, c]);
1217
- A(() => {
1205
+ const v = M(() => m.current ? c[n] : 0, [n, c]);
1206
+ D(() => {
1218
1207
  if (i && (m.current = i.get(n), m.current)) {
1219
1208
  const u = m.current.page.getViewport({
1220
1209
  scale: d,
@@ -1223,7 +1212,7 @@ const Hr = (t) => {
1223
1212
  b(u);
1224
1213
  }
1225
1214
  }, [i, n, v, d]);
1226
- const y = F(() => {
1215
+ const y = M(() => {
1227
1216
  switch (v) {
1228
1217
  case 90:
1229
1218
  return `${C.width / 2}px ${C.width / 2}px`;
@@ -1233,12 +1222,12 @@ const Hr = (t) => {
1233
1222
  default:
1234
1223
  return "center";
1235
1224
  }
1236
- }, [v, C]), g = O(() => {
1237
- p(!0);
1238
- }, []), h = O(() => {
1239
- p(!1);
1225
+ }, [v, C]), g = E(() => {
1226
+ h(!0);
1227
+ }, []), p = E(() => {
1228
+ h(!1);
1240
1229
  }, []);
1241
- return /* @__PURE__ */ s(
1230
+ return /* @__PURE__ */ a(
1242
1231
  "div",
1243
1232
  {
1244
1233
  ref: T,
@@ -1251,7 +1240,7 @@ const Hr = (t) => {
1251
1240
  "--rp-page-rotate-translate": `${y}`,
1252
1241
  "--scale-factor": d
1253
1242
  },
1254
- className: at["rp-page-wrapper"],
1243
+ className: st["rp-page-wrapper"],
1255
1244
  children: /* @__PURE__ */ H(
1256
1245
  "div",
1257
1246
  {
@@ -1259,14 +1248,14 @@ const Hr = (t) => {
1259
1248
  width: `${C.width}px`,
1260
1249
  height: `${C.height}px`
1261
1250
  },
1262
- className: at["rp-page"],
1251
+ className: st["rp-page"],
1263
1252
  children: [
1264
- /* @__PURE__ */ s(Ar, { onLoading: g, onLoaded: h, pageNumber: n }),
1265
- P && f && /* @__PURE__ */ s("div", { className: at["rp-loader-wrapper"], children: /* @__PURE__ */ s(f, {}) }),
1266
- /* @__PURE__ */ s(Yo, { pageNumber: n }),
1267
- l && /* @__PURE__ */ s(Fr, { pageNumber: n }),
1268
- /* @__PURE__ */ s(qr, { pageNumber: n, viewport: C }),
1269
- /* @__PURE__ */ s(Hr, { pageNumber: n })
1253
+ /* @__PURE__ */ a(Ar, { onLoading: g, onLoaded: p, pageNumber: n }),
1254
+ P && f && /* @__PURE__ */ a("div", { className: st["rp-loader-wrapper"], children: /* @__PURE__ */ a(f, {}) }),
1255
+ /* @__PURE__ */ a(Yo, { pageNumber: n }),
1256
+ l && /* @__PURE__ */ a(Mr, { pageNumber: n }),
1257
+ /* @__PURE__ */ a(qr, { pageNumber: n, viewport: C }),
1258
+ /* @__PURE__ */ a(Hr, { pageNumber: n })
1270
1259
  ]
1271
1260
  }
1272
1261
  )
@@ -1376,211 +1365,211 @@ var Zr = 150, Xr = function(e) {
1376
1365
  }, Be = null, je = null, Ke = null;
1377
1366
  process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Be = /* @__PURE__ */ new WeakSet(), je = /* @__PURE__ */ new WeakSet(), Ke = /* @__PURE__ */ new WeakSet());
1378
1367
  function Qr(t) {
1379
- var e, n = t.getColumnOffset, r = t.getColumnStartIndexForOffset, o = t.getColumnStopIndexForStartIndex, i = t.getColumnWidth, c = t.getEstimatedTotalHeight, l = t.getEstimatedTotalWidth, d = t.getOffsetForColumnAndAlignment, f = t.getOffsetForRowAndAlignment, m = t.getRowHeight, P = t.getRowOffset, p = t.getRowStartIndexForOffset, T = t.getRowStopIndexForStartIndex, C = t.initInstanceProps, b = t.shouldResetStyleCacheOnItemSizeChange, v = t.validateProps;
1368
+ var e, n = t.getColumnOffset, r = t.getColumnStartIndexForOffset, o = t.getColumnStopIndexForStartIndex, i = t.getColumnWidth, c = t.getEstimatedTotalHeight, l = t.getEstimatedTotalWidth, d = t.getOffsetForColumnAndAlignment, f = t.getOffsetForRowAndAlignment, m = t.getRowHeight, P = t.getRowOffset, h = t.getRowStartIndexForOffset, T = t.getRowStopIndexForStartIndex, C = t.initInstanceProps, b = t.shouldResetStyleCacheOnItemSizeChange, v = t.validateProps;
1380
1369
  return e = /* @__PURE__ */ function(y) {
1381
1370
  Gr(g, y);
1382
1371
  function g(u) {
1383
- var a;
1384
- return a = y.call(this, u) || this, a._instanceProps = C(a.props, Ht(a)), a._resetIsScrollingTimeoutId = null, a._outerRef = void 0, a.state = {
1385
- instance: Ht(a),
1372
+ var s;
1373
+ return s = y.call(this, u) || this, s._instanceProps = C(s.props, Ht(s)), s._resetIsScrollingTimeoutId = null, s._outerRef = void 0, s.state = {
1374
+ instance: Ht(s),
1386
1375
  isScrolling: !1,
1387
1376
  horizontalScrollDirection: "forward",
1388
- scrollLeft: typeof a.props.initialScrollLeft == "number" ? a.props.initialScrollLeft : 0,
1389
- scrollTop: typeof a.props.initialScrollTop == "number" ? a.props.initialScrollTop : 0,
1377
+ scrollLeft: typeof s.props.initialScrollLeft == "number" ? s.props.initialScrollLeft : 0,
1378
+ scrollTop: typeof s.props.initialScrollTop == "number" ? s.props.initialScrollTop : 0,
1390
1379
  scrollUpdateWasRequested: !1,
1391
1380
  verticalScrollDirection: "forward"
1392
- }, a._callOnItemsRendered = void 0, a._callOnItemsRendered = ct(function(w, _, x, I, S, R, N, z) {
1393
- return a.props.onItemsRendered({
1394
- overscanColumnStartIndex: w,
1395
- overscanColumnStopIndex: _,
1381
+ }, s._callOnItemsRendered = void 0, s._callOnItemsRendered = ct(function(_, w, x, I, S, R, N, A) {
1382
+ return s.props.onItemsRendered({
1383
+ overscanColumnStartIndex: _,
1384
+ overscanColumnStopIndex: w,
1396
1385
  overscanRowStartIndex: x,
1397
1386
  overscanRowStopIndex: I,
1398
1387
  visibleColumnStartIndex: S,
1399
1388
  visibleColumnStopIndex: R,
1400
1389
  visibleRowStartIndex: N,
1401
- visibleRowStopIndex: z
1390
+ visibleRowStopIndex: A
1402
1391
  });
1403
- }), a._callOnScroll = void 0, a._callOnScroll = ct(function(w, _, x, I, S) {
1404
- return a.props.onScroll({
1392
+ }), s._callOnScroll = void 0, s._callOnScroll = ct(function(_, w, x, I, S) {
1393
+ return s.props.onScroll({
1405
1394
  horizontalScrollDirection: x,
1406
- scrollLeft: w,
1407
- scrollTop: _,
1395
+ scrollLeft: _,
1396
+ scrollTop: w,
1408
1397
  verticalScrollDirection: I,
1409
1398
  scrollUpdateWasRequested: S
1410
1399
  });
1411
- }), a._getItemStyle = void 0, a._getItemStyle = function(w, _) {
1412
- var x = a.props, I = x.columnWidth, S = x.direction, R = x.rowHeight, N = a._getItemStyleCache(b && I, b && S, b && R), z = w + ":" + _, M;
1413
- if (N.hasOwnProperty(z))
1414
- M = N[z];
1400
+ }), s._getItemStyle = void 0, s._getItemStyle = function(_, w) {
1401
+ var x = s.props, I = x.columnWidth, S = x.direction, R = x.rowHeight, N = s._getItemStyleCache(b && I, b && S, b && R), A = _ + ":" + w, z;
1402
+ if (N.hasOwnProperty(A))
1403
+ z = N[A];
1415
1404
  else {
1416
- var D = n(a.props, _, a._instanceProps), L = S === "rtl";
1417
- N[z] = M = {
1405
+ var L = n(s.props, w, s._instanceProps), O = S === "rtl";
1406
+ N[A] = z = {
1418
1407
  position: "absolute",
1419
- left: L ? void 0 : D,
1420
- right: L ? D : void 0,
1421
- top: P(a.props, w, a._instanceProps),
1422
- height: m(a.props, w, a._instanceProps),
1423
- width: i(a.props, _, a._instanceProps)
1408
+ left: O ? void 0 : L,
1409
+ right: O ? L : void 0,
1410
+ top: P(s.props, _, s._instanceProps),
1411
+ height: m(s.props, _, s._instanceProps),
1412
+ width: i(s.props, w, s._instanceProps)
1424
1413
  };
1425
1414
  }
1426
- return M;
1427
- }, a._getItemStyleCache = void 0, a._getItemStyleCache = ct(function(w, _, x) {
1415
+ return z;
1416
+ }, s._getItemStyleCache = void 0, s._getItemStyleCache = ct(function(_, w, x) {
1428
1417
  return {};
1429
- }), a._onScroll = function(w) {
1430
- var _ = w.currentTarget, x = _.clientHeight, I = _.clientWidth, S = _.scrollLeft, R = _.scrollTop, N = _.scrollHeight, z = _.scrollWidth;
1431
- a.setState(function(M) {
1432
- if (M.scrollLeft === S && M.scrollTop === R)
1418
+ }), s._onScroll = function(_) {
1419
+ var w = _.currentTarget, x = w.clientHeight, I = w.clientWidth, S = w.scrollLeft, R = w.scrollTop, N = w.scrollHeight, A = w.scrollWidth;
1420
+ s.setState(function(z) {
1421
+ if (z.scrollLeft === S && z.scrollTop === R)
1433
1422
  return null;
1434
- var D = a.props.direction, L = S;
1435
- if (D === "rtl")
1423
+ var L = s.props.direction, O = S;
1424
+ if (L === "rtl")
1436
1425
  switch (Vt()) {
1437
1426
  case "negative":
1438
- L = -S;
1427
+ O = -S;
1439
1428
  break;
1440
1429
  case "positive-descending":
1441
- L = z - I - S;
1430
+ O = A - I - S;
1442
1431
  break;
1443
1432
  }
1444
- L = Math.max(0, Math.min(L, z - I));
1445
- var E = Math.max(0, Math.min(R, N - x));
1433
+ O = Math.max(0, Math.min(O, A - I));
1434
+ var F = Math.max(0, Math.min(R, N - x));
1446
1435
  return {
1447
1436
  isScrolling: !0,
1448
- horizontalScrollDirection: M.scrollLeft < S ? "forward" : "backward",
1449
- scrollLeft: L,
1450
- scrollTop: E,
1451
- verticalScrollDirection: M.scrollTop < R ? "forward" : "backward",
1437
+ horizontalScrollDirection: z.scrollLeft < S ? "forward" : "backward",
1438
+ scrollLeft: O,
1439
+ scrollTop: F,
1440
+ verticalScrollDirection: z.scrollTop < R ? "forward" : "backward",
1452
1441
  scrollUpdateWasRequested: !1
1453
1442
  };
1454
- }, a._resetIsScrollingDebounced);
1455
- }, a._outerRefSetter = function(w) {
1456
- var _ = a.props.outerRef;
1457
- a._outerRef = w, typeof _ == "function" ? _(w) : _ != null && typeof _ == "object" && _.hasOwnProperty("current") && (_.current = w);
1458
- }, a._resetIsScrollingDebounced = function() {
1459
- a._resetIsScrollingTimeoutId !== null && Ut(a._resetIsScrollingTimeoutId), a._resetIsScrollingTimeoutId = jr(a._resetIsScrolling, Zr);
1460
- }, a._resetIsScrolling = function() {
1461
- a._resetIsScrollingTimeoutId = null, a.setState({
1443
+ }, s._resetIsScrollingDebounced);
1444
+ }, s._outerRefSetter = function(_) {
1445
+ var w = s.props.outerRef;
1446
+ s._outerRef = _, typeof w == "function" ? w(_) : w != null && typeof w == "object" && w.hasOwnProperty("current") && (w.current = _);
1447
+ }, s._resetIsScrollingDebounced = function() {
1448
+ s._resetIsScrollingTimeoutId !== null && Ut(s._resetIsScrollingTimeoutId), s._resetIsScrollingTimeoutId = jr(s._resetIsScrolling, Zr);
1449
+ }, s._resetIsScrolling = function() {
1450
+ s._resetIsScrollingTimeoutId = null, s.setState({
1462
1451
  isScrolling: !1
1463
1452
  }, function() {
1464
- a._getItemStyleCache(-1);
1453
+ s._getItemStyleCache(-1);
1465
1454
  });
1466
- }, a;
1455
+ }, s;
1467
1456
  }
1468
- g.getDerivedStateFromProps = function(a, w) {
1469
- return Yr(a, w), v(a), null;
1457
+ g.getDerivedStateFromProps = function(s, _) {
1458
+ return Yr(s, _), v(s), null;
1470
1459
  };
1471
- var h = g.prototype;
1472
- return h.scrollTo = function(a) {
1473
- var w = a.scrollLeft, _ = a.scrollTop;
1474
- w !== void 0 && (w = Math.max(0, w)), _ !== void 0 && (_ = Math.max(0, _)), this.setState(function(x) {
1475
- return w === void 0 && (w = x.scrollLeft), _ === void 0 && (_ = x.scrollTop), x.scrollLeft === w && x.scrollTop === _ ? null : {
1476
- horizontalScrollDirection: x.scrollLeft < w ? "forward" : "backward",
1477
- scrollLeft: w,
1478
- scrollTop: _,
1460
+ var p = g.prototype;
1461
+ return p.scrollTo = function(s) {
1462
+ var _ = s.scrollLeft, w = s.scrollTop;
1463
+ _ !== void 0 && (_ = Math.max(0, _)), w !== void 0 && (w = Math.max(0, w)), this.setState(function(x) {
1464
+ return _ === void 0 && (_ = x.scrollLeft), w === void 0 && (w = x.scrollTop), x.scrollLeft === _ && x.scrollTop === w ? null : {
1465
+ horizontalScrollDirection: x.scrollLeft < _ ? "forward" : "backward",
1466
+ scrollLeft: _,
1467
+ scrollTop: w,
1479
1468
  scrollUpdateWasRequested: !0,
1480
- verticalScrollDirection: x.scrollTop < _ ? "forward" : "backward"
1469
+ verticalScrollDirection: x.scrollTop < w ? "forward" : "backward"
1481
1470
  };
1482
1471
  }, this._resetIsScrollingDebounced);
1483
- }, h.scrollToItem = function(a) {
1484
- var w = a.align, _ = w === void 0 ? "auto" : w, x = a.columnIndex, I = a.rowIndex, S = this.props, R = S.columnCount, N = S.height, z = S.rowCount, M = S.width, D = this.state, L = D.scrollLeft, E = D.scrollTop, q = Kr();
1485
- x !== void 0 && (x = Math.max(0, Math.min(x, R - 1))), I !== void 0 && (I = Math.max(0, Math.min(I, z - 1)));
1486
- var W = c(this.props, this._instanceProps), U = l(this.props, this._instanceProps), j = U > M ? q : 0, V = W > N ? q : 0;
1472
+ }, p.scrollToItem = function(s) {
1473
+ var _ = s.align, w = _ === void 0 ? "auto" : _, x = s.columnIndex, I = s.rowIndex, S = this.props, R = S.columnCount, N = S.height, A = S.rowCount, z = S.width, L = this.state, O = L.scrollLeft, F = L.scrollTop, $ = Kr();
1474
+ x !== void 0 && (x = Math.max(0, Math.min(x, R - 1))), I !== void 0 && (I = Math.max(0, Math.min(I, A - 1)));
1475
+ var k = c(this.props, this._instanceProps), B = l(this.props, this._instanceProps), Z = B > z ? $ : 0, U = k > N ? $ : 0;
1487
1476
  this.scrollTo({
1488
- scrollLeft: x !== void 0 ? d(this.props, x, _, L, this._instanceProps, V) : L,
1489
- scrollTop: I !== void 0 ? f(this.props, I, _, E, this._instanceProps, j) : E
1477
+ scrollLeft: x !== void 0 ? d(this.props, x, w, O, this._instanceProps, U) : O,
1478
+ scrollTop: I !== void 0 ? f(this.props, I, w, F, this._instanceProps, Z) : F
1490
1479
  });
1491
- }, h.componentDidMount = function() {
1492
- var a = this.props, w = a.initialScrollLeft, _ = a.initialScrollTop;
1480
+ }, p.componentDidMount = function() {
1481
+ var s = this.props, _ = s.initialScrollLeft, w = s.initialScrollTop;
1493
1482
  if (this._outerRef != null) {
1494
1483
  var x = this._outerRef;
1495
- typeof w == "number" && (x.scrollLeft = w), typeof _ == "number" && (x.scrollTop = _);
1484
+ typeof _ == "number" && (x.scrollLeft = _), typeof w == "number" && (x.scrollTop = w);
1496
1485
  }
1497
1486
  this._callPropsCallbacks();
1498
- }, h.componentDidUpdate = function() {
1499
- var a = this.props.direction, w = this.state, _ = w.scrollLeft, x = w.scrollTop, I = w.scrollUpdateWasRequested;
1487
+ }, p.componentDidUpdate = function() {
1488
+ var s = this.props.direction, _ = this.state, w = _.scrollLeft, x = _.scrollTop, I = _.scrollUpdateWasRequested;
1500
1489
  if (I && this._outerRef != null) {
1501
1490
  var S = this._outerRef;
1502
- if (a === "rtl")
1491
+ if (s === "rtl")
1503
1492
  switch (Vt()) {
1504
1493
  case "negative":
1505
- S.scrollLeft = -_;
1494
+ S.scrollLeft = -w;
1506
1495
  break;
1507
1496
  case "positive-ascending":
1508
- S.scrollLeft = _;
1497
+ S.scrollLeft = w;
1509
1498
  break;
1510
1499
  default:
1511
1500
  var R = S.clientWidth, N = S.scrollWidth;
1512
- S.scrollLeft = N - R - _;
1501
+ S.scrollLeft = N - R - w;
1513
1502
  break;
1514
1503
  }
1515
1504
  else
1516
- S.scrollLeft = Math.max(0, _);
1505
+ S.scrollLeft = Math.max(0, w);
1517
1506
  S.scrollTop = Math.max(0, x);
1518
1507
  }
1519
1508
  this._callPropsCallbacks();
1520
- }, h.componentWillUnmount = function() {
1509
+ }, p.componentWillUnmount = function() {
1521
1510
  this._resetIsScrollingTimeoutId !== null && Ut(this._resetIsScrollingTimeoutId);
1522
- }, h.render = function() {
1523
- var a = this.props, w = a.children, _ = a.className, x = a.columnCount, I = a.direction, S = a.height, R = a.innerRef, N = a.innerElementType, z = a.innerTagName, M = a.itemData, D = a.itemKey, L = D === void 0 ? Xr : D, E = a.outerElementType, q = a.outerTagName, W = a.rowCount, U = a.style, j = a.useIsScrolling, V = a.width, ee = this.state.isScrolling, G = this._getHorizontalRangeToRender(), Z = G[0], Y = G[1], re = this._getVerticalRangeToRender(), se = re[0], J = re[1], ue = [];
1524
- if (x > 0 && W)
1525
- for (var ie = se; ie <= J; ie++)
1526
- for (var me = Z; me <= Y; me++)
1527
- ue.push(Ve(w, {
1528
- columnIndex: me,
1529
- data: M,
1530
- isScrolling: j ? ee : void 0,
1531
- key: L({
1532
- columnIndex: me,
1533
- data: M,
1534
- rowIndex: ie
1511
+ }, p.render = function() {
1512
+ var s = this.props, _ = s.children, w = s.className, x = s.columnCount, I = s.direction, S = s.height, R = s.innerRef, N = s.innerElementType, A = s.innerTagName, z = s.itemData, L = s.itemKey, O = L === void 0 ? Xr : L, F = s.outerElementType, $ = s.outerTagName, k = s.rowCount, B = s.style, Z = s.useIsScrolling, U = s.width, ie = this.state.isScrolling, G = this._getHorizontalRangeToRender(), K = G[0], Y = G[1], J = this._getVerticalRangeToRender(), ee = J[0], re = J[1], ve = [];
1513
+ if (x > 0 && k)
1514
+ for (var de = ee; de <= re; de++)
1515
+ for (var Pe = K; Pe <= Y; Pe++)
1516
+ ve.push(Ve(_, {
1517
+ columnIndex: Pe,
1518
+ data: z,
1519
+ isScrolling: Z ? ie : void 0,
1520
+ key: O({
1521
+ columnIndex: Pe,
1522
+ data: z,
1523
+ rowIndex: de
1535
1524
  }),
1536
- rowIndex: ie,
1537
- style: this._getItemStyle(ie, me)
1525
+ rowIndex: de,
1526
+ style: this._getItemStyle(de, Pe)
1538
1527
  }));
1539
- var Fe = c(this.props, this._instanceProps), nt = l(this.props, this._instanceProps);
1540
- return Ve(E || q || "div", {
1541
- className: _,
1528
+ var Me = c(this.props, this._instanceProps), nt = l(this.props, this._instanceProps);
1529
+ return Ve(F || $ || "div", {
1530
+ className: w,
1542
1531
  onScroll: this._onScroll,
1543
1532
  ref: this._outerRefSetter,
1544
1533
  style: ft({
1545
1534
  position: "relative",
1546
1535
  height: S,
1547
- width: V,
1536
+ width: U,
1548
1537
  overflow: "auto",
1549
1538
  WebkitOverflowScrolling: "touch",
1550
1539
  willChange: "transform",
1551
1540
  direction: I
1552
- }, U)
1553
- }, Ve(N || z || "div", {
1554
- children: ue,
1541
+ }, B)
1542
+ }, Ve(N || A || "div", {
1543
+ children: ve,
1555
1544
  ref: R,
1556
1545
  style: {
1557
- height: Fe,
1558
- pointerEvents: ee ? "none" : void 0,
1546
+ height: Me,
1547
+ pointerEvents: ie ? "none" : void 0,
1559
1548
  width: nt
1560
1549
  }
1561
1550
  }));
1562
- }, h._callPropsCallbacks = function() {
1563
- var a = this.props, w = a.columnCount, _ = a.onItemsRendered, x = a.onScroll, I = a.rowCount;
1564
- if (typeof _ == "function" && w > 0 && I > 0) {
1565
- var S = this._getHorizontalRangeToRender(), R = S[0], N = S[1], z = S[2], M = S[3], D = this._getVerticalRangeToRender(), L = D[0], E = D[1], q = D[2], W = D[3];
1566
- this._callOnItemsRendered(R, N, L, E, z, M, q, W);
1551
+ }, p._callPropsCallbacks = function() {
1552
+ var s = this.props, _ = s.columnCount, w = s.onItemsRendered, x = s.onScroll, I = s.rowCount;
1553
+ if (typeof w == "function" && _ > 0 && I > 0) {
1554
+ var S = this._getHorizontalRangeToRender(), R = S[0], N = S[1], A = S[2], z = S[3], L = this._getVerticalRangeToRender(), O = L[0], F = L[1], $ = L[2], k = L[3];
1555
+ this._callOnItemsRendered(R, N, O, F, A, z, $, k);
1567
1556
  }
1568
1557
  if (typeof x == "function") {
1569
- var U = this.state, j = U.horizontalScrollDirection, V = U.scrollLeft, ee = U.scrollTop, G = U.scrollUpdateWasRequested, Z = U.verticalScrollDirection;
1570
- this._callOnScroll(V, ee, j, Z, G);
1558
+ var B = this.state, Z = B.horizontalScrollDirection, U = B.scrollLeft, ie = B.scrollTop, G = B.scrollUpdateWasRequested, K = B.verticalScrollDirection;
1559
+ this._callOnScroll(U, ie, Z, K, G);
1571
1560
  }
1572
- }, h._getHorizontalRangeToRender = function() {
1573
- var a = this.props, w = a.columnCount, _ = a.overscanColumnCount, x = a.overscanColumnsCount, I = a.overscanCount, S = a.rowCount, R = this.state, N = R.horizontalScrollDirection, z = R.isScrolling, M = R.scrollLeft, D = _ || x || I || 1;
1574
- if (w === 0 || S === 0)
1561
+ }, p._getHorizontalRangeToRender = function() {
1562
+ var s = this.props, _ = s.columnCount, w = s.overscanColumnCount, x = s.overscanColumnsCount, I = s.overscanCount, S = s.rowCount, R = this.state, N = R.horizontalScrollDirection, A = R.isScrolling, z = R.scrollLeft, L = w || x || I || 1;
1563
+ if (_ === 0 || S === 0)
1575
1564
  return [0, 0, 0, 0];
1576
- var L = r(this.props, M, this._instanceProps), E = o(this.props, L, M, this._instanceProps), q = !z || N === "backward" ? Math.max(1, D) : 1, W = !z || N === "forward" ? Math.max(1, D) : 1;
1577
- return [Math.max(0, L - q), Math.max(0, Math.min(w - 1, E + W)), L, E];
1578
- }, h._getVerticalRangeToRender = function() {
1579
- var a = this.props, w = a.columnCount, _ = a.overscanCount, x = a.overscanRowCount, I = a.overscanRowsCount, S = a.rowCount, R = this.state, N = R.isScrolling, z = R.verticalScrollDirection, M = R.scrollTop, D = x || I || _ || 1;
1580
- if (w === 0 || S === 0)
1565
+ var O = r(this.props, z, this._instanceProps), F = o(this.props, O, z, this._instanceProps), $ = !A || N === "backward" ? Math.max(1, L) : 1, k = !A || N === "forward" ? Math.max(1, L) : 1;
1566
+ return [Math.max(0, O - $), Math.max(0, Math.min(_ - 1, F + k)), O, F];
1567
+ }, p._getVerticalRangeToRender = function() {
1568
+ var s = this.props, _ = s.columnCount, w = s.overscanCount, x = s.overscanRowCount, I = s.overscanRowsCount, S = s.rowCount, R = this.state, N = R.isScrolling, A = R.verticalScrollDirection, z = R.scrollTop, L = x || I || w || 1;
1569
+ if (_ === 0 || S === 0)
1581
1570
  return [0, 0, 0, 0];
1582
- var L = p(this.props, M, this._instanceProps), E = T(this.props, L, M, this._instanceProps), q = !N || z === "backward" ? Math.max(1, D) : 1, W = !N || z === "forward" ? Math.max(1, D) : 1;
1583
- return [Math.max(0, L - q), Math.max(0, Math.min(S - 1, E + W)), L, E];
1571
+ var O = h(this.props, z, this._instanceProps), F = T(this.props, O, z, this._instanceProps), $ = !N || A === "backward" ? Math.max(1, L) : 1, k = !N || A === "forward" ? Math.max(1, L) : 1;
1572
+ return [Math.max(0, O - $), Math.max(0, Math.min(S - 1, F + k)), O, F];
1584
1573
  }, g;
1585
1574
  }(oo), e.defaultProps = {
1586
1575
  direction: "ltr",
@@ -1589,9 +1578,9 @@ function Qr(t) {
1589
1578
  }, e;
1590
1579
  }
1591
1580
  var Yr = function(e, n) {
1592
- var r = e.children, o = e.direction, i = e.height, c = e.innerTagName, l = e.outerTagName, d = e.overscanColumnsCount, f = e.overscanCount, m = e.overscanRowsCount, P = e.width, p = n.instance;
1581
+ var r = e.children, o = e.direction, i = e.height, c = e.innerTagName, l = e.outerTagName, d = e.overscanColumnsCount, f = e.overscanCount, m = e.overscanRowsCount, P = e.width, h = n.instance;
1593
1582
  if (process.env.NODE_ENV !== "production") {
1594
- if (typeof f == "number" && Be && !Be.has(p) && (Be.add(p), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof m == "number") && je && !je.has(p) && (je.add(p), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || l != null) && Ke && !Ke.has(p) && (Ke.add(p), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
1583
+ if (typeof f == "number" && Be && !Be.has(h) && (Be.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof m == "number") && je && !je.has(h) && (je.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || l != null) && Ke && !Ke.has(h) && (Ke.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
1595
1584
  throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
1596
1585
  switch (o) {
1597
1586
  case "ltr":
@@ -1621,7 +1610,7 @@ var Yr = function(e, n) {
1621
1610
  }
1622
1611
  var f = r - c - 1, m = f * i;
1623
1612
  return l + m;
1624
- }, ve = function(e, n, r, o) {
1613
+ }, me = function(e, n, r, o) {
1625
1614
  var i, c, l;
1626
1615
  if (e === "column" ? (i = o.columnMetadataMap, c = n.columnWidth, l = o.lastMeasuredColumnIndex) : (i = o.rowMetadataMap, c = n.rowHeight, l = o.lastMeasuredRowIndex), r > l) {
1627
1616
  var d = 0;
@@ -1646,39 +1635,39 @@ var Yr = function(e, n) {
1646
1635
  return l >= o ? In(e, n, r, c, 0, o) : Jr(e, n, r, Math.max(0, c), o);
1647
1636
  }, In = function(e, n, r, o, i, c) {
1648
1637
  for (; i <= o; ) {
1649
- var l = i + Math.floor((o - i) / 2), d = ve(e, n, l, r).offset;
1638
+ var l = i + Math.floor((o - i) / 2), d = me(e, n, l, r).offset;
1650
1639
  if (d === c)
1651
1640
  return l;
1652
1641
  d < c ? i = l + 1 : d > c && (o = l - 1);
1653
1642
  }
1654
1643
  return i > 0 ? i - 1 : 0;
1655
1644
  }, Jr = function(e, n, r, o, i) {
1656
- for (var c = e === "column" ? n.columnCount : n.rowCount, l = 1; o < c && ve(e, n, o, r).offset < i; )
1645
+ for (var c = e === "column" ? n.columnCount : n.rowCount, l = 1; o < c && me(e, n, o, r).offset < i; )
1657
1646
  o += l, l *= 2;
1658
1647
  return In(e, n, r, Math.min(o, c - 1), Math.floor(o / 2), i);
1659
1648
  }, Kt = function(e, n, r, o, i, c, l) {
1660
- var d = e === "column" ? n.width : n.height, f = ve(e, n, r, c), m = e === "column" ? Sn(n, c) : xn(n, c), P = Math.max(0, Math.min(m - d, f.offset)), p = Math.max(0, f.offset - d + l + f.size);
1661
- switch (o === "smart" && (i >= p - d && i <= P + d ? o = "auto" : o = "center"), o) {
1649
+ var d = e === "column" ? n.width : n.height, f = me(e, n, r, c), m = e === "column" ? Sn(n, c) : xn(n, c), P = Math.max(0, Math.min(m - d, f.offset)), h = Math.max(0, f.offset - d + l + f.size);
1650
+ switch (o === "smart" && (i >= h - d && i <= P + d ? o = "auto" : o = "center"), o) {
1662
1651
  case "start":
1663
1652
  return P;
1664
1653
  case "end":
1665
- return p;
1654
+ return h;
1666
1655
  case "center":
1667
- return Math.round(p + (P - p) / 2);
1656
+ return Math.round(h + (P - h) / 2);
1668
1657
  case "auto":
1669
1658
  default:
1670
- return i >= p && i <= P ? i : p > P || i < p ? p : P;
1659
+ return i >= h && i <= P ? i : h > P || i < h ? h : P;
1671
1660
  }
1672
1661
  }, ei = /* @__PURE__ */ Qr({
1673
1662
  getColumnOffset: function(e, n, r) {
1674
- return ve("column", e, n, r).offset;
1663
+ return me("column", e, n, r).offset;
1675
1664
  },
1676
1665
  getColumnStartIndexForOffset: function(e, n, r) {
1677
1666
  return jt("column", e, r, n);
1678
1667
  },
1679
1668
  getColumnStopIndexForStartIndex: function(e, n, r, o) {
1680
- for (var i = e.columnCount, c = e.width, l = ve("column", e, n, o), d = r + c, f = l.offset + l.size, m = n; m < i - 1 && f < d; )
1681
- m++, f += ve("column", e, m, o).size;
1669
+ for (var i = e.columnCount, c = e.width, l = me("column", e, n, o), d = r + c, f = l.offset + l.size, m = n; m < i - 1 && f < d; )
1670
+ m++, f += me("column", e, m, o).size;
1682
1671
  return m;
1683
1672
  },
1684
1673
  getColumnWidth: function(e, n, r) {
@@ -1693,7 +1682,7 @@ var Yr = function(e, n) {
1693
1682
  return Kt("row", e, n, r, o, i, c);
1694
1683
  },
1695
1684
  getRowOffset: function(e, n, r) {
1696
- return ve("row", e, n, r).offset;
1685
+ return me("row", e, n, r).offset;
1697
1686
  },
1698
1687
  getRowHeight: function(e, n, r) {
1699
1688
  return r.rowMetadataMap[n].size;
@@ -1702,8 +1691,8 @@ var Yr = function(e, n) {
1702
1691
  return jt("row", e, r, n);
1703
1692
  },
1704
1693
  getRowStopIndexForStartIndex: function(e, n, r, o) {
1705
- for (var i = e.rowCount, c = e.height, l = ve("row", e, n, o), d = r + c, f = l.offset + l.size, m = n; m < i - 1 && f < d; )
1706
- m++, f += ve("row", e, m, o).size;
1694
+ for (var i = e.rowCount, c = e.height, l = me("row", e, n, o), d = r + c, f = l.offset + l.size, m = n; m < i - 1 && f < d; )
1695
+ m++, f += me("row", e, m, o).size;
1707
1696
  return m;
1708
1697
  },
1709
1698
  initInstanceProps: function(e, n) {
@@ -1757,35 +1746,35 @@ function oi(t, e) {
1757
1746
  return !Zt(n, o) && !Zt(r, i);
1758
1747
  }
1759
1748
  const ri = () => {
1760
- const { viewMode: t } = Me(), { scrollMode: e } = Ee(), { setColumnCount: n } = an(), { virtualScrollableElementRef: r } = Ye(), o = Ge(), i = F(() => o.heights.length, [o.heights]), c = F(() => e === ne.HORIZONTAL_SCROLLING ? i : t === Re.DUAL_PAGE ? 2 : 1, [t, e, e, i, r]), l = F(() => o.widths.reduce((v, y, g) => {
1761
- const h = g % c;
1762
- return (!v[h] || y > v[h]) && (v[h] = y), v;
1763
- }, []), [o.widths, c]), d = O(
1749
+ const { viewMode: t } = Fe(), { scrollMode: e } = Ee(), { setColumnCount: n } = sn(), { virtualScrollableElementRef: r } = Ye(), o = Ge(), i = M(() => o.heights.length, [o.heights]), c = M(() => e === ne.HORIZONTAL_SCROLLING ? i : t === Re.DUAL_PAGE ? 2 : 1, [t, e, e, i, r]), l = M(() => o.widths.reduce((v, y, g) => {
1750
+ const p = g % c;
1751
+ return (!v[p] || y > v[p]) && (v[p] = y), v;
1752
+ }, []), [o.widths, c]), d = E(
1764
1753
  (b) => {
1765
1754
  const v = b % l.length;
1766
1755
  return l[v] || 0;
1767
1756
  },
1768
1757
  [l]
1769
- ), f = O(
1758
+ ), f = E(
1770
1759
  (b) => {
1771
1760
  const v = Array.from({ length: c }, (y, g) => {
1772
- const h = b * c + g;
1773
- return o.heights[h] || 0;
1761
+ const p = b * c + g;
1762
+ return o.heights[p] || 0;
1774
1763
  });
1775
1764
  return Math.max(...v);
1776
1765
  },
1777
1766
  [o.heights, c]
1778
1767
  );
1779
- A(() => {
1768
+ D(() => {
1780
1769
  n(c);
1781
1770
  }, [c, n]);
1782
- const m = F(() => e === ne.HORIZONTAL_SCROLLING || e === ne.PAGE_SCROLLING ? 1 : Math.round(i / c), [c, i, e]), P = F(() => o.heights.reduce((b, v) => b + v, 0) / o.heights.length || 0, [o]), p = F(() => o.widths.reduce((b, v) => b + v, 0) / o.widths.length || 0, [o]), T = F(() => {
1771
+ const m = M(() => e === ne.HORIZONTAL_SCROLLING || e === ne.PAGE_SCROLLING ? 1 : Math.round(i / c), [c, i, e]), P = M(() => o.heights.reduce((b, v) => b + v, 0) / o.heights.length || 0, [o]), h = M(() => o.widths.reduce((b, v) => b + v, 0) / o.widths.length || 0, [o]), T = M(() => {
1783
1772
  const { rowsHeight: b, columnsWidth: v } = bt(o, c);
1784
1773
  return {
1785
1774
  rowsHeight: b,
1786
1775
  columnsWidth: v
1787
1776
  };
1788
- }, [o, c]), C = F(() => ({
1777
+ }, [o, c]), C = M(() => ({
1789
1778
  width: T.columnsWidth.reduce((b, v) => b + v, 0),
1790
1779
  height: T.rowsHeight.reduce((b, v) => b + v, 0)
1791
1780
  }), [T]);
@@ -1796,15 +1785,15 @@ const ri = () => {
1796
1785
  columnWidth: d,
1797
1786
  pageDimension: o,
1798
1787
  estimatedRowHeight: P,
1799
- estimatedColumnWidth: p,
1788
+ estimatedColumnWidth: h,
1800
1789
  gridDimension: T,
1801
1790
  totalDimension: C
1802
1791
  };
1803
1792
  };
1804
- let le;
1805
- typeof window < "u" ? le = window : typeof self < "u" ? le = self : le = global;
1793
+ let ce;
1794
+ typeof window < "u" ? ce = window : typeof self < "u" ? ce = self : ce = global;
1806
1795
  let gt = null, vt = null;
1807
- const Xt = 20, dt = le.clearTimeout, Qt = le.setTimeout, ut = le.cancelAnimationFrame || le.mozCancelAnimationFrame || le.webkitCancelAnimationFrame, Yt = le.requestAnimationFrame || le.mozRequestAnimationFrame || le.webkitRequestAnimationFrame;
1796
+ const Xt = 20, dt = ce.clearTimeout, Qt = ce.setTimeout, ut = ce.cancelAnimationFrame || ce.mozCancelAnimationFrame || ce.webkitCancelAnimationFrame, Yt = ce.requestAnimationFrame || ce.mozRequestAnimationFrame || ce.webkitRequestAnimationFrame;
1808
1797
  ut == null || Yt == null ? (gt = dt, vt = function(e) {
1809
1798
  return Qt(e, Xt);
1810
1799
  }) : (gt = function([e, n]) {
@@ -1822,8 +1811,8 @@ function ii(t) {
1822
1811
  const d = typeof document < "u" && document.attachEvent;
1823
1812
  if (!d) {
1824
1813
  c = function(y) {
1825
- const g = y.__resizeTriggers__, h = g.firstElementChild, u = g.lastElementChild, a = h.firstElementChild;
1826
- u.scrollLeft = u.scrollWidth, u.scrollTop = u.scrollHeight, a.style.width = h.offsetWidth + 1 + "px", a.style.height = h.offsetHeight + 1 + "px", h.scrollLeft = h.scrollWidth, h.scrollTop = h.scrollHeight;
1814
+ const g = y.__resizeTriggers__, p = g.firstElementChild, u = g.lastElementChild, s = p.firstElementChild;
1815
+ u.scrollLeft = u.scrollWidth, u.scrollTop = u.scrollHeight, s.style.width = p.offsetWidth + 1 + "px", s.style.height = p.offsetHeight + 1 + "px", p.scrollLeft = p.scrollWidth, p.scrollTop = p.scrollHeight;
1827
1816
  }, i = function(y) {
1828
1817
  return y.offsetWidth !== y.__resizeLast__.width || y.offsetHeight !== y.__resizeLast__.height;
1829
1818
  }, l = function(y) {
@@ -1831,65 +1820,65 @@ function ii(t) {
1831
1820
  return;
1832
1821
  const g = this;
1833
1822
  c(this), this.__resizeRAF__ && gt(this.__resizeRAF__), this.__resizeRAF__ = vt(function() {
1834
- i(g) && (g.__resizeLast__.width = g.offsetWidth, g.__resizeLast__.height = g.offsetHeight, g.__resizeListeners__.forEach(function(a) {
1835
- a.call(g, y);
1823
+ i(g) && (g.__resizeLast__.width = g.offsetWidth, g.__resizeLast__.height = g.offsetHeight, g.__resizeListeners__.forEach(function(s) {
1824
+ s.call(g, y);
1836
1825
  }));
1837
1826
  });
1838
1827
  };
1839
- let p = !1, T = "";
1828
+ let h = !1, T = "";
1840
1829
  r = "animationstart";
1841
1830
  const C = "Webkit Moz O ms".split(" ");
1842
1831
  let b = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), v = "";
1843
1832
  {
1844
1833
  const y = document.createElement("fakeelement");
1845
- if (y.style.animationName !== void 0 && (p = !0), p === !1) {
1834
+ if (y.style.animationName !== void 0 && (h = !0), h === !1) {
1846
1835
  for (let g = 0; g < C.length; g++)
1847
1836
  if (y.style[C[g] + "AnimationName"] !== void 0) {
1848
- v = C[g], T = "-" + v.toLowerCase() + "-", r = b[g], p = !0;
1837
+ v = C[g], T = "-" + v.toLowerCase() + "-", r = b[g], h = !0;
1849
1838
  break;
1850
1839
  }
1851
1840
  }
1852
1841
  }
1853
1842
  n = "resizeanim", e = "@" + T + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", o = T + "animation: 1ms " + n + "; ";
1854
1843
  }
1855
- const f = function(p) {
1856
- if (!p.getElementById("detectElementResize")) {
1857
- const T = (e || "") + ".resize-triggers { " + (o || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', C = p.head || p.getElementsByTagName("head")[0], b = p.createElement("style");
1858
- b.id = "detectElementResize", b.type = "text/css", t != null && b.setAttribute("nonce", t), b.styleSheet ? b.styleSheet.cssText = T : b.appendChild(p.createTextNode(T)), C.appendChild(b);
1844
+ const f = function(h) {
1845
+ if (!h.getElementById("detectElementResize")) {
1846
+ const T = (e || "") + ".resize-triggers { " + (o || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', C = h.head || h.getElementsByTagName("head")[0], b = h.createElement("style");
1847
+ b.id = "detectElementResize", b.type = "text/css", t != null && b.setAttribute("nonce", t), b.styleSheet ? b.styleSheet.cssText = T : b.appendChild(h.createTextNode(T)), C.appendChild(b);
1859
1848
  }
1860
1849
  };
1861
1850
  return {
1862
- addResizeListener: function(p, T) {
1851
+ addResizeListener: function(h, T) {
1863
1852
  if (d)
1864
- p.attachEvent("onresize", T);
1853
+ h.attachEvent("onresize", T);
1865
1854
  else {
1866
- if (!p.__resizeTriggers__) {
1867
- const C = p.ownerDocument, b = le.getComputedStyle(p);
1868
- b && b.position === "static" && (p.style.position = "relative"), f(C), p.__resizeLast__ = {}, p.__resizeListeners__ = [], (p.__resizeTriggers__ = C.createElement("div")).className = "resize-triggers";
1855
+ if (!h.__resizeTriggers__) {
1856
+ const C = h.ownerDocument, b = ce.getComputedStyle(h);
1857
+ b && b.position === "static" && (h.style.position = "relative"), f(C), h.__resizeLast__ = {}, h.__resizeListeners__ = [], (h.__resizeTriggers__ = C.createElement("div")).className = "resize-triggers";
1869
1858
  const v = C.createElement("div");
1870
1859
  v.className = "expand-trigger", v.appendChild(C.createElement("div"));
1871
1860
  const y = C.createElement("div");
1872
- y.className = "contract-trigger", p.__resizeTriggers__.appendChild(v), p.__resizeTriggers__.appendChild(y), p.appendChild(p.__resizeTriggers__), c(p), p.addEventListener("scroll", l, !0), r && (p.__resizeTriggers__.__animationListener__ = function(h) {
1873
- h.animationName === n && c(p);
1874
- }, p.__resizeTriggers__.addEventListener(r, p.__resizeTriggers__.__animationListener__));
1861
+ y.className = "contract-trigger", h.__resizeTriggers__.appendChild(v), h.__resizeTriggers__.appendChild(y), h.appendChild(h.__resizeTriggers__), c(h), h.addEventListener("scroll", l, !0), r && (h.__resizeTriggers__.__animationListener__ = function(p) {
1862
+ p.animationName === n && c(h);
1863
+ }, h.__resizeTriggers__.addEventListener(r, h.__resizeTriggers__.__animationListener__));
1875
1864
  }
1876
- p.__resizeListeners__.push(T);
1865
+ h.__resizeListeners__.push(T);
1877
1866
  }
1878
1867
  },
1879
- removeResizeListener: function(p, T) {
1868
+ removeResizeListener: function(h, T) {
1880
1869
  if (d)
1881
- p.detachEvent("onresize", T);
1882
- else if (p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(T), 1), !p.__resizeListeners__.length) {
1883
- p.removeEventListener("scroll", l, !0), p.__resizeTriggers__.__animationListener__ && (p.__resizeTriggers__.removeEventListener(r, p.__resizeTriggers__.__animationListener__), p.__resizeTriggers__.__animationListener__ = null);
1870
+ h.detachEvent("onresize", T);
1871
+ else if (h.__resizeListeners__.splice(h.__resizeListeners__.indexOf(T), 1), !h.__resizeListeners__.length) {
1872
+ h.removeEventListener("scroll", l, !0), h.__resizeTriggers__.__animationListener__ && (h.__resizeTriggers__.removeEventListener(r, h.__resizeTriggers__.__animationListener__), h.__resizeTriggers__.__animationListener__ = null);
1884
1873
  try {
1885
- p.__resizeTriggers__ = !p.removeChild(p.__resizeTriggers__);
1874
+ h.__resizeTriggers__ = !h.removeChild(h.__resizeTriggers__);
1886
1875
  } catch {
1887
1876
  }
1888
1877
  }
1889
1878
  }
1890
1879
  };
1891
1880
  }
1892
- class si extends ro {
1881
+ class ai extends ro {
1893
1882
  constructor(...e) {
1894
1883
  super(...e), this.state = {
1895
1884
  height: this.props.defaultHeight || 0,
@@ -1904,16 +1893,16 @@ class si extends ro {
1904
1893
  onResize: o
1905
1894
  } = this.props;
1906
1895
  if (this._parentNode) {
1907
- const i = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(i.paddingLeft || "0"), l = parseFloat(i.paddingRight || "0"), d = parseFloat(i.paddingTop || "0"), f = parseFloat(i.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), P = m.height - d - f, p = m.width - c - l, T = this._parentNode.offsetHeight - d - f, C = this._parentNode.offsetWidth - c - l;
1908
- (!n && (this.state.height !== T || this.state.scaledHeight !== P) || !r && (this.state.width !== C || this.state.scaledWidth !== p)) && (this.setState({
1896
+ const i = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(i.paddingLeft || "0"), l = parseFloat(i.paddingRight || "0"), d = parseFloat(i.paddingTop || "0"), f = parseFloat(i.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), P = m.height - d - f, h = m.width - c - l, T = this._parentNode.offsetHeight - d - f, C = this._parentNode.offsetWidth - c - l;
1897
+ (!n && (this.state.height !== T || this.state.scaledHeight !== P) || !r && (this.state.width !== C || this.state.scaledWidth !== h)) && (this.setState({
1909
1898
  height: T,
1910
1899
  width: C,
1911
1900
  scaledHeight: P,
1912
- scaledWidth: p
1901
+ scaledWidth: h
1913
1902
  }), typeof o == "function" && o({
1914
1903
  height: T,
1915
1904
  scaledHeight: P,
1916
- scaledWidth: p,
1905
+ scaledWidth: h,
1917
1906
  width: C
1918
1907
  }));
1919
1908
  }
@@ -1950,7 +1939,7 @@ class si extends ro {
1950
1939
  tagName: m = "div",
1951
1940
  ...P
1952
1941
  } = this.props, {
1953
- height: p,
1942
+ height: h,
1954
1943
  scaledHeight: T,
1955
1944
  scaledWidth: C,
1956
1945
  width: b
@@ -1958,7 +1947,7 @@ class si extends ro {
1958
1947
  overflow: "visible"
1959
1948
  }, y = {};
1960
1949
  let g = !1;
1961
- return o || (p === 0 && (g = !0), v.height = 0, y.height = p, y.scaledHeight = T), i || (b === 0 && (g = !0), v.width = 0, y.width = b, y.scaledWidth = C), c && (g = !1), Ve(m, {
1950
+ return o || (h === 0 && (g = !0), v.height = 0, y.height = h, y.scaledHeight = T), i || (b === 0 && (g = !0), v.width = 0, y.width = b, y.scaledWidth = C), c && (g = !1), Ve(m, {
1962
1951
  ref: this._setRef,
1963
1952
  style: {
1964
1953
  ...v,
@@ -1968,15 +1957,15 @@ class si extends ro {
1968
1957
  }, !g && e(y));
1969
1958
  }
1970
1959
  }
1971
- const ai = rn(({ widths: t, heights: e }) => {
1972
- const { focusedPage: n, totalPages: r } = de(), o = F(() => {
1960
+ const si = rn(({ widths: t, heights: e }) => {
1961
+ const { focusedPage: n, totalPages: r } = le(), o = M(() => {
1973
1962
  const l = [], d = Math.ceil(n / 2) * 2 - 1;
1974
1963
  if (l.push(d), d + 1 <= r) {
1975
1964
  const f = d + 1;
1976
1965
  l.push(f);
1977
1966
  }
1978
1967
  return l;
1979
- }, [n, r]), i = F(() => {
1968
+ }, [n, r]), i = M(() => {
1980
1969
  const l = n % 2 === 1 ? n - 1 : n - 2, d = Math.floor(l / 2), f = e(d), m = t(l), P = t(l + 1);
1981
1970
  return [
1982
1971
  {
@@ -1992,48 +1981,48 @@ const ai = rn(({ widths: t, heights: e }) => {
1992
1981
  height: f
1993
1982
  }
1994
1983
  ];
1995
- }, [t, e, o]), c = F(() => i.reduce((l, d) => l + Number(d.width || 0), 0), [i]);
1996
- return /* @__PURE__ */ s("div", { style: { width: c, position: "relative" }, children: o.map((l, d) => /* @__PURE__ */ s(xt, { style: i[d], pageNumber: l }, l)) });
1984
+ }, [t, e, o]), c = M(() => i.reduce((l, d) => l + Number(d.width || 0), 0), [i]);
1985
+ return /* @__PURE__ */ a("div", { style: { width: c, position: "relative" }, children: o.map((l, d) => /* @__PURE__ */ a(xt, { style: i[d], pageNumber: l }, l)) });
1997
1986
  }), ci = ({ widths: t, heights: e }) => {
1998
- const { focusedPage: n } = de(), r = F(() => ({
1987
+ const { focusedPage: n } = le(), r = M(() => ({
1999
1988
  position: "absolute",
2000
1989
  width: t(n - 1),
2001
1990
  height: e(n - 1)
2002
- }), [t, e, n]), o = F(() => t(n - 1), [t]);
2003
- return /* @__PURE__ */ s(
1991
+ }), [t, e, n]), o = M(() => t(n - 1), [t]);
1992
+ return /* @__PURE__ */ a(
2004
1993
  "div",
2005
1994
  {
2006
1995
  style: {
2007
1996
  width: o,
2008
1997
  position: "relative"
2009
1998
  },
2010
- children: /* @__PURE__ */ s(xt, { style: r, pageNumber: n }, n)
1999
+ children: /* @__PURE__ */ a(xt, { style: r, pageNumber: n }, n)
2011
2000
  }
2012
2001
  );
2013
2002
  }, li = (t, e, n) => {
2014
- const r = k(), { contentRef: o } = be(), { heights: i, widths: c } = Ge(), { setFocusedPage: l } = de(), [d, f] = $([]), { targetScrollPage: m } = cn(), P = Tt(d, 0, 500), p = F(() => {
2003
+ const r = W(), { contentRef: o } = _e(), { heights: i, widths: c } = Ge(), { setFocusedPage: l } = le(), [d, f] = q([]), { targetScrollPage: m } = cn(), P = Tt(d, 0, 500), h = M(() => {
2015
2004
  const { rowsHeight: C, columnsWidth: b } = bt({ heights: i, widths: c }, t);
2016
2005
  return i.map((v, y) => {
2017
- const g = c[y], h = Jo(y + 1, t), u = b.slice(0, h.columnIndex).reduce((x, I) => x + I, 0), a = C.slice(0, h.rowIndex).reduce((x, I) => x + I, 0), w = u + g, _ = a + v;
2006
+ const g = c[y], p = Jo(y + 1, t), u = b.slice(0, p.columnIndex).reduce((x, I) => x + I, 0), s = C.slice(0, p.rowIndex).reduce((x, I) => x + I, 0), _ = u + g, w = s + v;
2018
2007
  return {
2019
2008
  pageNumber: y + 1,
2020
- ...h,
2009
+ ...p,
2021
2010
  width: g,
2022
2011
  height: v,
2023
2012
  startX: u,
2024
- startY: a,
2025
- endX: w,
2026
- endY: _
2013
+ startY: s,
2014
+ endX: _,
2015
+ endY: w
2027
2016
  };
2028
2017
  });
2029
2018
  }, [i, c, t, e]);
2030
- A(() => {
2019
+ D(() => {
2031
2020
  var b;
2032
2021
  P.length > 0 && !m.current && l(P[0].pageNumber), ((b = P[0]) == null ? void 0 : b.ratio) && P.some((v) => v.pageNumber === m.current) && setTimeout(() => {
2033
2022
  m.current = void 0;
2034
2023
  }, 500);
2035
2024
  }, [P, l]);
2036
- const T = O(
2025
+ const T = E(
2037
2026
  (C) => {
2038
2027
  r.current && cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
2039
2028
  const b = C.target, v = {
@@ -2041,22 +2030,22 @@ const ai = rn(({ widths: t, heights: e }) => {
2041
2030
  startLeft: b.scrollLeft,
2042
2031
  endTop: b.scrollTop + b.clientHeight,
2043
2032
  endLeft: b.scrollLeft + b.clientWidth
2044
- }, y = p.filter((g) => {
2045
- const h = g.endX >= v.startLeft && g.endY >= v.startTop, u = g.startX <= v.endLeft && g.startY <= v.endTop;
2046
- return h && u;
2033
+ }, y = h.filter((g) => {
2034
+ const p = g.endX >= v.startLeft && g.endY >= v.startTop, u = g.startX <= v.endLeft && g.startY <= v.endTop;
2035
+ return p && u;
2047
2036
  }).map((g) => {
2048
- const h = v.startLeft > g.startX ? v.startLeft : g.startX, u = v.startTop > g.startY ? v.startTop : g.startY, a = v.endLeft < g.endX ? v.endLeft : g.endX, w = v.endTop < g.endY ? v.endTop : g.endY, _ = a - h, x = w - u, S = +(_ * x / (g.width * g.height) * 100).toFixed(2);
2037
+ const p = v.startLeft > g.startX ? v.startLeft : g.startX, u = v.startTop > g.startY ? v.startTop : g.startY, s = v.endLeft < g.endX ? v.endLeft : g.endX, _ = v.endTop < g.endY ? v.endTop : g.endY, w = s - p, x = _ - u, S = +(w * x / (g.width * g.height) * 100).toFixed(2);
2049
2038
  return {
2050
2039
  pageNumber: g.pageNumber,
2051
2040
  ratio: S
2052
2041
  };
2053
- }).sort((g, h) => h.ratio - g.ratio);
2042
+ }).sort((g, p) => p.ratio - g.ratio);
2054
2043
  f(y);
2055
2044
  });
2056
2045
  },
2057
- [o, p]
2046
+ [o, h]
2058
2047
  );
2059
- A(() => {
2048
+ D(() => {
2060
2049
  if (n)
2061
2050
  return n == null || n.addEventListener("scroll", T), () => {
2062
2051
  n == null || n.removeEventListener("scroll", T);
@@ -2064,15 +2053,15 @@ const ai = rn(({ widths: t, heights: e }) => {
2064
2053
  }, [n, T]);
2065
2054
  }, Rn = et((t, e) => {
2066
2055
  const { children: n, toolbarRef: r, style: o, className: i, ...c } = t, { customVariables: l, customDarkVariables: d } = Oo(), { darkMode: f } = lo();
2067
- return /* @__PURE__ */ s(
2056
+ return /* @__PURE__ */ a(
2068
2057
  "div",
2069
2058
  {
2070
2059
  ref: e,
2071
2060
  ...c,
2072
- className: ce(
2073
- _e["rp-theme-variables"],
2074
- _e["rp-container"],
2075
- f ? _e["rp-dark-mode"] : "",
2061
+ className: se(
2062
+ we["rp-theme-variables"],
2063
+ we["rp-container"],
2064
+ f ? we["rp-dark-mode"] : "",
2076
2065
  i
2077
2066
  ),
2078
2067
  style: {
@@ -2086,149 +2075,149 @@ const ai = rn(({ widths: t, heights: e }) => {
2086
2075
  );
2087
2076
  }), di = rn(({ columnIndex: t, rowIndex: e, data: n, style: r }) => {
2088
2077
  const o = er(e, t, n.columnCount);
2089
- return /* @__PURE__ */ s(xt, { style: r, pageNumber: o }, o);
2090
- }, oi), Ja = () => {
2091
- const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = ho(), { pagesRef: r, setPagesRef: o, setContentRef: i } = be(), { scrollToPage: c } = vn(), {
2078
+ return /* @__PURE__ */ a(xt, { style: r, pageNumber: o }, o);
2079
+ }, oi), Js = () => {
2080
+ const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = ho(), { pagesRef: r, setPagesRef: o, setContentRef: i } = _e(), { scrollToPage: c } = vn(), {
2092
2081
  virtualScrollRef: l,
2093
2082
  getVirtualScrollRef: d,
2094
2083
  getPageScrollElementRef: f,
2095
2084
  getVirtualScrollableElementRef: m,
2096
2085
  setTotalInnerDimensions: P,
2097
- virtualScrollableElementRef: p,
2086
+ virtualScrollableElementRef: h,
2098
2087
  totalInnerDimensions: T,
2099
2088
  pageScrollElementRef: C
2100
- } = Ye(), b = k(!0), { nextPage: v, prevPage: y, setFocusedPage: g, focusedPage: h } = de(), { scrollMode: u } = Ee(), { viewMode: a } = Me(), w = k(null), { loading: _, error: x } = oe(), { passwordRequired: I } = co(), { LoaderImageComponent: S } = _t(), R = k(
2089
+ } = Ye(), b = W(!0), { nextPage: v, prevPage: y, setFocusedPage: g, focusedPage: p } = le(), { scrollMode: u } = Ee(), { viewMode: s } = Fe(), _ = W(null), { loading: w, error: x } = oe(), { passwordRequired: I } = co(), { LoaderImageComponent: S } = _t(), R = W(
2101
2090
  T
2102
- ), N = k({
2103
- viewMode: a,
2091
+ ), N = W({
2092
+ viewMode: s,
2104
2093
  scrollMode: u
2105
- }), z = k(!1), M = k(), { isFullScreen: D } = fo(), {
2106
- pageDimension: L,
2107
- rowCount: E,
2108
- rowHeight: q,
2109
- columnCount: W,
2110
- columnWidth: U,
2111
- estimatedColumnWidth: j,
2112
- estimatedRowHeight: V,
2113
- totalDimension: ee
2114
- } = ri(), G = Tt(T, 100), Z = k();
2115
- li(W, E, p);
2116
- const Y = k({
2094
+ }), A = W(!1), z = W(), { isFullScreen: L } = fo(), {
2095
+ pageDimension: O,
2096
+ rowCount: F,
2097
+ rowHeight: $,
2098
+ columnCount: k,
2099
+ columnWidth: B,
2100
+ estimatedColumnWidth: Z,
2101
+ estimatedRowHeight: U,
2102
+ totalDimension: ie
2103
+ } = ri(), G = Tt(T, 100), K = W();
2104
+ li(k, F, h);
2105
+ const Y = W({
2117
2106
  scrollTop: 0,
2118
2107
  scrollLeft: 0
2119
2108
  });
2120
2109
  or(r);
2121
- const { isPressed: re } = tr(), { selectionMode: se } = po(), { initializeGrabScroll: J, resetGrabState: ue } = nr({
2122
- isPressed: re
2123
- }), ie = F(() => se === so.HAND, [se]), me = F(() => ({
2124
- columnCount: W
2125
- }), [W]), Fe = O(
2126
- (B) => {
2127
- const K = document.activeElement !== r;
2128
- !D && K || (["ArrowUp", "ArrowLeft"].includes(B.key) ? (B.preventDefault(), y()) : ["ArrowDown", "ArrowRight"].includes(B.key) && (B.preventDefault(), v()));
2110
+ const { isPressed: J } = tr(), { selectionMode: ee } = po(), { initializeGrabScroll: re, resetGrabState: ve } = nr({
2111
+ isPressed: J
2112
+ }), de = M(() => ee === ao.HAND, [ee]), Pe = M(() => ({
2113
+ columnCount: k
2114
+ }), [k]), Me = E(
2115
+ (V) => {
2116
+ const j = document.activeElement !== r;
2117
+ !L && j || (["ArrowUp", "ArrowLeft"].includes(V.key) ? (V.preventDefault(), y()) : ["ArrowDown", "ArrowRight"].includes(V.key) && (V.preventDefault(), v()));
2129
2118
  },
2130
- [v, y, D, u]
2119
+ [v, y, L, u]
2131
2120
  );
2132
- A(() => (window.addEventListener("keydown", Fe), () => {
2133
- window.removeEventListener("keydown", Fe);
2134
- }), [Fe]), A(() => {
2135
- if (w.current && (w.current.style.position = "relative"), !!l)
2136
- for (let B = 0; B < E; B++)
2137
- for (let K = 0; K < W; K++)
2121
+ D(() => (window.addEventListener("keydown", Me), () => {
2122
+ window.removeEventListener("keydown", Me);
2123
+ }), [Me]), D(() => {
2124
+ if (_.current && (_.current.style.position = "relative"), !!l)
2125
+ for (let V = 0; V < F; V++)
2126
+ for (let j = 0; j < k; j++)
2138
2127
  l.resetAfterIndices({
2139
- columnIndex: K,
2140
- rowIndex: B,
2128
+ columnIndex: j,
2129
+ rowIndex: V,
2141
2130
  shouldForceUpdate: !0
2142
2131
  });
2143
- }, [E, W, L, l]);
2144
- const nt = O(
2145
- (B, K) => {
2146
- if (!p)
2132
+ }, [F, k, O, l]);
2133
+ const nt = E(
2134
+ (V, j) => {
2135
+ if (!h)
2147
2136
  return { scrollTop: 0, scrollLeft: 0 };
2148
- const ye = Y.current.scrollTop > K, xe = Y.current.scrollLeft > B;
2137
+ const ye = Y.current.scrollTop > j, xe = Y.current.scrollLeft > V;
2149
2138
  return ye || xe ? Y.current : {
2150
- scrollTop: p.scrollTop,
2151
- scrollLeft: p.scrollLeft
2139
+ scrollTop: h.scrollTop,
2140
+ scrollLeft: h.scrollLeft
2152
2141
  };
2153
2142
  },
2154
- [p]
2155
- ), Et = O(
2156
- (B, K) => {
2157
- if (N.current.viewMode !== a || N.current.scrollMode !== u) {
2158
- Z.current && clearTimeout(Z.current), z.current = !0, c(h, "auto"), Z.current = setTimeout(() => {
2143
+ [h]
2144
+ ), Et = E(
2145
+ (V, j) => {
2146
+ if (N.current.viewMode !== s || N.current.scrollMode !== u) {
2147
+ K.current && clearTimeout(K.current), A.current = !0, c(p, "auto"), K.current = setTimeout(() => {
2159
2148
  requestAnimationFrame(() => {
2160
- N.current = { viewMode: a, scrollMode: u };
2149
+ N.current = { viewMode: s, scrollMode: u };
2161
2150
  });
2162
2151
  }, 100);
2163
2152
  return;
2164
2153
  }
2165
- const xe = B.scrollTop, ot = B.scrollLeft;
2166
- if (!K.height || !K.width)
2154
+ const xe = V.scrollTop, ot = V.scrollLeft;
2155
+ if (!j.height || !j.width)
2167
2156
  return;
2168
- z.current = !0;
2169
- const { height: Se, width: rt } = K, { height: Nt, width: Ot } = R.current;
2157
+ A.current = !0;
2158
+ const { height: Se, width: rt } = j, { height: Nt, width: Ot } = R.current;
2170
2159
  if (Nt === Se && Ot === rt)
2171
2160
  return;
2172
2161
  const Jn = xe / Nt * Se, eo = ot / Ot * rt, to = Math.round(Math.min(Jn, Se)) || 0, no = Math.round(Math.min(eo, rt)) || 0;
2173
- M.current = setTimeout(() => {
2162
+ z.current = setTimeout(() => {
2174
2163
  requestAnimationFrame(() => {
2175
- p == null || p.scrollTo({
2164
+ h == null || h.scrollTo({
2176
2165
  top: to,
2177
2166
  left: no,
2178
2167
  behavior: "auto"
2179
2168
  });
2180
2169
  });
2181
2170
  }, 0), R.current = {
2182
- height: K.height,
2183
- width: K.width
2171
+ height: j.height,
2172
+ width: j.width
2184
2173
  };
2185
2174
  },
2186
- [p, a, u, c]
2175
+ [h, s, u, c]
2187
2176
  );
2188
- A(() => {
2189
- clearTimeout(M.current);
2190
- const B = Array.from({ length: E }).reduce(
2191
- (xe, ot, Se) => xe + q(Se),
2177
+ D(() => {
2178
+ clearTimeout(z.current);
2179
+ const V = Array.from({ length: F }).reduce(
2180
+ (xe, ot, Se) => xe + $(Se),
2192
2181
  0
2193
- ), K = Array.from({ length: W }).reduce(
2194
- (xe, ot, Se) => xe + U(Se),
2182
+ ), j = Array.from({ length: k }).reduce(
2183
+ (xe, ot, Se) => xe + B(Se),
2195
2184
  0
2196
- ), ye = nt(K, B);
2197
- Y.current = ye, Et(ye, { height: B, width: K }), P({
2198
- height: B,
2199
- width: K
2185
+ ), ye = nt(j, V);
2186
+ Y.current = ye, Et(ye, { height: V, width: j }), P({
2187
+ height: V,
2188
+ width: j
2200
2189
  });
2201
- }, [L, E, W, Et]);
2202
- const Xn = O(
2203
- (B) => {
2190
+ }, [O, F, k, Et]);
2191
+ const Xn = E(
2192
+ (V) => {
2204
2193
  Y.current = {
2205
- scrollTop: B.scrollTop,
2206
- scrollLeft: B.scrollLeft
2194
+ scrollTop: V.scrollTop,
2195
+ scrollLeft: V.scrollLeft
2207
2196
  };
2208
2197
  },
2209
- [p]
2198
+ [h]
2210
2199
  );
2211
- A(() => () => {
2212
- Z.current && clearTimeout(Z.current);
2200
+ D(() => () => {
2201
+ K.current && clearTimeout(K.current);
2213
2202
  }, []);
2214
- const Qn = F(() => ce(ae["rp-pages-container"], {
2215
- [ae["rp-cursor-grab"]]: ie && !re,
2216
- [ae["rp-cursor-grabbing"]]: ie && re
2217
- }), [ie, re]), Yn = O(
2218
- (B) => {
2219
- if (ie && B) {
2220
- const K = ce(ae["rp-pages"]), ye = document.querySelector(`.${K}`);
2221
- J(ye);
2203
+ const Qn = M(() => se(ae["rp-pages-container"], {
2204
+ [ae["rp-cursor-grab"]]: de && !J,
2205
+ [ae["rp-cursor-grabbing"]]: de && J
2206
+ }), [de, J]), Yn = E(
2207
+ (V) => {
2208
+ if (de && V) {
2209
+ const j = se(ae["rp-pages"]), ye = document.querySelector(`.${j}`);
2210
+ re(ye);
2222
2211
  }
2223
2212
  },
2224
- [ie, J, ae]
2213
+ [de, re, ae]
2225
2214
  );
2226
- return A(() => {
2227
- _ && ue();
2228
- }, [_]), A(() => {
2215
+ return D(() => {
2216
+ w && ve();
2217
+ }, [w]), D(() => {
2229
2218
  if (!(G.height === 0 || !b.current)) {
2230
2219
  if (e === ne.PAGE_SCROLLING) {
2231
- t !== h && C && g(t), b.current = !1;
2220
+ t !== p && C && g(t), b.current = !1;
2232
2221
  return;
2233
2222
  }
2234
2223
  c(t, "auto"), g(t), b.current = !1;
@@ -2239,51 +2228,51 @@ const ai = rn(({ widths: t, heights: e }) => {
2239
2228
  C,
2240
2229
  g,
2241
2230
  G
2242
- ]), /* @__PURE__ */ H(he, { children: [
2243
- /* @__PURE__ */ s(No, { ref: i, children: /* @__PURE__ */ s(
2231
+ ]), /* @__PURE__ */ H(pe, { children: [
2232
+ /* @__PURE__ */ a(No, { ref: i, children: /* @__PURE__ */ a(
2244
2233
  Rn,
2245
2234
  {
2246
2235
  id: n,
2247
2236
  ref: o,
2248
2237
  tabIndex: -1,
2249
2238
  className: Qn,
2250
- children: /* @__PURE__ */ s(si, { style: { minHeight: "50px" }, children: ({ width: B, height: K }) => /* @__PURE__ */ s("div", { "data-rp": "pages", ref: Yn, style: { width: B, height: K }, children: u === ne.PAGE_SCROLLING ? /* @__PURE__ */ s(
2239
+ children: /* @__PURE__ */ a(ai, { style: { minHeight: "50px" }, children: ({ width: V, height: j }) => /* @__PURE__ */ a("div", { "data-rp": "pages", ref: Yn, style: { width: V, height: j }, children: u === ne.PAGE_SCROLLING ? /* @__PURE__ */ a(
2251
2240
  "div",
2252
2241
  {
2253
2242
  ref: f,
2254
- style: { width: B, height: K },
2255
- className: ce(ae["rp-pages"], ae["rp-page-scrolling-wrapper"]),
2256
- children: a === Re.DUAL_PAGE ? /* @__PURE__ */ s(ai, { widths: U, heights: q }) : /* @__PURE__ */ s(ci, { widths: U, heights: q })
2243
+ style: { width: V, height: j },
2244
+ className: se(ae["rp-pages"], ae["rp-page-scrolling-wrapper"]),
2245
+ children: s === Re.DUAL_PAGE ? /* @__PURE__ */ a(si, { widths: B, heights: $ }) : /* @__PURE__ */ a(ci, { widths: B, heights: $ })
2257
2246
  }
2258
- ) : V ? /* @__PURE__ */ s(
2247
+ ) : U ? /* @__PURE__ */ a(
2259
2248
  ei,
2260
2249
  {
2261
2250
  ref: d,
2262
- itemData: me,
2251
+ itemData: Pe,
2263
2252
  outerRef: m,
2264
- innerRef: w,
2253
+ innerRef: _,
2265
2254
  onScroll: Xn,
2266
- columnCount: W,
2267
- columnWidth: U,
2268
- rowHeight: q,
2269
- height: K,
2270
- width: B,
2271
- estimatedColumnWidth: j,
2272
- estimatedRowHeight: V,
2273
- rowCount: E,
2274
- className: ce(
2255
+ columnCount: k,
2256
+ columnWidth: B,
2257
+ rowHeight: $,
2258
+ height: j,
2259
+ width: V,
2260
+ estimatedColumnWidth: Z,
2261
+ estimatedRowHeight: U,
2262
+ rowCount: F,
2263
+ className: se(
2275
2264
  ae["rp-pages"],
2276
2265
  u === ne.HORIZONTAL_SCROLLING ? ae["rp-pages-horizontal-scroll"] : ""
2277
2266
  ),
2278
2267
  style: {
2279
- "--rp-page-height": `${ee.height}px`,
2280
- "--rp-page-width": `${ee.width}px`,
2281
- "--rp-row-count": `${E}`,
2282
- "--rp-column-count": `${W}`
2268
+ "--rp-page-height": `${ie.height}px`,
2269
+ "--rp-page-width": `${ie.width}px`,
2270
+ "--rp-row-count": `${F}`,
2271
+ "--rp-column-count": `${k}`
2283
2272
  },
2284
2273
  children: di
2285
2274
  }
2286
- ) : !_ && !x ? /* @__PURE__ */ s(
2275
+ ) : !w && !x ? /* @__PURE__ */ a(
2287
2276
  "div",
2288
2277
  {
2289
2278
  className: ae["rp-loader"],
@@ -2294,22 +2283,22 @@ const ai = rn(({ widths: t, heights: e }) => {
2294
2283
  height: "100%",
2295
2284
  width: "100%"
2296
2285
  },
2297
- children: S && /* @__PURE__ */ s(S, {})
2286
+ children: S && /* @__PURE__ */ a(S, {})
2298
2287
  }
2299
- ) : x === ao.NOT_SUPPORTED ? /* @__PURE__ */ s("div", { className: ae["rp-not-supported"], children: /* @__PURE__ */ H("div", { className: ae["rp-not-supported-content"], children: [
2288
+ ) : x === so.NOT_SUPPORTED ? /* @__PURE__ */ a("div", { className: ae["rp-not-supported"], children: /* @__PURE__ */ H("div", { className: ae["rp-not-supported-content"], children: [
2300
2289
  "React PDF is unable to render on this browser. Please use the supported browsers from the list below:",
2301
- /* @__PURE__ */ s("div", { children: /* @__PURE__ */ H("ul", { children: [
2302
- /* @__PURE__ */ s("li", { children: "Chrome 110+" }),
2303
- /* @__PURE__ */ s("li", { children: "Edge 115+" }),
2304
- /* @__PURE__ */ s("li", { children: "Firefox 115+" }),
2305
- /* @__PURE__ */ s("li", { children: "Safari 16.5+" }),
2306
- /* @__PURE__ */ s("li", { children: "Safari iOS 16.5+" }),
2307
- /* @__PURE__ */ s("li", { children: "Chrome Android 126+" })
2290
+ /* @__PURE__ */ a("div", { children: /* @__PURE__ */ H("ul", { children: [
2291
+ /* @__PURE__ */ a("li", { children: "Chrome 110+" }),
2292
+ /* @__PURE__ */ a("li", { children: "Edge 115+" }),
2293
+ /* @__PURE__ */ a("li", { children: "Firefox 115+" }),
2294
+ /* @__PURE__ */ a("li", { children: "Safari 16.5+" }),
2295
+ /* @__PURE__ */ a("li", { children: "Safari iOS 16.5+" }),
2296
+ /* @__PURE__ */ a("li", { children: "Chrome Android 126+" })
2308
2297
  ] }) })
2309
2298
  ] }) }) : null }) })
2310
2299
  }
2311
2300
  ) }),
2312
- I && /* @__PURE__ */ s(rr, {})
2301
+ I && /* @__PURE__ */ a(rr, {})
2313
2302
  ] });
2314
2303
  }, ke = {
2315
2304
  "rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
@@ -2322,31 +2311,31 @@ const ai = rn(({ widths: t, heights: e }) => {
2322
2311
  "rp-page-input": "_rp-page-input_1gck0_6",
2323
2312
  "rp-total-page": "_rp-total-page_1gck0_18"
2324
2313
  }, ui = () => {
2325
- const { prevIcon: t } = Pe(), { prevIcon: e } = Te();
2326
- return t || e || /* @__PURE__ */ s(Ze, {});
2314
+ const { prevIcon: t } = Ce(), { prevIcon: e } = be();
2315
+ return t || e || /* @__PURE__ */ a(Ze, {});
2327
2316
  }, pi = () => {
2328
- const { nextIcon: t } = Pe(), { nextIcon: e } = Te();
2329
- return t || e || /* @__PURE__ */ s(Ze, { style: { transform: "rotate(180deg" } });
2317
+ const { nextIcon: t } = Ce(), { nextIcon: e } = be();
2318
+ return t || e || /* @__PURE__ */ a(Ze, { style: { transform: "rotate(180deg" } });
2330
2319
  }, hi = () => {
2331
- const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: i } = de(), [c, l] = $(t.toString()), { pageNavigationTool: d = !0 } = Ce(), { pageNavigationTool: f = !0 } = Ne(), { isSmallScreen: m } = Oe(), { viewMode: P } = Me(), { scrollMode: p } = Ee(), { localeMessages: T } = fe();
2332
- A(() => {
2320
+ const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: i } = le(), [c, l] = q(t.toString()), { pageNavigationTool: d = !0 } = Te(), { pageNavigationTool: f = !0 } = Ne(), { isSmallScreen: m } = Oe(), { viewMode: P } = Fe(), { scrollMode: h } = Ee(), { localeMessages: T } = he();
2321
+ D(() => {
2333
2322
  l(t.toString());
2334
2323
  }, [t]);
2335
- const C = O((h) => {
2336
- const u = h.target.value;
2324
+ const C = E((p) => {
2325
+ const u = p.target.value;
2337
2326
  l(u);
2338
- }, []), b = O(async () => {
2339
- const h = i(c);
2340
- h.success || l(h.currentPage.toString());
2341
- }, [i, c, e]), v = O(() => {
2327
+ }, []), b = E(async () => {
2328
+ const p = i(c);
2329
+ p.success || l(p.currentPage.toString());
2330
+ }, [i, c, e]), v = E(() => {
2342
2331
  l(t.toString());
2343
- }, [t]), y = O(
2344
- (h) => {
2345
- h.key === "Enter" && b();
2332
+ }, [t]), y = E(
2333
+ (p) => {
2334
+ p.key === "Enter" && b();
2346
2335
  },
2347
2336
  [b]
2348
- ), g = F(() => P === Re.DUAL_PAGE && p === ne.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, P, p]);
2349
- return !d || !f ? null : typeof d != "boolean" ? /* @__PURE__ */ s(
2337
+ ), g = M(() => P === Re.DUAL_PAGE && h === ne.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, P, h]);
2338
+ return !d || !f ? null : typeof d != "boolean" ? /* @__PURE__ */ a(
2350
2339
  d,
2351
2340
  {
2352
2341
  total: e,
@@ -2356,7 +2345,7 @@ const ai = rn(({ widths: t, heights: e }) => {
2356
2345
  goToPage: i,
2357
2346
  changePage: n
2358
2347
  }
2359
- ) : typeof f != "boolean" ? /* @__PURE__ */ s(
2348
+ ) : typeof f != "boolean" ? /* @__PURE__ */ a(
2360
2349
  f,
2361
2350
  {
2362
2351
  total: e,
@@ -2367,17 +2356,17 @@ const ai = rn(({ widths: t, heights: e }) => {
2367
2356
  changePage: n
2368
2357
  }
2369
2358
  ) : /* @__PURE__ */ H("div", { className: pt["rp-paginate"], children: [
2370
- !m && /* @__PURE__ */ s(Q, { content: T == null ? void 0 : T.previousPageTooltip, children: /* @__PURE__ */ s(
2371
- we,
2359
+ !m && /* @__PURE__ */ a(Q, { content: T == null ? void 0 : T.previousPageTooltip, children: /* @__PURE__ */ a(
2360
+ ge,
2372
2361
  {
2373
2362
  onClick: o,
2374
2363
  "aria-label": T == null ? void 0 : T.previousPageTooltip,
2375
2364
  "aria-disabled": t === 1,
2376
- children: /* @__PURE__ */ s(ui, {})
2365
+ children: /* @__PURE__ */ a(ui, {})
2377
2366
  }
2378
2367
  ) }),
2379
- /* @__PURE__ */ s(Q, { content: T == null ? void 0 : T.currentPageTooltip, children: /* @__PURE__ */ s(
2380
- sn,
2368
+ /* @__PURE__ */ a(Q, { content: T == null ? void 0 : T.currentPageTooltip, children: /* @__PURE__ */ a(
2369
+ an,
2381
2370
  {
2382
2371
  onKeyDown: y,
2383
2372
  onBlur: v,
@@ -2392,18 +2381,18 @@ const ai = rn(({ widths: t, heights: e }) => {
2392
2381
  "/",
2393
2382
  e
2394
2383
  ] }),
2395
- !m && /* @__PURE__ */ s(Q, { content: T == null ? void 0 : T.nextPageTooltip, children: /* @__PURE__ */ s(
2396
- we,
2384
+ !m && /* @__PURE__ */ a(Q, { content: T == null ? void 0 : T.nextPageTooltip, children: /* @__PURE__ */ a(
2385
+ ge,
2397
2386
  {
2398
2387
  onClick: r,
2399
2388
  "aria-label": T == null ? void 0 : T.nextPageTooltip,
2400
2389
  "aria-disabled": g,
2401
- children: /* @__PURE__ */ s(pi, {})
2390
+ children: /* @__PURE__ */ a(pi, {})
2402
2391
  }
2403
2392
  ) })
2404
2393
  ] });
2405
2394
  };
2406
- var St = "Dialog", [Ln, ec] = dr(St), [fi, pe] = Ln(St), En = (t) => {
2395
+ var St = "Dialog", [Ln, ec] = dr(St), [fi, ue] = Ln(St), En = (t) => {
2407
2396
  const {
2408
2397
  __scopeDialog: e,
2409
2398
  children: n,
@@ -2416,15 +2405,15 @@ var St = "Dialog", [Ln, ec] = dr(St), [fi, pe] = Ln(St), En = (t) => {
2416
2405
  defaultProp: o,
2417
2406
  onChange: i
2418
2407
  });
2419
- return /* @__PURE__ */ s(
2408
+ return /* @__PURE__ */ a(
2420
2409
  fi,
2421
2410
  {
2422
2411
  scope: e,
2423
2412
  triggerRef: l,
2424
2413
  contentRef: d,
2425
- contentId: st(),
2426
- titleId: st(),
2427
- descriptionId: st(),
2414
+ contentId: at(),
2415
+ titleId: at(),
2416
+ descriptionId: at(),
2428
2417
  open: f,
2429
2418
  onOpenChange: m,
2430
2419
  onOpenToggle: X.useCallback(() => m((P) => !P), [m]),
@@ -2436,8 +2425,8 @@ var St = "Dialog", [Ln, ec] = dr(St), [fi, pe] = Ln(St), En = (t) => {
2436
2425
  En.displayName = St;
2437
2426
  var Nn = "DialogTrigger", mi = X.forwardRef(
2438
2427
  (t, e) => {
2439
- const { __scopeDialog: n, ...r } = t, o = pe(Nn, n), i = Ct(e, o.triggerRef);
2440
- return /* @__PURE__ */ s(
2428
+ const { __scopeDialog: n, ...r } = t, o = ue(Nn, n), i = Ct(e, o.triggerRef);
2429
+ return /* @__PURE__ */ a(
2441
2430
  Ue.button,
2442
2431
  {
2443
2432
  type: "button",
@@ -2456,24 +2445,24 @@ mi.displayName = Nn;
2456
2445
  var It = "DialogPortal", [gi, On] = Ln(It, {
2457
2446
  forceMount: void 0
2458
2447
  }), Dn = (t) => {
2459
- const { __scopeDialog: e, forceMount: n, children: r, container: o } = t, i = pe(It, e);
2460
- return /* @__PURE__ */ s(gi, { scope: e, forceMount: n, children: X.Children.map(r, (c) => /* @__PURE__ */ s(Pt, { present: n || i.open, children: /* @__PURE__ */ s(_r, { asChild: !0, container: o, children: c }) })) });
2448
+ const { __scopeDialog: e, forceMount: n, children: r, container: o } = t, i = ue(It, e);
2449
+ return /* @__PURE__ */ a(gi, { scope: e, forceMount: n, children: X.Children.map(r, (c) => /* @__PURE__ */ a(Pt, { present: n || i.open, children: /* @__PURE__ */ a(_r, { asChild: !0, container: o, children: c }) })) });
2461
2450
  };
2462
2451
  Dn.displayName = It;
2463
2452
  var Qe = "DialogOverlay", An = X.forwardRef(
2464
2453
  (t, e) => {
2465
- const n = On(Qe, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, i = pe(Qe, t.__scopeDialog);
2466
- return i.modal ? /* @__PURE__ */ s(Pt, { present: r || i.open, children: /* @__PURE__ */ s(vi, { ...o, ref: e }) }) : null;
2454
+ const n = On(Qe, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, i = ue(Qe, t.__scopeDialog);
2455
+ return i.modal ? /* @__PURE__ */ a(Pt, { present: r || i.open, children: /* @__PURE__ */ a(vi, { ...o, ref: e }) }) : null;
2467
2456
  }
2468
2457
  );
2469
2458
  An.displayName = Qe;
2470
2459
  var vi = X.forwardRef(
2471
2460
  (t, e) => {
2472
- const { __scopeDialog: n, ...r } = t, o = pe(Qe, n);
2461
+ const { __scopeDialog: n, ...r } = t, o = ue(Qe, n);
2473
2462
  return (
2474
2463
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
2475
2464
  // ie. when `Overlay` and `Content` are siblings
2476
- /* @__PURE__ */ s(mr, { as: ur, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ s(
2465
+ /* @__PURE__ */ a(mr, { as: ur, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ a(
2477
2466
  Ue.div,
2478
2467
  {
2479
2468
  "data-state": Lt(o.open),
@@ -2486,20 +2475,20 @@ var vi = X.forwardRef(
2486
2475
  }
2487
2476
  ), Le = "DialogContent", zn = X.forwardRef(
2488
2477
  (t, e) => {
2489
- const n = On(Le, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, i = pe(Le, t.__scopeDialog);
2490
- return /* @__PURE__ */ s(Pt, { present: r || i.open, children: i.modal ? /* @__PURE__ */ s(wi, { ...o, ref: e }) : /* @__PURE__ */ s(_i, { ...o, ref: e }) });
2478
+ const n = On(Le, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, i = ue(Le, t.__scopeDialog);
2479
+ return /* @__PURE__ */ a(Pt, { present: r || i.open, children: i.modal ? /* @__PURE__ */ a(wi, { ...o, ref: e }) : /* @__PURE__ */ a(_i, { ...o, ref: e }) });
2491
2480
  }
2492
2481
  );
2493
2482
  zn.displayName = Le;
2494
2483
  var wi = X.forwardRef(
2495
2484
  (t, e) => {
2496
- const n = pe(Le, t.__scopeDialog), r = X.useRef(null), o = Ct(e, n.contentRef, r);
2485
+ const n = ue(Le, t.__scopeDialog), r = X.useRef(null), o = Ct(e, n.contentRef, r);
2497
2486
  return X.useEffect(() => {
2498
2487
  const i = r.current;
2499
2488
  if (i)
2500
2489
  return gr(i);
2501
- }, []), /* @__PURE__ */ s(
2502
- Mn,
2490
+ }, []), /* @__PURE__ */ a(
2491
+ Fn,
2503
2492
  {
2504
2493
  ...t,
2505
2494
  ref: o,
@@ -2522,9 +2511,9 @@ var wi = X.forwardRef(
2522
2511
  }
2523
2512
  ), _i = X.forwardRef(
2524
2513
  (t, e) => {
2525
- const n = pe(Le, t.__scopeDialog), r = X.useRef(!1), o = X.useRef(!1);
2526
- return /* @__PURE__ */ s(
2527
- Mn,
2514
+ const n = ue(Le, t.__scopeDialog), r = X.useRef(!1), o = X.useRef(!1);
2515
+ return /* @__PURE__ */ a(
2516
+ Fn,
2528
2517
  {
2529
2518
  ...t,
2530
2519
  ref: e,
@@ -2543,11 +2532,11 @@ var wi = X.forwardRef(
2543
2532
  }
2544
2533
  );
2545
2534
  }
2546
- ), Mn = X.forwardRef(
2535
+ ), Fn = X.forwardRef(
2547
2536
  (t, e) => {
2548
- const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: i, ...c } = t, l = pe(Le, n), d = X.useRef(null), f = Ct(e, d);
2549
- return vr(), /* @__PURE__ */ H(he, { children: [
2550
- /* @__PURE__ */ s(
2537
+ const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: i, ...c } = t, l = ue(Le, n), d = X.useRef(null), f = Ct(e, d);
2538
+ return vr(), /* @__PURE__ */ H(pe, { children: [
2539
+ /* @__PURE__ */ a(
2551
2540
  wr,
2552
2541
  {
2553
2542
  asChild: !0,
@@ -2555,7 +2544,7 @@ var wi = X.forwardRef(
2555
2544
  trapped: r,
2556
2545
  onMountAutoFocus: o,
2557
2546
  onUnmountAutoFocus: i,
2558
- children: /* @__PURE__ */ s(
2547
+ children: /* @__PURE__ */ a(
2559
2548
  fr,
2560
2549
  {
2561
2550
  role: "dialog",
@@ -2570,30 +2559,30 @@ var wi = X.forwardRef(
2570
2559
  )
2571
2560
  }
2572
2561
  ),
2573
- /* @__PURE__ */ H(he, { children: [
2574
- /* @__PURE__ */ s(Ti, { titleId: l.titleId }),
2575
- /* @__PURE__ */ s(Pi, { contentRef: d, descriptionId: l.descriptionId })
2562
+ /* @__PURE__ */ H(pe, { children: [
2563
+ /* @__PURE__ */ a(Ti, { titleId: l.titleId }),
2564
+ /* @__PURE__ */ a(Pi, { contentRef: d, descriptionId: l.descriptionId })
2576
2565
  ] })
2577
2566
  ] });
2578
2567
  }
2579
- ), Rt = "DialogTitle", Fn = X.forwardRef(
2568
+ ), Rt = "DialogTitle", Mn = X.forwardRef(
2580
2569
  (t, e) => {
2581
- const { __scopeDialog: n, ...r } = t, o = pe(Rt, n);
2582
- return /* @__PURE__ */ s(Ue.h2, { id: o.titleId, ...r, ref: e });
2570
+ const { __scopeDialog: n, ...r } = t, o = ue(Rt, n);
2571
+ return /* @__PURE__ */ a(Ue.h2, { id: o.titleId, ...r, ref: e });
2583
2572
  }
2584
2573
  );
2585
- Fn.displayName = Rt;
2574
+ Mn.displayName = Rt;
2586
2575
  var kn = "DialogDescription", bi = X.forwardRef(
2587
2576
  (t, e) => {
2588
- const { __scopeDialog: n, ...r } = t, o = pe(kn, n);
2589
- return /* @__PURE__ */ s(Ue.p, { id: o.descriptionId, ...r, ref: e });
2577
+ const { __scopeDialog: n, ...r } = t, o = ue(kn, n);
2578
+ return /* @__PURE__ */ a(Ue.p, { id: o.descriptionId, ...r, ref: e });
2590
2579
  }
2591
2580
  );
2592
2581
  bi.displayName = kn;
2593
2582
  var Wn = "DialogClose", Hn = X.forwardRef(
2594
2583
  (t, e) => {
2595
- const { __scopeDialog: n, ...r } = t, o = pe(Wn, n);
2596
- return /* @__PURE__ */ s(
2584
+ const { __scopeDialog: n, ...r } = t, o = ue(Wn, n);
2585
+ return /* @__PURE__ */ a(
2597
2586
  Ue.button,
2598
2587
  {
2599
2588
  type: "button",
@@ -2628,7 +2617,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
2628
2617
  const o = (i = t.current) == null ? void 0 : i.getAttribute("aria-describedby");
2629
2618
  e && o && (document.getElementById(e) || console.warn(r));
2630
2619
  }, [r, t, e]), null;
2631
- }, yi = En, xi = Dn, Si = An, Ii = zn, Ri = Fn, Li = Hn;
2620
+ }, yi = En, xi = Dn, Si = An, Ii = zn, Ri = Mn, Li = Hn;
2632
2621
  const Ie = {
2633
2622
  "rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
2634
2623
  "rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
@@ -2638,7 +2627,7 @@ const Ie = {
2638
2627
  "rp-dialog-close": "_rp-dialog-close_slqo7_47",
2639
2628
  "rp-properties-divider": "_rp-properties-divider_slqo7_55"
2640
2629
  }, Ei = () => {
2641
- const { pdfProperties: t } = oe(), { container: e } = be(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = yo(), { localeMessages: o } = fe(), i = F(() => {
2630
+ const { pdfProperties: t } = oe(), { container: e } = _e(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = yo(), { localeMessages: o } = he(), i = M(() => {
2642
2631
  if (!t)
2643
2632
  return [];
2644
2633
  const {
@@ -2648,7 +2637,7 @@ const Ie = {
2648
2637
  author: f,
2649
2638
  subject: m,
2650
2639
  createdOn: P,
2651
- creator: p,
2640
+ creator: h,
2652
2641
  keywords: T,
2653
2642
  modifiedOn: C,
2654
2643
  pdfProducer: b,
@@ -2663,14 +2652,14 @@ const Ie = {
2663
2652
  { label: o == null ? void 0 : o.propertiesAuthorLabel, value: f },
2664
2653
  { label: o == null ? void 0 : o.propertiesSubjectLabel, value: m },
2665
2654
  { label: o == null ? void 0 : o.propertiesKeywordLabel, value: T },
2666
- { label: o == null ? void 0 : o.propertiesCreatorLabel, value: p },
2655
+ { label: o == null ? void 0 : o.propertiesCreatorLabel, value: h },
2667
2656
  {
2668
2657
  label: o == null ? void 0 : o.propertiesCreateOnLabel,
2669
- value: P ? Mt(P) : ""
2658
+ value: P ? Ft(P) : ""
2670
2659
  },
2671
2660
  {
2672
2661
  label: o == null ? void 0 : o.propertiesModifiedOnLabel,
2673
- value: C ? Mt(C) : ""
2662
+ value: C ? Ft(C) : ""
2674
2663
  },
2675
2664
  { separate: !0 },
2676
2665
  { label: o == null ? void 0 : o.propertiesPDFProducerLabel, value: b },
@@ -2678,12 +2667,12 @@ const Ie = {
2678
2667
  { label: o == null ? void 0 : o.propertiesPageCountLabel, value: y }
2679
2668
  ];
2680
2669
  }, [t, o]);
2681
- return /* @__PURE__ */ s(yi, { open: n, onOpenChange: r, children: /* @__PURE__ */ s(xi, { container: e, children: /* @__PURE__ */ H("div", { className: Ie["rp-dialog-wrapper"], children: [
2682
- /* @__PURE__ */ s(Si, { className: Ie["rp-dialog-overlay"] }),
2670
+ return /* @__PURE__ */ a(yi, { open: n, onOpenChange: r, children: /* @__PURE__ */ a(xi, { container: e, children: /* @__PURE__ */ H("div", { className: Ie["rp-dialog-wrapper"], children: [
2671
+ /* @__PURE__ */ a(Si, { className: Ie["rp-dialog-overlay"] }),
2683
2672
  /* @__PURE__ */ H(Ii, { className: Ie["rp-document-dialog"], children: [
2684
- /* @__PURE__ */ s(Ri, { className: Ie["rp-dialog-title"], children: o == null ? void 0 : o.documentPropertiesLabel }),
2685
- /* @__PURE__ */ s("div", { className: Ie["rp-document-properties"], children: i.map((c, l) => /* @__PURE__ */ s("div", { children: c.separate ? /* @__PURE__ */ s("div", { className: Ie["rp-properties-divider"] }) : /* @__PURE__ */ s(zo, { label: c.label, value: c.value }) }, l)) }),
2686
- /* @__PURE__ */ s(Li, { asChild: !0, className: Ie["rp-dialog-close"], children: /* @__PURE__ */ s(br, {}) })
2673
+ /* @__PURE__ */ a(Ri, { className: Ie["rp-dialog-title"], children: o == null ? void 0 : o.documentPropertiesLabel }),
2674
+ /* @__PURE__ */ a("div", { className: Ie["rp-document-properties"], children: i.map((c, l) => /* @__PURE__ */ a("div", { children: c.separate ? /* @__PURE__ */ a("div", { className: Ie["rp-properties-divider"] }) : /* @__PURE__ */ a(zo, { label: c.label, value: c.value }) }, l)) }),
2675
+ /* @__PURE__ */ a(Li, { asChild: !0, className: Ie["rp-dialog-close"], children: /* @__PURE__ */ a(br, {}) })
2687
2676
  ] })
2688
2677
  ] }) }) });
2689
2678
  }, Ni = {
@@ -2696,30 +2685,30 @@ const Ie = {
2696
2685
  const c = n || i;
2697
2686
  return c.endsWith(Jt) ? c : `${c}${Jt}`;
2698
2687
  };
2699
- return { download: O(async () => {
2688
+ return { download: E(async () => {
2700
2689
  if (!t || !e)
2701
2690
  throw new Error("There is no PDF source to download");
2702
2691
  const i = document.createElement("a");
2703
2692
  i.href = await Di(e), i.download = r(t), document.body.appendChild(i), i.click(), document.body.removeChild(i);
2704
2693
  }, [t, e]) };
2705
2694
  }, Un = () => {
2706
- const { downloadIcon: t } = Pe(), { downloadIcon: e } = Te();
2707
- return t || e || /* @__PURE__ */ s(xr, {});
2708
- }, Vn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ s(Q, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Ai = ({ download: t, localeMessages: e }) => /* @__PURE__ */ s(Vn, { localeMessages: e, children: /* @__PURE__ */ s(we, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ s(Un, {}) }) }), zi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ s(Xe, { onClick: t, children: /* @__PURE__ */ H(Vn, { className: "rp-menu-item", localeMessages: e, children: [
2709
- /* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(Un, {}) }),
2695
+ const { downloadIcon: t } = Ce(), { downloadIcon: e } = be();
2696
+ return t || e || /* @__PURE__ */ a(xr, {});
2697
+ }, Vn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ a(Q, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Ai = ({ download: t, localeMessages: e }) => /* @__PURE__ */ a(Vn, { localeMessages: e, children: /* @__PURE__ */ a(ge, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ a(Un, {}) }) }), zi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ a(Xe, { onClick: t, children: /* @__PURE__ */ H(Vn, { className: "rp-menu-item", localeMessages: e, children: [
2698
+ /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Un, {}) }),
2710
2699
  e == null ? void 0 : e.downloadFileLabel
2711
2700
  ] }) }), Bn = () => {
2712
- const { download: t } = Gn(), { downloadTool: e = !0 } = Ce(), { downloadTool: n = !0 } = Ne(), { isSmallScreen: r } = Oe(), { localeMessages: o } = fe(), i = o == null ? void 0 : o.downloadFileTooltip;
2713
- return !e || !n ? null : r ? /* @__PURE__ */ s(zi, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ s(Q, { content: i, children: /* @__PURE__ */ s(e, { download: t }) }) : typeof n == "function" ? /* @__PURE__ */ s(Q, { content: i, children: /* @__PURE__ */ s(n, { download: t }) }) : /* @__PURE__ */ s(Ai, { download: t, localeMessages: o });
2701
+ const { download: t } = Gn(), { downloadTool: e = !0 } = Te(), { downloadTool: n = !0 } = Ne(), { isSmallScreen: r } = Oe(), { localeMessages: o } = he(), i = o == null ? void 0 : o.downloadFileTooltip;
2702
+ return !e || !n ? null : r ? /* @__PURE__ */ a(zi, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ a(Q, { content: i, children: /* @__PURE__ */ a(e, { download: t }) }) : typeof n == "function" ? /* @__PURE__ */ a(Q, { content: i, children: /* @__PURE__ */ a(n, { download: t }) }) : /* @__PURE__ */ a(Ai, { download: t, localeMessages: o });
2714
2703
  }, jn = () => {
2715
- const { printIcon: t } = Pe(), { printIcon: e } = Te();
2716
- return t || e || /* @__PURE__ */ s(Sr, {});
2717
- }, Kn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ s(Q, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Mi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ s(Kn, { localeMessages: e, children: /* @__PURE__ */ s(we, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ s(jn, {}) }) }), Fi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ s(Xe, { onClick: t, children: /* @__PURE__ */ H(Kn, { className: "rp-menu-item", localeMessages: e, children: [
2718
- /* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(jn, {}) }),
2704
+ const { printIcon: t } = Ce(), { printIcon: e } = be();
2705
+ return t || e || /* @__PURE__ */ a(Sr, {});
2706
+ }, Kn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ a(Q, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Fi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ a(Kn, { localeMessages: e, children: /* @__PURE__ */ a(ge, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ a(jn, {}) }) }), Mi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ a(Xe, { onClick: t, children: /* @__PURE__ */ H(Kn, { className: "rp-menu-item", localeMessages: e, children: [
2707
+ /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(jn, {}) }),
2719
2708
  e == null ? void 0 : e.printLabel
2720
2709
  ] }) }), Zn = () => {
2721
- const { print: t, cancel: e, setOnProgress: n, setOnComplete: r, setOnError: o, progress: i } = tt(), { printTool: c = !0 } = Ce(), { printTool: l = !0 } = Ne(), { isSmallScreen: d } = Oe(), { localeMessages: f } = fe(), m = f == null ? void 0 : f.printTooltip;
2722
- return !c || !l ? null : d ? /* @__PURE__ */ s(Fi, { print: t, localeMessages: f }) : typeof c == "function" ? /* @__PURE__ */ s(Q, { content: m, children: /* @__PURE__ */ s(
2710
+ const { print: t, cancel: e, setOnProgress: n, setOnComplete: r, setOnError: o, progress: i } = tt(), { printTool: c = !0 } = Te(), { printTool: l = !0 } = Ne(), { isSmallScreen: d } = Oe(), { localeMessages: f } = he(), m = f == null ? void 0 : f.printTooltip;
2711
+ return !c || !l ? null : d ? /* @__PURE__ */ a(Mi, { print: t, localeMessages: f }) : typeof c == "function" ? /* @__PURE__ */ a(Q, { content: m, children: /* @__PURE__ */ a(
2723
2712
  c,
2724
2713
  {
2725
2714
  print: t,
@@ -2729,7 +2718,7 @@ const Ie = {
2729
2718
  setOnComplete: r,
2730
2719
  progress: i
2731
2720
  }
2732
- ) }) : typeof l == "function" ? /* @__PURE__ */ s(Q, { content: m, children: /* @__PURE__ */ s(
2721
+ ) }) : typeof l == "function" ? /* @__PURE__ */ a(Q, { content: m, children: /* @__PURE__ */ a(
2733
2722
  l,
2734
2723
  {
2735
2724
  print: t,
@@ -2739,34 +2728,34 @@ const Ie = {
2739
2728
  setOnComplete: r,
2740
2729
  progress: i
2741
2730
  }
2742
- ) }) : /* @__PURE__ */ s(Mi, { print: t, localeMessages: f });
2731
+ ) }) : /* @__PURE__ */ a(Fi, { print: t, localeMessages: f });
2743
2732
  }, ki = {
2744
2733
  "rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
2745
2734
  }, Wi = () => {
2746
- const { goToFirstPageIcon: t } = Pe(), { goToFirstPageIcon: e } = Te();
2747
- return t || e || /* @__PURE__ */ s(mn, { className: ki["rp-go-to-Top"] });
2735
+ const { goToFirstPageIcon: t } = Ce(), { goToFirstPageIcon: e } = be();
2736
+ return t || e || /* @__PURE__ */ a(mn, { className: ki["rp-go-to-Top"] });
2748
2737
  }, Hi = () => {
2749
- const { goToLastPageIcon: t } = Pe(), { goToLastPageIcon: e } = Te();
2750
- return t || e || /* @__PURE__ */ s(mn, {});
2738
+ const { goToLastPageIcon: t } = Ce(), { goToLastPageIcon: e } = be();
2739
+ return t || e || /* @__PURE__ */ a(mn, {});
2751
2740
  }, en = { width: "100%" }, $i = () => {
2752
- const { goToPage: t, totalPages: e, focusedPage: n } = de(), { jumpNavigationTool: r = !0 } = Ce(), { jumpNavigationTool: o = !0 } = Ne(), { localeMessages: i } = fe(), c = F(() => n === 1, [n]), l = F(() => n === e, [n, e]), d = O(() => {
2741
+ const { goToPage: t, totalPages: e, focusedPage: n } = le(), { jumpNavigationTool: r = !0 } = Te(), { jumpNavigationTool: o = !0 } = Ne(), { localeMessages: i } = he(), c = M(() => n === 1, [n]), l = M(() => n === e, [n, e]), d = E(() => {
2753
2742
  t(1);
2754
- }, [t]), f = O(() => {
2743
+ }, [t]), f = E(() => {
2755
2744
  t(e);
2756
2745
  }, [t, e]);
2757
2746
  return !r || !o ? null : /* @__PURE__ */ H(hn, { children: [
2758
- /* @__PURE__ */ s(Xe, { onClick: d, children: /* @__PURE__ */ s(Q, { content: i == null ? void 0 : i.firstPageTooltip, style: en, children: /* @__PURE__ */ H("div", { className: "rp-menu-item", "aria-disabled": c, children: [
2759
- /* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(Wi, {}) }),
2760
- /* @__PURE__ */ s("span", { children: i == null ? void 0 : i.firstPageLabel })
2747
+ /* @__PURE__ */ a(Xe, { onClick: d, children: /* @__PURE__ */ a(Q, { content: i == null ? void 0 : i.firstPageTooltip, style: en, children: /* @__PURE__ */ H("div", { className: "rp-menu-item", "aria-disabled": c, children: [
2748
+ /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Wi, {}) }),
2749
+ /* @__PURE__ */ a("span", { children: i == null ? void 0 : i.firstPageLabel })
2761
2750
  ] }) }) }),
2762
- /* @__PURE__ */ s(Xe, { onClick: f, children: /* @__PURE__ */ s(Q, { content: i == null ? void 0 : i.lastPageTooltip, style: en, children: /* @__PURE__ */ H("div", { className: "rp-menu-item", "aria-disabled": l, children: [
2763
- /* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(Hi, {}) }),
2764
- /* @__PURE__ */ s("span", { children: i == null ? void 0 : i.lastPageLabel })
2751
+ /* @__PURE__ */ a(Xe, { onClick: f, children: /* @__PURE__ */ a(Q, { content: i == null ? void 0 : i.lastPageTooltip, style: en, children: /* @__PURE__ */ H("div", { className: "rp-menu-item", "aria-disabled": l, children: [
2752
+ /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Hi, {}) }),
2753
+ /* @__PURE__ */ a("span", { children: i == null ? void 0 : i.lastPageLabel })
2765
2754
  ] }) }) }),
2766
- /* @__PURE__ */ s(un, {})
2755
+ /* @__PURE__ */ a(un, {})
2767
2756
  ] });
2768
2757
  }, qi = () => {
2769
- const [t, e] = $(!1), { container: n, pagesRef: r } = be(), { isSmallScreen: o } = Oe(), {
2758
+ const [t, e] = q(!1), { container: n, pagesRef: r } = _e(), { isSmallScreen: o } = Oe(), {
2770
2759
  openFileTool: i,
2771
2760
  downloadTool: c,
2772
2761
  documentProperties: l,
@@ -2774,28 +2763,28 @@ const Ie = {
2774
2763
  rotateTool: f,
2775
2764
  selectionModeTool: m,
2776
2765
  jumpNavigationTool: P,
2777
- printTool: p,
2766
+ printTool: h,
2778
2767
  fullscreenTool: T,
2779
2768
  viewModeTool: C
2780
- } = Ce(), {
2769
+ } = Te(), {
2781
2770
  openFileTool: b,
2782
2771
  downloadTool: v,
2783
2772
  documentProperties: y,
2784
2773
  scrollModeTool: g,
2785
- rotateTool: h,
2774
+ rotateTool: p,
2786
2775
  selectionModeTool: u,
2787
- jumpNavigationTool: a,
2788
- printTool: w,
2789
- fullscreenTool: _,
2776
+ jumpNavigationTool: s,
2777
+ printTool: _,
2778
+ fullscreenTool: w,
2790
2779
  viewModeTool: x
2791
- } = Ne(), { localeMessages: I } = fe(), [S, R] = $(0), N = k(
2792
- new ResizeObserver((D) => {
2793
- R(D[0].contentRect.height);
2780
+ } = Ne(), { localeMessages: I } = he(), [S, R] = q(0), N = W(
2781
+ new ResizeObserver((L) => {
2782
+ R(L[0].contentRect.height);
2794
2783
  })
2795
- ), z = F(() => P || f || m || d || l || C || o && (i || c || p || T), [
2784
+ ), A = M(() => P || f || m || d || l || C || o && (i || c || h || T), [
2796
2785
  i,
2797
2786
  c,
2798
- p,
2787
+ h,
2799
2788
  T,
2800
2789
  l,
2801
2790
  d,
@@ -2803,27 +2792,27 @@ const Ie = {
2803
2792
  m,
2804
2793
  P,
2805
2794
  o
2806
- ]), M = F(() => a || h || u || g || y || x || o && (b || v || w || _), [
2795
+ ]), z = M(() => s || p || u || g || y || x || o && (b || v || _ || w), [
2807
2796
  b,
2808
2797
  v,
2809
- w,
2810
2798
  _,
2799
+ w,
2811
2800
  y,
2812
2801
  g,
2813
- h,
2802
+ p,
2814
2803
  u,
2815
- a,
2804
+ s,
2816
2805
  o
2817
2806
  ]);
2818
- return A(() => (r && N.current.observe(r), () => {
2807
+ return D(() => (r && N.current.observe(r), () => {
2819
2808
  N.current.disconnect();
2820
- }), [r]), !z || !M ? null : /* @__PURE__ */ H(he, { children: [
2821
- /* @__PURE__ */ s(
2809
+ }), [r]), !A || !z ? null : /* @__PURE__ */ H(pe, { children: [
2810
+ /* @__PURE__ */ a(
2822
2811
  dn,
2823
2812
  {
2824
2813
  container: n,
2825
2814
  onOpenChange: e,
2826
- triggerComponent: /* @__PURE__ */ s("div", { role: "button", children: /* @__PURE__ */ s(Q, { content: I == null ? void 0 : I.moreOptionTooltip, children: /* @__PURE__ */ s(we, { active: t, "aria-label": I == null ? void 0 : I.moreOptionTooltip, children: /* @__PURE__ */ s(lr, {}) }) }) }),
2815
+ triggerComponent: /* @__PURE__ */ a("div", { role: "button", children: /* @__PURE__ */ a(Q, { content: I == null ? void 0 : I.moreOptionTooltip, children: /* @__PURE__ */ a(ge, { active: t, "aria-label": I == null ? void 0 : I.moreOptionTooltip, children: /* @__PURE__ */ a(lr, {}) }) }) }),
2827
2816
  side: "bottom",
2828
2817
  avoidCollisions: !1,
2829
2818
  children: /* @__PURE__ */ H(
@@ -2834,46 +2823,46 @@ const Ie = {
2834
2823
  "data-rp": "moreOptionsDropdown",
2835
2824
  children: [
2836
2825
  o && /* @__PURE__ */ H(hn, { children: [
2837
- /* @__PURE__ */ s(pn, {}),
2838
- /* @__PURE__ */ s(Bn, {}),
2839
- /* @__PURE__ */ s(Zn, {}),
2840
- /* @__PURE__ */ s(fn, {}),
2841
- /* @__PURE__ */ s(un, {})
2826
+ /* @__PURE__ */ a(pn, {}),
2827
+ /* @__PURE__ */ a(Bn, {}),
2828
+ /* @__PURE__ */ a(Zn, {}),
2829
+ /* @__PURE__ */ a(fn, {}),
2830
+ /* @__PURE__ */ a(un, {})
2842
2831
  ] }),
2843
- /* @__PURE__ */ s($i, {}),
2844
- /* @__PURE__ */ s(Cr, {}),
2845
- /* @__PURE__ */ s(Ir, {}),
2846
- /* @__PURE__ */ s(Pr, {}),
2847
- /* @__PURE__ */ s(yr, {}),
2848
- /* @__PURE__ */ s(Tr, {})
2832
+ /* @__PURE__ */ a($i, {}),
2833
+ /* @__PURE__ */ a(Cr, {}),
2834
+ /* @__PURE__ */ a(Ir, {}),
2835
+ /* @__PURE__ */ a(Pr, {}),
2836
+ /* @__PURE__ */ a(yr, {}),
2837
+ /* @__PURE__ */ a(Tr, {})
2849
2838
  ]
2850
2839
  }
2851
2840
  )
2852
2841
  }
2853
2842
  ),
2854
- /* @__PURE__ */ s(Ei, {})
2843
+ /* @__PURE__ */ a(Ei, {})
2855
2844
  ] });
2856
2845
  }, Gi = () => {
2857
2846
  const { isSmallScreen: t } = Oe();
2858
- return /* @__PURE__ */ H(he, { children: [
2859
- /* @__PURE__ */ s(cr, {}),
2860
- !t && /* @__PURE__ */ H(he, { children: [
2861
- /* @__PURE__ */ s(pn, {}),
2862
- /* @__PURE__ */ s(Bn, {}),
2863
- /* @__PURE__ */ s(Zn, {}),
2864
- /* @__PURE__ */ s(fn, {})
2847
+ return /* @__PURE__ */ H(pe, { children: [
2848
+ /* @__PURE__ */ a(cr, {}),
2849
+ !t && /* @__PURE__ */ H(pe, { children: [
2850
+ /* @__PURE__ */ a(pn, {}),
2851
+ /* @__PURE__ */ a(Bn, {}),
2852
+ /* @__PURE__ */ a(Zn, {}),
2853
+ /* @__PURE__ */ a(fn, {})
2865
2854
  ] }),
2866
- /* @__PURE__ */ s(qi, {})
2855
+ /* @__PURE__ */ a(qi, {})
2867
2856
  ] });
2868
2857
  }, tn = () => {
2869
- const { totalMatches: t, nextMatch: e, prevMatch: n } = yt(), { localeMessages: r } = fe();
2870
- return /* @__PURE__ */ H(he, { children: [
2871
- /* @__PURE__ */ s(
2858
+ const { totalMatches: t, nextMatch: e, prevMatch: n } = yt(), { localeMessages: r } = he();
2859
+ return /* @__PURE__ */ H(pe, { children: [
2860
+ /* @__PURE__ */ a(
2872
2861
  Q,
2873
2862
  {
2874
2863
  content: r == null ? void 0 : r.searchPrevTooltip,
2875
2864
  className: te["rp-search-tool-result-navigator"],
2876
- children: /* @__PURE__ */ s(we, { tabIndex: 0, onClick: n, "aria-label": r == null ? void 0 : r.searchPrevTooltip, children: /* @__PURE__ */ s(
2865
+ children: /* @__PURE__ */ a(ge, { tabIndex: 0, onClick: n, "aria-label": r == null ? void 0 : r.searchPrevTooltip, children: /* @__PURE__ */ a(
2877
2866
  Ze,
2878
2867
  {
2879
2868
  className: te["rp-search-tool-input-icon"],
@@ -2882,12 +2871,12 @@ const Ie = {
2882
2871
  ) })
2883
2872
  }
2884
2873
  ),
2885
- /* @__PURE__ */ s(
2874
+ /* @__PURE__ */ a(
2886
2875
  Q,
2887
2876
  {
2888
2877
  content: r == null ? void 0 : r.searchNextTooltip,
2889
2878
  className: te["rp-search-tool-result-navigator"],
2890
- children: /* @__PURE__ */ s(we, { tabIndex: 0, onClick: e, "aria-label": r == null ? void 0 : r.searchNextTooltip, children: /* @__PURE__ */ s(
2879
+ children: /* @__PURE__ */ a(ge, { tabIndex: 0, onClick: e, "aria-label": r == null ? void 0 : r.searchNextTooltip, children: /* @__PURE__ */ a(
2891
2880
  Ze,
2892
2881
  {
2893
2882
  style: { transform: "rotate(180deg" },
@@ -2899,93 +2888,93 @@ const Ie = {
2899
2888
  )
2900
2889
  ] });
2901
2890
  }, Ui = () => {
2902
- const { searchIcon: t } = Pe(), { searchIcon: e } = Te();
2903
- return t || e || /* @__PURE__ */ s(gn, {});
2891
+ const { searchIcon: t } = Ce(), { searchIcon: e } = be();
2892
+ return t || e || /* @__PURE__ */ a(gn, {});
2904
2893
  }, Vi = ({ icon: t }) => {
2905
- const { container: e } = be(), [n, r] = $(!1), { pdf: o } = oe(), [i, c] = $(null), {
2894
+ const { container: e } = _e(), [n, r] = q(!1), { pdf: o } = oe(), [i, c] = q(null), {
2906
2895
  searchOptions: l,
2907
2896
  setSearchOptions: d,
2908
2897
  loading: f,
2909
2898
  setSearch: m,
2910
2899
  totalMatches: P,
2911
- currentMatchPosition: p,
2900
+ currentMatchPosition: h,
2912
2901
  nextMatch: T,
2913
2902
  prevMatch: C,
2914
2903
  search: b
2915
- } = yt(), { searchTool: v = !0 } = Ce(), { searchTool: y = !0 } = Ne(), [g, h] = $(b), { localeMessages: u } = fe(), { isSmallScreen: a } = Oe(), [w, _] = $(null), [x, I] = $(!1), S = O(() => {
2904
+ } = yt(), { searchTool: v = !0 } = Te(), { searchTool: y = !0 } = Ne(), [g, p] = q(b), { localeMessages: u } = he(), { isSmallScreen: s } = Oe(), [_, w] = q(null), [x, I] = q(!1), S = E(() => {
2916
2905
  r(!0);
2917
- }, []), R = O(() => {
2918
- m(""), h(""), r(!1);
2906
+ }, []), R = E(() => {
2907
+ m(""), p(""), r(!1);
2919
2908
  }, [m]), N = (G) => {
2920
- const Z = G.key === "Enter", Y = G.key === " ";
2921
- (Z || Y) && R();
2922
- }, z = O(
2909
+ const K = G.key === "Enter", Y = G.key === " ";
2910
+ (K || Y) && R();
2911
+ }, A = E(
2923
2912
  (G) => {
2924
2913
  G.key === "Escape" && n && R();
2925
2914
  },
2926
2915
  [n]
2927
- ), M = O(
2916
+ ), z = E(
2928
2917
  (G) => {
2929
2918
  G.shiftKey && G.key === "Enter" ? C() : G.key === "Enter" && b !== g ? m(g) : G.key === "Enter" && T();
2930
2919
  },
2931
2920
  [g, C, T, m, b]
2932
2921
  );
2933
- A(() => {
2934
- h(b);
2935
- }, [b]), A(() => {
2922
+ D(() => {
2923
+ p(b);
2924
+ }, [b]), D(() => {
2936
2925
  b && o && I(!0);
2937
- }, [b, o]), A(() => {
2938
- b && b.trim() !== "" && (h(b), m(b));
2939
- }, []), A(() => (window.addEventListener("keydown", z), () => {
2940
- window.removeEventListener("keydown", z);
2941
- }), [z]), A(() => {
2926
+ }, [b, o]), D(() => {
2927
+ b && b.trim() !== "" && (p(b), m(b));
2928
+ }, []), D(() => (window.addEventListener("keydown", A), () => {
2929
+ window.removeEventListener("keydown", A);
2930
+ }), [A]), D(() => {
2942
2931
  i && setTimeout(() => {
2943
2932
  i.focus();
2944
2933
  }, 0);
2945
2934
  }, [i]);
2946
- const D = O((G) => {
2947
- h(G.target.value);
2948
- }, []), L = O(() => {
2949
- h(""), m("");
2950
- }, [m]), E = F(() => `${p} / ${P}`, [p, P]), { wholeWords: q, matchCase: W } = F(() => l, [l]), U = O(
2935
+ const L = E((G) => {
2936
+ p(G.target.value);
2937
+ }, []), O = E(() => {
2938
+ p(""), m("");
2939
+ }, [m]), F = M(() => `${h} / ${P}`, [h, P]), { wholeWords: $, matchCase: k } = M(() => l, [l]), B = E(
2951
2940
  (G) => {
2952
- d((Z) => ({ ...Z, matchCase: G }));
2941
+ d((K) => ({ ...K, matchCase: G }));
2953
2942
  },
2954
2943
  [d]
2955
- ), j = O(
2944
+ ), Z = E(
2956
2945
  (G) => {
2957
- d((Z) => ({ ...Z, wholeWords: G }));
2946
+ d((K) => ({ ...K, wholeWords: G }));
2958
2947
  },
2959
2948
  [d]
2960
2949
  );
2961
- A(() => {
2950
+ D(() => {
2962
2951
  o && x && R();
2963
2952
  }, [o, R]);
2964
- const V = F(() => (w == null ? void 0 : w.querySelectorAll('[tabindex]:not([tabindex="-1"])')) || [], [w]), ee = O(
2953
+ const U = M(() => (_ == null ? void 0 : _.querySelectorAll('[tabindex]:not([tabindex="-1"])')) || [], [_]), ie = E(
2965
2954
  (G) => {
2966
2955
  if (G.key === "Tab") {
2967
- const Z = document.activeElement;
2956
+ const K = document.activeElement;
2968
2957
  let Y = 0;
2969
- V.forEach((J, ue) => {
2970
- J === Z && (Y = ue);
2958
+ U.forEach((re, ve) => {
2959
+ re === K && (Y = ve);
2971
2960
  });
2972
- let re = Y + 1;
2973
- G.shiftKey && (re = Y - 1);
2974
- const se = V[re];
2975
- if (se)
2976
- se.focus();
2977
- else if (re > V.length - 1) {
2978
- const J = V[0];
2979
- J && J.focus();
2961
+ let J = Y + 1;
2962
+ G.shiftKey && (J = Y - 1);
2963
+ const ee = U[J];
2964
+ if (ee)
2965
+ ee.focus();
2966
+ else if (J > U.length - 1) {
2967
+ const re = U[0];
2968
+ re && re.focus();
2980
2969
  } else {
2981
- const J = V[V.length - 1];
2982
- J && J.focus();
2970
+ const re = U[U.length - 1];
2971
+ re && re.focus();
2983
2972
  }
2984
2973
  }
2985
2974
  },
2986
- [V]
2975
+ [U]
2987
2976
  );
2988
- return !v || !y ? null : /* @__PURE__ */ s(he, { children: /* @__PURE__ */ s(
2977
+ return !v || !y ? null : /* @__PURE__ */ a(pe, { children: /* @__PURE__ */ a(
2989
2978
  dn,
2990
2979
  {
2991
2980
  open: n,
@@ -2994,73 +2983,73 @@ const Ie = {
2994
2983
  align: "start",
2995
2984
  tabIndex: 0,
2996
2985
  avoidCollisions: !1,
2997
- triggerComponent: /* @__PURE__ */ s(Q, { content: u == null ? void 0 : u.searchButtonTooltip, children: /* @__PURE__ */ s(
2998
- we,
2986
+ triggerComponent: /* @__PURE__ */ a(Q, { content: u == null ? void 0 : u.searchButtonTooltip, children: /* @__PURE__ */ a(
2987
+ ge,
2999
2988
  {
3000
2989
  active: n,
3001
2990
  onClick: S,
3002
2991
  "aria-label": u == null ? void 0 : u.searchButtonTooltip,
3003
- children: t || /* @__PURE__ */ s(Ui, {})
2992
+ children: t || /* @__PURE__ */ a(Ui, {})
3004
2993
  }
3005
2994
  ) }),
3006
2995
  children: /* @__PURE__ */ H(
3007
2996
  "div",
3008
2997
  {
3009
- ref: _,
2998
+ ref: w,
3010
2999
  className: te["rp-search-tool-content"],
3011
3000
  tabIndex: 0,
3012
- onKeyDown: ee,
3001
+ onKeyDown: ie,
3013
3002
  children: [
3014
3003
  /* @__PURE__ */ H("div", { className: te["rp-search-tool-input-wrapper"], children: [
3015
3004
  /* @__PURE__ */ H("div", { className: te["rp-search-tool-input"], children: [
3016
- /* @__PURE__ */ s(Q, { content: u == null ? void 0 : u.searchInputTooltip, children: /* @__PURE__ */ s(
3017
- sn,
3005
+ /* @__PURE__ */ a(Q, { content: u == null ? void 0 : u.searchInputTooltip, children: /* @__PURE__ */ a(
3006
+ an,
3018
3007
  {
3019
3008
  value: g,
3020
- onKeyDown: M,
3021
- onChange: D,
3022
- icon: /* @__PURE__ */ s(gn, {}),
3009
+ onKeyDown: z,
3010
+ onChange: L,
3011
+ icon: /* @__PURE__ */ a(gn, {}),
3023
3012
  placeholder: u == null ? void 0 : u.searchInputPlaceholder,
3024
3013
  className: te["rp-search-input"],
3025
3014
  ref: c,
3026
3015
  id: "search-input",
3027
3016
  name: "search-input",
3028
3017
  tabIndex: 0,
3029
- children: !!g && /* @__PURE__ */ s("span", { className: te["rp-search-tool-input-clear"], onClick: L, children: /* @__PURE__ */ s(Lr, {}) })
3018
+ children: !!g && /* @__PURE__ */ a("span", { className: te["rp-search-tool-input-clear"], onClick: O, children: /* @__PURE__ */ a(Lr, {}) })
3030
3019
  }
3031
3020
  ) }),
3032
- f ? /* @__PURE__ */ s("span", { children: /* @__PURE__ */ s(ln, { className: te["rp-search-loader-icon"] }) }) : /* @__PURE__ */ s("span", { children: E }),
3033
- a && /* @__PURE__ */ s("div", { className: te["rp-search-tool-controls"], children: /* @__PURE__ */ s(At, { onKeyPress: N, handleClose: R }) })
3021
+ f ? /* @__PURE__ */ a("span", { children: /* @__PURE__ */ a(ln, { className: te["rp-search-loader-icon"] }) }) : /* @__PURE__ */ a("span", { children: F }),
3022
+ s && /* @__PURE__ */ a("div", { className: te["rp-search-tool-controls"], children: /* @__PURE__ */ a(At, { onKeyPress: N, handleClose: R }) })
3034
3023
  ] }),
3035
3024
  /* @__PURE__ */ H("div", { className: te["rp-search-tool-input-checkboxes"], children: [
3036
- a && /* @__PURE__ */ s(tn, {}),
3037
- /* @__PURE__ */ s(
3025
+ s && /* @__PURE__ */ a(tn, {}),
3026
+ /* @__PURE__ */ a(
3038
3027
  zt,
3039
3028
  {
3040
3029
  tabIndex: 0,
3041
3030
  name: "matchCase",
3042
- value: W,
3043
- onChange: U,
3031
+ value: k,
3032
+ onChange: B,
3044
3033
  children: u == null ? void 0 : u.searchMatchCaseLabel
3045
3034
  }
3046
3035
  ),
3047
- !a && /* @__PURE__ */ s(Q, { content: u == null ? void 0 : u.searchMatchCaseTooltip, children: /* @__PURE__ */ s("div", { className: te["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ s(Wt, {}) }) }),
3048
- /* @__PURE__ */ s(
3036
+ !s && /* @__PURE__ */ a(Q, { content: u == null ? void 0 : u.searchMatchCaseTooltip, children: /* @__PURE__ */ a("div", { className: te["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ a(Wt, {}) }) }),
3037
+ /* @__PURE__ */ a(
3049
3038
  zt,
3050
3039
  {
3051
3040
  tabIndex: 0,
3052
3041
  name: "wholeWord",
3053
- value: q,
3054
- onChange: j,
3042
+ value: $,
3043
+ onChange: Z,
3055
3044
  children: u == null ? void 0 : u.searchWholeWordsLabel
3056
3045
  }
3057
3046
  ),
3058
- !a && /* @__PURE__ */ s(Q, { content: u == null ? void 0 : u.searchWholeWordsTooltip, children: /* @__PURE__ */ s("div", { tabIndex: 0, className: te["rp-search-icon-info"], children: /* @__PURE__ */ s(Wt, {}) }) })
3047
+ !s && /* @__PURE__ */ a(Q, { content: u == null ? void 0 : u.searchWholeWordsTooltip, children: /* @__PURE__ */ a("div", { tabIndex: 0, className: te["rp-search-icon-info"], children: /* @__PURE__ */ a(Wt, {}) }) })
3059
3048
  ] })
3060
3049
  ] }),
3061
- !a && /* @__PURE__ */ H("div", { className: te["rp-search-tool-controls"], children: [
3062
- /* @__PURE__ */ s(tn, {}),
3063
- /* @__PURE__ */ s(At, { onKeyPress: N, handleClose: R })
3050
+ !s && /* @__PURE__ */ H("div", { className: te["rp-search-tool-controls"], children: [
3051
+ /* @__PURE__ */ a(tn, {}),
3052
+ /* @__PURE__ */ a(At, { onKeyPress: N, handleClose: R })
3064
3053
  ] })
3065
3054
  ]
3066
3055
  }
@@ -3076,36 +3065,36 @@ const Ie = {
3076
3065
  "rp-loading-cancel-button": "_rp-loading-cancel-button_wazy2_55",
3077
3066
  loading: Bi
3078
3067
  }, ji = ({ percentage: t }) => {
3079
- const { cancel: e } = tt(), { localeMessages: n } = fe();
3080
- return t < 1 ? null : /* @__PURE__ */ s("div", { className: ce(Ae["rp-loading-overlay"]), children: /* @__PURE__ */ H("div", { className: ce(Ae["rp-loading-modal"]), children: [
3081
- /* @__PURE__ */ H("div", { className: ce(Ae["rp-loading-title"]), children: [
3068
+ const { cancel: e } = tt(), { localeMessages: n } = he();
3069
+ return t < 1 ? null : /* @__PURE__ */ a("div", { className: se(Ae["rp-loading-overlay"]), children: /* @__PURE__ */ H("div", { className: se(Ae["rp-loading-modal"]), children: [
3070
+ /* @__PURE__ */ H("div", { className: se(Ae["rp-loading-title"]), children: [
3082
3071
  n == null ? void 0 : n.printLoadingMessage,
3083
3072
  "..."
3084
3073
  ] }),
3085
- /* @__PURE__ */ s("div", { className: ce(Ae["rp-loading-progress-bar"]), children: /* @__PURE__ */ s(
3074
+ /* @__PURE__ */ a("div", { className: se(Ae["rp-loading-progress-bar"]), children: /* @__PURE__ */ a(
3086
3075
  "div",
3087
3076
  {
3088
- className: ce(Ae["rp-loading-progress"]),
3077
+ className: se(Ae["rp-loading-progress"]),
3089
3078
  style: { width: `${t}%` }
3090
3079
  }
3091
3080
  ) }),
3092
- /* @__PURE__ */ s("button", { className: ce(Ae["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
3081
+ /* @__PURE__ */ a("button", { className: se(Ae["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
3093
3082
  ] }) });
3094
3083
  }, Ki = et((t, e) => {
3095
- const { showPrintProgress: n = !0 } = Ce(), { showPrintProgress: r = !0 } = Ne(), { progress: o } = tt(), { isSmallScreen: i } = Oe(), { percentage: c } = o || {}, l = () => i ? { gridTemplateColumns: "25% 60% 15%" } : void 0, d = () => {
3084
+ const { showPrintProgress: n = !0 } = Te(), { showPrintProgress: r = !0 } = Ne(), { progress: o } = tt(), { isSmallScreen: i } = Oe(), { percentage: c } = o || {}, l = () => i ? { gridTemplateColumns: "25% 60% 15%" } : void 0, d = () => {
3096
3085
  if (!(!n || !r || !c))
3097
- return /* @__PURE__ */ s(ji, { percentage: c });
3086
+ return /* @__PURE__ */ a(ji, { percentage: c });
3098
3087
  };
3099
3088
  return /* @__PURE__ */ H("div", { children: [
3100
- /* @__PURE__ */ s("div", { "data-rp": "topBar", ref: e, className: ke["rp-toolbar-content"], children: /* @__PURE__ */ H("div", { className: ke["rp-toolbar-wrapper"], style: l(), children: [
3089
+ /* @__PURE__ */ a("div", { "data-rp": "topBar", ref: e, className: ke["rp-toolbar-content"], children: /* @__PURE__ */ H("div", { className: ke["rp-toolbar-wrapper"], style: l(), children: [
3101
3090
  /* @__PURE__ */ H("div", { "data-rp": "topBarLeft", className: ke["rp-toolbar-start"], children: [
3102
- /* @__PURE__ */ s(Vi, {}),
3103
- /* @__PURE__ */ s(hi, {})
3091
+ /* @__PURE__ */ a(Vi, {}),
3092
+ /* @__PURE__ */ a(hi, {})
3104
3093
  ] }),
3105
- /* @__PURE__ */ s("div", { "data-rp": "topBarCenter", className: ke["rp-toolbar-middle"], children: /* @__PURE__ */ s(Rr, {}) }),
3106
- /* @__PURE__ */ s("div", { "data-rp": "topBarRight", className: ke["rp-toolbar-end"], children: /* @__PURE__ */ s(Gi, {}) })
3094
+ /* @__PURE__ */ a("div", { "data-rp": "topBarCenter", className: ke["rp-toolbar-middle"], children: /* @__PURE__ */ a(Rr, {}) }),
3095
+ /* @__PURE__ */ a("div", { "data-rp": "topBarRight", className: ke["rp-toolbar-end"], children: /* @__PURE__ */ a(Gi, {}) })
3107
3096
  ] }) }),
3108
- /* @__PURE__ */ s(d, {})
3097
+ /* @__PURE__ */ a(d, {})
3109
3098
  ] });
3110
3099
  }), ht = {
3111
3100
  "rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1bqgz_1",
@@ -3118,26 +3107,26 @@ const Ie = {
3118
3107
  "rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
3119
3108
  "rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
3120
3109
  }, Zi = (t) => {
3121
- const { pageNumber: e, isFocused: n, viewport: r } = t, { goToPage: o } = de(), { pageRotate: i } = Je(), c = k(null), l = yn(), { pages: d } = oe(), [f, m] = $(null), P = k(!1), p = k(), T = F(() => n ? We["rp-thumbnail-active"] : "", [n]), C = F(() => ({
3110
+ const { pageNumber: e, isFocused: n, viewport: r } = t, { goToPage: o } = le(), { pageRotate: i } = Je(), c = W(null), l = yn(), { pages: d } = oe(), [f, m] = q(null), P = W(!1), h = W(), T = M(() => n ? We["rp-thumbnail-active"] : "", [n]), C = M(() => ({
3122
3111
  width: Math.round(r.width),
3123
3112
  height: Math.round(r.height)
3124
- }), [r]), b = O(() => {
3113
+ }), [r]), b = E(() => {
3125
3114
  e && o(e);
3126
3115
  }, [o, e]);
3127
- return A(() => {
3116
+ return D(() => {
3128
3117
  const v = d.get(e);
3129
- p.current === v || (m(null), p.current = v);
3130
- }, [d, e]), A(() => {
3118
+ h.current === v || (m(null), h.current = v);
3119
+ }, [d, e]), D(() => {
3131
3120
  const v = d.get(e);
3132
3121
  if (!c.current || !e || !v || f)
3133
3122
  return;
3134
3123
  const y = new IntersectionObserver((g) => {
3135
- g.forEach((h) => {
3124
+ g.forEach((p) => {
3136
3125
  if (P.current) {
3137
3126
  P.current = !1, l.removeQueue(`thumbnail-${e}`);
3138
3127
  return;
3139
3128
  }
3140
- if (h.isIntersecting) {
3129
+ if (p.isIntersecting) {
3141
3130
  const u = document.createElement("canvas");
3142
3131
  P.current = !0, l.enqueue(
3143
3132
  `thumbnail-${e}`,
@@ -3148,11 +3137,11 @@ const Ie = {
3148
3137
  scale: 1
3149
3138
  },
3150
3139
  onLoaded: () => {
3151
- u.toBlob((a) => {
3152
- if (!a)
3140
+ u.toBlob((s) => {
3141
+ if (!s)
3153
3142
  return;
3154
- const w = URL.createObjectURL(a);
3155
- m(w);
3143
+ const _ = URL.createObjectURL(s);
3144
+ m(_);
3156
3145
  });
3157
3146
  }
3158
3147
  },
@@ -3172,14 +3161,14 @@ const Ie = {
3172
3161
  className: We["rp-thumbnail-wrapper"],
3173
3162
  ref: c,
3174
3163
  children: [
3175
- /* @__PURE__ */ s(
3164
+ /* @__PURE__ */ a(
3176
3165
  "div",
3177
3166
  {
3178
3167
  style: {
3179
3168
  transform: `rotate(${i[e || 0]}deg)`
3180
3169
  },
3181
- className: ce(T, We["rp-thumbnail"]),
3182
- children: f ? /* @__PURE__ */ s(
3170
+ className: se(T, We["rp-thumbnail"]),
3171
+ children: f ? /* @__PURE__ */ a(
3183
3172
  "img",
3184
3173
  {
3185
3174
  src: f,
@@ -3187,7 +3176,7 @@ const Ie = {
3187
3176
  height: C.height,
3188
3177
  alt: "thumbnail"
3189
3178
  }
3190
- ) : /* @__PURE__ */ s(
3179
+ ) : /* @__PURE__ */ a(
3191
3180
  "div",
3192
3181
  {
3193
3182
  className: We["rp-thumbnail-loader"],
@@ -3195,12 +3184,12 @@ const Ie = {
3195
3184
  width: `${C.width}px`,
3196
3185
  height: `${C.height}px`
3197
3186
  },
3198
- children: /* @__PURE__ */ s(ln, {})
3187
+ children: /* @__PURE__ */ a(ln, {})
3199
3188
  }
3200
3189
  )
3201
3190
  }
3202
3191
  ),
3203
- /* @__PURE__ */ s("div", { className: We["rp-thumbnail-text"], children: e })
3192
+ /* @__PURE__ */ a("div", { className: We["rp-thumbnail-text"], children: e })
3204
3193
  ]
3205
3194
  }
3206
3195
  );
@@ -3211,17 +3200,17 @@ const Ie = {
3211
3200
  const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
3212
3201
  t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - Xi);
3213
3202
  }, Yi = et((t, e) => {
3214
- const { show: n, width: r } = t, { focusedPage: o, totalPages: i } = de(), { thumbnailPages: c, addPage: l, thumbnailLength: d, addToPage: f } = Tn(), m = k(null), P = k(1);
3203
+ const { show: n, width: r } = t, { focusedPage: o, totalPages: i } = le(), { thumbnailPages: c, addPage: l, thumbnailLength: d, addToPage: f } = Tn(), m = W(null), P = W(1);
3215
3204
  on(e, () => m.current);
3216
- const p = F(() => Object.values(c), [c]), T = O(() => {
3205
+ const h = M(() => Object.values(c), [c]), T = E(() => {
3217
3206
  const C = d + 1;
3218
3207
  C <= i && l(C);
3219
3208
  }, [l, i, d]);
3220
- return A(() => {
3209
+ return D(() => {
3221
3210
  o > d && i > d ? f(o) : n && P.current !== o && (Qi(m.current, o), P.current = o);
3222
- }, [o, d, f, n, p]), Mo(m.current, T), /* @__PURE__ */ s("div", { ref: m, className: nn["rp-thumbnails-container"], style: { width: r }, children: /* @__PURE__ */ s("div", { className: nn["rp-thumbnails"], children: n ? p.map((C, b) => {
3211
+ }, [o, d, f, n, h]), Fo(m.current, T), /* @__PURE__ */ a("div", { ref: m, className: nn["rp-thumbnails-container"], style: { width: r }, children: /* @__PURE__ */ a("div", { className: nn["rp-thumbnails"], children: n ? h.map((C, b) => {
3223
3212
  var v, y;
3224
- return /* @__PURE__ */ s(
3213
+ return /* @__PURE__ */ a(
3225
3214
  Zi,
3226
3215
  {
3227
3216
  isFocused: o === ((v = C.page) == null ? void 0 : v.pageNumber),
@@ -3234,28 +3223,28 @@ const Ie = {
3234
3223
  );
3235
3224
  }) : null }) });
3236
3225
  }), Ji = () => {
3237
- const { thumbnailIcon: t } = Pe(), { thumbnailIcon: e } = Te();
3238
- return t || e || /* @__PURE__ */ s(xo, {});
3239
- }, es = () => {
3240
- const { active: t, setActive: e } = Tn(), [n, r] = $(Fo), o = k(null), i = k(null), { thumbnailTool: c, sidebarEnable: l } = Ce(), { localeMessages: d } = fe(), f = O(() => {
3226
+ const { thumbnailIcon: t } = Ce(), { thumbnailIcon: e } = be();
3227
+ return t || e || /* @__PURE__ */ a(xo, {});
3228
+ }, ea = () => {
3229
+ const { active: t, setActive: e } = Tn(), [n, r] = q(Mo), o = W(null), i = W(null), { thumbnailTool: c, sidebarEnable: l } = Te(), { localeMessages: d } = he(), f = E(() => {
3241
3230
  e((P) => !P);
3242
- }, []), m = F(() => typeof c != "boolean" && c ? /* @__PURE__ */ s(c, { onClick: f, active: t }) : c ? /* @__PURE__ */ s(Q, { content: d == null ? void 0 : d.thumbnailTooltip, children: /* @__PURE__ */ s(
3243
- we,
3231
+ }, []), m = M(() => typeof c != "boolean" && c ? /* @__PURE__ */ a(c, { onClick: f, active: t }) : c ? /* @__PURE__ */ a(Q, { content: d == null ? void 0 : d.thumbnailTooltip, children: /* @__PURE__ */ a(
3232
+ ge,
3244
3233
  {
3245
3234
  onClick: f,
3246
3235
  active: t,
3247
3236
  "aria-label": d == null ? void 0 : d.thumbnailTooltip,
3248
- children: /* @__PURE__ */ s(Ji, {})
3237
+ children: /* @__PURE__ */ a(Ji, {})
3249
3238
  }
3250
3239
  ) }) : null, [c, t, f, d]);
3251
- return /* @__PURE__ */ s(he, { children: l && /* @__PURE__ */ H(
3240
+ return /* @__PURE__ */ a(pe, { children: l && /* @__PURE__ */ H(
3252
3241
  "div",
3253
3242
  {
3254
3243
  style: { "--rp-thumbnail-width": `${n}px` },
3255
3244
  className: ht["rp-sidebar-content-wrapper"],
3256
3245
  "data-rp": "sidebar",
3257
3246
  children: [
3258
- /* @__PURE__ */ s("div", { ref: i, className: ht["rp-sidebar-content"], children: m }),
3247
+ /* @__PURE__ */ a("div", { ref: i, className: ht["rp-sidebar-content"], children: m }),
3259
3248
  /* @__PURE__ */ H(
3260
3249
  "div",
3261
3250
  {
@@ -3263,8 +3252,8 @@ const Ie = {
3263
3252
  hidden: !t,
3264
3253
  className: ht["rp-thumbnails-wrapper"],
3265
3254
  children: [
3266
- /* @__PURE__ */ s(Yi, { show: t, ref: o }),
3267
- /* @__PURE__ */ s(
3255
+ /* @__PURE__ */ a(Yi, { show: t, ref: o }),
3256
+ /* @__PURE__ */ a(
3268
3257
  Lo,
3269
3258
  {
3270
3259
  onWidthChange: r,
@@ -3289,30 +3278,30 @@ const Ie = {
3289
3278
  onLoaded: d,
3290
3279
  cleanupOnLoaded: f,
3291
3280
  onLayoutWidthChange: m
3292
- } = t, [P, p] = $(null), { setContainer: T, setContentRef: C } = be(), { loading: b } = oe(), { LoaderImageComponent: v } = _t();
3293
- return A(() => (d && d(), () => {
3281
+ } = t, [P, h] = q(null), { setContainer: T, setContentRef: C } = _e(), { loading: b } = oe(), { LoaderImageComponent: v } = _t();
3282
+ return D(() => (d && d(), () => {
3294
3283
  f && f();
3295
3284
  }), [d, f]), // TODO: deprecated in v2.0.0, remove later ~
3296
- /* @__PURE__ */ s(Rn, { toolbarRef: P, ref: e, children: /* @__PURE__ */ s(Io, { mobileWidth: l, onLayoutWidthChange: m, children: /* @__PURE__ */ s(Ro, { slots: r, children: /* @__PURE__ */ s(Ao, { icons: o, children: /* @__PURE__ */ H(So, { getContainerRef: T, style: i, className: c, children: [
3285
+ /* @__PURE__ */ a(Rn, { toolbarRef: P, ref: e, children: /* @__PURE__ */ a(Io, { mobileWidth: l, onLayoutWidthChange: m, children: /* @__PURE__ */ a(Ro, { slots: r, children: /* @__PURE__ */ a(Ao, { icons: o, children: /* @__PURE__ */ H(So, { getContainerRef: T, style: i, className: c, children: [
3297
3286
  /* @__PURE__ */ H(Eo, { children: [
3298
- /* @__PURE__ */ H("div", { className: _e["rp-layout"], children: [
3299
- /* @__PURE__ */ s(
3287
+ /* @__PURE__ */ H("div", { className: we["rp-layout"], children: [
3288
+ /* @__PURE__ */ a(
3300
3289
  Ki,
3301
3290
  {
3302
- ref: p
3291
+ ref: h
3303
3292
  }
3304
3293
  ),
3305
- /* @__PURE__ */ H("div", { className: _e["rp-content"], children: [
3306
- /* @__PURE__ */ s("div", { className: _e["rp-sidebar"], children: /* @__PURE__ */ s(es, {}) }),
3307
- /* @__PURE__ */ s("div", { ref: C, className: _e["rp-pages"], children: n })
3294
+ /* @__PURE__ */ H("div", { className: we["rp-content"], children: [
3295
+ /* @__PURE__ */ a("div", { className: we["rp-sidebar"], children: /* @__PURE__ */ a(ea, {}) }),
3296
+ /* @__PURE__ */ a("div", { ref: C, className: we["rp-pages"], children: n })
3308
3297
  ] })
3309
3298
  ] }),
3310
- /* @__PURE__ */ s(Do, {})
3299
+ /* @__PURE__ */ a(Do, {})
3311
3300
  ] }),
3312
- b ? /* @__PURE__ */ s(
3301
+ b ? /* @__PURE__ */ a(
3313
3302
  "div",
3314
3303
  {
3315
- className: _e["rp-loader"],
3304
+ className: we["rp-loader"],
3316
3305
  style: {
3317
3306
  position: "absolute",
3318
3307
  top: 0,
@@ -3322,7 +3311,7 @@ const Ie = {
3322
3311
  width: "100%",
3323
3312
  height: "100%"
3324
3313
  },
3325
- children: /* @__PURE__ */ s(
3314
+ children: /* @__PURE__ */ a(
3326
3315
  "div",
3327
3316
  {
3328
3317
  style: {
@@ -3332,7 +3321,7 @@ const Ie = {
3332
3321
  height: "100%",
3333
3322
  width: "100%"
3334
3323
  },
3335
- children: v && /* @__PURE__ */ s(v, {})
3324
+ children: v && /* @__PURE__ */ a(v, {})
3336
3325
  }
3337
3326
  )
3338
3327
  }
@@ -3352,34 +3341,34 @@ export {
3352
3341
  yn as C,
3353
3342
  Ei as D,
3354
3343
  Ar as E,
3355
- Fr as F,
3344
+ Mr as F,
3356
3345
  Hr as G,
3357
3346
  qr as H,
3358
3347
  xt as I,
3359
3348
  ri as J,
3360
- ai as K,
3349
+ si as K,
3361
3350
  Rn as L,
3362
3351
  ci as M,
3363
3352
  li as N,
3364
3353
  Bn as O,
3365
- Ka as P,
3354
+ Ks as P,
3366
3355
  Zn as Q,
3367
- Ja as R,
3356
+ Js as R,
3368
3357
  Vi as S,
3369
- Xa as T,
3358
+ Xs as T,
3370
3359
  $i as U,
3371
3360
  qi as V,
3372
3361
  tn as W,
3373
3362
  Ki as X,
3374
3363
  Zi as Y,
3375
- es as Z,
3364
+ ea as Z,
3376
3365
  nc as a,
3377
3366
  Gn as b,
3378
3367
  tt as c,
3379
3368
  yt as d,
3380
- Qa as e,
3381
- Ya as f,
3382
- Za as g,
3369
+ Qs as e,
3370
+ Ys as f,
3371
+ Zs as g,
3383
3372
  Tn as h,
3384
3373
  pt as i,
3385
3374
  ke as j,
@@ -3393,7 +3382,7 @@ export {
3393
3382
  vn as r,
3394
3383
  Er as s,
3395
3384
  wn as t,
3396
- de as u,
3385
+ le as u,
3397
3386
  Nr as v,
3398
3387
  _n as w,
3399
3388
  Or as x,