@pdf-viewer/react 1.8.0-rc.2 → 1.8.1-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/{Popover-1faa77f6.js → Popover-48c8394c.js} +2 -2
  2. package/dist/{RPDefaultLayout-2cca5d34.js → RPDefaultLayout-c0c44afa.js} +1052 -1031
  3. package/dist/assets/RPDefaultLayout.css +1 -1
  4. package/dist/{component-1da194e8.js → component-2aa6e53b.js} +1 -1
  5. package/dist/components/RPConfig.js +691 -673
  6. package/dist/components/RPController.js +1 -1
  7. package/dist/components/RPPages.js +1 -1
  8. package/dist/components/layout/LayoutContainer.js +1 -1
  9. package/dist/components/layout/RPDefaultLayout.js +1 -1
  10. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  11. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  12. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  13. package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
  14. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  15. package/dist/components/layout/toolbar/MenuItem.js +1 -1
  16. package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
  17. package/dist/components/layout/toolbar/MostPageTool.js +2 -2
  18. package/dist/components/layout/toolbar/OtherTool.js +2 -2
  19. package/dist/components/layout/toolbar/Paginate.js +1 -1
  20. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  21. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  22. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  23. package/dist/components/layout/toolbar/RotateTool.js +1 -1
  24. package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
  25. package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
  26. package/dist/components/layout/toolbar/SearchTool.js +2 -2
  27. package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
  28. package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
  29. package/dist/components/layout/toolbar/ZoomTool.js +4 -3
  30. package/dist/components/page/AnnotationLayer.js +1 -1
  31. package/dist/components/page/CanvasLayer.js +1 -1
  32. package/dist/components/page/DualPage.js +1 -1
  33. package/dist/components/page/RPPage.js +1 -1
  34. package/dist/components/page/SinglePage.js +1 -1
  35. package/dist/components/page/TextHighlightLayer.js +1 -1
  36. package/dist/components/page/TextLayer.js +1 -1
  37. package/dist/components/ui/Checkbox.js +228 -116
  38. package/dist/components/ui/DropDown.js +16 -16
  39. package/dist/components/ui/LoadingIndicator.js +1 -1
  40. package/dist/components/ui/Popover.js +1 -1
  41. package/dist/components/ui/RPTooltip.js +207 -207
  42. package/dist/contexts/PaginationContext.js +1 -1
  43. package/dist/contexts/PrintContext.js +1 -1
  44. package/dist/contexts/SearchContext.js +1 -1
  45. package/dist/contexts/ThumbnailsContext.js +1 -1
  46. package/dist/{floating-ui.react-dom-15b9b819.js → floating-ui.react-dom-4b1e2e46.js} +394 -380
  47. package/dist/index-6e0e48fa.js +332 -0
  48. package/dist/{index-7279fb4e.js → index-951f0f1f.js} +464 -456
  49. package/dist/index-e3a67935.js +150 -0
  50. package/dist/main.js +1 -1
  51. package/dist/types/components/ui/DropDown.d.ts +2 -1
  52. package/dist/utils/hooks/useFileDownload.js +1 -1
  53. package/dist/utils/hooks/useLicense.js +1 -1
  54. package/dist/utils/hooks/usePaginate.js +1 -1
  55. package/dist/utils/hooks/usePresentPage.js +1 -1
  56. package/dist/utils/hooks/usePrint.js +1 -1
  57. package/dist/utils/hooks/useScrollToPage.js +1 -1
  58. package/dist/utils/hooks/useSearch.js +1 -1
  59. package/dist/utils/hooks/useThumbnail.js +1 -1
  60. package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
  61. package/package.json +7 -2
  62. package/dist/index-1cb41342.js +0 -307
  63. package/dist/index-aa2d3884.js +0 -140
@@ -4,15 +4,15 @@ import { useRef as H, useEffect as F, useCallback as N, useState as $, useMemo a
4
4
  import { ChevronUpIcon as He } from "./components/icons/ChevronUpIcon.js";
5
5
  import { UIButton as re } from "./components/ui/Button.js";
6
6
  import { UIInput as dn } from "./components/ui/Input.js";
7
- import { ViewMode as Re, ScrollMode as Q, AnnotationSubType as Dt, SelectionMode as nr, ZoomLevel as at } from "./utils/types.js";
8
- import { useScrollModeContext as Ee } from "./contexts/ScrollModeContext.js";
7
+ import { ViewMode as Le, ScrollMode as Q, AnnotationSubType as zt, SelectionMode as nr, ZoomLevel as st } from "./utils/types.js";
8
+ import { useScrollModeContext as Ne } from "./contexts/ScrollModeContext.js";
9
9
  import { useDocumentContext as ee } from "./contexts/RPDocumentContext.js";
10
10
  import { useDocumentPasswordContext as rr } from "./contexts/DocumentPasswordContext.js";
11
11
  import { useDarkModeContext as or } from "./contexts/DarkModeContext.js";
12
12
  import "./contexts/RotationContext.js";
13
13
  import { useLayerContext as ir } from "./contexts/LayerContext.js";
14
14
  import { useZoomContext as Qe } from "./contexts/ZoomContext.js";
15
- import { useViewModeContext as Ne } from "./contexts/ViewModeContext.js";
15
+ import { useViewModeContext as Oe } from "./contexts/ViewModeContext.js";
16
16
  import { useVirtualScrollContext as et } from "./contexts/VirtualScrollContext.js";
17
17
  import { useVirtualGridContext as un } from "./contexts/VirtualGridContext.js";
18
18
  import { useSelectionModeContext as ar } from "./contexts/SelectionModeContext.js";
@@ -20,7 +20,7 @@ import { useInitialStateContext as sr } from "./contexts/InitialStateContext.js"
20
20
  import { useFullScreenContext as cr } from "./contexts/FullScreenContext.js";
21
21
  import "./contexts/FileInputContext.js";
22
22
  import "./contexts/DropFileZoneContext.js";
23
- import { renderPage as vt } from "./utils/renderPage.js";
23
+ import { renderPage as wt } from "./utils/renderPage.js";
24
24
  import { findMatches as lr, resetDivs as dr, highlightMatches as ur, isMatchEntireWord as pr } from "./utils/highlight.js";
25
25
  import { useLayoutContainer as me } from "./contexts/LayoutContainerContext.js";
26
26
  import { useDimensionPagesContext as Ge } from "./contexts/DimensionPagesContext.js";
@@ -35,7 +35,7 @@ import { useLoaderContext as hn } from "./contexts/LoaderContext.js";
35
35
  import "./components/RPConfig.js";
36
36
  import { ThumbnailIcon as mr } from "./components/icons/Thumbnail.js";
37
37
  import { c as ne } from "./clsx-0c6e471a.js";
38
- import { LoaderIcon as Ct } from "./components/icons/LoaderIcon.js";
38
+ import { LoaderIcon as Pt } from "./components/icons/LoaderIcon.js";
39
39
  import { useInfiniteScroll as gr } from "./utils/hooks/useInfiniteScroll.js";
40
40
  import { RPSplitter as vr } from "./components/layout/sidebar/RPSplitter.js";
41
41
  import { useToolbarComponentContext as ge, ToolbarComponentProvider as wr } from "./contexts/ToolbarComponentContext.js";
@@ -47,31 +47,31 @@ import { RPDropFileZone as Pr } from "./components/RPDropFileZone.js";
47
47
  import { useViewportContext as Pe, ViewportProvider as Tr } from "./contexts/ViewportContext.js";
48
48
  import { useThemeContext as Sr } from "./contexts/ThemeContext.js";
49
49
  import * as yr from "pdfjs-dist";
50
- import { PixelsPerInch as xr, AnnotationMode as Ir, RenderingCancelledException as Rr, AnnotationLayer as Lr } from "pdfjs-dist";
50
+ import { PixelsPerInch as Ir, AnnotationMode as xr, RenderingCancelledException as Rr, AnnotationLayer as Lr } from "pdfjs-dist";
51
51
  import { SimpleLinkService as Er } from "./utils/link_service.js";
52
- import { annotationsEvents as Nr, annotationEventsHandler as Or, handleClick as At, handleAnnotationWidget as zr, handleAnnotationLink as Dr, bindLayerEvents as Ar, unbindLayerEvents as Ft } from "./utils/annotations.js";
52
+ import { annotationsEvents as Nr, annotationEventsHandler as Or, handleClick as At, handleAnnotationWidget as Dr, handleAnnotationLink as zr, bindLayerEvents as Ar, unbindLayerEvents as Ft } from "./utils/annotations.js";
53
53
  import { normalizeSingleKeyword as Fr, sortHighlightPosition as Wr, unwrap as kr } from "./components/page/searchHighlight.js";
54
54
  import { CustomElement as Mr } from "./components/page/CustomElement.js";
55
- import { _ as Hr, U as $r } from "./Popover-1faa77f6.js";
55
+ import { _ as Hr, U as $r } from "./Popover-48c8394c.js";
56
56
  import { useMousePressed as Gr } from "./utils/hooks/useMousePressed.js";
57
57
  import { useGrabScroll as Ur } from "./utils/hooks/useGrabScroll.js";
58
58
  import { usePinch as Vr } from "./utils/hooks/usePinch.js";
59
- import { useDebounce as Pt } from "./utils/hooks/useDebounce.js";
59
+ import { useDebounce as Tt } from "./utils/hooks/useDebounce.js";
60
60
  import qr from "./components/ui/PasswordModal.js";
61
61
  import { getPositionFromPage as Br, getPageFromPosition as Zr } from "./utils/calculatePage.js";
62
62
  import { getScrollDistance as Ae } from "./utils/getScrollDistance.js";
63
63
  import { getWordPositionInPage as jr } from "./utils/getWordPositionInPage.js";
64
64
  import { getThumbnailViewport as Wt } from "./utils/getThumbnailViewport.js";
65
- import { smoothScrollTo as st } from "./utils/smoothScrollTo.js";
65
+ import { smoothScrollTo as ct } from "./utils/smoothScrollTo.js";
66
66
  import { appConsole as Kr } from "./utils/appConsole.js";
67
67
  import { FileUploadTool as fn } from "./components/layout/toolbar/FileUploadTool.js";
68
68
  import { DarkModeTool as Xr } from "./components/layout/toolbar/DarkModeTool.js";
69
69
  import { ThreeDotIcon as Yr } from "./components/icons/ThreeDotIcon.js";
70
70
  import { UIDropDown as mn } from "./components/ui/DropDown.js";
71
- import { e as Jr, a as Tt, P as Ve, c as Me, g as St, i as Qr, k as eo, f as to } from "./index-1cb41342.js";
72
- import { D as no, u as ct } from "./index-aa2d3884.js";
73
- import { a as ro, u as oo, F as io, b as ao, G as Ke } from "./index-7279fb4e.js";
74
- import { h as so } from "./component-1da194e8.js";
71
+ import { c as Jr, u as St, P as Ve, a as Me, b as yt, k as Qr, e as eo, i as to } from "./index-6e0e48fa.js";
72
+ import { D as no, a as lt } from "./index-e3a67935.js";
73
+ import { a as ro, u as oo, F as io, b as ao, G as Ke } from "./index-951f0f1f.js";
74
+ import { h as so } from "./component-2aa6e53b.js";
75
75
  import { CloseIcon as co } from "./components/icons/CloseIcon.js";
76
76
  import { dateFormatter as kt } from "./utils/dateFormatter.js";
77
77
  import { PropertyItem as lo } from "./components/layout/toolbar/PropertyItem.js";
@@ -80,7 +80,7 @@ import { DocumentProperties as ho } from "./components/layout/toolbar/DocumentPr
80
80
  import { RotateTool as fo } from "./components/layout/toolbar/RotateTool.js";
81
81
  import { ViewModeTool as mo } from "./components/layout/toolbar/ViewModeTool.js";
82
82
  import { ScrollModeTool as go } from "./components/layout/toolbar/ScrollModeTool.js";
83
- import { MenuSeparator as yt } from "./components/layout/toolbar/MenuSeparator.js";
83
+ import { MenuSeparator as It } from "./components/layout/toolbar/MenuSeparator.js";
84
84
  import { FileDownloadDefaultIcon as vo } from "./components/icons/FileDownloadDefaultIcon.js";
85
85
  import { MenuItem as Ce } from "./components/layout/toolbar/MenuItem.js";
86
86
  import { PrintDefaultTool as wo } from "./components/icons/PrintDefaultIcon.js";
@@ -97,136 +97,136 @@ import { UICheckbox as $t } from "./components/ui/Checkbox.js";
97
97
  import { ClearIcon as So } from "./components/icons/ClearIcon.js";
98
98
  import { InfoIcon as Gt } from "./components/icons/InfoIcon.js";
99
99
  import './assets/RPDefaultLayout.css';const wn = () => {
100
- const { viewMode: t } = Ne(), { scrollMode: e } = Ee(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), l = H(), { columnCount: c } = un(), { widths: u, heights: d } = Ge(), m = H(e), v = H(t), p = H(c), { targetScrollPage: w } = pn();
100
+ const { viewMode: t } = Oe(), { scrollMode: e } = Ne(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), l = H(), { columnCount: c } = un(), { widths: u, heights: d } = Ge(), m = H(e), w = H(t), p = H(c), { targetScrollPage: _ } = pn();
101
101
  F(() => {
102
102
  n != null && n.scrollToItem && (l.current = n);
103
103
  }, [n]), F(() => {
104
- m.current = e, v.current = t;
104
+ m.current = e, w.current = t;
105
105
  }, [e, t]);
106
- const P = N(
107
- (b, T) => {
106
+ const b = N(
107
+ (C, y) => {
108
108
  if (!r)
109
109
  return;
110
- const h = Math.ceil(b / 2) * 2 - 1;
111
- if (b === h + 1) {
110
+ const f = Math.ceil(C / 2) * 2 - 1;
111
+ if (C === f + 1) {
112
112
  const g = {
113
- left: u[h],
113
+ left: u[f],
114
114
  top: 0
115
115
  };
116
116
  return new Promise(
117
- (s) => st(r, g, s)
117
+ (s) => ct(r, g, s)
118
118
  );
119
119
  }
120
- const f = {
120
+ const h = {
121
121
  left: 0,
122
122
  top: 0
123
123
  };
124
124
  return r == null ? void 0 : r.scrollTo({
125
- ...f,
126
- behavior: T
125
+ ...h,
126
+ behavior: y
127
127
  });
128
128
  },
129
- [r, u, st]
129
+ [r, u, ct]
130
130
  );
131
131
  return F(() => {
132
- m.current = e, v.current = t;
132
+ m.current = e, w.current = t;
133
133
  }, [e, t]), F(() => {
134
134
  p.current = c;
135
135
  }, [c]), { scrollToPage: N(
136
- (b, T = "smooth") => {
137
- a(b);
138
- const h = b - 1;
139
- let f = h, g = 0;
140
- if (v.current === Re.DUAL_PAGE && m.current === Q.PAGE_SCROLLING) {
141
- P(b, T);
136
+ (C, y = "smooth") => {
137
+ a(C);
138
+ const f = C - 1;
139
+ let h = f, g = 0;
140
+ if (w.current === Le.DUAL_PAGE && m.current === Q.PAGE_SCROLLING) {
141
+ b(C, y);
142
142
  return;
143
143
  }
144
144
  if (m.current === Q.PAGE_SCROLLING) {
145
- a(b);
145
+ a(C);
146
146
  return;
147
147
  }
148
148
  if (!l.current || !o)
149
149
  return;
150
150
  const s = o;
151
- if (w.current = b, m.current === Q.HORIZONTAL_SCROLLING) {
152
- g = h;
153
- const S = {
151
+ if (_.current = C, m.current === Q.HORIZONTAL_SCROLLING) {
152
+ g = f;
153
+ const T = {
154
154
  left: Ae(u, g),
155
155
  top: 0
156
156
  };
157
157
  return s.scrollTo({
158
- ...S,
159
- behavior: T
158
+ ...T,
159
+ behavior: y
160
160
  });
161
161
  }
162
- if (v.current === Re.DUAL_PAGE) {
163
- g = h % 2, f = Math.floor(h / 2);
164
- const S = {
162
+ if (w.current === Le.DUAL_PAGE) {
163
+ g = f % 2, h = Math.floor(f / 2);
164
+ const T = {
165
165
  left: Ae(u, g),
166
- top: Ae(d, f)
166
+ top: Ae(d, h)
167
167
  };
168
168
  return s.scrollTo({
169
- ...S,
170
- behavior: T
169
+ ...T,
170
+ behavior: y
171
171
  });
172
172
  }
173
- const C = {
173
+ const P = {
174
174
  left: 0,
175
- top: Ae(d, f)
175
+ top: Ae(d, h)
176
176
  };
177
177
  return s.scrollTo({
178
- ...C,
179
- behavior: T
178
+ ...P,
179
+ behavior: y
180
180
  });
181
181
  },
182
182
  [
183
183
  o,
184
184
  c,
185
- P,
185
+ b,
186
186
  a,
187
- st,
187
+ ct,
188
188
  d,
189
189
  u
190
190
  ]
191
191
  ) };
192
192
  }, yo = (t = 1) => {
193
- const [e, n] = $(t), [o, r] = $(0), { scrollToPage: a } = wn(), l = H(1), { viewMode: c } = Ne(), { scrollMode: u } = Ee(), { widths: d } = Ge(), { pagesRef: m } = me(), v = Pt(e, 100), p = N(
194
- (f) => {
195
- if (!/^[0-9]*$/g.test(f.toString()) || !f)
193
+ const [e, n] = $(t), [o, r] = $(0), { scrollToPage: a } = wn(), l = H(1), { viewMode: c } = Oe(), { scrollMode: u } = Ne(), { widths: d } = Ge(), { pagesRef: m } = me(), w = Tt(e, 100), p = N(
194
+ (h) => {
195
+ if (!/^[0-9]*$/g.test(h.toString()) || !h)
196
196
  return { success: !1, currentPage: l.current };
197
- const s = +f;
198
- return s < 0 || s > o ? { success: !1, currentPage: l.current } : (n(s), l.current = s, { success: !0, currentPage: +f });
197
+ const s = +h;
198
+ return s < 0 || s > o ? { success: !1, currentPage: l.current } : (n(s), l.current = s, { success: !0, currentPage: +h });
199
199
  },
200
200
  [o]
201
- ), w = N(p, [p]), P = N(
202
- (f) => {
203
- const g = p(f);
201
+ ), _ = N(p, [p]), b = N(
202
+ (h) => {
203
+ const g = p(h);
204
204
  return g.success && a(g.currentPage), g;
205
205
  },
206
206
  [p, a]
207
- ), y = N((f) => {
208
- const g = f % 2 === 1;
207
+ ), S = N((h) => {
208
+ const g = h % 2 === 1;
209
209
  if (!m || g)
210
210
  return !1;
211
- const s = g ? d[f] : d[f - 1], C = g ? d[f + 1] : d[f];
212
- return c === Re.DUAL_PAGE && s + C < m.clientWidth;
213
- }, [c, d, m, o]), b = N(() => {
214
- let f = e - 1;
215
- y(f) && (f = e - 2), P(f);
216
- }, [P, e, c, u, y]), T = k(() => c === Re.DUAL_PAGE && u === Q.PAGE_SCROLLING ? e === o - 1 : e === o, [e, o, c, u]), h = N(() => {
217
- if (T)
211
+ const s = g ? d[h] : d[h - 1], P = g ? d[h + 1] : d[h];
212
+ return c === Le.DUAL_PAGE && s + P < m.clientWidth;
213
+ }, [c, d, m, o]), C = N(() => {
214
+ let h = e - 1;
215
+ S(h) && (h = e - 2), b(h);
216
+ }, [b, e, c, u, S]), y = k(() => c === Le.DUAL_PAGE && u === Q.PAGE_SCROLLING ? e === o - 1 : e === o, [e, o, c, u]), f = N(() => {
217
+ if (y)
218
218
  return;
219
- let f = e + 1;
220
- y(f) && (f = e + 2), P(f);
221
- }, [P, e, y, c, u, T]);
219
+ let h = e + 1;
220
+ S(h) && (h = e + 2), b(h);
221
+ }, [b, e, S, c, u, y]);
222
222
  return {
223
- focusedPage: v,
223
+ focusedPage: w,
224
224
  totalPages: o,
225
- setFocusedPage: w,
225
+ setFocusedPage: _,
226
226
  setTotalPages: r,
227
- nextPage: h,
228
- prevPage: b,
229
- goToPage: P
227
+ nextPage: f,
228
+ prevPage: C,
229
+ goToPage: b
230
230
  };
231
231
  }, _n = Ye({
232
232
  focusedPage: 0,
@@ -243,7 +243,7 @@ import './assets/RPDefaultLayout.css';const wn = () => {
243
243
  }), ie = () => {
244
244
  const t = Je(_n);
245
245
  return typeof (t == null ? void 0 : t.focusedPage) > "u" && Kr.error("Please use this hooks inside children component of RPProvider"), t;
246
- }, Gs = ({ children: t }) => {
246
+ }, Vs = ({ children: t }) => {
247
247
  const { pdf: e } = ee(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: l, nextPage: c, prevPage: u } = yo();
248
248
  return F(() => {
249
249
  e != null && e.numPages && (a(e.numPages), r(1));
@@ -263,7 +263,7 @@ import './assets/RPDefaultLayout.css';const wn = () => {
263
263
  }
264
264
  );
265
265
  };
266
- const xo = () => {
266
+ const Io = () => {
267
267
  const { pdf: t, pages: e } = ee(), [n, o] = $({
268
268
  loadedPages: 0,
269
269
  totalPages: 0,
@@ -272,36 +272,36 @@ const xo = () => {
272
272
  F(() => {
273
273
  m.current;
274
274
  }, [m]);
275
- const v = N(() => {
275
+ const w = N(() => {
276
276
  document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
277
- const f = document.querySelector(".rp-print-zone");
278
- f && f.remove();
277
+ const h = document.querySelector(".rp-print-zone");
278
+ h && h.remove();
279
279
  }, []), p = N(() => {
280
280
  m.current = !1, a(!1), c(!1), d(null), o({
281
281
  loadedPages: 0,
282
282
  totalPages: 0,
283
283
  percentage: 0
284
284
  });
285
- }, []), w = () => {
285
+ }, []), _ = () => {
286
286
  m.current = !0;
287
- }, P = async ({
288
- scratchCanvas: f,
287
+ }, b = async ({
288
+ scratchCanvas: h,
289
289
  pdfDocument: g,
290
290
  pageNumber: s,
291
- viewerPdfPage: C,
292
- printResolution: _,
293
- optionalContentConfigPromise: S,
291
+ viewerPdfPage: P,
292
+ printResolution: v,
293
+ optionalContentConfigPromise: T,
294
294
  printAnnotationStoragePromise: E
295
295
  }) => {
296
296
  if (m.current) {
297
297
  p();
298
298
  return;
299
299
  }
300
- const x = _ / xr.PDF;
301
- f.width = Math.floor(C.width * x), f.height = Math.floor(C.height * x);
302
- const R = f.getContext("2d");
303
- R.save(), R.fillStyle = "rgb(255, 255, 255)", R.fillRect(0, 0, f.width, f.height), R.restore();
304
- const [z, D] = await Promise.all([
300
+ const I = v / Ir.PDF;
301
+ h.width = Math.floor(P.width * I), h.height = Math.floor(P.height * I);
302
+ const R = h.getContext("2d");
303
+ R.save(), R.fillStyle = "rgb(255, 255, 255)", R.fillRect(0, 0, h.width, h.height), R.restore();
304
+ const [O, z] = await Promise.all([
305
305
  g.getPage(s),
306
306
  E
307
307
  ]);
@@ -311,88 +311,88 @@ const xo = () => {
311
311
  }
312
312
  const A = {
313
313
  canvasContext: R,
314
- transform: [x, 0, 0, x, 0, 0],
315
- viewport: z.getViewport({ scale: 1, rotation: C.rotation }),
314
+ transform: [I, 0, 0, I, 0, 0],
315
+ viewport: O.getViewport({ scale: 1, rotation: P.rotation }),
316
316
  intent: "print",
317
- annotationMode: Ir.ENABLE_STORAGE,
318
- optionalContentConfigPromise: S,
319
- printAnnotationStorage: D
317
+ annotationMode: xr.ENABLE_STORAGE,
318
+ optionalContentConfigPromise: T,
319
+ printAnnotationStorage: z
320
320
  };
321
321
  try {
322
- return z.render(A).promise;
322
+ return O.render(A).promise;
323
323
  } catch (L) {
324
324
  throw L instanceof Rr || console.error(L), L;
325
325
  }
326
- }, y = N(() => {
327
- const f = window.print;
326
+ }, S = N(() => {
327
+ const h = window.print;
328
328
  return new Promise((g) => {
329
- const s = (S) => {
329
+ const s = (T) => {
330
330
  setTimeout(() => {
331
- f.call(window), setTimeout(() => S(), 20);
331
+ h.call(window), setTimeout(() => T(), 20);
332
332
  }, 0);
333
333
  };
334
334
  if (document.querySelector(".rp-print-zone")) {
335
335
  s(g);
336
336
  return;
337
337
  }
338
- const _ = new MutationObserver(() => {
339
- document.querySelector(".rp-print-zone") && (s(g), _.disconnect());
338
+ const v = new MutationObserver(() => {
339
+ document.querySelector(".rp-print-zone") && (s(g), v.disconnect());
340
340
  });
341
- _.observe(document.body, { childList: !0, subtree: !0 });
341
+ v.observe(document.body, { childList: !0, subtree: !0 });
342
342
  });
343
- }, []), b = async (f) => {
343
+ }, []), C = async (h) => {
344
344
  const g = document.createElement("img"), s = document.createElement("div");
345
- return s.classList.add("rp-print-page"), await new Promise((C, _) => {
346
- f.toBlob((S) => {
347
- S ? (g.src = URL.createObjectURL(S), g.onload = () => {
348
- URL.revokeObjectURL(g.src), C();
349
- }, g.onerror = _) : _(new Error("Failed to create blob"));
345
+ return s.classList.add("rp-print-page"), await new Promise((P, v) => {
346
+ h.toBlob((T) => {
347
+ T ? (g.src = URL.createObjectURL(T), g.onload = () => {
348
+ URL.revokeObjectURL(g.src), P();
349
+ }, g.onerror = v) : v(new Error("Failed to create blob"));
350
350
  });
351
351
  }).catch(() => {
352
352
  }), s.appendChild(g), s;
353
- }, T = (f, g) => {
353
+ }, y = (h, g) => {
354
354
  const s = document.createElement("div");
355
355
  s.classList.add("rp-print-zone");
356
- const C = document.createElement("style"), _ = g.get(1);
357
- if (_) {
358
- const { width: S, height: E } = _ == null ? void 0 : _.page.getViewport({ scale: 1 });
359
- C.innerHTML = `@page { size: ${S}px ${E}px }`;
356
+ const P = document.createElement("style"), v = g.get(1);
357
+ if (v) {
358
+ const { width: T, height: E } = v == null ? void 0 : v.page.getViewport({ scale: 1 });
359
+ P.innerHTML = `@page { size: ${T}px ${E}px }`;
360
360
  }
361
- return s.appendChild(C), s.append(...f), s;
362
- }, h = N(async () => {
361
+ return s.appendChild(P), s.append(...h), s;
362
+ }, f = N(async () => {
363
363
  if (!t)
364
364
  return;
365
365
  p();
366
- const f = document.createElement("canvas"), g = [];
366
+ const h = document.createElement("canvas"), g = [];
367
367
  try {
368
368
  t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
369
- const C = t.getOptionalContentConfig({ intent: "print" }), _ = Promise.resolve(
369
+ const P = t.getOptionalContentConfig({ intent: "print" }), v = Promise.resolve(
370
370
  t.annotationStorage.print ?? void 0
371
- ), S = e.size;
372
- for (const [x, R] of e) {
371
+ ), T = e.size;
372
+ for (const [I, R] of e) {
373
373
  if (m.current) {
374
374
  p();
375
375
  return;
376
376
  }
377
- const z = R.page.getViewport({ scale: 1 });
378
- if (await P({
379
- scratchCanvas: f,
377
+ const O = R.page.getViewport({ scale: 1 });
378
+ if (await b({
379
+ scratchCanvas: h,
380
380
  pdfDocument: t,
381
- pageNumber: x,
382
- viewerPdfPage: z,
381
+ pageNumber: I,
382
+ viewerPdfPage: O,
383
383
  printResolution: 150,
384
- optionalContentConfigPromise: C,
385
- printAnnotationStoragePromise: _
384
+ optionalContentConfigPromise: P,
385
+ printAnnotationStoragePromise: v
386
386
  }), m.current) {
387
387
  p();
388
388
  return;
389
389
  }
390
- const D = await b(f);
391
- g.push(D);
392
- const A = parseFloat((g.length / S * 100).toFixed(2));
390
+ const z = await C(h);
391
+ g.push(z);
392
+ const A = parseFloat((g.length / T * 100).toFixed(2));
393
393
  o({
394
- loadedPages: x,
395
- totalPages: S,
394
+ loadedPages: I,
395
+ totalPages: T,
396
396
  percentage: A
397
397
  });
398
398
  }
@@ -400,24 +400,24 @@ const xo = () => {
400
400
  p();
401
401
  return;
402
402
  }
403
- const E = T(g, e);
404
- document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await y();
403
+ const E = y(g, e);
404
+ document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await S();
405
405
  } catch (s) {
406
406
  c(!0), s instanceof Error && d(s);
407
407
  } finally {
408
- f.height = 0, f.width = 0;
408
+ h.height = 0, h.width = 0;
409
409
  }
410
410
  }, [t, e, m]);
411
411
  return F(() => {
412
- const f = () => {
413
- p(), v();
412
+ const h = () => {
413
+ p(), w();
414
414
  };
415
- return window.addEventListener("afterprint", f, !0), () => {
416
- window.removeEventListener("afterprint", f, !0);
415
+ return window.addEventListener("afterprint", h, !0), () => {
416
+ window.removeEventListener("afterprint", h, !0);
417
417
  };
418
- }, [v, p]), {
419
- print: h,
420
- cancel: w,
418
+ }, [w, p]), {
419
+ print: f,
420
+ cancel: _,
421
421
  progress: n,
422
422
  isComplete: r,
423
423
  isError: l,
@@ -440,80 +440,80 @@ const xo = () => {
440
440
  console.error("Error in setOnError callback:", e);
441
441
  }
442
442
  }
443
- }), Us = ({ children: t }) => {
444
- const [e, n] = $(null), [o, r] = $(null), { print: a, cancel: l, progress: c, isComplete: u, isError: d, error: m } = xo(), v = N((b) => {
445
- b && typeof b == "function" && r(() => b);
446
- }, []), p = (b) => {
447
- m && b(m);
448
- }, w = N(
449
- (b) => {
450
- n(() => b);
443
+ }), qs = ({ children: t }) => {
444
+ const [e, n] = $(null), [o, r] = $(null), { print: a, cancel: l, progress: c, isComplete: u, isError: d, error: m } = Io(), w = N((C) => {
445
+ C && typeof C == "function" && r(() => C);
446
+ }, []), p = (C) => {
447
+ m && C(m);
448
+ }, _ = N(
449
+ (C) => {
450
+ n(() => C);
451
451
  },
452
452
  [c, e]
453
453
  );
454
454
  F(() => {
455
- u && o && P();
455
+ u && o && b();
456
456
  }, [u, o]), F(() => {
457
- d && p((b) => {
458
- console.error(b);
457
+ d && p((C) => {
458
+ console.error(C);
459
459
  });
460
460
  }, [d]), F(() => {
461
461
  c && e && e(c);
462
462
  }, [c, e]);
463
- const P = () => {
463
+ const b = () => {
464
464
  o && (o(), r(null));
465
- }, y = {
465
+ }, S = {
466
466
  print: a,
467
467
  cancel: l,
468
- setOnProgress: w,
469
- setOnComplete: v,
468
+ setOnProgress: _,
469
+ setOnComplete: w,
470
470
  setOnError: p,
471
471
  progress: c
472
472
  };
473
- return /* @__PURE__ */ i(bn.Provider, { value: y, children: t });
473
+ return /* @__PURE__ */ i(bn.Provider, { value: S, children: t });
474
474
  }, tt = () => {
475
475
  const t = Je(bn);
476
476
  if (!t)
477
477
  throw new Error("usePrintContext must be used within a PrintProvider");
478
478
  return t;
479
- }, Io = () => {
479
+ }, xo = () => {
480
480
  const [t, e] = $({}), { pages: n } = ee(), o = k(() => Object.keys(t).length, [t]), r = N(
481
481
  (l) => {
482
482
  if (!n.size)
483
483
  return;
484
- const c = l > n.size ? n.size : l, u = Array.from(n.values()).slice(0, c).map((v) => {
485
- const { thumbnailViewport: p, scale: w } = Wt(v.page, v.defaultRotation);
484
+ const c = l > n.size ? n.size : l, u = Array.from(n.values()).slice(0, c).map((w) => {
485
+ const { thumbnailViewport: p, scale: _ } = Wt(w.page, w.defaultRotation);
486
486
  return {
487
- scale: w,
488
- page: v.page,
487
+ scale: _,
488
+ page: w.page,
489
489
  loading: !0,
490
490
  viewport: p,
491
- defaultRotation: v.defaultRotation
491
+ defaultRotation: w.defaultRotation
492
492
  };
493
- }), d = u.reduce((v, p) => (v[p.page.pageNumber] = p, v), {});
493
+ }), d = u.reduce((w, p) => (w[p.page.pageNumber] = p, w), {});
494
494
  e(d);
495
495
  const m = [];
496
- for (const v of u) {
497
- const p = document.createElement("canvas"), w = vt(v.page, p, {
498
- scale: v.scale,
499
- rotate: v.defaultRotation
496
+ for (const w of u) {
497
+ const p = document.createElement("canvas"), _ = wt(w.page, p, {
498
+ scale: w.scale,
499
+ rotate: w.defaultRotation
500
500
  }).promise.then(() => {
501
- const P = p.toDataURL();
501
+ const b = p.toDataURL();
502
502
  return {
503
- ...v,
504
- thumbnailSrc: P,
503
+ ...w,
504
+ thumbnailSrc: b,
505
505
  loading: !1,
506
- defaultRotation: v.defaultRotation
506
+ defaultRotation: w.defaultRotation
507
507
  };
508
508
  });
509
- m.push(w);
509
+ m.push(_);
510
510
  }
511
- Promise.all(m).then((v) => {
512
- const p = v.reduce(
513
- (w, P) => (w[P.page.pageNumber] = P, w),
511
+ Promise.all(m).then((w) => {
512
+ const p = w.reduce(
513
+ (_, b) => (_[b.page.pageNumber] = b, _),
514
514
  {}
515
515
  );
516
- e((w) => ({ ...w, ...p }));
516
+ e((_) => ({ ..._, ...p }));
517
517
  }).catch(() => {
518
518
  });
519
519
  },
@@ -540,13 +540,13 @@ const xo = () => {
540
540
  }
541
541
  }));
542
542
  const u = document.createElement("canvas");
543
- vt(c.page, u, {
543
+ wt(c.page, u, {
544
544
  scale: c.thumbnailScale,
545
545
  rotate: c.defaultRotation
546
546
  }).promise.then(() => {
547
- const d = u.toDataURL(), { thumbnailViewport: m, scale: v } = Wt(c.page);
547
+ const d = u.toDataURL(), { thumbnailViewport: m, scale: w } = Wt(c.page);
548
548
  return {
549
- scale: v,
549
+ scale: w,
550
550
  thumbnailSrc: d,
551
551
  page: c.page,
552
552
  loading: !1,
@@ -570,11 +570,11 @@ const xo = () => {
570
570
  setActive: (t) => {
571
571
  },
572
572
  active: !1
573
- }), Pn = () => Je(Cn), Vs = ({
573
+ }), Pn = () => Je(Cn), Bs = ({
574
574
  children: t,
575
575
  initialThumbnailsVisible: e
576
576
  }) => {
577
- const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = Io(), [l, c] = $(e);
577
+ const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = xo(), [l, c] = $(e);
578
578
  return /* @__PURE__ */ i(
579
579
  Cn.Provider,
580
580
  {
@@ -583,35 +583,35 @@ const xo = () => {
583
583
  }
584
584
  );
585
585
  }, Ro = (t = {}, e = "") => {
586
- const [n, o] = $(e), [r, a] = $(!1), { pdf: l, pages: c } = ee(), { widths: u, heights: d } = Ge(), m = H(!n), { currentZoom: v } = Qe(), [p, w] = $([]), { setFocusedPage: P } = ie(), { columnCount: y } = Ne(), { pageRotate: b } = Ue(), [T, h] = $(0), { pageScrollElementRef: f, virtualScrollableElementRef: g } = et(), { scrollMode: s } = Ee(), { pagesRef: C } = me(), [_, S] = $(null), E = H({}), x = k(() => T === 0 ? null : p[T - 1], [T, p]), R = k(() => p.length, [p]);
586
+ const [n, o] = $(e), [r, a] = $(!1), { pdf: l, pages: c } = ee(), { widths: u, heights: d } = Ge(), m = H(!n), { currentZoom: w } = Qe(), [p, _] = $([]), { setFocusedPage: b } = ie(), { columnCount: S } = Oe(), { pageRotate: C } = Ue(), [y, f] = $(0), { pageScrollElementRef: h, virtualScrollableElementRef: g } = et(), { scrollMode: s } = Ne(), { pagesRef: P } = me(), [v, T] = $(null), E = H({}), I = k(() => y === 0 ? null : p[y - 1], [y, p]), R = k(() => p.length, [p]);
587
587
  F(() => {
588
- if (!x || !c)
588
+ if (!I || !c)
589
589
  return;
590
- const L = g || f;
591
- if (!L || !C)
590
+ const L = g || h;
591
+ if (!L || !P)
592
592
  return;
593
- const I = c.get(x.page);
594
- if (s === Q.PAGE_SCROLLING && P(x.page), !I)
593
+ const x = c.get(I.page);
594
+ if (s === Q.PAGE_SCROLLING && b(I.page), !x)
595
595
  return;
596
- let O = 0, M = 0;
596
+ let D = 0, M = 0;
597
597
  if (s === Q.VERTICAL_SCROLLING) {
598
- const le = x.page - 1, Y = y, Fe = le % Y, we = Math.floor(le / Y);
599
- O = Ae(d, we), M = Ae(u, Fe);
598
+ const le = I.page - 1, Y = S, Fe = le % Y, we = Math.floor(le / Y);
599
+ D = Ae(d, we), M = Ae(u, Fe);
600
600
  }
601
- s === Q.HORIZONTAL_SCROLLING && (M = u.slice(0, x.page - 1).reduce((le, Y) => le + Y, 0));
601
+ s === Q.HORIZONTAL_SCROLLING && (M = u.slice(0, I.page - 1).reduce((le, Y) => le + Y, 0));
602
602
  const G = {
603
- height: d[x.page - 1],
604
- width: u[x.page - 1]
603
+ height: d[I.page - 1],
604
+ width: u[I.page - 1]
605
605
  }, Z = {
606
606
  top: G.height / 2,
607
607
  left: G.width / 2
608
- }, j = b[x.page], { leftInPage: q, topInPage: te } = jr(
608
+ }, j = C[I.page], { leftInPage: q, topInPage: te } = jr(
609
609
  G,
610
610
  Z,
611
- x.rect,
612
- v,
611
+ I.rect,
612
+ w,
613
613
  j
614
- ), X = M + q, ce = O + te, ve = {
614
+ ), X = M + q, ce = D + te, ve = {
615
615
  left: Math.max(X, 0),
616
616
  top: Math.max(ce, 0)
617
617
  };
@@ -621,39 +621,39 @@ const xo = () => {
621
621
  });
622
622
  }, [
623
623
  c,
624
- P,
624
+ b,
625
625
  u,
626
626
  d,
627
- x,
627
+ I,
628
628
  s,
629
629
  g,
630
- f,
631
- C
630
+ h,
631
+ P
632
632
  ]);
633
- const z = N(() => {
634
- h((L) => R ? L + 1 > R ? 1 : L + 1 : 0);
635
- }, [R]), D = N(() => {
636
- h((L) => R ? L - 1 <= 0 ? R : L - 1 : 0);
633
+ const O = N(() => {
634
+ f((L) => R ? L + 1 > R ? 1 : L + 1 : 0);
635
+ }, [R]), z = N(() => {
636
+ f((L) => R ? L - 1 <= 0 ? R : L - 1 : 0);
637
637
  }, [R]), A = N(async (L) => {
638
638
  if (!L)
639
639
  return {};
640
- const I = L.numPages, O = {};
641
- for (let M = 1; M <= I; M++) {
640
+ const x = L.numPages, D = {};
641
+ for (let M = 1; M <= x; M++) {
642
642
  if (m.current)
643
643
  throw "close pop over";
644
644
  const G = await L.getPage(M);
645
- O[M.toString()] = await G.getTextContent();
645
+ D[M.toString()] = await G.getTextContent();
646
646
  }
647
- return O;
647
+ return D;
648
648
  }, []);
649
649
  return F(() => {
650
650
  if (!n) {
651
- m.current = !0, w([]), h(0);
651
+ m.current = !0, _([]), f(0);
652
652
  return;
653
653
  }
654
- m.current = !1, a(!0), w([]), h(0), A(l).then((L) => {
654
+ m.current = !1, a(!0), _([]), f(0), A(l).then((L) => {
655
655
  E.current = L;
656
- const O = Object.keys(L).reduce((M, G) => {
656
+ const D = Object.keys(L).reduce((M, G) => {
657
657
  const Z = lr(
658
658
  [n],
659
659
  L[G],
@@ -662,9 +662,9 @@ const xo = () => {
662
662
  ).map((j, q) => ({ ...j, page: Number(G), pageMatchIdx: q }));
663
663
  return [...M, ...Z];
664
664
  }, []);
665
- w(O), h(O.length ? 1 : 0);
665
+ _(D), f(D.length ? 1 : 0);
666
666
  }).catch(() => {
667
- w([]), h(0);
667
+ _([]), f(0);
668
668
  }).finally(() => a(!1));
669
669
  }, [n, A, l, t]), {
670
670
  search: n,
@@ -672,12 +672,12 @@ const xo = () => {
672
672
  loading: r,
673
673
  matches: p,
674
674
  totalMatches: R,
675
- currentMatchPosition: T,
676
- currentMatch: x,
677
- nextMatch: z,
678
- prevMatch: D,
679
- currentMatchElement: _,
680
- setCurrentMatchElement: S
675
+ currentMatchPosition: y,
676
+ currentMatch: I,
677
+ nextMatch: O,
678
+ prevMatch: z,
679
+ currentMatchElement: v,
680
+ setCurrentMatchElement: T
681
681
  };
682
682
  }, Tn = Ye({
683
683
  search: "",
@@ -697,7 +697,7 @@ const xo = () => {
697
697
  currentMatchElement: null,
698
698
  setCurrentMatchElement: (t) => {
699
699
  }
700
- }), qs = ({
700
+ }), Zs = ({
701
701
  children: t,
702
702
  initialSearch: e
703
703
  }) => {
@@ -709,10 +709,10 @@ const xo = () => {
709
709
  currentMatch: u,
710
710
  search: d,
711
711
  matches: m,
712
- nextMatch: v,
712
+ nextMatch: w,
713
713
  prevMatch: p,
714
- currentMatchElement: w,
715
- setCurrentMatchElement: P
714
+ currentMatchElement: _,
715
+ setCurrentMatchElement: b
716
716
  } = Ro(n, e);
717
717
  return /* @__PURE__ */ i(
718
718
  Tn.Provider,
@@ -725,12 +725,12 @@ const xo = () => {
725
725
  totalMatches: l,
726
726
  currentMatchPosition: c,
727
727
  currentMatch: u,
728
- nextMatch: v,
728
+ nextMatch: w,
729
729
  prevMatch: p,
730
730
  search: d,
731
731
  matches: m,
732
- currentMatchElement: w,
733
- setCurrentMatchElement: P
732
+ currentMatchElement: _,
733
+ setCurrentMatchElement: b
734
734
  },
735
735
  children: t
736
736
  }
@@ -744,7 +744,7 @@ const xo = () => {
744
744
  "rp-cursor-grab": "_rp-cursor-grab_17t6t_58",
745
745
  "rp-cursor-grabbing": "_rp-cursor-grabbing_17t6t_66",
746
746
  "rp-loader": "_rp-loader_17t6t_74"
747
- }, lt = {
747
+ }, dt = {
748
748
  "rp-page-wrapper": "_rp-page-wrapper_14ohm_1",
749
749
  "rp-page": "_rp-page_14ohm_1",
750
750
  "rp-loader-wrapper": "_rp-loader-wrapper_14ohm_15"
@@ -757,8 +757,8 @@ const xo = () => {
757
757
  if (r.current && d) {
758
758
  const m = r.current;
759
759
  m.hidden = !0;
760
- const v = c.current;
761
- v && v.cancel(), o && o(), c.current = vt(d.page, m, {
760
+ const w = c.current;
761
+ w && w.cancel(), o && o(), c.current = wt(d.page, m, {
762
762
  scale: u,
763
763
  rotate: l[e],
764
764
  renderForms: !0
@@ -781,133 +781,133 @@ const xo = () => {
781
781
  }, No = (t) => {
782
782
  const { pageNumber: e } = t, { pages: n } = ee(), o = H(null), { matches: r, currentMatch: a, setCurrentMatchElement: l } = xt(), [c, u] = $(
783
783
  []
784
- ), d = H(), m = H(), v = H([]), p = k(() => r.filter((f) => f.pageIndex === e - 1), [r, e]), w = N(
785
- (f, g, s = !1) => {
786
- if (s && dr(f, g), !p.length) {
787
- v.current = [], u([]);
784
+ ), d = H(), m = H(), w = H([]), p = k(() => r.filter((h) => h.pageIndex === e - 1), [r, e]), _ = N(
785
+ (h, g, s = !1) => {
786
+ if (s && dr(h, g), !p.length) {
787
+ w.current = [], u([]);
788
788
  return;
789
789
  }
790
- const C = ur(p, f, g);
791
- u(C);
790
+ const P = ur(p, h, g);
791
+ u(P);
792
792
  },
793
793
  [p]
794
- ), P = H(), y = H(!1), b = N(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
794
+ ), b = H(), S = H(!1), C = N(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
795
795
  F(() => ((() => {
796
- if (P.current)
796
+ if (b.current)
797
797
  return;
798
- P.current = new AbortController();
799
- const { signal: g } = P.current, s = () => {
800
- b().forEach((_) => {
801
- const S = _.querySelector(".endOfContent");
802
- S && (_.appendChild(S), S.style.width = "", S.style.height = "", _.classList.remove(pe.selecting));
798
+ b.current = new AbortController();
799
+ const { signal: g } = b.current, s = () => {
800
+ C().forEach((v) => {
801
+ const T = v.querySelector(".endOfContent");
802
+ T && (v.appendChild(T), T.style.width = "", T.style.height = "", v.classList.remove(pe.selecting));
803
803
  });
804
804
  };
805
805
  document.addEventListener(
806
806
  "pointerdown",
807
807
  () => {
808
- y.current = !0;
808
+ S.current = !0;
809
809
  },
810
810
  { signal: g }
811
811
  ), document.addEventListener(
812
812
  "pointerup",
813
813
  () => {
814
- y.current = !1, s();
814
+ S.current = !1, s();
815
815
  },
816
816
  { signal: g }
817
817
  ), window.addEventListener(
818
818
  "blur",
819
819
  () => {
820
- y.current = !1, s();
820
+ S.current = !1, s();
821
821
  },
822
822
  { signal: g }
823
823
  ), document.addEventListener(
824
824
  "keyup",
825
825
  () => {
826
- y.current || s();
826
+ S.current || s();
827
827
  },
828
828
  { signal: g }
829
829
  );
830
- let C = null;
830
+ let P = null;
831
831
  document.addEventListener(
832
832
  "selectionchange",
833
833
  () => {
834
834
  var A, L;
835
- const _ = document.getSelection();
836
- if (!_)
835
+ const v = document.getSelection();
836
+ if (!v)
837
837
  return;
838
- if (_.rangeCount === 0) {
838
+ if (v.rangeCount === 0) {
839
839
  s();
840
840
  return;
841
841
  }
842
- const S = /* @__PURE__ */ new Set();
843
- for (let I = 0; I < _.rangeCount; I++) {
844
- const O = _.getRangeAt(I);
845
- b().forEach((M) => {
846
- O.intersectsNode(M) && !S.has(M) && S.add(M);
842
+ const T = /* @__PURE__ */ new Set();
843
+ for (let x = 0; x < v.rangeCount; x++) {
844
+ const D = v.getRangeAt(x);
845
+ C().forEach((M) => {
846
+ D.intersectsNode(M) && !T.has(M) && T.add(M);
847
847
  });
848
848
  }
849
- b().forEach((I) => {
850
- if (S.has(I))
851
- I.classList.add(pe.selecting);
849
+ C().forEach((x) => {
850
+ if (T.has(x))
851
+ x.classList.add(pe.selecting);
852
852
  else {
853
- const O = I.querySelector(".endOfContent");
854
- O && (I.appendChild(O), O.style.width = "", O.style.height = "", I.classList.remove(pe.selecting));
853
+ const D = x.querySelector(".endOfContent");
854
+ D && (x.appendChild(D), D.style.width = "", D.style.height = "", x.classList.remove(pe.selecting));
855
855
  }
856
856
  });
857
- const E = _.getRangeAt(0);
858
- let R = C && (E.compareBoundaryPoints(Range.END_TO_END, C) === 0 || E.compareBoundaryPoints(Range.START_TO_END, C) === 0) ? E.startContainer : E.endContainer;
857
+ const E = v.getRangeAt(0);
858
+ let R = P && (E.compareBoundaryPoints(Range.END_TO_END, P) === 0 || E.compareBoundaryPoints(Range.START_TO_END, P) === 0) ? E.startContainer : E.endContainer;
859
859
  R.nodeType === Node.TEXT_NODE && (R = R.parentNode);
860
- const z = (A = R.parentElement) == null ? void 0 : A.closest(
860
+ const O = (A = R.parentElement) == null ? void 0 : A.closest(
861
861
  pe["rp-text-layer"]
862
- ), D = z == null ? void 0 : z.querySelector(".endOfContent");
863
- D && z && (D.style.width = z.style.width, D.style.height = z.style.height, (L = R.parentElement) == null || L.insertBefore(D, R.nextSibling)), C = E.cloneRange();
862
+ ), z = O == null ? void 0 : O.querySelector(".endOfContent");
863
+ z && O && (z.style.width = O.style.width, z.style.height = O.style.height, (L = R.parentElement) == null || L.insertBefore(z, R.nextSibling)), P = E.cloneRange();
864
864
  },
865
865
  { signal: g }
866
866
  );
867
867
  })(), () => {
868
868
  var g;
869
- (g = P.current) == null || g.abort(), P.current = void 0;
870
- }), [b]);
871
- const T = N(() => {
869
+ (g = b.current) == null || g.abort(), b.current = void 0;
870
+ }), [C]);
871
+ const y = N(() => {
872
872
  o.current && o.current.classList.add(pe.selecting);
873
- }, []), h = N(() => {
873
+ }, []), f = N(() => {
874
874
  o.current && o.current.classList.remove(pe.selecting);
875
875
  }, []);
876
876
  return F(() => {
877
- if (v.current.forEach((s) => {
877
+ if (w.current.forEach((s) => {
878
878
  s.classList.remove("selected");
879
879
  }), !c.length || !a || a.pageIndex !== e - 1)
880
880
  return;
881
- const f = p.findIndex(
881
+ const h = p.findIndex(
882
882
  (s) => JSON.stringify(s) === JSON.stringify(a)
883
883
  );
884
- if (f === -1)
884
+ if (h === -1)
885
885
  return;
886
- const g = c.filter((s) => s.index === f);
887
- g.length && (v.current = g.map((s) => s.element), l(g[0].element), g.forEach((s) => {
886
+ const g = c.filter((s) => s.index === h);
887
+ g.length && (w.current = g.map((s) => s.element), l(g[0].element), g.forEach((s) => {
888
888
  s.element.classList.add("selected");
889
889
  }));
890
890
  }, [a, c, p]), F(() => {
891
- const f = n.get(e);
892
- if (!f || !o.current)
891
+ const h = n.get(e);
892
+ if (!h || !o.current)
893
893
  return;
894
894
  const g = o.current;
895
- return d.current && d.current.cancel(), f.page.getTextContent().then((s) => {
896
- const C = f.page.getViewport({ scale: 1 });
895
+ return d.current && d.current.cancel(), h.page.getTextContent().then((s) => {
896
+ const P = h.page.getViewport({ scale: 1 });
897
897
  return d.current = new yr.TextLayer({
898
- viewport: C,
898
+ viewport: P,
899
899
  textContentSource: s,
900
900
  container: g
901
901
  }), m.current = s, g && (g.innerText = ""), d.current.render();
902
902
  }).then(() => {
903
- var S, E;
904
- [].slice.call(g.children).forEach((x) => {
905
- x.classList.add(pe["rp-text-layer-text"]), x.setAttribute("data-rp", "rp-text-layer-text");
903
+ var T, E;
904
+ [].slice.call(g.children).forEach((I) => {
905
+ I.classList.add(pe["rp-text-layer-text"]), I.setAttribute("data-rp", "rp-text-layer-text");
906
906
  });
907
- const C = (S = d.current) == null ? void 0 : S.textDivs;
908
- C && m.current && w(m.current, C);
909
- const _ = document.createElement("div");
910
- _.className = "endOfContent", (E = o.current) == null || E.appendChild(_);
907
+ const P = (T = d.current) == null ? void 0 : T.textDivs;
908
+ P && m.current && _(m.current, P);
909
+ const v = document.createElement("div");
910
+ v.className = "endOfContent", (E = o.current) == null || E.appendChild(v);
911
911
  }).catch(() => {
912
912
  }), () => {
913
913
  var s;
@@ -915,107 +915,107 @@ const xo = () => {
915
915
  };
916
916
  }, [n, e]), F(() => {
917
917
  var s;
918
- [].slice.call(o.current.children).forEach((C) => {
919
- C.classList.add(pe["rp-text-layer-text"]);
918
+ [].slice.call(o.current.children).forEach((P) => {
919
+ P.classList.add(pe["rp-text-layer-text"]);
920
920
  });
921
921
  const g = (s = d.current) == null ? void 0 : s.textDivs;
922
- g && m.current && w(m.current, g, !0);
923
- }, [w]), /* @__PURE__ */ i(
922
+ g && m.current && _(m.current, g, !0);
923
+ }, [_]), /* @__PURE__ */ i(
924
924
  "div",
925
925
  {
926
926
  "data-rp": `page-${e}-textLayer`,
927
927
  className: pe["rp-text-layer"],
928
928
  ref: o,
929
- onMouseDown: T,
930
- onMouseUp: h
929
+ onMouseDown: y,
930
+ onMouseUp: f
931
931
  }
932
932
  );
933
933
  }, Oo = {
934
934
  "rp-annotation-layer": "_rp-annotation-layer_1udza_1"
935
935
  };
936
- let zo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
937
- const Do = (t) => {
938
- const { pageNumber: e } = t, n = H(null), { pages: o, pdf: r } = ee(), a = H(), [l, c] = $(), { setFocusedPage: u, goToPage: d } = ie(), { scrollMode: m } = Ee(), { print: v } = tt(), { download: p } = Gn(), w = k(() => o.get(e), [o, e]), P = k(() => w == null ? void 0 : w.page.getViewport(), [w]);
936
+ let Do = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
937
+ const zo = (t) => {
938
+ const { pageNumber: e } = t, n = H(null), { pages: o, pdf: r } = ee(), a = H(), [l, c] = $(), { setFocusedPage: u, goToPage: d } = ie(), { scrollMode: m } = Ne(), { print: w } = tt(), { download: p } = Gn(), _ = k(() => o.get(e), [o, e]), b = k(() => _ == null ? void 0 : _.page.getViewport(), [_]);
939
939
  F(() => {
940
940
  a.current && (a.current.div.replaceChildren(), a.current = void 0);
941
941
  }, [r]), F(() => {
942
- w && w.page.getAnnotations().then((b) => {
943
- a.current = void 0, c(b), n.current && (n.current.innerText = "");
942
+ _ && _.page.getAnnotations().then((C) => {
943
+ a.current = void 0, c(C), n.current && (n.current.innerText = "");
944
944
  });
945
- }, [w]);
946
- const y = N(
947
- (b) => {
948
- !l || !r || (Nr(b), Or(b, r, l).then((T) => {
949
- var h, f;
950
- ((h = T == null ? void 0 : T.data) == null ? void 0 : h.action) === "Print" ? v() : ((f = T == null ? void 0 : T.data) == null ? void 0 : f.action) === "SaveAs" && p();
951
- }), m === Q.PAGE_SCROLLING ? At(b, l, r, (T) => u(T.pageIndex + 1)) : At(b, l, r, (T) => d(T.pageIndex + 1)));
945
+ }, [_]);
946
+ const S = N(
947
+ (C) => {
948
+ !l || !r || (Nr(C), Or(C, r, l).then((y) => {
949
+ var f, h;
950
+ ((f = y == null ? void 0 : y.data) == null ? void 0 : f.action) === "Print" ? w() : ((h = y == null ? void 0 : y.data) == null ? void 0 : h.action) === "SaveAs" && p();
951
+ }), m === Q.PAGE_SCROLLING ? At(C, l, r, (y) => u(y.pageIndex + 1)) : At(C, l, r, (y) => d(y.pageIndex + 1)));
952
952
  },
953
- [r, l, d, u, m, v, p]
953
+ [r, l, d, u, m, w, p]
954
954
  );
955
955
  return F(() => {
956
- if (!w || !l)
956
+ if (!_ || !l)
957
957
  return;
958
- const b = w.page.getViewport();
958
+ const C = _.page.getViewport();
959
959
  if (a.current) {
960
960
  a.current.update({
961
- viewport: b.clone({ dontFlip: !0 })
961
+ viewport: C.clone({ dontFlip: !0 })
962
962
  });
963
963
  return;
964
964
  }
965
- const T = /* @__PURE__ */ new Map([]);
965
+ const y = /* @__PURE__ */ new Map([]);
966
966
  for (const g of l) {
967
967
  const { annotationType: s } = g;
968
968
  switch (s) {
969
- case Dt.Link:
970
- Dr(g);
969
+ case zt.Link:
970
+ zr(g);
971
971
  break;
972
- case Dt.Widget:
973
- zr(g, b, T);
972
+ case zt.Widget:
973
+ Dr(g, C, y);
974
974
  break;
975
975
  }
976
976
  }
977
- const h = new AbortController();
977
+ const f = new AbortController();
978
978
  return (async () => {
979
- var C;
979
+ var P;
980
980
  a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new Lr({
981
981
  div: n.current,
982
982
  accessibilityManager: void 0,
983
983
  annotationCanvasMap: void 0,
984
984
  annotationEditorUIManager: void 0,
985
985
  structTreeLayer: null,
986
- page: w.page,
987
- viewport: b.clone({ dontFlip: !0 })
988
- }), n.current && Ft(n.current, y);
986
+ page: _.page,
987
+ viewport: C.clone({ dontFlip: !0 })
988
+ }), n.current && Ft(n.current, S);
989
989
  const g = await (r == null ? void 0 : r.hasJSActions()), s = await (r == null ? void 0 : r.getFieldObjects());
990
- if (h.signal.aborted)
990
+ if (f.signal.aborted)
991
991
  throw "abort";
992
- return (C = a.current) == null ? void 0 : C.render({
992
+ return (P = a.current) == null ? void 0 : P.render({
993
993
  annotations: l,
994
994
  annotationStorage: r == null ? void 0 : r.annotationStorage,
995
995
  hasJSActions: g,
996
996
  fieldObjects: s,
997
997
  div: n.current,
998
- viewport: b.clone({ dontFlip: !0 }),
999
- page: w.page,
1000
- imageResourcesPath: zo,
998
+ viewport: C.clone({ dontFlip: !0 }),
999
+ page: _.page,
1000
+ imageResourcesPath: Do,
1001
1001
  renderForms: !0,
1002
1002
  linkService: new Er(),
1003
1003
  downloadManager: null,
1004
1004
  enableScripting: !1
1005
1005
  });
1006
1006
  })().then(() => {
1007
- n.current && Ar(n.current, y);
1007
+ n.current && Ar(n.current, S);
1008
1008
  }).catch((g) => {
1009
1009
  if (g !== "abort")
1010
1010
  throw g;
1011
1011
  }), () => {
1012
- h.abort("clear"), n.current && Ft(n.current, y);
1012
+ f.abort("clear"), n.current && Ft(n.current, S);
1013
1013
  };
1014
- }, [r, l, y]), /* @__PURE__ */ i(
1014
+ }, [r, l, S]), /* @__PURE__ */ i(
1015
1015
  "div",
1016
1016
  {
1017
1017
  "data-rp": `page-${e}-annotationLayer`,
1018
- style: { width: `${P == null ? void 0 : P.width}px`, height: `${P == null ? void 0 : P.height}px` },
1018
+ style: { width: `${b == null ? void 0 : b.width}px`, height: `${b == null ? void 0 : b.height}px` },
1019
1019
  className: Oo["rp-annotation-layer"],
1020
1020
  ref: n
1021
1021
  }
@@ -1023,92 +1023,92 @@ const Do = (t) => {
1023
1023
  }, Ao = {
1024
1024
  "rp-text-highlight": "_rp-text-highlight_jdkf8_1"
1025
1025
  }, Fo = ({ pageNumber: t, viewport: e }) => {
1026
- const [n, o] = $(), { pages: r } = ee(), { highlightKeywords: a } = hr(), l = !0, c = H(null), [u, d] = $(null), [m, v] = $([]);
1026
+ const [n, o] = $(), { pages: r } = ee(), { highlightKeywords: a } = hr(), l = !0, c = H(null), [u, d] = $(null), [m, w] = $([]);
1027
1027
  F(() => {
1028
1028
  c.current && d(c.current.parentElement);
1029
1029
  }, [c]), F(() => {
1030
1030
  (async () => {
1031
- const f = r.get(t);
1032
- if (!f || !c.current)
1031
+ const h = r.get(t);
1032
+ if (!h || !c.current)
1033
1033
  return;
1034
- const g = await f.page.getTextContent();
1034
+ const g = await h.page.getTextContent();
1035
1035
  o(g);
1036
1036
  })();
1037
1037
  }, [r, t]);
1038
- const p = k(() => a ? a.map((h) => {
1039
- var f, g;
1038
+ const p = k(() => a ? a.map((f) => {
1039
+ var h, g;
1040
1040
  return {
1041
- ...Fr(h.keyword, (f = h.options) == null ? void 0 : f.matchCase, (g = h.options) == null ? void 0 : g.wholeWords),
1042
- color: h.highlightColor
1041
+ ...Fr(f.keyword, (h = f.options) == null ? void 0 : h.matchCase, (g = f.options) == null ? void 0 : g.wholeWords),
1042
+ color: f.highlightColor
1043
1043
  };
1044
1044
  }) : [], [a]);
1045
- function w(h, f) {
1046
- if (!h)
1045
+ function _(f, h) {
1046
+ if (!f)
1047
1047
  return;
1048
- const g = `[data-rp="page-${f}-textLayer"]`;
1048
+ const g = `[data-rp="page-${h}-textLayer"]`;
1049
1049
  return new Promise((s) => {
1050
- const C = h.querySelector(g);
1051
- if (C) {
1052
- s(C);
1050
+ const P = f.querySelector(g);
1051
+ if (P) {
1052
+ s(P);
1053
1053
  return;
1054
1054
  }
1055
- new MutationObserver((S, E) => {
1056
- const x = h.querySelector(g);
1057
- x && (s(x), E.disconnect());
1058
- }).observe(h, { childList: !0, subtree: !0 });
1055
+ new MutationObserver((T, E) => {
1056
+ const I = f.querySelector(g);
1057
+ I && (s(I), E.disconnect());
1058
+ }).observe(f, { childList: !0, subtree: !0 });
1059
1059
  });
1060
1060
  }
1061
- function P(h) {
1062
- return new Promise((f) => {
1063
- const g = h.querySelectorAll(
1061
+ function b(f) {
1062
+ return new Promise((h) => {
1063
+ const g = f.querySelectorAll(
1064
1064
  '[data-rp="rp-text-layer-text"]'
1065
1065
  );
1066
1066
  if (g.length) {
1067
- f(Array.from(g));
1067
+ h(Array.from(g));
1068
1068
  return;
1069
1069
  }
1070
- new MutationObserver((C, _) => {
1071
- const S = h.querySelectorAll(
1070
+ new MutationObserver((P, v) => {
1071
+ const T = f.querySelectorAll(
1072
1072
  ".rp-text-layer-text"
1073
1073
  );
1074
- S.length && (f(Array.from(S)), _.disconnect());
1075
- }).observe(h, { childList: !0, subtree: !0 });
1074
+ T.length && (h(Array.from(T)), v.disconnect());
1075
+ }).observe(f, { childList: !0, subtree: !0 });
1076
1076
  });
1077
1077
  }
1078
- const y = (h, f, g, s) => {
1078
+ const S = (f, h, g, s) => {
1079
1079
  var Z;
1080
- const C = document.createRange(), _ = g.firstChild;
1081
- if (!_ || _.nodeType !== Node.TEXT_NODE)
1080
+ const P = document.createRange(), v = g.firstChild;
1081
+ if (!v || v.nodeType !== Node.TEXT_NODE)
1082
1082
  return null;
1083
- const S = ((Z = _.textContent) == null ? void 0 : Z.length) ?? 0, E = s[0].charIdxInSpan, x = s.length === 1 ? E : s[s.length - 1].charIdxInSpan;
1084
- if (E > S || x + 1 > S)
1083
+ const T = ((Z = v.textContent) == null ? void 0 : Z.length) ?? 0, E = s[0].charIdxInSpan, I = s.length === 1 ? E : s[s.length - 1].charIdxInSpan;
1084
+ if (E > T || I + 1 > T)
1085
1085
  return null;
1086
- C.setStart(_, E), C.setEnd(_, x + 1);
1086
+ P.setStart(v, E), P.setEnd(v, I + 1);
1087
1087
  const R = document.createElement("span");
1088
- R.style.width = "auto", C.surroundContents(R);
1089
- const z = R.getBoundingClientRect(), D = h.getBoundingClientRect(), A = D.height, L = D.width, I = 100 * (z.left - D.left) / L, O = 100 * (z.top - D.top) / A, M = 100 * z.height / A, G = 100 * z.width / L;
1088
+ R.style.width = "auto", P.surroundContents(R);
1089
+ const O = R.getBoundingClientRect(), z = f.getBoundingClientRect(), A = z.height, L = z.width, x = 100 * (O.left - z.left) / L, D = 100 * (O.top - z.top) / A, M = 100 * O.height / A, G = 100 * O.width / L;
1090
1090
  return kr(R), {
1091
- keywordStr: f,
1092
- left: I,
1093
- top: O,
1091
+ keywordStr: h,
1092
+ left: x,
1093
+ top: D,
1094
1094
  height: M,
1095
1095
  width: G,
1096
1096
  pageHeight: A,
1097
1097
  pageWidth: L
1098
1098
  };
1099
1099
  };
1100
- async function b(h, f) {
1101
- const g = await w(u, h);
1100
+ async function C(f, h) {
1101
+ const g = await _(u, f);
1102
1102
  if (!g)
1103
1103
  return;
1104
- const s = await P(g);
1104
+ const s = await b(g);
1105
1105
  if (s.length) {
1106
- const C = s.map((S) => S.tagName === "BR" ? " " : S.textContent).reduce(
1107
- (S, E, x) => S.concat(
1108
- E.split("").map((R, z) => ({
1106
+ const P = s.map((T) => T.tagName === "BR" ? " " : T.textContent).reduce(
1107
+ (T, E, I) => T.concat(
1108
+ E.split("").map((R, O) => ({
1109
1109
  char: R,
1110
- charIdxInSpan: z,
1111
- spanIdx: x
1110
+ charIdxInSpan: O,
1111
+ spanIdx: I
1112
1112
  }))
1113
1113
  ),
1114
1114
  [
@@ -1118,32 +1118,32 @@ const Do = (t) => {
1118
1118
  spanIdx: 0
1119
1119
  }
1120
1120
  ]
1121
- ).slice(1), _ = T(g, f, s, C);
1122
- v(_);
1121
+ ).slice(1), v = y(g, h, s, P);
1122
+ w(v);
1123
1123
  }
1124
1124
  }
1125
- const T = (h, f, g, s) => {
1126
- const C = f.length;
1127
- if (!s.length || !C)
1125
+ const y = (f, h, g, s) => {
1126
+ const P = h.length;
1127
+ if (!s.length || !P)
1128
1128
  return [];
1129
- const _ = [], S = s.map((E) => E.char).join("");
1129
+ const v = [], T = s.map((E) => E.char).join("");
1130
1130
  return p.forEach((E) => {
1131
- const { keyword: x, regExp: R, wholeWords: z, color: D } = E, A = x;
1131
+ const { keyword: I, regExp: R, wholeWords: O, color: z } = E, A = I;
1132
1132
  if (!A.trim())
1133
1133
  return;
1134
1134
  const L = R.flags.indexOf("g") === -1 ? new RegExp(R, `${R.flags}g`) : R;
1135
- let I;
1136
- const O = [];
1137
- for (; (I = L.exec(S)) !== null; )
1138
- z && !pr(S, I.index, I[0].length) || O.push({
1135
+ let x;
1136
+ const D = [];
1137
+ for (; (x = L.exec(T)) !== null; )
1138
+ O && !pr(T, x.index, x[0].length) || D.push({
1139
1139
  keyword: L,
1140
- startIndex: I.index,
1140
+ startIndex: x.index,
1141
1141
  endIndex: L.lastIndex
1142
1142
  });
1143
- const M = O.map((G) => ({
1143
+ const M = D.map((G) => ({
1144
1144
  keyword: G.keyword,
1145
1145
  indexes: s.slice(G.startIndex, G.endIndex),
1146
- color: D
1146
+ color: z
1147
1147
  }));
1148
1148
  for (const G of M) {
1149
1149
  const Z = G.indexes.reduce(
@@ -1152,75 +1152,75 @@ const Do = (t) => {
1152
1152
  );
1153
1153
  for (const j of Object.values(Z))
1154
1154
  if (j.length !== 1 || j[0].char.trim() !== "") {
1155
- const q = j, te = g[q[0].spanIdx], X = y(
1156
- h,
1155
+ const q = j, te = g[q[0].spanIdx], X = S(
1156
+ f,
1157
1157
  A,
1158
1158
  te,
1159
1159
  q
1160
1160
  );
1161
1161
  if (X) {
1162
1162
  const { left: ce, top: ve } = X;
1163
- if (_.find((Y) => Y.left === ce && Y.top === ve))
1163
+ if (v.find((Y) => Y.left === ce && Y.top === ve))
1164
1164
  continue;
1165
- _.push({ ...X, highlightColor: G.color });
1165
+ v.push({ ...X, highlightColor: G.color });
1166
1166
  }
1167
1167
  }
1168
1168
  }
1169
- }), _.sort(Wr), _;
1169
+ }), v.sort(Wr), v;
1170
1170
  };
1171
1171
  return F(() => {
1172
1172
  (async () => {
1173
1173
  if (!(!a || a.length === 0))
1174
1174
  try {
1175
- await b(t, a);
1176
- } catch (f) {
1177
- console.error(f);
1175
+ await C(t, a);
1176
+ } catch (h) {
1177
+ console.error(h);
1178
1178
  }
1179
1179
  })();
1180
- }, [l, a, t, n, e]), /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i("div", { ref: c, "data-rp": `page-${t}-textHighlightLayer`, children: m.map((h, f) => /* @__PURE__ */ i(
1180
+ }, [l, a, t, n, e]), /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i("div", { ref: c, "data-rp": `page-${t}-textHighlightLayer`, children: m.map((f, h) => /* @__PURE__ */ i(
1181
1181
  "div",
1182
1182
  {
1183
1183
  className: Ao["rp-text-highlight"],
1184
1184
  style: {
1185
- top: `${h.top}%`,
1186
- left: `${h.left}%`,
1187
- width: `${h.width}%`,
1188
- height: `${h.height}%`,
1189
- backgroundColor: h.highlightColor
1185
+ top: `${f.top}%`,
1186
+ left: `${f.left}%`,
1187
+ width: `${f.width}%`,
1188
+ height: `${f.height}%`,
1189
+ backgroundColor: f.highlightColor
1190
1190
  }
1191
1191
  },
1192
- f
1192
+ h
1193
1193
  )) }) });
1194
- }, It = $e((t, e) => {
1195
- const { pageNumber: n, style: o, ...r } = t, { pages: a } = ee(), { pageRotate: l } = Ue(), { textLayer: c } = ir(), { currentZoom: u } = Qe(), d = H(a.get(n)), [m, v] = $(!1), p = H(null), [w, P] = $({
1194
+ }, Rt = $e((t, e) => {
1195
+ const { pageNumber: n, style: o, ...r } = t, { pages: a } = ee(), { pageRotate: l } = Ue(), { textLayer: c } = ir(), { currentZoom: u } = Qe(), d = H(a.get(n)), [m, w] = $(!1), p = H(null), [_, b] = $({
1196
1196
  width: 0,
1197
1197
  height: 0
1198
1198
  });
1199
1199
  cn(e, () => p.current);
1200
- const y = k(() => d.current ? l[n] : 0, [n, l]);
1200
+ const S = k(() => d.current ? l[n] : 0, [n, l]);
1201
1201
  F(() => {
1202
1202
  if (a && (d.current = a.get(n), d.current)) {
1203
- const f = d.current.page.getViewport({
1203
+ const h = d.current.page.getViewport({
1204
1204
  scale: u,
1205
- rotation: y
1205
+ rotation: S
1206
1206
  });
1207
- P(f);
1207
+ b(h);
1208
1208
  }
1209
- }, [a, n, y, u]);
1210
- const b = k(() => {
1211
- switch (y) {
1209
+ }, [a, n, S, u]);
1210
+ const C = k(() => {
1211
+ switch (S) {
1212
1212
  case 90:
1213
- return `${w.width / 2}px ${w.width / 2}px`;
1213
+ return `${_.width / 2}px ${_.width / 2}px`;
1214
1214
  case -90:
1215
1215
  case 270:
1216
- return `${w.height / 2}px ${w.height / 2}px`;
1216
+ return `${_.height / 2}px ${_.height / 2}px`;
1217
1217
  default:
1218
1218
  return "center";
1219
1219
  }
1220
- }, [y, w]), T = N(() => {
1221
- v(!0);
1222
- }, []), h = N(() => {
1223
- v(!1);
1220
+ }, [S, _]), y = N(() => {
1221
+ w(!0);
1222
+ }, []), f = N(() => {
1223
+ w(!1);
1224
1224
  }, []);
1225
1225
  return /* @__PURE__ */ i(
1226
1226
  "div",
@@ -1231,26 +1231,26 @@ const Do = (t) => {
1231
1231
  ...r,
1232
1232
  style: {
1233
1233
  ...o,
1234
- "--rp-rotate": `${y}deg`,
1235
- "--rp-page-rotate-translate": `${b}`,
1234
+ "--rp-rotate": `${S}deg`,
1235
+ "--rp-page-rotate-translate": `${C}`,
1236
1236
  "--scale-factor": u
1237
1237
  },
1238
- className: lt["rp-page-wrapper"],
1238
+ className: dt["rp-page-wrapper"],
1239
1239
  children: /* @__PURE__ */ W(
1240
1240
  "div",
1241
1241
  {
1242
1242
  style: {
1243
- width: `${w.width}px`,
1244
- height: `${w.height}px`
1243
+ width: `${_.width}px`,
1244
+ height: `${_.height}px`
1245
1245
  },
1246
- className: lt["rp-page"],
1246
+ className: dt["rp-page"],
1247
1247
  children: [
1248
- /* @__PURE__ */ i(Lo, { onLoading: T, onLoaded: h, pageNumber: n }),
1249
- m && /* @__PURE__ */ i("div", { className: lt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Ct, {}) }),
1248
+ /* @__PURE__ */ i(Lo, { onLoading: y, onLoaded: f, pageNumber: n }),
1249
+ m && /* @__PURE__ */ i("div", { className: dt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Pt, {}) }),
1250
1250
  /* @__PURE__ */ i(Mr, { pageNumber: n }),
1251
1251
  c && /* @__PURE__ */ i(No, { pageNumber: n }),
1252
- /* @__PURE__ */ i(Fo, { pageNumber: n, viewport: w }),
1253
- /* @__PURE__ */ i(Do, { pageNumber: n })
1252
+ /* @__PURE__ */ i(Fo, { pageNumber: n, viewport: _ }),
1253
+ /* @__PURE__ */ i(zo, { pageNumber: n })
1254
1254
  ]
1255
1255
  }
1256
1256
  )
@@ -1262,13 +1262,13 @@ function Ut(t) {
1262
1262
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1263
1263
  return t;
1264
1264
  }
1265
- function wt(t, e) {
1266
- return wt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, o) {
1265
+ function _t(t, e) {
1266
+ return _t = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, o) {
1267
1267
  return n.__proto__ = o, n;
1268
- }, wt(t, e);
1268
+ }, _t(t, e);
1269
1269
  }
1270
1270
  function Wo(t, e) {
1271
- t.prototype = Object.create(e.prototype), t.prototype.constructor = t, wt(t, e);
1271
+ t.prototype = Object.create(e.prototype), t.prototype.constructor = t, _t(t, e);
1272
1272
  }
1273
1273
  var Vt = Number.isNaN || function(e) {
1274
1274
  return typeof e == "number" && e !== e;
@@ -1284,7 +1284,7 @@ function Mo(t, e) {
1284
1284
  return !1;
1285
1285
  return !0;
1286
1286
  }
1287
- function dt(t, e) {
1287
+ function ut(t, e) {
1288
1288
  e === void 0 && (e = Mo);
1289
1289
  var n, o = [], r, a = !1;
1290
1290
  function l() {
@@ -1324,23 +1324,23 @@ function $o(t, e) {
1324
1324
  };
1325
1325
  return r;
1326
1326
  }
1327
- var ut = -1;
1327
+ var pt = -1;
1328
1328
  function Go(t) {
1329
- if (t === void 0 && (t = !1), ut === -1 || t) {
1329
+ if (t === void 0 && (t = !1), pt === -1 || t) {
1330
1330
  var e = document.createElement("div"), n = e.style;
1331
- n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(e), ut = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
1331
+ n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(e), pt = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
1332
1332
  }
1333
- return ut;
1333
+ return pt;
1334
1334
  }
1335
- var Oe = null;
1335
+ var De = null;
1336
1336
  function jt(t) {
1337
- if (t === void 0 && (t = !1), Oe === null || t) {
1337
+ if (t === void 0 && (t = !1), De === null || t) {
1338
1338
  var e = document.createElement("div"), n = e.style;
1339
1339
  n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
1340
1340
  var o = document.createElement("div"), r = o.style;
1341
- return r.width = "100px", r.height = "100px", e.appendChild(o), document.body.appendChild(e), e.scrollLeft > 0 ? Oe = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? Oe = "negative" : Oe = "positive-ascending"), document.body.removeChild(e), Oe;
1341
+ return r.width = "100px", r.height = "100px", e.appendChild(o), document.body.appendChild(e), e.scrollLeft > 0 ? De = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? De = "negative" : De = "positive-ascending"), document.body.removeChild(e), De;
1342
1342
  }
1343
- return Oe;
1343
+ return De;
1344
1344
  }
1345
1345
  var Uo = 150, Vo = function(e) {
1346
1346
  var n = e.columnIndex;
@@ -1350,12 +1350,12 @@ var Uo = 150, Vo = function(e) {
1350
1350
  }, Be = null, Ze = null, je = null;
1351
1351
  process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Be = /* @__PURE__ */ new WeakSet(), Ze = /* @__PURE__ */ new WeakSet(), je = /* @__PURE__ */ new WeakSet());
1352
1352
  function qo(t) {
1353
- var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, l = t.getEstimatedTotalHeight, c = t.getEstimatedTotalWidth, u = t.getOffsetForColumnAndAlignment, d = t.getOffsetForRowAndAlignment, m = t.getRowHeight, v = t.getRowOffset, p = t.getRowStartIndexForOffset, w = t.getRowStopIndexForStartIndex, P = t.initInstanceProps, y = t.shouldResetStyleCacheOnItemSizeChange, b = t.validateProps;
1354
- return e = /* @__PURE__ */ function(T) {
1355
- Wo(h, T);
1356
- function h(g) {
1353
+ var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, l = t.getEstimatedTotalHeight, c = t.getEstimatedTotalWidth, u = t.getOffsetForColumnAndAlignment, d = t.getOffsetForRowAndAlignment, m = t.getRowHeight, w = t.getRowOffset, p = t.getRowStartIndexForOffset, _ = t.getRowStopIndexForStartIndex, b = t.initInstanceProps, S = t.shouldResetStyleCacheOnItemSizeChange, C = t.validateProps;
1354
+ return e = /* @__PURE__ */ function(y) {
1355
+ Wo(f, y);
1356
+ function f(g) {
1357
1357
  var s;
1358
- return s = T.call(this, g) || this, s._instanceProps = P(s.props, Ut(s)), s._resetIsScrollingTimeoutId = null, s._outerRef = void 0, s.state = {
1358
+ return s = y.call(this, g) || this, s._instanceProps = b(s.props, Ut(s)), s._resetIsScrollingTimeoutId = null, s._outerRef = void 0, s.state = {
1359
1359
  instance: Ut(s),
1360
1360
  isScrolling: !1,
1361
1361
  horizontalScrollDirection: "forward",
@@ -1363,72 +1363,72 @@ function qo(t) {
1363
1363
  scrollTop: typeof s.props.initialScrollTop == "number" ? s.props.initialScrollTop : 0,
1364
1364
  scrollUpdateWasRequested: !1,
1365
1365
  verticalScrollDirection: "forward"
1366
- }, s._callOnItemsRendered = void 0, s._callOnItemsRendered = dt(function(C, _, S, E, x, R, z, D) {
1366
+ }, s._callOnItemsRendered = void 0, s._callOnItemsRendered = ut(function(P, v, T, E, I, R, O, z) {
1367
1367
  return s.props.onItemsRendered({
1368
- overscanColumnStartIndex: C,
1369
- overscanColumnStopIndex: _,
1370
- overscanRowStartIndex: S,
1368
+ overscanColumnStartIndex: P,
1369
+ overscanColumnStopIndex: v,
1370
+ overscanRowStartIndex: T,
1371
1371
  overscanRowStopIndex: E,
1372
- visibleColumnStartIndex: x,
1372
+ visibleColumnStartIndex: I,
1373
1373
  visibleColumnStopIndex: R,
1374
- visibleRowStartIndex: z,
1375
- visibleRowStopIndex: D
1374
+ visibleRowStartIndex: O,
1375
+ visibleRowStopIndex: z
1376
1376
  });
1377
- }), s._callOnScroll = void 0, s._callOnScroll = dt(function(C, _, S, E, x) {
1377
+ }), s._callOnScroll = void 0, s._callOnScroll = ut(function(P, v, T, E, I) {
1378
1378
  return s.props.onScroll({
1379
- horizontalScrollDirection: S,
1380
- scrollLeft: C,
1381
- scrollTop: _,
1379
+ horizontalScrollDirection: T,
1380
+ scrollLeft: P,
1381
+ scrollTop: v,
1382
1382
  verticalScrollDirection: E,
1383
- scrollUpdateWasRequested: x
1383
+ scrollUpdateWasRequested: I
1384
1384
  });
1385
- }), s._getItemStyle = void 0, s._getItemStyle = function(C, _) {
1386
- var S = s.props, E = S.columnWidth, x = S.direction, R = S.rowHeight, z = s._getItemStyleCache(y && E, y && x, y && R), D = C + ":" + _, A;
1387
- if (z.hasOwnProperty(D))
1388
- A = z[D];
1385
+ }), s._getItemStyle = void 0, s._getItemStyle = function(P, v) {
1386
+ var T = s.props, E = T.columnWidth, I = T.direction, R = T.rowHeight, O = s._getItemStyleCache(S && E, S && I, S && R), z = P + ":" + v, A;
1387
+ if (O.hasOwnProperty(z))
1388
+ A = O[z];
1389
1389
  else {
1390
- var L = n(s.props, _, s._instanceProps), I = x === "rtl";
1391
- z[D] = A = {
1390
+ var L = n(s.props, v, s._instanceProps), x = I === "rtl";
1391
+ O[z] = A = {
1392
1392
  position: "absolute",
1393
- left: I ? void 0 : L,
1394
- right: I ? L : void 0,
1395
- top: v(s.props, C, s._instanceProps),
1396
- height: m(s.props, C, s._instanceProps),
1397
- width: a(s.props, _, s._instanceProps)
1393
+ left: x ? void 0 : L,
1394
+ right: x ? L : void 0,
1395
+ top: w(s.props, P, s._instanceProps),
1396
+ height: m(s.props, P, s._instanceProps),
1397
+ width: a(s.props, v, s._instanceProps)
1398
1398
  };
1399
1399
  }
1400
1400
  return A;
1401
- }, s._getItemStyleCache = void 0, s._getItemStyleCache = dt(function(C, _, S) {
1401
+ }, s._getItemStyleCache = void 0, s._getItemStyleCache = ut(function(P, v, T) {
1402
1402
  return {};
1403
- }), s._onScroll = function(C) {
1404
- var _ = C.currentTarget, S = _.clientHeight, E = _.clientWidth, x = _.scrollLeft, R = _.scrollTop, z = _.scrollHeight, D = _.scrollWidth;
1403
+ }), s._onScroll = function(P) {
1404
+ var v = P.currentTarget, T = v.clientHeight, E = v.clientWidth, I = v.scrollLeft, R = v.scrollTop, O = v.scrollHeight, z = v.scrollWidth;
1405
1405
  s.setState(function(A) {
1406
- if (A.scrollLeft === x && A.scrollTop === R)
1406
+ if (A.scrollLeft === I && A.scrollTop === R)
1407
1407
  return null;
1408
- var L = s.props.direction, I = x;
1408
+ var L = s.props.direction, x = I;
1409
1409
  if (L === "rtl")
1410
1410
  switch (jt()) {
1411
1411
  case "negative":
1412
- I = -x;
1412
+ x = -I;
1413
1413
  break;
1414
1414
  case "positive-descending":
1415
- I = D - E - x;
1415
+ x = z - E - I;
1416
1416
  break;
1417
1417
  }
1418
- I = Math.max(0, Math.min(I, D - E));
1419
- var O = Math.max(0, Math.min(R, z - S));
1418
+ x = Math.max(0, Math.min(x, z - E));
1419
+ var D = Math.max(0, Math.min(R, O - T));
1420
1420
  return {
1421
1421
  isScrolling: !0,
1422
- horizontalScrollDirection: A.scrollLeft < x ? "forward" : "backward",
1423
- scrollLeft: I,
1424
- scrollTop: O,
1422
+ horizontalScrollDirection: A.scrollLeft < I ? "forward" : "backward",
1423
+ scrollLeft: x,
1424
+ scrollTop: D,
1425
1425
  verticalScrollDirection: A.scrollTop < R ? "forward" : "backward",
1426
1426
  scrollUpdateWasRequested: !1
1427
1427
  };
1428
1428
  }, s._resetIsScrollingDebounced);
1429
- }, s._outerRefSetter = function(C) {
1430
- var _ = s.props.outerRef;
1431
- s._outerRef = C, typeof _ == "function" ? _(C) : _ != null && typeof _ == "object" && _.hasOwnProperty("current") && (_.current = C);
1429
+ }, s._outerRefSetter = function(P) {
1430
+ var v = s.props.outerRef;
1431
+ s._outerRef = P, typeof v == "function" ? v(P) : v != null && typeof v == "object" && v.hasOwnProperty("current") && (v.current = P);
1432
1432
  }, s._resetIsScrollingDebounced = function() {
1433
1433
  s._resetIsScrollingTimeoutId !== null && Zt(s._resetIsScrollingTimeoutId), s._resetIsScrollingTimeoutId = $o(s._resetIsScrolling, Uo);
1434
1434
  }, s._resetIsScrolling = function() {
@@ -1439,70 +1439,70 @@ function qo(t) {
1439
1439
  });
1440
1440
  }, s;
1441
1441
  }
1442
- h.getDerivedStateFromProps = function(s, C) {
1443
- return Bo(s, C), b(s), null;
1442
+ f.getDerivedStateFromProps = function(s, P) {
1443
+ return Bo(s, P), C(s), null;
1444
1444
  };
1445
- var f = h.prototype;
1446
- return f.scrollTo = function(s) {
1447
- var C = s.scrollLeft, _ = s.scrollTop;
1448
- C !== void 0 && (C = Math.max(0, C)), _ !== void 0 && (_ = Math.max(0, _)), this.setState(function(S) {
1449
- return C === void 0 && (C = S.scrollLeft), _ === void 0 && (_ = S.scrollTop), S.scrollLeft === C && S.scrollTop === _ ? null : {
1450
- horizontalScrollDirection: S.scrollLeft < C ? "forward" : "backward",
1451
- scrollLeft: C,
1452
- scrollTop: _,
1445
+ var h = f.prototype;
1446
+ return h.scrollTo = function(s) {
1447
+ var P = s.scrollLeft, v = s.scrollTop;
1448
+ P !== void 0 && (P = Math.max(0, P)), v !== void 0 && (v = Math.max(0, v)), this.setState(function(T) {
1449
+ return P === void 0 && (P = T.scrollLeft), v === void 0 && (v = T.scrollTop), T.scrollLeft === P && T.scrollTop === v ? null : {
1450
+ horizontalScrollDirection: T.scrollLeft < P ? "forward" : "backward",
1451
+ scrollLeft: P,
1452
+ scrollTop: v,
1453
1453
  scrollUpdateWasRequested: !0,
1454
- verticalScrollDirection: S.scrollTop < _ ? "forward" : "backward"
1454
+ verticalScrollDirection: T.scrollTop < v ? "forward" : "backward"
1455
1455
  };
1456
1456
  }, this._resetIsScrollingDebounced);
1457
- }, f.scrollToItem = function(s) {
1458
- var C = s.align, _ = C === void 0 ? "auto" : C, S = s.columnIndex, E = s.rowIndex, x = this.props, R = x.columnCount, z = x.height, D = x.rowCount, A = x.width, L = this.state, I = L.scrollLeft, O = L.scrollTop, M = Go();
1459
- S !== void 0 && (S = Math.max(0, Math.min(S, R - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, D - 1)));
1460
- var G = l(this.props, this._instanceProps), Z = c(this.props, this._instanceProps), j = Z > A ? M : 0, q = G > z ? M : 0;
1457
+ }, h.scrollToItem = function(s) {
1458
+ var P = s.align, v = P === void 0 ? "auto" : P, T = s.columnIndex, E = s.rowIndex, I = this.props, R = I.columnCount, O = I.height, z = I.rowCount, A = I.width, L = this.state, x = L.scrollLeft, D = L.scrollTop, M = Go();
1459
+ T !== void 0 && (T = Math.max(0, Math.min(T, R - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, z - 1)));
1460
+ var G = l(this.props, this._instanceProps), Z = c(this.props, this._instanceProps), j = Z > A ? M : 0, q = G > O ? M : 0;
1461
1461
  this.scrollTo({
1462
- scrollLeft: S !== void 0 ? u(this.props, S, _, I, this._instanceProps, q) : I,
1463
- scrollTop: E !== void 0 ? d(this.props, E, _, O, this._instanceProps, j) : O
1462
+ scrollLeft: T !== void 0 ? u(this.props, T, v, x, this._instanceProps, q) : x,
1463
+ scrollTop: E !== void 0 ? d(this.props, E, v, D, this._instanceProps, j) : D
1464
1464
  });
1465
- }, f.componentDidMount = function() {
1466
- var s = this.props, C = s.initialScrollLeft, _ = s.initialScrollTop;
1465
+ }, h.componentDidMount = function() {
1466
+ var s = this.props, P = s.initialScrollLeft, v = s.initialScrollTop;
1467
1467
  if (this._outerRef != null) {
1468
- var S = this._outerRef;
1469
- typeof C == "number" && (S.scrollLeft = C), typeof _ == "number" && (S.scrollTop = _);
1468
+ var T = this._outerRef;
1469
+ typeof P == "number" && (T.scrollLeft = P), typeof v == "number" && (T.scrollTop = v);
1470
1470
  }
1471
1471
  this._callPropsCallbacks();
1472
- }, f.componentDidUpdate = function() {
1473
- var s = this.props.direction, C = this.state, _ = C.scrollLeft, S = C.scrollTop, E = C.scrollUpdateWasRequested;
1472
+ }, h.componentDidUpdate = function() {
1473
+ var s = this.props.direction, P = this.state, v = P.scrollLeft, T = P.scrollTop, E = P.scrollUpdateWasRequested;
1474
1474
  if (E && this._outerRef != null) {
1475
- var x = this._outerRef;
1475
+ var I = this._outerRef;
1476
1476
  if (s === "rtl")
1477
1477
  switch (jt()) {
1478
1478
  case "negative":
1479
- x.scrollLeft = -_;
1479
+ I.scrollLeft = -v;
1480
1480
  break;
1481
1481
  case "positive-ascending":
1482
- x.scrollLeft = _;
1482
+ I.scrollLeft = v;
1483
1483
  break;
1484
1484
  default:
1485
- var R = x.clientWidth, z = x.scrollWidth;
1486
- x.scrollLeft = z - R - _;
1485
+ var R = I.clientWidth, O = I.scrollWidth;
1486
+ I.scrollLeft = O - R - v;
1487
1487
  break;
1488
1488
  }
1489
1489
  else
1490
- x.scrollLeft = Math.max(0, _);
1491
- x.scrollTop = Math.max(0, S);
1490
+ I.scrollLeft = Math.max(0, v);
1491
+ I.scrollTop = Math.max(0, T);
1492
1492
  }
1493
1493
  this._callPropsCallbacks();
1494
- }, f.componentWillUnmount = function() {
1494
+ }, h.componentWillUnmount = function() {
1495
1495
  this._resetIsScrollingTimeoutId !== null && Zt(this._resetIsScrollingTimeoutId);
1496
- }, f.render = function() {
1497
- var s = this.props, C = s.children, _ = s.className, S = s.columnCount, E = s.direction, x = s.height, R = s.innerRef, z = s.innerElementType, D = s.innerTagName, A = s.itemData, L = s.itemKey, I = L === void 0 ? Vo : L, O = s.outerElementType, M = s.outerTagName, G = s.rowCount, Z = s.style, j = s.useIsScrolling, q = s.width, te = this.state.isScrolling, X = this._getHorizontalRangeToRender(), ce = X[0], ve = X[1], le = this._getVerticalRangeToRender(), Y = le[0], Fe = le[1], we = [];
1498
- if (S > 0 && G)
1496
+ }, h.render = function() {
1497
+ var s = this.props, P = s.children, v = s.className, T = s.columnCount, E = s.direction, I = s.height, R = s.innerRef, O = s.innerElementType, z = s.innerTagName, A = s.itemData, L = s.itemKey, x = L === void 0 ? Vo : L, D = s.outerElementType, M = s.outerTagName, G = s.rowCount, Z = s.style, j = s.useIsScrolling, q = s.width, te = this.state.isScrolling, X = this._getHorizontalRangeToRender(), ce = X[0], ve = X[1], le = this._getVerticalRangeToRender(), Y = le[0], Fe = le[1], we = [];
1498
+ if (T > 0 && G)
1499
1499
  for (var Te = Y; Te <= Fe; Te++)
1500
1500
  for (var _e = ce; _e <= ve; _e++)
1501
- we.push(qe(C, {
1501
+ we.push(qe(P, {
1502
1502
  columnIndex: _e,
1503
1503
  data: A,
1504
1504
  isScrolling: j ? te : void 0,
1505
- key: I({
1505
+ key: x({
1506
1506
  columnIndex: _e,
1507
1507
  data: A,
1508
1508
  rowIndex: Te
@@ -1510,52 +1510,52 @@ function qo(t) {
1510
1510
  rowIndex: Te,
1511
1511
  style: this._getItemStyle(Te, _e)
1512
1512
  }));
1513
- var nt = l(this.props, this._instanceProps), rt = c(this.props, this._instanceProps);
1514
- return qe(O || M || "div", {
1515
- className: _,
1513
+ var rt = l(this.props, this._instanceProps), ot = c(this.props, this._instanceProps);
1514
+ return qe(D || M || "div", {
1515
+ className: v,
1516
1516
  onScroll: this._onScroll,
1517
1517
  ref: this._outerRefSetter,
1518
1518
  style: Hr({
1519
1519
  position: "relative",
1520
- height: x,
1520
+ height: I,
1521
1521
  width: q,
1522
1522
  overflow: "auto",
1523
1523
  WebkitOverflowScrolling: "touch",
1524
1524
  willChange: "transform",
1525
1525
  direction: E
1526
1526
  }, Z)
1527
- }, qe(z || D || "div", {
1527
+ }, qe(O || z || "div", {
1528
1528
  children: we,
1529
1529
  ref: R,
1530
1530
  style: {
1531
- height: nt,
1531
+ height: rt,
1532
1532
  pointerEvents: te ? "none" : void 0,
1533
- width: rt
1533
+ width: ot
1534
1534
  }
1535
1535
  }));
1536
- }, f._callPropsCallbacks = function() {
1537
- var s = this.props, C = s.columnCount, _ = s.onItemsRendered, S = s.onScroll, E = s.rowCount;
1538
- if (typeof _ == "function" && C > 0 && E > 0) {
1539
- var x = this._getHorizontalRangeToRender(), R = x[0], z = x[1], D = x[2], A = x[3], L = this._getVerticalRangeToRender(), I = L[0], O = L[1], M = L[2], G = L[3];
1540
- this._callOnItemsRendered(R, z, I, O, D, A, M, G);
1536
+ }, h._callPropsCallbacks = function() {
1537
+ var s = this.props, P = s.columnCount, v = s.onItemsRendered, T = s.onScroll, E = s.rowCount;
1538
+ if (typeof v == "function" && P > 0 && E > 0) {
1539
+ var I = this._getHorizontalRangeToRender(), R = I[0], O = I[1], z = I[2], A = I[3], L = this._getVerticalRangeToRender(), x = L[0], D = L[1], M = L[2], G = L[3];
1540
+ this._callOnItemsRendered(R, O, x, D, z, A, M, G);
1541
1541
  }
1542
- if (typeof S == "function") {
1542
+ if (typeof T == "function") {
1543
1543
  var Z = this.state, j = Z.horizontalScrollDirection, q = Z.scrollLeft, te = Z.scrollTop, X = Z.scrollUpdateWasRequested, ce = Z.verticalScrollDirection;
1544
1544
  this._callOnScroll(q, te, j, ce, X);
1545
1545
  }
1546
- }, f._getHorizontalRangeToRender = function() {
1547
- var s = this.props, C = s.columnCount, _ = s.overscanColumnCount, S = s.overscanColumnsCount, E = s.overscanCount, x = s.rowCount, R = this.state, z = R.horizontalScrollDirection, D = R.isScrolling, A = R.scrollLeft, L = _ || S || E || 1;
1548
- if (C === 0 || x === 0)
1546
+ }, h._getHorizontalRangeToRender = function() {
1547
+ var s = this.props, P = s.columnCount, v = s.overscanColumnCount, T = s.overscanColumnsCount, E = s.overscanCount, I = s.rowCount, R = this.state, O = R.horizontalScrollDirection, z = R.isScrolling, A = R.scrollLeft, L = v || T || E || 1;
1548
+ if (P === 0 || I === 0)
1549
1549
  return [0, 0, 0, 0];
1550
- var I = o(this.props, A, this._instanceProps), O = r(this.props, I, A, this._instanceProps), M = !D || z === "backward" ? Math.max(1, L) : 1, G = !D || z === "forward" ? Math.max(1, L) : 1;
1551
- return [Math.max(0, I - M), Math.max(0, Math.min(C - 1, O + G)), I, O];
1552
- }, f._getVerticalRangeToRender = function() {
1553
- var s = this.props, C = s.columnCount, _ = s.overscanCount, S = s.overscanRowCount, E = s.overscanRowsCount, x = s.rowCount, R = this.state, z = R.isScrolling, D = R.verticalScrollDirection, A = R.scrollTop, L = S || E || _ || 1;
1554
- if (C === 0 || x === 0)
1550
+ var x = o(this.props, A, this._instanceProps), D = r(this.props, x, A, this._instanceProps), M = !z || O === "backward" ? Math.max(1, L) : 1, G = !z || O === "forward" ? Math.max(1, L) : 1;
1551
+ return [Math.max(0, x - M), Math.max(0, Math.min(P - 1, D + G)), x, D];
1552
+ }, h._getVerticalRangeToRender = function() {
1553
+ var s = this.props, P = s.columnCount, v = s.overscanCount, T = s.overscanRowCount, E = s.overscanRowsCount, I = s.rowCount, R = this.state, O = R.isScrolling, z = R.verticalScrollDirection, A = R.scrollTop, L = T || E || v || 1;
1554
+ if (P === 0 || I === 0)
1555
1555
  return [0, 0, 0, 0];
1556
- var I = p(this.props, A, this._instanceProps), O = w(this.props, I, A, this._instanceProps), M = !z || D === "backward" ? Math.max(1, L) : 1, G = !z || D === "forward" ? Math.max(1, L) : 1;
1557
- return [Math.max(0, I - M), Math.max(0, Math.min(x - 1, O + G)), I, O];
1558
- }, h;
1556
+ var x = p(this.props, A, this._instanceProps), D = _(this.props, x, A, this._instanceProps), M = !O || z === "backward" ? Math.max(1, L) : 1, G = !O || z === "forward" ? Math.max(1, L) : 1;
1557
+ return [Math.max(0, x - M), Math.max(0, Math.min(I - 1, D + G)), x, D];
1558
+ }, f;
1559
1559
  }(er), e.defaultProps = {
1560
1560
  direction: "ltr",
1561
1561
  itemData: void 0,
@@ -1563,7 +1563,7 @@ function qo(t) {
1563
1563
  }, e;
1564
1564
  }
1565
1565
  var Bo = function(e, n) {
1566
- var o = e.children, r = e.direction, a = e.height, l = e.innerTagName, c = e.outerTagName, u = e.overscanColumnsCount, d = e.overscanCount, m = e.overscanRowsCount, v = e.width, p = n.instance;
1566
+ var o = e.children, r = e.direction, a = e.height, l = e.innerTagName, c = e.outerTagName, u = e.overscanColumnsCount, d = e.overscanCount, m = e.overscanRowsCount, w = e.width, p = n.instance;
1567
1567
  if (process.env.NODE_ENV !== "production") {
1568
1568
  if (typeof d == "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 u == "number" || typeof m == "number") && Ze && !Ze.has(p) && (Ze.add(p), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (l != null || c != null) && je && !je.has(p) && (je.add(p), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
1569
1569
  throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
@@ -1574,8 +1574,8 @@ var Bo = function(e, n) {
1574
1574
  default:
1575
1575
  throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + r + '" was specified.'));
1576
1576
  }
1577
- if (typeof v != "number")
1578
- throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (v === null ? "null" : typeof v) + '" was specified.'));
1577
+ if (typeof w != "number")
1578
+ throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (w === null ? "null" : typeof w) + '" was specified.'));
1579
1579
  if (typeof a != "number")
1580
1580
  throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
1581
1581
  }
@@ -1604,11 +1604,11 @@ var Bo = function(e, n) {
1604
1604
  u = d.offset + d.size;
1605
1605
  }
1606
1606
  for (var m = c + 1; m <= o; m++) {
1607
- var v = l(m);
1607
+ var w = l(m);
1608
1608
  a[m] = {
1609
1609
  offset: u,
1610
- size: v
1611
- }, u += v;
1610
+ size: w
1611
+ }, u += w;
1612
1612
  }
1613
1613
  e === "column" ? r.lastMeasuredColumnIndex = o : r.lastMeasuredRowIndex = o;
1614
1614
  }
@@ -1617,8 +1617,8 @@ var Bo = function(e, n) {
1617
1617
  var a, l;
1618
1618
  e === "column" ? (a = o.columnMetadataMap, l = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, l = o.lastMeasuredRowIndex);
1619
1619
  var c = l > 0 ? a[l].offset : 0;
1620
- return c >= r ? xn(e, n, o, l, 0, r) : Zo(e, n, o, Math.max(0, l), r);
1621
- }, xn = function(e, n, o, r, a, l) {
1620
+ return c >= r ? In(e, n, o, l, 0, r) : Zo(e, n, o, Math.max(0, l), r);
1621
+ }, In = function(e, n, o, r, a, l) {
1622
1622
  for (; a <= r; ) {
1623
1623
  var c = a + Math.floor((r - a) / 2), u = he(e, n, c, o).offset;
1624
1624
  if (u === l)
@@ -1629,19 +1629,19 @@ var Bo = function(e, n) {
1629
1629
  }, Zo = function(e, n, o, r, a) {
1630
1630
  for (var l = e === "column" ? n.columnCount : n.rowCount, c = 1; r < l && he(e, n, r, o).offset < a; )
1631
1631
  r += c, c *= 2;
1632
- return xn(e, n, o, Math.min(r, l - 1), Math.floor(r / 2), a);
1632
+ return In(e, n, o, Math.min(r, l - 1), Math.floor(r / 2), a);
1633
1633
  }, Yt = function(e, n, o, r, a, l, c) {
1634
- var u = e === "column" ? n.width : n.height, d = he(e, n, o, l), m = e === "column" ? yn(n, l) : Sn(n, l), v = Math.max(0, Math.min(m - u, d.offset)), p = Math.max(0, d.offset - u + c + d.size);
1635
- switch (r === "smart" && (a >= p - u && a <= v + u ? r = "auto" : r = "center"), r) {
1634
+ var u = e === "column" ? n.width : n.height, d = he(e, n, o, l), m = e === "column" ? yn(n, l) : Sn(n, l), w = Math.max(0, Math.min(m - u, d.offset)), p = Math.max(0, d.offset - u + c + d.size);
1635
+ switch (r === "smart" && (a >= p - u && a <= w + u ? r = "auto" : r = "center"), r) {
1636
1636
  case "start":
1637
- return v;
1637
+ return w;
1638
1638
  case "end":
1639
1639
  return p;
1640
1640
  case "center":
1641
- return Math.round(p + (v - p) / 2);
1641
+ return Math.round(p + (w - p) / 2);
1642
1642
  case "auto":
1643
1643
  default:
1644
- return a >= p && a <= v ? a : p > v || a < p ? p : v;
1644
+ return a >= p && a <= w ? a : p > w || a < p ? p : w;
1645
1645
  }
1646
1646
  }, jo = /* @__PURE__ */ qo({
1647
1647
  getColumnOffset: function(e, n, o) {
@@ -1700,8 +1700,8 @@ var Bo = function(e, n) {
1700
1700
  shouldForceUpdate: u
1701
1701
  });
1702
1702
  }, n.resetAfterIndices = function(c) {
1703
- var u = c.columnIndex, d = c.rowIndex, m = c.shouldForceUpdate, v = m === void 0 ? !0 : m;
1704
- typeof u == "number" && (l.lastMeasuredColumnIndex = Math.min(l.lastMeasuredColumnIndex, u - 1)), typeof d == "number" && (l.lastMeasuredRowIndex = Math.min(l.lastMeasuredRowIndex, d - 1)), n._getItemStyleCache(-1), v && n.forceUpdate();
1703
+ var u = c.columnIndex, d = c.rowIndex, m = c.shouldForceUpdate, w = m === void 0 ? !0 : m;
1704
+ typeof u == "number" && (l.lastMeasuredColumnIndex = Math.min(l.lastMeasuredColumnIndex, u - 1)), typeof d == "number" && (l.lastMeasuredRowIndex = Math.min(l.lastMeasuredRowIndex, d - 1)), n._getItemStyleCache(-1), w && n.forceUpdate();
1705
1705
  }, l;
1706
1706
  },
1707
1707
  shouldResetStyleCacheOnItemSizeChange: !1,
@@ -1731,52 +1731,52 @@ function Yo(t, e) {
1731
1731
  return !Jt(n, r) && !Jt(o, a);
1732
1732
  }
1733
1733
  const Jo = () => {
1734
- const { viewMode: t } = Ne(), { scrollMode: e } = Ee(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r = Ge(), a = k(() => r.heights.length, [r.heights]), l = k(() => e === Q.HORIZONTAL_SCROLLING ? a : t === Re.DUAL_PAGE ? 2 : 1, [t, e, e, a, o]), c = k(() => r.widths.reduce((P, y, b) => {
1735
- const T = b % l;
1736
- return (!P[T] || y > P[T]) && (P[T] = y), P;
1734
+ const { viewMode: t } = Oe(), { scrollMode: e } = Ne(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r = Ge(), a = k(() => r.heights.length, [r.heights]), l = k(() => e === Q.HORIZONTAL_SCROLLING ? a : t === Le.DUAL_PAGE ? 2 : 1, [t, e, e, a, o]), c = k(() => r.widths.reduce((b, S, C) => {
1735
+ const y = C % l;
1736
+ return (!b[y] || S > b[y]) && (b[y] = S), b;
1737
1737
  }, []), [r.widths, l]), u = N(
1738
- (w) => {
1739
- const P = w % c.length;
1740
- return c[P] || 0;
1738
+ (_) => {
1739
+ const b = _ % c.length;
1740
+ return c[b] || 0;
1741
1741
  },
1742
1742
  [c]
1743
1743
  ), d = N(
1744
- (w) => {
1745
- const P = Array.from({ length: l }, (y, b) => {
1746
- const T = w * l + b;
1747
- return r.heights[T] || 0;
1744
+ (_) => {
1745
+ const b = Array.from({ length: l }, (S, C) => {
1746
+ const y = _ * l + C;
1747
+ return r.heights[y] || 0;
1748
1748
  });
1749
- return Math.max(...P);
1749
+ return Math.max(...b);
1750
1750
  },
1751
1751
  [r.heights, l]
1752
1752
  );
1753
1753
  F(() => {
1754
1754
  n(l);
1755
1755
  }, [l, n]);
1756
- const m = k(() => e === Q.HORIZONTAL_SCROLLING || e === Q.PAGE_SCROLLING ? 1 : Math.round(a / l), [l, a, e]), v = k(() => r.heights.reduce((w, P) => w + P, 0) / r.heights.length || 0, [r]), p = k(() => r.widths.reduce((w, P) => w + P, 0) / r.heights.length || 0, [r]);
1756
+ const m = k(() => e === Q.HORIZONTAL_SCROLLING || e === Q.PAGE_SCROLLING ? 1 : Math.round(a / l), [l, a, e]), w = k(() => r.heights.reduce((_, b) => _ + b, 0) / r.heights.length || 0, [r]), p = k(() => r.widths.reduce((_, b) => _ + b, 0) / r.heights.length || 0, [r]);
1757
1757
  return {
1758
1758
  rowCount: m,
1759
1759
  rowHeight: d,
1760
1760
  columnCount: l,
1761
1761
  columnWidth: u,
1762
1762
  pageDimension: r,
1763
- estimatedRowHeight: v,
1763
+ estimatedRowHeight: w,
1764
1764
  estimatedColumnWidth: p
1765
1765
  };
1766
1766
  };
1767
1767
  let oe;
1768
1768
  typeof window < "u" ? oe = window : typeof self < "u" ? oe = self : oe = global;
1769
- let _t = null, bt = null;
1770
- const Qt = 20, pt = oe.clearTimeout, en = oe.setTimeout, ht = oe.cancelAnimationFrame || oe.mozCancelAnimationFrame || oe.webkitCancelAnimationFrame, tn = oe.requestAnimationFrame || oe.mozRequestAnimationFrame || oe.webkitRequestAnimationFrame;
1771
- ht == null || tn == null ? (_t = pt, bt = function(e) {
1769
+ let bt = null, Ct = null;
1770
+ const Qt = 20, ht = oe.clearTimeout, en = oe.setTimeout, ft = oe.cancelAnimationFrame || oe.mozCancelAnimationFrame || oe.webkitCancelAnimationFrame, tn = oe.requestAnimationFrame || oe.mozRequestAnimationFrame || oe.webkitRequestAnimationFrame;
1771
+ ft == null || tn == null ? (bt = ht, Ct = function(e) {
1772
1772
  return en(e, Qt);
1773
- }) : (_t = function([e, n]) {
1774
- ht(e), pt(n);
1775
- }, bt = function(e) {
1773
+ }) : (bt = function([e, n]) {
1774
+ ft(e), ht(n);
1775
+ }, Ct = function(e) {
1776
1776
  const n = tn(function() {
1777
- pt(o), e();
1777
+ ht(o), e();
1778
1778
  }), o = en(function() {
1779
- ht(n), e();
1779
+ ft(n), e();
1780
1780
  }, Qt);
1781
1781
  return [n, o];
1782
1782
  });
@@ -1784,65 +1784,65 @@ function Qo(t) {
1784
1784
  let e, n, o, r, a, l, c;
1785
1785
  const u = typeof document < "u" && document.attachEvent;
1786
1786
  if (!u) {
1787
- l = function(T) {
1788
- const h = T.__resizeTriggers__, f = h.firstElementChild, g = h.lastElementChild, s = f.firstElementChild;
1789
- g.scrollLeft = g.scrollWidth, g.scrollTop = g.scrollHeight, s.style.width = f.offsetWidth + 1 + "px", s.style.height = f.offsetHeight + 1 + "px", f.scrollLeft = f.scrollWidth, f.scrollTop = f.scrollHeight;
1790
- }, a = function(T) {
1791
- return T.offsetWidth !== T.__resizeLast__.width || T.offsetHeight !== T.__resizeLast__.height;
1792
- }, c = function(T) {
1793
- if (T.target.className && typeof T.target.className.indexOf == "function" && T.target.className.indexOf("contract-trigger") < 0 && T.target.className.indexOf("expand-trigger") < 0)
1787
+ l = function(y) {
1788
+ const f = y.__resizeTriggers__, h = f.firstElementChild, g = f.lastElementChild, s = h.firstElementChild;
1789
+ g.scrollLeft = g.scrollWidth, g.scrollTop = g.scrollHeight, s.style.width = h.offsetWidth + 1 + "px", s.style.height = h.offsetHeight + 1 + "px", h.scrollLeft = h.scrollWidth, h.scrollTop = h.scrollHeight;
1790
+ }, a = function(y) {
1791
+ return y.offsetWidth !== y.__resizeLast__.width || y.offsetHeight !== y.__resizeLast__.height;
1792
+ }, c = function(y) {
1793
+ if (y.target.className && typeof y.target.className.indexOf == "function" && y.target.className.indexOf("contract-trigger") < 0 && y.target.className.indexOf("expand-trigger") < 0)
1794
1794
  return;
1795
- const h = this;
1796
- l(this), this.__resizeRAF__ && _t(this.__resizeRAF__), this.__resizeRAF__ = bt(function() {
1797
- a(h) && (h.__resizeLast__.width = h.offsetWidth, h.__resizeLast__.height = h.offsetHeight, h.__resizeListeners__.forEach(function(s) {
1798
- s.call(h, T);
1795
+ const f = this;
1796
+ l(this), this.__resizeRAF__ && bt(this.__resizeRAF__), this.__resizeRAF__ = Ct(function() {
1797
+ a(f) && (f.__resizeLast__.width = f.offsetWidth, f.__resizeLast__.height = f.offsetHeight, f.__resizeListeners__.forEach(function(s) {
1798
+ s.call(f, y);
1799
1799
  }));
1800
1800
  });
1801
1801
  };
1802
- let p = !1, w = "";
1802
+ let p = !1, _ = "";
1803
1803
  o = "animationstart";
1804
- const P = "Webkit Moz O ms".split(" ");
1805
- let y = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), b = "";
1804
+ const b = "Webkit Moz O ms".split(" ");
1805
+ let S = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), C = "";
1806
1806
  {
1807
- const T = document.createElement("fakeelement");
1808
- if (T.style.animationName !== void 0 && (p = !0), p === !1) {
1809
- for (let h = 0; h < P.length; h++)
1810
- if (T.style[P[h] + "AnimationName"] !== void 0) {
1811
- b = P[h], w = "-" + b.toLowerCase() + "-", o = y[h], p = !0;
1807
+ const y = document.createElement("fakeelement");
1808
+ if (y.style.animationName !== void 0 && (p = !0), p === !1) {
1809
+ for (let f = 0; f < b.length; f++)
1810
+ if (y.style[b[f] + "AnimationName"] !== void 0) {
1811
+ C = b[f], _ = "-" + C.toLowerCase() + "-", o = S[f], p = !0;
1812
1812
  break;
1813
1813
  }
1814
1814
  }
1815
1815
  }
1816
- n = "resizeanim", e = "@" + w + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = w + "animation: 1ms " + n + "; ";
1816
+ n = "resizeanim", e = "@" + _ + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = _ + "animation: 1ms " + n + "; ";
1817
1817
  }
1818
1818
  const d = function(p) {
1819
1819
  if (!p.getElementById("detectElementResize")) {
1820
- const w = (e || "") + ".resize-triggers { " + (r || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', P = p.head || p.getElementsByTagName("head")[0], y = p.createElement("style");
1821
- y.id = "detectElementResize", y.type = "text/css", t != null && y.setAttribute("nonce", t), y.styleSheet ? y.styleSheet.cssText = w : y.appendChild(p.createTextNode(w)), P.appendChild(y);
1820
+ const _ = (e || "") + ".resize-triggers { " + (r || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', b = p.head || p.getElementsByTagName("head")[0], S = p.createElement("style");
1821
+ S.id = "detectElementResize", S.type = "text/css", t != null && S.setAttribute("nonce", t), S.styleSheet ? S.styleSheet.cssText = _ : S.appendChild(p.createTextNode(_)), b.appendChild(S);
1822
1822
  }
1823
1823
  };
1824
1824
  return {
1825
- addResizeListener: function(p, w) {
1825
+ addResizeListener: function(p, _) {
1826
1826
  if (u)
1827
- p.attachEvent("onresize", w);
1827
+ p.attachEvent("onresize", _);
1828
1828
  else {
1829
1829
  if (!p.__resizeTriggers__) {
1830
- const P = p.ownerDocument, y = oe.getComputedStyle(p);
1831
- y && y.position === "static" && (p.style.position = "relative"), d(P), p.__resizeLast__ = {}, p.__resizeListeners__ = [], (p.__resizeTriggers__ = P.createElement("div")).className = "resize-triggers";
1832
- const b = P.createElement("div");
1833
- b.className = "expand-trigger", b.appendChild(P.createElement("div"));
1834
- const T = P.createElement("div");
1835
- T.className = "contract-trigger", p.__resizeTriggers__.appendChild(b), p.__resizeTriggers__.appendChild(T), p.appendChild(p.__resizeTriggers__), l(p), p.addEventListener("scroll", c, !0), o && (p.__resizeTriggers__.__animationListener__ = function(f) {
1836
- f.animationName === n && l(p);
1830
+ const b = p.ownerDocument, S = oe.getComputedStyle(p);
1831
+ S && S.position === "static" && (p.style.position = "relative"), d(b), p.__resizeLast__ = {}, p.__resizeListeners__ = [], (p.__resizeTriggers__ = b.createElement("div")).className = "resize-triggers";
1832
+ const C = b.createElement("div");
1833
+ C.className = "expand-trigger", C.appendChild(b.createElement("div"));
1834
+ const y = b.createElement("div");
1835
+ y.className = "contract-trigger", p.__resizeTriggers__.appendChild(C), p.__resizeTriggers__.appendChild(y), p.appendChild(p.__resizeTriggers__), l(p), p.addEventListener("scroll", c, !0), o && (p.__resizeTriggers__.__animationListener__ = function(h) {
1836
+ h.animationName === n && l(p);
1837
1837
  }, p.__resizeTriggers__.addEventListener(o, p.__resizeTriggers__.__animationListener__));
1838
1838
  }
1839
- p.__resizeListeners__.push(w);
1839
+ p.__resizeListeners__.push(_);
1840
1840
  }
1841
1841
  },
1842
- removeResizeListener: function(p, w) {
1842
+ removeResizeListener: function(p, _) {
1843
1843
  if (u)
1844
- p.detachEvent("onresize", w);
1845
- else if (p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(w), 1), !p.__resizeListeners__.length) {
1844
+ p.detachEvent("onresize", _);
1845
+ else if (p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(_), 1), !p.__resizeListeners__.length) {
1846
1846
  p.removeEventListener("scroll", c, !0), p.__resizeTriggers__.__animationListener__ && (p.__resizeTriggers__.removeEventListener(o, p.__resizeTriggers__.__animationListener__), p.__resizeTriggers__.__animationListener__ = null);
1847
1847
  try {
1848
1848
  p.__resizeTriggers__ = !p.removeChild(p.__resizeTriggers__);
@@ -1856,10 +1856,8 @@ class ei extends tr {
1856
1856
  constructor(...e) {
1857
1857
  super(...e), this.state = {
1858
1858
  height: this.props.defaultHeight || 0,
1859
- scaledHeight: this.props.defaultHeight || 0,
1860
- scaledWidth: this.props.defaultWidth || 0,
1861
1859
  width: this.props.defaultWidth || 0
1862
- }, this._autoSizer = null, this._detectElementResize = null, this._parentNode = null, this._resizeObserver = null, this._timeoutId = null, this._onResize = () => {
1860
+ }, this._autoSizer = null, this._detectElementResize = null, this._didLogDeprecationWarning = !1, this._parentNode = null, this._resizeObserver = null, this._timeoutId = null, this._onResize = () => {
1863
1861
  this._timeoutId = null;
1864
1862
  const {
1865
1863
  disableHeight: n,
@@ -1867,18 +1865,27 @@ class ei extends tr {
1867
1865
  onResize: r
1868
1866
  } = this.props;
1869
1867
  if (this._parentNode) {
1870
- const a = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(a.paddingLeft || "0"), c = parseFloat(a.paddingRight || "0"), u = parseFloat(a.paddingTop || "0"), d = parseFloat(a.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), v = m.height - u - d, p = m.width - l - c, w = this._parentNode.offsetHeight - u - d, P = this._parentNode.offsetWidth - l - c;
1871
- (!n && (this.state.height !== w || this.state.scaledHeight !== v) || !o && (this.state.width !== P || this.state.scaledWidth !== p)) && (this.setState({
1872
- height: w,
1873
- width: P,
1874
- scaledHeight: v,
1875
- scaledWidth: p
1876
- }), typeof r == "function" && r({
1877
- height: w,
1878
- scaledHeight: v,
1879
- scaledWidth: p,
1880
- width: P
1881
- }));
1868
+ const a = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(a.paddingLeft || "0"), c = parseFloat(a.paddingRight || "0"), u = parseFloat(a.paddingTop || "0"), d = parseFloat(a.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), w = m.height - u - d, p = m.width - l - c;
1869
+ if (!n && this.state.height !== w || !o && this.state.width !== p) {
1870
+ this.setState({
1871
+ height: w,
1872
+ width: p
1873
+ });
1874
+ const _ = () => {
1875
+ this._didLogDeprecationWarning || (this._didLogDeprecationWarning = !0, console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"));
1876
+ };
1877
+ typeof r == "function" && r({
1878
+ height: w,
1879
+ width: p,
1880
+ // TODO Remove these params in the next major release
1881
+ get scaledHeight() {
1882
+ return _(), w;
1883
+ },
1884
+ get scaledWidth() {
1885
+ return _(), p;
1886
+ }
1887
+ });
1888
+ }
1882
1889
  }
1883
1890
  }, this._setRef = (n) => {
1884
1891
  this._autoSizer = n;
@@ -1911,24 +1918,22 @@ class ei extends tr {
1911
1918
  onResize: u,
1912
1919
  style: d = {},
1913
1920
  tagName: m = "div",
1914
- ...v
1921
+ ...w
1915
1922
  } = this.props, {
1916
1923
  height: p,
1917
- scaledHeight: w,
1918
- scaledWidth: P,
1919
- width: y
1924
+ width: _
1920
1925
  } = this.state, b = {
1921
1926
  overflow: "visible"
1922
- }, T = {};
1923
- let h = !1;
1924
- return r || (p === 0 && (h = !0), b.height = 0, T.height = p, T.scaledHeight = w), a || (y === 0 && (h = !0), b.width = 0, T.width = y, T.scaledWidth = P), l && (h = !1), qe(m, {
1927
+ }, S = {};
1928
+ let C = !1;
1929
+ return r || (p === 0 && (C = !0), b.height = 0, S.height = p, S.scaledHeight = p), a || (_ === 0 && (C = !0), b.width = 0, S.width = _, S.scaledWidth = _), l && (C = !1), qe(m, {
1925
1930
  ref: this._setRef,
1926
1931
  style: {
1927
1932
  ...b,
1928
1933
  ...d
1929
1934
  },
1930
- ...v
1931
- }, !h && e(T));
1935
+ ...w
1936
+ }, !C && e(S));
1932
1937
  }
1933
1938
  }
1934
1939
  const ti = ln(({ widths: t, heights: e }) => {
@@ -1940,25 +1945,25 @@ const ti = ln(({ widths: t, heights: e }) => {
1940
1945
  }
1941
1946
  return c;
1942
1947
  }, [n, o]), a = k(() => {
1943
- const c = n % 2 === 1 ? n - 1 : n - 2, u = t(c), d = e(c), m = t(c + 1), v = e(c + 1), p = d > v ? d : v, w = d < v ? d : v, P = p / 2 - w / 2;
1948
+ const c = n % 2 === 1 ? n - 1 : n - 2, u = t(c), d = e(c), m = t(c + 1), w = e(c + 1), p = d > w ? d : w, _ = d < w ? d : w, b = p / 2 - _ / 2;
1944
1949
  return [
1945
1950
  {
1946
1951
  position: "absolute",
1947
1952
  left: 0,
1948
- top: p === d ? 0 : P,
1953
+ top: p === d ? 0 : b,
1949
1954
  width: u,
1950
1955
  height: d
1951
1956
  },
1952
1957
  {
1953
1958
  position: "absolute",
1954
1959
  left: u,
1955
- top: p === v ? 0 : P,
1960
+ top: p === w ? 0 : b,
1956
1961
  width: m,
1957
- height: v
1962
+ height: w
1958
1963
  }
1959
1964
  ];
1960
1965
  }, [t, e, r]), l = k(() => a.reduce((c, u) => c + Number(u.width || 0), 0), [a]);
1961
- return /* @__PURE__ */ i("div", { style: { width: l, position: "relative" }, children: r.map((c, u) => /* @__PURE__ */ i(It, { style: a[u], pageNumber: c }, c)) });
1966
+ return /* @__PURE__ */ i("div", { style: { width: l, position: "relative" }, children: r.map((c, u) => /* @__PURE__ */ i(Rt, { style: a[u], pageNumber: c }, c)) });
1962
1967
  }), ni = ({ widths: t, heights: e }) => {
1963
1968
  const { focusedPage: n } = ie(), o = k(() => ({
1964
1969
  position: "absolute",
@@ -1972,60 +1977,60 @@ const ti = ln(({ widths: t, heights: e }) => {
1972
1977
  width: r,
1973
1978
  position: "relative"
1974
1979
  },
1975
- children: /* @__PURE__ */ i(It, { style: o, pageNumber: n }, n)
1980
+ children: /* @__PURE__ */ i(Rt, { style: o, pageNumber: n }, n)
1976
1981
  }
1977
1982
  );
1978
1983
  }, ri = (t, e, n) => {
1979
- const o = H(), { contentRef: r } = me(), { heights: a, widths: l } = Ge(), { setFocusedPage: c } = ie(), [u, d] = $([]), { targetScrollPage: m } = pn(), v = Pt(u, 0, 500), p = k(() => a.map((P, y) => {
1980
- const b = l[y], T = Br(y + 1, t), h = b * T.columnIndex, f = P * T.rowIndex, g = h + b, s = f + P;
1984
+ const o = H(), { contentRef: r } = me(), { heights: a, widths: l } = Ge(), { setFocusedPage: c } = ie(), [u, d] = $([]), { targetScrollPage: m } = pn(), w = Tt(u, 0, 500), p = k(() => a.map((b, S) => {
1985
+ const C = l[S], y = Br(S + 1, t), f = C * y.columnIndex, h = b * y.rowIndex, g = f + C, s = h + b;
1981
1986
  return {
1982
- pageNumber: y + 1,
1983
- ...T,
1984
- width: b,
1985
- height: P,
1986
- startX: h,
1987
- startY: f,
1987
+ pageNumber: S + 1,
1988
+ ...y,
1989
+ width: C,
1990
+ height: b,
1991
+ startX: f,
1992
+ startY: h,
1988
1993
  endX: g,
1989
1994
  endY: s
1990
1995
  };
1991
1996
  }), [a, l, t, e]);
1992
1997
  F(() => {
1993
- var y;
1994
- v.length > 0 && !m.current && c(v[0].pageNumber);
1995
- let P = (y = v[0]) == null ? void 0 : y.ratio;
1996
- P && v.filter((b) => Math.round(b.ratio) === Math.round(P)).some((b) => b.pageNumber === m.current) && setTimeout(() => {
1998
+ var S;
1999
+ w.length > 0 && !m.current && c(w[0].pageNumber);
2000
+ let b = (S = w[0]) == null ? void 0 : S.ratio;
2001
+ b && w.filter((C) => Math.round(C.ratio) === Math.round(b)).some((C) => C.pageNumber === m.current) && setTimeout(() => {
1997
2002
  m.current = void 0;
1998
2003
  }, 500);
1999
- }, [v, c]);
2000
- const w = N(
2001
- (P) => {
2004
+ }, [w, c]);
2005
+ const _ = N(
2006
+ (b) => {
2002
2007
  o.current && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => {
2003
- const y = P.target, b = {
2004
- startTop: y.scrollTop,
2005
- startLeft: y.scrollLeft,
2006
- endTop: y.scrollTop + y.clientHeight,
2007
- endLeft: y.scrollLeft + y.clientWidth
2008
- }, T = p.filter((h) => {
2009
- const f = h.endX >= b.startLeft && h.endY >= b.startTop, g = h.startX <= b.endLeft && h.startY <= b.endTop;
2010
- return f && g;
2011
- }).map((h) => {
2012
- const f = b.startLeft > h.startX ? b.startLeft : h.startX, g = b.startTop > h.startY ? b.startTop : h.startY, s = b.endLeft < h.endX ? b.endLeft : h.endX, C = b.endTop < h.endY ? b.endTop : h.endY, _ = s - f, S = C - g, x = +(_ * S / (h.width * h.height) * 100).toFixed(2);
2008
+ const S = b.target, C = {
2009
+ startTop: S.scrollTop,
2010
+ startLeft: S.scrollLeft,
2011
+ endTop: S.scrollTop + S.clientHeight,
2012
+ endLeft: S.scrollLeft + S.clientWidth
2013
+ }, y = p.filter((f) => {
2014
+ const h = f.endX >= C.startLeft && f.endY >= C.startTop, g = f.startX <= C.endLeft && f.startY <= C.endTop;
2015
+ return h && g;
2016
+ }).map((f) => {
2017
+ const h = C.startLeft > f.startX ? C.startLeft : f.startX, g = C.startTop > f.startY ? C.startTop : f.startY, s = C.endLeft < f.endX ? C.endLeft : f.endX, P = C.endTop < f.endY ? C.endTop : f.endY, v = s - h, T = P - g, I = +(v * T / (f.width * f.height) * 100).toFixed(2);
2013
2018
  return {
2014
- pageNumber: h.pageNumber,
2015
- ratio: x
2019
+ pageNumber: f.pageNumber,
2020
+ ratio: I
2016
2021
  };
2017
- }).sort((h, f) => f.ratio - h.ratio);
2018
- d(T);
2022
+ }).sort((f, h) => h.ratio - f.ratio);
2023
+ d(y);
2019
2024
  });
2020
2025
  },
2021
2026
  [r, p]
2022
2027
  );
2023
2028
  F(() => {
2024
2029
  if (n)
2025
- return n == null || n.addEventListener("scroll", w), () => {
2026
- n == null || n.removeEventListener("scroll", w);
2030
+ return n == null || n.addEventListener("scroll", _), () => {
2031
+ n == null || n.removeEventListener("scroll", _);
2027
2032
  };
2028
- }, [n, w]);
2033
+ }, [n, _]);
2029
2034
  }, be = {
2030
2035
  "rp-layout": "_rp-layout_1g4ff_1",
2031
2036
  "rp-content": "_rp-content_1g4ff_5",
@@ -2034,7 +2039,7 @@ const ti = ln(({ widths: t, heights: e }) => {
2034
2039
  "rp-loader": "_rp-loader_1g4ff_20",
2035
2040
  "rp-theme-variables": "_rp-theme-variables_1g4ff_24",
2036
2041
  "rp-dark-mode": "_rp-dark-mode_1g4ff_135"
2037
- }, In = $e(
2042
+ }, xn = $e(
2038
2043
  (t, e) => {
2039
2044
  const { children: n, toolbarRef: o, style: r, className: a, ...l } = t, { customVariables: c, customDarkVariables: u } = Sr(), { darkMode: d } = or();
2040
2045
  return /* @__PURE__ */ i(
@@ -2060,32 +2065,32 @@ const ti = ln(({ widths: t, heights: e }) => {
2060
2065
  }
2061
2066
  ), oi = ln(({ columnIndex: t, rowIndex: e, data: n, style: o }) => {
2062
2067
  const r = Zr(e, t, n.columnCount);
2063
- return /* @__PURE__ */ i(It, { style: o, pageNumber: r }, r);
2064
- }, Yo), Bs = () => {
2068
+ return /* @__PURE__ */ i(Rt, { style: o, pageNumber: r }, r);
2069
+ }, Yo), js = () => {
2065
2070
  const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = sr(), { pagesRef: o, setPagesRef: r } = me(), { scrollToPage: a } = wn(), {
2066
2071
  virtualScrollRef: l,
2067
2072
  getVirtualScrollRef: c,
2068
2073
  getPageScrollElementRef: u,
2069
2074
  getVirtualScrollableElementRef: d,
2070
2075
  setTotalInnerDimensions: m,
2071
- virtualScrollableElementRef: v,
2076
+ virtualScrollableElementRef: w,
2072
2077
  totalInnerDimensions: p,
2073
- pageScrollElementRef: w
2074
- } = et(), P = H(!0), { nextPage: y, prevPage: b, setFocusedPage: T, focusedPage: h } = ie(), { scrollMode: f } = Ee(), { viewMode: g } = Ne(), s = H(null), { loading: C } = ee(), { passwordRequired: _ } = rr(), { LoaderImageComponent: S } = hn(), E = H(
2078
+ pageScrollElementRef: _
2079
+ } = et(), b = H(!0), { nextPage: S, prevPage: C, setFocusedPage: y, focusedPage: f } = ie(), { scrollMode: h } = Ne(), { viewMode: g } = Oe(), s = H(null), { loading: P } = ee(), { passwordRequired: v } = rr(), { LoaderImageComponent: T } = hn(), E = H(
2075
2080
  p
2076
- ), x = H({
2081
+ ), I = H({
2077
2082
  viewMode: g,
2078
- scrollMode: f
2079
- }), R = H(!1), z = H(), { isFullScreen: D } = cr(), {
2083
+ scrollMode: h
2084
+ }), R = H(!1), O = H(), { isFullScreen: z } = cr(), {
2080
2085
  pageDimension: A,
2081
2086
  rowCount: L,
2082
- rowHeight: I,
2083
- columnCount: O,
2087
+ rowHeight: x,
2088
+ columnCount: D,
2084
2089
  columnWidth: M,
2085
2090
  estimatedColumnWidth: G,
2086
2091
  estimatedRowHeight: Z
2087
- } = Jo(), j = Pt(p, 100), q = H();
2088
- ri(O, L, v);
2092
+ } = Jo(), j = Tt(p, 100), q = H();
2093
+ ri(D, L, w);
2089
2094
  const te = H({
2090
2095
  scrollTop: 0,
2091
2096
  scrollLeft: 0
@@ -2094,56 +2099,56 @@ const ti = ln(({ widths: t, heights: e }) => {
2094
2099
  const { isPressed: X } = Gr(), { selectionMode: ce } = ar(), { initializeGrabScroll: ve, resetGrabState: le } = Ur({
2095
2100
  isPressed: X
2096
2101
  }), Y = k(() => ce === nr.HAND, [ce]), Fe = k(() => ({
2097
- columnCount: O
2098
- }), [O]), we = N(
2102
+ columnCount: D
2103
+ }), [D]), we = N(
2099
2104
  (U) => {
2100
2105
  const V = document.activeElement !== o;
2101
- !D && V || (["ArrowUp", "ArrowLeft"].includes(U.key) ? (U.preventDefault(), b()) : ["ArrowDown", "ArrowRight"].includes(U.key) && (U.preventDefault(), y()));
2106
+ !z && V || (["ArrowUp", "ArrowLeft"].includes(U.key) ? (U.preventDefault(), C()) : ["ArrowDown", "ArrowRight"].includes(U.key) && (U.preventDefault(), S()));
2102
2107
  },
2103
- [y, b, D, f]
2108
+ [S, C, z, h]
2104
2109
  );
2105
2110
  F(() => (window.addEventListener("keydown", we), () => {
2106
2111
  window.removeEventListener("keydown", we);
2107
2112
  }), [we]), F(() => {
2108
2113
  if (s.current && (s.current.style.position = "relative"), !!l)
2109
2114
  for (let U = 0; U < L; U++)
2110
- for (let V = 0; V < O; V++)
2115
+ for (let V = 0; V < D; V++)
2111
2116
  l.resetAfterIndices({
2112
2117
  columnIndex: V,
2113
2118
  rowIndex: U,
2114
2119
  shouldForceUpdate: !0
2115
2120
  });
2116
- }, [L, O, A, l]);
2121
+ }, [L, D, A, l]);
2117
2122
  const Te = N(
2118
2123
  (U, V) => {
2119
- if (!v)
2124
+ if (!w)
2120
2125
  return { scrollTop: 0, scrollLeft: 0 };
2121
2126
  const Se = te.current.scrollTop > V, ye = te.current.scrollLeft > U;
2122
2127
  return Se || ye ? te.current : {
2123
- scrollTop: v.scrollTop,
2124
- scrollLeft: v.scrollLeft
2128
+ scrollTop: w.scrollTop,
2129
+ scrollLeft: w.scrollLeft
2125
2130
  };
2126
2131
  },
2127
- [v]
2132
+ [w]
2128
2133
  ), _e = N(
2129
2134
  (U, V) => {
2130
- if (x.current.viewMode !== g || x.current.scrollMode !== f) {
2131
- q.current && clearTimeout(q.current), R.current = !0, a(h, "auto"), q.current = setTimeout(() => {
2135
+ if (I.current.viewMode !== g || I.current.scrollMode !== h) {
2136
+ q.current && clearTimeout(q.current), R.current = !0, a(f, "auto"), q.current = setTimeout(() => {
2132
2137
  requestAnimationFrame(() => {
2133
- x.current = { viewMode: g, scrollMode: f };
2138
+ I.current = { viewMode: g, scrollMode: h };
2134
2139
  });
2135
2140
  }, 100);
2136
2141
  return;
2137
2142
  }
2138
- const ye = U.scrollTop, ot = U.scrollLeft;
2143
+ const ye = U.scrollTop, it = U.scrollLeft;
2139
2144
  if (!V.height || !V.width)
2140
2145
  return;
2141
2146
  R.current = !0;
2142
- const { height: xe, width: it } = V, { height: Ot, width: zt } = E.current;
2143
- if (Ot === xe && zt === it)
2147
+ const { height: Ie, width: at } = V, { height: Ot, width: Dt } = E.current;
2148
+ if (Ot === Ie && Dt === at)
2144
2149
  return;
2145
- const Xn = ye / Ot * xe, Yn = ot / zt * it, Jn = Math.round(Math.min(Xn, xe)) || 0, Qn = Math.round(Math.min(Yn, it)) || 0;
2146
- z.current = setTimeout(() => {
2150
+ const Xn = ye / Ot * Ie, Yn = it / Dt * at, Jn = Math.round(Math.min(Xn, Ie)) || 0, Qn = Math.round(Math.min(Yn, at)) || 0;
2151
+ O.current = setTimeout(() => {
2147
2152
  requestAnimationFrame(() => {
2148
2153
  l == null || l.scrollTo({
2149
2154
  scrollTop: Jn,
@@ -2155,35 +2160,35 @@ const ti = ln(({ widths: t, heights: e }) => {
2155
2160
  width: V.width
2156
2161
  };
2157
2162
  },
2158
- [l, g, f, a]
2163
+ [l, g, h, a]
2159
2164
  );
2160
2165
  F(() => {
2161
- clearTimeout(z.current);
2166
+ clearTimeout(O.current);
2162
2167
  const U = Array.from({ length: L }).reduce(
2163
- (ye, ot, xe) => ye + I(xe),
2168
+ (ye, it, Ie) => ye + x(Ie),
2164
2169
  0
2165
- ), V = Array.from({ length: O }).reduce(
2166
- (ye, ot, xe) => ye + M(xe),
2170
+ ), V = Array.from({ length: D }).reduce(
2171
+ (ye, it, Ie) => ye + M(Ie),
2167
2172
  0
2168
2173
  ), Se = Te(V, U);
2169
2174
  te.current = Se, _e(Se, { height: U, width: V }), m({
2170
2175
  height: U,
2171
2176
  width: V
2172
2177
  });
2173
- }, [A, L, O, _e]);
2174
- const nt = N(
2178
+ }, [A, L, D, _e]);
2179
+ const rt = N(
2175
2180
  (U) => {
2176
2181
  te.current = {
2177
2182
  scrollTop: U.scrollTop,
2178
2183
  scrollLeft: U.scrollLeft
2179
2184
  };
2180
2185
  },
2181
- [v]
2186
+ [w]
2182
2187
  );
2183
2188
  F(() => () => {
2184
2189
  q.current && clearTimeout(q.current);
2185
2190
  }, []);
2186
- const rt = k(() => ne(de["rp-pages-container"], {
2191
+ const ot = k(() => ne(de["rp-pages-container"], {
2187
2192
  [de["rp-cursor-grab"]]: Y && !X,
2188
2193
  [de["rp-cursor-grabbing"]]: Y && X
2189
2194
  }), [Y, X]), Kn = N(
@@ -2196,29 +2201,29 @@ const ti = ln(({ widths: t, heights: e }) => {
2196
2201
  [Y, ve, de]
2197
2202
  );
2198
2203
  return F(() => {
2199
- C && le();
2200
- }, [C]), F(() => {
2201
- if (!(j.height === 0 || !P.current)) {
2204
+ P && le();
2205
+ }, [P]), F(() => {
2206
+ if (!(j.height === 0 || !b.current)) {
2202
2207
  if (e === Q.PAGE_SCROLLING) {
2203
- t !== h && w && T(t), P.current = !1;
2208
+ t !== f && _ && y(t), b.current = !1;
2204
2209
  return;
2205
2210
  }
2206
- a(t, "auto"), T(t), P.current = !1;
2211
+ a(t, "auto"), y(t), b.current = !1;
2207
2212
  }
2208
2213
  }, [
2209
2214
  a,
2210
2215
  e,
2211
- w,
2212
- T,
2216
+ _,
2217
+ y,
2213
2218
  j
2214
2219
  ]), /* @__PURE__ */ W(fe, { children: [
2215
- /* @__PURE__ */ i(In, { id: n, ref: r, tabIndex: -1, className: rt, children: /* @__PURE__ */ i(ei, { style: { minHeight: "50px" }, children: ({ width: U, height: V }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: Kn, style: { width: U, height: V }, children: f === Q.PAGE_SCROLLING ? /* @__PURE__ */ i(
2220
+ /* @__PURE__ */ i(xn, { id: n, ref: r, tabIndex: -1, className: ot, children: /* @__PURE__ */ i(ei, { style: { minHeight: "50px" }, children: ({ width: U, height: V }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: Kn, style: { width: U, height: V }, children: h === Q.PAGE_SCROLLING ? /* @__PURE__ */ i(
2216
2221
  "div",
2217
2222
  {
2218
2223
  ref: u,
2219
2224
  style: { width: U, height: V },
2220
2225
  className: ne(de["rp-pages"], de["rp-page-scrolling-wrapper"]),
2221
- children: g === Re.DUAL_PAGE ? /* @__PURE__ */ i(ti, { widths: M, heights: I }) : /* @__PURE__ */ i(ni, { widths: M, heights: I })
2226
+ children: g === Le.DUAL_PAGE ? /* @__PURE__ */ i(ti, { widths: M, heights: x }) : /* @__PURE__ */ i(ni, { widths: M, heights: x })
2222
2227
  }
2223
2228
  ) : G ? /* @__PURE__ */ i(
2224
2229
  jo,
@@ -2227,10 +2232,10 @@ const ti = ln(({ widths: t, heights: e }) => {
2227
2232
  itemData: Fe,
2228
2233
  outerRef: d,
2229
2234
  innerRef: s,
2230
- onScroll: nt,
2231
- columnCount: O,
2235
+ onScroll: rt,
2236
+ columnCount: D,
2232
2237
  columnWidth: M,
2233
- rowHeight: I,
2238
+ rowHeight: x,
2234
2239
  height: V,
2235
2240
  width: U,
2236
2241
  estimatedColumnWidth: G,
@@ -2238,11 +2243,11 @@ const ti = ln(({ widths: t, heights: e }) => {
2238
2243
  rowCount: L,
2239
2244
  className: ne(
2240
2245
  de["rp-pages"],
2241
- f === Q.HORIZONTAL_SCROLLING ? de["rp-pages-horizontal-scroll"] : ""
2246
+ h === Q.HORIZONTAL_SCROLLING ? de["rp-pages-horizontal-scroll"] : ""
2242
2247
  ),
2243
2248
  children: oi
2244
2249
  }
2245
- ) : C ? null : /* @__PURE__ */ i(
2250
+ ) : P ? null : /* @__PURE__ */ i(
2246
2251
  "div",
2247
2252
  {
2248
2253
  className: de["rp-loader"],
@@ -2253,10 +2258,10 @@ const ti = ln(({ widths: t, heights: e }) => {
2253
2258
  height: "100%",
2254
2259
  width: "100%"
2255
2260
  },
2256
- children: S && /* @__PURE__ */ i(S, {})
2261
+ children: T && /* @__PURE__ */ i(T, {})
2257
2262
  }
2258
2263
  ) }) }) }),
2259
- _ && /* @__PURE__ */ i(qr, {})
2264
+ v && /* @__PURE__ */ i(qr, {})
2260
2265
  ] });
2261
2266
  }, We = {
2262
2267
  "rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
@@ -2264,7 +2269,7 @@ const ti = ln(({ widths: t, heights: e }) => {
2264
2269
  "rp-toolbar-start": "_rp-toolbar-start_sz31z_33",
2265
2270
  "rp-toolbar-middle": "_rp-toolbar-middle_sz31z_39",
2266
2271
  "rp-toolbar-end": "_rp-toolbar-end_sz31z_46"
2267
- }, ft = {
2272
+ }, mt = {
2268
2273
  "rp-paginate": "_rp-paginate_1y9vo_1",
2269
2274
  "rp-page-input": "_rp-page-input_1y9vo_6",
2270
2275
  "rp-total-page": "_rp-total-page_1y9vo_11"
@@ -2275,24 +2280,24 @@ const ti = ln(({ widths: t, heights: e }) => {
2275
2280
  const { nextIcon: t } = ue();
2276
2281
  return t || /* @__PURE__ */ i(He, { style: { transform: "rotate(180deg" } });
2277
2282
  }, si = () => {
2278
- const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [l, c] = $(t.toString()), { pageNavigationTool: u = !0 } = ge(), { isSmallScreen: d } = Pe(), { localeMessages: m } = ae(), { viewMode: v } = Ne(), { scrollMode: p } = Ee();
2283
+ const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [l, c] = $(t.toString()), { pageNavigationTool: u = !0 } = ge(), { isSmallScreen: d } = Pe(), { localeMessages: m } = ae(), { viewMode: w } = Oe(), { scrollMode: p } = Ne();
2279
2284
  F(() => {
2280
2285
  c(t.toString());
2281
2286
  }, [t]);
2282
- const w = N((h) => {
2283
- const f = h.target.value;
2284
- c(f);
2285
- }, []), P = N(async () => {
2286
- const h = a(l);
2287
- h.success || c(h.currentPage.toString());
2288
- }, [a, l, e]), y = N(() => {
2287
+ const _ = N((f) => {
2288
+ const h = f.target.value;
2289
+ c(h);
2290
+ }, []), b = N(async () => {
2291
+ const f = a(l);
2292
+ f.success || c(f.currentPage.toString());
2293
+ }, [a, l, e]), S = N(() => {
2289
2294
  c(t.toString());
2290
- }, [t]), b = N(
2291
- (h) => {
2292
- h.key === "Enter" && P();
2295
+ }, [t]), C = N(
2296
+ (f) => {
2297
+ f.key === "Enter" && b();
2293
2298
  },
2294
- [P]
2295
- ), T = k(() => v === Re.DUAL_PAGE && p === Q.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, v, p]);
2299
+ [b]
2300
+ ), y = k(() => w === Le.DUAL_PAGE && p === Q.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, w, p]);
2296
2301
  return typeof u != "boolean" ? /* @__PURE__ */ i(
2297
2302
  u,
2298
2303
  {
@@ -2303,7 +2308,7 @@ const ti = ln(({ widths: t, heights: e }) => {
2303
2308
  goToPage: a,
2304
2309
  changePage: n
2305
2310
  }
2306
- ) : u ? /* @__PURE__ */ W("div", { className: ft["rp-paginate"], children: [
2311
+ ) : u ? /* @__PURE__ */ W("div", { className: mt["rp-paginate"], children: [
2307
2312
  !d && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.previousPageTooltip, children: /* @__PURE__ */ i(
2308
2313
  re,
2309
2314
  {
@@ -2316,14 +2321,14 @@ const ti = ln(({ widths: t, heights: e }) => {
2316
2321
  /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.currentPageTooltip, children: /* @__PURE__ */ i(
2317
2322
  dn,
2318
2323
  {
2319
- onKeyDown: b,
2320
- onBlur: y,
2321
- onChange: w,
2324
+ onKeyDown: C,
2325
+ onBlur: S,
2326
+ onChange: _,
2322
2327
  value: l,
2323
- className: ft["rp-page-input"]
2328
+ className: mt["rp-page-input"]
2324
2329
  }
2325
2330
  ) }),
2326
- /* @__PURE__ */ W("span", { className: ft["rp-total-page"], children: [
2331
+ /* @__PURE__ */ W("span", { className: mt["rp-total-page"], children: [
2327
2332
  "/",
2328
2333
  e
2329
2334
  ] }),
@@ -2332,13 +2337,13 @@ const ti = ln(({ widths: t, heights: e }) => {
2332
2337
  {
2333
2338
  onClick: o,
2334
2339
  "aria-label": m == null ? void 0 : m.nextPageTooltip,
2335
- "aria-disabled": T,
2340
+ "aria-disabled": y,
2336
2341
  children: /* @__PURE__ */ i(ai, {})
2337
2342
  }
2338
2343
  ) })
2339
2344
  ] }) : null;
2340
2345
  };
2341
- var Rt = "Dialog", [Rn, Zs] = Jr(Rt), [ci, se] = Rn(Rt), Ln = (t) => {
2346
+ var nt = "Dialog", [Rn, Ks] = Jr(nt), [ci, se] = Rn(nt), Ln = (t) => {
2342
2347
  const {
2343
2348
  __scopeDialog: e,
2344
2349
  children: n,
@@ -2346,10 +2351,11 @@ var Rt = "Dialog", [Rn, Zs] = Jr(Rt), [ci, se] = Rn(Rt), Ln = (t) => {
2346
2351
  defaultOpen: r,
2347
2352
  onOpenChange: a,
2348
2353
  modal: l = !0
2349
- } = t, c = B.useRef(null), u = B.useRef(null), [d = !1, m] = to({
2354
+ } = t, c = B.useRef(null), u = B.useRef(null), [d, m] = eo({
2350
2355
  prop: o,
2351
- defaultProp: r,
2352
- onChange: a
2356
+ defaultProp: r ?? !1,
2357
+ onChange: a,
2358
+ caller: nt
2353
2359
  });
2354
2360
  return /* @__PURE__ */ i(
2355
2361
  ci,
@@ -2357,21 +2363,21 @@ var Rt = "Dialog", [Rn, Zs] = Jr(Rt), [ci, se] = Rn(Rt), Ln = (t) => {
2357
2363
  scope: e,
2358
2364
  triggerRef: c,
2359
2365
  contentRef: u,
2360
- contentId: ct(),
2361
- titleId: ct(),
2362
- descriptionId: ct(),
2366
+ contentId: lt(),
2367
+ titleId: lt(),
2368
+ descriptionId: lt(),
2363
2369
  open: d,
2364
2370
  onOpenChange: m,
2365
- onOpenToggle: B.useCallback(() => m((v) => !v), [m]),
2371
+ onOpenToggle: B.useCallback(() => m((w) => !w), [m]),
2366
2372
  modal: l,
2367
2373
  children: n
2368
2374
  }
2369
2375
  );
2370
2376
  };
2371
- Ln.displayName = Rt;
2377
+ Ln.displayName = nt;
2372
2378
  var En = "DialogTrigger", li = B.forwardRef(
2373
2379
  (t, e) => {
2374
- const { __scopeDialog: n, ...o } = t, r = se(En, n), a = Tt(e, r.triggerRef);
2380
+ const { __scopeDialog: n, ...o } = t, r = se(En, n), a = St(e, r.triggerRef);
2375
2381
  return /* @__PURE__ */ i(
2376
2382
  Ve.button,
2377
2383
  {
@@ -2392,23 +2398,23 @@ var Lt = "DialogPortal", [di, Nn] = Rn(Lt, {
2392
2398
  forceMount: void 0
2393
2399
  }), On = (t) => {
2394
2400
  const { __scopeDialog: e, forceMount: n, children: o, container: r } = t, a = se(Lt, e);
2395
- return /* @__PURE__ */ i(di, { scope: e, forceMount: n, children: B.Children.map(o, (l) => /* @__PURE__ */ i(St, { present: n || a.open, children: /* @__PURE__ */ i(ao, { asChild: !0, container: r, children: l }) })) });
2401
+ return /* @__PURE__ */ i(di, { scope: e, forceMount: n, children: B.Children.map(o, (l) => /* @__PURE__ */ i(yt, { present: n || a.open, children: /* @__PURE__ */ i(ao, { asChild: !0, container: r, children: l }) })) });
2396
2402
  };
2397
2403
  On.displayName = Lt;
2398
- var Xe = "DialogOverlay", zn = B.forwardRef(
2404
+ var Xe = "DialogOverlay", Dn = B.forwardRef(
2399
2405
  (t, e) => {
2400
2406
  const n = Nn(Xe, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = se(Xe, t.__scopeDialog);
2401
- return a.modal ? /* @__PURE__ */ i(St, { present: o || a.open, children: /* @__PURE__ */ i(ui, { ...r, ref: e }) }) : null;
2407
+ return a.modal ? /* @__PURE__ */ i(yt, { present: o || a.open, children: /* @__PURE__ */ i(pi, { ...r, ref: e }) }) : null;
2402
2408
  }
2403
2409
  );
2404
- zn.displayName = Xe;
2405
- var ui = B.forwardRef(
2410
+ Dn.displayName = Xe;
2411
+ var ui = to("DialogOverlay.RemoveScroll"), pi = B.forwardRef(
2406
2412
  (t, e) => {
2407
2413
  const { __scopeDialog: n, ...o } = t, r = se(Xe, n);
2408
2414
  return (
2409
2415
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
2410
2416
  // ie. when `Overlay` and `Content` are siblings
2411
- /* @__PURE__ */ i(ro, { as: Qr, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
2417
+ /* @__PURE__ */ i(ro, { as: ui, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
2412
2418
  Ve.div,
2413
2419
  {
2414
2420
  "data-state": Nt(r.open),
@@ -2419,16 +2425,16 @@ var ui = B.forwardRef(
2419
2425
  ) })
2420
2426
  );
2421
2427
  }
2422
- ), Le = "DialogContent", Dn = B.forwardRef(
2428
+ ), Ee = "DialogContent", zn = B.forwardRef(
2423
2429
  (t, e) => {
2424
- const n = Nn(Le, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = se(Le, t.__scopeDialog);
2425
- return /* @__PURE__ */ i(St, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(pi, { ...r, ref: e }) : /* @__PURE__ */ i(hi, { ...r, ref: e }) });
2430
+ const n = Nn(Ee, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = se(Ee, t.__scopeDialog);
2431
+ return /* @__PURE__ */ i(yt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(hi, { ...r, ref: e }) : /* @__PURE__ */ i(fi, { ...r, ref: e }) });
2426
2432
  }
2427
2433
  );
2428
- Dn.displayName = Le;
2429
- var pi = B.forwardRef(
2434
+ zn.displayName = Ee;
2435
+ var hi = B.forwardRef(
2430
2436
  (t, e) => {
2431
- const n = se(Le, t.__scopeDialog), o = B.useRef(null), r = Tt(e, n.contentRef, o);
2437
+ const n = se(Ee, t.__scopeDialog), o = B.useRef(null), r = St(e, n.contentRef, o);
2432
2438
  return B.useEffect(() => {
2433
2439
  const a = o.current;
2434
2440
  if (a)
@@ -2455,9 +2461,9 @@ var pi = B.forwardRef(
2455
2461
  }
2456
2462
  );
2457
2463
  }
2458
- ), hi = B.forwardRef(
2464
+ ), fi = B.forwardRef(
2459
2465
  (t, e) => {
2460
- const n = se(Le, t.__scopeDialog), o = B.useRef(!1), r = B.useRef(!1);
2466
+ const n = se(Ee, t.__scopeDialog), o = B.useRef(!1), r = B.useRef(!1);
2461
2467
  return /* @__PURE__ */ i(
2462
2468
  An,
2463
2469
  {
@@ -2480,7 +2486,7 @@ var pi = B.forwardRef(
2480
2486
  }
2481
2487
  ), An = B.forwardRef(
2482
2488
  (t, e) => {
2483
- const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...l } = t, c = se(Le, n), u = B.useRef(null), d = Tt(e, u);
2489
+ const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...l } = t, c = se(Ee, n), u = B.useRef(null), d = St(e, u);
2484
2490
  return oo(), /* @__PURE__ */ W(fe, { children: [
2485
2491
  /* @__PURE__ */ i(
2486
2492
  io,
@@ -2506,8 +2512,8 @@ var pi = B.forwardRef(
2506
2512
  }
2507
2513
  ),
2508
2514
  /* @__PURE__ */ W(fe, { children: [
2509
- /* @__PURE__ */ i(mi, { titleId: c.titleId }),
2510
- /* @__PURE__ */ i(vi, { contentRef: u, descriptionId: c.descriptionId })
2515
+ /* @__PURE__ */ i(gi, { titleId: c.titleId }),
2516
+ /* @__PURE__ */ i(wi, { contentRef: u, descriptionId: c.descriptionId })
2511
2517
  ] })
2512
2518
  ] });
2513
2519
  }
@@ -2518,13 +2524,13 @@ var pi = B.forwardRef(
2518
2524
  }
2519
2525
  );
2520
2526
  Fn.displayName = Et;
2521
- var Wn = "DialogDescription", fi = B.forwardRef(
2527
+ var Wn = "DialogDescription", mi = B.forwardRef(
2522
2528
  (t, e) => {
2523
2529
  const { __scopeDialog: n, ...o } = t, r = se(Wn, n);
2524
2530
  return /* @__PURE__ */ i(Ve.p, { id: r.descriptionId, ...o, ref: e });
2525
2531
  }
2526
2532
  );
2527
- fi.displayName = Wn;
2533
+ mi.displayName = Wn;
2528
2534
  var kn = "DialogClose", Mn = B.forwardRef(
2529
2535
  (t, e) => {
2530
2536
  const { __scopeDialog: n, ...o } = t, r = se(kn, n);
@@ -2543,11 +2549,11 @@ Mn.displayName = kn;
2543
2549
  function Nt(t) {
2544
2550
  return t ? "open" : "closed";
2545
2551
  }
2546
- var Hn = "DialogTitleWarning", [js, $n] = eo(Hn, {
2547
- contentName: Le,
2552
+ var Hn = "DialogTitleWarning", [Xs, $n] = Qr(Hn, {
2553
+ contentName: Ee,
2548
2554
  titleName: Et,
2549
2555
  docsSlug: "dialog"
2550
- }), mi = ({ titleId: t }) => {
2556
+ }), gi = ({ titleId: t }) => {
2551
2557
  const e = $n(Hn), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
2552
2558
 
2553
2559
  If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
@@ -2556,15 +2562,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
2556
2562
  return B.useEffect(() => {
2557
2563
  t && (document.getElementById(t) || console.error(n));
2558
2564
  }, [n, t]), null;
2559
- }, gi = "DialogDescriptionWarning", vi = ({ contentRef: t, descriptionId: e }) => {
2560
- const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${$n(gi).contentName}}.`;
2565
+ }, vi = "DialogDescriptionWarning", wi = ({ contentRef: t, descriptionId: e }) => {
2566
+ const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${$n(vi).contentName}}.`;
2561
2567
  return B.useEffect(() => {
2562
2568
  var a;
2563
2569
  const r = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
2564
2570
  e && r && (document.getElementById(e) || console.warn(o));
2565
2571
  }, [o, t, e]), null;
2566
- }, wi = Ln, _i = On, bi = zn, Ci = Dn, Pi = Fn, Ti = Mn;
2567
- const Ie = {
2572
+ }, _i = Ln, bi = On, Ci = Dn, Pi = zn, Ti = Fn, Si = Mn;
2573
+ const xe = {
2568
2574
  "rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
2569
2575
  "rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
2570
2576
  "rp-document-dialog": "_rp-document-dialog_slqo7_13",
@@ -2572,7 +2578,7 @@ const Ie = {
2572
2578
  "rp-dialog-title": "_rp-dialog-title_slqo7_39",
2573
2579
  "rp-dialog-close": "_rp-dialog-close_slqo7_47",
2574
2580
  "rp-properties-divider": "_rp-properties-divider_slqo7_55"
2575
- }, Si = () => {
2581
+ }, yi = () => {
2576
2582
  const { pdfProperties: t } = ee(), { container: e } = me(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = uo(), { localeMessages: r } = ae(), a = k(() => {
2577
2583
  if (!t)
2578
2584
  return [];
@@ -2582,13 +2588,13 @@ const Ie = {
2582
2588
  title: u,
2583
2589
  author: d,
2584
2590
  subject: m,
2585
- createdOn: v,
2591
+ createdOn: w,
2586
2592
  creator: p,
2587
- keywords: w,
2588
- modifiedOn: P,
2589
- pdfProducer: y,
2590
- pdfVersion: b,
2591
- pageCount: T
2593
+ keywords: _,
2594
+ modifiedOn: b,
2595
+ pdfProducer: S,
2596
+ pdfVersion: C,
2597
+ pageCount: y
2592
2598
  } = t;
2593
2599
  return [
2594
2600
  { label: r == null ? void 0 : r.propertiesFilenameLabel, value: c },
@@ -2597,33 +2603,33 @@ const Ie = {
2597
2603
  { label: r == null ? void 0 : r.propertiesTitleLabel, value: u },
2598
2604
  { label: r == null ? void 0 : r.propertiesAuthorLabel, value: d },
2599
2605
  { label: r == null ? void 0 : r.propertiesSubjectLabel, value: m },
2600
- { label: r == null ? void 0 : r.propertiesKeywordLabel, value: w },
2606
+ { label: r == null ? void 0 : r.propertiesKeywordLabel, value: _ },
2601
2607
  { label: r == null ? void 0 : r.propertiesCreatorLabel, value: p },
2602
2608
  {
2603
2609
  label: r == null ? void 0 : r.propertiesCreateOnLabel,
2604
- value: v ? kt(v) : ""
2610
+ value: w ? kt(w) : ""
2605
2611
  },
2606
2612
  {
2607
2613
  label: r == null ? void 0 : r.propertiesModifiedOnLabel,
2608
- value: P ? kt(P) : ""
2614
+ value: b ? kt(b) : ""
2609
2615
  },
2610
2616
  { separate: !0 },
2611
- { label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: y },
2612
- { label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: b },
2613
- { label: r == null ? void 0 : r.propertiesPageCountLabel, value: T }
2617
+ { label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: S },
2618
+ { label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: C },
2619
+ { label: r == null ? void 0 : r.propertiesPageCountLabel, value: y }
2614
2620
  ];
2615
2621
  }, [t, r]);
2616
- return /* @__PURE__ */ i(wi, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(_i, { container: e, children: /* @__PURE__ */ W("div", { className: Ie["rp-dialog-wrapper"], children: [
2617
- /* @__PURE__ */ i(bi, { className: Ie["rp-dialog-overlay"] }),
2618
- /* @__PURE__ */ W(Ci, { className: Ie["rp-document-dialog"], children: [
2619
- /* @__PURE__ */ i(Pi, { className: Ie["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
2620
- /* @__PURE__ */ i("div", { className: Ie["rp-document-properties"], children: a.map((l, c) => /* @__PURE__ */ i("div", { children: l.separate ? /* @__PURE__ */ i("div", { className: Ie["rp-properties-divider"] }) : /* @__PURE__ */ i(lo, { label: l.label, value: l.value }) }, c)) }),
2621
- /* @__PURE__ */ i(Ti, { asChild: !0, className: Ie["rp-dialog-close"], children: /* @__PURE__ */ i(co, {}) })
2622
+ return /* @__PURE__ */ i(_i, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(bi, { container: e, children: /* @__PURE__ */ W("div", { className: xe["rp-dialog-wrapper"], children: [
2623
+ /* @__PURE__ */ i(Ci, { className: xe["rp-dialog-overlay"] }),
2624
+ /* @__PURE__ */ W(Pi, { className: xe["rp-document-dialog"], children: [
2625
+ /* @__PURE__ */ i(Ti, { className: xe["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
2626
+ /* @__PURE__ */ i("div", { className: xe["rp-document-properties"], children: a.map((l, c) => /* @__PURE__ */ i("div", { children: l.separate ? /* @__PURE__ */ i("div", { className: xe["rp-properties-divider"] }) : /* @__PURE__ */ i(lo, { label: l.label, value: l.value }) }, c)) }),
2627
+ /* @__PURE__ */ i(Si, { asChild: !0, className: xe["rp-dialog-close"], children: /* @__PURE__ */ i(co, {}) })
2622
2628
  ] })
2623
2629
  ] }) }) });
2624
- }, yi = {
2630
+ }, Ii = {
2625
2631
  "rp-other-tool-content": "_rp-other-tool-content_su718_1"
2626
- }, nn = ".pdf", xi = (t) => URL.createObjectURL(t), Ii = async (t) => {
2632
+ }, nn = ".pdf", xi = (t) => URL.createObjectURL(t), Ri = async (t) => {
2627
2633
  const n = await (await fetch(t)).blob();
2628
2634
  return xi(n);
2629
2635
  }, Gn = () => {
@@ -2635,26 +2641,26 @@ const Ie = {
2635
2641
  if (!t || !e)
2636
2642
  throw new Error("There is no PDF source to download");
2637
2643
  const a = document.createElement("a");
2638
- a.href = await Ii(e), a.download = o(t), document.body.appendChild(a), a.click(), document.body.removeChild(a);
2644
+ a.href = await Ri(e), a.download = o(t), document.body.appendChild(a), a.click(), document.body.removeChild(a);
2639
2645
  }, [t, e]) };
2640
2646
  }, Un = () => {
2641
2647
  const { downloadIcon: t } = ue();
2642
2648
  return t || /* @__PURE__ */ i(vo, {});
2643
- }, Vn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Ri = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Vn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Un, {}) }) }), Li = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Ce, { onClick: t, children: /* @__PURE__ */ W(Vn, { className: "rp-menu-item", localeMessages: e, children: [
2649
+ }, Vn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Li = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Vn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Un, {}) }) }), Ei = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Ce, { onClick: t, children: /* @__PURE__ */ W(Vn, { className: "rp-menu-item", localeMessages: e, children: [
2644
2650
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Un, {}) }),
2645
2651
  e == null ? void 0 : e.downloadFileLabel
2646
2652
  ] }) }), qn = () => {
2647
2653
  const { download: t } = Gn(), { downloadTool: e = !0 } = ge(), { isSmallScreen: n } = Pe(), { localeMessages: o } = ae();
2648
- return e ? n ? /* @__PURE__ */ i(Li, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(Ri, { download: t, localeMessages: o }) : null : null;
2654
+ return e ? n ? /* @__PURE__ */ i(Ei, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(Li, { download: t, localeMessages: o }) : null : null;
2649
2655
  }, Bn = () => {
2650
2656
  const { printIcon: t } = ue();
2651
2657
  return t || /* @__PURE__ */ i(wo, {});
2652
- }, Zn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Ei = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Zn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(Bn, {}) }) }), Ni = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Ce, { onClick: t, children: /* @__PURE__ */ W(Zn, { className: "rp-menu-item", localeMessages: e, children: [
2658
+ }, Zn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Ni = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Zn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(Bn, {}) }) }), Oi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Ce, { onClick: t, children: /* @__PURE__ */ W(Zn, { className: "rp-menu-item", localeMessages: e, children: [
2653
2659
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Bn, {}) }),
2654
2660
  e == null ? void 0 : e.printLabel
2655
2661
  ] }) }), jn = () => {
2656
2662
  const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = tt(), { printTool: l = !0 } = ge(), { isSmallScreen: c } = Pe(), { localeMessages: u } = ae();
2657
- return l ? c ? /* @__PURE__ */ i(Ni, { print: t, localeMessages: u }) : typeof l == "function" ? /* @__PURE__ */ i(
2663
+ return l ? c ? /* @__PURE__ */ i(Oi, { print: t, localeMessages: u }) : typeof l == "function" ? /* @__PURE__ */ i(
2658
2664
  l,
2659
2665
  {
2660
2666
  print: t,
@@ -2664,16 +2670,16 @@ const Ie = {
2664
2670
  setOnComplete: o,
2665
2671
  progress: a
2666
2672
  }
2667
- ) : l ? /* @__PURE__ */ i(Ei, { print: t, localeMessages: u }) : null : null;
2668
- }, Oi = {
2673
+ ) : l ? /* @__PURE__ */ i(Ni, { print: t, localeMessages: u }) : null : null;
2674
+ }, Di = {
2669
2675
  "rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
2670
2676
  }, zi = () => {
2671
2677
  const { goToFirstPageIcon: t } = ue();
2672
- return t || /* @__PURE__ */ i(vn, { className: Oi["rp-go-to-Top"] });
2673
- }, Di = () => {
2678
+ return t || /* @__PURE__ */ i(vn, { className: Di["rp-go-to-Top"] });
2679
+ }, Ai = () => {
2674
2680
  const { goToLastPageIcon: t } = ue();
2675
2681
  return t || /* @__PURE__ */ i(vn, {});
2676
- }, rn = { width: "100%" }, Ai = () => {
2682
+ }, rn = { width: "100%" }, Fi = () => {
2677
2683
  const { goToPage: t, totalPages: e, focusedPage: n } = ie(), { jumpNavigationTool: o = !0 } = ge(), { localeMessages: r } = ae(), a = k(() => n === 1, [n]), l = k(() => n === e, [n, e]), c = N(() => {
2678
2684
  t(1);
2679
2685
  }, [t]), u = N(() => {
@@ -2685,65 +2691,66 @@ const Ie = {
2685
2691
  /* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
2686
2692
  ] }) }) }),
2687
2693
  /* @__PURE__ */ i(Ce, { onClick: u, children: /* @__PURE__ */ i(K, { content: r == null ? void 0 : r.lastPageTooltip, style: rn, children: /* @__PURE__ */ W("div", { className: "rp-menu-item", "aria-disabled": l, children: [
2688
- /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Di, {}) }),
2694
+ /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Ai, {}) }),
2689
2695
  /* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
2690
2696
  ] }) }) }),
2691
- /* @__PURE__ */ i(yt, {})
2697
+ /* @__PURE__ */ i(It, {})
2692
2698
  ] }) : null;
2693
- }, Fi = () => {
2694
- const { container: t, pagesRef: e } = me(), { isSmallScreen: n } = Pe(), {
2695
- openFileTool: o,
2696
- downloadTool: r,
2697
- documentProperties: a,
2698
- scrollModeTool: l,
2699
- rotateTool: c,
2700
- selectionModeTool: u,
2701
- jumpNavigationTool: d,
2702
- printTool: m,
2703
- fullscreenTool: v
2704
- } = ge(), { localeMessages: p } = ae(), [w, P] = $(0), y = H(
2705
- new ResizeObserver((T) => {
2706
- P(T[0].contentRect.height);
2699
+ }, Wi = () => {
2700
+ const [t, e] = $(!1), { container: n, pagesRef: o } = me(), { isSmallScreen: r } = Pe(), {
2701
+ openFileTool: a,
2702
+ downloadTool: l,
2703
+ documentProperties: c,
2704
+ scrollModeTool: u,
2705
+ rotateTool: d,
2706
+ selectionModeTool: m,
2707
+ jumpNavigationTool: w,
2708
+ printTool: p,
2709
+ fullscreenTool: _
2710
+ } = ge(), { localeMessages: b } = ae(), [S, C] = $(0), y = H(
2711
+ new ResizeObserver((h) => {
2712
+ C(h[0].contentRect.height);
2707
2713
  })
2708
- ), b = k(() => {
2709
- const T = d || c || u || l || a;
2710
- let h = !1;
2711
- return n && (h = !(!o && !r && !m && !v)), T || h;
2714
+ ), f = k(() => {
2715
+ const h = w || d || m || u || c;
2716
+ let g = !1;
2717
+ return r && (g = !(!a && !l && !p && !_)), h || g;
2712
2718
  }, [
2713
- o,
2714
- r,
2715
2719
  a,
2716
2720
  l,
2717
2721
  c,
2718
2722
  u,
2719
2723
  d,
2720
- n
2724
+ m,
2725
+ w,
2726
+ r
2721
2727
  ]);
2722
- return F(() => (e && y.current.observe(e), () => {
2728
+ return F(() => (o && y.current.observe(o), () => {
2723
2729
  y.current.disconnect();
2724
- }), [e]), b ? /* @__PURE__ */ W(po, { children: [
2730
+ }), [o]), f ? /* @__PURE__ */ W(po, { children: [
2725
2731
  /* @__PURE__ */ i(
2726
2732
  mn,
2727
2733
  {
2728
- container: t,
2729
- triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.moreOptionTooltip, children: /* @__PURE__ */ i(re, { "aria-label": p == null ? void 0 : p.moreOptionTooltip, children: /* @__PURE__ */ i(Yr, {}) }) }) }),
2734
+ container: n,
2735
+ onOpenChange: e,
2736
+ triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: b == null ? void 0 : b.moreOptionTooltip, children: /* @__PURE__ */ i(re, { active: t, "aria-label": b == null ? void 0 : b.moreOptionTooltip, children: /* @__PURE__ */ i(Yr, {}) }) }) }),
2730
2737
  side: "bottom",
2731
2738
  avoidCollisions: !1,
2732
2739
  children: /* @__PURE__ */ W(
2733
2740
  "div",
2734
2741
  {
2735
- style: { maxHeight: `${w}px`, overflow: "auto" },
2736
- className: yi["rp-other-tool-content"],
2742
+ style: { maxHeight: `${S}px`, overflow: "auto" },
2743
+ className: Ii["rp-other-tool-content"],
2737
2744
  "data-rp": "moreOptionsDropdown",
2738
2745
  children: [
2739
- n && /* @__PURE__ */ W(Ke, { children: [
2746
+ r && /* @__PURE__ */ W(Ke, { children: [
2740
2747
  /* @__PURE__ */ i(fn, {}),
2741
2748
  /* @__PURE__ */ i(qn, {}),
2742
2749
  /* @__PURE__ */ i(jn, {}),
2743
2750
  /* @__PURE__ */ i(gn, {}),
2744
- /* @__PURE__ */ i(yt, {})
2751
+ /* @__PURE__ */ i(It, {})
2745
2752
  ] }),
2746
- /* @__PURE__ */ i(Ai, {}),
2753
+ /* @__PURE__ */ i(Fi, {}),
2747
2754
  /* @__PURE__ */ i(fo, {}),
2748
2755
  /* @__PURE__ */ i(_o, {}),
2749
2756
  /* @__PURE__ */ i(mo, {}),
@@ -2754,9 +2761,9 @@ const Ie = {
2754
2761
  )
2755
2762
  }
2756
2763
  ),
2757
- /* @__PURE__ */ i(Si, {})
2764
+ /* @__PURE__ */ i(yi, {})
2758
2765
  ] }) : null;
2759
- }, Wi = () => {
2766
+ }, ki = () => {
2760
2767
  const { isSmallScreen: t } = Pe();
2761
2768
  return /* @__PURE__ */ W(fe, { children: [
2762
2769
  /* @__PURE__ */ i(Xr, {}),
@@ -2766,82 +2773,88 @@ const Ie = {
2766
2773
  /* @__PURE__ */ i(jn, {}),
2767
2774
  /* @__PURE__ */ i(gn, {})
2768
2775
  ] }),
2769
- /* @__PURE__ */ i(Fi, {})
2776
+ /* @__PURE__ */ i(Wi, {})
2770
2777
  ] });
2771
- }, ze = {
2772
- "rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
2773
- "rp-current-zoom-wrapper": "_rp-current-zoom-wrapper_cocqs_6",
2774
- "rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
2775
- "rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
2776
- "rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
2777
- }, ki = 25, mt = 1e3, Mi = [50, 75, 100, 125, 150, 200, 300, 400], Hi = () => {
2778
+ }, Mi = "_active_1fv1b_11", Re = {
2779
+ "rp-zoom-wrapper": "_rp-zoom-wrapper_1fv1b_1",
2780
+ "rp-current-zoom-wrapper": "_rp-current-zoom-wrapper_1fv1b_6",
2781
+ active: Mi,
2782
+ "rp-current-zoom-icon": "_rp-current-zoom-icon_1fv1b_15",
2783
+ "rp-current-zoom-text": "_rp-current-zoom-text_1fv1b_20",
2784
+ "rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_1fv1b_24"
2785
+ }, Hi = 25, gt = 1e3, $i = [50, 75, 100, 125, 150, 200, 300, 400], Gi = () => {
2778
2786
  const { zoomInIcon: t } = ue();
2779
2787
  return t || /* @__PURE__ */ i(bo, {});
2780
- }, $i = () => {
2788
+ }, Ui = () => {
2781
2789
  const { zoomOutIcon: t } = ue();
2782
2790
  return t || /* @__PURE__ */ i(Co, {});
2783
- }, Gi = () => {
2784
- const { zoomLevel: t, setZoomLevel: e } = Qe(), { container: n, pagesRef: o } = me(), { zoomTool: r = !0 } = ge(), { focusedPage: a } = ie(), { pageRotate: l } = Ue(), { pages: c } = ee(), { isSmallScreen: u } = Pe(), { localeMessages: d } = ae(), { viewMode: m } = Ne(), [v, p] = $(0), w = H(
2785
- new ResizeObserver((s) => {
2786
- p(s[0].contentRect.height);
2791
+ }, Vi = () => {
2792
+ const { zoomLevel: t, setZoomLevel: e } = Qe(), { container: n, pagesRef: o } = me(), { zoomTool: r = !0 } = ge(), { focusedPage: a } = ie(), { pageRotate: l } = Ue(), { pages: c } = ee(), { isSmallScreen: u } = Pe(), { localeMessages: d } = ae(), { viewMode: m } = Oe(), [w, p] = $(0), [_, b] = $(!1), S = H(
2793
+ new ResizeObserver((v) => {
2794
+ p(v[0].contentRect.height);
2787
2795
  })
2788
- ), P = N(() => {
2789
- e((s) => {
2790
- const C = Math.floor(s / 25) * 25;
2791
- return Math.min(C + 25, mt);
2796
+ ), C = N(() => {
2797
+ e((v) => {
2798
+ const T = Math.floor(v / 25) * 25;
2799
+ return Math.min(T + 25, gt);
2792
2800
  });
2793
2801
  }, [e]), y = N(() => {
2794
- e((s) => {
2795
- const C = Math.ceil(s / 25) * 25;
2796
- return Math.min(C - 25, mt);
2802
+ e((v) => {
2803
+ const T = Math.ceil(v / 25) * 25;
2804
+ return Math.min(T - 25, gt);
2797
2805
  });
2798
- }, [e]), b = k(() => t === ki, [t]), T = k(() => t === mt, [t]), h = k(() => {
2799
- const s = c.get(a);
2800
- return s ? s.page.getViewport({ scale: 1, rotation: l[a] }) : null;
2801
- }, [c, a, l]), f = N(
2802
- (s) => {
2803
- const C = ((h == null ? void 0 : h.width) || 0) + 2 * Mt, _ = ((h == null ? void 0 : h.height) || 0) + 2 * Mt, S = (o == null ? void 0 : o.clientWidth) || 0, E = (o == null ? void 0 : o.clientHeight) || 0, x = Po(
2804
- s,
2805
- S,
2806
+ }, [e]), f = k(() => t === Hi, [t]), h = k(() => t === gt, [t]), g = k(() => {
2807
+ const v = c.get(a);
2808
+ return v ? v.page.getViewport({ scale: 1, rotation: l[a] }) : null;
2809
+ }, [c, a, l]), s = N(
2810
+ (v) => {
2811
+ const T = ((g == null ? void 0 : g.width) || 0) + 2 * Mt, E = ((g == null ? void 0 : g.height) || 0) + 2 * Mt, I = (o == null ? void 0 : o.clientWidth) || 0, R = (o == null ? void 0 : o.clientHeight) || 0, O = Po(
2812
+ v,
2813
+ I,
2814
+ R,
2815
+ T,
2806
2816
  E,
2807
- C,
2808
- _,
2809
2817
  m
2810
2818
  );
2811
- e(x);
2819
+ e(O);
2812
2820
  },
2813
- [e, h, o]
2814
- ), g = N(
2815
- (s) => {
2816
- typeof s == "number" ? e(s) : f(s);
2821
+ [e, g, o]
2822
+ ), P = N(
2823
+ (v) => {
2824
+ typeof v == "number" ? e(v) : s(v);
2817
2825
  },
2818
- [e, f]
2826
+ [e, s]
2819
2827
  );
2820
- return F(() => (o && w.current.observe(o), () => {
2821
- w.current.disconnect();
2822
- }), [o]), typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: t, setZoomLevel: e }) : r ? /* @__PURE__ */ W("div", { className: ze["rp-zoom-wrapper"], children: [
2828
+ return F(() => (o && S.current.observe(o), () => {
2829
+ S.current.disconnect();
2830
+ }), [o]), typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: t, setZoomLevel: e }) : r ? /* @__PURE__ */ W("div", { className: Re["rp-zoom-wrapper"], children: [
2823
2831
  /* @__PURE__ */ i(K, { content: d == null ? void 0 : d.zoomOutTooltip, children: /* @__PURE__ */ i(
2824
2832
  re,
2825
2833
  {
2826
- disabled: b,
2834
+ disabled: f,
2827
2835
  onClick: y,
2828
2836
  "aria-label": d == null ? void 0 : d.zoomOutTooltip,
2829
- children: /* @__PURE__ */ i($i, {})
2837
+ children: /* @__PURE__ */ i(Ui, {})
2830
2838
  }
2831
2839
  ) }),
2832
2840
  !u && /* @__PURE__ */ i(
2833
2841
  mn,
2834
2842
  {
2835
2843
  container: n,
2844
+ open: _,
2845
+ onOpenChange: b,
2836
2846
  triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: d == null ? void 0 : d.zoomSelectTooltip, children: /* @__PURE__ */ W(
2837
2847
  re,
2838
2848
  {
2839
- className: ze["rp-current-zoom-wrapper"],
2849
+ className: ne(
2850
+ Re["rp-current-zoom-wrapper"],
2851
+ _ && Re.active
2852
+ ),
2840
2853
  "aria-label": d == null ? void 0 : d.zoomSelectTooltip,
2841
2854
  children: [
2842
- /* @__PURE__ */ i("span", { className: ze["rp-current-zoom-text"], children: t }),
2843
- /* @__PURE__ */ i("span", { className: ze["rp-current-zoom-text"], children: "%" }),
2844
- /* @__PURE__ */ i(He, { className: ze["rp-current-zoom-icon"] })
2855
+ /* @__PURE__ */ i("span", { className: Re["rp-current-zoom-text"], children: t }),
2856
+ /* @__PURE__ */ i("span", { className: Re["rp-current-zoom-text"], children: "%" }),
2857
+ /* @__PURE__ */ i(He, { className: Re["rp-current-zoom-icon"] })
2845
2858
  ]
2846
2859
  }
2847
2860
  ) }) }),
@@ -2852,19 +2865,19 @@ const Ie = {
2852
2865
  children: /* @__PURE__ */ W(
2853
2866
  "div",
2854
2867
  {
2855
- style: { maxHeight: `${v}px`, overflow: "auto" },
2856
- className: ze["rp-zoom-dropdown-content"],
2868
+ style: { maxHeight: `${w}px`, overflow: "auto" },
2869
+ className: Re["rp-zoom-dropdown-content"],
2857
2870
  children: [
2858
2871
  /* @__PURE__ */ W(Ke, { children: [
2859
- /* @__PURE__ */ i(Ce, { onClick: () => g(at.ACTUAL), children: d == null ? void 0 : d.zoomActualSize }),
2860
- /* @__PURE__ */ i(Ce, { onClick: () => g(at.PAGE_FIT), children: d == null ? void 0 : d.zoomPageFit }),
2861
- /* @__PURE__ */ i(Ce, { onClick: () => g(at.PAGE_WIDTH), children: d == null ? void 0 : d.zoomPageWidth })
2872
+ /* @__PURE__ */ i(Ce, { onClick: () => P(st.ACTUAL), children: d == null ? void 0 : d.zoomActualSize }),
2873
+ /* @__PURE__ */ i(Ce, { onClick: () => P(st.PAGE_FIT), children: d == null ? void 0 : d.zoomPageFit }),
2874
+ /* @__PURE__ */ i(Ce, { onClick: () => P(st.PAGE_WIDTH), children: d == null ? void 0 : d.zoomPageWidth })
2862
2875
  ] }),
2863
- /* @__PURE__ */ i(yt, {}),
2864
- /* @__PURE__ */ i(Ke, { children: Mi.map((s) => /* @__PURE__ */ W(Ce, { onClick: () => g(s), children: [
2865
- s,
2876
+ /* @__PURE__ */ i(It, {}),
2877
+ /* @__PURE__ */ i(Ke, { children: $i.map((v) => /* @__PURE__ */ W(Ce, { onClick: () => P(v), children: [
2878
+ v,
2866
2879
  " %"
2867
- ] }, s)) })
2880
+ ] }, v)) })
2868
2881
  ]
2869
2882
  }
2870
2883
  )
@@ -2873,10 +2886,10 @@ const Ie = {
2873
2886
  /* @__PURE__ */ i(K, { content: d == null ? void 0 : d.zoomInTooltip, children: /* @__PURE__ */ i(
2874
2887
  re,
2875
2888
  {
2876
- disabled: T,
2877
- onClick: P,
2889
+ disabled: h,
2890
+ onClick: C,
2878
2891
  "aria-label": d == null ? void 0 : d.zoomInTooltip,
2879
- children: /* @__PURE__ */ i(Hi, {})
2892
+ children: /* @__PURE__ */ i(Gi, {})
2880
2893
  }
2881
2894
  ) })
2882
2895
  ] }) : null;
@@ -2906,135 +2919,143 @@ const Ie = {
2906
2919
  }, an = () => {
2907
2920
  const { searchIcon: t } = ue();
2908
2921
  return t || /* @__PURE__ */ i(To, {});
2909
- }, Ui = () => {
2922
+ }, qi = () => {
2910
2923
  const { container: t } = me(), [e, n] = $(!1), { pdf: o } = ee(), [r, a] = $(null), {
2911
2924
  searchOptions: l,
2912
2925
  setSearchOptions: c,
2913
2926
  loading: u,
2914
2927
  setSearch: d,
2915
2928
  totalMatches: m,
2916
- currentMatchPosition: v,
2929
+ currentMatchPosition: w,
2917
2930
  nextMatch: p,
2918
- prevMatch: w,
2919
- search: P
2920
- } = xt(), { searchTool: y = !0 } = ge(), [b, T] = $(P), { localeMessages: h } = ae(), { isSmallScreen: f } = Pe(), g = N(() => {
2931
+ prevMatch: _,
2932
+ search: b
2933
+ } = xt(), { searchTool: S = !0 } = ge(), [C, y] = $(b), { localeMessages: f } = ae(), { isSmallScreen: h } = Pe(), g = N(() => {
2921
2934
  n(!0);
2922
2935
  }, []), s = N(() => {
2923
- d(""), T(""), n(!1);
2924
- }, [d]), C = (I) => {
2925
- const O = I.key === "Enter", M = I.key === " ";
2926
- (O || M) && s();
2927
- }, _ = N(
2928
- (I) => {
2929
- I.key === "Escape" && e && s();
2936
+ d(""), y(""), n(!1);
2937
+ }, [d]), P = (x) => {
2938
+ const D = x.key === "Enter", M = x.key === " ";
2939
+ (D || M) && s();
2940
+ }, v = N(
2941
+ (x) => {
2942
+ x.key === "Escape" && e && s();
2930
2943
  },
2931
2944
  [e]
2932
- ), S = N(
2933
- (I) => {
2934
- I.shiftKey && I.key === "Enter" ? w() : I.key === "Enter" && P !== b ? d(b) : I.key === "Enter" && p();
2945
+ ), T = N(
2946
+ (x) => {
2947
+ x.shiftKey && x.key === "Enter" ? _() : x.key === "Enter" && b !== C ? d(C) : x.key === "Enter" && p();
2935
2948
  },
2936
- [b, w, p, d, P]
2949
+ [C, _, p, d, b]
2937
2950
  );
2938
- F(() => (window.addEventListener("keydown", _), () => {
2939
- window.removeEventListener("keydown", _);
2940
- }), [_]), F(() => {
2951
+ F(() => (window.addEventListener("keydown", v), () => {
2952
+ window.removeEventListener("keydown", v);
2953
+ }), [v]), F(() => {
2941
2954
  r && r.focus();
2942
2955
  }, [r]);
2943
- const E = N((I) => {
2944
- T(I.target.value);
2945
- }, []), x = N(() => {
2946
- T(""), d("");
2947
- }, [d]), R = k(() => `${v} / ${m}`, [v, m]), { wholeWords: z, matchCase: D } = k(() => l, [l]), A = N(
2948
- (I) => {
2949
- c((O) => ({ ...O, matchCase: I }));
2956
+ const E = N((x) => {
2957
+ y(x.target.value);
2958
+ }, []), I = N(() => {
2959
+ y(""), d("");
2960
+ }, [d]), R = k(() => `${w} / ${m}`, [w, m]), { wholeWords: O, matchCase: z } = k(() => l, [l]), A = N(
2961
+ (x) => {
2962
+ c((D) => ({ ...D, matchCase: x }));
2950
2963
  },
2951
2964
  [c]
2952
2965
  ), L = N(
2953
- (I) => {
2954
- c((O) => ({ ...O, wholeWords: I }));
2966
+ (x) => {
2967
+ c((D) => ({ ...D, wholeWords: x }));
2955
2968
  },
2956
2969
  [c]
2957
2970
  );
2958
2971
  return F(() => {
2959
2972
  s();
2960
- }, [o, s]), y ? /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(
2973
+ }, [o, s]), S ? /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(
2961
2974
  $r,
2962
2975
  {
2963
2976
  open: e,
2964
2977
  container: t,
2965
- triggerComponent: /* @__PURE__ */ i(K, { content: h == null ? void 0 : h.searchButtonTooltip, children: /* @__PURE__ */ i(re, { onClick: g, "aria-label": h == null ? void 0 : h.searchButtonTooltip, children: /* @__PURE__ */ i(an, {}) }) }),
2978
+ triggerComponent: /* @__PURE__ */ i(K, { content: f == null ? void 0 : f.searchButtonTooltip, children: /* @__PURE__ */ i(
2979
+ re,
2980
+ {
2981
+ onClick: g,
2982
+ active: e,
2983
+ "aria-label": f == null ? void 0 : f.searchButtonTooltip,
2984
+ children: /* @__PURE__ */ i(an, {})
2985
+ }
2986
+ ) }),
2966
2987
  children: /* @__PURE__ */ W("div", { className: J["rp-search-tool-content"], children: [
2967
2988
  /* @__PURE__ */ W("div", { className: J["rp-search-tool-input-wrapper"], children: [
2968
2989
  /* @__PURE__ */ W("div", { className: J["rp-search-tool-input"], children: [
2969
- /* @__PURE__ */ i(K, { content: h == null ? void 0 : h.searchInputTooltip, children: /* @__PURE__ */ i(
2990
+ /* @__PURE__ */ i(K, { content: f == null ? void 0 : f.searchInputTooltip, children: /* @__PURE__ */ i(
2970
2991
  dn,
2971
2992
  {
2972
- value: b,
2973
- onKeyDown: S,
2993
+ value: C,
2994
+ onKeyDown: T,
2974
2995
  onChange: E,
2975
2996
  icon: /* @__PURE__ */ i(an, {}),
2976
- placeholder: h == null ? void 0 : h.searchInputPlaceholder,
2997
+ placeholder: f == null ? void 0 : f.searchInputPlaceholder,
2977
2998
  className: J["rp-search-input"],
2978
2999
  ref: a,
2979
- children: !!b && /* @__PURE__ */ i("span", { className: J["rp-search-tool-input-clear"], onClick: x, children: /* @__PURE__ */ i(So, {}) })
3000
+ children: !!C && /* @__PURE__ */ i("span", { className: J["rp-search-tool-input-clear"], onClick: I, children: /* @__PURE__ */ i(So, {}) })
2980
3001
  }
2981
3002
  ) }),
2982
- u ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Ct, { className: J["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: R }),
2983
- f && /* @__PURE__ */ i("div", { className: J["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ht, { onKeyPress: C, handleClose: s }) })
3003
+ u ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Pt, { className: J["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: R }),
3004
+ h && /* @__PURE__ */ i("div", { className: J["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ht, { onKeyPress: P, handleClose: s }) })
2984
3005
  ] }),
2985
3006
  /* @__PURE__ */ W("div", { className: J["rp-search-tool-input-checkboxes"], children: [
2986
- f && /* @__PURE__ */ i(on, {}),
2987
- /* @__PURE__ */ i($t, { name: "matchCase", value: D, onChange: A, children: h == null ? void 0 : h.searchMatchCaseLabel }),
2988
- !f && /* @__PURE__ */ i(K, { content: h == null ? void 0 : h.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: J["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) }),
2989
- /* @__PURE__ */ i($t, { name: "wholeWord", value: z, onChange: L, children: h == null ? void 0 : h.searchWholeWordsLabel }),
2990
- !f && /* @__PURE__ */ i(K, { content: h == null ? void 0 : h.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: J["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) })
3007
+ h && /* @__PURE__ */ i(on, {}),
3008
+ /* @__PURE__ */ i($t, { name: "matchCase", value: z, onChange: A, children: f == null ? void 0 : f.searchMatchCaseLabel }),
3009
+ !h && /* @__PURE__ */ i(K, { content: f == null ? void 0 : f.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: J["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) }),
3010
+ /* @__PURE__ */ i($t, { name: "wholeWord", value: O, onChange: L, children: f == null ? void 0 : f.searchWholeWordsLabel }),
3011
+ !h && /* @__PURE__ */ i(K, { content: f == null ? void 0 : f.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: J["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) })
2991
3012
  ] })
2992
3013
  ] }),
2993
- !f && /* @__PURE__ */ W("div", { className: J["rp-search-tool-controls"], children: [
3014
+ !h && /* @__PURE__ */ W("div", { className: J["rp-search-tool-controls"], children: [
2994
3015
  /* @__PURE__ */ i(on, {}),
2995
- /* @__PURE__ */ i(Ht, { onKeyPress: C, handleClose: s })
3016
+ /* @__PURE__ */ i(Ht, { onKeyPress: P, handleClose: s })
2996
3017
  ] })
2997
3018
  ] })
2998
3019
  }
2999
3020
  ) }) : null;
3000
- }, Vi = "_loading_wazy2_1", De = {
3021
+ }, Bi = "_loading_wazy2_1", ze = {
3001
3022
  "rp-loading-overlay": "_rp-loading-overlay_wazy2_1",
3002
3023
  "rp-loading-modal": "_rp-loading-modal_wazy2_14",
3003
3024
  "rp-loading-title": "_rp-loading-title_wazy2_27",
3004
3025
  "rp-loading-progress-bar": "_rp-loading-progress-bar_wazy2_35",
3005
3026
  "rp-loading-progress": "_rp-loading-progress_wazy2_35",
3006
3027
  "rp-loading-cancel-button": "_rp-loading-cancel-button_wazy2_55",
3007
- loading: Vi
3008
- }, qi = ({ percentage: t }) => {
3028
+ loading: Bi
3029
+ }, Zi = ({ percentage: t }) => {
3009
3030
  const { cancel: e } = tt(), { localeMessages: n } = ae();
3010
- return t < 1 ? null : /* @__PURE__ */ i("div", { className: ne(De["rp-loading-overlay"]), children: /* @__PURE__ */ W("div", { className: ne(De["rp-loading-modal"]), children: [
3011
- /* @__PURE__ */ W("div", { className: ne(De["rp-loading-title"]), children: [
3031
+ return t < 1 ? null : /* @__PURE__ */ i("div", { className: ne(ze["rp-loading-overlay"]), children: /* @__PURE__ */ W("div", { className: ne(ze["rp-loading-modal"]), children: [
3032
+ /* @__PURE__ */ W("div", { className: ne(ze["rp-loading-title"]), children: [
3012
3033
  n == null ? void 0 : n.printLoadingMessage,
3013
3034
  "..."
3014
3035
  ] }),
3015
- /* @__PURE__ */ i("div", { className: ne(De["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
3036
+ /* @__PURE__ */ i("div", { className: ne(ze["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
3016
3037
  "div",
3017
3038
  {
3018
- className: ne(De["rp-loading-progress"]),
3039
+ className: ne(ze["rp-loading-progress"]),
3019
3040
  style: { width: `${t}%` }
3020
3041
  }
3021
3042
  ) }),
3022
- /* @__PURE__ */ i("button", { className: ne(De["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
3043
+ /* @__PURE__ */ i("button", { className: ne(ze["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
3023
3044
  ] }) });
3024
- }, Bi = $e((t, e) => {
3045
+ }, ji = $e((t, e) => {
3025
3046
  const { showPrintProgress: n } = ge(), { progress: o } = tt(), { isSmallScreen: r } = Pe(), { percentage: a } = o || {}, l = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
3026
3047
  return /* @__PURE__ */ W("div", { children: [
3027
3048
  /* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: We["rp-toolbar-content"], children: /* @__PURE__ */ W("div", { className: We["rp-toolbar-wrapper"], style: l(), children: [
3028
3049
  /* @__PURE__ */ W("div", { "data-rp": "topBarLeft", className: We["rp-toolbar-start"], children: [
3029
- /* @__PURE__ */ i(Ui, {}),
3050
+ /* @__PURE__ */ i(qi, {}),
3030
3051
  /* @__PURE__ */ i(si, {})
3031
3052
  ] }),
3032
- /* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: We["rp-toolbar-middle"], children: /* @__PURE__ */ i(Gi, {}) }),
3033
- /* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: We["rp-toolbar-end"], children: /* @__PURE__ */ i(Wi, {}) })
3053
+ /* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: We["rp-toolbar-middle"], children: /* @__PURE__ */ i(Vi, {}) }),
3054
+ /* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: We["rp-toolbar-end"], children: /* @__PURE__ */ i(ki, {}) })
3034
3055
  ] }) }),
3035
- n && a ? /* @__PURE__ */ i(qi, { percentage: a }) : null
3056
+ n && a ? /* @__PURE__ */ i(Zi, { percentage: a }) : null
3036
3057
  ] });
3037
- }), gt = {
3058
+ }), vt = {
3038
3059
  "rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1sdl6_1",
3039
3060
  "rp-sidebar-content": "_rp-sidebar-content_1sdl6_1",
3040
3061
  "rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_1sdl6_16",
@@ -3045,7 +3066,7 @@ const Ie = {
3045
3066
  "rp-thumbnail": "_rp-thumbnail_3fenb_1",
3046
3067
  "rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
3047
3068
  "rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
3048
- }, Zi = (t) => {
3069
+ }, Ki = (t) => {
3049
3070
  const { thumbnailSrc: e, pageNumber: n, isFocused: o, viewport: r } = t, { goToPage: a } = ie(), { pageRotate: l } = Ue(), c = k(() => o ? ke["rp-thumbnail-active"] : "", [o]), u = k(() => ({
3050
3071
  width: Math.round(r.width),
3051
3072
  height: Math.round(r.height)
@@ -3082,7 +3103,7 @@ const Ie = {
3082
3103
  width: `${u.width}px`,
3083
3104
  height: `${u.height}px`
3084
3105
  },
3085
- children: /* @__PURE__ */ i(Ct, {})
3106
+ children: /* @__PURE__ */ i(Pt, {})
3086
3107
  }
3087
3108
  )
3088
3109
  }
@@ -3094,37 +3115,37 @@ const Ie = {
3094
3115
  }, sn = {
3095
3116
  "rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
3096
3117
  "rp-thumbnails": "_rp-thumbnails_16vqr_1"
3097
- }, ji = 16, Ki = (t, e) => {
3118
+ }, Xi = 16, Yi = (t, e) => {
3098
3119
  const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
3099
- t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - ji);
3100
- }, Xi = $e((t, e) => {
3120
+ t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - Xi);
3121
+ }, Ji = $e((t, e) => {
3101
3122
  const { show: n } = t, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: l, thumbnailLength: c, addToPage: u } = Pn(), d = H(null), m = H(1);
3102
3123
  cn(e, () => d.current);
3103
- const v = k(() => Object.values(a), [a]), p = N(() => {
3104
- const w = c + 1;
3105
- w <= r && l(w);
3124
+ const w = k(() => Object.values(a), [a]), p = N(() => {
3125
+ const _ = c + 1;
3126
+ _ <= r && l(_);
3106
3127
  }, [l, r, c]);
3107
3128
  return F(() => {
3108
- o > c ? u(o) : n && m.current !== o && (Ki(d.current, o), m.current = o);
3109
- }, [o, c, u, n, v]), gr(d.current, p), /* @__PURE__ */ i("div", { ref: d, className: sn["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: sn["rp-thumbnails"], children: n ? v.map((w, P) => {
3110
- var y, b;
3129
+ o > c ? u(o) : n && m.current !== o && (Yi(d.current, o), m.current = o);
3130
+ }, [o, c, u, n, w]), gr(d.current, p), /* @__PURE__ */ i("div", { ref: d, className: sn["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: sn["rp-thumbnails"], children: n ? w.map((_, b) => {
3131
+ var S, C;
3111
3132
  return /* @__PURE__ */ i(
3112
- Zi,
3133
+ Ki,
3113
3134
  {
3114
- isFocused: o === ((y = w.page) == null ? void 0 : y.pageNumber),
3115
- pageNumber: (b = w.page) == null ? void 0 : b.pageNumber,
3116
- thumbnailSrc: w.thumbnailSrc,
3117
- loading: w.loading,
3118
- viewport: w.viewport,
3119
- defaultRotation: w.defaultRotation
3135
+ isFocused: o === ((S = _.page) == null ? void 0 : S.pageNumber),
3136
+ pageNumber: (C = _.page) == null ? void 0 : C.pageNumber,
3137
+ thumbnailSrc: _.thumbnailSrc,
3138
+ loading: _.loading,
3139
+ viewport: _.viewport,
3140
+ defaultRotation: _.defaultRotation
3120
3141
  },
3121
- P
3142
+ b
3122
3143
  );
3123
3144
  }) : null }) });
3124
- }), Yi = () => {
3145
+ }), Qi = () => {
3125
3146
  const { thumbnailIcon: t } = ue();
3126
3147
  return t || /* @__PURE__ */ i(mr, {});
3127
- }, Ji = () => {
3148
+ }, ea = () => {
3128
3149
  const { active: t, setActive: e } = Pn(), [n, o] = $(200), r = H(null), { thumbnailTool: a, sidebarEnable: l } = ge(), { localeMessages: c } = ae(), u = N(() => {
3129
3150
  e((m) => !m);
3130
3151
  }, []), d = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: u, active: t }) : a ? /* @__PURE__ */ i(K, { content: c == null ? void 0 : c.thumbnailTooltip, children: /* @__PURE__ */ i(
@@ -3133,25 +3154,25 @@ const Ie = {
3133
3154
  onClick: u,
3134
3155
  active: t,
3135
3156
  "aria-label": c == null ? void 0 : c.thumbnailTooltip,
3136
- children: /* @__PURE__ */ i(Yi, {})
3157
+ children: /* @__PURE__ */ i(Qi, {})
3137
3158
  }
3138
3159
  ) }) : null, [a, t, u, c]);
3139
3160
  return /* @__PURE__ */ i(fe, { children: l && /* @__PURE__ */ W(
3140
3161
  "div",
3141
3162
  {
3142
3163
  style: { "--rp-thumbnail-width": `${n}px` },
3143
- className: gt["rp-sidebar-content-wrapper"],
3164
+ className: vt["rp-sidebar-content-wrapper"],
3144
3165
  "data-rp": "sidebar",
3145
3166
  children: [
3146
- /* @__PURE__ */ i("div", { className: gt["rp-sidebar-content"], children: d }),
3167
+ /* @__PURE__ */ i("div", { className: vt["rp-sidebar-content"], children: d }),
3147
3168
  /* @__PURE__ */ W(
3148
3169
  "div",
3149
3170
  {
3150
3171
  "data-rp": "thumbnailSidebar",
3151
3172
  hidden: !t,
3152
- className: gt["rp-thumbnails-wrapper"],
3173
+ className: vt["rp-thumbnails-wrapper"],
3153
3174
  children: [
3154
- /* @__PURE__ */ i(Xi, { show: t, ref: r }),
3175
+ /* @__PURE__ */ i(Ji, { show: t, ref: r }),
3155
3176
  /* @__PURE__ */ i(vr, { onWidthChange: o, thumbnailRef: r })
3156
3177
  ]
3157
3178
  }
@@ -3159,7 +3180,7 @@ const Ie = {
3159
3180
  ]
3160
3181
  }
3161
3182
  ) });
3162
- }, Ks = $e((t, e) => {
3183
+ }, Ys = $e((t, e) => {
3163
3184
  const {
3164
3185
  children: n,
3165
3186
  slots: o,
@@ -3170,21 +3191,21 @@ const Ie = {
3170
3191
  onLoaded: u,
3171
3192
  cleanupOnLoaded: d,
3172
3193
  onLayoutWidthChange: m
3173
- } = t, [v, p] = $(null), { setContainer: w, setContentRef: P } = me(), { loading: y } = ee(), { LoaderImageComponent: b } = hn();
3194
+ } = t, [w, p] = $(null), { setContainer: _, setContentRef: b } = me(), { loading: S } = ee(), { LoaderImageComponent: C } = hn();
3174
3195
  return F(() => (u && u(), () => {
3175
3196
  d && d();
3176
- }), [u, d]), /* @__PURE__ */ i(In, { toolbarRef: v, ref: e, children: /* @__PURE__ */ i(Tr, { mobileWidth: c, onLayoutWidthChange: m, children: /* @__PURE__ */ i(wr, { slots: o, children: /* @__PURE__ */ i(_r, { icons: r, children: /* @__PURE__ */ W(br, { getContainerRef: w, style: a, className: l, children: [
3197
+ }), [u, d]), /* @__PURE__ */ i(xn, { toolbarRef: w, ref: e, children: /* @__PURE__ */ i(Tr, { mobileWidth: c, onLayoutWidthChange: m, children: /* @__PURE__ */ i(wr, { slots: o, children: /* @__PURE__ */ i(_r, { icons: r, children: /* @__PURE__ */ W(br, { getContainerRef: _, style: a, className: l, children: [
3177
3198
  /* @__PURE__ */ W(Cr, { children: [
3178
3199
  /* @__PURE__ */ W("div", { className: be["rp-layout"], children: [
3179
- /* @__PURE__ */ i(Bi, { ref: p }),
3200
+ /* @__PURE__ */ i(ji, { ref: p }),
3180
3201
  /* @__PURE__ */ W("div", { className: be["rp-content"], children: [
3181
- /* @__PURE__ */ i("div", { className: be["rp-sidebar"], children: /* @__PURE__ */ i(Ji, {}) }),
3182
- /* @__PURE__ */ i("div", { ref: P, className: be["rp-pages"], children: n })
3202
+ /* @__PURE__ */ i("div", { className: be["rp-sidebar"], children: /* @__PURE__ */ i(ea, {}) }),
3203
+ /* @__PURE__ */ i("div", { ref: b, className: be["rp-pages"], children: n })
3183
3204
  ] })
3184
3205
  ] }),
3185
3206
  /* @__PURE__ */ i(Pr, {})
3186
3207
  ] }),
3187
- y ? /* @__PURE__ */ i(
3208
+ S ? /* @__PURE__ */ i(
3188
3209
  "div",
3189
3210
  {
3190
3211
  className: be["rp-loader"],
@@ -3207,7 +3228,7 @@ const Ie = {
3207
3228
  height: "100%",
3208
3229
  width: "100%"
3209
3230
  },
3210
- children: b && /* @__PURE__ */ i(b, {})
3231
+ children: C && /* @__PURE__ */ i(C, {})
3211
3232
  }
3212
3233
  )
3213
3234
  }
@@ -3215,49 +3236,49 @@ const Ie = {
3215
3236
  ] }) }) }) }) });
3216
3237
  });
3217
3238
  export {
3218
- Do as A,
3239
+ zo as A,
3219
3240
  on as B,
3220
3241
  Lo as C,
3221
3242
  ti as D,
3222
- Ui as E,
3243
+ qi as E,
3223
3244
  qn as F,
3224
- qi as G,
3225
- Bi as H,
3226
- Zi as I,
3227
- Xi as J,
3228
- Ji as K,
3229
- In as L,
3230
- Ai as M,
3231
- Fi as O,
3232
- Gs as P,
3233
- Bs as R,
3234
- qs as S,
3235
- Vs as T,
3236
- Gi as Z,
3237
- Ks as a,
3245
+ Zi as G,
3246
+ ji as H,
3247
+ Ki as I,
3248
+ Ji as J,
3249
+ ea as K,
3250
+ xn as L,
3251
+ Fi as M,
3252
+ Wi as O,
3253
+ Vs as P,
3254
+ js as R,
3255
+ Zs as S,
3256
+ Bs as T,
3257
+ Vi as Z,
3258
+ Ys as a,
3238
3259
  Gn as b,
3239
3260
  tt as c,
3240
3261
  xt as d,
3241
- Us as e,
3262
+ qs as e,
3242
3263
  wn as f,
3243
3264
  yo as g,
3244
3265
  _n as h,
3245
- xo as i,
3266
+ Io as i,
3246
3267
  bn as j,
3247
- Io as k,
3268
+ xo as k,
3248
3269
  Cn as l,
3249
3270
  Pn as m,
3250
3271
  Ro as n,
3251
3272
  Tn as o,
3252
3273
  No as p,
3253
3274
  Fo as q,
3254
- It as r,
3275
+ Rt as r,
3255
3276
  Jo as s,
3256
3277
  ni as t,
3257
3278
  ie as u,
3258
3279
  ri as v,
3259
3280
  si as w,
3260
- Si as x,
3281
+ yi as x,
3261
3282
  jn as y,
3262
- Wi as z
3283
+ ki as z
3263
3284
  };