@pdf-viewer/react 0.5.0-beta.1 → 0.5.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 (39) hide show
  1. package/dist/{RPLayout-f99f3c29.js → RPLayout-c0d9e10f.js} +605 -604
  2. package/dist/components/RPController.js +1 -1
  3. package/dist/components/RPViewer.js +1 -1
  4. package/dist/components/layout/RPLayout.js +1 -1
  5. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  6. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  7. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  8. package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
  9. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  10. package/dist/components/layout/toolbar/MostPageTool.js +1 -1
  11. package/dist/components/layout/toolbar/OtherTool.js +1 -1
  12. package/dist/components/layout/toolbar/Paginate.js +1 -1
  13. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  14. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  15. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  16. package/dist/components/layout/toolbar/SearchTool.js +1 -1
  17. package/dist/components/layout/toolbar/ZoomTool.js +1 -1
  18. package/dist/components/page/AnnotationLayer.js +1 -1
  19. package/dist/components/page/CanvasLayer.js +1 -1
  20. package/dist/components/page/DualPage.js +1 -1
  21. package/dist/components/page/RPPage.js +1 -1
  22. package/dist/components/page/SinglePage.js +1 -1
  23. package/dist/components/page/TextLayer.js +1 -1
  24. package/dist/components/ui/LoadingIndicator.js +1 -1
  25. package/dist/contexts/PaginateContext.js +1 -1
  26. package/dist/contexts/PrintContext.js +1 -1
  27. package/dist/contexts/SearchContext.js +1 -1
  28. package/dist/contexts/ThumbnailsContext.js +1 -1
  29. package/dist/contexts/ToolbarComponentContext.js +14 -12
  30. package/dist/main.js +1 -1
  31. package/dist/utils/hooks/useFileDownload.js +1 -1
  32. package/dist/utils/hooks/useLicense.js +1 -1
  33. package/dist/utils/hooks/usePaginate.js +1 -1
  34. package/dist/utils/hooks/usePrint.js +1 -1
  35. package/dist/utils/hooks/useScrollToPage.js +1 -1
  36. package/dist/utils/hooks/useSearch.js +1 -1
  37. package/dist/utils/hooks/useThumbnail.js +1 -1
  38. package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
  39. package/package.json +1 -1
@@ -90,14 +90,14 @@ import './assets/RPLayout.css';const ae = {
90
90
  return A(() => {
91
91
  if (!i || c === 0)
92
92
  return;
93
- const h = i.get(t);
94
- if (o.current && h) {
95
- const p = o.current;
96
- p.hidden = !0;
97
- const g = s.current;
98
- g && g.cancel(), r && r(), s.current = ot(h.page, p, c, l), s.current.promise.then(() => {
99
- p.hidden = !1;
100
- }).catch((d) => {
93
+ const p = i.get(t);
94
+ if (o.current && p) {
95
+ const h = o.current;
96
+ h.hidden = !0;
97
+ const m = s.current;
98
+ m && m.cancel(), r && r(), s.current = ot(p.page, h, c, l), s.current.promise.then(() => {
99
+ h.hidden = !1;
100
+ }).catch((u) => {
101
101
  }).finally(() => {
102
102
  n && n();
103
103
  });
@@ -107,69 +107,69 @@ import './assets/RPLayout.css';const ae = {
107
107
  "rp-text-layer": "_rp-text-layer_1mgyz_1",
108
108
  "rp-text-layer-text": "_rp-text-layer-text_1mgyz_9"
109
109
  }, _t = () => {
110
- const { viewMode: e } = Ge(), { scrollMode: t } = Pe(), { virtualScrollRef: n, pageScrollElementRef: r } = Ue(), { setFocusedPage: o } = ee(), i = $(), { columnCount: l } = Bt(), s = Xt(), c = $(t), h = $(e);
110
+ const { viewMode: e } = Ge(), { scrollMode: t } = Pe(), { virtualScrollRef: n, pageScrollElementRef: r } = Ue(), { setFocusedPage: o } = ee(), i = $(), { columnCount: l } = Bt(), s = Xt(), c = $(t), p = $(e);
111
111
  A(() => {
112
112
  n != null && n.scrollToItem && (i.current = n);
113
113
  }, [n]);
114
- const p = M(
115
- (d) => {
114
+ const h = M(
115
+ (u) => {
116
116
  if (!r)
117
117
  return;
118
- const f = Math.ceil(d / 2) * 2 - 1;
119
- d === f + 1 ? r.scrollTo({ left: s.widths[f], top: 0 }) : r.scrollTo({ left: 0, top: 0 });
118
+ const f = Math.ceil(u / 2) * 2 - 1;
119
+ u === f + 1 ? r.scrollTo({ left: s.widths[f], top: 0 }) : r.scrollTo({ left: 0, top: 0 });
120
120
  },
121
121
  [r, s]
122
122
  );
123
123
  return A(() => {
124
- c.current = t, h.current = e;
124
+ c.current = t, p.current = e;
125
125
  }, [t, e]), { scrollToPage: M(
126
- (d, f = "start") => {
127
- const v = d - 1;
128
- let _ = v, m = 0;
129
- if (h.current === ze.DUAL_PAGE && c.current === Q.PAGE_SCROLLING) {
130
- p(d);
126
+ (u, f = "start") => {
127
+ const v = u - 1;
128
+ let _ = v, g = 0;
129
+ if (p.current === ze.DUAL_PAGE && c.current === Q.PAGE_SCROLLING) {
130
+ h(u);
131
131
  return;
132
132
  }
133
133
  if (c.current === Q.PAGE_SCROLLING) {
134
- o(d);
134
+ o(u);
135
135
  return;
136
136
  }
137
- i.current && (c.current === Q.HORIZONTAL_SCROLLING ? m = v : h.current === ze.DUAL_PAGE && (m = v % 2, _ = Math.floor(v / 2)), i.current.scrollToItem({ rowIndex: _, columnIndex: m, align: f }));
137
+ i.current && (c.current === Q.HORIZONTAL_SCROLLING ? g = v : p.current === ze.DUAL_PAGE && (g = v % 2, _ = Math.floor(v / 2)), i.current.scrollToItem({ rowIndex: _, columnIndex: g, align: f }));
138
138
  },
139
- [l, p, o]
139
+ [l, h, o]
140
140
  ) };
141
141
  }, eo = (e = {}, t = "") => {
142
- const [n, r] = F(t), [o, i] = F(!1), { pdf: l } = Y(), s = $(!n), [c, h] = F([]), [p, g] = F(0), { focusedPage: d } = ee(), { scrollToPage: f } = _t(), { virtualScrollRef: v, pageScrollElementRef: _, virtualScrollableElementRef: m } = Ue(), { scrollMode: C } = Pe(), [T, w] = F(null), S = D(() => p === 0 ? null : c[p - 1], [p, c]), u = D(() => c.length, [c]);
142
+ const [n, r] = F(t), [o, i] = F(!1), { pdf: l } = Y(), s = $(!n), [c, p] = F([]), [h, m] = F(0), { focusedPage: u } = ee(), { scrollToPage: f } = _t(), { virtualScrollRef: v, pageScrollElementRef: _, virtualScrollableElementRef: g } = Ue(), { scrollMode: b } = Pe(), [S, P] = F(null), T = D(() => h === 0 ? null : c[h - 1], [h, c]), d = D(() => c.length, [c]);
143
143
  A(() => {
144
- if (S && d !== S.page) {
145
- const y = d < S.page ? "start" : "end";
146
- f(S.page, y);
144
+ if (T && u !== T.page) {
145
+ const y = u < T.page ? "start" : "end";
146
+ f(T.page, y);
147
147
  }
148
- }, [S, f]), A(() => {
149
- if (!S || d !== S.page || !T || !T.classList.contains("selected"))
148
+ }, [T, f]), A(() => {
149
+ if (!T || u !== T.page || !S || !S.classList.contains("selected"))
150
150
  return;
151
- const y = m || _;
151
+ const y = g || _;
152
152
  if (!y)
153
153
  return;
154
- const R = T.getBoundingClientRect(), L = y.clientHeight / 2, N = y.clientWidth / 2, x = y.scrollTop + R.top - L, E = y.scrollLeft + R.left - N;
154
+ const R = S.getBoundingClientRect(), L = y.clientHeight / 2, N = y.clientWidth / 2, x = y.scrollTop + R.top - L, E = y.scrollLeft + R.left - N;
155
155
  y.scrollTo({
156
156
  top: x,
157
157
  left: E,
158
158
  behavior: "smooth"
159
159
  });
160
160
  }, [
161
- d,
161
+ u,
162
162
  v,
163
- T,
164
- C,
165
- m,
163
+ S,
164
+ b,
165
+ g,
166
166
  _
167
167
  ]);
168
- const P = M(() => {
169
- g((y) => u ? y + 1 > u ? 1 : y + 1 : 0);
170
- }, [u]), b = M(() => {
171
- g((y) => u ? y - 1 <= 0 ? u : y - 1 : 0);
172
- }, [u]), I = M(async (y) => {
168
+ const C = M(() => {
169
+ m((y) => d ? y + 1 > d ? 1 : y + 1 : 0);
170
+ }, [d]), w = M(() => {
171
+ m((y) => d ? y - 1 <= 0 ? d : y - 1 : 0);
172
+ }, [d]), I = M(async (y) => {
173
173
  if (!y)
174
174
  return {};
175
175
  const R = y.numPages, L = {};
@@ -183,10 +183,10 @@ import './assets/RPLayout.css';const ae = {
183
183
  }, []);
184
184
  return A(() => {
185
185
  if (!n) {
186
- s.current = !0, h([]), g(0);
186
+ s.current = !0, p([]), m(0);
187
187
  return;
188
188
  }
189
- s.current = !1, i(!0), h([]), g(0), I(l).then((y) => {
189
+ s.current = !1, i(!0), p([]), m(0), I(l).then((y) => {
190
190
  const L = Object.keys(y).reduce((N, x) => {
191
191
  const E = Kn(
192
192
  [n],
@@ -196,22 +196,22 @@ import './assets/RPLayout.css';const ae = {
196
196
  ).map((z, k) => ({ ...z, page: Number(x), pageMatchIdx: k }));
197
197
  return [...N, ...E];
198
198
  }, []);
199
- h(L), g(L.length ? 1 : 0);
199
+ p(L), m(L.length ? 1 : 0);
200
200
  }).catch(() => {
201
- h([]), g(0);
201
+ p([]), m(0);
202
202
  }).finally(() => i(!1));
203
203
  }, [n, I, l, e]), {
204
204
  search: n,
205
205
  setSearch: r,
206
206
  loading: o,
207
207
  matches: c,
208
- totalMatches: u,
209
- currentMatchPosition: p,
210
- currentMatch: S,
211
- nextMatch: P,
212
- prevMatch: b,
213
- currentMatchElement: T,
214
- setCurrentMatchElement: w
208
+ totalMatches: d,
209
+ currentMatchPosition: h,
210
+ currentMatch: T,
211
+ nextMatch: C,
212
+ prevMatch: w,
213
+ currentMatchElement: S,
214
+ setCurrentMatchElement: P
215
215
  };
216
216
  }, tn = We({
217
217
  search: "",
@@ -241,10 +241,10 @@ import './assets/RPLayout.css';const ae = {
241
241
  totalMatches: l,
242
242
  currentMatchPosition: s,
243
243
  currentMatch: c,
244
- search: h,
245
- matches: p,
246
- nextMatch: g,
247
- prevMatch: d,
244
+ search: p,
245
+ matches: h,
246
+ nextMatch: m,
247
+ prevMatch: u,
248
248
  currentMatchElement: f,
249
249
  setCurrentMatchElement: v
250
250
  } = eo(n, t);
@@ -259,10 +259,10 @@ import './assets/RPLayout.css';const ae = {
259
259
  totalMatches: l,
260
260
  currentMatchPosition: s,
261
261
  currentMatch: c,
262
- nextMatch: g,
263
- prevMatch: d,
264
- search: h,
265
- matches: p,
262
+ nextMatch: m,
263
+ prevMatch: u,
264
+ search: p,
265
+ matches: h,
266
266
  currentMatchElement: f,
267
267
  setCurrentMatchElement: v
268
268
  },
@@ -272,57 +272,57 @@ import './assets/RPLayout.css';const ae = {
272
272
  }, nn = () => He(tn), no = (e) => {
273
273
  const { pageNumber: t } = e, { pages: n } = Y(), r = $(null), { matches: o, currentMatch: i, setCurrentMatchElement: l } = nn(), [s, c] = F(
274
274
  []
275
- ), h = $(), p = $(), g = $(), d = D(() => o.filter((v) => v.pageIndex === t - 1), [o, t]), f = M(
276
- (v, _, m = !1) => {
277
- if (m && Xn(v, _), !d.length) {
278
- g.current = void 0, c([]);
275
+ ), p = $(), h = $(), m = $(), u = D(() => o.filter((v) => v.pageIndex === t - 1), [o, t]), f = M(
276
+ (v, _, g = !1) => {
277
+ if (g && Xn(v, _), !u.length) {
278
+ m.current = void 0, c([]);
279
279
  return;
280
280
  }
281
- const C = Jn(d, v, _);
282
- c(C);
281
+ const b = Jn(u, v, _);
282
+ c(b);
283
283
  },
284
- [d]
284
+ [u]
285
285
  );
286
286
  return A(() => {
287
- var m;
288
- if ((m = g.current) == null || m.classList.remove("selected"), !s.length || !i || i.pageIndex !== t - 1)
287
+ var g;
288
+ if ((g = m.current) == null || g.classList.remove("selected"), !s.length || !i || i.pageIndex !== t - 1)
289
289
  return;
290
- const v = d.findIndex(
291
- (C) => JSON.stringify(C) === JSON.stringify(i)
290
+ const v = u.findIndex(
291
+ (b) => JSON.stringify(b) === JSON.stringify(i)
292
292
  );
293
293
  if (v === -1)
294
294
  return;
295
- const _ = s.find((C) => C.index === v);
296
- _ && (g.current = _.element, l(_.element), _.element.classList.add("selected"));
297
- }, [i, s, d]), A(() => {
295
+ const _ = s.find((b) => b.index === v);
296
+ _ && (m.current = _.element, l(_.element), _.element.classList.add("selected"));
297
+ }, [i, s, u]), A(() => {
298
298
  const v = n.get(t);
299
299
  if (!(!v || !r.current))
300
- return h.current && h.current.cancel(), v.page.getTextContent().then((_) => {
301
- const m = v.page.getViewport({ scale: 1 });
302
- return h.current = new Qn.TextLayer({
303
- viewport: m,
300
+ return p.current && p.current.cancel(), v.page.getTextContent().then((_) => {
301
+ const g = v.page.getViewport({ scale: 1 });
302
+ return p.current = new Qn.TextLayer({
303
+ viewport: g,
304
304
  textContentSource: _,
305
305
  container: r.current
306
- }), p.current = _, r.current && (r.current.innerText = ""), h.current.render();
306
+ }), h.current = _, r.current && (r.current.innerText = ""), p.current.render();
307
307
  }).then(() => {
308
- var C;
309
- [].slice.call(r.current.children).forEach((T) => {
310
- T.classList.add(Xe["rp-text-layer-text"]);
308
+ var b;
309
+ [].slice.call(r.current.children).forEach((S) => {
310
+ S.classList.add(Xe["rp-text-layer-text"]);
311
311
  });
312
- const m = (C = h.current) == null ? void 0 : C.textDivs;
313
- m && p.current && f(p.current, m);
312
+ const g = (b = p.current) == null ? void 0 : b.textDivs;
313
+ g && h.current && f(h.current, g);
314
314
  }).catch(() => {
315
315
  }), () => {
316
316
  var _;
317
- (_ = h.current) == null || _.cancel();
317
+ (_ = p.current) == null || _.cancel();
318
318
  };
319
319
  }, [n, t]), A(() => {
320
- var m;
321
- [].slice.call(r.current.children).forEach((C) => {
322
- C.classList.add(Xe["rp-text-layer-text"]);
320
+ var g;
321
+ [].slice.call(r.current.children).forEach((b) => {
322
+ b.classList.add(Xe["rp-text-layer-text"]);
323
323
  });
324
- const _ = (m = h.current) == null ? void 0 : m.textDivs;
325
- _ && p.current && f(p.current, _, !0);
324
+ const _ = (g = p.current) == null ? void 0 : g.textDivs;
325
+ _ && h.current && f(h.current, _, !0);
326
326
  }, [f]), /* @__PURE__ */ a(
327
327
  "div",
328
328
  {
@@ -445,91 +445,91 @@ function uo(e, t) {
445
445
  e.removeEventListener(n, t);
446
446
  }
447
447
  const po = (e) => {
448
- const { pageNumber: t } = e, n = $(null), { pages: r, pdf: o } = Y(), i = $(), [l, s] = F(), [c, h] = F(null), [p, g] = F(), { setFocusedPage: d, goToPage: f } = ee(), { scrollMode: v } = Pe(), _ = D(() => r.get(t), [r, t]), m = D(() => _ == null ? void 0 : _.page.getViewport(), [_]);
448
+ const { pageNumber: t } = e, n = $(null), { pages: r, pdf: o } = Y(), i = $(), [l, s] = F(), { setFocusedPage: c, goToPage: p } = ee(), { scrollMode: h } = Pe(), m = D(() => r.get(t), [r, t]), u = D(() => m == null ? void 0 : m.page.getViewport(), [m]);
449
449
  A(() => {
450
- o == null || o.hasJSActions().then((w) => {
451
- s(w);
452
- }), o == null || o.getFieldObjects().then((w) => {
453
- h(w);
454
- }), i.current && (i.current.div.replaceChildren(), i.current = void 0);
450
+ i.current && (i.current.div.replaceChildren(), i.current = void 0);
455
451
  }, [o]);
456
- const C = D(() => o == null ? void 0 : o.annotationStorage, [o]);
452
+ const f = D(() => o == null ? void 0 : o.annotationStorage, [o]);
457
453
  A(() => {
458
- _ && _.page.getAnnotations().then((w) => {
459
- i.current = void 0, g(w), n.current && (n.current.innerText = "");
454
+ m && m.page.getAnnotations().then((_) => {
455
+ i.current = void 0, s(_), n.current && (n.current.innerText = "");
460
456
  });
461
- }, [_]);
462
- const T = M(
463
- (w) => {
464
- lo(w), !(!p || !o) && (v === Q.PAGE_SCROLLING ? Mt(w, p, o, (S) => d(S.pageIndex + 1)) : Mt(w, p, o, (S) => f(S.pageIndex + 1)));
457
+ }, [m]);
458
+ const v = M(
459
+ (_) => {
460
+ lo(_), !(!l || !o) && (h === Q.PAGE_SCROLLING ? Mt(_, l, o, (g) => c(g.pageIndex + 1)) : Mt(_, l, o, (g) => p(g.pageIndex + 1)));
465
461
  },
466
- [o, p, f, d, v]
462
+ [o, l, p, c, h]
467
463
  );
468
464
  return A(() => {
469
- if (!_ || !p)
465
+ if (!m || !l)
470
466
  return;
471
- const w = _.page.getViewport();
467
+ const _ = m.page.getViewport();
472
468
  if (i.current) {
473
469
  i.current.update({
474
- viewport: w.clone({ dontFlip: !0 })
470
+ viewport: _.clone({ dontFlip: !0 })
475
471
  });
476
472
  return;
477
473
  }
478
- for (const S of p) {
479
- const { annotationType: u } = S;
480
- switch (u) {
474
+ for (const b of l) {
475
+ const { annotationType: S } = b;
476
+ switch (S) {
481
477
  case at.Link:
482
- so(S);
478
+ so(b);
483
479
  break;
484
480
  case at.Widget:
485
481
  break;
486
482
  }
487
483
  }
488
- i.current = new er({
489
- div: n.current,
490
- accessibilityManager: void 0,
491
- annotationCanvasMap: void 0,
492
- annotationEditorUIManager: void 0,
493
- structTreeLayer: void 0,
494
- page: _.page,
495
- viewport: w.clone({ dontFlip: !0 })
496
- }), n.current && uo(n.current, T), i.current.render({
497
- annotations: p,
498
- annotationStorage: C,
499
- hasJSActions: l,
500
- fieldObjects: c,
501
- div: n.current,
502
- viewport: w.clone({ dontFlip: !0 }),
503
- page: _.page,
504
- imageResourcesPath: oo,
505
- renderForms: !1,
506
- linkService: new Cr(),
507
- downloadManager: null,
508
- enableScripting: !1
509
- }).then(() => {
510
- n.current && co(n.current, T);
484
+ (async () => {
485
+ i.current = new er({
486
+ div: n.current,
487
+ accessibilityManager: void 0,
488
+ annotationCanvasMap: void 0,
489
+ annotationEditorUIManager: void 0,
490
+ structTreeLayer: void 0,
491
+ page: m.page,
492
+ viewport: _.clone({ dontFlip: !0 })
493
+ }), n.current && uo(n.current, v);
494
+ const b = await (o == null ? void 0 : o.hasJSActions()), S = await (o == null ? void 0 : o.getFieldObjects());
495
+ return i.current.render({
496
+ annotations: l,
497
+ annotationStorage: f,
498
+ hasJSActions: b,
499
+ fieldObjects: S,
500
+ div: n.current,
501
+ viewport: _.clone({ dontFlip: !0 }),
502
+ page: m.page,
503
+ imageResourcesPath: oo,
504
+ renderForms: !1,
505
+ linkService: new Cr(),
506
+ downloadManager: null,
507
+ enableScripting: !1
508
+ });
509
+ })().then(() => {
510
+ n.current && co(n.current, v);
511
511
  });
512
- }, [p, l, c, T]), /* @__PURE__ */ a(
512
+ }, [o, l, v]), /* @__PURE__ */ a(
513
513
  "div",
514
514
  {
515
515
  "data-rp": `page-${t}-annotationLayer`,
516
- style: { width: `${m == null ? void 0 : m.width}px`, height: `${m == null ? void 0 : m.height}px` },
516
+ style: { width: `${u == null ? void 0 : u.width}px`, height: `${u == null ? void 0 : u.height}px` },
517
517
  className: ro["rp-annotation-layer"],
518
518
  ref: n
519
519
  }
520
520
  );
521
521
  }, ho = Array.from({ length: 21 }, (e, t) => Number((t * 0.05).toFixed(2))), wt = $e((e, t) => {
522
- const { pageNumber: n, style: r, onIntersectRatioChange: o, ...i } = e, { pages: l } = Y(), { rotate: s } = Ve(), { textLayer: c } = cr(), { currentZoom: h } = ht(), p = $(l.get(n)), [g, d] = F(!1), f = $(null), [v, _] = F({
522
+ const { pageNumber: n, style: r, onIntersectRatioChange: o, ...i } = e, { pages: l } = Y(), { rotate: s } = Ve(), { textLayer: c } = cr(), { currentZoom: p } = ht(), h = $(l.get(n)), [m, u] = F(!1), f = $(null), [v, _] = F({
523
523
  width: 0,
524
524
  height: 0
525
525
  });
526
526
  qt(t, () => f.current), A(() => {
527
- if (l && (p.current = l.get(n), p.current)) {
528
- const w = p.current.page.getViewport({ scale: h, rotation: s });
529
- _(w);
527
+ if (l && (h.current = l.get(n), h.current)) {
528
+ const P = h.current.page.getViewport({ scale: p, rotation: s });
529
+ _(P);
530
530
  }
531
- }, [l, n, s, h]);
532
- const m = D(() => {
531
+ }, [l, n, s, p]);
532
+ const g = D(() => {
533
533
  switch (s) {
534
534
  case 90:
535
535
  return `${v.width / 2}px ${v.width / 2}px`;
@@ -539,20 +539,20 @@ const po = (e) => {
539
539
  default:
540
540
  return "center";
541
541
  }
542
- }, [s, v]), C = M(() => {
543
- d(!0);
544
- }, []), T = M(() => {
545
- d(!1);
542
+ }, [s, v]), b = M(() => {
543
+ u(!0);
544
+ }, []), S = M(() => {
545
+ u(!1);
546
546
  }, []);
547
547
  return A(() => {
548
- const w = new IntersectionObserver(
549
- (S) => {
550
- o && o(n, S[0].intersectionRatio);
548
+ const P = new IntersectionObserver(
549
+ (T) => {
550
+ o && o(n, T[0].intersectionRatio);
551
551
  },
552
552
  { threshold: ho }
553
553
  );
554
- return f.current && w.observe(f.current), () => {
555
- w.disconnect(), o && o(n, -1);
554
+ return f.current && P.observe(f.current), () => {
555
+ P.disconnect(), o && o(n, -1);
556
556
  };
557
557
  }, [o, n, s]), /* @__PURE__ */ a(
558
558
  "div",
@@ -564,8 +564,8 @@ const po = (e) => {
564
564
  style: {
565
565
  ...r,
566
566
  "--rp-rotate": `${s}deg`,
567
- "--rp-page-rotate-translate": `${m}`,
568
- "--scale-factor": h
567
+ "--rp-page-rotate-translate": `${g}`,
568
+ "--scale-factor": p
569
569
  },
570
570
  className: Ke["rp-page-wrapper"],
571
571
  children: /* @__PURE__ */ O(
@@ -577,8 +577,8 @@ const po = (e) => {
577
577
  },
578
578
  className: Ke["rp-page"],
579
579
  children: [
580
- /* @__PURE__ */ a(Qr, { onLoading: C, onLoaded: T, pageNumber: n }),
581
- g && /* @__PURE__ */ a("div", { className: Ke["rp-loader-wrapper"], children: /* @__PURE__ */ a(pt, {}) }),
580
+ /* @__PURE__ */ a(Qr, { onLoading: b, onLoaded: S, pageNumber: n }),
581
+ m && /* @__PURE__ */ a("div", { className: Ke["rp-loader-wrapper"], children: /* @__PURE__ */ a(pt, {}) }),
582
582
  c && /* @__PURE__ */ a(no, { pageNumber: n }),
583
583
  /* @__PURE__ */ a(po, { pageNumber: n })
584
584
  ]
@@ -690,23 +690,23 @@ var bo = 150, Co = function(t) {
690
690
  }, Ee = null, Oe = null, De = null;
691
691
  process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Ee = /* @__PURE__ */ new WeakSet(), Oe = /* @__PURE__ */ new WeakSet(), De = /* @__PURE__ */ new WeakSet());
692
692
  function Po(e) {
693
- var t, n = e.getColumnOffset, r = e.getColumnStartIndexForOffset, o = e.getColumnStopIndexForStartIndex, i = e.getColumnWidth, l = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, c = e.getOffsetForColumnAndAlignment, h = e.getOffsetForRowAndAlignment, p = e.getRowHeight, g = e.getRowOffset, d = e.getRowStartIndexForOffset, f = e.getRowStopIndexForStartIndex, v = e.initInstanceProps, _ = e.shouldResetStyleCacheOnItemSizeChange, m = e.validateProps;
694
- return t = /* @__PURE__ */ function(C) {
695
- fo(T, C);
696
- function T(S) {
697
- var u;
698
- return u = C.call(this, S) || this, u._instanceProps = v(u.props, Lt(u)), u._resetIsScrollingTimeoutId = null, u._outerRef = void 0, u.state = {
699
- instance: Lt(u),
693
+ var t, n = e.getColumnOffset, r = e.getColumnStartIndexForOffset, o = e.getColumnStopIndexForStartIndex, i = e.getColumnWidth, l = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, c = e.getOffsetForColumnAndAlignment, p = e.getOffsetForRowAndAlignment, h = e.getRowHeight, m = e.getRowOffset, u = e.getRowStartIndexForOffset, f = e.getRowStopIndexForStartIndex, v = e.initInstanceProps, _ = e.shouldResetStyleCacheOnItemSizeChange, g = e.validateProps;
694
+ return t = /* @__PURE__ */ function(b) {
695
+ fo(S, b);
696
+ function S(T) {
697
+ var d;
698
+ return d = b.call(this, T) || this, d._instanceProps = v(d.props, Lt(d)), d._resetIsScrollingTimeoutId = null, d._outerRef = void 0, d.state = {
699
+ instance: Lt(d),
700
700
  isScrolling: !1,
701
701
  horizontalScrollDirection: "forward",
702
- scrollLeft: typeof u.props.initialScrollLeft == "number" ? u.props.initialScrollLeft : 0,
703
- scrollTop: typeof u.props.initialScrollTop == "number" ? u.props.initialScrollTop : 0,
702
+ scrollLeft: typeof d.props.initialScrollLeft == "number" ? d.props.initialScrollLeft : 0,
703
+ scrollTop: typeof d.props.initialScrollTop == "number" ? d.props.initialScrollTop : 0,
704
704
  scrollUpdateWasRequested: !1,
705
705
  verticalScrollDirection: "forward"
706
- }, u._callOnItemsRendered = void 0, u._callOnItemsRendered = Je(function(P, b, I, y, R, L, N, x) {
707
- return u.props.onItemsRendered({
708
- overscanColumnStartIndex: P,
709
- overscanColumnStopIndex: b,
706
+ }, d._callOnItemsRendered = void 0, d._callOnItemsRendered = Je(function(C, w, I, y, R, L, N, x) {
707
+ return d.props.onItemsRendered({
708
+ overscanColumnStartIndex: C,
709
+ overscanColumnStopIndex: w,
710
710
  overscanRowStartIndex: I,
711
711
  overscanRowStopIndex: y,
712
712
  visibleColumnStartIndex: R,
@@ -714,38 +714,38 @@ function Po(e) {
714
714
  visibleRowStartIndex: N,
715
715
  visibleRowStopIndex: x
716
716
  });
717
- }), u._callOnScroll = void 0, u._callOnScroll = Je(function(P, b, I, y, R) {
718
- return u.props.onScroll({
717
+ }), d._callOnScroll = void 0, d._callOnScroll = Je(function(C, w, I, y, R) {
718
+ return d.props.onScroll({
719
719
  horizontalScrollDirection: I,
720
- scrollLeft: P,
721
- scrollTop: b,
720
+ scrollLeft: C,
721
+ scrollTop: w,
722
722
  verticalScrollDirection: y,
723
723
  scrollUpdateWasRequested: R
724
724
  });
725
- }), u._getItemStyle = void 0, u._getItemStyle = function(P, b) {
726
- var I = u.props, y = I.columnWidth, R = I.direction, L = I.rowHeight, N = u._getItemStyleCache(_ && y, _ && R, _ && L), x = P + ":" + b, E;
725
+ }), d._getItemStyle = void 0, d._getItemStyle = function(C, w) {
726
+ var I = d.props, y = I.columnWidth, R = I.direction, L = I.rowHeight, N = d._getItemStyleCache(_ && y, _ && R, _ && L), x = C + ":" + w, E;
727
727
  if (N.hasOwnProperty(x))
728
728
  E = N[x];
729
729
  else {
730
- var z = n(u.props, b, u._instanceProps), k = R === "rtl";
730
+ var z = n(d.props, w, d._instanceProps), k = R === "rtl";
731
731
  N[x] = E = {
732
732
  position: "absolute",
733
733
  left: k ? void 0 : z,
734
734
  right: k ? z : void 0,
735
- top: g(u.props, P, u._instanceProps),
736
- height: p(u.props, P, u._instanceProps),
737
- width: i(u.props, b, u._instanceProps)
735
+ top: m(d.props, C, d._instanceProps),
736
+ height: h(d.props, C, d._instanceProps),
737
+ width: i(d.props, w, d._instanceProps)
738
738
  };
739
739
  }
740
740
  return E;
741
- }, u._getItemStyleCache = void 0, u._getItemStyleCache = Je(function(P, b, I) {
741
+ }, d._getItemStyleCache = void 0, d._getItemStyleCache = Je(function(C, w, I) {
742
742
  return {};
743
- }), u._onScroll = function(P) {
744
- var b = P.currentTarget, I = b.clientHeight, y = b.clientWidth, R = b.scrollLeft, L = b.scrollTop, N = b.scrollHeight, x = b.scrollWidth;
745
- u.setState(function(E) {
743
+ }), d._onScroll = function(C) {
744
+ var w = C.currentTarget, I = w.clientHeight, y = w.clientWidth, R = w.scrollLeft, L = w.scrollTop, N = w.scrollHeight, x = w.scrollWidth;
745
+ d.setState(function(E) {
746
746
  if (E.scrollLeft === R && E.scrollTop === L)
747
747
  return null;
748
- var z = u.props.direction, k = R;
748
+ var z = d.props.direction, k = R;
749
749
  if (z === "rtl")
750
750
  switch (At()) {
751
751
  case "negative":
@@ -765,80 +765,80 @@ function Po(e) {
765
765
  verticalScrollDirection: E.scrollTop < L ? "forward" : "backward",
766
766
  scrollUpdateWasRequested: !1
767
767
  };
768
- }, u._resetIsScrollingDebounced);
769
- }, u._outerRefSetter = function(P) {
770
- var b = u.props.outerRef;
771
- u._outerRef = P, typeof b == "function" ? b(P) : b != null && typeof b == "object" && b.hasOwnProperty("current") && (b.current = P);
772
- }, u._resetIsScrollingDebounced = function() {
773
- u._resetIsScrollingTimeoutId !== null && Dt(u._resetIsScrollingTimeoutId), u._resetIsScrollingTimeoutId = _o(u._resetIsScrolling, bo);
774
- }, u._resetIsScrolling = function() {
775
- u._resetIsScrollingTimeoutId = null, u.setState({
768
+ }, d._resetIsScrollingDebounced);
769
+ }, d._outerRefSetter = function(C) {
770
+ var w = d.props.outerRef;
771
+ d._outerRef = C, typeof w == "function" ? w(C) : w != null && typeof w == "object" && w.hasOwnProperty("current") && (w.current = C);
772
+ }, d._resetIsScrollingDebounced = function() {
773
+ d._resetIsScrollingTimeoutId !== null && Dt(d._resetIsScrollingTimeoutId), d._resetIsScrollingTimeoutId = _o(d._resetIsScrolling, bo);
774
+ }, d._resetIsScrolling = function() {
775
+ d._resetIsScrollingTimeoutId = null, d.setState({
776
776
  isScrolling: !1
777
777
  }, function() {
778
- u._getItemStyleCache(-1);
778
+ d._getItemStyleCache(-1);
779
779
  });
780
- }, u;
780
+ }, d;
781
781
  }
782
- T.getDerivedStateFromProps = function(u, P) {
783
- return So(u, P), m(u), null;
782
+ S.getDerivedStateFromProps = function(d, C) {
783
+ return So(d, C), g(d), null;
784
784
  };
785
- var w = T.prototype;
786
- return w.scrollTo = function(u) {
787
- var P = u.scrollLeft, b = u.scrollTop;
788
- P !== void 0 && (P = Math.max(0, P)), b !== void 0 && (b = Math.max(0, b)), this.setState(function(I) {
789
- return P === void 0 && (P = I.scrollLeft), b === void 0 && (b = I.scrollTop), I.scrollLeft === P && I.scrollTop === b ? null : {
790
- horizontalScrollDirection: I.scrollLeft < P ? "forward" : "backward",
791
- scrollLeft: P,
792
- scrollTop: b,
785
+ var P = S.prototype;
786
+ return P.scrollTo = function(d) {
787
+ var C = d.scrollLeft, w = d.scrollTop;
788
+ C !== void 0 && (C = Math.max(0, C)), w !== void 0 && (w = Math.max(0, w)), this.setState(function(I) {
789
+ return C === void 0 && (C = I.scrollLeft), w === void 0 && (w = I.scrollTop), I.scrollLeft === C && I.scrollTop === w ? null : {
790
+ horizontalScrollDirection: I.scrollLeft < C ? "forward" : "backward",
791
+ scrollLeft: C,
792
+ scrollTop: w,
793
793
  scrollUpdateWasRequested: !0,
794
- verticalScrollDirection: I.scrollTop < b ? "forward" : "backward"
794
+ verticalScrollDirection: I.scrollTop < w ? "forward" : "backward"
795
795
  };
796
796
  }, this._resetIsScrollingDebounced);
797
- }, w.scrollToItem = function(u) {
798
- var P = u.align, b = P === void 0 ? "auto" : P, I = u.columnIndex, y = u.rowIndex, R = this.props, L = R.columnCount, N = R.height, x = R.rowCount, E = R.width, z = this.state, k = z.scrollLeft, G = z.scrollTop, Z = wo();
797
+ }, P.scrollToItem = function(d) {
798
+ var C = d.align, w = C === void 0 ? "auto" : C, I = d.columnIndex, y = d.rowIndex, R = this.props, L = R.columnCount, N = R.height, x = R.rowCount, E = R.width, z = this.state, k = z.scrollLeft, G = z.scrollTop, Z = wo();
799
799
  I !== void 0 && (I = Math.max(0, Math.min(I, L - 1))), y !== void 0 && (y = Math.max(0, Math.min(y, x - 1)));
800
800
  var U = l(this.props, this._instanceProps), K = s(this.props, this._instanceProps), ue = K > E ? Z : 0, oe = U > N ? Z : 0;
801
801
  this.scrollTo({
802
- scrollLeft: I !== void 0 ? c(this.props, I, b, k, this._instanceProps, oe) : k,
803
- scrollTop: y !== void 0 ? h(this.props, y, b, G, this._instanceProps, ue) : G
802
+ scrollLeft: I !== void 0 ? c(this.props, I, w, k, this._instanceProps, oe) : k,
803
+ scrollTop: y !== void 0 ? p(this.props, y, w, G, this._instanceProps, ue) : G
804
804
  });
805
- }, w.componentDidMount = function() {
806
- var u = this.props, P = u.initialScrollLeft, b = u.initialScrollTop;
805
+ }, P.componentDidMount = function() {
806
+ var d = this.props, C = d.initialScrollLeft, w = d.initialScrollTop;
807
807
  if (this._outerRef != null) {
808
808
  var I = this._outerRef;
809
- typeof P == "number" && (I.scrollLeft = P), typeof b == "number" && (I.scrollTop = b);
809
+ typeof C == "number" && (I.scrollLeft = C), typeof w == "number" && (I.scrollTop = w);
810
810
  }
811
811
  this._callPropsCallbacks();
812
- }, w.componentDidUpdate = function() {
813
- var u = this.props.direction, P = this.state, b = P.scrollLeft, I = P.scrollTop, y = P.scrollUpdateWasRequested;
812
+ }, P.componentDidUpdate = function() {
813
+ var d = this.props.direction, C = this.state, w = C.scrollLeft, I = C.scrollTop, y = C.scrollUpdateWasRequested;
814
814
  if (y && this._outerRef != null) {
815
815
  var R = this._outerRef;
816
- if (u === "rtl")
816
+ if (d === "rtl")
817
817
  switch (At()) {
818
818
  case "negative":
819
- R.scrollLeft = -b;
819
+ R.scrollLeft = -w;
820
820
  break;
821
821
  case "positive-ascending":
822
- R.scrollLeft = b;
822
+ R.scrollLeft = w;
823
823
  break;
824
824
  default:
825
825
  var L = R.clientWidth, N = R.scrollWidth;
826
- R.scrollLeft = N - L - b;
826
+ R.scrollLeft = N - L - w;
827
827
  break;
828
828
  }
829
829
  else
830
- R.scrollLeft = Math.max(0, b);
830
+ R.scrollLeft = Math.max(0, w);
831
831
  R.scrollTop = Math.max(0, I);
832
832
  }
833
833
  this._callPropsCallbacks();
834
- }, w.componentWillUnmount = function() {
834
+ }, P.componentWillUnmount = function() {
835
835
  this._resetIsScrollingTimeoutId !== null && Dt(this._resetIsScrollingTimeoutId);
836
- }, w.render = function() {
837
- var u = this.props, P = u.children, b = u.className, I = u.columnCount, y = u.direction, R = u.height, L = u.innerRef, N = u.innerElementType, x = u.innerTagName, E = u.itemData, z = u.itemKey, k = z === void 0 ? Co : z, G = u.outerElementType, Z = u.outerTagName, U = u.rowCount, K = u.style, ue = u.useIsScrolling, oe = u.width, ve = this.state.isScrolling, _e = this._getHorizontalRangeToRender(), Se = _e[0], W = _e[1], H = this._getVerticalRangeToRender(), q = H[0], le = H[1], Te = [];
836
+ }, P.render = function() {
837
+ var d = this.props, C = d.children, w = d.className, I = d.columnCount, y = d.direction, R = d.height, L = d.innerRef, N = d.innerElementType, x = d.innerTagName, E = d.itemData, z = d.itemKey, k = z === void 0 ? Co : z, G = d.outerElementType, Z = d.outerTagName, U = d.rowCount, K = d.style, ue = d.useIsScrolling, oe = d.width, ve = this.state.isScrolling, _e = this._getHorizontalRangeToRender(), Se = _e[0], W = _e[1], H = this._getVerticalRangeToRender(), q = H[0], le = H[1], Te = [];
838
838
  if (I > 0 && U)
839
839
  for (var de = q; de <= le; de++)
840
840
  for (var pe = Se; pe <= W; pe++)
841
- Te.push(Ne(P, {
841
+ Te.push(Ne(C, {
842
842
  columnIndex: pe,
843
843
  data: E,
844
844
  isScrolling: ue ? ve : void 0,
@@ -852,7 +852,7 @@ function Po(e) {
852
852
  }));
853
853
  var Ze = l(this.props, this._instanceProps), je = s(this.props, this._instanceProps);
854
854
  return Ne(G || Z || "div", {
855
- className: b,
855
+ className: w,
856
856
  onScroll: this._onScroll,
857
857
  ref: this._outerRefSetter,
858
858
  style: lt({
@@ -873,9 +873,9 @@ function Po(e) {
873
873
  width: je
874
874
  }
875
875
  }));
876
- }, w._callPropsCallbacks = function() {
877
- var u = this.props, P = u.columnCount, b = u.onItemsRendered, I = u.onScroll, y = u.rowCount;
878
- if (typeof b == "function" && P > 0 && y > 0) {
876
+ }, P._callPropsCallbacks = function() {
877
+ var d = this.props, C = d.columnCount, w = d.onItemsRendered, I = d.onScroll, y = d.rowCount;
878
+ if (typeof w == "function" && C > 0 && y > 0) {
879
879
  var R = this._getHorizontalRangeToRender(), L = R[0], N = R[1], x = R[2], E = R[3], z = this._getVerticalRangeToRender(), k = z[0], G = z[1], Z = z[2], U = z[3];
880
880
  this._callOnItemsRendered(L, N, k, G, x, E, Z, U);
881
881
  }
@@ -883,19 +883,19 @@ function Po(e) {
883
883
  var K = this.state, ue = K.horizontalScrollDirection, oe = K.scrollLeft, ve = K.scrollTop, _e = K.scrollUpdateWasRequested, Se = K.verticalScrollDirection;
884
884
  this._callOnScroll(oe, ve, ue, Se, _e);
885
885
  }
886
- }, w._getHorizontalRangeToRender = function() {
887
- var u = this.props, P = u.columnCount, b = u.overscanColumnCount, I = u.overscanColumnsCount, y = u.overscanCount, R = u.rowCount, L = this.state, N = L.horizontalScrollDirection, x = L.isScrolling, E = L.scrollLeft, z = b || I || y || 1;
888
- if (P === 0 || R === 0)
886
+ }, P._getHorizontalRangeToRender = function() {
887
+ var d = this.props, C = d.columnCount, w = d.overscanColumnCount, I = d.overscanColumnsCount, y = d.overscanCount, R = d.rowCount, L = this.state, N = L.horizontalScrollDirection, x = L.isScrolling, E = L.scrollLeft, z = w || I || y || 1;
888
+ if (C === 0 || R === 0)
889
889
  return [0, 0, 0, 0];
890
890
  var k = r(this.props, E, this._instanceProps), G = o(this.props, k, E, this._instanceProps), Z = !x || N === "backward" ? Math.max(1, z) : 1, U = !x || N === "forward" ? Math.max(1, z) : 1;
891
- return [Math.max(0, k - Z), Math.max(0, Math.min(P - 1, G + U)), k, G];
892
- }, w._getVerticalRangeToRender = function() {
893
- var u = this.props, P = u.columnCount, b = u.overscanCount, I = u.overscanRowCount, y = u.overscanRowsCount, R = u.rowCount, L = this.state, N = L.isScrolling, x = L.verticalScrollDirection, E = L.scrollTop, z = I || y || b || 1;
894
- if (P === 0 || R === 0)
891
+ return [Math.max(0, k - Z), Math.max(0, Math.min(C - 1, G + U)), k, G];
892
+ }, P._getVerticalRangeToRender = function() {
893
+ var d = this.props, C = d.columnCount, w = d.overscanCount, I = d.overscanRowCount, y = d.overscanRowsCount, R = d.rowCount, L = this.state, N = L.isScrolling, x = L.verticalScrollDirection, E = L.scrollTop, z = I || y || w || 1;
894
+ if (C === 0 || R === 0)
895
895
  return [0, 0, 0, 0];
896
- var k = d(this.props, E, this._instanceProps), G = f(this.props, k, E, this._instanceProps), Z = !N || x === "backward" ? Math.max(1, z) : 1, U = !N || x === "forward" ? Math.max(1, z) : 1;
896
+ var k = u(this.props, E, this._instanceProps), G = f(this.props, k, E, this._instanceProps), Z = !N || x === "backward" ? Math.max(1, z) : 1, U = !N || x === "forward" ? Math.max(1, z) : 1;
897
897
  return [Math.max(0, k - Z), Math.max(0, Math.min(R - 1, G + U)), k, G];
898
- }, T;
898
+ }, S;
899
899
  }(zn), t.defaultProps = {
900
900
  direction: "ltr",
901
901
  itemData: void 0,
@@ -903,9 +903,9 @@ function Po(e) {
903
903
  }, t;
904
904
  }
905
905
  var So = function(t, n) {
906
- var r = t.children, o = t.direction, i = t.height, l = t.innerTagName, s = t.outerTagName, c = t.overscanColumnsCount, h = t.overscanCount, p = t.overscanRowsCount, g = t.width, d = n.instance;
906
+ var r = t.children, o = t.direction, i = t.height, l = t.innerTagName, s = t.outerTagName, c = t.overscanColumnsCount, p = t.overscanCount, h = t.overscanRowsCount, m = t.width, u = n.instance;
907
907
  if (process.env.NODE_ENV !== "production") {
908
- if (typeof h == "number" && Ee && !Ee.has(d) && (Ee.add(d), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof c == "number" || typeof p == "number") && Oe && !Oe.has(d) && (Oe.add(d), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (l != null || s != null) && De && !De.has(d) && (De.add(d), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
908
+ if (typeof p == "number" && Ee && !Ee.has(u) && (Ee.add(u), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof c == "number" || typeof h == "number") && Oe && !Oe.has(u) && (Oe.add(u), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (l != null || s != null) && De && !De.has(u) && (De.add(u), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
909
909
  throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
910
910
  switch (o) {
911
911
  case "ltr":
@@ -914,8 +914,8 @@ var So = function(t, n) {
914
914
  default:
915
915
  throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + o + '" was specified.'));
916
916
  }
917
- if (typeof g != "number")
918
- throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (g === null ? "null" : typeof g) + '" was specified.'));
917
+ if (typeof m != "number")
918
+ throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (m === null ? "null" : typeof m) + '" was specified.'));
919
919
  if (typeof i != "number")
920
920
  throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (i === null ? "null" : typeof i) + '" was specified.'));
921
921
  }
@@ -925,30 +925,30 @@ var So = function(t, n) {
925
925
  var c = o[l];
926
926
  s = c.offset + c.size;
927
927
  }
928
- var h = r - l - 1, p = h * i;
929
- return s + p;
928
+ var p = r - l - 1, h = p * i;
929
+ return s + h;
930
930
  }, ln = function(t, n) {
931
931
  var r = t.columnCount, o = n.columnMetadataMap, i = n.estimatedColumnWidth, l = n.lastMeasuredColumnIndex, s = 0;
932
932
  if (l >= r && (l = r - 1), l >= 0) {
933
933
  var c = o[l];
934
934
  s = c.offset + c.size;
935
935
  }
936
- var h = r - l - 1, p = h * i;
937
- return s + p;
936
+ var p = r - l - 1, h = p * i;
937
+ return s + h;
938
938
  }, ie = function(t, n, r, o) {
939
939
  var i, l, s;
940
940
  if (t === "column" ? (i = o.columnMetadataMap, l = n.columnWidth, s = o.lastMeasuredColumnIndex) : (i = o.rowMetadataMap, l = n.rowHeight, s = o.lastMeasuredRowIndex), r > s) {
941
941
  var c = 0;
942
942
  if (s >= 0) {
943
- var h = i[s];
944
- c = h.offset + h.size;
943
+ var p = i[s];
944
+ c = p.offset + p.size;
945
945
  }
946
- for (var p = s + 1; p <= r; p++) {
947
- var g = l(p);
948
- i[p] = {
946
+ for (var h = s + 1; h <= r; h++) {
947
+ var m = l(h);
948
+ i[h] = {
949
949
  offset: c,
950
- size: g
951
- }, c += g;
950
+ size: m
951
+ }, c += m;
952
952
  }
953
953
  t === "column" ? o.lastMeasuredColumnIndex = r : o.lastMeasuredRowIndex = r;
954
954
  }
@@ -971,17 +971,17 @@ var So = function(t, n) {
971
971
  o += s, s *= 2;
972
972
  return cn(t, n, r, Math.min(o, l - 1), Math.floor(o / 2), i);
973
973
  }, kt = function(t, n, r, o, i, l, s) {
974
- var c = t === "column" ? n.width : n.height, h = ie(t, n, r, l), p = t === "column" ? ln(n, l) : sn(n, l), g = Math.max(0, Math.min(p - c, h.offset)), d = Math.max(0, h.offset - c + s + h.size);
975
- switch (o === "smart" && (i >= d - c && i <= g + c ? o = "auto" : o = "center"), o) {
974
+ var c = t === "column" ? n.width : n.height, p = ie(t, n, r, l), h = t === "column" ? ln(n, l) : sn(n, l), m = Math.max(0, Math.min(h - c, p.offset)), u = Math.max(0, p.offset - c + s + p.size);
975
+ switch (o === "smart" && (i >= u - c && i <= m + c ? o = "auto" : o = "center"), o) {
976
976
  case "start":
977
- return g;
977
+ return m;
978
978
  case "end":
979
- return d;
979
+ return u;
980
980
  case "center":
981
- return Math.round(d + (g - d) / 2);
981
+ return Math.round(u + (m - u) / 2);
982
982
  case "auto":
983
983
  default:
984
- return i >= d && i <= g ? i : d > g || i < d ? d : g;
984
+ return i >= u && i <= m ? i : u > m || i < u ? u : m;
985
985
  }
986
986
  }, Io = /* @__PURE__ */ Po({
987
987
  getColumnOffset: function(t, n, r) {
@@ -991,9 +991,9 @@ var So = function(t, n) {
991
991
  return Ft("column", t, r, n);
992
992
  },
993
993
  getColumnStopIndexForStartIndex: function(t, n, r, o) {
994
- for (var i = t.columnCount, l = t.width, s = ie("column", t, n, o), c = r + l, h = s.offset + s.size, p = n; p < i - 1 && h < c; )
995
- p++, h += ie("column", t, p, o).size;
996
- return p;
994
+ for (var i = t.columnCount, l = t.width, s = ie("column", t, n, o), c = r + l, p = s.offset + s.size, h = n; h < i - 1 && p < c; )
995
+ h++, p += ie("column", t, h, o).size;
996
+ return h;
997
997
  },
998
998
  getColumnWidth: function(t, n, r) {
999
999
  return r.columnMetadataMap[n].size;
@@ -1016,9 +1016,9 @@ var So = function(t, n) {
1016
1016
  return Ft("row", t, r, n);
1017
1017
  },
1018
1018
  getRowStopIndexForStartIndex: function(t, n, r, o) {
1019
- for (var i = t.rowCount, l = t.height, s = ie("row", t, n, o), c = r + l, h = s.offset + s.size, p = n; p < i - 1 && h < c; )
1020
- p++, h += ie("row", t, p, o).size;
1021
- return p;
1019
+ for (var i = t.rowCount, l = t.height, s = ie("row", t, n, o), c = r + l, p = s.offset + s.size, h = n; h < i - 1 && p < c; )
1020
+ h++, p += ie("row", t, h, o).size;
1021
+ return h;
1022
1022
  },
1023
1023
  initInstanceProps: function(t, n) {
1024
1024
  var r = t, o = r.estimatedColumnWidth, i = r.estimatedRowHeight, l = {
@@ -1040,8 +1040,8 @@ var So = function(t, n) {
1040
1040
  shouldForceUpdate: c
1041
1041
  });
1042
1042
  }, n.resetAfterIndices = function(s) {
1043
- var c = s.columnIndex, h = s.rowIndex, p = s.shouldForceUpdate, g = p === void 0 ? !0 : p;
1044
- typeof c == "number" && (l.lastMeasuredColumnIndex = Math.min(l.lastMeasuredColumnIndex, c - 1)), typeof h == "number" && (l.lastMeasuredRowIndex = Math.min(l.lastMeasuredRowIndex, h - 1)), n._getItemStyleCache(-1), g && n.forceUpdate();
1043
+ var c = s.columnIndex, p = s.rowIndex, h = s.shouldForceUpdate, m = h === void 0 ? !0 : h;
1044
+ typeof c == "number" && (l.lastMeasuredColumnIndex = Math.min(l.lastMeasuredColumnIndex, c - 1)), typeof p == "number" && (l.lastMeasuredRowIndex = Math.min(l.lastMeasuredRowIndex, p - 1)), n._getItemStyleCache(-1), m && n.forceUpdate();
1045
1045
  }, l;
1046
1046
  },
1047
1047
  shouldResetStyleCacheOnItemSizeChange: !1,
@@ -1077,19 +1077,19 @@ const Mo = () => {
1077
1077
  ), l = M(
1078
1078
  (f) => o.heights[f] || 0,
1079
1079
  [o]
1080
- ), s = D(() => o.heights.length, [o]), c = D(() => Math.max(...o.widths), [o]), h = D(() => t === Q.HORIZONTAL_SCROLLING ? s : e === ze.DUAL_PAGE ? 2 : 1, [e, t, t, s, r, c]);
1080
+ ), s = D(() => o.heights.length, [o]), c = D(() => Math.max(...o.widths), [o]), p = D(() => t === Q.HORIZONTAL_SCROLLING ? s : e === ze.DUAL_PAGE ? 2 : 1, [e, t, t, s, r, c]);
1081
1081
  A(() => {
1082
- n(h);
1083
- }, [h, n]);
1084
- const p = D(() => t === Q.HORIZONTAL_SCROLLING || t === Q.PAGE_SCROLLING ? 1 : Math.round(s / h), [h, s, t]), g = D(() => o.heights.reduce((f, v) => f + v, 0) / o.heights.length || 0, [o]), d = D(() => o.widths.reduce((f, v) => f + v, 0) / o.heights.length || 0, [o]);
1082
+ n(p);
1083
+ }, [p, n]);
1084
+ const h = D(() => t === Q.HORIZONTAL_SCROLLING || t === Q.PAGE_SCROLLING ? 1 : Math.round(s / p), [p, s, t]), m = D(() => o.heights.reduce((f, v) => f + v, 0) / o.heights.length || 0, [o]), u = D(() => o.widths.reduce((f, v) => f + v, 0) / o.heights.length || 0, [o]);
1085
1085
  return {
1086
- rowCount: p,
1086
+ rowCount: h,
1087
1087
  rowHeight: l,
1088
- columnCount: h,
1088
+ columnCount: p,
1089
1089
  columnWidth: i,
1090
1090
  pageDimension: o,
1091
- estimatedRowHeight: g,
1092
- estimatedColumnWidth: d
1091
+ estimatedRowHeight: m,
1092
+ estimatedColumnWidth: u
1093
1093
  };
1094
1094
  };
1095
1095
  let J;
@@ -1112,68 +1112,68 @@ function Lo(e) {
1112
1112
  let t, n, r, o, i, l, s;
1113
1113
  const c = typeof document < "u" && document.attachEvent;
1114
1114
  if (!c) {
1115
- l = function(C) {
1116
- const T = C.__resizeTriggers__, w = T.firstElementChild, S = T.lastElementChild, u = w.firstElementChild;
1117
- S.scrollLeft = S.scrollWidth, S.scrollTop = S.scrollHeight, u.style.width = w.offsetWidth + 1 + "px", u.style.height = w.offsetHeight + 1 + "px", w.scrollLeft = w.scrollWidth, w.scrollTop = w.scrollHeight;
1118
- }, i = function(C) {
1119
- return C.offsetWidth !== C.__resizeLast__.width || C.offsetHeight !== C.__resizeLast__.height;
1120
- }, s = function(C) {
1121
- if (C.target.className && typeof C.target.className.indexOf == "function" && C.target.className.indexOf("contract-trigger") < 0 && C.target.className.indexOf("expand-trigger") < 0)
1115
+ l = function(b) {
1116
+ const S = b.__resizeTriggers__, P = S.firstElementChild, T = S.lastElementChild, d = P.firstElementChild;
1117
+ T.scrollLeft = T.scrollWidth, T.scrollTop = T.scrollHeight, d.style.width = P.offsetWidth + 1 + "px", d.style.height = P.offsetHeight + 1 + "px", P.scrollLeft = P.scrollWidth, P.scrollTop = P.scrollHeight;
1118
+ }, i = function(b) {
1119
+ return b.offsetWidth !== b.__resizeLast__.width || b.offsetHeight !== b.__resizeLast__.height;
1120
+ }, s = function(b) {
1121
+ if (b.target.className && typeof b.target.className.indexOf == "function" && b.target.className.indexOf("contract-trigger") < 0 && b.target.className.indexOf("expand-trigger") < 0)
1122
1122
  return;
1123
- const T = this;
1123
+ const S = this;
1124
1124
  l(this), this.__resizeRAF__ && ut(this.__resizeRAF__), this.__resizeRAF__ = dt(function() {
1125
- i(T) && (T.__resizeLast__.width = T.offsetWidth, T.__resizeLast__.height = T.offsetHeight, T.__resizeListeners__.forEach(function(u) {
1126
- u.call(T, C);
1125
+ i(S) && (S.__resizeLast__.width = S.offsetWidth, S.__resizeLast__.height = S.offsetHeight, S.__resizeListeners__.forEach(function(d) {
1126
+ d.call(S, b);
1127
1127
  }));
1128
1128
  });
1129
1129
  };
1130
- let d = !1, f = "";
1130
+ let u = !1, f = "";
1131
1131
  r = "animationstart";
1132
1132
  const v = "Webkit Moz O ms".split(" ");
1133
- let _ = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), m = "";
1133
+ let _ = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), g = "";
1134
1134
  {
1135
- const C = document.createElement("fakeelement");
1136
- if (C.style.animationName !== void 0 && (d = !0), d === !1) {
1137
- for (let T = 0; T < v.length; T++)
1138
- if (C.style[v[T] + "AnimationName"] !== void 0) {
1139
- m = v[T], f = "-" + m.toLowerCase() + "-", r = _[T], d = !0;
1135
+ const b = document.createElement("fakeelement");
1136
+ if (b.style.animationName !== void 0 && (u = !0), u === !1) {
1137
+ for (let S = 0; S < v.length; S++)
1138
+ if (b.style[v[S] + "AnimationName"] !== void 0) {
1139
+ g = v[S], f = "-" + g.toLowerCase() + "-", r = _[S], u = !0;
1140
1140
  break;
1141
1141
  }
1142
1142
  }
1143
1143
  }
1144
1144
  n = "resizeanim", t = "@" + f + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", o = f + "animation: 1ms " + n + "; ";
1145
1145
  }
1146
- const h = function(d) {
1147
- if (!d.getElementById("detectElementResize")) {
1148
- const f = (t || "") + ".resize-triggers { " + (o || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', v = d.head || d.getElementsByTagName("head")[0], _ = d.createElement("style");
1149
- _.id = "detectElementResize", _.type = "text/css", e != null && _.setAttribute("nonce", e), _.styleSheet ? _.styleSheet.cssText = f : _.appendChild(d.createTextNode(f)), v.appendChild(_);
1146
+ const p = function(u) {
1147
+ if (!u.getElementById("detectElementResize")) {
1148
+ const f = (t || "") + ".resize-triggers { " + (o || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', v = u.head || u.getElementsByTagName("head")[0], _ = u.createElement("style");
1149
+ _.id = "detectElementResize", _.type = "text/css", e != null && _.setAttribute("nonce", e), _.styleSheet ? _.styleSheet.cssText = f : _.appendChild(u.createTextNode(f)), v.appendChild(_);
1150
1150
  }
1151
1151
  };
1152
1152
  return {
1153
- addResizeListener: function(d, f) {
1153
+ addResizeListener: function(u, f) {
1154
1154
  if (c)
1155
- d.attachEvent("onresize", f);
1155
+ u.attachEvent("onresize", f);
1156
1156
  else {
1157
- if (!d.__resizeTriggers__) {
1158
- const v = d.ownerDocument, _ = J.getComputedStyle(d);
1159
- _ && _.position === "static" && (d.style.position = "relative"), h(v), d.__resizeLast__ = {}, d.__resizeListeners__ = [], (d.__resizeTriggers__ = v.createElement("div")).className = "resize-triggers";
1160
- const m = v.createElement("div");
1161
- m.className = "expand-trigger", m.appendChild(v.createElement("div"));
1162
- const C = v.createElement("div");
1163
- C.className = "contract-trigger", d.__resizeTriggers__.appendChild(m), d.__resizeTriggers__.appendChild(C), d.appendChild(d.__resizeTriggers__), l(d), d.addEventListener("scroll", s, !0), r && (d.__resizeTriggers__.__animationListener__ = function(w) {
1164
- w.animationName === n && l(d);
1165
- }, d.__resizeTriggers__.addEventListener(r, d.__resizeTriggers__.__animationListener__));
1157
+ if (!u.__resizeTriggers__) {
1158
+ const v = u.ownerDocument, _ = J.getComputedStyle(u);
1159
+ _ && _.position === "static" && (u.style.position = "relative"), p(v), u.__resizeLast__ = {}, u.__resizeListeners__ = [], (u.__resizeTriggers__ = v.createElement("div")).className = "resize-triggers";
1160
+ const g = v.createElement("div");
1161
+ g.className = "expand-trigger", g.appendChild(v.createElement("div"));
1162
+ const b = v.createElement("div");
1163
+ b.className = "contract-trigger", u.__resizeTriggers__.appendChild(g), u.__resizeTriggers__.appendChild(b), u.appendChild(u.__resizeTriggers__), l(u), u.addEventListener("scroll", s, !0), r && (u.__resizeTriggers__.__animationListener__ = function(P) {
1164
+ P.animationName === n && l(u);
1165
+ }, u.__resizeTriggers__.addEventListener(r, u.__resizeTriggers__.__animationListener__));
1166
1166
  }
1167
- d.__resizeListeners__.push(f);
1167
+ u.__resizeListeners__.push(f);
1168
1168
  }
1169
1169
  },
1170
- removeResizeListener: function(d, f) {
1170
+ removeResizeListener: function(u, f) {
1171
1171
  if (c)
1172
- d.detachEvent("onresize", f);
1173
- else if (d.__resizeListeners__.splice(d.__resizeListeners__.indexOf(f), 1), !d.__resizeListeners__.length) {
1174
- d.removeEventListener("scroll", s, !0), d.__resizeTriggers__.__animationListener__ && (d.__resizeTriggers__.removeEventListener(r, d.__resizeTriggers__.__animationListener__), d.__resizeTriggers__.__animationListener__ = null);
1172
+ u.detachEvent("onresize", f);
1173
+ else if (u.__resizeListeners__.splice(u.__resizeListeners__.indexOf(f), 1), !u.__resizeListeners__.length) {
1174
+ u.removeEventListener("scroll", s, !0), u.__resizeTriggers__.__animationListener__ && (u.__resizeTriggers__.removeEventListener(r, u.__resizeTriggers__.__animationListener__), u.__resizeTriggers__.__animationListener__ = null);
1175
1175
  try {
1176
- d.__resizeTriggers__ = !d.removeChild(d.__resizeTriggers__);
1176
+ u.__resizeTriggers__ = !u.removeChild(u.__resizeTriggers__);
1177
1177
  } catch {
1178
1178
  }
1179
1179
  }
@@ -1195,16 +1195,16 @@ class No extends Fn {
1195
1195
  onResize: o
1196
1196
  } = this.props;
1197
1197
  if (this._parentNode) {
1198
- const i = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(i.paddingLeft || "0"), s = parseFloat(i.paddingRight || "0"), c = parseFloat(i.paddingTop || "0"), h = parseFloat(i.paddingBottom || "0"), p = this._parentNode.getBoundingClientRect(), g = p.height - c - h, d = p.width - l - s, f = this._parentNode.offsetHeight - c - h, v = this._parentNode.offsetWidth - l - s;
1199
- (!n && (this.state.height !== f || this.state.scaledHeight !== g) || !r && (this.state.width !== v || this.state.scaledWidth !== d)) && (this.setState({
1198
+ const i = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(i.paddingLeft || "0"), s = parseFloat(i.paddingRight || "0"), c = parseFloat(i.paddingTop || "0"), p = parseFloat(i.paddingBottom || "0"), h = this._parentNode.getBoundingClientRect(), m = h.height - c - p, u = h.width - l - s, f = this._parentNode.offsetHeight - c - p, v = this._parentNode.offsetWidth - l - s;
1199
+ (!n && (this.state.height !== f || this.state.scaledHeight !== m) || !r && (this.state.width !== v || this.state.scaledWidth !== u)) && (this.setState({
1200
1200
  height: f,
1201
1201
  width: v,
1202
- scaledHeight: g,
1203
- scaledWidth: d
1202
+ scaledHeight: m,
1203
+ scaledWidth: u
1204
1204
  }), typeof o == "function" && o({
1205
1205
  height: f,
1206
- scaledHeight: g,
1207
- scaledWidth: d,
1206
+ scaledHeight: m,
1207
+ scaledWidth: u,
1208
1208
  width: v
1209
1209
  }));
1210
1210
  }
@@ -1237,54 +1237,54 @@ class No extends Fn {
1237
1237
  doNotBailOutOnEmptyChildren: l = !1,
1238
1238
  nonce: s,
1239
1239
  onResize: c,
1240
- style: h = {},
1241
- tagName: p = "div",
1242
- ...g
1240
+ style: p = {},
1241
+ tagName: h = "div",
1242
+ ...m
1243
1243
  } = this.props, {
1244
- height: d,
1244
+ height: u,
1245
1245
  scaledHeight: f,
1246
1246
  scaledWidth: v,
1247
1247
  width: _
1248
- } = this.state, m = {
1248
+ } = this.state, g = {
1249
1249
  overflow: "visible"
1250
- }, C = {};
1251
- let T = !1;
1252
- return o || (d === 0 && (T = !0), m.height = 0, C.height = d, C.scaledHeight = f), i || (_ === 0 && (T = !0), m.width = 0, C.width = _, C.scaledWidth = v), l && (T = !1), Ne(p, {
1250
+ }, b = {};
1251
+ let S = !1;
1252
+ return o || (u === 0 && (S = !0), g.height = 0, b.height = u, b.scaledHeight = f), i || (_ === 0 && (S = !0), g.width = 0, b.width = _, b.scaledWidth = v), l && (S = !1), Ne(h, {
1253
1253
  ref: this._setRef,
1254
1254
  style: {
1255
- ...m,
1256
- ...h
1255
+ ...g,
1256
+ ...p
1257
1257
  },
1258
- ...g
1259
- }, !T && t(C));
1258
+ ...m
1259
+ }, !S && t(b));
1260
1260
  }
1261
1261
  }
1262
1262
  const Eo = (e = 1) => {
1263
- const [t, n] = F(e), [r, o] = F(0), { scrollToPage: i } = _t(), l = $(1), { isScrolling: s } = Kt(), { viewMode: c } = Ge(), { scrollMode: h } = Pe(), p = yr(t, 100), g = M(
1264
- (m) => {
1265
- if (!/^[0-9]*$/g.test(m.toString()) || !m)
1263
+ const [t, n] = F(e), [r, o] = F(0), { scrollToPage: i } = _t(), l = $(1), { isScrolling: s } = Kt(), { viewMode: c } = Ge(), { scrollMode: p } = Pe(), h = yr(t, 100), m = M(
1264
+ (g) => {
1265
+ if (!/^[0-9]*$/g.test(g.toString()) || !g)
1266
1266
  return { success: !1, currentPage: l.current };
1267
- const T = +m;
1268
- return T < 0 || T > r ? { success: !1, currentPage: l.current } : (n(T), l.current = T, { success: !0, currentPage: +m });
1267
+ const S = +g;
1268
+ return S < 0 || S > r ? { success: !1, currentPage: l.current } : (n(S), l.current = S, { success: !0, currentPage: +g });
1269
1269
  },
1270
1270
  [r]
1271
- ), d = M(g, [g]), f = M(
1272
- (m) => {
1273
- const C = g(m);
1274
- return C.success && (s.current = !0, i(C.currentPage)), C;
1271
+ ), u = M(m, [m]), f = M(
1272
+ (g) => {
1273
+ const b = m(g);
1274
+ return b.success && (s.current = !0, i(b.currentPage)), b;
1275
1275
  },
1276
- [g, i]
1276
+ [m, i]
1277
1277
  ), v = M(() => {
1278
- let m = t - 1;
1279
- f(m);
1280
- }, [f, t, c, h]), _ = M(() => {
1281
- let m = t + 1;
1282
- f(m);
1283
- }, [f, t, c, h]);
1278
+ let g = t - 1;
1279
+ f(g);
1280
+ }, [f, t, c, p]), _ = M(() => {
1281
+ let g = t + 1;
1282
+ f(g);
1283
+ }, [f, t, c, p]);
1284
1284
  return {
1285
- focusedPage: p,
1285
+ focusedPage: h,
1286
1286
  totalPages: r,
1287
- setFocusedPage: d,
1287
+ setFocusedPage: u,
1288
1288
  setTotalPages: o,
1289
1289
  nextPage: _,
1290
1290
  prevPage: v,
@@ -1306,7 +1306,7 @@ const Eo = (e = 1) => {
1306
1306
  const e = He(un);
1307
1307
  return typeof (e == null ? void 0 : e.focusedPage) > "u" && Rr.error("Please use this hooks inside children component of RPController or RPLayout"), e;
1308
1308
  }, Oo = ({ children: e }) => {
1309
- const { initialPage: t = 1 } = gr(), { pdf: n } = Y(), { focusedPage: r, totalPages: o, setFocusedPage: i, setTotalPages: l, goToPage: s, nextPage: c, prevPage: h } = Eo(t);
1309
+ const { initialPage: t = 1 } = gr(), { pdf: n } = Y(), { focusedPage: r, totalPages: o, setFocusedPage: i, setTotalPages: l, goToPage: s, nextPage: c, prevPage: p } = Eo(t);
1310
1310
  return A(() => {
1311
1311
  n != null && n.numPages && l(n.numPages);
1312
1312
  }, [n, l, o, t]), A(() => {
@@ -1322,7 +1322,7 @@ const Eo = (e = 1) => {
1322
1322
  setFocusedPage: i,
1323
1323
  setTotalPages: l,
1324
1324
  nextPage: c,
1325
- prevPage: h,
1325
+ prevPage: p,
1326
1326
  goToPage: s
1327
1327
  },
1328
1328
  children: e
@@ -1332,8 +1332,8 @@ const Eo = (e = 1) => {
1332
1332
  const { focusedPage: n, totalPages: r } = ee(), o = D(() => {
1333
1333
  const s = [], c = Math.ceil(n / 2) * 2 - 1;
1334
1334
  if (s.push(c), c + 1 < r) {
1335
- const h = c + 1;
1336
- s.push(h);
1335
+ const p = c + 1;
1336
+ s.push(p);
1337
1337
  }
1338
1338
  return s;
1339
1339
  }, [n, r]), i = D(() => [
@@ -1387,18 +1387,18 @@ const Eo = (e = 1) => {
1387
1387
  getVirtualScrollableElementRef: l,
1388
1388
  setTotalInnerDimensions: s,
1389
1389
  totalInnerDimensions: c
1390
- } = Ue(), { nextPage: h, prevPage: p, setFocusedPage: g, focusedPage: d } = ee(), { scrollMode: f } = Pe(), { viewMode: v } = Ge(), _ = $(null), m = $({
1390
+ } = Ue(), { nextPage: p, prevPage: h, setFocusedPage: m, focusedPage: u } = ee(), { scrollMode: f } = Pe(), { viewMode: v } = Ge(), _ = $(null), g = $({
1391
1391
  height: 0,
1392
1392
  width: 0
1393
- }), C = $({
1393
+ }), b = $({
1394
1394
  viewMode: v,
1395
1395
  scrollMode: f
1396
- }), { isFullScreen: T } = _r(), {
1397
- pageDimension: w,
1398
- rowCount: S,
1399
- rowHeight: u,
1400
- columnCount: P,
1401
- columnWidth: b,
1396
+ }), { isFullScreen: S } = _r(), {
1397
+ pageDimension: P,
1398
+ rowCount: T,
1399
+ rowHeight: d,
1400
+ columnCount: C,
1401
+ columnWidth: w,
1402
1402
  estimatedColumnWidth: I,
1403
1403
  estimatedRowHeight: y
1404
1404
  } = Mo(), [R, L] = F({}), { isScrolling: N } = Kt(), x = $(), E = $({
@@ -1409,14 +1409,14 @@ const Eo = (e = 1) => {
1409
1409
  }), U = D(() => k === jt.HAND, [k]), K = M((W, H) => {
1410
1410
  L((q) => ({ ...q, [W]: Math.round(H * 100) }));
1411
1411
  }, []), ue = D(() => ({
1412
- columnCount: P,
1412
+ columnCount: C,
1413
1413
  handleIntersectRatioChange: K
1414
- }), [P, K]), oe = M(
1414
+ }), [C, K]), oe = M(
1415
1415
  (W) => {
1416
1416
  const H = document.activeElement !== t;
1417
- !T && H || (["ArrowUp", "ArrowLeft"].includes(W.key) ? (W.preventDefault(), p()) : ["ArrowDown", "ArrowRight"].includes(W.key) && (W.preventDefault(), h()));
1417
+ !S && H || (["ArrowUp", "ArrowLeft"].includes(W.key) ? (W.preventDefault(), h()) : ["ArrowDown", "ArrowRight"].includes(W.key) && (W.preventDefault(), p()));
1418
1418
  },
1419
- [h, p, T, f]
1419
+ [p, h, S, f]
1420
1420
  ), ve = M((W) => {
1421
1421
  E.current = {
1422
1422
  scrollTop: W.scrollTop,
@@ -1427,40 +1427,40 @@ const Eo = (e = 1) => {
1427
1427
  window.removeEventListener("keydown", oe);
1428
1428
  }), [oe]), A(() => {
1429
1429
  if (_.current && (_.current.style.position = "relative"), !!r) {
1430
- m.current = c, s({
1431
- height: Array.from({ length: S }).reduce(
1432
- (W, H, q) => W + u(q),
1430
+ g.current = c, s({
1431
+ height: Array.from({ length: T }).reduce(
1432
+ (W, H, q) => W + d(q),
1433
1433
  0
1434
1434
  ),
1435
- width: Array.from({ length: P }).reduce(
1436
- (W, H, q) => W + b(q),
1435
+ width: Array.from({ length: C }).reduce(
1436
+ (W, H, q) => W + w(q),
1437
1437
  0
1438
1438
  )
1439
1439
  });
1440
- for (let W = 0; W < S; W++)
1441
- for (let H = 0; H < P; H++)
1440
+ for (let W = 0; W < T; W++)
1441
+ for (let H = 0; H < C; H++)
1442
1442
  r.resetAfterIndices({
1443
1443
  columnIndex: H,
1444
1444
  rowIndex: W,
1445
1445
  shouldForceUpdate: !0
1446
1446
  });
1447
1447
  }
1448
- }, [S, P, w, r, n]), A(() => {
1448
+ }, [T, C, P, r, n]), A(() => {
1449
1449
  if (N.current)
1450
1450
  return;
1451
- if (C.current.viewMode !== v || C.current.scrollMode !== f) {
1452
- x.current && clearTimeout(x.current), L({}), n(d), f === Q.HORIZONTAL_SCROLLING && (r == null || r.scrollTo({
1451
+ if (b.current.viewMode !== v || b.current.scrollMode !== f) {
1452
+ x.current && clearTimeout(x.current), L({}), n(u), f === Q.HORIZONTAL_SCROLLING && (r == null || r.scrollTo({
1453
1453
  scrollTop: 0
1454
1454
  })), x.current = setTimeout(() => {
1455
1455
  requestAnimationFrame(() => {
1456
- C.current = { viewMode: v, scrollMode: f };
1456
+ b.current = { viewMode: v, scrollMode: f };
1457
1457
  });
1458
1458
  }, 100);
1459
1459
  return;
1460
1460
  }
1461
1461
  const H = E.current.scrollTop, q = E.current.scrollLeft;
1462
1462
  if (c.height !== 0 && c.width !== 0) {
1463
- const { height: le, width: Te } = c, { height: de, width: pe } = m.current, Ze = H / de * le, je = q / pe * Te, Dn = Math.min(Ze, le) || 0, An = Math.min(je, Te) || 0;
1463
+ const { height: le, width: Te } = c, { height: de, width: pe } = g.current, Ze = H / de * le, je = q / pe * Te, Dn = Math.min(Ze, le) || 0, An = Math.min(je, Te) || 0;
1464
1464
  r == null || r.scrollTo({
1465
1465
  scrollTop: Dn,
1466
1466
  scrollLeft: An
@@ -1475,8 +1475,8 @@ const Eo = (e = 1) => {
1475
1475
  let H = 0, q = -1;
1476
1476
  W.forEach((le) => {
1477
1477
  q < le[1] && (H = Number(le[0]), q = le[1]);
1478
- }), H && g(H);
1479
- }, [R, g]), A(() => () => {
1478
+ }), H && m(H);
1479
+ }, [R, m]), A(() => () => {
1480
1480
  x.current && clearTimeout(x.current);
1481
1481
  }, []);
1482
1482
  const _e = D(() => j(ae["rp-pages-container"], {
@@ -1503,7 +1503,7 @@ const Eo = (e = 1) => {
1503
1503
  ref: i,
1504
1504
  style: { width: W, height: H },
1505
1505
  className: j(ae["rp-pages"], ae["rp-page-scrolling-wrapper"]),
1506
- children: v === ze.DUAL_PAGE ? /* @__PURE__ */ a(Do, { widths: b, heights: u }) : /* @__PURE__ */ a(Ao, { widths: b, heights: u })
1506
+ children: v === ze.DUAL_PAGE ? /* @__PURE__ */ a(Do, { widths: w, heights: d }) : /* @__PURE__ */ a(Ao, { widths: w, heights: d })
1507
1507
  }
1508
1508
  ) : I ? /* @__PURE__ */ a(
1509
1509
  Io,
@@ -1513,14 +1513,14 @@ const Eo = (e = 1) => {
1513
1513
  outerRef: l,
1514
1514
  innerRef: _,
1515
1515
  onScroll: ve,
1516
- columnCount: P,
1517
- columnWidth: b,
1518
- rowHeight: u,
1516
+ columnCount: C,
1517
+ columnWidth: w,
1518
+ rowHeight: d,
1519
1519
  height: H,
1520
1520
  width: W,
1521
1521
  estimatedColumnWidth: I,
1522
1522
  estimatedRowHeight: y,
1523
- rowCount: S,
1523
+ rowCount: T,
1524
1524
  className: j(
1525
1525
  ae["rp-pages"],
1526
1526
  f === Q.HORIZONTAL_SCROLLING ? ae["rp-pages-horizontal-scroll"] : ""
@@ -1548,23 +1548,23 @@ const Eo = (e = 1) => {
1548
1548
  const { nextIcon: e } = re();
1549
1549
  return e || /* @__PURE__ */ a(Me, { style: { transform: "rotate(180deg" } });
1550
1550
  }, Wo = () => {
1551
- const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: i } = ee(), [l, s] = F(e.toString()), { pageNavigationTool: c = !0 } = se(), { isSmallScreen: h } = ge();
1551
+ const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: i } = ee(), [l, s] = F(e.toString()), { pageNavigationTool: c = !0 } = se(), { isSmallScreen: p } = ge();
1552
1552
  A(() => {
1553
1553
  s(e.toString());
1554
1554
  }, [e]);
1555
- const p = M((v) => {
1555
+ const h = M((v) => {
1556
1556
  const _ = v.target.value;
1557
1557
  s(_);
1558
- }, []), g = M(() => {
1558
+ }, []), m = M(() => {
1559
1559
  const v = i(l);
1560
1560
  v.success || s(v.currentPage.toString());
1561
- }, [i, l, t]), d = M(() => {
1561
+ }, [i, l, t]), u = M(() => {
1562
1562
  s(e.toString());
1563
1563
  }, [e]), f = M(
1564
1564
  (v) => {
1565
- v.key === "Enter" && g();
1565
+ v.key === "Enter" && m();
1566
1566
  },
1567
- [g]
1567
+ [m]
1568
1568
  );
1569
1569
  return typeof c != "boolean" ? /* @__PURE__ */ a(
1570
1570
  c,
@@ -1577,13 +1577,13 @@ const Eo = (e = 1) => {
1577
1577
  changePage: n
1578
1578
  }
1579
1579
  ) : c ? /* @__PURE__ */ O("div", { className: tt["rp-paginate"], children: [
1580
- !h && /* @__PURE__ */ a(X, { content: "Previous page", children: /* @__PURE__ */ a(B, { onClick: o, disabled: e === 1, children: /* @__PURE__ */ a(Fo, {}) }) }),
1580
+ !p && /* @__PURE__ */ a(X, { content: "Previous page", children: /* @__PURE__ */ a(B, { onClick: o, disabled: e === 1, children: /* @__PURE__ */ a(Fo, {}) }) }),
1581
1581
  /* @__PURE__ */ a(
1582
1582
  Zt,
1583
1583
  {
1584
1584
  onKeyDown: f,
1585
- onBlur: d,
1586
- onChange: p,
1585
+ onBlur: u,
1586
+ onChange: h,
1587
1587
  value: l,
1588
1588
  className: tt["rp-page-input"]
1589
1589
  }
@@ -1592,7 +1592,7 @@ const Eo = (e = 1) => {
1592
1592
  "/",
1593
1593
  t
1594
1594
  ] }),
1595
- !h && /* @__PURE__ */ a(X, { content: "Next page", children: /* @__PURE__ */ a(B, { onClick: r, disabled: e === t, children: /* @__PURE__ */ a(ko, {}) }) })
1595
+ !p && /* @__PURE__ */ a(X, { content: "Next page", children: /* @__PURE__ */ a(B, { onClick: r, disabled: e === t, children: /* @__PURE__ */ a(ko, {}) }) })
1596
1596
  ] }) : null;
1597
1597
  };
1598
1598
  var bt = "Dialog", [dn, ts] = Lr(bt), [Ho, te] = dn(bt), pn = (e) => {
@@ -1603,7 +1603,7 @@ var bt = "Dialog", [dn, ts] = Lr(bt), [Ho, te] = dn(bt), pn = (e) => {
1603
1603
  defaultOpen: o,
1604
1604
  onOpenChange: i,
1605
1605
  modal: l = !0
1606
- } = e, s = V.useRef(null), c = V.useRef(null), [h = !1, p] = kr({
1606
+ } = e, s = V.useRef(null), c = V.useRef(null), [p = !1, h] = kr({
1607
1607
  prop: r,
1608
1608
  defaultProp: o,
1609
1609
  onChange: i
@@ -1617,9 +1617,9 @@ var bt = "Dialog", [dn, ts] = Lr(bt), [Ho, te] = dn(bt), pn = (e) => {
1617
1617
  contentId: Be(),
1618
1618
  titleId: Be(),
1619
1619
  descriptionId: Be(),
1620
- open: h,
1621
- onOpenChange: p,
1622
- onOpenToggle: V.useCallback(() => p((g) => !g), [p]),
1620
+ open: p,
1621
+ onOpenChange: h,
1622
+ onOpenToggle: V.useCallback(() => h((m) => !m), [h]),
1623
1623
  modal: l,
1624
1624
  children: n
1625
1625
  }
@@ -1727,17 +1727,17 @@ var Uo = V.forwardRef(
1727
1727
  (l = e.onCloseAutoFocus) == null || l.call(e, i), i.defaultPrevented || (r.current || (s = n.triggerRef.current) == null || s.focus(), i.preventDefault()), r.current = !1, o.current = !1;
1728
1728
  },
1729
1729
  onInteractOutside: (i) => {
1730
- var c, h;
1730
+ var c, p;
1731
1731
  (c = e.onInteractOutside) == null || c.call(e, i), i.defaultPrevented || (r.current = !0, i.detail.originalEvent.type === "pointerdown" && (o.current = !0));
1732
1732
  const l = i.target;
1733
- ((h = n.triggerRef.current) == null ? void 0 : h.contains(l)) && i.preventDefault(), i.detail.originalEvent.type === "focusin" && o.current && i.preventDefault();
1733
+ ((p = n.triggerRef.current) == null ? void 0 : p.contains(l)) && i.preventDefault(), i.detail.originalEvent.type === "focusin" && o.current && i.preventDefault();
1734
1734
  }
1735
1735
  }
1736
1736
  );
1737
1737
  }
1738
1738
  ), _n = V.forwardRef(
1739
1739
  (e, t) => {
1740
- const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: i, ...l } = e, s = te(me, n), c = V.useRef(null), h = mt(t, c);
1740
+ const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: i, ...l } = e, s = te(me, n), c = V.useRef(null), p = mt(t, c);
1741
1741
  return Dr(), /* @__PURE__ */ O(Ae, { children: [
1742
1742
  /* @__PURE__ */ a(
1743
1743
  Ar,
@@ -1756,7 +1756,7 @@ var Uo = V.forwardRef(
1756
1756
  "aria-labelledby": s.titleId,
1757
1757
  "data-state": St(s.open),
1758
1758
  ...l,
1759
- ref: h,
1759
+ ref: p,
1760
1760
  onDismiss: () => s.onOpenChange(!1)
1761
1761
  }
1762
1762
  )
@@ -1838,14 +1838,14 @@ const fe = {
1838
1838
  filename: l,
1839
1839
  title: s,
1840
1840
  author: c,
1841
- subject: h,
1842
- createdOn: p,
1843
- creator: g,
1844
- keywords: d,
1841
+ subject: p,
1842
+ createdOn: h,
1843
+ creator: m,
1844
+ keywords: u,
1845
1845
  modifierOn: f,
1846
1846
  pdfProducer: v,
1847
1847
  pdfVersion: _,
1848
- pageCount: m
1848
+ pageCount: g
1849
1849
  } = e;
1850
1850
  return [
1851
1851
  { label: "File name", value: l },
@@ -1853,12 +1853,12 @@ const fe = {
1853
1853
  { separate: !0 },
1854
1854
  { label: "Title", value: s },
1855
1855
  { label: "Author", value: c },
1856
- { label: "Subject", value: h },
1857
- { label: "Keywords", value: d },
1858
- { label: "Creator", value: g },
1856
+ { label: "Subject", value: p },
1857
+ { label: "Keywords", value: u },
1858
+ { label: "Creator", value: m },
1859
1859
  {
1860
1860
  label: "Created on",
1861
- value: p ? it(p) : ""
1861
+ value: h ? it(h) : ""
1862
1862
  },
1863
1863
  {
1864
1864
  label: "Modified on",
@@ -1867,7 +1867,7 @@ const fe = {
1867
1867
  { separate: !0 },
1868
1868
  { label: "PDF producer", value: v },
1869
1869
  { label: "PDF version", value: _ },
1870
- { label: "Page count", value: m }
1870
+ { label: "Page count", value: g }
1871
1871
  ];
1872
1872
  }, [e]);
1873
1873
  return /* @__PURE__ */ a(Xo, { open: n, onOpenChange: r, children: /* @__PURE__ */ a(Jo, { container: t, children: /* @__PURE__ */ O("div", { className: fe["rp-dialog-wrapper"], children: [
@@ -1903,51 +1903,51 @@ const sa = () => {
1903
1903
  loadedPages: 0,
1904
1904
  totalPages: 0,
1905
1905
  percentage: 0
1906
- }), [o, i] = F(!1), [l, s] = F(!1), [c, h] = F(null), p = $(!1);
1906
+ }), [o, i] = F(!1), [l, s] = F(!1), [c, p] = F(null), h = $(!1);
1907
1907
  A(() => {
1908
- p.current;
1909
- }, [p]);
1910
- const g = M(() => {
1908
+ h.current;
1909
+ }, [h]);
1910
+ const m = M(() => {
1911
1911
  document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
1912
- const w = document.querySelector(".rp-print-zone");
1913
- w && w.remove();
1914
- }, []), d = M(() => {
1915
- p.current = !1, i(!1), s(!1), h(null), r({
1912
+ const P = document.querySelector(".rp-print-zone");
1913
+ P && P.remove();
1914
+ }, []), u = M(() => {
1915
+ h.current = !1, i(!1), s(!1), p(null), r({
1916
1916
  loadedPages: 0,
1917
1917
  totalPages: 0,
1918
1918
  percentage: 0
1919
1919
  });
1920
1920
  }, []), f = () => {
1921
- p.current = !0;
1921
+ h.current = !0;
1922
1922
  }, v = async ({
1923
- scratchCanvas: w,
1924
- pdfDocument: S,
1925
- pageNumber: u,
1926
- viewerPdfPage: P,
1927
- printResolution: b,
1923
+ scratchCanvas: P,
1924
+ pdfDocument: T,
1925
+ pageNumber: d,
1926
+ viewerPdfPage: C,
1927
+ printResolution: w,
1928
1928
  optionalContentConfigPromise: I,
1929
1929
  printAnnotationStoragePromise: y
1930
1930
  }) => {
1931
- if (p.current) {
1932
- d();
1931
+ if (h.current) {
1932
+ u();
1933
1933
  return;
1934
1934
  }
1935
- const R = b / tr.PDF;
1936
- w.width = Math.floor(P.width * R), w.height = Math.floor(P.height * R);
1937
- const L = w.getContext("2d");
1938
- L.save(), L.fillStyle = "rgb(255, 255, 255)", L.fillRect(0, 0, w.width, w.height), L.restore();
1935
+ const R = w / tr.PDF;
1936
+ P.width = Math.floor(C.width * R), P.height = Math.floor(C.height * R);
1937
+ const L = P.getContext("2d");
1938
+ L.save(), L.fillStyle = "rgb(255, 255, 255)", L.fillRect(0, 0, P.width, P.height), L.restore();
1939
1939
  const [N, x] = await Promise.all([
1940
- S.getPage(u),
1940
+ T.getPage(d),
1941
1941
  y
1942
1942
  ]);
1943
- if (p.current) {
1944
- d();
1943
+ if (h.current) {
1944
+ u();
1945
1945
  return;
1946
1946
  }
1947
1947
  const E = {
1948
1948
  canvasContext: L,
1949
1949
  transform: [R, 0, 0, R, 0, 0],
1950
- viewport: N.getViewport({ scale: 1, rotation: P.rotation }),
1950
+ viewport: N.getViewport({ scale: 1, rotation: C.rotation }),
1951
1951
  intent: "print",
1952
1952
  annotationMode: nr.ENABLE_STORAGE,
1953
1953
  optionalContentConfigPromise: I,
@@ -1959,99 +1959,99 @@ const sa = () => {
1959
1959
  throw z instanceof rr || console.error(z), z;
1960
1960
  }
1961
1961
  }, _ = M(() => {
1962
- const w = window.print;
1963
- return new Promise((S) => {
1964
- const u = (I) => {
1962
+ const P = window.print;
1963
+ return new Promise((T) => {
1964
+ const d = (I) => {
1965
1965
  setTimeout(() => {
1966
- w.call(window), setTimeout(() => I(), 20);
1966
+ P.call(window), setTimeout(() => I(), 20);
1967
1967
  }, 0);
1968
1968
  };
1969
1969
  if (document.querySelector(".rp-print-zone")) {
1970
- u(S);
1970
+ d(T);
1971
1971
  return;
1972
1972
  }
1973
- const b = new MutationObserver(() => {
1974
- document.querySelector(".rp-print-zone") && (u(S), b.disconnect());
1973
+ const w = new MutationObserver(() => {
1974
+ document.querySelector(".rp-print-zone") && (d(T), w.disconnect());
1975
1975
  });
1976
- b.observe(document.body, { childList: !0, subtree: !0 });
1976
+ w.observe(document.body, { childList: !0, subtree: !0 });
1977
1977
  });
1978
- }, []), m = async (w) => {
1979
- const S = document.createElement("img"), u = document.createElement("div");
1980
- return u.classList.add("rp-print-page"), await new Promise((P, b) => {
1981
- w.toBlob((I) => {
1982
- I ? (S.src = URL.createObjectURL(I), S.onload = () => {
1983
- URL.revokeObjectURL(S.src), P();
1984
- }, S.onerror = b) : b(new Error("Failed to create blob"));
1978
+ }, []), g = async (P) => {
1979
+ const T = document.createElement("img"), d = document.createElement("div");
1980
+ return d.classList.add("rp-print-page"), await new Promise((C, w) => {
1981
+ P.toBlob((I) => {
1982
+ I ? (T.src = URL.createObjectURL(I), T.onload = () => {
1983
+ URL.revokeObjectURL(T.src), C();
1984
+ }, T.onerror = w) : w(new Error("Failed to create blob"));
1985
1985
  });
1986
1986
  }).catch(() => {
1987
- }), u.appendChild(S), u;
1988
- }, C = (w, S) => {
1989
- const u = document.createElement("div");
1990
- u.classList.add("rp-print-zone");
1991
- const P = document.createElement("style"), b = S.get(1);
1992
- if (b) {
1993
- const { width: I, height: y } = b == null ? void 0 : b.page.getViewport({ scale: 1 });
1994
- P.innerHTML = `@page { size: ${I}px ${y}px }`;
1987
+ }), d.appendChild(T), d;
1988
+ }, b = (P, T) => {
1989
+ const d = document.createElement("div");
1990
+ d.classList.add("rp-print-zone");
1991
+ const C = document.createElement("style"), w = T.get(1);
1992
+ if (w) {
1993
+ const { width: I, height: y } = w == null ? void 0 : w.page.getViewport({ scale: 1 });
1994
+ C.innerHTML = `@page { size: ${I}px ${y}px }`;
1995
1995
  }
1996
- return u.appendChild(P), u.append(...w), u;
1997
- }, T = M(async () => {
1996
+ return d.appendChild(C), d.append(...P), d;
1997
+ }, S = M(async () => {
1998
1998
  if (!e)
1999
1999
  return;
2000
- d();
2001
- const w = document.createElement("canvas"), S = [];
2000
+ u();
2001
+ const P = document.createElement("canvas"), T = [];
2002
2002
  try {
2003
2003
  e.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
2004
- const P = e.getOptionalContentConfig({ intent: "print" }), b = Promise.resolve(
2004
+ const C = e.getOptionalContentConfig({ intent: "print" }), w = Promise.resolve(
2005
2005
  e.annotationStorage.print ?? void 0
2006
2006
  ), I = t.size;
2007
2007
  for (const [R, L] of t) {
2008
- if (p.current) {
2009
- d();
2008
+ if (h.current) {
2009
+ u();
2010
2010
  return;
2011
2011
  }
2012
2012
  const N = L.page.getViewport({ scale: 1 });
2013
2013
  if (await v({
2014
- scratchCanvas: w,
2014
+ scratchCanvas: P,
2015
2015
  pdfDocument: e,
2016
2016
  pageNumber: R,
2017
2017
  viewerPdfPage: N,
2018
2018
  printResolution: 150,
2019
- optionalContentConfigPromise: P,
2020
- printAnnotationStoragePromise: b
2021
- }), p.current) {
2022
- d();
2019
+ optionalContentConfigPromise: C,
2020
+ printAnnotationStoragePromise: w
2021
+ }), h.current) {
2022
+ u();
2023
2023
  return;
2024
2024
  }
2025
- const x = await m(w);
2026
- S.push(x);
2027
- const E = parseFloat((S.length / I * 100).toFixed(2));
2025
+ const x = await g(P);
2026
+ T.push(x);
2027
+ const E = parseFloat((T.length / I * 100).toFixed(2));
2028
2028
  r({
2029
2029
  loadedPages: R,
2030
2030
  totalPages: I,
2031
2031
  percentage: E
2032
2032
  });
2033
2033
  }
2034
- if (p.current) {
2035
- d();
2034
+ if (h.current) {
2035
+ u();
2036
2036
  return;
2037
2037
  }
2038
- const y = C(S, t);
2038
+ const y = b(T, t);
2039
2039
  document.body.appendChild(y), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), i(!0), await _();
2040
- } catch (u) {
2041
- s(!0), u instanceof Error && h(u);
2040
+ } catch (d) {
2041
+ s(!0), d instanceof Error && p(d);
2042
2042
  } finally {
2043
- w.height = 0, w.width = 0;
2043
+ P.height = 0, P.width = 0;
2044
2044
  }
2045
- }, [e, t, p]);
2045
+ }, [e, t, h]);
2046
2046
  return A(() => {
2047
- const w = () => {
2048
- d(), g();
2047
+ const P = () => {
2048
+ u(), m();
2049
2049
  };
2050
- return window.addEventListener("afterprint", w, !0), () => {
2051
- window.removeEventListener("afterprint", w, !0);
2050
+ return window.addEventListener("afterprint", P, !0), () => {
2051
+ window.removeEventListener("afterprint", P, !0);
2052
2052
  };
2053
- }, [g, d]), {
2054
- print: T,
2053
+ }, [m, u]), {
2054
+ print: S,
2055
2055
  cancel: f,
2056
2056
  progress: n,
2057
2057
  isComplete: o,
@@ -2076,23 +2076,23 @@ const sa = () => {
2076
2076
  }
2077
2077
  }
2078
2078
  }), la = ({ children: e }) => {
2079
- const [t, n] = F(null), [r, o] = F(null), { print: i, cancel: l, progress: s, isComplete: c, isError: h, error: p } = sa(), g = M((m) => {
2080
- m && typeof m == "function" && o(() => m);
2081
- }, []), d = (m) => {
2082
- p && m(p);
2079
+ const [t, n] = F(null), [r, o] = F(null), { print: i, cancel: l, progress: s, isComplete: c, isError: p, error: h } = sa(), m = M((g) => {
2080
+ g && typeof g == "function" && o(() => g);
2081
+ }, []), u = (g) => {
2082
+ h && g(h);
2083
2083
  }, f = M(
2084
- (m) => {
2085
- n(() => m);
2084
+ (g) => {
2085
+ n(() => g);
2086
2086
  },
2087
2087
  [s, t]
2088
2088
  );
2089
2089
  A(() => {
2090
2090
  c && r && v();
2091
2091
  }, [c, r]), A(() => {
2092
- h && d((m) => {
2093
- console.error(m);
2092
+ p && u((g) => {
2093
+ console.error(g);
2094
2094
  });
2095
- }, [h]), A(() => {
2095
+ }, [p]), A(() => {
2096
2096
  s && t && t(s);
2097
2097
  }, [s, t]);
2098
2098
  const v = () => {
@@ -2101,8 +2101,8 @@ const sa = () => {
2101
2101
  print: i,
2102
2102
  cancel: l,
2103
2103
  setOnProgress: f,
2104
- setOnComplete: g,
2105
- setOnError: d,
2104
+ setOnComplete: m,
2105
+ setOnError: u,
2106
2106
  progress: s
2107
2107
  };
2108
2108
  return /* @__PURE__ */ a(xn.Provider, { value: _, children: e });
@@ -2164,13 +2164,13 @@ const sa = () => {
2164
2164
  rotateTool: l,
2165
2165
  selectionModeTool: s,
2166
2166
  jumpNavigationTool: c,
2167
- printTool: h,
2168
- fullscreenTool: p
2167
+ printTool: p,
2168
+ fullscreenTool: h
2169
2169
  } = se();
2170
2170
  return D(() => {
2171
- const d = c || l || s || i || o;
2171
+ const u = c || l || s || i || o;
2172
2172
  let f = !1;
2173
- return t && (f = !(!n && !r && !h && !p)), d || f;
2173
+ return t && (f = !(!n && !r && !p && !h)), u || f;
2174
2174
  }, [
2175
2175
  n,
2176
2176
  r,
@@ -2178,7 +2178,8 @@ const sa = () => {
2178
2178
  i,
2179
2179
  l,
2180
2180
  s,
2181
- c
2181
+ c,
2182
+ t
2182
2183
  ]) ? /* @__PURE__ */ O(Vr, { children: [
2183
2184
  /* @__PURE__ */ a(
2184
2185
  ft,
@@ -2228,47 +2229,47 @@ const sa = () => {
2228
2229
  const { zoomOutIcon: e } = re();
2229
2230
  return e || /* @__PURE__ */ a(Xr, {});
2230
2231
  }, Ca = () => {
2231
- const { zoomLevel: e, setZoomLevel: t } = ht(), { container: n, contentRef: r } = qe(), { zoomTool: o = !0 } = se(), { focusedPage: i } = ee(), { rotate: l } = Ve(), { pages: s } = Y(), { isSmallScreen: c } = ge(), h = M(() => {
2232
- t((m) => {
2233
- const C = Math.floor(m / 25) * 25;
2234
- return Math.min(C + 25, nt);
2232
+ const { zoomLevel: e, setZoomLevel: t } = ht(), { container: n, contentRef: r } = qe(), { zoomTool: o = !0 } = se(), { focusedPage: i } = ee(), { rotate: l } = Ve(), { pages: s } = Y(), { isSmallScreen: c } = ge(), p = M(() => {
2233
+ t((g) => {
2234
+ const b = Math.floor(g / 25) * 25;
2235
+ return Math.min(b + 25, nt);
2235
2236
  });
2236
- }, [t]), p = M(() => {
2237
- t((m) => {
2238
- const C = Math.ceil(m / 25) * 25;
2239
- return Math.min(C - 25, nt);
2237
+ }, [t]), h = M(() => {
2238
+ t((g) => {
2239
+ const b = Math.ceil(g / 25) * 25;
2240
+ return Math.min(b - 25, nt);
2240
2241
  });
2241
- }, [t]), g = D(() => e === va, [e]), d = D(() => e === nt, [e]), f = D(() => {
2242
- var m;
2243
- return (m = s.get(i)) == null ? void 0 : m.page.getViewport({ scale: 1, rotation: l });
2242
+ }, [t]), m = D(() => e === va, [e]), u = D(() => e === nt, [e]), f = D(() => {
2243
+ var g;
2244
+ return (g = s.get(i)) == null ? void 0 : g.page.getViewport({ scale: 1, rotation: l });
2244
2245
  }, [s, i, l]), v = M(
2245
- (m) => {
2246
- const C = ((f == null ? void 0 : f.width) || 0) + 2 * yt, T = ((f == null ? void 0 : f.height) || 0) + 2 * yt, w = (r == null ? void 0 : r.clientWidth) || 0, S = (r == null ? void 0 : r.clientHeight) || 0;
2247
- switch (m) {
2246
+ (g) => {
2247
+ const b = ((f == null ? void 0 : f.width) || 0) + 2 * yt, S = ((f == null ? void 0 : f.height) || 0) + 2 * yt, P = (r == null ? void 0 : r.clientWidth) || 0, T = (r == null ? void 0 : r.clientHeight) || 0;
2248
+ switch (g) {
2248
2249
  case we.ACTUAL:
2249
2250
  t(100);
2250
2251
  break;
2251
2252
  case we.PAGE_FIT:
2252
- let u = 0;
2253
- const P = w > S;
2254
- T > C && P ? u = S / T : u = w / C;
2255
- const b = Math.floor(u * 100);
2256
- t(b);
2253
+ let d = 0;
2254
+ const C = P > T;
2255
+ S > b && C ? d = T / S : d = P / b;
2256
+ const w = Math.floor(d * 100);
2257
+ t(w);
2257
2258
  break;
2258
2259
  case we.PAGE_WIDTH:
2259
- t(Math.floor(w / C * 100));
2260
+ t(Math.floor(P / b * 100));
2260
2261
  break;
2261
2262
  }
2262
2263
  },
2263
2264
  [t, f]
2264
2265
  ), _ = M(
2265
- (m) => {
2266
- typeof m == "number" ? t(m) : v(m);
2266
+ (g) => {
2267
+ typeof g == "number" ? t(g) : v(g);
2267
2268
  },
2268
2269
  [t, v]
2269
2270
  );
2270
2271
  return typeof o != "boolean" ? /* @__PURE__ */ a(o, { zoomLevel: e, setZoomLevel: t }) : o ? /* @__PURE__ */ O("div", { className: ye["rp-zoom-wrapper"], children: [
2271
- /* @__PURE__ */ a(X, { content: "Zoom out", children: /* @__PURE__ */ a(B, { disabled: g, onClick: p, children: /* @__PURE__ */ a(ba, {}) }) }),
2272
+ /* @__PURE__ */ a(X, { content: "Zoom out", children: /* @__PURE__ */ a(B, { disabled: m, onClick: h, children: /* @__PURE__ */ a(ba, {}) }) }),
2272
2273
  !c && /* @__PURE__ */ a(X, { content: "Select zoom level", children: /* @__PURE__ */ a(
2273
2274
  ft,
2274
2275
  {
@@ -2289,14 +2290,14 @@ const sa = () => {
2289
2290
  /* @__PURE__ */ a(ce, { onClick: () => _(we.PAGE_WIDTH), children: "Page width" })
2290
2291
  ] }),
2291
2292
  /* @__PURE__ */ a(vt, {}),
2292
- /* @__PURE__ */ a(Fe, { children: _a.map((m) => /* @__PURE__ */ O(ce, { onClick: () => _(m), children: [
2293
- m,
2293
+ /* @__PURE__ */ a(Fe, { children: _a.map((g) => /* @__PURE__ */ O(ce, { onClick: () => _(g), children: [
2294
+ g,
2294
2295
  " %"
2295
- ] }, m)) })
2296
+ ] }, g)) })
2296
2297
  ] })
2297
2298
  }
2298
2299
  ) }),
2299
- /* @__PURE__ */ a(X, { content: "Zoom in", children: /* @__PURE__ */ a(B, { disabled: d, onClick: h, children: /* @__PURE__ */ a(wa, {}) }) })
2300
+ /* @__PURE__ */ a(X, { content: "Zoom in", children: /* @__PURE__ */ a(B, { disabled: u, onClick: p, children: /* @__PURE__ */ a(wa, {}) }) })
2300
2301
  ] }) : null;
2301
2302
  }, ne = {
2302
2303
  "rp-search-tool-content": "_rp-search-tool-content_1vxow_1",
@@ -2315,37 +2316,37 @@ const sa = () => {
2315
2316
  searchOptions: l,
2316
2317
  setSearchOptions: s,
2317
2318
  loading: c,
2318
- setSearch: h,
2319
- totalMatches: p,
2320
- currentMatchPosition: g,
2321
- nextMatch: d,
2319
+ setSearch: p,
2320
+ totalMatches: h,
2321
+ currentMatchPosition: m,
2322
+ nextMatch: u,
2322
2323
  prevMatch: f,
2323
2324
  search: v
2324
- } = nn(), { searchTool: _ = !0 } = se(), [m, C] = F(v), T = M(() => {
2325
+ } = nn(), { searchTool: _ = !0 } = se(), [g, b] = F(v), S = M(() => {
2325
2326
  n(!0);
2326
- }, []), w = M(() => {
2327
- h(""), C(""), n(!1);
2328
- }, [h]), S = M(
2327
+ }, []), P = M(() => {
2328
+ p(""), b(""), n(!1);
2329
+ }, [p]), T = M(
2329
2330
  (x) => {
2330
- x.key === "Escape" && t && w();
2331
+ x.key === "Escape" && t && P();
2331
2332
  },
2332
2333
  [t]
2333
- ), u = M(
2334
+ ), d = M(
2334
2335
  (x) => {
2335
- x.shiftKey && x.key === "Enter" ? f() : x.key === "Enter" && h((E) => (m === E && d(), m));
2336
+ x.shiftKey && x.key === "Enter" ? f() : x.key === "Enter" && p((E) => (g === E && u(), g));
2336
2337
  },
2337
- [m, f, d, h]
2338
+ [g, f, u, p]
2338
2339
  );
2339
- A(() => (window.addEventListener("keydown", S), () => {
2340
- window.removeEventListener("keydown", S);
2341
- }), [S]), A(() => {
2340
+ A(() => (window.addEventListener("keydown", T), () => {
2341
+ window.removeEventListener("keydown", T);
2342
+ }), [T]), A(() => {
2342
2343
  o && o.focus();
2343
2344
  }, [o]);
2344
- const P = M((x) => {
2345
- C(x.target.value);
2346
- }, []), b = M(() => {
2347
- C(""), h("");
2348
- }, [h]), I = D(() => `${g} / ${p}`, [g, p]), { wholeWords: y, matchCase: R } = D(() => l, [l]), L = M(
2345
+ const C = M((x) => {
2346
+ b(x.target.value);
2347
+ }, []), w = M(() => {
2348
+ b(""), p("");
2349
+ }, [p]), I = D(() => `${m} / ${h}`, [m, h]), { wholeWords: y, matchCase: R } = D(() => l, [l]), L = M(
2349
2350
  (x) => {
2350
2351
  s((E) => ({ ...E, matchCase: x }));
2351
2352
  },
@@ -2357,28 +2358,28 @@ const sa = () => {
2357
2358
  [s]
2358
2359
  );
2359
2360
  return A(() => {
2360
- w();
2361
- }, [r, w]), _ ? /* @__PURE__ */ a(
2361
+ P();
2362
+ }, [r, P]), _ ? /* @__PURE__ */ a(
2362
2363
  ft,
2363
2364
  {
2364
2365
  open: t,
2365
2366
  container: e,
2366
2367
  align: "start",
2367
- triggerComponent: /* @__PURE__ */ a(X, { content: "Search in Document", children: /* @__PURE__ */ a(B, { onClick: T, children: /* @__PURE__ */ a(Gt, {}) }) }),
2368
+ triggerComponent: /* @__PURE__ */ a(X, { content: "Search in Document", children: /* @__PURE__ */ a(B, { onClick: S, children: /* @__PURE__ */ a(Gt, {}) }) }),
2368
2369
  children: /* @__PURE__ */ O("div", { className: ne["rp-search-tool-content"], children: [
2369
2370
  /* @__PURE__ */ O("div", { className: ne["rp-search-tool-input-wrapper"], children: [
2370
2371
  /* @__PURE__ */ O("div", { className: ne["rp-search-tool-input"], children: [
2371
2372
  /* @__PURE__ */ a(
2372
2373
  Zt,
2373
2374
  {
2374
- value: m,
2375
- onKeyDown: u,
2376
- onChange: P,
2375
+ value: g,
2376
+ onKeyDown: d,
2377
+ onChange: C,
2377
2378
  icon: /* @__PURE__ */ a(Gt, {}),
2378
2379
  placeholder: "Enter to Search",
2379
2380
  className: ne["rp-search-input"],
2380
2381
  ref: i,
2381
- children: !!m && /* @__PURE__ */ a("span", { className: ne["rp-search-tool-input-clear"], onClick: b, children: /* @__PURE__ */ a(Yr, {}) })
2382
+ children: !!g && /* @__PURE__ */ a("span", { className: ne["rp-search-tool-input-clear"], onClick: w, children: /* @__PURE__ */ a(Yr, {}) })
2382
2383
  }
2383
2384
  ),
2384
2385
  c ? /* @__PURE__ */ a("span", { children: /* @__PURE__ */ a(pt, {}) }) : /* @__PURE__ */ a("span", { children: I })
@@ -2390,14 +2391,14 @@ const sa = () => {
2390
2391
  ] }),
2391
2392
  /* @__PURE__ */ O("div", { className: ne["rp-search-tool-controls"], children: [
2392
2393
  /* @__PURE__ */ a(B, { onClick: f, children: /* @__PURE__ */ a(Me, { className: ne["rp-search-tool-input-icon"] }) }),
2393
- /* @__PURE__ */ a(B, { onClick: d, children: /* @__PURE__ */ a(
2394
+ /* @__PURE__ */ a(B, { onClick: u, children: /* @__PURE__ */ a(
2394
2395
  Me,
2395
2396
  {
2396
2397
  style: { transform: "rotate(180deg" },
2397
2398
  className: ne["rp-search-tool-input-icon"]
2398
2399
  }
2399
2400
  ) }),
2400
- /* @__PURE__ */ a(B, { children: /* @__PURE__ */ a(Yt, { onClick: w, className: ne["rp-search-tool-input-icon"] }) })
2401
+ /* @__PURE__ */ a(B, { children: /* @__PURE__ */ a(Yt, { onClick: P, className: ne["rp-search-tool-input-icon"] }) })
2401
2402
  ] })
2402
2403
  ] })
2403
2404
  }
@@ -2492,39 +2493,39 @@ const sa = () => {
2492
2493
  (s) => {
2493
2494
  if (!n.size)
2494
2495
  return;
2495
- const c = Array.from(n.values()).slice(0, s).map((g) => {
2496
- const { thumbnailViewport: d, scale: f } = It(g.page, r);
2496
+ const c = Array.from(n.values()).slice(0, s).map((m) => {
2497
+ const { thumbnailViewport: u, scale: f } = It(m.page, r);
2497
2498
  return {
2498
2499
  scale: f,
2499
- page: g.page,
2500
+ page: m.page,
2500
2501
  loading: !0,
2501
- viewport: d
2502
+ viewport: u
2502
2503
  };
2503
- }), h = c.reduce((g, d) => (g[d.page.pageNumber] = d, g), {});
2504
- t(h);
2505
- const p = [];
2506
- for (const g of c) {
2507
- const d = document.createElement("canvas"), f = ot(
2508
- g.page,
2509
- d,
2510
- g.scale,
2504
+ }), p = c.reduce((m, u) => (m[u.page.pageNumber] = u, m), {});
2505
+ t(p);
2506
+ const h = [];
2507
+ for (const m of c) {
2508
+ const u = document.createElement("canvas"), f = ot(
2509
+ m.page,
2510
+ u,
2511
+ m.scale,
2511
2512
  r
2512
2513
  ).promise.then(() => {
2513
- const v = d.toDataURL();
2514
+ const v = u.toDataURL();
2514
2515
  return {
2515
- ...g,
2516
+ ...m,
2516
2517
  thumbnailSrc: v,
2517
2518
  loading: !1
2518
2519
  };
2519
2520
  });
2520
- p.push(f);
2521
+ h.push(f);
2521
2522
  }
2522
- Promise.all(p).then((g) => {
2523
- const d = g.reduce(
2523
+ Promise.all(h).then((m) => {
2524
+ const u = m.reduce(
2524
2525
  (f, v) => (f[v.page.pageNumber] = v, f),
2525
2526
  {}
2526
2527
  );
2527
- t((f) => ({ ...f, ...d }));
2528
+ t((f) => ({ ...f, ...u }));
2528
2529
  });
2529
2530
  },
2530
2531
  [n, r]
@@ -2539,8 +2540,8 @@ const sa = () => {
2539
2540
  const c = n.get(s);
2540
2541
  if (!c)
2541
2542
  return;
2542
- t((p) => ({
2543
- ...p,
2543
+ t((h) => ({
2544
+ ...h,
2544
2545
  [s]: {
2545
2546
  loading: !0,
2546
2547
  page: c.page,
@@ -2548,18 +2549,18 @@ const sa = () => {
2548
2549
  scale: c.thumbnailScale
2549
2550
  }
2550
2551
  }));
2551
- const h = document.createElement("canvas");
2552
- ot(c.page, h, c.thumbnailScale, r).promise.then(() => {
2553
- const p = h.toDataURL(), { thumbnailViewport: g, scale: d } = It(c.page, r);
2552
+ const p = document.createElement("canvas");
2553
+ ot(c.page, p, c.thumbnailScale, r).promise.then(() => {
2554
+ const h = p.toDataURL(), { thumbnailViewport: m, scale: u } = It(c.page, r);
2554
2555
  return {
2555
- scale: d,
2556
- thumbnailSrc: p,
2556
+ scale: u,
2557
+ thumbnailSrc: h,
2557
2558
  page: c.page,
2558
2559
  loading: !1,
2559
- viewport: g
2560
+ viewport: m
2560
2561
  };
2561
- }).then((p) => {
2562
- t((g) => ({ ...g, [s]: p }));
2562
+ }).then((h) => {
2563
+ t((m) => ({ ...m, [s]: h }));
2563
2564
  });
2564
2565
  },
2565
2566
  [n, r]
@@ -2591,21 +2592,21 @@ const sa = () => {
2591
2592
  const n = e == null ? void 0 : e.querySelector(`#page-${t}`);
2592
2593
  e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) - Ma);
2593
2594
  }, Na = $e((e, t) => {
2594
- const { show: n } = e, { focusedPage: r, totalPages: o } = ee(), { thumbnailPages: i, addPage: l, thumbnailLength: s, addToPage: c } = On(), h = $(null), p = $(1);
2595
- qt(t, () => h.current);
2596
- const g = D(() => Object.values(i), [i]), d = M(() => {
2595
+ const { show: n } = e, { focusedPage: r, totalPages: o } = ee(), { thumbnailPages: i, addPage: l, thumbnailLength: s, addToPage: c } = On(), p = $(null), h = $(1);
2596
+ qt(t, () => p.current);
2597
+ const m = D(() => Object.values(i), [i]), u = M(() => {
2597
2598
  const f = s + 1;
2598
2599
  f <= o && l(f);
2599
2600
  }, [l, o, s]);
2600
2601
  return A(() => {
2601
- r > s ? c(r) : n && p.current !== r && (La(h.current, r), p.current = r);
2602
- }, [r, s, c, n, g]), or(h.current, d), /* @__PURE__ */ a("div", { ref: h, className: Ut["rp-thumbnails-container"], children: /* @__PURE__ */ a("div", { className: Ut["rp-thumbnails"], children: n ? g.map((f, v) => {
2603
- var _, m;
2602
+ r > s ? c(r) : n && h.current !== r && (La(p.current, r), h.current = r);
2603
+ }, [r, s, c, n, m]), or(p.current, u), /* @__PURE__ */ a("div", { ref: p, className: Ut["rp-thumbnails-container"], children: /* @__PURE__ */ a("div", { className: Ut["rp-thumbnails"], children: n ? m.map((f, v) => {
2604
+ var _, g;
2604
2605
  return /* @__PURE__ */ a(
2605
2606
  ya,
2606
2607
  {
2607
2608
  isFocused: r === ((_ = f.page) == null ? void 0 : _.pageNumber),
2608
- pageNumber: (m = f.page) == null ? void 0 : m.pageNumber,
2609
+ pageNumber: (g = f.page) == null ? void 0 : g.pageNumber,
2609
2610
  thumbnailSrc: f.thumbnailSrc,
2610
2611
  loading: f.loading,
2611
2612
  viewport: f.viewport
@@ -2646,7 +2647,7 @@ const sa = () => {
2646
2647
  // initialViewMode = ViewMode.SINGLE_PAGE,
2647
2648
  initialScale: s,
2648
2649
  initialScrollMode: c = Q.VERTICAL_SCROLLING,
2649
- mobileWidth: h
2650
+ mobileWidth: p
2650
2651
  } = e;
2651
2652
  return /* @__PURE__ */ a(
2652
2653
  vr,
@@ -2655,7 +2656,7 @@ const sa = () => {
2655
2656
  initialPage: l,
2656
2657
  initialScrollMode: c,
2657
2658
  initialRotate: o,
2658
- children: /* @__PURE__ */ a(hr, { mobileWidth: h, children: /* @__PURE__ */ a(dr, { children: /* @__PURE__ */ a(Yn, { children: /* @__PURE__ */ a(Zn, { children: /* @__PURE__ */ a(Wn, { children: /* @__PURE__ */ a(mr, { initialSelectionMode: jt.TEXT, children: /* @__PURE__ */ a(pr, { children: /* @__PURE__ */ a(Oo, { children: /* @__PURE__ */ a(qn, { children: /* @__PURE__ */ a(ur, { textLayer: i, children: /* @__PURE__ */ a(Bn, { children: /* @__PURE__ */ a(
2659
+ children: /* @__PURE__ */ a(hr, { mobileWidth: p, children: /* @__PURE__ */ a(dr, { children: /* @__PURE__ */ a(Yn, { children: /* @__PURE__ */ a(Zn, { children: /* @__PURE__ */ a(Wn, { children: /* @__PURE__ */ a(mr, { initialSelectionMode: jt.TEXT, children: /* @__PURE__ */ a(pr, { children: /* @__PURE__ */ a(Oo, { children: /* @__PURE__ */ a(qn, { children: /* @__PURE__ */ a(ur, { textLayer: i, children: /* @__PURE__ */ a(Bn, { children: /* @__PURE__ */ a(
2659
2660
  Gn,
2660
2661
  {
2661
2662
  darkMode: n,
@@ -2674,26 +2675,26 @@ const sa = () => {
2674
2675
  initialSearch: l,
2675
2676
  showToolbar: s = !0,
2676
2677
  style: c,
2677
- className: h,
2678
- onLoaded: p,
2679
- cleanupOnLoaded: g,
2680
- ...d
2681
- } = e, [f, v] = F(null), [_, m] = F(null), [C, T] = F(null);
2682
- return A(() => (p && p(), () => {
2683
- g && g();
2684
- }), [p, g]), /* @__PURE__ */ a("div", { ref: t, className: j(he["rp-theme-variables"], he["rp-container"]), children: /* @__PURE__ */ a(lr, { container: _, contentRef: C, children: /* @__PURE__ */ a(Da, { ...d, children: /* @__PURE__ */ a(to, { initialSearch: l, children: /* @__PURE__ */ a(xa, { initialThumbnailsVisible: i, children: /* @__PURE__ */ a(Un, { slots: r, children: /* @__PURE__ */ a(Vn, { children: /* @__PURE__ */ a(ir, { icons: o, children: /* @__PURE__ */ a(wr, { elementRef: C, children: /* @__PURE__ */ a(la, { children: /* @__PURE__ */ a(jn, { children: s ? /* @__PURE__ */ a(
2678
+ className: p,
2679
+ onLoaded: h,
2680
+ cleanupOnLoaded: m,
2681
+ ...u
2682
+ } = e, [f, v] = F(null), [_, g] = F(null), [b, S] = F(null);
2683
+ return A(() => (h && h(), () => {
2684
+ m && m();
2685
+ }), [h, m]), /* @__PURE__ */ a("div", { ref: t, className: j(he["rp-theme-variables"], he["rp-container"]), children: /* @__PURE__ */ a(lr, { container: _, contentRef: b, children: /* @__PURE__ */ a(Da, { ...u, children: /* @__PURE__ */ a(to, { initialSearch: l, children: /* @__PURE__ */ a(xa, { initialThumbnailsVisible: i, children: /* @__PURE__ */ a(Un, { slots: r, children: /* @__PURE__ */ a(Vn, { children: /* @__PURE__ */ a(ir, { icons: o, children: /* @__PURE__ */ a(wr, { elementRef: b, children: /* @__PURE__ */ a(la, { children: /* @__PURE__ */ a(jn, { children: s ? /* @__PURE__ */ a(
2685
2686
  sr,
2686
2687
  {
2687
- getContainerRef: m,
2688
+ getContainerRef: g,
2688
2689
  toolbarRef: f,
2689
2690
  style: c,
2690
- className: h,
2691
+ className: p,
2691
2692
  children: /* @__PURE__ */ O(br, { children: [
2692
2693
  /* @__PURE__ */ O("div", { className: he["rp-layout"], children: [
2693
2694
  /* @__PURE__ */ a(Ia, { ref: v }),
2694
2695
  /* @__PURE__ */ O("div", { className: he["rp-content"], children: [
2695
2696
  /* @__PURE__ */ a("div", { className: he["rp-sidebar"], children: /* @__PURE__ */ a(Oa, {}) }),
2696
- /* @__PURE__ */ a("div", { ref: T, className: he["rp-pages"], children: n })
2697
+ /* @__PURE__ */ a("div", { ref: S, className: he["rp-pages"], children: n })
2697
2698
  ] })
2698
2699
  ] }),
2699
2700
  /* @__PURE__ */ a($n, {})
@@ -2702,8 +2703,8 @@ const sa = () => {
2702
2703
  ) : /* @__PURE__ */ a(
2703
2704
  "div",
2704
2705
  {
2705
- ref: T,
2706
- className: j(he["rp-pages"], h),
2706
+ ref: S,
2707
+ className: j(he["rp-pages"], p),
2707
2708
  style: c,
2708
2709
  children: n
2709
2710
  }