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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/{RPDefaultLayout-d6cd2d0c.js → RPDefaultLayout-d16fdf0e.js} +586 -585
  2. package/dist/components/RPController.js +1 -1
  3. package/dist/components/RPPages.js +1 -1
  4. package/dist/components/RPProvider.js +1 -1
  5. package/dist/components/layout/LayoutContainer.js +1 -1
  6. package/dist/components/layout/RPDefaultLayout.js +1 -1
  7. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  8. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  9. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  10. package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
  11. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  12. package/dist/components/layout/toolbar/MostPageTool.js +1 -1
  13. package/dist/components/layout/toolbar/OtherTool.js +1 -1
  14. package/dist/components/layout/toolbar/Paginate.js +1 -1
  15. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  16. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  17. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  18. package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
  19. package/dist/components/layout/toolbar/SearchTool.js +1 -1
  20. package/dist/components/layout/toolbar/ZoomTool.js +1 -1
  21. package/dist/components/page/AnnotationLayer.js +1 -1
  22. package/dist/components/page/CanvasLayer.js +1 -1
  23. package/dist/components/page/DualPage.js +1 -1
  24. package/dist/components/page/RPPage.js +1 -1
  25. package/dist/components/page/SinglePage.js +1 -1
  26. package/dist/components/page/TextHighlightLayer.js +1 -1
  27. package/dist/components/page/TextLayer.js +1 -1
  28. package/dist/components/ui/LoadingIndicator.js +1 -1
  29. package/dist/contexts/PaginationContext.js +1 -1
  30. package/dist/contexts/PrintContext.js +1 -1
  31. package/dist/contexts/SearchContext.js +1 -1
  32. package/dist/contexts/ThumbnailsContext.js +1 -1
  33. package/dist/main.js +1 -1
  34. package/dist/utils/hooks/useFileDownload.js +1 -1
  35. package/dist/utils/hooks/useLicense.js +1 -1
  36. package/dist/utils/hooks/usePaginate.js +1 -1
  37. package/dist/utils/hooks/usePresentPage.js +1 -1
  38. package/dist/utils/hooks/usePrint.js +1 -1
  39. package/dist/utils/hooks/useScrollToPage.js +1 -1
  40. package/dist/utils/hooks/useSearch.js +1 -1
  41. package/dist/utils/hooks/useThumbnail.js +1 -1
  42. package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
  43. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { jsx as i, Fragment as fe, jsxs as F } from "react/jsx-runtime";
2
2
  import * as B from "react";
3
- import { useRef as H, useEffect as k, useCallback as N, useState as $, useMemo as W, createContext as Ye, useContext as Je, forwardRef as $e, useImperativeHandle as cn, createElement as Ue, PureComponent as Jn, Component as Qn, memo as er } from "react";
3
+ import { useRef as H, useEffect as k, useCallback as N, useState as $, createContext as Ye, useContext as Je, useMemo as M, forwardRef as $e, useImperativeHandle as cn, createElement as Ue, PureComponent as Jn, Component as Qn, memo as er } from "react";
4
4
  import { ChevronUpIcon as Me } from "./components/icons/ChevronUpIcon.js";
5
5
  import { UIButton as re } from "./components/ui/Button.js";
6
6
  import { UIInput as ln } from "./components/ui/Input.js";
@@ -94,14 +94,14 @@ import { UICheckbox as $t } from "./components/ui/Checkbox.js";
94
94
  import { ClearIcon as To } from "./components/icons/ClearIcon.js";
95
95
  import { InfoIcon as Gt } from "./components/icons/InfoIcon.js";
96
96
  import './assets/RPDefaultLayout.css';const vn = () => {
97
- const { viewMode: e } = Ae(), { scrollMode: t } = De(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), s = H(), { columnCount: l } = dn(), { widths: u, heights: h } = qe(), m = H(t), v = H(e), p = H(l), { targetScrollPage: w } = un();
97
+ const { viewMode: e } = Ae(), { scrollMode: t } = De(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), c = H(), { columnCount: l } = dn(), { widths: u, heights: p } = qe(), m = H(t), v = H(e), h = H(l), { targetScrollPage: w } = un();
98
98
  k(() => {
99
- n != null && n.scrollToItem && (s.current = n);
99
+ n != null && n.scrollToItem && (c.current = n);
100
100
  }, [n]), k(() => {
101
101
  m.current = t, v.current = e;
102
102
  }, [t, e]);
103
103
  const T = N(
104
- (C, S) => {
104
+ (C, y) => {
105
105
  if (!r)
106
106
  return;
107
107
  const d = Math.ceil(C / 2) * 2 - 1;
@@ -111,7 +111,7 @@ import './assets/RPDefaultLayout.css';const vn = () => {
111
111
  top: 0
112
112
  };
113
113
  return new Promise(
114
- (c) => st(r, g, c)
114
+ (s) => st(r, g, s)
115
115
  );
116
116
  }
117
117
  const f = {
@@ -120,7 +120,7 @@ import './assets/RPDefaultLayout.css';const vn = () => {
120
120
  };
121
121
  return r == null ? void 0 : r.scrollTo({
122
122
  ...f,
123
- behavior: S
123
+ behavior: y
124
124
  });
125
125
  },
126
126
  [r, u, st]
@@ -128,52 +128,52 @@ import './assets/RPDefaultLayout.css';const vn = () => {
128
128
  return k(() => {
129
129
  m.current = t, v.current = e;
130
130
  }, [t, e]), k(() => {
131
- p.current = l;
131
+ h.current = l;
132
132
  }, [l]), { scrollToPage: N(
133
- (C, S = "smooth") => {
133
+ (C, y = "smooth") => {
134
134
  a(C);
135
135
  const d = C - 1;
136
136
  let f = d, g = 0;
137
137
  if (v.current === He.DUAL_PAGE && m.current === ee.PAGE_SCROLLING) {
138
- T(C, S);
138
+ T(C, y);
139
139
  return;
140
140
  }
141
141
  if (m.current === ee.PAGE_SCROLLING) {
142
142
  a(C);
143
143
  return;
144
144
  }
145
- if (!s.current || !o)
145
+ if (!c.current || !o)
146
146
  return;
147
- const c = o;
147
+ const s = o;
148
148
  if (w.current = C, m.current === ee.HORIZONTAL_SCROLLING) {
149
149
  g = d;
150
- const P = {
150
+ const S = {
151
151
  left: Oe(u, g),
152
152
  top: 0
153
153
  };
154
- return c.scrollTo({
155
- ...P,
156
- behavior: S
154
+ return s.scrollTo({
155
+ ...S,
156
+ behavior: y
157
157
  });
158
158
  }
159
159
  if (v.current === He.DUAL_PAGE) {
160
160
  g = d % 2, f = Math.floor(d / 2);
161
- const P = {
161
+ const S = {
162
162
  left: Oe(u, g),
163
- top: Oe(h, f)
163
+ top: Oe(p, f)
164
164
  };
165
- return c.scrollTo({
166
- ...P,
167
- behavior: S
165
+ return s.scrollTo({
166
+ ...S,
167
+ behavior: y
168
168
  });
169
169
  }
170
170
  const b = {
171
171
  left: 0,
172
- top: Oe(h, f)
172
+ top: Oe(p, f)
173
173
  };
174
- return c.scrollTo({
174
+ return s.scrollTo({
175
175
  ...b,
176
- behavior: S
176
+ behavior: y
177
177
  });
178
178
  },
179
179
  [
@@ -182,44 +182,45 @@ import './assets/RPDefaultLayout.css';const vn = () => {
182
182
  T,
183
183
  a,
184
184
  st,
185
- h,
185
+ p,
186
186
  u
187
187
  ]
188
188
  ) };
189
189
  }, Po = (e = 1) => {
190
- const [t, n] = $(e), [o, r] = $(0), { scrollToPage: a } = vn(), s = H(1), { viewMode: l } = Ae(), { scrollMode: u } = De(), { widths: h } = qe(), { pagesRef: m } = ge(), v = Tt(t, 100), p = N(
190
+ const [t, n] = $(e), [o, r] = $(0), { scrollToPage: a } = vn(), c = H(1), { viewMode: l } = Ae(), { scrollMode: u } = De(), { widths: p } = qe(), { pagesRef: m } = ge(), v = Tt(t, 100), h = N(
191
191
  (d) => {
192
192
  if (!/^[0-9]*$/g.test(d.toString()) || !d)
193
- return { success: !1, currentPage: s.current };
193
+ return { success: !1, currentPage: c.current };
194
194
  const g = +d;
195
- return g < 0 || g > o ? { success: !1, currentPage: s.current } : (n(g), s.current = g, { success: !0, currentPage: +d });
195
+ return g < 0 || g > o ? { success: !1, currentPage: c.current } : (n(g), c.current = g, { success: !0, currentPage: +d });
196
196
  },
197
197
  [o]
198
- ), w = N(p, [p]), T = N(
198
+ ), w = N(h, [h]), T = N(
199
199
  (d) => {
200
- const f = p(d);
200
+ const f = h(d);
201
201
  return f.success && a(f.currentPage), f;
202
202
  },
203
- [p, a]
204
- ), y = N(() => {
205
- let d = t - 1;
206
- T(d);
207
- }, [T, t, l, u]), C = W(() => {
208
- if (!m)
203
+ [h, a]
204
+ ), P = N((d) => {
205
+ const f = d % 2 === 1;
206
+ if (!m || f)
209
207
  return !1;
210
- const d = t + 1;
211
- return t % 2 === 1 && l === He.DUAL_PAGE && d <= o ? h[t] + h[d] < m.clientWidth : !1;
212
- }, [t, h, m, o]), S = N(() => {
208
+ const g = f ? p[d] : p[d - 1], s = f ? p[d + 1] : p[d];
209
+ return l === He.DUAL_PAGE && g + s < m.clientWidth;
210
+ }, [l, p, m, o]), C = N(() => {
211
+ let d = t - 1;
212
+ P(d) && (d = t - 2), T(d);
213
+ }, [T, t, l, u, P]), y = N(() => {
213
214
  let d = t + 1;
214
- C && (d = t + 2), T(d);
215
- }, [T, t, C, l, u]);
215
+ P(d) && (d = t + 2), T(d);
216
+ }, [T, t, P, l, u]);
216
217
  return {
217
218
  focusedPage: v,
218
219
  totalPages: o,
219
220
  setFocusedPage: w,
220
221
  setTotalPages: r,
221
- nextPage: S,
222
- prevPage: y,
222
+ nextPage: y,
223
+ prevPage: C,
223
224
  goToPage: T
224
225
  };
225
226
  }, wn = Ye({
@@ -238,7 +239,7 @@ import './assets/RPDefaultLayout.css';const vn = () => {
238
239
  const e = Je(wn);
239
240
  return typeof (e == null ? void 0 : e.focusedPage) > "u" && Zr.error("Please use this hooks inside children component of RPProvider"), e;
240
241
  }, Ms = ({ children: e }) => {
241
- const { pdf: t } = J(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: s, nextPage: l, prevPage: u } = Po();
242
+ const { pdf: t } = J(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: c, nextPage: l, prevPage: u } = Po();
242
243
  return k(() => {
243
244
  t != null && t.numPages && (a(t.numPages), r(1));
244
245
  }, [t, a, r]), /* @__PURE__ */ i(
@@ -251,7 +252,7 @@ import './assets/RPDefaultLayout.css';const vn = () => {
251
252
  setTotalPages: a,
252
253
  nextPage: l,
253
254
  prevPage: u,
254
- goToPage: s
255
+ goToPage: c
255
256
  },
256
257
  children: e
257
258
  }
@@ -262,7 +263,7 @@ const So = () => {
262
263
  loadedPages: 0,
263
264
  totalPages: 0,
264
265
  percentage: 0
265
- }), [r, a] = $(!1), [s, l] = $(!1), [u, h] = $(null), m = H(!1);
266
+ }), [r, a] = $(!1), [c, l] = $(!1), [u, p] = $(null), m = H(!1);
266
267
  k(() => {
267
268
  m.current;
268
269
  }, [m]);
@@ -270,8 +271,8 @@ const So = () => {
270
271
  document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
271
272
  const f = document.querySelector(".rp-print-zone");
272
273
  f && f.remove();
273
- }, []), p = N(() => {
274
- m.current = !1, a(!1), l(!1), h(null), o({
274
+ }, []), h = N(() => {
275
+ m.current = !1, a(!1), l(!1), p(null), o({
275
276
  loadedPages: 0,
276
277
  totalPages: 0,
277
278
  percentage: 0
@@ -281,14 +282,14 @@ const So = () => {
281
282
  }, T = async ({
282
283
  scratchCanvas: f,
283
284
  pdfDocument: g,
284
- pageNumber: c,
285
+ pageNumber: s,
285
286
  viewerPdfPage: b,
286
287
  printResolution: _,
287
- optionalContentConfigPromise: P,
288
+ optionalContentConfigPromise: S,
288
289
  printAnnotationStoragePromise: E
289
290
  }) => {
290
291
  if (m.current) {
291
- p();
292
+ h();
292
293
  return;
293
294
  }
294
295
  const x = _ / yr.PDF;
@@ -296,11 +297,11 @@ const So = () => {
296
297
  const R = f.getContext("2d");
297
298
  R.save(), R.fillStyle = "rgb(255, 255, 255)", R.fillRect(0, 0, f.width, f.height), R.restore();
298
299
  const [D, A] = await Promise.all([
299
- g.getPage(c),
300
+ g.getPage(s),
300
301
  E
301
302
  ]);
302
303
  if (m.current) {
303
- p();
304
+ h();
304
305
  return;
305
306
  }
306
307
  const z = {
@@ -309,7 +310,7 @@ const So = () => {
309
310
  viewport: D.getViewport({ scale: 1, rotation: b.rotation }),
310
311
  intent: "print",
311
312
  annotationMode: xr.ENABLE_STORAGE,
312
- optionalContentConfigPromise: P,
313
+ optionalContentConfigPromise: S,
313
314
  printAnnotationStorage: A
314
315
  };
315
316
  try {
@@ -317,55 +318,55 @@ const So = () => {
317
318
  } catch (L) {
318
319
  throw L instanceof Ir || console.error(L), L;
319
320
  }
320
- }, y = N(() => {
321
+ }, P = N(() => {
321
322
  const f = window.print;
322
323
  return new Promise((g) => {
323
- const c = (P) => {
324
+ const s = (S) => {
324
325
  setTimeout(() => {
325
- f.call(window), setTimeout(() => P(), 20);
326
+ f.call(window), setTimeout(() => S(), 20);
326
327
  }, 0);
327
328
  };
328
329
  if (document.querySelector(".rp-print-zone")) {
329
- c(g);
330
+ s(g);
330
331
  return;
331
332
  }
332
333
  const _ = new MutationObserver(() => {
333
- document.querySelector(".rp-print-zone") && (c(g), _.disconnect());
334
+ document.querySelector(".rp-print-zone") && (s(g), _.disconnect());
334
335
  });
335
336
  _.observe(document.body, { childList: !0, subtree: !0 });
336
337
  });
337
338
  }, []), C = async (f) => {
338
- const g = document.createElement("img"), c = document.createElement("div");
339
- return c.classList.add("rp-print-page"), await new Promise((b, _) => {
340
- f.toBlob((P) => {
341
- P ? (g.src = URL.createObjectURL(P), g.onload = () => {
339
+ const g = document.createElement("img"), s = document.createElement("div");
340
+ return s.classList.add("rp-print-page"), await new Promise((b, _) => {
341
+ f.toBlob((S) => {
342
+ S ? (g.src = URL.createObjectURL(S), g.onload = () => {
342
343
  URL.revokeObjectURL(g.src), b();
343
344
  }, g.onerror = _) : _(new Error("Failed to create blob"));
344
345
  });
345
346
  }).catch(() => {
346
- }), c.appendChild(g), c;
347
- }, S = (f, g) => {
348
- const c = document.createElement("div");
349
- c.classList.add("rp-print-zone");
347
+ }), s.appendChild(g), s;
348
+ }, y = (f, g) => {
349
+ const s = document.createElement("div");
350
+ s.classList.add("rp-print-zone");
350
351
  const b = document.createElement("style"), _ = g.get(1);
351
352
  if (_) {
352
- const { width: P, height: E } = _ == null ? void 0 : _.page.getViewport({ scale: 1 });
353
- b.innerHTML = `@page { size: ${P}px ${E}px }`;
353
+ const { width: S, height: E } = _ == null ? void 0 : _.page.getViewport({ scale: 1 });
354
+ b.innerHTML = `@page { size: ${S}px ${E}px }`;
354
355
  }
355
- return c.appendChild(b), c.append(...f), c;
356
+ return s.appendChild(b), s.append(...f), s;
356
357
  }, d = N(async () => {
357
358
  if (!e)
358
359
  return;
359
- p();
360
+ h();
360
361
  const f = document.createElement("canvas"), g = [];
361
362
  try {
362
363
  e.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
363
364
  const b = e.getOptionalContentConfig({ intent: "print" }), _ = Promise.resolve(
364
365
  e.annotationStorage.print ?? void 0
365
- ), P = t.size;
366
+ ), S = t.size;
366
367
  for (const [x, R] of t) {
367
368
  if (m.current) {
368
- p();
369
+ h();
369
370
  return;
370
371
  }
371
372
  const D = R.page.getViewport({ scale: 1 });
@@ -378,43 +379,43 @@ const So = () => {
378
379
  optionalContentConfigPromise: b,
379
380
  printAnnotationStoragePromise: _
380
381
  }), m.current) {
381
- p();
382
+ h();
382
383
  return;
383
384
  }
384
385
  const A = await C(f);
385
386
  g.push(A);
386
- const z = parseFloat((g.length / P * 100).toFixed(2));
387
+ const z = parseFloat((g.length / S * 100).toFixed(2));
387
388
  o({
388
389
  loadedPages: x,
389
- totalPages: P,
390
+ totalPages: S,
390
391
  percentage: z
391
392
  });
392
393
  }
393
394
  if (m.current) {
394
- p();
395
+ h();
395
396
  return;
396
397
  }
397
- const E = S(g, t);
398
- document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await y();
399
- } catch (c) {
400
- l(!0), c instanceof Error && h(c);
398
+ const E = y(g, t);
399
+ document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await P();
400
+ } catch (s) {
401
+ l(!0), s instanceof Error && p(s);
401
402
  } finally {
402
403
  f.height = 0, f.width = 0;
403
404
  }
404
405
  }, [e, t, m]);
405
406
  return k(() => {
406
407
  const f = () => {
407
- p(), v();
408
+ h(), v();
408
409
  };
409
410
  return window.addEventListener("afterprint", f, !0), () => {
410
411
  window.removeEventListener("afterprint", f, !0);
411
412
  };
412
- }, [v, p]), {
413
+ }, [v, h]), {
413
414
  print: d,
414
415
  cancel: w,
415
416
  progress: n,
416
417
  isComplete: r,
417
- isError: s,
418
+ isError: c,
418
419
  error: u
419
420
  };
420
421
  }, _n = Ye({
@@ -435,9 +436,9 @@ const So = () => {
435
436
  }
436
437
  }
437
438
  }), Hs = ({ children: e }) => {
438
- const [t, n] = $(null), [o, r] = $(null), { print: a, cancel: s, progress: l, isComplete: u, isError: h, error: m } = So(), v = N((C) => {
439
+ const [t, n] = $(null), [o, r] = $(null), { print: a, cancel: c, progress: l, isComplete: u, isError: p, error: m } = So(), v = N((C) => {
439
440
  C && typeof C == "function" && r(() => C);
440
- }, []), p = (C) => {
441
+ }, []), h = (C) => {
441
442
  m && C(m);
442
443
  }, w = N(
443
444
  (C) => {
@@ -448,50 +449,50 @@ const So = () => {
448
449
  k(() => {
449
450
  u && o && T();
450
451
  }, [u, o]), k(() => {
451
- h && p((C) => {
452
+ p && h((C) => {
452
453
  console.error(C);
453
454
  });
454
- }, [h]), k(() => {
455
+ }, [p]), k(() => {
455
456
  l && t && t(l);
456
457
  }, [l, t]);
457
458
  const T = () => {
458
459
  o && (o(), r(null));
459
- }, y = {
460
+ }, P = {
460
461
  print: a,
461
- cancel: s,
462
+ cancel: c,
462
463
  setOnProgress: w,
463
464
  setOnComplete: v,
464
- setOnError: p,
465
+ setOnError: h,
465
466
  progress: l
466
467
  };
467
- return /* @__PURE__ */ i(_n.Provider, { value: y, children: e });
468
+ return /* @__PURE__ */ i(_n.Provider, { value: P, children: e });
468
469
  }, tt = () => {
469
470
  const e = Je(_n);
470
471
  if (!e)
471
472
  throw new Error("usePrintContext must be used within a PrintProvider");
472
473
  return e;
473
474
  }, yo = () => {
474
- const [e, t] = $({}), { pages: n } = J(), { rotate: o } = Ge(), r = W(() => Object.keys(e).length, [e]), a = N(
475
+ const [e, t] = $({}), { pages: n } = J(), { rotate: o } = Ge(), r = M(() => Object.keys(e).length, [e]), a = N(
475
476
  (l) => {
476
477
  if (!n.size || l > n.size)
477
478
  return;
478
479
  const u = Array.from(n.values()).slice(0, l).map((v) => {
479
- const { thumbnailViewport: p, scale: w } = kt(v.page, o);
480
+ const { thumbnailViewport: h, scale: w } = kt(v.page, o);
480
481
  return {
481
482
  scale: w,
482
483
  page: v.page,
483
484
  loading: !0,
484
- viewport: p
485
+ viewport: h
485
486
  };
486
- }), h = u.reduce((v, p) => (v[p.page.pageNumber] = p, v), {});
487
- t(h);
487
+ }), p = u.reduce((v, h) => (v[h.page.pageNumber] = h, v), {});
488
+ t(p);
488
489
  const m = [];
489
490
  for (const v of u) {
490
- const p = document.createElement("canvas"), w = vt(v.page, p, {
491
+ const h = document.createElement("canvas"), w = vt(v.page, h, {
491
492
  scale: v.scale,
492
493
  rotate: o
493
494
  }).promise.then(() => {
494
- const T = p.toDataURL();
495
+ const T = h.toDataURL();
495
496
  return {
496
497
  ...v,
497
498
  thumbnailSrc: T,
@@ -501,11 +502,11 @@ const So = () => {
501
502
  m.push(w);
502
503
  }
503
504
  Promise.all(m).then((v) => {
504
- const p = v.reduce(
505
+ const h = v.reduce(
505
506
  (w, T) => (w[T.page.pageNumber] = T, w),
506
507
  {}
507
508
  );
508
- t((w) => ({ ...w, ...p }));
509
+ t((w) => ({ ...w, ...h }));
509
510
  }).catch(() => {
510
511
  });
511
512
  },
@@ -514,7 +515,7 @@ const So = () => {
514
515
  k(() => {
515
516
  a(10);
516
517
  }, [a]);
517
- const s = N(
518
+ const c = N(
518
519
  (l) => {
519
520
  if (!n)
520
521
  return;
@@ -530,11 +531,11 @@ const So = () => {
530
531
  scale: u.thumbnailScale
531
532
  }
532
533
  }));
533
- const h = document.createElement("canvas");
534
- vt(u.page, h, { scale: u.thumbnailScale, rotate: o }).promise.then(() => {
535
- const m = h.toDataURL(), { thumbnailViewport: v, scale: p } = kt(u.page, o);
534
+ const p = document.createElement("canvas");
535
+ vt(u.page, p, { scale: u.thumbnailScale, rotate: o }).promise.then(() => {
536
+ const m = p.toDataURL(), { thumbnailViewport: v, scale: h } = kt(u.page, o);
536
537
  return {
537
- scale: p,
538
+ scale: h,
538
539
  thumbnailSrc: m,
539
540
  page: u.page,
540
541
  loading: !1,
@@ -546,7 +547,7 @@ const So = () => {
546
547
  },
547
548
  [n, o]
548
549
  );
549
- return { thumbnailPages: e, addPage: s, addToPage: a, thumbnailLength: r };
550
+ return { thumbnailPages: e, addPage: c, addToPage: a, thumbnailLength: r };
550
551
  }, bn = Ye({
551
552
  thumbnailPages: {},
552
553
  addPage: (e) => {
@@ -561,16 +562,16 @@ const So = () => {
561
562
  children: e,
562
563
  initialThumbnailsVisible: t
563
564
  }) => {
564
- const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = yo(), [s, l] = $(t);
565
+ const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = yo(), [c, l] = $(t);
565
566
  return /* @__PURE__ */ i(
566
567
  bn.Provider,
567
568
  {
568
- value: { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a, active: s, setActive: l },
569
+ value: { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a, active: c, setActive: l },
569
570
  children: e
570
571
  }
571
572
  );
572
573
  }, xo = (e = {}, t = "") => {
573
- const [n, o] = $(t), [r, a] = $(!1), { pdf: s, pages: l } = J(), { widths: u, heights: h } = qe(), m = H(!n), { currentZoom: v } = Qe(), [p, w] = $([]), { setFocusedPage: T } = ie(), { columnCount: y } = Ae(), { rotate: C } = Ge(), [S, d] = $(0), { pageScrollElementRef: f, virtualScrollableElementRef: g } = et(), { scrollMode: c } = De(), { pagesRef: b } = ge(), [_, P] = $(null), E = H({}), x = W(() => S === 0 ? null : p[S - 1], [S, p]), R = W(() => p.length, [p]);
574
+ const [n, o] = $(t), [r, a] = $(!1), { pdf: c, pages: l } = J(), { widths: u, heights: p } = qe(), m = H(!n), { currentZoom: v } = Qe(), [h, w] = $([]), { setFocusedPage: T } = ie(), { columnCount: P } = Ae(), { rotate: C } = Ge(), [y, d] = $(0), { pageScrollElementRef: f, virtualScrollableElementRef: g } = et(), { scrollMode: s } = De(), { pagesRef: b } = ge(), [_, S] = $(null), E = H({}), x = M(() => y === 0 ? null : h[y - 1], [y, h]), R = M(() => h.length, [h]);
574
575
  k(() => {
575
576
  if (!x || !l)
576
577
  return;
@@ -578,19 +579,19 @@ const So = () => {
578
579
  if (!L || !b)
579
580
  return;
580
581
  const I = l.get(x.page);
581
- if (c === ee.PAGE_SCROLLING && T(x.page), !I)
582
+ if (s === ee.PAGE_SCROLLING && T(x.page), !I)
582
583
  return;
583
- let O = 0, M = 0;
584
- if (c === ee.VERTICAL_SCROLLING) {
585
- const ae = x.page - 1, de = y, te = ae % de, ze = Math.floor(ae / de);
586
- O = Oe(h, ze), M = Oe(u, te);
584
+ let O = 0, W = 0;
585
+ if (s === ee.VERTICAL_SCROLLING) {
586
+ const ae = x.page - 1, de = P, te = ae % de, ze = Math.floor(ae / de);
587
+ O = Oe(p, ze), W = Oe(u, te);
587
588
  }
588
- c === ee.HORIZONTAL_SCROLLING && (M = u.slice(0, x.page - 1).reduce((ae, de) => ae + de, 0));
589
+ s === ee.HORIZONTAL_SCROLLING && (W = u.slice(0, x.page - 1).reduce((ae, de) => ae + de, 0));
589
590
  const G = {
590
591
  top: b.clientHeight / 2,
591
592
  left: b.clientWidth / 2
592
593
  }, Z = {
593
- height: h[x.page - 1],
594
+ height: p[x.page - 1],
594
595
  width: u[x.page - 1]
595
596
  }, { leftInPage: j, topInPage: U } = Br(
596
597
  Z,
@@ -598,7 +599,7 @@ const So = () => {
598
599
  x.rect,
599
600
  v,
600
601
  C
601
- ), Q = M + j, X = O + U, le = {
602
+ ), Q = W + j, X = O + U, le = {
602
603
  left: Math.max(Q, 0),
603
604
  top: Math.max(X, 0)
604
605
  };
@@ -609,9 +610,9 @@ const So = () => {
609
610
  l,
610
611
  T,
611
612
  u,
612
- h,
613
+ p,
613
614
  x,
614
- c,
615
+ s,
615
616
  g,
616
617
  f,
617
618
  b
@@ -624,11 +625,11 @@ const So = () => {
624
625
  if (!L)
625
626
  return {};
626
627
  const I = L.numPages, O = {};
627
- for (let M = 1; M <= I; M++) {
628
+ for (let W = 1; W <= I; W++) {
628
629
  if (m.current)
629
630
  throw "close pop over";
630
- const G = await L.getPage(M);
631
- O[M.toString()] = await G.getTextContent();
631
+ const G = await L.getPage(W);
632
+ O[W.toString()] = await G.getTextContent();
632
633
  }
633
634
  return O;
634
635
  }, []);
@@ -637,33 +638,33 @@ const So = () => {
637
638
  m.current = !0, w([]), d(0);
638
639
  return;
639
640
  }
640
- m.current = !1, a(!0), w([]), d(0), z(s).then((L) => {
641
+ m.current = !1, a(!0), w([]), d(0), z(c).then((L) => {
641
642
  E.current = L;
642
- const O = Object.keys(L).reduce((M, G) => {
643
+ const O = Object.keys(L).reduce((W, G) => {
643
644
  const Z = cr(
644
645
  [n],
645
646
  L[G],
646
647
  Number(G) - 1,
647
648
  e
648
649
  ).map((j, U) => ({ ...j, page: Number(G), pageMatchIdx: U }));
649
- return [...M, ...Z];
650
+ return [...W, ...Z];
650
651
  }, []);
651
652
  w(O), d(O.length ? 1 : 0);
652
653
  }).catch(() => {
653
654
  w([]), d(0);
654
655
  }).finally(() => a(!1));
655
- }, [n, z, s, e]), {
656
+ }, [n, z, c, e]), {
656
657
  search: n,
657
658
  setSearch: o,
658
659
  loading: r,
659
- matches: p,
660
+ matches: h,
660
661
  totalMatches: R,
661
- currentMatchPosition: S,
662
+ currentMatchPosition: y,
662
663
  currentMatch: x,
663
664
  nextMatch: D,
664
665
  prevMatch: A,
665
666
  currentMatchElement: _,
666
- setCurrentMatchElement: P
667
+ setCurrentMatchElement: S
667
668
  };
668
669
  }, Tn = Ye({
669
670
  search: "",
@@ -690,13 +691,13 @@ const So = () => {
690
691
  const [n, o] = $({}), {
691
692
  loading: r,
692
693
  setSearch: a,
693
- totalMatches: s,
694
+ totalMatches: c,
694
695
  currentMatchPosition: l,
695
696
  currentMatch: u,
696
- search: h,
697
+ search: p,
697
698
  matches: m,
698
699
  nextMatch: v,
699
- prevMatch: p,
700
+ prevMatch: h,
700
701
  currentMatchElement: w,
701
702
  setCurrentMatchElement: T
702
703
  } = xo(n, t);
@@ -708,12 +709,12 @@ const So = () => {
708
709
  setSearchOptions: o,
709
710
  loading: r,
710
711
  setSearch: a,
711
- totalMatches: s,
712
+ totalMatches: c,
712
713
  currentMatchPosition: l,
713
714
  currentMatch: u,
714
715
  nextMatch: v,
715
- prevMatch: p,
716
- search: h,
716
+ prevMatch: h,
717
+ search: p,
717
718
  matches: m,
718
719
  currentMatchElement: w,
719
720
  setCurrentMatchElement: T
@@ -735,18 +736,18 @@ const So = () => {
735
736
  "rp-page": "_rp-page_h7a2q_1",
736
737
  "rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
737
738
  }, Io = (e) => {
738
- const { pageNumber: t, onLoaded: n, onLoading: o } = e, r = H(null), { pages: a } = J(), { rotate: s } = Ge(), l = H(), { currentZoom: u } = Qe();
739
+ const { pageNumber: t, onLoaded: n, onLoading: o } = e, r = H(null), { pages: a } = J(), { rotate: c } = Ge(), l = H(), { currentZoom: u } = Qe();
739
740
  return k(() => {
740
741
  if (!a || u === 0)
741
742
  return;
742
- const h = a.get(t);
743
- if (r.current && h) {
743
+ const p = a.get(t);
744
+ if (r.current && p) {
744
745
  const m = r.current;
745
746
  m.hidden = !0;
746
747
  const v = l.current;
747
- v && v.cancel(), o && o(), l.current = vt(h.page, m, {
748
+ v && v.cancel(), o && o(), l.current = vt(p.page, m, {
748
749
  scale: u,
749
- rotate: s,
750
+ rotate: c,
750
751
  renderForms: !0
751
752
  }), l.current.promise.then(() => {
752
753
  m.hidden = !1;
@@ -759,58 +760,58 @@ const So = () => {
759
760
  var m;
760
761
  (m = l.current) == null || m.cancel();
761
762
  };
762
- }, [a, t, s, u, o, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${t}-canvas`, ref: r });
763
+ }, [a, t, c, u, o, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${t}-canvas`, ref: r });
763
764
  }, Ro = "_selecting_1x8te_9", Lo = "_endOfContent_1x8te_24", he = {
764
765
  "rp-text-layer": "_rp-text-layer_1x8te_1",
765
766
  selecting: Ro,
766
767
  endOfContent: Lo,
767
768
  "rp-text-layer-text": "_rp-text-layer-text_1x8te_38"
768
769
  }, Eo = (e) => {
769
- const { pageNumber: t } = e, { pages: n } = J(), o = H(null), { matches: r, currentMatch: a, setCurrentMatchElement: s } = xt(), [l, u] = $(
770
+ const { pageNumber: t } = e, { pages: n } = J(), o = H(null), { matches: r, currentMatch: a, setCurrentMatchElement: c } = xt(), [l, u] = $(
770
771
  []
771
- ), h = H(), m = H(), v = H(), p = W(() => r.filter((f) => f.pageIndex === t - 1), [r, t]), w = N(
772
- (f, g, c = !1) => {
773
- if (c && lr(f, g), !p.length) {
772
+ ), p = H(), m = H(), v = H(), h = M(() => r.filter((f) => f.pageIndex === t - 1), [r, t]), w = N(
773
+ (f, g, s = !1) => {
774
+ if (s && lr(f, g), !h.length) {
774
775
  v.current = void 0, u([]);
775
776
  return;
776
777
  }
777
- const b = dr(p, f, g);
778
+ const b = dr(h, f, g);
778
779
  u(b);
779
780
  },
780
- [p]
781
- ), T = H(), y = H(!1), C = N(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
781
+ [h]
782
+ ), T = H(), P = H(!1), C = N(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
782
783
  k(() => ((() => {
783
784
  if (T.current)
784
785
  return;
785
786
  T.current = new AbortController();
786
- const { signal: g } = T.current, c = () => {
787
+ const { signal: g } = T.current, s = () => {
787
788
  C().forEach((_) => {
788
- const P = _.querySelector(".endOfContent");
789
- P && (_.appendChild(P), P.style.width = "", P.style.height = "", _.classList.remove(he.selecting));
789
+ const S = _.querySelector(".endOfContent");
790
+ S && (_.appendChild(S), S.style.width = "", S.style.height = "", _.classList.remove(he.selecting));
790
791
  });
791
792
  };
792
793
  document.addEventListener(
793
794
  "pointerdown",
794
795
  () => {
795
- y.current = !0;
796
+ P.current = !0;
796
797
  },
797
798
  { signal: g }
798
799
  ), document.addEventListener(
799
800
  "pointerup",
800
801
  () => {
801
- y.current = !1, c();
802
+ P.current = !1, s();
802
803
  },
803
804
  { signal: g }
804
805
  ), window.addEventListener(
805
806
  "blur",
806
807
  () => {
807
- y.current = !1, c();
808
+ P.current = !1, s();
808
809
  },
809
810
  { signal: g }
810
811
  ), document.addEventListener(
811
812
  "keyup",
812
813
  () => {
813
- y.current || c();
814
+ P.current || s();
814
815
  },
815
816
  { signal: g }
816
817
  );
@@ -823,18 +824,18 @@ const So = () => {
823
824
  if (!_)
824
825
  return;
825
826
  if (_.rangeCount === 0) {
826
- c();
827
+ s();
827
828
  return;
828
829
  }
829
- const P = /* @__PURE__ */ new Set();
830
+ const S = /* @__PURE__ */ new Set();
830
831
  for (let I = 0; I < _.rangeCount; I++) {
831
832
  const O = _.getRangeAt(I);
832
- C().forEach((M) => {
833
- O.intersectsNode(M) && !P.has(M) && P.add(M);
833
+ C().forEach((W) => {
834
+ O.intersectsNode(W) && !S.has(W) && S.add(W);
834
835
  });
835
836
  }
836
837
  C().forEach((I) => {
837
- if (P.has(I))
838
+ if (S.has(I))
838
839
  I.classList.add(he.selecting);
839
840
  else {
840
841
  const O = I.querySelector(".endOfContent");
@@ -855,54 +856,54 @@ const So = () => {
855
856
  var g;
856
857
  (g = T.current) == null || g.abort(), T.current = void 0;
857
858
  }), [C]);
858
- const S = N(() => {
859
+ const y = N(() => {
859
860
  o.current && o.current.classList.add(he.selecting);
860
861
  }, []), d = N(() => {
861
862
  o.current && o.current.classList.remove(he.selecting);
862
863
  }, []);
863
864
  return k(() => {
864
- var c;
865
- if ((c = v.current) == null || c.classList.remove("selected"), !l.length || !a || a.pageIndex !== t - 1)
865
+ var s;
866
+ if ((s = v.current) == null || s.classList.remove("selected"), !l.length || !a || a.pageIndex !== t - 1)
866
867
  return;
867
- const f = p.findIndex(
868
+ const f = h.findIndex(
868
869
  (b) => JSON.stringify(b) === JSON.stringify(a)
869
870
  );
870
871
  if (f === -1)
871
872
  return;
872
873
  const g = l.find((b) => b.index === f);
873
- g && (v.current = g.element, s(g.element), g.element.classList.add("selected"));
874
- }, [a, l, p]), k(() => {
874
+ g && (v.current = g.element, c(g.element), g.element.classList.add("selected"));
875
+ }, [a, l, h]), k(() => {
875
876
  const f = n.get(t);
876
877
  if (!f || !o.current)
877
878
  return;
878
879
  const g = o.current;
879
- return h.current && h.current.cancel(), f.page.getTextContent().then((c) => {
880
+ return p.current && p.current.cancel(), f.page.getTextContent().then((s) => {
880
881
  const b = f.page.getViewport({ scale: 1 });
881
- return h.current = new Sr.TextLayer({
882
+ return p.current = new Sr.TextLayer({
882
883
  viewport: b,
883
- textContentSource: c,
884
+ textContentSource: s,
884
885
  container: g
885
- }), m.current = c, g && (g.innerText = ""), h.current.render();
886
+ }), m.current = s, g && (g.innerText = ""), p.current.render();
886
887
  }).then(() => {
887
- var P, E;
888
+ var S, E;
888
889
  [].slice.call(g.children).forEach((x) => {
889
890
  x.classList.add(he["rp-text-layer-text"]), x.setAttribute("data-rp", "rp-text-layer-text");
890
891
  });
891
- const b = (P = h.current) == null ? void 0 : P.textDivs;
892
+ const b = (S = p.current) == null ? void 0 : S.textDivs;
892
893
  b && m.current && w(m.current, b);
893
894
  const _ = document.createElement("div");
894
895
  _.className = "endOfContent", (E = o.current) == null || E.appendChild(_);
895
896
  }).catch(() => {
896
897
  }), () => {
897
- var c;
898
- (c = h.current) == null || c.cancel();
898
+ var s;
899
+ (s = p.current) == null || s.cancel();
899
900
  };
900
901
  }, [n, t]), k(() => {
901
- var c;
902
+ var s;
902
903
  [].slice.call(o.current.children).forEach((b) => {
903
904
  b.classList.add(he["rp-text-layer-text"]);
904
905
  });
905
- const g = (c = h.current) == null ? void 0 : c.textDivs;
906
+ const g = (s = p.current) == null ? void 0 : s.textDivs;
906
907
  g && m.current && w(m.current, g, !0);
907
908
  }, [w]), /* @__PURE__ */ i(
908
909
  "div",
@@ -910,7 +911,7 @@ const So = () => {
910
911
  "data-rp": `page-${t}-textLayer`,
911
912
  className: he["rp-text-layer"],
912
913
  ref: o,
913
- onMouseDown: S,
914
+ onMouseDown: y,
914
915
  onMouseUp: d
915
916
  }
916
917
  );
@@ -919,7 +920,7 @@ const So = () => {
919
920
  };
920
921
  let Oo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
921
922
  const Do = (e) => {
922
- const { pageNumber: t } = e, n = H(null), { pages: o, pdf: r } = J(), a = H(), [s, l] = $(), { setFocusedPage: u, goToPage: h } = ie(), { scrollMode: m } = De(), { print: v } = tt(), { download: p } = Hn(), w = W(() => o.get(t), [o, t]), T = W(() => w == null ? void 0 : w.page.getViewport(), [w]);
923
+ const { pageNumber: t } = e, n = H(null), { pages: o, pdf: r } = J(), a = H(), [c, l] = $(), { setFocusedPage: u, goToPage: p } = ie(), { scrollMode: m } = De(), { print: v } = tt(), { download: h } = Hn(), w = M(() => o.get(t), [o, t]), T = M(() => w == null ? void 0 : w.page.getViewport(), [w]);
923
924
  k(() => {
924
925
  a.current && (a.current.div.replaceChildren(), a.current = void 0);
925
926
  }, [r]), k(() => {
@@ -927,17 +928,17 @@ const Do = (e) => {
927
928
  a.current = void 0, l(C), n.current && (n.current.innerText = "");
928
929
  });
929
930
  }, [w]);
930
- const y = N(
931
+ const P = N(
931
932
  (C) => {
932
- !s || !r || (Er(C), Nr(C, r, s).then((S) => {
933
+ !c || !r || (Er(C), Nr(C, r, c).then((y) => {
933
934
  var d, f;
934
- ((d = S == null ? void 0 : S.data) == null ? void 0 : d.action) === "Print" ? v() : ((f = S == null ? void 0 : S.data) == null ? void 0 : f.action) === "SaveAs" && p();
935
- }), m === ee.PAGE_SCROLLING ? zt(C, s, r, (S) => u(S.pageIndex + 1)) : zt(C, s, r, (S) => h(S.pageIndex + 1)));
935
+ ((d = y == null ? void 0 : y.data) == null ? void 0 : d.action) === "Print" ? v() : ((f = y == null ? void 0 : y.data) == null ? void 0 : f.action) === "SaveAs" && h();
936
+ }), m === ee.PAGE_SCROLLING ? zt(C, c, r, (y) => u(y.pageIndex + 1)) : zt(C, c, r, (y) => p(y.pageIndex + 1)));
936
937
  },
937
- [r, s, h, u, m, v, p]
938
+ [r, c, p, u, m, v, h]
938
939
  );
939
940
  return k(() => {
940
- if (!w || !s)
941
+ if (!w || !c)
941
942
  return;
942
943
  const C = w.page.getViewport();
943
944
  if (a.current) {
@@ -946,15 +947,15 @@ const Do = (e) => {
946
947
  });
947
948
  return;
948
949
  }
949
- const S = /* @__PURE__ */ new Map([]);
950
- for (const g of s) {
951
- const { annotationType: c } = g;
952
- switch (c) {
950
+ const y = /* @__PURE__ */ new Map([]);
951
+ for (const g of c) {
952
+ const { annotationType: s } = g;
953
+ switch (s) {
953
954
  case At.Link:
954
955
  Dr(g);
955
956
  break;
956
957
  case At.Widget:
957
- Or(g, C, S);
958
+ Or(g, C, y);
958
959
  break;
959
960
  }
960
961
  }
@@ -969,15 +970,15 @@ const Do = (e) => {
969
970
  structTreeLayer: null,
970
971
  page: w.page,
971
972
  viewport: C.clone({ dontFlip: !0 })
972
- }), n.current && Ft(n.current, y);
973
- const g = await (r == null ? void 0 : r.hasJSActions()), c = await (r == null ? void 0 : r.getFieldObjects());
973
+ }), n.current && Ft(n.current, P);
974
+ const g = await (r == null ? void 0 : r.hasJSActions()), s = await (r == null ? void 0 : r.getFieldObjects());
974
975
  if (d.signal.aborted)
975
976
  throw "abort";
976
977
  return (b = a.current) == null ? void 0 : b.render({
977
- annotations: s,
978
+ annotations: c,
978
979
  annotationStorage: r == null ? void 0 : r.annotationStorage,
979
980
  hasJSActions: g,
980
- fieldObjects: c,
981
+ fieldObjects: s,
981
982
  div: n.current,
982
983
  viewport: C.clone({ dontFlip: !0 }),
983
984
  page: w.page,
@@ -988,14 +989,14 @@ const Do = (e) => {
988
989
  enableScripting: !1
989
990
  });
990
991
  })().then(() => {
991
- n.current && Ar(n.current, y);
992
+ n.current && Ar(n.current, P);
992
993
  }).catch((g) => {
993
994
  if (g !== "abort")
994
995
  throw g;
995
996
  }), () => {
996
- d.abort("clear"), n.current && Ft(n.current, y);
997
+ d.abort("clear"), n.current && Ft(n.current, P);
997
998
  };
998
- }, [r, s, y]), /* @__PURE__ */ i(
999
+ }, [r, c, P]), /* @__PURE__ */ i(
999
1000
  "div",
1000
1001
  {
1001
1002
  "data-rp": `page-${t}-annotationLayer`,
@@ -1007,9 +1008,9 @@ const Do = (e) => {
1007
1008
  }, Ao = {
1008
1009
  "rp-text-highlight": "_rp-text-highlight_jdkf8_1"
1009
1010
  }, zo = ({ pageNumber: e, viewport: t }) => {
1010
- const [n, o] = $(), { pages: r } = J(), { highlightKeywords: a } = pr(), s = !0, l = H(null), [u, h] = $(null), [m, v] = $([]);
1011
+ const [n, o] = $(), { pages: r } = J(), { highlightKeywords: a } = pr(), c = !0, l = H(null), [u, p] = $(null), [m, v] = $([]);
1011
1012
  k(() => {
1012
- l.current && h(l.current.parentElement);
1013
+ l.current && p(l.current.parentElement);
1013
1014
  }, [l]), k(() => {
1014
1015
  (async () => {
1015
1016
  const f = r.get(e);
@@ -1019,7 +1020,7 @@ const Do = (e) => {
1019
1020
  o(g);
1020
1021
  })();
1021
1022
  }, [r, e]);
1022
- const p = W(() => a ? a.map((d) => {
1023
+ const h = M(() => a ? a.map((d) => {
1023
1024
  var f, g;
1024
1025
  return {
1025
1026
  ...zr(d.keyword, (f = d.options) == null ? void 0 : f.matchCase, (g = d.options) == null ? void 0 : g.wholeWords),
@@ -1030,15 +1031,15 @@ const Do = (e) => {
1030
1031
  if (!d)
1031
1032
  return;
1032
1033
  const g = `[data-rp="page-${f}-textLayer"]`;
1033
- return new Promise((c) => {
1034
+ return new Promise((s) => {
1034
1035
  const b = d.querySelector(g);
1035
1036
  if (b) {
1036
- c(b);
1037
+ s(b);
1037
1038
  return;
1038
1039
  }
1039
- new MutationObserver((P, E) => {
1040
+ new MutationObserver((S, E) => {
1040
1041
  const x = d.querySelector(g);
1041
- x && (c(x), E.disconnect());
1042
+ x && (s(x), E.disconnect());
1042
1043
  }).observe(d, { childList: !0, subtree: !0 });
1043
1044
  });
1044
1045
  }
@@ -1052,30 +1053,30 @@ const Do = (e) => {
1052
1053
  return;
1053
1054
  }
1054
1055
  new MutationObserver((b, _) => {
1055
- const P = d.querySelectorAll(
1056
+ const S = d.querySelectorAll(
1056
1057
  ".vpv-text-layer-text"
1057
1058
  );
1058
- P.length && (f(Array.from(P)), _.disconnect());
1059
+ S.length && (f(Array.from(S)), _.disconnect());
1059
1060
  }).observe(d, { childList: !0, subtree: !0 });
1060
1061
  });
1061
1062
  }
1062
- const y = (d, f, g, c) => {
1063
+ const P = (d, f, g, s) => {
1063
1064
  var Z;
1064
1065
  const b = document.createRange(), _ = g.firstChild;
1065
1066
  if (!_ || _.nodeType !== Node.TEXT_NODE)
1066
1067
  return null;
1067
- const P = ((Z = _.textContent) == null ? void 0 : Z.length) ?? 0, E = c[0].charIdxInSpan, x = c.length === 1 ? E : c[c.length - 1].charIdxInSpan;
1068
- if (E > P || x + 1 > P)
1068
+ const S = ((Z = _.textContent) == null ? void 0 : Z.length) ?? 0, E = s[0].charIdxInSpan, x = s.length === 1 ? E : s[s.length - 1].charIdxInSpan;
1069
+ if (E > S || x + 1 > S)
1069
1070
  return null;
1070
1071
  b.setStart(_, E), b.setEnd(_, x + 1);
1071
1072
  const R = document.createElement("span");
1072
1073
  R.style.width = "auto", b.surroundContents(R);
1073
- const D = R.getBoundingClientRect(), A = d.getBoundingClientRect(), z = A.height, L = A.width, I = 100 * (D.left - A.left) / L, O = 100 * (D.top - A.top) / z, M = 100 * D.height / z, G = 100 * D.width / L;
1074
+ const D = R.getBoundingClientRect(), A = d.getBoundingClientRect(), z = A.height, L = A.width, I = 100 * (D.left - A.left) / L, O = 100 * (D.top - A.top) / z, W = 100 * D.height / z, G = 100 * D.width / L;
1074
1075
  return kr(R), {
1075
1076
  keywordStr: f,
1076
1077
  left: I,
1077
1078
  top: O,
1078
- height: M,
1079
+ height: W,
1079
1080
  width: G,
1080
1081
  pageHeight: z,
1081
1082
  pageWidth: L
@@ -1085,10 +1086,10 @@ const Do = (e) => {
1085
1086
  const g = await w(u, d);
1086
1087
  if (!g)
1087
1088
  return;
1088
- const c = await T(g);
1089
- if (c.length) {
1090
- const b = c.map((P) => P.tagName === "BR" ? " " : P.textContent).reduce(
1091
- (P, E, x) => P.concat(
1089
+ const s = await T(g);
1090
+ if (s.length) {
1091
+ const b = s.map((S) => S.tagName === "BR" ? " " : S.textContent).reduce(
1092
+ (S, E, x) => S.concat(
1092
1093
  E.split("").map((R, D) => ({
1093
1094
  char: R,
1094
1095
  charIdxInSpan: D,
@@ -1102,41 +1103,41 @@ const Do = (e) => {
1102
1103
  spanIdx: 0
1103
1104
  }
1104
1105
  ]
1105
- ).slice(1), _ = S(g, f, c, b);
1106
+ ).slice(1), _ = y(g, f, s, b);
1106
1107
  v(_);
1107
1108
  }
1108
1109
  }
1109
- const S = (d, f, g, c) => {
1110
+ const y = (d, f, g, s) => {
1110
1111
  const b = f.length;
1111
- if (!c.length || !b)
1112
+ if (!s.length || !b)
1112
1113
  return [];
1113
- const _ = [], P = c.map((E) => E.char).join("");
1114
- return p.forEach((E) => {
1114
+ const _ = [], S = s.map((E) => E.char).join("");
1115
+ return h.forEach((E) => {
1115
1116
  const { keyword: x, regExp: R, wholeWords: D, color: A } = E, z = x;
1116
1117
  if (!z.trim())
1117
1118
  return;
1118
1119
  const L = R.flags.indexOf("g") === -1 ? new RegExp(R, `${R.flags}g`) : R;
1119
1120
  let I;
1120
1121
  const O = [];
1121
- for (; (I = L.exec(P)) !== null; )
1122
- D && !ur(P, I.index, I[0].length) || O.push({
1122
+ for (; (I = L.exec(S)) !== null; )
1123
+ D && !ur(S, I.index, I[0].length) || O.push({
1123
1124
  keyword: L,
1124
1125
  startIndex: I.index,
1125
1126
  endIndex: L.lastIndex
1126
1127
  });
1127
- const M = O.map((G) => ({
1128
+ const W = O.map((G) => ({
1128
1129
  keyword: G.keyword,
1129
- indexes: c.slice(G.startIndex, G.endIndex),
1130
+ indexes: s.slice(G.startIndex, G.endIndex),
1130
1131
  color: A
1131
1132
  }));
1132
- for (const G of M) {
1133
+ for (const G of W) {
1133
1134
  const Z = G.indexes.reduce(
1134
1135
  (j, U) => (j[U.spanIdx] = (j[U.spanIdx] || []).concat([U]), j),
1135
1136
  {}
1136
1137
  );
1137
1138
  for (const j of Object.values(Z))
1138
1139
  if (j.length !== 1 || j[0].char.trim() !== "") {
1139
- const U = j, Q = g[U[0].spanIdx], X = y(
1140
+ const U = j, Q = g[U[0].spanIdx], X = P(
1140
1141
  d,
1141
1142
  z,
1142
1143
  Q,
@@ -1161,7 +1162,7 @@ const Do = (e) => {
1161
1162
  console.error(f);
1162
1163
  }
1163
1164
  })();
1164
- }, [s, a, e, n, t]), /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i("div", { ref: l, "data-rp": `page-${e}-textHighlightLayer`, children: m.map((d, f) => /* @__PURE__ */ i(
1165
+ }, [c, a, e, n, t]), /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i("div", { ref: l, "data-rp": `page-${e}-textHighlightLayer`, children: m.map((d, f) => /* @__PURE__ */ i(
1165
1166
  "div",
1166
1167
  {
1167
1168
  className: Ao["rp-text-highlight"],
@@ -1176,18 +1177,18 @@ const Do = (e) => {
1176
1177
  f
1177
1178
  )) }) });
1178
1179
  }, It = $e((e, t) => {
1179
- const { pageNumber: n, style: o, ...r } = e, { pages: a } = J(), { rotate: s } = Ge(), { textLayer: l } = or(), { currentZoom: u } = Qe(), h = H(a.get(n)), [m, v] = $(!1), p = H(null), [w, T] = $({
1180
+ const { pageNumber: n, style: o, ...r } = e, { pages: a } = J(), { rotate: c } = Ge(), { textLayer: l } = or(), { currentZoom: u } = Qe(), p = H(a.get(n)), [m, v] = $(!1), h = H(null), [w, T] = $({
1180
1181
  width: 0,
1181
1182
  height: 0
1182
1183
  });
1183
- cn(t, () => p.current), k(() => {
1184
- if (a && (h.current = a.get(n), h.current)) {
1185
- const d = h.current.page.getViewport({ scale: u, rotation: s });
1184
+ cn(t, () => h.current), k(() => {
1185
+ if (a && (p.current = a.get(n), p.current)) {
1186
+ const d = p.current.page.getViewport({ scale: u, rotation: c });
1186
1187
  T(d);
1187
1188
  }
1188
- }, [a, n, s, u]);
1189
- const y = W(() => {
1190
- switch (s) {
1189
+ }, [a, n, c, u]);
1190
+ const P = M(() => {
1191
+ switch (c) {
1191
1192
  case 90:
1192
1193
  return `${w.width / 2}px ${w.width / 2}px`;
1193
1194
  case -90:
@@ -1196,22 +1197,22 @@ const Do = (e) => {
1196
1197
  default:
1197
1198
  return "center";
1198
1199
  }
1199
- }, [s, w]), C = N(() => {
1200
+ }, [c, w]), C = N(() => {
1200
1201
  v(!0);
1201
- }, []), S = N(() => {
1202
+ }, []), y = N(() => {
1202
1203
  v(!1);
1203
1204
  }, []);
1204
1205
  return /* @__PURE__ */ i(
1205
1206
  "div",
1206
1207
  {
1207
- ref: p,
1208
+ ref: h,
1208
1209
  id: `page-${n}`,
1209
1210
  "data-rp": `page-${n}`,
1210
1211
  ...r,
1211
1212
  style: {
1212
1213
  ...o,
1213
- "--rp-rotate": `${s}deg`,
1214
- "--rp-page-rotate-translate": `${y}`,
1214
+ "--rp-rotate": `${c}deg`,
1215
+ "--rp-page-rotate-translate": `${P}`,
1215
1216
  "--scale-factor": u
1216
1217
  },
1217
1218
  className: lt["rp-page-wrapper"],
@@ -1224,7 +1225,7 @@ const Do = (e) => {
1224
1225
  },
1225
1226
  className: lt["rp-page"],
1226
1227
  children: [
1227
- /* @__PURE__ */ i(Io, { onLoading: C, onLoaded: S, pageNumber: n }),
1228
+ /* @__PURE__ */ i(Io, { onLoading: C, onLoaded: y, pageNumber: n }),
1228
1229
  m && /* @__PURE__ */ i("div", { className: lt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Ct, {}) }),
1229
1230
  l && /* @__PURE__ */ i(Eo, { pageNumber: n }),
1230
1231
  /* @__PURE__ */ i(zo, { pageNumber: n, viewport: w }),
@@ -1265,12 +1266,12 @@ function Wo(e, t) {
1265
1266
  function dt(e, t) {
1266
1267
  t === void 0 && (t = Wo);
1267
1268
  var n, o = [], r, a = !1;
1268
- function s() {
1269
+ function c() {
1269
1270
  for (var l = [], u = 0; u < arguments.length; u++)
1270
1271
  l[u] = arguments[u];
1271
1272
  return a && n === this && t(l, o) || (r = e.apply(this, l), a = !0, n = this, o = l), r;
1272
1273
  }
1273
- return s;
1274
+ return c;
1274
1275
  }
1275
1276
  function Ut(e, t) {
1276
1277
  if (e == null)
@@ -1328,62 +1329,62 @@ var Go = 150, qo = function(t) {
1328
1329
  }, Be = null, Ze = null, je = null;
1329
1330
  process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Be = /* @__PURE__ */ new WeakSet(), Ze = /* @__PURE__ */ new WeakSet(), je = /* @__PURE__ */ new WeakSet());
1330
1331
  function Vo(e) {
1331
- var t, n = e.getColumnOffset, o = e.getColumnStartIndexForOffset, r = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, s = e.getEstimatedTotalHeight, l = e.getEstimatedTotalWidth, u = e.getOffsetForColumnAndAlignment, h = e.getOffsetForRowAndAlignment, m = e.getRowHeight, v = e.getRowOffset, p = e.getRowStartIndexForOffset, w = e.getRowStopIndexForStartIndex, T = e.initInstanceProps, y = e.shouldResetStyleCacheOnItemSizeChange, C = e.validateProps;
1332
- return t = /* @__PURE__ */ function(S) {
1333
- Fo(d, S);
1332
+ var t, n = e.getColumnOffset, o = e.getColumnStartIndexForOffset, r = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, c = e.getEstimatedTotalHeight, l = e.getEstimatedTotalWidth, u = e.getOffsetForColumnAndAlignment, p = e.getOffsetForRowAndAlignment, m = e.getRowHeight, v = e.getRowOffset, h = e.getRowStartIndexForOffset, w = e.getRowStopIndexForStartIndex, T = e.initInstanceProps, P = e.shouldResetStyleCacheOnItemSizeChange, C = e.validateProps;
1333
+ return t = /* @__PURE__ */ function(y) {
1334
+ Fo(d, y);
1334
1335
  function d(g) {
1335
- var c;
1336
- return c = S.call(this, g) || this, c._instanceProps = T(c.props, qt(c)), c._resetIsScrollingTimeoutId = null, c._outerRef = void 0, c.state = {
1337
- instance: qt(c),
1336
+ var s;
1337
+ return s = y.call(this, g) || this, s._instanceProps = T(s.props, qt(s)), s._resetIsScrollingTimeoutId = null, s._outerRef = void 0, s.state = {
1338
+ instance: qt(s),
1338
1339
  isScrolling: !1,
1339
1340
  horizontalScrollDirection: "forward",
1340
- scrollLeft: typeof c.props.initialScrollLeft == "number" ? c.props.initialScrollLeft : 0,
1341
- scrollTop: typeof c.props.initialScrollTop == "number" ? c.props.initialScrollTop : 0,
1341
+ scrollLeft: typeof s.props.initialScrollLeft == "number" ? s.props.initialScrollLeft : 0,
1342
+ scrollTop: typeof s.props.initialScrollTop == "number" ? s.props.initialScrollTop : 0,
1342
1343
  scrollUpdateWasRequested: !1,
1343
1344
  verticalScrollDirection: "forward"
1344
- }, c._callOnItemsRendered = void 0, c._callOnItemsRendered = dt(function(b, _, P, E, x, R, D, A) {
1345
- return c.props.onItemsRendered({
1345
+ }, s._callOnItemsRendered = void 0, s._callOnItemsRendered = dt(function(b, _, S, E, x, R, D, A) {
1346
+ return s.props.onItemsRendered({
1346
1347
  overscanColumnStartIndex: b,
1347
1348
  overscanColumnStopIndex: _,
1348
- overscanRowStartIndex: P,
1349
+ overscanRowStartIndex: S,
1349
1350
  overscanRowStopIndex: E,
1350
1351
  visibleColumnStartIndex: x,
1351
1352
  visibleColumnStopIndex: R,
1352
1353
  visibleRowStartIndex: D,
1353
1354
  visibleRowStopIndex: A
1354
1355
  });
1355
- }), c._callOnScroll = void 0, c._callOnScroll = dt(function(b, _, P, E, x) {
1356
- return c.props.onScroll({
1357
- horizontalScrollDirection: P,
1356
+ }), s._callOnScroll = void 0, s._callOnScroll = dt(function(b, _, S, E, x) {
1357
+ return s.props.onScroll({
1358
+ horizontalScrollDirection: S,
1358
1359
  scrollLeft: b,
1359
1360
  scrollTop: _,
1360
1361
  verticalScrollDirection: E,
1361
1362
  scrollUpdateWasRequested: x
1362
1363
  });
1363
- }), c._getItemStyle = void 0, c._getItemStyle = function(b, _) {
1364
- var P = c.props, E = P.columnWidth, x = P.direction, R = P.rowHeight, D = c._getItemStyleCache(y && E, y && x, y && R), A = b + ":" + _, z;
1364
+ }), s._getItemStyle = void 0, s._getItemStyle = function(b, _) {
1365
+ var S = s.props, E = S.columnWidth, x = S.direction, R = S.rowHeight, D = s._getItemStyleCache(P && E, P && x, P && R), A = b + ":" + _, z;
1365
1366
  if (D.hasOwnProperty(A))
1366
1367
  z = D[A];
1367
1368
  else {
1368
- var L = n(c.props, _, c._instanceProps), I = x === "rtl";
1369
+ var L = n(s.props, _, s._instanceProps), I = x === "rtl";
1369
1370
  D[A] = z = {
1370
1371
  position: "absolute",
1371
1372
  left: I ? void 0 : L,
1372
1373
  right: I ? L : void 0,
1373
- top: v(c.props, b, c._instanceProps),
1374
- height: m(c.props, b, c._instanceProps),
1375
- width: a(c.props, _, c._instanceProps)
1374
+ top: v(s.props, b, s._instanceProps),
1375
+ height: m(s.props, b, s._instanceProps),
1376
+ width: a(s.props, _, s._instanceProps)
1376
1377
  };
1377
1378
  }
1378
1379
  return z;
1379
- }, c._getItemStyleCache = void 0, c._getItemStyleCache = dt(function(b, _, P) {
1380
+ }, s._getItemStyleCache = void 0, s._getItemStyleCache = dt(function(b, _, S) {
1380
1381
  return {};
1381
- }), c._onScroll = function(b) {
1382
- var _ = b.currentTarget, P = _.clientHeight, E = _.clientWidth, x = _.scrollLeft, R = _.scrollTop, D = _.scrollHeight, A = _.scrollWidth;
1383
- c.setState(function(z) {
1382
+ }), s._onScroll = function(b) {
1383
+ var _ = b.currentTarget, S = _.clientHeight, E = _.clientWidth, x = _.scrollLeft, R = _.scrollTop, D = _.scrollHeight, A = _.scrollWidth;
1384
+ s.setState(function(z) {
1384
1385
  if (z.scrollLeft === x && z.scrollTop === R)
1385
1386
  return null;
1386
- var L = c.props.direction, I = x;
1387
+ var L = s.props.direction, I = x;
1387
1388
  if (L === "rtl")
1388
1389
  switch (jt()) {
1389
1390
  case "negative":
@@ -1394,7 +1395,7 @@ function Vo(e) {
1394
1395
  break;
1395
1396
  }
1396
1397
  I = Math.max(0, Math.min(I, A - E));
1397
- var O = Math.max(0, Math.min(R, D - P));
1398
+ var O = Math.max(0, Math.min(R, D - S));
1398
1399
  return {
1399
1400
  isScrolling: !0,
1400
1401
  horizontalScrollDirection: z.scrollLeft < x ? "forward" : "backward",
@@ -1403,55 +1404,55 @@ function Vo(e) {
1403
1404
  verticalScrollDirection: z.scrollTop < R ? "forward" : "backward",
1404
1405
  scrollUpdateWasRequested: !1
1405
1406
  };
1406
- }, c._resetIsScrollingDebounced);
1407
- }, c._outerRefSetter = function(b) {
1408
- var _ = c.props.outerRef;
1409
- c._outerRef = b, typeof _ == "function" ? _(b) : _ != null && typeof _ == "object" && _.hasOwnProperty("current") && (_.current = b);
1410
- }, c._resetIsScrollingDebounced = function() {
1411
- c._resetIsScrollingTimeoutId !== null && Zt(c._resetIsScrollingTimeoutId), c._resetIsScrollingTimeoutId = Ho(c._resetIsScrolling, Go);
1412
- }, c._resetIsScrolling = function() {
1413
- c._resetIsScrollingTimeoutId = null, c.setState({
1407
+ }, s._resetIsScrollingDebounced);
1408
+ }, s._outerRefSetter = function(b) {
1409
+ var _ = s.props.outerRef;
1410
+ s._outerRef = b, typeof _ == "function" ? _(b) : _ != null && typeof _ == "object" && _.hasOwnProperty("current") && (_.current = b);
1411
+ }, s._resetIsScrollingDebounced = function() {
1412
+ s._resetIsScrollingTimeoutId !== null && Zt(s._resetIsScrollingTimeoutId), s._resetIsScrollingTimeoutId = Ho(s._resetIsScrolling, Go);
1413
+ }, s._resetIsScrolling = function() {
1414
+ s._resetIsScrollingTimeoutId = null, s.setState({
1414
1415
  isScrolling: !1
1415
1416
  }, function() {
1416
- c._getItemStyleCache(-1);
1417
+ s._getItemStyleCache(-1);
1417
1418
  });
1418
- }, c;
1419
+ }, s;
1419
1420
  }
1420
- d.getDerivedStateFromProps = function(c, b) {
1421
- return Uo(c, b), C(c), null;
1421
+ d.getDerivedStateFromProps = function(s, b) {
1422
+ return Uo(s, b), C(s), null;
1422
1423
  };
1423
1424
  var f = d.prototype;
1424
- return f.scrollTo = function(c) {
1425
- var b = c.scrollLeft, _ = c.scrollTop;
1426
- b !== void 0 && (b = Math.max(0, b)), _ !== void 0 && (_ = Math.max(0, _)), this.setState(function(P) {
1427
- return b === void 0 && (b = P.scrollLeft), _ === void 0 && (_ = P.scrollTop), P.scrollLeft === b && P.scrollTop === _ ? null : {
1428
- horizontalScrollDirection: P.scrollLeft < b ? "forward" : "backward",
1425
+ return f.scrollTo = function(s) {
1426
+ var b = s.scrollLeft, _ = s.scrollTop;
1427
+ b !== void 0 && (b = Math.max(0, b)), _ !== void 0 && (_ = Math.max(0, _)), this.setState(function(S) {
1428
+ return b === void 0 && (b = S.scrollLeft), _ === void 0 && (_ = S.scrollTop), S.scrollLeft === b && S.scrollTop === _ ? null : {
1429
+ horizontalScrollDirection: S.scrollLeft < b ? "forward" : "backward",
1429
1430
  scrollLeft: b,
1430
1431
  scrollTop: _,
1431
1432
  scrollUpdateWasRequested: !0,
1432
- verticalScrollDirection: P.scrollTop < _ ? "forward" : "backward"
1433
+ verticalScrollDirection: S.scrollTop < _ ? "forward" : "backward"
1433
1434
  };
1434
1435
  }, this._resetIsScrollingDebounced);
1435
- }, f.scrollToItem = function(c) {
1436
- var b = c.align, _ = b === void 0 ? "auto" : b, P = c.columnIndex, E = c.rowIndex, x = this.props, R = x.columnCount, D = x.height, A = x.rowCount, z = x.width, L = this.state, I = L.scrollLeft, O = L.scrollTop, M = $o();
1437
- P !== void 0 && (P = Math.max(0, Math.min(P, R - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, A - 1)));
1438
- var G = s(this.props, this._instanceProps), Z = l(this.props, this._instanceProps), j = Z > z ? M : 0, U = G > D ? M : 0;
1436
+ }, f.scrollToItem = function(s) {
1437
+ var b = s.align, _ = b === void 0 ? "auto" : b, S = s.columnIndex, E = s.rowIndex, x = this.props, R = x.columnCount, D = x.height, A = x.rowCount, z = x.width, L = this.state, I = L.scrollLeft, O = L.scrollTop, W = $o();
1438
+ S !== void 0 && (S = Math.max(0, Math.min(S, R - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, A - 1)));
1439
+ var G = c(this.props, this._instanceProps), Z = l(this.props, this._instanceProps), j = Z > z ? W : 0, U = G > D ? W : 0;
1439
1440
  this.scrollTo({
1440
- scrollLeft: P !== void 0 ? u(this.props, P, _, I, this._instanceProps, U) : I,
1441
- scrollTop: E !== void 0 ? h(this.props, E, _, O, this._instanceProps, j) : O
1441
+ scrollLeft: S !== void 0 ? u(this.props, S, _, I, this._instanceProps, U) : I,
1442
+ scrollTop: E !== void 0 ? p(this.props, E, _, O, this._instanceProps, j) : O
1442
1443
  });
1443
1444
  }, f.componentDidMount = function() {
1444
- var c = this.props, b = c.initialScrollLeft, _ = c.initialScrollTop;
1445
+ var s = this.props, b = s.initialScrollLeft, _ = s.initialScrollTop;
1445
1446
  if (this._outerRef != null) {
1446
- var P = this._outerRef;
1447
- typeof b == "number" && (P.scrollLeft = b), typeof _ == "number" && (P.scrollTop = _);
1447
+ var S = this._outerRef;
1448
+ typeof b == "number" && (S.scrollLeft = b), typeof _ == "number" && (S.scrollTop = _);
1448
1449
  }
1449
1450
  this._callPropsCallbacks();
1450
1451
  }, f.componentDidUpdate = function() {
1451
- var c = this.props.direction, b = this.state, _ = b.scrollLeft, P = b.scrollTop, E = b.scrollUpdateWasRequested;
1452
+ var s = this.props.direction, b = this.state, _ = b.scrollLeft, S = b.scrollTop, E = b.scrollUpdateWasRequested;
1452
1453
  if (E && this._outerRef != null) {
1453
1454
  var x = this._outerRef;
1454
- if (c === "rtl")
1455
+ if (s === "rtl")
1455
1456
  switch (jt()) {
1456
1457
  case "negative":
1457
1458
  x.scrollLeft = -_;
@@ -1466,14 +1467,14 @@ function Vo(e) {
1466
1467
  }
1467
1468
  else
1468
1469
  x.scrollLeft = Math.max(0, _);
1469
- x.scrollTop = Math.max(0, P);
1470
+ x.scrollTop = Math.max(0, S);
1470
1471
  }
1471
1472
  this._callPropsCallbacks();
1472
1473
  }, f.componentWillUnmount = function() {
1473
1474
  this._resetIsScrollingTimeoutId !== null && Zt(this._resetIsScrollingTimeoutId);
1474
1475
  }, f.render = function() {
1475
- var c = this.props, b = c.children, _ = c.className, P = c.columnCount, E = c.direction, x = c.height, R = c.innerRef, D = c.innerElementType, A = c.innerTagName, z = c.itemData, L = c.itemKey, I = L === void 0 ? qo : L, O = c.outerElementType, M = c.outerTagName, G = c.rowCount, Z = c.style, j = c.useIsScrolling, U = c.width, Q = this.state.isScrolling, X = this._getHorizontalRangeToRender(), le = X[0], ae = X[1], de = this._getVerticalRangeToRender(), te = de[0], ze = de[1], Re = [];
1476
- if (P > 0 && G)
1476
+ var s = this.props, b = s.children, _ = s.className, S = s.columnCount, E = s.direction, x = s.height, R = s.innerRef, D = s.innerElementType, A = s.innerTagName, z = s.itemData, L = s.itemKey, I = L === void 0 ? qo : L, O = s.outerElementType, W = s.outerTagName, G = s.rowCount, Z = s.style, j = s.useIsScrolling, U = s.width, Q = this.state.isScrolling, X = this._getHorizontalRangeToRender(), le = X[0], ae = X[1], de = this._getVerticalRangeToRender(), te = de[0], ze = de[1], Re = [];
1477
+ if (S > 0 && G)
1477
1478
  for (var Te = te; Te <= ze; Te++)
1478
1479
  for (var we = le; we <= ae; we++)
1479
1480
  Re.push(Ue(b, {
@@ -1488,8 +1489,8 @@ function Vo(e) {
1488
1489
  rowIndex: Te,
1489
1490
  style: this._getItemStyle(Te, we)
1490
1491
  }));
1491
- var nt = s(this.props, this._instanceProps), rt = l(this.props, this._instanceProps);
1492
- return Ue(O || M || "div", {
1492
+ var nt = c(this.props, this._instanceProps), rt = l(this.props, this._instanceProps);
1493
+ return Ue(O || W || "div", {
1493
1494
  className: _,
1494
1495
  onScroll: this._onScroll,
1495
1496
  ref: this._outerRefSetter,
@@ -1512,27 +1513,27 @@ function Vo(e) {
1512
1513
  }
1513
1514
  }));
1514
1515
  }, f._callPropsCallbacks = function() {
1515
- var c = this.props, b = c.columnCount, _ = c.onItemsRendered, P = c.onScroll, E = c.rowCount;
1516
+ var s = this.props, b = s.columnCount, _ = s.onItemsRendered, S = s.onScroll, E = s.rowCount;
1516
1517
  if (typeof _ == "function" && b > 0 && E > 0) {
1517
- var x = this._getHorizontalRangeToRender(), R = x[0], D = x[1], A = x[2], z = x[3], L = this._getVerticalRangeToRender(), I = L[0], O = L[1], M = L[2], G = L[3];
1518
- this._callOnItemsRendered(R, D, I, O, A, z, M, G);
1518
+ var x = this._getHorizontalRangeToRender(), R = x[0], D = x[1], A = x[2], z = x[3], L = this._getVerticalRangeToRender(), I = L[0], O = L[1], W = L[2], G = L[3];
1519
+ this._callOnItemsRendered(R, D, I, O, A, z, W, G);
1519
1520
  }
1520
- if (typeof P == "function") {
1521
+ if (typeof S == "function") {
1521
1522
  var Z = this.state, j = Z.horizontalScrollDirection, U = Z.scrollLeft, Q = Z.scrollTop, X = Z.scrollUpdateWasRequested, le = Z.verticalScrollDirection;
1522
1523
  this._callOnScroll(U, Q, j, le, X);
1523
1524
  }
1524
1525
  }, f._getHorizontalRangeToRender = function() {
1525
- var c = this.props, b = c.columnCount, _ = c.overscanColumnCount, P = c.overscanColumnsCount, E = c.overscanCount, x = c.rowCount, R = this.state, D = R.horizontalScrollDirection, A = R.isScrolling, z = R.scrollLeft, L = _ || P || E || 1;
1526
+ var s = this.props, b = s.columnCount, _ = s.overscanColumnCount, S = s.overscanColumnsCount, E = s.overscanCount, x = s.rowCount, R = this.state, D = R.horizontalScrollDirection, A = R.isScrolling, z = R.scrollLeft, L = _ || S || E || 1;
1526
1527
  if (b === 0 || x === 0)
1527
1528
  return [0, 0, 0, 0];
1528
- var I = o(this.props, z, this._instanceProps), O = r(this.props, I, z, this._instanceProps), M = !A || D === "backward" ? Math.max(1, L) : 1, G = !A || D === "forward" ? Math.max(1, L) : 1;
1529
- return [Math.max(0, I - M), Math.max(0, Math.min(b - 1, O + G)), I, O];
1529
+ var I = o(this.props, z, this._instanceProps), O = r(this.props, I, z, this._instanceProps), W = !A || D === "backward" ? Math.max(1, L) : 1, G = !A || D === "forward" ? Math.max(1, L) : 1;
1530
+ return [Math.max(0, I - W), Math.max(0, Math.min(b - 1, O + G)), I, O];
1530
1531
  }, f._getVerticalRangeToRender = function() {
1531
- var c = this.props, b = c.columnCount, _ = c.overscanCount, P = c.overscanRowCount, E = c.overscanRowsCount, x = c.rowCount, R = this.state, D = R.isScrolling, A = R.verticalScrollDirection, z = R.scrollTop, L = P || E || _ || 1;
1532
+ var s = this.props, b = s.columnCount, _ = s.overscanCount, S = s.overscanRowCount, E = s.overscanRowsCount, x = s.rowCount, R = this.state, D = R.isScrolling, A = R.verticalScrollDirection, z = R.scrollTop, L = S || E || _ || 1;
1532
1533
  if (b === 0 || x === 0)
1533
1534
  return [0, 0, 0, 0];
1534
- var I = p(this.props, z, this._instanceProps), O = w(this.props, I, z, this._instanceProps), M = !D || A === "backward" ? Math.max(1, L) : 1, G = !D || A === "forward" ? Math.max(1, L) : 1;
1535
- return [Math.max(0, I - M), Math.max(0, Math.min(x - 1, O + G)), I, O];
1535
+ var I = h(this.props, z, this._instanceProps), O = w(this.props, I, z, this._instanceProps), W = !D || A === "backward" ? Math.max(1, L) : 1, G = !D || A === "forward" ? Math.max(1, L) : 1;
1536
+ return [Math.max(0, I - W), Math.max(0, Math.min(x - 1, O + G)), I, O];
1536
1537
  }, d;
1537
1538
  }(Jn), t.defaultProps = {
1538
1539
  direction: "ltr",
@@ -1541,9 +1542,9 @@ function Vo(e) {
1541
1542
  }, t;
1542
1543
  }
1543
1544
  var Uo = function(t, n) {
1544
- var o = t.children, r = t.direction, a = t.height, s = t.innerTagName, l = t.outerTagName, u = t.overscanColumnsCount, h = t.overscanCount, m = t.overscanRowsCount, v = t.width, p = n.instance;
1545
+ var o = t.children, r = t.direction, a = t.height, c = t.innerTagName, l = t.outerTagName, u = t.overscanColumnsCount, p = t.overscanCount, m = t.overscanRowsCount, v = t.width, h = n.instance;
1545
1546
  if (process.env.NODE_ENV !== "production") {
1546
- if (typeof h == "number" && Be && !Be.has(p) && (Be.add(p), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof 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.")), (s != null || l != 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)
1547
+ if (typeof p == "number" && Be && !Be.has(h) && (Be.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof u == "number" || typeof m == "number") && Ze && !Ze.has(h) && (Ze.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || l != null) && je && !je.has(h) && (je.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
1547
1548
  throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
1548
1549
  switch (r) {
1549
1550
  case "ltr":
@@ -1558,31 +1559,31 @@ var Uo = function(t, n) {
1558
1559
  throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
1559
1560
  }
1560
1561
  }, Kt = 50, Pn = function(t, n) {
1561
- var o = t.rowCount, r = n.rowMetadataMap, a = n.estimatedRowHeight, s = n.lastMeasuredRowIndex, l = 0;
1562
- if (s >= o && (s = o - 1), s >= 0) {
1563
- var u = r[s];
1562
+ var o = t.rowCount, r = n.rowMetadataMap, a = n.estimatedRowHeight, c = n.lastMeasuredRowIndex, l = 0;
1563
+ if (c >= o && (c = o - 1), c >= 0) {
1564
+ var u = r[c];
1564
1565
  l = u.offset + u.size;
1565
1566
  }
1566
- var h = o - s - 1, m = h * a;
1567
+ var p = o - c - 1, m = p * a;
1567
1568
  return l + m;
1568
1569
  }, Sn = function(t, n) {
1569
- var o = t.columnCount, r = n.columnMetadataMap, a = n.estimatedColumnWidth, s = n.lastMeasuredColumnIndex, l = 0;
1570
- if (s >= o && (s = o - 1), s >= 0) {
1571
- var u = r[s];
1570
+ var o = t.columnCount, r = n.columnMetadataMap, a = n.estimatedColumnWidth, c = n.lastMeasuredColumnIndex, l = 0;
1571
+ if (c >= o && (c = o - 1), c >= 0) {
1572
+ var u = r[c];
1572
1573
  l = u.offset + u.size;
1573
1574
  }
1574
- var h = o - s - 1, m = h * a;
1575
+ var p = o - c - 1, m = p * a;
1575
1576
  return l + m;
1576
1577
  }, me = function(t, n, o, r) {
1577
- var a, s, l;
1578
- if (t === "column" ? (a = r.columnMetadataMap, s = n.columnWidth, l = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, s = n.rowHeight, l = r.lastMeasuredRowIndex), o > l) {
1578
+ var a, c, l;
1579
+ if (t === "column" ? (a = r.columnMetadataMap, c = n.columnWidth, l = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, c = n.rowHeight, l = r.lastMeasuredRowIndex), o > l) {
1579
1580
  var u = 0;
1580
1581
  if (l >= 0) {
1581
- var h = a[l];
1582
- u = h.offset + h.size;
1582
+ var p = a[l];
1583
+ u = p.offset + p.size;
1583
1584
  }
1584
1585
  for (var m = l + 1; m <= o; m++) {
1585
- var v = s(m);
1586
+ var v = c(m);
1586
1587
  a[m] = {
1587
1588
  offset: u,
1588
1589
  size: v
@@ -1592,34 +1593,34 @@ var Uo = function(t, n) {
1592
1593
  }
1593
1594
  return a[o];
1594
1595
  }, Xt = function(t, n, o, r) {
1595
- var a, s;
1596
- t === "column" ? (a = o.columnMetadataMap, s = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, s = o.lastMeasuredRowIndex);
1597
- var l = s > 0 ? a[s].offset : 0;
1598
- return l >= r ? yn(t, n, o, s, 0, r) : Bo(t, n, o, Math.max(0, s), r);
1599
- }, yn = function(t, n, o, r, a, s) {
1596
+ var a, c;
1597
+ t === "column" ? (a = o.columnMetadataMap, c = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, c = o.lastMeasuredRowIndex);
1598
+ var l = c > 0 ? a[c].offset : 0;
1599
+ return l >= r ? yn(t, n, o, c, 0, r) : Bo(t, n, o, Math.max(0, c), r);
1600
+ }, yn = function(t, n, o, r, a, c) {
1600
1601
  for (; a <= r; ) {
1601
1602
  var l = a + Math.floor((r - a) / 2), u = me(t, n, l, o).offset;
1602
- if (u === s)
1603
+ if (u === c)
1603
1604
  return l;
1604
- u < s ? a = l + 1 : u > s && (r = l - 1);
1605
+ u < c ? a = l + 1 : u > c && (r = l - 1);
1605
1606
  }
1606
1607
  return a > 0 ? a - 1 : 0;
1607
1608
  }, Bo = function(t, n, o, r, a) {
1608
- for (var s = t === "column" ? n.columnCount : n.rowCount, l = 1; r < s && me(t, n, r, o).offset < a; )
1609
+ for (var c = t === "column" ? n.columnCount : n.rowCount, l = 1; r < c && me(t, n, r, o).offset < a; )
1609
1610
  r += l, l *= 2;
1610
- return yn(t, n, o, Math.min(r, s - 1), Math.floor(r / 2), a);
1611
- }, Yt = function(t, n, o, r, a, s, l) {
1612
- var u = t === "column" ? n.width : n.height, h = me(t, n, o, s), m = t === "column" ? Sn(n, s) : Pn(n, s), v = Math.max(0, Math.min(m - u, h.offset)), p = Math.max(0, h.offset - u + l + h.size);
1613
- switch (r === "smart" && (a >= p - u && a <= v + u ? r = "auto" : r = "center"), r) {
1611
+ return yn(t, n, o, Math.min(r, c - 1), Math.floor(r / 2), a);
1612
+ }, Yt = function(t, n, o, r, a, c, l) {
1613
+ var u = t === "column" ? n.width : n.height, p = me(t, n, o, c), m = t === "column" ? Sn(n, c) : Pn(n, c), v = Math.max(0, Math.min(m - u, p.offset)), h = Math.max(0, p.offset - u + l + p.size);
1614
+ switch (r === "smart" && (a >= h - u && a <= v + u ? r = "auto" : r = "center"), r) {
1614
1615
  case "start":
1615
1616
  return v;
1616
1617
  case "end":
1617
- return p;
1618
+ return h;
1618
1619
  case "center":
1619
- return Math.round(p + (v - p) / 2);
1620
+ return Math.round(h + (v - h) / 2);
1620
1621
  case "auto":
1621
1622
  default:
1622
- return a >= p && a <= v ? a : p > v || a < p ? p : v;
1623
+ return a >= h && a <= v ? a : h > v || a < h ? h : v;
1623
1624
  }
1624
1625
  }, Zo = /* @__PURE__ */ Vo({
1625
1626
  getColumnOffset: function(t, n, o) {
@@ -1629,8 +1630,8 @@ var Uo = function(t, n) {
1629
1630
  return Xt("column", t, o, n);
1630
1631
  },
1631
1632
  getColumnStopIndexForStartIndex: function(t, n, o, r) {
1632
- for (var a = t.columnCount, s = t.width, l = me("column", t, n, r), u = o + s, h = l.offset + l.size, m = n; m < a - 1 && h < u; )
1633
- m++, h += me("column", t, m, r).size;
1633
+ for (var a = t.columnCount, c = t.width, l = me("column", t, n, r), u = o + c, p = l.offset + l.size, m = n; m < a - 1 && p < u; )
1634
+ m++, p += me("column", t, m, r).size;
1634
1635
  return m;
1635
1636
  },
1636
1637
  getColumnWidth: function(t, n, o) {
@@ -1638,11 +1639,11 @@ var Uo = function(t, n) {
1638
1639
  },
1639
1640
  getEstimatedTotalHeight: Pn,
1640
1641
  getEstimatedTotalWidth: Sn,
1641
- getOffsetForColumnAndAlignment: function(t, n, o, r, a, s) {
1642
- return Yt("column", t, n, o, r, a, s);
1642
+ getOffsetForColumnAndAlignment: function(t, n, o, r, a, c) {
1643
+ return Yt("column", t, n, o, r, a, c);
1643
1644
  },
1644
- getOffsetForRowAndAlignment: function(t, n, o, r, a, s) {
1645
- return Yt("row", t, n, o, r, a, s);
1645
+ getOffsetForRowAndAlignment: function(t, n, o, r, a, c) {
1646
+ return Yt("row", t, n, o, r, a, c);
1646
1647
  },
1647
1648
  getRowOffset: function(t, n, o) {
1648
1649
  return me("row", t, n, o).offset;
@@ -1654,12 +1655,12 @@ var Uo = function(t, n) {
1654
1655
  return Xt("row", t, o, n);
1655
1656
  },
1656
1657
  getRowStopIndexForStartIndex: function(t, n, o, r) {
1657
- for (var a = t.rowCount, s = t.height, l = me("row", t, n, r), u = o + s, h = l.offset + l.size, m = n; m < a - 1 && h < u; )
1658
- m++, h += me("row", t, m, r).size;
1658
+ for (var a = t.rowCount, c = t.height, l = me("row", t, n, r), u = o + c, p = l.offset + l.size, m = n; m < a - 1 && p < u; )
1659
+ m++, p += me("row", t, m, r).size;
1659
1660
  return m;
1660
1661
  },
1661
1662
  initInstanceProps: function(t, n) {
1662
- var o = t, r = o.estimatedColumnWidth, a = o.estimatedRowHeight, s = {
1663
+ var o = t, r = o.estimatedColumnWidth, a = o.estimatedRowHeight, c = {
1663
1664
  columnMetadataMap: {},
1664
1665
  estimatedColumnWidth: r || Kt,
1665
1666
  estimatedRowHeight: a || Kt,
@@ -1678,9 +1679,9 @@ var Uo = function(t, n) {
1678
1679
  shouldForceUpdate: u
1679
1680
  });
1680
1681
  }, n.resetAfterIndices = function(l) {
1681
- var u = l.columnIndex, h = l.rowIndex, m = l.shouldForceUpdate, v = m === void 0 ? !0 : m;
1682
- typeof u == "number" && (s.lastMeasuredColumnIndex = Math.min(s.lastMeasuredColumnIndex, u - 1)), typeof h == "number" && (s.lastMeasuredRowIndex = Math.min(s.lastMeasuredRowIndex, h - 1)), n._getItemStyleCache(-1), v && n.forceUpdate();
1683
- }, s;
1682
+ var u = l.columnIndex, p = l.rowIndex, m = l.shouldForceUpdate, v = m === void 0 ? !0 : m;
1683
+ typeof u == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, u - 1)), typeof p == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, p - 1)), n._getItemStyleCache(-1), v && n.forceUpdate();
1684
+ }, c;
1684
1685
  },
1685
1686
  shouldResetStyleCacheOnItemSizeChange: !1,
1686
1687
  validateProps: function(t) {
@@ -1709,31 +1710,31 @@ function Xo(e, t) {
1709
1710
  return !Jt(n, r) && !Jt(o, a);
1710
1711
  }
1711
1712
  const Yo = () => {
1712
- const { viewMode: e } = Ae(), { scrollMode: t } = De(), { setColumnCount: n } = dn(), { virtualScrollableElementRef: o } = et(), r = qe(), a = W(() => r.heights.length, [r.heights]), s = W(() => t === ee.HORIZONTAL_SCROLLING ? a : e === He.DUAL_PAGE ? 2 : 1, [e, t, t, a, o]), l = W(() => r.widths.reduce((T, y, C) => {
1713
- const S = C % s;
1714
- return (!T[S] || y > T[S]) && (T[S] = y), T;
1715
- }, []), [r.widths, s]), u = N(
1713
+ const { viewMode: e } = Ae(), { scrollMode: t } = De(), { setColumnCount: n } = dn(), { virtualScrollableElementRef: o } = et(), r = qe(), a = M(() => r.heights.length, [r.heights]), c = M(() => t === ee.HORIZONTAL_SCROLLING ? a : e === He.DUAL_PAGE ? 2 : 1, [e, t, t, a, o]), l = M(() => r.widths.reduce((T, P, C) => {
1714
+ const y = C % c;
1715
+ return (!T[y] || P > T[y]) && (T[y] = P), T;
1716
+ }, []), [r.widths, c]), u = N(
1716
1717
  (w) => {
1717
1718
  const T = w % l.length;
1718
1719
  return l[T] || 0;
1719
1720
  },
1720
1721
  [l]
1721
- ), h = N(
1722
+ ), p = N(
1722
1723
  (w) => r.heights[w] || 0,
1723
1724
  [r.heights]
1724
1725
  );
1725
1726
  k(() => {
1726
- n(s);
1727
- }, [s, n]);
1728
- const m = W(() => t === ee.HORIZONTAL_SCROLLING || t === ee.PAGE_SCROLLING ? 1 : Math.round(a / s), [s, a, t]), v = W(() => r.heights.reduce((w, T) => w + T, 0) / r.heights.length || 0, [r]), p = W(() => r.widths.reduce((w, T) => w + T, 0) / r.heights.length || 0, [r]);
1727
+ n(c);
1728
+ }, [c, n]);
1729
+ const m = M(() => t === ee.HORIZONTAL_SCROLLING || t === ee.PAGE_SCROLLING ? 1 : Math.round(a / c), [c, a, t]), v = M(() => r.heights.reduce((w, T) => w + T, 0) / r.heights.length || 0, [r]), h = M(() => r.widths.reduce((w, T) => w + T, 0) / r.heights.length || 0, [r]);
1729
1730
  return {
1730
1731
  rowCount: m,
1731
- rowHeight: h,
1732
- columnCount: s,
1732
+ rowHeight: p,
1733
+ columnCount: c,
1733
1734
  columnWidth: u,
1734
1735
  pageDimension: r,
1735
1736
  estimatedRowHeight: v,
1736
- estimatedColumnWidth: p
1737
+ estimatedColumnWidth: h
1737
1738
  };
1738
1739
  };
1739
1740
  let oe;
@@ -1753,71 +1754,71 @@ ht == null || tn == null ? (_t = pt, bt = function(t) {
1753
1754
  return [n, o];
1754
1755
  });
1755
1756
  function Jo(e) {
1756
- let t, n, o, r, a, s, l;
1757
+ let t, n, o, r, a, c, l;
1757
1758
  const u = typeof document < "u" && document.attachEvent;
1758
1759
  if (!u) {
1759
- s = function(S) {
1760
- const d = S.__resizeTriggers__, f = d.firstElementChild, g = d.lastElementChild, c = f.firstElementChild;
1761
- g.scrollLeft = g.scrollWidth, g.scrollTop = g.scrollHeight, c.style.width = f.offsetWidth + 1 + "px", c.style.height = f.offsetHeight + 1 + "px", f.scrollLeft = f.scrollWidth, f.scrollTop = f.scrollHeight;
1762
- }, a = function(S) {
1763
- return S.offsetWidth !== S.__resizeLast__.width || S.offsetHeight !== S.__resizeLast__.height;
1764
- }, l = function(S) {
1765
- if (S.target.className && typeof S.target.className.indexOf == "function" && S.target.className.indexOf("contract-trigger") < 0 && S.target.className.indexOf("expand-trigger") < 0)
1760
+ c = function(y) {
1761
+ const d = y.__resizeTriggers__, f = d.firstElementChild, g = d.lastElementChild, s = f.firstElementChild;
1762
+ 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;
1763
+ }, a = function(y) {
1764
+ return y.offsetWidth !== y.__resizeLast__.width || y.offsetHeight !== y.__resizeLast__.height;
1765
+ }, l = function(y) {
1766
+ if (y.target.className && typeof y.target.className.indexOf == "function" && y.target.className.indexOf("contract-trigger") < 0 && y.target.className.indexOf("expand-trigger") < 0)
1766
1767
  return;
1767
1768
  const d = this;
1768
- s(this), this.__resizeRAF__ && _t(this.__resizeRAF__), this.__resizeRAF__ = bt(function() {
1769
- a(d) && (d.__resizeLast__.width = d.offsetWidth, d.__resizeLast__.height = d.offsetHeight, d.__resizeListeners__.forEach(function(c) {
1770
- c.call(d, S);
1769
+ c(this), this.__resizeRAF__ && _t(this.__resizeRAF__), this.__resizeRAF__ = bt(function() {
1770
+ a(d) && (d.__resizeLast__.width = d.offsetWidth, d.__resizeLast__.height = d.offsetHeight, d.__resizeListeners__.forEach(function(s) {
1771
+ s.call(d, y);
1771
1772
  }));
1772
1773
  });
1773
1774
  };
1774
- let p = !1, w = "";
1775
+ let h = !1, w = "";
1775
1776
  o = "animationstart";
1776
1777
  const T = "Webkit Moz O ms".split(" ");
1777
- let y = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), C = "";
1778
+ let P = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), C = "";
1778
1779
  {
1779
- const S = document.createElement("fakeelement");
1780
- if (S.style.animationName !== void 0 && (p = !0), p === !1) {
1780
+ const y = document.createElement("fakeelement");
1781
+ if (y.style.animationName !== void 0 && (h = !0), h === !1) {
1781
1782
  for (let d = 0; d < T.length; d++)
1782
- if (S.style[T[d] + "AnimationName"] !== void 0) {
1783
- C = T[d], w = "-" + C.toLowerCase() + "-", o = y[d], p = !0;
1783
+ if (y.style[T[d] + "AnimationName"] !== void 0) {
1784
+ C = T[d], w = "-" + C.toLowerCase() + "-", o = P[d], h = !0;
1784
1785
  break;
1785
1786
  }
1786
1787
  }
1787
1788
  }
1788
1789
  n = "resizeanim", t = "@" + w + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = w + "animation: 1ms " + n + "; ";
1789
1790
  }
1790
- const h = function(p) {
1791
- if (!p.getElementById("detectElementResize")) {
1792
- const w = (t || "") + ".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%; }', T = p.head || p.getElementsByTagName("head")[0], y = p.createElement("style");
1793
- y.id = "detectElementResize", y.type = "text/css", e != null && y.setAttribute("nonce", e), y.styleSheet ? y.styleSheet.cssText = w : y.appendChild(p.createTextNode(w)), T.appendChild(y);
1791
+ const p = function(h) {
1792
+ if (!h.getElementById("detectElementResize")) {
1793
+ const w = (t || "") + ".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%; }', T = h.head || h.getElementsByTagName("head")[0], P = h.createElement("style");
1794
+ P.id = "detectElementResize", P.type = "text/css", e != null && P.setAttribute("nonce", e), P.styleSheet ? P.styleSheet.cssText = w : P.appendChild(h.createTextNode(w)), T.appendChild(P);
1794
1795
  }
1795
1796
  };
1796
1797
  return {
1797
- addResizeListener: function(p, w) {
1798
+ addResizeListener: function(h, w) {
1798
1799
  if (u)
1799
- p.attachEvent("onresize", w);
1800
+ h.attachEvent("onresize", w);
1800
1801
  else {
1801
- if (!p.__resizeTriggers__) {
1802
- const T = p.ownerDocument, y = oe.getComputedStyle(p);
1803
- y && y.position === "static" && (p.style.position = "relative"), h(T), p.__resizeLast__ = {}, p.__resizeListeners__ = [], (p.__resizeTriggers__ = T.createElement("div")).className = "resize-triggers";
1802
+ if (!h.__resizeTriggers__) {
1803
+ const T = h.ownerDocument, P = oe.getComputedStyle(h);
1804
+ P && P.position === "static" && (h.style.position = "relative"), p(T), h.__resizeLast__ = {}, h.__resizeListeners__ = [], (h.__resizeTriggers__ = T.createElement("div")).className = "resize-triggers";
1804
1805
  const C = T.createElement("div");
1805
1806
  C.className = "expand-trigger", C.appendChild(T.createElement("div"));
1806
- const S = T.createElement("div");
1807
- S.className = "contract-trigger", p.__resizeTriggers__.appendChild(C), p.__resizeTriggers__.appendChild(S), p.appendChild(p.__resizeTriggers__), s(p), p.addEventListener("scroll", l, !0), o && (p.__resizeTriggers__.__animationListener__ = function(f) {
1808
- f.animationName === n && s(p);
1809
- }, p.__resizeTriggers__.addEventListener(o, p.__resizeTriggers__.__animationListener__));
1807
+ const y = T.createElement("div");
1808
+ y.className = "contract-trigger", h.__resizeTriggers__.appendChild(C), h.__resizeTriggers__.appendChild(y), h.appendChild(h.__resizeTriggers__), c(h), h.addEventListener("scroll", l, !0), o && (h.__resizeTriggers__.__animationListener__ = function(f) {
1809
+ f.animationName === n && c(h);
1810
+ }, h.__resizeTriggers__.addEventListener(o, h.__resizeTriggers__.__animationListener__));
1810
1811
  }
1811
- p.__resizeListeners__.push(w);
1812
+ h.__resizeListeners__.push(w);
1812
1813
  }
1813
1814
  },
1814
- removeResizeListener: function(p, w) {
1815
+ removeResizeListener: function(h, w) {
1815
1816
  if (u)
1816
- p.detachEvent("onresize", w);
1817
- else if (p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(w), 1), !p.__resizeListeners__.length) {
1818
- p.removeEventListener("scroll", l, !0), p.__resizeTriggers__.__animationListener__ && (p.__resizeTriggers__.removeEventListener(o, p.__resizeTriggers__.__animationListener__), p.__resizeTriggers__.__animationListener__ = null);
1817
+ h.detachEvent("onresize", w);
1818
+ else if (h.__resizeListeners__.splice(h.__resizeListeners__.indexOf(w), 1), !h.__resizeListeners__.length) {
1819
+ h.removeEventListener("scroll", l, !0), h.__resizeTriggers__.__animationListener__ && (h.__resizeTriggers__.removeEventListener(o, h.__resizeTriggers__.__animationListener__), h.__resizeTriggers__.__animationListener__ = null);
1819
1820
  try {
1820
- p.__resizeTriggers__ = !p.removeChild(p.__resizeTriggers__);
1821
+ h.__resizeTriggers__ = !h.removeChild(h.__resizeTriggers__);
1821
1822
  } catch {
1822
1823
  }
1823
1824
  }
@@ -1839,16 +1840,16 @@ class Qo extends Qn {
1839
1840
  onResize: r
1840
1841
  } = this.props;
1841
1842
  if (this._parentNode) {
1842
- const a = window.getComputedStyle(this._parentNode) || {}, s = parseFloat(a.paddingLeft || "0"), l = parseFloat(a.paddingRight || "0"), u = parseFloat(a.paddingTop || "0"), h = parseFloat(a.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), v = m.height - u - h, p = m.width - s - l, w = this._parentNode.offsetHeight - u - h, T = this._parentNode.offsetWidth - s - l;
1843
- (!n && (this.state.height !== w || this.state.scaledHeight !== v) || !o && (this.state.width !== T || this.state.scaledWidth !== p)) && (this.setState({
1843
+ const a = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(a.paddingLeft || "0"), l = parseFloat(a.paddingRight || "0"), u = parseFloat(a.paddingTop || "0"), p = parseFloat(a.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), v = m.height - u - p, h = m.width - c - l, w = this._parentNode.offsetHeight - u - p, T = this._parentNode.offsetWidth - c - l;
1844
+ (!n && (this.state.height !== w || this.state.scaledHeight !== v) || !o && (this.state.width !== T || this.state.scaledWidth !== h)) && (this.setState({
1844
1845
  height: w,
1845
1846
  width: T,
1846
1847
  scaledHeight: v,
1847
- scaledWidth: p
1848
+ scaledWidth: h
1848
1849
  }), typeof r == "function" && r({
1849
1850
  height: w,
1850
1851
  scaledHeight: v,
1851
- scaledWidth: p,
1852
+ scaledWidth: h,
1852
1853
  width: T
1853
1854
  }));
1854
1855
  }
@@ -1878,40 +1879,40 @@ class Qo extends Qn {
1878
1879
  defaultWidth: o,
1879
1880
  disableHeight: r = !1,
1880
1881
  disableWidth: a = !1,
1881
- doNotBailOutOnEmptyChildren: s = !1,
1882
+ doNotBailOutOnEmptyChildren: c = !1,
1882
1883
  nonce: l,
1883
1884
  onResize: u,
1884
- style: h = {},
1885
+ style: p = {},
1885
1886
  tagName: m = "div",
1886
1887
  ...v
1887
1888
  } = this.props, {
1888
- height: p,
1889
+ height: h,
1889
1890
  scaledHeight: w,
1890
1891
  scaledWidth: T,
1891
- width: y
1892
+ width: P
1892
1893
  } = this.state, C = {
1893
1894
  overflow: "visible"
1894
- }, S = {};
1895
+ }, y = {};
1895
1896
  let d = !1;
1896
- return r || (p === 0 && (d = !0), C.height = 0, S.height = p, S.scaledHeight = w), a || (y === 0 && (d = !0), C.width = 0, S.width = y, S.scaledWidth = T), s && (d = !1), Ue(m, {
1897
+ return r || (h === 0 && (d = !0), C.height = 0, y.height = h, y.scaledHeight = w), a || (P === 0 && (d = !0), C.width = 0, y.width = P, y.scaledWidth = T), c && (d = !1), Ue(m, {
1897
1898
  ref: this._setRef,
1898
1899
  style: {
1899
1900
  ...C,
1900
- ...h
1901
+ ...p
1901
1902
  },
1902
1903
  ...v
1903
- }, !d && t(S));
1904
+ }, !d && t(y));
1904
1905
  }
1905
1906
  }
1906
1907
  const ei = ({ widths: e, heights: t }) => {
1907
- const { focusedPage: n, totalPages: o } = ie(), r = W(() => {
1908
+ const { focusedPage: n, totalPages: o } = ie(), r = M(() => {
1908
1909
  const l = [], u = Math.ceil(n / 2) * 2 - 1;
1909
1910
  if (l.push(u), u + 1 < o) {
1910
- const h = u + 1;
1911
- l.push(h);
1911
+ const p = u + 1;
1912
+ l.push(p);
1912
1913
  }
1913
1914
  return l;
1914
- }, [n, o]), a = W(() => [
1915
+ }, [n, o]), a = M(() => [
1915
1916
  {
1916
1917
  position: "absolute",
1917
1918
  left: 0,
@@ -1925,14 +1926,14 @@ const ei = ({ widths: e, heights: t }) => {
1925
1926
  width: e(n),
1926
1927
  height: t(n)
1927
1928
  }
1928
- ], [e, t, r]), s = W(() => a.reduce((l, u) => l + Number(u.width || 0), 0), [a]);
1929
- return /* @__PURE__ */ i("div", { style: { width: s, position: "relative" }, children: r.map((l, u) => /* @__PURE__ */ i(It, { style: a[u], pageNumber: l }, l)) });
1929
+ ], [e, t, r]), c = M(() => a.reduce((l, u) => l + Number(u.width || 0), 0), [a]);
1930
+ return /* @__PURE__ */ i("div", { style: { width: c, position: "relative" }, children: r.map((l, u) => /* @__PURE__ */ i(It, { style: a[u], pageNumber: l }, l)) });
1930
1931
  }, ti = ({ widths: e, heights: t }) => {
1931
- const { focusedPage: n } = ie(), o = W(() => ({
1932
+ const { focusedPage: n } = ie(), o = M(() => ({
1932
1933
  position: "absolute",
1933
1934
  width: e(n - 1),
1934
1935
  height: t(n - 1)
1935
- }), [e, t, n]), r = W(() => e(n - 1), [e]);
1936
+ }), [e, t, n]), r = M(() => e(n - 1), [e]);
1936
1937
  return /* @__PURE__ */ i(
1937
1938
  "div",
1938
1939
  {
@@ -1944,23 +1945,23 @@ const ei = ({ widths: e, heights: t }) => {
1944
1945
  }
1945
1946
  );
1946
1947
  }, ni = (e, t, n) => {
1947
- const o = H(), { contentRef: r } = ge(), { heights: a, widths: s } = qe(), { setFocusedPage: l } = ie(), [u, h] = $([]), { targetScrollPage: m } = un(), v = Tt(u, 0, 500), p = W(() => a.map((T, y) => {
1948
- const C = s[y], S = Vr(y + 1, e), d = C * S.columnIndex, f = T * S.rowIndex, g = d + C, c = f + T;
1948
+ const o = H(), { contentRef: r } = ge(), { heights: a, widths: c } = qe(), { setFocusedPage: l } = ie(), [u, p] = $([]), { targetScrollPage: m } = un(), v = Tt(u, 0, 500), h = M(() => a.map((T, P) => {
1949
+ const C = c[P], y = Vr(P + 1, e), d = C * y.columnIndex, f = T * y.rowIndex, g = d + C, s = f + T;
1949
1950
  return {
1950
- pageNumber: y + 1,
1951
- ...S,
1951
+ pageNumber: P + 1,
1952
+ ...y,
1952
1953
  width: C,
1953
1954
  height: T,
1954
1955
  startX: d,
1955
1956
  startY: f,
1956
1957
  endX: g,
1957
- endY: c
1958
+ endY: s
1958
1959
  };
1959
- }), [a, s, e, t]);
1960
+ }), [a, c, e, t]);
1960
1961
  k(() => {
1961
- var y;
1962
+ var P;
1962
1963
  v.length > 0 && !m.current && l(v[0].pageNumber);
1963
- let T = (y = v[0]) == null ? void 0 : y.ratio;
1964
+ let T = (P = v[0]) == null ? void 0 : P.ratio;
1964
1965
  T && v.filter((C) => Math.round(C.ratio) === Math.round(T)).some((C) => C.pageNumber === m.current) && setTimeout(() => {
1965
1966
  m.current = void 0;
1966
1967
  }, 500);
@@ -1968,25 +1969,25 @@ const ei = ({ widths: e, heights: t }) => {
1968
1969
  const w = N(
1969
1970
  (T) => {
1970
1971
  o.current && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => {
1971
- const y = T.target, C = {
1972
- startTop: y.scrollTop,
1973
- startLeft: y.scrollLeft,
1974
- endTop: y.scrollTop + y.clientHeight,
1975
- endLeft: y.scrollLeft + y.clientWidth
1976
- }, S = p.filter((d) => {
1972
+ const P = T.target, C = {
1973
+ startTop: P.scrollTop,
1974
+ startLeft: P.scrollLeft,
1975
+ endTop: P.scrollTop + P.clientHeight,
1976
+ endLeft: P.scrollLeft + P.clientWidth
1977
+ }, y = h.filter((d) => {
1977
1978
  const f = d.endX >= C.startLeft && d.endY >= C.startTop, g = d.startX <= C.endLeft && d.startY <= C.endTop;
1978
1979
  return f && g;
1979
1980
  }).map((d) => {
1980
- const f = C.startLeft > d.startX ? C.startLeft : d.startX, g = C.startTop > d.startY ? C.startTop : d.startY, c = C.endLeft < d.endX ? C.endLeft : d.endX, b = C.endTop < d.endY ? C.endTop : d.endY, _ = c - f, P = b - g, x = +(_ * P / (d.width * d.height) * 100).toFixed(2);
1981
+ const f = C.startLeft > d.startX ? C.startLeft : d.startX, g = C.startTop > d.startY ? C.startTop : d.startY, s = C.endLeft < d.endX ? C.endLeft : d.endX, b = C.endTop < d.endY ? C.endTop : d.endY, _ = s - f, S = b - g, x = +(_ * S / (d.width * d.height) * 100).toFixed(2);
1981
1982
  return {
1982
1983
  pageNumber: d.pageNumber,
1983
1984
  ratio: x
1984
1985
  };
1985
1986
  }).sort((d, f) => f.ratio - d.ratio);
1986
- h(S);
1987
+ p(y);
1987
1988
  });
1988
1989
  },
1989
- [r, p]
1990
+ [r, h]
1990
1991
  );
1991
1992
  k(() => {
1992
1993
  if (n)
@@ -1999,16 +2000,16 @@ const ei = ({ widths: e, heights: t }) => {
1999
2000
  return /* @__PURE__ */ i(It, { style: o, pageNumber: r }, r);
2000
2001
  }, Xo), qs = () => {
2001
2002
  const { initialPage: e = 1, initialScrollMode: t, instanceId: n } = ar(), { pagesRef: o, setPagesRef: r } = ge(), { scrollToPage: a } = vn(), {
2002
- virtualScrollRef: s,
2003
+ virtualScrollRef: c,
2003
2004
  getVirtualScrollRef: l,
2004
2005
  getPageScrollElementRef: u,
2005
- getVirtualScrollableElementRef: h,
2006
+ getVirtualScrollableElementRef: p,
2006
2007
  setTotalInnerDimensions: m,
2007
2008
  virtualScrollableElementRef: v,
2008
- totalInnerDimensions: p,
2009
+ totalInnerDimensions: h,
2009
2010
  pageScrollElementRef: w
2010
- } = et(), T = H(!0), { nextPage: y, prevPage: C, setFocusedPage: S, focusedPage: d } = ie(), { scrollMode: f } = De(), { viewMode: g } = Ae(), c = H(null), { loading: b } = J(), { passwordRequired: _ } = nr(), { LoaderImageComponent: P } = pn(), E = H(
2011
- p
2011
+ } = et(), T = H(!0), { nextPage: P, prevPage: C, setFocusedPage: y, focusedPage: d } = ie(), { scrollMode: f } = De(), { viewMode: g } = Ae(), s = H(null), { loading: b } = J(), { passwordRequired: _ } = nr(), { LoaderImageComponent: S } = pn(), E = H(
2012
+ h
2012
2013
  ), x = H({
2013
2014
  viewMode: g,
2014
2015
  scrollMode: f
@@ -2017,10 +2018,10 @@ const ei = ({ widths: e, heights: t }) => {
2017
2018
  rowCount: L,
2018
2019
  rowHeight: I,
2019
2020
  columnCount: O,
2020
- columnWidth: M,
2021
+ columnWidth: W,
2021
2022
  estimatedColumnWidth: G,
2022
2023
  estimatedRowHeight: Z
2023
- } = Yo(), j = Tt(p, 100), U = H();
2024
+ } = Yo(), j = Tt(h, 100), U = H();
2024
2025
  ni(O, L, v);
2025
2026
  const Q = H({
2026
2027
  scrollTop: 0,
@@ -2029,27 +2030,27 @@ const ei = ({ widths: e, heights: t }) => {
2029
2030
  Gr(o);
2030
2031
  const { isPressed: X } = Hr(), { selectionMode: le } = ir(), { initializeGrabScroll: ae, resetGrabState: de } = $r({
2031
2032
  isPressed: X
2032
- }), te = W(() => le === tr.HAND, [le]), ze = W(() => ({
2033
+ }), te = M(() => le === tr.HAND, [le]), ze = M(() => ({
2033
2034
  columnCount: O
2034
2035
  }), [O]), Re = N(
2035
2036
  (q) => {
2036
2037
  const V = document.activeElement !== o;
2037
- !A && V || (["ArrowUp", "ArrowLeft"].includes(q.key) ? (q.preventDefault(), C()) : ["ArrowDown", "ArrowRight"].includes(q.key) && (q.preventDefault(), y()));
2038
+ !A && V || (["ArrowUp", "ArrowLeft"].includes(q.key) ? (q.preventDefault(), C()) : ["ArrowDown", "ArrowRight"].includes(q.key) && (q.preventDefault(), P()));
2038
2039
  },
2039
- [y, C, A, f]
2040
+ [P, C, A, f]
2040
2041
  );
2041
2042
  k(() => (window.addEventListener("keydown", Re), () => {
2042
2043
  window.removeEventListener("keydown", Re);
2043
2044
  }), [Re]), k(() => {
2044
- if (c.current && (c.current.style.position = "relative"), !!s)
2045
+ if (s.current && (s.current.style.position = "relative"), !!c)
2045
2046
  for (let q = 0; q < L; q++)
2046
2047
  for (let V = 0; V < O; V++)
2047
- s.resetAfterIndices({
2048
+ c.resetAfterIndices({
2048
2049
  columnIndex: V,
2049
2050
  rowIndex: q,
2050
2051
  shouldForceUpdate: !0
2051
2052
  });
2052
- }, [L, O, z, s]);
2053
+ }, [L, O, z, c]);
2053
2054
  const Te = N(
2054
2055
  (q, V) => {
2055
2056
  if (!v)
@@ -2081,7 +2082,7 @@ const ei = ({ widths: e, heights: t }) => {
2081
2082
  const jn = Se / Ot * ye, Kn = ot / Dt * it, Xn = Math.round(Math.min(jn, ye)) || 0, Yn = Math.round(Math.min(Kn, it)) || 0;
2082
2083
  D.current = setTimeout(() => {
2083
2084
  requestAnimationFrame(() => {
2084
- s == null || s.scrollTo({
2085
+ c == null || c.scrollTo({
2085
2086
  scrollTop: Xn,
2086
2087
  scrollLeft: Yn
2087
2088
  });
@@ -2091,7 +2092,7 @@ const ei = ({ widths: e, heights: t }) => {
2091
2092
  width: V.width
2092
2093
  };
2093
2094
  },
2094
- [s, g, f, a]
2095
+ [c, g, f, a]
2095
2096
  );
2096
2097
  k(() => {
2097
2098
  clearTimeout(D.current);
@@ -2099,7 +2100,7 @@ const ei = ({ widths: e, heights: t }) => {
2099
2100
  (Se, ot, ye) => Se + I(ye),
2100
2101
  0
2101
2102
  ), V = Array.from({ length: O }).reduce(
2102
- (Se, ot, ye) => Se + M(ye),
2103
+ (Se, ot, ye) => Se + W(ye),
2103
2104
  0
2104
2105
  ), Pe = Te(V, q);
2105
2106
  Q.current = Pe, we(Pe, { height: q, width: V }), m({
@@ -2119,7 +2120,7 @@ const ei = ({ widths: e, heights: t }) => {
2119
2120
  k(() => () => {
2120
2121
  U.current && clearTimeout(U.current);
2121
2122
  }, []);
2122
- const rt = W(() => ne(ue["rp-pages-container"], {
2123
+ const rt = M(() => ne(ue["rp-pages-container"], {
2123
2124
  [ue["rp-cursor-grab"]]: te && !X,
2124
2125
  [ue["rp-cursor-grabbing"]]: te && X
2125
2126
  }), [te, X]), Zn = N(
@@ -2136,16 +2137,16 @@ const ei = ({ widths: e, heights: t }) => {
2136
2137
  }, [b]), k(() => {
2137
2138
  if (!(j.height === 0 || !T.current)) {
2138
2139
  if (t === ee.PAGE_SCROLLING) {
2139
- e !== d && w && S(e), T.current = !1;
2140
+ e !== d && w && y(e), T.current = !1;
2140
2141
  return;
2141
2142
  }
2142
- a(e, "auto"), S(e), T.current = !1;
2143
+ a(e, "auto"), y(e), T.current = !1;
2143
2144
  }
2144
2145
  }, [
2145
2146
  a,
2146
2147
  t,
2147
2148
  w,
2148
- S,
2149
+ y,
2149
2150
  j
2150
2151
  ]), /* @__PURE__ */ F(fe, { children: [
2151
2152
  /* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: rt, children: /* @__PURE__ */ i(Qo, { style: { minHeight: "50px" }, children: ({ width: q, height: V }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: Zn, style: { width: q, height: V }, children: f === ee.PAGE_SCROLLING ? /* @__PURE__ */ i(
@@ -2154,18 +2155,18 @@ const ei = ({ widths: e, heights: t }) => {
2154
2155
  ref: u,
2155
2156
  style: { width: q, height: V },
2156
2157
  className: ne(ue["rp-pages"], ue["rp-page-scrolling-wrapper"]),
2157
- children: g === He.DUAL_PAGE ? /* @__PURE__ */ i(ei, { widths: M, heights: I }) : /* @__PURE__ */ i(ti, { widths: M, heights: I })
2158
+ children: g === He.DUAL_PAGE ? /* @__PURE__ */ i(ei, { widths: W, heights: I }) : /* @__PURE__ */ i(ti, { widths: W, heights: I })
2158
2159
  }
2159
2160
  ) : G ? /* @__PURE__ */ i(
2160
2161
  Zo,
2161
2162
  {
2162
2163
  ref: l,
2163
2164
  itemData: ze,
2164
- outerRef: h,
2165
- innerRef: c,
2165
+ outerRef: p,
2166
+ innerRef: s,
2166
2167
  onScroll: nt,
2167
2168
  columnCount: O,
2168
- columnWidth: M,
2169
+ columnWidth: W,
2169
2170
  rowHeight: I,
2170
2171
  height: V,
2171
2172
  width: q,
@@ -2189,7 +2190,7 @@ const ei = ({ widths: e, heights: t }) => {
2189
2190
  height: "100%",
2190
2191
  width: "100%"
2191
2192
  },
2192
- children: P && /* @__PURE__ */ i(P, {})
2193
+ children: S && /* @__PURE__ */ i(S, {})
2193
2194
  }
2194
2195
  ) }) }) }),
2195
2196
  _ && /* @__PURE__ */ i(qr, {})
@@ -2211,23 +2212,23 @@ const ei = ({ widths: e, heights: t }) => {
2211
2212
  const { nextIcon: e } = pe();
2212
2213
  return e || /* @__PURE__ */ i(Me, { style: { transform: "rotate(180deg" } });
2213
2214
  }, ai = () => {
2214
- const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [s, l] = $(e.toString()), { pageNavigationTool: u = !0 } = ve(), { isSmallScreen: h } = Ce(), { localeMessages: m } = se();
2215
+ const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [c, l] = $(e.toString()), { pageNavigationTool: u = !0 } = ve(), { isSmallScreen: p } = Ce(), { localeMessages: m } = se();
2215
2216
  k(() => {
2216
2217
  l(e.toString());
2217
2218
  }, [e]);
2218
- const v = N((y) => {
2219
- const C = y.target.value;
2219
+ const v = N((P) => {
2220
+ const C = P.target.value;
2220
2221
  l(C);
2221
- }, []), p = N(async () => {
2222
- const y = a(s);
2223
- y.success || l(y.currentPage.toString());
2224
- }, [a, s, t]), w = N(() => {
2222
+ }, []), h = N(async () => {
2223
+ const P = a(c);
2224
+ P.success || l(P.currentPage.toString());
2225
+ }, [a, c, t]), w = N(() => {
2225
2226
  l(e.toString());
2226
2227
  }, [e]), T = N(
2227
- (y) => {
2228
- y.key === "Enter" && p();
2228
+ (P) => {
2229
+ P.key === "Enter" && h();
2229
2230
  },
2230
- [p]
2231
+ [h]
2231
2232
  );
2232
2233
  return typeof u != "boolean" ? /* @__PURE__ */ i(
2233
2234
  u,
@@ -2240,7 +2241,7 @@ const ei = ({ widths: e, heights: t }) => {
2240
2241
  changePage: n
2241
2242
  }
2242
2243
  ) : u ? /* @__PURE__ */ F("div", { className: mt["rp-paginate"], children: [
2243
- !h && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.previousPageTooltip, children: /* @__PURE__ */ i(
2244
+ !p && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.previousPageTooltip, children: /* @__PURE__ */ i(
2244
2245
  re,
2245
2246
  {
2246
2247
  onClick: r,
@@ -2255,7 +2256,7 @@ const ei = ({ widths: e, heights: t }) => {
2255
2256
  onKeyDown: T,
2256
2257
  onBlur: w,
2257
2258
  onChange: v,
2258
- value: s,
2259
+ value: c,
2259
2260
  className: mt["rp-page-input"]
2260
2261
  }
2261
2262
  ) }),
@@ -2263,7 +2264,7 @@ const ei = ({ widths: e, heights: t }) => {
2263
2264
  "/",
2264
2265
  t
2265
2266
  ] }),
2266
- !h && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.nextPageTooltip, children: /* @__PURE__ */ i(
2267
+ !p && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.nextPageTooltip, children: /* @__PURE__ */ i(
2267
2268
  re,
2268
2269
  {
2269
2270
  onClick: o,
@@ -2281,8 +2282,8 @@ var Rt = "Dialog", [xn, Vs] = Xr(Rt), [si, ce] = xn(Rt), In = (e) => {
2281
2282
  open: o,
2282
2283
  defaultOpen: r,
2283
2284
  onOpenChange: a,
2284
- modal: s = !0
2285
- } = e, l = B.useRef(null), u = B.useRef(null), [h = !1, m] = Qr({
2285
+ modal: c = !0
2286
+ } = e, l = B.useRef(null), u = B.useRef(null), [p = !1, m] = Qr({
2286
2287
  prop: o,
2287
2288
  defaultProp: r,
2288
2289
  onChange: a
@@ -2296,10 +2297,10 @@ var Rt = "Dialog", [xn, Vs] = Xr(Rt), [si, ce] = xn(Rt), In = (e) => {
2296
2297
  contentId: ct(),
2297
2298
  titleId: ct(),
2298
2299
  descriptionId: ct(),
2299
- open: h,
2300
+ open: p,
2300
2301
  onOpenChange: m,
2301
2302
  onOpenToggle: B.useCallback(() => m((v) => !v), [m]),
2302
- modal: s,
2303
+ modal: c,
2303
2304
  children: n
2304
2305
  }
2305
2306
  );
@@ -2328,7 +2329,7 @@ var Lt = "DialogPortal", [li, Ln] = xn(Lt, {
2328
2329
  forceMount: void 0
2329
2330
  }), En = (e) => {
2330
2331
  const { __scopeDialog: t, forceMount: n, children: o, container: r } = e, a = ce(Lt, t);
2331
- return /* @__PURE__ */ i(li, { scope: t, forceMount: n, children: B.Children.map(o, (s) => /* @__PURE__ */ i(St, { present: n || a.open, children: /* @__PURE__ */ i(oo, { asChild: !0, container: r, children: s }) })) });
2332
+ return /* @__PURE__ */ i(li, { scope: t, forceMount: n, children: B.Children.map(o, (c) => /* @__PURE__ */ i(St, { present: n || a.open, children: /* @__PURE__ */ i(oo, { asChild: !0, container: r, children: c }) })) });
2332
2333
  };
2333
2334
  En.displayName = Lt;
2334
2335
  var Xe = "DialogOverlay", Nn = B.forwardRef(
@@ -2377,12 +2378,12 @@ var ui = B.forwardRef(
2377
2378
  trapFocus: n.open,
2378
2379
  disableOutsidePointerEvents: !0,
2379
2380
  onCloseAutoFocus: We(e.onCloseAutoFocus, (a) => {
2380
- var s;
2381
- a.preventDefault(), (s = n.triggerRef.current) == null || s.focus();
2381
+ var c;
2382
+ a.preventDefault(), (c = n.triggerRef.current) == null || c.focus();
2382
2383
  }),
2383
2384
  onPointerDownOutside: We(e.onPointerDownOutside, (a) => {
2384
- const s = a.detail.originalEvent, l = s.button === 0 && s.ctrlKey === !0;
2385
- (s.button === 2 || l) && a.preventDefault();
2385
+ const c = a.detail.originalEvent, l = c.button === 0 && c.ctrlKey === !0;
2386
+ (c.button === 2 || l) && a.preventDefault();
2386
2387
  }),
2387
2388
  onFocusOutside: We(
2388
2389
  e.onFocusOutside,
@@ -2402,21 +2403,21 @@ var ui = B.forwardRef(
2402
2403
  trapFocus: !1,
2403
2404
  disableOutsidePointerEvents: !1,
2404
2405
  onCloseAutoFocus: (a) => {
2405
- var s, l;
2406
- (s = e.onCloseAutoFocus) == null || s.call(e, a), a.defaultPrevented || (o.current || (l = n.triggerRef.current) == null || l.focus(), a.preventDefault()), o.current = !1, r.current = !1;
2406
+ var c, l;
2407
+ (c = e.onCloseAutoFocus) == null || c.call(e, a), a.defaultPrevented || (o.current || (l = n.triggerRef.current) == null || l.focus(), a.preventDefault()), o.current = !1, r.current = !1;
2407
2408
  },
2408
2409
  onInteractOutside: (a) => {
2409
- var u, h;
2410
+ var u, p;
2410
2411
  (u = e.onInteractOutside) == null || u.call(e, a), a.defaultPrevented || (o.current = !0, a.detail.originalEvent.type === "pointerdown" && (r.current = !0));
2411
- const s = a.target;
2412
- ((h = n.triggerRef.current) == null ? void 0 : h.contains(s)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && r.current && a.preventDefault();
2412
+ const c = a.target;
2413
+ ((p = n.triggerRef.current) == null ? void 0 : p.contains(c)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && r.current && a.preventDefault();
2413
2414
  }
2414
2415
  }
2415
2416
  );
2416
2417
  }
2417
2418
  ), Dn = B.forwardRef(
2418
2419
  (e, t) => {
2419
- const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...s } = e, l = ce(Ie, n), u = B.useRef(null), h = Pt(t, u);
2420
+ const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...c } = e, l = ce(Ie, n), u = B.useRef(null), p = Pt(t, u);
2420
2421
  return no(), /* @__PURE__ */ F(fe, { children: [
2421
2422
  /* @__PURE__ */ i(
2422
2423
  ro,
@@ -2434,8 +2435,8 @@ var ui = B.forwardRef(
2434
2435
  "aria-describedby": l.descriptionId,
2435
2436
  "aria-labelledby": l.titleId,
2436
2437
  "data-state": Nt(l.open),
2437
- ...s,
2438
- ref: h,
2438
+ ...c,
2439
+ ref: p,
2439
2440
  onDismiss: () => l.onOpenChange(!1)
2440
2441
  }
2441
2442
  )
@@ -2509,32 +2510,32 @@ const xe = {
2509
2510
  "rp-dialog-close": "_rp-dialog-close_slqo7_47",
2510
2511
  "rp-properties-divider": "_rp-properties-divider_slqo7_55"
2511
2512
  }, Pi = () => {
2512
- const { pdfProperties: e } = J(), { container: t } = ge(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = co(), { localeMessages: r } = se(), a = W(() => {
2513
+ const { pdfProperties: e } = J(), { container: t } = ge(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = co(), { localeMessages: r } = se(), a = M(() => {
2513
2514
  if (!e)
2514
2515
  return [];
2515
2516
  const {
2516
- fileSize: s,
2517
+ fileSize: c,
2517
2518
  filename: l,
2518
2519
  title: u,
2519
- author: h,
2520
+ author: p,
2520
2521
  subject: m,
2521
2522
  createdOn: v,
2522
- creator: p,
2523
+ creator: h,
2523
2524
  keywords: w,
2524
2525
  modifiedOn: T,
2525
- pdfProducer: y,
2526
+ pdfProducer: P,
2526
2527
  pdfVersion: C,
2527
- pageCount: S
2528
+ pageCount: y
2528
2529
  } = e;
2529
2530
  return [
2530
2531
  { label: r == null ? void 0 : r.propertiesFilenameLabel, value: l },
2531
- { label: r == null ? void 0 : r.propertiesFileSizeLabel, value: s },
2532
+ { label: r == null ? void 0 : r.propertiesFileSizeLabel, value: c },
2532
2533
  { separate: !0 },
2533
2534
  { label: r == null ? void 0 : r.propertiesTitleLabel, value: u },
2534
- { label: r == null ? void 0 : r.propertiesAuthorLabel, value: h },
2535
+ { label: r == null ? void 0 : r.propertiesAuthorLabel, value: p },
2535
2536
  { label: r == null ? void 0 : r.propertiesSubjectLabel, value: m },
2536
2537
  { label: r == null ? void 0 : r.propertiesKeywordLabel, value: w },
2537
- { label: r == null ? void 0 : r.propertiesCreatorLabel, value: p },
2538
+ { label: r == null ? void 0 : r.propertiesCreatorLabel, value: h },
2538
2539
  {
2539
2540
  label: r == null ? void 0 : r.propertiesCreateOnLabel,
2540
2541
  value: v ? Wt(v) : ""
@@ -2544,16 +2545,16 @@ const xe = {
2544
2545
  value: T ? Wt(T) : ""
2545
2546
  },
2546
2547
  { separate: !0 },
2547
- { label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: y },
2548
+ { label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: P },
2548
2549
  { label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: C },
2549
- { label: r == null ? void 0 : r.propertiesPageCountLabel, value: S }
2550
+ { label: r == null ? void 0 : r.propertiesPageCountLabel, value: y }
2550
2551
  ];
2551
2552
  }, [e, r]);
2552
2553
  return /* @__PURE__ */ i(vi, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(wi, { container: t, children: /* @__PURE__ */ F("div", { className: xe["rp-dialog-wrapper"], children: [
2553
2554
  /* @__PURE__ */ i(_i, { className: xe["rp-dialog-overlay"] }),
2554
2555
  /* @__PURE__ */ F(bi, { className: xe["rp-document-dialog"], children: [
2555
2556
  /* @__PURE__ */ i(Ci, { className: xe["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
2556
- /* @__PURE__ */ i("div", { className: xe["rp-document-properties"], children: a.map((s, l) => /* @__PURE__ */ i("div", { children: s.separate ? /* @__PURE__ */ i("div", { className: xe["rp-properties-divider"] }) : /* @__PURE__ */ i(so, { label: s.label, value: s.value }) }, l)) }),
2557
+ /* @__PURE__ */ i("div", { className: xe["rp-document-properties"], children: a.map((c, l) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: xe["rp-properties-divider"] }) : /* @__PURE__ */ i(so, { label: c.label, value: c.value }) }, l)) }),
2557
2558
  /* @__PURE__ */ i(Ti, { asChild: !0, className: xe["rp-dialog-close"], children: /* @__PURE__ */ i(ao, {}) })
2558
2559
  ] })
2559
2560
  ] }) }) });
@@ -2564,8 +2565,8 @@ const xe = {
2564
2565
  return yi(n);
2565
2566
  }, Hn = () => {
2566
2567
  const { filename: e, pdfSrc: t } = J(), { downloadFilename: n } = hr(), o = (a) => {
2567
- const s = n || a;
2568
- return s.endsWith(nn) ? s : `${s}${nn}`;
2568
+ const c = n || a;
2569
+ return c.endsWith(nn) ? c : `${c}${nn}`;
2569
2570
  };
2570
2571
  return { download: N(async () => {
2571
2572
  if (!e || !t)
@@ -2589,9 +2590,9 @@ const xe = {
2589
2590
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Vn, {}) }),
2590
2591
  t == null ? void 0 : t.printLabel
2591
2592
  ] }) }), Bn = () => {
2592
- const { print: e, cancel: t, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = tt(), { printTool: s = !0 } = ve(), { isSmallScreen: l } = Ce(), { localeMessages: u } = se();
2593
- return s ? l ? /* @__PURE__ */ i(Ei, { print: e, localeMessages: u }) : typeof s == "function" ? /* @__PURE__ */ i(
2594
- s,
2593
+ const { print: e, cancel: t, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = tt(), { printTool: c = !0 } = ve(), { isSmallScreen: l } = Ce(), { localeMessages: u } = se();
2594
+ return c ? l ? /* @__PURE__ */ i(Ei, { print: e, localeMessages: u }) : typeof c == "function" ? /* @__PURE__ */ i(
2595
+ c,
2595
2596
  {
2596
2597
  print: e,
2597
2598
  cancel: t,
@@ -2600,7 +2601,7 @@ const xe = {
2600
2601
  setOnComplete: o,
2601
2602
  progress: a
2602
2603
  }
2603
- ) : s ? /* @__PURE__ */ i(Li, { print: e, localeMessages: u }) : null : null;
2604
+ ) : c ? /* @__PURE__ */ i(Li, { print: e, localeMessages: u }) : null : null;
2604
2605
  }, Ni = {
2605
2606
  "rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
2606
2607
  }, Oi = () => {
@@ -2610,7 +2611,7 @@ const xe = {
2610
2611
  const { goToLastPageIcon: e } = pe();
2611
2612
  return e || /* @__PURE__ */ i(gn, {});
2612
2613
  }, rn = { width: "100%" }, Ai = () => {
2613
- const { goToPage: e, totalPages: t, focusedPage: n } = ie(), { jumpNavigationTool: o = !0 } = ve(), { localeMessages: r } = se(), a = W(() => n === 1, [n]), s = W(() => n === t, [n, t]), l = N(() => {
2614
+ const { goToPage: e, totalPages: t, focusedPage: n } = ie(), { jumpNavigationTool: o = !0 } = ve(), { localeMessages: r } = se(), a = M(() => n === 1, [n]), c = M(() => n === t, [n, t]), l = N(() => {
2614
2615
  e(1);
2615
2616
  }, [e]), u = N(() => {
2616
2617
  e(t);
@@ -2620,7 +2621,7 @@ const xe = {
2620
2621
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Oi, {}) }),
2621
2622
  /* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
2622
2623
  ] }) }) }),
2623
- /* @__PURE__ */ i(be, { onClick: u, children: /* @__PURE__ */ i(K, { content: r == null ? void 0 : r.lastPageTooltip, style: rn, children: /* @__PURE__ */ F("div", { className: "rp-menu-item", "aria-disabled": s, children: [
2624
+ /* @__PURE__ */ i(be, { onClick: u, children: /* @__PURE__ */ i(K, { content: r == null ? void 0 : r.lastPageTooltip, style: rn, children: /* @__PURE__ */ F("div", { className: "rp-menu-item", "aria-disabled": c, children: [
2624
2625
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Di, {}) }),
2625
2626
  /* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
2626
2627
  ] }) }) }),
@@ -2632,22 +2633,22 @@ const xe = {
2632
2633
  downloadTool: o,
2633
2634
  documentProperties: r,
2634
2635
  scrollModeTool: a,
2635
- rotateTool: s,
2636
+ rotateTool: c,
2636
2637
  selectionModeTool: l,
2637
2638
  jumpNavigationTool: u,
2638
- printTool: h,
2639
+ printTool: p,
2639
2640
  fullscreenTool: m
2640
2641
  } = ve(), { localeMessages: v } = se();
2641
- return W(() => {
2642
- const w = u || s || l || a || r;
2642
+ return M(() => {
2643
+ const w = u || c || l || a || r;
2643
2644
  let T = !1;
2644
- return t && (T = !(!n && !o && !h && !m)), w || T;
2645
+ return t && (T = !(!n && !o && !p && !m)), w || T;
2645
2646
  }, [
2646
2647
  n,
2647
2648
  o,
2648
2649
  r,
2649
2650
  a,
2650
- s,
2651
+ c,
2651
2652
  l,
2652
2653
  u,
2653
2654
  t
@@ -2701,24 +2702,24 @@ const xe = {
2701
2702
  const { zoomOutIcon: e } = pe();
2702
2703
  return e || /* @__PURE__ */ i(_o, {});
2703
2704
  }, $i = () => {
2704
- const { zoomLevel: e, setZoomLevel: t } = Qe(), { container: n, contentRef: o } = ge(), { zoomTool: r = !0 } = ve(), { focusedPage: a } = ie(), { rotate: s } = Ge(), { pages: l } = J(), { isSmallScreen: u } = Ce(), { localeMessages: h } = se(), { viewMode: m } = Ae(), v = N(() => {
2705
+ const { zoomLevel: e, setZoomLevel: t } = Qe(), { container: n, contentRef: o } = ge(), { zoomTool: r = !0 } = ve(), { focusedPage: a } = ie(), { rotate: c } = Ge(), { pages: l } = J(), { isSmallScreen: u } = Ce(), { localeMessages: p } = se(), { viewMode: m } = Ae(), v = N(() => {
2705
2706
  t((d) => {
2706
2707
  const f = Math.floor(d / 25) * 25;
2707
2708
  return Math.min(f + 25, ft);
2708
2709
  });
2709
- }, [t]), p = N(() => {
2710
+ }, [t]), h = N(() => {
2710
2711
  t((d) => {
2711
2712
  const f = Math.ceil(d / 25) * 25;
2712
2713
  return Math.min(f - 25, ft);
2713
2714
  });
2714
- }, [t]), w = W(() => e === ki, [e]), T = W(() => e === ft, [e]), y = W(() => {
2715
+ }, [t]), w = M(() => e === ki, [e]), T = M(() => e === ft, [e]), P = M(() => {
2715
2716
  var d;
2716
- return (d = l.get(a)) == null ? void 0 : d.page.getViewport({ scale: 1, rotation: s });
2717
- }, [l, a, s]), C = N(
2717
+ return (d = l.get(a)) == null ? void 0 : d.page.getViewport({ scale: 1, rotation: c });
2718
+ }, [l, a, c]), C = N(
2718
2719
  (d) => {
2719
- const f = ((y == null ? void 0 : y.width) || 0) + 2 * Mt, g = ((y == null ? void 0 : y.height) || 0) + 2 * Mt, c = (o == null ? void 0 : o.clientWidth) || 0, b = (o == null ? void 0 : o.clientHeight) || 0, _ = bo(
2720
+ const f = ((P == null ? void 0 : P.width) || 0) + 2 * Mt, g = ((P == null ? void 0 : P.height) || 0) + 2 * Mt, s = (o == null ? void 0 : o.clientWidth) || 0, b = (o == null ? void 0 : o.clientHeight) || 0, _ = bo(
2720
2721
  d,
2721
- c,
2722
+ s,
2722
2723
  b,
2723
2724
  f,
2724
2725
  g,
@@ -2726,20 +2727,20 @@ const xe = {
2726
2727
  );
2727
2728
  t(_);
2728
2729
  },
2729
- [t, y]
2730
- ), S = N(
2730
+ [t, P]
2731
+ ), y = N(
2731
2732
  (d) => {
2732
2733
  typeof d == "number" ? t(d) : C(d);
2733
2734
  },
2734
2735
  [t, C]
2735
2736
  );
2736
2737
  return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: e, setZoomLevel: t }) : r ? /* @__PURE__ */ F("div", { className: Ee["rp-zoom-wrapper"], children: [
2737
- /* @__PURE__ */ i(K, { content: h == null ? void 0 : h.zoomOutTooltip, children: /* @__PURE__ */ i(
2738
+ /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.zoomOutTooltip, children: /* @__PURE__ */ i(
2738
2739
  re,
2739
2740
  {
2740
2741
  disabled: w,
2741
- onClick: p,
2742
- "aria-label": h == null ? void 0 : h.zoomOutTooltip,
2742
+ onClick: h,
2743
+ "aria-label": p == null ? void 0 : p.zoomOutTooltip,
2743
2744
  children: /* @__PURE__ */ i(Hi, {})
2744
2745
  }
2745
2746
  ) }),
@@ -2747,11 +2748,11 @@ const xe = {
2747
2748
  mn,
2748
2749
  {
2749
2750
  container: n,
2750
- triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: h == null ? void 0 : h.zoomSelectTooltip, children: /* @__PURE__ */ F(
2751
+ triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.zoomSelectTooltip, children: /* @__PURE__ */ F(
2751
2752
  re,
2752
2753
  {
2753
2754
  className: Ee["rp-current-zoom-wrapper"],
2754
- "aria-label": h == null ? void 0 : h.zoomSelectTooltip,
2755
+ "aria-label": p == null ? void 0 : p.zoomSelectTooltip,
2755
2756
  children: [
2756
2757
  /* @__PURE__ */ i("span", { className: Ee["rp-current-zoom-text"], children: e }),
2757
2758
  /* @__PURE__ */ i("span", { className: Ee["rp-current-zoom-text"], children: "%" }),
@@ -2763,24 +2764,24 @@ const xe = {
2763
2764
  align: "center",
2764
2765
  children: /* @__PURE__ */ F("div", { className: Ee["rp-zoom-dropdown-content"], children: [
2765
2766
  /* @__PURE__ */ F(Ke, { children: [
2766
- /* @__PURE__ */ i(be, { onClick: () => S(at.ACTUAL), children: h == null ? void 0 : h.zoomActualSize }),
2767
- /* @__PURE__ */ i(be, { onClick: () => S(at.PAGE_FIT), children: h == null ? void 0 : h.zoomPageFit }),
2768
- /* @__PURE__ */ i(be, { onClick: () => S(at.PAGE_WIDTH), children: h == null ? void 0 : h.zoomPageWidth })
2767
+ /* @__PURE__ */ i(be, { onClick: () => y(at.ACTUAL), children: p == null ? void 0 : p.zoomActualSize }),
2768
+ /* @__PURE__ */ i(be, { onClick: () => y(at.PAGE_FIT), children: p == null ? void 0 : p.zoomPageFit }),
2769
+ /* @__PURE__ */ i(be, { onClick: () => y(at.PAGE_WIDTH), children: p == null ? void 0 : p.zoomPageWidth })
2769
2770
  ] }),
2770
2771
  /* @__PURE__ */ i(yt, {}),
2771
- /* @__PURE__ */ i(Ke, { children: Wi.map((d) => /* @__PURE__ */ F(be, { onClick: () => S(d), children: [
2772
+ /* @__PURE__ */ i(Ke, { children: Wi.map((d) => /* @__PURE__ */ F(be, { onClick: () => y(d), children: [
2772
2773
  d,
2773
2774
  " %"
2774
2775
  ] }, d)) })
2775
2776
  ] })
2776
2777
  }
2777
2778
  ),
2778
- /* @__PURE__ */ i(K, { content: h == null ? void 0 : h.zoomInTooltip, children: /* @__PURE__ */ i(
2779
+ /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.zoomInTooltip, children: /* @__PURE__ */ i(
2779
2780
  re,
2780
2781
  {
2781
2782
  disabled: T,
2782
2783
  onClick: v,
2783
- "aria-label": h == null ? void 0 : h.zoomInTooltip,
2784
+ "aria-label": p == null ? void 0 : p.zoomInTooltip,
2784
2785
  children: /* @__PURE__ */ i(Mi, {})
2785
2786
  }
2786
2787
  ) })
@@ -2813,32 +2814,32 @@ const xe = {
2813
2814
  return e || /* @__PURE__ */ i(Co, {});
2814
2815
  }, Gi = () => {
2815
2816
  const { container: e } = ge(), [t, n] = $(!1), { pdf: o } = J(), [r, a] = $(null), {
2816
- searchOptions: s,
2817
+ searchOptions: c,
2817
2818
  setSearchOptions: l,
2818
2819
  loading: u,
2819
- setSearch: h,
2820
+ setSearch: p,
2820
2821
  totalMatches: m,
2821
2822
  currentMatchPosition: v,
2822
- nextMatch: p,
2823
+ nextMatch: h,
2823
2824
  prevMatch: w,
2824
2825
  search: T
2825
- } = xt(), { searchTool: y = !0 } = ve(), [C, S] = $(T), { localeMessages: d } = se(), { isSmallScreen: f } = Ce(), g = N(() => {
2826
+ } = xt(), { searchTool: P = !0 } = ve(), [C, y] = $(T), { localeMessages: d } = se(), { isSmallScreen: f } = Ce(), g = N(() => {
2826
2827
  n(!0);
2827
- }, []), c = N(() => {
2828
- h(""), S(""), n(!1);
2829
- }, [h]), b = (I) => {
2830
- const O = I.key === "Enter", M = I.key === " ";
2831
- (O || M) && c();
2828
+ }, []), s = N(() => {
2829
+ p(""), y(""), n(!1);
2830
+ }, [p]), b = (I) => {
2831
+ const O = I.key === "Enter", W = I.key === " ";
2832
+ (O || W) && s();
2832
2833
  }, _ = N(
2833
2834
  (I) => {
2834
- I.key === "Escape" && t && c();
2835
+ I.key === "Escape" && t && s();
2835
2836
  },
2836
2837
  [t]
2837
- ), P = N(
2838
+ ), S = N(
2838
2839
  (I) => {
2839
- I.shiftKey && I.key === "Enter" ? w() : I.key === "Enter" && T !== C ? h(C) : I.key === "Enter" && p();
2840
+ I.shiftKey && I.key === "Enter" ? w() : I.key === "Enter" && T !== C ? p(C) : I.key === "Enter" && h();
2840
2841
  },
2841
- [C, w, p, h, T]
2842
+ [C, w, h, p, T]
2842
2843
  );
2843
2844
  k(() => (window.addEventListener("keydown", _), () => {
2844
2845
  window.removeEventListener("keydown", _);
@@ -2846,10 +2847,10 @@ const xe = {
2846
2847
  r && r.focus();
2847
2848
  }, [r]);
2848
2849
  const E = N((I) => {
2849
- S(I.target.value);
2850
+ y(I.target.value);
2850
2851
  }, []), x = N(() => {
2851
- S(""), h("");
2852
- }, [h]), R = W(() => `${v} / ${m}`, [v, m]), { wholeWords: D, matchCase: A } = W(() => s, [s]), z = N(
2852
+ y(""), p("");
2853
+ }, [p]), R = M(() => `${v} / ${m}`, [v, m]), { wholeWords: D, matchCase: A } = M(() => c, [c]), z = N(
2853
2854
  (I) => {
2854
2855
  l((O) => ({ ...O, matchCase: I }));
2855
2856
  },
@@ -2861,8 +2862,8 @@ const xe = {
2861
2862
  [l]
2862
2863
  );
2863
2864
  return k(() => {
2864
- c();
2865
- }, [o, c]), y ? /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(
2865
+ s();
2866
+ }, [o, s]), P ? /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(
2866
2867
  Mr,
2867
2868
  {
2868
2869
  open: t,
@@ -2875,7 +2876,7 @@ const xe = {
2875
2876
  ln,
2876
2877
  {
2877
2878
  value: C,
2878
- onKeyDown: P,
2879
+ onKeyDown: S,
2879
2880
  onChange: E,
2880
2881
  icon: /* @__PURE__ */ i(an, {}),
2881
2882
  placeholder: d == null ? void 0 : d.searchInputPlaceholder,
@@ -2885,7 +2886,7 @@ const xe = {
2885
2886
  }
2886
2887
  ) }),
2887
2888
  u ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Ct, { className: Y["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: R }),
2888
- f && /* @__PURE__ */ i("div", { className: Y["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ht, { onKeyPress: b, handleClose: c }) })
2889
+ f && /* @__PURE__ */ i("div", { className: Y["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ht, { onKeyPress: b, handleClose: s }) })
2889
2890
  ] }),
2890
2891
  /* @__PURE__ */ F("div", { className: Y["rp-search-tool-input-checkboxes"], children: [
2891
2892
  f && /* @__PURE__ */ i(on, {}),
@@ -2897,7 +2898,7 @@ const xe = {
2897
2898
  ] }),
2898
2899
  !f && /* @__PURE__ */ F("div", { className: Y["rp-search-tool-controls"], children: [
2899
2900
  /* @__PURE__ */ i(on, {}),
2900
- /* @__PURE__ */ i(Ht, { onKeyPress: b, handleClose: c })
2901
+ /* @__PURE__ */ i(Ht, { onKeyPress: b, handleClose: s })
2901
2902
  ] })
2902
2903
  ] })
2903
2904
  }
@@ -2927,9 +2928,9 @@ const xe = {
2927
2928
  /* @__PURE__ */ i("button", { className: ne(Ne["rp-loading-cancel-button"]), onClick: t, children: n == null ? void 0 : n.printCancelLabel })
2928
2929
  ] }) });
2929
2930
  }, Ui = $e((e, t) => {
2930
- const { showPrintProgress: n } = ve(), { progress: o } = tt(), { isSmallScreen: r } = Ce(), { percentage: a } = o || {}, s = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
2931
+ const { showPrintProgress: n } = ve(), { progress: o } = tt(), { isSmallScreen: r } = Ce(), { percentage: a } = o || {}, c = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
2931
2932
  return /* @__PURE__ */ F("div", { children: [
2932
- /* @__PURE__ */ i("div", { "data-rp": "topBar", ref: t, className: Fe["rp-toolbar-content"], children: /* @__PURE__ */ F("div", { className: Fe["rp-toolbar-wrapper"], style: s(), children: [
2933
+ /* @__PURE__ */ i("div", { "data-rp": "topBar", ref: t, className: Fe["rp-toolbar-content"], children: /* @__PURE__ */ F("div", { className: Fe["rp-toolbar-wrapper"], style: c(), children: [
2933
2934
  /* @__PURE__ */ F("div", { "data-rp": "topBarLeft", className: Fe["rp-toolbar-start"], children: [
2934
2935
  /* @__PURE__ */ i(Gi, {}),
2935
2936
  /* @__PURE__ */ i(ai, {})
@@ -2951,7 +2952,7 @@ const xe = {
2951
2952
  "rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
2952
2953
  "rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
2953
2954
  }, Bi = (e) => {
2954
- const { thumbnailSrc: t, pageNumber: n, isFocused: o, viewport: r } = e, { goToPage: a } = ie(), s = W(() => o ? ke["rp-thumbnail-active"] : "", [o]), l = W(() => ({
2955
+ const { thumbnailSrc: t, pageNumber: n, isFocused: o, viewport: r } = e, { goToPage: a } = ie(), c = M(() => o ? ke["rp-thumbnail-active"] : "", [o]), l = M(() => ({
2955
2956
  width: Math.round(r.width),
2956
2957
  height: Math.round(r.height)
2957
2958
  }), [r]), u = N(() => {
@@ -2964,7 +2965,7 @@ const xe = {
2964
2965
  id: `page-${n}`,
2965
2966
  className: ke["rp-thumbnail-wrapper"],
2966
2967
  children: [
2967
- /* @__PURE__ */ i("div", { className: ne(s, ke["rp-thumbnail"]), children: t ? /* @__PURE__ */ i(
2968
+ /* @__PURE__ */ i("div", { className: ne(c, ke["rp-thumbnail"]), children: t ? /* @__PURE__ */ i(
2968
2969
  "img",
2969
2970
  {
2970
2971
  src: t,
@@ -2994,20 +2995,20 @@ const xe = {
2994
2995
  const n = e == null ? void 0 : e.querySelector(`#page-${t}`);
2995
2996
  e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) - Zi);
2996
2997
  }, Ki = $e((e, t) => {
2997
- const { show: n } = e, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: s, thumbnailLength: l, addToPage: u } = Cn(), h = H(null), m = H(1);
2998
- cn(t, () => h.current);
2999
- const v = W(() => Object.values(a), [a]), p = N(() => {
2998
+ const { show: n } = e, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: c, thumbnailLength: l, addToPage: u } = Cn(), p = H(null), m = H(1);
2999
+ cn(t, () => p.current);
3000
+ const v = M(() => Object.values(a), [a]), h = N(() => {
3000
3001
  const w = l + 1;
3001
- w <= r && s(w);
3002
- }, [s, r, l]);
3002
+ w <= r && c(w);
3003
+ }, [c, r, l]);
3003
3004
  return k(() => {
3004
- o > l ? u(o) : n && m.current !== o && (ji(h.current, o), m.current = o);
3005
- }, [o, l, u, n, v]), fr(h.current, p), /* @__PURE__ */ i("div", { ref: h, className: sn["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: sn["rp-thumbnails"], children: n ? v.map((w, T) => {
3006
- var y, C;
3005
+ o > l ? u(o) : n && m.current !== o && (ji(p.current, o), m.current = o);
3006
+ }, [o, l, u, n, v]), fr(p.current, h), /* @__PURE__ */ i("div", { ref: p, className: sn["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: sn["rp-thumbnails"], children: n ? v.map((w, T) => {
3007
+ var P, C;
3007
3008
  return /* @__PURE__ */ i(
3008
3009
  Bi,
3009
3010
  {
3010
- isFocused: o === ((y = w.page) == null ? void 0 : y.pageNumber),
3011
+ isFocused: o === ((P = w.page) == null ? void 0 : P.pageNumber),
3011
3012
  pageNumber: (C = w.page) == null ? void 0 : C.pageNumber,
3012
3013
  thumbnailSrc: w.thumbnailSrc,
3013
3014
  loading: w.loading,
@@ -3020,9 +3021,9 @@ const xe = {
3020
3021
  const { thumbnailIcon: e } = pe();
3021
3022
  return e || /* @__PURE__ */ i(mr, {});
3022
3023
  }, Yi = () => {
3023
- const { active: e, setActive: t } = Cn(), [n, o] = $(200), r = H(null), { thumbnailTool: a, sidebarEnable: s } = ve(), { localeMessages: l } = se(), u = N(() => {
3024
+ const { active: e, setActive: t } = Cn(), [n, o] = $(200), r = H(null), { thumbnailTool: a, sidebarEnable: c } = ve(), { localeMessages: l } = se(), u = N(() => {
3024
3025
  t((m) => !m);
3025
- }, []), h = W(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: u, active: e }) : a ? /* @__PURE__ */ i(K, { content: l == null ? void 0 : l.thumbnailTooltip, children: /* @__PURE__ */ i(
3026
+ }, []), p = M(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: u, active: e }) : a ? /* @__PURE__ */ i(K, { content: l == null ? void 0 : l.thumbnailTooltip, children: /* @__PURE__ */ i(
3026
3027
  re,
3027
3028
  {
3028
3029
  onClick: u,
@@ -3031,14 +3032,14 @@ const xe = {
3031
3032
  children: /* @__PURE__ */ i(Xi, {})
3032
3033
  }
3033
3034
  ) }) : null, [a, e, u, l]);
3034
- return /* @__PURE__ */ i(fe, { children: s && /* @__PURE__ */ F(
3035
+ return /* @__PURE__ */ i(fe, { children: c && /* @__PURE__ */ F(
3035
3036
  "div",
3036
3037
  {
3037
3038
  style: { "--rp-thumbnail-width": `${n}px` },
3038
3039
  className: gt["rp-sidebar-content-wrapper"],
3039
3040
  "data-rp": "sidebar",
3040
3041
  children: [
3041
- /* @__PURE__ */ i("div", { className: gt["rp-sidebar-content"], children: h }),
3042
+ /* @__PURE__ */ i("div", { className: gt["rp-sidebar-content"], children: p }),
3042
3043
  /* @__PURE__ */ F(
3043
3044
  "div",
3044
3045
  {
@@ -3064,7 +3065,7 @@ const xe = {
3064
3065
  "rp-dark-mode": "_rp-dark-mode_1uujy_162"
3065
3066
  }, Ji = $e(
3066
3067
  (e, t) => {
3067
- const { children: n, toolbarRef: o, style: r, className: a } = e, { customVariables: s, customDarkVariables: l } = Pr(), { darkMode: u } = rr();
3068
+ const { children: n, toolbarRef: o, style: r, className: a } = e, { customVariables: c, customDarkVariables: l } = Pr(), { darkMode: u } = rr();
3068
3069
  return /* @__PURE__ */ i(
3069
3070
  "div",
3070
3071
  {
@@ -3077,7 +3078,7 @@ const xe = {
3077
3078
  ),
3078
3079
  style: {
3079
3080
  "--rp-toolbar-height": `${(o == null ? void 0 : o.clientHeight) || 48}px`,
3080
- ...s,
3081
+ ...c,
3081
3082
  ...u ? l : {},
3082
3083
  ...r
3083
3084
  },
@@ -3091,18 +3092,18 @@ const xe = {
3091
3092
  slots: o,
3092
3093
  icons: r,
3093
3094
  style: a,
3094
- className: s,
3095
+ className: c,
3095
3096
  mobileWidth: l,
3096
3097
  onLoaded: u,
3097
- cleanupOnLoaded: h,
3098
+ cleanupOnLoaded: p,
3098
3099
  onLayoutWidthChange: m
3099
- } = e, [v, p] = $(null), { setContainer: w, setContentRef: T } = ge(), { loading: y } = J(), { LoaderImageComponent: C } = pn();
3100
+ } = e, [v, h] = $(null), { setContainer: w, setContentRef: T } = ge(), { loading: P } = J(), { LoaderImageComponent: C } = pn();
3100
3101
  return k(() => (u && u(), () => {
3101
- h && h();
3102
- }), [u, h]), /* @__PURE__ */ i(Ji, { toolbarRef: v, ref: t, children: /* @__PURE__ */ i(Tr, { mobileWidth: l, onLayoutWidthChange: m, children: /* @__PURE__ */ i(vr, { slots: o, children: /* @__PURE__ */ i(wr, { icons: r, children: /* @__PURE__ */ F(_r, { getContainerRef: w, style: a, className: s, children: [
3102
+ p && p();
3103
+ }), [u, p]), /* @__PURE__ */ i(Ji, { toolbarRef: v, ref: t, children: /* @__PURE__ */ i(Tr, { mobileWidth: l, onLayoutWidthChange: m, children: /* @__PURE__ */ i(vr, { slots: o, children: /* @__PURE__ */ i(wr, { icons: r, children: /* @__PURE__ */ F(_r, { getContainerRef: w, style: a, className: c, children: [
3103
3104
  /* @__PURE__ */ F(br, { children: [
3104
3105
  /* @__PURE__ */ F("div", { className: _e["rp-layout"], children: [
3105
- /* @__PURE__ */ i(Ui, { ref: p }),
3106
+ /* @__PURE__ */ i(Ui, { ref: h }),
3106
3107
  /* @__PURE__ */ F("div", { className: _e["rp-content"], children: [
3107
3108
  /* @__PURE__ */ i("div", { className: _e["rp-sidebar"], children: /* @__PURE__ */ i(Yi, {}) }),
3108
3109
  /* @__PURE__ */ i("div", { ref: T, className: _e["rp-pages"], children: n })
@@ -3110,7 +3111,7 @@ const xe = {
3110
3111
  ] }),
3111
3112
  /* @__PURE__ */ i(Cr, {})
3112
3113
  ] }),
3113
- y ? /* @__PURE__ */ i(
3114
+ P ? /* @__PURE__ */ i(
3114
3115
  "div",
3115
3116
  {
3116
3117
  className: _e["rp-loader"],